/** * context-mode-bridge.ts — Bridge between pi-subagents and @onlinechef/context-mode. * * Provides optional ctx_* tool injection for sub-agents. When context-mode is * installed, sub-agents gain sandboxed code execution and BM25 FTS5 search. * When not installed, all functions gracefully return null/empty — no errors. */ /** * Check if @onlinechef/context-mode is installed in the runtime. * Uses synchronous module resolution — pi's runtime provides `require`. * Cached after first call for zero-cost repeat checks. */ export declare function isContextModeAvailable(): boolean; /** * Get the list of ctx_* tool names provided by context-mode. * Pure function — always returns the same constant array. */ export declare function getCtxToolNames(): string[]; /** * Build a markdown routing block instructing sub-agents to use ctx_* tools. * Mirrors context-mode's AGENTS.md routing rules. * Pure function — same input always produces same output. */ export declare function buildCtxRoutingBlock(): string; /** Result shape for buildCtxInjection — only returned when context-mode is available. */ export interface CtxInjection { /** Markdown block to append to the sub-agent's system prompt. */ systemPromptAddition: string; /** Tool names to add to the sub-agent's tool allowlist. */ toolAllowList: string[]; } /** * Build the context-mode injection payload for a sub-agent. * Returns null when context-mode is not installed (early exit — no errors). * * When available, returns the system prompt addition and ctx_* tool names * that should be injected into the sub-agent's configuration. */ export declare function buildCtxInjection(): CtxInjection | null;