@llblab/pi-actors 0.49.2 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/BACKLOG.md +1 -11
- package/CHANGELOG.md +17 -1
- package/README.md +22 -4
- package/dist/index.js +1 -1
- package/dist/lib/extension-runtime.d.ts +1 -1
- package/dist/lib/extension-runtime.js +1 -1
- package/dist/lib/inspector-overlay.d.ts +3 -0
- package/dist/lib/inspector-overlay.js +120 -38
- package/dist/lib/limits.d.ts +1 -0
- package/dist/lib/limits.js +1 -0
- package/dist/lib/observability.js +3 -1
- package/dist/lib/runs-artifacts.js +24 -4
- package/dist/lib/session-evidence.d.ts +1 -0
- package/dist/lib/session-evidence.js +3 -2
- package/dist/lib/state-readers.d.ts +5 -1
- package/dist/lib/state-readers.js +30 -3
- package/dist/lib/tools-access.d.ts +1 -0
- package/dist/lib/tools-access.js +13 -11
- package/dist/lib/tools-inspect.js +5 -5
- package/dist/lib/tools-message.d.ts +1 -0
- package/dist/lib/tools-message.js +3 -1
- package/dist/scripts/async-runner.mjs +5 -19
- package/docs/README.md +1 -0
- package/docs/actor-inspector.md +21 -5
- package/docs/async-runs.md +22 -7
- package/docs/command-templates.md +5 -4
- package/docs/inspection.md +83 -0
- package/docs/recipe-library.md +1 -1
- package/docs/template-recipes.md +225 -66
- package/docs/tool-registry.md +24 -3
- package/index.ts +1 -1
- package/lib/extension-runtime.ts +2 -2
- package/lib/inspector-overlay.ts +161 -33
- package/lib/limits.ts +1 -0
- package/lib/observability.ts +2 -1
- package/lib/runs-artifacts.ts +34 -4
- package/lib/session-evidence.ts +7 -2
- package/lib/state-readers.ts +45 -3
- package/lib/tools-access.ts +26 -12
- package/lib/tools-inspect.ts +9 -5
- package/lib/tools-message.ts +8 -1
- package/package.json +3 -3
- package/scripts/async-runner.mjs +5 -19
package/lib/tools-message.ts
CHANGED
|
@@ -46,6 +46,7 @@ function runNextActions(run: string, result: Record<string, unknown>): string[]
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface ControlToolDeps {
|
|
49
|
+
getRunStatus?: (run: string) => Record<string, unknown>;
|
|
49
50
|
handleRuntimeControl?: (
|
|
50
51
|
action: string,
|
|
51
52
|
input: unknown,
|
|
@@ -94,7 +95,13 @@ export function createControlToolDefinition<TContext = unknown>(
|
|
|
94
95
|
result = deps.handleRuntimeControl(request.action, request.input);
|
|
95
96
|
} else {
|
|
96
97
|
const run = request.target.slice(4);
|
|
97
|
-
const status =
|
|
98
|
+
const status = deps.getRunStatus
|
|
99
|
+
? ToolsAccess.assertRunStatusAccessibleToContext(
|
|
100
|
+
run,
|
|
101
|
+
deps.getRunStatus(run),
|
|
102
|
+
ctx,
|
|
103
|
+
)
|
|
104
|
+
: ToolsAccess.assertRunAccessibleToContext(run, ctx);
|
|
98
105
|
const runInstanceId =
|
|
99
106
|
typeof status.run_instance_id === "string"
|
|
100
107
|
? status.run_instance_id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llblab/pi-actors",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Local Actor Kernel for Pi",
|
|
6
6
|
"keywords": [
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"image": "https://raw.githubusercontent.com/llblab/pi-actors/main/banner.jpg"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@earendil-works/pi-coding-agent": "
|
|
70
|
-
"@earendil-works/pi-tui": "
|
|
69
|
+
"@earendil-works/pi-coding-agent": ">=0.84.4",
|
|
70
|
+
"@earendil-works/pi-tui": ">=0.84.4"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "latest",
|
package/scripts/async-runner.mjs
CHANGED
|
@@ -284,9 +284,6 @@ export async function runAsyncRunner(stateDir = process.argv[2]) {
|
|
|
284
284
|
complete_allowed: missing.length === 0,
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
|
-
function getCommandDoneDelivery(result) {
|
|
288
|
-
return result.code !== 0 || activeSubagents > 0 ? "followup" : "log";
|
|
289
|
-
}
|
|
290
287
|
function progressRunning() {
|
|
291
288
|
progress("running", {
|
|
292
289
|
activeSubagents,
|
|
@@ -433,21 +430,6 @@ export async function runAsyncRunner(stateDir = process.argv[2]) {
|
|
|
433
430
|
...(preflightDiagnostic ? { preflight: preflightDiagnostic } : {}),
|
|
434
431
|
});
|
|
435
432
|
}
|
|
436
|
-
event("command.done", {
|
|
437
|
-
activeSubagents,
|
|
438
|
-
command_id: commandId,
|
|
439
|
-
code: result.code,
|
|
440
|
-
command: commandDetail,
|
|
441
|
-
killed: result.killed,
|
|
442
|
-
...captureDetails(result),
|
|
443
|
-
...(materialized.promptFile ? { prompt_file: materialized.promptFile } : {}),
|
|
444
|
-
...(materialized.promptBytes ? { prompt_bytes: materialized.promptBytes } : {}),
|
|
445
|
-
...(session.sessionDir ? { session_dir: relative(stateDir, session.sessionDir).replaceAll("\\", "/") } : {}),
|
|
446
|
-
...(commandSessionFiles(session.sessionDir).length > 0
|
|
447
|
-
? { session_files: commandSessionFiles(session.sessionDir) }
|
|
448
|
-
: {}),
|
|
449
|
-
...(preflightDiagnostic ? { preflight: preflightDiagnostic } : {}),
|
|
450
|
-
});
|
|
451
433
|
observation(
|
|
452
434
|
"command.done",
|
|
453
435
|
`Command ${summarizeCommandDetail(commandDetail)} completed with code ${result.code}`,
|
|
@@ -462,9 +444,13 @@ export async function runAsyncRunner(stateDir = process.argv[2]) {
|
|
|
462
444
|
...captureDetails(result),
|
|
463
445
|
...(materialized.promptFile ? { prompt_file: materialized.promptFile } : {}),
|
|
464
446
|
...(materialized.promptBytes ? { prompt_bytes: materialized.promptBytes } : {}),
|
|
447
|
+
...(session.sessionDir ? { session_dir: relative(stateDir, session.sessionDir).replaceAll("\\", "/") } : {}),
|
|
448
|
+
...(commandSessionFiles(session.sessionDir).length > 0
|
|
449
|
+
? { session_files: commandSessionFiles(session.sessionDir) }
|
|
450
|
+
: {}),
|
|
465
451
|
...(preflightDiagnostic ? { preflight: preflightDiagnostic } : {}),
|
|
466
452
|
},
|
|
467
|
-
|
|
453
|
+
"log",
|
|
468
454
|
result.code === 0 ? "info" : "error",
|
|
469
455
|
);
|
|
470
456
|
progressRunning();
|