pi-herdsman 0.1.4 → 0.2.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.
@@ -6,8 +6,8 @@ Pi Herdsman has two text-file mechanisms with different purposes:
6
6
 
7
7
  - `files` supplies evidence to delegate (definition or session), steer, reply,
8
8
  or ask_owner.
9
- - whole-line body `@file` references put definition-owned text into the worker
10
- system prompt when a new worker generation is built.
9
+ - whole-line body `@file` references put definition-owned text into the agent
10
+ system prompt when a new agent generation is built.
11
11
 
12
12
  Strict UTF-8 text is embedded when it fits; non-text and non-fitting files are
13
13
  canonical local references and are not copied or snapshotted.
@@ -15,11 +15,17 @@ canonical local references and are not copied or snapshotted.
15
15
  ## Message `files`
16
16
 
17
17
  For `delegate` with `definition`, `delegate` with `session`, `steer`, and
18
- `reply`, pass supporting artifacts, including
19
- applicable instruction or skill files, through `files` instead of mentioning
20
- only their paths in the task or message; explain each file's relevance in the
21
- accompanying text, and do not reattach skills already supplied by the selected
22
- agent definition.
18
+ `reply`, make the message self-contained. Do not attach or mention agent
19
+ instruction files such as `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, or equivalents
20
+ merely because they exist; rely on normal project or runtime discovery.
21
+
22
+ Attach an agent instruction file only when the task requires inspecting,
23
+ modifying, comparing, or transmitting it, the user explicitly requests it, or
24
+ its instructions are required and the target would not otherwise receive them.
25
+ Skills are separate: attach a required `SKILL.md` only when the task needs it
26
+ and the selected definition does not already provide that skill. Ordinary
27
+ relevant source, documentation, configuration, and evidence files remain
28
+ attachable.
23
29
 
24
30
  Example:
25
31
 
@@ -32,10 +38,30 @@ Example:
32
38
  }
33
39
  ```
34
40
 
41
+ The model-facing representation follows Pi's native `@file` convention:
42
+
43
+ ```xml
44
+ <file name="/absolute/canonical/path" bytes="123">
45
+ contents
46
+ </file>
47
+ ```
48
+
49
+ A reference-only file uses a self-closing tag:
50
+
51
+ ```xml
52
+ <file name="/absolute/canonical/path" bytes="123" />
53
+ ```
54
+
55
+ `name` is the canonical absolute path and `bytes` is the observed file size.
56
+ A body means the complete submission-time UTF-8 snapshot was embedded; a
57
+ self-closing tag means only the path and size reference was supplied. File
58
+ content remains raw text. This markup frames evidence for the model and is not
59
+ a security boundary.
60
+
35
61
  `files` is supported by `delegate` with `definition`, `delegate` with `session`,
36
62
  `steer`, `reply`, and `ask_owner`. For
37
63
  controller actions, relative paths resolve from the calling controller's cwd;
38
- for `ask_owner`, they resolve from the managed worker's cwd. Every accepted
64
+ for `ask_owner`, they resolve from the managed agent's cwd. Every accepted
39
65
  path is displayed using its canonical absolute path.
40
66
 
41
67
  Supplied paths must resolve to readable regular files. Missing, broken,
@@ -95,6 +121,7 @@ line has one of these shapes:
95
121
  @./relative.md
96
122
  @../relative.md
97
123
  @/absolute/path.md
124
+ @~/home-relative.md
98
125
  ```
99
126
 
100
127
  These remain literal text:
@@ -102,12 +129,15 @@ These remain literal text:
102
129
  ```text
103
130
  @alice
104
131
  Use @./policy.md when needed
