@lmzhen/dsh-evolution-state 0.3.16 → 0.3.18
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/index.js +6 -2
- package/lib/types/index.d.ts +3 -1
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Service } from "@deepseek-ai/cordis";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
|
-
import { EVOLUTION_DOMAIN, curatorStateSchema, pendingSchema, reviewStateSchema } from "@lmzhen/dsh-evolution-state-domain";
|
|
4
3
|
//#region lib/types/index.js
|
|
5
4
|
/**
|
|
6
5
|
* Durable evolution state consumer.
|
|
@@ -33,6 +32,11 @@ var EvolutionState = class extends Service {
|
|
|
33
32
|
saveCuratorState(record) {
|
|
34
33
|
return this.storage().saveCuratorState(record);
|
|
35
34
|
}
|
|
35
|
+
/** Atomic read-modify-write the curator-state record (S5.5). See the
|
|
36
|
+
* storage seam contract for the task / delete semantics. */
|
|
37
|
+
transactCuratorState(task) {
|
|
38
|
+
return this.storage().transactCuratorState(task);
|
|
39
|
+
}
|
|
36
40
|
listPending(status = "pending") {
|
|
37
41
|
return this.storage().listPending(status);
|
|
38
42
|
}
|
|
@@ -50,4 +54,4 @@ var EvolutionState = class extends Service {
|
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
56
|
//#endregion
|
|
53
|
-
export {
|
|
57
|
+
export { EvolutionState, EvolutionState as default };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { Context, Service } from '@deepseek-ai/cordis';
|
|
|
10
10
|
import type Schema from '@deepseek-ai/schemastery';
|
|
11
11
|
import type { CuratorStateRecord, PendingRecord, PendingStatus, ReviewStateRecord } from '@deepseek-ai/dsh-evolution-state-storage';
|
|
12
12
|
export type { CuratorStateRecord, EvolutionStateStorage, PendingRecord, PendingStatus, ReviewStateRecord, } from '@deepseek-ai/dsh-evolution-state-storage';
|
|
13
|
-
export { curatorStateSchema, EVOLUTION_DOMAIN, pendingSchema, reviewStateSchema, } from '@deepseek-ai/dsh-evolution-state-domain';
|
|
14
13
|
declare module '@deepseek-ai/cordis' {
|
|
15
14
|
interface Context {
|
|
16
15
|
evolutionState: EvolutionState;
|
|
@@ -30,6 +29,9 @@ export declare class EvolutionState extends Service {
|
|
|
30
29
|
saveReviewState(sessionId: string, record: ReviewStateRecord): Promise<void>;
|
|
31
30
|
loadCuratorState(): Promise<CuratorStateRecord | null>;
|
|
32
31
|
saveCuratorState(record: CuratorStateRecord): Promise<void>;
|
|
32
|
+
/** Atomic read-modify-write the curator-state record (S5.5). See the
|
|
33
|
+
* storage seam contract for the task / delete semantics. */
|
|
34
|
+
transactCuratorState(task: (current: CuratorStateRecord | null) => CuratorStateRecord | null): Promise<void>;
|
|
33
35
|
listPending(status?: PendingStatus): Promise<PendingRecord[]>;
|
|
34
36
|
savePending(record: PendingRecord): Promise<void>;
|
|
35
37
|
tryResolvePending(id: string, status: 'approved' | 'rejected'): Promise<import("@deepseek-ai/dsh-evolution-state-storage").PendingResolution>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-state",
|
|
3
3
|
"description": "Durable evolution state consumer over pluggable storage providers (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.18",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
40
|
"@deepseek-ai/dsh-storage-domain": "^0.1.1-rc.2",
|
|
41
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.3.
|
|
42
|
-
"@lmzhen/dsh-evolution-state-domain": "^0.3.
|
|
41
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.18",
|
|
42
|
+
"@lmzhen/dsh-evolution-state-domain": "^0.3.18"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
46
46
|
"@deepseek-ai/dsh-storage-domain": "^0.1.1-rc.2",
|
|
47
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.3.
|
|
48
|
-
"@lmzhen/dsh-evolution-state-domain": "^0.3.
|
|
49
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
50
|
-
"@lmzhen/dsh-evolution-io-node": "^0.3.
|
|
51
|
-
"@lmzhen/dsh-evolution-state-json": "^0.3.
|
|
47
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.18",
|
|
48
|
+
"@lmzhen/dsh-evolution-state-domain": "^0.3.18",
|
|
49
|
+
"@lmzhen/dsh-evolution-io": "^0.3.18",
|
|
50
|
+
"@lmzhen/dsh-evolution-io-node": "^0.3.18",
|
|
51
|
+
"@lmzhen/dsh-evolution-state-json": "^0.3.18"
|
|
52
52
|
}
|
|
53
53
|
}
|