@llblab/pi-actors 0.38.1 → 0.39.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 +1 -1
- package/CHANGELOG.md +6 -0
- package/README.md +120 -131
- package/dist/skills/actors/SKILL.md +1 -1
- package/dist/skills/swarm/SKILL.md +1 -1
- package/package.json +1 -1
- package/skills/actors/SKILL.md +1 -1
- package/skills/swarm/SKILL.md +1 -1
package/AGENTS.md
CHANGED
|
@@ -61,7 +61,7 @@ Pi host
|
|
|
61
61
|
- `/skills/actors/SKILL.md`: Dense practical reference for operating pi-actors itself.
|
|
62
62
|
- `/skills/swarm/SKILL.md`: Bundled methodology skill for multi-agent standards, strategies, and portable examples.
|
|
63
63
|
- `/tests/*.test.ts`: Focused regression tests for pure domains.
|
|
64
|
-
- `/README.md`: Human-facing install, usage, and runtime semantics.
|
|
64
|
+
- `/README.md`: Human-facing install, usage, and runtime semantics. Keep it as a product/onboarding entrypoint rather than an implementation dump: identity → why it exists → core verbs → install → first run → address/message model → feature showcase → golden path → recipe memory → platform/safety/docs. Preserve both layers: strong local-actor-kernel positioning plus compact practical capability catalog.
|
|
65
65
|
- `/BACKLOG.md`: Canonical open work; only completable future work.
|
|
66
66
|
- `/CHANGELOG.md`: Completed delivery history.
|
|
67
67
|
- `/docs/README.md`: Documentation index.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.39.0: Actor Kernel Welcome Refresh
|
|
6
|
+
|
|
7
|
+
- `[Docs]` Reworked the root README as a product/onboarding entrypoint for the local actor kernel, with clearer positioning, first-run path, feature showcase, recipe-memory model, address/message examples, and practical surface-selection guidance. Impact: new operators can understand when to use `spawn`, `message`, `inspect`, recipes, rooms, and artifacts without reading deep implementation docs first.
|
|
8
|
+
- `[Context]` Added a durable README standard to `AGENTS.md` so future edits preserve the RhythmE/product entrypoint shape while keeping the practical capability catalogue visible.
|
|
9
|
+
- `[Release]` Bumped package metadata to `0.39.0` for the onboarding refresh minor release.
|
|
10
|
+
|
|
5
11
|
## 0.38.1: Windows Recipe ACL Hotfix
|
|
6
12
|
|
|
7
13
|
- `[Registry]` Replaced POSIX mode-bit recipe-root writability checks on Windows with ACL-aware diagnostics, avoiding false `world-writable` and `group-writable` startup warnings from Node's NTFS mode emulation while still flagging broad Windows write grants.
|
package/README.md
CHANGED
|
@@ -1,54 +1,48 @@
|
|
|
1
1
|
# pi-actors
|
|
2
2
|
|
|
3
|
-
> Local Actor Kernel for Pi
|
|
4
|
-
|
|
5
3
|

