/** Versioned offline contract. Provider dispatch is not enabled by the job layer. */ export declare const ITEM_STATES: readonly ["queued", "running", "succeeded", "abstained", "review", "unsupported", "retryable-failed", "permanent-failed", "canceled", "expired", "execution-unknown"]; export type ItemState = typeof ITEM_STATES[number]; export type JobState = 'validating' | 'queued' | 'running' | 'partially-completed' | 'completed' | 'cancel-requested' | 'canceled' | 'expired' | 'failed'; /** * D16 resolution of an `execution-unknown` attempt (#2722): a verified effect * whose D03 receipt digest matched the ledger's recorded digest. Only * `digest-match` is accepted; the receipt digest must equal the attempt's. */ export interface DecisionJobAttemptResolution { method: 'effect-ledger'; effectId: string; reason: 'digest-match'; receiptDigest: `sha256:${string}`; } export interface DecisionJobItem { id: string; fingerprint: `sha256:${string}`; subjectDigest: `sha256:${string}`; definitionDigest: `sha256:${string}`; bindingDigest: `sha256:${string}`; rulesetDigest?: `sha256:${string}`; state: ItemState; attempts: Array<{ id: string; requestDigest: `sha256:${string}`; receiptDigest?: `sha256:${string}`; reservedTokens?: number; reservedCostMicros?: number; outcome: 'dispatched' | 'succeeded' | 'failed' | 'execution-unknown'; resolution?: DecisionJobAttemptResolution; }>; resultDigest?: `sha256:${string}`; errorCode?: string; } export interface DecisionJob { schemaVersion: 'decision-job/v1'; id: string; scope: { tenantId: string; projectId: string; workspaceId: string; principalId: string; }; fingerprint: `sha256:${string}`; state: JobState; items: DecisionJobItem[]; summary: Record; createdAtEpochMs: number; expiresAtEpochMs: number; budget: { maxAttempts: number; maxTokens: number; maxCostMicros: number; maxConcurrency: number; }; } export declare class DecisionJobContractError extends Error { constructor(message: string); } /** * The one gated transition out of `execution-unknown` (D16 opt-in resolver, * #2722): the latest attempt moves from `execution-unknown` to `succeeded` * with a receipt digest bound by a `digest-match` resolution, the item gains * its result digest, and nothing else changes. */ export declare function isExecutionUnknownResolution(previous: DecisionJobItem, item: DecisionJobItem): boolean; export declare function validateDecisionJob(value: unknown): asserts value is DecisionJob; export declare function assertJobTransition(before: DecisionJob, after: DecisionJob): void; //# sourceMappingURL=job-contract.d.ts.map