import type { AuthorityEffectEvidence } from "@decionis/agent-safe-pipeline"; import { type Comparison, type ReceiptComparison } from "./EffectComparison.js"; import type { PreparedAction, ProviderResult } from "./EffectAdapter.js"; import type { RegisteredEffect } from "./EffectEvidenceRegister.js"; /** * The profile whose effect-evidence record this builder writes. It is named * here rather than imported from the banking family, because this layer is * family-agnostic and the family imports it, not the reverse; the family's * own `BEAP_PROFILE` is held equal to it by test. */ export declare const EFFECT_EVIDENCE_PROFILE = "decionis.beap/v1.0"; export type ConfirmationStatus = "PENDING" | "CONFIRMED" | "NOT_EFFECTED" | "REVERSED" | "UNKNOWN"; export type EffectOutcome = "COMMITTED" | "FAILED" | "INDETERMINATE"; export interface EvidenceInput { readonly prepared: PreparedAction; readonly result: ProviderResult | null; /** Set when the provider neither committed nor refused. */ readonly indeterminate?: { readonly reason: string; readonly providerStatus: string | null; }; readonly observer: { readonly id: string; readonly version: string; }; readonly correlationId: string; readonly idempotencyKey: string; readonly observedAt: string; } /** * What confirmation an observation actually supports. An acknowledgement is * never a confirmation: a provider saying "accepted" has told you it took * the request, not that the effect exists, so the confirmation stays * `PENDING` until something read the effect back and it matched. A * mismatch is `UNKNOWN`, not `NOT_EFFECTED`: something happened, and what * it was is exactly what nobody can yet say. A receipt that contradicts this * account is the same unknown from the other side: two witnesses disagree, * and neither confirms anything until someone reconciles them. */ export declare function confirmationFor(outcome: EffectOutcome, comparison: Comparison, method: string, receipt?: ReceiptComparison): ConfirmationStatus; /** * The effect record for one attempt: what was expected, what was observed, * whether they agree, and what that supports. It carries digests, * identifiers, statuses and codes; no provider body, no parameter, no * credential. The record is digested over its own canonical form, so a * later reader can tell that the record they hold is the record that was * made. */ export declare function buildEffectRecord(input: EvidenceInput): RegisteredEffect; /** * The same observation in the authority's own Protocol 1.1 shape. The * authority binds it to the grant by the expected-effect digest and the * commit correlation id, and refuses a whole finalization whose evidence it * cannot bind, so nothing is invented here: the digests and the correlation * id are the ones the attempt actually used, and a `MISMATCH` is reported as * `UNCONFIRMED` with the digest that was observed rather than hidden. */ export declare function authorityEffectEvidence(effect: RegisteredEffect, correlationId: string, observer: { readonly id: string; readonly version: string; }): AuthorityEffectEvidence; //# sourceMappingURL=EffectEvidenceBuilder.d.ts.map