@llblab/pi-state-flow 0.16.0 → 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 +8 -0
- package/dist/lib/extension.js +4 -1
- package/dist/lib/runtime.js +4 -3
- package/dist/package.json +1 -1
- package/lib/extension.ts +4 -1
- package/lib/runtime.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
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
|
+
|
|
11
|
+
## 0.16.1: Resumed activation hotfix
|
|
12
|
+
|
|
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.
|
|
14
|
+
|
|
7
15
|
## 0.16.0: Proportional State Flow guidance
|
|
8
16
|
|
|
9
17
|
- `Operational Skill`: Adds the packaged `state-flow-guide` as an on-demand reference for concrete read, patch, inheritance, acquisition, finalization, and recovery problems without triggering memory audits or unsolicited cleanup.
|
package/dist/lib/extension.js
CHANGED
|
@@ -757,8 +757,11 @@ export default function stateFlowExtension(pi, options = {}) {
|
|
|
757
757
|
snapshot.meta.remotePublication = serializeRemotePublicationPolicyDocument(resolveRemotePublicationPolicy(existingBranch ? undefined : config.remotePublication, { legacyRuntime: existingBranch }));
|
|
758
758
|
}
|
|
759
759
|
branchHasSnapshot = true;
|
|
760
|
+
// Activation reasserts the selected session stream as a complete cohort. A resumed
|
|
761
|
+
// branch may have no reusable temporal revision after an extension upgrade; a
|
|
762
|
+
// runtime-only write would then reject its selected session as an omitted change.
|
|
760
763
|
const publication = runtime.view
|
|
761
|
-
? runtime.promote(snapshot) ?? runtime.publish(snapshot)
|
|
764
|
+
? runtime.promote(snapshot) ?? runtime.publish(snapshot, true)
|
|
762
765
|
: runtime.initialize(snapshot, true, undefined, branchStartsWithoutRuntime);
|
|
763
766
|
recordPolicyPublication(publication, ctx);
|
|
764
767
|
installScopeStates();
|
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/extension.ts
CHANGED
|
@@ -782,8 +782,11 @@ export default function stateFlowExtension(pi: ExtensionAPI, options: StateFlowE
|
|
|
782
782
|
);
|
|
783
783
|
}
|
|
784
784
|
branchHasSnapshot = true;
|
|
785
|
+
// Activation reasserts the selected session stream as a complete cohort. A resumed
|
|
786
|
+
// branch may have no reusable temporal revision after an extension upgrade; a
|
|
787
|
+
// runtime-only write would then reject its selected session as an omitted change.
|
|
785
788
|
const publication = runtime.view
|
|
786
|
-
? runtime.promote(snapshot) ?? runtime.publish(snapshot)
|
|
789
|
+
? runtime.promote(snapshot) ?? runtime.publish(snapshot, true)
|
|
787
790
|
: runtime.initialize(snapshot, true, undefined, branchStartsWithoutRuntime);
|
|
788
791
|
recordPolicyPublication(publication, ctx);
|
|
789
792
|
installScopeStates();
|
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 = {
|