@llblab/pi-actors 0.58.1 → 0.58.3
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 -3
- package/BACKLOG.md +2 -2
- package/CHANGELOG.md +12 -0
- package/README.md +38 -36
- package/dist/lib/draft-sleep.js +3 -3
- package/dist/lib/extension-runtime.js +7 -2
- package/dist/lib/prompts.d.ts +3 -3
- package/dist/lib/prompts.js +10 -9
- package/dist/lib/recipes-references.js +7 -7
- package/dist/lib/registry.js +27 -24
- package/dist/lib/review-control.js +1 -1
- package/dist/lib/run-delivery.d.ts +1 -1
- package/dist/lib/run-delivery.js +41 -17
- package/dist/lib/run-evidence-policy.js +2 -2
- package/dist/lib/runtime.d.ts +3 -0
- package/dist/lib/runtime.js +24 -10
- package/dist/lib/tool-review-scheduler.js +7 -7
- package/dist/lib/tools-access.js +1 -1
- package/dist/lib/tools-inspect.js +10 -10
- package/dist/lib/tools-message.d.ts +1 -1
- package/dist/lib/tools-message.js +10 -10
- package/dist/lib/tools-register.d.ts +3 -3
- package/dist/lib/tools-register.js +4 -4
- package/dist/lib/tools-response.d.ts +1 -1
- package/dist/lib/tools-response.js +42 -20
- package/dist/lib/tools-spawn.js +1 -1
- package/dist/lib/tools.d.ts +7 -0
- package/dist/lib/tools.js +25 -0
- package/dist/skills/actors/SKILL.md +29 -21
- package/dist/skills/actors/references/diagnostics.md +11 -11
- package/dist/skills/actors/references/persistent-tools.md +19 -15
- package/dist/skills/actors/references/recipes.md +1 -1
- package/dist/skills/actors/references/runs.md +10 -10
- package/dist/skills/music-player/SKILL.md +4 -4
- package/dist/skills/music-player/scripts/playback.mjs +1 -1
- package/dist/skills/recipe-memory/SKILL.md +7 -7
- package/docs/README.md +2 -2
- package/docs/actor-inspector.md +1 -1
- package/docs/agent-experience.md +8 -8
- package/docs/async-runs.md +13 -13
- package/docs/capability-memory.md +6 -6
- package/docs/coordinator-delivery.md +2 -2
- package/docs/inspection.md +21 -21
- package/docs/output-projection-map.md +1 -1
- package/docs/run-supervision.md +21 -21
- package/docs/tool-registry.md +27 -19
- package/docs/windows-process-observation.md +1 -1
- package/lib/draft-sleep.ts +3 -3
- package/lib/extension-runtime.ts +7 -5
- package/lib/prompts.ts +10 -9
- package/lib/recipes-references.ts +7 -7
- package/lib/registry.ts +26 -24
- package/lib/review-control.ts +1 -1
- package/lib/run-delivery.ts +34 -17
- package/lib/run-evidence-policy.ts +2 -2
- package/lib/runtime.ts +26 -11
- package/lib/tool-review-scheduler.ts +7 -7
- package/lib/tools-access.ts +1 -1
- package/lib/tools-inspect.ts +10 -10
- package/lib/tools-message.ts +10 -10
- package/lib/tools-register.ts +4 -4
- package/lib/tools-response.ts +39 -20
- package/lib/tools-spawn.ts +1 -1
- package/lib/tools.ts +28 -0
- package/package.json +1 -1
- package/skills/actors/SKILL.md +29 -21
- package/skills/actors/references/diagnostics.md +11 -11
- package/skills/actors/references/persistent-tools.md +19 -15
- package/skills/actors/references/recipes.md +1 -1
- package/skills/actors/references/runs.md +10 -10
- package/skills/music-player/SKILL.md +4 -4
- package/skills/music-player/scripts/playback.mjs +1 -1
- package/skills/recipe-memory/SKILL.md +7 -7
package/lib/tools-response.ts
CHANGED
|
@@ -154,8 +154,8 @@ export function formatMarkdownField(key: string, value: string, depth = 0): stri
|
|
|
154
154
|
: `${indent}- ${key}: ${value}`;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
export function formatInspectNextAction(target: string, view: string, verbose?: boolean): string {
|
|
158
|
-
return ["- next:", formatMarkdownField("tool",
|
|
157
|
+
export function formatInspectNextAction(target: string, view: string, verbose?: boolean, tool = "inspect"): string {
|
|
158
|
+
return ["- next:", formatMarkdownField("tool", tool, 1), formatMarkdownField("target", target, 1),
|
|
159
159
|
formatMarkdownField("view", view, 1), ...(verbose === undefined ? [] : [formatMarkdownField("verbose", String(verbose), 1)])].join("\n");
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -289,24 +289,44 @@ function launchModelPolicy(value: unknown): Record<string, unknown> {
|
|
|
289
289
|
return fields;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
const RUN_FILE_INVESTIGATION_COMMAND = "
|
|
292
|
+
const RUN_FILE_INVESTIGATION_COMMAND = "actors_inspect target=runtime view=runs verbose=true";
|
|
293
293
|
|
|
294
294
|
/** Frozen older completion-format text: new launch layout must not change this shared packet helper. */
|
|
295
295
|
export function formatRunFileNavigationHandoff(): string {
|
|
296
|
-
return
|
|
296
|
+
return "Files (optional; current session):\n`inspect target=runtime view=runs verbose=true`";
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
export function runNextActions(run: unknown): string[] {
|
|
300
300
|
const id = String(run ?? "").trim();
|
|
301
301
|
if (!id) return [];
|
|
302
302
|
return [
|
|
303
|
-
`
|
|
304
|
-
`
|
|
305
|
-
`
|
|
303
|
+
`actors_inspect target=run:${id} view=recipe`,
|
|
304
|
+
`actors_inspect target=run:${id} view=trace`,
|
|
305
|
+
`actors_inspect target=run:${id} view=control`,
|
|
306
306
|
RUN_FILE_INVESTIGATION_COMMAND,
|
|
307
307
|
];
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
+
/** Read-free projection of already selected location facts; never a complete inventory or body certificate. */
|
|
311
|
+
function compactRunFileNavigation(value: unknown, terminal: boolean): unknown {
|
|
312
|
+
const navigation = asRecord(value);
|
|
313
|
+
if (navigation.state !== "available") return value;
|
|
314
|
+
if (!Array.isArray(navigation.files)) return value;
|
|
315
|
+
const paths: Record<string, unknown> = {};
|
|
316
|
+
const unavailable: string[] = [];
|
|
317
|
+
const selected = ["context_index", "result", "execution", "metadata"];
|
|
318
|
+
for (const file of navigation.files) {
|
|
319
|
+
const item = asRecord(file);
|
|
320
|
+
if (item.state === "unavailable") unavailable.push(String(item.role));
|
|
321
|
+
if (item.state === "present" && selected.includes(String(item.role))) paths[String(item.role)] = item.path;
|
|
322
|
+
}
|
|
323
|
+
const facts = [
|
|
324
|
+
...(unavailable.length ? [`Unavailable locations: ${unavailable.join(", ")}`] : []),
|
|
325
|
+
...(terminal && navigation.files.some(file => asRecord(file).role === "result" && asRecord(file).state === "missing") ? ["Recorded result location missing"] : []),
|
|
326
|
+
];
|
|
327
|
+
return { directory: navigation.directory, ...paths, ...(facts.length ? { status: facts.join("; ") } : {}) };
|
|
328
|
+
}
|
|
329
|
+
|
|
310
330
|
export function compactAsyncRunStatus(value: unknown): string {
|
|
311
331
|
const status = asRecord(value), progress = asRecord(status.progress), result = asRecord(status.result);
|
|
312
332
|
const run = String(status.run ?? "<unknown>"), displayRun = run.startsWith("run:") ? run.slice(4) : run;
|
|
@@ -329,7 +349,7 @@ export function compactAsyncRunStatus(value: unknown): string {
|
|
|
329
349
|
}
|
|
330
350
|
if (result.killed === true) fields.killed = true;
|
|
331
351
|
if (status.draft_recipe) fields.draft_recipe = String(status.draft_recipe);
|
|
332
|
-
const hint = { file_investigation: "optional; current session", next: { tool: "
|
|
352
|
+
const hint = { file_investigation: "optional; current session", next: { tool: "actors_inspect", target: "runtime", view: "runs", verbose: true } };
|
|
333
353
|
const hasNavigation = Object.hasOwn(status, "file_navigation");
|
|
334
354
|
let navigation: unknown;
|
|
335
355
|
if (hasNavigation) {
|
|
@@ -358,8 +378,7 @@ export function compactAsyncRunStatus(value: unknown): string {
|
|
|
358
378
|
const navigationRendering = hasNavigation ? renderYamlMetadata({ run_files: navigation }, budget) : undefined;
|
|
359
379
|
const invalidNavigation = navigationRendering?.state === "unavailable" && navigationRendering.reason === "metadata_invalid";
|
|
360
380
|
const locations = !hasNavigation ? {} : { run_files: invalidNavigation
|
|
361
|
-
? { state: "unavailable", reason: "metadata_invalid" } : navigation,
|
|
362
|
-
run_files_observation: "Observed locations; mutable." };
|
|
381
|
+
? { state: "unavailable", reason: "metadata_invalid" } : compactRunFileNavigation(navigation, ["done", "failed", "killed", "exited"].includes(String(core.state))) };
|
|
363
382
|
const full = render({ ...fields, ...locations, ...(direct && !invalidNavigation ? {} : hint) });
|
|
364
383
|
if (full !== undefined) return full;
|
|
365
384
|
const omitted = !hasNavigation ? {} : { run_files: { state: "omitted", reason: "response_too_large", shown: 0, omitted: 1, total: 1 } };
|
|
@@ -509,25 +528,25 @@ export function recipeRegistryNextActions(
|
|
|
509
528
|
: 0;
|
|
510
529
|
const topAction = asRecord(summary.top_action);
|
|
511
530
|
if (view !== "doctor" && (invalid > 0 || diagnostics > 0)) {
|
|
512
|
-
actions.push("
|
|
531
|
+
actions.push("actors_inspect target=recipes view=doctor");
|
|
513
532
|
}
|
|
514
533
|
if (view === "doctor" && typeof topAction.action === "string") {
|
|
515
534
|
actions.push(String(topAction.action));
|
|
516
535
|
}
|
|
517
536
|
if (summary.skill_recipe_catalog_partial === true) {
|
|
518
|
-
actions.push("
|
|
537
|
+
actions.push("actors_inspect target=recipes view=imports verbose=true");
|
|
519
538
|
}
|
|
520
539
|
if (
|
|
521
540
|
(Array.isArray(summary.retained) && summary.retained.length > 0) ||
|
|
522
541
|
(Array.isArray(summary.retained_diagnostics) && summary.retained_diagnostics.length > 0)
|
|
523
542
|
) {
|
|
524
|
-
actions.push("
|
|
543
|
+
actions.push("actors_inspect target=recipes view=summary verbose=true");
|
|
525
544
|
}
|
|
526
545
|
if (drafts.length > 0) {
|
|
527
|
-
actions.push("
|
|
546
|
+
actions.push("actors_inspect target=recipes view=summary verbose=true");
|
|
528
547
|
const firstPath =
|
|
529
548
|
typeof drafts[0]?.path === "string" ? drafts[0].path : undefined;
|
|
530
|
-
if (firstPath) actions.push(`
|
|
549
|
+
if (firstPath) actions.push(`actors_run_spawn file=${firstPath}`);
|
|
531
550
|
}
|
|
532
551
|
return [...new Set(actions)].slice(0, 4);
|
|
533
552
|
}
|
|
@@ -539,9 +558,9 @@ export function compactYamlDocument(value: Record<string, unknown>): string {
|
|
|
539
558
|
}
|
|
540
559
|
|
|
541
560
|
function recipeInspectionHint(action: string): { view: "doctor" | "imports" | "summary"; verbose?: true } | undefined {
|
|
542
|
-
if (action === "
|
|
543
|
-
if (action === "
|
|
544
|
-
if (action === "
|
|
561
|
+
if (action === "actors_inspect target=recipes view=doctor") return { view: "doctor" };
|
|
562
|
+
if (action === "actors_inspect target=recipes view=imports verbose=true") return { view: "imports", verbose: true };
|
|
563
|
+
if (action === "actors_inspect target=recipes view=summary verbose=true") return { view: "summary", verbose: true };
|
|
545
564
|
return undefined;
|
|
546
565
|
}
|
|
547
566
|
|
|
@@ -549,7 +568,7 @@ function recipeInspectionHint(action: string): { view: "doctor" | "imports" | "s
|
|
|
549
568
|
export function nextActionMetadata(action: string, byteBudget: number): YamlPart {
|
|
550
569
|
const hint = recipeInspectionHint(action);
|
|
551
570
|
if (hint) {
|
|
552
|
-
const typed = { next: { tool: "
|
|
571
|
+
const typed = { next: { tool: "actors_inspect", target: "recipes", ...hint } };
|
|
553
572
|
return { full: typed, selected: typed };
|
|
554
573
|
}
|
|
555
574
|
const instruction = selectYamlField("instruction", action, byteBudget);
|
|
@@ -559,7 +578,7 @@ export function nextActionMetadata(action: string, byteBudget: number): YamlPart
|
|
|
559
578
|
/** Only these existing read-only inspection hints become action nodes; other advice stays content. */
|
|
560
579
|
export function formatInspectionHint(action: string): string {
|
|
561
580
|
const hint = recipeInspectionHint(action);
|
|
562
|
-
return hint ? formatInspectNextAction("recipes", hint.view, hint.verbose) : formatMarkdownField("instruction", action);
|
|
581
|
+
return hint ? formatInspectNextAction("recipes", hint.view, hint.verbose, "actors_inspect") : formatMarkdownField("instruction", action);
|
|
563
582
|
}
|
|
564
583
|
|
|
565
584
|
export function compactRecipeRegistry(
|
package/lib/tools-spawn.ts
CHANGED
|
@@ -124,7 +124,7 @@ export function createSpawnToolDefinition<
|
|
|
124
124
|
TContext extends SpawnToolContext,
|
|
125
125
|
>(): any {
|
|
126
126
|
return {
|
|
127
|
-
name: "
|
|
127
|
+
name: "actors_run_spawn",
|
|
128
128
|
label: "Spawn",
|
|
129
129
|
description:
|
|
130
130
|
"Create one controllable Run from a Recipe file or inline command template.",
|
package/lib/tools.ts
CHANGED
|
@@ -54,12 +54,40 @@ export const RESERVED_TOOL_NAMES = new Set([
|
|
|
54
54
|
"find",
|
|
55
55
|
"grep",
|
|
56
56
|
"ls",
|
|
57
|
+
"actors_tool_register",
|
|
58
|
+
"actors_run_spawn",
|
|
59
|
+
"actors_control_apply",
|
|
60
|
+
"actors_inspect",
|
|
57
61
|
"register_tool",
|
|
58
62
|
"message",
|
|
59
63
|
"spawn",
|
|
60
64
|
"inspect",
|
|
61
65
|
]);
|
|
62
66
|
|
|
67
|
+
// Compatibility dispatch is registered but omitted from model declarations and normal
|
|
68
|
+
// callable listings. Active legacy names still execute saved native tool calls.
|
|
69
|
+
export const LEGACY_TOOL_NAMES = {
|
|
70
|
+
register_tool: "actors_tool_register",
|
|
71
|
+
spawn: "actors_run_spawn",
|
|
72
|
+
message: "actors_control_apply",
|
|
73
|
+
inspect: "actors_inspect",
|
|
74
|
+
} as const;
|
|
75
|
+
|
|
76
|
+
export function createLegacyActorToolDefinitions(
|
|
77
|
+
definitions: ActorToolDefinition[],
|
|
78
|
+
): ActorToolDefinition[] {
|
|
79
|
+
return Object.entries(LEGACY_TOOL_NAMES).map(([name, canonical]) => {
|
|
80
|
+
const definition = definitions.find((tool) => tool.name === canonical);
|
|
81
|
+
if (!definition) throw new Error(`Missing canonical actor tool: ${canonical}`);
|
|
82
|
+
return {
|
|
83
|
+
...definition, name, exposure: "deferred",
|
|
84
|
+
description: `Compatibility dispatch for ${canonical}; use the canonical tool for new calls.`,
|
|
85
|
+
promptSnippet: undefined, promptGuidelines: undefined,
|
|
86
|
+
prepareLoadout: () => ({ hiddenDeclarations: Object.keys(LEGACY_TOOL_NAMES) }),
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
63
91
|
export function createCoreActorToolDefinitions<
|
|
64
92
|
TContext extends RuntimeToolContext,
|
|
65
93
|
>(deps: CoreActorToolDefinitionDeps<TContext>): ActorToolDefinition[] {
|
package/package.json
CHANGED
package/skills/actors/SKILL.md
CHANGED
|
@@ -5,31 +5,39 @@ description: Use for any non-trivial pi-actors operation, diagnosis, or developm
|
|
|
5
5
|
|
|
6
6
|
# Actors
|
|
7
7
|
|
|
8
|
+
## Public tool names and migration
|
|
9
|
+
|
|
10
|
+
Use only `actors_tool_register`, `actors_run_spawn`, `actors_control_apply`, and `actors_inspect` for new calls. The old `register_tool`, `spawn`, `message`, and `inspect` names are explicit compatibility dispatch to the same schemas and executors, not a second advertised API. Saved calls and logical Recipe identities stay unchanged; do not migrate the live registry or reload the host implicitly. Compatibility entries are deferred, active dispatch names with model declarations hidden by the host loadout hook; explicit inspection/search or the host's active/registered inventory can still reveal them. They remain subject to the same host permissions and session fences.
|
|
11
|
+
|
|
12
|
+
Name new configurable Recipe tools under their functional owner's namespace, such as `audio_transcribe`, `music_player`, or `repo_check`, not generic host verbs. This is a caller naming contract, not a new Recipe identity field or an automatic prefix. Preserve existing persisted names and calls. Registration and discovery reject normalized collisions with foreign host tools, even inactive ones; `update=true` cannot authorize replacing another owner's tool. A rejected exposure does not make a foreign tool callable as a Recipe. Within the same runtime, observed name/source-path provenance survives Recipe deactivation so an owned retained host declaration does not block recreation or restoration. A different-source or normalized foreign declaration still blocks exposure; identical host name/source metadata cannot distinguish a replacement. This is not complete host unregister or activation proof: require fresh `callable_now` evidence.
|
|
13
|
+
|
|
14
|
+
`actors_control_apply` applies Run/runtime actions, never chat or peer messages. The rename changes no Control envelope, ownership, generation, delivery/handling distinction or Run semantics.
|
|
15
|
+
|
|
8
16
|
## Choose the operation
|
|
9
17
|
|
|
10
18
|
Start from the intended outcome:
|
|
11
19
|
|
|
12
20
|
```text
|
|
13
21
|
Run a maintained capability once
|
|
14
|
-
→ use
|
|
22
|
+
→ use actors_run_spawn recipe=<skill>/<recipe>
|
|
15
23
|
|
|
16
24
|
Make a maintained capability a persistent agent-callable tool
|
|
17
|
-
→ use
|
|
25
|
+
→ use actors_tool_register from=<skill>/<recipe>
|
|
18
26
|
|
|
19
27
|
Keep the same capability but narrow caller defaults
|
|
20
|
-
→ use
|
|
28
|
+
→ use actors_tool_register from=<skill>/<recipe> defaults={...}
|
|
21
29
|
|
|
22
30
|
Retain a new named capability without exposing a tool
|
|
23
|
-
→ use
|
|
31
|
+
→ use actors_tool_register expose=false with from or template
|
|
24
32
|
|
|
25
33
|
Register a trusted command directly
|
|
26
|
-
→ use
|
|
34
|
+
→ use actors_tool_register template="..."
|
|
27
35
|
|
|
28
36
|
Build a reusable multi-node execution graph
|
|
29
37
|
→ author a Recipe with named imports
|
|
30
38
|
|
|
31
39
|
Run a long-lived controlled process
|
|
32
|
-
→
|
|
40
|
+
→ use actors_run_spawn for its async Recipe, then actors_control_apply and actors_inspect
|
|
33
41
|
|
|
34
42
|
Coordinate several independent actors or subagents
|
|
35
43
|
→ also read the swarm Skill
|
|
@@ -55,13 +63,13 @@ direct delegation ≠ named import composition
|
|
|
55
63
|
Run Control ≠ actor chat
|
|
56
64
|
```
|
|
57
65
|
|
|
58
|
-
A Skill Recipe is a maintained component addressed by `<skill>/<recipe>`. `
|
|
66
|
+
A Skill Recipe is a maintained component addressed by `<skill>/<recipe>`. `actors_run_spawn` creates a Run from a Recipe. `actors_tool_register from=<skill>/<recipe>` persists compact logical delegation and activates from the resolved effective contract without copying, symlinking, or ambient re-resolution. A tool is callable in the current session only when activation evidence says `callable_now: true`.
|
|
59
67
|
|
|
60
|
-
Sync/async is an execution contract, not a usefulness or tool-exposure rule. A sync tool awaits its result; an async tool returns a Run launch receipt, with the eventual result delivered separately. A subagent-backed tool is a capability launcher, not a persisted live subagent. Register a stable, meaningfully parameterized capability when its name and contract save repeated planning; prefer one-off `
|
|
68
|
+
Sync/async is an execution contract, not a usefulness or tool-exposure rule. A sync tool awaits its result; an async tool returns a Run launch receipt, with the eventual result delivered separately. A subagent-backed tool is a capability launcher, not a persisted live subagent. Register a stable, meaningfully parameterized capability when its name and contract save repeated planning; prefer one-off `actors_run_spawn` over a redundant generic launcher or a new tool for every mission.
|
|
61
69
|
|
|
62
|
-
Use `
|
|
70
|
+
Use `actors_tool_register expose=false` with a new name and one `template` or `from` source to retain a capability without requesting tool activation. Its `kind: retained_recipe`, `activation: not_requested` receipt is deliberate retention, not failed registration; it omits global callability flags because a same-named tool may already exist. Reuse the exact returned Recipe path through `actors_run_spawn`, or deliberately expose it later with ordinary `actors_tool_register from=<exact path>`. Retained update, delete and draft promotion are unsupported; do not hand-edit the live registry to bypass those guards.
|
|
63
71
|
|
|
64
|
-
Automatic retained lifecycle is not implemented. Current user-root tool discovery and automatic review actions are unchanged. `
|
|
72
|
+
Automatic retained lifecycle is not implemented. Current user-root tool discovery and automatic review actions are unchanged. `actors_inspect target=recipes view=summary` distinguishes retained definitions under `recipes/library` from root tool candidates; verbose detail gives exact paths, resolved mode and invalid/disabled diagnostics. Storage is not proof of review, callability or a running Actor. `expose` is registration input, not a Recipe field or automatic-review action; do not invent retain/defer review commands. See [persistent tools](./references/persistent-tools.md) for current selection and activation proof.
|
|
65
73
|
|
|
66
74
|
`actors` owns generic Recipe/tool/Run mechanics. The owning capability Skill owns capability-specific selection and constraints. `swarm` owns multi-actor decomposition and integration methodology.
|
|
67
75
|
|
|
@@ -87,15 +95,15 @@ Four locally authored Control guard errors use caller target/action/result recor
|
|
|
87
95
|
|
|
88
96
|
Local spawn guards identify unsupported state_dir or invalid as with field/result and the selected caller value, not an admitted Run. Whole values fit16KiB or show field omission; malformed text is unavailable, not repaired. The host may reject unsupported state_dir by its own schema before the facade, so not every SDK validation error has AX text. This adds no launch, no-effects receipt, retry permission, generated identity or change to Recipe/session/post-launch failures.
|
|
89
97
|
|
|
90
|
-
Fresh source normal
|
|
98
|
+
Fresh source normal actors_tool_register receipts use bare block-YAML tool/result/source/callable_now fields and native argument/warning sequences, including empty argument lists. Normal callability remains Boolean and a non-template source stays one exact safely quoted scalar; complete warnings take priority under16KiB, and whole-field/list omissions count only selected metadata, not hidden chars. Call advice remains opaque instruction, not automatic invocation; an unverified registration keeps its existing read-only tool-status next. Persistence is not callability: rely on the existing activation evidence, never substitute spawn or infer fresh host readiness from this layout. Transaction/errors/list/delete/draft and saved messages are not restyled by this slice.
|
|
91
99
|
|
|
92
100
|
Fresh source registry listings and deletion receipts use bare block YAML. Listings preserve the same selected sorted names as a native sequence with coverage; empty selection is `[]`, an overlarge whole group is explicitly omitted rather than mislabeled empty, and malformed text is unavailable without repair. Counts describe selected names, not active/callable or the complete loaded-host registry. Deletion returns tool/result and preserves the manual reload note as opaque instruction: neither a current-map miss nor returned deletion proves full host removal or authorizes automatic reload/retry. Existing partial-effect exceptions and machine details remain unchanged. Combined compiled/package acceptance and loaded-host observation remain separate; an older runtime can still return the prior flat-list text.
|
|
93
101
|
|
|
94
102
|
Fresh source draft-promotion success uses bare block YAML only for its original selected name/new-update/source=draft/callable display and one prior hint. The selected callable display remains a string, including quoted "false", "true" or "0", not reconstructed Boolean readiness. It adds no default/body/argument/path or activation facts and does not become an ordinary registration transaction. A zero, opaque legacy display or unavailable field is not permission to infer readiness or repair callability. Whole scalar/action omissions stay explicit; invocation advice is content and only the existing read-only status hint may be typed. Promotion callbacks/display can still fail after writes with original errors; no automatic rollback/retry/reload follows.
|
|
95
103
|
|
|
96
|
-
Local
|
|
104
|
+
Local actors_tool_register source-mode refusals now identify field/result and actual replacement/reference/source-mode/inherited-field choices. Existing correction advice is instruction content, not automatic retry/update or a no-effects receipt. Supplied values are not echoed. The host owns clone/coercion/schema behavior before the facade, so use the actual outcome rather than assuming every wrong-typed request reaches a local AX guard. Other registry errors and all existing activation/transaction contracts remain unchanged.
|
|
97
105
|
|
|
98
|
-
Ordinary invalid/reserved-name and new-registration missing-source errors now use AX fields. Reserved-name display is only the old selected value, not ownership or tool-invocation permission; an unfit/malformed value is wholly omitted/unavailable, not repaired. Missing-source choices and prior correction advice do not impose a new source rule on listing or existing-tool updates. Dependency/normalizer/blocker errors keep their own behavior; no retry, overwrite or no-effects authority follows from these records. Ordinary/draft already-registered refusals likewise identify only the original selected name and preserve Use update=true to overwrite as opaque instruction. This layout neither merges their admission policies nor authorizes overwriting, automatic retry or invocation; unfit/malformed name display stays explicitly omitted/unavailable under16KiB. Local template-shape errors now identify nested Recipe-shaped template, empty sequence or unsupported type, with actual string/object/sequence choices and old repair advice as opaque instruction. Supplied values are not echoed; this adds no source mode, global null/undefined rule, retry permission or change to host validation/coercion and dependency errors. Four later authored-Recipe validation errors now likewise identify defaults, description or template with fixed field/result. Their original stages remain: front null can delete, existing source can be inherited, and host schema/earlier source checks may reject or route a request before these local errors. No new value echo, automatic correction, activation or no-effects authority follows. A delegated-source runtime-owned-default refusal now names only its existing first selected key under defaults/key/result with prior advice as opaque instruction. It neither displays supplied values/all reserved keys nor authorizes retry or changes command-template/default admission behavior; original copy faults can still precede the refusal. Draft-path refusals now identify the allowed-root or resolved-path reference as a whole literal, or explicit omission/unavailability when unfit/malformed. Old summary-inspection advice remains opaque instruction, not automatic action or a new guarantee that a summary lists every draft. Existing root/exists checks and unowned faults keep their semantics; this is not filesystem absence, no-effects or native proof. Public from-normalization failures now show the prior displayed source, reason, legacy active-skill summary and doctor advice as AX. Source stays a whole literal or explicit field omission/unavailability; reason/summary/body labels are opaque, and advice remains instruction rather than an automatic call. The legacy summary is not a complete Skill inventory, display is not freshly normalized ownership, and a failure does not grant retry, broader source/cause access or host readiness. Normal candidate-admission refusals now likewise report selected joined diagnostics and, only on the existing source branch, prior displayed source/legacy summary/doctor advice. Diagnostics/summary are opaque values, not complete lists or raw causes; upstream diagnostic clipping remains legacy/unproven. Full fields fit16KiB or have explicit omission/unavailability without repair. This does not alter admission, make failures effect-free/transactional, or authorize automatic correction, retry or invocation. Draft invalid-Recipe refusals now similarly show only the previously selected optional reason or joined diagnostics with draft/result. They add no path/body, source permission, raw cause or rollback guarantee; read/diagnose/admission behavior and legacy upstream limits remain. Whole values fit16KiB or show omission/unavailability without repair, and absent reason is not synthesized. Outer registration transaction failure now also separates old stage, resolution_generation, legacy summary and surfaced error as AX after the original cleanup path. That generation identifies resolution context, not fresh Run identity/epoch. Inner rollback/advice wording remains opaque error content, not proof of complete host rollback/removal or permission to repeat. Original cleanup/formatting faults and partial effects remain; no new cause/source access or transaction guarantee. Registry activation/promotion/deletion UI notices now use report/tool fields with only old selected display. A report is not callable or complete-host-removal proof; original hasUI/callback/post-effect failures remain. Whole well-formed notifier values are not subject to the model16KiB cap, malformed selected name is unavailable without repair, and RPC forwarding is not client handling/visibility proof. Recipe registry watcher warning/refresh reports use AX fields too; their old default-root wording is not a freshly verified actual path, and restart/
|
|
106
|
+
Ordinary invalid/reserved-name and new-registration missing-source errors now use AX fields. Reserved-name display is only the old selected value, not ownership or tool-invocation permission; an unfit/malformed value is wholly omitted/unavailable, not repaired. Missing-source choices and prior correction advice do not impose a new source rule on listing or existing-tool updates. Dependency/normalizer/blocker errors keep their own behavior; no retry, overwrite or no-effects authority follows from these records. Ordinary/draft already-registered refusals likewise identify only the original selected name and preserve Use update=true to overwrite as opaque instruction. This layout neither merges their admission policies nor authorizes overwriting, automatic retry or invocation; unfit/malformed name display stays explicitly omitted/unavailable under16KiB. Local template-shape errors now identify nested Recipe-shaped template, empty sequence or unsupported type, with actual string/object/sequence choices and old repair advice as opaque instruction. Supplied values are not echoed; this adds no source mode, global null/undefined rule, retry permission or change to host validation/coercion and dependency errors. Four later authored-Recipe validation errors now likewise identify defaults, description or template with fixed field/result. Their original stages remain: front null can delete, existing source can be inherited, and host schema/earlier source checks may reject or route a request before these local errors. No new value echo, automatic correction, activation or no-effects authority follows. A delegated-source runtime-owned-default refusal now names only its existing first selected key under defaults/key/result with prior advice as opaque instruction. It neither displays supplied values/all reserved keys nor authorizes retry or changes command-template/default admission behavior; original copy faults can still precede the refusal. Draft-path refusals now identify the allowed-root or resolved-path reference as a whole literal, or explicit omission/unavailability when unfit/malformed. Old summary-inspection advice remains opaque instruction, not automatic action or a new guarantee that a summary lists every draft. Existing root/exists checks and unowned faults keep their semantics; this is not filesystem absence, no-effects or native proof. Public from-normalization failures now show the prior displayed source, reason, legacy active-skill summary and doctor advice as AX. Source stays a whole literal or explicit field omission/unavailability; reason/summary/body labels are opaque, and advice remains instruction rather than an automatic call. The legacy summary is not a complete Skill inventory, display is not freshly normalized ownership, and a failure does not grant retry, broader source/cause access or host readiness. Normal candidate-admission refusals now likewise report selected joined diagnostics and, only on the existing source branch, prior displayed source/legacy summary/doctor advice. Diagnostics/summary are opaque values, not complete lists or raw causes; upstream diagnostic clipping remains legacy/unproven. Full fields fit16KiB or have explicit omission/unavailability without repair. This does not alter admission, make failures effect-free/transactional, or authorize automatic correction, retry or invocation. Draft invalid-Recipe refusals now similarly show only the previously selected optional reason or joined diagnostics with draft/result. They add no path/body, source permission, raw cause or rollback guarantee; read/diagnose/admission behavior and legacy upstream limits remain. Whole values fit16KiB or show omission/unavailability without repair, and absent reason is not synthesized. Outer registration transaction failure now also separates old stage, resolution_generation, legacy summary and surfaced error as AX after the original cleanup path. That generation identifies resolution context, not fresh Run identity/epoch. Inner rollback/advice wording remains opaque error content, not proof of complete host rollback/removal or permission to repeat. Original cleanup/formatting faults and partial effects remain; no new cause/source access or transaction guarantee. Registry activation/promotion/deletion UI notices now use report/tool fields with only old selected display. A report is not callable or complete-host-removal proof; original hasUI/callback/post-effect failures remain. Whole well-formed notifier values are not subject to the model16KiB cap, malformed selected name is unavailable without repair, and RPC forwarding is not client handling/visibility proof. Recipe registry watcher warning/refresh reports use AX fields too; their old default-root wording is not a freshly verified actual path, and restart/actors_tool_register advice is only opaque instruction, never automatic action. Startup registry warnings use category sequences with whole opaque selected diagnostics; authored next/tool labels are content, malformed selected text unavailable and old doctor advice only opaque instruction. The reports do not establish callability, full upstream diagnostics or new source permission.
|
|
99
107
|
|
|
100
108
|
Compact Control receipts now use flat Markdown-list key/value records: run names have no duplicated namespace, action/result/delivery/handling remain distinct, and an optional next node names the inspect tool and its target/view. Multiline values retain their internal Markdown under an outer indentation; they are not extra status fields. This is a presentation of existing facts, not a raw dump or proof of completion. Delivery is not handling; a legacy kill attempt is not full termination. Changed-owner/generation refusals withhold replacement status even in verbose/detail output. Kernel delivery exceptions retain original/later causes and genuinely admitted correlation, but raw cause chains are not a new public message schema or proof that handling failed. Actor-local dispatch exceptions stay errors and report delivery/handling/effects uncertainty with a fresh-owned-inventory hint; they intentionally withhold saved correlation, including verbose, because an admission-era context does not prove current reply scope. Do not interpret this as a handling receipt or no-effect refusal. Do not repeat destructive actions to obtain verbose detail or follow a changed owner/generation blindly. See the Runs reference for this boundary.
|
|
101
109
|
|
|
@@ -108,7 +116,7 @@ Manual archive/prune exceptions can follow moved/copied/removed data. A single s
|
|
|
108
116
|
To make `music-player/playback` callable as `music_player` with a default source:
|
|
109
117
|
|
|
110
118
|
```text
|
|
111
|
-
|
|
119
|
+
actors_tool_register
|
|
112
120
|
name=music_player
|
|
113
121
|
from=music-player/playback
|
|
114
122
|
defaults={"source":"~/Music/1MIX"}
|
|
@@ -117,8 +125,8 @@ register_tool
|
|
|
117
125
|
Then:
|
|
118
126
|
|
|
119
127
|
1. Require registration to report successful resolution, validation, persistence, registry admission, host registration, activation, and `callable_now: true`.
|
|
120
|
-
2. Call the actual `music_player` tool. Do not call `
|
|
121
|
-
3. Verify agent-facing evidence reports `launch_kind: "tool"`; use `
|
|
128
|
+
2. Call the actual `music_player` tool. Do not call `actors_run_spawn` and describe that as tool invocation.
|
|
129
|
+
3. Verify agent-facing evidence reports `launch_kind: "tool"`; use `actors_inspect target=tool:music_player view=status` when usage or activation needs confirmation.
|
|
122
130
|
4. If callability is false, stop at the reported activation boundary. Preserve the logical source and diagnose it; do not substitute a Recipe spawn as proof.
|
|
123
131
|
|
|
124
132
|
Use direct delegation for the same maintained capability under a persistent name or narrower defaults. Use named imports only when one Recipe graph contains reusable child nodes. See [persistent tools](./references/persistent-tools.md) and [Recipes](./references/recipes.md).
|
|
@@ -136,7 +144,7 @@ Recipes remain with the Skill that owns their behavior. Load that Skill for sele
|
|
|
136
144
|
| `music-player` | The controlled `playback` singleton |
|
|
137
145
|
| `recipe-memory` | Internal automatic reviewers; use its Skill only for diagnosis/recovery |
|
|
138
146
|
|
|
139
|
-
Use the `actors/*` helpers only for their narrow requested result or intentional composition. Prefer public `
|
|
147
|
+
Use the `actors/*` helpers only for their narrow requested result or intentional composition. Prefer public `actors_inspect` for ordinary runtime diagnosis and the capability's primary workflow for a complete outcome.
|
|
140
148
|
|
|
141
149
|
## Delegation boundary
|
|
142
150
|
|
|
@@ -157,12 +165,12 @@ Run = Recipe + Trace + Control
|
|
|
157
165
|
2. Retain the returned `run:<id>` and normally wait for the root coordinator's completion batch instead of polling. While Pi is active, ready results arrive together at the next safe model-step boundary after the full tool batch; already-idle Pi wakes through a debounced follow-up. Nested actor completions wait for their complete containing top-level tree and arrive in that one compressed batch; descendant sessions do not need notification options.
|
|
158
166
|
3. Inspect `view=trace` when retained observations or attention matter.
|
|
159
167
|
4. Inspect `view=control` before diagnosing service readiness, stale work, or saturation.
|
|
160
|
-
5. Send `
|
|
168
|
+
5. Send `actors_control_apply` only for an action declared and consumed by that controlled Recipe.
|
|
161
169
|
6. Use terminal state, result, declared artifacts, and execution evidence to prove completion. When an outcome includes a retained primary-source, declaration-inventory or diagnostic-metadata reference, use that exact reference for further reading, not guessed captures or sibling files. Literal previews may be clipped; their field/range/counts describe what was shown. Diagnostic sources contain recorded command/error/failure-reason metadata only, not complete primary output; other recorded fields may be referenced without being shown. Artifact inventories list declarations only: they do not assert that target files exist or were produced, or grant body-read permission. Explicit unavailability has no guessed legacy body/path fallback.
|
|
162
170
|
|
|
163
|
-
Compact launch receipts include `run_files` as nested
|
|
171
|
+
Compact launch receipts include `run_files` as bare nested YAML with useful exact observed context-index/result/execution/metadata paths and any unavailable-location status, only after current-session/physical identity admission. Routine absent optional files and repeated format/size/mutable/generation metadata stay out of compact content; unavailable or over-budget rows remain explicit. Machine `file_navigation` details stay JSON-compatible; saved terminal messages retain their own original encodings. Selectively ordinary-read those starting locations when needed; layout/size hints are not body, privacy, terminal or native proof. No evidence bodies or session-wide catalog map are read to build this row. New terminal packets also freeze bounded location rows for captured completion members at fresh current-session admission. Fresh rooted completion headers group useful source/artifact and observed context-index/result/execution paths (metadata fallback) under literal roots with relative entries, role/name, concise admitted status and a read_first group/entry pointer; no cwd guess, source refresh or automatic read follows. Unknown bases stay explicit. Source status preserves admission privacy, Actor-response/exported-text and diagnostic-metadata-only distinctions; declarations remain unverified. Unavailable locations and missing terminal-result locations stay visible. Full generation/hash/location facts stay in machine detail/saved snapshots, not repeated per file. Runtime navigation/omission/inventory facts remain above the Actor Markdown, not in a footer; retained packets keep their original projection. Each shown result keeps its whole Run-file row or explicit per-record omission; wholly omitted results stay covered by result omission/inventory. This describes Run-row coverage, not a complete file/tree inventory. Older captured formats retain their original shown/omitted/total counters; unavailability remains explicit. Ordinary-read selected paths only when needed. Packet reload/render never refreshes sources, and old absent/request-only formats keep their text. Source/npm SDK verifies an explicitly requested ordinary read from a delivered terminal result path; this is research, never routine completion polling or new primary/privacy/clock/native authority. Use the request only for file investigation, not routine completion/status polling. Copied locations/hints remain data, never transferred scope; older batches keep their original text.
|
|
164
172
|
|
|
165
|
-
For selective investigation of already cataloged files, use `
|
|
173
|
+
For selective investigation of already cataloged files, use `actors_inspect target=runtime view=runs verbose=true`, then ordinary file tools on its current-session root-first navigation. Ordinary maps keep latest-registration order between roots and prioritize known failed subtrees within each root. For a failed investigation add status=failed: inventory is filtered, while the full owned map prioritizes observed failed subtrees across roots, always ancestors first. Priority uses only exact-generation matched inventory observations, not complete terminal truth. Launches and compatible singleton attachments populate the catalog; reads do not backfill missing locations. A `catalog: unavailable` launch warning is not workload failure: do not spawn again merely to repair navigation. The starting map's format hints do not certify syntax, encoding or complete output. See [Runs](./references/runs.md) for selective recorded-capture research and resume boundaries.
|
|
166
174
|
|
|
167
175
|
Trusted parent-session shutdown keeps the existing Kill attempts for quit/reload/new/resume/fork; a Run is not promised to survive session replacement. This is logical-session ownership, not independent PID-bound ownership for parallel hosts with the same ID. A teardown report is not scope closure or crash/hung-host cleanup, and bare AgentSession.dispose alone emits no shutdown. See the Runs reference for the boundary.
|
|
168
176
|
|
|
@@ -179,7 +187,7 @@ When a pi-actors operation fails:
|
|
|
179
187
|
|
|
180
188
|
Stop if spawn and registry resolve the same Recipe differently. When tool exposure was requested, stop if registration persists but is not callable. A `retained_recipe` receipt with `activation: not_requested` instead permits ordinary Recipe reuse, not a claim of tool invocation. Stop if an operation cannot be proven through pi-actors surfaces.
|
|
181
189
|
|
|
182
|
-
Never recover by copying maintained Recipe args, defaults, Control, artifacts, or helper commands. Never hard-code a `{skill_dir}` replacement path. Never introduce `bash -lc`, `eval`, direct bundled-helper execution, or shell backgrounding to bypass resolution. Never call `
|
|
190
|
+
Never recover by copying maintained Recipe args, defaults, Control, artifacts, or helper commands. Never hard-code a `{skill_dir}` replacement path. Never introduce `bash -lc`, `eval`, direct bundled-helper execution, or shell backgrounding to bypass resolution. Never call `actors_run_spawn` and claim a tool call. Use [diagnostics](./references/diagnostics.md) for the safe next action.
|
|
183
191
|
|
|
184
192
|
## When to read another Skill
|
|
185
193
|
|
|
@@ -5,9 +5,9 @@ Preserve the intended logical identity and diagnose through public pi-actors sur
|
|
|
5
5
|
## Recipe resolution or catalog failure
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
actors_inspect target=recipes view=status
|
|
9
|
+
actors_inspect target=recipes view=summary
|
|
10
|
+
actors_inspect target=recipes view=doctor identity=<skill>/<recipe>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
`summary` and `registry` name the same inspection path: identical facts, details and rendering for identical `verbose` input, so only `verbose` selects compact text versus structured output. The compact label still reports `recipes: registry`, and that label is not a separate view to request. Unsupported-view refusals list the actual accepted view names.
|
|
@@ -37,8 +37,8 @@ The actual host clones/validates public arguments first. Its unchanged schema re
|
|
|
37
37
|
## Persistent tool failure
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
actors_inspect target=tool:<name> view=status
|
|
41
|
+
actors_inspect target=tool:<name> view=schema
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Successful normal register/update-or-persisted text now separates tool/result/source/callable_now, lists required/optional args and warnings, and keeps one prior hint. Non-template source references are whole literals; safety warnings take budget priority. Whole selected fields/groups/actions fit16KiB or carry omission counts; malformed selections are unavailable without repair or hidden character counts. Invocation advice is opaque instruction rather than an automatic call. The unverified branch retains one typed read-only tool-status next; all existing next_actions/details remain. Post-persistence callbacks/formatting can still fail with their original values, so text does not add rollback, fresh activation or retry guarantees. List/delete/draft/transaction errors and notices remain separate.
|
|
@@ -51,19 +51,19 @@ Four local source-mode refusals now show field/result plus replacement fields, a
|
|
|
51
51
|
|
|
52
52
|
The host first clones/coerces/validates args. It rejects unsupported values/object-valued from before execute, but numeric from can normalize to a string; an unnamed valid request can still return the existing name list. Direct getter/descriptor/trim probes are not SDK-cloned DTOs. Do not override schema or force a public error solely to obtain AX text, and do not infer the caller's original type from post-validation data.
|
|
53
53
|
|
|
54
|
-
Ordinary invalid-name, reserved-name and new-registration missing-source errors now use field/value/result or a real source-mode sequence with prior opaque repair advice. No raw caller name/source/body is newly exposed. Reserved selected display fits whole16KiB including spacing or has scalar omission/unavailability; this is not hidden character loss or ownership/invocation proof. Empty-name listing and existing-tool update reusing source remain unchanged. Normalizer/reserved-set/resolution/authoritative/blocker exceptions retain original behavior; a dependency blocker is not reformatted as an owned refusal. SDK numeric name coercion may reach a different local guard than the direct request, while object-type schema rejection stays outside execute. Both ordinary and draft already-registered errors now use field/value/result with exact Use update=true to overwrite instruction content. Distinct Map/authoritative-file/exists/blocker/update checks remain; the selected display does not disclose source/recipe bytes or certify no effects, rollback, fresh host membership or overwrite permission. Whole scalar omission/unavailability and raw observation/coercion failures remain explicit and unchanged, respectively. Nested Recipe-shaped template, empty sequence and unsupported template type now have fixed template/result AX errors and real supported-type choices, retaining prior correction as opaque instruction without supplied body/source echo. External expansion/getter failures stay raw. Front null/empty deletion, undefined/inherited source and later authoring errors are not reclassified; a numeric SDK template may be coerced to a command string rather than reaching the direct unsupported-type refusal. Later non-object defaults, missing command description, authoring-stage null and missing final template now use fixed field/result without supplied values. Preserve the error's actual stage rather than treating null globally invalid or every missing source as a late template failure: host defaults schema rejection, front deletion and earlier missing-source refusal still precede or bypass these guards. Schema argument/description/default/retained-template observation faults keep their original owner and values. The delegated-source runtime-owned-default-key refusal now names the old first selected key only with fixed defaults/result and opaque remove-default/retry advice. Key order and complete prior default copy remain; do not infer a complete key listing, supplied values, early effect-free rejection, global command-template ban or permission to repeat. Host SDK preserves selected-key error normalization without granting readiness or overwrite authority. Draft outside-root/current-not-found diagnostics now identify field draft and only the original allowed-root/resolved-path literal; root refusal does not add the refused caller path. Whole references fit16KiB or are explicitly omitted/unavailable without repair/private counts. Old summary hint stays instruction content, not an automatic call/listing guarantee. Getter/resolve/relative/dot-prefix/exists behavior and raw faults remain; not-found text is not stronger absence/native/host proof. Public from-normalization wrapper now reports only original displayed source/reason/legacy active_skills_summary and opaque doctor instruction, with whole-field omissions/unavailability under16KiB. Inner normalizer errors, Error.message.trim/String and old display/summary/doctor observation order remain. Do not parse comma summary/body Next labels, infer discarded counts/private causes, fix undefined/source-hint disagreement or automatically execute advice; other validation/transaction errors stay separate. Normal candidate-admission refusal now uses field recipe/result and opaque diagnostics_summary, plus old displayed source/legacy summary/instruction only when the old requestedSource branch is truthy. Preserve pre-Error diagnostic join/String ordering and original bounded upstream diagnostic text, including explicit unavailability for malformed selected clipping; do not reconstruct a full list/body/cause or infer no effects, rollback, current readiness or retry permission. Draft invalid-Recipe raw/candidate refusals now likewise use fixed draft/result plus old optional reason or joined diagnostics only, not new paths/bodies/causes. Separate raw read/diagnose calls, reason truthiness, original draft Error-before-join timing and upstream4096UTF16 candidate cap stay unchanged; malformed selected text is unavailable without repair. This neither merges normal/draft policy nor proves no effects/rollback or authorizes retry. Outer registration transaction-failure text now identifies old stage/resolution_generation/legacy summary/error only after existing cleanup. That generation is resolution-context display, not Run scope/current host epoch. Error.message/String behavior and all restoration/unlink/Map/reactivation/setActive faults remain exact; a formatting error can follow cleanup, and legacy inner rollback/advice text is not authoritative rollback/readiness or retry permission. Whole selected fields fit16KiB or show omission/unavailability without repairing private data. Inner activation/persisted-admission errors and receipts stay separate. Registry activation/promotion/deletion notifier text now uses old report identity/tool display only, not new readiness/removal evidence. Original info type/positions/hasUI gate/callback exceptions remain; ordinary UI has no borrowed model16KiB limit. Multiline text stays literal/native-wrapped, malformed selected name is explicitly unavailable, and RPC message forwarding does not certify display or handling. Loaded terminal/phone remains separately gated. Recipe registry watcher warning/refresh notices now use AX report plus original opaque repair instruction, without changing direct ctx.ui.notify, pending/dedup/load/callback failures. The old ~/.pi/agent/recipes report is not freshly verified root metadata; it does not authorize restart,
|
|
54
|
+
Ordinary invalid-name, reserved-name and new-registration missing-source errors now use field/value/result or a real source-mode sequence with prior opaque repair advice. No raw caller name/source/body is newly exposed. Reserved selected display fits whole16KiB including spacing or has scalar omission/unavailability; this is not hidden character loss or ownership/invocation proof. Empty-name listing and existing-tool update reusing source remain unchanged. Normalizer/reserved-set/resolution/authoritative/blocker exceptions retain original behavior; a dependency blocker is not reformatted as an owned refusal. SDK numeric name coercion may reach a different local guard than the direct request, while object-type schema rejection stays outside execute. Both ordinary and draft already-registered errors now use field/value/result with exact Use update=true to overwrite instruction content. Distinct Map/authoritative-file/exists/blocker/update checks remain; the selected display does not disclose source/recipe bytes or certify no effects, rollback, fresh host membership or overwrite permission. Whole scalar omission/unavailability and raw observation/coercion failures remain explicit and unchanged, respectively. Nested Recipe-shaped template, empty sequence and unsupported template type now have fixed template/result AX errors and real supported-type choices, retaining prior correction as opaque instruction without supplied body/source echo. External expansion/getter failures stay raw. Front null/empty deletion, undefined/inherited source and later authoring errors are not reclassified; a numeric SDK template may be coerced to a command string rather than reaching the direct unsupported-type refusal. Later non-object defaults, missing command description, authoring-stage null and missing final template now use fixed field/result without supplied values. Preserve the error's actual stage rather than treating null globally invalid or every missing source as a late template failure: host defaults schema rejection, front deletion and earlier missing-source refusal still precede or bypass these guards. Schema argument/description/default/retained-template observation faults keep their original owner and values. The delegated-source runtime-owned-default-key refusal now names the old first selected key only with fixed defaults/result and opaque remove-default/retry advice. Key order and complete prior default copy remain; do not infer a complete key listing, supplied values, early effect-free rejection, global command-template ban or permission to repeat. Host SDK preserves selected-key error normalization without granting readiness or overwrite authority. Draft outside-root/current-not-found diagnostics now identify field draft and only the original allowed-root/resolved-path literal; root refusal does not add the refused caller path. Whole references fit16KiB or are explicitly omitted/unavailable without repair/private counts. Old summary hint stays instruction content, not an automatic call/listing guarantee. Getter/resolve/relative/dot-prefix/exists behavior and raw faults remain; not-found text is not stronger absence/native/host proof. Public from-normalization wrapper now reports only original displayed source/reason/legacy active_skills_summary and opaque doctor instruction, with whole-field omissions/unavailability under16KiB. Inner normalizer errors, Error.message.trim/String and old display/summary/doctor observation order remain. Do not parse comma summary/body Next labels, infer discarded counts/private causes, fix undefined/source-hint disagreement or automatically execute advice; other validation/transaction errors stay separate. Normal candidate-admission refusal now uses field recipe/result and opaque diagnostics_summary, plus old displayed source/legacy summary/instruction only when the old requestedSource branch is truthy. Preserve pre-Error diagnostic join/String ordering and original bounded upstream diagnostic text, including explicit unavailability for malformed selected clipping; do not reconstruct a full list/body/cause or infer no effects, rollback, current readiness or retry permission. Draft invalid-Recipe raw/candidate refusals now likewise use fixed draft/result plus old optional reason or joined diagnostics only, not new paths/bodies/causes. Separate raw read/diagnose calls, reason truthiness, original draft Error-before-join timing and upstream4096UTF16 candidate cap stay unchanged; malformed selected text is unavailable without repair. This neither merges normal/draft policy nor proves no effects/rollback or authorizes retry. Outer registration transaction-failure text now identifies old stage/resolution_generation/legacy summary/error only after existing cleanup. That generation is resolution-context display, not Run scope/current host epoch. Error.message/String behavior and all restoration/unlink/Map/reactivation/setActive faults remain exact; a formatting error can follow cleanup, and legacy inner rollback/advice text is not authoritative rollback/readiness or retry permission. Whole selected fields fit16KiB or show omission/unavailability without repairing private data. Inner activation/persisted-admission errors and receipts stay separate. Registry activation/promotion/deletion notifier text now uses old report identity/tool display only, not new readiness/removal evidence. Original info type/positions/hasUI gate/callback exceptions remain; ordinary UI has no borrowed model16KiB limit. Multiline text stays literal/native-wrapped, malformed selected name is explicitly unavailable, and RPC message forwarding does not certify display or handling. Loaded terminal/phone remains separately gated. Recipe registry watcher warning/refresh notices now use AX report plus original opaque repair instruction, without changing direct ctx.ui.notify, pending/dedup/load/callback failures. The old ~/.pi/agent/recipes report is not freshly verified root metadata; it does not authorize restart, actors_tool_register replay or reload. Startup registry warnings now expose category sequences including singletons, preserving original selected diagnostics and existing shadow/bash suppression. Authored labels stay inside values; malformed selected text is unavailable, no borrowed model cap or recovered private tail. Doctor advice stays opaque instruction, not automatic inspection. Formatting still precedes runtime.notify/hasUI; a report/fault does not undo prior scan/registry effects.
|
|
55
55
|
|
|
56
56
|
Distinguish persistence, registry admission, host registration, active-tool membership, and `callable_now`. Confirm the source identity, effective caller schema, separate tool/spawn usage, and last launch kind when exposed.
|
|
57
57
|
|
|
58
|
-
If persistence succeeded but callability is false, do not use `
|
|
58
|
+
If persistence succeeded but callability is false, do not use `actors_run_spawn` and claim the tool worked. Follow the reported activation boundary or stop.
|
|
59
59
|
|
|
60
60
|
## Run failure
|
|
61
61
|
|
|
62
62
|
```text
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
actors_inspect target=run:<id> view=recipe
|
|
64
|
+
actors_inspect target=run:<id> view=trace
|
|
65
|
+
actors_inspect target=run:<id> view=control
|
|
66
|
+
actors_inspect target=runtime view=status
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Use Recipe view for captured identity/launch evidence, Trace for bounded observations, Control for readiness/capacity/stale work, and runtime status for kernel-level health. Treat retained-history completeness honestly.
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
# Persistent Tools
|
|
2
2
|
|
|
3
|
-
Use a persistent tool when the agent should call a trusted capability by name across turns or sessions. Use `
|
|
3
|
+
Use a persistent tool when the agent should call a trusted capability by name across turns or sessions. Use `actors_run_spawn` instead for one-off Recipe execution.
|
|
4
4
|
|
|
5
5
|
## Select the capability, not the execution mode
|
|
6
6
|
|
|
7
7
|
Both sync and async Recipes can be tools. Sync invocation awaits the result; async invocation returns a launch receipt and the eventual result arrives separately. Neither synchrony nor a model-backed implementation establishes usefulness. A subagent-backed tool launches a capability, not a saved live subagent. Synchronous tools execute inline; non-singleton async calls launch Run executions, while singleton attachment follows its existing compatibility contract.
|
|
8
8
|
|
|
9
|
-
Prefer a stable purpose/name, caller-owned parameterized inputs, a clear result/acceptance boundary, understood effects and failure/cancellation limits, and meaningful leverage over existing tools or one-off `
|
|
9
|
+
Prefer a stable purpose/name, caller-owned parameterized inputs, a clear result/acceptance boundary, understood effects and failure/cancellation limits, and meaningful leverage over existing tools or one-off `actors_run_spawn`. Do not register every transient mission or a generic arbitrary-prompt alias merely to add a name. A successful registration is not permission for new effects, and a launch receipt is not successful task completion.
|
|
10
10
|
|
|
11
|
-
Current user-root Recipes are tool candidates by location; Skill components do not become tools automatically. Explicit create-only retention is supported through `
|
|
11
|
+
Current user-root Recipes are tool candidates by location; Skill components do not become tools automatically. Explicit create-only retention is supported through `actors_tool_register expose=false`; it is separate from tool exposure. Automatic retained lifecycle is not implemented. Read-only `actors_inspect target=recipes view=summary` reports retained counts for `recipes/library`; use `verbose=true` for exact `retained` paths, resolved mode, invalid/disabled state and diagnostics. Reuse a valid enabled entry through `actors_run_spawn recipe=<exact path>` with required caller values, or deliberately register it with `from=<exact path>`. A stored definition is not review, activation or Run evidence; use `tool:<name>` for activation and `runtime view=runs` for running instances. A `library/<stem>` usage-lineage label is private accounting identity, not a callable name or Skill Recipe reference; reuse the exact file path from inspection. Do not populate or migrate the live registry manually. `expose` is a registration input, not a Recipe field; do not invent review actions or bypass unsupported retained mutations. Existing explicit `actors_tool_register` works for both modes; automatic review remains under its existing policy. Launch counts and value-free structural review alone do not establish semantic purpose, a good name, or accepted useful reuse.
|
|
12
|
+
|
|
13
|
+
## Names and ownership
|
|
14
|
+
|
|
15
|
+
Use `actors_tool_register` for new calls; explicit legacy `register_tool` calls share its dispatch contract. Name new exposed tools under the functional owner, for example `audio_transcribe` or `repo_check`. Preserve already persisted names instead of silently prefixing them. The namespace is a caller naming rule, not a Recipe field or identity migration. A normalized collision against any foreign host tool, even an inactive one, refuses exposure/update; `update=true` never authorizes a foreign overwrite. Inspect the original logical capability and stop rather than choosing a misleading generic alias to bypass that refusal. Retention without exposure remains separate.
|
|
12
16
|
|
|
13
17
|
## Choose one source mode
|
|
14
18
|
|
|
15
19
|
```text
|
|
16
20
|
Maintained or explicit-file Recipe
|
|
17
|
-
→
|
|
21
|
+
→ actors_tool_register from=<skill>/<recipe|path.json|path.md>
|
|
18
22
|
|
|
19
23
|
Trusted command template
|
|
20
|
-
→
|
|
24
|
+
→ actors_tool_register template="..."
|
|
21
25
|
|
|
22
26
|
Reviewed captured draft
|
|
23
|
-
→
|
|
27
|
+
→ actors_tool_register draft=<draft-path>
|
|
24
28
|
```
|
|
25
29
|
|
|
26
30
|
Do not mix source modes.
|
|
@@ -28,7 +32,7 @@ Do not mix source modes.
|
|
|
28
32
|
## Specialize a maintained Recipe
|
|
29
33
|
|
|
30
34
|
```text
|
|
31
|
-
|
|
35
|
+
actors_tool_register
|
|
32
36
|
name=music_player
|
|
33
37
|
from=music-player/playback
|
|
34
38
|
defaults={"source":"~/Music/1MIX"}
|
|
@@ -42,11 +46,11 @@ Use `description` to narrow agent-facing intent when useful. Every supplied defa
|
|
|
42
46
|
|
|
43
47
|
## Retain without exposing a tool
|
|
44
48
|
|
|
45
|
-
Use `
|
|
49
|
+
Use `actors_tool_register name=<name> expose=false from=<skill>/<recipe>` or a trusted `template` source to create `recipes/library/<name>.json`. A description is still required for authored command templates; source defaults/args/origins still belong to the maintained Recipe. This is create-only: retained `update=true`, null/empty deletion, `draft` mode and direct Recipe dependencies on managed disposable drafts are rejected, including Recipe-valued template leaves. A duplicate retained JSON/Markdown stem is a conflict; no older file is overwritten.
|
|
46
50
|
|
|
47
|
-
The `kind: retained_recipe`, `activation: not_requested` receipt confirms persistence/admission, not host activation or review. It returns the exact Recipe path and required/optional argument names, without global callability flags or default values. A same-named tool is left untouched. Use the exact returned path with `
|
|
51
|
+
The `kind: retained_recipe`, `activation: not_requested` receipt confirms persistence/admission, not host activation or review. It returns the exact Recipe path and required/optional argument names, without global callability flags or default values. A same-named tool is left untouched. Use the exact returned path with `actors_run_spawn`; if compact output omits the whole path, follow its read-only verbose Recipe inspection hint rather than guessing it. Retention records no launch and makes no self-contained-backup promise for referenced sources.
|
|
48
52
|
|
|
49
|
-
To expose a retained capability deliberately, call ordinary `
|
|
53
|
+
To expose a retained capability deliberately, call ordinary `actors_tool_register name=<tool> from=<exact retained path>`, prove activation below, then call the actual tool. Deleting that admitted wrapper through the ordinary deletion path leaves the retained source; it does not stop active Runs. This is not a migration or safe-retention rule for old standalone tools.
|
|
50
54
|
|
|
51
55
|
Publication uses a complete atomic no-overwrite file link; unsupported filesystems refuse without an overwrite fallback. A storage, admission or lock-release failure can follow committed bytes. Inspect the retained inventory and preserve the original cause; do not blindly repeat the request or delete an uncertain file.
|
|
52
56
|
|
|
@@ -69,9 +73,9 @@ For tool exposure, when `callable_now` is true, call the actual generated tool a
|
|
|
69
73
|
Use:
|
|
70
74
|
|
|
71
75
|
```text
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
actors_inspect target=tool:<name> view=status
|
|
77
|
+
actors_inspect target=tool:<name> view=schema
|
|
78
|
+
actors_inspect target=recipes view=doctor
|
|
75
79
|
```
|
|
76
80
|
|
|
77
81
|
## Command templates
|
|
@@ -80,7 +84,7 @@ Use `template` only for a trusted command definition, not to make the agent gues
|
|
|
80
84
|
|
|
81
85
|
## Updates and deletion
|
|
82
86
|
|
|
83
|
-
Use `update=true` only for an intentional replacement. Preserve the existing capability when candidate resolution, validation, persistence, or activation fails. Use the compact deletion form documented by the live `
|
|
87
|
+
Use `update=true` only for an intentional replacement. Preserve the existing capability when candidate resolution, validation, persistence, or activation fails. Use the compact deletion form documented by the live `actors_tool_register` schema; do not create a second deletion mechanism.
|
|
84
88
|
|
|
85
89
|
## Stop rules
|
|
86
90
|
|
|
@@ -88,7 +92,7 @@ Stop rather than:
|
|
|
88
92
|
|
|
89
93
|
- copying source Recipe args, defaults, artifacts, Control, or helper command;
|
|
90
94
|
- invoking a Skill helper by installation path;
|
|
91
|
-
- using `
|
|
95
|
+
- using `actors_run_spawn` and claiming the tool was called;
|
|
92
96
|
- treating persistence as callability;
|
|
93
97
|
- adding shell evaluation or backgrounding to bypass registration;
|
|
94
98
|
- editing an unrelated rejected Skill component unless that repair is explicitly requested.
|
|
@@ -14,7 +14,7 @@ music-player/playback
|
|
|
14
14
|
For agent-facing persistent specialization, use:
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
|
-
|
|
17
|
+
actors_tool_register from=music-player/playback defaults={"source":"~/Music/1MIX"}
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
The delegated root inherits async behavior, args and types, defaults, artifacts, Control, and runtime-owned origins. Do not copy those fields into the wrapper.
|