@lmzhen/dsh-evolution-state-storage 0.3.17 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/types/index.d.ts +8 -0
- package/package.json +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -73,6 +73,14 @@ export interface EvolutionStateStorage {
|
|
|
73
73
|
saveReviewState(sessionId: string, record: ReviewStateRecord): Promise<void>;
|
|
74
74
|
loadCuratorState(): Promise<CuratorStateRecord | null>;
|
|
75
75
|
saveCuratorState(record: CuratorStateRecord): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Atomically read-modify-write the curator-state record (S5.5): `task`
|
|
78
|
+
* receives the current record (or null when none exists) and returns the
|
|
79
|
+
* next record (or null to delete). The whole read → transform → write runs
|
|
80
|
+
* inside one provider transact, so a setPaused racing the run-core
|
|
81
|
+
* bookkeeping write can never interleave a stale load with a newer save.
|
|
82
|
+
*/
|
|
83
|
+
transactCuratorState(task: (current: CuratorStateRecord | null) => CuratorStateRecord | null): Promise<void>;
|
|
76
84
|
listPending(status?: PendingStatus): Promise<PendingRecord[]>;
|
|
77
85
|
savePending(record: PendingRecord): Promise<void>;
|
|
78
86
|
/** Atomically transition a pending record exactly once. */
|