@evalops/maestro 0.10.50 → 0.10.51

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 (406) hide show
  1. package/dist/agent/agent-outcome.d.ts +54 -0
  2. package/dist/agent/agent-outcome.d.ts.map +1 -0
  3. package/dist/agent/agent-outcome.js +142 -0
  4. package/dist/agent/agent-outcome.js.map +1 -0
  5. package/dist/agent/agent-resume.d.ts.map +1 -1
  6. package/dist/agent/agent-resume.js +3 -3
  7. package/dist/agent/agent-resume.js.map +1 -1
  8. package/dist/agent/agent-run-summary.d.ts +37 -0
  9. package/dist/agent/agent-run-summary.d.ts.map +1 -0
  10. package/dist/agent/agent-run-summary.js +15 -0
  11. package/dist/agent/agent-run-summary.js.map +1 -0
  12. package/dist/agent/agent-work-board.d.ts +82 -0
  13. package/dist/agent/agent-work-board.d.ts.map +1 -0
  14. package/dist/agent/agent-work-board.js +312 -0
  15. package/dist/agent/agent-work-board.js.map +1 -0
  16. package/dist/agent/auto-compaction.d.ts +7 -2
  17. package/dist/agent/auto-compaction.d.ts.map +1 -1
  18. package/dist/agent/auto-compaction.js +23 -10
  19. package/dist/agent/auto-compaction.js.map +1 -1
  20. package/dist/agent/mission-artifacts.d.ts +62 -0
  21. package/dist/agent/mission-artifacts.d.ts.map +1 -0
  22. package/dist/agent/mission-artifacts.js +438 -0
  23. package/dist/agent/mission-artifacts.js.map +1 -0
  24. package/dist/agent/mission-manifest.d.ts +139 -3
  25. package/dist/agent/mission-manifest.d.ts.map +1 -1
  26. package/dist/agent/mission-manifest.js +549 -3
  27. package/dist/agent/mission-manifest.js.map +1 -1
  28. package/dist/agent/mission-store.d.ts +80 -0
  29. package/dist/agent/mission-store.d.ts.map +1 -0
  30. package/dist/agent/mission-store.js +603 -0
  31. package/dist/agent/mission-store.js.map +1 -0
  32. package/dist/agent/modes.d.ts +2 -2
  33. package/dist/agent/modes.d.ts.map +1 -1
  34. package/dist/agent/modes.js +10 -3
  35. package/dist/agent/modes.js.map +1 -1
  36. package/dist/agent/providers/codex-app-server.d.ts.map +1 -1
  37. package/dist/agent/providers/codex-app-server.js +1 -3
  38. package/dist/agent/providers/codex-app-server.js.map +1 -1
  39. package/dist/agent/providers/google-gemini-cli.js +203 -107
  40. package/dist/agent/providers/google.js +100 -41
  41. package/dist/agent/providers/scripted.d.ts.map +1 -1
  42. package/dist/agent/providers/scripted.js +1 -3
  43. package/dist/agent/providers/scripted.js.map +1 -1
  44. package/dist/agent/providers/validation.d.ts.map +1 -1
  45. package/dist/agent/providers/validation.js +1 -3
  46. package/dist/agent/providers/validation.js.map +1 -1
  47. package/dist/agent/providers/vertex.js +203 -107
  48. package/dist/agent/snapshot-store.d.ts +32 -0
  49. package/dist/agent/snapshot-store.d.ts.map +1 -0
  50. package/dist/agent/snapshot-store.js +195 -0
  51. package/dist/agent/snapshot-store.js.map +1 -0
  52. package/dist/agent/specialist-profiles.d.ts +36 -0
  53. package/dist/agent/specialist-profiles.d.ts.map +1 -0
  54. package/dist/agent/specialist-profiles.js +159 -0
  55. package/dist/agent/specialist-profiles.js.map +1 -0
  56. package/dist/agent/subagent-specs.d.ts +4 -1
  57. package/dist/agent/subagent-specs.d.ts.map +1 -1
  58. package/dist/agent/subagent-specs.js +81 -8
  59. package/dist/agent/subagent-specs.js.map +1 -1
  60. package/dist/agent/swarm/coverage-gate.d.ts +37 -0
  61. package/dist/agent/swarm/coverage-gate.d.ts.map +1 -0
  62. package/dist/agent/swarm/coverage-gate.js +48 -0
  63. package/dist/agent/swarm/coverage-gate.js.map +1 -0
  64. package/dist/agent/swarm/executor.d.ts +1 -0
  65. package/dist/agent/swarm/executor.d.ts.map +1 -1
  66. package/dist/agent/swarm/executor.js +151 -15
  67. package/dist/agent/swarm/executor.js.map +1 -1
  68. package/dist/agent/swarm/orchestrator-prompt.d.ts +25 -0
  69. package/dist/agent/swarm/orchestrator-prompt.d.ts.map +1 -0
  70. package/dist/agent/swarm/orchestrator-prompt.js +48 -0
  71. package/dist/agent/swarm/orchestrator-prompt.js.map +1 -0
  72. package/dist/agent/swarm/plan-parser.d.ts.map +1 -1
  73. package/dist/agent/swarm/plan-parser.js +27 -2
  74. package/dist/agent/swarm/plan-parser.js.map +1 -1
  75. package/dist/agent/swarm/types.d.ts +17 -0
  76. package/dist/agent/swarm/types.d.ts.map +1 -1
  77. package/dist/agent/swarm/types.js.map +1 -1
  78. package/dist/agent/swarm/validation-directive.d.ts +21 -0
  79. package/dist/agent/swarm/validation-directive.d.ts.map +1 -0
  80. package/dist/agent/swarm/validation-directive.js +25 -0
  81. package/dist/agent/swarm/validation-directive.js.map +1 -0
  82. package/dist/agent/transport/tool-execution-bridge.d.ts.map +1 -1
  83. package/dist/agent/transport/tool-execution-bridge.js +4 -1
  84. package/dist/agent/transport/tool-execution-bridge.js.map +1 -1
  85. package/dist/api/enterprise-routes.d.ts.map +1 -1
  86. package/dist/api/enterprise-routes.js +87 -10
  87. package/dist/api/enterprise-routes.js.map +1 -1
  88. package/dist/api/org-settings-merge.d.ts +12 -0
  89. package/dist/api/org-settings-merge.d.ts.map +1 -0
  90. package/dist/api/org-settings-merge.js +38 -0
  91. package/dist/api/org-settings-merge.js.map +1 -0
  92. package/dist/api/user-settings-merge.d.ts +16 -0
  93. package/dist/api/user-settings-merge.d.ts.map +1 -0
  94. package/dist/api/user-settings-merge.js +37 -0
  95. package/dist/api/user-settings-merge.js.map +1 -0
  96. package/dist/app-server/daemon-lifecycle-api.d.ts.map +1 -1
  97. package/dist/app-server/daemon-lifecycle-api.js +1 -3
  98. package/dist/app-server/daemon-lifecycle-api.js.map +1 -1
  99. package/dist/app-server/external-agent-import-api.d.ts.map +1 -1
  100. package/dist/app-server/external-agent-import-api.js +1 -3
  101. package/dist/app-server/external-agent-import-api.js.map +1 -1
  102. package/dist/app-server/network-governance-api.d.ts.map +1 -1
  103. package/dist/app-server/network-governance-api.js +1 -3
  104. package/dist/app-server/network-governance-api.js.map +1 -1
  105. package/dist/app-server/plugin-bundle-api.d.ts.map +1 -1
  106. package/dist/app-server/plugin-bundle-api.js +1 -3
  107. package/dist/app-server/plugin-bundle-api.js.map +1 -1
  108. package/dist/app-server/policy-control-api.d.ts.map +1 -1
  109. package/dist/app-server/policy-control-api.js +1 -3
  110. package/dist/app-server/policy-control-api.js.map +1 -1
  111. package/dist/app-server/protocol-modes-api.d.ts.map +1 -1
  112. package/dist/app-server/protocol-modes-api.js +1 -3
  113. package/dist/app-server/protocol-modes-api.js.map +1 -1
  114. package/dist/cli/args.d.ts +2 -0
  115. package/dist/cli/args.d.ts.map +1 -1
  116. package/dist/cli/args.js +15 -0
  117. package/dist/cli/args.js.map +1 -1
  118. package/dist/cli/commands/a2a.d.ts.map +1 -1
  119. package/dist/cli/commands/a2a.js +1 -3
  120. package/dist/cli/commands/a2a.js.map +1 -1
  121. package/dist/cli/commands/agents.d.ts +4 -0
  122. package/dist/cli/commands/agents.d.ts.map +1 -1
  123. package/dist/cli/commands/agents.js +149 -0
  124. package/dist/cli/commands/agents.js.map +1 -1
  125. package/dist/cli/commands/mission.d.ts +4 -0
  126. package/dist/cli/commands/mission.d.ts.map +1 -0
  127. package/dist/cli/commands/mission.js +196 -0
  128. package/dist/cli/commands/mission.js.map +1 -0
  129. package/dist/cli/commands/value.d.ts +10 -0
  130. package/dist/cli/commands/value.d.ts.map +1 -0
  131. package/dist/cli/commands/value.js +33 -0
  132. package/dist/cli/commands/value.js.map +1 -0
  133. package/dist/cli/headless-protocol.d.ts.map +1 -1
  134. package/dist/cli/headless-protocol.js +1 -3
  135. package/dist/cli/headless-protocol.js.map +1 -1
  136. package/dist/cli/help.d.ts.map +1 -1
  137. package/dist/cli/help.js +10 -0
  138. package/dist/cli/help.js.map +1 -1
  139. package/dist/cli/system-prompt.d.ts.map +1 -1
  140. package/dist/cli/system-prompt.js +38 -7
  141. package/dist/cli/system-prompt.js.map +1 -1
  142. package/dist/cli-runtime.js +7756 -2800
  143. package/dist/cli-tui/client-tools/client-tool-controller.d.ts.map +1 -1
  144. package/dist/cli-tui/client-tools/client-tool-controller.js +1 -3
  145. package/dist/cli-tui/client-tools/client-tool-controller.js.map +1 -1
  146. package/dist/cli-tui/commands/undo-handlers.d.ts.map +1 -1
  147. package/dist/cli-tui/commands/undo-handlers.js +7 -2
  148. package/dist/cli-tui/commands/undo-handlers.js.map +1 -1
  149. package/dist/cli-tui/tui-renderer/skills-controller.d.ts +3 -0
  150. package/dist/cli-tui/tui-renderer/skills-controller.d.ts.map +1 -1
  151. package/dist/cli-tui/tui-renderer/skills-controller.js +77 -33
  152. package/dist/cli-tui/tui-renderer/skills-controller.js.map +1 -1
  153. package/dist/codex/app-server-client.d.ts.map +1 -1
  154. package/dist/codex/app-server-client.js +1 -3
  155. package/dist/codex/app-server-client.js.map +1 -1
  156. package/dist/codex/compatibility.d.ts.map +1 -1
  157. package/dist/codex/compatibility.js +1 -3
  158. package/dist/codex/compatibility.js.map +1 -1
  159. package/dist/codex/subagent-dispatch-table.d.ts +8 -0
  160. package/dist/codex/subagent-dispatch-table.d.ts.map +1 -1
  161. package/dist/codex/subagent-dispatch-table.js +23 -0
  162. package/dist/codex/subagent-dispatch-table.js.map +1 -1
  163. package/dist/context/manifest.d.ts.map +1 -1
  164. package/dist/context/manifest.js +1 -3
  165. package/dist/context/manifest.js.map +1 -1
  166. package/dist/conversation/render-model.d.ts +0 -36
  167. package/dist/conversation/render-model.d.ts.map +1 -1
  168. package/dist/conversation/render-model.js +1 -3
  169. package/dist/conversation/render-model.js.map +1 -1
  170. package/dist/customer-value/ambient-learning.d.ts +75 -0
  171. package/dist/customer-value/ambient-learning.d.ts.map +1 -0
  172. package/dist/customer-value/ambient-learning.js +472 -0
  173. package/dist/customer-value/ambient-learning.js.map +1 -0
  174. package/dist/customer-value/internal-helpers.d.ts +13 -0
  175. package/dist/customer-value/internal-helpers.d.ts.map +1 -0
  176. package/dist/customer-value/internal-helpers.js +70 -0
  177. package/dist/customer-value/internal-helpers.js.map +1 -0
  178. package/dist/customer-value/report.d.ts +282 -0
  179. package/dist/customer-value/report.d.ts.map +1 -0
  180. package/dist/customer-value/report.js +2085 -0
  181. package/dist/customer-value/report.js.map +1 -0
  182. package/dist/db/schema.d.ts +5 -1
  183. package/dist/db/schema.d.ts.map +1 -1
  184. package/dist/db/schema.js.map +1 -1
  185. package/dist/evalops/agent-bootstrap.d.ts.map +1 -1
  186. package/dist/evalops/agent-bootstrap.js +1 -3
  187. package/dist/evalops/agent-bootstrap.js.map +1 -1
  188. package/dist/evalops/agent-mcp-metadata.d.ts.map +1 -1
  189. package/dist/evalops/agent-mcp-metadata.js +1 -3
  190. package/dist/evalops/agent-mcp-metadata.js.map +1 -1
  191. package/dist/index.d.ts +1 -0
  192. package/dist/index.d.ts.map +1 -1
  193. package/dist/index.js +1 -0
  194. package/dist/index.js.map +1 -1
  195. package/dist/installers/maestro-review-workflow.d.ts +38 -0
  196. package/dist/installers/maestro-review-workflow.d.ts.map +1 -0
  197. package/dist/installers/maestro-review-workflow.js +163 -0
  198. package/dist/installers/maestro-review-workflow.js.map +1 -0
  199. package/dist/load-env.d.ts.map +1 -1
  200. package/dist/load-env.js +2 -1
  201. package/dist/load-env.js.map +1 -1
  202. package/dist/main.d.ts.map +1 -1
  203. package/dist/main.js +92 -3
  204. package/dist/main.js.map +1 -1
  205. package/dist/mcp/config.d.ts.map +1 -1
  206. package/dist/mcp/config.js +1 -3
  207. package/dist/mcp/config.js.map +1 -1
  208. package/dist/mcp/elicitation.d.ts.map +1 -1
  209. package/dist/mcp/elicitation.js +1 -3
  210. package/dist/mcp/elicitation.js.map +1 -1
  211. package/dist/mcp/official-registry.d.ts.map +1 -1
  212. package/dist/mcp/official-registry.js +1 -3
  213. package/dist/mcp/official-registry.js.map +1 -1
  214. package/dist/mcp/workspace-trust.d.ts.map +1 -1
  215. package/dist/mcp/workspace-trust.js +1 -3
  216. package/dist/mcp/workspace-trust.js.map +1 -1
  217. package/dist/memory/service-client.d.ts.map +1 -1
  218. package/dist/memory/service-client.js +1 -3
  219. package/dist/memory/service-client.js.map +1 -1
  220. package/dist/models/config-loader.d.ts.map +1 -1
  221. package/dist/models/config-loader.js +1 -3
  222. package/dist/models/config-loader.js.map +1 -1
  223. package/dist/node_modules/@evalops/contracts/dist/index.d.ts +1 -0
  224. package/dist/node_modules/@evalops/contracts/dist/index.d.ts.map +1 -1
  225. package/dist/node_modules/@evalops/contracts/dist/index.js +1 -0
  226. package/dist/node_modules/@evalops/contracts/dist/index.js.map +1 -1
  227. package/dist/node_modules/@evalops/contracts/dist/maestro-settings.d.ts +61 -0
  228. package/dist/node_modules/@evalops/contracts/dist/maestro-settings.d.ts.map +1 -0
  229. package/dist/node_modules/@evalops/contracts/dist/maestro-settings.js +183 -0
  230. package/dist/node_modules/@evalops/contracts/dist/maestro-settings.js.map +1 -0
  231. package/dist/node_modules/@evalops/contracts/package.json +1 -1
  232. package/dist/node_modules/@evalops/tui/package.json +1 -1
  233. package/dist/oauth/connectors.d.ts.map +1 -1
  234. package/dist/oauth/connectors.js +1 -3
  235. package/dist/oauth/connectors.js.map +1 -1
  236. package/dist/oauth/evalops.d.ts.map +1 -1
  237. package/dist/oauth/evalops.js +1 -3
  238. package/dist/oauth/evalops.js.map +1 -1
  239. package/dist/platform/a2a-client.d.ts.map +1 -1
  240. package/dist/platform/a2a-client.js +1 -3
  241. package/dist/platform/a2a-client.js.map +1 -1
  242. package/dist/platform/a2a-cockpit.d.ts +1 -0
  243. package/dist/platform/a2a-cockpit.d.ts.map +1 -1
  244. package/dist/platform/a2a-cockpit.js +42 -11
  245. package/dist/platform/a2a-cockpit.js.map +1 -1
  246. package/dist/platform/a2a-completion-audit.d.ts +1 -1
  247. package/dist/platform/a2a-completion-audit.d.ts.map +1 -1
  248. package/dist/platform/a2a-completion-audit.js +7 -11
  249. package/dist/platform/a2a-completion-audit.js.map +1 -1
  250. package/dist/platform/a2a-maestro-peer.js +16 -0
  251. package/dist/platform/a2a-maestro-peer.js.map +1 -1
  252. package/dist/platform/a2a-peer-pairing.d.ts.map +1 -1
  253. package/dist/platform/a2a-peer-pairing.js +1 -3
  254. package/dist/platform/a2a-peer-pairing.js.map +1 -1
  255. package/dist/platform/a2a-peer-registry.d.ts.map +1 -1
  256. package/dist/platform/a2a-peer-registry.js +1 -3
  257. package/dist/platform/a2a-peer-registry.js.map +1 -1
  258. package/dist/platform/a2a-task-ledger.d.ts +20 -0
  259. package/dist/platform/a2a-task-ledger.d.ts.map +1 -1
  260. package/dist/platform/a2a-task-ledger.js +207 -11
  261. package/dist/platform/a2a-task-ledger.js.map +1 -1
  262. package/dist/platform/a2a-work-graph.d.ts.map +1 -1
  263. package/dist/platform/a2a-work-graph.js +1 -3
  264. package/dist/platform/a2a-work-graph.js.map +1 -1
  265. package/dist/platform/operating-layer.d.ts.map +1 -1
  266. package/dist/platform/operating-layer.js +14 -8
  267. package/dist/platform/operating-layer.js.map +1 -1
  268. package/dist/platform/tool-execution-client.d.ts.map +1 -1
  269. package/dist/platform/tool-execution-client.js +19 -2
  270. package/dist/platform/tool-execution-client.js.map +1 -1
  271. package/dist/providers/auth.d.ts.map +1 -1
  272. package/dist/providers/auth.js +1 -3
  273. package/dist/providers/auth.js.map +1 -1
  274. package/dist/runtime/env.d.ts +9 -1
  275. package/dist/runtime/env.d.ts.map +1 -1
  276. package/dist/runtime/env.js +63 -1
  277. package/dist/runtime/env.js.map +1 -1
  278. package/dist/safety/policy.d.ts.map +1 -1
  279. package/dist/safety/policy.js +1 -4
  280. package/dist/safety/policy.js.map +1 -1
  281. package/dist/sandbox/docker-sandbox.d.ts.map +1 -1
  282. package/dist/sandbox/docker-sandbox.js +6 -1
  283. package/dist/sandbox/docker-sandbox.js.map +1 -1
  284. package/dist/server/handlers/hosted-runner-drain.d.ts.map +1 -1
  285. package/dist/server/handlers/hosted-runner-drain.js +1 -3
  286. package/dist/server/handlers/hosted-runner-drain.js.map +1 -1
  287. package/dist/server/handlers/platform-a2a-push.d.ts.map +1 -1
  288. package/dist/server/handlers/platform-a2a-push.js +53 -2
  289. package/dist/server/handlers/platform-a2a-push.js.map +1 -1
  290. package/dist/server/handlers/runtime-app-server-ws.d.ts.map +1 -1
  291. package/dist/server/handlers/runtime-app-server-ws.js +1 -3
  292. package/dist/server/handlers/runtime-app-server-ws.js.map +1 -1
  293. package/dist/server/headless-runtime-service.d.ts +16 -0
  294. package/dist/server/headless-runtime-service.d.ts.map +1 -1
  295. package/dist/server/headless-runtime-service.js +232 -206
  296. package/dist/server/headless-runtime-service.js.map +1 -1
  297. package/dist/server/hosted-agent-runtime-progress.d.ts.map +1 -1
  298. package/dist/server/hosted-agent-runtime-progress.js +12 -3
  299. package/dist/server/hosted-agent-runtime-progress.js.map +1 -1
  300. package/dist/server/pending-request-payload.d.ts.map +1 -1
  301. package/dist/server/pending-request-payload.js +1 -3
  302. package/dist/server/pending-request-payload.js.map +1 -1
  303. package/dist/server/route-auth.d.ts.map +1 -1
  304. package/dist/server/route-auth.js +2 -0
  305. package/dist/server/route-auth.js.map +1 -1
  306. package/dist/server/session-serialization.d.ts.map +1 -1
  307. package/dist/server/session-serialization.js +1 -3
  308. package/dist/server/session-serialization.js.map +1 -1
  309. package/dist/services/compliance/normalize.d.ts.map +1 -1
  310. package/dist/services/compliance/normalize.js +1 -3
  311. package/dist/services/compliance/normalize.js.map +1 -1
  312. package/dist/services/intelligent-router/normalize.d.ts.map +1 -1
  313. package/dist/services/intelligent-router/normalize.js +1 -3
  314. package/dist/services/intelligent-router/normalize.js.map +1 -1
  315. package/dist/services/revenue-attribution/normalize.d.ts.map +1 -1
  316. package/dist/services/revenue-attribution/normalize.js +1 -3
  317. package/dist/services/revenue-attribution/normalize.js.map +1 -1
  318. package/dist/services/traces/normalize.d.ts.map +1 -1
  319. package/dist/services/traces/normalize.js +1 -3
  320. package/dist/services/traces/normalize.js.map +1 -1
  321. package/dist/services/workspace-config/normalize.d.ts.map +1 -1
  322. package/dist/services/workspace-config/normalize.js +1 -3
  323. package/dist/services/workspace-config/normalize.js.map +1 -1
  324. package/dist/skills/composer.d.ts.map +1 -1
  325. package/dist/skills/composer.js +13 -1
  326. package/dist/skills/composer.js.map +1 -1
  327. package/dist/skills/index.d.ts +1 -0
  328. package/dist/skills/index.d.ts.map +1 -1
  329. package/dist/skills/index.js +1 -0
  330. package/dist/skills/index.js.map +1 -1
  331. package/dist/skills/learned-guidelines.d.ts +33 -0
  332. package/dist/skills/learned-guidelines.d.ts.map +1 -0
  333. package/dist/skills/learned-guidelines.js +291 -0
  334. package/dist/skills/learned-guidelines.js.map +1 -0
  335. package/dist/skills/linter.d.ts.map +1 -1
  336. package/dist/skills/linter.js +1 -3
  337. package/dist/skills/linter.js.map +1 -1
  338. package/dist/skills/runtime-activation.d.ts +1 -0
  339. package/dist/skills/runtime-activation.d.ts.map +1 -1
  340. package/dist/skills/runtime-activation.js +2 -3
  341. package/dist/skills/runtime-activation.js.map +1 -1
  342. package/dist/skills/tool.d.ts.map +1 -1
  343. package/dist/skills/tool.js +26 -21
  344. package/dist/skills/tool.js.map +1 -1
  345. package/dist/skills/trust-cache.d.ts +7 -0
  346. package/dist/skills/trust-cache.d.ts.map +1 -1
  347. package/dist/skills/trust-cache.js +16 -0
  348. package/dist/skills/trust-cache.js.map +1 -1
  349. package/dist/telemetry/agent-workforce-native-event.d.ts.map +1 -1
  350. package/dist/telemetry/agent-workforce-native-event.js +1 -3
  351. package/dist/telemetry/agent-workforce-native-event.js.map +1 -1
  352. package/dist/telemetry/maestro-event-bus.d.ts.map +1 -1
  353. package/dist/telemetry/maestro-event-bus.js +42 -81
  354. package/dist/telemetry/maestro-event-bus.js.map +1 -1
  355. package/dist/telemetry/maestro-platform-replay-fixture.d.ts.map +1 -1
  356. package/dist/telemetry/maestro-platform-replay-fixture.js +1 -3
  357. package/dist/telemetry/maestro-platform-replay-fixture.js.map +1 -1
  358. package/dist/telemetry.d.ts.map +1 -1
  359. package/dist/telemetry.js +54 -43
  360. package/dist/telemetry.js.map +1 -1
  361. package/dist/theme/theme-loader.d.ts.map +1 -1
  362. package/dist/theme/theme-loader.js +1 -3
  363. package/dist/theme/theme-loader.js.map +1 -1
  364. package/dist/tools/apply-patch.d.ts.map +1 -1
  365. package/dist/tools/apply-patch.js +76 -8
  366. package/dist/tools/apply-patch.js.map +1 -1
  367. package/dist/tools/diff-preview.d.ts.map +1 -1
  368. package/dist/tools/diff-preview.js +10 -1
  369. package/dist/tools/diff-preview.js.map +1 -1
  370. package/dist/tools/edit.d.ts.map +1 -1
  371. package/dist/tools/edit.js +17 -0
  372. package/dist/tools/edit.js.map +1 -1
  373. package/dist/tools/write.d.ts.map +1 -1
  374. package/dist/tools/write.js +9 -0
  375. package/dist/tools/write.js.map +1 -1
  376. package/dist/undo/tracker.d.ts +5 -0
  377. package/dist/undo/tracker.d.ts.map +1 -1
  378. package/dist/undo/tracker.js +13 -0
  379. package/dist/undo/tracker.js.map +1 -1
  380. package/dist/utils/fs.d.ts +1 -1
  381. package/dist/utils/fs.d.ts.map +1 -1
  382. package/dist/utils/fs.js +29 -2
  383. package/dist/utils/fs.js.map +1 -1
  384. package/dist/utils/git-stash.d.ts.map +1 -1
  385. package/dist/utils/git-stash.js +15 -8
  386. package/dist/utils/git-stash.js.map +1 -1
  387. package/dist/utils/json.d.ts +11 -0
  388. package/dist/utils/json.d.ts.map +1 -1
  389. package/dist/utils/json.js +9 -0
  390. package/dist/utils/json.js.map +1 -1
  391. package/dist/utils/shell-env.d.ts.map +1 -1
  392. package/dist/utils/shell-env.js +2 -0
  393. package/dist/utils/shell-env.js.map +1 -1
  394. package/dist/utils/url-extractor-git.d.ts +26 -0
  395. package/dist/utils/url-extractor-git.d.ts.map +1 -0
  396. package/dist/utils/url-extractor-git.js +259 -0
  397. package/dist/utils/url-extractor-git.js.map +1 -0
  398. package/dist/utils/url-extractor.d.ts.map +1 -1
  399. package/dist/utils/url-extractor.js +23 -251
  400. package/dist/utils/url-extractor.js.map +1 -1
  401. package/dist/version.json +2 -2
  402. package/package.json +310 -306
  403. package/skills/incident-triage/SKILL.md +19 -1
  404. package/skills/install-code-review/SKILL.md +69 -0
  405. package/skills/security-review/SKILL.md +68 -0
  406. package/skills/security-review/reference/rubric.md +85 -0
