@llblab/pi-actors 0.56.1 → 0.57.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 +6 -6
- package/BACKLOG.md +4 -14
- package/CHANGELOG.md +9 -0
- package/README.md +5 -2
- package/dist/lib/execution-output.js +13 -2
- package/dist/lib/observability.js +9 -14
- package/dist/lib/registry.js +82 -117
- package/dist/lib/run-ui-runtime.js +18 -27
- package/dist/lib/runs-process-windows-mi.d.ts +71 -0
- package/dist/lib/runs-process-windows-mi.js +146 -3
- package/dist/lib/tools-inspect.js +109 -59
- package/dist/lib/tools-local.js +16 -8
- package/dist/lib/tools-message.js +76 -65
- package/dist/lib/tools-response.d.ts +18 -0
- package/dist/lib/tools-response.js +88 -21
- package/dist/lib/tools-spawn.js +19 -12
- package/dist/skills/actors/references/diagnostics.md +3 -0
- package/docs/README.md +1 -0
- package/docs/actor-inspector.md +2 -2
- package/docs/agent-experience.md +9 -1
- package/docs/inactive-foundations-inventory.md +73 -0
- package/docs/inspection.md +9 -8
- package/docs/output-projection-map.md +15 -13
- package/docs/windows-process-observation.md +2 -2
- package/lib/execution-output.ts +13 -2
- package/lib/observability.ts +9 -11
- package/lib/registry.ts +89 -124
- package/lib/run-ui-runtime.ts +18 -34
- package/lib/runs-process-windows-mi.ts +167 -3
- package/lib/tools-inspect.ts +109 -59
- package/lib/tools-local.ts +26 -15
- package/lib/tools-message.ts +85 -58
- package/lib/tools-response.ts +97 -20
- package/lib/tools-spawn.ts +19 -12
- package/package.json +1 -1
- package/skills/actors/references/diagnostics.md +3 -0
|
@@ -14,82 +14,96 @@ function asRecord(value) {
|
|
|
14
14
|
? value
|
|
15
15
|
: {};
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const CONTROL_BUDGET = Limits.RUN_DELIVERY_MODEL_MAX_BYTES - 1;
|
|
18
|
+
function controlMetadata(value) {
|
|
19
|
+
return ToolsResponse.renderYamlMetadata(value, CONTROL_BUDGET).text;
|
|
20
|
+
}
|
|
21
|
+
/** One opaque selected scalar as a whole value or an explicit whole-field omission, never a clip. */
|
|
22
|
+
function controlSelected(key, value) {
|
|
23
|
+
return ToolsResponse.selectYamlField(key, value, CONTROL_BUDGET);
|
|
24
|
+
}
|
|
25
|
+
/** Compiler-selected option strings stay a native sequence; malformed selections stay unavailable. */
|
|
26
|
+
function controlChoices(options) {
|
|
27
|
+
const key = options.key, values = options.values;
|
|
28
|
+
// Values were selected by the original string filter, not a new action grammar.
|
|
29
|
+
const wellFormed = values.every((value) => typeof value === "string" && value.isWellFormed());
|
|
30
|
+
const omitted = { [key]: wellFormed ? "[omitted]" : "[unavailable]",
|
|
31
|
+
[key + "_omission"]: { reason: wellFormed ? "response_too_large" : "malformed_selected_text",
|
|
32
|
+
shown: 0, omitted: values.length, total: values.length } };
|
|
33
|
+
const full = !wellFormed ? omitted : values.length ? { [key]: [...values] } : { [key]: "none" };
|
|
34
|
+
const complete = ToolsResponse.renderYamlMetadata(full, CONTROL_BUDGET);
|
|
35
|
+
return { full, selected: complete.state === "available" && Buffer.byteLength(complete.text) <= Buffer.byteLength(controlMetadata(omitted)) ? full : omitted };
|
|
36
|
+
}
|
|
37
|
+
/** Grow whole selected fields in priority order while the complete document still fits. */
|
|
38
|
+
function controlDocument(render, order) {
|
|
39
|
+
return ToolsResponse.growYamlDocument(render, order, CONTROL_BUDGET);
|
|
40
|
+
}
|
|
41
|
+
/** Only producer-known read-only inspect literals become typed next; other advice stays opaque content. */
|
|
42
|
+
function controlNextPart(action) {
|
|
43
|
+
const inspect = /^inspect target=([^\s]+) view=([^\s]+)$/u.exec(action);
|
|
44
|
+
if (inspect) {
|
|
45
|
+
return ToolsResponse.selectYamlNode("next", { tool: "inspect", target: inspect[1], view: inspect[2] }, CONTROL_BUDGET);
|
|
46
|
+
}
|
|
47
|
+
const wellFormed = action.isWellFormed();
|
|
48
|
+
const omitted = { next: { instruction: wellFormed ? "[omitted]" : "[unavailable]",
|
|
49
|
+
instruction_omission: { reason: wellFormed ? "response_too_large" : "malformed_selected_text", shown: 0, omitted: 1, total: 1 } } };
|
|
50
|
+
const full = wellFormed ? { next: { instruction: action } } : omitted;
|
|
51
|
+
const complete = wellFormed ? ToolsResponse.renderYamlMetadata(full, CONTROL_BUDGET) : undefined;
|
|
52
|
+
const selected = complete?.state === "available" && Buffer.byteLength(complete.text) <= Buffer.byteLength(controlMetadata(omitted))
|
|
53
|
+
? full : omitted;
|
|
54
|
+
return { full, selected };
|
|
55
|
+
}
|
|
18
56
|
/** Only the four compiler-owned guard sites below; never wraps dispatch/dependency errors. */
|
|
19
57
|
function controlGuardText(request, result, options) {
|
|
20
58
|
const key = request.target === "runtime" ? "target" : "run";
|
|
21
|
-
const identity =
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
let malformed = false;
|
|
28
|
-
// Values were selected by the original string filter, not by a new action grammar.
|
|
29
|
-
for (let index = 0; index < options.values.length; index++) {
|
|
30
|
-
const value = options.values[index];
|
|
31
|
-
if (!value.isWellFormed()) {
|
|
32
|
-
malformed = true;
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
rows.push(" - " + value.replaceAll(/\r\n|\r|\n/gu, newline => newline + " "));
|
|
36
|
-
}
|
|
37
|
-
omittedOptions = `- ${options.key}: [${malformed ? "unavailable" : "omitted"}]\n- ${options.key}_omission:\n - reason: ${malformed ? "malformed_selected_text" : "response_too_large"}\n - shown: 0\n - omitted: ${options.values.length}\n - total: ${options.values.length}`;
|
|
38
|
-
fullOptions = malformed ? omittedOptions : rows.length ? `- ${options.key}:\n${rows.join("\n")}` : controlField(options.key, "none");
|
|
39
|
-
}
|
|
40
|
-
// Start with the shorter complete-or-omitted rendering: adding an omission scaffold must
|
|
41
|
-
// never manufacture overflow when the complete small field would fit. Then grow only.
|
|
42
|
-
let selectedIdentity = Buffer.byteLength(identity) <= Buffer.byteLength(omittedIdentity) ? identity : omittedIdentity;
|
|
43
|
-
let selectedOptions = Buffer.byteLength(fullOptions) <= Buffer.byteLength(omittedOptions) ? fullOptions : omittedOptions;
|
|
44
|
-
const render = (target, choices) => ToolsResponse.withLeadingLineBreak([target, ...fixed, ...(options ? [choices] : [])].join("\n"));
|
|
45
|
-
if (Buffer.byteLength(render(identity, selectedOptions)) <= Limits.RUN_DELIVERY_MODEL_MAX_BYTES)
|
|
46
|
-
selectedIdentity = identity;
|
|
47
|
-
if (options && Buffer.byteLength(render(selectedIdentity, fullOptions)) <= Limits.RUN_DELIVERY_MODEL_MAX_BYTES)
|
|
48
|
-
selectedOptions = fullOptions;
|
|
49
|
-
return render(selectedIdentity, selectedOptions);
|
|
50
|
-
}
|
|
51
|
-
function controlNext(action) {
|
|
52
|
-
const inspect = /^inspect target=([^\s]+) view=([^\s]+)$/u.exec(action);
|
|
53
|
-
return inspect ? ToolsResponse.formatInspectNextAction(inspect[1], inspect[2])
|
|
54
|
-
: "- next:\n" + controlField("instruction", action, 1);
|
|
59
|
+
const identity = controlSelected(key, request.target === "runtime" ? request.target : request.target.slice(4));
|
|
60
|
+
const choices = options ? controlChoices(options) : undefined;
|
|
61
|
+
const render = () => ({ ...identity.selected, action: request.action, result,
|
|
62
|
+
...(choices ? choices.selected : {}) });
|
|
63
|
+
// Whole identity first, then the complete option sequence: the shorter seed must never manufacture overflow.
|
|
64
|
+
return ToolsResponse.withLeadingLineBreak(controlDocument(render, choices ? [identity, choices] : [identity]));
|
|
55
65
|
}
|
|
56
66
|
/** Pure first-layer copy; legacy stopped/killed flags are not scope-closure proof. */
|
|
57
67
|
export function compactControlResult(request, result) {
|
|
58
|
-
const
|
|
59
|
-
|
|
68
|
+
const key = request.target.startsWith("run:") ? "run" : "target";
|
|
69
|
+
const identity = controlSelected(key, key === "run" ? request.target.slice(4) : request.target);
|
|
70
|
+
const facts = {};
|
|
60
71
|
if (result.stopped === false || result.archived === false || result.pruned === false) {
|
|
61
|
-
|
|
62
|
-
if (typeof result.reason === "string")
|
|
63
|
-
fields.push(controlField("reason", result.reason));
|
|
64
|
-
const observed = asRecord(result.status);
|
|
65
|
-
if (result.reason === "not running" && typeof observed.status === "string")
|
|
66
|
-
fields.push(controlField("state", observed.status));
|
|
72
|
+
facts.result = "not applied";
|
|
67
73
|
}
|
|
68
74
|
else if (request.action === "kill" && result.stopped === true) {
|
|
69
|
-
|
|
75
|
+
facts.result = "kill attempted";
|
|
76
|
+
facts.termination = "unconfirmed";
|
|
70
77
|
}
|
|
71
78
|
else if (result.archived === true) {
|
|
72
|
-
|
|
79
|
+
facts.result = "archived";
|
|
73
80
|
}
|
|
74
81
|
else if (result.pruned === true) {
|
|
75
|
-
|
|
82
|
+
facts.result = "pruned";
|
|
76
83
|
}
|
|
77
84
|
else if (result.delivery === "queued" || result.delivery === "delivered") {
|
|
78
|
-
|
|
85
|
+
facts.delivery = result.delivery;
|
|
86
|
+
facts.handling = "unconfirmed";
|
|
79
87
|
}
|
|
80
88
|
else {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
fields.push(controlField("reason", result.reason));
|
|
89
|
+
facts[typeof result.delivery === "string" ? "delivery" : "result"] =
|
|
90
|
+
typeof result.delivery === "string" ? result.delivery : typeof result.status === "string" ? result.status : "accepted";
|
|
84
91
|
}
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
const notApplied = result.stopped === false || result.archived === false || result.pruned === false;
|
|
93
|
+
const reason = typeof result.reason === "string" ? controlSelected("reason", result.reason) : undefined;
|
|
94
|
+
const observed = asRecord(result.status);
|
|
95
|
+
const state = notApplied && result.reason === "not running" && typeof observed.status === "string"
|
|
96
|
+
? controlSelected("state", observed.status) : undefined;
|
|
97
|
+
const controlId = typeof result.control_id === "string" ? controlSelected("control_id", result.control_id) : undefined;
|
|
87
98
|
const actions = Array.isArray(result.next_actions) ? result.next_actions
|
|
88
99
|
: request.target.startsWith("run:") ? runNextActions(request.target.slice(4), result) : [];
|
|
89
100
|
const next = actions.find((action) => typeof action === "string" && action.length > 0);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
101
|
+
const nextPart = next === undefined ? undefined : controlNextPart(next);
|
|
102
|
+
const parts = [identity, ...(reason ? [reason] : []), ...(state ? [state] : []), ...(controlId ? [controlId] : []), ...(nextPart ? [nextPart] : [])];
|
|
103
|
+
const render = () => ({ ...identity.selected, action: request.action, ...facts,
|
|
104
|
+
...(reason ? reason.selected : {}), ...(state ? state.selected : {}), ...(controlId ? controlId.selected : {}),
|
|
105
|
+
...(nextPart ? nextPart.selected : {}) });
|
|
106
|
+
return ToolsResponse.withLeadingLineBreak(controlDocument(render, parts));
|
|
93
107
|
}
|
|
94
108
|
function runNextActions(run, result) {
|
|
95
109
|
if (result.stopped === true)
|
|
@@ -198,16 +212,13 @@ export function createControlToolDefinition(deps = {}) {
|
|
|
198
212
|
}
|
|
199
213
|
catch (cause) {
|
|
200
214
|
// Admission-era correlation is not current reply-scope proof after an awaited dispatch.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
? identity
|
|
209
|
-
: "- run: [omitted]\n- run_omission:\n - reason: response_too_large\n - shown: 0\n - omitted: 1\n - total: 1";
|
|
210
|
-
throw new Error(ToolsResponse.withLeadingLineBreak(target + "\n" + summary), { cause });
|
|
215
|
+
// Display one whole caller-owned id or an explicit whole-id omission; the warning stays literal.
|
|
216
|
+
const identity = controlSelected("run", run);
|
|
217
|
+
const next = controlNextPart("inspect target=runtime view=runs");
|
|
218
|
+
const render = () => ({ ...identity.selected, action: request.action,
|
|
219
|
+
result: "request failed", delivery: "unconfirmed", handling: "unconfirmed",
|
|
220
|
+
warning: "Effects may already exist.\nDo not repeat automatically.", ...next.selected });
|
|
221
|
+
throw new Error(ToolsResponse.withLeadingLineBreak(controlDocument(render, [identity])), { cause });
|
|
211
222
|
}
|
|
212
223
|
}
|
|
213
224
|
// A refused identity change must not publish the replacement's status, even in verbose/details.
|
|
@@ -13,6 +13,20 @@ export type YamlMetadataRendering = {
|
|
|
13
13
|
};
|
|
14
14
|
/** Pure selected-metadata formatting, not admission or authority. */
|
|
15
15
|
export declare function renderYamlMetadata(value: unknown, byteBudget: number): YamlMetadataRendering;
|
|
16
|
+
export type YamlPart = {
|
|
17
|
+
full: Record<string, unknown>;
|
|
18
|
+
selected: Record<string, unknown>;
|
|
19
|
+
};
|
|
20
|
+
/** One selected metadata node, kept whole or covered by a field/group omission. */
|
|
21
|
+
export declare function selectYamlNode(key: string, value: unknown, byteBudget: number, total?: number): YamlPart;
|
|
22
|
+
/** Opaque selected text or string sequence; malformed selections stay unavailable without repair. */
|
|
23
|
+
export declare function selectYamlField(key: string, value: string | readonly string[], byteBudget: number): YamlPart;
|
|
24
|
+
/** Grow whole selected fields in priority order while the complete document still fits. */
|
|
25
|
+
export declare function growYamlDocument(render: () => Record<string, unknown>, order: readonly YamlPart[], byteBudget: number): string;
|
|
26
|
+
/** Uncapped UI-only flat metadata; never borrow a model-output allowance for notices. */
|
|
27
|
+
export declare function formatYamlNotice(value: Record<string, string | number | boolean>): string;
|
|
28
|
+
/** Close one rendered YAML header; a separate opaque body gets exactly one delimiter pair. */
|
|
29
|
+
export declare function frameMetadataDocument(header: string, body?: string): string;
|
|
16
30
|
export declare function formatMarkdownField(key: string, value: string, depth?: number): string;
|
|
17
31
|
export declare function formatInspectNextAction(target: string, view: string, verbose?: boolean): string;
|
|
18
32
|
export declare function formatLiteralBlock(value: string): string;
|
|
@@ -42,6 +56,10 @@ export declare function spawnMetadataText(value: unknown, verbose: boolean | und
|
|
|
42
56
|
export declare function compactRecipeImports(summary: Record<string, unknown>): string;
|
|
43
57
|
export declare function compactRecipeDoctor(summary: Record<string, unknown>): string;
|
|
44
58
|
export declare function recipeRegistryNextActions(summary: Record<string, unknown>, view: string): string[];
|
|
59
|
+
/** Compact metadata-only document text: one leading LF, no trailing LF, shared emitter budget. */
|
|
60
|
+
export declare function compactYamlDocument(value: Record<string, unknown>): string;
|
|
61
|
+
/** Only the closed read-only Recipe inspect literals become typed next; other advice stays opaque content. */
|
|
62
|
+
export declare function nextActionMetadata(action: string, byteBudget: number): YamlPart;
|
|
45
63
|
/** Only these existing read-only inspection hints become action nodes; other advice stays content. */
|
|
46
64
|
export declare function formatInspectionHint(action: string): string;
|
|
47
65
|
export declare function compactRecipeRegistry(summary: Record<string, unknown>): string;
|
|
@@ -101,6 +101,62 @@ export function renderYamlMetadata(value, byteBudget) {
|
|
|
101
101
|
return { state: "unavailable", reason: "metadata_invalid" };
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
/** One selected metadata node, kept whole or covered by a field/group omission. */
|
|
105
|
+
export function selectYamlNode(key, value, byteBudget, total = 1) {
|
|
106
|
+
const full = { [key]: value };
|
|
107
|
+
const complete = renderYamlMetadata(full, byteBudget);
|
|
108
|
+
const invalid = complete.state === "unavailable" && complete.reason === "metadata_invalid";
|
|
109
|
+
const omitted = { [key]: invalid ? "[unavailable]" : "[omitted]",
|
|
110
|
+
[key + "_omission"]: { reason: invalid ? "invalid_selected_metadata" : "response_too_large", shown: 0, omitted: total, total } };
|
|
111
|
+
const fallback = renderYamlMetadata(omitted, byteBudget);
|
|
112
|
+
// Seed the shorter complete-or-omitted form: omission scaffolding must never manufacture overflow.
|
|
113
|
+
const selected = complete.state === "available" && fallback.state === "available" &&
|
|
114
|
+
Buffer.byteLength(complete.text) <= Buffer.byteLength(fallback.text) ? full : omitted;
|
|
115
|
+
return { full: invalid ? omitted : full, selected };
|
|
116
|
+
}
|
|
117
|
+
/** Opaque selected text or string sequence; malformed selections stay unavailable without repair. */
|
|
118
|
+
export function selectYamlField(key, value, byteBudget) {
|
|
119
|
+
const values = typeof value === "string" ? [value] : value;
|
|
120
|
+
if (values.every(item => item.isWellFormed()))
|
|
121
|
+
return selectYamlNode(key, typeof value === "string" ? value : [...value], byteBudget, typeof value === "string" ? 1 : value.length);
|
|
122
|
+
const total = typeof value === "string" ? 1 : value.length;
|
|
123
|
+
const omitted = { [key]: "[unavailable]",
|
|
124
|
+
[key + "_omission"]: { reason: "malformed_selected_text", shown: 0, omitted: total, total } };
|
|
125
|
+
return { full: omitted, selected: omitted };
|
|
126
|
+
}
|
|
127
|
+
/** Grow whole selected fields in priority order while the complete document still fits. */
|
|
128
|
+
export function growYamlDocument(render, order, byteBudget) {
|
|
129
|
+
const fits = () => renderYamlMetadata(render(), byteBudget).state === "available";
|
|
130
|
+
for (const part of order) {
|
|
131
|
+
if (part.selected === part.full)
|
|
132
|
+
continue;
|
|
133
|
+
const previous = part.selected;
|
|
134
|
+
part.selected = part.full;
|
|
135
|
+
if (!fits())
|
|
136
|
+
part.selected = previous;
|
|
137
|
+
}
|
|
138
|
+
const rendered = renderYamlMetadata(render(), byteBudget);
|
|
139
|
+
if (rendered.state !== "available")
|
|
140
|
+
throw new Error("Selected YAML metadata document is unavailable: " + rendered.reason);
|
|
141
|
+
return rendered.text;
|
|
142
|
+
}
|
|
143
|
+
/** Uncapped UI-only flat metadata; never borrow a model-output allowance for notices. */
|
|
144
|
+
export function formatYamlNotice(value) {
|
|
145
|
+
const selected = {};
|
|
146
|
+
for (const [key, field] of Object.entries(value)) {
|
|
147
|
+
if (typeof field === "string" && !field.isWellFormed()) {
|
|
148
|
+
selected[key] = "[unavailable]";
|
|
149
|
+
selected[key + "_omission"] = { reason: "malformed_selected_text", shown: 0, omitted: 1, total: 1 };
|
|
150
|
+
}
|
|
151
|
+
else
|
|
152
|
+
selected[key] = field;
|
|
153
|
+
}
|
|
154
|
+
return yamlMetadataText(selected).replace(/\n$/u, "");
|
|
155
|
+
}
|
|
156
|
+
/** Close one rendered YAML header; a separate opaque body gets exactly one delimiter pair. */
|
|
157
|
+
export function frameMetadataDocument(header, body) {
|
|
158
|
+
return body === undefined ? header : `---\n${header}---\n${body}`;
|
|
159
|
+
}
|
|
104
160
|
export function formatMarkdownField(key, value, depth = 0) {
|
|
105
161
|
const indent = " ".repeat(depth);
|
|
106
162
|
return /[\r\n]/u.test(value)
|
|
@@ -464,6 +520,26 @@ export function recipeRegistryNextActions(summary, view) {
|
|
|
464
520
|
}
|
|
465
521
|
return [...new Set(actions)].slice(0, 4);
|
|
466
522
|
}
|
|
523
|
+
/** Compact metadata-only document text: one leading LF, no trailing LF, shared emitter budget. */
|
|
524
|
+
export function compactYamlDocument(value) {
|
|
525
|
+
const text = growYamlDocument(() => value, [], Limits.RUN_DELIVERY_MODEL_MAX_BYTES);
|
|
526
|
+
return `\n${text.replace(/\n$/u, "")}`;
|
|
527
|
+
}
|
|
528
|
+
/** Only the closed read-only Recipe inspect literals become typed next; other advice stays opaque content. */
|
|
529
|
+
export function nextActionMetadata(action, byteBudget) {
|
|
530
|
+
const recognized = [
|
|
531
|
+
["inspect target=recipes view=doctor", "doctor", false],
|
|
532
|
+
["inspect target=recipes view=imports verbose=true", "imports", true],
|
|
533
|
+
["inspect target=recipes view=summary verbose=true", "summary", true],
|
|
534
|
+
];
|
|
535
|
+
const match = recognized.find(([literal]) => literal === action);
|
|
536
|
+
if (match) {
|
|
537
|
+
const typed = { next: { tool: "inspect", target: "recipes", view: match[1], ...(match[2] ? { verbose: true } : {}) } };
|
|
538
|
+
return { full: typed, selected: typed };
|
|
539
|
+
}
|
|
540
|
+
const instruction = selectYamlField("instruction", action, byteBudget);
|
|
541
|
+
return { full: { next: instruction.full }, selected: { next: instruction.selected } };
|
|
542
|
+
}
|
|
467
543
|
/** Only these existing read-only inspection hints become action nodes; other advice stays content. */
|
|
468
544
|
export function formatInspectionHint(action) {
|
|
469
545
|
if (action === "inspect target=recipes view=doctor")
|
|
@@ -475,21 +551,11 @@ export function formatInspectionHint(action) {
|
|
|
475
551
|
return formatMarkdownField("instruction", action);
|
|
476
552
|
}
|
|
477
553
|
export function compactRecipeRegistry(summary) {
|
|
478
|
-
const
|
|
479
|
-
const shadowed =
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
const disabled = Array.isArray(summary.disabled)
|
|
484
|
-
? summary.disabled.length
|
|
485
|
-
: 0;
|
|
486
|
-
const diagnostics = Array.isArray(summary.diagnostics)
|
|
487
|
-
? summary.diagnostics.length
|
|
488
|
-
: 0;
|
|
489
|
-
const drafts = Array.isArray(summary.drafts) ? summary.drafts.length : 0;
|
|
490
|
-
const recommendations = Array.isArray(summary.recommendations)
|
|
491
|
-
? summary.recommendations.length
|
|
492
|
-
: 0;
|
|
554
|
+
const count = (key, source) => Array.isArray(source) ? source.length : 0;
|
|
555
|
+
const active = count("active", summary.active), shadowed = count("shadowed", summary.shadowed);
|
|
556
|
+
const invalid = count("invalid", summary.invalid), disabled = count("disabled", summary.disabled);
|
|
557
|
+
const diagnostics = count("diagnostics", summary.diagnostics), drafts = count("drafts", summary.drafts);
|
|
558
|
+
const recommendations = count("recommendations", summary.recommendations);
|
|
493
559
|
const skillCatalogPartial = summary.skill_recipe_catalog_partial === true;
|
|
494
560
|
const currentPolicy = Array.isArray(summary.active)
|
|
495
561
|
? summary.active.filter((entry) => entry.current_policy).length
|
|
@@ -497,11 +563,12 @@ export function compactRecipeRegistry(summary) {
|
|
|
497
563
|
const nextActions = Array.isArray(summary.next_actions)
|
|
498
564
|
? summary.next_actions
|
|
499
565
|
: [];
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
566
|
+
const hint = nextActions.length ? nextActionMetadata(nextActions[0], Limits.RUN_DELIVERY_MODEL_MAX_BYTES) : undefined;
|
|
567
|
+
const render = () => ({ recipes: "registry", active, drafts, shadowed, invalid, disabled,
|
|
568
|
+
current_policy: currentPolicy, skill_catalog_partial: skillCatalogPartial, recommendations, diagnostics,
|
|
569
|
+
...(hint ? hint.selected : {}) });
|
|
570
|
+
return hint
|
|
571
|
+
? `\n${growYamlDocument(render, [hint], Limits.RUN_DELIVERY_MODEL_MAX_BYTES).replace(/\n$/u, "")}`
|
|
572
|
+
: compactYamlDocument(render());
|
|
506
573
|
}
|
|
507
574
|
export const DEFAULT_INSPECT_LINES = Limits.DEFAULT_INSPECT_LINES;
|
package/dist/lib/tools-spawn.js
CHANGED
|
@@ -52,22 +52,29 @@ function writeSpawnDraftRecipe(input, meta) {
|
|
|
52
52
|
}
|
|
53
53
|
/** Compiler-owned pre-launch diagnostics only; selected caller values are not admitted Run ids. */
|
|
54
54
|
function spawnGuardText(kind, value) {
|
|
55
|
-
const field = ToolsResponse.formatMarkdownField;
|
|
56
55
|
const facts = kind === "state_dir"
|
|
57
|
-
?
|
|
58
|
-
:
|
|
59
|
-
...(kind === "id" ?
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
? { result: "unsupported field", reason: "Run state is runtime-owned; run:<id> remains addressable and retention-safe." }
|
|
57
|
+
: { result: kind === "namespace" ? "unsupported Run target" : "invalid Run target", accepted_format: "run:<id>",
|
|
58
|
+
...(kind === "id" ? { id_rule: "nonempty ASCII letters, digits, underscore, dot or hyphen" } : {}) };
|
|
59
|
+
// Measure the shared emitter's own projection: an unfit selected value must become an omission, not a clip.
|
|
60
|
+
const render = (selected) => {
|
|
61
|
+
const rendered = ToolsResponse.renderYamlMetadata({ field: kind === "state_dir" ? "state_dir" : "as", ...(selected ?? {}), ...facts }, Limits.RUN_DELIVERY_MODEL_MAX_BYTES);
|
|
62
|
+
return rendered.state === "available"
|
|
63
|
+
? ToolsResponse.withLeadingLineBreak(ToolsResponse.frameMetadataDocument(rendered.text))
|
|
64
|
+
: undefined;
|
|
65
|
+
};
|
|
66
|
+
const required = (selected) => render(selected) ?? render();
|
|
67
|
+
const wellFormed = value !== undefined && value.isWellFormed();
|
|
68
|
+
if (value !== undefined && wellFormed) {
|
|
69
|
+
const complete = render({ value });
|
|
70
|
+
if (complete !== undefined && Buffer.byteLength(complete) <= Limits.RUN_DELIVERY_MODEL_MAX_BYTES)
|
|
67
71
|
return complete;
|
|
68
72
|
}
|
|
73
|
+
if (value === undefined)
|
|
74
|
+
return required();
|
|
69
75
|
const reason = wellFormed ? "response_too_large" : "malformed_selected_text";
|
|
70
|
-
return
|
|
76
|
+
return required({ value: reason === "response_too_large" ? "[omitted]" : "[unavailable]",
|
|
77
|
+
value_omission: { reason, shown: 0, omitted: 1, total: 1 } });
|
|
71
78
|
}
|
|
72
79
|
function runIdFromTarget(target) {
|
|
73
80
|
if (!target)
|
|
@@ -6,9 +6,12 @@ Preserve the intended logical identity and diagnose through public pi-actors sur
|
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
inspect target=recipes view=status
|
|
9
|
+
inspect target=recipes view=summary
|
|
9
10
|
inspect target=recipes view=doctor identity=<skill>/<recipe>
|
|
10
11
|
```
|
|
11
12
|
|
|
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.
|
|
14
|
+
|
|
12
15
|
Compact Recipe/Run/tool replies use flat AX fields without changing their existing evidence or authorization. Required/optional tool arguments are sequences, with none distinct from unknown. Focused source_location remains one exact literal value. Run compact replies still identify only run/view: request verbose for structured evidence, and tool schema remains structured even without verbose. Compact text selects at most one existing hint; only exact read-only recipes doctor/imports/summary inspection literals become typed next nodes. Other advice stays instruction content with its original Markdown, never executable metadata or authority to rerun work/register a tool. The full original next_actions array remains in details; do not infer callability from an advisory string.
|
|
13
16
|
|
|
14
17
|
Use the focused doctor form for one intended identity. It reports active-Skill ownership, exact resolvability, partial-catalog state, component status, portable source location, resolution generation, any rejection, and bounded next actions. Use the unfiltered doctor only for catalog-wide diagnosis. A partial catalog does not imply every exact component is unavailable. If the owning Skill is inactive, report that blocker rather than locating and running its helper manually.
|
package/docs/README.md
CHANGED
|
@@ -20,6 +20,7 @@ Living index of all documentation in the `/docs` directory.
|
|
|
20
20
|
|
|
21
21
|
- [windows-process-observation.md](./windows-process-observation.md) — User-approved recovery preparation: passing inert Windows x64 MI child experiment, reviewed unadmitted raw codec and artifact preparation contract; broader profile evidence, unsigned asset distribution and default activation remain separate gates
|
|
22
22
|
- [run-supervision.md](./run-supervision.md) — Accepted future supervision contract and implemented AX/evidence slices, with same-logical-session file research and candidate-bound acceptance; the next selective AX/runtime release does not enable deadlines, independent owner-loss supervision or public completion streams
|
|
23
|
+
- [inactive-foundations-inventory.md](./inactive-foundations-inventory.md) — Reachability and package evidence for packaged-but-unactivated supervision, stream-numbering and native foundations, distinguishing reviewed runtime dependencies from optional ones; no removal decision, nothing activated
|
|
23
24
|
- [composition-transport.md](./composition-transport.md) — Recorded design intake: portable JSONL Recipe bundles and optional host CodeMode orchestration, with launch/outcome separation; bundle grammar and asset scope remain unadopted and outside the current UX/AX release
|
|
24
25
|
|
|
25
26
|
## Project Surfaces
|
package/docs/actor-inspector.md
CHANGED
|
@@ -104,7 +104,7 @@ Esc is the notification's only dismissal action. Action, confirmation, tab and s
|
|
|
104
104
|
|
|
105
105
|
Both notification and Kill dialogs have a two-terminal-column left inset for content and one blank row above and below it. Their borders use borderAccent; keys use accent, descriptions use borderAccent and hint groups are separated by borderAccent frame segments, through the same formatter as the main Inspector. On the lowest available height, decorative blank rows yield to readable text, pinned safety and choices. Narrow confirmations may stack the two choices and wrap the pinned warning rather than clipping either. Both dialogs use the terminal's default background, not a pale theme fill or hard-coded black. Borders and foreground status colors remain; selected confirmation buttons retain their focus background. Popup composition masks only its own rectangle and never inserts a data row or shifts the document, stripes, selection or scroll. The last normal Inspector frame is frozen underneath the modal; resizing reuses those captured cells without new evidence reads. Closing resumes normal rendering/invalidation, not a renewed ownership/native guarantee.
|
|
106
106
|
|
|
107
|
-
Only feedback from the existing Kill callback path pins closure: unconfirmed and No automatic retry outside the popup's scrollable text. This records entry into an action-port path, not native actuation or proven no effects. Local guards do not gain those action uncertainty labels. Routine cancellation is silent: Esc/n or Enter on Cancel closes the confirmation and immediately returns to the same Inspector, without a Notice or an extra dismissal. The popup exposes only the existing selected message, not raw Error/cause or lost180/160-unit tails. Fresh Kill producers now wrap selected values in AX action/result/state-or-diagnostic/closure records. Domain180-unit normalization/trim and overlay160-unit normalization/slice remain the source stages; their already discarded Markdown/tails/causes are not recovered. A pair crossing the prefix end retracts one code unit; a malformed selected preview is unavailable with unknown loss rather than repaired text. Dynamic legacy previews state unproven upstream completeness/privacy, never an exact private-tail count. Compiler refusals add no invented legacy omission. Message/result shape and actuation stay unchanged; saved journals are not rewritten. Source/installed tests cover full opaque access, narrow columns/low rows, scroll/return/selector behavior, no action replay, original Error.message observation and unchanged selected caught-error bytes. Actual operator-loaded colored-terminal/phone acceptance remains separate.
|
|
107
|
+
Only feedback from the existing Kill callback path pins closure: unconfirmed and No automatic retry outside the popup's scrollable text. This records entry into an action-port path, not native actuation or proven no effects. Local guards do not gain those action uncertainty labels. Routine cancellation is silent: Esc/n or Enter on Cancel closes the confirmation and immediately returns to the same Inspector, without a Notice or an extra dismissal. The popup exposes only the existing selected message, not raw Error/cause or lost180/160-unit tails. Fresh Kill producers now wrap selected values in AX action/result/state-or-diagnostic/closure records. Domain180-unit normalization/trim and overlay160-unit normalization/slice remain the source stages; their already discarded Markdown/tails/causes are not recovered. A pair crossing the prefix end retracts one code unit; a malformed selected preview is unavailable with unknown loss rather than repaired text. Dynamic legacy previews state unproven upstream completeness/privacy, never an exact private-tail count. Compiler refusals add no invented legacy omission. Message/result shape and actuation stay unchanged; saved journals are not rewritten. Popup color recognition matches only the exact leading AX header pair: current producer results render failed/rejected as error and unavailable state-only results as warning, while authored text that merely contains those lines stays warning because no body label, message tail or legacy prose becomes an action, identity or closure fact. Source/installed tests cover full opaque access, narrow columns/low rows, scroll/return/selector behavior, no action replay, original Error.message observation and unchanged selected caught-error bytes, plus real producer-result classification for both colors and unanchored-lookalike rejection. Actual operator-loaded colored-terminal/phone acceptance remains separate.
|
|
108
108
|
|
|
109
109
|
## Kill confirmation
|
|
110
110
|
|
|
@@ -132,4 +132,4 @@ Run kill revalidates owner and generation through the canonical lifecycle path.
|
|
|
132
132
|
|
|
133
133
|
## Scope
|
|
134
134
|
|
|
135
|
-
The Actor Inspector treats each Run as a concrete actor instance. It does not expose group conversations, peer addresses, routing, or communication topology. Use `inspect target=runtime view=status|runs|triage`, `inspect target=recipes view=status|summary|doctor|imports|reviews
|
|
135
|
+
The Actor Inspector treats each Run as a concrete actor instance. It does not expose group conversations, peer addresses, routing, or communication topology. Use `inspect target=runtime view=status|runs|triage`, `inspect target=recipes view=status|summary|doctor|imports|reviews` (`registry` is the same view as `summary`), and `inspect target=tool:<name> view=status|schema` for non-Run management targets. See [Management Inspection](./inspection.md) for exact applicability and authorization boundaries.
|
package/docs/agent-experience.md
CHANGED
|
@@ -110,6 +110,14 @@ state: running
|
|
|
110
110
|
launch_kind: spawn
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
### Current rollout status
|
|
114
|
+
|
|
115
|
+
Migrated owned projections emit block YAML (bare when metadata-only, one delimiter pair before a separate selected body): Control receipts, guards and the awaiting-dispatch notice; inspect refusals, compact Run/runtime/tool/Recipe success views and the explicit `tool:* view=schema` text; registry registration/listing/deletion/draft receipts and all locally authored refusals; registered-command success bodies and failure exit-status documents; the local usage/argument-repair heading; pre-launch spawn guards; runtime callback failure, completion recovery/acceptance, steer diagnostics and the shutdown teardown report; watcher and retirement notices; and fresh completion/attention captures.
|
|
116
|
+
|
|
117
|
+
Deliberately still on their earlier layout: registry activation/promotion/deletion notices and runtime startup warnings (flat report/category fields, separately scoped), Inspector UI feedback and chrome (UI text whose recognition is verified separately, not model-facing metadata), and every retained historical completion/packet encoding, which replays its exact saved bytes. Machine `details`, verbose JSON, canonical journals and literal source files are not presentation targets.
|
|
118
|
+
|
|
119
|
+
The rollout audit for this state found no second or missing host-separation blank line on a migrated model-facing path and no runtime-authored object dump or `- key:` pseudo-record left in the migrated set; the shared helpers `withLeadingLineBreak`, `formatToolText`, `compactYamlDocument` and `spaceToolError` are the single framing owners, guarded by `tests/tools-response.test.ts`. Loaded terminal/phone acceptance and any service-carrier change remain separate gates.
|
|
120
|
+
|
|
113
121
|
## Service Framing Is Not Authored Content
|
|
114
122
|
|
|
115
123
|
The target readable runtime output contains no pi-actors HTML-comment transport framing. Audit each service field against actual consumers first: remove unnecessary fresh data rather than relocating the whole existing payload. If content-carried service data is necessary, prefer its minimum in the response's block-YAML header metadata, not an HTML tail. Separately review the actual Pi storage/model/UI path and preserve the required functions; the current mechanism is not itself a requirement. This does not adopt a new kernel interface or assert that hidden `details` alone is sufficient. Prove persisted replay, model-context acceptance/recovery, full-content binding, independent header/body boundaries, fallback and fixed budgets before switching.
|
|
@@ -192,7 +200,7 @@ The [runtime output projection map](output-projection-map.md) names the audited
|
|
|
192
200
|
|
|
193
201
|
The prepared `tools-response.ts` `renderYamlMetadata` foundation uses the directly declared `yaml@2.9.0` public API for selected own-data mappings/sequences. It emits bare YAML without invocation spacing or body processing, preserves scalar types/strings and refuses unsupported or over-budget whole values. Its execution ceiling is 49,152 bytes and supported nesting is at most 64 levels; these are not caller allowances or drop-in compatibility for larger existing budgets. Preflight bounds scalar/node traversal, not atomic key enumeration or arbitrary Proxy execution. Focused parser/property and shared response-owner tests cover this foundation; compact asynchronous launch receipts are the first production caller. Other surfaces and loaded-host acceptance remain separately staged; full spawn-verbose shares the final YAML style without inheriting this bounded emitter's limits.
|
|
194
202
|
|
|
195
|
-
The following is the current pre-unification implementation inventory, not a set of alternate adopted output styles. Existing flat records, literal JSON fields, verbose JSON and retained-layout HTML compiler frames remain code facts until their owned rollout changes; the target above does not restyle or relabel stored text. This standard spans surfaces, not a new library domain. Control compact-result/public-error remains locally implemented and source/npm verified using flat records, no duplicated run namespace, stage/reuse distinctions, typed selective inspect next nodes and opaque multiline values. Launch model/thinking groups use the concise `model` and `thinking` labels and preserve their actual source/value relationship; compact launch navigation now remains one whole native YAML value or explicit whole-row omission within16KiB including invocation-response spacing. Full spawn-verbose in source and normally built packages uses the legacy once-only JSON selection followed by clone-only YAML, without a new fixed byte/depth cap. Absent selected JSON, malformed selected text or recoverable post-selection failures withhold the whole projection with an attributable no-auto-repeat warning; original selection throws and structured details remain unchanged. Source/unit and installed compiled response checks, the strict ordinary-metadata source/packed completion journey, and all three source/packed navigation owners are accepted within their bounded domains. Native assertions remain indirect proof, not current global absence. Owning Skill byte parity does not establish a loaded-host change. The older field/inspect-action primitives remain with their unmigrated consumers; compact launch serialization now uses the YAML metadata primitive. Structured/verbose results, exact dispatch/private error causes and old completion handoff text retain their contracts. Fresh ordinary source completion admission captures canonical AX with the private completion_yaml_core_v1 layout: index-first YAML, independently rendered raw Markdown and cut-local [N characters omitted]. The minimal ordinary hint binds whole content to the YAML core, whose relative lengths derive header/body/marker boundaries without fresh HTML tails. Retained completion_frontmatter_v1 hints keep their complete ranges and original compiler frames; neither hint name is a public selector. Only valid compiler headers can hide whole reference/location rows. Markers remain literal and body-authored labels never become metadata/actions. Expansion and invalid/missing hints reveal full original text. These checks establish display consistency, not authentication, source/read scope or acceptance; display line-ending/tab handling never rewrites saved content. Routine state-equivalent summaries remain in the journal, not the new model content; meaningful summaries, loss/redaction/unavailability and reference coverage remain visible. Exact source/generation/parent bindings, whole references and fresh48KiB/64row limits include hidden technical data; retained codecs keep16KiB. The postprivacy byte budget is divided equally between candidate rows: roughly48KiB for one,24KiB each for two,16KiB each for three, less encoded service overhead. Whole admitted text uses result only when it fits without known upstream clipping; otherwise preview uses the safe prefix with exact retained-source omissions. There is no fixed16KiB result/2KiB preview cap and no render-time source IO or reallocation. Already-retained packets keep their exact captured bytes; pre-record messages keep the host renderer and retained record messages keep their original verified view. The Pi boundary recognizes the strict whole YAML core for ordinary source records, or original closed markers/anchored headers for retained captures, after private details are stripped, preserving exact owned-context acceptance without interpreting authored body labels. Actual actors guidance describes this implemented fresh-capture route; this is not a claim that a loaded host was reloaded. Fresh source urgent-steer captures use typed YAML metadata and a separate raw selected body before saving immutable envelope.content: complete final-message fitting and whole reference sequences retain16KiB/eight-slot bounds. Ordinary attention remains unbounded; bounded source/compiled/actual-default acceptance does not establish loaded-host acceptance. Existing envelopes are not reinterpreted, and no older new-message default remains. Fresh ordinary notify/followup uses one AX formatter in the existing sink: the same opaque checkpoint/body and whole first-eight reference projection, without borrowing steer's shared byte cap or changing routing. Committed history keeps its exact text; the retired presentation selector is not a compatibility API. Fresh read-time agent Trace preview leaves now also use boundary U+2026, exact admitted normalized-retained-turn omissions and separately unknown upstream loss, without changing the160UTF-16 source allowance, identifiers/chronology, detail/source data or public JSON schema. Malformed text is unknown, not repaired; no journal capture aspect is minted for a derived current read. New urgent admission/send/recovery diagnostics now also use event/attention/stage AX records, opaque raw240-unit previews and unknown loss while their persisted message-only evidence stays unchanged. A failed send leaves delivery/presentation unconfirmed, and unknown/conflicting queued recovery does not force replay. Fresh non-runtime explicit inspection also uses AX records: unchanged Run/view headers, tool activation/argument sequences and Recipe registry/focused-doctor facts, whole portable source literals and one selected hint. Only the three existing closed read-only Recipe inspect literals become typed next; other advisory strings remain opaque instruction values with full next_actions retained in unchanged details/verbose JSON. Existing body/scope/budget/default-status contracts stay independent. Compact runtime status/runs/triage now also presents only its existing facts/counts as AX fields, with full owned inventory independent from bounded verbose navigation and bounded triage rows. Core callback/completion/recovery/teardown notices use opaque fields and explicit receipt/report stages without altering their source, errors, acceptance or native authority. Producer-owned watcher/retirement notices now also use AX: whole literal paths and opaque diagnostics preserve raw signature/dedup/rearm behavior, while returned stop/reported cancellation/skip/failure remain non-closure reports with exact existing optional-notifier/error observation semantics. Inspector document/detail rendering now uses flat semantic fields, real sequence lists and opaque literal terminal values, with ephemeral compiler-label provenance instead of parsing authored colon/bullet lines as metadata. Separator-preserving native-column wrapping keeps whole text/references, source values, root stripes and existing identity/chronology/navigation/source bounds. Empty containers remain typed values; terminal line-ending/tab display policy does not rewrite source. Ten locally authored inspect refusals now also use AX fields and true supported-value sequences, preserving their original guards and Error/dependency behavior. Only the two already-guided tool failures retain typed read-only next actions. New local error text shares16KiB including public spacing; variable fields/actions are whole or explicitly counted omitted without shortening targets, reading raw private lengths or wrapping unowned exceptions. Session/source/dependency errors keep their separate owners and old catches rather than being globally restyled. Inspector Kill confirmation now also uses captured run/state/action AX fields with whole-value paging, while both choices and closure: unconfirmed remain pinned at narrow/low viewports. Read-only PgUp/PgDn preserves original Cancel/choice/confirmation/generation behavior and adds no actuation or source permission. Inspector Kill cancellation only closes the dialog; successful actions use the selected Run's visible status without a second Notice. Failures/refusals/uncertainty remain visible, and notifications on other surfaces are not suppressed. Remaining Inspector feedback shows the complete selected opaque message directly in a modal popup over unchanged data rows, without i prefix/command or another reader. Esc dismisses; only physical overflow scrolls within that same popup. Kill uses the same centered rectangle compositor. Both use terminal-default backgrounds rather than a theme fill, two-column left content insets and top/bottom blank spacing, plus the Inspector's shared frame/key/description color grammar. On space-constrained heights, safety/choices/readable text take priority over decorative blanks. They keep the captured underlay stable through resize/invalidation and resume ordinary refresh on close, without fresh evidence/native authority. Action-port feedback pins closure uncertainty/no automatic retry without inferring native effects from message text. Fresh Kill producers now use a shared pure selected-value AX formatter: domain180-unit normalization/trim and overlay160-unit normalization/slice remain, while a cut pair retracts one unit and malformed selected text is unknown/unavailable. Dynamic legacy values state upstream completeness/privacy unproven, with unknown local clipping markers rather than private-tail counts; compiler refusals add no fake loss. ok/callback/getter/coercion/error semantics and old success suppression stay unchanged, and the popup's anchored header recognition affects color only. This does not recover discarded Markdown/causes or create a saved capture version. Trace table rows now mark actual column/line gaps with native ellipsis while preserving full selected item/detail, and compact warning captions keep incomplete-history/non-lifetime/unavailable-rank meaning visible at narrow widths. This is UI preview loss only, not new source/private character counts, rank/identity changes or a generic selector/fit rewrite. Four locally authored Control pre-dispatch guards now also use caller target/action/result and actual supported/available-action sequences: whole target/list groups fit16KiB including public spacing or carry field/entry omission counts, while malformed selected text is unavailable without repair. Original guard/getter/join/coercion observations, plain Error/host-error behavior and all unowned/dispatch exceptions stay separate; no input/status/correlation/retry/no-effects or new dispatch authority follows. Three local spawn pre-launch guards now use field/result and opaque selected caller value rather than inventing an admitted Run: unsupported state_dir, missing run: namespace and invalid id. Whole valid-scalar values fit16KiB or are omitted; malformed selections are unavailable, without repair or source/private-tail counts. Original input/method/coercion/launch behavior stays separate. The real host still rejects unsupported state_dir through its own unchanged schema before the facade, so this does not claim all SDK validation errors are AX. Namespace/id guard errors retain real host isError behavior. Successful normal registration/update-or-persisted receipts now use original tool/outcome/source/callable facts, actual required/optional argument and warning lists, a whole fenced non-template source and one prior hint. Invocation advice stays opaque instruction; only the producer-known unverified tool-status hint is typed next. Complete safety warnings have first budget priority; all variable fields/groups/actions fit16KiB including public spacing or show whole selected-field/entry omission, with malformed selections unavailable without repair. Original post-effect warning/argument/coercion/boundary observations and all transaction/details/notify/error behavior remain. This is not new callability, host activation, rollback or invocation authority. Registry current-name listing and deletion returns now also use AX: original sorted/captured names are a whole selected group with shown/omitted/total coverage, never a new page/work quota or active/callable/global registry claim. Overlarge groups are wholly omitted and malformed groups unavailable without raw-key re-coercion or repair. Deletion keeps original selected tool/result and the exact operator reload note as opaque instruction; current-map not found stays a returned result, not a new error or orphan-file cleanup. Lookup/file/deactivation/notify/errors/details remain unchanged, including post-effect failures. Draft promotion success now also uses only its prior selected name/new-update/source=draft/exact callable display/first hint as AX. It does not inherit ordinary-registration args/warnings/boundary facts or change its admission/rollback policy. Original template String conversions remain after notify, including zero/object/Symbol behavior and post-effect failures. Whole scalars/actions fit16KiB or are explicitly omitted/unavailable; only the closed producer-known read-only status hint is typed, and invocation advice is opaque. Machine details/bytes and later activation observations remain unchanged. Four local registration source-mode errors now use only compiler-owned field/result records and actual replacement/reference-form/source-mode/inherited-field sequences, with previous correction advice as opaque instruction. No supplied source values, new helper/wrapper or changed guard/descriptor/getter/trim order. The host still owns cloning, coercion and schema validation: rejected extra/object fields need not reach these AX guards, while numeric input may normalize and preserve a non-error unnamed list result. This is not new schema, no-effects or automatic retry authority. Three ordinary name/source refusals now also use AX: invalid normalized name without raw caller echo, reserved selected-name value whole or explicitly omitted/unavailable, and missing source only for a new registration with actual source choices/opaque prior advice. Original normalization/reserved-set/resolution/lookup/blocker/fault order stays unchanged; empty-name listing, existing-tool update with retained source and dependency blocker text are not reinterpreted. SDK clone/coercion/schema remains separate. Ordinary and draft duplicate-registration refusals now show their original selected name whole/omitted/unavailable plus the original update advice as opaque instruction; distinct authoritative-file/Map/exists/blocker/update predicates and original single display coercion stay unchanged. No overwrite/retry, body-read or no-effects authority follows. Template-shape helper errors now also use fixed template/result records for nested Recipe objects, empty sequences and unsupported types, with actual supported-kind lists/opaque old correction and no supplied value echo. Getter/Array/reference/key/expand semantics and external errors stay exact; null/undefined/deletion/retained-source behavior and SDK coercion remain separate. Authored-Recipe non-object defaults, missing command description, null-at-authoring and missing-final-template constants now also use fixed field/result, without new value echoes or changes to args/from/description/default/retained-source order. Front deletion, inheritance and Schema/dependency errors keep separate ownership. The delegated runtime-owned-default-key refusal now shows only its original first selected key, defaults/result and opaque old correction. Full copy/find order, eight-name membership and the delegated-only condition remain; no all-key/value disclosure, early rejection optimization or new retry authority. Two draft-path refusals now show only their old captured allowed root or resolved path as complete dynamically fenced literals, or explicit whole-reference omission/unavailability under16KiB. Refused caller path stays undisplayed in root refusal; existing containment/exists/getter/error behavior and opaque prior advice are unchanged, not new absence/native proof. Public from-normalization refusal now also uses only its old displayed source/reason/legacy summary/doctor advice as AX, preserving inner errors, catch/coercion/method order and source/hint disagreement. Source is a whole literal; reason/summary preserve opaque Markdown, and advice is instruction content. Monotone whole-field omission/unavailability fits16KiB without parsing old summary text, adding causes/counts or widening source/catch authority. Normal candidate-admission refusal now also projects only its old source-conditional displayed source/joined diagnostics/legacy summary/advice, preserving branch/coercion/join and pre-Error order. Existing4096-unit upstream admission diagnostic clipping is not widened or repaired; selected summary fields are whole/omitted/unavailable under16KiB, with fitting diagnostics first. This adds no admission policy, full diagnostics/source proof or rollback/readiness authority. Draft raw/candidate invalid-Recipe errors now likewise expose only old optional reason/joined diagnostics with fixed draft/result, preserving separate read/diagnose, truthiness/coercion, Error-before-join and legacy diagnostic bounds. No new path/body, cause, reader, policy or retry follows; whole opaque values fit16KiB or are explicitly omitted/unavailable. Outer registration transaction errors now also project only old post-cleanup stage/resolution-generation/legacy summary/error, preserving cleanup and fallible template order exactly. Resolution generation is not a Run epoch; fitting surfaced error has budget priority and opaque inner rollback/advice text is not a new guarantee. No replay, extra cause/source read or changed transaction policy follows. Registry activation/promotion/deletion notices now also use report/tool AX fields for only old compiler report identity/name, preserving callback order/info type/faults and real hasUI gate. Report wording is not callable/full-host-removal proof. UI text stays literal with native wrapping; no borrowed model16KiB cap, whole well-formed values retained and malformed selected name unavailable. RPC delivery remains fire-and-forget, and loaded UI acceptance stays separate. Recipe registry watcher warning/refresh messages now also use report and opaque instruction constants only, preserving their distinct direct ctx.ui.notify calls (no added hasUI gate), failure dedup/pending-load/callback fault order and old default-root report rather than new verified metadata. Runtime startup warnings now also preserve true category sequences/singletons and whole opaque selected entries through the existing shared field primitive. Original suppression/classification/map/push/join/coercion precedes new projection from compiler-known slots, not parsed authored labels. Trailing LF/no UI cap remain; malformed selected warning is unavailable and old doctor advice is opaque instruction. Native Inspector Run controls retain their selection grammar rather than forced Markdown: producer-specific column gaps now carry ellipses, and complete selected_run_id context uses existing Recipe/Control literal documents, separately from authored fields. Generic fit/composition, source reads, keys and action targets remain unchanged; loaded colored-terminal/phone acceptance stays gated. Other errors/notifications/public owners remain separately scoped, with live client acceptance independent. Reuse the cohesive owner of each projection:
|
|
203
|
+
The following is the current pre-unification implementation inventory, not a set of alternate adopted output styles. Existing flat records, literal JSON fields, verbose JSON and retained-layout HTML compiler frames remain code facts until their owned rollout changes; the target above does not restyle or relabel stored text. This standard spans surfaces, not a new library domain. Control compact-result/public-error is now bare block-YAML metadata with native option sequences, whole selected values or explicit omission records under the existing16KiB cap, no duplicated run namespace, stage/reuse distinctions, typed selective inspect next nodes and opaque advice scalars; verbose JSON remains the machine path. Launch model/thinking groups use the concise `model` and `thinking` labels and preserve their actual source/value relationship; compact launch navigation now remains one whole native YAML value or explicit whole-row omission within16KiB including invocation-response spacing. Full spawn-verbose in source and normally built packages uses the legacy once-only JSON selection followed by clone-only YAML, without a new fixed byte/depth cap. Absent selected JSON, malformed selected text or recoverable post-selection failures withhold the whole projection with an attributable no-auto-repeat warning; original selection throws and structured details remain unchanged. Source/unit and installed compiled response checks, the strict ordinary-metadata source/packed completion journey, and all three source/packed navigation owners are accepted within their bounded domains. Native assertions remain indirect proof, not current global absence. Owning Skill byte parity does not establish a loaded-host change. The older field/inspect-action primitives remain with their unmigrated consumers; compact launch serialization now uses the YAML metadata primitive. Structured/verbose results, exact dispatch/private error causes and old completion handoff text retain their contracts. Fresh ordinary source completion admission captures canonical AX with the private completion_yaml_core_v1 layout: index-first YAML, independently rendered raw Markdown and cut-local [N characters omitted]. The minimal ordinary hint binds whole content to the YAML core, whose relative lengths derive header/body/marker boundaries without fresh HTML tails. Retained completion_frontmatter_v1 hints keep their complete ranges and original compiler frames; neither hint name is a public selector. Only valid compiler headers can hide whole reference/location rows. Markers remain literal and body-authored labels never become metadata/actions. Expansion and invalid/missing hints reveal full original text. These checks establish display consistency, not authentication, source/read scope or acceptance; display line-ending/tab handling never rewrites saved content. Routine state-equivalent summaries remain in the journal, not the new model content; meaningful summaries, loss/redaction/unavailability and reference coverage remain visible. Exact source/generation/parent bindings, whole references and fresh48KiB/64row limits include hidden technical data; retained codecs keep16KiB. The postprivacy byte budget is divided equally between candidate rows: roughly48KiB for one,24KiB each for two,16KiB each for three, less encoded service overhead. Whole admitted text uses result only when it fits without known upstream clipping; otherwise preview uses the safe prefix with exact retained-source omissions. There is no fixed16KiB result/2KiB preview cap and no render-time source IO or reallocation. Already-retained packets keep their exact captured bytes; pre-record messages keep the host renderer and retained record messages keep their original verified view. The Pi boundary recognizes the strict whole YAML core for ordinary source records, or original closed markers/anchored headers for retained captures, after private details are stripped, preserving exact owned-context acceptance without interpreting authored body labels. Actual actors guidance describes this implemented fresh-capture route; this is not a claim that a loaded host was reloaded. Fresh source urgent-steer captures use typed YAML metadata and a separate raw selected body before saving immutable envelope.content: complete final-message fitting and whole reference sequences retain16KiB/eight-slot bounds. Ordinary attention remains unbounded; bounded source/compiled/actual-default acceptance does not establish loaded-host acceptance. Existing envelopes are not reinterpreted, and no older new-message default remains. Fresh ordinary notify/followup uses one AX formatter in the existing sink: the same opaque checkpoint/body and whole first-eight reference projection, without borrowing steer's shared byte cap or changing routing. Committed history keeps its exact text; the retired presentation selector is not a compatibility API. Fresh read-time agent Trace preview leaves now also use boundary U+2026, exact admitted normalized-retained-turn omissions and separately unknown upstream loss, without changing the160UTF-16 source allowance, identifiers/chronology, detail/source data or public JSON schema. Malformed text is unknown, not repaired; no journal capture aspect is minted for a derived current read. New urgent admission/send/recovery diagnostics now also use event/attention/stage AX records, opaque raw240-unit previews and unknown loss while their persisted message-only evidence stays unchanged. A failed send leaves delivery/presentation unconfirmed, and unknown/conflicting queued recovery does not force replay. Fresh non-runtime explicit inspection also uses bare block-YAML metadata: unchanged Run/view headers, tool activation/argument sequences and Recipe registry/focused-doctor facts, whole selected source/identity/advice scalars or explicit whole-field omission, native counts/flags and one typed read-only hint or opaque `next.instruction`. The explicit `tool:* view=schema` text is generated definition metadata in the same bare YAML form with native parameter nodes when renderable; unsupported/over-ceiling schemas retain the exact legacy JSON fallback. Compact argument sequences are whole or explicitly omitted/unavailable. Verbose views bypass compact formatting and machine details keep their JSON contracts. Only the three existing closed read-only Recipe inspect literals become typed next; other advisory strings remain opaque instruction values with full next_actions retained in unchanged details/verbose JSON. Existing body/scope/budget/default-status contracts stay independent. Compact runtime status/runs/triage now also presents only its existing facts/counts as AX fields, with full owned inventory independent from bounded verbose navigation and bounded triage rows. Fresh locally owned runtime notices (callback failure, completion recovery/acceptance, steer admission/delivery/recovery diagnostics and the shutdown teardown report) are now bare block-YAML metadata with explicit receipt/report stages and native counters. UI-only notices keep complete well-formed selected fields without borrowing the model byte/depth ceilings; malformed selected text is explicitly unavailable. Existing steer preview bounds, source/errors, acceptance and native authority are unchanged. Producer-owned watcher/retirement notices now also use uncapped bare block-YAML metadata: whole selected literal paths and opaque diagnostics preserve raw signature/dedup/rearm behavior, while returned stop/reported cancellation/skip/failure remain non-closure reports with exact existing optional-notifier/error observation semantics. Inspector document/detail rendering now uses flat semantic fields, real sequence lists and opaque literal terminal values, with ephemeral compiler-label provenance instead of parsing authored colon/bullet lines as metadata. Separator-preserving native-column wrapping keeps whole text/references, source values, root stripes and existing identity/chronology/navigation/source bounds. Empty containers remain typed values; terminal line-ending/tab display policy does not rewrite source. Ten locally authored inspect refusals now render bare block-YAML metadata with true supported-value sequences, field-local whole-field coverage records and one typed read-only next, preserving their original guards and Error/dependency behavior. Only the two already-guided tool failures retain typed read-only next actions. New local error text shares16KiB including public spacing; variable fields/actions are whole or explicitly counted omitted without shortening targets, reading raw private lengths or wrapping unowned exceptions. Session/source/dependency errors keep their separate owners and old catches rather than being globally restyled. Inspector Kill confirmation now also uses captured run/state/action AX fields with whole-value paging, while both choices and closure: unconfirmed remain pinned at narrow/low viewports. Read-only PgUp/PgDn preserves original Cancel/choice/confirmation/generation behavior and adds no actuation or source permission. Inspector Kill cancellation only closes the dialog; successful actions use the selected Run's visible status without a second Notice. Failures/refusals/uncertainty remain visible, and notifications on other surfaces are not suppressed. Remaining Inspector feedback shows the complete selected opaque message directly in a modal popup over unchanged data rows, without i prefix/command or another reader. Esc dismisses; only physical overflow scrolls within that same popup. Kill uses the same centered rectangle compositor. Both use terminal-default backgrounds rather than a theme fill, two-column left content insets and top/bottom blank spacing, plus the Inspector's shared frame/key/description color grammar. On space-constrained heights, safety/choices/readable text take priority over decorative blanks. They keep the captured underlay stable through resize/invalidation and resume ordinary refresh on close, without fresh evidence/native authority. Action-port feedback pins closure uncertainty/no automatic retry without inferring native effects from message text. Fresh Kill producers now use a shared pure selected-value AX formatter: domain180-unit normalization/trim and overlay160-unit normalization/slice remain, while a cut pair retracts one unit and malformed selected text is unknown/unavailable. Dynamic legacy values state upstream completeness/privacy unproven, with unknown local clipping markers rather than private-tail counts; compiler refusals add no fake loss. ok/callback/getter/coercion/error semantics and old success suppression stay unchanged, and the popup's anchored header recognition affects color only. This does not recover discarded Markdown/causes or create a saved capture version. Trace table rows now mark actual column/line gaps with native ellipsis while preserving full selected item/detail, and compact warning captions keep incomplete-history/non-lifetime/unavailable-rank meaning visible at narrow widths. This is UI preview loss only, not new source/private character counts, rank/identity changes or a generic selector/fit rewrite. Four locally authored Control pre-dispatch guards now also use caller target/action/result and actual supported/available-action sequences: whole target/list groups fit16KiB including public spacing or carry field/entry omission counts, while malformed selected text is unavailable without repair. Original guard/getter/join/coercion observations, plain Error/host-error behavior and all unowned/dispatch exceptions stay separate; no input/status/correlation/retry/no-effects or new dispatch authority follows. Synchronous registered-command failures now present compiler-owned exit_code/killed metadata as bare block YAML, followed by a delimited header before the unchanged selected stderr/stdout bodies (or metadata-only when no stream text was selected); trim/tail selection, truncation notices, temp-file publication and exact executor failures are unchanged. The pre-dispatch argument-repair error now likewise puts owned tool/required/optional facts in a closed YAML header and keeps the original validation prose plus the verbatim JSON invocation example as unparsed body text, and local spawn pre-launch guards use bare block YAML with one whole selected value or an explicit omission record. Three local spawn pre-launch guards present field/result and a whole or explicitly omitted selected caller value as bare block YAML rather than inventing an admitted Run: unsupported state_dir, missing run: namespace and invalid id. Whole valid-scalar values fit16KiB or are omitted; malformed selections are unavailable, without repair or source/private-tail counts. Original input/method/coercion/launch behavior stays separate. The real host still rejects unsupported state_dir through its own unchanged schema before the facade, so this does not claim all SDK validation errors are AX. Namespace/id guard errors retain real host isError behavior. Successful normal registration/update-or-persisted receipts now use original tool/outcome/source/callable facts, actual required/optional argument and warning lists, a whole fenced non-template source and one prior hint. Invocation advice stays opaque instruction; only the producer-known unverified tool-status hint is typed next. Complete safety warnings have first budget priority; all variable fields/groups/actions fit16KiB including public spacing or show whole selected-field/entry omission, with malformed selections unavailable without repair. Original post-effect warning/argument/coercion/boundary observations and all transaction/details/notify/error behavior remain. This is not new callability, host activation, rollback or invocation authority. Registry current-name listing and deletion returns now also use AX: original sorted/captured names are a whole selected group with shown/omitted/total coverage, never a new page/work quota or active/callable/global registry claim. Overlarge groups are wholly omitted and malformed groups unavailable without raw-key re-coercion or repair. Deletion keeps original selected tool/result and the exact operator reload note as opaque instruction; current-map not found stays a returned result, not a new error or orphan-file cleanup. Lookup/file/deactivation/notify/errors/details remain unchanged, including post-effect failures. Draft promotion success now also uses only its prior selected name/new-update/source=draft/exact callable display/first hint as AX. It does not inherit ordinary-registration args/warnings/boundary facts or change its admission/rollback policy. Original template String conversions remain after notify, including zero/object/Symbol behavior and post-effect failures. Whole scalars/actions fit16KiB or are explicitly omitted/unavailable; only the closed producer-known read-only status hint is typed, and invocation advice is opaque. Machine details/bytes and later activation observations remain unchanged. Locally authored registry mode/name/source/template/draft/transaction refusals now render as bare block-YAML metadata documents with compiler-literal fields, native choice sequences, and each opaque selected value whole or explicitly omitted under the unchanged16KiB cap; authored text stays scalar content with escaped line breaks rather than becoming keys or actions. Registry activation/promotion/deletion notice text remains flat report/tool fields, outside this refusal migration. No supplied source values, new helper/wrapper or changed guard/descriptor/getter/trim order. The host still owns cloning, coercion and schema validation: rejected extra/object fields need not reach these AX guards, while numeric input may normalize and preserve a non-error unnamed list result. This is not new schema, no-effects or automatic retry authority. Three ordinary name/source refusals now also use AX: invalid normalized name without raw caller echo, reserved selected-name value whole or explicitly omitted/unavailable, and missing source only for a new registration with actual source choices/opaque prior advice. Original normalization/reserved-set/resolution/lookup/blocker/fault order stays unchanged; empty-name listing, existing-tool update with retained source and dependency blocker text are not reinterpreted. SDK clone/coercion/schema remains separate. Ordinary and draft duplicate-registration refusals now show their original selected name whole/omitted/unavailable plus the original update advice as opaque instruction; distinct authoritative-file/Map/exists/blocker/update predicates and original single display coercion stay unchanged. No overwrite/retry, body-read or no-effects authority follows. Template-shape helper errors now also use fixed template/result records for nested Recipe objects, empty sequences and unsupported types, with actual supported-kind lists/opaque old correction and no supplied value echo. Getter/Array/reference/key/expand semantics and external errors stay exact; null/undefined/deletion/retained-source behavior and SDK coercion remain separate. Authored-Recipe non-object defaults, missing command description, null-at-authoring and missing-final-template constants now also use fixed field/result, without new value echoes or changes to args/from/description/default/retained-source order. Front deletion, inheritance and Schema/dependency errors keep separate ownership. The delegated runtime-owned-default-key refusal now shows only its original first selected key, defaults/result and opaque old correction. Full copy/find order, eight-name membership and the delegated-only condition remain; no all-key/value disclosure, early rejection optimization or new retry authority. Two draft-path refusals now show only their old captured allowed root or resolved path as complete dynamically fenced literals, or explicit whole-reference omission/unavailability under16KiB. Refused caller path stays undisplayed in root refusal; existing containment/exists/getter/error behavior and opaque prior advice are unchanged, not new absence/native proof. Public from-normalization refusal now also uses only its old displayed source/reason/legacy summary/doctor advice as AX, preserving inner errors, catch/coercion/method order and source/hint disagreement. Source is a whole literal; reason/summary preserve opaque Markdown, and advice is instruction content. Monotone whole-field omission/unavailability fits16KiB without parsing old summary text, adding causes/counts or widening source/catch authority. Normal candidate-admission refusal now also projects only its old source-conditional displayed source/joined diagnostics/legacy summary/advice, preserving branch/coercion/join and pre-Error order. Existing4096-unit upstream admission diagnostic clipping is not widened or repaired; selected summary fields are whole/omitted/unavailable under16KiB, with fitting diagnostics first. This adds no admission policy, full diagnostics/source proof or rollback/readiness authority. Draft raw/candidate invalid-Recipe errors now likewise expose only old optional reason/joined diagnostics with fixed draft/result, preserving separate read/diagnose, truthiness/coercion, Error-before-join and legacy diagnostic bounds. No new path/body, cause, reader, policy or retry follows; whole opaque values fit16KiB or are explicitly omitted/unavailable. Outer registration transaction errors now also project only old post-cleanup stage/resolution-generation/legacy summary/error, preserving cleanup and fallible template order exactly. Resolution generation is not a Run epoch; fitting surfaced error has budget priority and opaque inner rollback/advice text is not a new guarantee. No replay, extra cause/source read or changed transaction policy follows. Registry activation/promotion/deletion notices now also use report/tool AX fields for only old compiler report identity/name, preserving callback order/info type/faults and real hasUI gate. Report wording is not callable/full-host-removal proof. UI text stays literal with native wrapping; no borrowed model16KiB cap, whole well-formed values retained and malformed selected name unavailable. RPC delivery remains fire-and-forget, and loaded UI acceptance stays separate. Recipe registry watcher warning/refresh messages now also use report and opaque instruction constants only, preserving their distinct direct ctx.ui.notify calls (no added hasUI gate), failure dedup/pending-load/callback fault order and old default-root report rather than new verified metadata. Runtime startup warnings now also preserve true category sequences/singletons and whole opaque selected entries through the existing shared field primitive. Original suppression/classification/map/push/join/coercion precedes new projection from compiler-known slots, not parsed authored labels. Trailing LF/no UI cap remain; malformed selected warning is unavailable and old doctor advice is opaque instruction. Native Inspector Run controls retain their selection grammar rather than forced Markdown: producer-specific column gaps now carry ellipses, and complete selected_run_id context uses existing Recipe/Control literal documents, separately from authored fields. Generic fit/composition, source reads, keys and action targets remain unchanged; loaded colored-terminal/phone acceptance stays gated. Other errors/notifications/public owners remain separately scoped, with live client acceptance independent. Reuse the cohesive owner of each projection:
|
|
196
204
|
|
|
197
205
|
- `tools-message.ts`: Control receipts, refusals and conservative public error text.
|
|
198
206
|
- `tools-response.ts`, `tools-spawn.ts`, `tools-local.ts`: shared response primitives and launch/runtime-tool presentation.
|