/** * Durable Mission Graph — integration transactions (2.0.0). * * An integration transaction coordinates cross-objective, cross-repository * confirmation of work. It is fully transactional: * PREPARED → CHECKPOINTED → VALIDATING → CONFIRMED * any stage → ROLLED_BACK * * Checkpoints precede mutation and capture per-objective state. A localized * rollback restores only the checkpoints captured within this transaction; * independent completed work outside the transaction is preserved. */ import type { IntegrationTransactionState, MissionOperationResult, RepositoryLease } from "./types.js"; export type IntegrationStage = IntegrationTransactionState["stage"]; export interface IntegrationInput { transactionId: string; objectiveIds: string[]; repositoryIds: string[]; /** The leases held for the repositories involved. */ leases: RepositoryLease[]; nowMs?: number; } export declare function beginIntegrationTransaction(input: IntegrationInput): MissionOperationResult; /** * Attach a checkpoint that precedes mutation for an objective. A checkpoint * must be present before mutation proceeds within an integration. */ export declare function addIntegrationCheckpoint(tx: IntegrationTransactionState, objectiveId: string, state: Record, nowMs?: number): MissionOperationResult; export declare function markIntegrationValidating(tx: IntegrationTransactionState, nowMs?: number): MissionOperationResult; /** * Confirm the integration. All checkpoints were validated and applied; the * transaction becomes CONFIRMED. Subsequent mutations require a new transaction. */ export declare function confirmIntegrationTransaction(tx: IntegrationTransactionState, nowMs?: number): MissionOperationResult; /** * Localized rollback: restore each objective's last checkpoint. Objectives not * part of this transaction are untouched, so independent completed work is * preserved. The transaction is marked ROLLED_BACK and is non-reusable. */ export declare function rollbackIntegrationTransaction(tx: IntegrationTransactionState): MissionOperationResult<{ transactionId: string; restoredCheckpoints: string[]; preservedIndependentWork: boolean; }>; /** Ordering helper: whether stage `a` may transition to stage `b`. */ export declare function canTransitionIntegration(a: IntegrationStage, b: IntegrationStage): boolean; //# sourceMappingURL=integration.d.ts.map