@llblab/pi-state-flow 0.26.4 → 0.26.5
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 +5 -4
- package/dist/package.json +1 -1
- package/docs/compatibility.md +1 -1
- package/docs/usage.md +1 -0
- package/lib/extension.ts +5 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> Each release keeps at most 8 outcome records of at most 512 characters.
|
|
4
4
|
|
|
5
|
+
## 0.26.5: Telegram Mode Receipt Hotfix
|
|
6
|
+
|
|
7
|
+
- `Telegram mode controls`: Passive now refreshes the selected button on the first accepted click after Off, including existing-memory restoration and write-fence recovery during an active run. Accepted controls retain their renewed presentation receipt instead of being mistaken for canceled work; later mode choices, branch changes and shutdown still suppress obsolete updates. Memory storage and mode semantics are unchanged; no migration is required.
|
|
8
|
+
|
|
5
9
|
## 0.26.4: Passive Compaction Continuity
|
|
6
10
|
|
|
7
11
|
- `Passive continuation`: After idle Stop, native compaction can replace the later user anchor with a summary. Passive now retains that summary, the available tool calls/results and later refinements instead of reducing requests to a frozen handoff. Reload/resume preserve the same continuation; discarded raw history is not reconstructed. Native compaction, memory scopes and stored state are unchanged; no migration or configuration change is required.
|
package/dist/lib/extension.js
CHANGED
|
@@ -1214,11 +1214,11 @@ export default function stateFlowExtension(pi, options = {}) {
|
|
|
1214
1214
|
});
|
|
1215
1215
|
if (!modePersistenceError) {
|
|
1216
1216
|
appendCheckpoint();
|
|
1217
|
-
return { ok: true, message: `State Flow ${selectedMode}
|
|
1217
|
+
return { ok: true, message: `State Flow ${selectedMode}`, signal: sharedInspectionLifetime.signal };
|
|
1218
1218
|
}
|
|
1219
1219
|
const message = conciseDiagnostic(`State Flow ${selectedMode}; memory writes paused: ${modePersistenceError}`);
|
|
1220
1220
|
notifyProblem(ctx, message, "warning");
|
|
1221
|
-
return { ok: true, message };
|
|
1221
|
+
return { ok: true, message, signal: sharedInspectionLifetime.signal };
|
|
1222
1222
|
};
|
|
1223
1223
|
let accepted = false;
|
|
1224
1224
|
try {
|
|
@@ -1291,10 +1291,11 @@ export default function stateFlowExtension(pi, options = {}) {
|
|
|
1291
1291
|
const operation = selectMode(activeContext, mode);
|
|
1292
1292
|
if (mode === "active")
|
|
1293
1293
|
return operation;
|
|
1294
|
-
//
|
|
1294
|
+
// Native-only outcomes use the selected lifetime; async acceptance may renew and return its own receipt.
|
|
1295
1295
|
const signal = sharedInspectionLifetime.signal;
|
|
1296
1296
|
try {
|
|
1297
|
-
|
|
1297
|
+
const result = await operation;
|
|
1298
|
+
return { ...result, signal: result.signal ?? signal };
|
|
1298
1299
|
}
|
|
1299
1300
|
catch (error) {
|
|
1300
1301
|
return { ok: false, message: diagnosticText(error), signal };
|
package/dist/package.json
CHANGED
package/docs/compatibility.md
CHANGED
|
@@ -138,7 +138,7 @@ The optional adapter presents one Off | Passive | Active row and uses the same m
|
|
|
138
138
|
- Inspection returns coherent state plus matching revisions, without publication.
|
|
139
139
|
- Controls and inspections acknowledge callbacks before waiting, suppress revoked results and escape late failures in the current menu.
|
|
140
140
|
- Synchronous mode-selection ports are supported.
|
|
141
|
-
-
|
|
141
|
+
- Passive acceptance returns its current presentation receipt after any internal restoration or lifetime renewal, including existing-memory reacquisition after Off and write-fence recovery. The adapter preserves that accepted receipt, so the first click refreshes the button in both busy and idle sessions. Pre-runtime shared-cache loading also retains its receipt. Later controls, branch changes and shutdown still revoke obsolete presentation, including a change away and back to the same mode while callback acknowledgement waits.
|
|
142
142
|
|
|
143
143
|
Adapter tests establish these contracts with isolated transport fixtures; they are not a live Telegram smoke test. Missing or unready transport remains fail-open and cannot change core memory behavior.
|
|
144
144
|
|
package/docs/usage.md
CHANGED
|
@@ -211,6 +211,7 @@ When `pi-telegram` is available, its main-menu section shows `State Flow: active
|
|
|
211
211
|
|
|
212
212
|
- A horizontal radio row presents `Off | Passive | Active`. The selected option uses 🟣, 🟡 or 🟢 respectively; each inactive option uses ⚫️.
|
|
213
213
|
- Telegram Active requested during a run waits for settlement; Passive and Off apply immediately.
|
|
214
|
+
- The first accepted Passive click refreshes the selected button after memory restoration or write-fence recovery, including while the agent is busy. A later mode or branch selection still suppresses an obsolete menu update.
|
|
214
215
|
- Ordinary successful controls add no redundant mode receipt; diagnostic outcomes stay visible.
|
|
215
216
|
- Off exposes neither tool nor State Flow model context.
|
|
216
217
|
|
package/lib/extension.ts
CHANGED
|
@@ -1200,11 +1200,11 @@ export default function stateFlowExtension(pi: ExtensionAPI, options: StateFlowE
|
|
|
1200
1200
|
});
|
|
1201
1201
|
if (!modePersistenceError) {
|
|
1202
1202
|
appendCheckpoint();
|
|
1203
|
-
return { ok: true, message: `State Flow ${selectedMode}
|
|
1203
|
+
return { ok: true, message: `State Flow ${selectedMode}`, signal: sharedInspectionLifetime.signal };
|
|
1204
1204
|
}
|
|
1205
1205
|
const message = conciseDiagnostic(`State Flow ${selectedMode}; memory writes paused: ${modePersistenceError}`);
|
|
1206
1206
|
notifyProblem(ctx, message, "warning");
|
|
1207
|
-
return { ok: true, message };
|
|
1207
|
+
return { ok: true, message, signal: sharedInspectionLifetime.signal };
|
|
1208
1208
|
};
|
|
1209
1209
|
let accepted = false;
|
|
1210
1210
|
try {
|
|
@@ -1272,10 +1272,11 @@ export default function stateFlowExtension(pi: ExtensionAPI, options: StateFlowE
|
|
|
1272
1272
|
if (!activeContext) throw new Error("State Flow is not attached to an active session yet");
|
|
1273
1273
|
const operation = selectMode(activeContext, mode);
|
|
1274
1274
|
if (mode === "active") return operation;
|
|
1275
|
-
//
|
|
1275
|
+
// Native-only outcomes use the selected lifetime; async acceptance may renew and return its own receipt.
|
|
1276
1276
|
const signal = sharedInspectionLifetime.signal;
|
|
1277
1277
|
try {
|
|
1278
|
-
|
|
1278
|
+
const result = await operation;
|
|
1279
|
+
return { ...result, signal: result.signal ?? signal };
|
|
1279
1280
|
} catch (error) {
|
|
1280
1281
|
return { ok: false, message: diagnosticText(error), signal };
|
|
1281
1282
|
}
|