@henryqw/pi-subagent 15.0.2 → 15.0.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/README.md +27 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,11 +12,13 @@ pi install npm:@henryqw/pi-task-models
|
|
|
12
12
|
pi install npm:@henryqw/pi-subagent
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Run `/task-models` and configure the `fast` profile before delegating.
|
|
15
|
+
Run `/task-models` and configure the `fast` profile before delegating. Open `/task-models` again and verify that `fast` no longer says `not configured`.
|
|
16
16
|
|
|
17
17
|
## Works with
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
| Package | Relationship | Purpose |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) | Required | Supplies `fast`, `balanced`, `frontier`, and `fav` model routes. |
|
|
20
22
|
|
|
21
23
|
Routes come from `~/.pi/agent/config/pi-task-models/config.json`. It stores explicit task overrides. Missing shared model config warns once because delegation needs a route.
|
|
22
24
|
|
|
@@ -94,6 +96,12 @@ A Flow has 1–8 units with unique non-empty IDs and allows one active Flow. It
|
|
|
94
96
|
- Without `review`, Flow fast-forwards the exact validated tip.
|
|
95
97
|
- With `review`, the Reviewer receives the exact `{base, tip, patchPath}` packet and must return exactly `PASS` before the same integration path. Use `review` only for stated judgment that validation cannot decide.
|
|
96
98
|
|
|
99
|
+
A Role selects base tools, extensions, named Skills, instructions, and optional worktree isolation. Named Skills resolve from Main's effective Pi registry. Unavailable names warn and skip.
|
|
100
|
+
|
|
101
|
+
Children disable ambient extension and Skill discovery. `tools: []` adds no base tools, but selected extension tools and caller tools still activate. `extensions: []` adds no Role extension bundle. `skills: []` adds no separately named Role Skills, but selected extension Skills still load.
|
|
102
|
+
|
|
103
|
+
Parent-only delegation tools and `ask_question` are always excluded. Requested Role or caller tool names are checked after provider loading. Unavailable tools fail before the first model turn.
|
|
104
|
+
|
|
97
105
|
An explicit unit `modelClass` overrides both frozen Roles. Without one, each Role uses its own `modelClass`, configured `pi-subagent/delegateTask` assignment, or declared default.
|
|
98
106
|
|
|
99
107
|
One `delegate_flow_continue` can repair an Implementer, validation, or review block in the same worktree. Omitting its class keeps the unit's explicit class and frozen Role defaults. Supplying one replaces both Role defaults for that repair and its later Reviewer launch.
|
|
@@ -106,14 +114,12 @@ Flow has no dependency graph, saved recovery, automatic retry, aggregate review,
|
|
|
106
114
|
|
|
107
115
|
pi-subagent owns `~/.pi/agent/config/pi-subagent/config.json`. It is optional. A missing file uses these defaults without a warning.
|
|
108
116
|
|
|
109
|
-
|
|
|
110
|
-
| --- | --- | --- |
|
|
111
|
-
| `maxSubagents` | Safe integer
|
|
112
|
-
| `maxTurns` | Safe integer
|
|
113
|
-
| `timeout.idleMinutes` |
|
|
114
|
-
| `timeout.maxMinutes` | Positive minutes greater than `idleMinutes
|
|
115
|
-
|
|
116
|
-
`maxTurns` defaults to 50.
|
|
117
|
+
| Name | Description | Values | Default |
|
|
118
|
+
| --- | --- | --- | --- |
|
|
119
|
+
| `maxSubagents` | Sets the maximum number of active child processes. | Safe integer of at least 1. | `5` |
|
|
120
|
+
| `maxTurns` | Sets the hard provider-turn limit for each child. | Safe integer of at least 1. | `50` |
|
|
121
|
+
| `timeout.idleMinutes` | Sets the idle timeout for a child. | Positive minutes. | `10` |
|
|
122
|
+
| `timeout.maxMinutes` | Sets the maximum runtime for a child. | Positive minutes greater than `idleMinutes`. | `30` |
|
|
117
123
|
|
|
118
124
|
Excess children wait FIFO without using a child timeout. A terminal response on turn 50 succeeds; an attempted continuation rejects with `turn_limit`.
|
|
119
125
|
|
|
@@ -164,7 +170,16 @@ Flow uses the effective Implementer and, only when requested, Reviewer. The Scou
|
|
|
164
170
|
|
|
165
171
|
## API
|
|
166
172
|
|
|
167
|
-
The package root
|
|
173
|
+
The package root includes these main exports:
|
|
174
|
+
|
|
175
|
+
| Surface | Type | Purpose |
|
|
176
|
+
| --- | --- | --- |
|
|
177
|
+
| `loadRoles` | function | Loads built-in and user Role definitions. |
|
|
178
|
+
| `resolveRoleSkills` | function | Resolves a Role's named Skills from Pi's effective registry. |
|
|
179
|
+
| `resolveRoleLaunch` | function | Resolves a Role, route, and launch resources. |
|
|
180
|
+
| `createRoleLaunch` | function | Builds launch arguments from a resolved route. |
|
|
181
|
+
| `createEphemeralSubagentExecutor` | function | Creates the bounded child-process executor. |
|
|
182
|
+
| Worktree helpers | functions | Create, inspect, finalize, and report child worktrees. |
|
|
168
183
|
|
|
169
184
|
The executor works only inside the active Pi process. It does not discover or start a standalone Node.js Pi installation.
|
|
170
185
|
|
|
@@ -172,22 +187,10 @@ The executor works only inside the active Pi process. It does not discover or st
|
|
|
172
187
|
|
|
173
188
|
See the [public Role and executor API](./docs/orchestration.md#public-role-and-executor-api) for contracts and a `prepare` example. Pass `modelClass` to `resolveRoleLaunch` to override a Role default.
|
|
174
189
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
Flow state is memory-only.
|
|
178
|
-
|
|
179
|
-
## Data, cost, and privacy
|
|
180
|
-
|
|
181
|
-
A Role selects base tools, extensions, named Skills, instructions, and optional worktree isolation. Named Skills resolve from Main's effective Pi registry. Unavailable names warn and skip.
|
|
182
|
-
|
|
183
|
-
Children disable ambient extension and Skill discovery. `tools: []` adds no base tools, but selected extension tools and caller tools still activate. `extensions: []` adds no Role extension bundle. `skills: []` adds no separately named Role Skills, but selected extension Skills still load.
|
|
190
|
+
## Limits and recovery
|
|
184
191
|
|
|
185
192
|
An explicitly selected extension is trusted, not sandboxed. Its tools, Skills, and executable behavior load together. Select fewer trusted extensions to reduce scope. pi-subagent does not guess or remove undocumented dependencies.
|
|
186
193
|
|
|
187
|
-
Parent-only delegation tools and `ask_question` are always excluded. Requested Role or caller tool names are checked after provider loading. Unavailable tools fail before the first model turn.
|
|
188
|
-
|
|
189
|
-
## Limits and recovery
|
|
190
|
-
|
|
191
194
|
Flow never force-deletes recoverable work. Failed or uncertain units, and cleanup refusals after integration, retain their worktree path or branch for recovery.
|
|
192
195
|
|
|
193
196
|
See [Flow mechanics and recovery](./docs/orchestration.md#delegate_flow) for retained-work recovery.
|