opensec-pi-subagents 0.20.4 → 0.20.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 CHANGED
@@ -7,6 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.20.5] - 2026-10-16
11
+
12
+ Orchestration results the main agent can act on: failed runs are error results with what they produced, unfinished
13
+ agents point at the completion notification instead of inviting polling, and a released agent's result stays readable.
14
+
15
+ > **Possibly breaking:**
16
+ > - **Failed, aborted and stopped runs return `isError: true`**, as do unknown-agent lookups and refused steers or
17
+ > resumes. Pi shows them as tool errors and the main agent reads them as failures.
18
+ > - **A model name whose closest matches span several providers is refused** instead of resolving to one of them,
19
+ > unless the parent's provider is among them. Use the exact `provider/id` to choose another provider.
20
+
21
+ ### Added
22
+
23
+ - **`get_subagent_result` reads a released agent's result from its saved session.** After the 10-minute cleanup it
24
+ used to answer `Agent not found`; it now answers with the status and model from the kept resume state and the final
25
+ result read from the session file, marked as such. Nothing is held in memory longer: the file is read on demand. The
26
+ resume state now records the run's status.
27
+ - **Each run records the model and thinking level it ran with**, a resumed run its own. The foreground result's
28
+ stats, `get_subagent_result` (`Model:`) and the completion notification (`<model>`, `<thinking>`) show them.
29
+ - **Malformed tool arguments from weak models are repaired before validation** (`prepareArguments`) on the top-level
30
+ and nested `Agent`, `get_subagent_result` and `steer_subagent` tools: the arguments object sent as a JSON string or
31
+ stuffed into one string field, arrays where a string is expected, `null` optional fields, booleans and numbers sent
32
+ as strings, and a missing `subagent_type` on the top-level `Agent` tool, which goes to the default type under the
33
+ `fallbackSubagent` policy (`Note: No agent type given — using …`). A missing prompt is never invented.
34
+
35
+ ### Changed
36
+
37
+ - **Failed runs are error results.** The foreground `Agent` result, resumed runs and `get_subagent_result`, top-level
38
+ and nested, set `isError` for `error`, `aborted` and `stopped`. The result renderer keeps the agent's status line for
39
+ these. A stopped run's headline reads `Agent was stopped by the user after …`, an aborted one `Agent was aborted
40
+ after …`, instead of `Agent completed in …`.
41
+ - **Failure results keep the partial output and name the session file.** The run's last assistant text is kept also
42
+ when the run threw or a stopped run was abandoned, bounded to the run's own turns, and the result names the agent's
43
+ saved session file, which holds every turn (`<session-file>` in the notification). No separate files are written.
44
+ - **No more polling prompts.** `get_subagent_result` on a running, queued or still-stopping agent says a completion
45
+ notification arrives on its own, to continue with other work, and not to call it again for that agent until then.
46
+ Its description and the `wait` parameter say the same; `wait` stays `false` by default. Background spawn and resume
47
+ results and the refused resume of a running agent no longer suggest `get_subagent_result` to wait.
48
+ - **Notifications preview the first 10 lines of a result**, still capped at 500 characters (300 per agent in a group)
49
+ so one long line cannot flood the context, and carry the full result's size in `<result_bytes>`. The truncation note
50
+ says how many lines and bytes were left out.
51
+ - **Model names no longer resolve across providers by guessing.** An exact `provider/id` (case-insensitive) resolves
52
+ as before. Among a short name's closest matches (`haiku`, `sonnet`), the parent's provider wins when it serves one;
53
+ matches from a single provider resolve to the tightest, as before (ties by id). Only matches that still span several
54
+ providers are an error naming up to five closest candidates. An exact id two providers serve follows the same rule.
55
+ A per-call model that does not resolve stays a tool error on every path.
56
+ - **An agent file's model that does not resolve is reported.** The run still falls back to the parent's model, but its
57
+ results say which model was asked for, why it was not used and which model ran instead (the `Agent` and nested
58
+ `Agent` results, `get_subagent_result`, `<model-note>` in the notification). Spawns that resolve the agent file's
59
+ model by exact `provider/id` only (`@mentions`, RPC, scheduled jobs) and scheduled jobs whose model no longer
60
+ resolves note it the same way; workflows show it as a warning once per run.
61
+ - **More released agents stay addressable:** 2000 top-level and 4000 nested or workflow entries (was 100 and 200).
62
+ An entry holds ids, paths and settings, about 450 bytes (700 with a worktree), never the conversation. Restoring
63
+ them at session start trims once instead of rescanning per entry.
64
+
10
65
  ## [0.20.4] - 2026-10-16
11
66
 
12
67
  The conversation viewer draws a subagent's transcript with Pi's own chat components, so it looks exactly like Pi's
package/README.md CHANGED
@@ -117,6 +117,7 @@ locations are those of `@tintinweb/pi-subagents`.
117
117
 
118
118
  Based on `@tintinweb/pi-subagents` 0.19:
119
119
 
120
+ - **0.20.5:** failed, aborted and stopped agents come back as error results with their last output and session file; weak models' malformed tool arguments are repaired; a running agent's reply asks the model to wait for its notification instead of polling; notifications preview 10 lines and give the result's size; each run's model is recorded and shown; an ambiguous model name is no longer settled by a guess across providers.
120
121
  - **0.20.4:** the conversation viewer draws a subagent's transcript with Pi's own chat components, as Pi's main session does; `ctrl+o` expands and collapses tool output. The `viewerMarkdown` setting and the `m` key are gone.
121
122
  - **0.20.3:**
122
123
  - From upstream 0.20–0.22: completions reach a busy parent before its next model call; an agent file's `isolated:`/`isolation:` hold on every spawn path; tool scoping covers tools called from other tools; `ctrl+b`; the fullscreen viewer, built on the incremental viewer (a frame in about 10 µs at 500 messages without a JIT).