@@ -16,6 +16,7 @@ import { createAutomaticMemoryExtractionCoordinator, } from "../memory/auto-extr
16
16
  import { checkSessionLimits } from "../safety/policy.js";
17
17
  import { toSessionModelMetadata } from "../session/manager.js";
18
18
  import { createRuntimeSessionSummaryUpdater } from "../session/runtime-summary-updater.js";
19
+ import { isRecord } from "../utils/json.js";
19
20
  import { createLogger } from "../utils/logger.js";
20
21
  import { sanitizeWithStaticMask } from "../utils/secret-redactor.js";
21
22
  import { WebActionApprovalService } from "./approval-service.js";
@@ -121,9 +122,6 @@ export class HeadlessRuntimeNotReadyError extends Error {
121
122
  this.name = "HeadlessRuntimeNotReadyError";
122
123
  }
123
124
  }
124
- function isRecord(value) {
125
- return Boolean(value && typeof value === "object" && !Array.isArray(value));
126
- }
127
125
  function restoreFlushStatus(value) {
128
126
  switch (value) {
129
127
  case "completed":
@@ -1218,223 +1216,251 @@ export class HeadlessSessionRuntime {
1218
1216
  }
1219
1217
  this.updatedAt = Date.now();
1220
1218
  switch (msg.type) {
1221
- case "hello": {
1222
- applyOutgoingHeadlessMessage(this.state, msg);
1223
- const subscriber = metadata?.subscriptionId
1224
- ? this.subscribers.get(metadata.subscriptionId)
1225
- : undefined;
1226
- this.updateConnectionMetadata({
1227
- connectionId: subscriber?.connectionId ?? metadata?.connectionId ?? undefined,
1228
- clientProtocolVersion: msg.protocol_version,
1229
- clientInfo: msg.client_info,
1230
- capabilities: msg.capabilities,
1231
- optOutNotifications: msg.opt_out_notifications,
1232
- role: msg.role,
1233
- });
1234
- const connection = this.getConnectionById(subscriber?.connectionId ?? metadata?.connectionId ?? undefined) ?? this.getPreferredConnection();
1235
- if (connection) {
1236
- this.enqueuePrivateMessage(this.translator.buildHelloOkMessage({
1237
- connection_id: connection.id,
1238
- protocol_version: HEADLESS_PROTOCOL_VERSION,
1239
- client_protocol_version: connection.clientProtocolVersion,
1240
- client_info: connection.clientInfo,
1241
- capabilities: connection.capabilities,
1242
- opt_out_notifications: connection.optOutNotifications
1243
- ? [...connection.optOutNotifications]
1244
- : undefined,
1245
- role: connection.role,
1246
- controller_connection_id: this.controllerConnectionId,
1247
- lease_expires_at: this.getLeaseExpiryIso(connection),
1248
- }), metadata);
1249
- }
1250
- if (msg.protocol_version &&
1251
- msg.protocol_version !== HEADLESS_PROTOCOL_VERSION) {
1252
- this.publish({
1253
- type: "status",
1254
- message: `Client protocol ${msg.protocol_version} attached to server ${HEADLESS_PROTOCOL_VERSION}`,
1255
- });
1256
- }
1257
- return;
1258
- }
1259
- case "init": {
1260
- this.lastInit = msg;
1261
- applyOutgoingHeadlessMessage(this.state, msg);
1262
- const applied = applyInitMessage(this.agent, msg, this.approvalService);
1263
- this.publish({
1264
- type: "status",
1265
- message: applied.length > 0
1266
- ? `Initialized: ${applied.join(", ")}`
1267
- : "Init received with no changes",
1268
- });
1269
- return;
1270
- }
1271
- case "prompt": {
1272
- if (this.running) {
1273
- throw new Error("Headless runtime is already processing a prompt");
1274
- }
1275
- applyOutgoingHeadlessMessage(this.state, msg);
1276
- this.running = true;
1277
- let attachments;
1278
- if (msg.attachments?.length) {
1279
- const loaded = await loadPromptAttachments(msg.attachments, (message) => {
1280
- this.publish({
1281
- type: "error",
1282
- message,
1283
- fatal: false,
1284
- error_type: "tool",
1285
- });
1286
- });
1287
- if (loaded.length > 0) {
1288
- attachments = loaded;
1289
- this.publish({
1290
- type: "status",
1291
- message: `Loaded ${loaded.length} attachment(s)`,
1292
- });
1293
- }
1294
- }
1295
- void this.runPrompt(msg.content, attachments);
1296
- return;
1297
- }
1219
+ case "hello":
1220
+ return this.handleHello(msg, metadata);
1221
+ case "init":
1222
+ return this.handleInit(msg);
1223
+ case "prompt":
1224
+ return this.handlePrompt(msg);
1298
1225
  case "interrupt":
1299
1226
  case "cancel":
1300
- this.cancelPendingServerRequests(msg.type === "interrupt"
1301
- ? "Interrupted before request completed"
1302
- : "Cancelled before request completed");
1303
- applyOutgoingHeadlessMessage(this.state, msg);
1304
- await this.utilityCommands.dispose(msg.type === "interrupt"
1305
- ? "Interrupted while utility command was still running"
1306
- : "Cancelled while utility command was still running");
1307
- this.fileWatches.dispose(msg.type === "interrupt"
1308
- ? "Interrupted while file watch was still running"
1309
- : "Cancelled while file watch was still running");
1310
- this.agent.abort();
1311
- this.publishSnapshot();
1312
- return;
1227
+ return this.handleInterrupt(msg);
1313
1228
  case "tool_response":
1314
- this.resolveLegacyToolResponse(msg);
1315
- applyOutgoingHeadlessMessage(this.state, msg);
1316
- this.publishSnapshot();
1317
- return;
1318
- case "client_tool_result": {
1319
- this.resolveLegacyClientToolResult(msg);
1320
- applyOutgoingHeadlessMessage(this.state, msg);
1321
- this.publishSnapshot();
1322
- return;
1323
- }
1229
+ return this.handleToolResponse(msg);
1230
+ case "client_tool_result":
1231
+ return this.handleClientToolResult(msg);
1324
1232
  case "server_request_response":
1325
- this.resolveServerRequestResponse(msg);
1326
- applyOutgoingHeadlessMessage(this.state, msg);
1327
- this.publishSnapshot();
1328
- return;
1233
+ return this.handleServerRequestResponse(msg);
1329
1234
  case "shutdown":
1330
- this.cancelPendingServerRequests("Shutdown before request completed");
1331
- applyOutgoingHeadlessMessage(this.state, msg);
1332
- await this.utilityCommands.dispose("Headless runtime shutdown while utility command was still running");
1333
- this.fileWatches.dispose("Headless runtime shutdown while file watch was still running");
1334
- this.agent.abort();
1335
- this.publishSnapshot();
1336
- this.finalizeDisposal();
1337
- return;
1235
+ return this.handleShutdown(msg);
1338
1236
  case "utility_command_start":
1339
- if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
1340
- throw new Error("utility_command_start requires command_exec capability");
1341
- }
1342
- await this.utilityCommands.start({
1343
- command_id: msg.command_id,
1344
- command: msg.command,
1345
- cwd: msg.cwd,
1346
- env: msg.env,
1347
- shell_mode: msg.shell_mode,
1348
- terminal_mode: msg.terminal_mode,
1349
- allow_stdin: msg.allow_stdin,
1350
- columns: msg.columns,
1351
- rows: msg.rows,
1352
- owner_connection_id: this.getMessageConnectionId(metadata),
1353
- });
1354
- return;
1237
+ return this.handleUtilityCommandStart(msg, metadata);
1355
1238
  case "utility_command_terminate":
1356
- this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
1357
- await this.utilityCommands.terminate(msg.command_id, msg.force);
1358
- return;
1239
+ return this.handleUtilityCommandTerminate(msg, metadata);
1359
1240
  case "utility_command_stdin":
1360
- if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
1361
- throw new Error("utility_command_stdin requires command_exec capability");
1362
- }
1363
- this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
1364
- await this.utilityCommands.writeStdin(msg.command_id, msg.content, msg.eof);
1365
- return;
1241
+ return this.handleUtilityCommandStdin(msg, metadata);
1366
1242
  case "utility_command_resize":
1367
- if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
1368
- throw new Error("utility_command_resize requires command_exec capability");
1369
- }
1370
- this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
1371
- await this.utilityCommands.resize(msg.command_id, msg.columns, msg.rows);
1372
- return;
1243
+ return this.handleUtilityCommandResize(msg, metadata);
1373
1244
  case "utility_file_search":
