microsoft / microsoft/agent-host-protocol

Support minItems and maxItems in config array schemas

Open
#432 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
348
Forks
122
Avg merge
14h 12m
Merged PRs (30d)
22

Description

Context

VS Code has a session-mutable configuration property that is represented as an array with a zero-or-one-item contract:

https://github.com/microsoft/vscode/pull/332593

The current Agent Host Protocol ConfigPropertySchema can describe type: "array" and its items, but cannot express array cardinality.

Ask

Please add JSON Schema-compatible array cardinality fields:

interface ConfigPropertySchema {
    minItems?: number;
    maxItems?: number;
}

Servers and generated clients should carry these fields through schema serialization and validate them consistently.

Consumer requirement

VS Code needs to advertise maxItems: 1 for a session config array so clients cannot persist a value that passes the protocol schema but is later rejected by the provider's narrower runtime validation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TypeScript ConfigPropertySchema definition and the existing schema serialization, generated client, and validation tests. Add coverage for minItems and maxItems, including the zero-or-one-item case, and verify that servers and clients preserve and enforce both fields consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.