import type { CreateReviewInput, DecisionReview, ReviewAuthorization, ReviewEffectReceipt, DecisionReviewServiceOptions, ReviewListOptions, ReviewScope, ReviewStore, ReviewSensitiveView, ReviewSensitiveViewRequest, ReviewSensitiveViewSource, ReviewEvaluation } from './types.js'; import { type DecisionLifecycleReference } from '../lifecycle.js'; /** Only an executor that can attest zero external effect may report definitive failure. */ export declare class ReviewDefinitiveExecutionError extends Error { } export declare class DecisionReviewService { private readonly store; private readonly authorization; private readonly now; private readonly resumingLeaseMs; private readonly pollIntervalMs; private readonly telemetry; private readonly operatorAudit; private readonly lifecycleRule; private auditQueue; constructor(store: ReviewStore, authorization: ReviewAuthorization, now?: () => number, options?: DecisionReviewServiceOptions); create(scope: ReviewScope, input: CreateReviewInput): Promise; read(scope: ReviewScope, reviewId: string): Promise; list(scope: ReviewScope, options?: ReviewListOptions): Promise; /** Replay missing operator records after a crash before resuming a continuation. */ syncOperatorAudit(scope: ReviewScope, id: string): Promise; export(scope: ReviewScope, id: string): Promise; /** * Access-audited, retention-bounded view of host-held sensitive material. The * access is appended to the review journal (`sensitive-view-accessed`) before * the host source is read, so an unaudited read cannot happen. The content is * never persisted in the review, its events or telemetry. The granted lifetime * never exceeds the review's retention deadline. Missing, out-of-scope, * tombstoned, expired-retention and unauthorized reviews all fail as * `ReviewAccessError("Review not found")`. */ openSensitiveView(scope: ReviewScope, id: string, request: ReviewSensitiveViewRequest, source: ReviewSensitiveViewSource): Promise; /** Opaque D10 reference for a review; the host keeps the reverse index, never model-visible state. */ lifecycleReference(review: Pick): DecisionLifecycleReference; /** D10 `links` support: references for the reviews created from one source receipt that the caller may delete. */ lifecycleReferences(scope: ReviewScope, sourceReceiptId: string): Promise; /** * D10 `erase` support for `eraseDecisionSubject`. Appends a tombstone under * delete authority (refused under legal hold) and, when the D10 review rule * says `erase`, physically purges the revisions. Erasure never converts an * unavailable review into approval: a tombstoned or purged review cannot resume. */ eraseLifecycleReference(scope: ReviewScope, reference: DecisionLifecycleReference): Promise; setLegalHold(scope: ReviewScope, id: string, legalHold: boolean, rationale: string): Promise; delete(scope: ReviewScope, id: string, rationale: string): Promise; tombstone(scope: ReviewScope, id: string, rationale: string): Promise; /** Cryptographic audit marker remains, but every historical plaintext revision is removed. */ purge(scope: ReviewScope, id: string): Promise; private applyTombstone; claim(scope: ReviewScope, id: string, rationale: string): Promise; decide(scope: ReviewScope, id: string, decision: 'approve' | 'reject', rationale: string, evaluation?: ReviewEvaluation): Promise; edit(scope: ReviewScope, id: string, action: unknown, rationale: string, newResumeToken: string): Promise; escalate(scope: ReviewScope, id: string, rationale: string): Promise; cancel(scope: ReviewScope, id: string, rationale: string): Promise; expireDue(scope: ReviewScope, id: string): Promise; resume(scope: ReviewScope, id: string, token: string, execute: (effectId: string, action: unknown) => Promise, reconcile?: (effectId: string) => Promise): Promise; private executeAndFinish; private finish; private mutate; private requireReview; /** Missing, out-of-scope and unauthorized reviews share one error so callers cannot probe existence. */ private requireAuthorizedReview; private unavailable; private requireLifecycle; /** Effective deadline: the review's pin, capped by the D10 review rule when bound. */ private retentionDeadline; private pastRetention; private allowed; private requireActive; private requireStatus; private append; private auditReview; /** * The #1567 record and the review span must share one trace identity. When the * host supplies a telemetry parent and no explicit trace ID, bind the audit * correlation to that W3C trace instead of keeping a parallel identifier. */ private auditCorrelation; private emitTelemetry; } //# sourceMappingURL=service.d.ts.map