@llblab/pi-actors 0.42.3 → 0.43.1

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.
Files changed (279) hide show
  1. package/AGENTS.md +127 -175
  2. package/BACKLOG.md +189 -1
  3. package/CHANGELOG.md +183 -292
  4. package/README.md +115 -276
  5. package/dist/fixtures/protocol/control-endpoint.json +6 -0
  6. package/dist/fixtures/protocol/control-record.json +9 -0
  7. package/dist/fixtures/protocol/recipe-summary.json +4 -12
  8. package/dist/fixtures/protocol/trace-event.json +9 -0
  9. package/dist/index.js +1 -1
  10. package/dist/lib/async-runs.d.ts +15 -38
  11. package/dist/lib/async-runs.js +173 -111
  12. package/dist/lib/automatic-review-runtime.d.ts +1 -1
  13. package/dist/lib/automatic-review-runtime.js +5 -5
  14. package/dist/lib/command-templates.d.ts +2 -0
  15. package/dist/lib/command-templates.js +38 -4
  16. package/dist/lib/control-projection.d.ts +20 -0
  17. package/dist/lib/control-projection.js +66 -0
  18. package/dist/lib/control.d.ts +15 -0
  19. package/dist/lib/control.js +97 -0
  20. package/dist/lib/draft-sleep.js +3 -3
  21. package/dist/lib/execution-sessions.d.ts +17 -0
  22. package/dist/lib/execution-sessions.js +85 -0
  23. package/dist/lib/file-state.d.ts +2 -0
  24. package/dist/lib/file-state.js +114 -46
  25. package/dist/lib/inspector-actions.d.ts +2 -2
  26. package/dist/lib/inspector-actions.js +2 -2
  27. package/dist/lib/inspector-command.js +3 -3
  28. package/dist/lib/inspector-overlay.d.ts +54 -70
  29. package/dist/lib/inspector-overlay.js +576 -910
  30. package/dist/lib/inspector.d.ts +3 -71
  31. package/dist/lib/inspector.js +19 -665
  32. package/dist/lib/limits.d.ts +7 -3
  33. package/dist/lib/limits.js +7 -3
  34. package/dist/lib/observability.d.ts +16 -16
  35. package/dist/lib/observability.js +43 -82
  36. package/dist/lib/prompts.d.ts +1 -1
  37. package/dist/lib/prompts.js +3 -3
  38. package/dist/lib/recipe-control.d.ts +7 -0
  39. package/dist/lib/recipe-control.js +43 -0
  40. package/dist/lib/recipes-discovery.js +2 -0
  41. package/dist/lib/recipes-references.d.ts +1 -14
  42. package/dist/lib/recipes-references.js +6 -21
  43. package/dist/lib/review-control.d.ts +1 -1
  44. package/dist/lib/review-control.js +4 -5
  45. package/dist/lib/review-projection.js +1 -5
  46. package/dist/lib/run-ui-runtime.js +2 -2
  47. package/dist/lib/runs-control-delivery.d.ts +28 -0
  48. package/dist/lib/runs-control-delivery.js +150 -0
  49. package/dist/lib/runs-controls.d.ts +37 -0
  50. package/dist/lib/runs-controls.js +146 -0
  51. package/dist/lib/runs-retention.d.ts +7 -0
  52. package/dist/lib/runs-retention.js +27 -3
  53. package/dist/lib/runs-start.js +4 -2
  54. package/dist/lib/runs-status.js +11 -6
  55. package/dist/lib/runs-trace.d.ts +24 -0
  56. package/dist/lib/runs-trace.js +102 -0
  57. package/dist/lib/runtime-identity.d.ts +7 -0
  58. package/dist/lib/runtime-identity.js +35 -0
  59. package/dist/lib/runtime-notifier.d.ts +1 -1
  60. package/dist/lib/runtime-notifier.js +1 -1
  61. package/dist/lib/runtime-triage.d.ts +29 -0
  62. package/dist/lib/runtime-triage.js +76 -0
  63. package/dist/lib/tool-review-scheduler.js +7 -7
  64. package/dist/lib/tools-inspect.d.ts +3 -3
  65. package/dist/lib/tools-inspect.js +241 -707
  66. package/dist/lib/tools-local.js +2 -10
  67. package/dist/lib/tools-message.d.ts +6 -7
  68. package/dist/lib/tools-message.js +95 -396
  69. package/dist/lib/tools-response.d.ts +1 -5
  70. package/dist/lib/tools-response.js +5 -48
  71. package/dist/lib/tools-spawn.js +16 -28
  72. package/dist/lib/tools.d.ts +1 -1
  73. package/dist/lib/tools.js +2 -3
  74. package/dist/lib/trace-projection.d.ts +22 -0
  75. package/dist/lib/trace-projection.js +185 -0
  76. package/dist/recipes/draft-review.json +0 -10
  77. package/dist/recipes/lens-swarm.json +0 -14
  78. package/dist/recipes/music-player.json +10 -19
  79. package/dist/recipes/pipeline-architect-coordinator.json +0 -11
  80. package/dist/recipes/pipeline-artifact-bundle.json +1 -22
  81. package/dist/recipes/pipeline-artifact-report.json +1 -18
  82. package/dist/recipes/pipeline-artifact-write.json +1 -18
  83. package/dist/recipes/pipeline-async-run-ops.json +0 -12
  84. package/dist/recipes/pipeline-checkpoint-continuation.json +0 -14
  85. package/dist/recipes/pipeline-development-tasking.json +0 -12
  86. package/dist/recipes/pipeline-docs-maintenance.json +0 -12
  87. package/dist/recipes/pipeline-media-library.json +0 -12
  88. package/dist/recipes/pipeline-quorum-review.json +0 -12
  89. package/dist/recipes/pipeline-release-readiness.json +0 -12
  90. package/dist/recipes/pipeline-release-summary.json +0 -12
  91. package/dist/recipes/pipeline-repo-health.json +0 -12
  92. package/dist/recipes/pipeline-research-synthesis.json +0 -11
  93. package/dist/recipes/pipeline-review-readiness.json +0 -12
  94. package/dist/recipes/resource-locker.json +27 -0
  95. package/dist/recipes/subagent-artifact.json +0 -9
  96. package/dist/recipes/subagent-checkpoint.json +0 -10
  97. package/dist/recipes/subagent-conflict-report.json +0 -11
  98. package/dist/recipes/subagent-contradiction-map.json +0 -11
  99. package/dist/recipes/subagent-critic.json +0 -11
  100. package/dist/recipes/subagent-evidence-map.json +0 -11
  101. package/dist/recipes/subagent-followup.json +0 -10
  102. package/dist/recipes/subagent-judge.json +0 -11
  103. package/dist/recipes/subagent-merge.json +0 -11
  104. package/dist/recipes/subagent-normalize.json +0 -11
  105. package/dist/recipes/subagent-plan.json +0 -11
  106. package/dist/recipes/subagent-preflight.json +0 -11
  107. package/dist/recipes/subagent-prompt.json +0 -10
  108. package/dist/recipes/subagent-quorum.json +0 -10
  109. package/dist/recipes/subagent-review-coordinator.json +0 -14
  110. package/dist/recipes/subagent-review.json +0 -11
  111. package/dist/recipes/subagent-task-card.json +0 -11
  112. package/dist/recipes/subagent-tools.json +0 -10
  113. package/dist/recipes/subagent-verify.json +0 -11
  114. package/dist/recipes/subagents-prompts.json +0 -10
  115. package/dist/recipes/tool-review.json +0 -10
  116. package/dist/scripts/async-runner.mjs +25 -25
  117. package/dist/scripts/conformance.mjs +4 -2
  118. package/dist/scripts/locker.mjs +196 -69
  119. package/dist/scripts/music-player.mjs +162 -159
  120. package/dist/scripts/recipe-utils.mjs +6 -96
  121. package/dist/scripts/release-gates.mjs +91 -0
  122. package/dist/scripts/validate-recipe.mjs +8 -57
  123. package/dist/skills/actors/SKILL.md +57 -265
  124. package/dist/skills/swarm/SKILL.md +10 -34
  125. package/docs/0.43-baseline.md +39 -0
  126. package/docs/README.md +4 -6
  127. package/docs/actor-inspector.md +26 -64
  128. package/docs/async-runs.md +81 -328
  129. package/docs/command-templates.md +8 -118
  130. package/docs/recipe-library.md +55 -182
  131. package/docs/releasing.md +28 -0
  132. package/docs/template-recipes.md +76 -289
  133. package/docs/tool-registry.md +41 -161
  134. package/fixtures/protocol/control-endpoint.json +6 -0
  135. package/fixtures/protocol/control-record.json +9 -0
  136. package/fixtures/protocol/recipe-summary.json +4 -12
  137. package/fixtures/protocol/trace-event.json +9 -0
  138. package/index.ts +1 -1
  139. package/lib/async-runs.ts +218 -204
  140. package/lib/automatic-review-runtime.ts +7 -7
  141. package/lib/command-templates.ts +44 -4
  142. package/lib/control-projection.ts +105 -0
  143. package/lib/control.ts +117 -0
  144. package/lib/draft-sleep.ts +3 -3
  145. package/lib/execution-sessions.ts +111 -0
  146. package/lib/file-state.ts +84 -64
  147. package/lib/inspector-actions.ts +2 -2
  148. package/lib/inspector-command.ts +3 -3
  149. package/lib/inspector-overlay.ts +617 -1126
  150. package/lib/inspector.ts +46 -979
  151. package/lib/limits.ts +7 -3
  152. package/lib/observability.ts +60 -101
  153. package/lib/prompts.ts +3 -3
  154. package/lib/recipe-control.ts +52 -0
  155. package/lib/recipes-discovery.ts +2 -0
  156. package/lib/recipes-references.ts +9 -45
  157. package/lib/review-control.ts +4 -5
  158. package/lib/review-projection.ts +1 -5
  159. package/lib/run-ui-runtime.ts +2 -2
  160. package/lib/runs-control-delivery.ts +209 -0
  161. package/lib/runs-controls.ts +213 -0
  162. package/lib/runs-retention.ts +38 -3
  163. package/lib/runs-start.ts +4 -2
  164. package/lib/runs-status.ts +11 -6
  165. package/lib/runs-trace.ts +136 -0
  166. package/lib/runtime-identity.ts +39 -0
  167. package/lib/runtime-notifier.ts +1 -1
  168. package/lib/runtime-triage.ts +120 -0
  169. package/lib/tool-review-scheduler.ts +7 -7
  170. package/lib/tools-inspect.ts +283 -900
  171. package/lib/tools-local.ts +2 -12
  172. package/lib/tools-message.ts +112 -520
  173. package/lib/tools-response.ts +5 -64
  174. package/lib/tools-spawn.ts +16 -32
  175. package/lib/tools.ts +5 -6
  176. package/lib/trace-projection.ts +244 -0
  177. package/package.json +2 -1
  178. package/recipes/draft-review.json +0 -10
  179. package/recipes/lens-swarm.json +0 -14
  180. package/recipes/music-player.json +10 -19
  181. package/recipes/pipeline-architect-coordinator.json +0 -11
  182. package/recipes/pipeline-artifact-bundle.json +1 -22
  183. package/recipes/pipeline-artifact-report.json +1 -18
  184. package/recipes/pipeline-artifact-write.json +1 -18
  185. package/recipes/pipeline-async-run-ops.json +0 -12
  186. package/recipes/pipeline-checkpoint-continuation.json +0 -14
  187. package/recipes/pipeline-development-tasking.json +0 -12
  188. package/recipes/pipeline-docs-maintenance.json +0 -12
  189. package/recipes/pipeline-media-library.json +0 -12
  190. package/recipes/pipeline-quorum-review.json +0 -12
  191. package/recipes/pipeline-release-readiness.json +0 -12
  192. package/recipes/pipeline-release-summary.json +0 -12
  193. package/recipes/pipeline-repo-health.json +0 -12
  194. package/recipes/pipeline-research-synthesis.json +0 -11
  195. package/recipes/pipeline-review-readiness.json +0 -12
  196. package/recipes/resource-locker.json +27 -0
  197. package/recipes/subagent-artifact.json +0 -9
  198. package/recipes/subagent-checkpoint.json +0 -10
  199. package/recipes/subagent-conflict-report.json +0 -11
  200. package/recipes/subagent-contradiction-map.json +0 -11
  201. package/recipes/subagent-critic.json +0 -11
  202. package/recipes/subagent-evidence-map.json +0 -11
  203. package/recipes/subagent-followup.json +0 -10
  204. package/recipes/subagent-judge.json +0 -11
  205. package/recipes/subagent-merge.json +0 -11
  206. package/recipes/subagent-normalize.json +0 -11
  207. package/recipes/subagent-plan.json +0 -11
  208. package/recipes/subagent-preflight.json +0 -11
  209. package/recipes/subagent-prompt.json +0 -10
  210. package/recipes/subagent-quorum.json +0 -10
  211. package/recipes/subagent-review-coordinator.json +0 -14
  212. package/recipes/subagent-review.json +0 -11
  213. package/recipes/subagent-task-card.json +0 -11
  214. package/recipes/subagent-tools.json +0 -10
  215. package/recipes/subagent-verify.json +0 -11
  216. package/recipes/subagents-prompts.json +0 -10
  217. package/recipes/tool-review.json +0 -10
  218. package/scripts/async-runner.mjs +25 -25
  219. package/scripts/conformance.mjs +4 -2
  220. package/scripts/locker.mjs +196 -69
  221. package/scripts/music-player.mjs +162 -159
  222. package/scripts/recipe-utils.mjs +6 -96
  223. package/scripts/release-gates.mjs +91 -0
  224. package/scripts/validate-recipe.mjs +8 -57
  225. package/skills/actors/SKILL.md +57 -265
  226. package/skills/swarm/SKILL.md +10 -34
  227. package/dist/fixtures/protocol/actor-message-branch.json +0 -13
  228. package/dist/fixtures/protocol/mailbox-contract.json +0 -15
  229. package/dist/fixtures/protocol/room-message.json +0 -11
  230. package/dist/fixtures/protocol/room-roster.json +0 -11
  231. package/dist/fixtures/protocol/run-inbox-message.json +0 -9
  232. package/dist/fixtures/protocol/run-outbox-event.json +0 -9
  233. package/dist/lib/mailbox-loop.d.ts +0 -41
  234. package/dist/lib/mailbox-loop.js +0 -60
  235. package/dist/lib/messages.d.ts +0 -25
  236. package/dist/lib/messages.js +0 -122
  237. package/dist/lib/rooms.d.ts +0 -104
  238. package/dist/lib/rooms.js +0 -647
  239. package/dist/lib/runs-mailbox.d.ts +0 -25
  240. package/dist/lib/runs-mailbox.js +0 -146
  241. package/dist/lib/runs-messages.d.ts +0 -15
  242. package/dist/lib/runs-messages.js +0 -179
  243. package/dist/lib/runs-outbox.d.ts +0 -41
  244. package/dist/lib/runs-outbox.js +0 -87
  245. package/dist/lib/tools-mailbox.d.ts +0 -8
  246. package/dist/lib/tools-mailbox.js +0 -48
  247. package/dist/recipes/actor-worker.json +0 -39
  248. package/dist/recipes/coordinator-locker.json +0 -45
  249. package/dist/recipes/locker.json +0 -45
  250. package/dist/recipes/pipeline-room-swarm.json +0 -50
  251. package/dist/recipes/subagent-message.json +0 -32
  252. package/dist/recipes/utility-actor-message.json +0 -23
  253. package/dist/scripts/actor-worker.mjs +0 -214
  254. package/dist/scripts/coordinator.mjs +0 -799
  255. package/docs/actor-messages.md +0 -225
  256. package/docs/actors-deep-reference.md +0 -66
  257. package/docs/component-recipes.md +0 -148
  258. package/docs/task-first-recipes.md +0 -263
  259. package/fixtures/protocol/actor-message-branch.json +0 -13
  260. package/fixtures/protocol/mailbox-contract.json +0 -15
  261. package/fixtures/protocol/room-message.json +0 -11
  262. package/fixtures/protocol/room-roster.json +0 -11
  263. package/fixtures/protocol/run-inbox-message.json +0 -9
  264. package/fixtures/protocol/run-outbox-event.json +0 -9
  265. package/lib/mailbox-loop.ts +0 -144
  266. package/lib/messages.ts +0 -151
  267. package/lib/rooms.ts +0 -939
  268. package/lib/runs-mailbox.ts +0 -208
  269. package/lib/runs-messages.ts +0 -252
  270. package/lib/runs-outbox.ts +0 -144
  271. package/lib/tools-mailbox.ts +0 -56
  272. package/recipes/actor-worker.json +0 -39
  273. package/recipes/coordinator-locker.json +0 -45
  274. package/recipes/locker.json +0 -45
  275. package/recipes/pipeline-room-swarm.json +0 -50
  276. package/recipes/subagent-message.json +0 -32
  277. package/recipes/utility-actor-message.json +0 -23
  278. package/scripts/actor-worker.mjs +0 -214
  279. package/scripts/coordinator.mjs +0 -799
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Pure runtime Control triage policy.
3
+ * Zones: pending admission, status-age classification, terminal/replacement staleness
4
+ * Owns Control triage decisions; journal reads and owner filtering stay in adapters, while safe fields come from control-projection.
5
+ */
6
+ import * as ControlProjection from "./control-projection.ts";
7
+ export declare const RUNTIME_CONTROL_STALE_AFTER_MS: number;
8
+ export interface RuntimeTriageRun {
9
+ run: string;
10
+ runInstanceId?: string;
11
+ status: string;
12
+ }
13
+ export interface RuntimePendingControl extends ControlProjection.ProjectedRunControl {
14
+ age_ms: number;
15
+ reason: "age_threshold_reached" | "run_generation_replaced" | "run_generation_unavailable" | "run_terminal" | "within_age_threshold";
16
+ run: string;
17
+ status: "queued" | "delivered" | "claimed";
18
+ status_at: string;
19
+ }
20
+ export interface RuntimeControlDiagnostic {
21
+ reason: "invalid_action" | "invalid_control_id" | "invalid_generation" | "invalid_record" | "invalid_status" | "invalid_status_timestamp";
22
+ run: string;
23
+ }
24
+ export interface RuntimeControlClassification {
25
+ diagnostic?: RuntimeControlDiagnostic;
26
+ pending?: RuntimePendingControl;
27
+ stale?: RuntimePendingControl;
28
+ }
29
+ export declare function classifyRuntimeControl(run: RuntimeTriageRun, value: unknown, nowMs: number): RuntimeControlClassification;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Pure runtime Control triage policy.
3
+ * Zones: pending admission, status-age classification, terminal/replacement staleness
4
+ * Owns Control triage decisions; journal reads and owner filtering stay in adapters, while safe fields come from control-projection.
5
+ */
6
+ import * as ControlProjection from "./control-projection.js";
7
+ export const RUNTIME_CONTROL_STALE_AFTER_MS = 5 * 60 * 1_000;
8
+ const PENDING_STATUSES = new Set([
9
+ "queued",
10
+ "delivered",
11
+ "claimed",
12
+ ]);
13
+ const TERMINAL_STATUSES = new Set(["handled", "failed"]);
14
+ function diagnostic(run, reason) {
15
+ return { diagnostic: { reason, run } };
16
+ }
17
+ function statusTimestamp(record, status) {
18
+ if (status === "failed")
19
+ return record.failed_at;
20
+ if (status === "handled")
21
+ return record.handled_at;
22
+ if (status === "claimed")
23
+ return record.claimed_at;
24
+ if (status === "delivered")
25
+ return record.delivered_at;
26
+ return record.queued_at;
27
+ }
28
+ export function classifyRuntimeControl(run, value, nowMs) {
29
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
30
+ return diagnostic(run.run, "invalid_record");
31
+ }
32
+ const record = value;
33
+ const status = record.status;
34
+ if (!PENDING_STATUSES.has(status) && !TERMINAL_STATUSES.has(status)) {
35
+ return diagnostic(run.run, "invalid_status");
36
+ }
37
+ if (typeof record.id !== "string" || !record.id) {
38
+ return diagnostic(run.run, "invalid_control_id");
39
+ }
40
+ if (typeof record.action !== "string" || !record.action) {
41
+ return diagnostic(run.run, "invalid_action");
42
+ }
43
+ if (typeof record.run_instance_id !== "string" || !record.run_instance_id) {
44
+ return diagnostic(run.run, "invalid_generation");
45
+ }
46
+ const timestamp = statusTimestamp(record, status);
47
+ const timestampMs = typeof timestamp === "string" ? Date.parse(timestamp) : Number.NaN;
48
+ if (!Number.isFinite(timestampMs)) {
49
+ return diagnostic(run.run, "invalid_status_timestamp");
50
+ }
51
+ if (TERMINAL_STATUSES.has(status))
52
+ return {};
53
+ const ageMs = Math.max(0, Math.floor(nowMs - timestampMs));
54
+ const staleReason = !run.runInstanceId
55
+ ? "run_generation_unavailable"
56
+ : record.run_instance_id !== run.runInstanceId
57
+ ? "run_generation_replaced"
58
+ : run.status !== "running"
59
+ ? "run_terminal"
60
+ : ageMs >= RUNTIME_CONTROL_STALE_AFTER_MS
61
+ ? "age_threshold_reached"
62
+ : undefined;
63
+ const projected = ControlProjection.projectRunControl(record);
64
+ const pending = {
65
+ ...projected,
66
+ age_ms: ageMs,
67
+ reason: staleReason ?? "within_age_threshold",
68
+ run: run.run,
69
+ status: status,
70
+ status_at: statusTimestamp(projected, status),
71
+ };
72
+ return {
73
+ pending,
74
+ ...(staleReason ? { stale: pending } : {}),
75
+ };
76
+ }
@@ -264,7 +264,7 @@ export function applyApprovedToolReviewAtSessionBoundary(options = {}) {
264
264
  ...state,
265
265
  failedStage: "approval_state",
266
266
  lastError: "approved review path is unavailable",
267
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
267
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
268
268
  phase: "processing_failed",
269
269
  updatedAt: (options.now ?? (() => new Date()))().toISOString(),
270
270
  };
