opensec-pi-subagents 0.20.2 → 0.20.4
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 +105 -0
- package/README.md +9 -2
- package/dist-bun/core.cjs +2471 -942
- package/dist-bun/index.js +3 -3
- package/docs/rpc.md +10 -10
- package/docs/workflows.md +4 -4
- package/examples/agent-tool-description.md +1 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,111 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.20.4] - 2026-10-16
|
|
11
|
+
|
|
12
|
+
The conversation viewer draws a subagent's transcript with Pi's own chat components, so it looks exactly like Pi's
|
|
13
|
+
main session.
|
|
14
|
+
|
|
15
|
+
> **Possibly breaking:** the `viewerMarkdown` setting (`/agents → Settings → Viewer markdown`) and the viewer's `m`
|
|
16
|
+
> key are removed: Pi's components decide how each message renders. A `viewerMarkdown` key left in `subagents.json`
|
|
17
|
+
> is ignored.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **The conversation viewer (regular overlay and fullscreen observer) renders like Pi's main session.** It builds
|
|
22
|
+
`UserMessageComponent`, `AssistantMessageComponent` (thinking and text), `ToolExecutionComponent` (each tool's own
|
|
23
|
+
call and result renderers from the subagent's session: edit diffs, read previews, bash command, output, exit status
|
|
24
|
+
and duration, running/done/error state, arguments), `BashExecutionComponent`, `CompactionSummaryMessageComponent`,
|
|
25
|
+
`BranchSummaryMessageComponent`, `SkillInvocationMessageComponent` and `CustomMessageComponent` from the session's
|
|
26
|
+
messages as Pi's interactive mode does, with the same spacing and collapsed defaults. Streaming messages, tool
|
|
27
|
+
progress and results update live. It replaces the viewer's own `[User]` / `[Assistant]` / `[Tool: name]` /
|
|
28
|
+
`[Result]` rendering and its 16k-character result cap (Pi's renderers truncate collapsed output themselves).
|
|
29
|
+
- **`ctrl+o` expands and collapses tool output in the viewer**, as in Pi; it follows a rebinding of Pi's
|
|
30
|
+
`app.tools.expand`, and the footer shows it when there is room. Pi's `hideThinkingBlock`, `outputPad` and
|
|
31
|
+
`markdown.codeBlockIndent` settings apply.
|
|
32
|
+
- Each component is built once and its rendered lines are cached per width and expand state; a frame re-renders only
|
|
33
|
+
the streamed message and tools that changed, scrolling never re-renders, and only visible rows are assembled.
|
|
34
|
+
Without a JIT (Bun with `BUN_JSC_useJIT=0`, standing in for Pi-Bolt), at 500 messages: a frame 6 µs, a scroll step
|
|
35
|
+
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
|
|
36
|
+
(was 160 ms). A new user message costs 0.27 ms (was 0.17 ms): Pi's user message is Markdown on a background.
|
|
37
|
+
- Where the viewer differs from Pi's main session: images in tool results show as Pi's text placeholder, since an
|
|
38
|
+
inline image cannot be clipped to a scrolled overlay; Mermaid blocks are not drawn as diagrams (Pi's Mermaid
|
|
39
|
+
transformer is not exported); OSC 133 prompt marks are not emitted inside the overlay; clicking a tool or thinking
|
|
40
|
+
block does not toggle it (use `ctrl+o`).
|
|
41
|
+
|
|
42
|
+
### Removed
|
|
43
|
+
|
|
44
|
+
- The `viewerMarkdown` setting and the viewer's `m` key (see above).
|
|
45
|
+
|
|
46
|
+
## [0.20.3] - 2026-10-16
|
|
47
|
+
|
|
48
|
+
Background agents survive a session switch, subagents run on the parent's model by default, and nested and workflow
|
|
49
|
+
agents stay resumable after a restart. Also ports upstream `@tintinweb/pi-subagents` 0.20.0, 0.21.0 and 0.22.0
|
|
50
|
+
(package-shipped agents and MCP for subagents are not ported).
|
|
51
|
+
|
|
52
|
+
> **Possibly breaking:**
|
|
53
|
+
> - **Subagents run on the parent's model and thinking level by default**; the `Agent` and nested tools no longer offer
|
|
54
|
+
> `model`/`thinking` unless `allowModelOverride` is on.
|
|
55
|
+
> - **Background agents keep running across `/new`, `/resume`, `/fork` and `/reload`** when their session is saved.
|
|
56
|
+
> - **Pi 1.1.0 or newer is required** (peer range `>=1.1.0`).
|
|
57
|
+
> - **Background completions are delivered at the parent's next boundary.** `smart`, the default join mode, no longer
|
|
58
|
+
> combines a turn's agents into one notification after waiting for all of them; `group` does that, per parent turn.
|
|
59
|
+
> A completion pending when you press `Esc` now starts a turn once the interrupted turn stops.
|
|
60
|
+
> - **An agent file's `isolated:` and `isolation:` win on every spawn path**, including RPC callers that pass their own
|
|
61
|
+
> value, and an `isolation: worktree` agent fails to start outside a git repository instead of running in place.
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- **Background agents keep running across a session switch.** `/new`, `/resume`, `/fork` and `/reload` no longer stop them when their session is saved: the next session takes over the running agents. An agent belongs to the session that started it: other sessions do not list or address it, and a result that lands while another session is open is written into its own session and delivered as the usual notification when you return there. Quitting still stops every agent and saves worktrees.
|
|
66
|
+
- **`ctrl+b` sends running foreground `Agent` calls to the background**, as in Claude Code; `b` in the conversation
|
|
67
|
+
viewer sends one ([tintinweb/pi-subagents#261](https://github.com/tintinweb/pi-subagents/pull/261)). The run keeps
|
|
68
|
+
going and its result arrives as a background notification. The key is configurable as `backgroundKey` in
|
|
69
|
+
`subagents.json` (`"off"` disables it).
|
|
70
|
+
- **Fullscreen conversation observer** ([tintinweb/pi-subagents#357](https://github.com/tintinweb/pi-subagents/pull/357)):
|
|
71
|
+
in Pi's fullscreen mode an agent opened from FleetView, `/agents` or the workflow inspector fills the terminal, with
|
|
72
|
+
mouse-wheel scrolling, a draggable scrollbar following Pi's `fullscreenScrollbar`, clickable footer controls and a
|
|
73
|
+
`Ctrl+End` jump-to-latest marker that counts new messages. Built on this fork's incremental viewer: without a JIT, a
|
|
74
|
+
frame takes about 20 µs and a scroll step about 50 µs at 500 messages, whatever the transcript's length.
|
|
75
|
+
- **Subagents load Pi's built-in codemode and tool search** (`builtin:codemode`, `builtin:tool-search`) as the main
|
|
76
|
+
session does ([tintinweb/pi-subagents#386](https://github.com/tintinweb/pi-subagents/pull/386)). Pi's built-in MCP
|
|
77
|
+
stays off for subagents, so no child starts its own `mcp.json` servers, unless an agent file names `builtin:mcp` in
|
|
78
|
+
`extensions:`.
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
|
|
82
|
+
- **Subagents run on your model and thinking level.** By default every subagent runs on the parent's current model at the parent's current thinking level, on every spawn path: the `Agent` tool, nested delegation, workflow `agent()`, `@mentions`, scheduled jobs and cross-extension RPC. Per-call choices are ignored, and the `Agent` and nested tools no longer offer `model` or `thinking`, so the main model cannot pick cheaper models or lower effort on its own. An agent file's `model:` or `thinking:` still applies, and a resumed agent keeps what it ran with. The new `allowModelOverride` setting (`subagents.json` or `/agents → Settings → Model override`) restores the per-call overrides and the tool parameters.
|
|
83
|
+
- **Background completions reach a busy parent before its next model call**, after its current tool batch, through
|
|
84
|
+
Pi's steering queue instead of a follow-up held until the parent stopped
|
|
85
|
+
([tintinweb/pi-subagents#387](https://github.com/tintinweb/pi-subagents/pull/387)). Completions that finish together
|
|
86
|
+
arrive as one message and none waits for its siblings (`async` now means `smart`); an idle parent gets a turn about
|
|
87
|
+
200 ms after a completion; `group` batches by parent turn; `get_subagent_result` suppresses a notification any time
|
|
88
|
+
before it is sent ([tintinweb/pi-subagents#388](https://github.com/tintinweb/pi-subagents/pull/388)). Results that
|
|
89
|
+
land while another session is open, or that are still waiting when you switch away, are delivered the same way when
|
|
90
|
+
you return to their session.
|
|
91
|
+
- **An agent file's `isolated:` and `isolation:` hold on every spawn path**: direct and fallback `@handle` mentions,
|
|
92
|
+
cross-extension RPC and registry spawns. A caller's value applies only when the file leaves the field unset; the
|
|
93
|
+
widget's `worktree` tag shows for every worktree agent. Workflow `agent()` calls keep Claude Code's rule (only the
|
|
94
|
+
script's `isolation` decides), and an agent reopened from its session file keeps its placement (upstream 0.21.0).
|
|
95
|
+
- **Subagent tool scoping follows Pi's tool exposure**: only `direct`/`model-only` tools are activated, and
|
|
96
|
+
`defaultActive: false` tools only when named; `codemode`/`deferred` tools stay undeclared until codemode or
|
|
97
|
+
`tool_search` reaches them (upstream 0.21.0).
|
|
98
|
+
- Pi peer floor `>=1.1.0`; `typebox` is a `"*"` peer and `@sinclair/typebox` is no longer declared
|
|
99
|
+
([tintinweb/pi-subagents#384](https://github.com/tintinweb/pi-subagents/pull/384)).
|
|
100
|
+
- The conversation viewer's regular mode reuses cached widths and chrome rows: without a JIT a frame costs about
|
|
101
|
+
20 µs instead of about 2 ms.
|
|
102
|
+
|
|
103
|
+
### Fixed
|
|
104
|
+
|
|
105
|
+
- **Nested agents and workflow children stay resumable after a restart**, `/resume`, `/fork` or `/reload`: their resume state is recorded in the parent session (`subagents:resume` entries), so a nested agent can be resumed by its owner and a workflow child with `agent({ resume })`. `resumeFromRunId` finds a run of the same session after a restart, and a child replayed from the journal can still be continued: the journal records which agent produced each answer.
|
|
106
|
+
- `SubagentWorkflow` honours an agent file's `isolated: true`
|
|
107
|
+
([tintinweb/pi-subagents#339](https://github.com/tintinweb/pi-subagents/pull/339)).
|
|
108
|
+
- FleetView ends with a blank line above Pi's footer
|
|
109
|
+
([tintinweb/pi-subagents#351](https://github.com/tintinweb/pi-subagents/issues/351)), and its arrow keys work under
|
|
110
|
+
any prompt editor that implements `getText`/`setText`
|
|
111
|
+
([tintinweb/pi-subagents#374](https://github.com/tintinweb/pi-subagents/issues/374)).
|
|
112
|
+
- The workflow stand-down recognises a lowercase `workflow` tool
|
|
113
|
+
([tintinweb/pi-subagents#283](https://github.com/tintinweb/pi-subagents/issues/283)).
|
|
114
|
+
|
|
10
115
|
## [0.20.2] - 2026-10-16
|
|
11
116
|
|
|
12
117
|
### Changed
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ pi-bolt install npm:opensec-pi-subagents
|
|
|
30
30
|
|
|
31
31
|
### Requirements
|
|
32
32
|
|
|
33
|
-
- Pi-Bolt 0.
|
|
33
|
+
- Pi-Bolt 0.7.3 or later (Pi 1.1.0), or Pi 1.1.0 or later run by Bun 1.3 or later.
|
|
34
34
|
- This build runs on Bun only. For Pi on Node, use [`@tintinweb/pi-subagents`](https://www.npmjs.com/package/@tintinweb/pi-subagents).
|
|
35
35
|
- Install one subagents extension at a time. This package and `@tintinweb/pi-subagents` register the same tools. If two such extensions are loaded, the one Pi loads first stays active and the other disables itself with a warning.
|
|
36
36
|
|
|
@@ -41,7 +41,9 @@ pi-bolt install npm:opensec-pi-subagents
|
|
|
41
41
|
- Parallel and staged workflows through `SubagentWorkflow` (`agent()`, `parallel()`, `pipeline()`).
|
|
42
42
|
- An `/agents` view for live conversations, settings, workflows and scheduled jobs.
|
|
43
43
|
- Optional nested delegation, persistent memory, skill preloading and Git worktree isolation.
|
|
44
|
-
- Agents
|
|
44
|
+
- Agents run on the parent session's model and thinking level unless their agent file sets `model:` or `thinking:` (per-call choices need `allowModelOverride`).
|
|
45
|
+
- `ctrl+b` sends a running foreground agent to the background; a fullscreen conversation viewer in Pi's fullscreen mode.
|
|
46
|
+
- Pi's built-in codemode and tool search are available to subagents (MCP stays off unless an agent lists `builtin:mcp`).
|
|
45
47
|
|
|
46
48
|
## Usage
|
|
47
49
|
|
|
@@ -115,6 +117,11 @@ locations are those of `@tintinweb/pi-subagents`.
|
|
|
115
117
|
|
|
116
118
|
Based on `@tintinweb/pi-subagents` 0.19:
|
|
117
119
|
|
|
120
|
+
- **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
|
+
- **0.20.3:**
|
|
122
|
+
- 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).
|
|
123
|
+
- 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.
|
|
124
|
+
- Subagents use the parent's model and thinking level by default.
|
|
118
125
|
- **0.20.2:** every project is trusted by default, as before 0.20.1. To have subagents follow Pi's project trust decision, set `"projectTrust": "pi"` in `~/.pi/agent/subagents.json`.
|
|
119
126
|
- **0.20.1:**
|
|
120
127
|
- Resume works for as long as an agent's session file exists, not 10 minutes, and after a restart; worktree agents resume in their worktree; `max_turns` and the tool watchdog apply to resumed runs.
|