pi-herdsman 0.3.1 → 0.4.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/README.md +14 -2
- package/dist/index.js +66 -69
- package/docs/assets/banner.webp +0 -0
- package/docs/assets/thumbnail.webp +0 -0
- package/docs/development/smoke-testing.md +10 -7
- package/docs/getting-started.md +5 -6
- package/docs/guides/agent-definitions.md +39 -13
- package/docs/reference/agent-definition-schema.md +11 -3
- package/docs/reference/commands.md +4 -4
- package/docs/reference/configuration.md +1 -13
- package/package.json +7 -6
package/docs/assets/banner.webp
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -15,16 +15,19 @@ Verify:
|
|
|
15
15
|
```sh
|
|
16
16
|
node --version
|
|
17
17
|
pi --version
|
|
18
|
-
herdr --
|
|
18
|
+
herdr status --json
|
|
19
19
|
herdr integration status
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
The `herdr status --json` output is the Herdr 0.9 CLI protocol compatibility
|
|
23
|
+
preflight. It must report a Herdr client version of `>=0.9.0`,
|
|
24
|
+
`server.running` as `true`, and `server.compatible` as `true`.
|
|
25
|
+
|
|
22
26
|
The supported repository contract requires:
|
|
23
27
|
|
|
24
28
|
- Node `>=22.19.0`
|
|
25
29
|
- Pi `>=0.84.2 <0.86.0`
|
|
26
|
-
- herdr `>=0.
|
|
27
|
-
- herdr Pi integration version `2` or newer
|
|
30
|
+
- herdr `>=0.9.0`
|
|
28
31
|
|
|
29
32
|
Run focused tests and other intermediate checks before this smoke suite. Do
|
|
30
33
|
not format during smoke testing; complete smoke testing and review before the
|
|
@@ -189,9 +192,9 @@ Verify the native Definitions selector shows:
|
|
|
189
192
|
Structured `agent list` should still retain exact deterministic metadata.
|
|
190
193
|
|
|
191
194
|
Select a disposable bundled, project, or global definition and change its
|
|
192
|
-
model, thinking, and enabled state. Confirm that project discovery requires
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
model, thinking, and enabled state. Confirm that project discovery requires Pi
|
|
196
|
+
project trust and that these edits write global overrides only, not project
|
|
197
|
+
files.
|
|
195
198
|
|
|
196
199
|
Verify unrelated frontmatter and body remain unchanged, `Use default` removes
|
|
197
200
|
only the selected field, fresh definition delegations and session continuations
|
|
@@ -249,7 +252,7 @@ substitutes for these checks.
|
|
|
249
252
|
| Discover leads across multiple workspaces | NOT RUN |
|
|
250
253
|
| Exclude managed agents and the active Chief from leads | NOT RUN |
|
|
251
254
|
| Agent exclusion uses the production validated snapshot and stale/ambiguous generations fail closed | NOT RUN |
|
|
252
|
-
| Herdr `agent_status
|
|
255
|
+
| Herdr `agent_status` lifecycle normalization is reflected | NOT RUN |
|
|
253
256
|
| Nested agent aggregation attaches only to the proven lead | NOT RUN |
|
|
254
257
|
| A blocked agent does not mark its lead `needs you` | NOT RUN |
|
|
255
258
|
| Duplicate live agents, coordination records, or agent evidence fail closed | NOT RUN |
|
package/docs/getting-started.md
CHANGED
|
@@ -10,9 +10,8 @@ path.
|
|
|
10
10
|
|
|
11
11
|
You need:
|
|
12
12
|
|
|
13
|
-
- [herdr](https://github.com/herdrdev/herdr) `>=0.
|
|
13
|
+
- [herdr](https://github.com/herdrdev/herdr) `>=0.9.0`;
|
|
14
14
|
- Pi `>=0.84.2 <0.86.0` (the version range tested for this release);
|
|
15
|
-
- herdr Pi integration version `2` or newer;
|
|
16
15
|
- Node `>=22.19.0`.
|
|
17
16
|
|
|
18
17
|
Install or refresh the herdr Pi integration:
|
|
@@ -83,10 +82,10 @@ Stop all…
|
|
|
83
82
|
|
|
84
83
|
`Running` is the complete authoritative live-agent inventory and focuses the
|
|
85
84
|
selected pane directly. `Definitions` manages the effective bundled, project,
|
|
86
|
-
and global agent definitions.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
and global agent definitions. Trusted projects contribute definitions from
|
|
86
|
+
`.pi/agents/`; effective precedence is bundled < project < global. `Layout`
|
|
87
|
+
controls whether newly started agents use tabs or splits. `Stop all…` is
|
|
88
|
+
destructive emergency control.
|
|
90
89
|
|
|
91
90
|
See [`/agents` commands](reference/commands.md) for exact behavior.
|
|
92
91
|
|
|
@@ -29,26 +29,23 @@ Project definitions are optional and live in the current project:
|
|
|
29
29
|
<cwd>/.pi/agents/
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Pi Herdsman discovers project definitions when Pi considers the project
|
|
33
|
+
trusted. Precedence is:
|
|
33
34
|
|
|
34
35
|
```text
|
|
35
|
-
|
|
36
|
-
├── settings.json
|
|
37
|
-
└── agents/
|
|
38
|
-
└── reviewer.md
|
|
36
|
+
bundled < project < global
|
|
39
37
|
```
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
Global definitions remain final user policy. For example:
|
|
42
40
|
|
|
43
|
-
```
|
|
44
|
-
|
|
41
|
+
```text
|
|
42
|
+
.pi/
|
|
43
|
+
└── agents/
|
|
44
|
+
└── reviewer.md
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
global definitions remain final user policy. Project definitions apply only to
|
|
50
|
-
their project cwd, and the Definitions UI writes global overrides, never
|
|
51
|
-
project files.
|
|
47
|
+
Project definitions apply only to their project cwd, and the Definitions UI
|
|
48
|
+
writes global overrides, never project files.
|
|
52
49
|
|
|
53
50
|
When Pi uses a custom agent directory, the global definitions live under that
|
|
54
51
|
agent directory's `agents/` subdirectory.
|
|
@@ -56,6 +53,35 @@ agent directory's `agents/` subdirectory.
|
|
|
56
53
|
A project or global definition whose `name` matches a lower-precedence
|
|
57
54
|
definition overlays it. An unmatched definition is standalone.
|
|
58
55
|
|
|
56
|
+
### Permission-aware extensions
|
|
57
|
+
|
|
58
|
+
Agent definitions may include a `permission:` mapping for compatible
|
|
59
|
+
permission-aware Pi extensions.
|
|
60
|
+
|
|
61
|
+
[`pi-permission-system`](https://github.com/gotgenes/pi-packages/tree/main/packages/pi-permission-system)
|
|
62
|
+
can consume the same global or trusted project-local agent definition as Pi
|
|
63
|
+
Herdsman:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
---
|
|
67
|
+
name: reviewer
|
|
68
|
+
tools: ["read", "ls", "find", "grep"]
|
|
69
|
+
permission:
|
|
70
|
+
"*": deny
|
|
71
|
+
read: allow
|
|
72
|
+
ls: allow
|
|
73
|
+
find: allow
|
|
74
|
+
grep: allow
|
|
75
|
+
---
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Pi Herdsman accepts and preserves `permission:` but does not evaluate its
|
|
79
|
+
contents or make authorization decisions from it. Managed agents also publish
|
|
80
|
+
the conventional active-agent identity and subagent lineage metadata used by
|
|
81
|
+
compatible extensions. Permission policy is effective only when the
|
|
82
|
+
compatible permission extension is loaded in that Pi session. The permission
|
|
83
|
+
extension is optional; Pi Herdsman does not install or depend on it.
|
|
84
|
+
|
|
59
85
|
## Enable or disable a definition
|
|
60
86
|
|
|
61
87
|
Definitions are enabled by default. Set `enabled: false` in a matching project
|
|
@@ -57,8 +57,8 @@ Global definitions by default:
|
|
|
57
57
|
A matching project or global name overlays the lower-precedence definition.
|
|
58
58
|
|
|
59
59
|
An unmatched project or global definition is standalone. Project definitions
|
|
60
|
-
are loaded from `<cwd>/.pi/agents/`
|
|
61
|
-
|
|
60
|
+
are loaded from `<cwd>/.pi/agents/` when Pi considers the project trusted.
|
|
61
|
+
Precedence is `bundled < project < global`.
|
|
62
62
|
|
|
63
63
|
All effective definitions are sorted and validated together, including every
|
|
64
64
|
`agents` reference.
|
|
@@ -84,6 +84,7 @@ available actions; disabling a definition does not mutate that assignment.
|
|
|
84
84
|
| `noBuiltinTools` | boolean | Pi normal built-in tool policy | `true` emits `--no-builtin-tools`. |
|
|
85
85
|
| `tools` | array of non-empty strings | no explicit allowlist | Passed to Pi as a source-agnostic tool-name allowlist; matching overlay replaces whole array. |
|
|
86
86
|
| `excludeTools` | array of non-empty strings | no explicit exclusions | Passed to Pi as source-agnostic tool-name exclusions; matching override replaces whole array. |
|
|
87
|
+
| `permission` | mapping | absent | Opaque interoperability policy for permission-aware extensions; Pi Herdsman does not evaluate it. |
|
|
87
88
|
| `noSkills` | boolean | skills disabled unless `inheritSkills: true` | Controls Pi native skill discovery; explicit `skills` values are still passed separately. |
|
|
88
89
|
| `inheritSkills` | boolean | does not enable by itself unless `true` | `true` changes omitted `noSkills` default so native skills remain available. Explicit `noSkills` wins. |
|
|
89
90
|
| `skills` | array of non-empty strings | no explicit skill arguments | Each value is passed unchanged as a Pi skill path/resource. |
|
|
@@ -93,6 +94,10 @@ available actions; disabling a definition does not mutate that assignment.
|
|
|
93
94
|
| `inheritProjectContext` | boolean | `true` only for definition name `delegate`; otherwise `false` | Controls project context-file inheritance. |
|
|
94
95
|
| `inheritGlobalContext` | boolean | follows effective `inheritProjectContext` | Controls global context-file inheritance. |
|
|
95
96
|
|
|
97
|
+
`permission` is reserved for compatible permission extensions. Pi Herdsman
|
|
98
|
+
accepts and preserves the mapping but does not validate its internal policy
|
|
99
|
+
schema or make authorization decisions from it.
|
|
100
|
+
|
|
96
101
|
Arrays supplied by an override replace the complete inherited array, including
|
|
97
102
|
an explicit `[]`.
|
|
98
103
|
|
|
@@ -230,10 +235,13 @@ Pi base system prompt
|
|
|
230
235
|
selected project/global context-file additions
|
|
231
236
|
↓
|
|
232
237
|
shared herdr agent guidance
|
|
238
|
+
↓
|
|
239
|
+
<active_agent name="<definition>"/>
|
|
233
240
|
```
|
|
234
241
|
|
|
235
242
|
The final effective body and shared guidance are delivered through private
|
|
236
|
-
temporary prompt snapshots.
|
|
243
|
+
temporary prompt snapshots. The active-agent tag is appended directly as
|
|
244
|
+
interoperability metadata for compatible Pi extensions.
|
|
237
245
|
|
|
238
246
|
## Complete override example
|
|
239
247
|
|
|
@@ -27,10 +27,10 @@ token. The enforced limits are bytes, not tokens.
|
|
|
27
27
|
## `/agents definitions`
|
|
28
28
|
|
|
29
29
|
Opens the native Definitions menu for the effective bundled, project, and
|
|
30
|
-
global roster. Project definitions are included
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
global roster. Project definitions are included when Pi considers the project
|
|
31
|
+
trusted. Project participation is marked `[project]`; a global override adds
|
|
32
|
+
`*` (so `[project] *` means both layers contribute). Edits write global
|
|
33
|
+
overrides only.
|
|
34
34
|
|
|
35
35
|
The details view can show:
|
|
36
36
|
|
|
@@ -106,16 +106,7 @@ delegation policy in `piHerdsman`.
|
|
|
106
106
|
|
|
107
107
|
Those belong in Markdown agent definitions.
|
|
108
108
|
|
|
109
|
-
Trusted project-local definitions
|
|
110
|
-
discovery gate in `<cwd>/.pi/settings.json`:
|
|
111
|
-
|
|
112
|
-
```json
|
|
113
|
-
{ "piHerdsman": { "projectAgents": true } }
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
The default is disabled, and a global `projectAgents` value has no effect.
|
|
117
|
-
This setting enables discovery only; agent models, tools, bodies, extensions,
|
|
118
|
-
and delegation remain in Markdown definitions.
|
|
109
|
+
Trusted project-local definitions are discovered from `<cwd>/.pi/agents/`.
|
|
119
110
|
|
|
120
111
|
See:
|
|
121
112
|
|
|
@@ -131,9 +122,6 @@ herdr integration install pi
|
|
|
131
122
|
herdr integration status
|
|
132
123
|
```
|
|
133
124
|
|
|
134
|
-
Pi Herdsman requires integration version `2` or newer for supported native session
|
|
135
|
-
identity/restore behavior.
|
|
136
|
-
|
|
137
125
|
## See also
|
|
138
126
|
|
|
139
127
|
- [`/agents` commands](commands.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-herdsman",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Asynchronous Pi agent orchestration with nested delegation, parallel execution, and supervision in herdr.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,20 +38,21 @@
|
|
|
38
38
|
"skills": [
|
|
39
39
|
"."
|
|
40
40
|
],
|
|
41
|
-
"image": "https://raw.githubusercontent.com/boadij/pi-herdsman/main/docs/assets/
|
|
41
|
+
"image": "https://raw.githubusercontent.com/boadij/pi-herdsman/main/docs/assets/thumbnail.webp"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"test": "node --experimental-test-module-mocks --test --test-timeout=10000",
|
|
45
45
|
"check": "node scripts/check.mjs",
|
|
46
46
|
"build": "node scripts/build.mjs",
|
|
47
47
|
"package:audit": "node scripts/package-audit.mjs",
|
|
48
|
-
"
|
|
48
|
+
"validate": "npm run check && npm run build && npm run package:audit",
|
|
49
|
+
"release:check": "npm run validate && npm publish --dry-run --ignore-scripts",
|
|
49
50
|
"prepack": "npm run build"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"@earendil-works/pi-ai": "
|
|
53
|
-
"@earendil-works/pi-coding-agent": "
|
|
54
|
-
"@earendil-works/pi-tui": "
|
|
53
|
+
"@earendil-works/pi-ai": ">=0.84.2 <0.86.0",
|
|
54
|
+
"@earendil-works/pi-coding-agent": ">=0.84.2 <0.86.0",
|
|
55
|
+
"@earendil-works/pi-tui": ">=0.84.2 <0.86.0",
|
|
55
56
|
"typebox": "*"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|