@lmzhen/dsh-evolution-state-storage 0.3.82 → 0.3.83
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/README.md +3 -3
- package/lib/index.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @lmzhen/dsh-evolution-state-storage
|
|
2
2
|
|
|
3
3
|
Provider registry seam for durable evolution state
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ Provider registry seam for durable evolution state
|
|
|
9
9
|
|
|
10
10
|
#### What the model sees
|
|
11
11
|
|
|
12
|
-
`@
|
|
12
|
+
`@lmzhen/dsh-evolution-state-storage` registers no direct prompt or tool schema itself. Model-visible effects are owned by the packages that consume this service.
|
|
13
13
|
|
|
14
14
|
#### Token effect
|
|
15
15
|
|
|
@@ -24,7 +24,7 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
24
24
|
The package publishes `runStateProviderConsistency(provider, assert)` — the whole seam contract as one call: field-complete pending round-trips, claim/resolve rollback, refusals at the write boundary, clone/alias independence, unknown-field preservation, and the two caps (resolved pending tail, review-state session rows). A third-party provider checks itself by running the suite against its own instance:
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
import { runStateProviderConsistency } from '@
|
|
27
|
+
import { runStateProviderConsistency } from '@lmzhen/dsh-evolution-state-storage'
|
|
28
28
|
import { expect } from 'vitest' // or any runner wrapped into `ConformanceAssert`
|
|
29
29
|
|
|
30
30
|
await runStateProviderConsistency(myProvider, expect)
|
package/lib/index.js
CHANGED
|
@@ -254,6 +254,19 @@ async function runStateProviderConsistency(provider, assert) {
|
|
|
254
254
|
lastSummary: "updated",
|
|
255
255
|
paused: false
|
|
256
256
|
});
|
|
257
|
+
await provider.transactCuratorState((current) => {
|
|
258
|
+
if (current !== null) {
|
|
259
|
+
current.runCount = 999;
|
|
260
|
+
current.paused = true;
|
|
261
|
+
}
|
|
262
|
+
return null;
|
|
263
|
+
});
|
|
264
|
+
assert(await provider.loadCuratorState()).toEqual({
|
|
265
|
+
lastRunAt: 10,
|
|
266
|
+
runCount: 0,
|
|
267
|
+
lastSummary: "updated",
|
|
268
|
+
paused: false
|
|
269
|
+
});
|
|
257
270
|
const live = pendingOf("c-live");
|
|
258
271
|
await provider.savePending(live);
|
|
259
272
|
assert((await provider.listPending("pending")).map((record) => record.id)).toContain("c-live");
|