@henryqw/pi-subagent 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,16 +55,35 @@ See [Orchestration, isolation, and the public API](./docs/orchestration.md) for
|
|
|
55
55
|
|
|
56
56
|
## Config
|
|
57
57
|
|
|
58
|
-
`~/.pi/agent/config/pi-subagent
|
|
58
|
+
pi-subagent owns the extension-named config directory `~/.pi/agent/config/pi-subagent/`, which holds two kinds of user-owned configuration: one Markdown file per Role (see [Roles](#roles)) and its own optional JSON file below. Model routing is *not* configured here; children resolve routes through the shared `@henryqw/pi-task-models` config at `~/.pi/agent/config/pi-task-models.json`.
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
`~/.pi/agent/config/pi-subagent/pi-subagent.json` controls the ephemeral child pool and timeouts. All fields are optional; a missing file uses defaults.
|
|
61
|
+
|
|
62
|
+
| Field | Required | Possible values | Default |
|
|
63
|
+
| --- | --- | --- | --- |
|
|
64
|
+
| `maxSubagents` | No | Safe integer ≥ 1 | `5` |
|
|
65
|
+
| `timeout.idleMinutes` | No | Positive number of minutes where minutes × 60 000 ms ≤ 2,147,483,647 | `10` |
|
|
66
|
+
| `timeout.maxMinutes` | No | Positive number within the same ms cap that must be greater than `timeout.idleMinutes`, otherwise the whole `timeout` object falls back to defaults | `30` |
|
|
67
|
+
|
|
68
|
+
Excess children wait FIFO without consuming child timeout. `PI_SUBAGENT_MAX_SUBAGENTS` overrides `maxSubagents` for the session (positive integer; an invalid value prevents the extension from loading, leaving `delegate_task` unavailable).
|
|
69
|
+
|
|
70
|
+
This JSON is read leniently: malformed JSON, a non-object root, unknown keys, or invalid values are collected into one warning and the affected settings fall back to defaults; the file is never rewritten.
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
### Role frontmatter
|
|
73
|
+
|
|
74
|
+
Each Role `.md` file in the same directory accepts these frontmatter fields:
|
|
75
|
+
|
|
76
|
+
| Field | Required | Possible values | Default |
|
|
77
|
+
| --- | --- | --- | --- |
|
|
78
|
+
| `name` | Yes | Non-empty text; unique across roles | — |
|
|
79
|
+
| `description` | Yes | Non-empty text | — |
|
|
80
|
+
| `tools` | No | Array or comma-separated string of tool names | Omitted: caller tools win, else Pi defaults apply |
|
|
81
|
+
| `isolation` | No | `worktree` | None |
|
|
82
|
+
| `extensions` | No | Absolute paths, `~/…`, `file://`, or package sources (`npm:`, `git:`, `github:`, `https?:`, `ssh:`) | None |
|
|
83
|
+
| `skills` | No | Array or comma-separated string of skill names | None; unavailable names warn and skip |
|
|
84
|
+
| body | Yes | System-prompt Markdown after the frontmatter | — |
|
|
85
|
+
|
|
86
|
+
An unreadable or invalid Role file fails role loading fast; duplicate role names are rejected.
|
|
68
87
|
|
|
69
88
|
## Roles
|
|
70
89
|
|
|
@@ -91,17 +110,3 @@ A Role owns its base tools, extensions, named Skills, instructions, and optional
|
|
|
91
110
|
The package root exports Role loading and launch resolution, `createEphemeralSubagentExecutor`, worktree helpers, and generic managed Herdr lifecycle helpers. The ephemeral executor is for code already running inside active Pi; it does not provide standalone Node.js Pi discovery or launch support.
|
|
92
111
|
|
|
93
112
|
Use [`docs/orchestration.md`](./docs/orchestration.md#public-role-and-executor-api) for exact API behavior and a post-permit `prepare` example using `resolveRoleLaunch` against the latest Pi context.
|
|
94
|
-
|
|
95
|
-
## Remove
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
pi remove npm:@henryqw/pi-subagent
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Development
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
npm test --workspace @henryqw/pi-subagent
|
|
105
|
-
npm run typecheck --workspace @henryqw/pi-subagent
|
|
106
|
-
npm run pack:check --workspace @henryqw/pi-subagent
|
|
107
|
-
```
|