opensec-pi-subagents 0.20.0 → 0.20.1
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 +64 -24
- package/NOTICE +0 -26
- package/README.md +14 -0
- package/SECURITY.md +5 -5
- package/dist-bun/core.cjs +8414 -6730
- package/dist-bun/index.js +2 -2
- package/docs/workflows.md +10 -3
- package/examples/workflows/gated-fix.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,44 +7,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.20.
|
|
10
|
+
## [0.20.1] - 2026-10-16
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Resume.** A finished, stopped or failed agent stays resumable by the model as long as its session file exists, not 10 minutes: the Agent tool, `@handle`, nested and workflow `agent({resume})` reopen it from the file under the same id, with its own model, thinking level, working directory, worktree and `isolated` setting. Agents are rebuilt after a restart, `/resume`, `/fork` or `/reload`. A worktree agent resumes in its worktree, recreated from its branch. `max_turns`, grace turns and the tool watchdog apply to resumed runs. Foreground results give the model the agent id. A resume waits for a stopped run to finish.
|
|
15
|
+
- **Stopping.** An agent whose tool ignores the abort signal is still stopped: its slot is freed and queued agents start, a foreground call returns, and the watchdog gives up on it instead of waiting forever. Agents stopped while queued or while their worktree is made complete like any other stop.
|
|
16
|
+
- **Crashes.** An `@mention` racing `/new`, `/resume` or `/reload`, an error in a completion handler, and scheduler fires can no longer end Pi's process; the schedule lock no longer blocks Pi.
|
|
17
|
+
- **Project trust.** Subagents follow Pi's decision about a project folder: in an untrusted folder they load none of its extensions or settings, and the extension ignores its agents, skills, workflows and `subagents.json`. A project agent that replaces a built-in is shown.
|
|
18
|
+
- **Explore and Plan** are read-only by their tools (`read`, `grep`, `find`, `ls`), not only by their prompt.
|
|
19
|
+
- **Worktrees.** Cleanup no longer deletes ignored output, nested repositories or stashes while reporting "no changes"; worktrees left by a crash are committed to a `-recovered` branch; workflows report every child's branch. Gate commands and git calls end their whole process tree on a timeout.
|
|
20
|
+
- **Usage.** Workflow resumes are not counted twice; background, workflow and nested spend reaches the parent.
|
|
21
|
+
|
|
22
|
+
### Performance
|
|
23
|
+
|
|
24
|
+
- The widget and fleet list share one refresh timer, which stops while nothing runs; the transcript viewer builds incrementally (500 messages: 85 ms to 0.6 ms a frame without a JIT); the widget formats only the rows it shows; foreground progress is sent once a frame, not per token; per-tool-call scope checks and git environment checks are cached; finished agents' sessions are released 60 s after they settle; transcript writes are batched.
|
|
25
|
+
- Tests clean up their temporary folders.
|
|
15
26
|
|
|
16
|
-
## [0.19.
|
|
27
|
+
## [0.19.11] - 2026-10-07
|
|
17
28
|
|
|
18
29
|
### Fixed
|
|
19
|
-
|
|
20
|
-
- **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- **
|
|
30
|
+
|
|
31
|
+
- **The main agent's commands had no time limit either.** Pi's `bash` has no default timeout, so an unbounded `grep -r … /` or a server started in the foreground held the main agent's turn until someone noticed. A main-agent `bash` call that sets no timeout now gets `toolTimeoutSeconds` (default 1200 s, `0` = off) and is killed at it, with the timeout reported to the model. A timeout the main agent supplies, even a longer one, is kept; subagents stay capped at the limit.
|
|
32
|
+
|
|
33
|
+
## [0.19.10] - 2026-10-07
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- **A hung tool call held a subagent forever.** Turn limits only count finished turns, and a turn whose tool never returns (a `find /`, a server that never exits) never finishes, so `max_turns` and the grace turns could not stop it. Subagent `bash` calls now get a timeout (the new `toolTimeoutSeconds` setting, default 1200 s, `0` = off): Pi kills the command's whole process tree and the agent sees the timeout and carries on. Any other tool still running a minute past the limit is stopped by a watchdog and the agent is resumed with a note to split the work into bounded steps, up to 3 times per run (nested `Agent` / workflow calls are exempt). Resumed agents get the same protection.
|
|
38
|
+
|
|
39
|
+
## [0.19.9] - 2026-10-03
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **No load warning on Pi 1.0.** `@sinclair/typebox` and `typebox` were listed in `dependencies`, which Pi 1.0 reports as host-provided packages that can bypass its extension loader. They are now optional `"*"` peer dependencies (Pi supplies both on 0.87.1 and 1.0) and stay devDependencies for tests and typecheck.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- The development pins of `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent` and `@earendil-works/pi-tui` move from 0.84.2 to 1.0.0, so `npm test` and `prepublishOnly` run the e2e tests that need Pi 1.0 APIs.
|
|
48
|
+
|
|
49
|
+
## [0.19.8] - 2026-10-03
|
|
50
|
+
|
|
51
|
+
The Node build now carries the same fixes as the Bun build (0.19.5-bun.x).
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
- **Workflows:** an async expression in `meta` could freeze Pi for good (also while the call was still streaming); the call-line name cache grew with every streamed prefix (~1 GB for a 95 KB script); a `log()` flood crashed progress handling; children of a finished run kept running; a paused run could be resumed while still alive; script paths that are not regular files (FIFO, `/dev/zero`) blocked or exhausted memory; schema `pattern`s with nested quantifiers are refused; top-level script errors name the script line.
|
|
27
55
|
- **Terminal escapes** (OSC 52 clipboard writes, screen clears, CR) in child output, gate output and logs are stripped before rendering.
|
|
28
|
-
-
|
|
56
|
+
- **`ext:` tool narrowing** is enforced on Pi 1.0 deferred/codemode tool-to-tool calls too.
|
|
57
|
+
- `get_subagent_result` with `wait: true` no longer reports "still running" while the worktree is being created.
|
|
58
|
+
- A corrupt schedule file is kept as `.corrupt` instead of overwritten, and waiting for the schedule lock no longer spins a core.
|
|
59
|
+
- A canceled session switch no longer stops the scheduler; a foreground resume can be stopped.
|
|
60
|
+
- The agents widget timer stops on session shutdown.
|
|
61
|
+
- Refuses to load next to `opensec-pi-swarm` (same tools and events); the first one loaded stays active and the other warns once.
|
|
29
62
|
|
|
30
63
|
### Changed
|
|
31
64
|
- Workflow scripts are documented as running with full host access: the vm is not a sandbox.
|
|
32
|
-
-
|
|
33
|
-
- A canceled session switch no longer stops the scheduler; a foreground resume is stoppable (fresh abort controller, parent-signal wiring).
|
|
65
|
+
- README: pi-bolt users install with `pi-bolt install npm:@kushalkhemka/opensec-pi-subagents@bun`; note on the `~/.pi/agent` directory shared by pi-bolt and Node Pi.
|
|
34
66
|
|
|
35
|
-
## [0.19.
|
|
67
|
+
## [0.19.7] - 2026-10-03
|
|
36
68
|
|
|
37
|
-
|
|
69
|
+
### Changed
|
|
70
|
+
- Docs: corrected README facts (Pi compatibility verified on Pi 0.87.1 and 1.0.0). No code changes.
|
|
71
|
+
- License: the package is now proprietary (`UNLICENSED`); LICENSE keeps the upstream MIT notice for the included `@tintinweb/pi-subagents` code.
|
|
72
|
+
|
|
73
|
+
## [0.19.6] - 2026-10-03
|
|
38
74
|
|
|
39
75
|
### Changed
|
|
40
|
-
-
|
|
76
|
+
- Docs: README restyle (logo, install for Node and Bun). No code changes.
|
|
77
|
+
|
|
78
|
+
## [0.19.5] - 2026-10-03
|
|
41
79
|
|
|
42
80
|
### Fixed
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
81
|
+
- **Long schedules no longer fire every millisecond.** Timer delays above 2^31-1 ms (about 24.8 days) are clamped to 1 ms, so a `30d` interval spawned an agent every millisecond (each outside the concurrency queue) and a `+30d` or far ISO one-shot fired at once. Schedules now chain timers of at most 24 days. Intervals must be at least `1m` (stored shorter intervals are raised to one minute), intervals and relative delays are capped at `3650d`, and a fire is skipped (`subagents:scheduled` event `skipped`) while the job's previous agent is still running.
|
|
82
|
+
- **Validating a cron schedule no longer leaves a timer running.** Every validation armed a croner job that was never stopped, so `pi -p` never exited once a cron job had been scheduled.
|
|
83
|
+
- **Worktree agents no longer lose their work on a failed cleanup.** With no git identity the preservation commit failed and the worktree was force-removed while reporting no changes; a `git status` or `rev-parse` timeout did the same. The commit now retries with a placeholder author and runs with `commit.gpgsign=false`, and the worktree is removed only when it provably holds nothing; otherwise it is kept and its path reported, also when the agent itself failed. Worktrees are created inside a private (0700) temporary directory.
|
|
84
|
+
- **Quitting waits up to 15 s for stopped worktree agents to save their changes** to a branch, instead of racing the process exit.
|
|
85
|
+
- **A stop that lands before a subagent's session exists is honored.** An abort during startup (or a parent interrupt before a queued agent started) was lost and the agent ran its whole task.
|
|
86
|
+
- **Pi 1.0: `@agent` mentions start the conversation clone again.** Assigning the clone's system prompt threw on Pi 1.0, so every mention fell back to a direct start.
|
|
87
|
+
- **Pi 1.0: subagent transcripts no longer repeat the system prompt or record system messages as tool results.**
|
|
48
88
|
|
|
49
89
|
## [0.19.2] - 2026-09-26
|
|
50
90
|
|
package/NOTICE
CHANGED
|
@@ -30,29 +30,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
30
30
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
31
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
32
|
SOFTWARE.
|
|
33
|
-
|
|
34
|
-
--------------------------------------------------------------------------------
|
|
35
|
-
croner 10.0.1 (https://github.com/hexagon/croner), bundled in dist-bun/core.cjs
|
|
36
|
-
|
|
37
|
-
The MIT License (MIT)
|
|
38
|
-
|
|
39
|
-
Copyright (c) 2015-2021 Hexagon <github.com/Hexagon>
|
|
40
|
-
|
|
41
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
42
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
43
|
-
in the Software without restriction, including without limitation the rights
|
|
44
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
45
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
46
|
-
furnished to do so, subject to the following conditions:
|
|
47
|
-
|
|
48
|
-
The above copyright notice and this permission notice shall be included in all
|
|
49
|
-
copies or substantial portions of the Software.
|
|
50
|
-
|
|
51
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
52
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
53
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
54
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
55
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
56
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
57
|
-
SOFTWARE.
|
|
58
|
-
|
package/README.md
CHANGED
|
@@ -68,6 +68,12 @@ Agent({ subagent_type: "Explore", prompt: "Find authentication code", descriptio
|
|
|
68
68
|
| `/agents` | Inspect and manage agents: live conversations, settings, workflows and scheduled jobs. |
|
|
69
69
|
| `@<agent> <message>` | With agent mentions enabled, sends a message to that agent, for example `@explore check the RPC path`. A finished agent can be resumed. |
|
|
70
70
|
|
|
71
|
+
### Resuming agents
|
|
72
|
+
|
|
73
|
+
A finished, stopped or failed agent can be continued with `Agent({ resume: "<id>", prompt: "..." })`: every result ends
|
|
74
|
+
with the agent's ID. It keeps its whole conversation, model, thinking level, working directory and worktree. An agent stays
|
|
75
|
+
resumable as long as its session file exists, also after Pi-Bolt restarts or the session is resumed, forked or reloaded.
|
|
76
|
+
|
|
71
77
|
### Custom agents
|
|
72
78
|
|
|
73
79
|
Put agent definitions in `.pi/agents/<name>.md` in a project, or in the global Pi agents directory.
|
|
@@ -109,6 +115,14 @@ locations are those of `@tintinweb/pi-subagents`.
|
|
|
109
115
|
|
|
110
116
|
Based on `@tintinweb/pi-subagents` 0.19:
|
|
111
117
|
|
|
118
|
+
- **0.20.1:**
|
|
119
|
+
- 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
|
+
- An agent whose tool ignores a stop is still stopped and frees its slot; three ways to crash Pi are fixed.
|
|
121
|
+
- Subagents follow Pi's trust decision for a project folder; Explore and Plan are read-only by their tools (`read`, `grep`, `find`, `ls`).
|
|
122
|
+
- Worktree cleanup no longer loses ignored output, nested repositories or stashes; timed-out gates end their whole process tree.
|
|
123
|
+
- 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
|
+
- **Tool time limits:** `bash` calls of subagents and of the main agent get `toolTimeoutSeconds` (default 1200 s), and a watchdog stops other hung tools.
|
|
125
|
+
|
|
112
126
|
- **Inheritance and caching:**
|
|
113
127
|
- Agents inherit the parent's model and thinking level.
|
|
114
128
|
- Agent discovery and configuration are cached and revalidated by file metadata.
|
package/SECURITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Security Policy
|
|
2
2
|
|
|
3
|
-
This document explains the security model behind
|
|
3
|
+
This document explains the security model behind `@kushalkhemka/opensec-pi-subagents` and
|
|
4
4
|
where the boundaries are.
|
|
5
5
|
|
|
6
6
|
`pi-subagents` is a [pi](https://pi.dev) extension. It spawns and orchestrates
|
|
@@ -29,10 +29,10 @@ coding agent and its sub-agents trivially, and this cannot be protected against.
|
|
|
29
29
|
|
|
30
30
|
## Reporting a Vulnerability
|
|
31
31
|
|
|
32
|
-
If you believe you found a security vulnerability in `
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
If you believe you found a security vulnerability in `pi-subagents`, please
|
|
33
|
+
contact the maintainer of `@kushalkhemka/opensec-pi-subagents` privately through
|
|
34
|
+
your existing OpenSec support channel. Do not send fork-specific reports to
|
|
35
|
+
the upstream project or include sensitive details in public issues.
|
|
36
36
|
|
|
37
37
|
Please include:
|
|
38
38
|
|