Address PR #1204 review: add ajv dep and StdioServerConfig comment

Add ajv as an explicit dependency in clients/web/package.json (was only
available transitively via @modelcontextprotocol/sdk). Add inline comment
on StdioServerConfig.type explaining the implicit-default contract and
its impact on switch narrowing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cliffhall 2026-04-16 20:23:30 -04:00
commit 813c4638f1

View file

@ -16,6 +16,9 @@ import type { JsonValue } from "../json/jsonUtils.js";
// Stdio transport config
export interface StdioServerConfig {
// Optional: stdio is the implicit default when `type` is absent. A
// narrowing `switch (config.type)` must therefore cover the `undefined`
// branch as `StdioServerConfig`.
type?: "stdio";
command: string;
args?: string[];