import type { ExtensionFactory, ToolInfo } from '@earendil-works/pi-coding-agent'; import type { NativeMcpConfig } from './native-mcp.js'; export declare const MCP_SERVERS_SECTION = "mcp_servers"; export declare const MAX_MCP_DIRECTORY_CHARS = 4096; export type CachedServerSummary = { fingerprint: string; toolCount: number; summary: string; updatedAt: number; }; export declare class McpServerSummaryCache { private readonly memory; private readonly durable; get(serverName: string): CachedServerSummary | undefined; set(serverName: string, entry: CachedServerSummary): void; } export declare const defaultMcpServerSummaryCache: McpServerSummaryCache; /** * Synthesize a compact, high-signal 1-line capability summary from a server's offered tools * when the server provides neither `config.description` nor MCP `instructions`. */ export declare function synthesizeServerSummaryFromTools(serverName: string, tools: readonly Pick[]): string; export type ServerDirectoryEntry = { name: string; namespace: string; exposure: 'codemode' | 'deferred' | 'direct' | 'hidden'; description?: string; instructions?: string; tools: readonly Pick[]; hasActiveTools?: boolean; }; /** * Render a 2-tier `` prompt section: * - Unified routing guidance (eliminating `codemode` vs `tool_search` conflict). * - Tier 1: rich 1-line summaries for top/active servers (auto-synthesized if server omits metadata). * - Tier 2: compact named directory for any remaining servers so tail servers are never invisible. */ export declare function renderTwoTierMcpDirectory(entries: readonly ServerDirectoryEntry[], options?: { maxChars?: number; maxTier1?: number; codemodeActive?: boolean; toolSearchActive?: boolean; cache?: McpServerSummaryCache; }): string | undefined; /** * Post-MCP extension that enriches the `mcp_servers` system prompt section with * auto-synthesized summaries, 2-tier folding for large server counts, and unified routing guidance. * Must be registered AFTER `createMcpExtension` in `extensionFactories`. */ export declare function createXopcMcpDirectoryExtension(mcp: NativeMcpConfig, options?: { cache?: McpServerSummaryCache; }): ExtensionFactory;