/** * Zod schema for the runtime.yaml `mcp` section (issue #1137). * * The `mcp` section is a top-level sibling of `provider` (order.md:36). It owns * `servers`, `defaults`, and `targets`. `targets` exposes only the four * documented selectors (`personas` / `tags` / `steps` / `internal_agents`); the * `internal_agents` target carries a single `selector.exclude` list that applies * a common exclude to both internal agents (order.md:76-80). * * Env interpolation, secret redaction, and identity construction live here so * every consumer (loader, assignment resolver, provider adapters) shares a * single source of truth for the resolved server shape. */ import { z } from 'zod'; import type { McpServerConfig } from '../../../core/models/workflow-provider-options.js'; /** MCP transport types accepted by the common schema. */ export type McpTransport = 'stdio' | 'sse' | 'http'; export declare const McpServerEntrySchema: z.ZodUnion>; command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"sse">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"http">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strict>]>; export declare const McpServersMapSchema: z.ZodRecord>; command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"sse">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"http">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strict>]>>; /** `defaults.servers` is a plain string array referencing server names. */ declare const McpDefaultsSchema: z.ZodObject<{ servers: z.ZodArray; }, z.core.$strict>; /** `personas`/`tags`/`steps` targets share the same `servers`/`exclude` shape. */ declare const McpTargetEntrySchema: z.ZodObject<{ servers: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>; declare const McpTargetsSchema: z.ZodObject<{ personas: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>>; tags: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>>; steps: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>>; internal_agents: z.ZodOptional>; }, z.core.$strict>; }, z.core.$strict>>; }, z.core.$strict>; export declare const McpSectionSchema: z.ZodObject<{ servers: z.ZodOptional>; command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"sse">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"http">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strict>]>>>; defaults: z.ZodOptional; }, z.core.$strict>>; targets: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>>; tags: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>>; steps: z.ZodOptional>; exclude: z.ZodOptional>; }, z.core.$strict>>>; internal_agents: z.ZodOptional>; }, z.core.$strict>; }, z.core.$strict>>; }, z.core.$strict>>; }, z.core.$strict>; export type McpSection = z.infer; export type McpServerEntry = z.infer; export type McpDefaults = z.infer; export type McpTargets = z.infer; export type McpTargetEntry = z.infer; /** Validate every server reference before any agent target is selected. */ export declare function validateMcpSectionReferences(section: McpSection): void; /** * Resolve `${VAR}` references in a server entry against `process.env` (or an * explicit env source). Fails fast when a required env var is undefined; never * silently substitutes an empty string (order.md:110). */ export declare function interpolateMcpEnv(server: McpServerConfig, env?: NodeJS.ProcessEnv): McpServerConfig; /** * Return the server without the internal log-safe-source metadata. Provider * boundaries that serialize whole server objects (rather than projecting known * fields) must strip the metadata so it never reaches provider config files. */ export declare function stripMcpServerInternalMetadata(server: McpServerConfig): McpServerConfig; /** * Return a log-safe representation of a server entry. Environment/header values, * URL userinfo, and authentication argument values are redacted (order.md:110). */ export declare function redactMcpServerForLog(server: McpServerConfig): Record; /** * Build a deterministic identity for a resolved server. The identity includes * the server name and non-secret command/args or URL, while excluding env and * headers. Interpolated servers use their pre-interpolation structure so a * secret rotation does not change the identity (order.md:270,335). */ export declare function buildMcpServerIdentity(serverName: string, server: McpServerConfig): string; /** * Build a sorted, order-independent identity for a set of resolved servers. * Used by session/cache/pool keys to ensure different MCP sets never share a * session (order.md:269,333). */ export declare function buildMcpServerSetIdentity(servers: Record): string; export {}; //# sourceMappingURL=mcp-schema.d.ts.map