import { ActionRegistry, type ActionHandler, type JsonObject } from "@decionis/agent-safe-pipeline"; import type { ExecutionJournal } from "../journal/ExecutionJournal.js"; /** The digest of what the handler is about to send: the canonical parameters. */ export declare function requestDigest(parameters: unknown): `sha256:${string}`; /** * The decorator that makes a claimed grant durable before anything can be * dispatched. It runs inside the handler, after `SafeExecutor` consumed the * grant and before the handler's own body, which is where the verified * authorization exists and where a failure is still a failure *before* * dispatch. A journal that cannot take the record throws here, the registry * reports `FAILED_BEFORE_DISPATCH`, and `SafeExecutor` finalizes the attempt * as `FAILED`: there is no side effect without a durable record of the claim, * and the authority is told the attempt failed rather than being left to a * lease timeout. */ export declare function journaledActionHandler(handler: ActionHandler, journal: () => ExecutionJournal | null): ActionHandler; /** * The registry the adopter's registration fills. Every handler it accepts is * wrapped, so the durable claim is not something a registration can forget: * an adopter writes an ordinary handler and the journal record happens * anyway. `SafeExecutor` and the pipeline's own registry are untouched. */ export declare class JournaledRegistry extends ActionRegistry { private readonly journal; constructor(journal: () => ExecutionJournal | null); register(action: string, handler: ActionHandler): this; } /** The principal a journal record names, when one is in scope. */ export declare function callerPrincipal(): string | null; export type { JsonObject }; //# sourceMappingURL=JournaledActionHandler.d.ts.map