pi-herdsman 0.13.2 → 0.14.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 +42 -17
- package/docs/README.md +32 -25
- package/docs/getting-started.md +3 -0
- package/docs/guides/container-deployment.md +173 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -7,15 +7,21 @@
|
|
|
7
7
|
[](https://github.com/boadij/pi-herdsman/actions/workflows/validate.yml)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
|
-
**Asynchronous [Pi](https://github.com/earendil-works/pi) subagents and agent fleet orchestration with nested delegation,
|
|
10
|
+
**Asynchronous [Pi](https://github.com/earendil-works/pi) subagents and agent fleet orchestration for parallel coding agents with nested delegation, background work, and supervision in [herdr](https://github.com/herdrdev/herdr).**
|
|
11
11
|
|
|
12
12
|
Keep the conversation. Delegate the work.
|
|
13
13
|
|
|
14
|
-
Pi Herdsman is a Pi extension for asynchronous subagents
|
|
15
|
-
tasks to managed background agents running in
|
|
16
|
-
the lead conversation stays interactive. Run
|
|
17
|
-
delegation, steer active agents, route
|
|
18
|
-
owning agent, and supervise multiple leads
|
|
14
|
+
Pi Herdsman is a Pi extension for asynchronous subagents and multi-agent
|
|
15
|
+
coding. Delegate coding tasks to managed background agents running in
|
|
16
|
+
independent Pi sessions while the lead conversation stays interactive. Run
|
|
17
|
+
coding agents in parallel, nest delegation, steer active agents, route
|
|
18
|
+
questions and results back to their owning agent, and supervise multiple leads
|
|
19
|
+
through one coordinated hierarchy.
|
|
20
|
+
|
|
21
|
+
Use it in an existing Pi/herdr setup or deploy the SSH-ready container as a
|
|
22
|
+
portable remote coding-agent environment. [herdr Machines](https://herdr.dev/docs/connecting-machines/)
|
|
23
|
+
can bring local and remote workspaces and agents into one herdr window over
|
|
24
|
+
normal SSH.
|
|
19
25
|
|
|
20
26
|
Pi Herdsman calls its managed subagents **agents**.
|
|
21
27
|
|
|
@@ -34,22 +40,14 @@ agents, and a delegation-enabled agent may own permitted agents of its own.
|
|
|
34
40
|
Agent definitions, models, tools, extensions, and development process remain up
|
|
35
41
|
to you.
|
|
36
42
|
|
|
37
|
-
Chief supervision is separate from ownership:
|
|
38
|
-
|
|
39
|
-
```text
|
|
40
|
-
chief
|
|
41
|
-
├─ herd A / lead A
|
|
42
|
-
│ └─ agents...
|
|
43
|
-
└─ herd B / lead B
|
|
44
|
-
└─ agents...
|
|
45
|
-
```
|
|
46
|
-
|
|
47
43
|
## Demo
|
|
48
44
|
|
|
49
45
|

|
|
50
46
|
|
|
51
47
|
## Install
|
|
52
48
|
|
|
49
|
+
### Existing Pi / herdr
|
|
50
|
+
|
|
53
51
|
```sh
|
|
54
52
|
pi install npm:pi-herdsman
|
|
55
53
|
herdr integration install pi
|
|
@@ -67,6 +65,22 @@ Then run Pi in the Herdr pane:
|
|
|
67
65
|
pi
|
|
68
66
|
```
|
|
69
67
|
|
|
68
|
+
### Docker / remote machine
|
|
69
|
+
|
|
70
|
+
For a self-contained, SSH-ready remote coding-agent environment, see
|
|
71
|
+
[Container deployment](docs/guides/container-deployment.md).
|
|
72
|
+
|
|
73
|
+
Once normal SSH access works, the same container can be saved as a herdr
|
|
74
|
+
machine:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
herdr machine add ssh://herdsman@host:2222 --label my-herd
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
A host defined in normal SSH configuration can be used directly instead.
|
|
81
|
+
|
|
82
|
+
## Try it
|
|
83
|
+
|
|
70
84
|
Ask Pi normally:
|
|
71
85
|
|
|
72
86
|
```text
|
|
@@ -97,6 +111,16 @@ To supervise independent leads across the current herdr runtime, use:
|
|
|
97
111
|
/chief
|
|
98
112
|
```
|
|
99
113
|
|
|
114
|
+
Chief supervision is separate from ownership:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
chief
|
|
118
|
+
├─ herd A / lead A
|
|
119
|
+
│ └─ agents...
|
|
120
|
+
└─ herd B / lead B
|
|
121
|
+
└─ agents...
|
|
122
|
+
```
|
|
123
|
+
|
|
100
124
|
Leave chief mode with:
|
|
101
125
|
|
|
102
126
|
```text
|
|
@@ -158,7 +182,8 @@ tools, extensions, skills, and instructions.
|
|
|
158
182
|
- Pi `>=0.87.0 <0.88.0` (supported)
|
|
159
183
|
- Node `>=22.19.0`
|
|
160
184
|
|
|
161
|
-
CI validates Node 22.19.0
|
|
185
|
+
Package CI validates the minimum supported Node 22.19.0 runtime. The container
|
|
186
|
+
separately ships and validates Node 26.
|
|
162
187
|
|
|
163
188
|
Install or refresh the herdr Pi integration:
|
|
164
189
|
|
package/docs/README.md
CHANGED
|
@@ -33,6 +33,12 @@ Continue with:
|
|
|
33
33
|
- [Agent-definition schema](reference/agent-definition-schema.md)
|
|
34
34
|
- [Recovery](guides/recovery.md)
|
|
35
35
|
|
|
36
|
+
### Deploy Pi Herdsman in a container
|
|
37
|
+
|
|
38
|
+
Use the canonical [container deployment guide](guides/container-deployment.md)
|
|
39
|
+
for the SSH-ready Docker image, persistent state, updates, and optional
|
|
40
|
+
Tailscale networking.
|
|
41
|
+
|
|
36
42
|
### Coordinate through agent APIs
|
|
37
43
|
|
|
38
44
|
Start with [Agent coordination API](agent-api.md).
|
|
@@ -71,31 +77,32 @@ before choosing the material relevant to them.
|
|
|
71
77
|
|
|
72
78
|
## Canonical ownership
|
|
73
79
|
|
|
74
|
-
| Subject | Canonical page
|
|
75
|
-
| ------------------------------------- |
|
|
76
|
-
| Human UI first use | [Getting started](getting-started.md)
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
| `
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
80
|
+
| Subject | Canonical page |
|
|
81
|
+
| ------------------------------------- | ------------------------------------------------------------------------------- |
|
|
82
|
+
| Human UI first use | [Getting started](getting-started.md) |
|
|
83
|
+
| Container deployment | [Container deployment](guides/container-deployment.md) |
|
|
84
|
+
| Agent/API first use | [Agent coordination API](agent-api.md) |
|
|
85
|
+
| Asynchronous orchestration | [Lifecycle](concepts/lifecycle.md) |
|
|
86
|
+
| Agent identity | [Agents and identity](concepts/agents.md) |
|
|
87
|
+
| State transitions | [Lifecycle](concepts/lifecycle.md) |
|
|
88
|
+
| Delegation model | [Delegation](concepts/delegation.md) |
|
|
89
|
+
| Creating definitions | [Agent definitions](guides/agent-definitions.md) |
|
|
90
|
+
| Overrides and prompt composition | [Customizing bundled agents](guides/customizing-agents.md) |
|
|
91
|
+
| `files`, body references, and results | [Handoffs and files](guides/handoffs.md) |
|
|
92
|
+
| Operator recovery | [Recovery](guides/recovery.md) |
|
|
93
|
+
| `agent` request contract | [`agent` API](reference/agent.md) |
|
|
94
|
+
| `ask_owner` contract | [`ask_owner` API](reference/ask-owner.md) |
|
|
95
|
+
| Pi Herdsman supervision concept | [Supervision](concepts/supervision.md) |
|
|
96
|
+
| Chief and staff tools | [Supervision reference](reference/supervision.md) |
|
|
97
|
+
| Frontmatter fields | [Agent-definition schema](reference/agent-definition-schema.md) |
|
|
98
|
+
| Public agent states | [Agent states](reference/agent-states.md) |
|
|
99
|
+
| `/agents` human commands | [`/agents` commands](reference/commands.md) |
|
|
100
|
+
| Settings | [Configuration](reference/configuration.md) |
|
|
101
|
+
| TUI agent widget | [Status widget](reference/status-widget.md) |
|
|
102
|
+
| Error categories | [Errors](reference/errors.md) |
|
|
103
|
+
| Repository checks | [Validation](development/validation.md) |
|
|
104
|
+
| Live acceptance | [Smoke testing](development/smoke-testing.md) |
|
|
105
|
+
| Instruction and interface design | [Instruction and interface design](development/instruction-interface-design.md) |
|
|
99
106
|
|
|
100
107
|
When another page needs one of these subjects, it summarizes only enough to
|
|
101
108
|
establish context and links to the canonical page instead of restating the full
|
package/docs/getting-started.md
CHANGED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Container deployment
|
|
2
|
+
|
|
3
|
+
Run Pi Herdsman as a portable SSH-accessible coding-agent environment with Pi, Herdr, developer tools, and persistent state.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
Start:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
SSH_AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" docker compose up -d
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Connect:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
ssh -p 2222 herdsman@your-host
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Herdr opens automatically. Select a workspace and run:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pi
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
That's it.
|
|
26
|
+
|
|
27
|
+
## Add it to Herdr
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
herdr machine add ssh://herdsman@your-host:2222 --label my-herd
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
With an existing `~/.ssh/config` host:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
herdr machine add my-herd --label my-herd
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The remote machine then appears alongside Local in Herdr.
|
|
40
|
+
|
|
41
|
+
## Use Tailscale
|
|
42
|
+
|
|
43
|
+
Start with the Tailscale sidecar:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
TS_AUTHKEY=tskey-auth-... \
|
|
47
|
+
SSH_AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" \
|
|
48
|
+
docker compose \
|
|
49
|
+
-f compose.yaml \
|
|
50
|
+
-f compose.tailscale.yaml \
|
|
51
|
+
up -d
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Connect:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
ssh herdsman@pi-herdsman
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Add it to Herdr:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
herdr machine add ssh://herdsman@pi-herdsman --label my-herd
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Use another hostname:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
TAILSCALE_HOSTNAME=my-herd \
|
|
70
|
+
TS_AUTHKEY=tskey-auth-... \
|
|
71
|
+
SSH_AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" \
|
|
72
|
+
docker compose \
|
|
73
|
+
-f compose.yaml \
|
|
74
|
+
-f compose.tailscale.yaml \
|
|
75
|
+
up -d
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Tailscale provides networking only. SSH remains normal OpenSSH.
|
|
79
|
+
|
|
80
|
+
## Update
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
docker compose pull
|
|
84
|
+
docker compose up -d
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Persistent state survives container replacement.
|
|
88
|
+
|
|
89
|
+
## Use a host bind mount
|
|
90
|
+
|
|
91
|
+
The default Docker-managed volume needs no manual permission setup.
|
|
92
|
+
|
|
93
|
+
For a Linux or NAS bind mount, prepare the directory for the UID/GID the
|
|
94
|
+
container will use:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
PUID=1035
|
|
98
|
+
PGID=65537
|
|
99
|
+
|
|
100
|
+
mkdir -p ./data/herdsman-home
|
|
101
|
+
sudo chown "$PUID:$PGID" ./data/herdsman-home
|
|
102
|
+
sudo chmod go-w ./data/herdsman-home
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Set the same IDs in `.env`:
|
|
106
|
+
|
|
107
|
+
```dotenv
|
|
108
|
+
PUID=1035
|
|
109
|
+
PGID=65537
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Create `compose.bind-mount.yaml` to replace the home volume with the host
|
|
113
|
+
directory while keeping the SSH server identity in its named volume:
|
|
114
|
+
|
|
115
|
+
```yaml
|
|
116
|
+
services:
|
|
117
|
+
herdsman:
|
|
118
|
+
volumes:
|
|
119
|
+
- ./data/herdsman-home:/home/herdsman
|
|
120
|
+
- herdsman-ssh:/var/lib/herdsman/ssh
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Start with both Compose files:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
SSH_AUTHORIZED_KEYS="$(cat ~/.ssh/id_ed25519.pub)" \
|
|
127
|
+
docker compose -f compose.yaml -f compose.bind-mount.yaml up -d
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
OpenSSH requires the home directory to be owned by root or the login user and
|
|
131
|
+
not writable by group or others. The container validates this at startup but
|
|
132
|
+
does not change ownership or permissions of host bind mounts.
|
|
133
|
+
|
|
134
|
+
## Forward your SSH agent
|
|
135
|
+
|
|
136
|
+
For private Git repositories:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
ssh -A -p 2222 herdsman@your-host
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Install another tool
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
mise use -g uv@latest
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Tools installed with mise persist in the home volume.
|
|
149
|
+
|
|
150
|
+
## What persists?
|
|
151
|
+
|
|
152
|
+
| Path | Contents |
|
|
153
|
+
| ----------------------- | --------------------------------------------------------------------------------- |
|
|
154
|
+
| `/home/herdsman` | Pi and Herdr state, repositories, config, credentials, SSH state, installed tools |
|
|
155
|
+
| `/var/lib/herdsman/ssh` | SSH server identity |
|
|
156
|
+
|
|
157
|
+
Running processes do not survive a container restart.
|
|
158
|
+
|
|
159
|
+
## Defaults
|
|
160
|
+
|
|
161
|
+
| Setting | Default |
|
|
162
|
+
| ------------------ | ------------- |
|
|
163
|
+
| SSH port | `2222` |
|
|
164
|
+
| User | `herdsman` |
|
|
165
|
+
| Tailscale hostname | `pi-herdsman` |
|
|
166
|
+
| Password login | disabled |
|
|
167
|
+
| Root SSH login | disabled |
|
|
168
|
+
|
|
169
|
+
`SSH_AUTHORIZED_KEYS` is required only on first start. Existing authorized keys are not overwritten.
|
|
170
|
+
|
|
171
|
+
Pi sessions automatically receive the container environment context from `/AGENTS.md`.
|
|
172
|
+
|
|
173
|
+
See the [Herdr machine documentation](https://herdr.dev/docs/connecting-machines/) for machine and SSH configuration.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-herdsman",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Asynchronous Pi subagents and agent fleet orchestration with nested delegation,
|
|
5
|
+
"description": "Asynchronous Pi subagents and agent fleet orchestration for parallel coding agents with nested delegation, background work, and supervision in herdr.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -22,10 +22,12 @@
|
|
|
22
22
|
"agents",
|
|
23
23
|
"ai-agents",
|
|
24
24
|
"coding-agents",
|
|
25
|
+
"coding-agent-orchestration",
|
|
25
26
|
"multi-agent",
|
|
26
27
|
"multi-agent-coding",
|
|
27
28
|
"agent-fleet",
|
|
28
29
|
"parallel-agents",
|
|
30
|
+
"parallel-coding-agents",
|
|
29
31
|
"background-agents",
|
|
30
32
|
"nested-agents",
|
|
31
33
|
"agent-orchestration",
|