@llblab/pi-state-flow 0.27.0 → 0.27.1
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/extension.js +6 -0
- package/dist/package.json +1 -1
- package/docs/usage.md +2 -0
- package/lib/extension.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.27.1: Selected Scope Read Diagnostics
|
|
8
|
+
|
|
9
|
+
- `Read availability`: Explicit reads now distinguish a selected owner with no available read view from an excluded owner. In pre-runtime Passive sessions, an unacquired Session no longer incorrectly reports itself excluded. Reads still do not create private memory, widen the selection or return partial multi-path results; normal accepted writes retain their acquisition rules.
|
|
10
|
+
|
|
7
11
|
## 0.27.0: Semantic Memory and Scope Selection
|
|
8
12
|
|
|
9
13
|
- `Semantic API (breaking)`: `strategy`/`tactics` replace `contract`/`working` in runtime fields, public types, schemas, queries, receipts and Skills. Strategy retains binding requirements, accepted approaches and rejection reasons; tactics holds operational evidence. Proposals are not commitments. New-format retired-root writes reject; ordinary nested keys remain legal.
|
package/dist/lib/extension.js
CHANGED
|
@@ -1001,6 +1001,12 @@ export default function stateFlowExtension(pi, options = {}) {
|
|
|
1001
1001
|
const paths = requestedPaths.map(path => normalizeModelReadPath(path, wanted, config.historyLimit));
|
|
1002
1002
|
check();
|
|
1003
1003
|
const view = readableView(selected);
|
|
1004
|
+
// Wanted policy was checked by normalization; an observational subset is not an exclusion.
|
|
1005
|
+
for (const path of paths) {
|
|
1006
|
+
const owner = /^(global|cwd|session)(?=\.|\[|$)/.exec(path)?.[1];
|
|
1007
|
+
if (owner && !view?.selection.includes(owner))
|
|
1008
|
+
throw new Error(`State Flow ${owner}: selected, unavailable`);
|
|
1009
|
+
}
|
|
1004
1010
|
if (!view)
|
|
1005
1011
|
throw new Error("State Flow temporal runtime is unavailable");
|
|
1006
1012
|
check();
|
package/dist/package.json
CHANGED
package/docs/usage.md
CHANGED
|
@@ -51,6 +51,8 @@ Active, Passive and Off select the session's workflow and model-facing access, n
|
|
|
51
51
|
|
|
52
52
|
All three mode commands accept optional exact owner tokens, in any order: `/state-flow-active session`, `/state-flow-passive cwd global`, `/state-flow-off cwd session`. Any nonempty unique subset of `global cwd session` is valid; autocomplete offers only unused matching tokens and replaces the full argument prefix. Blank/whitespace-only arguments preserve the captured choice. Unknown/duplicate names, flags and comma-separated forms fail before policy or mode changes. Commands never edit global defaults. Off scope changes record native policy only, without reading or initializing canonical memory. Active explicitly owns acquisition where independently permitted; Passive observation alone cannot acquire missing Session or borrow pending fork permission.
|
|
53
53
|
|
|
54
|
+
Selection is not materialization: all three scopes are selected by default, but a pre-runtime Passive session can have no private Session cohort yet. Read-only observation exposes existing shared owners without inventing empty Session state. An explicit read of a selected owner missing from that read view reports `selected, unavailable`, not `excluded`; an actually excluded owner is rejected by the selection guard. A legitimate first Session patch on an eligible non-fork branch can acquire private memory through normal atomic acceptance. Do not send an empty patch just to initialize it or bypass pending-fork authority.
|
|
55
|
+
|
|
54
56
|
How each lifecycle event behaves:
|
|
55
57
|
|
|
56
58
|
- **New session:** Adopts the global `mode`, defaulting to Off.
|
package/lib/extension.ts
CHANGED
|
@@ -988,6 +988,11 @@ export default function stateFlowExtension(pi: ExtensionAPI, options: StateFlowE
|
|
|
988
988
|
const paths = requestedPaths.map(path => normalizeModelReadPath(path, wanted, config.historyLimit));
|
|
989
989
|
check();
|
|
990
990
|
const view = readableView(selected);
|
|
991
|
+
// Wanted policy was checked by normalization; an observational subset is not an exclusion.
|
|
992
|
+
for (const path of paths) {
|
|
993
|
+
const owner = /^(global|cwd|session)(?=\.|\[|$)/.exec(path)?.[1] as StateScope | undefined;
|
|
994
|
+
if (owner && !view?.selection.includes(owner)) throw new Error(`State Flow ${owner}: selected, unavailable`);
|
|
995
|
+
}
|
|
991
996
|
if (!view) throw new Error("State Flow temporal runtime is unavailable");
|
|
992
997
|
check();
|
|
993
998
|
if (paths.some((path) => /^session(?:\.|\[|$)/.test(path))) assertSelectedBranchAvailable();
|