|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
**Local actor kernel for Pi.**
|
|
6
|
+
|
|
7
|
+
`pi-actors` turns trusted local programs, scripts, services, pipelines, recipes, and sub-agents into addressable actors that Pi can spawn, steer, inspect, and reuse. It is the bridge between one-shot shell commands and durable local capability memory.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A command is a moment. An actor is a local thing with time: address, lifecycle, logs, mailbox, messages, artifacts, state, and an interaction contract.
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
|
-
|
|
12
|
+
trusted local capability
|
|
13
13
|
→ command template
|
|
14
|
-
→
|
|
14
|
+
→ recipe
|
|
15
15
|
→ spawn
|
|
16
16
|
→ run:<id>
|
|
17
17
|
→ message / inspect / artifacts
|
|
18
|
+
→ reusable tool memory
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
##
|
|
21
|
+
## Why it exists
|
|
21
22
|
|
|
22
|
-
`pi-actors`
|
|
23
|
+
Agents are good at reasoning, but they should not reconstruct the same fragile background command every time a task becomes long-lived. `pi-actors` gives Pi a local-first actor layer: work can outlive the current turn, expose bounded state, receive typed instructions, produce artifacts, and graduate into persistent recipe-backed tools under `~/.pi/agent/recipes`.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
spawn create an addressable actor
|
|
26
|
-
message send one typed envelope to one address
|
|
27
|
-
inspect intentionally read state, logs, messages, contracts, or artifacts
|
|
28
|
-
```
|
|
25
|
+
Use it when the correct shape is not "run a command and forget" but "start a local capability, keep its handle, and come back with intent."
|
|
29
26
|
|
|
30
|
-
|
|
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. For non-trivial actor use, load the bundled `actors` skill before improvising. Do not build polling loops as the default coordination pattern.
|
|
27
|
+
## The promise
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
- **Spawn long-lived work without shell gymnastics.** Start services, workers, subagents, fanouts, and pipelines as named actor runs.
|
|
30
|
+
- **Steer instead of restarting.** Send typed `message` envelopes to runs, tools, branches, rooms, sessions, or coordinators.
|
|
31
|
+
- **Inspect intentionally.** Read status, logs, messages, mailboxes, artifacts, registry health, and room rosters at decision points.
|
|
32
|
+
- **Promote what works.** Persist trusted command templates and recipes as durable local tools in `~/.pi/agent/recipes`.
|
|
33
|
+
- **Keep orchestration local.** State is file-backed, inspectable, operator-owned, and designed for Pi sessions rather than a cloud broker.
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
## Core verbs
|
|
37
36
|
|
|
38
|
-
-
|
|
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.
|
|
37
|
+
`pi-actors` compresses local orchestration into three public verbs:
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
| Verb | Use it when | Result |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `spawn` | Work may outlive this turn, fan out, produce artifacts, or need later steering | A `run:<id>` actor with lifecycle and state |
|
|
42
|
+
| `message` | An existing actor should be continued, stopped, approved, killed, or given scoped input | One typed envelope delivered to one address |
|
|
43
|
+
| `inspect` | You need evidence before deciding the next step | Bounded views of status, logs, messages, registry, artifacts, or rooms |
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
create actor -> spawn
|
|
48
|
-
steer actor -> message
|
|
49
|
-
read state/results -> inspect
|
|
50
|
-
repeatable pattern -> promote to recipe/tool memory
|
|
51
|
-
```
|
|
45
|
+
Everything else is an adapter until proven otherwise.
|
|
52
46
|
|
|
53
47
|
## Install
|
|
54
48
|
|
|
@@ -62,28 +56,53 @@ Or from git:
|
|
|
62
56
|
pi install git:github.com/llblab/pi-actors
|
|
63
57
|
```
|
|
64
58
|
|
|
65
|
-
The npm package is dist-first for JavaScript-only runtimes:
|
|
59
|
+
The npm package is dist-first for JavaScript-only runtimes: Pi metadata points at compiled `dist/` entrypoints and mirrored runtime assets. Source TypeScript and source skills remain packaged for TypeScript-native or checkout-based runtimes.
|
|
60
|
+
|
|
61
|
+
## First run: actor mode in one minute
|
|
62
|
+
|
|
63
|
+
Use actors instead of ad hoc shell backgrounding when work is long-running, stateful, resumable, artifact-producing, service-like, parallel, agentic, or worth saving.
|
|
64
|
+
|
|
65
|
+
Start an actor:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
spawn template="sleep 30 && echo done" as=run:demo
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Inspect it when you need evidence:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
inspect target=run:demo view=status
|
|
75
|
+
inspect target=run:demo view=tail lines=40
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Steer it with a typed message:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
message to=run:demo type=control.kill body=stop
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For non-trivial actor workflows, load the bundled `actors` skill before improvising. For multi-model review or delegated audit, load the bundled `swarm` skill.
|
|
66
85
|
|
|
67
|
-
## Address
|
|
86
|
+
## Address surface
|
|
68
87
|
|
|
69
|
-
Core
|
|
88
|
+
Core addresses stay small:
|
|
70
89
|
|
|
71
90
|
```text
|
|
72
91
|
run:<id> one detached actor run
|
|
73
92
|
tool:<name> executable registered tool actor
|
|
74
93
|
```
|
|
75
94
|
|
|
76
|
-
Advanced
|
|
95
|
+
Advanced addresses exist for coordination and diagnostics:
|
|
77
96
|
|
|
78
97
|
```text
|
|
79
98
|
branch:<run>/<branch> branch-local worker endpoint
|
|
80
|
-
room:<run>
|
|
81
|
-
coordinator
|
|
99
|
+
room:<run> run-local group timeline plus roster
|
|
100
|
+
coordinator current session coordination path
|
|
82
101
|
session: current session actor surface
|
|
83
|
-
session:all cross-session inventory
|
|
102
|
+
session:all cross-session diagnostics inventory
|
|
84
103
|
```
|
|
85
104
|
|
|
86
|
-
|
|
105
|
+
Messages use one envelope shape:
|
|
87
106
|
|
|
88
107
|
```json
|
|
89
108
|
{
|
|
@@ -98,9 +117,24 @@ Actor messages use one envelope shape:
|
|
|
98
117
|
}
|
|
99
118
|
```
|
|
100
119
|
|
|
101
|
-
Routing
|
|
120
|
+
Routing comes from `to`, actor ownership, and runtime policy. `type` describes intent. Recipes should expose semantic message types instead of transport knobs.
|
|
102
121
|
|
|
103
|
-
##
|
|
122
|
+
## Feature showcase
|
|
123
|
+
|
|
124
|
+
| Surface | What it gives you | Typical move |
|
|
125
|
+
| --- | --- | --- |
|
|
126
|
+
| Command templates | Portable command graphs with placeholders, defaults, guards, retries, parallel nodes, recovery, and timeouts | Wrap a trusted local executable without writing a bespoke tool |
|
|
127
|
+
| Recipes | JSON/Markdown capability specs with metadata, args, defaults, imports, mailbox contracts, artifacts, and async mode | Save a known-good local workflow as reusable muscle memory |
|
|
128
|
+
| Async runs | File-backed detached lifecycle, logs, progress, output, cancellation, artifacts, and terminal follow-ups | Let model work, media jobs, services, or pipelines continue after the turn |
|
|
129
|
+
| Message protocol | Typed envelopes across run, tool, branch, room, coordinator, and session targets | Continue, approve, kill, or route work without restarting actors |
|
|
130
|
+
| Rooms and rosters | Run-local group timeline with actor join/leave, contacts, previews, and branch-aware delivery | Coordinate multiple subagents under one visible run |
|
|
131
|
+
| Registry and recipe doctor | Discovered tools, overrides, drafts, invalid recipes, and advisory risk labels | Audit local capability memory before using or promoting it |
|
|
132
|
+
| Draft promotion | Captured ad hoc spawn patterns can become explicit recipes after operator approval | Turn successful improvisation into durable local tools |
|
|
133
|
+
| Review/swarm recipes | Maintained packaged pipelines with preflight, quorum knobs, model/thinking inheritance, prompt-file transport, and diagnostics | Delegate reviews without rebuilding fanout commands |
|
|
134
|
+
| Actor inspector | Compact TUI/debug views for active actor coordination, unread branch inboxes, room messages, and attention markers | Watch only the actor traffic that matters right now |
|
|
135
|
+
| Packaged recipe QA | Installed-package-safe checks for helper paths, mailbox contracts, platform scope, artifacts, and recipe structure | Keep shipped actor components executable and diagnosable |
|
|
136
|
+
|
|
137
|
+
## Golden path: from local workflow to actor memory
|
|
104
138
|
|
|
105
139
|
Create a reusable async actor recipe in the user recipe root:
|
|
106
140
|
|
|
@@ -122,15 +156,15 @@ cat > ~/.pi/agent/recipes/docs_review.json <<'JSON'
|
|
|
122
156
|
JSON
|
|
123
157
|
```
|
|
124
158
|
|
|
125
|
-
Because it lives under `~/.pi/agent/recipes/`, the
|
|
159
|
+
Because it lives under `~/.pi/agent/recipes/`, the filename becomes the tool id. `{current_model}` and `{current_thinking}` inherit the active Pi session policy; pass explicit values only when a run should intentionally diverge.
|
|
126
160
|
|
|
127
|
-
|
|
161
|
+
Run it:
|
|
128
162
|
|
|
129
163
|
```text
|
|
130
164
|
docs_review scope="README.md" run_id=docs_review
|
|
131
165
|
```
|
|
132
166
|
|
|
133
|
-
Inspect
|
|
167
|
+
Inspect it:
|
|
134
168
|
|
|
135
169
|
```text
|
|
136
170
|
inspect target=tool:pi-actors view=triage
|
|
@@ -140,79 +174,33 @@ inspect target=run:docs_review view=messages
|
|
|
140
174
|
inspect target=run:docs_review view=mailbox
|
|
141
175
|
```
|
|
142
176
|
|
|
143
|
-
Steer it
|
|
177
|
+
Steer it:
|
|
144
178
|
|
|
145
179
|
```text
|
|
146
180
|
message to=run:docs_review type=control.continue body=continue
|
|
147
181
|
message to=run:docs_review type=control.kill body=stop
|
|
148
182
|
```
|
|
149
183
|
|
|
150
|
-
##
|
|
151
|
-
|
|
152
|
-
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.
|
|
153
|
-
|
|
154
|
-
Actors can join, post, leave, and discover peers:
|
|
155
|
-
|
|
156
|
-
```text
|
|
157
|
-
message \
|
|
158
|
-
to=room:review \
|
|
159
|
-
from=branch:review/security \
|
|
160
|
-
type=actor.join \
|
|
161
|
-
summary="Security reviewer joined" \
|
|
162
|
-
body='{"role":"reviewer","caps":["security-review"],"claim":"Review auth boundary risks"}'
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Inspect group messages and roster intentionally:
|
|
166
|
-
|
|
167
|
-
```text
|
|
168
|
-
inspect target=room:review view=status
|
|
169
|
-
inspect target=room:review view=previews
|
|
170
|
-
inspect target=room:review view=roster
|
|
171
|
-
inspect target=room:review view=contacts
|
|
172
|
-
inspect target=room:review view=messages
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
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.
|
|
176
|
-
|
|
177
|
-
## Actor Inspector
|
|
184
|
+
## Recipe memory model
|
|
178
185
|
|
|
179
|
-
The
|
|
180
|
-
|
|
181
|
-
```text
|
|
182
|
-
/actors-inspector-toggle
|
|
183
|
-
/actors-inspector-toggle 20
|
|
184
|
-
/actors-inspector-filter room
|
|
185
|
-
/actors-inspector-filter direct
|
|
186
|
-
/actors-inspector-filter unread
|
|
187
|
-
/actors-inspector-filter branch front
|
|
188
|
-
/actors-inspector-filter mention checkpoint
|
|
189
|
-
/actors-inspect 3
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
The table is compact and optimistic by default: bounded route/type/summary/body previews, capped noisy room rows, branch-local inbox previews, stable event ids in selected-message details, and an inline roster summary in the form `name/role` that wraps only when needed. Active roster members use the target color; members that sent `actor.leave` remain visible as inactive/muted participants from the current run. Use `unread` to focus queued branch inbox work and `branch <name>` / `current-branch <name>` to focus one branch's room/direct/inbox traffic. Rows with `metadata.requires_response=true` show a `!` attention marker. `/actors-inspect <number>` opens the selected row as a full-message view and marks it read for the current session filter; toggle again to return to the table or close it. Actor display names come from room `actor.join` roster metadata or branch addresses, keeping debugger output plain and name-driven.
|
|
193
|
-
|
|
194
|
-
## Registry Model
|
|
195
|
-
|
|
196
|
-
The persistent tool surface is file-discovered:
|
|
186
|
+
The persistent tool surface is location-derived:
|
|
197
187
|
|
|
198
188
|
```text
|
|
199
189
|
~/.pi/agent/recipes/*.json
|
|
200
190
|
~/.pi/agent/recipes/*.md
|
|
201
191
|
```
|
|
202
192
|
|
|
203
|
-
That directory is operator-managed executable memory.
|
|
204
|
-
|
|
205
193
|
Rules:
|
|
206
194
|
|
|
207
|
-
- User recipes in `~/.pi/agent/recipes/` are tools by location
|
|
208
|
-
- Recipe filenames define tool ids
|
|
209
|
-
- User recipes override same-name lower-priority recipes
|
|
210
|
-
- Same-id JSON recipes shadow Markdown recipes in the same priority layer
|
|
211
|
-
- Packaged recipes are standard-library components, not automatically installed operator policy
|
|
212
|
-
- Draft recipes in `~/.pi/agent/recipes/drafts/` are replayable memory, not active tools
|
|
195
|
+
- User recipes in `~/.pi/agent/recipes/` are tools by location.
|
|
196
|
+
- Recipe filenames define tool ids.
|
|
197
|
+
- User recipes override same-name lower-priority recipes.
|
|
198
|
+
- Same-id JSON recipes shadow Markdown recipes in the same priority layer.
|
|
199
|
+
- Packaged recipes are standard-library components, not automatically installed operator policy.
|
|
200
|
+
- Draft recipes in `~/.pi/agent/recipes/drafts/` are replayable memory, not active tools.
|
|
213
201
|
- `register_tool` creates, updates, lists, deletes, or explicitly promotes draft recipe files through the normal agent interface.
|
|
214
202
|
|
|
215
|
-
|
|
203
|
+
Register a foreground tool:
|
|
216
204
|
|
|
217
205
|
```text
|
|
218
206
|
register_tool name=transcribe_audio \
|
|
@@ -220,7 +208,7 @@ register_tool name=transcribe_audio \
|
|
|
220
208
|
template="~/bin/transcribe {file:path} {lang=ru} {model:string}"
|
|
221
209
|
```
|
|
222
210
|
|
|
223
|
-
|
|
211
|
+
Register a recipe-backed tool:
|
|
224
212
|
|
|
225
213
|
```text
|
|
226
214
|
register_tool name=docs_review \
|
|
@@ -229,68 +217,69 @@ register_tool name=docs_review \
|
|
|
229
217
|
args="scope:path,model:string"
|
|
230
218
|
```
|
|
231
219
|
|
|
232
|
-
Promote a
|
|
220
|
+
Promote a captured draft only after explicit operator approval:
|
|
233
221
|
|
|
234
222
|
```text
|
|
235
223
|
register_tool name=docs_review draft=~/.pi/agent/recipes/drafts/spawned-run.json
|
|
236
224
|
```
|
|
237
225
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
Inspect the discovered registry:
|
|
226
|
+
Inspect the registry:
|
|
241
227
|
|
|
242
228
|
```text
|
|
243
229
|
inspect target=recipes view=status
|
|
244
230
|
inspect target=recipes view=summary verbose=true
|
|
231
|
+
inspect target=tool:pi-actors view=triage
|
|
245
232
|
```
|
|
246
233
|
|
|
247
|
-
## Command
|
|
234
|
+
## Command templates
|
|
248
235
|
|
|
249
|
-
A command template is the
|
|
236
|
+
A command template is the launch substrate. It can be a string, a sequence, or a composed graph.
|
|
250
237
|
|
|
251
238
|
Templates support:
|
|
252
239
|
|
|
253
|
-
- Named placeholders
|
|
254
|
-
- Compact types
|
|
255
|
-
- Defaults
|
|
240
|
+
- Named placeholders such as `{file}`, `{model}`, `{prompt}`;
|
|
241
|
+
- Compact types such as `string`, `path`, `int`, `number`, `bool`, `enum(a,b)`;
|
|
242
|
+
- Defaults such as `{lang=ru}` and `{dry_run:bool=true}`;
|
|
256
243
|
- Fallback and small ternary forms;
|
|
257
244
|
- Sequences with stdin flow;
|
|
258
245
|
- Parallel nodes;
|
|
259
|
-
- Retries, recovery, failure policy, delays, and
|
|
246
|
+
- Retries, recovery, failure policy, delays, guards, and timeouts;
|
|
260
247
|
- Async run values such as `{run_id}`, `{state_dir}`, `{actor_address}`, `{default_room}`, and `{communication_file}`.
|
|
261
248
|
|
|
262
|
-
The template owns execution shape. The recipe owns saved metadata, defaults, imports, mailbox,
|
|
249
|
+
The template owns execution shape. The recipe owns saved metadata, defaults, imports, mailbox, artifacts, and async launch policy. The run actor owns detached lifecycle, state, messages, cancellation, and inspection.
|
|
263
250
|
|
|
264
|
-
##
|
|
251
|
+
## Packaged recipe library
|
|
265
252
|
|
|
266
253
|
Packaged recipes live under `recipes/` and helper scripts live under `scripts/`.
|
|
267
254
|
|
|
268
255
|
The library includes:
|
|
269
256
|
|
|
270
|
-
-
|
|
257
|
+
- Subagent launchers;
|
|
271
258
|
- Review, critic, planner, verifier, merger, judge, normalizer, and artifact atoms;
|
|
272
259
|
- Quorum and lens-style pipelines;
|
|
273
260
|
- Repo-health, release-summary, research-synthesis, development-tasking, docs-maintenance, and room-swarm pipelines;
|
|
274
261
|
- Coordinator-locker and actor-message utilities;
|
|
275
262
|
- Local music-player actor recipe.
|
|
276
263
|
|
|
277
|
-
Packaged recipes are building blocks. Copy them into `~/.pi/agent/recipes/`
|
|
278
|
-
|
|
279
|
-
## When To Use What
|
|
280
|
-
|
|
281
|
-
Use a foreground registered tool when the work is short, bounded, and does not need lifecycle.
|
|
282
|
-
|
|
283
|
-
Use an async recipe or `spawn` when the work is long-running, service-like, parallel, agentic, artifact-producing, or needs later control. When a directly spawned inline/ad hoc actor or a recipe outside the user recipe root completes successfully, pi-actors sends the launching agent a follow-up note to offer saving that pattern as a durable recipe/tool under `~/.pi/agent/recipes`; the agent should ask first and never auto-save.
|
|
264
|
+
Packaged recipes are building blocks. Use `spawn file=<recipe>` for maintained packaged pipelines before rebuilding equivalent shell commands. Copy or wrap them into `~/.pi/agent/recipes/` only when they should become durable operator-facing tools.
|
|
284
265
|
|
|
285
|
-
|
|
266
|
+
## Choosing the right surface
|
|
286
267
|
|
|
287
|
-
|
|
268
|
+
| If the work is... | Prefer... |
|
|
269
|
+
| --- | --- |
|
|
270
|
+
| Short, bounded, and foreground | Ordinary tools or registered foreground tools |
|
|
271
|
+
| Long-running, service-like, parallel, agentic, artifact-producing, or controllable | `spawn` / async recipe |
|
|
272
|
+
| Already running and needs new input | `message` |
|
|
273
|
+
| Unclear, failing, or ready for a decision | `inspect` |
|
|
274
|
+
| A multi-actor collaboration under one run | `room:<run>` plus branch addresses |
|
|
275
|
+
| A useful output that should survive context compression | Artifacts |
|
|
276
|
+
| A repeated local workflow | Recipe/tool memory |
|
|
288
277
|
|
|
289
|
-
|
|
278
|
+
When a directly spawned inline/ad hoc actor or a recipe outside the user recipe root completes successfully, `pi-actors` may send the launching agent a follow-up suggesting promotion. The agent should ask first and never auto-save.
|
|
290
279
|
|
|
291
|
-
## Platform
|
|
280
|
+
## Platform support
|
|
292
281
|
|
|
293
|
-
Core actor state, inspection, foreground tools, and basic async runs are portable Node.js behavior. Run-local messaging and stop/kill use
|
|
282
|
+
Core actor state, inspection, foreground tools, and basic async runs are portable Node.js behavior. Run-local messaging and stop/kill use platform adapters under the same `message` API.
|
|
294
283
|
|
|
295
284
|
| Surface | Linux/macOS/WSL | Native Windows |
|
|
296
285
|
| --- | --- | --- |
|
|
@@ -303,13 +292,13 @@ Core actor state, inspection, foreground tools, and basic async runs are portabl
|
|
|
303
292
|
|
|
304
293
|
Packaged recipes should prefer mailbox/wake behavior for portable control. Recipes that require FIFO, Unix shell tools, or platform-specific media backends should make that limitation visible in docs or diagnostics before launch.
|
|
305
294
|
|
|
306
|
-
## Safety
|
|
295
|
+
## Safety boundary
|
|
307
296
|
|
|
308
297
|
`pi-actors` is local-first, not sandbox-first.
|
|
309
298
|
|
|
310
299
|
Commands execute directly without shell evaluation where possible, but trusted executables still run with the same system permissions as Pi. Only register commands, scripts, recipes, and paths you trust.
|
|
311
300
|
|
|
312
|
-
High-risk templates such as shells, interpreter eval modes, and broad filesystem mutation may surface warnings, but the runtime is not a security boundary.
|
|
301
|
+
High-risk templates such as shells, interpreter eval modes, network access, external side effects, and broad filesystem mutation may surface warnings, but the runtime is not a security boundary.
|
|
313
302
|
|
|
314
303
|
Prefer:
|
|
315
304
|
|
|
@@ -317,17 +306,17 @@ Prefer:
|
|
|
317
306
|
- Explicit paths;
|
|
318
307
|
- Typed args;
|
|
319
308
|
- Bounded timeouts for bounded work;
|
|
320
|
-
- Explicit tool allowlists for
|
|
309
|
+
- Explicit tool allowlists for subagents;
|
|
321
310
|
- Deterministic utility recipes for filesystem writes;
|
|
322
311
|
- Human approval for destructive or external side effects.
|
|
323
312
|
|
|
324
|
-
## Non-
|
|
313
|
+
## Non-goals
|
|
325
314
|
|
|
326
|
-
`pi-actors` is
|
|
315
|
+
`pi-actors` is not:
|
|
327
316
|
|
|
328
317
|
- A generic workflow DSL;
|
|
329
318
|
- A remote agent interoperability protocol;
|
|
330
|
-
- A heavyweight broker
|
|
319
|
+
- A heavyweight broker;
|
|
331
320
|
- A sandbox;
|
|
332
321
|
- A facade that hides logs, artifacts, ownership, or local side effects;
|
|
333
322
|
- A polling-first async runner.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: actors
|
|
3
3
|
description: Required practical guide for non-trivial pi-actors use. Read before using or changing spawn, message, inspect, actor runs, tools, recipes, command templates, async lifecycle, mailboxes, artifacts, and local orchestration mechanics.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.39.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Actors (pi-actors)
|
package/package.json
CHANGED
package/skills/actors/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: actors
|
|
3
3
|
description: Required practical guide for non-trivial pi-actors use. Read before using or changing spawn, message, inspect, actor runs, tools, recipes, command templates, async lifecycle, mailboxes, artifacts, and local orchestration mechanics.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.39.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Actors (pi-actors)
|
package/skills/swarm/SKILL.md
CHANGED