@agentspec/sdk 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -69,7 +69,12 @@ var McpServerSchema = z.object({
69
69
  transport: z.enum(["stdio", "sse", "http"]).describe('"stdio" = spawn a local process (requires "command"), "sse" = Server-Sent Events over HTTP, "http" = streamable HTTP (requires "url").'),
70
70
  command: z.string().optional().describe('Shell command to spawn the MCP server process. Required for transport "stdio" (e.g. "npx", "python").'),
71
71
  args: z.array(z.string()).optional().describe('Arguments passed to the command (e.g. ["-m", "my_mcp_server"]). Only used for transport "stdio".'),
72
- url: z.string().url().optional().describe('Base URL of the remote MCP server. Required for transport "sse" or "http". ' + refDesc),
72
+ // refOrLiteral, not z.string().url(). This field's own description promises reference syntax,
73
+ // and `.url()` rejected every form of it — so an MCP server whose address comes from the
74
+ // environment (`$env:GITHUB_MCP_URL`, which is the normal case in a cluster, where the URL is
75
+ // a Service name that differs per namespace) could not be declared at all. Every sibling
76
+ // address field in this schema already uses refOrLiteral; this one was the outlier.
77
+ url: refOrLiteral.optional().describe('Base URL of the remote MCP server. Required for transport "sse" or "http". ' + refDesc),
73
78
  env: z.record(z.string(), refOrLiteral).optional().describe('Environment variables injected into the MCP server process. Values support reference syntax. Use "$env:API_KEY" to forward secrets without hardcoding.'),
74
79
  healthCheck: z.object({
75
80
  timeoutSeconds: z.number().int().min(1).max(60).default(5).describe("Seconds to wait for the MCP server to respond during health checks. Increase for slow-starting processes.")