fix(mcp): carry requestIdFormat through MCP config discovery
The option was only present on the transport-facing `MCPServerConfig`, so a value written in `.omp/mcp.json` or a standalone `.mcp.json` never reached the transports: discovery normalizes config into the canonical `MCPServer` shape and `convertToLegacyConfig()` rebuilds the transport config from it, and neither step knew about the field. Setting `"number"` in the documented config path silently kept the snowflake-string default, which is the hang the option exists to avoid. Wire it through the same four places `timeout` already uses: the canonical `MCPServer` shape, the two OMP-native loaders (with validate-and-warn on an unrecognized value), and the legacy conversion. Foreign-format providers are untouched, since the key is OMP-specific. Also point the `MCPServerConfigBase` doc comment at `RequestIdAllocator` rather than a helper name that never existed.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
* Canonical shape for MCP server configurations, regardless of source format.
|
||||
* All providers translate their native format to this shape.
|
||||
*/
|
||||
|
||||
import type { MCPRequestIdFormat } from "../mcp/types";
|
||||
import { defineCapability } from ".";
|
||||
import type { SourceMeta } from "./types";
|
||||
|
||||
@@ -17,6 +19,8 @@ export interface MCPServer {
|
||||
enabled?: boolean;
|
||||
/** Connection timeout in milliseconds */
|
||||
timeout?: number;
|
||||
/** Encoding for outgoing JSON-RPC request ids (default: `"string"`) */
|
||||
requestIdFormat?: MCPRequestIdFormat;
|
||||
/** Command to run (for stdio transport) */
|
||||
command?: string;
|
||||
/** Command arguments */
|
||||
|
||||
Reference in New Issue
Block a user