pi-herdsman 0.6.0 → 0.6.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/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-check-requirements). The lead Pi session
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
@@ -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 detached,
35
- isolated process group with a bounded suite deadline. Node's native TypeScript
36
- support strips types while loading the source, and the test runner discovers
37
- the `.test.ts` files automatically.
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
- The test runner runs in a detached POSIX process group.
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 the suite deadline, the runner attempts:
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 group disappeared.
57
+ 4. bounded proof that the process tree disappeared.
56
58
 
57
- A test runner that leaks descendants after normal exit is reported as a failure
58
- and cleaned through the same group boundary.
59
+ On Windows, the runner invokes `taskkill.exe /PID <pid> /T /F` and waits for
60
+ the runner process to disappear.
59
61
 
60
- Windows is not supported by this process-group validation runner.
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 process-group cleanup
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
 
@@ -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`,
@@ -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
@@ -50,7 +50,9 @@ recovery error is present, inspect its exact details.
50
50
  ## Inactivity advisory
51
51
 
52
52
  A `working` agent with an exact active assignment can become advisory `stale`
53
- after ten minutes without observed Pi turn, message, or tool activity.
53
+ after ten minutes without qualifying execution progress. Model streaming,
54
+ turn/message boundaries, and tool execution start/end boundaries count;
55
+ streaming tool updates alone do not reset progress.
54
56
 
55
57
  Possible list fields:
56
58
 
@@ -225,13 +225,18 @@ A body line is a reference only when the complete trimmed line matches:
225
225
  @~/home-relative/path
226
226
  ```
227
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
+
228
233
  Before bundled/global body composition, relative references are resolved from
229
234
  the definition file that declared them.
230
235
 
231
236
  When a new agent generation is constructed:
232
237
 
233
- 1. references are processed in body order; `~/` is resolved beneath the
234
- 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;
235
240
  2. targets are canonicalized with `realpath`;
236
241
  3. each canonical file is included once;
237
242
  4. a caller `delegate.files` canonical overlap wins and removes the body copy;
@@ -48,7 +48,11 @@ model metadata, missing activity, a guessed session, or an old agent identity.
48
48
  ## Inactivity fields
49
49
 
50
50
  A qualifying `working` agent may also report `stale`, `inactive_ms`, and
51
- `last_activity_at`. This advisory does not change the state or prove a hang.
51
+ `last_activity_at`. Qualifying progress includes model streaming and tool
52
+ execution boundaries (`tool_execution_start` and `tool_execution_end`), along
53
+ with the surrounding turn and message boundaries. Streaming tool updates alone
54
+ do not advance `last_activity_at`. This advisory does not change the state or
55
+ prove a hang.
52
56
 
53
57
  ## See also
54
58
 
@@ -150,8 +150,11 @@ when the exact message limit permits. Otherwise they remain canonical references
150
150
 
151
151
  `timeoutMs` is valid on `delegate` and `continue` and must be an integer
152
152
  from `5001` through `300000`. The startup budget reserves one bounded diagnostic
153
- window. Current message limits are governed by the Herdsman config file and its
154
- defaults, plus the fixed mailbox protocol ceiling. Managed mailbox records use
153
+ window; it is unrelated to managed-agent Pi shell execution. Direct calls from
154
+ a managed agent to the Pi built-in `bash` or `powershell` tool receive a default
155
+ 600-second timeout when the call omits `timeout`; an explicit timeout is kept
156
+ unchanged. Current message limits are governed by the Herdsman config file and
157
+ its defaults, plus the fixed mailbox protocol ceiling. Managed mailbox records use
155
158
  protocol V4 in the `mailboxes-v4` namespace, and control requests use the marker prefix
156
159
  `__PI_HERDSMAN_AGENT_V4__:`.
157
160
 
@@ -75,9 +75,9 @@ Example:
75
75
 
76
76
  The header reports exact non-zero lifecycle states in the order `working`,
77
77
  `blocked`, `settling`, `starting`, and `unknown`. `starting` is a
78
- presentation-only count for assignments whose final label and mailbox claim
79
- are known but whose authoritative agent startup has not completed. It is not
80
- mailbox state, control authority, or Running inventory.
78
+ presentation-only count for controller-local assignments that have begun
79
+ startup but have not yet become active or terminal. It is not mailbox state,
80
+ control authority, or Running inventory.
81
81
 
82
82
  Before the first successful refresh, the header says `unavailable`.
83
83
 
@@ -103,10 +103,13 @@ useful room before it is truncated.
103
103
 
104
104
  Working rows use `● working`, blocked rows use `◐ blocked`, settling rows use
105
105
  `◌ settling`, starting rows use `◌ starting`, and unknown rows use `? unknown`.
106
- Working, settling, and starting animate; blocked and unknown rows are static. A
107
- starting row is reconciled away
108
- when authoritative agent evidence replaces it, and is removed on startup
109
- failure, rollback, repeated session start, or shutdown.
106
+ Working, settling, and starting animate; blocked and unknown rows are static.
107
+ While a controller-local start remains pending, an authoritative `settling`
108
+ row is presented as `starting` so launch and request handoff remain visually
109
+ continuous. `working`, `blocked`, and `unknown` authoritative states are never
110
+ overridden. A starting row is removed when its exact request becomes active or
111
+ terminal, its local runtime is removed, startup fails or rolls back, the
112
+ controller session restarts, or shutdown clears transient state.
110
113
 
111
114
  `Running` inspection shows every authoritative agent row and excludes
112
115
  presentation-only starting rows. A terminal result is followed by cleanup; the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-herdsman",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "description": "Asynchronous Pi subagents and agent fleet orchestration with nested delegation, parallel execution, and supervision in herdr.",
6
6
  "license": "Apache-2.0",