pi-subagents 0.81.0 → 0.82.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 +55 -0
- package/README.md +1 -1
- package/bundle/agents.js +3 -3
- package/bundle/child-tool-plan.js +2 -2
- package/bundle/{chunk-L5ZHE4L4.js → chunk-3JCDWF4V.js} +4 -4
- package/bundle/{chunk-LSRUTHT7.js → chunk-43SCHIMD.js} +1 -1
- package/bundle/{chunk-VJHOELQP.js → chunk-46XKCPJR.js} +193 -81
- package/bundle/{chunk-G5DKFLLI.js → chunk-4SDU2BZX.js} +15 -10
- package/bundle/{chunk-2ZSNH26H.js → chunk-4Y2ROR7L.js} +7 -7
- package/bundle/{chunk-V2JWDB5U.js → chunk-52UBALJL.js} +2 -2
- package/bundle/{chunk-3DC5KBVP.js → chunk-5TYMSZX3.js} +1 -1
- package/bundle/{chunk-NNLASTQE.js → chunk-6XJB7PIX.js} +20 -6
- package/bundle/{chunk-ZBC44JJ3.js → chunk-CIZQXJ5Q.js} +22 -9
- package/bundle/{chunk-KSWQVGDW.js → chunk-FXUXCX2K.js} +225 -18
- package/bundle/{chunk-563BHAZ5.js → chunk-G4GZD3OJ.js} +35 -26
- package/bundle/{chunk-ARRKBB2B.js → chunk-GJECHSAR.js} +2 -2
- package/bundle/{chunk-V3BIUPLU.js → chunk-IVAE5Z6Q.js} +256 -52
- package/bundle/{chunk-V6MR5TOQ.js → chunk-JYUKW2SY.js} +25 -19
- package/bundle/{chunk-BJN5LUQY.js → chunk-OYF6AFDY.js} +1 -1
- package/bundle/{chunk-CEKS3TFO.js → chunk-PBK2I7WY.js} +6 -6
- package/bundle/{chunk-TUWLXTAM.js → chunk-PDZWJCHD.js} +681 -320
- package/bundle/{chunk-EYNJ6VL6.js → chunk-PLCCBLPY.js} +2 -2
- package/bundle/{chunk-XMFLCKMQ.js → chunk-QE4AGIMG.js} +339 -132
- package/bundle/{chunk-74RT5YQE.js → chunk-RMQFMMAT.js} +123 -33
- package/bundle/{chunk-WSBNENFS.js → chunk-UCPP4GNU.js} +14 -4
- package/bundle/{chunk-2XYWN7QJ.js → chunk-UTT254JE.js} +2 -2
- package/bundle/{chunk-BPS2AGBZ.js → chunk-VSUSLDNW.js} +93 -52
- package/bundle/{chunk-ZP3HODFH.js → chunk-XSWOTIA3.js} +1 -1
- package/bundle/{chunk-3IF2PGW7.js → chunk-YKEWIB4M.js} +1 -1
- package/bundle/{chunk-26C3WLYQ.js → chunk-ZIV4J4HG.js} +498 -274
- package/bundle/control-channel.js +2 -2
- package/bundle/index.js +1 -1
- package/bundle/intercom-bridge.js +2 -2
- package/bundle/preflight.js +8 -8
- package/bundle/project-panes.js +3 -3
- package/docs/agents.md +37 -7
- package/docs/configuration.md +9 -1
- package/docs/tool-reference.md +3 -1
- package/docs/workflows.md +16 -0
- package/package.json +2 -2
- package/skills/council-mode/SKILL.md +1 -4
- package/skills/pi-subagents/SKILL.md +130 -107
- package/skills/pi-subagents/references/orchestration.md +124 -0
- package/skills/pi-subagents/references/prompting-and-roles.md +96 -295
- package/src/agents/agent-management.js +3 -3
- package/src/agents/agent-memory.js +3 -1
- package/src/agents/agents.js +6 -6
- package/src/agents/frontmatter.d.ts +2 -0
- package/src/agents/frontmatter.js +15 -1
- package/src/agents/skills.js +2 -1
- package/src/extension/config.js +3 -0
- package/src/extension/herdr-pi-bridge.js +17 -10
- package/src/extension/index.js +82 -2
- package/src/extension/reply-workflow-script.js +5 -2
- package/src/extension/schemas.js +3 -3
- package/src/extension/subagent-guide.js +1 -2
- package/src/intercom/native-supervisor-channel.js +20 -0
- package/src/missions/lifecycle.js +7 -1
- package/src/runs/background/active-async-capacity.d.ts +1 -0
- package/src/runs/background/active-async-capacity.js +9 -3
- package/src/runs/background/async-execution.js +20 -10
- package/src/runs/background/async-job-tracker.d.ts +6 -1
- package/src/runs/background/async-job-tracker.js +9 -4
- package/src/runs/background/async-status.d.ts +4 -0
- package/src/runs/background/async-status.js +22 -3
- package/src/runs/background/await-async-run.js +3 -7
- package/src/runs/background/boot-id.d.ts +12 -0
- package/src/runs/background/boot-id.js +47 -0
- package/src/runs/background/interrupted-elsewhere.d.ts +22 -0
- package/src/runs/background/interrupted-elsewhere.js +68 -0
- package/src/runs/background/notify.d.ts +2 -0
- package/src/runs/background/notify.js +13 -0
- package/src/runs/background/result-delivery-ownership.d.ts +6 -0
- package/src/runs/background/result-delivery-ownership.js +19 -1
- package/src/runs/background/result-watcher.d.ts +3 -1
- package/src/runs/background/result-watcher.js +24 -8
- package/src/runs/background/run-child-session.d.ts +1 -6
- package/src/runs/background/run-child-session.js +1 -1
- package/src/runs/background/run-status.js +2 -1
- package/src/runs/background/stale-run-reconciler.d.ts +25 -0
- package/src/runs/background/stale-run-reconciler.js +52 -13
- package/src/runs/background/subagent-runner-bootstrap.js +3 -0
- package/src/runs/background/subagent-runner.d.ts +4 -0
- package/src/runs/background/subagent-runner.js +13 -5
- package/src/runs/background/subagent-wait.d.ts +1 -1
- package/src/runs/background/subagent-wait.js +6 -1
- package/src/runs/background/terminal-run-index.d.ts +2 -0
- package/src/runs/background/terminal-run-index.js +44 -3
- package/src/runs/foreground/async-stop-action.js +3 -1
- package/src/runs/foreground/execution.js +6 -3
- package/src/runs/foreground/foreground-history.d.ts +16 -2
- package/src/runs/foreground/foreground-history.js +133 -31
- package/src/runs/foreground/subagent-executor.d.ts +11 -0
- package/src/runs/foreground/subagent-executor.js +277 -74
- package/src/runs/shared/child-launch.d.ts +2 -2
- package/src/runs/shared/child-session.d.ts +3 -2
- package/src/runs/shared/child-session.js +51 -8
- package/src/runs/shared/child-tool-plan.d.ts +7 -0
- package/src/runs/shared/child-tool-plan.js +21 -6
- package/src/runs/shared/herdr-connection.d.ts +17 -8
- package/src/runs/shared/herdr-connection.js +19 -7
- package/src/runs/shared/herdr-external-adapters.d.ts +3 -2
- package/src/runs/shared/herdr-external-adapters.js +1 -1
- package/src/runs/shared/herdr-machine.d.ts +12 -2
- package/src/runs/shared/herdr-machine.js +55 -9
- package/src/runs/shared/herdr-pane-host.d.ts +88 -0
- package/src/runs/shared/herdr-pane-host.js +155 -0
- package/src/runs/shared/herdr-placed-run.d.ts +27 -150
- package/src/runs/shared/herdr-placed-run.js +48 -395
- package/src/runs/shared/local-machine-access.d.ts +5 -0
- package/src/runs/shared/local-machine-access.js +28 -0
- package/src/runs/shared/orca-progress-tabs.d.ts +0 -1
- package/src/runs/shared/orca-progress-tabs.js +1 -24
- package/src/runs/shared/parallel-utils.d.ts +1 -1
- package/src/runs/shared/placed-run-owner.d.ts +49 -0
- package/src/runs/shared/placed-run-owner.js +93 -0
- package/src/runs/shared/placement-host.d.ts +99 -0
- package/src/runs/shared/placement-host.js +157 -0
- package/src/runs/shared/rex-machine.d.ts +25 -0
- package/src/runs/shared/rex-machine.js +83 -0
- package/src/runs/shared/rex-pane-host.d.ts +62 -0
- package/src/runs/shared/rex-pane-host.js +327 -0
- package/src/shared/completion-owner.d.ts +5 -0
- package/src/shared/completion-owner.js +5 -0
- package/src/shared/session-identity.d.ts +2 -0
- package/src/shared/session-identity.js +26 -0
- package/src/shared/types.d.ts +45 -6
- package/src/tui/fleet.d.ts +1 -0
- package/src/tui/fleet.js +25 -15
- package/src/tui/render.d.ts +6 -0
- package/src/tui/render.js +3 -3
- package/src/tui/subagent-messages.js +1 -0
- package/src/workflows/scripted-workflow.d.ts +1 -1
- package/src/workflows/workflow-auto-resume.d.ts +32 -0
- package/src/workflows/workflow-auto-resume.js +102 -0
- package/src/workflows/workflow-launch-record.d.ts +27 -0
- package/src/workflows/workflow-launch-record.js +48 -0
- package/src/workflows/workflow-resume-claim.d.ts +82 -0
- package/src/workflows/workflow-resume-claim.js +210 -0
- package/src/workflows/workflow-resume.d.ts +56 -0
- package/src/workflows/workflow-resume.js +106 -0
- package/src/workflows/workflow-reuse.d.ts +15 -9
- package/src/workflows/workflow-reuse.js +77 -14
- package/src/workflows/workflow-revival.d.ts +2 -0
- package/src/workflows/workflow-revival.js +2 -1
- package/src/workflows/workflow-stop-cause.d.ts +6 -0
- package/src/workflows/workflow-stop-cause.js +8 -0
- package/skills/pi-subagents/references/constraints-and-recipes.md +0 -74
- package/skills/pi-subagents/references/execution-controls.md +0 -563
- package/skills/pi-subagents/references/management-authoring-rpc.md +0 -165
- package/skills/pi-subagents/references/multi-lane-orchestration.md +0 -61
- package/skills/pi-subagents/references/review-and-validation.md +0 -73
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Orchestration
|
|
2
|
+
|
|
3
|
+
Use this when several tasks need coordinated children, worktrees, or
|
|
4
|
+
repositories, or when a change goes through write, review, and fix rounds.
|
|
5
|
+
Create lanes only after delegation is operator-authorized and each lane
|
|
6
|
+
materially improves evidence, independent review, specialization, useful
|
|
7
|
+
parallelism, or isolated execution. Keep dependent work serial.
|
|
8
|
+
|
|
9
|
+
## Recipes
|
|
10
|
+
|
|
11
|
+
Recipes select a shape; they do not authorize delegation. Pick the smallest:
|
|
12
|
+
|
|
13
|
+
- **Recon then implement:** one focused `scout`, then one `worker` that gets its findings.
|
|
14
|
+
- **Implementation:** settle scope and acceptance first, then use a scout, writer, or fresh reviewer only where that stage earns its overhead. Split large work into serial milestones, not a writer swarm.
|
|
15
|
+
- **Parallel analysis:** fan out only independent read, review, or validation work, or give each writer its own worktree.
|
|
16
|
+
|
|
17
|
+
## Seams before writers
|
|
18
|
+
|
|
19
|
+
Before launching a writer for substantial mutation work, classify it as
|
|
20
|
+
**single-seam** or **multi-seam**. Two or more independently testable
|
|
21
|
+
contracts or source boundaries make it multi-seam. One PR does not imply one
|
|
22
|
+
writer.
|
|
23
|
+
|
|
24
|
+
- **Multi-seam:** give each component writer exclusive file or contract
|
|
25
|
+
ownership, a focused gate, and a committed or otherwise durable handoff.
|
|
26
|
+
Start one integration-only owner after those handoffs are ready. Repartition
|
|
27
|
+
any writer brief that owns all major outcomes across independent boundaries.
|
|
28
|
+
- **Single-seam:** one writer is right when the work is one coupled seam, or
|
|
29
|
+
when splitting would create overlapping ownership or artificial handoffs.
|
|
30
|
+
Record that evidence. Do not split coupled work to raise the lane count.
|
|
31
|
+
|
|
32
|
+
## Lane board
|
|
33
|
+
|
|
34
|
+
Before more than one mutation-capable lane starts, record in the parent:
|
|
35
|
+
|
|
36
|
+
`Lane | repo/cwd | decision | owned files or contract | isolation path | authority | next gate | handoff | why independent`
|
|
37
|
+
|
|
38
|
+
One source seam or decision is one lane. Record each lane's delivery target,
|
|
39
|
+
allowed actions, validation, and review rigor. For cross-repository work,
|
|
40
|
+
name the shared contract and which repository changes first. A blocked
|
|
41
|
+
decision is a lane state: owner, options, recommended default, and the
|
|
42
|
+
evidence needed to continue.
|
|
43
|
+
|
|
44
|
+
Mutation lanes need distinct isolation paths and explicit `cwd` values.
|
|
45
|
+
`worktree: true` branches from `HEAD` (or `baseRef`) and refuses a dirty
|
|
46
|
+
checkout; in a shared or dirty checkout, commit first or give each lane a
|
|
47
|
+
worktree you created. Use one async workflow for a coordinated wave:
|
|
48
|
+
`runs.all` for independent lanes, `runs.run` for dependent stages, repo slug
|
|
49
|
+
or lane key in every child key and output path.
|
|
50
|
+
|
|
51
|
+
While one lane waits, run safe independent preparation, validation, or
|
|
52
|
+
read-only review. When only async lanes remain, record what reopens work and
|
|
53
|
+
yield; completion wakes the parent.
|
|
54
|
+
|
|
55
|
+
## Review loop
|
|
56
|
+
|
|
57
|
+
1. Inspect the source, diff, issue, or plan directly.
|
|
58
|
+
2. One writer implements inside its boundary and runs focused validation that can fail for the changed behavior.
|
|
59
|
+
3. When the delegation contract calls for independent review, fresh-context read-only reviewers inspect the actual worktree. Otherwise parent inspection is enough; skip review for trivial wording, renames, or local probes.
|
|
60
|
+
4. The parent classifies findings (below) and sends accepted fixes to one writer: resume the original worker with its latest run id, or launch one forked `worker` as `/review-loop` does.
|
|
61
|
+
5. Re-run affected validation and review only the changed blast radius.
|
|
62
|
+
6. Stop when no blocker or fix worth doing now remains, an unapproved product, scope, or architecture decision appears, or the round cap is reached (default 3). Do not loop for polish. Children never decide the loop outcome.
|
|
63
|
+
|
|
64
|
+
An async writer's handoff is an intermediate state, not completion, unless the
|
|
65
|
+
user asked for writer-only work.
|
|
66
|
+
|
|
67
|
+
| Situation | Review shape |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| One coherent diff or risk | one reviewer |
|
|
70
|
+
| Independent risks (correctness, tests, security, UI) | parallel reviewers with distinct contracts |
|
|
71
|
+
| Possible over-scope | same-writer challenge before fresh review |
|
|
72
|
+
| Material design tradeoff | council mode |
|
|
73
|
+
|
|
74
|
+
### Staged fixes
|
|
75
|
+
|
|
76
|
+
When reviews have produced findings across several clusters:
|
|
77
|
+
|
|
78
|
+
1. Run a read-only planning fanout, one reviewer per cluster or angle, each returning exact files, lines, fixes, and validation.
|
|
79
|
+
2. Classify the accepted fixes as single-seam or multi-seam (above) on the lane board before any writer starts.
|
|
80
|
+
3. Give a writer only its assigned stage. Pass each earlier result into the later task by variable or by its declared `output` path, not as a whole aggregate blob. With `runs.lanes`, keep stages narrow: red test, helper change, one render seam, validation, review.
|
|
81
|
+
4. Validate the integrated result with fresh read-only reviewers on distinct angles.
|
|
82
|
+
|
|
83
|
+
When a child returns a target list, validate it in JavaScript and map bounded
|
|
84
|
+
entries into `runs.all`.
|
|
85
|
+
|
|
86
|
+
## Finding disposition
|
|
87
|
+
|
|
88
|
+
Classify each finding against the current head:
|
|
89
|
+
|
|
90
|
+
- **Valid blocker:** concrete failure, repro, security issue, contract mismatch, or source-proven regression. Fix now.
|
|
91
|
+
- **Valid non-blocker:** real but outside the slice. Record or defer.
|
|
92
|
+
- **Stale:** already fixed or absent. Cite current evidence.
|
|
93
|
+
- **Invalid:** contradicted by source, tests, docs, or approved scope. Cite it.
|
|
94
|
+
- **Out of scope or policy:** needs an unapproved product, architecture, authority, or release decision. Escalate.
|
|
95
|
+
- **Speculative:** no contract, repro, or reachable failure. Do not block.
|
|
96
|
+
|
|
97
|
+
Classify bot comments the same way before assigning severity.
|
|
98
|
+
|
|
99
|
+
## Gate failures
|
|
100
|
+
|
|
101
|
+
1. Confirm the run belongs to the exact head under judgment.
|
|
102
|
+
2. Read the focused failing log; name the failing test, assertion, or contract.
|
|
103
|
+
3. Classify: current diff, stale test, environment, or existing flake.
|
|
104
|
+
4. Reproduce with the narrowest command when practical.
|
|
105
|
+
5. Patch forward when the diff caused it. For a stale or flaky failure, collect proof before one rerun.
|
|
106
|
+
6. Re-run the affected command or exact-head gate after every fix.
|
|
107
|
+
|
|
108
|
+
## Handoff and cleanup
|
|
109
|
+
|
|
110
|
+
A handoff states lane status, repository and worktree, changed files,
|
|
111
|
+
validation, open decisions, next action, and artifact or receipt paths. Copy
|
|
112
|
+
only final evidence to memory, a mission, a PR, or an approved docs path, then
|
|
113
|
+
remove scratch reports from the worktree.
|
|
114
|
+
|
|
115
|
+
Keep a worktree until its handoff is durable, no run owns it, and no later
|
|
116
|
+
gate needs it. If a run stops or needs attention, preserve its worktree and
|
|
117
|
+
artifacts, then resume that run or start one replacement lane from the
|
|
118
|
+
handoff. Never start a second writer while worktree ownership is unclear.
|
|
119
|
+
|
|
120
|
+
Before reporting done, check the board: every lane terminal or blocked with a
|
|
121
|
+
named next action; one writer per worktree; required validation and fresh
|
|
122
|
+
review done; accepted findings fixed and revalidated; publication authority
|
|
123
|
+
present before any push, comment, merge, or release; residual risks and
|
|
124
|
+
skipped checks stated.
|
|
@@ -1,297 +1,98 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
This file is a detailed reference loaded from `skills/pi-subagents/SKILL.md`.
|
|
4
|
-
|
|
5
|
-
## Capability ceilings
|
|
6
|
-
|
|
7
|
-
Parent extensions may register a session-scoped, out-of-band ceiling through `pi-subagents/capability-ceiling`. Child tools and eligible canonical agent names are intersected with every active registration and inherited snapshot; `denyExtensions` removes ambient/provider extension loading while retaining package protocol runtime. `{ action: "list" }` marks non-allowlisted agents as restricted, and launch rejects them before spawn. Do not add a model-visible ceiling field or rely on unrestricted role selection for enforcement. Restricted schedules are rejected until their ceiling can be persisted safely.
|
|
8
|
-
|
|
9
|
-
## When to Use
|
|
1
|
+
# Prompting and Roles
|
|
10
2
|
|
|
11
3
|
All launch guidance below assumes delegation was requested by the operator in
|
|
12
|
-
the current request or applicable user/project instructions. Complexity
|
|
13
|
-
workflow fit
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- `/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
### Gather-context-and-clarify technique
|
|
111
|
-
|
|
112
|
-
Use this when the operator requests delegated context gathering. Launch `scout` for local context and `researcher` only when external docs, recent sources, ecosystem context, or primary evidence would materially improve understanding. Ask children for concise findings plus remaining clarification questions. Then synthesize what is known and use `interview` to ask the unresolved questions needed for shared understanding before planning or implementing.
|
|
113
|
-
|
|
114
|
-
### Parallel cleanup technique
|
|
115
|
-
|
|
116
|
-
Use this after implementation when the user or applicable instructions request delegated cleanup review. Launch two fresh-context `reviewer` tasks with `output: false` and `progress: false`: one deslop pass and one verbosity pass. If the `deslop` or `verbosity-cleaner` skills are available, pass the relevant skill to that reviewer; otherwise inline the criteria. Both reviewers are review-only and should flag concrete issues with severity, file/line references, and smallest safe fixes. Phrase the constraint as “Do not modify project/source files; returning findings through the configured output artifact is allowed” when you use `output` or `outputMode: "file-only"`. The parent decides what to apply and asks before making changes unless cleanup was already authorized.
|
|
117
|
-
|
|
118
|
-
### Staged fix orchestration technique
|
|
119
|
-
|
|
120
|
-
Use this when a broad diff has known reviewer findings across several items and the user wants the parent to “orchestrate subagents like a boss.” Keep mutation ownership explicit in the workflow script:
|
|
121
|
-
|
|
122
|
-
When staged seams are available, a low-tier writer should not receive the
|
|
123
|
-
end-to-end issue. Use `runs.lanes` inside the workflow script to keep stages narrow:
|
|
124
|
-
a scout/red test, helper-only change, one render seam, validation, minimality
|
|
125
|
-
challenge, or fresh review. Give the writer only its assigned implementation
|
|
126
|
-
stage; keep sequencing and synthesis with the parent.
|
|
127
|
-
|
|
128
|
-
1. A parallel read-only planning fanout, one reviewer per issue cluster or review angle. Each child inspects the real diff and returns exact files, line refs, proposed fixes, and focused validation. They must not edit.
|
|
129
|
-
2. Classify the accepted fixes on the lane board before writer launch. If issue clusters are independently testable source or contract boundaries, use isolated component writers with exclusive file/contract ownership and focused gates. Each component must commit or produce another durable handoff; only after those handoffs are ready, start one integration-only owner.
|
|
130
|
-
3. Use one writer for the complete fix only when the accepted fixes are one tightly coupled existing diff/seam and the lane board records evidence that splitting would create overlapping ownership or artificial handoffs. Give that writer the planning summaries, accepted scope, stop rules, and verification contract.
|
|
131
|
-
4. Run fresh-context, read-only validation against the integrated or single-seam result. Validators use distinct angles and report pass/fail, remaining blockers, and missing verification.
|
|
132
|
-
|
|
133
|
-
Prefer `async: true`, `context: "fresh"` for reviewers/validators, `outputMode: "file-only"` for large summaries, and per-stage output names that will not collide. Use stable `runs` keys plus `phase` and `label` on each launch item to make async status readable, and hold each awaited result in an ordinary JavaScript variable when a later step needs that specific result — interpolate it (or the durable output path you declared for that child) into the later task text instead of passing a whole aggregate blob. Use this pattern instead of launching several writer workers into a dirty worktree. Include non-blocking suggestions in the writer prompt only when they are small, safe, and do not expand product scope; otherwise record them as deferred.
|
|
134
|
-
|
|
135
|
-
When one child returns a structured target list, use ordinary JavaScript to validate/filter it and map bounded entries into `runs.all`; do not use the removed chain fanout DSL.
|
|
136
|
-
|
|
137
|
-
Single-seam example shape (the lane board records that these are review angles on one tightly coupled deployment-lifecycle diff, not independent implementation contracts):
|
|
138
|
-
|
|
139
|
-
```js workflow
|
|
140
|
-
// Stage 1: parallel read-only review angles on one recorded single seam
|
|
141
|
-
const plans = await runs.all([
|
|
142
|
-
{ key: "correctness-plan", agent: "reviewer", phase: "Planning", label: "Review lifecycle correctness", task: "Plan correctness fixes for the same deployment-lifecycle diff. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "plans/correctness.md", outputMode: "file-only" },
|
|
143
|
-
{ key: "regression-plan", agent: "reviewer", phase: "Planning", label: "Review lifecycle regressions", task: "Plan regression coverage for the same deployment-lifecycle diff. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "plans/regressions.md", outputMode: "file-only" },
|
|
144
|
-
{ key: "minimality-plan", agent: "reviewer", phase: "Planning", label: "Review lifecycle minimality", task: "Plan minimality fixes for the same deployment-lifecycle diff. Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "plans/minimality.md", outputMode: "file-only" }
|
|
145
|
-
]);
|
|
146
|
-
|
|
147
|
-
// Stage 2: one writer for this lane-board-recorded single seam.
|
|
148
|
-
// Under outputMode "file-only" the awaited .output is the saved-output
|
|
149
|
-
// reference, so pass those managed artifact references to the writer.
|
|
150
|
-
const worker = await runs.run("apply-fixes", {
|
|
151
|
-
agent: "worker",
|
|
152
|
-
phase: "Implementation",
|
|
153
|
-
label: "Apply accepted fixes",
|
|
154
|
-
task: "Apply only the accepted fixes to the one deployment-lifecycle seam. The lane board records that splitting this existing diff would create overlapping ownership. You are the sole writer for this seam. Run focused validation and report changed files, commands, failures, and remaining issues.\n\nCorrectness plan: " + plans[0].output + "\n\nRegression plan: " + plans[1].output + "\n\nMinimality plan: " + plans[2].output,
|
|
155
|
-
output: "worker/fixes.md",
|
|
156
|
-
outputMode: "file-only"
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
// Stage 3: parallel read-only validation fanout
|
|
160
|
-
const validations = await runs.all([
|
|
161
|
-
{ key: "validate-behavior", agent: "reviewer", phase: "Validation", label: "Validate lifecycle behavior", task: "Validate behavior in the post-worker deployment-lifecycle diff. Start from the worker result: " + worker.output + ". Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "validation/behavior.md", outputMode: "file-only" },
|
|
162
|
-
{ key: "validate-minimality", agent: "reviewer", phase: "Validation", label: "Validate lifecycle minimality", task: "Validate minimality in the same post-worker deployment-lifecycle diff. Start from the worker result: " + worker.output + ". Do not modify project/source files; returning findings via the configured output artifact is allowed.", output: "validation/minimality.md", outputMode: "file-only" }
|
|
163
|
-
]);
|
|
164
|
-
|
|
165
|
-
return { worker: worker.output, validations: validations.map(v => v.output) };
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
```typescript
|
|
169
|
-
subagent({ workflow: true, async: true, options: { context: "fresh" } })
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Builtin Agents
|
|
173
|
-
|
|
174
|
-
Builtin agents load at the lowest priority. Project agents override user agents,
|
|
175
|
-
and user/project agents override builtins with the same name.
|
|
176
|
-
|
|
177
|
-
| Agent | Purpose | Recommended tier | Typical output / role |
|
|
178
|
-
|-------|---------|-------|------------------------|
|
|
179
|
-
| `scout` | Fast codebase recon | fast worker/scout tier | Writes `context.md` handoff material |
|
|
180
|
-
| `worker` | Implementation and approved oracle handoffs | capable worker tier | Single-writer implementation with decision escalation |
|
|
181
|
-
| `reviewer` | Review specialist | strong reviewer tier; high thinking for serious reviews | Default recipes are review-only; tools include edit/write when a fix pass is explicit |
|
|
182
|
-
| `researcher` | Web research brief generator | inherits configured default | Writes `research.md` |
|
|
183
|
-
| `delegate` | Lightweight generic delegate | inherits configured default | No fixed output; generic delegated work |
|
|
184
|
-
| `oracle` | Rare hard-decision/root-cause escalation | top-reasoning critic tier, bounded read-only; high thinking escalation only | Advisory trajectory review, not routine code review |
|
|
185
|
-
| `advisor` | Compatibility alias for `oracle` | top-reasoning critic tier, bounded read-only; high thinking escalation only | Same advisory escalation role as `oracle` |
|
|
186
|
-
|
|
187
|
-
Builtin `worker` and `delegate` use strict tool allowlists and do not inherit ambient parent extension tools. To give a child an extension tool, name it in `tools` and load its provider via `extensions`, a path-like `tools` entry, or `subagentOnlyExtensions`. Agents without the corresponding field follow `subagents.defaultExtensions` or the ambient-preserving `subagents.defaultSubagentOnlyExtensions` when set.
|
|
188
|
-
|
|
189
|
-
Builtin agents inherit the current Pi default model unless a run, user setting, project setting, or `subagents.defaultModel` overrides `model`. The table records recommended tier routing, not shipped hard defaults; explicit run, user, or project settings still win. Keep the parent/orchestrator on the ordinary strong default model unless parent/user policy says otherwise. Override builtin defaults before copying full agent files when a small tweak is enough.
|
|
190
|
-
|
|
191
|
-
Set `subagents.defaultThinking` to apply a shared thinking level to builtin, package, user, and project agents whose frontmatter leaves `thinking` unset. Project settings win over user settings; matching `agentOverrides.<name>.thinking` and per-run overrides replace frontmatter, while an explicit frontmatter value remains in effect when no matching override is set. This setting affects child agents only and does not change the parent session's default thinking level.
|
|
192
|
-
|
|
193
|
-
```json
|
|
194
|
-
{
|
|
195
|
-
"subagents": {
|
|
196
|
-
"defaultThinking": "medium"
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
For one run, use inline config:
|
|
202
|
-
|
|
203
|
-
```text
|
|
204
|
-
/run reviewer[model=provider/review-model] "Review this diff"
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
For persistent tweaks, edit `subagents.agentOverrides` in user or project settings. User overrides apply everywhere. Project overrides apply only in that repo and win over user overrides. Use `/subagents-models` or `subagent({ action: "models" })` to inspect the live mapping after settings and overrides load.
|
|
208
|
-
|
|
209
|
-
Provider-scoped entries can layer on top of the default override for the active parent session provider. The provider is selected once from the parent model. Within each settings file, the provider entry wins per field; project settings still win over user settings.
|
|
210
|
-
|
|
211
|
-
```json
|
|
212
|
-
{
|
|
213
|
-
"subagents": {
|
|
214
|
-
"agentOverrides": {
|
|
215
|
-
"worker": { "thinking": "medium" }
|
|
216
|
-
},
|
|
217
|
-
"agentOverridesByProvider": {
|
|
218
|
-
"provider-a": {
|
|
219
|
-
"worker": { "model": "provider-a/fast-worker-model" }
|
|
220
|
-
},
|
|
221
|
-
"provider-b": {
|
|
222
|
-
"worker": { "model": "provider-b/fast-worker-model" }
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Model ids do not have to be exact. Separator variations (`fast.worker-v1` vs `fast-worker-v1`), case (`Strong-Review-Model`), and optional trailing date stamps all resolve to the same registry model. Exact `provider/id` wins; a qualified `provider/model` never switches providers. To constrain subagents to a budget or compliance profile, set `subagents.modelScope: { enforce: true, allow: ["approved-provider/*", "second-provider/approved-*"] }` in user or project settings. Out-of-scope models you pass explicitly error and abort; models inherited from frontmatter, `subagents.defaultModel`, agent frontmatter, or the parent session only warn.
|
|
230
|
-
|
|
231
|
-
For model fleets, use the profile commands instead of hand-editing repeated overrides: `/subagents-refresh-provider-models <provider>`, `/subagents-generate-profiles <provider>`, `/subagents-load-profile <name>`, and `/subagents-check-profile <name>`. Profiles live under `~/.pi/agent/profiles/pi-subagents/` and replace only `settings.subagents` when loaded.
|
|
232
|
-
|
|
233
|
-
## Prompting role subagents
|
|
234
|
-
|
|
235
|
-
Builtin role agents inherit the current Pi default model unless you override them. When launching them, write the task prompt as a compact contract, not a long procedural script. Define the destination and let the role choose the efficient path.
|
|
236
|
-
|
|
237
|
-
A strong subagent prompt usually includes:
|
|
238
|
-
- **Goal**: the concrete outcome the child should produce.
|
|
239
|
-
- **Target**: repository, explicit `cwd`, branch/ref/head, and source seam when the target is not the parent cwd.
|
|
240
|
-
- **Authority boundary**: whether the child may read, edit, commit, push, comment, close, merge, publish, or release. Omit or forbid actions that are not approved.
|
|
241
|
-
- **Context/evidence**: relevant plan paths, files, diffs, decisions, or user constraints already approved.
|
|
242
|
-
- **Success criteria**: what must be true before the child can finish.
|
|
243
|
-
- **Hard constraints**: true invariants only, such as no edits for review-only tasks, one writer thread, child must not run subagents unless it is explicitly authorized through `tools: subagent` or `allowNestedSubagents: true`, or escalation for unapproved decisions.
|
|
244
|
-
- **Validation**: targeted checks to run, or the next-best check when validation is impossible.
|
|
245
|
-
- **Output**: the expected summary shape, artifact path, or finding format. Use managed artifact paths for scratch reports; reserve repo-qualified absolute paths for durable handoffs that the user approved.
|
|
246
|
-
- **Stop rules**: when to ask via `intercom` or `contact_supervisor`, when to stop after enough evidence, and when not to keep searching.
|
|
247
|
-
|
|
248
|
-
Give each role useful discovery anchors. Name source roots, filenames, symbols, types, methods, and paths for scouts. Give workers context files, plans, task paths, and named source seams before asking them to search. Give reviewers changed files, contracts, and any exhaustive-verification target. Tell oracle whether current source behavior, product/policy documents, plans, or inherited decisions are the evidence that matters.
|
|
249
|
-
|
|
250
|
-
Avoid carrying over old prompt habits that over-specify every step. Use `must`, `always`, and `never` for real invariants; for judgment calls, give decision rules. For example, tell a reviewer to inspect the staged diff directly and report only evidence-backed findings, rather than prescribing every file or command. Tell a researcher the retrieval budget: start with broad targeted searches, fetch only the strongest sources, search again only when a required fact is missing, then stop.
|
|
251
|
-
|
|
252
|
-
For implementation handoffs, name the approved scope and success criteria more clearly than the process. Good prompts say what to change, what not to change, where the evidence lives, how to validate, and when to escalate. They should not ask the child to create another subagent plan or continue the parent conversation.
|
|
253
|
-
|
|
254
|
-
Settings locations:
|
|
255
|
-
- User scope: `~/.pi/agent/settings.json`
|
|
256
|
-
- Project scope: `.pi/settings.json`
|
|
257
|
-
|
|
258
|
-
Direct settings example:
|
|
259
|
-
|
|
260
|
-
```json
|
|
261
|
-
{
|
|
262
|
-
"subagents": {
|
|
263
|
-
"agentOverrides": {
|
|
264
|
-
"reviewer": {
|
|
265
|
-
"model": "provider/strong-review-model",
|
|
266
|
-
"thinking": "high",
|
|
267
|
-
"acceptanceRole": "read-only"
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Useful override fields: `description`, `model`, `thinking`,
|
|
275
|
-
`systemPromptMode`, `inheritProjectContext`, `inheritGlobalContext`, `inheritSkills`, `defaultContext`,
|
|
276
|
-
`acceptanceRole`, `disabled`, `skills`, `tools`, `extensions`, and `systemPrompt`.
|
|
277
|
-
`description` replaces the discovered description for builtin and custom agents
|
|
278
|
-
in `list` output, which is useful for deployment-specific routing notes.
|
|
279
|
-
Use `acceptanceRole: false` to clear an override. Create a user or project
|
|
280
|
-
agent with the same name only when you want a substantially different agent.
|
|
281
|
-
|
|
282
|
-
### Recommended model tiering (optional)
|
|
283
|
-
|
|
284
|
-
Keep the parent/orchestrator on the ordinary strong default model because omission failures are cheaper than unnecessary commissions. Route workers and scouts to a fast, capable worker tier, and keep serious reviews on the strong reviewer tier at high thinking. Do not use `oracle` or a top-reasoning model as the routine fresh-review default. Use that tier only for bounded, read-only critic/oracle/root-cause audits after ordinary review, CI, bot, or source evidence is insufficient; critic-tier high thinking is escalation-only and never an autonomous root. Explicit parent/user model policy wins over these recommendations.
|
|
285
|
-
|
|
286
|
-
Examples are illustrative, not requirements. Map these tiers to concrete models in user/project settings or a profile. A non-OpenAI setup should choose comparable available models by capability.
|
|
287
|
-
|
|
288
|
-
Each child launch uses one resolved model exactly once. If quota or availability fails, surface that failure and let the parent or operator explicitly launch a later attempt with another model. Forked children keep their requested thinking level even when provider-specific reasoning blocks are stripped from the inherited transcript.
|
|
289
|
-
|
|
290
|
-
If a provider rejects model IDs with thinking suffixes, use
|
|
291
|
-
`subagents.disableThinking: true` in user or project settings to clear bundled
|
|
292
|
-
builtin thinking defaults globally. A higher-precedence per-agent `thinking`
|
|
293
|
-
override can opt one builtin back in or replace custom-agent frontmatter thinking.
|
|
294
|
-
|
|
295
|
-
Set `subagents.defaultExtensions` to give agents without an `extensions` field a shared child extension allowlist. Omit it to preserve ambient extension discovery, set it to `[]` to disable ambient extensions by default, or use `agentOverrides.<name>.extensions` for one agent. Set `subagents.defaultSubagentOnlyExtensions` to add shared child-only paths without disabling ambient discovery. For either field, explicit frontmatter suppresses the default and a matching override replaces or false-clears it; lists are not combined.
|
|
296
|
-
|
|
297
|
-
Tool description modes live in `~/.pi/agent/extensions/subagent/config.json`, not `subagents` settings. The default uses a short tool description plus an active `promptSnippet`. Set `toolDescriptionMode` to `full` or `compact` to force one description string, or `custom` to read `subagent-tool-description.md` from the project config dir or agent dir; invalid custom files fall back to full mode and the safety guidance is still appended.
|
|
4
|
+
the current request or applicable user/project instructions. Complexity and
|
|
5
|
+
workflow fit choose a shape after that; they do not authorize a launch.
|
|
6
|
+
|
|
7
|
+
## Roles
|
|
8
|
+
|
|
9
|
+
| Agent | Use for | Default context | Tier |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| `scout` | Codebase recon | fresh | fast |
|
|
12
|
+
| `worker` | Implementation, the single writer | fresh | fast capable |
|
|
13
|
+
| `reviewer` | Code and plan review; read-only (send fixes to `worker`) | fresh | strong, high thinking for serious reviews |
|
|
14
|
+
| `researcher` | Web and primary-source research | fresh | default |
|
|
15
|
+
| `delegate` | Generic bounded task | fresh | default |
|
|
16
|
+
| `oracle` | Rare escalation on direction, drift, root cause, or hard tradeoffs | fork (fresh if the parent session is not persisted yet) | top reasoning, read-only |
|
|
17
|
+
|
|
18
|
+
Run `subagent({ action: "list" })` for project, user, and package agents;
|
|
19
|
+
project agents override user agents, which override builtins. `worker` and
|
|
20
|
+
`delegate` get only their listed tools; to give a child an extension tool,
|
|
21
|
+
name it in `tools` and load its extension (guide
|
|
22
|
+
`agents/tool-and-extension-selection`). Each launch uses one resolved model;
|
|
23
|
+
on a quota or availability failure, report it rather than picking another
|
|
24
|
+
model.
|
|
25
|
+
|
|
26
|
+
## Writing the brief
|
|
27
|
+
|
|
28
|
+
The SKILL.md brief checklist says what goes in. To make it work:
|
|
29
|
+
|
|
30
|
+
- Write a contract, not a script. Name the destination and let the role pick the path.
|
|
31
|
+
- Give discovery anchors: source roots, files, symbols, and paths for scouts; plans, task paths, and named seams for workers; changed files, contracts, and the verification target for reviewers; which evidence matters (source, policy docs, inherited decisions) for oracle.
|
|
32
|
+
- Use `must`, `always`, and `never` only for real invariants. For judgment calls, give a decision rule.
|
|
33
|
+
- Give researchers a retrieval budget: broad targeted searches, fetch only the strongest sources, search again only for a missing required fact, then stop.
|
|
34
|
+
- For implementation, state what to change, what not to change, where the evidence is, how to validate, and when to escalate. Never ask a child to plan more subagents or continue the parent conversation.
|
|
35
|
+
- When the user gives a URL, issue, PR, plan, or file, read it first and name it explicitly in every child task; fresh children cannot see the parent's history.
|
|
36
|
+
- Review-only children: "Do not modify project/source files; returning findings through the configured output artifact is allowed."
|
|
37
|
+
|
|
38
|
+
## Techniques
|
|
39
|
+
|
|
40
|
+
Packaged prompt shortcuts (`/parallel-review`, `/review-loop`,
|
|
41
|
+
`/parallel-research`, `/gather-context-and-clarify`, `/parallel-cleanup`,
|
|
42
|
+
`/council`) encode these. When the user describes one in words, run the same
|
|
43
|
+
shape directly with `subagent(...)`.
|
|
44
|
+
|
|
45
|
+
**Parallel review.** Fresh-context `reviewer` children, each with a distinct
|
|
46
|
+
angle drawn from the target (correctness and regressions, tests, simplicity;
|
|
47
|
+
adapt for security, UI, TypeScript, docs). Report only concrete current issues
|
|
48
|
+
with source proof, a test or repro, or a contract contradiction; for a diff,
|
|
49
|
+
the diff must cause or expose the issue. Label findings P0/P1/P2 and end with
|
|
50
|
+
`Merge verdict: BLOCK`, `OK`, or `OK with notes`. A follow-up review asks only
|
|
51
|
+
whether the named finding is fixed, whether the fix broke something nearby,
|
|
52
|
+
and whether earlier notes still stand. Bot comments are first classified
|
|
53
|
+
VALID, STALE, INVALID, or OUT-OF-POLICY against the current head.
|
|
54
|
+
|
|
55
|
+
**Review loop.** Writer, fresh reviewers, accepted fixes to one writer,
|
|
56
|
+
capped at 3 rounds. Details in [orchestration.md](orchestration.md#review-loop).
|
|
57
|
+
|
|
58
|
+
**Parallel research.** `researcher` for docs, specs, recent changes, and
|
|
59
|
+
primary sources, plus `scout` for local files, patterns, and integration
|
|
60
|
+
points. Ask for links or file ranges, confidence, gaps, and what the evidence
|
|
61
|
+
means for the decision.
|
|
62
|
+
|
|
63
|
+
**Gather context and clarify.** `scout` for local context, `researcher` only
|
|
64
|
+
when outside sources would change the answer. Then synthesize and ask the user
|
|
65
|
+
the open questions with `interview` before planning.
|
|
66
|
+
|
|
67
|
+
**Parallel cleanup.** After implementation, two fresh reviewers with
|
|
68
|
+
`output: false`: one deslop pass, one verbosity pass, using the `deslop` and
|
|
69
|
+
`verbosity-cleaner` skills when available. They flag issues with file and line
|
|
70
|
+
and the smallest fix; the parent decides what to apply.
|
|
71
|
+
|
|
72
|
+
**Skill specialists.** When `list` suggests skill subagents relevant to the
|
|
73
|
+
requested handoff, launch at most one or two, fresh context, read-only unless
|
|
74
|
+
implementation was requested, passing `skill: "<name>"` on a direct call or a
|
|
75
|
+
`runs.run` / `runs.all` item (`workflow: "parallel"` items do not take it). A suggestion is a hint,
|
|
76
|
+
not authority to fan out.
|
|
77
|
+
|
|
78
|
+
**Oracle consultation.** For "ask/consult the oracle" on a plan or design, run
|
|
79
|
+
one forked `oracle`. If its answer challenges the direction or leaves a
|
|
80
|
+
material tradeoff, resume that same child once with a focused question, then
|
|
81
|
+
decide. Skip the second round for one-shot requests or settled answers. Oracle
|
|
82
|
+
advice approves nothing; `worker` implements only after the parent approves a
|
|
83
|
+
direction. Never use oracle or a top-reasoning model for routine reviews; use
|
|
84
|
+
`reviewer`, and escalate only when review, CI, or source evidence leaves an
|
|
85
|
+
invariant, root-cause, routing, or product question open.
|
|
86
|
+
|
|
87
|
+
**Council.** For several advisors debating a material decision, follow
|
|
88
|
+
[../../council-mode/SKILL.md](../../council-mode/SKILL.md) instead of ad hoc
|
|
89
|
+
parallel oracle calls.
|
|
90
|
+
|
|
91
|
+
## Model tiers
|
|
92
|
+
|
|
93
|
+
Keep the parent on its ordinary strong model. Workers and scouts use a fast
|
|
94
|
+
capable tier; serious reviews use a strong tier at high thinking; a
|
|
95
|
+
top-reasoning model is only a bounded read-only critic after ordinary evidence
|
|
96
|
+
falls short, never an autonomous root. Map tiers to real models in user or
|
|
97
|
+
project settings or a profile (guide `models/setting-defaults-and-overrides`,
|
|
98
|
+
`models/profiles-and-provider-model-catalogs`). Explicit user policy wins.
|
|
@@ -5,7 +5,7 @@ import { serializeAgent } from "./agent-serializer.js";
|
|
|
5
5
|
import { mergeAgentsForScope } from "./agent-selection.js";
|
|
6
6
|
import { discoverAvailableSkills, resolveSkills } from "./skills.js";
|
|
7
7
|
import { buildProactiveSkillSubagentRecommendationLines, } from "./proactive-skills.js";
|
|
8
|
-
import { parseFrontmatter,
|
|
8
|
+
import { parseFrontmatter, parseUnquotedList } from "./frontmatter.js";
|
|
9
9
|
import { resolveEffectiveThinking, toModelInfo } from "../shared/model-info.js";
|
|
10
10
|
import { resolveSubagentModelOverride } from "../runs/shared/model-resolution.js";
|
|
11
11
|
import { validateToolBudgetConfig } from "../runs/shared/tool-budget.js";
|
|
@@ -175,9 +175,9 @@ function withDeclaredExtensionPaths(config, filePath) {
|
|
|
175
175
|
const { extensions: _extensions, subagentOnlyExtensions: _subagentOnlyExtensions, ...withoutResolvedExtensions } = config;
|
|
176
176
|
return {
|
|
177
177
|
...withoutResolvedExtensions,
|
|
178
|
-
...(frontmatter.extensions !== undefined ? { extensions:
|
|
178
|
+
...(frontmatter.extensions !== undefined ? { extensions: parseUnquotedList(frontmatter.extensions) } : {}),
|
|
179
179
|
...(frontmatter.subagentOnlyExtensions !== undefined
|
|
180
|
-
? { subagentOnlyExtensions:
|
|
180
|
+
? { subagentOnlyExtensions: parseUnquotedList(frontmatter.subagentOnlyExtensions) }
|
|
181
181
|
: {}),
|
|
182
182
|
};
|
|
183
183
|
}
|
|
@@ -236,7 +236,9 @@ export function readMemoryFile(memoryDir) {
|
|
|
236
236
|
let fd;
|
|
237
237
|
try {
|
|
238
238
|
const noFollow = typeof fs.constants.O_NOFOLLOW === "number" ? fs.constants.O_NOFOLLOW : 0;
|
|
239
|
-
|
|
239
|
+
// A FIFO must not block the launch before fstat can reject non-files.
|
|
240
|
+
const nonBlock = typeof fs.constants.O_NONBLOCK === "number" ? fs.constants.O_NONBLOCK : 0;
|
|
241
|
+
fd = fs.openSync(file, fs.constants.O_RDONLY | noFollow | nonBlock);
|
|
240
242
|
}
|
|
241
243
|
catch (error) {
|
|
242
244
|
const code = error && typeof error === "object" && "code" in error ? String(error.code) : "";
|