opensec-pi-subagents 0.20.4 → 0.20.6
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 +80 -0
- package/README.md +2 -0
- package/dist-bun/core.cjs +1082 -528
- package/dist-bun/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,86 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.20.6] - 2026-10-17
|
|
11
|
+
|
|
12
|
+
Restores four fixes the Bun build had in 0.19.5-bun.6 to bun.8 (and 0.19.4-bun.0) that were lost when 0.20.x was
|
|
13
|
+
cut from the Node sources. Both builds have them again.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Codemode scripts get a deadline.** Pi runs a `codemode` script with no time limit unless its first line sets
|
|
18
|
+
`timeout_ms`, so one stuck call held the agent forever. Scripts that set none now get `codemodeTimeoutSeconds`
|
|
19
|
+
(setting; default 1800, 0 = off), in the main session and in subagents; a deadline the script sets is kept.
|
|
20
|
+
- **Codemode audit trail.** Every call a codemode script makes is written to
|
|
21
|
+
`$PI_CODEMODE_AUDIT_DIR/<session>/<call id>.log` (default `<agent dir>/opensec/codemode/`): the structured output
|
|
22
|
+
the script received (bash: up to 1 MiB), the exit code and the full-output path, capped per script by
|
|
23
|
+
`PI_CODEMODE_AUDIT_MAX_BYTES` (default 16 MiB). The script's result names the file and says that its filtered
|
|
24
|
+
output is not proof that something is absent; the script's structured result is kept.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **A subagent's `bash` calls made by another tool are bounded too.** The subagent tool timeout only reached calls
|
|
29
|
+
the model made directly; calls a codemode script, `ctx.executeTool()` or a deferred tool made ran without a limit.
|
|
30
|
+
Since 0.20.3 loads codemode in every subagent, that was most of them. The subagent's tool-scope guard now sets the
|
|
31
|
+
timeout on every call path.
|
|
32
|
+
- **Workflow scripts report the right line numbers on Bun.** Bun ignores a negative `lineOffset`, so every stack
|
|
33
|
+
frame pointed one line below the line the author wrote. The wrapper now needs no offset on either runtime.
|
|
34
|
+
|
|
35
|
+
## [0.20.5] - 2026-10-16
|
|
36
|
+
|
|
37
|
+
Orchestration results the main agent can act on: failed runs are error results with what they produced, unfinished
|
|
38
|
+
agents point at the completion notification instead of inviting polling, and a released agent's result stays readable.
|
|
39
|
+
|
|
40
|
+
> **Possibly breaking:**
|
|
41
|
+
> - **Failed, aborted and stopped runs return `isError: true`**, as do unknown-agent lookups and refused steers or
|
|
42
|
+
> resumes. Pi shows them as tool errors and the main agent reads them as failures.
|
|
43
|
+
> - **A model name whose closest matches span several providers is refused** instead of resolving to one of them,
|
|
44
|
+
> unless the parent's provider is among them. Use the exact `provider/id` to choose another provider.
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **`get_subagent_result` reads a released agent's result from its saved session.** After the 10-minute cleanup it
|
|
49
|
+
used to answer `Agent not found`; it now answers with the status and model from the kept resume state and the final
|
|
50
|
+
result read from the session file, marked as such. Nothing is held in memory longer: the file is read on demand. The
|
|
51
|
+
resume state now records the run's status.
|
|
52
|
+
- **Each run records the model and thinking level it ran with**, a resumed run its own. The foreground result's
|
|
53
|
+
stats, `get_subagent_result` (`Model:`) and the completion notification (`<model>`, `<thinking>`) show them.
|
|
54
|
+
- **Malformed tool arguments from weak models are repaired before validation** (`prepareArguments`) on the top-level
|
|
55
|
+
and nested `Agent`, `get_subagent_result` and `steer_subagent` tools: the arguments object sent as a JSON string or
|
|
56
|
+
stuffed into one string field, arrays where a string is expected, `null` optional fields, booleans and numbers sent
|
|
57
|
+
as strings, and a missing `subagent_type` on the top-level `Agent` tool, which goes to the default type under the
|
|
58
|
+
`fallbackSubagent` policy (`Note: No agent type given — using …`). A missing prompt is never invented.
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- **Failed runs are error results.** The foreground `Agent` result, resumed runs and `get_subagent_result`, top-level
|
|
63
|
+
and nested, set `isError` for `error`, `aborted` and `stopped`. The result renderer keeps the agent's status line for
|
|
64
|
+
these. A stopped run's headline reads `Agent was stopped by the user after …`, an aborted one `Agent was aborted
|
|
65
|
+
after …`, instead of `Agent completed in …`.
|
|
66
|
+
- **Failure results keep the partial output and name the session file.** The run's last assistant text is kept also
|
|
67
|
+
when the run threw or a stopped run was abandoned, bounded to the run's own turns, and the result names the agent's
|
|
68
|
+
saved session file, which holds every turn (`<session-file>` in the notification). No separate files are written.
|
|
69
|
+
- **No more polling prompts.** `get_subagent_result` on a running, queued or still-stopping agent says a completion
|
|
70
|
+
notification arrives on its own, to continue with other work, and not to call it again for that agent until then.
|
|
71
|
+
Its description and the `wait` parameter say the same; `wait` stays `false` by default. Background spawn and resume
|
|
72
|
+
results and the refused resume of a running agent no longer suggest `get_subagent_result` to wait.
|
|
73
|
+
- **Notifications preview the first 10 lines of a result**, still capped at 500 characters (300 per agent in a group)
|
|
74
|
+
so one long line cannot flood the context, and carry the full result's size in `<result_bytes>`. The truncation note
|
|
75
|
+
says how many lines and bytes were left out.
|
|
76
|
+
- **Model names no longer resolve across providers by guessing.** An exact `provider/id` (case-insensitive) resolves
|
|
77
|
+
as before. Among a short name's closest matches (`haiku`, `sonnet`), the parent's provider wins when it serves one;
|
|
78
|
+
matches from a single provider resolve to the tightest, as before (ties by id). Only matches that still span several
|
|
79
|
+
providers are an error naming up to five closest candidates. An exact id two providers serve follows the same rule.
|
|
80
|
+
A per-call model that does not resolve stays a tool error on every path.
|
|
81
|
+
- **An agent file's model that does not resolve is reported.** The run still falls back to the parent's model, but its
|
|
82
|
+
results say which model was asked for, why it was not used and which model ran instead (the `Agent` and nested
|
|
83
|
+
`Agent` results, `get_subagent_result`, `<model-note>` in the notification). Spawns that resolve the agent file's
|
|
84
|
+
model by exact `provider/id` only (`@mentions`, RPC, scheduled jobs) and scheduled jobs whose model no longer
|
|
85
|
+
resolves note it the same way; workflows show it as a warning once per run.
|
|
86
|
+
- **More released agents stay addressable:** 2000 top-level and 4000 nested or workflow entries (was 100 and 200).
|
|
87
|
+
An entry holds ids, paths and settings, about 450 bytes (700 with a worktree), never the conversation. Restoring
|
|
88
|
+
them at session start trims once instead of rescanning per entry.
|
|
89
|
+
|
|
10
90
|
## [0.20.4] - 2026-10-16
|
|
11
91
|
|
|
12
92
|
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,8 @@ locations are those of `@tintinweb/pi-subagents`.
|
|
|
117
117
|
|
|
118
118
|
Based on `@tintinweb/pi-subagents` 0.19:
|
|
119
119
|
|
|
120
|
+
- **0.20.6:** four fixes this build had in 0.19.5-bun.6 to bun.8 are back: a subagent's `bash` calls made by another tool (a codemode script, `ctx.executeTool()`) get the tool timeout; codemode scripts that set no `timeout_ms` get `codemodeTimeoutSeconds` (default 1800 s, 0 = off); every call a codemode script makes is logged raw to `$PI_CODEMODE_AUDIT_DIR/<session>/<call id>.log` (default `<agent dir>/opensec/codemode/`, capped by `PI_CODEMODE_AUDIT_MAX_BYTES`, default 16 MiB) and the script's result names the file; workflow scripts report the right line numbers on Bun again.
|
|
121
|
+
- **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
122
|
- **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
123
|
- **0.20.3:**
|
|
122
124
|
- 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).
|