1374
- if (!this.state.capabilities?.utility_operations?.includes("file_search")) {
1375
- throw new Error("utility_file_search requires file_search capability");
1376
- }
1377
- {
1378
- const result = searchWorkspaceFiles({
1379
- query: msg.query,
1380
- cwd: msg.cwd,
1381
- workspaceRoot: this.workspaceRoot,
1382
- limit: msg.limit,
1383
- });
1384
- this.publish({
1385
- type: "utility_file_search_results",
1386
- search_id: msg.search_id,
1387
- query: result.query,
1388
- cwd: result.cwd,
1389
- results: result.results,
1390
- truncated: result.truncated,
1391
- });
1392
- }
1393
- return;
1245
+ return this.handleUtilityFileSearch(msg);
1394
1246
  case "utility_file_read":
1395
- if (!this.state.capabilities?.utility_operations?.includes("file_read")) {
1396
- throw new Error("utility_file_read requires file_read capability");
1397
- }
1398
- {
1399
- const result = await readWorkspaceFile({
1400
- path: msg.path,
1401
- cwd: msg.cwd,
1402
- workspaceRoot: this.workspaceRoot,
1403
- offset: msg.offset,
1404
- limit: msg.limit,
1405
- });
1406
- this.publish({
1407
- type: "utility_file_read_result",
1408
- read_id: msg.read_id,
1409
- path: result.path,
1410
- relative_path: result.relative_path,
1411
- cwd: result.cwd,
1412
- content: result.content,
1413
- start_line: result.start_line,
1414
- end_line: result.end_line,
1415
- total_lines: result.total_lines,
1416
- truncated: result.truncated,
1417
- });
1418
- }
1419
- return;
1247
+ return this.handleUtilityFileRead(msg);
1420
1248
  case "utility_file_watch_start":
