pi-legion 0.16.0 → 2.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/CONTRIBUTING.md +58 -0
- package/README.md +313 -640
- package/agents/advisor.md +7 -5
- package/agents/centurion.md +53 -0
- package/agents/designer.md +33 -33
- package/agents/planner.md +1 -2
- package/agents/prototype.md +2 -2
- package/agents/reviewer.md +67 -31
- package/agents/scout.md +6 -2
- package/agents/worker.md +12 -3
- package/docs/contracts/esc-abort-v1.md +131 -0
- package/docs/contracts/esc-cascade-v2.md +100 -0
- package/docs/design.md +44 -25
- package/docs/legion-v2-contract.md +461 -0
- package/docs/legion-v2-delivery.md +62 -0
- package/docs/retire-hardening-contract.md +125 -0
- package/docs/subagents-teams.md +76 -0
- package/docs/tui-viewer-contract.md +276 -0
- package/docs/vexillatio-contract.md +162 -0
- package/index.ts +1462 -286
- package/package.json +12 -9
- package/skills/pi-legion/SKILL.md +74 -96
- package/src/agents/agents.ts +6 -11
- package/src/agents/overrides.ts +2 -1
- package/src/agents/paths.ts +1 -1
- package/src/agents/settings.ts +268 -20
- package/src/api.ts +47 -48
- package/src/{herdr → backends/legacy}/client.ts +14 -69
- package/src/{shared → backends/legacy}/cursor-chat.ts +2 -2
- package/src/{herdr → backends/legacy}/runner.ts +22 -9
- package/src/backends/legacy/types.ts +138 -0
- package/src/extension/auto-doctor.ts +144 -0
- package/src/extension/budget.ts +2 -2
- package/src/extension/child-guard.ts +214 -201
- package/src/extension/event-bus.ts +263 -0
- package/src/extension/legion-commands.ts +719 -0
- package/src/extension/legion-doctor.ts +888 -0
- package/src/extension/legion-stop.ts +150 -0
- package/src/extension/legion-tools.ts +816 -0
- package/src/extension/notify.ts +24 -19
- package/src/extension/playbook.ts +20 -89
- package/src/extension/recycle.ts +2 -7
- package/src/extension/runtime.ts +655 -105
- package/src/extension/scout-guard.ts +483 -0
- package/src/extension/slash.ts +89 -438
- package/src/extension/spawn-hints.ts +79 -0
- package/src/extension/summary.ts +17 -58
- package/src/legion/budget.ts +165 -0
- package/src/legion/db.ts +242 -0
- package/src/legion/events.ts +150 -0
- package/src/legion/mail.ts +412 -0
- package/src/legion/nodes.ts +461 -0
- package/src/legion/rebuild.ts +533 -0
- package/src/legion/state-machine.ts +313 -0
- package/src/legion/usage.ts +101 -0
- package/src/runs/acceptance.ts +82 -25
- package/src/runs/args.ts +51 -5
- package/src/runs/hygiene.ts +335 -0
- package/src/runs/orchestrator.ts +790 -1683
- package/src/runs/owner.ts +61 -0
- package/src/runs/provision.ts +135 -0
- package/src/runs/store.ts +44 -17
- package/src/runs/verify-queue.ts +195 -0
- package/src/shared/name.ts +29 -0
- package/src/shared/output-cap.ts +57 -0
- package/src/shared/progress.ts +57 -135
- package/src/shared/session.ts +243 -171
- package/src/shared/types.ts +107 -208
- package/src/supervisor/child-memory.ts +140 -0
- package/src/supervisor/proc-tree.ts +103 -0
- package/src/supervisor/rpc-supervisor.ts +1033 -0
- package/src/supervisor/types.ts +153 -0
- package/src/supervisor/ui-proxy.ts +226 -0
- package/src/tui/chat-items.ts +330 -0
- package/src/tui/live-overlay.ts +874 -0
- package/src/tui/status.ts +553 -27
- package/src/tui/tree-view.ts +808 -0
- package/src/tui/viz/canvas.ts +119 -0
- package/src/tui/viz/layout.ts +111 -0
- package/src/tui/viz/model.ts +123 -0
- package/src/tui/viz/palette.ts +188 -0
- package/src/tui/viz/panels.ts +530 -0
- package/src/tui/viz/railway.ts +313 -0
- package/src/tui/viz/rate.ts +211 -0
- package/src/tui/viz/view.ts +228 -0
- package/src/extension/parent-label.ts +0 -115
- package/src/profiles/classify.ts +0 -375
- package/src/profiles/profiles.ts +0 -730
- package/src/runs/layout.ts +0 -258
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-legion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Herdr-backed subagents for Pi: visible, steerable, resumable child agents in Herdr panes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,12 +46,14 @@
|
|
|
46
46
|
],
|
|
47
47
|
"scripts": {
|
|
48
48
|
"typecheck": "tsc --noEmit",
|
|
49
|
-
"test": "node --experimental-strip-types --test test/unit/*.test.ts",
|
|
50
|
-
"test:integration": "node --experimental-strip-types --test test/integration/*.test.ts",
|
|
51
|
-
"test:live": "node --experimental-strip-types --test test/live/*.test.ts",
|
|
49
|
+
"test": "env -u PI_SUBAGENT_ALLOW_NESTED -u PI_SUBAGENT_CHILD -u PI_SUBAGENT_UTILITY_CHILD -u PI_SUBAGENT_MAX_DEPTH -u PI_SUBAGENT_PARENT_PATH -u PI_LEGION_DB -u PI_LEGION_NODE_ID node --experimental-strip-types --test test/unit/*.test.ts",
|
|
50
|
+
"test:integration": "env -u PI_SUBAGENT_ALLOW_NESTED -u PI_SUBAGENT_CHILD -u PI_SUBAGENT_UTILITY_CHILD -u PI_SUBAGENT_MAX_DEPTH -u PI_SUBAGENT_PARENT_PATH -u PI_LEGION_DB -u PI_LEGION_NODE_ID node --experimental-strip-types --test test/integration/*.test.ts",
|
|
51
|
+
"test:live": "env -u PI_SUBAGENT_ALLOW_NESTED -u PI_SUBAGENT_CHILD -u PI_SUBAGENT_UTILITY_CHILD -u PI_SUBAGENT_MAX_DEPTH -u PI_SUBAGENT_PARENT_PATH -u PI_LEGION_DB -u PI_LEGION_NODE_ID node --experimental-strip-types --test test/live/*.test.ts",
|
|
52
52
|
"test:all": "npm run typecheck && npm run test && npm run test:integration",
|
|
53
|
-
"test:docker": "bash test/docker/verify-1-child-guard.sh && bash test/docker/verify-2-task-appendix.sh && bash test/docker/verify-3-readonly.sh && bash test/docker/verify-4-acceptance.sh && bash test/docker/verify-5-blocked.sh && bash test/docker/verify-6-cache.sh && bash test/docker/verify-7-budget.sh && bash test/docker/verify-8-verify-command.sh && bash test/docker/verify-9-worktree.sh && bash test/docker/verify-10-fallback.sh && bash test/docker/verify-11-nested-alias.sh
|
|
54
|
-
"prepublishOnly": "npm run typecheck && npm run test && npm run test:integration"
|
|
53
|
+
"test:docker": "env -u PI_SUBAGENT_ALLOW_NESTED -u PI_SUBAGENT_CHILD -u PI_SUBAGENT_UTILITY_CHILD -u PI_SUBAGENT_MAX_DEPTH -u PI_SUBAGENT_PARENT_PATH sh -c 'echo \"RPC mainline Docker checks only; legacy Herdr workspace/kind/notification scenarios are archived under test/legacy/docker and require pi-legion v0.16.x\" && bash test/docker/verify-1-child-guard.sh && bash test/docker/verify-2-task-appendix.sh && bash test/docker/verify-3-readonly.sh && bash test/docker/verify-4-acceptance.sh && bash test/docker/verify-5-blocked.sh && bash test/docker/verify-6-cache.sh && bash test/docker/verify-7-budget.sh && bash test/docker/verify-8-verify-command.sh && bash test/docker/verify-9-worktree.sh && bash test/docker/verify-10-fallback.sh && bash test/docker/verify-11-nested-alias.sh'",
|
|
54
|
+
"prepublishOnly": "npm run typecheck && npm run test && npm run test:integration",
|
|
55
|
+
"mock-llm": "node --experimental-strip-types test/mock-llm/cli.ts",
|
|
56
|
+
"test:mock-llm": "env -u PI_SUBAGENT_ALLOW_NESTED -u PI_SUBAGENT_CHILD -u PI_SUBAGENT_UTILITY_CHILD -u PI_SUBAGENT_MAX_DEPTH -u PI_SUBAGENT_PARENT_PATH -u PI_LEGION_DB -u PI_LEGION_NODE_ID node --experimental-strip-types --test test/unit/mock-llm*.test.ts test/integration/mock-llm*.test.ts test/integration/railway-mock-e2e.test.ts"
|
|
55
57
|
},
|
|
56
58
|
"peerDependencies": {
|
|
57
59
|
"@earendil-works/pi-agent-core": "*",
|
|
@@ -78,9 +80,10 @@
|
|
|
78
80
|
}
|
|
79
81
|
},
|
|
80
82
|
"devDependencies": {
|
|
81
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
82
|
-
"@earendil-works/pi-
|
|
83
|
-
"@earendil-works/pi-
|
|
83
|
+
"@earendil-works/pi-agent-core": "^1.0.0",
|
|
84
|
+
"@earendil-works/pi-ai": "^1.0.0",
|
|
85
|
+
"@earendil-works/pi-coding-agent": "^1.0.0",
|
|
86
|
+
"@earendil-works/pi-tui": "^1.0.0",
|
|
84
87
|
"@types/node": "^22.0.0",
|
|
85
88
|
"typebox": "^1.3.30",
|
|
86
89
|
"typescript": "^5.6.0"
|
|
@@ -1,120 +1,98 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pi-legion
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use the subagent tool to delegate to a loaded role; use centurion for recursive squads and /legion to inspect the tree. Pi Legion v2 runs headless Pi RPC children and records their shared tree state in legion.db."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Pi Legion
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use the `subagent` tool to delegate to a matching loaded role. Prefer the
|
|
9
|
+
specific role that fits the task; use a `centurion` when the task needs a
|
|
10
|
+
recursive team, a frozen squad contract, and a tree-shaped delivery. Do not
|
|
11
|
+
launch child processes manually.
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
such as `search`. Use the matching name. Do not curl the web yourself when a
|
|
12
|
-
search/research role exists.
|
|
13
|
+
## Dispatch
|
|
13
14
|
|
|
14
15
|
```text
|
|
15
16
|
subagent({ agent: "search", task: "<query>" })
|
|
16
17
|
subagent({ agent: "worker", task: "<task card>" })
|
|
17
|
-
subagent({ agent: "
|
|
18
|
+
subagent({ agent: "centurion", task: "<目标 + 验收清单>" })
|
|
18
19
|
subagent({ tasks: [
|
|
19
20
|
{ agent: "reviewer", task: "<lane A>" },
|
|
20
21
|
{ agent: "reviewer", task: "<lane B>" },
|
|
21
22
|
] })
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
That is the
|
|
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
|
-
|
|
25
|
+
That is the dispatch path: Pi Legion starts headless `pi --mode rpc` child
|
|
26
|
+
processes under a tree-aware supervisor. A `centurion` leads its own squad and
|
|
27
|
+
may recursively dispatch when its role and inherited depth budget allow it;
|
|
28
|
+
ordinary roles should not be assumed to have that permission. Give every child
|
|
29
|
+
a concrete task and acceptance criteria. Children communicate through the
|
|
30
|
+
Legion tools, not by starting another runtime or editing the shared tree ledger
|
|
31
|
+
directly.
|
|
32
|
+
|
|
33
|
+
## Legion visualization
|
|
34
|
+
|
|
35
|
+
In an interactive Pi session, `/legion` opens the paged Legion tree. Navigate
|
|
36
|
+
with `j`/`k` or the arrow keys, use Enter/Space to expand or collapse, `/` to
|
|
37
|
+
search, and PageUp/PageDown to scroll; `q` or Esc closes the tree. Press `o` on
|
|
38
|
+
the selected node, or use a component-routed mouse click in the full-screen
|
|
39
|
+
tree, to open its live overlay. `/legion <name>` opens a node directly. If
|
|
40
|
+
short names are ambiguous, use the full node ID shown in command completion.
|
|
41
|
+
Esc closes an overlay and unsubscribes its node's live feed. OSC 8 links are
|
|
42
|
+
visual anchors only; they do not open overlays or route clicks.
|
|
43
|
+
|
|
44
|
+
## Tree tools and phases
|
|
45
|
+
|
|
46
|
+
Child nodes have access to:
|
|
47
|
+
|
|
48
|
+
- `legion_mail` for asynchronous messages along permitted parent/child/sibling
|
|
49
|
+
tree edges. Cross-squad mail must be routed through the relevant centurions;
|
|
50
|
+
there is no direct bypass to the root.
|
|
51
|
+
- `legion_tree` for read-only machine state. Observation does not interrupt the
|
|
52
|
+
node being observed.
|
|
53
|
+
- `legion_phase` for centurions to request a phase transition. The supervisor
|
|
54
|
+
validates and records the transition; do not claim a phase change from chat
|
|
55
|
+
text alone.
|
|
56
|
+
|
|
57
|
+
A squad's four work phases are **planning → implementing → reviewing →
|
|
58
|
+
verifying**. Planning writes `.pi-legion/contract.md` with interfaces, file
|
|
59
|
+
ownership, and acceptance commands before implementation starts. Reviewing
|
|
60
|
+
uses independent review; verifying runs the contract's `legion-verify`
|
|
61
|
+
commands under the supervisor, without an LLM deciding whether they passed.
|
|
62
|
+
|
|
63
|
+
## Delivery, resume, and isolation
|
|
64
|
+
|
|
65
|
+
A centurion owns a Git worktree for its subtree; squad members share that
|
|
66
|
+
worktree, and a nested centurion gets a nested Git worktree. Each squad
|
|
67
|
+
squashes its subtree into an MR for its parent. MRs move upward until the root
|
|
68
|
+
reviews and merges into the default branch. Do not merge a child squad's work
|
|
69
|
+
at the wrong level.
|
|
70
|
+
|
|
71
|
+
Resume uses saved run records and Pi session files. Parent shutdown does not
|
|
72
|
+
leave detached child processes; recovery follows the tree's resume chain.
|
|
73
|
+
Keep the run/session records while the squad may need to resume. The
|
|
74
|
+
`legion.db` file is a machine-owned shared ledger: use `legion_mail`,
|
|
75
|
+
`legion_tree`, and `legion_phase`, not direct database access.
|
|
76
|
+
|
|
77
|
+
A Git worktree is workspace separation, not a security sandbox. Read-only
|
|
78
|
+
checks remain guardrails rather than a process boundary; never rely on them to
|
|
79
|
+
protect against intentional writes. Pi Legion v2 supports `kind: pi`; for a
|
|
80
|
+
role that requires a non-Pi CLI, use the Herdr-era 0.16.x release line rather
|
|
81
|
+
than expecting v2 to launch it.
|
|
77
82
|
|
|
78
83
|
## Later control
|
|
79
84
|
|
|
80
|
-
|
|
81
|
-
subagent({ action: "steer", name, message })
|
|
82
|
-
subagent({ action: "continue", name, message })
|
|
83
|
-
subagent({ action: "resume", name, message })
|
|
84
|
-
subagent({ action: "status", name })
|
|
85
|
-
subagent({ action: "list" })
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
If a child is waiting on a tool approval, the parent TUI gets a confirm
|
|
89
|
-
(`onBlocked: forward`). Do not invent a `steer` just to type `y`.
|
|
90
|
-
|
|
91
|
-
## Model profiles
|
|
92
|
-
|
|
93
|
-
Roles do not pin a vendor model. To bind capability tiers without switching the
|
|
94
|
-
parent session each time:
|
|
85
|
+
Steer, inspect, collect, resume, or retire children with the `subagent` tool:
|
|
95
86
|
|
|
96
87
|
```text
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
88
|
+
subagent({ action: "status", name: "worker-0" })
|
|
89
|
+
subagent({ action: "collect", name: "worker-0" })
|
|
90
|
+
subagent({ action: "steer", name: "worker-0", message: "Focus on the parser tests." })
|
|
91
|
+
subagent({ action: "resume", name: "worker-0" })
|
|
92
|
+
subagent({ action: "retire", name: "worker-0" })
|
|
100
93
|
```
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
## Listing roles
|
|
107
|
-
|
|
108
|
-
`/subagents-agents [user|project|both]` shows every role the `subagent` tool
|
|
109
|
-
can spawn in this session — grouped by layer (builtin / user / project), each
|
|
110
|
-
with the model a launch would actually resolve (and where it came from),
|
|
111
|
-
kind, aliases, and the defining file. The same scope semantics as the tool's
|
|
112
|
-
`agentScope`; re-reads agent files on every invocation.
|
|
113
|
-
|
|
114
|
-
## Isolation
|
|
115
|
-
|
|
116
|
-
Child-guard blocks `herdr agent prompt` and foreign `pane read`, and it blocks
|
|
117
|
-
writes for read-only roles. Writer roles (`worker`) run in an isolated git
|
|
118
|
-
worktree on their own branch and ship via MR — they must not write the parent
|
|
119
|
-
checkout. Herdr is still **one trust domain**: never put secrets on screen
|
|
120
|
-
while children run. Do not treat a pane as a sandbox.
|
|
95
|
+
For a blocked extension UI request, the RPC supervisor bubbles the request up
|
|
96
|
+
to the root Pi UI for human response by default. A child completion or a
|
|
97
|
+
`legion_mail` message is not a substitute for checking its saved result and
|
|
98
|
+
machine-recorded state.
|
package/src/agents/agents.ts
CHANGED
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
type AcceptanceConfig,
|
|
19
19
|
type AcceptanceCriterion,
|
|
20
20
|
type OnBlockedPolicy,
|
|
21
|
-
type Placement,
|
|
22
21
|
type SystemPromptMode,
|
|
23
22
|
type ToolBudgetConfig,
|
|
24
23
|
type TurnBudgetConfig,
|
|
@@ -35,6 +34,7 @@ export const BUILTIN_AGENT_NAMES = [
|
|
|
35
34
|
"planner",
|
|
36
35
|
"reviewer",
|
|
37
36
|
"worker",
|
|
37
|
+
"centurion",
|
|
38
38
|
"advisor",
|
|
39
39
|
"designer",
|
|
40
40
|
"prototype",
|
|
@@ -78,11 +78,6 @@ function extraAgentDirs(): string[] {
|
|
|
78
78
|
|
|
79
79
|
const VALID_KINDS: ReadonlySet<string> = new Set(AGENT_KINDS);
|
|
80
80
|
|
|
81
|
-
const VALID_PLACEMENTS: ReadonlySet<string> = new Set([
|
|
82
|
-
"split-down",
|
|
83
|
-
"split-right",
|
|
84
|
-
"new-tab",
|
|
85
|
-
]);
|
|
86
81
|
const VALID_ON_BLOCKED: ReadonlySet<string> = new Set([
|
|
87
82
|
"forward",
|
|
88
83
|
"auto-approve",
|
|
@@ -382,6 +377,7 @@ export function parseAgentDocument(
|
|
|
382
377
|
// Defaults chosen to match pi-subagents conventions (design §6.1).
|
|
383
378
|
inheritProjectContext: bool(fm.inheritProjectContext) ?? true,
|
|
384
379
|
inheritSkills: bool(fm.inheritSkills) ?? false,
|
|
380
|
+
...(bool(fm.inheritExtensions) !== undefined ? { inheritExtensions: bool(fm.inheritExtensions) } : {}),
|
|
385
381
|
kind: enumOr<AgentKind>(fm.kind, VALID_KINDS, "pi"),
|
|
386
382
|
systemPrompt: body,
|
|
387
383
|
source,
|
|
@@ -393,6 +389,8 @@ export function parseAgentDocument(
|
|
|
393
389
|
applyCapabilityFields(config, fm);
|
|
394
390
|
applyBehaviorFields(config, fm);
|
|
395
391
|
applyHerdrFields(config, fm);
|
|
392
|
+
const team = str(fm.team);
|
|
393
|
+
if (team) config.extraFields = { ...(config.extraFields ?? {}), team };
|
|
396
394
|
|
|
397
395
|
config.unenforcedFields = unenforcedFieldsIn(config);
|
|
398
396
|
return config;
|
|
@@ -471,6 +469,7 @@ function applyBehaviorFields(config: AgentConfig, fm: AgentFrontmatter): void {
|
|
|
471
469
|
setIf(config, "completionGuard", bool(fm.completionGuard));
|
|
472
470
|
setIf(config, "maxSubagentDepth", int(fm.maxSubagentDepth));
|
|
473
471
|
setIf(config, "allowNestedSubagents", bool(fm.allowNestedSubagents));
|
|
472
|
+
setIf(config, "utility", bool(fm.utility));
|
|
474
473
|
setIf(config, "disabled", bool(fm.disabled));
|
|
475
474
|
setIf(config, "worktree", bool(fm.worktree));
|
|
476
475
|
setIf(config, "steer", bool(fm.steer));
|
|
@@ -484,12 +483,8 @@ function applyBehaviorFields(config: AgentConfig, fm: AgentFrontmatter): void {
|
|
|
484
483
|
}
|
|
485
484
|
}
|
|
486
485
|
|
|
487
|
-
/**
|
|
486
|
+
/** Transitional blocked-policy frontmatter retained for approval handling. */
|
|
488
487
|
function applyHerdrFields(config: AgentConfig, fm: AgentFrontmatter): void {
|
|
489
|
-
const placement = str(fm.placement);
|
|
490
|
-
if (placement && VALID_PLACEMENTS.has(placement)) {
|
|
491
|
-
config.placement = placement as Placement;
|
|
492
|
-
}
|
|
493
488
|
const onBlocked = str(fm.onBlocked);
|
|
494
489
|
if (onBlocked && VALID_ON_BLOCKED.has(onBlocked)) {
|
|
495
490
|
config.onBlocked = onBlocked as OnBlockedPolicy;
|
package/src/agents/overrides.ts
CHANGED
|
@@ -25,17 +25,18 @@ export const OVERRIDE_FIELDS = [
|
|
|
25
25
|
"thinking",
|
|
26
26
|
"output",
|
|
27
27
|
"kind",
|
|
28
|
-
"placement",
|
|
29
28
|
"onBlocked",
|
|
30
29
|
"systemPromptMode",
|
|
31
30
|
"systemPrompt",
|
|
32
31
|
// booleans
|
|
33
32
|
"inheritProjectContext",
|
|
34
33
|
"inheritSkills",
|
|
34
|
+
"inheritExtensions",
|
|
35
35
|
"defaultProgress",
|
|
36
36
|
"async",
|
|
37
37
|
"completionGuard",
|
|
38
38
|
"allowNestedSubagents",
|
|
39
|
+
"utility",
|
|
39
40
|
"disabled",
|
|
40
41
|
"worktree",
|
|
41
42
|
"steer",
|
package/src/agents/paths.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as os from "node:os";
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
|
|
11
|
-
/** Directory that holds `settings.json
|
|
11
|
+
/** Directory that holds `settings.json` and user-defined `agents/`. */
|
|
12
12
|
export function getAgentDir(): string {
|
|
13
13
|
const configured = process.env.PI_CODING_AGENT_DIR;
|
|
14
14
|
if (configured === "~") return os.homedir();
|