@ferris1225/pi-subagents 5.0.5 → 6.0.0
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 +54 -0
- package/README.md +116 -77
- package/index.ts +6 -6
- package/package.json +1 -6
- package/src/configuration/role-migration.ts +2 -2
- package/src/configuration/setup.ts +4 -2
- package/src/configuration/ui.ts +144 -132
- package/src/delegation/dispatch.ts +1 -1
- package/src/delegation/prompt.ts +8 -7
- package/src/execution/cli-run.ts +14 -1
- package/src/execution/hidden-console.cjs +41 -0
- package/src/execution/spawn.ts +15 -5
- package/src/isolation/cleanup.ts +9 -5
- package/src/isolation/manifest-mutation.ts +73 -0
- package/src/isolation/recovery.ts +24 -16
- package/src/lifecycle/durable.ts +61 -25
- package/src/lifecycle/runtime.ts +9 -3
- package/src/lifecycle/stop.ts +2 -2
- package/src/lifecycle/thread-lifecycle.ts +4 -1
- package/src/lifecycle/thread-restore.ts +15 -5
- package/src/lifecycle/thread-shared.ts +15 -3
- package/src/presentation/monitor.ts +5 -3
- package/src/presentation/widget.ts +157 -113
- package/src/workflow/acceptance.ts +67 -0
- package/src/workflow/durable.ts +32 -12
- package/src/workflow/engine.ts +118 -30
- package/src/workflow/plan.ts +25 -4
- package/src/workflow/state.ts +6 -0
- package/src/workflow/templates.ts +156 -0
- package/src/workflow/tool.ts +23 -104
- package/skills/workflow/SKILL.md +0 -268
- package/src/workflow/files.ts +0 -236
- package/workflows/code-review.md +0 -38
- package/workflows/migration.md +0 -42
- package/workflows/research.md +0 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking changes
|
|
6
|
+
|
|
7
|
+
- Support only the built-in `code-review`, `research`, and `migration` workflows
|
|
8
|
+
through `workflow` plus `inputs`. Remove inline graphs, custom names, workflow
|
|
9
|
+
files, and user/project workflow discovery. Keep old interrupted records
|
|
10
|
+
readable for recovery.
|
|
11
|
+
- Embed routing guidance and workflow templates in the extension. Remove the
|
|
12
|
+
separately loaded workflow skill and root workflow resource directory.
|
|
13
|
+
|
|
14
|
+
### Changes
|
|
15
|
+
|
|
16
|
+
- Append one mandatory independent sentinel acceptance officer to every
|
|
17
|
+
workflow. Review all settled work and integration evidence, including failed
|
|
18
|
+
branches; require an explicit terminal PASS, and reject missing, ambiguous,
|
|
19
|
+
malformed, or FAIL verdicts. Cancellation skips acceptance.
|
|
20
|
+
- Replace ambiguous graph-source selection with direct built-in input errors.
|
|
21
|
+
Give different template inputs distinct phase identities while retaining
|
|
22
|
+
duplicate ownership for the same deliverable. Preserve brace syntax in task
|
|
23
|
+
inputs as literal text instead of interpreting it as graph dependencies.
|
|
24
|
+
- Redesign the terminal board around work progress, blocking reasons, and a
|
|
25
|
+
separate required-acceptance row. Keep failures visible within the 10-line
|
|
26
|
+
budget, preserve narrow-screen identity, and correct hidden-task counts.
|
|
27
|
+
- Redesign setup as a role selector with focused model/thinking details, using
|
|
28
|
+
side-by-side or stacked layouts. Preserve search, paging, focus, and default
|
|
29
|
+
versus override information. Budget setup height with the host's widget and
|
|
30
|
+
footer so required acceptance remains visible in a 24-row terminal.
|
|
31
|
+
- Preserve managed recovery references when the original checkout is temporarily
|
|
32
|
+
unavailable. Use stable durable identities and cross-process manifest locks
|
|
33
|
+
so separate windows cannot overwrite or delete each other's recovery records.
|
|
34
|
+
Match recovered workflow children by durable identity after local renumbering,
|
|
35
|
+
keep project keys stable through unavailable checkouts with aliased parent paths,
|
|
36
|
+
and exclude lock directories from project scans.
|
|
37
|
+
- Preserve concurrent recovery additions during announcements and keep newly
|
|
38
|
+
settled long-running sessions inside their follow-up retention window.
|
|
39
|
+
- Remove duplicate manifest scans and model-catalog lookups. Stop idle widget
|
|
40
|
+
refreshes and fix zero-width summaries and ANSI-contaminated task labels.
|
|
41
|
+
|
|
42
|
+
## 5.0.6
|
|
43
|
+
|
|
44
|
+
### Changes
|
|
45
|
+
|
|
46
|
+
- Hide Windows console windows for process launches inside child tools and
|
|
47
|
+
extensions, including `pi.exec` and inherited Node descendants. Preserve RPC
|
|
48
|
+
pipes, existing Node options, and macOS/Linux process-group cancellation.
|
|
49
|
+
- Prefer useful bounded delegation, including one artisan for a substantial
|
|
50
|
+
implementation without parallel work. Keep single runs, independent batches,
|
|
51
|
+
dependency workflows, and the two review roles distinct.
|
|
52
|
+
- Skip unused orchestration runtime creation in leaf processes and remove
|
|
53
|
+
duplicated delegation guidance. Correct transport and lifecycle comments.
|
|
54
|
+
- Gate publishing on checks across Windows, macOS, and Linux, with regression
|
|
55
|
+
coverage for shell visibility, process APIs, inherited preloads, and native Pi.
|
|
56
|
+
|
|
3
57
|
## 5.0.5
|
|
4
58
|
|
|
5
59
|
### Changes
|
package/README.md
CHANGED
|
@@ -11,13 +11,15 @@ Requires **Pi >= 1.0.0** and **Node.js >= 22.19.0**.
|
|
|
11
11
|
pi install npm:@ferris1225/pi-subagents
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Run `/subagents-setup` for a role
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Esc returns without applying a picker selection
|
|
20
|
-
|
|
14
|
+
Run `/subagents-setup` for a role selector and focused settings editor. Wide
|
|
15
|
+
terminals place them side by side; narrow terminals stack them. ↑/↓ changes the
|
|
16
|
+
role, ←/→ selects **Model**, **Thinking**, or **Reset**, and Enter edits it.
|
|
17
|
+
The selected role shows its full model reference, effective reasoning level,
|
|
18
|
+
requested level when clamped, and default/override source. Each selection saves
|
|
19
|
+
immediately; Esc returns without applying a picker selection and keeps focus.
|
|
20
|
+
Model pickers support search, paste, and paging. On short terminals, PgUp/PgDn
|
|
21
|
+
scrolls the settings while the selected role and field stay pinned. Setup
|
|
22
|
+
reserves space for the workflow's required-acceptance row.
|
|
21
23
|
|
|
22
24
|
All roles follow the main model by default; thinking defaults to `low` for scout
|
|
23
25
|
and `high` for artisan, sentinel, and skeptic. The panel distinguishes defaults from overrides and
|
|
@@ -36,7 +38,7 @@ a model preserves the thinking preference. Settings live in
|
|
|
36
38
|
|
|
37
39
|
The main model chooses from these role descriptions; names alone do not route a
|
|
38
40
|
task. Use `sentinel` for "inspect this diff" and `skeptic` for "does this claim
|
|
39
|
-
hold?" Default to one. Both are justified only by distinct questions, such as
|
|
41
|
+
hold?" Default to one review role. Both are justified only by distinct questions, such as
|
|
40
42
|
reviewing an implementation and then testing its specific findings. A skeptic
|
|
41
43
|
without a named claim reports the gap and stops instead of starting another review.
|
|
42
44
|
|
|
@@ -48,9 +50,8 @@ and valid checks, filling gaps rather than repeating main or upstream work.
|
|
|
48
50
|
Only `scout`, `artisan`, `sentinel`, and `skeptic` are valid runtime role names.
|
|
49
51
|
Existing model/thinking settings and interrupted run records migrate on load
|
|
50
52
|
and are saved with the new names. Explicit valid settings under the new names
|
|
51
|
-
win.
|
|
52
|
-
|
|
53
|
-
read-only. New tool calls and inline graphs using retired names are rejected.
|
|
53
|
+
win. Custom roles and user-defined workflows are not supported. Retained records
|
|
54
|
+
from older releases remain available for recovery.
|
|
54
55
|
|
|
55
56
|
Children receive a self-contained brief and project instructions, but no parent
|
|
56
57
|
conversation. They cannot delegate or release. Main owns planning, integration,
|
|
@@ -58,11 +59,13 @@ and the final result. Keep a fix and its regression tests with one owner.
|
|
|
58
59
|
|
|
59
60
|
## Delegate
|
|
60
61
|
|
|
61
|
-
Pi
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
Pi proactively looks for useful bounded phases to delegate; no special request
|
|
63
|
+
is required. Focused ownership, isolated context, parallel progress, and an
|
|
64
|
+
independent check can each justify a child. A substantial self-contained fix can
|
|
65
|
+
go to one artisan together with its regression tests, even when there is nothing
|
|
66
|
+
to parallelize. Quick source checks and small understood edits stay in main.
|
|
67
|
+
Choose team size from independent work. Explicit requests to work in main or
|
|
68
|
+
avoid subagents take precedence.
|
|
66
69
|
|
|
67
70
|
Use one owner per deliverable, including its regression tests. Brief the child
|
|
68
71
|
with the outcome, done condition, relevant paths, established evidence, write
|
|
@@ -132,63 +135,77 @@ phase/scope ownership; an exact run id also retrieves its retained result for re
|
|
|
132
135
|
|
|
133
136
|
## Workflows
|
|
134
137
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
`subagent_workflow` runs a built-in plan with named task inputs. Its only source
|
|
139
|
+
is the catalog in [templates.ts](./src/workflow/templates.ts): no inline `nodes`,
|
|
140
|
+
`file`, custom graph name, user directory, or project directory is loaded.
|
|
141
|
+
The model's routing rules are embedded in [prompt.ts](./src/delegation/prompt.ts),
|
|
142
|
+
so no separate workflow skill needs to be loaded.
|
|
139
143
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
| Workflow | Work before acceptance | Required inputs |
|
|
145
|
+
| --- | --- | --- |
|
|
146
|
+
| `code-review` | Sentinel inspects the target and produces supported findings | `TARGET` |
|
|
147
|
+
| `research` | Three scouts investigate first-party sources, practice, and the repository; a fourth synthesizes the answer | `QUESTION` |
|
|
148
|
+
| `migration` | Two artisans implement disjoint slices; an integrated gate checks and fixes their combined result | `TARGET`, `CONTRACT`, `CORE_CHANGE`, `ADAPTER_CHANGE`, `CORE_SCOPE`, `CORE_TEST_SCOPE`, `ADAPTER_SCOPE`, `ADAPTER_TEST_SCOPE` |
|
|
145
149
|
|
|
146
150
|
```ts
|
|
147
151
|
subagent_workflow({
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
{
|
|
151
|
-
id: "fix",
|
|
152
|
-
agent: "artisan",
|
|
153
|
-
task: "Fix the refresh race in src/auth and add regression tests. Run the relevant checks.",
|
|
154
|
-
scope: { paths: ["src/auth", "test/auth.test.ts"] },
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
id: "review",
|
|
158
|
-
agent: "sentinel",
|
|
159
|
-
dependsOn: ["fix"],
|
|
160
|
-
task: "Inspect the implementation against the refresh contract and callers. Reuse valid checks and investigate concrete gaps. Do not edit files.\n{{fix}}",
|
|
161
|
-
},
|
|
162
|
-
],
|
|
152
|
+
workflow: "code-review",
|
|
153
|
+
inputs: { TARGET: "HEAD~1..HEAD; inspect the cache invalidation fix" },
|
|
163
154
|
});
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
`dependsOn` starts a node after its prerequisites complete and integrate.
|
|
167
|
-
`{{id}}` inserts an upstream answer; `.status`, `.runId`, and `.error` expose its
|
|
168
|
-
facts. Long answers include a full-result file. A failed node blocks its
|
|
169
|
-
dependents; independent branches continue. The graph delivers one summary.
|
|
170
155
|
|
|
171
|
-
|
|
172
|
-
|
|
156
|
+
subagent_workflow({
|
|
157
|
+
workflow: "research",
|
|
158
|
+
inputs: { QUESTION: "How should this repository invalidate its HTTP cache?" },
|
|
159
|
+
});
|
|
160
|
+
```
|
|
173
161
|
|
|
174
|
-
|
|
162
|
+
Migration inputs must name the shared interface contract, both slice briefs, and
|
|
163
|
+
exact write paths. Each slice owns its implementation and regression tests;
|
|
164
|
+
shared paths are rejected before any child starts. The integrated gate waits
|
|
165
|
+
for both slices and can edit their combined scope. For example:
|
|
175
166
|
|
|
176
167
|
```ts
|
|
177
|
-
subagent_workflow({
|
|
178
|
-
|
|
168
|
+
subagent_workflow({
|
|
169
|
+
workflow: "migration",
|
|
170
|
+
inputs: {
|
|
171
|
+
TARGET: "the version 2 cache API",
|
|
172
|
+
CONTRACT: "docs/cache-v2.md",
|
|
173
|
+
CORE_CHANGE: "Update storage and its invalidation rules",
|
|
174
|
+
ADAPTER_CHANGE: "Update HTTP callers to the new interface",
|
|
175
|
+
CORE_SCOPE: "src/core",
|
|
176
|
+
CORE_TEST_SCOPE: "test/core",
|
|
177
|
+
ADAPTER_SCOPE: "src/adapters",
|
|
178
|
+
ADAPTER_TEST_SCOPE: "test/adapters",
|
|
179
|
+
},
|
|
180
|
+
});
|
|
179
181
|
```
|
|
180
182
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
node,
|
|
190
|
-
|
|
191
|
-
|
|
183
|
+
Choose a built-in workflow when its fixed phases fit the task. For one bounded
|
|
184
|
+
phase use `subagent`; for independent work use `subagent({ tasks: [...] })`.
|
|
185
|
+
If research must determine the next task or its scope, run it first and decide
|
|
186
|
+
in main. Missing, unknown, or unused template inputs are rejected with the exact
|
|
187
|
+
parameter names before a child starts. Task inputs remain literal, including
|
|
188
|
+
`{{...}}` text.
|
|
189
|
+
|
|
190
|
+
Every workflow ends with an independent **sentinel acceptance officer**. The
|
|
191
|
+
runtime adds this node, waits until all work has settled and integrated, and
|
|
192
|
+
passes a bounded evidence brief plus the complete report. Failed and blocked
|
|
193
|
+
branches are included. The officer reviews the delivered outcome, reuses valid
|
|
194
|
+
checks, and may run focused checks to close evidence gaps. It does not edit or
|
|
195
|
+
release. A successful code review can report defects in the target; acceptance
|
|
196
|
+
judges the accuracy and completeness of that review.
|
|
197
|
+
|
|
198
|
+
The final answer must end with `WORKFLOW_ACCEPTANCE: PASS` or
|
|
199
|
+
`WORKFLOW_ACCEPTANCE: FAIL`. A missing, ambiguous, malformed, or negative verdict
|
|
200
|
+
fails the workflow even when the reviewer process exits normally. A PASS cannot
|
|
201
|
+
clear failures in earlier work. Explicit cancellation or session interruption
|
|
202
|
+
stops the graph without starting acceptance. The graph sends one final summary
|
|
203
|
+
containing its acceptance result; main still owns remediation, the final gate,
|
|
204
|
+
and release.
|
|
205
|
+
|
|
206
|
+
Phase identity includes the built-in plan and its inputs. The same deliverable
|
|
207
|
+
remains owned within its workspace; different questions or targets can run in
|
|
208
|
+
the same session. Inspect retained results instead of repeating completed work.
|
|
192
209
|
|
|
193
210
|
## Status, cancellation, and recovery
|
|
194
211
|
|
|
@@ -202,18 +219,20 @@ See the [workflow skill](./skills/workflow/SKILL.md) for graph authoring details
|
|
|
202
219
|
| `subagent_stop({ workflow: 3 })` | Stop a graph and finalize its active nodes |
|
|
203
220
|
| `subagent_stop({ all: true })` | Stop all active runs and graphs |
|
|
204
221
|
|
|
205
|
-
The widget is a
|
|
206
|
-
workflow progress
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
222
|
+
The widget is a terminal task board capped at 10 lines: a quiet overview,
|
|
223
|
+
workflow identity and work progress, then task rows with status/time at the
|
|
224
|
+
right. Failures and blocked reasons get space before optional telemetry; narrow
|
|
225
|
+
terminals keep task identity visible. Model, thinking, token usage, and worktree
|
|
226
|
+
state appear as secondary detail. Each workflow has a separate **Acceptance
|
|
227
|
+
required** row showing pending, running, PASS, or FAIL. Acceptance does not
|
|
228
|
+
inflate the ordinary work count or hidden-task total. Completed work collapses
|
|
229
|
+
into progress while acceptance is pending; a successfully accepted workflow
|
|
230
|
+
hides automatically. Failed or blocked work stays until the next dispatch.
|
|
212
231
|
Completion messages and status lookups retain the results. Overflow reports
|
|
213
|
-
hidden tasks. Runs preparing their child process show `starting`.
|
|
214
|
-
|
|
215
|
-
lock: independent runs start together, including
|
|
216
|
-
another call awaits results.
|
|
232
|
+
hidden tasks. Runs preparing their child process show `starting`. The refresh
|
|
233
|
+
timer runs only while visible active work needs it. There is no process-count
|
|
234
|
+
limit or shared-checkout startup lock: independent runs start together, including
|
|
235
|
+
separate dispatch calls while another call awaits results.
|
|
217
236
|
|
|
218
237
|
Usually omit `isolation`: implementation tasks use detached Git worktrees in
|
|
219
238
|
single calls, parallel batches, and workflows. Reading and review use the current
|
|
@@ -259,9 +278,17 @@ Both start a new run with the role, workspace and scope preserved. Queueing,
|
|
|
259
278
|
admission and isolation still apply. Pending runs cannot be steered, and fixed
|
|
260
279
|
workflow graphs cannot be edited.
|
|
261
280
|
|
|
262
|
-
Children use Pi's native `--mode rpc` CLI, retries, and
|
|
263
|
-
On Windows,
|
|
264
|
-
process
|
|
281
|
+
Children use Pi's native `--mode rpc` CLI with piped input/output, retries, and
|
|
282
|
+
session persistence. On Windows, console hiding covers the Pi child and Node
|
|
283
|
+
process launches made by its tools and extensions, including `pi.exec`, `pwsh`,
|
|
284
|
+
and `powershell`. The child preloads this policy before Pi starts and passes it
|
|
285
|
+
to Node descendants through `NODE_OPTIONS`, preserving existing options. An
|
|
286
|
+
explicit child extension installs the same policy for runtimes without Node
|
|
287
|
+
preloading. Windows launches stay attached so detachment cannot open a console.
|
|
288
|
+
On macOS and Linux, the policy leaves shell options unchanged; the Pi child uses
|
|
289
|
+
a separate process group for cancellation and does not launch a terminal app.
|
|
290
|
+
RPC communication and process-tree cancellation remain active. Commands that
|
|
291
|
+
explicitly open a terminal or GUI control their own windows.
|
|
265
292
|
A settled provider failure can hand off once to the main model in the same
|
|
266
293
|
session. State and full-result files live under
|
|
267
294
|
`~/.pi/agent/ferris-pi-subagents/`, grouped by project. `PI_CODING_AGENT_DIR`
|
|
@@ -286,12 +313,24 @@ and freed bytes; `/subagents-cleanup dry-run` measures without deleting anything
|
|
|
286
313
|
|
|
287
314
|
## Development
|
|
288
315
|
|
|
316
|
+
Runtime code lives under `src/`; the package has no skill or workflow resource
|
|
317
|
+
directories. Built-in prompts and plans change with the code and its tests.
|
|
318
|
+
|
|
319
|
+
| Module | Responsibility |
|
|
320
|
+
| --- | --- |
|
|
321
|
+
| `delegation/` | Built-in roles, parent routing prompt, and phase/scope ownership |
|
|
322
|
+
| `workflow/` | Built-in templates, parameter validation, scheduling, and mandatory acceptance |
|
|
323
|
+
| `configuration/` | Model and thinking settings, plus the setup interface |
|
|
324
|
+
| `presentation/` | Running task board, activity, status, and result formatting |
|
|
325
|
+
| `execution/`, `lifecycle/`, `isolation/` | Child processes, durable state, cancellation, worktrees, and recovery |
|
|
326
|
+
|
|
289
327
|
```bash
|
|
290
328
|
npm ci
|
|
291
329
|
npm run check
|
|
292
330
|
```
|
|
293
331
|
|
|
294
|
-
Pushing an unpublished package version to `main`
|
|
332
|
+
Pushing an unpublished package version to `main` runs the checks on Windows,
|
|
333
|
+
macOS, and Linux before triggering
|
|
295
334
|
[publishing and a GitHub Release](./.github/workflows/publish.yml).
|
|
296
335
|
|
|
297
336
|
[Changelog](./CHANGELOG.md) · [MIT license](./LICENSE)
|
package/index.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* The heavy lifting lives in focused modules:
|
|
6
6
|
* - delegation/ — built-in roles, routing prompts, and tool contract
|
|
7
7
|
* - configuration/ — persisted settings, model routes, and setup UI
|
|
8
|
-
* - execution/ —
|
|
8
|
+
* - execution/ — background tasks, native RPC transport, and model handoff
|
|
9
9
|
* - lifecycle/ — durable threads, restoration, controls, and delivery
|
|
10
|
-
* - workflow/ —
|
|
10
|
+
* - workflow/ — built-in plans, dependency runner, and acceptance
|
|
11
11
|
* - isolation/ — Git worktrees, recovery, and temporary-state hygiene
|
|
12
12
|
* - presentation/ — announcements, formatting, monitor, and the active-run
|
|
13
13
|
* widget
|
|
@@ -41,9 +41,6 @@ import { formatBytes, measureDurableUsage, runStorageCleanup } from "./src/isola
|
|
|
41
41
|
import { getSubagentsRoot } from "./src/execution/spawn.ts";
|
|
42
42
|
|
|
43
43
|
export default function (pi: ExtensionAPI): void {
|
|
44
|
-
const configPath = getConfigPath(getAgentDir());
|
|
45
|
-
const runtime = createRuntime(pi, configPath);
|
|
46
|
-
|
|
47
44
|
// Recursion guard: sub-agent children are leaf processes. The `subagent` tool is
|
|
48
45
|
// excluded from their toolset at spawn (--exclude-tools); this check is defense
|
|
49
46
|
// in depth so a child can never expose the tool back to its model, even if
|
|
@@ -58,6 +55,9 @@ export default function (pi: ExtensionAPI): void {
|
|
|
58
55
|
return;
|
|
59
56
|
}
|
|
60
57
|
|
|
58
|
+
const configPath = getConfigPath(getAgentDir());
|
|
59
|
+
const runtime = createRuntime(pi, configPath);
|
|
60
|
+
|
|
61
61
|
pi.registerMessageRenderer("subagent-result", (message, _options, theme) =>
|
|
62
62
|
new Text(
|
|
63
63
|
`${theme.fg("toolTitle", theme.bold("subagent result"))}\n${message.content}`,
|
|
@@ -72,7 +72,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
// One dispatcher serves both delegation tools, so a workflow node is an
|
|
75
|
-
// ordinary managed run: same
|
|
75
|
+
// ordinary managed run: same lifecycle ownership, admission, isolation, and
|
|
76
76
|
// durable checkpointing.
|
|
77
77
|
const dispatchCore = createDispatchCore(runtime);
|
|
78
78
|
registerSubagentTool(pi, runtime, dispatchCore);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ferris1225/pi-subagents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "A managed sub-agent team for pi: research, implementation, independent review, interactive follow-ups, and Git worktree isolation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,6 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"index.ts",
|
|
27
27
|
"src",
|
|
28
|
-
"skills",
|
|
29
|
-
"workflows",
|
|
30
28
|
"README.md",
|
|
31
29
|
"CHANGELOG.md",
|
|
32
30
|
"LICENSE"
|
|
@@ -34,9 +32,6 @@
|
|
|
34
32
|
"pi": {
|
|
35
33
|
"extensions": [
|
|
36
34
|
"./index.ts"
|
|
37
|
-
],
|
|
38
|
-
"skills": [
|
|
39
|
-
"./skills"
|
|
40
35
|
]
|
|
41
36
|
},
|
|
42
37
|
"scripts": {
|
|
@@ -30,8 +30,8 @@ function migrateField(value: unknown, key: string): boolean {
|
|
|
30
30
|
return true;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
|
|
33
|
+
/** Retained graph nodes keep their original briefs, ids, and dependencies. */
|
|
34
|
+
function migrateStoredWorkflowRoles(value: unknown): boolean {
|
|
35
35
|
const nodes = Array.isArray(value) ? value : value && typeof value === "object" ? (value as { nodes?: unknown }).nodes : undefined;
|
|
36
36
|
if (!Array.isArray(nodes)) return false;
|
|
37
37
|
let changed = false;
|
|
@@ -53,12 +53,14 @@ function roleModel(ctx: ExtensionContext, config: SubagentsConfig, name: string)
|
|
|
53
53
|
/** One row per role: every model and thinking choice stays visible together. */
|
|
54
54
|
function roleRows(ctx: ExtensionContext, config: SubagentsConfig): RoleGridRow[] {
|
|
55
55
|
const mainRef = currentModelRef(ctx) ?? "Pi default";
|
|
56
|
+
const models = availableModelsInScope(ctx);
|
|
56
57
|
return BUILTIN_AGENT_NAMES.map((name) => {
|
|
57
58
|
const profile = agentProfile(name)!;
|
|
58
59
|
const selected = config.agentModels[name];
|
|
59
|
-
const
|
|
60
|
+
const model = findModelByRef(models, selected);
|
|
61
|
+
const available = !selected || Boolean(model);
|
|
60
62
|
const preferred = config.agentThinkingLevels[name] ?? roleThinkingLevel(name);
|
|
61
|
-
const effective = resolveThinkingLevel(
|
|
63
|
+
const effective = resolveThinkingLevel(model ?? ctx.model, preferred);
|
|
62
64
|
const clamped = effective !== preferred ? " (" + preferred + " requested)" : "";
|
|
63
65
|
const overridden = Boolean(config.agentThinkingLevels[name]);
|
|
64
66
|
return {
|