@llblab/pi-actors 0.29.3 → 0.30.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/BACKLOG.md +118 -199
- package/CHANGELOG.md +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +71 -315
- package/dist/lib/actor-inspector-tui.d.ts +35 -0
- package/dist/lib/actor-inspector-tui.js +159 -1
- package/dist/lib/observability.d.ts +34 -0
- package/dist/lib/observability.js +103 -1
- package/dist/lib/paths.d.ts +9 -0
- package/dist/lib/paths.js +15 -0
- package/dist/lib/pi.d.ts +19 -0
- package/dist/lib/pi.js +21 -0
- package/dist/lib/runtime.d.ts +5 -0
- package/dist/lib/runtime.js +48 -0
- package/dist/lib/tools.d.ts +9 -0
- package/dist/lib/tools.js +58 -8
- package/dist/skills/actors/SKILL.md +1 -1
- package/dist/skills/swarm/SKILL.md +1 -1
- package/index.ts +99 -379
- package/lib/actor-inspector-tui.ts +221 -1
- package/lib/observability.ts +194 -34
- package/lib/paths.ts +27 -0
- package/lib/pi.ts +47 -0
- package/lib/runtime.ts +55 -0
- package/lib/tools.ts +119 -24
- package/package.json +1 -1
- package/skills/actors/SKILL.md +1 -1
- package/skills/swarm/SKILL.md +1 -1
package/BACKLOG.md
CHANGED
|
@@ -41,257 +41,173 @@ Non-goals:
|
|
|
41
41
|
|
|
42
42
|
No open hotfix items.
|
|
43
43
|
|
|
44
|
-
##
|
|
45
|
-
|
|
46
|
-
The backlog is intentionally pruned to the 20% of work most likely to deliver 80% of value for `pi-actors` as a local actor kernel. Bias toward consolidation, smaller public surface area, and reliability over new feature breadth.
|
|
47
|
-
|
|
48
|
-
### M-01 State Corruption Recovery
|
|
49
|
-
|
|
50
|
-
- Priority: High.
|
|
51
|
-
- Status: Done.
|
|
52
|
-
- Goal: Keep `inspect` useful when file-backed run, room, branch, or recipe state is partially corrupted.
|
|
53
|
-
- Why now: The extension's core promise is local, inspectable, durable actor state. Corrupt JSON/JSONL should degrade visibility, not break the operator membrane.
|
|
54
|
-
- Direction:
|
|
55
|
-
- Continue migrating repeated JSON/JSONL inspect paths to `lib/state-readers.ts`.
|
|
56
|
-
- Preserve valid records and report corrupt paths/counts.
|
|
57
|
-
- Do not silently rewrite canonical state without an explicit repair action.
|
|
58
|
-
- Acceptance:
|
|
59
|
-
- Malformed JSONL lines do not kill inspect paths.
|
|
60
|
-
- Corrupt JSON files surface diagnostics with paths.
|
|
61
|
-
- Tests cover run, branch, room, and recipe-adjacent state where practical.
|
|
62
|
-
|
|
63
|
-
### M-02 Actor Loop Helper Minimal Core
|
|
44
|
+
## Backlog Curation Rules
|
|
64
45
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- Files:
|
|
70
|
-
- `lib/mailbox-loop.ts`.
|
|
71
|
-
- Direction:
|
|
72
|
-
- Support run inbox claiming, branch inbox claiming, handled/failed status transitions, bounded drains, duplicate-claim protection, and graceful stop-message detection.
|
|
73
|
-
- Defer live wake subscription and polling wrappers until the canonical worker recipe needs them.
|
|
74
|
-
- Keep policy out: no task selection, no model choice, no project prompts.
|
|
75
|
-
- Acceptance:
|
|
76
|
-
- Helper supports run inbox and branch inbox.
|
|
77
|
-
- Claim/handle/fail transitions are covered by tests.
|
|
78
|
-
- Duplicate branch claims do not double-process one message.
|
|
79
|
-
- Bounded drains stop on standard control messages.
|
|
46
|
+
- Completed work belongs in `CHANGELOG.md`, not in `BACKLOG.md`.
|
|
47
|
+
- File length alone is not a domain-split trigger: ~1000-line cohesive domain files are acceptable when ownership is clear.
|
|
48
|
+
- Consider splitting only when a file crosses roughly 2000 lines, mixes real ownership zones, or hides a clearer domain boundary.
|
|
49
|
+
- Prefer semantic compression before file splitting: fewer public nouns, consistent outcomes, compact diagnostics, and domain-owned constants/helpers.
|
|
80
50
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- Priority: High.
|
|
84
|
-
- Status: Done.
|
|
85
|
-
- Depends on: M-02.
|
|
86
|
-
- Goal: Add one canonical packaged worker recipe/template demonstrating the intended long-lived actor pattern.
|
|
87
|
-
- Why now: The extension should teach one excellent mailbox loop rather than accumulate scenario-specific scripts.
|
|
88
|
-
- Direction:
|
|
89
|
-
- Worker joins the default room.
|
|
90
|
-
- Worker declares typed mailbox accepts/emits.
|
|
91
|
-
- Worker claims branch inbox work.
|
|
92
|
-
- Worker posts `task.claim`, `task.result`, and `awaiting_assignment`.
|
|
93
|
-
- Worker handles `control.stop`.
|
|
94
|
-
- Acceptance:
|
|
95
|
-
- Demonstrates correct mailbox loop semantics.
|
|
96
|
-
- Stays a recipe-authoring reference, not a product workflow catalog.
|
|
97
|
-
- Actor skill links it as the canonical worker pattern.
|
|
98
|
-
|
|
99
|
-
### M-04 Protocol Contract Fixtures
|
|
51
|
+
## Minor Backlog
|
|
100
52
|
|
|
101
|
-
-
|
|
102
|
-
- Status: Done.
|
|
103
|
-
- Goal: Freeze the current protocol behavior with compact internal fixtures before further surface growth.
|
|
104
|
-
- Why now: `spawn`, `message`, `inspect`, mailbox contracts, artifacts, rooms, and run indexes now have enough shape to merit regression fixtures; schemas should document reality, not invent a new standard.
|
|
105
|
-
- Direction:
|
|
106
|
-
- Add fixtures for representative run state, actor message, run inbox/outbox, room message/roster, mailbox contract, artifact manifest, and recipe summary.
|
|
107
|
-
- Add lightweight schema or shape validation only where it protects existing behavior.
|
|
108
|
-
- Acceptance:
|
|
109
|
-
- Public examples and fixtures validate in tests.
|
|
110
|
-
- No migration is forced.
|
|
111
|
-
- No external transport/MCP standard is introduced.
|
|
53
|
+
The backlog is intentionally pruned to the 20% of work most likely to deliver 80% of value for `pi-actors` as a local actor kernel. Bias toward consolidation, smaller public surface area, and reliability over new feature breadth.
|
|
112
54
|
|
|
113
|
-
### M-
|
|
55
|
+
### M-14 Session Mismatch Follow-through
|
|
114
56
|
|
|
115
57
|
- Priority: Medium.
|
|
116
|
-
- Status:
|
|
117
|
-
- Goal:
|
|
118
|
-
- Why now:
|
|
58
|
+
- Status: Planned.
|
|
59
|
+
- Goal: Extend 0.27 structured session diagnostics consistently across room, branch, run, coordinator, and session workflows.
|
|
60
|
+
- Why now: M-12 established the shape; dogfood should now make every ownership denial equally actionable without relaxing ownership gates.
|
|
119
61
|
- Direction:
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
62
|
+
- Audit all session mismatch errors for consistent `reason`, owner/current session fields, and inspect-session hints.
|
|
63
|
+
- Keep read/write ownership policy unchanged.
|
|
64
|
+
- Update docs with session mismatch examples and recovery inspection paths.
|
|
123
65
|
- Acceptance:
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
- Tests cover restart and line-counter reset scenarios.
|
|
66
|
+
- Room, branch, run, coordinator, and session denials share the same compact/verbose shape.
|
|
67
|
+
- Tests cover representative inspect and message paths.
|
|
127
68
|
|
|
128
|
-
### M-
|
|
69
|
+
### M-15 Worker Stale-Claim Dogfood
|
|
129
70
|
|
|
130
71
|
- Priority: Medium.
|
|
131
|
-
- Status:
|
|
132
|
-
- Goal:
|
|
133
|
-
- Why now:
|
|
72
|
+
- Status: Planned.
|
|
73
|
+
- Goal: Validate and harden actor-worker v2 stale-claim visibility under intentionally stale claimed branch messages.
|
|
74
|
+
- Why now: M-09 exposed `stale_claims`; real dogfood should verify the operator can diagnose stuck claimed work before adding recovery policy.
|
|
134
75
|
- Direction:
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
- Cover named-pipe adapter with injected sender where practical.
|
|
76
|
+
- Create deterministic stale claimed branch inbox fixtures or smoke tests.
|
|
77
|
+
- Verify `worker-status.json`, room events, and inspect surfaces make stale claims visible.
|
|
78
|
+
- Defer auto-recovery unless workflow evidence proves it is safe.
|
|
139
79
|
- Acceptance:
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- Docs and tests cover the adapter split.
|
|
80
|
+
- Stale claims are reproducible and visible in worker status.
|
|
81
|
+
- Tests cover stale-claim counting without adding scheduler/broker policy.
|
|
143
82
|
|
|
144
|
-
### M-
|
|
83
|
+
### M-23 Tool Boundary Type Tightening
|
|
145
84
|
|
|
146
|
-
- Priority:
|
|
147
|
-
- Status:
|
|
148
|
-
- Goal:
|
|
149
|
-
- Why now:
|
|
85
|
+
- Priority: Low.
|
|
86
|
+
- Status: Planned.
|
|
87
|
+
- Goal: Remove avoidable `any` at the Pi/tool boundary where a narrow local type can express the real contract without broad rewiring.
|
|
88
|
+
- Why now: `index.ts` still keeps runtime tool definitions in a `Map<string, any>`; this is small but visible in the composition root.
|
|
150
89
|
- Direction:
|
|
151
|
-
-
|
|
152
|
-
- Keep
|
|
153
|
-
-
|
|
154
|
-
- Make installed scripts prefer `dist` runtime modules and avoid importing `.ts` from `node_modules`.
|
|
155
|
-
- Preserve source-tree developer ergonomics without requiring global install.
|
|
156
|
-
- Expose compiled JS as the default Node-compatible extension entrypoint and source TS/skill paths as optional metadata for TypeScript-native runtimes.
|
|
157
|
-
- Treat `dist/` as the JS-only distributive tree: mirror runtime assets (`scripts/`, `recipes/`, `fixtures/`, and `skills/`) there during build and point default package metadata at those dist assets.
|
|
158
|
-
- Track each converted script with a compiled module existence regression so shim drift is caught before packaging.
|
|
90
|
+
- Add or reuse a narrow exported tool-definition type from the Pi adapter or tools domain.
|
|
91
|
+
- Keep SDK details behind `lib/pi.ts`.
|
|
92
|
+
- Do not introduce a broad type-modeling pass across every schema helper.
|
|
159
93
|
- Acceptance:
|
|
160
|
-
- `
|
|
161
|
-
-
|
|
162
|
-
- `npm run pack:dry` includes expected compiled/script files.
|
|
163
|
-
- Recipe paths remain stable or migrations are explicitly documented.
|
|
94
|
+
- `index.ts` no longer uses `Map<string, any>` for actor tool definitions.
|
|
95
|
+
- TypeScript validation still passes without weakening public tool schemas.
|
|
164
96
|
|
|
165
|
-
### M-
|
|
97
|
+
### M-17 Message Delivery Outcome Contract
|
|
166
98
|
|
|
167
99
|
- Priority: High.
|
|
168
|
-
- Status:
|
|
169
|
-
- Goal:
|
|
170
|
-
- Why now:
|
|
100
|
+
- Status: Planned.
|
|
101
|
+
- Goal: Normalize `message` results so operators can distinguish delivered, queued, persisted, forwarded, unsupported, and ownership-denied outcomes.
|
|
102
|
+
- Why now: Branch message UX already treats durable branch mailbox persistence as a successful queued outcome when a parent endpoint is unavailable; that local fix should become a consistent message-result membrane.
|
|
171
103
|
- Direction:
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
104
|
+
- Define compact delivery fields: `queued`, `delivered`, `persisted`, `forwarded`, `consumer`, `reason`, and `hint`.
|
|
105
|
+
- Apply the shape to `run:<id>`, `branch:<run>/<branch>`, `room:<run>`, `coordinator`, `session:`, and `tool:<name>` where meaningful.
|
|
106
|
+
- Reuse M-14 session mismatch shape for ownership-denied outcomes.
|
|
107
|
+
- Do not claim guaranteed live consumption unless a known consumer exists.
|
|
108
|
+
- Do not add a broker, distributed delivery semantics, or a new public noun.
|
|
175
109
|
- Acceptance:
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
- Tests cover at least
|
|
110
|
+
- Branch messages clearly report queued/persisted state and known worker-consumer state where available.
|
|
111
|
+
- Room messages distinguish timeline append success from forwarded branch-targeted copies.
|
|
112
|
+
- Tests cover at least run, branch, room, coordinator, and ownership-denied outcomes.
|
|
179
113
|
|
|
180
|
-
### M-
|
|
114
|
+
### M-18 Candidate Recipe Promotion UX
|
|
181
115
|
|
|
182
116
|
- Priority: High.
|
|
183
|
-
- Status:
|
|
184
|
-
- Goal:
|
|
185
|
-
- Why now:
|
|
117
|
+
- Status: Planned.
|
|
118
|
+
- Goal: Make successful ad hoc actor patterns easy to promote manually from candidate memory into active user recipe memory.
|
|
119
|
+
- Why now: Candidate recipes under `~/.pi/agent/recipes/candidates` are replayable but intentionally not active tools; the two-stage memory model now needs an explicit operator-gated promotion path.
|
|
186
120
|
- Direction:
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
- Preserve
|
|
121
|
+
- List candidate recipes with source run, timestamp, fingerprint, description/template preview, and validation status.
|
|
122
|
+
- Promote a selected candidate to `~/.pi/agent/recipes/<name>.json` only through an explicit action or explicit tool argument.
|
|
123
|
+
- Run recipe validation/doctor before writing and expose collision/shadowing diagnostics.
|
|
124
|
+
- Preserve candidate files unless deletion is explicitly requested.
|
|
125
|
+
- Prefer extending existing registry/tool surfaces over adding a new public noun.
|
|
191
126
|
- Acceptance:
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
127
|
+
- Candidate recipes remain non-tools until promotion.
|
|
128
|
+
- Promotion writes atomically and never auto-promotes.
|
|
129
|
+
- Tests cover valid promotion, invalid candidate, name collision, and packaged-recipe shadowing.
|
|
130
|
+
- Docs explain candidate memory vs active tool memory in one compact section.
|
|
195
131
|
|
|
196
|
-
### M-
|
|
132
|
+
### M-24 Registry Path Naming Cleanup
|
|
197
133
|
|
|
198
|
-
- Priority:
|
|
199
|
-
- Status:
|
|
200
|
-
- Goal:
|
|
201
|
-
- Why now: `
|
|
134
|
+
- Priority: Low.
|
|
135
|
+
- Status: Planned.
|
|
136
|
+
- Goal: Reduce legacy-storage naming noise without changing the persistent file path.
|
|
137
|
+
- Why now: `legacy-tool-registry.json` is still a compatibility storage path, but helper names and tests should make clear that the stable path is retained intentionally.
|
|
202
138
|
- Direction:
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
139
|
+
- Prefer neutral helper/test wording such as registry path or retained registry storage path.
|
|
140
|
+
- Keep the on-disk filename unchanged unless a separate migration is justified.
|
|
141
|
+
- Do not reintroduce legacy migration code.
|
|
206
142
|
- Acceptance:
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
- Pack dry assertions cover `dist/scripts`, `dist/recipes`, `dist/fixtures`, and `dist/skills`.
|
|
143
|
+
- Path helpers and tests no longer imply an unfinished migration.
|
|
144
|
+
- Existing registry storage compatibility remains unchanged.
|
|
210
145
|
|
|
211
|
-
### M-
|
|
146
|
+
### M-19 Recipe Doctor Risk Labels v2
|
|
212
147
|
|
|
213
148
|
- Priority: Medium.
|
|
214
|
-
- Status:
|
|
215
|
-
- Goal:
|
|
216
|
-
- Why now:
|
|
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.
|
|
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.
|
|
222
|
-
- Acceptance:
|
|
223
|
-
- Docs and actors skill advertise `control.kill` as canonical parent-to-actor termination.
|
|
224
|
-
- Mailbox-loop helpers/tests distinguish actor termination from actor-domain `stop`/`cancel` handling.
|
|
225
|
-
- Packaged recipes declare `stop`/`cancel` only when the actor-specific behavior is meaningful.
|
|
226
|
-
- Tests assert that generic mailbox-loop termination is not triggered by `control.stop` or `control.cancel`.
|
|
227
|
-
|
|
228
|
-
### M-12 Runtime and Session Observability UX
|
|
229
|
-
|
|
230
|
-
- Priority: High.
|
|
231
|
-
- Status: Done.
|
|
232
|
-
- Goal: Make reload/session/runtime mismatches visible without changing ownership or lifecycle policy.
|
|
233
|
-
- Why now: 0.26 dogfood showed that actors, mailbox workers, and hotfixes work after a full Pi restart, but ordinary reloads can leave operators unsure which extension code is live. Session ownership mismatches also surface as terse strings instead of structured diagnostics or navigation hints.
|
|
149
|
+
- Status: Planned.
|
|
150
|
+
- Goal: Evolve recipe doctor into a compact capability-risk membrane without pretending to sandbox trusted local execution.
|
|
151
|
+
- Why now: Recipe doctor already has remediation UX; the next useful slice is deterministic advisory risk classification for local capabilities.
|
|
234
152
|
- Direction:
|
|
235
|
-
- Add
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
- Non-goals:
|
|
241
|
-
- No cross-session force kill.
|
|
242
|
-
- No session attach/adopt/reparent policy.
|
|
243
|
-
- No relaxation of current ownership gates.
|
|
153
|
+
- Add advisory labels such as `risk.shell`, `risk.eval`, `risk.broad_fs_write`, `risk.destructive_fs`, `risk.network`, `risk.external_side_effect`, `risk.long_running`, `risk.platform_specific`, and `risk.secret_touching`.
|
|
154
|
+
- Keep labels advisory and deterministic; do not block execution unless existing validation already blocks it.
|
|
155
|
+
- Expose compact risk summaries in `inspect target=recipes view=doctor` and verbose per-recipe labels.
|
|
156
|
+
- Keep launch-time warnings quiet except for already-failing or clearly dangerous cases.
|
|
157
|
+
- Preserve honest wording: trusted local execution, not isolation.
|
|
244
158
|
- Acceptance:
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
159
|
+
- Risk labels are deterministic and tested.
|
|
160
|
+
- Existing risky shell-boundary diagnostics remain intact.
|
|
161
|
+
- Doctor output stays compact by default.
|
|
162
|
+
- README/docs do not introduce sandbox or security-boundary claims.
|
|
249
163
|
|
|
250
|
-
### M-
|
|
164
|
+
### M-20 Runtime Triage Surface
|
|
251
165
|
|
|
252
|
-
- Priority:
|
|
253
|
-
- Status:
|
|
254
|
-
- Goal:
|
|
255
|
-
- Why now:
|
|
166
|
+
- Priority: Medium.
|
|
167
|
+
- Status: Planned.
|
|
168
|
+
- Goal: Add one compact operator triage view that answers what needs attention right now without performing repairs.
|
|
169
|
+
- Why now: Runtime status, recipe doctor, candidates, stale claims, session mismatches, failed runs, and other-session counts are currently separate bounded surfaces.
|
|
256
170
|
- Direction:
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
- Keep remediation advisory only; do not auto-disable, delete, rewrite, or nag about user recipes.
|
|
171
|
+
- Add `inspect target=tool:pi-actors view=triage` or an equivalent existing inspect surface.
|
|
172
|
+
- Summarize runtime version/mode, active runs, other-session runs, invalid or blocking recipes, high-risk recipes, candidate recipes, stale worker claims, recent failed runs, attention messages, and suggested next inspect actions.
|
|
173
|
+
- Keep every warning tied to a next inspect/action hint.
|
|
174
|
+
- Do not auto-repair, auto-prune, relax ownership, or hide detailed source-of-truth views.
|
|
262
175
|
- Acceptance:
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
- Tests cover invalid and disabled user recipes shadowing a packaged candidate.
|
|
176
|
+
- Triage output is compact enough for agent context.
|
|
177
|
+
- Healthy and degraded states are covered by tests.
|
|
178
|
+
- Detailed inspect/doctor/status views remain source of truth.
|
|
267
179
|
|
|
268
|
-
### M-
|
|
180
|
+
### M-21 Packaged Recipe QA Matrix
|
|
269
181
|
|
|
270
182
|
- Priority: Medium.
|
|
271
183
|
- Status: Planned.
|
|
272
|
-
- Goal:
|
|
273
|
-
- Why now:
|
|
184
|
+
- Goal: Prevent packaged recipes from drifting into inconsistent mailbox, artifact, platform, or package-root behavior.
|
|
185
|
+
- Why now: Packaged recipes are standard-library components; they should be boringly consistent before operators copy or register them as durable local capabilities.
|
|
274
186
|
- Direction:
|
|
275
|
-
-
|
|
276
|
-
- Keep
|
|
277
|
-
-
|
|
187
|
+
- Add an internal QA check over `recipes/*.json` for descriptions, async mailbox contracts, termination vocabulary, artifact declarations, platform notes, installed-package-safe helper paths, and compiled shim coverage.
|
|
188
|
+
- Keep `control.kill` as generic runtime termination and allow `control.stop` / `control.cancel` only as actor-domain vocabulary.
|
|
189
|
+
- Fail with exact recipe/path/key diagnostics.
|
|
190
|
+
- Avoid a broad recipe-library rewrite beyond violations discovered by the check.
|
|
278
191
|
- Acceptance:
|
|
279
|
-
-
|
|
280
|
-
- Tests cover
|
|
192
|
+
- QA runs under an existing validation command or a clearly named subcheck used by `npm run validate`.
|
|
193
|
+
- Tests/fixtures cover at least one positive and one negative case.
|
|
194
|
+
- Packaged recipes remain optional components, not policy workflows.
|
|
281
195
|
|
|
282
|
-
### M-
|
|
196
|
+
### M-22 Wake and Watcher Chaos Fixtures
|
|
283
197
|
|
|
284
198
|
- Priority: Medium.
|
|
285
199
|
- Status: Planned.
|
|
286
|
-
- Goal:
|
|
287
|
-
- Why now:
|
|
200
|
+
- Goal: Harden the invariant that durable files are canonical and wake notifications are advisory acceleration.
|
|
201
|
+
- Why now: Wake, watcher, line-counter, and JSONL resilience are central to operator trust as actor counts grow.
|
|
288
202
|
- Direction:
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
203
|
+
- Add deterministic fixtures for watcher restart, line-counter reset, duplicate terminal events, missing wake with present inbox record, wake before file catch-up, corrupt JSONL with later valid records, and killed run with stale progress phase.
|
|
204
|
+
- Preserve event-driven observability without reintroducing polling-first coordination examples.
|
|
205
|
+
- Keep tests fast and local.
|
|
292
206
|
- Acceptance:
|
|
293
|
-
-
|
|
294
|
-
-
|
|
207
|
+
- Duplicate follow-ups do not reappear.
|
|
208
|
+
- Missing wake does not lose durable messages.
|
|
209
|
+
- Corrupt records degrade inspect but do not kill it.
|
|
210
|
+
- Killed/stale progress states remain diagnosable.
|
|
295
211
|
|
|
296
212
|
## Explicitly Deferred
|
|
297
213
|
|
|
@@ -301,6 +217,7 @@ These are valid ideas but not current focus. Reintroduce only with concrete evid
|
|
|
301
217
|
- Run restart/reattach policy: risky for isolation; defer until corruption recovery and protocol fixtures are stronger.
|
|
302
218
|
- Cross-session force kill or attach/adopt/reparent: useful later, but ownership policy should not change until observability makes current boundaries clear.
|
|
303
219
|
- Actor address helper CLI: keep diagnostics improving opportunistically inside existing parser/tests.
|
|
220
|
+
- Golden flow docs and flow conformance runner: useful after M-14, M-15, M-17, and M-18 make the diagnostic and promotion surfaces stable.
|
|
304
221
|
- Documentation refactor: defer until the canonical mailbox loop and worker recipe exist; avoid rewriting docs twice.
|
|
305
222
|
- Host-level tool unregistration: blocked on host API support.
|
|
306
223
|
- Branch-local checkpoint semantics: wait for real collaborative branch-runner experiments.
|
|
@@ -310,4 +227,6 @@ These are valid ideas but not current focus. Reintroduce only with concrete evid
|
|
|
310
227
|
|
|
311
228
|
```text
|
|
312
229
|
Next milestone: M-14 Session Mismatch Follow-through.
|
|
230
|
+
Then: M-15 Worker Stale-Claim Dogfood → M-17 Message Delivery Outcome Contract → M-18 Candidate Recipe Promotion UX.
|
|
231
|
+
Small cleanup lane: M-23 Tool Boundary Type Tightening → M-24 Registry Path Naming Cleanup.
|
|
313
232
|
```
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.30.1: Backlog Curation Hotfix
|
|
6
|
+
|
|
7
|
+
- `[Backlog]` Added curation rules clarifying that completed work belongs only in the changelog, that cohesive ~1000-line domain files are acceptable, and that file splitting should follow real ownership boundaries rather than line count alone.
|
|
8
|
+
- `[Backlog]` Added small cleanup candidates for typed tool-boundary tightening and retained registry-path naming clarity without expanding the public actor surface.
|
|
9
|
+
|
|
10
|
+
## 0.30.0: Composition Root Compression
|
|
11
|
+
|
|
12
|
+
- `[Entrypoint]` Added a narrow Pi SDK adapter domain, moved recipe live-reload mechanics into the runtime domain, moved run-state watcher, run UI observation state, and run notification formatting into observability, moved runtime path constants and co-located skill path discovery to the paths domain, grouped core actor tool definitions in the tools domain, and shifted actor-inspector command state/parsing/render selection into the actor-inspector domain so `index.ts` keeps only live Pi wiring.
|
|
13
|
+
- `[Backlog]` Added focused next-minor candidates for message delivery outcomes, candidate recipe promotion, recipe risk labels, runtime triage, packaged recipe QA, and wake/watcher chaos fixtures while deferring broader golden-flow documentation until the core diagnostic surfaces settle.
|
|
14
|
+
|
|
5
15
|
## 0.29.3: Actor Skill Context Hotfix
|
|
6
16
|
|
|
7
17
|
- `[Skills]` Reconciled knowledge-surface layering across project and actor guidance, added a project topology map, moved multi-agent methodology from the actors runtime skill into the swarm skill, and split actor quick-start guidance from a deeper recipe/operating-pattern reference.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Wraps command templates as callable pi tools, stores durable user tools as recipe files, and exposes actor orchestration across reloads and sessions.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
8
|
-
export default function toolRegistryExtension(pi: ExtensionAPI): void;
|
|
7
|
+
import * as Pi from "./lib/pi.ts";
|
|
8
|
+
export default function toolRegistryExtension(pi: Pi.ExtensionAPI): void;
|