132
+ @~user/file.md
133
+ @$HOME/file.md
134
+ @${HOME}/file.md
105
135
  ```
106
136
 
107
137
  Relative body references are resolved from the Markdown definition that
108
138
  declared them **before** bundled/global body composition.
109
139
 
110
- Expansion then happens once, in body order, when a new worker generation is
140
+ Expansion then happens once, in body order, when a new agent generation is
111
141
  constructed.
112
142
 
113
143
  Included file contents are not recursively parsed for more `@file` references.
@@ -140,21 +170,21 @@ same canonical file in both
140
170
 
141
171
  ## Immutable prompt transport
142
172
 
143
- A definition body is expanded into text before worker lifecycle mutation.
173
+ A definition body is expanded into text before agent lifecycle mutation.
144
174
 
145
- The final expanded body and shared herdr worker guidance are written to private
175
+ The final expanded body and shared herdr agent guidance are written to private
146
176
  temporary snapshots (`0600` files under private `0700` directories), passed to
147
177
  Pi, and removed after the delegation attempt.
148
178
 
149
179
  Original body source paths are never handed to Pi as system-prompt paths.
150
180
 
151
- Each worker generation builds its system prompt once for its single assignment.
181
+ Each agent generation builds its system prompt once for its single assignment.
152
182
  Session continuation builds a new generation with the current effective
153
183
  definition configuration while preserving the saved Pi session context.
154
184
 
155
185
  ## Result handoff
156
186
 
157
- Successful worker completion may expose a private `resultPath`.
187
+ Successful agent completion may expose a private `resultPath`.
158
188
 
159
189
  For dependent work, pass the exact result path through `files` rather than
160
190
  copying a large result manually:
@@ -168,7 +198,7 @@ copying a large result manually:
168
198
  }
169
199
  ```
170
200
 
171
- Successful worker completions persist their complete output at the canonical
201
+ Successful agent completions persist their complete output at the canonical
172
202
  `resultPath`; they do not receive a separate completion overflow path.
173
203
  Oversized non-completion registered-tool output may additionally expose
174
204
  `full_output_path` when overflow persistence succeeds. Model-visible content
