@llblab/pi-actors 0.30.2 → 0.32.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 +3 -0
- package/BACKLOG.md +14 -27
- package/CHANGELOG.md +16 -0
- package/README.md +36 -12
- package/dist/lib/observability.js +17 -6
- package/dist/lib/prompts.d.ts +1 -1
- package/dist/lib/prompts.js +3 -3
- package/dist/lib/tools.js +166 -29
- package/dist/skills/actors/SKILL.md +18 -21
- package/dist/skills/swarm/SKILL.md +3 -3
- package/docs/actor-messages.md +1 -1
- package/docs/async-runs.md +2 -0
- package/docs/tool-registry.md +1 -1
- package/lib/observability.ts +18 -6
- package/lib/prompts.ts +3 -3
- package/lib/tools.ts +186 -41
- package/package.json +1 -1
- package/skills/actors/SKILL.md +18 -21
- package/skills/swarm/SKILL.md +3 -3
package/AGENTS.md
CHANGED
|
@@ -61,6 +61,7 @@ Pi host
|
|
|
61
61
|
- Prefer explicit operator action over silent user-config rewrites.
|
|
62
62
|
- Keep published documentation portable: use `~`, `<repo>`, or relative paths instead of machine-local absolute paths.
|
|
63
63
|
- Preserve runtime output discipline because tool output flows directly into agent context.
|
|
64
|
+
- Optimize every actor-facing surface for signal over volume: prefer compact state-backed hints and fewer concepts over broad explanatory prose or speculative guidance.
|
|
64
65
|
- Keep the project lens local-first and cybernetic: agents wrap durable local capabilities as actors, then use semantic tools and messages instead of repeatedly reconstructing shell commands.
|
|
65
66
|
- Design recipes as agent-callable tools: make prompts, scopes, paths, models, and policy knobs public args/defaults when the caller should decide them at invocation time.
|
|
66
67
|
- Decompose oversized bullets into sublists or hierarchy; long flat list items are a context-smell.
|
|
@@ -80,6 +81,7 @@ Pi host
|
|
|
80
81
|
## Public Actor Model
|
|
81
82
|
|
|
82
83
|
- Preserve the public verbs: `spawn`, `message`, `inspect`.
|
|
84
|
+
- Keep the model-facing concept ladder minimal: core is run actors, typed messages, intentional inspection, artifacts, and recipe/tool memory; group messaging, roster, branches, sessions, and diagnostics are advanced surfaces.
|
|
83
85
|
- Prefer one typed actor-message envelope for upward, downward, lateral, parent/branch, and branch/parent messages.
|
|
84
86
|
- Prefer actor addresses and inspect views over exposing FIFO, outbox, or status mechanics as public concepts.
|
|
85
87
|
- Keep route and semantic type separate: delivery behavior comes from `to`, while `type` describes intent.
|
|
@@ -116,6 +118,7 @@ Pi host
|
|
|
116
118
|
## State, IO, And Safety
|
|
117
119
|
|
|
118
120
|
- Tool stdout and temp state must stay bounded and local.
|
|
121
|
+
- Feedback hints must be evidence-backed, bounded, and action-shaped; prefer `next_actions` pointing to existing verbs over prose, and avoid hints when no concrete next step is justified.
|
|
119
122
|
- Keep tail truncation, full-output temp files, failure formatting, and centralized limits intact.
|
|
120
123
|
- Published docs must not include machine-local absolute paths.
|
|
121
124
|
- Any view scanning run directories must apply coordinator/session ownership filters before exposing summaries or previews.
|
package/BACKLOG.md
CHANGED
|
@@ -47,25 +47,12 @@ No open hotfix items.
|
|
|
47
47
|
- File length alone is not a domain-split trigger: ~1000-line cohesive domain files are acceptable when ownership is clear.
|
|
48
48
|
- Consider splitting only when a file crosses roughly 2000 lines, mixes real ownership zones, or hides a clearer domain boundary.
|
|
49
49
|
- Prefer semantic compression before file splitting: fewer public nouns, consistent outcomes, compact diagnostics, and domain-owned constants/helpers.
|
|
50
|
+
- Preserve signal/noise balance: feedback should be state-backed, compact, and action-shaped; do not add advisory prose just because a surface exists.
|
|
50
51
|
|
|
51
52
|
## Minor Backlog
|
|
52
53
|
|
|
53
54
|
The backlog is intentionally pruned to the 20% of work most likely to deliver 80% of value for `pi-actors` as a local actor kernel. Bias toward consolidation, smaller public surface area, and reliability over new feature breadth.
|
|
54
55
|
|
|
55
|
-
### M-14 Session Mismatch Follow-through
|
|
56
|
-
|
|
57
|
-
- Priority: Medium.
|
|
58
|
-
- Status: Planned.
|
|
59
|
-
- Goal: Extend 0.27 structured session diagnostics consistently across room, branch, run, coordinator, and session workflows.
|
|
60
|
-
- Why now: M-12 established the shape; dogfood should now make every ownership denial equally actionable without relaxing ownership gates.
|
|
61
|
-
- Direction:
|
|
62
|
-
- Audit all session mismatch errors for consistent `reason`, owner/current session fields, and inspect-session hints.
|
|
63
|
-
- Keep read/write ownership policy unchanged.
|
|
64
|
-
- Update docs with session mismatch examples and recovery inspection paths.
|
|
65
|
-
- Acceptance:
|
|
66
|
-
- Room, branch, run, coordinator, and session denials share the same compact/verbose shape.
|
|
67
|
-
- Tests cover representative inspect and message paths.
|
|
68
|
-
|
|
69
56
|
### M-15 Worker Stale-Claim Dogfood
|
|
70
57
|
|
|
71
58
|
- Priority: Medium.
|
|
@@ -111,23 +98,23 @@ The backlog is intentionally pruned to the 20% of work most likely to deliver 80
|
|
|
111
98
|
- Room messages distinguish timeline append success from forwarded branch-targeted copies.
|
|
112
99
|
- Tests cover at least run, branch, room, coordinator, and ownership-denied outcomes.
|
|
113
100
|
|
|
114
|
-
### M-18
|
|
101
|
+
### M-18 Draft Recipe Promotion UX
|
|
115
102
|
|
|
116
103
|
- Priority: High.
|
|
117
104
|
- Status: Planned.
|
|
118
|
-
- Goal: Make successful ad hoc actor patterns easy to promote manually from
|
|
119
|
-
- Why now:
|
|
105
|
+
- Goal: Make successful ad hoc actor patterns easy to promote manually from draft memory into active user recipe memory.
|
|
106
|
+
- Why now: Draft recipes under `~/.pi/agent/recipes/candidates` are replayable but intentionally not active tools; the directory name is retained for compatibility, and the two-stage memory model now needs an explicit operator-gated promotion path.
|
|
120
107
|
- Direction:
|
|
121
|
-
- List
|
|
122
|
-
- Promote a selected
|
|
108
|
+
- List draft recipes with source run, timestamp, fingerprint, description/template preview, and validation status.
|
|
109
|
+
- Promote a selected draft to `~/.pi/agent/recipes/<name>.json` only through an explicit action or explicit tool argument.
|
|
123
110
|
- Run recipe validation/doctor before writing and expose collision/shadowing diagnostics.
|
|
124
|
-
- Preserve
|
|
111
|
+
- Preserve draft files unless deletion is explicitly requested.
|
|
125
112
|
- Prefer extending existing registry/tool surfaces over adding a new public noun.
|
|
126
113
|
- Acceptance:
|
|
127
|
-
-
|
|
114
|
+
- Draft recipes remain non-tools until promotion.
|
|
128
115
|
- Promotion writes atomically and never auto-promotes.
|
|
129
|
-
- Tests cover valid promotion, invalid
|
|
130
|
-
- Docs explain
|
|
116
|
+
- Tests cover valid promotion, invalid draft, name collision, and packaged-recipe shadowing.
|
|
117
|
+
- Docs explain draft memory vs active tool memory in one compact section.
|
|
131
118
|
|
|
132
119
|
### M-24 Registry Path Naming Cleanup
|
|
133
120
|
|
|
@@ -166,10 +153,10 @@ The backlog is intentionally pruned to the 20% of work most likely to deliver 80
|
|
|
166
153
|
- Priority: Medium.
|
|
167
154
|
- Status: Planned.
|
|
168
155
|
- Goal: Add one compact operator triage view that answers what needs attention right now without performing repairs.
|
|
169
|
-
- Why now: Runtime status, recipe doctor,
|
|
156
|
+
- Why now: Runtime status, recipe doctor, drafts, stale claims, session mismatches, failed runs, and other-session counts are currently separate bounded surfaces.
|
|
170
157
|
- Direction:
|
|
171
158
|
- Add `inspect target=tool:pi-actors view=triage` or an equivalent existing inspect surface.
|
|
172
|
-
- Summarize runtime version/mode, active runs, other-session runs, invalid or blocking recipes, high-risk recipes,
|
|
159
|
+
- Summarize runtime version/mode, active runs, other-session runs, invalid or blocking recipes, high-risk recipes, draft recipes, stale worker claims, recent failed runs, attention messages, and suggested next inspect actions.
|
|
173
160
|
- Keep every warning tied to a next inspect/action hint.
|
|
174
161
|
- Do not auto-repair, auto-prune, relax ownership, or hide detailed source-of-truth views.
|
|
175
162
|
- Acceptance:
|
|
@@ -226,7 +213,7 @@ These are valid ideas but not current focus. Reintroduce only with concrete evid
|
|
|
226
213
|
## Suggested Milestone Order
|
|
227
214
|
|
|
228
215
|
```text
|
|
229
|
-
Next milestone: M-
|
|
230
|
-
Then: M-
|
|
216
|
+
Next milestone: M-15 Worker Stale-Claim Dogfood.
|
|
217
|
+
Then: M-17 Message Delivery Outcome Contract → M-18 Draft Recipe Promotion UX.
|
|
231
218
|
Small cleanup lane: M-23 Tool Boundary Type Tightening → M-24 Registry Path Naming Cleanup.
|
|
232
219
|
```
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.32.0: Actor Surface Minimization
|
|
6
|
+
|
|
7
|
+
- `[Context]` Added durable signal/noise guidance for actor-facing surfaces: keep the model-facing concept ladder minimal, make feedback hints state-backed and action-shaped, and avoid speculative advisory prose.
|
|
8
|
+
- `[Backlog]` Added critical concept-surface compression and actor feedback-loop strengthening tracks to guide the next minimization-focused development cycle.
|
|
9
|
+
- `[Concepts]` Compressed model-facing language by presenting captured inline-spawn recipes as drafts, treating `room:<run>` as advanced group messaging plus roster, demoting coordinator/session/debug views from golden-path guidance, and keeping compatibility names/paths as storage details rather than core onboarding nouns.
|
|
10
|
+
- `[Feedback]` Added bounded next-action hints to recipe registry/doctor inspection, artifact inspection, delivery-fallback message results, and terminal run follow-ups so state-backed surfaces point back to `inspect`, `message`, `spawn`, or draft promotion without polling or auto-repair.
|
|
11
|
+
- `[Sessions]` Normalized session-directed message ownership failures onto the same structured `reason=session_mismatch`, owner/current session, and inspect-session hint shape used by run, branch, room, and coordinator ownership denials.
|
|
12
|
+
|
|
13
|
+
## 0.31.0: Agent Adoption Ergonomics
|
|
14
|
+
|
|
15
|
+
- `[Adoption]` Added a compact actor-mode trigger rule to the injected prompt, actors skill, README, and async-run docs so models prefer `spawn → message → inspect` for long-lived, stateful, follow-up, artifact, service, fanout, and resumable work while keeping short foreground checks as ordinary tools.
|
|
16
|
+
- `[Skills]` Reframed the bundled actors skill as required practical guidance for non-trivial actor use or pi-actors changes, and made the injected prompt route agents to it before improvising actor workflows.
|
|
17
|
+
- `[Tools]` Strengthened `spawn`, `message`, and `inspect` descriptions with adoption cues that steer models away from ad hoc shell backgrounding, actor restarts, and polling loops.
|
|
18
|
+
- `[Spawn]` Added explicit next-action feedback to spawn results so newly created actors immediately suggest inspect/message chains instead of leaving agents to infer the next step.
|
|
19
|
+
- `[Docs]` Added a task-first “when to use actors” golden path to the README without adding public verbs or scheduler/service-manager concepts.
|
|
20
|
+
|
|
5
21
|
## 0.30.2: Music Player Kill Hotfix
|
|
6
22
|
|
|
7
23
|
- `[Music Player]` Kept backend player processes inside the async run process group so `control.kill` can terminate an active music-player run without leaving detached `cvlc`/player children alive.
|
package/README.md
CHANGED
|
@@ -29,7 +29,26 @@ inspect intentionally read state, logs, messages, contracts, or artifacts
|
|
|
29
29
|
|
|
30
30
|
Everything else is an adapter until proven otherwise.
|
|
31
31
|
|
|
32
|
-
Use `spawn` when work may outlive the current turn. Use `message` when the actor should be steered rather than restarted. Use `inspect` at decision points, after actor follow-ups, or during diagnosis. Do not build polling loops as the default coordination pattern.
|
|
32
|
+
Use `spawn` when work may outlive the current turn. Use `message` when the actor should be steered rather than restarted. Use `inspect` at decision points, after actor follow-ups, or during diagnosis. For non-trivial actor use, load the bundled `actors` skill before improvising. Do not build polling loops as the default coordination pattern.
|
|
33
|
+
|
|
34
|
+
## When To Use Actors
|
|
35
|
+
|
|
36
|
+
Use actor-mode instead of ad hoc shell backgrounding when work is:
|
|
37
|
+
|
|
38
|
+
- Long-running or likely to outlive this agent turn.
|
|
39
|
+
- Stateful, resumable, or something you will need to inspect later.
|
|
40
|
+
- Expected to produce named artifacts or follow-up messages.
|
|
41
|
+
- A service, worker, media process, fanout, subagent, or pipeline.
|
|
42
|
+
- A repeatable local capability worth promoting into recipe memory.
|
|
43
|
+
|
|
44
|
+
Keep ordinary foreground tools for short checks such as `rg`, `ls`, quick tests, and one-shot transforms. The golden path is:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
create actor -> spawn
|
|
48
|
+
steer actor -> message
|
|
49
|
+
read state/results -> inspect
|
|
50
|
+
repeatable pattern -> promote to recipe/tool memory
|
|
51
|
+
```
|
|
33
52
|
|
|
34
53
|
## Install
|
|
35
54
|
|
|
@@ -47,16 +66,21 @@ The npm package is dist-first for JavaScript-only runtimes: default Pi metadata
|
|
|
47
66
|
|
|
48
67
|
## Address Surface
|
|
49
68
|
|
|
50
|
-
|
|
69
|
+
Core actor addresses stay small:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
run:<id> one detached actor run
|
|
73
|
+
tool:<name> executable registered tool actor
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Advanced coordination/debug addresses are available when a recipe or workflow needs them:
|
|
51
77
|
|
|
52
78
|
```text
|
|
53
|
-
run
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
coordinator launching coordinator attention path
|
|
79
|
+
branch:<run>/<branch> branch-local worker endpoint
|
|
80
|
+
room:<run> group-message timeline plus roster for one run
|
|
81
|
+
coordinator compatibility alias for the current session coordination path
|
|
57
82
|
session: current session actor surface
|
|
58
|
-
session:all cross-session inventory surface
|
|
59
|
-
tool:<name> executable registered tool
|
|
83
|
+
session:all cross-session inventory surface for diagnostics
|
|
60
84
|
```
|
|
61
85
|
|
|
62
86
|
Actor messages use one envelope shape:
|
|
@@ -121,9 +145,9 @@ message to=run:docs_review type=control.continue body=continue
|
|
|
121
145
|
message to=run:docs_review type=control.kill body=stop
|
|
122
146
|
```
|
|
123
147
|
|
|
124
|
-
##
|
|
148
|
+
## Group Messaging And Roster
|
|
125
149
|
|
|
126
|
-
Every spawned run can have
|
|
150
|
+
Every spawned run can have advanced group messaging at `room:<run>`. Treat this as a run-local timeline plus roster for coordinated actors, not as a core chat/broker concept.
|
|
127
151
|
|
|
128
152
|
Actors can join, post, leave, and discover peers:
|
|
129
153
|
|
|
@@ -136,7 +160,7 @@ message \
|
|
|
136
160
|
body='{"role":"reviewer","caps":["security-review"],"claim":"Review auth boundary risks"}'
|
|
137
161
|
```
|
|
138
162
|
|
|
139
|
-
Inspect
|
|
163
|
+
Inspect group messages and roster intentionally:
|
|
140
164
|
|
|
141
165
|
```text
|
|
142
166
|
inspect target=room:review view=status
|
|
@@ -146,7 +170,7 @@ inspect target=room:review view=contacts
|
|
|
146
170
|
inspect target=room:review view=messages
|
|
147
171
|
```
|
|
148
172
|
|
|
149
|
-
|
|
173
|
+
Group posts require a same-run sender, so unrelated runs do not pollute the roster. Direct messages and group messages use the same envelope; only the address changes. Direct `branch:<run>/<branch>` messages are private: they are forwarded through the parent run mailbox and recorded in the recipient branch inbox for worker protocols that consume queued branch work. For selected-recipient multicast, send to `room:<run>` with `metadata.recipients` set to same-run `branch:<run>/<branch>` addresses; this keeps one visible transcript entry while forwarding branch-targeted copies.
|
|
150
174
|
|
|
151
175
|
## Actor Inspector
|
|
152
176
|
|
|
@@ -721,19 +721,30 @@ function formatRecipePersistenceSuggestion(transition) {
|
|
|
721
721
|
}
|
|
722
722
|
return `\nAgent note: this actor was spawned directly and completed successfully. If this pattern fits this machine's recurring workflow, ask the operator whether to save it as a durable recipe/tool under ~/.pi/agent/recipes with register_tool. Do not auto-save without confirmation.`;
|
|
723
723
|
}
|
|
724
|
+
function formatTransitionNextActions(transition) {
|
|
725
|
+
const actions = [
|
|
726
|
+
`inspect target=run:${transition.run} view=status`,
|
|
727
|
+
transition.to === "done" && Object.keys(transition.artifacts ?? {}).length > 0
|
|
728
|
+
? `inspect target=run:${transition.run} view=artifacts`
|
|
729
|
+
: `inspect target=run:${transition.run} view=tail`,
|
|
730
|
+
`inspect target=run:${transition.run} view=messages`,
|
|
731
|
+
].filter(Boolean);
|
|
732
|
+
return `\nNext actions: ${actions.join(" | ")}`;
|
|
733
|
+
}
|
|
724
734
|
export function formatRunTransitionMessage(transition) {
|
|
725
735
|
const artifacts = formatNamedArtifacts(transition.artifacts);
|
|
726
736
|
const runFiles = formatRunFileList(getRunArtifacts(transition));
|
|
727
737
|
const persistenceSuggestion = formatRecipePersistenceSuggestion(transition);
|
|
738
|
+
const nextActions = formatTransitionNextActions(transition);
|
|
728
739
|
if (transition.to === "done")
|
|
729
|
-
return `Run ${transition.run} completed successfully.${artifacts}${runFiles}
|
|
740
|
+
return `Run ${transition.run} completed successfully.${artifacts}${runFiles}${nextActions}${persistenceSuggestion}`;
|
|
730
741
|
if (transition.to === "failed")
|
|
731
|
-
return `Run ${transition.run} failed.${artifacts}${runFiles}
|
|
742
|
+
return `Run ${transition.run} failed.${artifacts}${runFiles}${nextActions}`;
|
|
732
743
|
if (transition.to === "cancelled")
|
|
733
|
-
return `Run ${transition.run} was cancelled
|
|
744
|
+
return `Run ${transition.run} was cancelled.${nextActions}`;
|
|
734
745
|
if (transition.to === "killed")
|
|
735
|
-
return `Run ${transition.run} was force-killed
|
|
746
|
+
return `Run ${transition.run} was force-killed.${nextActions}`;
|
|
736
747
|
if (transition.to === "exited")
|
|
737
|
-
return `Run ${transition.run} exited before writing a result
|
|
738
|
-
return `Run ${transition.run} finished with status ${transition.to}
|
|
748
|
+
return `Run ${transition.run} exited before writing a result.${nextActions}`;
|
|
749
|
+
return `Run ${transition.run} finished with status ${transition.to}.${nextActions}`;
|
|
739
750
|
}
|
package/dist/lib/prompts.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare const REGISTER_TOOL_DESCRIPTION: string;
|
|
7
7
|
export declare const REGISTER_TOOL_PROMPT_SNIPPET = "Register persistent command templates as agent-callable tools";
|
|
8
8
|
export declare const REGISTER_TOOL_GUIDELINES: string[];
|
|
9
|
-
export declare const ONBOARDING_SYSTEM_PROMPT = "pi-actors quick model:\n- Local-first actor memory: persist trusted local capabilities instead of rebuilding shell recipes.\n- Layers: task -> command template -> recipe/tool -> spawn -> run:<id>; tool:<name> wraps registered capabilities.\n- Command templates stay sync: string leaf, array sequence, object node; flags include args/defaults, parallel, when, timeout, delay, retry, failure, recover, repeat, output.\n- Placeholders support typed/default args plus {value??fallback} and {flag?yes:no}.\n- ~/.pi/agent/recipes/*.json is actor muscle memory: every recipe there is auto-registered as an agent tool across sessions; register_tool writes there.\n- Recipes own template directly and may declare metadata/defaults/imports/mailbox/artifacts; files >1 MiB or import depth >32 fail closed.\n- Recipe imports are local variables; imported recipes are definitions, not nested async runs; parent async:true creates one run.\n- Use spawn/message/inspect for actor-level start/send/observe; avoid runtime/FIFO/outbox vocabulary in public guidance.\n- Run state lives under ~/.pi/agent/tmp/pi-actors/runs; inspect status/tail/messages/mailbox/files/artifacts intentionally and avoid busy-polling.\n- Maintain ~/.pi/agent/recipes like MEMORY.md for capabilities: keep useful tools, curate stale ones, and fix/remove/disable invalid recipes flagged by registry warnings; packaged/ad hoc recipes are lower-priority components; offer to save successful recurring patterns only after confirmation.\n-
|
|
9
|
+
export declare const ONBOARDING_SYSTEM_PROMPT = "pi-actors quick model:\n- Local-first actor memory: persist trusted local capabilities instead of rebuilding shell recipes.\n- Layers: task -> command template -> recipe/tool -> spawn -> run:<id>; tool:<name> wraps registered capabilities.\n- Command templates stay sync: string leaf, array sequence, object node; flags include args/defaults, parallel, when, timeout, delay, retry, failure, recover, repeat, output.\n- Placeholders support typed/default args plus {value??fallback} and {flag?yes:no}.\n- ~/.pi/agent/recipes/*.json is actor muscle memory: every recipe there is auto-registered as an agent tool across sessions; register_tool writes there.\n- Recipes own template directly and may declare metadata/defaults/imports/mailbox/artifacts; files >1 MiB or import depth >32 fail closed.\n- Recipe imports are local variables; imported recipes are definitions, not nested async runs; parent async:true creates one run.\n- Actor-mode trigger: if work may outlive this turn, need steering/follow-up/artifacts, run as a service, fan out, or be resumed/inspected later, use spawn -> message -> inspect instead of ad hoc shell backgrounding.\n- Use spawn/message/inspect for actor-level start/send/observe; short foreground checks can stay ordinary tools/templates; avoid runtime/FIFO/outbox vocabulary in public guidance.\n- Run state lives under ~/.pi/agent/tmp/pi-actors/runs; inspect status/tail/messages/mailbox/files/artifacts intentionally and avoid busy-polling.\n- Maintain ~/.pi/agent/recipes like MEMORY.md for capabilities: keep useful tools, curate stale ones, and fix/remove/disable invalid recipes flagged by registry warnings; packaged/ad hoc recipes are lower-priority components; offer to save successful recurring patterns only after confirmation.\n- Long fanout = parent async recipe wrapping template(parallel:true) and imports; packaged fanout recipes bubble branch completion messages; grow recurring multi-agent workflows as packaged recipes/pipelines, not ad hoc external scripts.\n- For any non-trivial actor use or pi-actors change, read the bundled actors skill first; for deeper guidance, inspect installed extension sources/docs/recipes because README/docs are not automatically in context.";
|
|
10
10
|
export declare const REGISTER_TOOL_PARAM_DESCRIPTIONS: {
|
|
11
11
|
readonly name: "Tool name in snake_case (e.g., 'transcribe')";
|
|
12
12
|
readonly description: "Describe what the tool does for the LLM. Required unless deleting; omitted updates keep the old description.";
|
package/dist/lib/prompts.js
CHANGED
|
@@ -21,12 +21,12 @@ export const ONBOARDING_SYSTEM_PROMPT = `pi-actors quick model:
|
|
|
21
21
|
- ~/.pi/agent/recipes/*.json is actor muscle memory: every recipe there is auto-registered as an agent tool across sessions; register_tool writes there.
|
|
22
22
|
- Recipes own template directly and may declare metadata/defaults/imports/mailbox/artifacts; files >1 MiB or import depth >32 fail closed.
|
|
23
23
|
- Recipe imports are local variables; imported recipes are definitions, not nested async runs; parent async:true creates one run.
|
|
24
|
-
-
|
|
24
|
+
- Actor-mode trigger: if work may outlive this turn, need steering/follow-up/artifacts, run as a service, fan out, or be resumed/inspected later, use spawn -> message -> inspect instead of ad hoc shell backgrounding.
|
|
25
|
+
- Use spawn/message/inspect for actor-level start/send/observe; short foreground checks can stay ordinary tools/templates; avoid runtime/FIFO/outbox vocabulary in public guidance.
|
|
25
26
|
- Run state lives under ~/.pi/agent/tmp/pi-actors/runs; inspect status/tail/messages/mailbox/files/artifacts intentionally and avoid busy-polling.
|
|
26
27
|
- Maintain ~/.pi/agent/recipes like MEMORY.md for capabilities: keep useful tools, curate stale ones, and fix/remove/disable invalid recipes flagged by registry warnings; packaged/ad hoc recipes are lower-priority components; offer to save successful recurring patterns only after confirmation.
|
|
27
|
-
- Foreground tools/templates fit short work; async recipes/runs fit subagents, services, fanout, media, and long pipelines.
|
|
28
28
|
- Long fanout = parent async recipe wrapping template(parallel:true) and imports; packaged fanout recipes bubble branch completion messages; grow recurring multi-agent workflows as packaged recipes/pipelines, not ad hoc external scripts.
|
|
29
|
-
- For
|
|
29
|
+
- For any non-trivial actor use or pi-actors change, read the bundled actors skill first; for deeper guidance, inspect installed extension sources/docs/recipes because README/docs are not automatically in context.`;
|
|
30
30
|
export const REGISTER_TOOL_PARAM_DESCRIPTIONS = {
|
|
31
31
|
name: "Tool name in snake_case (e.g., 'transcribe')",
|
|
32
32
|
description: "Describe what the tool does for the LLM. Required unless deleting; omitted updates keep the old description.",
|