import type { AgentTool } from '@earendil-works/pi-agent-core'; import type { ExternalDiscoveryParams, ExternalDiscoveryResult } from './discovery.js'; import type { ExternalToolService } from './service.js'; import type { ExternalToolSource } from './types.js'; import type { ToolInvalidationReason } from '../embedded/tool-metadata.js'; import type { ToolExecutorConfig } from '../tools/executor.js'; export interface ExternalToolRegistry { service: ExternalToolService; search: (params: ExternalDiscoveryParams) => Promise; nativeSources: readonly ExternalToolSource[]; discovery?: { native: boolean; connectors: boolean; }; execute: AgentTool['execute']; executorConfig?: Partial; subscribeInvalidation?: (conversationId: string, toolRef: string, listener: (reason?: ToolInvalidationReason) => void) => () => void; } /** Keep the host executor available without exposing its registry in model declarations. */ export declare function bindExternalToolRegistry(tool: AgentTool, registry: ExternalToolRegistry): void; export declare function getExternalToolRegistry(tools: readonly AgentTool[]): ExternalToolRegistry | undefined;