@@ -203,12 +233,12 @@ These files are coordination state, not product state. Do not use `.pi-herdsman/
203
233
  for product source, permanent user documentation, application data, build
204
234
  output, caches, or generated artifacts.
205
235
 
206
- Read-only workers may consume existing coordination artifacts but do not gain
236
+ Read-only agents may consume existing coordination artifacts but do not gain
207
237
  permission to modify them.
208
238
 
209
239
  When dependent work uses an artifact, pass the same path through `files` on the
210
240
  message that creates or updates the dependency: `delegate.files` for a new
211
- worker, `steer.files` for an active worker, `ask_owner.files` for supporting
241
+ agent, `steer.files` for an active agent, `ask_owner.files` for supporting
212
242
  evidence in a question, or `reply.files` for the owner's answer. Update the
213
243
  artifact before submission. Small text is embedded at submission time; a
214
244
  reference-only artifact remains a live canonical local path.
@@ -219,6 +249,6 @@ actual runtime capability is required.
219
249
 
220
250
  ## See also
221
251
 
222
- - [`worker` API](../reference/worker.md)
252
+ - [`agent` API](../reference/agent.md)
223
253
  - [Agent-definition schema](../reference/agent-definition-schema.md)
224
254
  - [Delegation](../concepts/delegation.md)
@@ -5,23 +5,23 @@
5
5
  Recovery is identity-safe and conservative. Use the public state and returned
6
6
  structured error before attempting another mutation.
7
7
 
8
- ## Worker is `blocked`
8
+ ## Agent is `blocked`
9
9
 
10
- A blocked worker still has an active assignment.
10
+ A blocked agent still has an active assignment.
11
11
 
12
- If the worker is waiting for an owner answer, use `reply` with its exact worker.
12
+ If the agent is waiting for an owner answer, use `reply` with its exact agent.
13
13
 
14
14
  Otherwise resolve the reported external/attention condition. Do not delegate new
15
- task to a blocked worker.
15
+ task to a blocked agent.
16
16
 
17
- ## Worker is `settling`
17
+ ## Agent is `settling`
18
18
 
19
19
  `settling` means assignment convergence is incomplete. Typical causes include:
20
20
 
21
21
  - task handoff acknowledgement;
22
22
  - result delivery;
23
23
  - bounded result-persistence recovery;
24
- - delegating-worker/worker completion gating;
24
+ - delegating-agent/agent completion gating;
25
25
  - launch handoff;
26
26
  - one-shot cleanup.
27
27
 
@@ -31,13 +31,13 @@ If nothing independent remains, end the turn normally and let result/attention
31
31
  delivery returns attention to the owner. Refresh `list` only when there is a reason to take
32
32
  another control action.
33
33
 
34
- If `list` reports `result_error`, the worker's result could not be persisted
35
- after bounded retries. The condition retains the run, request, owner, worker,
34
+ If `list` reports `result_error`, the agent's result could not be persisted
35
+ after bounded retries. The condition retains the run, request, owner, agent,
36
36
  and failure category. Do not delegate over it: resolve the mailbox persistence
37
- problem, then close the exact worker before delegating new work. The condition
37
+ problem, then close the exact agent before delegating new work. The condition
38
38
  marks retry as unsafe and exact-owner cleanup as safe.
39
39
 
40
- ## Worker is `unknown`
40
+ ## Agent is `unknown`
41
41
 
42
42
  `unknown` means the system cannot prove a safe control state from current exact
43
43
  evidence.
@@ -49,7 +49,7 @@ recovery error is present, inspect its exact details.
49
49
 
50
50
  ## Inactivity advisory
51
51
 
52
- A `working` worker with an exact active assignment can become advisory `stale`
52
+ A `working` agent with an exact active assignment can become advisory `stale`
53
53
  after ten minutes without observed Pi turn, message, or tool activity.
54
54
 
55
55
  Possible list fields:
@@ -58,7 +58,7 @@ Possible list fields:
58
58
  - `inactive_ms`
59
59
  - `last_activity_at`
60
60
 
61
- This is not proof that the worker is hung, dead, safe to terminate, or safe to
61
+ This is not proof that the agent is hung, dead, safe to terminate, or safe to
62
62
  replace.
63
63
 
64
64
  Do not close solely because of inactivity.
@@ -82,7 +82,7 @@ Do not "fix" this by manually deleting guessed panes or mailboxes.
82
82
 
83
83
  ## `pane_not_ready`
84
84
 
85
- A pane-readiness failure means the managed worker did not reach the required
85
+ A pane-readiness failure means the managed agent did not reach the required
86
86
  safe startup boundary.
87
87
 
88
88
  The normal response is to inspect the returned stage/diagnostic and the current
@@ -104,13 +104,13 @@ uncertain.
104
104
 
105
105
  ## Close failure
106
106
 
107
- Normal `worker close` targets one exact directly owned live worker.
107
+ Normal `agent close` targets one exact directly owned live agent.
108
108
 
109
- Closing a delegating worker cascades through its owned workers first. If a
110
- worker cannot be proved or closed safely, the delegating worker remains rather
109
+ Closing a delegating agent cascades through its owned agents first. If a
110
+ agent cannot be proved or closed safely, the delegating agent remains rather
111
111
  than being destructively guessed away.
112
112
 
113
- For lead-only human emergency cleanup, `/workers stop` operates on the proven
113
+ For lead-only human emergency cleanup, `/agents stop` operates on the proven
114
114
  owned tree and reports discarded active work or durable pending results. It is
115
115
  not the normal model orchestration interface.
116
116
 
@@ -124,15 +124,15 @@ delegation uses that saved cwd and does not accept a caller-supplied `cwd`.
124
124
  The saved agent-definition name is resolved against the current effective
125
125
  definition roster. If it no longer exists, session delegation fails instead of guessing a
126
126
  replacement. The definition must also be enabled and authorized for the current
127
- controller, and its current effective configuration is used for the new worker
127
+ controller, and its current effective configuration is used for the new agent
128
128
  generation.
129
129
 
130
130
  An exact session that is already represented by active or unresolved managed
131
131
  work cannot be activated concurrently. The session-start exclusion applies to
132
132
  the canonical session path, so an exact UUID and its exact path identify the
133
133
  same target. Wait for the existing assignment to finish and clean up, or close
134
- its exact live worker when abandoning it, then retry. Do not delegate another
135
- task through a worker label.
134
+ its exact live agent when abandoning it, then retry. Do not delegate another
135
+ task through an agent label.
136
136
 
137
137
  ## Before retrying
138
138
 
@@ -140,17 +140,17 @@ Check:
140
140
 
141
141
  1. exact error category;
142
142
  2. operation;
143
- 3. worker identity;
143
+ 3. agent identity;
144
144
  4. known pane/session IDs;
145
145
  5. startup stage when present;
146
146
  6. primary cause;
147
147
  7. cleanup cause;
148
148
  8. `rollbackOccurred`;
149
149
  9. `nextAction`;
150
- 10. current `worker list`.
150
+ 10. current `agent list`.
151
151
 
152
152
  ## See also
153
153
 
154
154
  - [Errors](../reference/errors.md)
155
- - [Worker states](../reference/worker-states.md)
156
- - [Workers and identity](../concepts/workers.md)
155
+ - [Agent states](../reference/agent-states.md)
156
+ - [Agents and identity](../concepts/agents.md)
@@ -48,12 +48,12 @@ are loaded from `<cwd>/.pi/agents/` only when trusted project settings set
48
48
  `piHerdsman.projectAgents` to `true`. Precedence is `bundled < project < global`.
49
49
 
50
50
  All effective definitions are sorted and validated together, including every
51
- `workers` reference.
51
+ `agents` reference.
52
52
 
53
53
  `enabled` controls definition availability. A disabled definition remains in the
54
54
  lead roster so it can be enabled again, but owner-visible definition lists omit
55
55
  it. Definition and session delegations reject a disabled definition. An already
56
- active worker may finish and remains controllable according to its current
56
+ active agent may finish and remains controllable according to its current
57
57
  available actions; disabling a definition does not mutate that assignment.
58
58
 
59
59
  ## Fields
@@ -61,7 +61,7 @@ available actions; disabling a definition does not mutate that assignment.
61
61
  | Field | Accepted value | Omitted/default behavior | Runtime/composition behavior |
62
62
  | ----------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
63
63
  | `name` | non-empty string | required | Effective definition identity. |
64
- | `enabled` | boolean | `true` | `false` makes definition and session delegation unavailable; it does not mutate an active worker. |
64
+ | `enabled` | boolean | `true` | `false` makes definition and session delegation unavailable; it does not mutate an active agent. |
65
65
  | `description` | string | absent | Display/selection description. |
66
66
  | `model` | non-empty string | Pi default/current launch behavior | Passed as Pi model selection. |
67
67
  | `thinking` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, or `false` | Pi default/current launch behavior | `false` launches as `off`. |
@@ -74,19 +74,20 @@ available actions; disabling a definition does not mutate that assignment.
74
74
  | `noSkills` | boolean | skills disabled unless `inheritSkills: true` | Controls Pi native skill discovery; explicit `skills` values are still passed separately. |
75
75
  | `inheritSkills` | boolean | does not enable by itself unless `true` | `true` changes omitted `noSkills` default so native skills remain available. Explicit `noSkills` wins. |
76
76
  | `skills` | inline array of non-empty strings | no explicit skill arguments | Each value is passed unchanged as a Pi skill path/resource. |
77
- | `noExtensions` | boolean | Pi normal extension policy | `true` emits `--no-extensions`. Required herdr worker infrastructure remains injected by the launcher. |
77
+ | `noExtensions` | boolean | Pi normal extension policy | `true` emits `--no-extensions`. Required herdr agent infrastructure remains injected by the launcher. |
78
78
  | `extensions` | inline array of non-empty strings | no extra extension arguments | Each value is passed unchanged to Pi. |
79
- | `workers` | inline array of unique non-empty definition names | no direct workers | Names direct definitions this worker may delegate to; every name must exist. |
79
+ | `agents` | inline array of unique non-empty definition names | no direct agents | Names direct definitions this agent may delegate to; every name must exist. |
80
80
  | `inheritProjectContext` | boolean | `true` only for definition name `delegate`; otherwise `false` | Controls project context-file inheritance. |
81
81
  | `inheritGlobalContext` | boolean | follows effective `inheritProjectContext` | Controls global context-file inheritance. |
82
82
 
83
83
  Arrays supplied by an override replace the complete inherited array, including
84
84
  an explicit `[]`.
85
85
 
86
- When a delegating worker declares a worker in `workers`, that worker must be enabled.
87
- A delegating worker referencing a disabled worker can remain discoverable, but is rejected
88
- during assignment or fresh worker startup with an explicit disabled-worker error
89
- rather than being silently removed from the delegating worker definition.
86
+ When a delegating agent declares an agent definition in `agents`, that definition must
87
+ be enabled. A delegating agent referencing a disabled agent definition can remain
88
+ discoverable, but is rejected during assignment or fresh agent startup with an explicit
89
+ disabled-agent error rather than being silently removed from the delegating agent
90
+ definition.
90
91
 
91
92
  Skill and extension paths are passed to Pi unchanged. herdr does not resolve
92
93
  them relative to the definition file.
@@ -100,7 +101,7 @@ source-qualified permissions, such as an extension path plus tool name.
100
101
 
101
102
  An explicit `tools` allowlist takes precedence over the default-selection
102
103
  switches `noTools` and `noBuiltinTools`; `excludeTools` still removes matching
103
- names. Thus a managed worker may receive both `--no-tools` and an explicit
104
+ names. Thus a managed agent may receive both `--no-tools` and an explicit
104
105
  `--tools ask_owner`. Pi Herdsman protects that mandatory `ask_owner` capability in
105
106
  managed launches and removes it from explicit exclusions. Unmanaged Pi
106
107
  launches do not receive this exception.
@@ -122,39 +123,39 @@ Tools with the same name are not independently permissionable by source, and
122
123
  the winner for a name collision is not a supported ordering contract.
123
124
 
124
125
  `noExtensions` disables ordinary extension discovery, but launcher-injected
125
- Pi Herdsman worker and Herdr-state extensions remain mandatory infrastructure.
126
+ Pi Herdsman agent and Herdr-state extensions remain mandatory infrastructure.
126
127
  Explicit `extensions` entries remain separate launch inputs and are passed to
127
128
  Pi normally. Launcher-injected infrastructure remains separate from the
128
129
  definition's extension and tool policy.
129
130
 
130
- ## Tool inference for `workers`
131
+ ## Tool inference for `agents`
131
132
 
132
- A non-empty `workers` list declares potential worker definitions; effective
133
- delegation also requires permitted `worker` capability and a controller depth
133
+ A non-empty `agents` list declares potential agent definitions; effective
134
+ delegation also requires permitted `agent` capability and a controller depth
134
135
  that allows delegation.
135
136
 
136
137
  This capability is projected by controller depth. Lead-launched definitions
137
- retain their declared worker allowlist and effective `worker` tool. A
138
- worker-launched worker receives no worker allowlist and no effective `worker`,
138
+ retain their declared agent allowlist and effective `agent` tool. An
139
+ agent-launched agent receives no agent allowlist and no effective `agent`,
139
140
  even when its definition is delegation-enabled at the lead. Explicit tool
140
141
  allowlists, empty arrays, `noTools`, and exclusions remain fail-closed.
141
142
 
142
143
  When it has an explicit non-empty `tools` allowlist and does not already contain
143
- `worker`, Pi Herdsman appends `worker` to the effective allowlist unless denied.
144
+ `agent`, Pi Herdsman appends `agent` to the effective allowlist unless denied.
144
145
 
145
146
  Rules:
146
147
 
147
- | Configuration | Effective inference |
148
- | ------------------------------------------------ | ------------------------------------------------------------------------- |
149
- | `workers` omitted or `[]` | no inferred `worker` |
150
- | non-empty `workers`, `tools` omitted | keep Pi default tool policy; do not materialize a `worker`-only allowlist |
151
- | non-empty `workers`, explicit non-empty `tools` | append `worker` |
152
- | `excludeTools` contains `worker` | explicit denial wins |
153
- | `noTools: true`, no explicit `worker` in `tools` | no inferred `worker` |
154
- | `noTools: true`, explicit `tools: ["worker"]` | explicit allow is preserved |
155
- | explicit allow plus explicit exclusion | exclusion wins |
156
-
157
- `ask_owner` is separate mandatory managed-worker infrastructure and is not this
148
+ | Configuration | Effective inference |
149
+ | ----------------------------------------------- | ------------------------------------------------------------------------- |
150
+ | `agents` omitted or `[]` | no inferred `agent` |
151
+ | non-empty `agents`, `tools` omitted | keep Pi default tool policy; do not materialize an `agent`-only allowlist |
152
+ | non-empty `agents`, explicit non-empty `tools` | append `agent` |
153
+ | `excludeTools` contains `agent` | explicit denial wins |
154
+ | `noTools: true`, no explicit `agent` in `tools` | no inferred `agent` |
155
+ | `noTools: true`, explicit `tools: ["agent"]` | explicit allow is preserved |
156
+ | explicit allow plus explicit exclusion | exclusion wins |
157
+
158
+ `ask_owner` is separate mandatory managed agent infrastructure and is not this
158
159
  inference rule.
159
160
 
160
161
  ## Body composition
@@ -184,14 +185,16 @@ A body line is a reference only when the complete trimmed line matches:
184
185
  @./relative/path
185
186
  @../relative/path
186
187
  @/absolute/path
188
+ @~/home-relative/path
187
189
  ```