@@ -287,7 +287,7 @@ export function applyApprovedToolReviewAtSessionBoundary(options = {}) {
287
287
  ...state,
288
288
  failedStage: "transaction",
289
289
  lastError: `tool review transaction remained ${transaction.phase}`,
290
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
290
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
291
291
  phase: "processing_failed",
292
292
  updatedAt: (options.now ?? (() => new Date()))().toISOString(),
293
293
  };
@@ -316,7 +316,7 @@ export function applyApprovedToolReviewAtSessionBoundary(options = {}) {
316
316
  ...pending,
317
317
  failedStage: "lineage",
318
318
  lastError: error instanceof Error ? error.message : String(error),
319
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
319
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
320
320
  };
321
321
  writeJsonAtomic(statePath, failedPending);
322
322
  return { outcome: "lineage_pending", state: failedPending };
@@ -337,7 +337,7 @@ export function applyApprovedToolReviewAtSessionBoundary(options = {}) {
337
337
  ...state,
338
338
  failedStage: "transaction",
339
339
  lastError: error instanceof Error ? error.message : String(error),
340
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
340
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
341
341
  phase: "processing_failed",
342
342
  updatedAt: (options.now ?? (() => new Date()))().toISOString(),
343
343
  };
@@ -401,7 +401,7 @@ export function createToolReviewScheduler(deps) {
401
401
  ...existing,
402
402
  failedStage: processed.stage ?? "review_result",
403
403
  lastError: processed.error ?? "automatic tool reviewer failed",
404
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
404
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
405
405
  phase: processed.outcome === "processing_failed"
406
406
  ? "processing_failed"
407
407
  : "failed",
@@ -437,7 +437,7 @@ export function createToolReviewScheduler(deps) {
437
437
  attempts: existing.attempts + 1,
438
438
  failedStage: "review_launch",
439
439
  lastError: error instanceof Error ? error.message : String(error),
440
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
440
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
441
441
  phase: "failed",
442
442
  updatedAt: now().toISOString(),
443
443
  });
@@ -471,7 +471,7 @@ export function createToolReviewScheduler(deps) {
471
471
  failedStage: "review_launch",
472
472
  inputPath: batch.inputPath,
473
473
  lastError: error instanceof Error ? error.message : String(error),
474
- nextAction: "message to=tool:pi-actors type=review.retry body={\"scope\":\"tool\"}",
474
+ nextAction: "message target=runtime action=review.retry input={\"scope\":\"tool\"}",
475
475
  phase: "failed",
476
476
  reviewerInputPath: batch.reviewerInputPath,
477
477
  reviewId: batch.reviewId,
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Public inspect tool behavior
3
- * Zones: actor observation, recipe registry inspection, room/session/tool/run views
4
- * Owns the public inspect execution path and compact observation responses
2
+ * Public inspect tool behavior.
3
+ * Zones: Run Recipe/Trace/Control views and runtime/recipe/tool diagnostics
4
+ * Owns exact inspect target/view dispatch; source projection stays in domain modules.
5
5
  */
6
6
  export interface InspectToolDeps<TContext = unknown> {
7
7
  getRunStatus?: (runOrDir: string) => Record<string, any>;