/** * Storage contract (all writes are compare-and-swap, false means the comparison lost): * readAttempt(attemptId), readScope(scopeId) -> record|null * readPending(sessionId) -> {version:1,sessionId,sequence,revision,attempts:{[attemptId]:sequence}}|null * claim({attempt,expectedGuard,superseded?,index,expectedIndex}) -> boolean; atomic attempt + guard + session index * complete({attempt,expected,index,expectedIndex}) -> boolean; atomic matching attempt + owned guard + session index * An unresolved claim has no lease expiry. A timeout cannot establish whether an external effect ran. */ export function createActionJournal({ storage, namespace, now }: { storage: any; namespace: any; now?: (() => number) | undefined; }): Readonly<{ claim: (input: any) => Promise<{ status: string; outcome: any; receipt: { key: any; attemptId: any; scopeId: any; signature: any; sequence: any; }; } | { status: string; outcome: { status: string; reason: any; }; receipt: { key: any; attemptId: any; scopeId: any; signature: any; sequence: any; } | null; } | { status: string; receipt: { key: any; attemptId: any; scopeId: any; signature: any; sequence: any; }; }>; complete: (input: any) => Promise<{ status: any; outcome: any; receipt: { key: any; attemptId: any; scopeId: any; signature: any; sequence: any; }; }>; checkpoint: ({ sessionId, keys, receipts }: { sessionId: any; keys?: never[] | undefined; receipts: any; }) => Promise; pending: ({ sessionId }: { sessionId: any; }) => Promise<{ records: any; checkpoint: { key: any; sequence: any; status: any; session: any; } | null; }>; }>; /** Hermetic adapter. Share this object across recreated ports to model process loss; never use it as production persistence. */ export function createMemoryActionStorage(): Readonly<{ readAttempt(id: any): Promise; readScope(id: any): Promise; readPending(id: any): Promise; claim({ attempt, expectedGuard, superseded, index, expectedIndex }: { attempt: any; expectedGuard: any; superseded?: null | undefined; index: any; expectedIndex: any; }): Promise; complete({ attempt, expected, index, expectedIndex }: { attempt: any; expected: any; index: any; expectedIndex: any; }): Promise; }>; export class ActionJournalError extends Error { constructor(code: any); code: any; } //# sourceMappingURL=action-journal.d.ts.map