opensec-pi-subagents 0.20.1 → 0.20.3
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 +75 -0
- package/README.md +10 -3
- package/dist-bun/core.cjs +1947 -819
- package/dist-bun/index.js +3 -3
- package/docs/rpc.md +10 -10
- package/docs/workflows.md +6 -6
- package/examples/agent-tool-description.md +1 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,81 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.20.3] - 2026-10-16
|
|
11
|
+
|
|
12
|
+
Background agents survive a session switch, subagents run on the parent's model by default, and nested and workflow
|
|
13
|
+
agents stay resumable after a restart. Also ports upstream `@tintinweb/pi-subagents` 0.20.0, 0.21.0 and 0.22.0
|
|
14
|
+
(package-shipped agents and MCP for subagents are not ported).
|
|
15
|
+
|
|
16
|
+
> **Possibly breaking:**
|
|
17
|
+
> - **Subagents run on the parent's model and thinking level by default**; the `Agent` and nested tools no longer offer
|
|
18
|
+
> `model`/`thinking` unless `allowModelOverride` is on.
|
|
19
|
+
> - **Background agents keep running across `/new`, `/resume`, `/fork` and `/reload`** when their session is saved.
|
|
20
|
+
> - **Pi 1.1.0 or newer is required** (peer range `>=1.1.0`).
|
|
21
|
+
> - **Background completions are delivered at the parent's next boundary.** `smart`, the default join mode, no longer
|
|
22
|
+
> combines a turn's agents into one notification after waiting for all of them; `group` does that, per parent turn.
|
|
23
|
+
> A completion pending when you press `Esc` now starts a turn once the interrupted turn stops.
|
|
24
|
+
> - **An agent file's `isolated:` and `isolation:` win on every spawn path**, including RPC callers that pass their own
|
|
25
|
+
> value, and an `isolation: worktree` agent fails to start outside a git repository instead of running in place.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **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.
|
|
30
|
+
- **`ctrl+b` sends running foreground `Agent` calls to the background**, as in Claude Code; `b` in the conversation
|
|
31
|
+
viewer sends one ([tintinweb/pi-subagents#261](https://github.com/tintinweb/pi-subagents/pull/261)). The run keeps
|
|
32
|
+
going and its result arrives as a background notification. The key is configurable as `backgroundKey` in
|
|
33
|
+
`subagents.json` (`"off"` disables it).
|
|
34
|
+
- **Fullscreen conversation observer** ([tintinweb/pi-subagents#357](https://github.com/tintinweb/pi-subagents/pull/357)):
|
|
35
|
+
in Pi's fullscreen mode an agent opened from FleetView, `/agents` or the workflow inspector fills the terminal, with
|
|
36
|
+
mouse-wheel scrolling, a draggable scrollbar following Pi's `fullscreenScrollbar`, clickable footer controls and a
|
|
37
|
+
`Ctrl+End` jump-to-latest marker that counts new messages. Built on this fork's incremental viewer: without a JIT, a
|
|
38
|
+
frame takes about 20 µs and a scroll step about 50 µs at 500 messages, whatever the transcript's length.
|
|
39
|
+
- **Subagents load Pi's built-in codemode and tool search** (`builtin:codemode`, `builtin:tool-search`) as the main
|
|
40
|
+
session does ([tintinweb/pi-subagents#386](https://github.com/tintinweb/pi-subagents/pull/386)). Pi's built-in MCP
|
|
41
|
+
stays off for subagents, so no child starts its own `mcp.json` servers, unless an agent file names `builtin:mcp` in
|
|
42
|
+
`extensions:`.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- **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.
|
|
47
|
+
- **Background completions reach a busy parent before its next model call**, after its current tool batch, through
|
|
48
|
+
Pi's steering queue instead of a follow-up held until the parent stopped
|
|
49
|
+
([tintinweb/pi-subagents#387](https://github.com/tintinweb/pi-subagents/pull/387)). Completions that finish together
|
|
50
|
+
arrive as one message and none waits for its siblings (`async` now means `smart`); an idle parent gets a turn about
|
|
51
|
+
200 ms after a completion; `group` batches by parent turn; `get_subagent_result` suppresses a notification any time
|
|
52
|
+
before it is sent ([tintinweb/pi-subagents#388](https://github.com/tintinweb/pi-subagents/pull/388)). Results that
|
|
53
|
+
land while another session is open, or that are still waiting when you switch away, are delivered the same way when
|
|
54
|
+
you return to their session.
|
|
55
|
+
- **An agent file's `isolated:` and `isolation:` hold on every spawn path**: direct and fallback `@handle` mentions,
|
|
56
|
+
cross-extension RPC and registry spawns. A caller's value applies only when the file leaves the field unset; the
|
|
57
|
+
widget's `worktree` tag shows for every worktree agent. Workflow `agent()` calls keep Claude Code's rule (only the
|
|
58
|
+
script's `isolation` decides), and an agent reopened from its session file keeps its placement (upstream 0.21.0).
|
|
59
|
+
- **Subagent tool scoping follows Pi's tool exposure**: only `direct`/`model-only` tools are activated, and
|
|
60
|
+
`defaultActive: false` tools only when named; `codemode`/`deferred` tools stay undeclared until codemode or
|
|
61
|
+
`tool_search` reaches them (upstream 0.21.0).
|
|
62
|
+
- Pi peer floor `>=1.1.0`; `typebox` is a `"*"` peer and `@sinclair/typebox` is no longer declared
|
|
63
|
+
([tintinweb/pi-subagents#384](https://github.com/tintinweb/pi-subagents/pull/384)).
|
|
64
|
+
- The conversation viewer's regular mode reuses cached widths and chrome rows: without a JIT a frame costs about
|
|
65
|
+
20 µs instead of about 2 ms.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **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.
|
|
70
|
+
- `SubagentWorkflow` honours an agent file's `isolated: true`
|
|
71
|
+
([tintinweb/pi-subagents#339](https://github.com/tintinweb/pi-subagents/pull/339)).
|
|
72
|
+
- FleetView ends with a blank line above Pi's footer
|
|
73
|
+
([tintinweb/pi-subagents#351](https://github.com/tintinweb/pi-subagents/issues/351)), and its arrow keys work under
|
|
74
|
+
any prompt editor that implements `getText`/`setText`
|
|
75
|
+
([tintinweb/pi-subagents#374](https://github.com/tintinweb/pi-subagents/issues/374)).
|
|
76
|
+
- The workflow stand-down recognises a lowercase `workflow` tool
|
|
77
|
+
([tintinweb/pi-subagents#283](https://github.com/tintinweb/pi-subagents/issues/283)).
|
|
78
|
+
|
|
79
|
+
## [0.20.2] - 2026-10-16
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
- **Every project is trusted again by default**, as before 0.20.1: subagents load a project's `.pi` extensions and settings, and the extension uses its agents, skills, workflows and `subagents.json`, whatever Pi decided for the folder. To follow Pi's project trust decision instead (0.20.1's behaviour), set `"projectTrust": "pi"` in the global `~/.pi/agent/subagents.json`.
|
|
84
|
+
|
|
10
85
|
## [0.20.1] - 2026-10-16
|
|
11
86
|
|
|
12
87
|
### Fixed
|
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,10 +117,15 @@ locations are those of `@tintinweb/pi-subagents`.
|
|
|
115
117
|
|
|
116
118
|
Based on `@tintinweb/pi-subagents` 0.19:
|
|
117
119
|
|
|
120
|
+
- **0.20.3:**
|
|
121
|
+
- 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
|
+
- 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.
|
|
123
|
+
- Subagents use the parent's model and thinking level by default.
|
|
124
|
+
- **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`.
|
|
118
125
|
- **0.20.1:**
|
|
119
126
|
- 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.
|
|
120
127
|
- An agent whose tool ignores a stop is still stopped and frees its slot; three ways to crash Pi are fixed.
|
|
121
|
-
-
|
|
128
|
+
- Explore and Plan are read-only by their tools (`read`, `grep`, `find`, `ls`).
|
|
122
129
|
- Worktree cleanup no longer loses ignored output, nested repositories or stashes; timed-out gates end their whole process tree.
|
|
123
130
|
- Much less work per frame: one refresh timer that stops while idle, an incremental transcript viewer, a widget that formats only the rows it shows.
|
|
124
131
|
- **Tool time limits:** `bash` calls of subagents and of the main agent get `toolTimeoutSeconds` (default 1200 s), and a watchdog stops other hung tools.
|