pi-herdsman 0.9.0 → 0.10.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/SKILL.md +52 -5
- package/dist/index.js +117 -97
- package/docs/concepts/agents.md +1 -1
- package/docs/concepts/lifecycle.md +50 -3
- package/docs/guides/handoffs.md +4 -4
- package/docs/guides/recovery.md +59 -6
- package/docs/reference/agent-states.md +37 -11
- package/docs/reference/agent.md +98 -15
- package/docs/reference/commands.md +6 -1
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -45,15 +45,26 @@ State describes what is happening; available_actions describes current control
|
|
|
45
45
|
eligibility. Every operation revalidates exact state and identity before
|
|
46
46
|
mutation.
|
|
47
47
|
|
|
48
|
-
The live-agent control actions are `steer`, `reply`, and `close`;
|
|
48
|
+
The live-agent control actions are `steer`, `interrupt`, `reply`, and `close`;
|
|
49
|
+
these mutate
|
|
49
50
|
live agent execution and are available only when listed. Read-only `inspect`
|
|
50
51
|
captures bounded live terminal/process evidence. Read-only `transcript` captures
|
|
51
52
|
bounded persisted Pi conversation and tool evidence when listed. Neither changes
|
|
52
53
|
agent state. A completed agent does not remain available for another assignment.
|
|
53
54
|
|
|
54
|
-
Use steer only to change active work.
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
Use steer only to change active work non-preemptively. Steering does not cancel
|
|
56
|
+
an in-flight model or tool operation; Pi may queue it until the current
|
|
57
|
+
operation reaches a safe boundary.
|
|
58
|
+
|
|
59
|
+
Use interrupt only when the current in-flight operation itself must be
|
|
60
|
+
abandoned. Interrupt is preemptive: it cancels the current Pi operation,
|
|
61
|
+
supersedes any earlier steering that Pi has not yet delivered, and continues
|
|
62
|
+
the same assignment with the required replacement message. Do not interrupt
|
|
63
|
+
merely because an agent is slow or marked stale; inactivity is advisory and
|
|
64
|
+
does not prove a hang.
|
|
65
|
+
|
|
66
|
+
Use reply only to answer a valid outstanding ask_owner question. Use close only
|
|
67
|
+
for intentional teardown or abandonment.
|
|
57
68
|
|
|
58
69
|
A lost agent is a managed assignment whose exact physical execution is proven
|
|
59
70
|
gone before a durable terminal result resolved it. Loss is not completion or
|
|
@@ -97,7 +108,7 @@ If list reports result_error, do not start a new delegation over unresolved
|
|
|
97
108
|
work. Resolve mailbox persistence first, then close the exact agent before
|
|
98
109
|
starting another assignment; follow the stored recovery nextAction.
|
|
99
110
|
|
|
100
|
-
Before delegate, continue, steer, or reply, make the message self-contained.
|
|
111
|
+
Before delegate, continue, steer, interrupt, or reply, make the message self-contained.
|
|
101
112
|
|
|
102
113
|
Do not attach or mention agent instruction files such as AGENTS.md, CLAUDE.md,
|
|
103
114
|
GEMINI.md, or equivalents merely because they exist. Rely on normal project or
|
|
@@ -293,6 +304,42 @@ retry destructive cleanup blindly, or silently take over delegated work.
|
|
|
293
304
|
See [Recovery](docs/guides/recovery.md) for operator procedures and the
|
|
294
305
|
[`agent` API](docs/reference/agent.md) for the exact machine contract.
|
|
295
306
|
|
|
307
|
+
## Health attention and turn completion
|
|
308
|
+
|
|
309
|
+
End a turn with unresolved agent work only when that work can still make
|
|
310
|
+
progress without the owner, or Herdsman is reconciling a durable transition
|
|
311
|
+
that can produce a future result or attention event. If an attention event
|
|
312
|
+
requires owner action, handle it before returning to passive waiting. If an
|
|
313
|
+
inactivity advisory appears healthy or legitimately long-running, leave it
|
|
314
|
+
alone and end the turn; Herdsman will reconcile it again.
|
|
315
|
+
|
|
316
|
+
Health reconciliation is event-driven with a 30-second fallback scan. Actionable
|
|
317
|
+
health attention is sent only to the exact direct owner and is based on freshly
|
|
318
|
+
reconciled state. Persistent state-specific attention may repeat while the
|
|
319
|
+
condition remains unresolved. Reminder timing is process-local and advisory;
|
|
320
|
+
restarting Herdsman can cause an unresolved condition to be reminded again.
|
|
321
|
+
|
|
322
|
+
The first stale advisory remains at ten minutes without qualifying execution
|
|
323
|
+
progress. Persistent attention repeats approximately `5m → 2m30s → 1m15s →
|
|
324
|
+
1m` with 30-second scan granularity. Stale attention is advisory, not proof of
|
|
325
|
+
a hang. Lost and delivered `ask_owner` attention retain their existing message
|
|
326
|
+
identity, while `result_error`, external runtime `blocked`, old unacknowledged
|
|
327
|
+
handoffs, and physical `unknown` use generic attention. An unresolved
|
|
328
|
+
unacknowledged request must not be duplicated or resubmitted: retained work is
|
|
329
|
+
not proof of non-delivery.
|
|
330
|
+
|
|
331
|
+
Use the event's current `available_actions` as advisory snapshot authority;
|
|
332
|
+
every action revalidates identity, ownership, and lifecycle. Use `transcript`
|
|
333
|
+
for persisted conversation and tool evidence, and `inspect` for live
|
|
334
|
+
terminal/process evidence. `steer` is cooperative and non-preemptive;
|
|
335
|
+
`interrupt` cancels the current operation, supersedes earlier steering Pi has
|
|
336
|
+
not yet delivered, and continues the same assignment.
|
|
337
|
+
Do not add automatic interrupt, close, restart, or redelegation. Physical
|
|
338
|
+
`unknown` remains fail-closed, has no mutation actions, and receives at most one
|
|
339
|
+
attention event per unresolved episode. `settling` alone is not a generic
|
|
340
|
+
attention condition. A live runtime blocked condition is distinct from a
|
|
341
|
+
delegating parent that is merely waiting for its direct children.
|
|
342
|
+
|
|
296
343
|
## Chief and staff
|
|
297
344
|
|
|
298
345
|
Ordinary leads own their complete herd, including every agent beneath them. The
|