/** * MCP server settings — the global user-configured server map plus the * security-hardened per-thread server entries (http-only, reserved-name and * header-name invariants) and dashboard masking helpers. */ export type McpServerConfig = { type: "stdio"; command: string; args?: string[]; env?: Record; } | { type: "http"; url: string; headers?: Record; env?: Record; }; /** Returns all user-configured MCP servers (excludes auto-injected sensorium). */ export declare function getMcpServers(): Record; /** Overwrites the entire MCP servers map. */ export declare function setMcpServers(servers: Record): void; /** Add or update a single MCP server by name. */ export declare function addMcpServer(name: string, config: McpServerConfig): void; /** Remove an MCP server by name. Returns true if it existed. */ export declare function removeMcpServer(name: string): boolean; /** MCP server names a per-thread entry may never use. */ export declare const RESERVED_MCP_NAMES: readonly string[]; /** A per-thread MCP server entry — HTTP transport only (no stdio, by design). */ export type ThreadMcpServer = { type: "http"; url: string; headers?: Record; }; /** Parse a per-thread server map, dropping reserved names and non-http/invalid entries. */ export declare function parseThreadMcpServers(raw: unknown): Record; /** Returns a thread's custom MCP servers (http-only, reserved names excluded). */ export declare function getThreadMcpServers(threadId: number): Record; /** * Validate a caller-supplied server map against the per-thread invariants * (http-only, non-reserved name, safe header names). Throws on any violation so * the dashboard can surface a 400. Shared by per-thread MCP writes and agent * templates (which carry the same kind of map). */ export declare function sanitizeThreadMcpServers(servers: Record | null | undefined): Record; /** Header value the dashboard shows in place of a stored secret; must never be persisted back. */ export declare const MASK_SENTINEL = "\u2022\u2022\u2022\u2022"; type MaskedThreadMcpServer = { type: "http"; url: string; headers?: Record; }; /** Mask header values so the dashboard shows which headers exist without leaking the secret. */ export declare function maskThreadMcpServers(servers: Record): Record; export declare function setThreadMcpServers(threadId: number, servers: Record | null): void; /** Remove a thread's custom MCP servers entirely (called on hard-delete). */ export declare function deleteThreadMcpServers(threadId: number): void; /** All per-thread MCP servers (for dashboard enrichment), reserved/invalid excluded. */ export declare function getAllThreadMcpServers(): Record>; export {}; //# sourceMappingURL=mcp-settings.d.ts.map