import type { JsonObject } from "@decionis/agent-safe-pipeline"; import type { DownstreamConfig } from "../../config/ExecutorConfig.js"; import type { PrincipalActor } from "../../identity/PrincipalRegistry.js"; import { type BankingAction } from "./BankingAction.js"; export declare class BindingError extends Error { readonly code: string; constructor(code: string); } export interface BindingInput { /** The action and target the caller proposed, over the transport. */ readonly action: string; readonly target: string; readonly parameters: JsonObject; readonly idempotencyKey: string; readonly downstream: DownstreamConfig; readonly actor: PrincipalActor; } export interface BoundBankingAction { readonly action: BankingAction; /** The trusted context the executor computes; never anything the caller sent. */ readonly context: JsonObject; readonly expectedEffectDigest: string; readonly intentDigest: string; } /** * The gate between the transport and the profile. A BEAP action arrives as * the canonical `BankingAction` in the proposal's parameters, and the * transport's own action name and target are derived from it rather than * trusted: if they disagree, the caller is describing one thing and asking * for another, and the proposal is refused before the authority is asked. * * The same rule covers the request id, which must be the idempotency key the * attempt is bound to; the downstream, which must be the one this process is * configured for and not a provider the caller named; and the actor, which * must be the principal the door authenticated. Every one of these is a * `422` refusal, and none of them costs a dossier. * * What the executor adds is the trusted context: the profile, the intent * digest and the expected-effect digest, computed here from the action * itself. The proposal schema already refuses a caller-supplied context, so * these cannot be presented from outside. */ export declare function bindBankingAction(input: BindingInput, digests: (action: BankingAction) => { readonly intentDigest: string; readonly expectedEffectDigest: string; }): BoundBankingAction; //# sourceMappingURL=BankingIntentBinder.d.ts.map