@llblab/pi-state-flow 0.16.1 → 0.16.2
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/CHANGELOG.md +4 -0
- package/dist/lib/runtime.js +4 -3
- package/dist/package.json +1 -1
- package/lib/runtime.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.16.2: Passive first-CWD memory hotfix
|
|
8
|
+
|
|
9
|
+
- `Passive first-CWD memory`: Treats global-only storage as a valid passive-memory state before the current CWD has ever materialized, projecting an empty CWD overlay instead of warning that shared storage is incomplete; CWD-without-global storage still fails closed.
|
|
10
|
+
|
|
7
11
|
## 0.16.1: Resumed activation hotfix
|
|
8
12
|
|
|
9
13
|
- `Resumed activation`: Reasserts the selected session stream as a complete semantic cohort when `/state-flow-start` enables a resumed branch, so extension upgrades cannot misclassify retained session state as an omitted write while shared scopes still reconcile against their live owners.
|
package/dist/lib/runtime.js
CHANGED
|
@@ -110,11 +110,12 @@ export class TemporalRuntime {
|
|
|
110
110
|
}));
|
|
111
111
|
if (!shared.global && !shared.cwd)
|
|
112
112
|
return false;
|
|
113
|
-
if (!shared.global
|
|
114
|
-
throw new Error("Incomplete passive State Flow shared storage");
|
|
113
|
+
if (!shared.global)
|
|
114
|
+
throw new Error("Incomplete passive State Flow shared storage: CWD state exists without global state");
|
|
115
115
|
const fresh = createTemporalState({ global: emptyState(), cwd: emptyState(), session: emptyState() }, randomUUID());
|
|
116
116
|
const basis = backend === "git" ? base.head ?? "unborn" : "files";
|
|
117
|
-
|
|
117
|
+
// Global memory is valid before this CWD has ever materialized its own scope.
|
|
118
|
+
this.view = adoptTemporalStreams({ global: shared.global, cwd: shared.cwd ?? fresh.scopes.cwd, session: fresh.scopes.session }, `passive:${basis}:${randomUUID()}`);
|
|
118
119
|
this.base = base;
|
|
119
120
|
this.backend = backend;
|
|
120
121
|
this.provenanceByScope = {
|
package/dist/package.json
CHANGED
package/lib/runtime.ts
CHANGED
|
@@ -128,10 +128,11 @@ export class TemporalRuntime {
|
|
|
128
128
|
scope === "cwd" ? this.cwd : undefined, files.get(paths.meta))];
|
|
129
129
|
})) as Record<(typeof SHARED_SCOPES)[number], ScopeStream | undefined>;
|
|
130
130
|
if (!shared.global && !shared.cwd) return false;
|
|
131
|
-
if (!shared.global
|
|
131
|
+
if (!shared.global) throw new Error("Incomplete passive State Flow shared storage: CWD state exists without global state");
|
|
132
132
|
const fresh = createTemporalState({ global: emptyState(), cwd: emptyState(), session: emptyState() }, randomUUID());
|
|
133
133
|
const basis = backend === "git" ? (base as TemporalGitBase).head ?? "unborn" : "files";
|
|
134
|
-
|
|
134
|
+
// Global memory is valid before this CWD has ever materialized its own scope.
|
|
135
|
+
this.view = adoptTemporalStreams({ global: shared.global, cwd: shared.cwd ?? fresh.scopes.cwd, session: fresh.scopes.session }, `passive:${basis}:${randomUUID()}`);
|
|
135
136
|
this.base = base;
|
|
136
137
|
this.backend = backend;
|
|
137
138
|
this.provenanceByScope = {
|