@llblab/pi-actors 0.14.3 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +5 -1
- package/BACKLOG.md +54 -32
- package/CHANGELOG.md +39 -0
- package/README.md +53 -61
- package/banner.jpg +0 -0
- package/docs/actor-messages.md +1 -1
- package/docs/async-runs.md +4 -4
- package/docs/command-templates.md +11 -11
- package/docs/recipe-library.md +7 -3
- package/docs/task-first-recipes.md +44 -43
- package/docs/template-recipes.md +45 -23
- package/docs/tool-registry.md +50 -42
- package/index.ts +34 -0
- package/lib/actor-messages.ts +20 -7
- package/lib/async-runs.ts +35 -12
- package/lib/command-templates.ts +6 -1
- package/lib/config.ts +3 -2
- package/lib/execution.ts +9 -5
- package/lib/observability.ts +20 -10
- package/lib/paths.ts +6 -1
- package/lib/prompts.ts +14 -21
- package/lib/recipe-discovery.ts +226 -0
- package/lib/recipe-migration.ts +123 -0
- package/lib/recipe-references.ts +45 -13
- package/lib/recipe-usage.ts +44 -0
- package/lib/registry.ts +48 -15
- package/lib/runtime.ts +59 -15
- package/lib/tools.ts +237 -65
- package/package.json +21 -11
- package/recipes/coordinator-locker.json +46 -0
- package/recipes/music-player.json +16 -2
- package/recipes/pipeline-architect-coordinator.json +11 -3
- package/recipes/pipeline-artifact-bundle.json +12 -3
- package/recipes/pipeline-artifact-report.json +9 -3
- package/recipes/pipeline-artifact-write.json +9 -3
- package/recipes/pipeline-async-run-ops.json +18 -9
- package/recipes/pipeline-checkpoint-continuation.json +14 -3
- package/recipes/pipeline-development-tasking.json +12 -3
- package/recipes/pipeline-docs-maintenance.json +12 -3
- package/recipes/pipeline-media-library.json +12 -3
- package/recipes/pipeline-quorum-review.json +12 -9
- package/recipes/pipeline-release-readiness.json +27 -9
- package/recipes/pipeline-release-summary.json +89 -0
- package/recipes/pipeline-repo-health.json +12 -3
- package/recipes/pipeline-research-synthesis.json +11 -3
- package/recipes/pipeline-review-readiness.json +12 -6
- package/recipes/subagent-artifact.json +9 -3
- package/recipes/subagent-checkpoint.json +10 -3
- package/recipes/subagent-conflict-report.json +11 -3
- package/recipes/subagent-contradiction-map.json +11 -3
- package/recipes/subagent-critic.json +11 -3
- package/recipes/subagent-evidence-map.json +11 -3
- package/recipes/subagent-followup.json +10 -3
- package/recipes/subagent-judge.json +11 -3
- package/recipes/subagent-merge.json +11 -3
- package/recipes/subagent-message.json +8 -3
- package/recipes/subagent-normalize.json +11 -3
- package/recipes/subagent-plan.json +11 -3
- package/recipes/subagent-prompt.json +10 -3
- package/recipes/subagent-quorum.json +10 -7
- package/recipes/subagent-review-coordinator.json +14 -6
- package/recipes/subagent-review.json +11 -3
- package/recipes/subagent-task-card.json +11 -3
- package/recipes/subagent-tools.json +10 -3
- package/recipes/subagent-verify.json +11 -3
- package/recipes/subagents-prompts.json +10 -3
- package/recipes/utility-coordinator-lock-snapshot.json +14 -0
- package/recipes/utility-run-ops-snapshot.json +3 -3
- package/recipes/utility-skill-summary.json +14 -0
- package/scripts/coordinator-locker.mjs +272 -0
- package/scripts/music-player.mjs +2 -1
- package/scripts/recipe-utils.mjs +239 -81
- package/scripts/validate-recipe.mjs +28 -10
- package/skills/actors/SKILL.md +301 -0
- package/skills/swarm/SKILL.md +451 -0
- package/skills/swarm/references/development-swarm.md +596 -0
package/AGENTS.md
CHANGED
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
- `/lib/*.ts`: Flat Domain DAG modules for cohesive reusable behavior; `command-templates.ts` mirrors the shared portable command-template standard, `schema.ts` owns tool arg declarations and placeholder-derived tool schemas, `identity.ts` owns names, `config.ts` owns config persistence, `registry.ts` owns registry register/update/delete use-cases, `output.ts` owns result formatting/truncation, `execution.ts` owns registered-tool execution, `recipe-references.ts` owns template recipe reference detection and path resolution, `async-runs.ts` owns async run state, `observability.ts` owns ambient run summaries, `temp.ts` owns pi-agent temp cleanup, `prompts.ts` owns LLM-facing copy, `tools.ts` owns pi-facing tool definitions for both `register_tool`, async run primitives, and generated runtime tools, `runtime.ts` owns load/conflict/registration coordination, and `paths.ts` owns config/tmp path resolution
|
|
18
18
|
- `index.ts` should import local domains as namespaces (`import * as CommandTemplates from "./lib/command-templates.ts"`) so orchestration reads through domain names instead of flat helper imports
|
|
19
19
|
- `/scripts/*.mjs`: Thin helper processes for detached async run execution; keep policy in registered tool config and reusable logic in `/lib`
|
|
20
|
-
- `/recipes/*.json`: Packaged standard recipe library; keep recipes optional, composable, and policy-light; prefer public args
|
|
20
|
+
- `/recipes/*.json`: Packaged standard recipe library; keep recipes optional, composable, and policy-light; prefer public args for operator/agent decisions instead of baking project-specific prompts, file names, or concrete model-version defaults into reusable recipes
|
|
21
|
+
- `/skills/actors/SKILL.md`: Dense practical reference for operating pi-actors itself
|
|
22
|
+
- `/skills/swarm/SKILL.md`: Bundled methodology skill for multi-agent standards, strategies, and portable examples; keep it theory/strategy-oriented while pi-actors recipes/scripts provide the local execution engine
|
|
21
23
|
- `/scripts/music-player.mjs`: Standard helper script for the packaged music-player recipe; keep it executable and avoid restoring parallel shell-wrapper variants unless a concrete portability need appears
|
|
22
24
|
- `/tests/*.test.ts`: Focused regression tests for pure domains
|
|
23
25
|
- `/README.md`: Human-facing install, usage, and runtime semantics
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
|
|
36
38
|
## Durable Conventions
|
|
37
39
|
|
|
40
|
+
- `Knowledge surface separation`: pi-actors has distinct knowledge surfaces with different context-entry behavior: injected prompt is always present and should stay a tiny bootstrap/reminder; packaged `actors` skill is auto-matched by name/description and should signal that its body is the highest-density practical guide for operating the extension plus the shortest navigator to bundled recipes; packaged `swarm` skill is auto-matched for multi-agent methodology, strategies, standards, and portable examples; README is the human entrypoint explaining concept, rhythm, benefits, and scenarios but is not automatically in context; `/docs` are detailed transportable standards read on demand; `AGENTS.md` is project context and architectural constraints for agents changing the repo | Trigger: Editing prompt copy, README, docs, skills, or project context | Action: Keep each surface on its own wave, avoid duplicating prompt and skill headers, keep the actors skill recipe navigator compact and concrete, avoid duplicating scenario catalogs or changelog narratives in the actors skill, avoid turning the prompt into docs, keep multi-agent methodology in swarm-oriented guidance rather than the actors skill, keep packaged extension skill metadata versions synchronized with `package.json` version, and avoid extra colons in skill frontmatter scalar lines because skill formatters treat them poorly
|
|
38
41
|
- `Tool registry source`: `~/.pi/agent/actors-tools.json` is the persistent user config | Trigger: Any runtime registration or migration work | Action: Preserve atomic writes and avoid hidden format changes without an explicit migration path
|
|
39
42
|
- `Current runtime contract`: Register trusted command templates with tool names from registry keys, placeholder-derived args, progressive typed arg declarations, inline/default/`??`/ternary config fallback, placeholder-derived numeric node controls, split-first command-arg construction, sequential or `parallel: true` composition, direct no-shell execution, optional per-node `when`, optional per-node positive `timeout` disabled by default, lightweight warnings for obvious trusted-executable risk shapes, per-node `delay`, bounded leaf/node `retry`, `failure: "continue|branch|root"` propagation, `recover` cleanup between retry attempts, template recipes with explicit `async: true` detached mode, actor-oriented `spawn`/`message`/`inspect` tools with run-local JSONL outbox messages, Unix FIFO send, graceful cancel, and force kill, generic detached run primitives with process-group cancellation, injected async `{run_id}` and `{state_dir}` values, coordinator-scoped event-driven observability with at least one triangle per active async run and extra triangles for active parallel branches, runtime-inferred `command.done` bubbling for packaged multi-agent fanout, named recipe `artifacts`, recipe `mailbox` metadata, terminal follow-ups for `done`/`failed`/unhandled `killed`/`exited` states, `template` recipe references, recipe-layer `imports`, co-located recipe entries, `~/.pi/agent/recipes/*.json` template recipe files, run state under `~/.pi/agent/tmp/pi-actors/runs`, and `{file}` as the canonical local file path arg | Trigger: Changing registration or invocation behavior | Action: Keep README, command-template docs, template-recipe docs, async-run docs, actor-message docs, implementation, and migration notes aligned
|
|
40
43
|
- `Typed arg authoring`: Typed args support `string`, `path`, `int`, `number`, `bool`, and `enum(...)` plus two equivalent readability styles: metadata-first (`args` + `defaults` + simple `{name}` placeholders) for long command lines, and inline-first (`{name:type=default}` placeholders) for compact one-property templates | Trigger: Changing arg parsing, docs, schema generation, or registry serialization | Action: Preserve both styles, keep explicit `args` type declarations higher priority than inline placeholder types, and make breaking cleanup explicit when removing old arg shapes
|
|
@@ -47,6 +50,7 @@
|
|
|
47
50
|
- `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.
|
|
48
51
|
- `Output discipline`: Tool stdout is returned with bounded context impact | Trigger: Changing execution or formatting | Action: Keep tail truncation, full-output temp files, and failure formatting intact
|
|
49
52
|
- `Extension temp directory`: Temporary runtime files belong under `~/.pi/agent/tmp/pi-actors`; session start prepares the directory and prunes stale entries | Trigger: Adding temp files, run state, logs, or artifacts | Action: Do not use system tmp for extension-owned state unless the operator explicitly overrides a path
|
|
53
|
+
- `Backlog is planning, not history`: `BACKLOG.md` should contain current/future work, blockers, gates, and next leverage points; completed delivery history belongs in `CHANGELOG.md`, and durable behavior belongs in README/docs | Trigger: Editing backlog or reconciling completed slices | Action: Remove historical progress narratives, keep current task/scope/exit criteria, and prefer an 80/20 focus list when many remaining tasks compete for attention
|
|
50
54
|
- `Context sync`: Meaningful implementation or docs changes must reconcile `BACKLOG.md`, `CHANGELOG.md`, README, and docs navigation | Trigger: Closing, narrowing, or discovering work | Action: Run the context validator before final status when practical
|
|
51
55
|
- `Public path hygiene`: Published docs must not include machine-local absolute paths | Trigger: Adding validation commands, examples, or local instructions to README/AGENTS/docs/changelog | Action: Use `~/.pi/...`, `<repo>/...`, `${SKILL_DIR}/...`, or relative paths
|
|
52
56
|
|
package/BACKLOG.md
CHANGED
|
@@ -2,38 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
## Open Work
|
|
4
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
|
-
|
|
5
|
+
No release-blocking work remains for `0.16.0`.
|
|
6
|
+
|
|
7
|
+
## Future Work
|
|
8
|
+
|
|
9
|
+
### Recipe Registry Curation UX
|
|
10
|
+
|
|
11
|
+
- Priority: Medium.
|
|
12
|
+
- Status: `inspect target=recipes view=status|summary` exposes active, shadowed, invalid, disabled, and diagnostic recipe state. User-owned recipes track extension-maintained `usage.calls` and `usage.last_called`.
|
|
13
|
+
- Goal: Help operators curate the sticky `~/.pi/agent/recipes` tool surface without automatic deletion or demotion.
|
|
14
|
+
- Direction:
|
|
15
|
+
- Include usage fields in recipe registry summaries.
|
|
16
|
+
- Add cleanup recommendations for stale, duplicate, low-use, too-specific, invalid, disabled, and shadowing recipes.
|
|
17
|
+
- Recommend explicit actions only: keep as tool, set `tool: false`, merge, delete, or archive.
|
|
18
|
+
- Keep cleanup operator-gated; never silently delete or demote during unrelated work.
|
|
19
|
+
- Exit:
|
|
20
|
+
- Operators can ask why a recipe/tool exists and what cleanup action is reasonable without reading files manually.
|
|
21
|
+
|
|
22
|
+
### Host-Level Tool Unregistration
|
|
23
|
+
|
|
24
|
+
- Priority: Low.
|
|
25
|
+
- Status: Deleted recipe files are removed from the active tool set on reactive reload; host-level registered tool definitions cannot currently be unregistered by this extension.
|
|
26
|
+
- Goal: Remove stale dynamically registered tool definitions completely when the host API supports it.
|
|
27
|
+
- Direction:
|
|
28
|
+
- Track pi extension API support for custom tool unregistration.
|
|
29
|
+
- Replace active-tool deactivation fallback with real unregister when available.
|
|
30
|
+
- Preserve current safe behavior: deleted tools should not remain active after reload.
|
|
31
|
+
- Exit:
|
|
32
|
+
- Deleting a recipe file removes the corresponding runtime tool definition and active-tool entry without session restart.
|
|
33
|
+
|
|
34
|
+
### Recipe Discovery Expansion
|
|
35
|
+
|
|
36
|
+
- Priority: Low.
|
|
37
|
+
- Direction:
|
|
38
|
+
- Add nested recipe directories only after flat `recipes/*.json` discovery semantics are stable.
|
|
39
|
+
- Keep same-id priority and invalid-blocking behavior explicit if nested ids are introduced.
|
|
40
|
+
|
|
41
|
+
### Recipe Usage Telemetry Evolution
|
|
42
|
+
|
|
43
|
+
- Priority: Low.
|
|
44
|
+
- Direction:
|
|
45
|
+
- Consider sidecar stats sync/backup policy after inline user-owned `usage.calls` / `usage.last_called` proves useful.
|
|
46
|
+
- Do not add failure counters as primary usefulness evidence unless there is a strong operator-facing need.
|
|
47
|
+
|
|
48
|
+
### Opportunistic Recipe Library Growth
|
|
49
|
+
|
|
50
|
+
- Priority: Low.
|
|
51
|
+
- Direction:
|
|
52
|
+
- Add new utilities or pipelines only when a concrete repeated task pattern justifies them.
|
|
32
53
|
|
|
33
54
|
## Blocked Work
|
|
34
55
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
56
|
+
### Branch-Local Checkpoint Semantics
|
|
57
|
+
|
|
58
|
+
- Priority: Low.
|
|
59
|
+
- Blocked by: At least one real collaborative branch-runner async-run experiment.
|
|
60
|
+
- Scope: Validate whether `failure: "branch"`, node-level `retry`, and `recover` cleanup are enough for branch-local validation and bounded reattempts.
|
|
61
|
+
- Exit: Record one decision: sufficient, documentation-only refinement needed, or propose one minimal command-template extension with tests.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.0: File-Discovered Recipe Registry Migration
|
|
4
|
+
|
|
5
|
+
- `[Version]` Began the `0.16.0` breaking-change cycle and captured the file-discovered recipe registry migration plan in `BACKLOG.md`. Impact: the next release target is now explicit: replace `actors-tools.json` as live registry with validated recipe files, filename identity, `tool` exposure, override/disable semantics, migration reporting, registry inspection, and usage-informed cleanup.
|
|
6
|
+
- `[Recipe References]` Started filename-identity support for recipes by deriving the recipe id from the JSON filename when `name` is omitted, while preserving optional `tool`, `disabled`, and `description` metadata through recipe resolution. Impact: new recipe files can move toward filename-as-identity without losing human-readable descriptions or tool exposure flags.
|
|
7
|
+
- `[Recipe Discovery]` Added an initial file-discovered recipe registry domain with flat root scanning, filename ids, priority shadowing, invalid high-priority recipe blocking, disabled overrides, and `tool: true` exposure detection. Impact: the 0.16 registry migration now has a tested discovery core before wiring it into runtime loading.
|
|
8
|
+
- `[Recipe Migration]` Added a legacy registry migration domain that converts `actors-tools.json` entries into user recipe files with `tool: true`, preserves descriptions/args/defaults/templates, refuses to overwrite existing recipe files, writes a migration report, and archives the source only when migration has no conflicts or invalid entries. Impact: the breaking registry transition now has a tested compatibility path from the old live registry.
|
|
9
|
+
- `[Recipe Discovery]` Captured the priority model that treats packaged pi-actors recipes as a standard library below ad hoc user-selected recipe files and below `~/.pi/agent/recipes/*.json`, with priority applying only to matching filename ids. Impact: override behavior now has a documented lens and a regression for standard-library versus user recipe precedence.
|
|
10
|
+
- `[Recipe Discovery]` Added source-level default tool exposure so the high-priority user recipe root can behave as the operator-managed tool set by default, while packaged/ad hoc recipes stay component-like unless they opt in with `tool: true` and any recipe can opt out with `tool: false`. Impact: 0.16 keeps the discoverability advantage of the old tool-only registry without forcing a separate live tool config.
|
|
11
|
+
- `[Runtime]` Wired session-start tool loading to migrate the legacy registry, discover recipe-file tools from `~/.pi/agent/recipes` and packaged recipes, and register only active exposed recipes as runtime tools. Impact: the new recipe-discovered registry path is now active in runtime loading instead of only existing as standalone discovery/migration helpers.
|
|
12
|
+
- `[Registry]` Changed `register_tool` persistence to write/update/delete user recipe files under the recipe root instead of mutating the legacy JSON registry, while still activating the tool in the current session. Impact: newly registered tools now enter the 0.16 recipe-discovered registry directly.
|
|
13
|
+
- `[Docs]` Reworked tool-registry documentation, README examples, recipe docs, actor skill guidance, and prompt copy around recipe-file persistence, the user recipe directory as the default tool set, packaged recipes as standard-library components, and `actors-tools.json` as legacy migration input. Impact: public guidance now matches the 0.16 runtime path instead of the old live JSON registry.
|
|
14
|
+
- `[Skill]` Added actors-skill guidance for same-name recipe priority, recipe-root-as-muscle-memory, usage counters, and an explicit cleanup rule for stale/default tools without automatic deletion or demotion. Impact: agents get the override model, sticky-tool tradeoff, and cleanup heuristic directly in the compact operational reference.
|
|
15
|
+
- `[Recipe Usage]` Added extension-maintained recipe launch metadata updates for user-owned runtime tools and direct async recipe starts, tracking `usage.calls` and `usage.last_called` without failure counters while leaving packaged standard-library recipes immutable, then documented the cleanup interpretation in recipe and tool-registry docs. Impact: the operator-managed recipe/tool set now accrues cleanup evidence for muscle-memory review from actual extension launches rather than manual agent bookkeeping.
|
|
16
|
+
- `[Runtime]` Added a best-effort user recipe-root watcher that debounces file changes and reloads recipe-backed tools during the active session, plus runtime-tool fingerprinting so repeated reloads do not re-register unchanged tools while changed definitions refresh, and stale recipe tools are removed from the active tool set on reload when their recipe disappears. Impact: newly created or edited valid recipe files can be connected without a full restart, without duplicate registration churn for unchanged recipes, while deleted recipe tools are deactivated even though host-level unregistration is still not available.
|
|
17
|
+
- `[Recipe Discovery]` Added a discovery summary helper and wired/documented `inspect target=recipes view=status|summary` to report active, shadowed, invalid, disabled, and diagnostic recipe entries. Impact: the registry inspection surface can explain why tools are present, hidden, broken, or disabled from the normal actor inspection tool.
|
|
18
|
+
- `[Backlog]` Reconciled 0.16 planning state after implementation of the core runtime path, usage counters, and reactive recipe reload behavior. Impact: remaining open work is now framed as hardening, inspection UX, and release validation instead of rediscovering already implemented pieces.
|
|
19
|
+
- `[Docs]` Normalized registry examples toward filename/tool ids that match the snake_case tool naming convention, avoiding mixed hyphen/underscore examples around `docs_review`, and aligned package image metadata with the local pi-actors banner. Impact: recipe identity, generated tool naming, and package presentation are less ambiguous in 0.16 guidance.
|
|
20
|
+
- `[Backlog]` Reconciled the recipe registry inspection surface after wiring the initial `inspect target=recipes` summary, then closed the active `0.16.0` release backlog by moving remaining non-blocking ideas to future curation, host-unregistration, discovery expansion, telemetry evolution, and opportunistic recipe-library sections. Impact: the backlog now distinguishes completed release scope from future follow-up work.
|
|
21
|
+
|
|
22
|
+
## 0.15.0: Packaged Actors Skill And Actor Vocabulary Cleanup
|
|
23
|
+
|
|
24
|
+
- `[Skill]` Reworked the packaged `actors` skill as a dense self-contained extension reference rather than a scenario catalog or changelog narrative, bundled the `swarm` methodology skill alongside it, synchronized packaged skill metadata versions with the package version, included `skills/` in the npm package contents, registered both skills in package metadata, and linked them from the README start points. Impact: fresh agents get compact practical coverage of pi-actors operation plus complementary multi-agent methodology without duplicating the two roles.
|
|
25
|
+
- `[Prompts]` Tightened the injected onboarding prompt into a shorter runtime bootstrap/reminder that avoids duplicating the skill and notes that README/docs are not automatically in context. Impact: session context stays compact while preserving operational lookup paths.
|
|
26
|
+
- `[Context]` Added a durable knowledge-surface separation convention for prompt, skill header/body, README, docs, and `AGENTS.md`. Impact: future edits have a clear role model for where each kind of pi-actors knowledge belongs and how it reaches the agent context.
|
|
27
|
+
- `[Backlog]` Reconciled task-first pipeline notes with the release-summary/review pipeline candidate in abstract terms. Impact: future pi-actors work can explore evidence preparation without tying the backlog to one completed release pass.
|
|
28
|
+
- `[Actor Tools]` Changed compact `inspect view=messages` and `message` tool output to use actor-message wording instead of public `event`/`delivery`/`outbox` labels. Impact: default tool output now reinforces the actor vocabulary while verbose JSON still exposes implementation details for diagnostics.
|
|
29
|
+
- `[Skill]` Reworded the packaged skill description to avoid extra frontmatter colons and replaced the compact two-branch Core Nouns sketch with an explicit two-path flow. Impact: skill metadata stays formatter-safe and the template→recipe→run versus template/recipe→tool relationship is easier to read.
|
|
30
|
+
- `[Recipe Library]` Added `utility-skill-summary` and routed `pipeline-release-readiness` through packaged skill evidence between package summary and validation. Impact: release readiness reports can verify skill metadata/package-version alignment, formatter-safe frontmatter, body size, and heading shape alongside changelog/package/validation evidence.
|
|
31
|
+
- `[Recipe Library]` Changed async-run operations recipes from public `message_file` inputs to `run_id` inputs, with the helper resolving implementation storage internally. Impact: packaged recipes no longer expose outbox paths as part of their public actor-operations surface.
|
|
32
|
+
- `[Recipe Library]` Added `coordinator-locker`, a long-lived actor recipe backed by `scripts/coordinator-locker.mjs` that manages a FIFO work queue, acquire/renew/release resource lease locks, a journal, and coordinator-directed actor messages, plus `utility-coordinator-lock-snapshot` for state inspection. Impact: future coordinated fanout recipes have a small local coordination cell instead of baking ad hoc queue/lock mechanics into each pipeline.
|
|
33
|
+
- `[Skill]` Clarified the actors skill's relationship to methodology skills and expanded it with a linked Recipe Navigator covering bundled coordination/service recipes, subagent atoms, pipelines, and utilities. Impact: the actors skill is now both the extension operation reference and the shortest agent-facing path to concrete packaged recipe files.
|
|
34
|
+
- `[Recipe Library]` Standardized all packaged async recipes to advertise `control.stop`, `control.cancel`, and `control.kill` in mailbox accepts. Impact: `inspect view=mailbox` now exposes the actor-native termination contract consistently across subagent atoms, coordinator cells, music, and pipelines.
|
|
35
|
+
- `[Recipe Library]` Removed concrete model-version defaults from packaged recipes, removed stale concrete model aliases from operator/docs examples, and added regressions that reject model-like defaults or provider/version aliases in recipe defaults and stale concrete model aliases in public guidance. Impact: reusable components stay policy-light and force the caller/agent to choose current model policy at launch instead of inheriting stale packaged aliases.
|
|
36
|
+
- `[Context]` Recompressed `BACKLOG.md` around current/future work only, added an 80/20 focus section for the remaining actor-vocabulary, recipe-policy, release-evidence pipeline, and utility-growth work, and promoted the backlog-is-planning rule into `AGENTS.md`. Impact: completed history stays in the changelog/docs while the backlog remains an actionable planning surface.
|
|
37
|
+
- `[Recipe Library]` Added `pipeline-release-summary`, an evidence-only release preparation pipeline that composes changelog, package, skill, and validation evidence into a release summary, risk checklist, and PR body draft artifact without commit, PR, merge, tag, publish, or other external release side effects. Impact: release-prep artifacts can be produced under pi-actors while gated release actions remain owned by release workflows.
|
|
38
|
+
- `[Docs]` Reworded remaining public README examples and the async-run operations pipeline prompt toward run-actor vocabulary instead of presenting async-run lifecycle wording as the primary operator concept. Impact: public guidance continues converging on `spawn`, `message`, `inspect`, and actor runs while low-level lifecycle language stays in implementation docs.
|
|
39
|
+
- `[Context]` Closed the active `0.15.0` backlog by moving completed actor-communication, component-policy, and utility-surface work out of open planning, leaving only future opportunistic work and the blocked branch-runner experiment. Impact: the release backlog now reflects no open release-blocking work.
|
|
40
|
+
- `[Skill]` Consolidated the bundled `swarm` methodology skill boundary by removing concrete pi-actors adapter examples and duplicate adapter/component docs from Swarm, keeping detailed MAWP mechanics in the dedicated reference instead of duplicating them in the general skill, and adding regressions that packaged Swarm markdown must not mention pi-actors runtime identifiers, package metadata must register every packaged skill, packaged skill markdown links must resolve, and the actors Recipe Navigator must link every bundled recipe file. Impact: Swarm can live inside this package while remaining portable methodology, and actors remains the shortest concrete path to packaged recipes.
|
|
41
|
+
|
|
3
42
|
## 0.14.3: Pipeline Termination Mailbox Consistency
|
|
4
43
|
|
|
5
44
|
- `[Recipe Library]` Added `control.cancel` and `control.kill` mailbox accepts to packaged async pipeline recipes that previously advertised only `control.stop`. Impact: `inspect view=mailbox` now exposes the full actor-native termination set consistently across high-level pipeline actors.
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# pi-actors
|
|
2
2
|
|
|
3
|
-
Actor runtime and orchestrator for agent-managed local processes.
|
|
3
|
+
> Actor runtime and orchestrator for agent-managed local processes.
|
|
4
|
+
|
|
5
|
+
[<img alt="Actors*" src="banner.jpg" />](https://github.com/llblab/pi-actors "pi-actors")
|
|
4
6
|
|
|
5
7
|
`pi-actors` turns local programs, scripts, services, recipes, and long-running processes into addressable actors that agents can start, message, inspect, and compose. A music player, a sub-agent fanout, a repo-health pipeline, or any trusted local process can become an actor when it has a template-backed launch path, a mailbox contract, and observable runtime state.
|
|
6
8
|
|
|
@@ -12,6 +14,9 @@ The persistent tool registry is still useful: it lets agents keep durable operat
|
|
|
12
14
|
- [Open Backlog](./BACKLOG.md)
|
|
13
15
|
- [Changelog](./CHANGELOG.md)
|
|
14
16
|
- [Documentation](./docs/README.md)
|
|
17
|
+
- [Actors skill](./skills/actors/SKILL.md) — dense agent-facing reference for operating the extension
|
|
18
|
+
- [Swarm skill](./skills/swarm/SKILL.md) — multi-agent methodology, strategies, standards, and portable examples for actor-backed swarms
|
|
19
|
+
- [Swarm MAWP notes](./skills/swarm/references/development-swarm.md) — optional small-team development swarm reference
|
|
15
20
|
|
|
16
21
|
## What It Is
|
|
17
22
|
|
|
@@ -41,7 +46,7 @@ The key move is not just “register a command.” It is to wrap a process in an
|
|
|
41
46
|
- **Control**: `message` sends typed envelopes to runs, branches, tools, or the coordinator.
|
|
42
47
|
- **Observation**: `inspect` reads status, logs, messages, mailbox metadata, files, and artifacts intentionally.
|
|
43
48
|
- **Persistence**: `artifacts` and state files make outcomes durable.
|
|
44
|
-
- **Memory**:
|
|
49
|
+
- **Memory**: `~/.pi/agent/recipes/*.json` stores reusable actor-control wrappers across sessions.
|
|
45
50
|
|
|
46
51
|
## Key Features
|
|
47
52
|
|
|
@@ -49,7 +54,7 @@ The key move is not just “register a command.” It is to wrap a process in an
|
|
|
49
54
|
- **Agent-Managed Processes**: Wraps sub-agents, media players, pipelines, diagnostics, and other local programs as controllable entities instead of one-off commands.
|
|
50
55
|
- **Message-Oriented Control**: Uses `spawn`, `message`, and `inspect` as the public coordination vocabulary for start, control, and observation.
|
|
51
56
|
- **Mailbox Contracts**: Lets recipes declare what messages they accept and emit, so agents can discover how to interact with an actor.
|
|
52
|
-
- **Actor Tool Registry**: Stores persistent actor-control
|
|
57
|
+
- **Actor Tool Registry**: Stores persistent actor-control tools as recipe files in `~/.pi/agent/recipes/*.json` and registers them automatically on session start.
|
|
53
58
|
- **Command Template Substrate**: Keeps process launch portable with named placeholders, typed args, defaults, sequences, guarded nodes, retries, failure policy, and `parallel: true` fanout.
|
|
54
59
|
- **Composable Actor Recipes**: Stores reusable recipe JSON under `~/.pi/agent/recipes/*.json`; recipes can import other recipes, reuse defaults, declare artifacts, and opt into detached actor lifecycle with `async: true`.
|
|
55
60
|
- **Coordinator-Scoped Observability**: Shows ambient triangles for active actor runs and sends compact completion or request-for-attention follow-ups only to the launching coordinator.
|
|
@@ -70,27 +75,17 @@ From git:
|
|
|
70
75
|
pi install git:github.com/llblab/pi-actors
|
|
71
76
|
```
|
|
72
77
|
|
|
73
|
-
##
|
|
78
|
+
## Registry Migration
|
|
74
79
|
|
|
75
|
-
`pi-actors` reads persistent actor-control tools from:
|
|
80
|
+
`pi-actors` now reads persistent actor-control tools from:
|
|
76
81
|
|
|
77
82
|
```text
|
|
78
|
-
~/.pi/agent/
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
If you previously used `pi-auto-tools`, copy the old registry intentionally:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
cp ~/.pi/agent/auto-tools.json ~/.pi/agent/actors-tools.json
|
|
83
|
+
~/.pi/agent/recipes/*.json
|
|
85
84
|
```
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
That directory is the operator-managed tool set: user recipe files there become tools by default unless they set `tool: false`. Packaged recipes are the lower-priority standard library of declarative actor components and opt into tools with `tool: true`.
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
cp ~/.pi/agent/tools.json ~/.pi/agent/actors-tools.json
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
The extension does not silently rewrite old registry files; keep or delete the old file after confirming the new registry loads as expected.
|
|
88
|
+
If `~/.pi/agent/actors-tools.json` exists from an older release, pi-actors treats it as legacy compatibility input, migrates entries into recipe files when possible, writes a migration report, and archives the legacy file only when migration is clean.
|
|
94
89
|
|
|
95
90
|
## Mental Model
|
|
96
91
|
|
|
@@ -126,12 +121,10 @@ Move to actor recipes when work is long-running, parallel, service-like, or agen
|
|
|
126
121
|
|
|
127
122
|
```json
|
|
128
123
|
{
|
|
129
|
-
"name": "
|
|
124
|
+
"name": "docs_review",
|
|
130
125
|
"async": true,
|
|
131
126
|
"args": ["scope:path", "model:string"],
|
|
132
|
-
"defaults": {
|
|
133
|
-
"model": "openai-codex/gpt-5.5"
|
|
134
|
-
},
|
|
127
|
+
"defaults": {},
|
|
135
128
|
"mailbox": {
|
|
136
129
|
"accepts": ["control.stop"],
|
|
137
130
|
"emits": ["review.completed", "run.failed"]
|
|
@@ -143,14 +136,14 @@ Move to actor recipes when work is long-running, parallel, service-like, or agen
|
|
|
143
136
|
Expose a reusable actor recipe as a normal capability:
|
|
144
137
|
|
|
145
138
|
```text
|
|
146
|
-
register_tool name=docs_review description="Start an async docs review actor" template="
|
|
139
|
+
register_tool name=docs_review description="Start an async docs review actor" template="docs_review" args="scope:path,model:string"
|
|
147
140
|
```
|
|
148
141
|
|
|
149
142
|
`Task` is the user's work item. `Template` is the execution graph. `Actor recipe` is saved JSON. `Run` is one actor instance with status, logs, messages, cancellation, artifacts, and ambient triangles.
|
|
150
143
|
|
|
151
144
|
## Compose Recipes With Imports
|
|
152
145
|
|
|
153
|
-
Recipes can import other recipe files and reuse them as named nodes. This keeps reusable steps small while letting a parent recipe decide whether the combined graph runs foreground or as one
|
|
146
|
+
Recipes can import other recipe files and reuse them as named nodes. This keeps reusable steps small while letting a parent recipe decide whether the combined graph runs foreground or as one detached run actor.
|
|
154
147
|
|
|
155
148
|
`review-one.json`:
|
|
156
149
|
|
|
@@ -158,7 +151,7 @@ Recipes can import other recipe files and reuse them as named nodes. This keeps
|
|
|
158
151
|
{
|
|
159
152
|
"name": "review-one",
|
|
160
153
|
"args": ["scope:string", "model:string"],
|
|
161
|
-
"defaults": {
|
|
154
|
+
"defaults": {},
|
|
162
155
|
"template": "pi -p --model {model} --no-tools \"Review {scope}\""
|
|
163
156
|
}
|
|
164
157
|
```
|
|
@@ -189,7 +182,7 @@ register_tool name=review_pair \
|
|
|
189
182
|
template="review-pair.json"
|
|
190
183
|
```
|
|
191
184
|
|
|
192
|
-
Imported recipes are recipe definitions, not nested
|
|
185
|
+
Imported recipes are recipe definitions, not nested run actors. The parent recipe's `async: true` creates one run actor with one state dir; imported recipes contribute command-template graph, args, defaults, and values.
|
|
193
186
|
|
|
194
187
|
## Register Actor-Control Tools
|
|
195
188
|
|
|
@@ -212,33 +205,32 @@ For reusable actor workflows, keep the large template and mailbox contract in a
|
|
|
212
205
|
```text
|
|
213
206
|
register_tool name=docs_review \
|
|
214
207
|
description="Start an async docs review actor" \
|
|
215
|
-
template="
|
|
216
|
-
args="scope:path,model:string
|
|
208
|
+
template="docs_review" \
|
|
209
|
+
args="scope:path,model:string"
|
|
217
210
|
```
|
|
218
211
|
|
|
219
212
|
If the recipe file contains `async: true`, calling `docs_review` starts a detached run and returns metadata immediately. If `async` is omitted or false, the same recipe runs foreground and returns normal tool output.
|
|
220
213
|
|
|
221
|
-
|
|
214
|
+
When keeping metadata and the recipe body together is clearer, `register_tool` writes a complete user recipe file:
|
|
222
215
|
|
|
223
216
|
```json
|
|
224
217
|
{
|
|
225
|
-
"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
218
|
+
"description": "Start an async docs review",
|
|
219
|
+
"tool": true,
|
|
220
|
+
"async": true,
|
|
221
|
+
"args": ["scope:path", "model:string"],
|
|
222
|
+
"template": "pi -p --model {model} --tools read,bash \"Review {scope}\""
|
|
231
223
|
}
|
|
232
224
|
```
|
|
233
225
|
|
|
234
|
-
|
|
226
|
+
The filename is the recipe id/tool name, `async: true` selects detached run mode, and `template` remains the executable body.
|
|
235
227
|
|
|
236
228
|
### Sub-agent
|
|
237
229
|
|
|
238
230
|
```text
|
|
239
231
|
register_tool name=call_subagent \
|
|
240
232
|
description="Run pi as a non-interactive sub-agent" \
|
|
241
|
-
template="pi -p --model {model
|
|
233
|
+
template="pi -p --model {model} --no-tools {prompt}" args="prompt:string,model:string"
|
|
242
234
|
```
|
|
243
235
|
|
|
244
236
|
Use `update=true` to overwrite an existing tool. Omit `template` during update to keep the previous template:
|
|
@@ -255,29 +247,28 @@ Delete a tool:
|
|
|
255
247
|
register_tool name=call_subagent template=null
|
|
256
248
|
```
|
|
257
249
|
|
|
258
|
-
## Resulting
|
|
250
|
+
## Resulting Recipe Files
|
|
259
251
|
|
|
260
|
-
The commands above persist
|
|
252
|
+
The commands above persist files under `~/.pi/agent/recipes/`. Tool names come from recipe filenames. Stored recipes keep `template` last so flags and metadata are read before executable content:
|
|
261
253
|
|
|
262
254
|
```json
|
|
263
255
|
{
|
|
264
|
-
"
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
"
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
256
|
+
"description": "Transcribe a local audio file",
|
|
257
|
+
"tool": true,
|
|
258
|
+
"template": "/path/to/stt --file {file} --lang {lang=ru}"
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"description": "Run pi as a non-interactive sub-agent",
|
|
265
|
+
"tool": true,
|
|
266
|
+
"args": ["prompt:string", "model:string"],
|
|
267
|
+
"template": "pi -p --model {model} --no-tools {prompt}"
|
|
277
268
|
}
|
|
278
269
|
```
|
|
279
270
|
|
|
280
|
-
|
|
271
|
+
The recipe directory is the durable actor-tool registry. `register_tool` is the interactive API; recipe files are the persisted state loaded on future sessions.
|
|
281
272
|
|
|
282
273
|
## Manage Actors
|
|
283
274
|
|
|
@@ -288,9 +279,10 @@ Start from an inline template as an addressable run actor:
|
|
|
288
279
|
```json
|
|
289
280
|
{
|
|
290
281
|
"as": "run:docs-review",
|
|
291
|
-
"template": "pi -p --model
|
|
282
|
+
"template": "pi -p --model {model} --no-tools {prompt}",
|
|
292
283
|
"values": {
|
|
293
|
-
"prompt": "Review docs/spec.md for contradictions."
|
|
284
|
+
"prompt": "Review docs/spec.md for contradictions.",
|
|
285
|
+
"model": "current-review-model"
|
|
294
286
|
}
|
|
295
287
|
}
|
|
296
288
|
```
|
|
@@ -313,7 +305,7 @@ Reusable local recipes live in `~/.pi/agent/recipes/*.json`; recipe tools honor
|
|
|
313
305
|
|
|
314
306
|
Packaged standard recipes live under root `recipes/` with helper scripts under root `scripts/`. They are reusable library definitions, not automatically installed operator policy.
|
|
315
307
|
|
|
316
|
-
The subagent component recipes start non-interactive pi subagents as
|
|
308
|
+
The subagent component recipes start non-interactive pi subagents as detached run actors or compose component recipes into higher-level coordinator pipelines. Use the no-tools recipe for the safest default, the explicit-tool variant when a bounded tool allowlist is needed, or the prompts fanout parent recipe to see imported subagent recipe nodes composed into one run actor:
|
|
317
309
|
|
|
318
310
|
```text
|
|
319
311
|
register_tool name=subagent_prompt \
|
|
@@ -325,7 +317,7 @@ register_tool name=subagent_tools \
|
|
|
325
317
|
template="subagent-tools.json"
|
|
326
318
|
|
|
327
319
|
register_tool name=subagents_prompts \
|
|
328
|
-
description="Start parallel no-tools subagents from a prompt array as one
|
|
320
|
+
description="Start parallel no-tools subagents from a prompt array as one run actor" \
|
|
329
321
|
template="subagents-prompts.json"
|
|
330
322
|
|
|
331
323
|
subagent_prompt prompt="Review docs/async-runs.md for unclear wording." run_id=docs-review
|
|
@@ -336,7 +328,7 @@ subagents_prompts \
|
|
|
336
328
|
inspect target=run:review-prompts view=tail
|
|
337
329
|
```
|
|
338
330
|
|
|
339
|
-
The music player recipe starts a local file, URL, directory, or playlist as
|
|
331
|
+
The music player recipe starts a local file, URL, directory, or playlist as a run actor, keeps the agent unblocked, shows the ambient triangle indicator in the launching coordinator, and can be controlled with addressed `message` calls. The standard library ships one Node.js wrapper recipe:
|
|
340
332
|
|
|
341
333
|
```text
|
|
342
334
|
register_tool name=music_player \
|
|
@@ -374,8 +366,8 @@ See [`docs/recipe-library.md`](./docs/recipe-library.md) for install notes and r
|
|
|
374
366
|
- `recover` runs a cleanup command template between failed retry attempts and stops retries if cleanup fails.
|
|
375
367
|
- Commands execute directly without shell evaluation, but trusted executables still run with the same permissions as pi.
|
|
376
368
|
- Obvious high-risk templates such as shells, interpreter eval modes, and broad filesystem mutation surface lightweight warnings without blocking existing tools.
|
|
377
|
-
- `async: true` on a recipe selects detached run lifecycle; omitted or false
|
|
378
|
-
- Layer boundaries stay explicit: command templates define synchronous execution graphs; template recipes add saved JSON metadata/import resolution and named `artifacts`;
|
|
369
|
+
- `async: true` on a recipe selects detached run-actor lifecycle; omitted or false runs the recipe foreground through registered tools.
|
|
370
|
+
- Layer boundaries stay explicit: command templates define synchronous execution graphs; template recipes add saved JSON metadata/import resolution and named `artifacts`; run actors add detached lifecycle, state, IPC, and observability.
|
|
379
371
|
- `spawn`, `message`, and `inspect` are high-level actor adapters. `spawn` creates `run:<id>` actors from recipes or inline templates with optional state/artifact metadata, `message` sends one typed envelope to `run:<id>` mailboxes, `branch:<run>/<branch>` mailboxes, `tool:<name>` calls, or coordinator/session attention paths, and `inspect` intentionally reads `run:<id>` status/tail/messages/mailbox metadata, coordinator/session run status, or registered `tool:<name>` contracts while the broader actor/message protocol is refined.
|
|
380
372
|
- `spawn`, `message`, and `inspect` are the public async coordination vocabulary. Low-level async actions map to this actor API: start belongs to `spawn`; send/control/stop/kill belongs to `message`; status/tail/messages/list belongs to `inspect`. Use `inspect view=messages` for actor-envelope streams. Use `control.stop`, `control.cancel`, and `control.kill` for run termination; runtime-prefixed control aliases are no longer part of the public surface.
|
|
381
373
|
- Actor management returns compact text by default; pass `verbose: true` to `inspect` when full JSON state is needed.
|
|
@@ -384,7 +376,7 @@ See [`docs/recipe-library.md`](./docs/recipe-library.md) for install notes and r
|
|
|
384
376
|
- Native Windows should use WSL or a recipe-specific transport for run-local message-controlled recipes; Linux uses stricter `/proc` runner ownership checks for stale PID protection.
|
|
385
377
|
- Registered tools may set `template` to a recipe JSON path/name; calling them follows that recipe's `async` mode.
|
|
386
378
|
- File-backed recipes may declare `imports` and embed imported recipes with `{ "name": "alias" }` nodes, or read `{alias.defaults.key}`, `{alias.defaults.key=fallback}`, and `{alias.values.key?yes:no}` references before command-template execution.
|
|
387
|
-
- Interactive sessions show ambient
|
|
379
|
+
- Interactive sessions show ambient actor activity as stable `▷` triangles aggregated across runs started by the current agent session. Each running run actor contributes at least one triangle; parallel active branches can contribute more. One `▶` wave moves over the active set; terminal `done`/`failed`/unhandled `killed`/`exited` messages are delivered as compact follow-up context only to the launching coordinator agent, while intentional `cancel`, `kill`, and `stop` actions stay silent because the action already reports synchronously. Failed commands and in-flight parallel branch completions can bubble through `command.done`; successful final leaf completions remain diagnostic to avoid sequential pipeline noise.
|
|
388
380
|
- Use `{file}` as the canonical local file path arg.
|
|
389
381
|
- Stored `script` entries are rejected with migration guidance.
|
|
390
382
|
|
package/banner.jpg
ADDED
|
Binary file
|
package/docs/actor-messages.md
CHANGED
|
@@ -58,7 +58,7 @@ Field rules:
|
|
|
58
58
|
- `type`: required semantic message type.
|
|
59
59
|
- `summary`: short human-facing line for notifications/follow-ups.
|
|
60
60
|
- `body`: string or JSON payload.
|
|
61
|
-
-
|
|
61
|
+
- Routing/delivery is inferred from `to`, actor ownership, and coordinator runtime policy; recipes should not expose delivery knobs. When a coordinator session is known, addressed run/branch/control messages fail closed before controlling or emitting from runs owned by another session.
|
|
62
62
|
- `reply_to`: optional message id for conversational checkpoints.
|
|
63
63
|
- `correlation_id`: optional task/run/workflow id.
|
|
64
64
|
- `metadata`: optional structured routing or domain hints.
|
package/docs/async-runs.md
CHANGED
|
@@ -139,10 +139,10 @@ The actor-level surface is:
|
|
|
139
139
|
|
|
140
140
|
Low-level async actions map into the actor surface instead of forming a second public model:
|
|
141
141
|
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
142
|
+
- Start → `spawn`
|
|
143
|
+
- Send/control → `message`
|
|
144
|
+
- Status/tail/messages/list → `inspect`
|
|
145
|
+
- Stop/kill → `message` with `control.stop` or `control.kill`, with synchronous results
|
|
146
146
|
|
|
147
147
|
Compact text is returned by default so async management does not flood agent context; use verbose inspection when the full state object is needed. List output intentionally shares one state root across music, subagents, timers, and other async work; source fields such as `tool` and `recipe` distinguish run purpose when the launcher recorded them. Registered tools are the preferred user-facing surface for reusable recipes.
|
|
148
148
|
|
|
@@ -79,13 +79,13 @@ Implementations may expand `~` in command position and may resolve relative comm
|
|
|
79
79
|
|
|
80
80
|
Supported forms:
|
|
81
81
|
|
|
82
|
-
| Form
|
|
83
|
-
|
|
|
84
|
-
| `{name}`
|
|
85
|
-
| `{name=default}`
|
|
86
|
-
| `{name??fallback}`
|
|
87
|
-
| `{name?yes:no}`
|
|
88
|
-
| `{items[index]}`
|
|
82
|
+
| Form | Meaning |
|
|
83
|
+
| ------------------ | ------------------------------------------------ |
|
|
84
|
+
| `{name}` | Required value from runtime values or `defaults` |
|
|
85
|
+
| `{name=default}` | Inline default when no value is provided |
|
|
86
|
+
| `{name??fallback}` | Fallback when value is missing, null, or empty |
|
|
87
|
+
| `{name?yes:no}` | Ternary string selected by truthiness of `name` |
|
|
88
|
+
| `{items[index]}` | Array item selected by literal or repeat index |
|
|
89
89
|
|
|
90
90
|
Resolution order is runtime values → `defaults` → inline default → error. Nullish coalescing and ternary conditions treat missing, empty, `false`, `0`, and `no` as false. Use `??` for value fallback and ternaries for small string selection such as optional CLI flags; larger policy branches should stay in recipes, scripts, or separate template nodes. Default values that are themselves a single placeholder, such as `{prompt}` resolving to `{prompts[index]}`, are resolved recursively with a small depth guard. A repeat node may set `repeat` to `{items.length}` when an array arg should determine fanout width.
|
|
91
91
|
|
|
@@ -248,12 +248,12 @@ Parallel nodes use the same object shape. Flags come first and `template` stays
|
|
|
248
248
|
"parallel": true,
|
|
249
249
|
"template": [
|
|
250
250
|
{
|
|
251
|
-
"label": "
|
|
251
|
+
"label": "reviewer-a",
|
|
252
252
|
"timeout": 300000,
|
|
253
253
|
"template": "review-gpt {scope}"
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
|
-
"label": "
|
|
256
|
+
"label": "reviewer-b",
|
|
257
257
|
"timeout": 300000,
|
|
258
258
|
"template": "review-deepseek {scope}"
|
|
259
259
|
},
|
|
@@ -272,9 +272,9 @@ Parallel nodes use the same object shape. Flags come first and `template` stays
|
|
|
272
272
|
A degraded parallel join is still usable when at least one branch succeeds:
|
|
273
273
|
|
|
274
274
|
```text
|
|
275
|
-
--- branch:
|
|
275
|
+
--- branch: reviewer-a status: done ---
|
|
276
276
|
review text
|
|
277
|
-
--- branch:
|
|
277
|
+
--- branch: reviewer-b status: failed ---
|
|
278
278
|
exit: 1
|
|
279
279
|
stderr: provider balance exhausted
|
|
280
280
|
```
|
package/docs/recipe-library.md
CHANGED
|
@@ -46,7 +46,7 @@ Core subagent recipes:
|
|
|
46
46
|
- `recipes/subagent-followup.json`: Same-context or degraded continuation.
|
|
47
47
|
- `recipes/subagent-judge.json`: Post-merge/report quality judge.
|
|
48
48
|
|
|
49
|
-
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. The 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.
|
|
49
|
+
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: callers must pass current model policy at launch, which keeps reusable recipe components from aging around old provider aliases. The 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.
|
|
50
50
|
|
|
51
51
|
Register one atom:
|
|
52
52
|
|
|
@@ -68,8 +68,10 @@ inspect target=run:docs-review view=tail
|
|
|
68
68
|
|
|
69
69
|
Pipeline recipes demonstrate second-order composition:
|
|
70
70
|
|
|
71
|
+
- `recipes/coordinator-locker.json`: Long-lived coordinator cell with queue, acquire/renew/release lease locks, journal, and actor messages for worker coordination.
|
|
71
72
|
- `recipes/subagent-review-coordinator.json`: Lens reviewers → verifier → merger → judge → normalizer.
|
|
72
|
-
- `recipes/pipeline-release-readiness.json`: Task-first release cell: changelog section → package summary → validation → release review → artifact report.
|
|
73
|
+
- `recipes/pipeline-release-readiness.json`: Task-first release cell: changelog section → package summary → packaged skill summary → validation → release review → artifact report.
|
|
74
|
+
- `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.
|
|
73
75
|
- `recipes/pipeline-repo-health.json`: Task-first repository-health cell: git status/log → docs index → validation → normalized artifact report.
|
|
74
76
|
- `recipes/pipeline-async-run-ops.json`: Task-first async-run operations cell: run summary → actor-message tail → normalized operations report → artifact report.
|
|
75
77
|
- `recipes/pipeline-review-readiness.json`: Release/readiness gate over selected lenses.
|
|
@@ -96,16 +98,18 @@ Utility recipes cover local operator workflows that do not need subagents:
|
|
|
96
98
|
- `recipes/utility-git-status.json`: Read concise branch/worktree state for a repo.
|
|
97
99
|
- `recipes/utility-git-log.json`: Read recent decorated commit history for a repo.
|
|
98
100
|
- `recipes/utility-run-state-files.json`: List run-state files such as `run.json` under an async run state root.
|
|
101
|
+
- `recipes/utility-coordinator-lock-snapshot.json`: Summarize a coordinator-locker actor state directory with queue depth, locks, and recent journal entries.
|
|
99
102
|
- `recipes/utility-changelog-head.json`: Read the top slice of a changelog for release summary prep.
|
|
100
103
|
- `recipes/utility-playlist-scan.json`: List local media files as playlist-building input.
|
|
101
104
|
- `recipes/utility-run-summary.json`: Use `scripts/recipe-utils.mjs` to summarize async run state files as JSON.
|
|
102
|
-
- `recipes/utility-run-ops-snapshot.json`: Combine async run summaries, actor
|
|
105
|
+
- `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.
|
|
103
106
|
- `recipes/utility-playlist-build.json`: Use `scripts/recipe-utils.mjs` to build a filtered playlist listing as newline paths, M3U, or inline `|`-separated source.
|
|
104
107
|
- `recipes/utility-changelog-section.json`: Use `scripts/recipe-utils.mjs` to extract one changelog release section.
|
|
105
108
|
- `recipes/utility-artifact-manifest.json`: Use `scripts/recipe-utils.mjs` to emit a machine-readable JSON manifest for an artifact path.
|
|
106
109
|
- `recipes/utility-artifact-write.json`: Deterministically write prepared artifact content from stdin to `artifact_path` with explicit `create`, `overwrite`, or `append` mode.
|
|
107
110
|
- `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`.
|
|
108
111
|
- `recipes/utility-package-summary.json`: Use `scripts/recipe-utils.mjs` to emit bounded package metadata such as name, version, files, scripts, and dependency counts.
|
|
112
|
+
- `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.
|
|
109
113
|
- `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`.
|
|
110
114
|
|
|
111
115
|
These recipes are intentionally small. Register them only for trusted local commands and prefer narrow scopes. The helper-backed utilities share `scripts/recipe-utils.mjs` so repeated parsing/listing logic stays out of recipe strings.
|