@llblab/pi-actors 0.42.3 → 0.43.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/AGENTS.md +127 -175
- package/BACKLOG.md +189 -1
- package/CHANGELOG.md +183 -292
- package/README.md +115 -276
- package/dist/fixtures/protocol/control-endpoint.json +6 -0
- package/dist/fixtures/protocol/control-record.json +9 -0
- package/dist/fixtures/protocol/recipe-summary.json +4 -12
- package/dist/fixtures/protocol/trace-event.json +9 -0
- package/dist/index.js +1 -1
- package/dist/lib/async-runs.d.ts +15 -38
- package/dist/lib/async-runs.js +173 -111
- package/dist/lib/automatic-review-runtime.d.ts +1 -1
- package/dist/lib/automatic-review-runtime.js +5 -5
- package/dist/lib/command-templates.d.ts +2 -0
- package/dist/lib/command-templates.js +38 -4
- package/dist/lib/control-projection.d.ts +20 -0
- package/dist/lib/control-projection.js +66 -0
- package/dist/lib/control.d.ts +15 -0
- package/dist/lib/control.js +97 -0
- package/dist/lib/draft-sleep.js +3 -3
- package/dist/lib/execution-sessions.d.ts +17 -0
- package/dist/lib/execution-sessions.js +85 -0
- package/dist/lib/file-state.d.ts +2 -0
- package/dist/lib/file-state.js +114 -46
- package/dist/lib/inspector-actions.d.ts +2 -2
- package/dist/lib/inspector-actions.js +2 -2
- package/dist/lib/inspector-command.js +3 -3
- package/dist/lib/inspector-overlay.d.ts +54 -70
- package/dist/lib/inspector-overlay.js +576 -910
- package/dist/lib/inspector.d.ts +3 -71
- package/dist/lib/inspector.js +19 -665
- package/dist/lib/limits.d.ts +7 -3
- package/dist/lib/limits.js +7 -3
- package/dist/lib/observability.d.ts +16 -16
- package/dist/lib/observability.js +43 -82
- package/dist/lib/prompts.d.ts +1 -1
- package/dist/lib/prompts.js +3 -3
- package/dist/lib/recipe-control.d.ts +7 -0
- package/dist/lib/recipe-control.js +43 -0
- package/dist/lib/recipes-discovery.js +2 -0
- package/dist/lib/recipes-references.d.ts +1 -14
- package/dist/lib/recipes-references.js +6 -21
- package/dist/lib/review-control.d.ts +1 -1
- package/dist/lib/review-control.js +4 -5
- package/dist/lib/review-projection.js +1 -5
- package/dist/lib/run-ui-runtime.js +2 -2
- package/dist/lib/runs-control-delivery.d.ts +28 -0
- package/dist/lib/runs-control-delivery.js +150 -0
- package/dist/lib/runs-controls.d.ts +37 -0
- package/dist/lib/runs-controls.js +146 -0
- package/dist/lib/runs-retention.d.ts +7 -0
- package/dist/lib/runs-retention.js +27 -3
- package/dist/lib/runs-start.js +4 -2
- package/dist/lib/runs-status.js +11 -6
- package/dist/lib/runs-trace.d.ts +24 -0
- package/dist/lib/runs-trace.js +102 -0
- package/dist/lib/runtime-identity.d.ts +7 -0
- package/dist/lib/runtime-identity.js +35 -0
- package/dist/lib/runtime-notifier.d.ts +1 -1
- package/dist/lib/runtime-notifier.js +1 -1
- package/dist/lib/runtime-triage.d.ts +29 -0
- package/dist/lib/runtime-triage.js +76 -0
- package/dist/lib/tool-review-scheduler.js +7 -7
- package/dist/lib/tools-inspect.d.ts +3 -3
- package/dist/lib/tools-inspect.js +241 -707
- package/dist/lib/tools-local.js +2 -10
- package/dist/lib/tools-message.d.ts +6 -7
- package/dist/lib/tools-message.js +95 -396
- package/dist/lib/tools-response.d.ts +1 -5
- package/dist/lib/tools-response.js +5 -48
- package/dist/lib/tools-spawn.js +16 -28
- package/dist/lib/tools.d.ts +1 -1
- package/dist/lib/tools.js +2 -3
- package/dist/lib/trace-projection.d.ts +22 -0
- package/dist/lib/trace-projection.js +185 -0
- package/dist/recipes/draft-review.json +0 -10
- package/dist/recipes/lens-swarm.json +0 -14
- package/dist/recipes/music-player.json +10 -19
- package/dist/recipes/pipeline-architect-coordinator.json +0 -11
- package/dist/recipes/pipeline-artifact-bundle.json +1 -22
- package/dist/recipes/pipeline-artifact-report.json +1 -18
- package/dist/recipes/pipeline-artifact-write.json +1 -18
- package/dist/recipes/pipeline-async-run-ops.json +0 -12
- package/dist/recipes/pipeline-checkpoint-continuation.json +0 -14
- package/dist/recipes/pipeline-development-tasking.json +0 -12
- package/dist/recipes/pipeline-docs-maintenance.json +0 -12
- package/dist/recipes/pipeline-media-library.json +0 -12
- package/dist/recipes/pipeline-quorum-review.json +0 -12
- package/dist/recipes/pipeline-release-readiness.json +0 -12
- package/dist/recipes/pipeline-release-summary.json +0 -12
- package/dist/recipes/pipeline-repo-health.json +0 -12
- package/dist/recipes/pipeline-research-synthesis.json +0 -11
- package/dist/recipes/pipeline-review-readiness.json +0 -12
- package/dist/recipes/resource-locker.json +27 -0
- package/dist/recipes/subagent-artifact.json +0 -9
- package/dist/recipes/subagent-checkpoint.json +0 -10
- package/dist/recipes/subagent-conflict-report.json +0 -11
- package/dist/recipes/subagent-contradiction-map.json +0 -11
- package/dist/recipes/subagent-critic.json +0 -11
- package/dist/recipes/subagent-evidence-map.json +0 -11
- package/dist/recipes/subagent-followup.json +0 -10
- package/dist/recipes/subagent-judge.json +0 -11
- package/dist/recipes/subagent-merge.json +0 -11
- package/dist/recipes/subagent-normalize.json +0 -11
- package/dist/recipes/subagent-plan.json +0 -11
- package/dist/recipes/subagent-preflight.json +0 -11
- package/dist/recipes/subagent-prompt.json +0 -10
- package/dist/recipes/subagent-quorum.json +0 -10
- package/dist/recipes/subagent-review-coordinator.json +0 -14
- package/dist/recipes/subagent-review.json +0 -11
- package/dist/recipes/subagent-task-card.json +0 -11
- package/dist/recipes/subagent-tools.json +0 -10
- package/dist/recipes/subagent-verify.json +0 -11
- package/dist/recipes/subagents-prompts.json +0 -10
- package/dist/recipes/tool-review.json +0 -10
- package/dist/scripts/async-runner.mjs +25 -25
- package/dist/scripts/conformance.mjs +4 -2
- package/dist/scripts/locker.mjs +196 -69
- package/dist/scripts/music-player.mjs +162 -159
- package/dist/scripts/recipe-utils.mjs +6 -96
- package/dist/scripts/release-gates.mjs +91 -0
- package/dist/scripts/validate-recipe.mjs +8 -57
- package/dist/skills/actors/SKILL.md +57 -265
- package/dist/skills/swarm/SKILL.md +10 -34
- package/docs/0.43-baseline.md +39 -0
- package/docs/README.md +4 -6
- package/docs/actor-inspector.md +26 -64
- package/docs/async-runs.md +81 -328
- package/docs/command-templates.md +8 -118
- package/docs/recipe-library.md +55 -182
- package/docs/releasing.md +28 -0
- package/docs/template-recipes.md +76 -289
- package/docs/tool-registry.md +41 -161
- package/fixtures/protocol/control-endpoint.json +6 -0
- package/fixtures/protocol/control-record.json +9 -0
- package/fixtures/protocol/recipe-summary.json +4 -12
- package/fixtures/protocol/trace-event.json +9 -0
- package/index.ts +1 -1
- package/lib/async-runs.ts +218 -204
- package/lib/automatic-review-runtime.ts +7 -7
- package/lib/command-templates.ts +44 -4
- package/lib/control-projection.ts +105 -0
- package/lib/control.ts +117 -0
- package/lib/draft-sleep.ts +3 -3
- package/lib/execution-sessions.ts +111 -0
- package/lib/file-state.ts +84 -64
- package/lib/inspector-actions.ts +2 -2
- package/lib/inspector-command.ts +3 -3
- package/lib/inspector-overlay.ts +617 -1126
- package/lib/inspector.ts +46 -979
- package/lib/limits.ts +7 -3
- package/lib/observability.ts +60 -101
- package/lib/prompts.ts +3 -3
- package/lib/recipe-control.ts +52 -0
- package/lib/recipes-discovery.ts +2 -0
- package/lib/recipes-references.ts +9 -45
- package/lib/review-control.ts +4 -5
- package/lib/review-projection.ts +1 -5
- package/lib/run-ui-runtime.ts +2 -2
- package/lib/runs-control-delivery.ts +209 -0
- package/lib/runs-controls.ts +213 -0
- package/lib/runs-retention.ts +38 -3
- package/lib/runs-start.ts +4 -2
- package/lib/runs-status.ts +11 -6
- package/lib/runs-trace.ts +136 -0
- package/lib/runtime-identity.ts +39 -0
- package/lib/runtime-notifier.ts +1 -1
- package/lib/runtime-triage.ts +120 -0
- package/lib/tool-review-scheduler.ts +7 -7
- package/lib/tools-inspect.ts +283 -900
- package/lib/tools-local.ts +2 -12
- package/lib/tools-message.ts +112 -520
- package/lib/tools-response.ts +5 -64
- package/lib/tools-spawn.ts +16 -32
- package/lib/tools.ts +5 -6
- package/lib/trace-projection.ts +244 -0
- package/package.json +2 -1
- package/recipes/draft-review.json +0 -10
- package/recipes/lens-swarm.json +0 -14
- package/recipes/music-player.json +10 -19
- package/recipes/pipeline-architect-coordinator.json +0 -11
- package/recipes/pipeline-artifact-bundle.json +1 -22
- package/recipes/pipeline-artifact-report.json +1 -18
- package/recipes/pipeline-artifact-write.json +1 -18
- package/recipes/pipeline-async-run-ops.json +0 -12
- package/recipes/pipeline-checkpoint-continuation.json +0 -14
- package/recipes/pipeline-development-tasking.json +0 -12
- package/recipes/pipeline-docs-maintenance.json +0 -12
- package/recipes/pipeline-media-library.json +0 -12
- package/recipes/pipeline-quorum-review.json +0 -12
- package/recipes/pipeline-release-readiness.json +0 -12
- package/recipes/pipeline-release-summary.json +0 -12
- package/recipes/pipeline-repo-health.json +0 -12
- package/recipes/pipeline-research-synthesis.json +0 -11
- package/recipes/pipeline-review-readiness.json +0 -12
- package/recipes/resource-locker.json +27 -0
- package/recipes/subagent-artifact.json +0 -9
- package/recipes/subagent-checkpoint.json +0 -10
- package/recipes/subagent-conflict-report.json +0 -11
- package/recipes/subagent-contradiction-map.json +0 -11
- package/recipes/subagent-critic.json +0 -11
- package/recipes/subagent-evidence-map.json +0 -11
- package/recipes/subagent-followup.json +0 -10
- package/recipes/subagent-judge.json +0 -11
- package/recipes/subagent-merge.json +0 -11
- package/recipes/subagent-normalize.json +0 -11
- package/recipes/subagent-plan.json +0 -11
- package/recipes/subagent-preflight.json +0 -11
- package/recipes/subagent-prompt.json +0 -10
- package/recipes/subagent-quorum.json +0 -10
- package/recipes/subagent-review-coordinator.json +0 -14
- package/recipes/subagent-review.json +0 -11
- package/recipes/subagent-task-card.json +0 -11
- package/recipes/subagent-tools.json +0 -10
- package/recipes/subagent-verify.json +0 -11
- package/recipes/subagents-prompts.json +0 -10
- package/recipes/tool-review.json +0 -10
- package/scripts/async-runner.mjs +25 -25
- package/scripts/conformance.mjs +4 -2
- package/scripts/locker.mjs +196 -69
- package/scripts/music-player.mjs +162 -159
- package/scripts/recipe-utils.mjs +6 -96
- package/scripts/release-gates.mjs +91 -0
- package/scripts/validate-recipe.mjs +8 -57
- package/skills/actors/SKILL.md +57 -265
- package/skills/swarm/SKILL.md +10 -34
- package/dist/fixtures/protocol/actor-message-branch.json +0 -13
- package/dist/fixtures/protocol/mailbox-contract.json +0 -15
- package/dist/fixtures/protocol/room-message.json +0 -11
- package/dist/fixtures/protocol/room-roster.json +0 -11
- package/dist/fixtures/protocol/run-inbox-message.json +0 -9
- package/dist/fixtures/protocol/run-outbox-event.json +0 -9
- package/dist/lib/mailbox-loop.d.ts +0 -41
- package/dist/lib/mailbox-loop.js +0 -60
- package/dist/lib/messages.d.ts +0 -25
- package/dist/lib/messages.js +0 -122
- package/dist/lib/rooms.d.ts +0 -104
- package/dist/lib/rooms.js +0 -647
- package/dist/lib/runs-mailbox.d.ts +0 -25
- package/dist/lib/runs-mailbox.js +0 -146
- package/dist/lib/runs-messages.d.ts +0 -15
- package/dist/lib/runs-messages.js +0 -179
- package/dist/lib/runs-outbox.d.ts +0 -41
- package/dist/lib/runs-outbox.js +0 -87
- package/dist/lib/tools-mailbox.d.ts +0 -8
- package/dist/lib/tools-mailbox.js +0 -48
- package/dist/recipes/actor-worker.json +0 -39
- package/dist/recipes/coordinator-locker.json +0 -45
- package/dist/recipes/locker.json +0 -45
- package/dist/recipes/pipeline-room-swarm.json +0 -50
- package/dist/recipes/subagent-message.json +0 -32
- package/dist/recipes/utility-actor-message.json +0 -23
- package/dist/scripts/actor-worker.mjs +0 -214
- package/dist/scripts/coordinator.mjs +0 -799
- package/docs/actor-messages.md +0 -225
- package/docs/actors-deep-reference.md +0 -66
- package/docs/component-recipes.md +0 -148
- package/docs/task-first-recipes.md +0 -263
- package/fixtures/protocol/actor-message-branch.json +0 -13
- package/fixtures/protocol/mailbox-contract.json +0 -15
- package/fixtures/protocol/room-message.json +0 -11
- package/fixtures/protocol/room-roster.json +0 -11
- package/fixtures/protocol/run-inbox-message.json +0 -9
- package/fixtures/protocol/run-outbox-event.json +0 -9
- package/lib/mailbox-loop.ts +0 -144
- package/lib/messages.ts +0 -151
- package/lib/rooms.ts +0 -939
- package/lib/runs-mailbox.ts +0 -208
- package/lib/runs-messages.ts +0 -252
- package/lib/runs-outbox.ts +0 -144
- package/lib/tools-mailbox.ts +0 -56
- package/recipes/actor-worker.json +0 -39
- package/recipes/coordinator-locker.json +0 -45
- package/recipes/locker.json +0 -45
- package/recipes/pipeline-room-swarm.json +0 -50
- package/recipes/subagent-message.json +0 -32
- package/recipes/utility-actor-message.json +0 -23
- package/scripts/actor-worker.mjs +0 -214
- package/scripts/coordinator.mjs +0 -799
|
@@ -10,13 +10,13 @@ Command templates are the portable integration format for deterministic local au
|
|
|
10
10
|
|
|
11
11
|
Extensions may choose their own config files, selectors, placeholder sources, and examples, but should preserve this core contract.
|
|
12
12
|
|
|
13
|
-
Layer boundary: command templates own only the synchronous execution graph. Recipe imports, import-reference expressions,
|
|
13
|
+
Layer boundary: command templates own only the synchronous execution graph. Recipe imports, import-reference expressions, Recipe lookup, `async: true`, Run ids, state dirs, Control, and Trace are host/Recipe/Run layers, not portable command-template syntax.
|
|
14
14
|
|
|
15
15
|
## Layer Ownership
|
|
16
16
|
|
|
17
17
|
Command-template standard owns:
|
|
18
18
|
|
|
19
|
-
- Command string splitting and direct argv execution.
|
|
19
|
+
- Command string splitting, portable script-interpreter inference, and direct argv execution.
|
|
20
20
|
- Placeholder resolution, typed public args, defaults, `??`, ternary string selection, and array-index placeholders.
|
|
21
21
|
- Synchronous graph shape: sequence, `parallel`, `when`, `repeat`, stdin flow, stdout joins, and output selection.
|
|
22
22
|
- Per-node execution controls: `timeout`, `delay`, `retry`, `failure`, and `recover`.
|
|
@@ -25,7 +25,7 @@ Command-template standard does not own:
|
|
|
25
25
|
|
|
26
26
|
- Where templates are stored or how they are named.
|
|
27
27
|
- Recipe imports, import references, or file lookup.
|
|
28
|
-
- Detached lifecycle,
|
|
28
|
+
- Detached lifecycle, Run ids, state dirs, logs, cancellation, Control, or Trace.
|
|
29
29
|
- Registry metadata such as tool descriptions, package install paths, or operator policy.
|
|
30
30
|
|
|
31
31
|
## Shape
|
|
@@ -72,7 +72,7 @@ A runtime must:
|
|
|
72
72
|
|
|
73
73
|
1. Split the template into shell-like words with simple single quotes, double quotes, and backslash escapes
|
|
74
74
|
2. Substitute placeholders inside each split word
|
|
75
|
-
3.
|
|
75
|
+
3. Infer a first-word `.js` or `.mjs` script through the first available `node`, `bun`, or `deno run` runtime, infer `.sh` through `bash`, and otherwise execute command + args directly; explicit interpreters remain unchanged and no shell evaluates the resulting argv
|
|
76
76
|
4. Treat exit code `0` as success and non-zero as failure
|
|
77
77
|
5. Use stdout as the default result channel and stderr only for diagnostics
|
|
78
78
|
|
|
@@ -106,35 +106,11 @@ With runtime values `{ "text": "hello" }`, argv is:
|
|
|
106
106
|
|
|
107
107
|
Use `defaults` for visible configuration data; use inline defaults for compact local literals. Prefer flag-style examples such as `/path/to/tool --file {file} --lang {lang=ru}` for readability, but positional forms such as `/path/to/tool {file} {lang=ru}` are valid when the invoked script defines that CLI contract.
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"template": "deploy --env {env??dev} --region {region??local}"
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Optional flags can be mapped from boolean args with a ternary:
|
|
118
|
-
|
|
119
|
-
```json
|
|
120
|
-
{
|
|
121
|
-
"args": ["target:path", "all:bool"],
|
|
122
|
-
"defaults": { "all": "true" },
|
|
123
|
-
"template": "validate-recipe {target} {all?--all:}"
|
|
124
|
-
}
|
|
125
|
-
```
|
|
109
|
+
Use `{env??dev}` for fallback values and `{all?--all:}` to map boolean args to optional text.
|
|
126
110
|
|
|
127
111
|
Typed declarations annotate the public tool interface, not the shell command. They may live in `args` or inline placeholders such as `{request_timeout:int=60000}` and `{mode:enum(check,fix)=check}`. Use metadata-first authoring (`args` plus `defaults`) when long templates should stay visually short; use inline-first authoring when one self-contained `template` property is clearer. They do not sandbox or reinterpret the executable; they only let the host generate narrower input schemas and normalize runtime values before placeholder substitution. Untyped `args` and untyped placeholders continue to work unchanged.
|
|
128
112
|
|
|
129
|
-
Node control fields can also read public args
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"args": ["timeout_ms:int"],
|
|
134
|
-
"timeout": "{timeout_ms}",
|
|
135
|
-
"template": "npm test"
|
|
136
|
-
}
|
|
137
|
-
```
|
|
113
|
+
Node control fields can also read public args, for example `"timeout": "{timeout_ms}"`; use distinct names so execution controls stay visually separate from public inputs.
|
|
138
114
|
|
|
139
115
|
## Quoting
|
|
140
116
|
|
|
@@ -194,21 +170,6 @@ Composition rules:
|
|
|
194
170
|
- `min_successful` adds a join header with `complete`, `degraded`, or `insufficient_data`; with `failure: "branch"` or `"root"`, an unmet threshold fails at that scope
|
|
195
171
|
- Each leaf still applies its own inline defaults
|
|
196
172
|
|
|
197
|
-
```json
|
|
198
|
-
{
|
|
199
|
-
"template": [
|
|
200
|
-
"/path/to/tts --text {text} --lang {lang} --out {mp3}",
|
|
201
|
-
{
|
|
202
|
-
"defaults": { "codec": "libopus" },
|
|
203
|
-
"template": "ffmpeg -y -i {mp3} -c:a {codec} {ogg}"
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
"args": ["text", "lang", "mp3", "ogg"],
|
|
207
|
-
"defaults": { "lang": "en" },
|
|
208
|
-
"output": "ogg"
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
173
|
`output` selects the primary result channel. Omitted `output` means `"stdout"`, and explicitly writing `"output": "stdout"` is valid standard syntax. Artifact-producing handlers may instead name a runtime value or placeholder path, e.g. `"ogg"` or `"{ogg}"`. Do not use `artifacts` in command-template nodes; named artifact manifests belong to the template-recipe layer.
|
|
213
174
|
|
|
214
175
|
### Repeat
|
|
@@ -245,52 +206,7 @@ Repeat expressions support only integers, `index`, `prev`, `next`, `repeat`, par
|
|
|
245
206
|
|
|
246
207
|
Repeat placeholders are local generated values. Call-time args should not use these reserved names to override the repeat index.
|
|
247
208
|
|
|
248
|
-
Parallel
|
|
249
|
-
|
|
250
|
-
```json
|
|
251
|
-
{
|
|
252
|
-
"template": [
|
|
253
|
-
"prepare {out_dir}",
|
|
254
|
-
{
|
|
255
|
-
"parallel": true,
|
|
256
|
-
"template": [
|
|
257
|
-
{
|
|
258
|
-
"label": "reviewer-a",
|
|
259
|
-
"timeout": 300000,
|
|
260
|
-
"template": "review-gpt {scope}"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"label": "reviewer-b",
|
|
264
|
-
"timeout": 300000,
|
|
265
|
-
"template": "review-deepseek {scope}"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"label": "kimi",
|
|
269
|
-
"timeout": 300000,
|
|
270
|
-
"template": "review-kimi {scope}"
|
|
271
|
-
}
|
|
272
|
-
]
|
|
273
|
-
},
|
|
274
|
-
"merge {out_dir}"
|
|
275
|
-
]
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
A degraded parallel join is still usable when at least one branch succeeds:
|
|
280
|
-
|
|
281
|
-
```text
|
|
282
|
-
--- branch: reviewer-a status: done ---
|
|
283
|
-
review text
|
|
284
|
-
--- branch: reviewer-b status: failed ---
|
|
285
|
-
exit: 1
|
|
286
|
-
stderr: provider balance exhausted
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
Some local schemas may accept `pipe` as an alias, but the portable standard is `template: [...]`.
|
|
290
|
-
|
|
291
|
-
## Fail-Open Default Policy
|
|
292
|
-
|
|
293
|
-
By default, composition continues on failure: the failed step is logged and the next step executes. This is analogous to `make -k` — the user sees all failures at once and decides what to fix.
|
|
209
|
+
Parallel children use the same object shape: flags come first and `template` stays last. A join remains usable when at least one branch succeeds and reports each branch label/status. Some local schemas may accept `pipe`, but the portable standard is `template: [...]`.
|
|
294
210
|
|
|
295
211
|
## Failure Propagation
|
|
296
212
|
|
|
@@ -302,33 +218,7 @@ Use `failure` when a node should stop more aggressively:
|
|
|
302
218
|
- `"branch"`: stop the current sequence/subtree and return a failed branch to the nearest parent. In a parallel node, sibling branches keep running and the join becomes degraded. At the root, branch failure is still a tool failure.
|
|
303
219
|
- `"root"`: abort the outermost composition.
|
|
304
220
|
|
|
305
|
-
|
|
306
|
-
{
|
|
307
|
-
"parallel": true,
|
|
308
|
-
"template": [
|
|
309
|
-
{
|
|
310
|
-
"label": "agent-a",
|
|
311
|
-
"failure": "branch",
|
|
312
|
-
"template": [
|
|
313
|
-
"agent-a-work {scope}",
|
|
314
|
-
"agent-a-validate {scope}",
|
|
315
|
-
"agent-a-push {scope}"
|
|
316
|
-
]
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"label": "agent-b",
|
|
320
|
-
"failure": "branch",
|
|
321
|
-
"template": [
|
|
322
|
-
"agent-b-work {scope}",
|
|
323
|
-
"agent-b-validate {scope}",
|
|
324
|
-
"agent-b-push {scope}"
|
|
325
|
-
]
|
|
326
|
-
}
|
|
327
|
-
]
|
|
328
|
-
}
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
If `agent-a-validate` fails, `agent-a-push` is skipped, `agent-b` can still finish, and the parallel join reports degraded branch coverage.
|
|
221
|
+
A branch failure skips the remainder of that branch while parallel siblings can finish; their join reports degraded coverage.
|
|
332
222
|
|
|
333
223
|
## Retry
|
|
334
224
|
|
package/docs/recipe-library.md
CHANGED
|
@@ -1,212 +1,85 @@
|
|
|
1
|
-
# Recipe Library
|
|
1
|
+
# Packaged Recipe Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Packaged Recipes provide maintained execution graphs and service definitions. User Recipes with the same name shadow packaged definitions; invalid shadowing fails closed.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Recommended Entry Points
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Repository and delivery
|
|
8
8
|
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
9
|
+
- `pipeline-repo-health.json` — repository inspection and bounded health artifact.
|
|
10
|
+
- `pipeline-docs-maintenance.json` — documentation analysis and artifact preparation.
|
|
11
|
+
- `pipeline-release-readiness.json` — release checks and readiness artifact.
|
|
12
|
+
- `pipeline-release-summary.json` — release-summary artifact.
|
|
13
|
+
- `pipeline-development-tasking.json` — task-card and implementation planning pipeline.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
### Review and synthesis
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
- `pipeline-quorum-review.json` — parallel reviewers with quorum-oriented synthesis.
|
|
18
|
+
- `pipeline-review-readiness.json` — review plus readiness stages.
|
|
19
|
+
- `pipeline-research-synthesis.json` — evidence-oriented research synthesis.
|
|
20
|
+
- `lens-swarm.json` — configurable repeated review lenses.
|
|
21
|
+
- `subagent-review-coordinator.json` — lower-level review/verify/merge/judge composition.
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
mkdir -p ~/.pi/agent/recipes
|
|
20
|
-
cp <repo>/recipes/pipeline-review-readiness.json ~/.pi/agent/recipes/
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Do not bulk-copy `recipes/*.json`. The packaged library also contains internal composition stages, including `draft-review.json` and `tool-review.json`; the automatic-review runtime launches those selectors with fenced inputs and they must not become user-installed callable tools.
|
|
24
|
-
|
|
25
|
-
A registered tool can instead point at one selected recipe path when a durable operator-facing name is useful. Prefer a thin wrapper for public defaults or policy rather than copying the wrapper's internal imports.
|
|
26
|
-
|
|
27
|
-
## Async Subagent Components
|
|
28
|
-
|
|
29
|
-
Core subagent recipes:
|
|
30
|
-
|
|
31
|
-
- `recipes/subagent-prompt.json`: Start one prompt-driven subagent.
|
|
32
|
-
- `recipes/subagent-tools.json`: Start a subagent with an explicit tool allowlist.
|
|
33
|
-
- `recipes/subagents-prompts.json`: Run prompt fanout with one imported subagent component.
|
|
34
|
-
- `recipes/subagent-preflight.json`: Tiny model/thinking/tool-policy smoke check before expensive fanout; failures surface `ACTOR_PREFLIGHT_FAILED` with stage, selected policy, provider error class, prompt file, and override args.
|
|
35
|
-
- Packaged reviewer, verifier, merger, judge, and normalizer stages use `accept_output: review_evidence` and require `ACTOR_REVIEW_RESULT` as the exact first non-whitespace output line. Marker prefixes, format acknowledgements, and input requests therefore remain rejected branch diagnostics rather than usable quorum evidence.
|
|
36
|
-
- `recipes/subagent-review.json`: Evidence-grounded review lens.
|
|
37
|
-
- `recipes/draft-review.json`: Internal no-tools selector for one immutable automatic draft batch. It receives an attached value-free structural projection with batch-local opaque occurrence/content-group identities, counts, risk labels, and usage—not canonical names, draft basenames, raw hashes, recipe bodies, template text, defaults, authored prose, or filesystem paths—then emits one terminal `DRAFT_REVIEW_RESULT` with quota-free promote/discard decisions. The executor derives any promotion from the separate trusted captured source.
|
|
38
|
-
- `recipes/tool-review.json`: Internal no-tools selector for one immutable 36-tool portfolio. It receives the same identity-opaque value-free structural projection and may recommend quota-free keep, unchanged-source rename (`evolve`), unchanged-source demote, or identical-source merge decisions. `replace`, `split`, and returned recipe content fail mechanically; deterministic executors alone read trusted captured recipes and own validated safe-boundary activation.
|
|
39
|
-
- `recipes/subagent-critic.json`: Assumption and failure-mode critique.
|
|
40
|
-
- `recipes/subagent-plan.json`: Bounded plan slices and validation gates.
|
|
41
|
-
- `recipes/subagent-evidence-map.json`: Evidence and confidence map.
|
|
42
|
-
- `recipes/subagent-contradiction-map.json`: Contradiction and missing-evidence map.
|
|
43
|
-
- `recipes/subagent-verify.json`: Claim verification.
|
|
44
|
-
- `recipes/subagent-merge.json`: Consensus/risk-first synthesis.
|
|
45
|
-
- `recipes/subagent-normalize.json`: Stable output shaping.
|
|
46
|
-
- `recipes/subagent-artifact.json`: Durable artifact-shaped output for a target path. It prepares content and write guidance; it does not write files unless the caller deliberately grants write tools or uses a deterministic writer.
|
|
47
|
-
- `recipes/subagent-message.json`: Prompted actor-message-envelope-shaped coordinator message record with envelope-aligned args.
|
|
48
|
-
- `recipes/subagent-quorum.json`: Same prompt across a model pool.
|
|
49
|
-
- `recipes/subagent-task-card.json`: Bounded implementation task card.
|
|
50
|
-
- `recipes/subagent-conflict-report.json`: Integrator-oriented conflict report.
|
|
51
|
-
- `recipes/subagent-checkpoint.json`: Coordinator checkpoint artifact.
|
|
52
|
-
- `recipes/subagent-followup.json`: Same-context or degraded continuation.
|
|
53
|
-
- `recipes/subagent-judge.json`: Post-merge/report quality judge.
|
|
54
|
-
|
|
55
|
-
Most atoms expose policy knobs such as `model`, `thinking`, `tools`, `output_format`, `evidence_policy`, `risk_policy`, source policy, continuity policy, handoff format, or model pools. Packaged recipes intentionally do not ship concrete model-version defaults: review-oriented subagent and lens-swarm recipes default model/thinking args through `{current_model}` and `{current_thinking}` so they inherit the selected Pi session policy, and callers can still pass explicit values when a run should diverge. Recipe inspection marks these inherited policy defaults as `current_policy`, and run status/progress records whether launch policy was inherited, explicit, mixed, or unresolved. Generic prompt launchers, including `subagent-tools` and `subagents-prompts`, expose the same core model/thinking/tool/output knobs so callers do not need separate recipe families for policy tuning. Interactive async atoms also declare mailbox metadata for their basic control, completion, and domain-result message surface. Higher-level recipes pass these knobs through instead of hard-coding local policy.
|
|
56
|
-
|
|
57
|
-
For one-off packaged subagent reviews, launch the recipe directly with `spawn file="subagent-review" values={...}` or `spawn file="pipeline-review-readiness" values={...}`. Do not copy the underlying `pi -p` command or wrap the recipe unless you are creating a durable operator tool with a narrower interface.
|
|
58
|
-
|
|
59
|
-
For build-oriented swarms, prefer a consensus-first shape over parallel writers: proposer roles coordinate in a room with message/inspect tools, a named implementer owns the first artifact write, a QA reviewer inspects the result, and a finalizer applies review-grounded fixes before `run.done`. This pattern keeps creative/lens diversity while preserving one coherent artifact and gives recipes concrete artifact assertions instead of treating room discussion as success.
|
|
60
|
-
|
|
61
|
-
Register one atom:
|
|
62
|
-
|
|
63
|
-
```text
|
|
64
|
-
register_tool name=subagent_prompt \
|
|
65
|
-
description="Start an async no-tools pi subagent" \
|
|
66
|
-
template="subagent-prompt.json"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Start it:
|
|
23
|
+
Callers should own model, thinking, concurrency, quorum, and mission policy. Review pipelines preflight provider/model availability before expensive fanout.
|
|
70
24
|
|
|
71
|
-
|
|
72
|
-
subagent_prompt prompt="Review docs/async-runs.md for unclear wording." run_id=docs_review
|
|
73
|
-
inspect target=run:docs_review view=status
|
|
74
|
-
inspect target=run:docs_review view=tail
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Composed Pipelines
|
|
78
|
-
|
|
79
|
-
Pipeline recipes demonstrate second-order composition:
|
|
80
|
-
|
|
81
|
-
- `recipes/coordinator-locker.json`: Long-lived coordinator cell with queue, acquire/renew/release lease locks, journal, actor messages for worker coordination, and platform-adapted control metadata.
|
|
82
|
-
- `recipes/subagent-review-coordinator.json`: Model/tool preflight with compact provider diagnostics → quorum-aware lens reviewers → verifier → merger → judge → normalizer. Review pipelines expose `subagent_ttl_ms`, `reviewer_concurrency`, `min_successful_reviewers`, and `merge_policy` knobs; reviewer joins preserve partial evidence and mark `complete`, `degraded`, or `insufficient_data`. `npm run conformance` includes a fake-`pi` review-readiness dogfood fixture for this packaged path.
|
|
83
|
-
- `recipes/pipeline-release-readiness.json`: Task-first release cell: changelog section → package summary → packaged skill summary → validation → release review → artifact report.
|
|
84
|
-
- `recipes/pipeline-release-summary.json`: Evidence-only release summary cell: changelog section → package summary → packaged skill summary → validation → release summary / risks / PR body draft artifact. It does not commit, open a PR, merge, tag, publish, or perform external release side effects.
|
|
85
|
-
- `recipes/pipeline-repo-health.json`: Task-first repository-health cell: git status/log → docs index → validation → normalized artifact report.
|
|
86
|
-
- `recipes/pipeline-async-run-ops.json`: Task-first async-run operations cell: run summary → actor-message tail → normalized operations report → artifact report.
|
|
87
|
-
- `recipes/pipeline-review-readiness.json`: Release/readiness gate over selected lenses.
|
|
88
|
-
- `recipes/pipeline-quorum-review.json`: Quorum vote shape → merge → judge → normalize.
|
|
89
|
-
- `recipes/pipeline-architect-coordinator.json`: Architecture lens fanout → critique → verification → synthesis → next slice.
|
|
90
|
-
- `recipes/pipeline-research-synthesis.json`: Plan → evidence map → contradiction map → verification → synthesis.
|
|
91
|
-
- `recipes/pipeline-checkpoint-continuation.json`: Checkpoint → follow-up → normalized handoff.
|
|
92
|
-
- `recipes/pipeline-development-tasking.json`: Plan → task card → critique → integrator handoff.
|
|
93
|
-
- `recipes/pipeline-docs-maintenance.json`: Docs index → documentation review → maintenance plan → artifact report.
|
|
94
|
-
- `recipes/pipeline-media-library.json`: Playlist build → media-library artifact report.
|
|
95
|
-
- `recipes/pipeline-room-swarm.json`: Room participants join `room:<run>`, coordinate over repeated room-visible rounds, leave cleanly, and synthesize the room transcript into a caller-provided artifact path. Supported coordinator modes are `consensus`, `pipeline`, `fanout`, and `pool`; unknown modes fail closed instead of silently running consensus. Keep model/thinking/mission policy caller-owned. Custom roles can be supplied with `roles_path` as a JSON array of `{ "name", "persona" }` objects; `name` stays ASCII-safe for `branch:<run>/<name>` addresses and debugger output remains plain and name-driven. The packaged swarm uses contacts for peer awareness but does not rely on direct branch delivery unless a caller-specific worker protocol consumes branch envelopes. Set `subagent_ttl_ms` to a positive millisecond budget when participant `pi -p` processes must be killed instead of awaited indefinitely. Set `locker=true` to compose a local `coordinator-locker` cell under `{state_dir}/locker` for artifact ownership, resource lease locks, and a decision journal without merging locker policy into the room-participant script.
|
|
96
|
-
- `recipes/pipeline-artifact-report.json`: Normalize → artifact-shaped output → actor-message-shaped record. This pipeline prepares a candidate artifact and emits `artifact.prepared`/`artifact.blocked`; the `artifact_path` is a target path, not a guarantee that the file was written.
|
|
97
|
-
- `recipes/pipeline-artifact-write.json`: Normalize → artifact-shaped output → deterministic artifact write → actor-message-shaped record. Use only when the caller explicitly wants filesystem writes; `write_mode` is `create`, `overwrite`, or `append`.
|
|
98
|
-
- `recipes/pipeline-artifact-bundle.json`: Optional validation → deterministic artifact write → machine-readable manifest generation → deterministic manifest write → actor-message-shaped record. Use when the caller explicitly wants a filesystem handoff bundle with both artifact and manifest paths.
|
|
99
|
-
|
|
100
|
-
These are examples of library composition, not a workflow DSL. Pipeline recipes declare mailbox metadata for their high-level completion, artifact, and control message surface. The recipe layer owns imports and saved defaults; command templates own execution shape; async runs own lifecycle.
|
|
101
|
-
|
|
102
|
-
## Utility Recipes
|
|
103
|
-
|
|
104
|
-
Utility recipes cover local operator workflows that do not need subagents:
|
|
105
|
-
|
|
106
|
-
- `recipes/utility-markdown-index.json`: List Markdown files in a directory as input for README/docs index maintenance.
|
|
107
|
-
- `recipes/utility-jsonl-tail.json`: Tail a JSONL message/log file with a configurable line count.
|
|
108
|
-
- `recipes/utility-validation-wrapper.json`: Run a caller-supplied validation command in a scoped directory with a bounded timeout. This intentionally crosses a trusted shell boundary; discovery surfaces it as a diagnostic, and callers should pass explicit validation commands only.
|
|
109
|
-
- `recipes/utility-git-status.json`: Read concise branch/worktree state for a repo.
|
|
110
|
-
- `recipes/utility-git-log.json`: Read recent decorated commit history for a repo.
|
|
111
|
-
- `recipes/utility-run-state-files.json`: List run-state files such as `run.json` under an async run state root.
|
|
112
|
-
- `recipes/utility-coordinator-lock-snapshot.json`: Summarize a coordinator-locker actor state directory with queue depth, locks, and recent journal entries.
|
|
113
|
-
- `recipes/utility-changelog-head.json`: Read the top slice of a changelog for release summary prep.
|
|
114
|
-
- `recipes/utility-playlist-scan.json`: List local media files as playlist-building input.
|
|
115
|
-
- `recipes/utility-run-summary.json`: Use `scripts/recipe-utils.mjs` to summarize async run state files as JSON.
|
|
116
|
-
- `recipes/utility-run-ops-snapshot.json`: Combine async run summaries, recent actor messages for a selected `run_id`, and stale/terminal recommendations into one structured operations snapshot.
|
|
117
|
-
- `recipes/utility-playlist-build.json`: Use `scripts/recipe-utils.mjs` to build a filtered playlist listing as newline paths, M3U, or inline `|`-separated source.
|
|
118
|
-
- `recipes/utility-changelog-section.json`: Use `scripts/recipe-utils.mjs` to extract one changelog release section.
|
|
119
|
-
- `recipes/utility-artifact-manifest.json`: Use `scripts/recipe-utils.mjs` to emit a machine-readable JSON manifest for an artifact path.
|
|
120
|
-
- `recipes/utility-artifact-write.json`: Deterministically write prepared artifact content from stdin to `artifact_path` with explicit `create`, `overwrite`, or `append` mode.
|
|
121
|
-
- `recipes/utility-actor-message.json`: Deterministically wrap stdin as a validated addressed actor-message envelope with the same public names as the envelope: `to`, `from`, `type`, `summary`, `body`, optional `correlation_id`/`reply_to`, and `metadata`.
|
|
122
|
-
- `recipes/utility-package-summary.json`: Use `scripts/recipe-utils.mjs` to emit bounded package metadata such as name, version, files, scripts, and dependency counts.
|
|
123
|
-
- `recipes/utility-skill-summary.json`: Use `scripts/recipe-utils.mjs` to summarize packaged skill frontmatter, body shape, formatter-safe scalar lines, and package-version alignment.
|
|
124
|
-
- `recipes/utility-validate-recipe.json`: Use `scripts/validate-recipe.mjs` to validate one template recipe file, or all packaged recipes in a directory with `all: true`.
|
|
125
|
-
|
|
126
|
-
Packaged QA is available through the `recipes:qa` npm script. It reports description warnings and fails exact diagnostics for async mailbox contracts, termination vocabulary, artifact paths, platform scope, helper script paths, and missing helper scripts.
|
|
127
|
-
|
|
128
|
-
These recipes are intentionally small. Register them only for trusted local commands and prefer narrow scopes. Discovery diagnostics flag obvious trust-boundary shapes such as shell/eval/destructive commands; those warnings are operator review aids, not a sandbox. The helper-backed utilities share `scripts/recipe-utils.mjs` so repeated parsing/listing logic stays out of recipe strings.
|
|
129
|
-
|
|
130
|
-
## Actor OS Smoke Matrix
|
|
131
|
-
|
|
132
|
-
The repeatable smoke surface is the normal validation suite:
|
|
133
|
-
|
|
134
|
-
```text
|
|
135
|
-
npm test
|
|
136
|
-
```
|
|
25
|
+
### Artifacts
|
|
137
26
|
|
|
138
|
-
|
|
27
|
+
- `pipeline-artifact-report.json` — prepare one artifact body.
|
|
28
|
+
- `pipeline-artifact-write.json` — prepare and deterministically write an artifact.
|
|
29
|
+
- `pipeline-artifact-bundle.json` — optional validation, artifact write, manifest generation, and manifest write.
|
|
30
|
+
- `utility-artifact-write.json` — deterministic create/overwrite/append helper.
|
|
31
|
+
- `utility-artifact-manifest.json` — artifact manifest generation.
|
|
139
32
|
|
|
140
|
-
|
|
33
|
+
Artifact pipelines terminate in files/manifests and result evidence; they do not fabricate communication events.
|
|
141
34
|
|
|
142
|
-
|
|
35
|
+
### Controlled services
|
|
143
36
|
|
|
144
|
-
- `
|
|
145
|
-
- `
|
|
37
|
+
- `music-player.json` — playback service with declared playback actions, `controls.jsonl`, generation-fenced endpoint readiness, state artifact, and playback Trace. Player selection is `player:enum(auto,mpv,afplay,ffplay,cvlc,play,wmp)=auto`.
|
|
38
|
+
- `resource-locker.json` — optional queue/lease-lock service with explicit owner/resource input and lock Trace.
|
|
146
39
|
|
|
147
|
-
|
|
40
|
+
These are the packaged Recipes that declare actor-local Control. Ordinary one-shot Recipes omit it. Helper-backed packaged Recipes self-locate their installed package root when `repo` is omitted; an explicit caller value still wins for development or custom layouts.
|
|
148
41
|
|
|
149
|
-
|
|
42
|
+
## Component Recipes
|
|
150
43
|
|
|
151
|
-
|
|
44
|
+
Subagent components provide reusable command-template cells for normalization, planning, evidence mapping, contradiction analysis, criticism, review, verification, merging, judging, quorum work, task cards, checkpoint prompts, and artifact generation.
|
|
152
45
|
|
|
153
|
-
|
|
154
|
-
- A directory containing audio files; the wrapper scans `.aac`, `.aif`, `.aiff`, `.flac`, `.m4a`, `.mp3`, `.ogg`, and `.wav` files.
|
|
155
|
-
- An `.m3u`, `.m3u8`, or `.txt` playlist file.
|
|
156
|
-
- A `|`-separated inline list of local files or URLs.
|
|
46
|
+
Imports compose these definitions inside one parent Run. They are not independently addressable peers. Parent template flags control sequencing, parallelism, retries, failure scope, recovery, and repeated execution.
|
|
157
47
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
mkdir -p ~/.pi/agent/recipes
|
|
162
|
-
cp <repo>/recipes/music-player.json ~/.pi/agent/recipes/music-player.json
|
|
163
|
-
```
|
|
48
|
+
## Utility Recipes
|
|
164
49
|
|
|
165
|
-
|
|
50
|
+
Utilities wrap deterministic local capabilities such as:
|
|
166
51
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
```
|
|
52
|
+
- package and skill summaries;
|
|
53
|
+
- artifact writes/manifests;
|
|
54
|
+
- validation commands;
|
|
55
|
+
- Run operations snapshots;
|
|
56
|
+
- Recipe validation.
|
|
173
57
|
|
|
174
|
-
|
|
58
|
+
Use utilities as imported cells or registered tools where their contract fits.
|
|
175
59
|
|
|
176
|
-
|
|
177
|
-
music_player source="~/Music" volume=55 run_id=music
|
|
178
|
-
```
|
|
60
|
+
## Selection Guidance
|
|
179
61
|
|
|
180
|
-
|
|
62
|
+
1. Prefer the highest-level maintained pipeline matching the task.
|
|
63
|
+
2. Use component Recipes when building a new stable pipeline.
|
|
64
|
+
3. Use inline templates for genuinely one-off trusted work.
|
|
65
|
+
4. Declare artifacts for outputs that callers must retain.
|
|
66
|
+
5. Declare Control only when a service process actually consumes it.
|
|
67
|
+
6. Keep large semantic evidence in artifacts or execution captures, not Trace summaries.
|
|
181
68
|
|
|
182
|
-
|
|
183
|
-
message to=run:music type=player.pause body=pause
|
|
184
|
-
message to=run:music type=player.play body=play
|
|
185
|
-
message to=run:music type=player.next body=next
|
|
186
|
-
message to=run:music type=player.previous body=previous
|
|
187
|
-
message to=run:music type=player.stop body=stop
|
|
188
|
-
```
|
|
69
|
+
## Installation Safety
|
|
189
70
|
|
|
190
|
-
|
|
71
|
+
Do not bulk-copy `recipes/*.json` into the user Recipe root. Internal `draft-review.json` and `tool-review.json` support fenced automatic review and must not become user-installed callable tools. Register or wrap only the specific public capability you intend to use.
|
|
191
72
|
|
|
192
|
-
|
|
73
|
+
## Validation
|
|
193
74
|
|
|
194
|
-
```
|
|
195
|
-
|
|
75
|
+
```bash
|
|
76
|
+
npm run recipes:qa
|
|
196
77
|
```
|
|
197
78
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
Cross-platform smoke checklist:
|
|
201
|
-
|
|
202
|
-
- Linux: install one backend such as `mpv` or `ffplay`; start `music_player source="~/Music" run_id=music`, send `pause`, `play`, `next`, and `stop`, then inspect `run:music` status/mailbox.
|
|
203
|
-
- macOS: verify `player=auto` selects `afplay` when no preferred CLI backend is installed, then run the same addressed message controls.
|
|
204
|
-
- Native Windows: verify `player=wmp` detects `wmplayer.exe`, starts playback through Windows Media Player COM, handles `pause`/`play`/`next`/`previous`/`stop`, and leaves handled mailbox records visible through `inspect target=run:music view=mailbox`.
|
|
205
|
-
- All hosts: confirm missed wake resilience by checking that queued mailbox commands are eventually claimed without relying on a transport-specific endpoint.
|
|
79
|
+
Recipe QA validates syntax, imports, Control declarations, artifact paths, helper references, and platform documentation. Recipe descriptions are optional because discovery supplies stable fallback tool copy; internal component Recipes do not need boilerplate. The packaged baseline requires zero diagnostics and zero warnings, and any future warning is release-blocking with its concrete file and repair. Removed mailbox declarations fail with the migration diagnostic rather than receiving automatic conversion.
|
|
206
80
|
|
|
207
|
-
##
|
|
81
|
+
## Related
|
|
208
82
|
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
- Use `message type=control.kill` for runtime termination; `control.stop` is a player-domain pause/stop command, not a generic run-kill alias.
|
|
83
|
+
- [Template Recipes](./template-recipes.md)
|
|
84
|
+
- [Command templates](./command-templates.md)
|
|
85
|
+
- [Runs](./async-runs.md)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Release Operations
|
|
2
|
+
|
|
3
|
+
Stable releases use one immutable tag workflow. The workflow runs the complete reusable Ubuntu, macOS, Windows, and dependency-audit boundary before any publication, publishes and verifies the exact npm package through Trusted Publisher, then creates or converges the GitHub Release from the matching changelog section.
|
|
4
|
+
|
|
5
|
+
## One-time npm Trusted Publisher setup
|
|
6
|
+
|
|
7
|
+
Configure the existing public package `@llblab/pi-actors` on npmjs.com with a GitHub Actions Trusted Publisher using these exact values:
|
|
8
|
+
|
|
9
|
+
- **Owner:** `llblab`
|
|
10
|
+
- **Repository:** `pi-actors`
|
|
11
|
+
- **Workflow filename:** `release.yml`
|
|
12
|
+
- **Environment:** Leave empty unless the workflow and npm configuration later adopt the same named GitHub environment in one reviewed change.
|
|
13
|
+
|
|
14
|
+
The binding must target `.github/workflows/release.yml`; npm asks for the filename rather than the repository-relative path. npm does not verify this identity when the setting is saved, so the first tagged publication provides the decisive proof.
|
|
15
|
+
|
|
16
|
+
Do not create `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or another long-lived npm publish secret. The publication job runs on a GitHub-hosted Ubuntu runner with `id-token: write`, Node 24, npm 11.5.1 or newer, the public npm registry, and package-manager caching disabled at the credential-bearing boundary.
|
|
17
|
+
|
|
18
|
+
## Release sequence
|
|
19
|
+
|
|
20
|
+
1. Merge the validated release tree through the repository's guarded `dev` to `main` flow.
|
|
21
|
+
2. Create one immutable `v<package.version>` tag on the verified `main` commit.
|
|
22
|
+
3. Let `.github/workflows/release.yml` invoke the complete reusable validation workflow.
|
|
23
|
+
4. Let the publication job verify the tag commit, package manifests, and non-empty changelog section.
|
|
24
|
+
5. Publish the exact public npm package through OIDC when the version does not exist.
|
|
25
|
+
6. Verify npm version, `gitHead`, Pi extension/skill metadata, and packed runtime manifests.
|
|
26
|
+
7. Create or update the GitHub Release only after npm verification succeeds.
|
|
27
|
+
|
|
28
|
+
A rerun skips `npm publish` only when the exact existing version reports the same tagged `gitHead`; contradictory identity fails closed because npm versions are immutable. Registry lookup retries remain bounded. A missing or mismatched Trusted Publisher usually surfaces as npm authentication or not-found failure and must be corrected in npm package settings—never by adding a token fallback.
|