import type { AgentTool, BeforeToolCallContext } from '@earendil-works/pi-agent-core'; import type { ToolDefinition } from '@earendil-works/pi-coding-agent'; export type ToolInvalidationReason = 'connection' | 'authorization' | 'catalog'; export type XopcToolMetadata = Pick & { external?: { toolRef: string; revision: string; readOnly: boolean; deviceRole?: 'source' | 'selected' | 'other'; }; subscribeInvalidation?: (listener: (reason?: ToolInvalidationReason) => void) => () => void; }; export declare function setXopcToolMetadata(tool: AgentTool, metadata: XopcToolMetadata): AgentTool; export declare function getXopcToolMetadata(tool: AgentTool): XopcToolMetadata | undefined; export declare function deferredToolContract(tool: AgentTool): string; /** Deferred declarations retain the policy identity of the existing external gateway. */ export declare function externalPolicyContext(context: BeforeToolCallContext, tools: readonly AgentTool[]): BeforeToolCallContext;