export interface ToolOutput { buffer: Buffer; fileName: string; mime: string; } export interface ToolResult { outputs: ToolOutput[]; log?: string[]; error?: string; } /** * Identity a node tool runs under (2026-10) — resolved in the orchestrator * handler from the command's ADDRESSED agent, exactly the way a spawned task * session gets its agent + key. Tools use it for any API call they make (a * document download, a secrets fetch) so the run speaks as ITS OWN agent. */ export interface ToolRunContext { /** The agent this run belongs to (the one the hub addressed it to). */ agentUserId?: string; /** That agent's API key, resolved by id — never scanned for. */ apiKey?: string; /** API base URL in https form. */ baseUrl: string; } export interface ToolModule { key: string; run(params: Record, ctx?: ToolRunContext): Promise; } /** The timeout budget for a tool key (exported for tests). */ export declare function toolTimeoutMs(toolKey: string): number; export declare function listToolKeys(): string[]; export declare function runTool(toolKey: string, params: Record, ctx?: ToolRunContext): Promise;