188
190
 
189
191
  Before bundled/global body composition, relative references are resolved from
190
192
  the definition file that declared them.
191
193
 
192
- When a new worker generation is constructed:
194
+ When a new agent generation is constructed:
193
195
 
194
- 1. references are processed in body order;
196
+ 1. references are processed in body order; `~/` is resolved beneath the
197
+ current user's home directory;
195
198
  2. targets are canonicalized with `realpath`;
196
199
  3. each canonical file is included once;
197
200
  4. a caller `delegate.files` canonical overlap wins and removes the body copy;
@@ -200,20 +203,20 @@ When a new worker generation is constructed:
200
203
  6. included text replaces that reference line;
201
204
  7. included text is not recursively expanded.
202
205
 
203
- Every new worker generation expands the effective body and its file references
206
+ Every new agent generation expands the effective body and its file references
204
207
  once at launch. Session continuation preserves the Pi session history while
205
208
  using the current effective definition configuration.
206
209
 
207
210
  ## Runtime prompt order
208
211
 
209
- For a newly constructed managed worker, the effective launch composition is:
212
+ For a newly constructed managed agent, the effective launch composition is:
210
213
 
211
214
  ```text
212
215
  Pi base system prompt
213
216
  ↓ effective body via systemPromptMode
214
217
  selected project/global context-file additions
215
218
  ↓
216
- shared herdr worker guidance
219
+ shared herdr agent guidance
217
220
  ```
