import type { DispatcherResult } from './tool-dispatcher.js'; export interface ToolTimeoutMessages { abort: (toolName: string) => string; timeout: (toolName: string, ms: number) => string; timeoutStopped: (toolName: string, ms: number) => string; timeoutSettledNote: (toolName: string, ms: number) => string; } export declare const EN_TOOL_TIMEOUT_MESSAGES: ToolTimeoutMessages; export declare const ZH_TOOL_TIMEOUT_MESSAGES: ToolTimeoutMessages; /** * Run a dispatcher with a per-tool wall timeout. * * `detachOnAbort: true` (read-only / parallel-safe): race timeout vs invoke * and return immediately; the invoke promise is swallowed if it loses. * `detachOnAbort: false` (mutations): abort the signal, then wait for the * dispatcher to settle so late side effects cannot land after the caller * has moved on. */ export declare function dispatchToolWithTimeout(run: (signal: AbortSignal) => Promise, outer: AbortSignal, timeoutMs: number, toolName: string, opts: { detachOnAbort: boolean; messages?: ToolTimeoutMessages; }): Promise; /** Pre-dispatch JSON-Schema check. Off via AGIM_TOOL_SCHEMA_VALIDATE=off. */ export declare function prevalidateToolArgs(toolName: string, args: unknown, schema: unknown): { ok: true; } | { ok: false; message: string; }; export interface ToolCallAuditCtx { traceId?: string; userId?: string; platform?: string; agent?: string; } /** Post-dispatch audit row (best-effort). Same shape as retired runAgentLoop. */ export declare function postAuditToolCall(audit: ToolCallAuditCtx | undefined, report: { name: string; isError: boolean; durationMs: number; preview: string; source?: string; argsKey?: string; decision?: 'allow' | 'deny'; }): void; //# sourceMappingURL=tool-call-spine.d.ts.map