pi-herdsman 0.4.0 → 0.5.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 +4 -4
- package/SKILL.md +18 -16
- package/dist/index.js +83 -81
- package/docs/agent-api.md +1 -1
- package/docs/concepts/agents.md +15 -16
- package/docs/concepts/lifecycle.md +5 -5
- package/docs/concepts/supervision.md +1 -1
- package/docs/development/documentation.md +1 -1
- package/docs/development/smoke-testing.md +7 -5
- package/docs/getting-started.md +3 -3
- package/docs/guides/agent-definitions.md +1 -1
- package/docs/guides/customizing-agents.md +1 -1
- package/docs/guides/handoffs.md +54 -20
- package/docs/guides/recovery.md +8 -7
- package/docs/reference/agent-definition-schema.md +2 -2
- package/docs/reference/agent.md +32 -37
- package/docs/reference/commands.md +3 -3
- package/docs/reference/configuration.md +48 -96
- package/docs/reference/errors.md +1 -1
- package/package.json +2 -2
|
@@ -2,125 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
[Documentation index](../README.md)
|
|
4
4
|
|
|
5
|
-
Pi Herdsman
|
|
6
|
-
|
|
7
|
-
Agent behavior lives in Markdown definitions. The extension settings currently
|
|
8
|
-
own agent placement.
|
|
9
|
-
|
|
10
|
-
## Agent placement
|
|
11
|
-
|
|
12
|
-
Settings shape:
|
|
13
|
-
|
|
14
|
-
```json
|
|
15
|
-
{
|
|
16
|
-
"piHerdsman": {
|
|
17
|
-
"spawnPlacement": "subtree"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Supported values:
|
|
5
|
+
Pi Herdsman keeps its configuration in one flat, user-wide file:
|
|
23
6
|
|
|
24
7
|
```text
|
|
25
|
-
|
|
26
|
-
subtree
|
|
27
|
-
split
|
|
8
|
+
<Pi agent directory>/pi-herdsman/config.json
|
|
28
9
|
```
|
|
29
10
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
When no `spawnPlacement` value is configured, it resolves to `subtree`.
|
|
37
|
-
Unrecognized values remain invalid and resolve to `tab`.
|
|
38
|
-
|
|
39
|
-
`tab` places future direct agents owned by a lead in one dedicated agents tab.
|
|
40
|
-
|
|
41
|
-
`subtree` gives each future lead-direct agent its own tab. Descendants always
|
|
42
|
-
split inside their owner's current tab.
|
|
11
|
+
The default location is `~/.pi/agent/pi-herdsman/config.json`. Pi's native
|
|
12
|
+
`getAgentDir()` determines the agent directory, so setting
|
|
13
|
+
`PI_CODING_AGENT_DIR` relocates the file to
|
|
14
|
+
`$PI_CODING_AGENT_DIR/pi-herdsman/config.json`.
|
|
43
15
|
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
Project trust and project settings do not affect Herdsman configuration.
|
|
17
|
+
Agent definitions remain a separate feature and continue to use the bundled,
|
|
18
|
+
project-local, and user agent-definition locations described in the
|
|
19
|
+
[agent-definition guide](../guides/agent-definitions.md).
|
|
46
20
|
|
|
47
|
-
|
|
21
|
+
## Schema and defaults
|
|
48
22
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Pi Herdsman uses two independent byte settings:
|
|
23
|
+
The file contains only explicitly configured overrides. The accepted flat
|
|
24
|
+
schema is:
|
|
52
25
|
|
|
53
26
|
```json
|
|
54
27
|
{
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
28
|
+
"spawnPlacement": "subtree",
|
|
29
|
+
"inlineAttachmentLimitBytes": 131072,
|
|
30
|
+
"mailboxPayloadLimitBytes": 131072
|
|
59
31
|
}
|
|
60
32
|
```
|
|
61
33
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
`
|
|
68
|
-
|
|
69
|
-
admission limit is the smaller of the configured mailbox limit and 8 KiB.
|
|
34
|
+
An absent file means these defaults:
|
|
35
|
+
|
|
36
|
+
| Field | Default | Allowed values |
|
|
37
|
+
| ---------------------------- | -----------------: | ------------------------------------------------- |
|
|
38
|
+
| `spawnPlacement` | `subtree` | `tab`, `subtree`, `split` |
|
|
39
|
+
| `inlineAttachmentLimitBytes` | `131072` (128 KiB) | integer from 1024 (1 KiB) through 1048576 (1 MiB) |
|
|
40
|
+
| `mailboxPayloadLimitBytes` | `131072` (128 KiB) | integer from 1024 (1 KiB) through 1048576 (1 MiB) |
|
|
70
41
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
fixed 1 MiB protocol safety ceiling remains in force for reading existing
|
|
75
|
-
mailbox records.
|
|
42
|
+
Malformed JSON, a non-object root, unknown fields, and invalid known values
|
|
43
|
+
are errors. Reads do not create the directory or file. Configuration changes
|
|
44
|
+
through `/agents` update this single file atomically.
|
|
76
45
|
|
|
77
|
-
|
|
46
|
+
`inlineAttachmentLimitBytes` applies per file. Eligible complete strict UTF-8
|
|
47
|
+
files are embedded only when the exact serialized mailbox record fits; other
|
|
48
|
+
files remain canonical references. `mailboxPayloadLimitBytes` limits the exact
|
|
49
|
+
serialized request, ask, or chief message record. Chief messages also retain
|
|
50
|
+
their fixed 8 KiB protocol ceiling.
|
|
78
51
|
|
|
79
|
-
|
|
52
|
+
Placement affects future starts, not existing agents. `tab` uses one lead-owned
|
|
53
|
+
agents tab, `subtree` gives each lead-direct agent its own tab, and `split`
|
|
54
|
+
splits from the caller's pane. Nested delegation always splits in its owner's
|
|
55
|
+
current tab.
|
|
80
56
|
|
|
81
|
-
|
|
82
|
-
(default `~/.pi/agent/settings.json`).
|
|
57
|
+
## Reset
|
|
83
58
|
|
|
84
|
-
|
|
59
|
+
Stop active Pi and Herdsman processes first; running processes may recreate
|
|
60
|
+
runtime state. Then delete the complete Herdsman directory at this canonical
|
|
61
|
+
location:
|
|
85
62
|
|
|
86
63
|
```text
|
|
87
|
-
<
|
|
64
|
+
<resolved Pi agent directory>/pi-herdsman/
|
|
88
65
|
```
|
|
89
66
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
`/agents placement` opens a native selector showing the effective value and
|
|
98
|
-
offering `tab`, `subtree`, or `split`. Selecting a value writes to the current effective
|
|
99
|
-
scope and verifies the value after writing; the confirmation reports whether
|
|
100
|
-
that scope is `project` or `global`.
|
|
101
|
-
|
|
102
|
-
## Agent definitions are not extension settings
|
|
103
|
-
|
|
104
|
-
Do not put per-agent model, thinking, tool, skill, extension, body, or
|
|
105
|
-
delegation policy in `piHerdsman`.
|
|
67
|
+
`<resolved Pi agent directory>` means the result of Pi's native
|
|
68
|
+
`getAgentDir()`. With a custom `PI_CODING_AGENT_DIR`, Pi resolves that value
|
|
69
|
+
(including values such as `~`) before appending `pi-herdsman`; do not construct
|
|
70
|
+
the path by concatenating the raw environment variable yourself. Use the
|
|
71
|
+
native file-management operation for the current platform to delete that
|
|
72
|
+
directory.
|
|
106
73
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Trusted project-local definitions are discovered from `<cwd>/.pi/agents/`.
|
|
110
|
-
|
|
111
|
-
See:
|
|
112
|
-
|
|
113
|
-
- [Agent definitions](../guides/agent-definitions.md)
|
|
114
|
-
- [Agent-definition schema](agent-definition-schema.md)
|
|
115
|
-
|
|
116
|
-
## herdr integration
|
|
117
|
-
|
|
118
|
-
The required Pi integration is installed separately:
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
herdr integration install pi
|
|
122
|
-
herdr integration status
|
|
123
|
-
```
|
|
74
|
+
The next process starts with the defaults and recreates only the runtime state
|
|
75
|
+
it needs.
|
|
124
76
|
|
|
125
77
|
## See also
|
|
126
78
|
|
package/docs/reference/errors.md
CHANGED
|
@@ -38,7 +38,7 @@ must not be presented as exhausted cleanup.
|
|
|
38
38
|
| Category | Meaning |
|
|
39
39
|
| -------------------------- | ----------------------------------------------------------------------------------- |
|
|
40
40
|
| `not_running_inside_herdr` | Required herdr environment is missing. |
|
|
41
|
-
| `agent_label_exists` | Requested
|
|
41
|
+
| `agent_label_exists` | Requested, inherited, or generated live label conflicts with an existing agent. |
|
|
42
42
|
| `pane_not_ready` | Agent pane/startup did not reach the required readiness boundary. |
|
|
43
43
|
| `target_not_found` | Exact requested identity or ownership evidence was not found. |
|
|
44
44
|
| `target_ambiguous` | More than one live candidate matched an identity that must be exact. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-herdsman",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"image": "https://raw.githubusercontent.com/boadij/pi-herdsman/main/docs/assets/thumbnail.webp"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
|
-
"test": "node --experimental-test-module-mocks --test --test-timeout=10000",
|
|
44
|
+
"test": "node --experimental-test-module-mocks --import=./scripts/test-env.mjs --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",
|