218
221
 
219
222
  The final effective body and shared guidance are delivered through private
@@ -238,7 +241,7 @@ inheritSkills: true
238
241
  skills: ["/absolute/path/to/code-review/SKILL.md"]
239
242
  noExtensions: false
240
243
  extensions: ["/absolute/path/to/local-extension.ts"]
241
- workers: ["scout"]
244
+ agents: ["scout"]
242
245
  inheritProjectContext: true
243
246
  inheritGlobalContext: false
244
247
  ---
@@ -248,8 +251,8 @@ Additional local review instructions.
248
251
  @./prompts/review-policy.md
249
252
  ```
250
253
 
251
- Because `workers` is non-empty and the explicit `tools` list does not deny it,
252
- the effective tools include `worker`.
254
+ Because `agents` is non-empty and the explicit `tools` list does not deny it,
255
+ the effective tools include `agent`.
253
256
 
254
257
  To disable a bundled role without copying its definition, use a minimal global
255
258
  override:
@@ -261,7 +264,7 @@ enabled: false
261
264
  ---
262
265
  ```
263
266
 
264
- The `/workers agents` menu exposes the same enable and disable operations.
267
+ The `/agents definitions` menu exposes the same enable and disable operations.
265
268
  Removing the `enabled` line inherits the bundled value; when no source declares
