/** * D16 adoption of the AIWG effect ledger (#2722). * * - `ledgerJobEffectRecorder` records a `decision.receipt` effect for a job * item attempt once the admitted evaluator has written its D03 receipt and * before the job record is updated. The effect's payload digest is the D03 * receipt digest, so the ledger holds digest references only. * - `ledgerExecutionUnknownResolver` is the opt-in resolver for * `DecisionJobRuntime.reconcile(..., { resolveUnknown })`. It resolves an * `execution-unknown` item only when the `decision.receipt` verifier reports * `present` / `digest-match` against the digest the ledger recorded, and the * D03 receipt still has that digest. `state-match`, `absent` and `unknown` * never resolve, and nothing is ever dispatched or replayed. * * Effect identity: kind `decision.receipt`, target * `decision:job//`, context the job scope plus `attemptId`, * subsystem `job`. The ledger's tenant and project are the job's. * * @see docs/decision/async-jobs.md "Resolving execution-unknown" * @see docs/contracts/effect-ledger.v1.md "Composition" */ import { type EffectLedger, type EffectLinks } from '../effects/index.js'; import type { ExecutionUnknownResolver } from './job-runtime.js'; import type { JobScope, JobStore } from './job-store.js'; import type { JobItemEffectRecorder } from './job-worker.js'; import type { DecisionReceiptStore } from './types.js'; export declare const JOB_EFFECT_KIND: "decision.receipt"; /** The ledger identity (kind, target, context) of one job item attempt. */ export declare function jobItemEffectIdentity(scope: JobScope, jobId: string, itemId: string, attemptId: string): { kind: "decision.receipt"; target: string; context: { tenantId: string; projectId: string; workspaceId: string; principalId: string; attemptId: string; }; }; /** The effect ID of one job item attempt in a `job` ledger for the job's tenant and project. */ export declare function jobItemEffectId(scope: JobScope, jobId: string, itemId: string, attemptId: string): string; export interface JobEffectLedgerOptions { /** A ledger with subsystem `job` whose tenant and project are the jobs'. */ ledger: EffectLedger; /** The D03 receipt store the admitted evaluator writes. */ receipts: DecisionReceiptStore; /** The D16 job store. */ jobs: JobStore; timeoutMs?: number; /** Correlation links (for example the #1567 operator decision that authorized the job). */ links?: EffectLinks; } /** Records the D03 receipt of a finished attempt: a signed intent carrying the receipt digest, then a verified `completed`. */ export declare function ledgerJobEffectRecorder(options: JobEffectLedgerOptions): JobItemEffectRecorder; /** The opt-in D16 resolver backed by the effect ledger. Resolves only on `digest-match`. */ export declare function ledgerExecutionUnknownResolver(options: JobEffectLedgerOptions): ExecutionUnknownResolver; //# sourceMappingURL=job-effects.d.ts.map