import type { PostToolOutputResponse } from "./types.js"; /** * Why a governed call ran WITHOUT a decision from ACP (acp-governance-sdks#6). * * not-configured — no context bound; wrap the handler in withContext() * unreachable — the gateway could not be reached (network / timeout) * gateway-error — the gateway answered without a decision (5xx, 401…) * * Fail-open is deliberate: governance must never be the single point of * failure for an agent. Fail-open *silently* is the failure mode this SDK * exists to eliminate — so every lapse is announced once per cause per * process (console.warn), names its cause in the returned reason, and * leaves a line in the lapse log for every call it let through. */ export type UngovernedCause = "not-configured" | "unreachable" | "gateway-error"; /** Test seam: forget which causes have been announced. */ export declare function _resetUngovernedWarningsForTests(): void; /** * Ask ACP whether a tool call should proceed. POSTs to /govern/tool-use. * * Fails open: when no decision could be obtained the result is `allow` with * reason `"fail-open (): "` — announced once per cause on * console.warn, and recorded in the lapse log for every such call. */ export declare function preToolUse(toolName: string, toolInput?: unknown): Promise<{ allowed: boolean; reason: string; decision: "allow" | "deny" | "ask"; }>; /** * Report the result of a tool call to ACP. POSTs to /govern/tool-output. * * Fire-and-forget by default. If the response indicates redaction or block, * it is returned so the caller can optionally swap `tool_output` for the * server-redacted version or drop the result. Returns null when no answer * could be obtained — the pre-call already announced the lapse. */ export declare function postToolOutput(toolName: string, toolInput: unknown, toolOutput: unknown): Promise; //# sourceMappingURL=hook.d.ts.map