@llblab/pi-actors 0.22.2 → 0.22.4
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/AGENTS.md +1 -0
- package/BACKLOG.md +456 -81
- package/CHANGELOG.md +25 -25
- package/dist/index.js +1 -1
- package/dist/lib/actor-rooms.d.ts +8 -2
- package/dist/lib/actor-rooms.js +58 -9
- package/dist/lib/async-runs.js +32 -10
- package/dist/lib/observability.js +28 -10
- package/dist/lib/recipe-discovery.js +121 -16
- package/dist/lib/recipe-references.d.ts +1 -0
- package/dist/lib/recipe-references.js +40 -1
- package/dist/lib/registry.js +5 -1
- package/dist/lib/tools.js +25 -8
- package/index.ts +1 -1
- package/lib/actor-rooms.ts +79 -11
- package/lib/async-runs.ts +124 -88
- package/lib/observability.ts +85 -24
- package/lib/recipe-discovery.ts +186 -41
- package/lib/recipe-references.ts +88 -14
- package/lib/registry.ts +7 -1
- package/lib/tools.ts +42 -15
- package/package.json +1 -1
- package/skills/actors/SKILL.md +1 -1
- package/skills/swarm/SKILL.md +1 -1
package/AGENTS.md
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
- `Communication direction`: The design target is an organic universal message layer across sync tasks, async runs, branches, tools, and coordinators. Breaking changes are allowed to compress concepts, remove accidental duplication, and make duplex communication symmetric where the domain is symmetric. | Trigger: Designing APIs or recipes that communicate | Action: Prefer a concentrated actor/message protocol (`spawn`, `message`, `inspect`, addressed endpoints, typed message envelopes, mailbox accepts/emits) over exposing FIFO/outbox/status mechanics directly; use one envelope for upward, downward, lateral, parent/branch, and branch/parent messages; absorb runtime async primitives into actor API instead of preserving parallel public concepts.
|
|
50
50
|
- `Runtime IO discipline`: Tool stdout and temp state must stay bounded and local | Trigger: Changing execution, formatting, temp files, run state, logs, or artifacts | Action: Keep tail truncation/full-output temp files/failure formatting intact; keep extension-owned temp state under `~/.pi/agent/tmp/pi-actors` unless explicitly overridden
|
|
51
51
|
- `Backlog is planning, not history`: `BACKLOG.md` should contain only completable future work with current task/scope/exit criteria; completed delivery history belongs in `CHANGELOG.md`, and durable or evergreen behavior belongs in `AGENTS.md`, README, docs, or skills | Trigger: Editing backlog or reconciling completed slices | Action: Remove historical progress narratives, version-scoped headings, watch-mode/monitoring principles, open-ended “continue evolving” items, and conditional “if usage proves” notes unless they are framed as a concrete gated task; keep priority order and prefer an 80/20 focus list when many remaining tasks compete for attention
|
|
52
|
+
- `Changelog signal only`: Changelog bullets describe meaningful user/operator/developer changes, not release bookkeeping | Trigger: Preparing or editing release notes | Action: Do not add bullets that only say package, lockfile, or packaged skill metadata versions were bumped for this package; the version heading already carries that information. Mention dependency or package metadata changes only when the metadata change itself has user-visible or operational meaning
|
|
52
53
|
- `Release artifact hygiene`: PR/release summaries become stale during active branch work and do not belong in the repository documentation tree | Trigger: Preparing release notes or PR bodies | Action: Create temporary/operator-facing artifacts outside the repo only during explicit release finalization; keep durable release evidence in `CHANGELOG.md` and open gates in `BACKLOG.md`
|
|
53
54
|
- `Graceful actor retirement`: Coordinator/helper actors that exist only to supervise a bounded worker tree should have explicit retirement semantics instead of relying on the operator or LLM to remember cleanup | Trigger: Designing coordinator recipes, helper actors, worker fanout, locker-backed swarms, or auto-stop behavior | Action: Make retirement opt-in through recipe/run metadata, keep candidates blocked while active command-template branches or descendant `pi -p` workers are still running, retire only after observed child actors are terminal and outputs are flushed, prefer graceful control messages before process termination, record retirement events, and never infer retirement for persistent services or backlog implementers
|
|
54
55
|
- `Persistent implementer workflows are recipe composition`: Backlog implementer scenarios should be launched through reusable component recipes, not one-off scripts or ad hoc shell orchestration | Trigger: Designing implementer swarms, backlog workers, coordinator-assigned task loops, or related recipes | Action: Compose cells such as `coordinator-locker`, subagent launchers, and actor-message utilities; preserve JSON envelope object shape across handoffs; add missing reusable component recipes only when needed; update the actors skill launcher map with supported scenarios
|
package/BACKLOG.md
CHANGED
|
@@ -1,74 +1,466 @@
|
|
|
1
1
|
# Project Backlog
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
3
|
+
## Implementation Boundary
|
|
4
|
+
|
|
5
|
+
Work only inside `pi-actors`: strengthen the current Pi extension and local actor kernel. Do not split work into an external transportable standard, do not design `mcp-actors`, and do not change public positioning.
|
|
6
|
+
|
|
7
|
+
Current carrying contour:
|
|
8
|
+
|
|
9
|
+
- `spawn`, `message`, and `inspect` stay the durable public verbs.
|
|
10
|
+
- Async run state stays file-backed and inspectable.
|
|
11
|
+
- Tool exposure stays recipe-based and location-derived from `~/.pi/agent/recipes`.
|
|
12
|
+
- Durable inbox and outbox files remain canonical intent and message state.
|
|
13
|
+
- Rooms, rosters, and branch inboxes remain local coordination memory.
|
|
14
|
+
- Wake notifications remain advisory acceleration, not the queue.
|
|
15
|
+
- Operator-facing observability stays explicit and bounded.
|
|
16
|
+
|
|
17
|
+
Core invariant:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
Recipe = portable executable capability.
|
|
21
|
+
Run = addressable lifecycle instance.
|
|
22
|
+
Message = typed semantic envelope.
|
|
23
|
+
Mailbox = durable intent queue.
|
|
24
|
+
Wake = advisory acceleration.
|
|
25
|
+
Room = shared local coordination memory.
|
|
26
|
+
Inspect = intentional observation.
|
|
27
|
+
Artifact = durable result.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Non-goals:
|
|
31
|
+
|
|
32
|
+
- Distributed workers.
|
|
33
|
+
- Generic scheduler DSL.
|
|
34
|
+
- Cloud sync.
|
|
35
|
+
- External transport standard.
|
|
36
|
+
- MCP implementation.
|
|
37
|
+
- Arbitrary subrooms.
|
|
38
|
+
- Heavy broker abstraction.
|
|
39
|
+
|
|
40
|
+
## Hotfix Backlog
|
|
41
|
+
|
|
42
|
+
No open hotfix items.
|
|
43
|
+
|
|
44
|
+
## Minor Backlog
|
|
45
|
+
|
|
46
|
+
### M-01 Internal Protocol Contract Pack
|
|
47
|
+
|
|
48
|
+
- Priority: Medium.
|
|
49
|
+
- Goal: Add machine-readable internal schemas and fixtures for implementation, docs, tests, and inspector consistency.
|
|
50
|
+
- Files:
|
|
51
|
+
- `schemas/actor-message.schema.json`.
|
|
52
|
+
- `schemas/actor-address.schema.json`.
|
|
53
|
+
- `schemas/run-state.schema.json`.
|
|
54
|
+
- `schemas/run-inbox-message.schema.json`.
|
|
55
|
+
- `schemas/run-outbox-event.schema.json`.
|
|
56
|
+
- `schemas/room-message.schema.json`.
|
|
57
|
+
- `schemas/room-roster.schema.json`.
|
|
58
|
+
- `schemas/communication-snapshot.schema.json`.
|
|
59
|
+
- `schemas/recipe.schema.json`.
|
|
60
|
+
- `fixtures/protocol/run-minimal.json`.
|
|
61
|
+
- `fixtures/protocol/message-branch.json`.
|
|
62
|
+
- `fixtures/protocol/message-room-join.json`.
|
|
63
|
+
- `fixtures/protocol/mailbox-contract.json`.
|
|
64
|
+
- Acceptance:
|
|
65
|
+
- Normalization outputs validate.
|
|
66
|
+
- Docs examples validate.
|
|
67
|
+
- Fixtures are usable by tests.
|
|
68
|
+
- Schemas are versioned with package version.
|
|
43
69
|
|
|
44
|
-
###
|
|
70
|
+
### M-02 Unified Actor Event Base
|
|
45
71
|
|
|
46
72
|
- Priority: Medium.
|
|
47
|
-
- Goal:
|
|
73
|
+
- Goal: Add a shared base envelope for actor event-like records without forcing one storage file.
|
|
74
|
+
- Target channels:
|
|
75
|
+
- `events`.
|
|
76
|
+
- `inbox`.
|
|
77
|
+
- `outbox`.
|
|
78
|
+
- `wake`.
|
|
79
|
+
- `room`.
|
|
80
|
+
- `branch`.
|
|
81
|
+
- Acceptance:
|
|
82
|
+
- New append helpers generate ids consistently.
|
|
83
|
+
- Existing files remain readable.
|
|
84
|
+
- `inspect` can show id, correlation, and causation.
|
|
85
|
+
- No migration is forced.
|
|
86
|
+
|
|
87
|
+
### M-03 Mailbox Contract v1
|
|
88
|
+
|
|
89
|
+
- Priority: Medium.
|
|
90
|
+
- Goal: Extend `mailbox.accepts` and `mailbox.emits` from string arrays to backward-compatible typed contracts.
|
|
48
91
|
- Direction:
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
92
|
+
- Keep string declarations valid.
|
|
93
|
+
- Normalize typed entries for inspection.
|
|
94
|
+
- Support fields such as body schema, ack requirement, idempotency, response requirement, level, and summary.
|
|
95
|
+
- Acceptance:
|
|
96
|
+
- String declarations still work.
|
|
97
|
+
- `inspect view=mailbox` shows normalized contracts.
|
|
98
|
+
- Messages outside accepts produce advisory warnings by default, not hard blocks.
|
|
99
|
+
- Docs clarify advisory versus strict mode.
|
|
100
|
+
|
|
101
|
+
### M-04 Actor Loop Helper SDK
|
|
102
|
+
|
|
103
|
+
- Priority: Medium.
|
|
104
|
+
- Goal: Provide reusable helpers for mailbox-consuming actors so recipe authors do not rewrite loops.
|
|
105
|
+
- Files:
|
|
106
|
+
- `lib/actor-loop.ts`.
|
|
107
|
+
- `scripts/actor-loop.mjs`.
|
|
108
|
+
- Capabilities:
|
|
109
|
+
- Initial reconciliation.
|
|
110
|
+
- Wake subscription.
|
|
111
|
+
- Polling fallback.
|
|
112
|
+
- Run and branch inbox claiming.
|
|
113
|
+
- Handled and failed status transitions.
|
|
114
|
+
- Outbox emission.
|
|
115
|
+
- Progress updates.
|
|
116
|
+
- Graceful stop handling.
|
|
117
|
+
- Acceptance:
|
|
118
|
+
- A packaged demo recipe uses a mailbox-only control endpoint.
|
|
119
|
+
- Concurrent wake and poll paths do not double-process messages.
|
|
120
|
+
- Helper supports run inbox and branch inbox.
|
|
58
121
|
|
|
59
|
-
###
|
|
122
|
+
### M-05 Branch Delivery Unification
|
|
60
123
|
|
|
61
124
|
- Priority: Medium.
|
|
62
|
-
- Goal:
|
|
125
|
+
- Goal: Route direct branch messages and room multicast branch copies through one internal helper.
|
|
126
|
+
- Target helper:
|
|
127
|
+
- `routeBranchEnvelope(stateDir, runId, message, { source })`.
|
|
128
|
+
- Acceptance:
|
|
129
|
+
- Direct branch messages and room multicast produce the same durable branch inbox shape.
|
|
130
|
+
- Parent run dispatch envelope is consistent.
|
|
131
|
+
- Tests cover both paths.
|
|
132
|
+
|
|
133
|
+
### M-06 Attention Semantics v1
|
|
134
|
+
|
|
135
|
+
- Priority: Medium.
|
|
136
|
+
- Goal: Formalize coordinator attention behavior through semantic metadata rather than transport knobs.
|
|
63
137
|
- Direction:
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
138
|
+
- Support attention metadata such as `requires_response=true` and reason.
|
|
139
|
+
- Map response-required messages to follow-up.
|
|
140
|
+
- Keep progress/info messages inspectable or notify-only.
|
|
141
|
+
- Preserve existing internal `delivery` behavior.
|
|
142
|
+
- Acceptance:
|
|
143
|
+
- `requires_response=true` becomes coordinator follow-up.
|
|
144
|
+
- Progress info stays log or notification.
|
|
145
|
+
- Explicit stop and kill controls do not create duplicate terminal follow-up.
|
|
146
|
+
|
|
147
|
+
### M-07 Recipe Doctor
|
|
148
|
+
|
|
149
|
+
- Priority: Medium.
|
|
150
|
+
- Goal: Add intentional recipe health inspection.
|
|
151
|
+
- Surface:
|
|
152
|
+
- `inspect target=recipes view=doctor`.
|
|
153
|
+
- `inspect target=recipes view=doctor verbose=true`.
|
|
154
|
+
- Checks:
|
|
155
|
+
- Import graph health.
|
|
156
|
+
- Shadowing and blockers.
|
|
157
|
+
- Invalid or disabled recipes.
|
|
158
|
+
- Risky command templates.
|
|
159
|
+
- Absolute path portability.
|
|
160
|
+
- OS compatibility.
|
|
161
|
+
- Root permissions.
|
|
162
|
+
- Mailbox completeness.
|
|
163
|
+
- Artifact placeholder resolution.
|
|
164
|
+
- Stale or unused usage.
|
|
165
|
+
- Acceptance:
|
|
166
|
+
- Compact output is grouped by severity.
|
|
167
|
+
- Verbose output is structured.
|
|
168
|
+
- No automatic cleanup happens.
|
|
169
|
+
- Every diagnostic has reason and suggested actions.
|
|
170
|
+
|
|
171
|
+
### M-08 Artifact Manifest v1
|
|
172
|
+
|
|
173
|
+
- Priority: Medium.
|
|
174
|
+
- Goal: Extend recipe artifacts from string paths to backward-compatible artifact metadata.
|
|
175
|
+
- Direction:
|
|
176
|
+
- Keep string artifact paths valid.
|
|
177
|
+
- Add optional object fields such as path, kind, media type, and required.
|
|
178
|
+
- Resolve manifests with existence, size, and optional hash.
|
|
179
|
+
- Acceptance:
|
|
180
|
+
- String artifacts remain valid.
|
|
181
|
+
- Runtime resolves manifest with `exists`, `size`, and optional `sha256`.
|
|
182
|
+
- Terminal follow-ups group named artifacts.
|
|
183
|
+
- Missing required artifacts are visible in result and inspect output.
|
|
184
|
+
|
|
185
|
+
### M-09 Lifecycle Retention Policy
|
|
186
|
+
|
|
187
|
+
- Priority: Medium.
|
|
188
|
+
- Goal: Add explicit archive and prune behavior for terminal run state.
|
|
189
|
+
- Messages:
|
|
190
|
+
- `control.archive`.
|
|
191
|
+
- `control.prune`.
|
|
192
|
+
- Direction:
|
|
193
|
+
- Only terminal runs can be archived or pruned.
|
|
194
|
+
- Active runs fail closed.
|
|
195
|
+
- Archive moves or compresses state with a tombstone.
|
|
196
|
+
- Prune deletes terminal state after ownership checks, optionally preserving artifacts.
|
|
197
|
+
- Acceptance:
|
|
198
|
+
- Terminal cleanup candidates are inspectable.
|
|
199
|
+
- Artifacts can be preserved.
|
|
200
|
+
- Active run deletion is impossible.
|
|
201
|
+
|
|
202
|
+
### M-10 Inspector v2 For Unread Mentions And Needs Response
|
|
203
|
+
|
|
204
|
+
- Priority: Medium.
|
|
205
|
+
- Goal: Strengthen the TUI inspector as the operator membrane for multi-actor sessions.
|
|
206
|
+
- Direction:
|
|
207
|
+
- Add stable event ids in previews.
|
|
208
|
+
- Add unread cursor per session, run, and room.
|
|
209
|
+
- Preserve mention filtering.
|
|
210
|
+
- Add needs-response marker from attention semantics.
|
|
211
|
+
- Distinguish room timeline rows from branch inbox rows.
|
|
212
|
+
- Acceptance:
|
|
213
|
+
- `/actors-inspector-filter unread` works.
|
|
214
|
+
- `/actors-inspector-filter mention <text>` works.
|
|
215
|
+
- `/actors-inspect <number>` marks the item read for the current session.
|
|
216
|
+
- Unread state stays UI/session metadata, not protocol truth.
|
|
217
|
+
|
|
218
|
+
### M-11 Run State Index
|
|
219
|
+
|
|
220
|
+
- Priority: Medium.
|
|
221
|
+
- Goal: Add a rebuildable run-state index to reduce recursive scans and improve observability performance.
|
|
222
|
+
- Target file:
|
|
223
|
+
- `~/.pi/agent/tmp/pi-actors/runs/index.json`.
|
|
224
|
+
- Contents:
|
|
225
|
+
- State dir.
|
|
226
|
+
- Run id.
|
|
227
|
+
- Owner id.
|
|
228
|
+
- Status.
|
|
229
|
+
- Updated time.
|
|
230
|
+
- Recipe or tool.
|
|
231
|
+
- Acceptance:
|
|
232
|
+
- Index accelerates list and summarize.
|
|
233
|
+
- Corruption falls back to scan.
|
|
234
|
+
- Rebuild helper exists.
|
|
235
|
+
- Nested runs are represented without id collision.
|
|
236
|
+
|
|
237
|
+
### M-12 Internal Conformance Runner
|
|
238
|
+
|
|
239
|
+
- Priority: Medium.
|
|
240
|
+
- Goal: Add a CI-ready internal conformance runner for pi-actors protocol behavior.
|
|
241
|
+
- Script:
|
|
242
|
+
- `npm run conformance`.
|
|
243
|
+
- Suites:
|
|
244
|
+
- Recipe discovery.
|
|
245
|
+
- Register, update, and delete.
|
|
246
|
+
- Spawn lifecycle.
|
|
247
|
+
- Message routing.
|
|
248
|
+
- Room roster.
|
|
249
|
+
- Branch inbox.
|
|
250
|
+
- Ownership checks.
|
|
251
|
+
- Artifacts.
|
|
252
|
+
- Attention semantics.
|
|
253
|
+
- Acceptance:
|
|
254
|
+
- Runs without Pi UI where possible.
|
|
255
|
+
- Outputs compact report.
|
|
256
|
+
- Fixtures live in the repository.
|
|
257
|
+
- CI can run it.
|
|
258
|
+
|
|
259
|
+
### M-13 Packaged Actor Worker Recipe Template
|
|
260
|
+
|
|
261
|
+
- Priority: Medium.
|
|
262
|
+
- Goal: Add a canonical packaged recipe or template for a long-lived worker-backed branch actor.
|
|
263
|
+
- Direction:
|
|
264
|
+
- Worker joins room.
|
|
265
|
+
- Worker declares mailbox accepts and emits.
|
|
266
|
+
- Worker claims branch inbox messages.
|
|
267
|
+
- Worker posts `task.claim`, `task.result`, and `awaiting_assignment`.
|
|
268
|
+
- Worker handles `control.stop`.
|
|
269
|
+
- Acceptance:
|
|
270
|
+
- Recipe demonstrates correct mailbox loop semantics.
|
|
271
|
+
- It is a recipe-authoring example, not a product feature.
|
|
272
|
+
|
|
273
|
+
### M-14 Recipe Usage Integrity Improvements
|
|
274
|
+
|
|
275
|
+
- Priority: Medium.
|
|
276
|
+
- Goal: Make recipe usage tracking more explainable.
|
|
277
|
+
- Direction:
|
|
278
|
+
- Add fingerprint diff reason.
|
|
279
|
+
- Add reset reason.
|
|
280
|
+
- Consider optional last error.
|
|
281
|
+
- Split launch counts by tool, spawn, and direct recipe.
|
|
282
|
+
- Acceptance:
|
|
283
|
+
- `inspect recipes view=summary verbose=true` shows whether usage refers to current recipe content.
|
|
284
|
+
- Doctor can flag unused current meaning instead of stale old recipe history.
|
|
285
|
+
|
|
286
|
+
### M-15 Safer Command Warning Policy
|
|
287
|
+
|
|
288
|
+
- Priority: Medium.
|
|
289
|
+
- Goal: Unify command-template diagnostics by severity and make warnings actionable without startup spam.
|
|
290
|
+
- Severity:
|
|
291
|
+
- `info`: portability.
|
|
292
|
+
- `warning`: broad mutation, shell, or eval.
|
|
293
|
+
- `error`: impossible, invalid, or unsafe repeat.
|
|
294
|
+
- Direction:
|
|
295
|
+
- Treat legitimate `bash` wrappers as expected trusted boundaries when already packaged or explicitly registered.
|
|
296
|
+
- Keep routine shell wrapper notes out of startup warning blocks.
|
|
297
|
+
- Surface shell/eval/destructive diagnostics through register-time warnings, doctor, and verbose recipe inspection.
|
|
298
|
+
- Acceptance:
|
|
299
|
+
- Command-template warnings include command label, reason, and suggested mitigation.
|
|
300
|
+
- `register_tool` shows relevant warnings.
|
|
301
|
+
- Recipe doctor aggregates warning policy.
|
|
302
|
+
- Startup no longer emits large warning blocks only because recipes wrap `bash`.
|
|
303
|
+
|
|
304
|
+
### M-16 Output And Log Size Governance
|
|
305
|
+
|
|
306
|
+
- Priority: Medium.
|
|
307
|
+
- Goal: Keep stdout, stderr, result, outbox, and actor-message previews bounded in agent context.
|
|
308
|
+
- Direction:
|
|
309
|
+
- Centralize constants for body preview, outbox preview, inspector preview, and tail lines.
|
|
310
|
+
- Keep verbose output opt-in.
|
|
311
|
+
- Prefer files or artifacts for large bodies.
|
|
312
|
+
- Acceptance:
|
|
313
|
+
- Actor messages and previews share consistent caps.
|
|
314
|
+
- Verbose mode is explicit.
|
|
315
|
+
- Large bodies do not flood normal tool output.
|
|
316
|
+
|
|
317
|
+
### M-17 Windows And Nix Portability Pass
|
|
318
|
+
|
|
319
|
+
- Priority: Medium.
|
|
320
|
+
- Goal: Strengthen current portability around FIFO, named-pipe, and mailbox-only paths without adding a new backend.
|
|
321
|
+
- Direction:
|
|
322
|
+
- Doctor flags FIFO-only recipes on native Windows.
|
|
323
|
+
- Keep mailbox-only demo cross-platform.
|
|
324
|
+
- Document platform matrix.
|
|
325
|
+
- Cover named-pipe adapter with injected sender where practical.
|
|
326
|
+
- Acceptance:
|
|
327
|
+
- Native Windows limitations are visible before launch.
|
|
328
|
+
- Mailbox-only recipe works cross-platform.
|
|
329
|
+
- Docs and tests cover the adapter split.
|
|
330
|
+
|
|
331
|
+
### M-18 State Corruption Recovery
|
|
332
|
+
|
|
333
|
+
- Priority: Medium.
|
|
334
|
+
- Goal: Add resilient JSON and JSONL state readers.
|
|
335
|
+
- Direction:
|
|
336
|
+
- Malformed JSONL lines should not kill entire inspect paths.
|
|
337
|
+
- Corrupt JSON files should report diagnostics with paths.
|
|
338
|
+
- Consider optional `.corrupt` quarantine helper.
|
|
339
|
+
- Acceptance:
|
|
340
|
+
- Inspect remains useful when partial state survives.
|
|
341
|
+
- Corrupt paths are reported clearly.
|
|
342
|
+
- Canonical state is not silently rewritten without explicit action.
|
|
343
|
+
|
|
344
|
+
### M-19 Recipe Import Graph Inspector
|
|
345
|
+
|
|
346
|
+
- Priority: Medium.
|
|
347
|
+
- Goal: Add focused inspection for recipe import graphs.
|
|
348
|
+
- Surface:
|
|
349
|
+
- `inspect target=recipes view=imports`.
|
|
350
|
+
- `inspect target=recipes view=imports verbose=true`.
|
|
351
|
+
- Acceptance:
|
|
352
|
+
- Shows import graph, aliases, resolved paths, and shadowed imports.
|
|
353
|
+
- Shows cyclic and depth diagnostics.
|
|
354
|
+
- Helps debug packaged and user recipe composition.
|
|
355
|
+
|
|
356
|
+
### M-20 Spawn Preflight Mode
|
|
357
|
+
|
|
358
|
+
- Priority: Medium.
|
|
359
|
+
- Goal: Add dry-run launch planning for `spawn` and async recipe tool invocation.
|
|
360
|
+
- Direction:
|
|
361
|
+
- Resolve recipe, imports, args, artifacts, state dir, command graph, and mailbox metadata.
|
|
362
|
+
- Do not start a process.
|
|
363
|
+
- Return warnings and resolved launch plan.
|
|
364
|
+
- Acceptance:
|
|
365
|
+
- `preflight=true` returns a resolved plan.
|
|
366
|
+
- No process is spawned.
|
|
367
|
+
- Missing args and risky commands are reported before launch.
|
|
368
|
+
|
|
369
|
+
### M-21 Run Restart And Reattach Policy
|
|
370
|
+
|
|
371
|
+
- Priority: Medium.
|
|
372
|
+
- Goal: Clarify and implement safe behavior for reused `run_id` and `state_dir`.
|
|
373
|
+
- Direction:
|
|
374
|
+
- Active reuse fails closed.
|
|
375
|
+
- Terminal restart with same id is allowed under explicit semantics.
|
|
376
|
+
- Record generation or restarted time.
|
|
377
|
+
- Preserve previous terminal-state policy.
|
|
378
|
+
- Acceptance:
|
|
379
|
+
- Active reuse remains blocked.
|
|
380
|
+
- Terminal restart records generation or `restartedAt`.
|
|
381
|
+
- Inspect shows restart semantics.
|
|
382
|
+
- Docs are updated.
|
|
383
|
+
|
|
384
|
+
### M-22 Actor Address Helper CLI And Tooling
|
|
385
|
+
|
|
386
|
+
- Priority: Medium.
|
|
387
|
+
- Goal: Improve address normalization and diagnostics for recipe authors and tests.
|
|
388
|
+
- Direction:
|
|
389
|
+
- Add helper functions or inspect view for address validation.
|
|
390
|
+
- Improve invalid-address diagnostics.
|
|
391
|
+
- Acceptance:
|
|
392
|
+
- Diagnostics include expected forms.
|
|
393
|
+
- Examples cover branch, room, run, session, and tool addresses.
|
|
394
|
+
- No new public address kinds are added.
|
|
395
|
+
|
|
396
|
+
### M-23 Room Compaction Metadata Improvements
|
|
397
|
+
|
|
398
|
+
- Priority: Medium.
|
|
399
|
+
- Goal: Record richer room compaction metadata.
|
|
400
|
+
- Direction:
|
|
401
|
+
- Track dropped count.
|
|
402
|
+
- Track first and last kept timestamps.
|
|
403
|
+
- Track configured max.
|
|
404
|
+
- Acceptance:
|
|
405
|
+
- `inspect room:<run> view=status verbose=true` shows compaction info.
|
|
406
|
+
- Compaction never corrupts JSONL.
|
|
407
|
+
- Tests cover low `PI_ACTORS_ROOM_MAX_MESSAGES`.
|
|
408
|
+
|
|
409
|
+
### M-24 Coordinator Follow-Up Deduplication
|
|
410
|
+
|
|
411
|
+
- Priority: Medium.
|
|
412
|
+
- Goal: Suppress duplicate terminal transitions and outbox follow-ups across watcher reloads, session restarts, or line-counter resets.
|
|
413
|
+
- Direction:
|
|
414
|
+
- Use event id and stateDir for deduplication where available.
|
|
415
|
+
- Preserve terminal handled semantics.
|
|
416
|
+
- Simulate watcher restart in tests.
|
|
417
|
+
- Acceptance:
|
|
418
|
+
- Duplicate follow-up is suppressed after reasonable watcher reset.
|
|
419
|
+
- Terminal handled state remains effective.
|
|
420
|
+
- Tests cover restart and line-counter reset scenarios.
|
|
421
|
+
|
|
422
|
+
### M-25 Documentation Refactor Runtime Contracts First
|
|
423
|
+
|
|
424
|
+
- Priority: Medium.
|
|
425
|
+
- Goal: Reorganize docs so implementation agents find stable contracts before examples.
|
|
426
|
+
- Target order:
|
|
427
|
+
- `docs/runtime-contracts.md`.
|
|
428
|
+
- `docs/actor-messages.md`.
|
|
429
|
+
- `docs/async-runs.md`.
|
|
430
|
+
- `docs/tool-registry.md`.
|
|
431
|
+
- `docs/template-recipes.md`.
|
|
432
|
+
- `docs/command-templates.md`.
|
|
433
|
+
- `docs/recipe-authoring.md`.
|
|
434
|
+
- `docs/troubleshooting.md`.
|
|
435
|
+
- Acceptance:
|
|
436
|
+
- No polling-first examples.
|
|
437
|
+
- Every example matches fixtures.
|
|
438
|
+
- Docs distinguish protocol semantics from Pi UI commands.
|
|
439
|
+
- No external standard or MCP work is introduced.
|
|
440
|
+
|
|
441
|
+
## Suggested Milestone Order
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
Patch release:
|
|
445
|
+
H-01..H-12
|
|
446
|
+
|
|
447
|
+
Minor 0.23 — Contract consolidation:
|
|
448
|
+
M-01, M-02, M-03, M-12, M-25
|
|
449
|
+
|
|
450
|
+
Minor 0.24 — Runtime/message reliability:
|
|
451
|
+
M-04, M-05, M-06, M-13, M-24
|
|
452
|
+
|
|
453
|
+
Minor 0.25 — Operator hygiene:
|
|
454
|
+
M-07, M-08, M-09, M-14, M-15, M-16
|
|
455
|
+
|
|
456
|
+
Minor 0.26 — Inspector and state scaling:
|
|
457
|
+
M-10, M-11, M-18, M-19, M-23
|
|
458
|
+
|
|
459
|
+
Minor 0.27 — Portability and lifecycle polish:
|
|
460
|
+
M-17, M-20, M-21, M-22
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
## Blocked Or Opportunistic Carry-Over
|
|
72
464
|
|
|
73
465
|
### Branch-Local Checkpoint Semantics
|
|
74
466
|
|
|
@@ -90,30 +482,13 @@
|
|
|
90
482
|
- Exit:
|
|
91
483
|
- Deleting a recipe file removes the corresponding runtime tool definition and active-tool entry without session restart.
|
|
92
484
|
|
|
93
|
-
### Recipe Discovery Expansion
|
|
94
|
-
|
|
95
|
-
- Priority: Low.
|
|
96
|
-
- Goal: Support larger recipe libraries without confusing recipe identity or priority.
|
|
97
|
-
- Direction:
|
|
98
|
-
- Add nested recipe directories only after flat `recipes/*.json` discovery semantics are stable.
|
|
99
|
-
- Keep same-id priority and invalid-blocking behavior explicit if nested ids are introduced.
|
|
100
|
-
|
|
101
485
|
### Actor Recipe Feedback Loop
|
|
102
486
|
|
|
103
487
|
- Priority: Low.
|
|
104
488
|
- Goal: Turn actor recipe-context awareness into a practical improvement loop for packaged recipes and operator-owned recipe memory.
|
|
105
489
|
- Direction:
|
|
106
490
|
- After real multi-agent runs, capture whether child actors report that recipe/import/mailbox/role boundaries fit the task.
|
|
107
|
-
- Keep the loop advisory and operator-gated
|
|
108
|
-
- Prefer small recipe
|
|
491
|
+
- Keep the loop advisory and operator-gated.
|
|
492
|
+
- Prefer small recipe, README, and skill refinements over scenario catalogs.
|
|
109
493
|
- Exit:
|
|
110
|
-
- At least one real run produces recipe-boundary feedback that is
|
|
111
|
-
|
|
112
|
-
### Recipe Usage Telemetry Evolution
|
|
113
|
-
|
|
114
|
-
- Priority: Low.
|
|
115
|
-
- Goal: Improve long-term operator insight into recipe usefulness without making telemetry noisy.
|
|
116
|
-
- Direction:
|
|
117
|
-
- Consider sidecar stats sync/backup policy after inline user-owned `usage.calls` / `usage.last_called` proves useful.
|
|
118
|
-
- Consider an operator-approved recipe promotion workflow that turns successful package/ad hoc/direct spawn suggestions into a reviewed `~/.pi/agent/recipes` entry with provenance and diff, without auto-saving.
|
|
119
|
-
- Do not add failure counters as primary usefulness evidence unless there is a strong operator-facing need.
|
|
494
|
+
- At least one real run produces recipe-boundary feedback that is applied or explicitly rejected with rationale.
|