266
269
  the field, the effective value is `true`.
267
270
 
@@ -1,57 +1,57 @@
1
- # Worker states
1
+ # Agent states
2
2
 
3
3
  [Documentation index](../README.md)
4
4
 
5
5
  The public state is a safe-control projection built from live lifecycle and
6
6
  durable assignment/convergence evidence. It is not a raw herdr lifecycle string.
7
7
 
8
- | State | Meaning |
9
- | ---------- | ----------------------------------------------------------------------------------------------------- |
10
- | `working` | An assignment is active. |
11
- | `blocked` | Active assignment waits for owner attention or another condition. |
12
- | `settling` | Assignment handoff, completion/result delivery, launch, direct-worker gate, or cleanup is converging. |
13
- | `unknown` | Exact safe control state cannot be proved. |
8
+ | State | Meaning |
9
+ | ---------- | ---------------------------------------------------------------------------------------------------- |
10
+ | `working` | An assignment is active. |
11
+ | `blocked` | Active assignment waits for owner attention or another condition. |
12
+ | `settling` | Assignment handoff, completion/result delivery, launch, direct-agent gate, or cleanup is converging. |
13
+ | `unknown` | Exact safe control state cannot be proved. |
14
14
 
15
15
  ## `available_actions` is authoritative
16
16
 
