pi-herdsman 0.5.2 → 0.6.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/README.md +19 -5
- package/dist/agent-definitions/generalist.md +0 -2
- package/dist/agent-definitions/implementer.md +0 -2
- package/dist/agent-definitions/researcher.md +0 -2
- package/dist/agent-definitions/reviewer.md +0 -2
- package/dist/agent-definitions/scout.md +0 -2
- package/dist/index.js +75 -68
- package/docs/agent-api.md +1 -1
- package/docs/concepts/agents.md +9 -6
- package/docs/concepts/lifecycle.md +4 -2
- package/docs/development/smoke-testing.md +7 -5
- package/docs/development/validation.md +17 -12
- package/docs/getting-started.md +15 -12
- package/docs/guides/agent-definitions.md +8 -2
- package/docs/guides/customizing-agents.md +12 -11
- package/docs/guides/handoffs.md +7 -1
- package/docs/guides/recovery.md +3 -1
- package/docs/reference/agent-definition-schema.md +50 -25
- package/docs/reference/agent.md +2 -1
- package/docs/reference/commands.md +14 -10
- package/package.json +1 -1
package/docs/agent-api.md
CHANGED
|
@@ -20,7 +20,7 @@ For an active chief supervising independent leads, use the [`staff` and
|
|
|
20
20
|
## Prerequisites
|
|
21
21
|
|
|
22
22
|
Installation and supported versions are owned by
|
|
23
|
-
[Getting started](getting-started.md#1-
|
|
23
|
+
[Getting started](getting-started.md#1-install). The lead Pi session
|
|
24
24
|
must run inside [herdr](https://github.com/herdrdev/herdr).
|
|
25
25
|
|
|
26
26
|
## First use
|
package/docs/concepts/agents.md
CHANGED
|
@@ -9,9 +9,10 @@ whose assignment lifecycle is coordinated through the extension mailbox.
|
|
|
9
9
|
|
|
10
10
|
### Agent definition
|
|
11
11
|
|
|
12
|
-
The **agent definition**
|
|
13
|
-
skills, extensions, prompt body, context inheritance,
|
|
14
|
-
agents.
|
|
12
|
+
The **agent definition** may override the agent's model and reasoning policy,
|
|
13
|
+
and selects its tools, skills, extensions, prompt body, context inheritance,
|
|
14
|
+
and allowed direct agents. Fresh agents otherwise inherit model and thinking
|
|
15
|
+
from their spawning controller session.
|
|
15
16
|
|
|
16
17
|
Example: `reviewer`.
|
|
17
18
|
|
|
@@ -107,9 +108,11 @@ cleanup path.
|
|
|
107
108
|
|
|
108
109
|
The Pi session remains available after agent cleanup. To continue the same
|
|
109
110
|
conversational context, use `continue` with the exact session ID or session path
|
|
110
|
-
returned with the result. This creates a new agent generation, which
|
|
111
|
-
|
|
112
|
-
derive a separate context instead, use
|
|
111
|
+
returned with the result. This creates a new agent generation, which restores
|
|
112
|
+
the saved session's model and thinking unless the current definition
|
|
113
|
+
explicitly overrides either field. To derive a separate context instead, use
|
|
114
|
+
`fork` on a `delegate` action; fork is a fresh delegation and inherits from its
|
|
115
|
+
spawning controller when those fields are omitted.
|
|
113
116
|
|
|
114
117
|
The identities are therefore:
|
|
115
118
|
|
|
@@ -106,8 +106,10 @@ Agent cleanup does not delete the Pi session. To continue completed context,
|
|
|
106
106
|
use the exact returned session with `continue`; Pi Herdsman starts a new agent
|
|
107
107
|
generation for the new assignment. The continuation uses the saved cwd, session
|
|
108
108
|
history, definition, and logical label together with the current effective
|
|
109
|
-
authorized definition configuration.
|
|
110
|
-
|
|
109
|
+
authorized definition configuration. Its omitted model and thinking fields
|
|
110
|
+
restore the saved session settings, while explicit definition fields override
|
|
111
|
+
them. The caller cannot rename the continued session. Use `delegate` with
|
|
112
|
+
`fork` when a separate derived session is required.
|
|
111
113
|
Session continuation does not retain the old Herdr tab. A still-live
|
|
112
114
|
generation may be restored from its exact managed identity, while ordinary
|
|
113
115
|
same-workspace tab movement remains presentation-only and does not change
|
|
@@ -70,7 +70,8 @@ Verify:
|
|
|
70
70
|
- a new agent generation, run ID, request ID, and pane are created;
|
|
71
71
|
- the saved logical label is reused exactly (there is no continuation label override);
|
|
72
72
|
- the saved conversation context is available;
|
|
73
|
-
- the current effective definition configuration is used
|
|
73
|
+
- the current effective definition configuration is used, with omitted model and
|
|
74
|
+
thinking fields restoring the saved session settings;
|
|
74
75
|
- exactly one result reaches the owner;
|
|
75
76
|
- cleanup removes the second agent, pane, mailbox, and runtime.
|
|
76
77
|
|
|
@@ -188,7 +189,7 @@ Verify the native Definitions selector shows:
|
|
|
188
189
|
(`[project] *` means both layers contribute);
|
|
189
190
|
- compact, aligned name/model/thinking columns, including Unicode names;
|
|
190
191
|
- model, thinking, enabled, and details actions for a selected definition;
|
|
191
|
-
- `
|
|
192
|
+
- `Inherit current session` for model and thinking;
|
|
192
193
|
- narrow panes remain width-safe.
|
|
193
194
|
|
|
194
195
|
Structured `agent list` should still retain exact deterministic metadata.
|
|
@@ -198,9 +199,10 @@ model, thinking, and enabled state. Confirm that project discovery requires Pi
|
|
|
198
199
|
project trust and that these edits write global overrides only, not project
|
|
199
200
|
files.
|
|
200
201
|
|
|
201
|
-
Verify unrelated frontmatter and body remain unchanged, `
|
|
202
|
-
only the selected field, fresh definition delegations
|
|
203
|
-
|
|
202
|
+
Verify unrelated frontmatter and body remain unchanged, `Inherit current session`
|
|
203
|
+
removes only the selected field, fresh definition delegations inherit the
|
|
204
|
+
spawning controller's current value, continuations restore the saved session's
|
|
205
|
+
value, and running agents are not mutated.
|
|
204
206
|
|
|
205
207
|
### `/agents placement`
|
|
206
208
|
|
|
@@ -31,10 +31,10 @@ git diff HEAD --check
|
|
|
31
31
|
|
|
32
32
|
## What `npm run check` does
|
|
33
33
|
|
|
34
|
-
The repository check command runs the complete Node test set in one
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
The repository check command runs the complete Node test set in one isolated
|
|
35
|
+
process tree with a bounded suite deadline. Node's native TypeScript support
|
|
36
|
+
strips types while loading the source, and the test runner discovers the
|
|
37
|
+
`.test.ts` files automatically.
|
|
38
38
|
|
|
39
39
|
The test runner uses:
|
|
40
40
|
|
|
@@ -45,19 +45,24 @@ The test runner uses:
|
|
|
45
45
|
|
|
46
46
|
## Process containment
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
On POSIX systems the test runner runs in a detached process group. On Windows
|
|
49
|
+
it runs as a normal child process and uses the native `taskkill.exe /PID <pid>
|
|
50
|
+
/T /F` process-tree operation for timeout cleanup.
|
|
49
51
|
|
|
50
|
-
On
|
|
52
|
+
On POSIX suite deadline, the runner attempts:
|
|
51
53
|
|
|
52
54
|
1. `SIGTERM`;
|
|
53
55
|
2. a bounded grace period;
|
|
54
56
|
3. `SIGKILL` when required;
|
|
55
|
-
4. bounded proof that the process
|
|
57
|
+
4. bounded proof that the process tree disappeared.
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
On Windows, the runner invokes `taskkill.exe /PID <pid> /T /F` and waits for
|
|
60
|
+
the runner process to disappear.
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
A test runner that leaks descendants after normal exit is reported as a failure
|
|
63
|
+
on POSIX and cleaned through the same process-group boundary. Windows timeout
|
|
64
|
+
cleanup covers the runner tree; post-parent descendant leak accounting would
|
|
65
|
+
require a Job Object and is not implemented.
|
|
61
66
|
|
|
62
67
|
## Focused tests
|
|
63
68
|
|
|
@@ -97,8 +102,8 @@ the read-only verification step:
|
|
|
97
102
|
npm run check
|
|
98
103
|
```
|
|
99
104
|
|
|
100
|
-
`npm run check` remains the bounded full check, including
|
|
101
|
-
when the test runner times out or leaks descendants.
|
|
105
|
+
`npm run check` remains the bounded full check, including platform-appropriate
|
|
106
|
+
process-tree cleanup when the test runner times out or leaks descendants.
|
|
102
107
|
|
|
103
108
|
## Dependency availability
|
|
104
109
|
|
package/docs/getting-started.md
CHANGED
|
@@ -6,7 +6,7 @@ This is the shortest human-facing path from installation to useful Pi Herdsman
|
|
|
6
6
|
orchestration. You do not need to type structured `agent` requests for this
|
|
7
7
|
path.
|
|
8
8
|
|
|
9
|
-
## 1.
|
|
9
|
+
## 1. Install
|
|
10
10
|
|
|
11
11
|
You need:
|
|
12
12
|
|
|
@@ -14,26 +14,29 @@ You need:
|
|
|
14
14
|
- Pi `>=0.84.2 <0.86.0` (supported);
|
|
15
15
|
- Node `>=22.19.0`.
|
|
16
16
|
|
|
17
|
-
Install
|
|
17
|
+
Install the package and herdr Pi integration:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
+
pi install npm:pi-herdsman
|
|
20
21
|
herdr integration install pi
|
|
21
|
-
herdr integration status
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## 2. Start Herdr and Pi
|
|
25
|
+
|
|
26
|
+
Start Herdr in your project:
|
|
25
27
|
|
|
26
28
|
```sh
|
|
27
|
-
|
|
29
|
+
herdr
|
|
28
30
|
```
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
`agents` skill.
|
|
32
|
+
Then run Pi in the Herdr pane:
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
```sh
|
|
35
|
+
pi
|
|
36
|
+
```
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
cannot safely manage
|
|
38
|
+
Pi reads the package manifest and loads the extension plus the optional `agents`
|
|
39
|
+
skill. A lead Pi session started outside Herdr cannot safely manage Herdr agents.
|
|
37
40
|
|
|
38
41
|
The extension distinguishes a lead Pi session, valid managed agents, and
|
|
39
42
|
unmanaged or invalid environments. Only supported managed environments receive
|
|
@@ -41,10 +44,10 @@ Pi Herdsman controls and status UI.
|
|
|
41
44
|
|
|
42
45
|
## 3. Delegate work without leaving the conversation
|
|
43
46
|
|
|
44
|
-
Ask
|
|
47
|
+
Ask Pi normally:
|
|
45
48
|
|
|
46
49
|
```text
|
|
47
|
-
Use
|
|
50
|
+
Use scout to inspect this repository.
|
|
48
51
|
```
|
|
49
52
|
|
|
50
53
|
Pi Herdsman starts the work asynchronously. Once the assignment is accepted, the
|
|
@@ -219,6 +219,11 @@ Supported forms:
|
|
|
219
219
|
@~/home-relative.md
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
+
On Windows, the native backslash forms are also supported, including
|
|
223
|
+
`@.\relative.md`, `@..\relative.md`, `@~\home-relative.md`, rooted paths,
|
|
224
|
+
drive-rooted paths, and UNC paths. References use the host platform's native
|
|
225
|
+
path resolution rules.
|
|
226
|
+
|
|
222
227
|
References are resolved from the Markdown file that declares them.
|
|
223
228
|
|
|
224
229
|
The bundled definitions are `generalist`, `implementer`, `researcher`,
|
|
@@ -248,8 +253,9 @@ The human `Definitions` menu includes bundled, project, and global
|
|
|
248
253
|
participation. Project participation is marked `[project]`; a global override
|
|
249
254
|
adds `*`, so `[project] *` means both layers contribute. Model, thinking, and
|
|
250
255
|
enabled settings can be changed through the menu, but edits always write global
|
|
251
|
-
overrides. `
|
|
252
|
-
|
|
256
|
+
overrides. `Inherit current session` removes only that field. Unset model and
|
|
257
|
+
thinking fields inherit the spawning controller for fresh delegation, while
|
|
258
|
+
continuation restores the saved session's settings.
|
|
253
259
|
|
|
254
260
|
## Override an existing bundled role
|
|
255
261
|
|
|
@@ -115,8 +115,9 @@ The path is resolved relative to the declaring project or global file before
|
|
|
115
115
|
body composition, so each layer preserves its own declaring-file provenance.
|
|
116
116
|
|
|
117
117
|
References expand when each new agent generation is constructed. A session
|
|
118
|
-
continuation keeps the saved Pi history
|
|
119
|
-
definition configuration for its new generation
|
|
118
|
+
continuation keeps the saved Pi history and uses the current effective
|
|
119
|
+
definition configuration for its new generation; omitted model and thinking
|
|
120
|
+
fields retain the saved session's settings.
|
|
120
121
|
|
|
121
122
|
The Definitions details view re-resolves the selected name when opened, so
|
|
122
123
|
metadata and body references reflect current overlays even if configuration
|
|
@@ -207,11 +208,10 @@ Model
|
|
|
207
208
|
Thinking
|
|
208
209
|
Enabled
|
|
209
210
|
Details…
|
|
210
|
-
Back
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
Model and thinking each offer `
|
|
214
|
-
Selecting `
|
|
213
|
+
Model and thinking each offer `Inherit current session` plus their available
|
|
214
|
+
values. Selecting `Inherit current session` removes only that field. The model chooser stores the
|
|
215
215
|
canonical provider/model token; thinking uses the selected model's supported
|
|
216
216
|
levels when available. `Enabled` toggles the definition.
|
|
217
217
|
|
|
@@ -221,17 +221,18 @@ edited through the same flow.
|
|
|
221
221
|
It changes only the selected top-level line in the global Markdown override and
|
|
222
222
|
preserves unrelated frontmatter, line endings, and body content.
|
|
223
223
|
|
|
224
|
-
Removing a saved
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
Removing a saved model or thinking field inherits the spawning controller for a
|
|
225
|
+
fresh delegation, or the saved session for a continuation. The override file
|
|
226
|
+
is not deleted.
|
|
227
227
|
|
|
228
228
|
Enable and disable write the scalar `enabled` field in the same global override.
|
|
229
229
|
Removing that field inherits the bundled value, or `true` when no source
|
|
230
230
|
declares it.
|
|
231
231
|
|
|
232
|
-
Changes affect future
|
|
233
|
-
|
|
234
|
-
mutate an already-running agent or the lead Pi
|
|
232
|
+
Changes affect future assignments. Fresh `delegate` assignments inherit unset
|
|
233
|
+
execution fields from their spawning controller; `continue` restores saved
|
|
234
|
+
session settings. They do not mutate an already-running agent or the lead Pi
|
|
235
|
+
session.
|
|
235
236
|
|
|
236
237
|
## See also
|
|
237
238
|
|
package/docs/guides/handoffs.md
CHANGED
|
@@ -150,6 +150,10 @@ line has one of these shapes:
|
|
|
150
150
|
@~/home-relative.md
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
+
On Windows, native backslash forms are also supported, including `@.\relative.md`,
|
|
154
|
+
`@..\relative.md`, `@~\home-relative.md`, rooted paths, drive-rooted paths,
|
|
155
|
+
and UNC paths. References use the host platform's native path resolution rules.
|
|
156
|
+
|
|
153
157
|
These remain literal text:
|
|
154
158
|
|
|
155
159
|
```text
|
|
@@ -206,7 +210,9 @@ Original body source paths are never handed to Pi as system-prompt paths.
|
|
|
206
210
|
|
|
207
211
|
Each agent generation builds its system prompt once for its single assignment.
|
|
208
212
|
Session continuation builds a new generation with the current effective
|
|
209
|
-
definition configuration while preserving the saved Pi session context.
|
|
213
|
+
definition configuration while preserving the saved Pi session context. Its
|
|
214
|
+
omitted model and thinking fields restore the saved session settings; explicit
|
|
215
|
+
definition overrides still apply.
|
|
210
216
|
|
|
211
217
|
## Result handoff
|
|
212
218
|
|
package/docs/guides/recovery.md
CHANGED
|
@@ -126,7 +126,9 @@ session identity. If the definition no longer exists, continuation fails instead
|
|
|
126
126
|
of guessing a replacement; a missing or malformed session identity also fails
|
|
127
127
|
closed. The definition must also be enabled and authorized for the current
|
|
128
128
|
controller, and its current effective configuration is used for the new agent
|
|
129
|
-
generation.
|
|
129
|
+
generation. Omitted model and thinking fields restore the saved session
|
|
130
|
+
settings; explicit definition fields override them. Continuation cannot
|
|
131
|
+
override or regenerate its saved label.
|
|
130
132
|
|
|
131
133
|
An exact session that is already represented by active or unresolved managed
|
|
132
134
|
work cannot be activated concurrently. The session-start exclusion applies to
|
|
@@ -63,6 +63,25 @@ Precedence is `bundled < project < global`.
|
|
|
63
63
|
All effective definitions are sorted and validated together, including every
|
|
64
64
|
`agents` reference.
|
|
65
65
|
|
|
66
|
+
## Execution settings
|
|
67
|
+
|
|
68
|
+
`model` and `thinking` are independent optional overrides. An omitted field is
|
|
69
|
+
inherited according to this precedence:
|
|
70
|
+
|
|
71
|
+
| Operation | Omitted `model` or `thinking` |
|
|
72
|
+
| ----------------------------------------------- | -------------------------------------- |
|
|
73
|
+
| fresh `delegate` | current spawning controller session |
|
|
74
|
+
| `delegate` with `fork` | current spawning controller session |
|
|
75
|
+
| nested fresh `delegate` | current spawning managed-agent session |
|
|
76
|
+
| `continue` | saved Pi session |
|
|
77
|
+
| any operation with an explicit definition field | explicit definition value |
|
|
78
|
+
|
|
79
|
+
Model and thinking resolve independently, so either field can be explicit while
|
|
80
|
+
the other inherits. A nested agent inherits from its managed parent, not from
|
|
81
|
+
the root lead. Pi clamps a thinking level to the selected model's capabilities.
|
|
82
|
+
Fresh-delegation settings are snapshotted at launch; changing the controller
|
|
83
|
+
does not change an active agent.
|
|
84
|
+
|
|
66
85
|
`enabled` controls definition availability. A disabled definition remains in the
|
|
67
86
|
lead roster so it can be enabled again, but owner-visible definition lists omit
|
|
68
87
|
it. `delegate` and `continue` reject a disabled definition. An already
|
|
@@ -71,28 +90,28 @@ available actions; disabling a definition does not mutate that assignment.
|
|
|
71
90
|
|
|
72
91
|
## Fields
|
|
73
92
|
|
|
74
|
-
| Field | Accepted value | Omitted/default behavior
|
|
75
|
-
| ----------------------- | --------------------------------------------------------------------- |
|
|
76
|
-
| `name` | non-empty string | required
|
|
77
|
-
| `enabled` | boolean | `true`
|
|
78
|
-
| `description` | string | absent
|
|
79
|
-
| `model` | non-empty string |
|
|
80
|
-
| `thinking` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, or `false` |
|
|
81
|
-
| `systemPromptMode` | `append` or `replace` | `append` only for definition name `delegate`; otherwise `replace`
|
|
82
|
-
| `bodyMode` | `append` or `replace` | `replace` for non-empty matching overlay body
|
|
83
|
-
| `noTools` | boolean | Pi normal tool policy
|
|
84
|
-
| `noBuiltinTools` | boolean | Pi normal built-in tool policy
|
|
85
|
-
| `tools` | array of non-empty strings | no explicit allowlist
|
|
86
|
-
| `excludeTools` | array of non-empty strings | no explicit exclusions
|
|
87
|
-
| `permission` | mapping | absent
|
|
88
|
-
| `noSkills` | boolean | skills disabled unless `inheritSkills: true`
|
|
89
|
-
| `inheritSkills` | boolean | does not enable by itself unless `true`
|
|
90
|
-
| `skills` | array of non-empty strings | no explicit skill arguments
|
|
91
|
-
| `noExtensions` | boolean | Pi normal extension policy
|
|
92
|
-
| `extensions` | array of non-empty strings | no extra extension arguments
|
|
93
|
-
| `agents` | array of unique non-empty definition names | no direct agents
|
|
94
|
-
| `inheritProjectContext` | boolean | `true` only for definition name `delegate`; otherwise `false`
|
|
95
|
-
| `inheritGlobalContext` | boolean | follows effective `inheritProjectContext`
|
|
93
|
+
| Field | Accepted value | Omitted/default behavior | Runtime/composition behavior |
|
|
94
|
+
| ----------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
95
|
+
| `name` | non-empty string | required | Effective definition identity. |
|
|
96
|
+
| `enabled` | boolean | `true` | `false` makes `delegate` and `continue` unavailable; it does not mutate an active agent. |
|
|
97
|
+
| `description` | string | absent | Display/selection description. |
|
|
98
|
+
| `model` | non-empty string | spawning controller for fresh `delegate`; saved session for `continue` | Explicit value is passed as Pi model selection. |
|
|
99
|
+
| `thinking` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, or `false` | spawning controller for fresh `delegate`; saved session for `continue` | Explicit value wins; `false` launches as `off`. |
|
|
100
|
+
| `systemPromptMode` | `append` or `replace` | `append` only for definition name `delegate`; otherwise `replace` | Controls effective body versus Pi base system prompt. |
|
|
101
|
+
| `bodyMode` | `append` or `replace` | `replace` for non-empty matching overlay body | Valid only when overlaying an existing lower-precedence definition; consumed during body composition. |
|
|
102
|
+
| `noTools` | boolean | Pi normal tool policy | `true` emits `--no-tools`; managed `ask_owner` remains infrastructure. |
|
|
103
|
+
| `noBuiltinTools` | boolean | Pi normal built-in tool policy | `true` emits `--no-builtin-tools`. |
|
|
104
|
+
| `tools` | array of non-empty strings | no explicit allowlist | Passed to Pi as a source-agnostic tool-name allowlist; matching overlay replaces whole array. |
|
|
105
|
+
| `excludeTools` | array of non-empty strings | no explicit exclusions | Passed to Pi as source-agnostic tool-name exclusions; matching override replaces whole array. |
|
|
106
|
+
| `permission` | mapping | absent | Opaque interoperability policy for permission-aware extensions; Pi Herdsman does not evaluate it. |
|
|
107
|
+
| `noSkills` | boolean | skills disabled unless `inheritSkills: true` | Controls Pi native skill discovery; explicit `skills` values are still passed separately. |
|
|
108
|
+
| `inheritSkills` | boolean | does not enable by itself unless `true` | `true` changes omitted `noSkills` default so native skills remain available. Explicit `noSkills` wins. |
|
|
109
|
+
| `skills` | array of non-empty strings | no explicit skill arguments | Each value is passed unchanged as a Pi skill path/resource. |
|
|
110
|
+
| `noExtensions` | boolean | Pi normal extension policy | `true` emits `--no-extensions`. Required herdr agent infrastructure remains injected by the launcher. |
|
|
111
|
+
| `extensions` | array of non-empty strings | no extra extension arguments | Each value is passed unchanged to Pi. |
|
|
112
|
+
| `agents` | array of unique non-empty definition names | no direct agents | Names direct definitions this agent may delegate to; every name must exist. |
|
|
113
|
+
| `inheritProjectContext` | boolean | `true` only for definition name `delegate`; otherwise `false` | Controls project context-file inheritance. |
|
|
114
|
+
| `inheritGlobalContext` | boolean | follows effective `inheritProjectContext` | Controls global context-file inheritance. |
|
|
96
115
|
|
|
97
116
|
`permission` is reserved for compatible permission extensions. Pi Herdsman
|
|
98
117
|
accepts and preserves the mapping but does not validate its internal policy
|
|
@@ -206,13 +225,18 @@ A body line is a reference only when the complete trimmed line matches:
|
|
|
206
225
|
@~/home-relative/path
|
|
207
226
|
```
|
|
208
227
|
|
|
228
|
+
On Windows, native backslash forms are also accepted, including `@.\relative`,
|
|
229
|
+
`@..\relative`, `@~\home-relative`, rooted paths, drive-rooted paths, and UNC
|
|
230
|
+
paths. References use the host platform's native path classification and
|
|
231
|
+
resolution rules.
|
|
232
|
+
|
|
209
233
|
Before bundled/global body composition, relative references are resolved from
|
|
210
234
|
the definition file that declared them.
|
|
211
235
|
|
|
212
236
|
When a new agent generation is constructed:
|
|
213
237
|
|
|
214
|
-
1. references are processed in body order; `~/`
|
|
215
|
-
current user's home directory;
|
|
238
|
+
1. references are processed in body order; `~/` (or `~\` on Windows) is
|
|
239
|
+
resolved beneath the current user's home directory;
|
|
216
240
|
2. targets are canonicalized with `realpath`;
|
|
217
241
|
3. each canonical file is included once;
|
|
218
242
|
4. a caller `delegate.files` canonical overlap wins and removes the body copy;
|
|
@@ -223,7 +247,8 @@ When a new agent generation is constructed:
|
|
|
223
247
|
|
|
224
248
|
Every new agent generation expands the effective body and its file references
|
|
225
249
|
once at launch. Session continuation preserves the Pi session history while
|
|
226
|
-
using the current effective definition configuration
|
|
250
|
+
using the current effective definition configuration; model and thinking follow
|
|
251
|
+
the execution-settings precedence above.
|
|
227
252
|
|
|
228
253
|
## Runtime prompt order
|
|
229
254
|
|
package/docs/reference/agent.md
CHANGED
|
@@ -54,7 +54,8 @@ for one assignment with a live label; it never assigns work to an existing
|
|
|
54
54
|
agent. `continue` does not accept `cwd` or `fork`; the cwd comes from the saved
|
|
55
55
|
session. The saved definition is resolved again from current configuration and
|
|
56
56
|
must currently be enabled and authorized; its current effective configuration
|
|
57
|
-
is used for the new generation.
|
|
57
|
+
is used for the new generation. Omitted model and thinking fields restore the
|
|
58
|
+
saved session settings, while explicit definition fields override them.
|
|
58
59
|
Concurrent or otherwise conflicting managed representations of the exact
|
|
59
60
|
session fail closed. The controller's own active Pi session cannot be continued
|
|
60
61
|
to itself; use `delegate` with `fork` when a separate derived context is
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
It is separate from the structured model-facing `agent` API.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Agent-management commands require a lead Pi session with UI. Outside Herdr,
|
|
10
|
+
plain `/agents` remains available as a setup diagnostic.
|
|
10
11
|
|
|
11
12
|
## Usage
|
|
12
13
|
|
|
@@ -35,7 +36,7 @@ overrides only.
|
|
|
35
36
|
The details view can show:
|
|
36
37
|
|
|
37
38
|
- name and description;
|
|
38
|
-
- configured model and thinking;
|
|
39
|
+
- configured or inherited model and thinking;
|
|
39
40
|
- declared tool policy represented by definition metadata (not a complete
|
|
40
41
|
runtime capability probe);
|
|
41
42
|
- named skills;
|
|
@@ -57,12 +58,13 @@ Model
|
|
|
57
58
|
Thinking
|
|
58
59
|
Enabled
|
|
59
60
|
Details…
|
|
60
|
-
Back
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Model selection refreshes Pi's registry and stores the canonical provider/model
|
|
64
|
-
token. `
|
|
65
|
-
|
|
64
|
+
token. `Inherit current session` removes the selected field. Unset model and
|
|
65
|
+
thinking rows display `inherit · <current session value>` when the current
|
|
66
|
+
value is available. Thinking uses Pi's supported levels when the selected
|
|
67
|
+
model is known.
|
|
66
68
|
|
|
67
69
|
When Pi provides an explicit scoped-model list, that scope is used. Otherwise
|
|
68
70
|
available models are offered.
|
|
@@ -78,12 +80,14 @@ Details re-resolves the selected definition when opened, so it reflects current
|
|
|
78
80
|
overlays and body references even if the menu remained open while configuration
|
|
79
81
|
changed.
|
|
80
82
|
|
|
81
|
-
Changes apply to future
|
|
82
|
-
|
|
83
|
+
Changes apply to future assignments, not already-running agents or the lead Pi
|
|
84
|
+
session. Fresh `delegate` assignments inherit the spawning controller's
|
|
85
|
+
current settings when fields are unset; `continue` restores the saved
|
|
86
|
+
session's settings.
|
|
83
87
|
|
|
84
|
-
Standalone global definitions are editable too. Removing a
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
Standalone global definitions are editable too. Removing a model or thinking
|
|
89
|
+
field selects `Inherit current session`; removing any other field inherits its
|
|
90
|
+
lower-precedence value.
|
|
87
91
|
|
|
88
92
|
## `/agents` Running
|
|
89
93
|
|
package/package.json
CHANGED