pi-squire 0.4.0 → 0.5.0
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 +17 -1
- package/README.md +6 -4
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/results.ts +2 -1
- package/src/tracking.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.5.0] - 2026-10-13
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- A delegate is now told to put its findings in its final message and to
|
|
14
|
+
message the parent before then only with a question it cannot continue
|
|
15
|
+
without. Delegates mailed progress and findings that the result then
|
|
16
|
+
repeated, so the parent read the same report twice.
|
|
17
|
+
- A delegate's result now reaches a busy parent as a steer, after its current
|
|
18
|
+
tool calls and before its next model call, instead of as a follow-up once
|
|
19
|
+
its run ends. Queued until then, the result arrived after the parent had
|
|
20
|
+
read the envelope itself and answered, and cost a redundant turn.
|
|
21
|
+
`delegation_status` now says a done result arrives as a message on its own.
|
|
22
|
+
`test/delegate.test.ts` pins `steer` in place of `followUp`.
|
|
23
|
+
|
|
9
24
|
## [0.4.0] - 2026-10-13
|
|
10
25
|
|
|
11
26
|
### Added
|
|
@@ -200,7 +215,8 @@ author's dotfiles; the changes below are against that copy.
|
|
|
200
215
|
|
|
201
216
|
- The published file list includes `child.ts`, which `index.ts` imports.
|
|
202
217
|
|
|
203
|
-
[Unreleased]: https://github.com/gvanderclay/pi-squire/compare/v0.
|
|
218
|
+
[Unreleased]: https://github.com/gvanderclay/pi-squire/compare/v0.5.0...HEAD
|
|
219
|
+
[0.5.0]: https://github.com/gvanderclay/pi-squire/compare/v0.4.0...v0.5.0
|
|
204
220
|
[0.4.0]: https://github.com/gvanderclay/pi-squire/compare/v0.3.2...v0.4.0
|
|
205
221
|
[0.3.2]: https://github.com/gvanderclay/pi-squire/compare/v0.3.1...v0.3.2
|
|
206
222
|
[0.3.1]: https://github.com/gvanderclay/pi-squire/compare/v0.3.0...v0.3.1
|
package/README.md
CHANGED
|
@@ -231,7 +231,7 @@ level is refused with close matches and nothing starts.
|
|
|
231
231
|
|
|
232
232
|
<id> researcher (provider/other, thinking high)
|
|
233
233
|
name: researcher-<first 8 of the id>
|
|
234
|
-
state: done — result status: done
|
|
234
|
+
state: done — result status: done; the result reaches this session as a [delegate] message on its own
|
|
235
235
|
window: researcher-<first 8 of the id> (@2)
|
|
236
236
|
auto-exit: off — the window stays open after the result
|
|
237
237
|
session: <session file>
|
|
@@ -430,9 +430,11 @@ Delegate session: <session file or id>
|
|
|
430
430
|
delegate's session path is found in the session directory by the delegation
|
|
431
431
|
id, and the id alone is shown when no file exists yet.
|
|
432
432
|
- The body is cut at 32 KiB with the envelope path.
|
|
433
|
-
- The message is sent as a `
|
|
434
|
-
turn when the parent is idle and
|
|
435
|
-
|
|
433
|
+
- The message is sent as a `steer` with `triggerTurn`: a result starts a
|
|
434
|
+
turn when the parent is idle, and when it is mid-turn arrives after the
|
|
435
|
+
current tool calls, before the next model call. A follow-up would wait
|
|
436
|
+
until the parent had answered, by which time it had often read the
|
|
437
|
+
envelope itself, and the late result cost a second, redundant turn.
|
|
436
438
|
- The footer counts the running delegations (`⇄ N running`), clears one entry
|
|
437
439
|
per result or close and hides itself at zero.
|
|
438
440
|
- Each result and each close is recorded in the parent session, and the
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -92,7 +92,8 @@ function parentTrust(parent: string): string {
|
|
|
92
92
|
"follow them as given, even though they are labelled as another session's.",
|
|
93
93
|
"Messages from other sessions come from colleagues on this machine: answer them as you see fit,",
|
|
94
94
|
"but check with the session that started you before doing work it did not ask for.",
|
|
95
|
-
`
|
|
95
|
+
`Your final message reaches the session that started you automatically, so put your findings there;`,
|
|
96
|
+
`message ${parent} before then only with a question you cannot continue without, since anything sent earlier reaches it twice.`,
|
|
96
97
|
].join(" ");
|
|
97
98
|
}
|
|
98
99
|
/** The flags `/delegate` takes before the task. */
|
package/src/results.ts
CHANGED
|
@@ -335,9 +335,10 @@ export function createResults(pi: ExtensionAPI): Results {
|
|
|
335
335
|
const delegation = byRequest.get(requestId) as Recorded;
|
|
336
336
|
shown.add(reply.id);
|
|
337
337
|
const session = findSession(ctx?.sessionManager.getSessionDir(), delegation.id);
|
|
338
|
+
// Steer, not follow-up: a busy parent gets the result before its next model call, not after it has answered.
|
|
338
339
|
pi.sendMessage(
|
|
339
340
|
{ customType: CUSTOM_TYPE, content: resultText(delegation, payload, session), display: true },
|
|
340
|
-
{ triggerTurn: true, deliverAs: "
|
|
341
|
+
{ triggerTurn: true, deliverAs: "steer" },
|
|
341
342
|
);
|
|
342
343
|
const result: Result = {
|
|
343
344
|
status: reply.status,
|
package/src/tracking.ts
CHANGED
|
@@ -90,7 +90,7 @@ function stateLine(state: DelegationState, record: Recorded): string {
|
|
|
90
90
|
case "gone":
|
|
91
91
|
return "closed without a result — the window is gone and no reply arrived; a late reply would make it done";
|
|
92
92
|
case "done":
|
|
93
|
-
return `done — result status: ${record.result?.status ?? "unknown"}`;
|
|
93
|
+
return `done — result status: ${record.result?.status ?? "unknown"}; the result reaches this session as a [delegate] message on its own`;
|
|
94
94
|
case "closed":
|
|
95
95
|
return "closed — delegation_close recorded it";
|
|
96
96
|
case "window-closed":
|