@llblab/pi-actors 0.24.7 → 0.24.8

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/BACKLOG.md CHANGED
@@ -211,15 +211,13 @@ The backlog is intentionally pruned to the 20% of work most likely to deliver 80
211
211
  ### M-11 Actor Termination Semantics
212
212
 
213
213
  - Priority: Medium.
214
- - Status: Open.
214
+ - Status: Open; core mailbox-loop hotfix landed in 0.24.8.
215
215
  - Goal: Make `control.kill` the canonical parent-to-actor termination action while keeping `control.stop` and `control.cancel` as actor-domain messages whose meaning depends on the actor protocol.
216
216
  - Why now: Mailbox workers need a clearer lifecycle boundary before v2 patterns harden. Treating `stop`, `cancel`, and `kill` as equivalent stop messages blurs actor termination with domain-specific task or playback control.
217
- - Direction:
218
- - Document `control.kill` as the universal lifecycle action for a parent/supervisor terminating an actor or run.
219
- - Reframe `control.stop` as actor-defined domain control, such as stopping music playback or ending an actor-specific loop when that actor declares it.
220
- - Reframe `control.cancel` as actor-defined domain control, such as cancelling the current subagent task while keeping the worker actor alive for later assignments.
221
- - Split mailbox-loop helper semantics so lifecycle termination detection is distinct from general control-message detection.
222
- - While the package is pre-1.0, allow a small intentional minor-version contract break: remove legacy treatment that aliases `control.stop` or `control.cancel` to actor termination.
217
+ - Remaining direction:
218
+ - Audit packaged recipe `mailbox.accepts` declarations so `control.stop` and `control.cancel` appear only when actor-specific behavior is meaningful.
219
+ - Preserve `control.kill` as the universal lifecycle action for a parent/supervisor terminating an actor or run.
220
+ - Reframe any remaining docs that imply `control.stop` or `control.cancel` are generic runtime termination aliases.
223
221
  - Do not preserve compatibility shims for the old stop/cancel-as-termination behavior before the first 1.0 major release unless a concrete safety issue appears during implementation.
224
222
  - Acceptance:
225
223
  - Docs and actors skill advertise `control.kill` as canonical parent-to-actor termination.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.24.8: Mailbox Loop Kill Contract Hotfix
6
+
7
+ - `[Mailbox Loop]` Aligned generic mailbox-loop termination with the actor-message kill contract: only `control.kill` stops generic loop drains; `control.stop` and `control.cancel` remain actor-domain messages unless a recipe handles them explicitly.
8
+ - `[Docs]` Updated worker and recipe guidance so backlog implementer shutdown examples use `control.kill` for runtime termination and describe `control.stop` as domain-local vocabulary.
9
+
5
10
  ## 0.24.7: Actor Message Kill Contract Hotfix
6
11
 
7
12
  - `[Actor Messages]` Narrowed runtime termination by actor message to `control.kill` only; `control.stop` and `control.cancel` now remain recipe-local mailbox vocabulary instead of aliases for killing/cancelling a run.
package/README.md CHANGED
@@ -118,7 +118,7 @@ Steer it through messages:
118
118
 
119
119
  ```text
120
120
  message to=run:docs_review type=control.continue body=continue
121
- message to=run:docs_review type=control.stop body=stop
121
+ message to=run:docs_review type=control.kill body=stop
122
122
  ```
123
123
 
124
124
  ## Actor Rooms
@@ -9,9 +9,7 @@ export function isMailboxLoopStopMessage(message) {
9
9
  const type = message && typeof message === "object" && "type" in message
10
10
  ? message.type
11
11
  : undefined;
12
- return (type === "control.stop" ||
13
- type === "control.cancel" ||
14
- type === "control.kill");
12
+ return type === "control.kill";
15
13
  }
