/** * Tool-execution hook for the action ledger (Phase 5 reversible agency). * * Wraps a koi tool's `execute` so every call appends one ledger entry with * timing, outcome, and a conservative risk tier. Strictly fail-open: ledger * writes are fire-and-forget and any ledger error is swallowed — the tool * call itself must never be affected. */ import type { AnyKoiTool } from "./pi-tools.types.js"; export type ActionLedgerContext = { koiId?: string; sessionId?: string; }; /** Await all in-flight ledger writes (test/shutdown helper). */ export declare function flushActionLedgerWrites(): Promise; export declare function wrapToolWithActionLedger(tool: AnyKoiTool, ctx?: ActionLedgerContext): AnyKoiTool;