UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

36 lines • 1.52 kB
import { z } from 'zod'; import type { ConfigOf } from '../../vfs/secrets.ts'; export declare const HEADER_NAME: RegExp; export declare const HEADER_VALUE: RegExp; /** * How a request to the server authenticates: one header. `bearer` sends * `Authorization: Bearer <token>`; `header` sends `<name>: <token>`. * * One flat strict object, not a union: the snapshot redaction never walks a * union's members, so a union would save the token. */ export declare const MCPAuth: z.ZodObject<{ type: z.ZodEnum<{ header: "header"; bearer: "bearer"; }>; token: import("../../vfs/secrets.ts").SecretSchema<z.ZodString>; name: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strict>; export type MCPAuth = ConfigOf<typeof MCPAuth>; /** Where an MCP server is and how to authenticate to it; no auth for a public server. */ export declare const MCPConfig: z.ZodObject<{ url: z.ZodString; auth: z.ZodOptional<z.ZodNullable<z.ZodObject<{ type: z.ZodEnum<{ header: "header"; bearer: "bearer"; }>; token: import("../../vfs/secrets.ts").SecretSchema<z.ZodString>; name: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strict>>>; }, z.core.$strict>; export type MCPConfig = ConfigOf<typeof MCPConfig>; /** `config` checked against MCPConfig, as every config is parsed; ZodError for one it refuses. */ export declare function parseMCPConfig(config: Record<string, unknown>): MCPConfig; //# sourceMappingURL=config.d.ts.map