16
14
  function messageId(message) {
17
15
  return typeof message?.id === "string" ? message.id : undefined;
@@ -2,7 +2,7 @@
2
2
  name: actors
3
3
  description: Highest-density practical guide for pi-actors. Read this skill whenever prompt and tools are not enough for spawn, message, inspect, actor runs, tools, recipes, command templates, async lifecycle, mailboxes, artifacts, and local orchestration mechanics.
4
4
  metadata:
5
- version: 0.24.7
5
+ version: 0.24.8
6
6
  ---
7
7
 
8
8
  # Actors (pi-actors)
@@ -150,9 +150,9 @@ When using actors as backlog implementers, avoid one-shot subagents that exit af
150
150
  2. Actor posts `task.claim` to `room:<run>` before editing.
151
151
  3. Actor executes and validates the slice.
152
152
  4. Actor posts `task.result` and `awaiting_assignment`.
153
- 5. Actor stays alive until the coordinator sends another `task.assign` or an explicit `control.stop`.
153
+ 5. Actor stays alive until the coordinator sends another `task.assign` or an explicit `control.kill`.
154
154
 
155
- Use `front`/`back` actors for opposite backlog ends when reducing overlap. Implementer workflows should be packaged as reusable recipe composition, not bespoke scripts: use `coordinator-locker` for queue/assignment/locking, subagent launcher recipes for execution cells, actor-message utility recipes for structured handoffs, and `lib/mailbox-loop.ts` helpers when writing mailbox-consuming workers. Mailbox loops should claim one run or branch inbox message at a time, mark success as `handled`, mark exceptions as `failed`, and may treat declared recipe-local `control.stop` / `control.cancel` / `control.kill` messages as stop messages; bounded drains may process available work until a stop message or max-message guard. Only `control.kill` is the documented runtime action that kills the actor run. If the existing recipe library cannot express the scenario, add missing reusable component recipes first, then compose the higher-level workflow from them. Supervisors should route coordinator assignments by `body.actor`, preserve the assignment as an object rather than a JSON string, and keep stopped-worker summaries tied to the original actor list.
155
+ Use `front`/`back` actors for opposite backlog ends when reducing overlap. Implementer workflows should be packaged as reusable recipe composition, not bespoke scripts: use `coordinator-locker` for queue/assignment/locking, subagent launcher recipes for execution cells, actor-message utility recipes for structured handoffs, and `lib/mailbox-loop.ts` helpers when writing mailbox-consuming workers. Mailbox loops should claim one run or branch inbox message at a time, mark success as `handled`, mark exceptions as `failed`, and treat only `control.kill` as the generic loop termination message; `control.stop` and `control.cancel` are actor-domain messages only when the recipe declares and handles them. Bounded drains may process available work until `control.kill` or a max-message guard. If the existing recipe library cannot express the scenario, add missing reusable component recipes first, then compose the higher-level workflow from them. Supervisors should route coordinator assignments by `body.actor`, preserve the assignment as an object rather than a JSON string, and keep stopped-worker summaries tied to the original actor list.
156
156
 
157
157
  Current packaged building blocks:
158
158
 
@@ -2,7 +2,7 @@
2
2
  name: swarm
3
3
  description: Subagent orchestration with scoped locks and quorum consensus. Use for multi-model review, parallel scoped work, delegated audit, and coordinated subagent execution.
4
4
  metadata:
5
- version: 0.24.7
5
+ version: 0.24.8
6
6
  ---
7
7
 
8
8
  # Swarm
@@ -146,7 +146,7 @@ The stable loop is:
146
146
  2. Actor posts `task.claim` to `room:<run>` before editing.
147
147
  3. Actor completes the slice, validates, and posts `task.result` plus `awaiting_assignment`.
148
148
  4. Actor remains alive and waits for the next coordinator message.
149
- 5. Coordinator either sends another `task.assign` or sends `control.stop` after confirming no actionable work remains.
149
+ 5. Coordinator either sends another `task.assign` or sends `control.kill` after confirming no actionable work remains.
150
150
 
151
151
  Implementer recipes should declare this contract in `mailbox.accepts` and `mailbox.emits`. They should not self-terminate after a successful slice, and they should not silently self-select a new task unless the coordinator deliberately configured that policy for the run. This keeps task choice centralized while preserving actor-local execution autonomy.
152
152
 
@@ -199,4 +199,4 @@ Cross-platform smoke checklist:
199
199
  - Only play trusted local files or URLs.
200
200
  - Volume is clamped to `0..100` by the wrapper.
201
201
  - Prefer a stable `run_id` such as `music` when the operator expects to control the run by name.
202
- - Use `message type=control.kill` only when graceful `control.stop` cancellation fails.
202
+ - Use `message type=control.kill` for runtime termination; `control.stop` is a player-domain pause/stop command, not a generic run-kill alias.
@@ -187,7 +187,7 @@ Recipes do not declare a second event-delivery policy. A running actor emits add
187
187
  ```json
188
188
  {
189
189
  "mailbox": {
190
- "accepts": ["control.stop"],
190
+ "accepts": ["control.kill"],
191
191
  "emits": ["command.done", "run.done", "run.failed"]
192
192
  },
193
193
  "template": "run-subtask {prompt}"
@@ -57,11 +57,7 @@ export function isMailboxLoopStopMessage(message: unknown): boolean {
57
57
  message && typeof message === "object" && "type" in message
58
58
  ? (message as { type?: unknown }).type
59
59
  : undefined;
60
- return (
61
- type === "control.stop" ||
62
- type === "control.cancel" ||
63
- type === "control.kill"
64
- );
60
+ return type === "control.kill";
65
61
  }
66
62
 
67
63
  function messageId(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-actors",
3
- "version": "0.24.7",
3
+ "version": "0.24.8",
4
4
  "private": false,
5
5
  "description": "Local Actor Kernel for Pi",
6
6
  "keywords": [
@@ -2,7 +2,7 @@
2
2
  name: actors
3
3
  description: Highest-density practical guide for pi-actors. Read this skill whenever prompt and tools are not enough for spawn, message, inspect, actor runs, tools, recipes, command templates, async lifecycle, mailboxes, artifacts, and local orchestration mechanics.
4
4
  metadata:
5
- version: 0.24.7
5
+ version: 0.24.8
6
6
  ---
7
7
 
8
8
  # Actors (pi-actors)
@@ -150,9 +150,9 @@ When using actors as backlog implementers, avoid one-shot subagents that exit af
150
150
  2. Actor posts `task.claim` to `room:<run>` before editing.
151
151
  3. Actor executes and validates the slice.
152
152
  4. Actor posts `task.result` and `awaiting_assignment`.
153
- 5. Actor stays alive until the coordinator sends another `task.assign` or an explicit `control.stop`.
153
+ 5. Actor stays alive until the coordinator sends another `task.assign` or an explicit `control.kill`.
154
154
 
155
- Use `front`/`back` actors for opposite backlog ends when reducing overlap. Implementer workflows should be packaged as reusable recipe composition, not bespoke scripts: use `coordinator-locker` for queue/assignment/locking, subagent launcher recipes for execution cells, actor-message utility recipes for structured handoffs, and `lib/mailbox-loop.ts` helpers when writing mailbox-consuming workers. Mailbox loops should claim one run or branch inbox message at a time, mark success as `handled`, mark exceptions as `failed`, and may treat declared recipe-local `control.stop` / `control.cancel` / `control.kill` messages as stop messages; bounded drains may process available work until a stop message or max-message guard. Only `control.kill` is the documented runtime action that kills the actor run. If the existing recipe library cannot express the scenario, add missing reusable component recipes first, then compose the higher-level workflow from them. Supervisors should route coordinator assignments by `body.actor`, preserve the assignment as an object rather than a JSON string, and keep stopped-worker summaries tied to the original actor list.
155
+ Use `front`/`back` actors for opposite backlog ends when reducing overlap. Implementer workflows should be packaged as reusable recipe composition, not bespoke scripts: use `coordinator-locker` for queue/assignment/locking, subagent launcher recipes for execution cells, actor-message utility recipes for structured handoffs, and `lib/mailbox-loop.ts` helpers when writing mailbox-consuming workers. Mailbox loops should claim one run or branch inbox message at a time, mark success as `handled`, mark exceptions as `failed`, and treat only `control.kill` as the generic loop termination message; `control.stop` and `control.cancel` are actor-domain messages only when the recipe declares and handles them. Bounded drains may process available work until `control.kill` or a max-message guard. If the existing recipe library cannot express the scenario, add missing reusable component recipes first, then compose the higher-level workflow from them. Supervisors should route coordinator assignments by `body.actor`, preserve the assignment as an object rather than a JSON string, and keep stopped-worker summaries tied to the original actor list.
156
156
 
157
157
  Current packaged building blocks:
158
158
 
@@ -2,7 +2,7 @@
2
2
  name: swarm
3
3
  description: Subagent orchestration with scoped locks and quorum consensus. Use for multi-model review, parallel scoped work, delegated audit, and coordinated subagent execution.
4
4
  metadata:
5
- version: 0.24.7
5
+ version: 0.24.8
6
6
  ---
7
7
 
8
8
  # Swarm