1421
- if (!this.state.capabilities?.utility_operations?.includes("file_watch")) {
1422
- throw new Error("utility_file_watch_start requires file_watch capability");
1423
- }
1424
- await this.fileWatches.start({
1425
- watch_id: msg.watch_id,
1426
- root_dir: msg.root_dir,
1427
- include_patterns: msg.include_patterns,
1428
- exclude_patterns: msg.exclude_patterns,
1429
- debounce_ms: msg.debounce_ms,
1430
- owner_connection_id: this.getMessageConnectionId(metadata),
1431
- });
1432
- return;
1249
+ return this.handleUtilityFileWatchStart(msg, metadata);
1433
1250
  case "utility_file_watch_stop":
1434
- this.assertUtilityOwnerAccess(this.fileWatches.get(msg.watch_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "file watch", msg.watch_id);
1435
- this.fileWatches.stop(msg.watch_id, "Stopped by controller");
1436
- return;
1251
+ return this.handleUtilityFileWatchStop(msg, metadata);
1252
+ }
1253
+ }
1254
+ async handleHello(msg, metadata) {
1255
+ applyOutgoingHeadlessMessage(this.state, msg);
1256
+ const subscriber = metadata?.subscriptionId
1257
+ ? this.subscribers.get(metadata.subscriptionId)
1258
+ : undefined;
1259
+ this.updateConnectionMetadata({
1260
+ connectionId: subscriber?.connectionId ?? metadata?.connectionId ?? undefined,
1261
+ clientProtocolVersion: msg.protocol_version,
1262
+ clientInfo: msg.client_info,
1263
+ capabilities: msg.capabilities,
1264
+ optOutNotifications: msg.opt_out_notifications,
1265
+ role: msg.role,
1266
+ });
1267
+ const connection = this.getConnectionById(subscriber?.connectionId ?? metadata?.connectionId ?? undefined) ?? this.getPreferredConnection();
1268
+ if (connection) {
1269
+ this.enqueuePrivateMessage(this.translator.buildHelloOkMessage({
1270
+ connection_id: connection.id,
1271
+ protocol_version: HEADLESS_PROTOCOL_VERSION,
1272
+ client_protocol_version: connection.clientProtocolVersion,
1273
+ client_info: connection.clientInfo,
1274
+ capabilities: connection.capabilities,
1275
+ opt_out_notifications: connection.optOutNotifications
1276
+ ? [...connection.optOutNotifications]
1277
+ : undefined,
1278
+ role: connection.role,
1279
+ controller_connection_id: this.controllerConnectionId,
1280
+ lease_expires_at: this.getLeaseExpiryIso(connection),
1281
+ }), metadata);
1282
+ }
1283
+ if (msg.protocol_version &&
1284
+ msg.protocol_version !== HEADLESS_PROTOCOL_VERSION) {
1285
+ this.publish({
1286
+ type: "status",
1287
+ message: `Client protocol ${msg.protocol_version} attached to server ${HEADLESS_PROTOCOL_VERSION}`,
1288
+ });
1289
+ }
1290
+ }
1291
+ async handleInit(msg) {
1292
+ this.lastInit = msg;
1293
+ applyOutgoingHeadlessMessage(this.state, msg);
1294
+ const applied = applyInitMessage(this.agent, msg, this.approvalService);
1295
+ this.publish({
1296
+ type: "status",
1297
+ message: applied.length > 0
1298
+ ? `Initialized: ${applied.join(", ")}`
1299
+ : "Init received with no changes",
1300
+ });
1301
+ }
1302
+ async handlePrompt(msg) {
1303
+ if (this.running) {
1304
+ throw new Error("Headless runtime is already processing a prompt");
1305
+ }
1306
+ applyOutgoingHeadlessMessage(this.state, msg);
1307
+ this.running = true;
1308
+ let attachments;
1309
+ if (msg.attachments?.length) {
1310
+ const loaded = await loadPromptAttachments(msg.attachments, (message) => {
1311
+ this.publish({
1312
+ type: "error",
1313
+ message,
1314
+ fatal: false,
1315
+ error_type: "tool",
1316
+ });
1317
+ });
1318
+ if (loaded.length > 0) {
1319
+ attachments = loaded;
1320
+ this.publish({
1321
+ type: "status",
1322
+ message: `Loaded ${loaded.length} attachment(s)`,
1323
+ });
1324
+ }
1437
1325
  }
1326
+ void this.runPrompt(msg.content, attachments);
1327
+ }
1328
+ async handleInterrupt(msg) {
1329
+ this.cancelPendingServerRequests(msg.type === "interrupt"
1330
+ ? "Interrupted before request completed"
1331
+ : "Cancelled before request completed");
1332
+ applyOutgoingHeadlessMessage(this.state, msg);
1333
+ await this.utilityCommands.dispose(msg.type === "interrupt"
1334
+ ? "Interrupted while utility command was still running"
1335
+ : "Cancelled while utility command was still running");
1336
+ this.fileWatches.dispose(msg.type === "interrupt"
1337
+ ? "Interrupted while file watch was still running"
1338
+ : "Cancelled while file watch was still running");
1339
+ this.agent.abort();
1340
+ this.publishSnapshot();
1341
+ }
1342
+ async handleToolResponse(msg) {
1343
+ this.resolveLegacyToolResponse(msg);
1344
+ applyOutgoingHeadlessMessage(this.state, msg);
1345
+ this.publishSnapshot();
1346
+ }
1347
+ async handleClientToolResult(msg) {
1348
+ this.resolveLegacyClientToolResult(msg);
1349
+ applyOutgoingHeadlessMessage(this.state, msg);
1350
+ this.publishSnapshot();
1351
+ }
1352
+ async handleServerRequestResponse(msg) {
1353
+ this.resolveServerRequestResponse(msg);
1354
+ applyOutgoingHeadlessMessage(this.state, msg);
1355
+ this.publishSnapshot();
1356
+ }
1357
+ async handleShutdown(msg) {
1358
+ this.cancelPendingServerRequests("Shutdown before request completed");
1359
+ applyOutgoingHeadlessMessage(this.state, msg);
1360
+ await this.utilityCommands.dispose("Headless runtime shutdown while utility command was still running");
1361
+ this.fileWatches.dispose("Headless runtime shutdown while file watch was still running");
1362
+ this.agent.abort();
1363
+ this.publishSnapshot();
1364
+ this.finalizeDisposal();
1365
+ }
1366
+ async handleUtilityCommandStart(msg, metadata) {
1367
+ if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
1368
+ throw new Error("utility_command_start requires command_exec capability");
1369
+ }
1370
+ await this.utilityCommands.start({
1371
+ command_id: msg.command_id,
1372
+ command: msg.command,
1373
+ cwd: msg.cwd,
1374
+ env: msg.env,
1375
+ shell_mode: msg.shell_mode,
1376
+ terminal_mode: msg.terminal_mode,
1377
+ allow_stdin: msg.allow_stdin,
1378
+ columns: msg.columns,
1379
+ rows: msg.rows,
1380
+ owner_connection_id: this.getMessageConnectionId(metadata),
1381
+ });
1382
+ }
1383
+ async handleUtilityCommandTerminate(msg, metadata) {
1384
+ this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
1385
+ await this.utilityCommands.terminate(msg.command_id, msg.force);
1386
+ }
1387
+ async handleUtilityCommandStdin(msg, metadata) {
1388
+ if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
1389
+ throw new Error("utility_command_stdin requires command_exec capability");
1390
+ }
1391
+ this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
1392
+ await this.utilityCommands.writeStdin(msg.command_id, msg.content, msg.eof);
1393
+ }
1394
+ async handleUtilityCommandResize(msg, metadata) {
1395
+ if (!this.state.capabilities?.utility_operations?.includes("command_exec")) {
1396
+ throw new Error("utility_command_resize requires command_exec capability");
1397
+ }
1398
+ this.assertUtilityOwnerAccess(this.utilityCommands.get(msg.command_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "command", msg.command_id);
1399
+ await this.utilityCommands.resize(msg.command_id, msg.columns, msg.rows);
1400
+ }
1401
+ async handleUtilityFileSearch(msg) {
1402
+ if (!this.state.capabilities?.utility_operations?.includes("file_search")) {
1403
+ throw new Error("utility_file_search requires file_search capability");
1404
+ }
1405
+ {
1406
+ const result = searchWorkspaceFiles({
1407
+ query: msg.query,
1408
+ cwd: msg.cwd,
1409
+ workspaceRoot: this.workspaceRoot,
1410
+ limit: msg.limit,
1411
+ });
1412
+ this.publish({
1413
+ type: "utility_file_search_results",
1414
+ search_id: msg.search_id,
1415
+ query: result.query,
1416
+ cwd: result.cwd,
1417
+ results: result.results,
1418
+ truncated: result.truncated,
1419
+ });
1420
+ }
1421
+ }
1422
+ async handleUtilityFileRead(msg) {
1423
+ if (!this.state.capabilities?.utility_operations?.includes("file_read")) {
1424
+ throw new Error("utility_file_read requires file_read capability");
1425
+ }
1426
+ {
1427
+ const result = await readWorkspaceFile({
1428
+ path: msg.path,
1429
+ cwd: msg.cwd,
1430
+ workspaceRoot: this.workspaceRoot,
1431
+ offset: msg.offset,
1432
+ limit: msg.limit,
1433
+ });
1434
+ this.publish({
1435
+ type: "utility_file_read_result",
1436
+ read_id: msg.read_id,
1437
+ path: result.path,
1438
+ relative_path: result.relative_path,
1439
+ cwd: result.cwd,
1440
+ content: result.content,
1441
+ start_line: result.start_line,
1442
+ end_line: result.end_line,
1443
+ total_lines: result.total_lines,
1444
+ truncated: result.truncated,
1445
+ });
1446
+ }
1447
+ }
1448
+ async handleUtilityFileWatchStart(msg, metadata) {
1449
+ if (!this.state.capabilities?.utility_operations?.includes("file_watch")) {
1450
+ throw new Error("utility_file_watch_start requires file_watch capability");
1451
+ }
1452
+ await this.fileWatches.start({
1453
+ watch_id: msg.watch_id,
1454
+ root_dir: msg.root_dir,
1455
+ include_patterns: msg.include_patterns,
1456
+ exclude_patterns: msg.exclude_patterns,
1457
+ debounce_ms: msg.debounce_ms,
1458
+ owner_connection_id: this.getMessageConnectionId(metadata),
1459
+ });
1460
+ }
1461
+ async handleUtilityFileWatchStop(msg, metadata) {
1462
+ this.assertUtilityOwnerAccess(this.fileWatches.get(msg.watch_id)?.owner_connection_id, this.getMessageConnectionId(metadata), "file watch", msg.watch_id);
1463
+ this.fileWatches.stop(msg.watch_id, "Stopped by controller");
1438
1464
  }
1439
1465
  async runPrompt(content, attachments) {
1440
1466
  try {