import { c as InferCredentialSetAuth, i as AssertUniqueCredentialSetIds, p as Primitive, s as CredentialSetId, t as AnyCredentialSet } from "./CredentialSet-lUr_8nN3.mjs"; import { p as JsonObject } from "./schemas-DXcT2SRm.mjs"; import { z } from "zod"; //#region src/mcp-server/schemas.d.ts declare const McpTransportSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"stdio">; command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"sse">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strip>], "type">; declare const mcpServerConfigSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodOptional; description: z.ZodOptional; transport: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"stdio">; command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"sse">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strip>], "type">; credentialSets: z.ZodOptional>>>; credentials: z.ZodOptional>; }, z.core.$strip>; declare const McpServerManifestSchema: z.ZodObject<{ manifestVersion: z.ZodLiteral<1>; type: z.ZodLiteral<"mcpServer">; id: z.ZodString; name: z.ZodString; description: z.ZodOptional; transport: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"stdio">; command: z.ZodString; args: z.ZodOptional>; env: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"sse">; url: z.ZodString; headers: z.ZodOptional>; }, z.core.$strip>], "type">; credentialSets: z.ZodArray; type: z.ZodLiteral<"credentialSet">; id: z.ZodString; name: z.ZodString; description: z.ZodOptional; auth: z.ZodType>; credentialType: z.ZodEnum<{ oauth: "oauth"; manual: "manual"; }>; exposure: z.ZodOptional>; proxy: z.ZodOptional>; hostPatterns: z.ZodOptional>; injection: z.ZodOptional; basicAuth: z.ZodOptional; queryParams: z.ZodOptional; body: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; needsRawSecret: z.ZodOptional; }, z.core.$strip>>; credentialInjection: z.ZodOptional>>; headers: z.ZodOptional>>; }, z.core.$strip>>; }, z.core.$strip>; type McpServerManifest = z.infer; //#endregion //#region src/mcp-server/types.d.ts type StdioTransport = { readonly type: 'stdio'; readonly command: string; readonly args?: readonly string[]; readonly env?: Readonly>; }; type HttpTransport = { readonly type: 'http'; readonly url: string; readonly headers?: Readonly>; }; type SseTransport = { readonly type: 'sse'; readonly url: string; readonly headers?: Readonly>; }; type McpTransportConfig = StdioTransport | HttpTransport | SseTransport; interface McpCredentialInjection { readonly env?: Readonly>; readonly headers?: Readonly>; } interface McpCredentialReference { readonly credentialSetId: string; readonly key: string; } interface McpCredentialBindings { readonly env?: Readonly>; readonly headers?: Readonly>; } type McpCredentialReferenceNamespace> = Readonly<{ readonly [TCredentialKey in keyof InferCredentialSetAuth> & string]: Readonly<{ credentialSetId: TCredentialId; key: TCredentialKey; }> }>; type McpBindingCredentials = TCredentialSets extends readonly AnyCredentialSet[] ? Readonly<{ readonly [TCredentialId in CredentialSetId]: McpCredentialReferenceNamespace }> : Record; type McpCredentialContext = Readonly<{ credentials: Readonly>; }>; type McpCredentialBindingBuilder = (ctx: McpCredentialContext) => McpCredentialBindings; interface McpServerConfig { id: string; name?: string; description?: string; transport: McpTransportConfig; credentialSets?: TCredentialSets & AssertUniqueCredentialSetIds; credentials?: McpCredentialBindingBuilder; } type AnyMcpServer = McpServer; //#endregion //#region src/mcp-server/McpServer.d.ts declare class McpServer extends Primitive { #private; readonly kind: "mcp-server"; readonly id: string; readonly name: string; readonly description?: string; readonly transport: McpTransportConfig; readonly credentialSets: TCredentialSets; readonly credentialInjection?: McpCredentialBindings; constructor(config: McpServerConfig); configure(overrides: { name?: string; description?: string; }): McpServer; toManifest(): McpServerManifest; } //#endregion export { mcpServerConfigSchema as _, McpCredentialBindingBuilder as a, McpCredentialInjection as c, McpTransportConfig as d, SseTransport as f, McpTransportSchema as g, McpServerManifestSchema as h, McpBindingCredentials as i, McpCredentialReference as l, McpServerManifest as m, AnyMcpServer as n, McpCredentialBindings as o, StdioTransport as p, HttpTransport as r, McpCredentialContext as s, McpServer as t, McpServerConfig as u };