import { a as McpSessionConfig, i as McpConfigSource, n as McpConfigGroups, r as McpConfigGroupsInput, t as McpAllowlist } from "./mcpConfig-BAHqTlz_.mjs"; import "@agimon-ai/doompi-core/mcpStatus"; import "@agimon-ai/doompi-core/mcpToolResolver"; import { McpToolInfo } from "@agimon-ai/mcp-proxy"; import "@agimon-ai/doompi-core/packageApi"; import "@modelcontextprotocol/sdk/types.js"; //#region src/services/configSources/index.d.ts /** Wrapper entry used by non-Doom clients to expose `mcp-config.yaml` as one MCP. */ export declare const PROXY_SERVER_NAME = "mcp-proxy"; /** * Resolves every config layer for this session and applies its domain allowlist. * * All returned layers go into one embedded `@agimon-ai/mcp-proxy` client container. * The package is used as a library only: its wrapper MCP never becomes a Doom MCP * server, so status, enable/disable, resources, and OAuth stay attached to each * actual downstream server. */ export declare function buildMcpConfigGroups(input: McpConfigGroupsInput): McpConfigGroups; //#endregion //#region src/types/mcpRuntime.d.ts interface CatalogServer { name: string; tools: McpToolInfo[]; } /** Server definitions from the previous run, available before any socket opens. */ interface CachedCatalog { servers: CatalogServer[]; } //#endregion //#region src/services/mcpRuntime/index.d.ts /** * Definitions cache path shared by Doom's synchronous warm reader and mcp-proxy. * * Generated staging paths are deliberately absent: projected source content must * invalidate a reused path, while identical portable content must survive a new * private staging directory. Stable source origins are carried inside each cache * key; format and merge behavior remain part of the ordered identity. */ export declare function definitionsCachePath(configSources: readonly McpConfigSource[]): string; /** * Reads the catalog the previous run left behind. * * Synchronous on purpose: Pi has to be able to register these tools during * extension install, before it takes its first turn, and awaiting a file read * would let that turn start with an empty tool set. A miss is normal on a first * run and resolves to an empty catalog rather than an error. * * The file path is content-addressed from the current ordered layers, and its proxy * version is checked before any schema is registered. Servers filtered out of the * current configuration are also excluded later by `McpCatalog.seed`. */ export declare function readCachedCatalog(configSources: readonly McpConfigSource[], cachePathFor?: (sources: readonly McpConfigSource[]) => string): CachedCatalog; //#endregion //#region src/services/sessionConfig/index.d.ts /** * Resolves what this session should connect to. * * Every field falls back to a working default so the extension is usable outside * doom-pi: a bare Pi session in a repository still gets that repository's * `.mcp.json` with no allowlist. A malformed value is treated as absent rather * than fatal, because losing MCP is better than losing the session. */ export declare function readSessionConfig(env?: Readonly>, defaultRepoRoot?: string): McpSessionConfig; /** Serializes the configuration for the Pi child process doom-pi launches. */ export declare function sessionConfigEnvironment(config: McpSessionConfig): Record; //#endregion //#region src/schemas/directTools.d.ts /** Environment variable carrying a child agent's MCP tool selection. */ export declare const DIRECT_TOOLS_ENV = "MCP_DIRECT_TOOLS"; /** Explicit "no MCP tools", distinct from an unset variable meaning "no limit". */ export declare const NO_DIRECT_TOOLS = "__none__"; //#endregion //#region src/schemas/sessionConfig.d.ts /** @deprecated Use `DOOM_MCP_SESSION_ENV_VAR` from extension contracts. */ export declare const SESSION_ENV_VAR = "DOOM_MCP_SESSION"; //#endregion //#region src/services/mcpCatalog/index.d.ts /** * Pi's tool name for a downstream tool. * * Always prefixed, matching what `pi-mcp-adapter` produced by default. Tool names * are a contract with agent frontmatter selectors, transcripts, and user habit, so * they stay stable across the swap rather than following mcp-proxy's internal * scheme, which prefixes only on a clash. */ export declare function toPiToolName(serverName: string, toolName: string): string; //#endregion export type { CachedCatalog, McpAllowlist, McpConfigGroups, McpConfigSource, McpSessionConfig }; //# sourceMappingURL=index.d.mts.map