import type { JsonObject, JsonValue } from "@decionis/agent-safe-pipeline"; import type { BankingAction } from "./BankingAction.js"; /** The registry this file mirrors, and the version of it. */ export declare const PROJECTION_PROFILE = "decionis.beap/v1.0"; /** Every projection begins with these, per the registry's `base_projection`. */ export declare const BASE_PROJECTION: readonly ["effect_type", "domain", "action", "target"]; export interface RegisteredAction { readonly domain: string; readonly type: string; readonly effectType: string; /** The fields beyond the base that this action's expected effect is made of. */ readonly projection: readonly string[]; } /** * The action types this build implements, mirrored from the profile's * `action-types` registry: the effect each produces and the fields its * expected-effect projection is made of. A test hashes the registry files * against the profile's own manifest and asserts every entry here equals the * mirror, so a drift in the profile is a failing test rather than a silent * disagreement. The runtime never reads `profiles/`. */ export declare const REGISTERED_ACTIONS: readonly RegisteredAction[]; export declare class ProjectionError extends Error { readonly code: "ACTION_NOT_REGISTERED_IN_PROFILE" | "PROJECTION_FIELD_MISSING"; readonly subject?: string | undefined; constructor(code: "ACTION_NOT_REGISTERED_IN_PROFILE" | "PROJECTION_FIELD_MISSING", subject?: string | undefined); } export declare function registeredAction(domain: string, type: string): RegisteredAction; /** * Where a projection field comes from in a BankingAction. The profile names * the fields but not the paths, so this is the executor's own rule, written * down rather than implied: * * - `amount` and `currency` come from `financial_context` * - `source_ref`, `destination_ref` and `parameters.*` from `requested_effect` * - `subject` and `target` are the entity's `type:ref` * - `batch.*` from `batch` * * It is implementation-defined until the profile's owner confirms it, and the * conformance note says so. A field the action does not carry is a refusal, * not an absent key, because an expected effect with a hole in it would * compare equal to an observation with a different hole. */ export declare function projectionValue(action: BankingAction, field: string): JsonValue; /** * The expected effect: the base fields and the action's own, each read from * the action, in the order the registry lists them. This object is what the * expected-effect digest is taken over, and what an observation is compared * against field by field. */ export declare function expectedEffect(action: BankingAction): JsonObject; //# sourceMappingURL=EffectProjections.d.ts.map