17
- A live worker record in `worker list` includes an `available_actions` snapshot.
17
+ A live agent record in `agent list` includes an `available_actions` snapshot.
18
18
  Use only operations currently listed there; do not infer control eligibility
19
19
  from `state` alone. `steer` means active work accepts steering, `reply` means a
20
20
  correlated pending `ask_owner` is valid, and `close` means exact ownership or
21
21
  approved orphan recovery permits teardown. `available_actions` never includes
22
- `delegate`; a worker generation handles one assignment only. Every operation
22
+ `delegate`; an agent generation handles one assignment only. Every operation
23
23
  revalidates identity, ownership, mailbox state, and lifecycle immediately before
24
24
  mutation.
25
25
 
26
- A delegating worker may be blocked while direct worker work is pending and still accept
26
+ A delegating agent may be blocked while direct agent work is pending and still accept
27
27
  steering when `steer` is listed. Descendant visibility does not imply authority;
28
28
  records outside the controller's direct ownership can have an empty action list.
29
29
 
30
30
  ## `blocked` and owner questions
31
31
 
32
- A worker waiting on a valid `ask_owner` reply projects as `blocked` after its ask
33
- turn settles. Answer through the exact direct owner using `reply.worker`.
32
+ An agent waiting on a valid `ask_owner` reply projects as `blocked` after its ask
33
+ turn settles. Answer through the exact direct owner using `reply.agent`.
34
34
 
35
35
  ## `settling`
36
36
 
37
37
  Examples include an uncompleted task handoff, pending final result delivery,
38
- direct-worker gating, terminal cleanup, result persistence recovery, and startup
39
- or integration handoff. Do not assign another task to a settling worker.
38
+ direct-agent gating, terminal cleanup, result persistence recovery, and startup
39
+ or integration handoff. Do not assign another task to a settling agent.
40
40
 
41
41
  ## `unknown`
42
42
 
43
43
  Unknown is intentional fail-closed behavior. Unreadable, oversized, malformed,
44
44
  or validation-failing mailbox state is reported with a bounded diagnostic and an
45
45
  empty `available_actions` list. Do not substitute pane idleness, elapsed time,
46
- model metadata, missing activity, a guessed session, or an old worker identity.
46
+ model metadata, missing activity, a guessed session, or an old agent identity.
47
47
 
48
48
  ## Inactivity fields
49
49
 
50
- A qualifying `working` worker may also report `stale`, `inactive_ms`, and
50
+ A qualifying `working` agent may also report `stale`, `inactive_ms`, and
51
51
  `last_activity_at`. This advisory does not change the state or prove a hang.
52
52
 
53
53
  ## See also
54
54
 
55
55
  - [Lifecycle](../concepts/lifecycle.md)
56
56
  - [Recovery](../guides/recovery.md)
57
- - [`worker` API](worker.md)
57
+ - [`agent` API](agent.md)