import type { AgentToolResult } from '@earendil-works/pi-agent-core'; import type { Config } from '../../config/schema.js'; import type { ExtensionHookRunner } from '../../extensions/index.js'; import type { SessionMcpRuntime } from '../mcp/bundle-mcp-types.js'; import type { ExternalToolDescriptor, ExternalToolExecutionContext, ExternalToolProvider, ExternalToolSearchHit } from './types.js'; export interface McpToolProviderDeps { workspace: string; getConfig: () => Config | undefined; getSessionKey: () => string | undefined; agentId?: string; hookRunner?: ExtensionHookRunner; getRuntime?: (params: { sessionId: string; sessionKey?: string; workspaceDir: string; cfg?: Config; }) => Promise; } export declare class McpToolProvider implements ExternalToolProvider { private readonly deps; readonly source: "mcp"; constructor(deps: McpToolProviderDeps); search(_query: string): Promise; describe(toolRef: string): Promise; execute(toolRef: string, args: Record, _approvalId: string | undefined, context: ExternalToolExecutionContext): Promise>>; private resolve; private isAllowed; private executionSignal; private withRuntime; }