Publishes a JSON schema for `mcp.json` at
`https://pi.dev/schemas/mcp.schema.json`, like the existing
models/settings/keybindings/theme schemas. Closes#12563.
## What
**pi-mcp** (owner of the shared `mcpServers` shape):
- New `./config-schema` export: the shared fields as a JSON Schema built
with pi-schema, following the pi-ai compat/model-schema pattern.
Field-level constraints (loopback `callbackUrl`, non-blank `clientName`,
port bounds, URL patterns, `protocol`) live here, next to the validator
they mirror.
- `McpStdioServerConfig`, `McpHttpServerConfig`, and `McpOAuthConfig`
now derive from the schema (`Static`), so schema and types cannot drift.
`McpHttpServerConfig.type` now includes `"streamable-http"`, which the
validator always accepted. The validator itself is unchanged, and the
root export does not load pi-schema (type-only imports).
**coding-agent**:
- `src/core/mcp-config-schema.ts` composes pi's fields (`exposure`,
`toolExposure`, `auth`, `autoEnableCodemode`, project override entries)
on top of pi-mcp's property maps, re-annotated with pi's behavior, and
`generate-schemas.ts` emits the committed `schemas/mcp.schema.json`.
- Entries, oauth, and the document root are closed objects: the loader
deliberately keeps unknown fields, so a mistyped key (`exposur`,
`mcpSevers`) changes behavior silently today; the schema flags it in the
editor.
- Docs: `$schema` line in `docs/mcp.md`, plus a section for the
previously undocumented `auth` field (separate commit).
## Intentional schema/runtime differences
Documented in the `mcp-config-schema.ts` header and asserted in the
tests: cross-field rules stay prose (override/`auth` file scoping, cimd
restrictions, port agreement), URL schemes must be lowercase, and
entries mixing `url` with `command` are flagged although the runtime
picks HTTP.
## Tests
- `packages/mcp/test/config-schema.test.ts`: schema/validator agreement
for the shared fields.
- `packages/coding-agent/test/config-schemas.test.ts`: fifth artifact
pinned, representative documents, a runtime-validator agreement test
(accept and reject lists plus the documented asymmetries), and a
compile-time key-parity guard against the runtime config types.
- `npm run check` clean; pi-mcp suite 199/199; coding-agent
config-schemas/documentation/references pass.
This PR is AI-generated.
* docs(ai,coding-agent): generate models.json reference from schemas
Add npm run generate:references, which renders docs/models-configuration.md
from the models.json TypeBox schemas, and describe provider and model fields
in those schemas. Overrides get their own descriptions without defaults, and
compat sections cover the Responses API aliases.
closes#10790
* Modify changelog
* docs(ai,coding-agent): use shared thinkingLevelMap and promptCache schemas
Replace the per-use schema helpers with fixed schemas whose descriptions
hold for both models and modelOverrides entries.
* feat(coding-agent): use pi.dev configuration schemas
* refactor(coding-agent): separate schema URL from output path
* docs(coding-agent): document published schema URLs