opensec-pi-subagents 0.20.3 → 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 +91 -0
- package/README.md +2 -0
- package/dist-bun/core.cjs +1441 -652
- package/dist-bun/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,97 @@ 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
|
+
|
|
65
|
+
## [0.20.4] - 2026-10-16
|
|
66
|
+
|
|
67
|
+
The conversation viewer draws a subagent's transcript with Pi's own chat components, so it looks exactly like Pi's
|
|
68
|
+
main session.
|
|
69
|
+
|
|
70
|
+
> **Possibly breaking:** the `viewerMarkdown` setting (`/agents → Settings → Viewer markdown`) and the viewer's `m`
|
|
71
|
+
> key are removed: Pi's components decide how each message renders. A `viewerMarkdown` key left in `subagents.json`
|
|
72
|
+
> is ignored.
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
|
|
76
|
+
- **The conversation viewer (regular overlay and fullscreen observer) renders like Pi's main session.** It builds
|
|
77
|
+
`UserMessageComponent`, `AssistantMessageComponent` (thinking and text), `ToolExecutionComponent` (each tool's own
|
|
78
|
+
call and result renderers from the subagent's session: edit diffs, read previews, bash command, output, exit status
|
|
79
|
+
and duration, running/done/error state, arguments), `BashExecutionComponent`, `CompactionSummaryMessageComponent`,
|
|
80
|
+
`BranchSummaryMessageComponent`, `SkillInvocationMessageComponent` and `CustomMessageComponent` from the session's
|
|
81
|
+
messages as Pi's interactive mode does, with the same spacing and collapsed defaults. Streaming messages, tool
|
|
82
|
+
progress and results update live. It replaces the viewer's own `[User]` / `[Assistant]` / `[Tool: name]` /
|
|
83
|
+
`[Result]` rendering and its 16k-character result cap (Pi's renderers truncate collapsed output themselves).
|
|
84
|
+
- **`ctrl+o` expands and collapses tool output in the viewer**, as in Pi; it follows a rebinding of Pi's
|
|
85
|
+
`app.tools.expand`, and the footer shows it when there is room. Pi's `hideThinkingBlock`, `outputPad` and
|
|
86
|
+
`markdown.codeBlockIndent` settings apply.
|
|
87
|
+
- Each component is built once and its rendered lines are cached per width and expand state; a frame re-renders only
|
|
88
|
+
the streamed message and tools that changed, scrolling never re-renders, and only visible rows are assembled.
|
|
89
|
+
Without a JIT (Bun with `BUN_JSC_useJIT=0`, standing in for Pi-Bolt), at 500 messages: a frame 6 µs, a scroll step
|
|
90
|
+
15 µs, a streaming delta 0.70 ms (was 0.92 ms), a tool call finishing 0.26 ms (was 0.31 ms), the first frame 121 ms
|
|
91
|
+
(was 160 ms). A new user message costs 0.27 ms (was 0.17 ms): Pi's user message is Markdown on a background.
|
|
92
|
+
- Where the viewer differs from Pi's main session: images in tool results show as Pi's text placeholder, since an
|
|
93
|
+
inline image cannot be clipped to a scrolled overlay; Mermaid blocks are not drawn as diagrams (Pi's Mermaid
|
|
94
|
+
transformer is not exported); OSC 133 prompt marks are not emitted inside the overlay; clicking a tool or thinking
|
|
95
|
+
block does not toggle it (use `ctrl+o`).
|
|
96
|
+
|
|
97
|
+
### Removed
|
|
98
|
+
|
|
99
|
+
- The `viewerMarkdown` setting and the viewer's `m` key (see above).
|
|
100
|
+
|
|
10
101
|
## [0.20.3] - 2026-10-16
|
|
11
102
|
|
|
12
103
|
Background agents survive a session switch, subagents run on the parent's model by default, and nested and workflow
|
package/README.md
CHANGED
|
@@ -117,6 +117,8 @@ 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.
|
|
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.
|
|
120
122
|
- **0.20.3:**
|
|
121
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).
|
|
122
124
|
- Nested and workflow agents are resumable after a restart; background agents keep running across `/new`, `/resume`, `/fork` and `/reload`, and their results reach the session that started them.
|