@stigmer/runner 3.14.0 → 3.15.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.
Files changed (331) hide show
  1. package/dist/.build-fingerprint +1 -1
  2. package/dist/__test-utils__/execution-record-fixture.d.ts +47 -0
  3. package/dist/__test-utils__/execution-record-fixture.js +68 -0
  4. package/dist/__test-utils__/execution-record-fixture.js.map +1 -0
  5. package/dist/__test-utils__/harness-contract/types.d.ts +166 -0
  6. package/dist/__test-utils__/harness-contract/types.js +49 -0
  7. package/dist/__test-utils__/harness-contract/types.js.map +1 -0
  8. package/dist/__test-utils__/hermetic-activity.d.ts +268 -0
  9. package/dist/__test-utils__/hermetic-activity.js +385 -0
  10. package/dist/__test-utils__/hermetic-activity.js.map +1 -0
  11. package/dist/__test-utils__/mock-client.d.ts +13 -0
  12. package/dist/__test-utils__/mock-client.js +45 -0
  13. package/dist/__test-utils__/mock-client.js.map +1 -0
  14. package/dist/__test-utils__/mock-workspace.d.ts +15 -0
  15. package/dist/__test-utils__/mock-workspace.js +21 -0
  16. package/dist/__test-utils__/mock-workspace.js.map +1 -0
  17. package/dist/__test-utils__/model-registry-fixture.d.ts +56 -0
  18. package/dist/__test-utils__/model-registry-fixture.js +66 -0
  19. package/dist/__test-utils__/model-registry-fixture.js.map +1 -0
  20. package/dist/__test-utils__/turn-input-fixture.d.ts +60 -0
  21. package/dist/__test-utils__/turn-input-fixture.js +118 -0
  22. package/dist/__test-utils__/turn-input-fixture.js.map +1 -0
  23. package/dist/activities/execute-cursor/__test-utils__/contract-subject.d.ts +107 -0
  24. package/dist/activities/execute-cursor/__test-utils__/contract-subject.js +344 -0
  25. package/dist/activities/execute-cursor/__test-utils__/contract-subject.js.map +1 -0
  26. package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.d.ts +20 -0
  27. package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.js +58 -0
  28. package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.js.map +1 -1
  29. package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.js +2 -32
  30. package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.js.map +1 -1
  31. package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.d.ts +148 -0
  32. package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js +257 -0
  33. package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js.map +1 -0
  34. package/dist/activities/execute-cursor/__test-utils__/scripted-agent.d.ts +183 -0
  35. package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js +262 -0
  36. package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js.map +1 -0
  37. package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.d.ts +138 -0
  38. package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js +191 -0
  39. package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js.map +1 -0
  40. package/dist/activities/execute-cursor/adapter.d.ts +55 -0
  41. package/dist/activities/execute-cursor/adapter.js +119 -0
  42. package/dist/activities/execute-cursor/adapter.js.map +1 -0
  43. package/dist/activities/execute-cursor/approval-state.d.ts +2 -2
  44. package/dist/activities/execute-cursor/approval-state.js.map +1 -1
  45. package/dist/activities/execute-cursor/capture-flow.d.ts +15 -30
  46. package/dist/activities/execute-cursor/capture-flow.js +17 -26
  47. package/dist/activities/execute-cursor/capture-flow.js.map +1 -1
  48. package/dist/activities/execute-cursor/cursor-capabilities.d.ts +23 -0
  49. package/dist/activities/execute-cursor/cursor-capabilities.js +33 -0
  50. package/dist/activities/execute-cursor/cursor-capabilities.js.map +1 -0
  51. package/dist/activities/execute-cursor/cursor-mcp-config.d.ts +2 -2
  52. package/dist/activities/execute-cursor/cursor-mcp-config.js.map +1 -1
  53. package/dist/activities/execute-cursor/fetch-interceptor.d.ts +15 -25
  54. package/dist/activities/execute-cursor/fetch-interceptor.js +39 -33
  55. package/dist/activities/execute-cursor/fetch-interceptor.js.map +1 -1
  56. package/dist/activities/execute-cursor/http2-interceptor.d.ts +21 -17
  57. package/dist/activities/execute-cursor/http2-interceptor.js +38 -31
  58. package/dist/activities/execute-cursor/http2-interceptor.js.map +1 -1
  59. package/dist/activities/execute-cursor/message-translator.d.ts +28 -19
  60. package/dist/activities/execute-cursor/message-translator.js +76 -27
  61. package/dist/activities/execute-cursor/message-translator.js.map +1 -1
  62. package/dist/activities/execute-cursor/prompt-builder.d.ts +180 -11
  63. package/dist/activities/execute-cursor/prompt-builder.js +171 -0
  64. package/dist/activities/execute-cursor/prompt-builder.js.map +1 -1
  65. package/dist/activities/execute-cursor/rejection-capture.d.ts +3 -6
  66. package/dist/activities/execute-cursor/rejection-capture.js +5 -7
  67. package/dist/activities/execute-cursor/rejection-capture.js.map +1 -1
  68. package/dist/activities/execute-cursor/session-lifecycle.d.ts +1 -4
  69. package/dist/activities/execute-cursor/session-lifecycle.js.map +1 -1
  70. package/dist/activities/execute-cursor/turn-boundary.d.ts +1 -1
  71. package/dist/activities/execute-cursor/turn-settle.d.ts +49 -0
  72. package/dist/activities/execute-cursor/turn-settle.js +507 -0
  73. package/dist/activities/execute-cursor/turn-settle.js.map +1 -0
  74. package/dist/activities/execute-cursor/turn-setup.d.ts +173 -0
  75. package/dist/activities/execute-cursor/turn-setup.js +496 -0
  76. package/dist/activities/execute-cursor/turn-setup.js.map +1 -0
  77. package/dist/activities/execute-cursor/turn-stream.d.ts +41 -71
  78. package/dist/activities/execute-cursor/turn-stream.js +70 -135
  79. package/dist/activities/execute-cursor/turn-stream.js.map +1 -1
  80. package/dist/activities/execute-cursor/turn.d.ts +43 -0
  81. package/dist/activities/execute-cursor/turn.js +222 -0
  82. package/dist/activities/execute-cursor/turn.js.map +1 -0
  83. package/dist/activities/execute-cursor/usage-pricing.d.ts +38 -0
  84. package/dist/activities/execute-cursor/usage-pricing.js +50 -0
  85. package/dist/activities/execute-cursor/usage-pricing.js.map +1 -0
  86. package/dist/activities/execute-deep-agent/approval-file-change.d.ts +1 -1
  87. package/dist/activities/execute-deep-agent/approval-file-change.js +1 -1
  88. package/dist/activities/execute-deep-agent/environment.js +1 -1
  89. package/dist/activities/execute-deep-agent/environment.js.map +1 -1
  90. package/dist/activities/execute-deep-agent/setup.js +3 -2
  91. package/dist/activities/execute-deep-agent/setup.js.map +1 -1
  92. package/dist/activities/hydrate-workflow-execution.js +1 -1
  93. package/dist/activities/hydrate-workflow-execution.js.map +1 -1
  94. package/dist/config.d.ts +15 -0
  95. package/dist/config.js.map +1 -1
  96. package/dist/harness/capabilities.d.ts +87 -0
  97. package/dist/harness/capabilities.js +37 -0
  98. package/dist/harness/capabilities.js.map +1 -0
  99. package/dist/harness/persist-chokepoint.d.ts +74 -0
  100. package/dist/harness/persist-chokepoint.js +88 -0
  101. package/dist/harness/persist-chokepoint.js.map +1 -0
  102. package/dist/harness/registry.d.ts +106 -0
  103. package/dist/harness/registry.js +168 -0
  104. package/dist/harness/registry.js.map +1 -0
  105. package/dist/harness/run-turn.d.ts +53 -0
  106. package/dist/harness/run-turn.js +528 -0
  107. package/dist/harness/run-turn.js.map +1 -0
  108. package/dist/harness/stop-controller.d.ts +50 -0
  109. package/dist/harness/stop-controller.js +62 -0
  110. package/dist/harness/stop-controller.js.map +1 -0
  111. package/dist/harness/terminal-table.d.ts +141 -0
  112. package/dist/harness/terminal-table.js +239 -0
  113. package/dist/harness/terminal-table.js.map +1 -0
  114. package/dist/harness/turn-context.d.ts +523 -0
  115. package/dist/harness/turn-context.js +739 -0
  116. package/dist/harness/turn-context.js.map +1 -0
  117. package/dist/harness/types.d.ts +448 -0
  118. package/dist/harness/types.js +64 -0
  119. package/dist/harness/types.js.map +1 -0
  120. package/dist/harness/usage-accumulator.d.ts +68 -0
  121. package/dist/harness/usage-accumulator.js +101 -0
  122. package/dist/harness/usage-accumulator.js.map +1 -0
  123. package/dist/harness-adapters.d.ts +27 -0
  124. package/dist/harness-adapters.js +28 -0
  125. package/dist/harness-adapters.js.map +1 -0
  126. package/dist/main.js.map +1 -1
  127. package/dist/runner-manager.js +64 -48
  128. package/dist/runner-manager.js.map +1 -1
  129. package/dist/runner.d.ts +5 -4
  130. package/dist/runner.js +65 -64
  131. package/dist/runner.js.map +1 -1
  132. package/dist/shared/approval-policy.d.ts +1 -1
  133. package/dist/shared/approval-policy.js.map +1 -1
  134. package/dist/{activities/execute-cursor → shared}/attachment-resolver.d.ts +2 -2
  135. package/dist/{activities/execute-cursor → shared}/attachment-resolver.js +5 -5
  136. package/dist/shared/attachment-resolver.js.map +1 -0
  137. package/dist/{activities/execute-cursor → shared}/blueprint-resolver.d.ts +7 -5
  138. package/dist/{activities/execute-cursor → shared}/blueprint-resolver.js +3 -63
  139. package/dist/shared/blueprint-resolver.js.map +1 -0
  140. package/dist/shared/channel-attachment.d.ts +1 -1
  141. package/dist/shared/channel-attachment.js.map +1 -1
  142. package/dist/{activities/execute-cursor → shared}/cost-guard.d.ts +5 -1
  143. package/dist/{activities/execute-cursor → shared}/cost-guard.js +5 -1
  144. package/dist/shared/cost-guard.js.map +1 -0
  145. package/dist/{activities/execute-cursor → shared}/env-resolver.d.ts +1 -1
  146. package/dist/shared/env-resolver.js.map +1 -0
  147. package/dist/{activities/execute-cursor → shared}/exact-apply.d.ts +1 -1
  148. package/dist/{activities/execute-cursor → shared}/exact-apply.js +6 -6
  149. package/dist/shared/exact-apply.js.map +1 -0
  150. package/dist/shared/execution-context.d.ts +35 -0
  151. package/dist/shared/execution-context.js +38 -0
  152. package/dist/shared/execution-context.js.map +1 -0
  153. package/dist/{activities/execute-cursor → shared}/extract-structured-output.d.ts +5 -2
  154. package/dist/{activities/execute-cursor → shared}/extract-structured-output.js +9 -6
  155. package/dist/shared/extract-structured-output.js.map +1 -0
  156. package/dist/shared/filereview/capture.d.ts +1 -1
  157. package/dist/shared/filereview/capture.js +1 -1
  158. package/dist/shared/heartbeat.d.ts +13 -11
  159. package/dist/shared/heartbeat.js +14 -29
  160. package/dist/shared/heartbeat.js.map +1 -1
  161. package/dist/{activities/execute-cursor → shared}/persist-decision.d.ts +5 -2
  162. package/dist/{activities/execute-cursor → shared}/persist-decision.js +4 -1
  163. package/dist/shared/persist-decision.js.map +1 -0
  164. package/dist/{activities/execute-cursor → shared}/skill-resolver.d.ts +16 -3
  165. package/dist/{activities/execute-cursor → shared}/skill-resolver.js +12 -4
  166. package/dist/shared/skill-resolver.js.map +1 -0
  167. package/dist/shared/subagent-rows.d.ts +21 -0
  168. package/dist/shared/subagent-rows.js +34 -0
  169. package/dist/shared/subagent-rows.js.map +1 -0
  170. package/dist/shared/worker-shutdown.d.ts +43 -16
  171. package/dist/shared/worker-shutdown.js +28 -13
  172. package/dist/shared/worker-shutdown.js.map +1 -1
  173. package/dist/shared/workspace/platform-dir.d.ts +1 -1
  174. package/dist/shared/workspace/platform-dir.js +1 -1
  175. package/dist/shared/workspace/session-provision.d.ts +54 -0
  176. package/dist/{activities/execute-cursor/workspace-provision.js → shared/workspace/session-provision.js} +15 -12
  177. package/dist/shared/workspace/session-provision.js.map +1 -0
  178. package/package.json +4 -4
  179. package/src/__test-utils__/__tests__/harness-contract-self-check.test.ts +325 -0
  180. package/src/__test-utils__/config-fixture.ts +63 -0
  181. package/src/__test-utils__/execution-record-fixture.ts +104 -0
  182. package/src/__test-utils__/harness-boot-order-child.ts +58 -0
  183. package/src/__test-utils__/harness-contract/contract.ts +581 -0
  184. package/src/__test-utils__/harness-contract/recording-sink.ts +107 -0
  185. package/src/__test-utils__/harness-contract/runtime-contract.ts +666 -0
  186. package/src/__test-utils__/harness-contract/scripted-adapter.ts +349 -0
  187. package/src/__test-utils__/harness-contract/types.ts +176 -0
  188. package/src/__test-utils__/hermetic-activity.ts +502 -0
  189. package/src/__test-utils__/model-registry-fixture.ts +72 -0
  190. package/src/__test-utils__/module-specifiers.ts +82 -0
  191. package/src/__test-utils__/proto-helpers.ts +25 -0
  192. package/src/__test-utils__/turn-input-fixture.ts +155 -0
  193. package/src/__tests__/harness-boot-order.test.ts +77 -0
  194. package/src/__tests__/harness-contract.test.ts +27 -0
  195. package/src/__tests__/runner-manager.test.ts +18 -0
  196. package/src/activities/execute-cursor/__test-utils__/__tests__/scripted-double.test.ts +102 -0
  197. package/src/activities/execute-cursor/__test-utils__/contract-subject.ts +396 -0
  198. package/src/activities/execute-cursor/__test-utils__/cursor-hook-harness.ts +66 -0
  199. package/src/activities/execute-cursor/__test-utils__/gateway-substrate.ts +2 -43
  200. package/src/activities/execute-cursor/__test-utils__/hermetic-cursor.ts +342 -0
  201. package/src/activities/execute-cursor/__test-utils__/scripted-agent.ts +368 -0
  202. package/src/activities/execute-cursor/__test-utils__/scripted-sdk.ts +254 -0
  203. package/src/activities/execute-cursor/__tests__/adapter-is-temporal-free.test.ts +45 -0
  204. package/src/activities/execute-cursor/__tests__/approval-decisions-agree.test.ts +90 -0
  205. package/src/activities/execute-cursor/__tests__/build-prompt.test.ts +7 -8
  206. package/src/activities/execute-cursor/__tests__/capture-flow.test.ts +28 -1
  207. package/src/activities/execute-cursor/__tests__/deny-gate-exact-apply.test.ts +1 -1
  208. package/src/activities/execute-cursor/__tests__/fetch-interceptor.test.ts +64 -6
  209. package/src/activities/execute-cursor/__tests__/hermetic/deny-and-retry.test.ts +228 -0
  210. package/src/activities/execute-cursor/__tests__/hermetic/file-review-capture.test.ts +180 -0
  211. package/src/activities/execute-cursor/__tests__/hermetic/goldens/cost-cap.status.json +53 -0
  212. package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn1.status.json +55 -0
  213. package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn2.status.json +77 -0
  214. package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-capture.status.json +126 -0
  215. package/src/activities/execute-cursor/__tests__/hermetic/goldens/pause.status.json +40 -0
  216. package/src/activities/execute-cursor/__tests__/hermetic/goldens/plain-turn.status.json +48 -0
  217. package/src/activities/execute-cursor/__tests__/hermetic/goldens/platform-stop.status.json +56 -0
  218. package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-fresh-agent.status.json +53 -0
  219. package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-transport-timeout.status.json +48 -0
  220. package/src/activities/execute-cursor/__tests__/hermetic/goldens/resolution-error.status.json +18 -0
  221. package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-cancelled.status.json +36 -0
  222. package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-error-non-retryable.status.json +37 -0
  223. package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-error-at-create.status.json +38 -0
  224. package/src/activities/execute-cursor/__tests__/hermetic/goldens/stall.status.json +59 -0
  225. package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-call.status.json +68 -0
  226. package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattributed-hook-block.status.json +79 -0
  227. package/src/activities/execute-cursor/__tests__/hermetic/goldens/worker-shutdown.status.json +42 -0
  228. package/src/activities/execute-cursor/__tests__/hermetic/harness-contract.test.ts +170 -0
  229. package/src/activities/execute-cursor/__tests__/hermetic/pause-vs-shutdown.test.ts +205 -0
  230. package/src/activities/execute-cursor/__tests__/hermetic/plain-turn.test.ts +171 -0
  231. package/src/activities/execute-cursor/__tests__/hermetic/recovery-fresh-agent.test.ts +156 -0
  232. package/src/activities/execute-cursor/__tests__/hermetic/run-wait-arms.test.ts +286 -0
  233. package/src/activities/execute-cursor/__tests__/hermetic/stream-self-stop-arms.test.ts +332 -0
  234. package/src/activities/execute-cursor/__tests__/hermetic/thrown-error-arms.test.ts +193 -0
  235. package/src/activities/execute-cursor/__tests__/hermetic/tool-call.test.ts +137 -0
  236. package/src/activities/execute-cursor/__tests__/hermetic/unattributed-hook-block.test.ts +185 -0
  237. package/src/activities/execute-cursor/__tests__/hermetic/workspace-lock-timeout.test.ts +151 -0
  238. package/src/activities/execute-cursor/__tests__/http2-interceptor.test.ts +65 -35
  239. package/src/activities/execute-cursor/__tests__/message-translator.test.ts +0 -40
  240. package/src/activities/execute-cursor/__tests__/same-identity-reproposal.test.ts +171 -0
  241. package/src/activities/execute-cursor/__tests__/turn-stream.test.ts +118 -243
  242. package/src/activities/execute-cursor/__tests__/usage-pricing.test.ts +84 -0
  243. package/src/activities/execute-cursor/adapter.ts +138 -0
  244. package/src/activities/execute-cursor/approval-state.ts +2 -2
  245. package/src/activities/execute-cursor/capture-flow.ts +18 -41
  246. package/src/activities/execute-cursor/cursor-capabilities.ts +35 -0
  247. package/src/activities/execute-cursor/cursor-mcp-config.ts +2 -2
  248. package/src/activities/execute-cursor/fetch-interceptor.ts +48 -45
  249. package/src/activities/execute-cursor/http2-interceptor.ts +47 -34
  250. package/src/activities/execute-cursor/message-translator.ts +90 -45
  251. package/src/activities/execute-cursor/prompt-builder.ts +327 -12
  252. package/src/activities/execute-cursor/rejection-capture.ts +5 -12
  253. package/src/activities/execute-cursor/session-lifecycle.ts +1 -5
  254. package/src/activities/execute-cursor/turn-boundary.ts +1 -1
  255. package/src/activities/execute-cursor/turn-settle.ts +601 -0
  256. package/src/activities/execute-cursor/turn-setup.ts +645 -0
  257. package/src/activities/execute-cursor/turn-stream.ts +84 -210
  258. package/src/activities/execute-cursor/turn.ts +240 -0
  259. package/src/activities/execute-cursor/usage-pricing.ts +67 -0
  260. package/src/activities/execute-deep-agent/approval-file-change.ts +1 -1
  261. package/src/activities/execute-deep-agent/environment.ts +1 -1
  262. package/src/activities/execute-deep-agent/setup.ts +3 -2
  263. package/src/activities/hydrate-workflow-execution.ts +1 -1
  264. package/src/config.ts +13 -0
  265. package/src/harness/__tests__/import-direction.test.ts +168 -0
  266. package/src/harness/__tests__/persist-chokepoint.test.ts +146 -0
  267. package/src/harness/__tests__/registry.test.ts +168 -0
  268. package/src/harness/__tests__/run-turn.test.ts +165 -0
  269. package/src/harness/__tests__/stop-controller.test.ts +49 -0
  270. package/src/harness/__tests__/turn-context.test.ts +178 -0
  271. package/src/harness/__tests__/usage-accumulator.test.ts +83 -0
  272. package/src/harness/capabilities.ts +92 -0
  273. package/src/harness/persist-chokepoint.ts +112 -0
  274. package/src/harness/registry.ts +197 -0
  275. package/src/harness/run-turn.ts +618 -0
  276. package/src/harness/stop-controller.ts +83 -0
  277. package/src/harness/terminal-table.ts +276 -0
  278. package/src/harness/turn-context.ts +1028 -0
  279. package/src/harness/types.ts +473 -0
  280. package/src/harness/usage-accumulator.ts +122 -0
  281. package/src/harness-adapters.ts +30 -0
  282. package/src/main.ts +1 -1
  283. package/src/runner-manager.ts +68 -61
  284. package/src/runner.ts +67 -78
  285. package/src/shared/__tests__/attachment-naming.test.ts +1 -1
  286. package/src/{activities/execute-cursor → shared}/__tests__/attachment-resolver.test.ts +6 -4
  287. package/src/{activities/execute-cursor → shared}/__tests__/cost-guard.test.ts +2 -1
  288. package/src/{activities/execute-cursor → shared}/__tests__/exact-apply.test.ts +3 -3
  289. package/src/{activities/execute-cursor → shared}/__tests__/extract-structured-output.test.ts +8 -8
  290. package/src/{activities/execute-cursor → shared}/__tests__/persist-decision.test.ts +4 -2
  291. package/src/{activities/execute-cursor → shared}/__tests__/skill-resolver.test.ts +1 -1
  292. package/src/shared/__tests__/subagent-rows.test.ts +34 -0
  293. package/src/shared/__tests__/worker-shutdown.test.ts +44 -39
  294. package/src/shared/approval-policy.ts +1 -1
  295. package/src/{activities/execute-cursor → shared}/attachment-resolver.ts +6 -6
  296. package/src/{activities/execute-cursor → shared}/blueprint-resolver.ts +7 -78
  297. package/src/shared/channel-attachment.ts +1 -1
  298. package/src/{activities/execute-cursor → shared}/cost-guard.ts +5 -1
  299. package/src/{activities/execute-cursor → shared}/env-resolver.ts +1 -1
  300. package/src/{activities/execute-cursor → shared}/exact-apply.ts +7 -7
  301. package/src/shared/execution-context.ts +45 -0
  302. package/src/{activities/execute-cursor → shared}/extract-structured-output.ts +10 -7
  303. package/src/shared/filereview/capture.ts +1 -1
  304. package/src/shared/heartbeat.ts +13 -33
  305. package/src/{activities/execute-cursor → shared}/persist-decision.ts +5 -2
  306. package/src/{activities/execute-cursor → shared}/skill-resolver.ts +20 -6
  307. package/src/shared/subagent-rows.ts +39 -0
  308. package/src/shared/worker-shutdown.ts +55 -25
  309. package/src/{activities/execute-cursor/__tests__/workspace-provision.test.ts → shared/workspace/__tests__/session-provision.test.ts} +25 -28
  310. package/src/shared/workspace/platform-dir.ts +1 -1
  311. package/src/{activities/execute-cursor/workspace-provision.ts → shared/workspace/session-provision.ts} +29 -16
  312. package/dist/activities/execute-cursor/attachment-resolver.js.map +0 -1
  313. package/dist/activities/execute-cursor/blueprint-resolver.js.map +0 -1
  314. package/dist/activities/execute-cursor/cost-guard.js.map +0 -1
  315. package/dist/activities/execute-cursor/env-resolver.js.map +0 -1
  316. package/dist/activities/execute-cursor/exact-apply.js.map +0 -1
  317. package/dist/activities/execute-cursor/extract-structured-output.js.map +0 -1
  318. package/dist/activities/execute-cursor/index.d.ts +0 -209
  319. package/dist/activities/execute-cursor/index.js +0 -2345
  320. package/dist/activities/execute-cursor/index.js.map +0 -1
  321. package/dist/activities/execute-cursor/persist-decision.js.map +0 -1
  322. package/dist/activities/execute-cursor/skill-resolver.js.map +0 -1
  323. package/dist/activities/execute-cursor/usage-accumulator.d.ts +0 -89
  324. package/dist/activities/execute-cursor/usage-accumulator.js +0 -121
  325. package/dist/activities/execute-cursor/usage-accumulator.js.map +0 -1
  326. package/dist/activities/execute-cursor/workspace-provision.d.ts +0 -42
  327. package/dist/activities/execute-cursor/workspace-provision.js.map +0 -1
  328. package/src/activities/execute-cursor/__tests__/usage-accumulator.test.ts +0 -164
  329. package/src/activities/execute-cursor/index.ts +0 -2876
  330. package/src/activities/execute-cursor/usage-accumulator.ts +0 -169
  331. /package/dist/{activities/execute-cursor → shared}/env-resolver.js +0 -0
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Hermetic golden: a FILE-REVIEW CAPTURE turn on a git workspace through the
3
+ * whole `ExecuteCursor` activity.
4
+ *
5
+ * Invariant pinned (apply-then-review, the universal file-review model): on a
6
+ * git work tree the file edit FLOWS — the hook the activity installed ALLOWS
7
+ * the write (capture mode gates only gitignored paths, shell and MCP) — and the
8
+ * turn boundary captures the net change from the git diff against the baseline
9
+ * tree pinned before the agent ran, authors CANDIDATE_CAPTURED to the
10
+ * file_review ledger with one card for the edited file, stamps the flowed edit
11
+ * row with the change-set id, and the activity persists WAITING_FOR_APPROVAL
12
+ * and RETURNS without consulting `run.wait()`. The change-set id is the
13
+ * deterministic `executionId:turnSeq`. The golden
14
+ * (`goldens/file-review-capture.status.json`) pins the ledger shape S2 must
15
+ * reproduce.
16
+ *
17
+ * Parent phase rows exercised beyond `deny-and-retry`: provision a `local_path`
18
+ * workspace entry (mounted as-is in local mode); capture-mode derivation on a
19
+ * git tree; the baseline pin (`captureBaselineToLedger`, git snapshot); the
20
+ * turn boundary's candidate capture (`captureTurnToLedger`) and row stamping;
21
+ * the pause for review with file cards.
22
+ *
23
+ * Determinism: the fixture repo's commit and tree ids are byte-stable because
24
+ * `initGitWorkspace` pins author, committer and both dates. The stream's edit
25
+ * args use the REPO-RELATIVE path so no temp directory can reach the golden;
26
+ * the hook input carries the absolute path the SDK would pass (the hook's
27
+ * `git check-ignore` resolves it against the baked workspace root).
28
+ *
29
+ * Skipped where `bash` is unavailable — reported as SKIPPED, never a silent pass.
30
+ *
31
+ * Regenerate ONLY after a deliberate behavior change:
32
+ * npx vitest run src/activities/execute-cursor/__tests__/hermetic -u
33
+ */
34
+
35
+ import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
36
+ import { readFileSync, writeFileSync } from "node:fs";
37
+ import { join } from "node:path";
38
+ import { toJson } from "@bufbuild/protobuf";
39
+ import { AgentExecutionStatusSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
40
+ import { ExecutionPhase, ToolCallStatus } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
41
+
42
+ vi.mock("@cursor/sdk", async () =>
43
+ (await import("../../__test-utils__/scripted-sdk.js")).scriptedCursorSdkModule(),
44
+ );
45
+ vi.mock("../../../../client/stigmer-client.js", async () =>
46
+ (await import("../../../../__test-utils__/hermetic-activity.js")).hermeticStigmerClientModule(),
47
+ );
48
+
49
+ import {
50
+ ScriptedClock,
51
+ createHermeticEnvironment,
52
+ type HermeticEnvironment,
53
+ } from "../../../../__test-utils__/hermetic-activity.js";
54
+ import { hasBash, hookWrite } from "../../__test-utils__/cursor-hook-harness.js";
55
+ import { ScriptedCursorAgent, sdkEvents, step } from "../../__test-utils__/scripted-agent.js";
56
+ import {
57
+ FIXTURE,
58
+ SDK_CATALOG,
59
+ beginCursorScenario,
60
+ cursorExecutionRecord,
61
+ initGitWorkspace,
62
+ localPathEntry,
63
+ runCursorTurn,
64
+ runWorkspaceHook,
65
+ } from "../../__test-utils__/hermetic-cursor.js";
66
+ import { stubRegistryFetch } from "../../../../__test-utils__/model-registry-fixture.js";
67
+
68
+ const AGENT_ID = "agent-hermetic-capture-0001";
69
+ const RUN_ID = "run-hermetic-capture-0001";
70
+ const CALL_ID = "call-hermetic-edit-0001";
71
+ const USER_MESSAGE = "Add a line to notes.md saying the fixture was reviewed.";
72
+ const FILE = "notes.md";
73
+ const BEFORE = "# Notes\n\nA fixture file.\n";
74
+ const AFTER = "# Notes\n\nA fixture file.\n\nReviewed by the hermetic run.\n";
75
+ const CHANGE_SET_ID = `${FIXTURE.executionId}:0`;
76
+
77
+ describe.skipIf(!hasBash)("ExecuteCursor hermetic — file-review capture on a git workspace", () => {
78
+ let env: HermeticEnvironment;
79
+ let registry: ReturnType<typeof stubRegistryFetch>;
80
+ const clock = new ScriptedClock();
81
+
82
+ beforeAll(() => {
83
+ env = createHermeticEnvironment();
84
+ registry = stubRegistryFetch();
85
+ clock.install();
86
+ });
87
+
88
+ afterAll(() => {
89
+ clock.uninstall();
90
+ registry.restore();
91
+ env.dispose();
92
+ });
93
+
94
+ it("lets the edit flow, captures it at the boundary, and pauses for review", async () => {
95
+ // ── Arrange ──────────────────────────────────────────────────────────────
96
+ const repo = join(env.workspaceRootDir, "repos", "notes");
97
+ initGitWorkspace(repo, { [FILE]: BEFORE });
98
+ const absFile = join(repo, FILE);
99
+ const hookDecisions: string[] = [];
100
+
101
+ const ev = sdkEvents(AGENT_ID, RUN_ID);
102
+ const agent = new ScriptedCursorAgent({
103
+ agentId: AGENT_ID,
104
+ runIds: [RUN_ID],
105
+ observeStep: () => clock.tick(),
106
+ turns: [
107
+ [
108
+ step.event(ev.init()),
109
+ step.event(ev.assistant("Appending the review line.")),
110
+ // The SDK runs the hook before the write tool executes...
111
+ step.effect("hook: Write (expect allow in capture mode)", () => {
112
+ hookDecisions.push(runWorkspaceHook(repo, hookWrite(absFile, AFTER)).permission);
113
+ }),
114
+ // ...then performs the write itself...
115
+ step.effect("write notes.md", () => writeFileSync(absFile, AFTER, "utf-8")),
116
+ // ...and streams the tool call.
117
+ step.event(ev.toolCall(CALL_ID, "edit", "running", { path: FILE, content: AFTER })),
118
+ step.event(ev.toolCall(CALL_ID, "edit", "completed", { path: FILE, content: AFTER }, "ok")),
119
+ step.event(ev.assistant("Done — notes.md now records the review.")),
120
+ step.turnEnded({ inputTokens: 2_400, outputTokens: 70 }),
121
+ step.finished({ result: "Done", model: { id: FIXTURE.model, params: [] } }),
122
+ ],
123
+ ],
124
+ });
125
+ const record = cursorExecutionRecord({
126
+ message: USER_MESSAGE,
127
+ workspaceEntries: [localPathEntry("notes", repo)],
128
+ });
129
+ const scenario = beginCursorScenario({
130
+ env,
131
+ clock,
132
+ record,
133
+ sdk: { agents: [agent], catalog: SDK_CATALOG },
134
+ });
135
+
136
+ // ── Act ──────────────────────────────────────────────────────────────────
137
+ const invocation = await runCursorTurn(scenario);
138
+
139
+ // ── Assert: the edit flowed and the turn paused for review ───────────────
140
+ expect(hookDecisions, "capture mode lets the write flow").toEqual(["allow"]);
141
+ expect(readFileSync(absFile, "utf-8"), "the working tree holds the candidate").toBe(AFTER);
142
+ expect(invocation.outcome.kind, "a review pause RETURNS to the workflow").toBe("returned");
143
+ expect((invocation.outcome as { value: Record<string, unknown> }).value.phase).toBe(
144
+ "EXECUTION_WAITING_FOR_APPROVAL",
145
+ );
146
+ expect(record.persistedPhases).toEqual([
147
+ ExecutionPhase.EXECUTION_IN_PROGRESS,
148
+ ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
149
+ ]);
150
+ expect(agent.runs[0].cancelCalls, "a flowed edit is not a denial; nothing is cancelled").toHaveLength(0);
151
+
152
+ // ── Assert: the file_review ledger ───────────────────────────────────────
153
+ const events = record.status?.fileReviewEventStream?.events ?? [];
154
+ const types = events.map((e) => e.payload.case);
155
+ expect(types).toEqual(["baselineCaptured", "candidateCaptured"]);
156
+ const candidate = events[1].payload;
157
+ if (candidate.case !== "candidateCaptured") throw new Error("unreachable");
158
+ expect(candidate.value.changeSetId).toBe(CHANGE_SET_ID);
159
+ expect(candidate.value.changes.map((c) => c.pathAfter)).toEqual([FILE]);
160
+
161
+ // The flowed edit row: the built-in policy still classifies `edit` as a
162
+ // gated category (`requiresApproval: true` is the policy's verdict, stamped
163
+ // at fold time), but capture mode let it FLOW — so the row is COMPLETED,
164
+ // never WAITING_APPROVAL, and the review happens on the file card instead.
165
+ const rows = record.toolCalls();
166
+ expect(rows).toHaveLength(1);
167
+ expect(rows[0].name).toBe("edit");
168
+ expect(rows[0].status).toBe(ToolCallStatus.TOOL_CALL_COMPLETED);
169
+ expect(rows[0].requiresApproval, "policy verdict, not the gate outcome").toBe(true);
170
+ expect(record.waitingToolCalls(), "no gate row — the review is on the file card").toHaveLength(0);
171
+
172
+ // ── Assert: hermeticity ──────────────────────────────────────────────────
173
+ expect(registry.urls.every((u) => u.includes("/model-registry"))).toBe(true);
174
+
175
+ // ── Assert: the golden ───────────────────────────────────────────────────
176
+ const json = JSON.stringify(toJson(AgentExecutionStatusSchema, record.lastFullStatus!), null, 2) + "\n";
177
+ expect(json, "no temp path may reach the golden").not.toContain(env.workspaceRootDir);
178
+ await expect(json).toMatchFileSnapshot("./goldens/file-review-capture.status.json");
179
+ });
180
+ });
@@ -0,0 +1,53 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "Reading the whole repository first.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z"
7
+ },
8
+ {
9
+ "type": "MESSAGE_SYSTEM",
10
+ "content": "The agent reached the cost limit for this message. Work completed so far has been saved. Send another message to continue where the agent left off.",
11
+ "timestamp": "2026-01-01T00:00:03.000Z"
12
+ }
13
+ ],
14
+ "phase": "EXECUTION_TERMINATED",
15
+ "error": "Agent reached the cost limit for this message (~$0.6000 of the $0.50 budget). Send another message to continue.",
16
+ "startedAt": "2026-01-01T00:00:00.000Z",
17
+ "completedAt": "2026-01-01T00:00:03.000Z",
18
+ "streamingUsage": {
19
+ "inputTokens": "600000",
20
+ "totalTokens": "600000",
21
+ "turnCount": 1,
22
+ "estimatedCostUsd": 0.6,
23
+ "model": "composer-2.5",
24
+ "observedAt": "2026-01-01T00:00:03.000Z",
25
+ "requestedServiceTier": "SERVICE_TIER_STANDARD",
26
+ "requestedModelParams": "[{\"id\":\"fast\",\"value\":\"false\"},{\"id\":\"thinking\",\"value\":\"false\"}]",
27
+ "requestedThinkingMode": "THINKING_MODE_DISABLED"
28
+ },
29
+ "fileReviewEventStream": {
30
+ "executionId": "aex_hermetic_0001",
31
+ "events": [
32
+ {
33
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
34
+ "changeSetId": "aex_hermetic_0001:0",
35
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
36
+ "timestamp": "2026-01-01T00:00:00.000Z",
37
+ "actor": "runner",
38
+ "baselineCaptured": {
39
+ "changeSetId": "aex_hermetic_0001:0",
40
+ "turnId": "aex_hermetic_0001:0",
41
+ "harnessId": "cursor",
42
+ "baselineSnapshot": {
43
+ "kind": "SNAPSHOT_KIND_CAS_MANIFEST"
44
+ }
45
+ }
46
+ }
47
+ ]
48
+ },
49
+ "fileChangeProgress": {
50
+ "changeSetId": "aex_hermetic_0001:0",
51
+ "capturedAt": "2026-01-01T00:00:01.000Z"
52
+ }
53
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "I'll run the build now.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z",
7
+ "toolCalls": [
8
+ {
9
+ "id": "call-hermetic-shell-0001",
10
+ "name": "shell",
11
+ "args": {
12
+ "command": "npm run build",
13
+ "cwd": "/x",
14
+ "timeout": 30000
15
+ },
16
+ "status": "TOOL_CALL_WAITING_APPROVAL",
17
+ "startedAt": "2026-01-01T00:00:03.000Z",
18
+ "requiresApproval": true,
19
+ "approvalMessage": "Run command: npm run build",
20
+ "approvalRequestedAt": "2026-01-01T00:00:05.000Z",
21
+ "argsPreview": "{\"command\":\"npm run build\",\"cwd\":\"/x\",\"timeout\":30000}",
22
+ "toolKind": "TOOL_KIND_SHELL",
23
+ "approvalPolicySource": "APPROVAL_POLICY_SOURCE_BUILTIN_CATEGORY",
24
+ "policyEngineVersion": "phase-7"
25
+ }
26
+ ]
27
+ }
28
+ ],
29
+ "phase": "EXECUTION_WAITING_FOR_APPROVAL",
30
+ "startedAt": "2026-01-01T00:00:00.000Z",
31
+ "fileReviewEventStream": {
32
+ "executionId": "aex_hermetic_0001",
33
+ "events": [
34
+ {
35
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
36
+ "changeSetId": "aex_hermetic_0001:0",
37
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
38
+ "timestamp": "2026-01-01T00:00:00.000Z",
39
+ "actor": "runner",
40
+ "baselineCaptured": {
41
+ "changeSetId": "aex_hermetic_0001:0",
42
+ "turnId": "aex_hermetic_0001:0",
43
+ "harnessId": "cursor",
44
+ "baselineSnapshot": {
45
+ "kind": "SNAPSHOT_KIND_CAS_MANIFEST"
46
+ }
47
+ }
48
+ }
49
+ ]
50
+ },
51
+ "fileChangeProgress": {
52
+ "changeSetId": "aex_hermetic_0001:0",
53
+ "capturedAt": "2026-01-01T00:00:01.000Z"
54
+ }
55
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "I'll run the build now.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z",
7
+ "toolCalls": [
8
+ {
9
+ "id": "call-hermetic-shell-0001",
10
+ "name": "shell",
11
+ "args": {
12
+ "command": "npm run build",
13
+ "cwd": "/x",
14
+ "timeout": 30000
15
+ },
16
+ "result": "build ok (hermetic)\n",
17
+ "status": "TOOL_CALL_COMPLETED",
18
+ "startedAt": "2026-01-01T00:00:03.000Z",
19
+ "completedAt": "2026-01-01T00:00:09.000Z",
20
+ "requiresApproval": true,
21
+ "approvalMessage": "Run command: npm run build",
22
+ "approvalRequestedAt": "2026-01-01T00:00:05.000Z",
23
+ "approvalDecidedAt": "2026-01-01T00:00:06.000Z",
24
+ "approvalAction": "APPROVAL_ACTION_APPROVE",
25
+ "argsPreview": "{\"command\":\"npm run build\",\"cwd\":\"/x\",\"timeout\":30000}",
26
+ "toolKind": "TOOL_KIND_SHELL",
27
+ "approvalPolicySource": "APPROVAL_POLICY_SOURCE_BUILTIN_CATEGORY",
28
+ "policyEngineVersion": "phase-7"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "type": "MESSAGE_AI",
34
+ "content": "The build passes.",
35
+ "timestamp": "2026-01-01T00:00:10.000Z"
36
+ }
37
+ ],
38
+ "phase": "EXECUTION_COMPLETED",
39
+ "startedAt": "2026-01-01T00:00:06.000Z",
40
+ "completedAt": "2026-01-01T00:00:12.000Z",
41
+ "streamingUsage": {
42
+ "inputTokens": "3100",
43
+ "outputTokens": "60",
44
+ "totalTokens": "3160",
45
+ "turnCount": 1,
46
+ "estimatedCostUsd": 0.00334,
47
+ "model": "composer-2.5",
48
+ "observedAt": "2026-01-01T00:00:11.000Z",
49
+ "requestedServiceTier": "SERVICE_TIER_STANDARD",
50
+ "requestedModelParams": "[{\"id\":\"fast\",\"value\":\"false\"},{\"id\":\"thinking\",\"value\":\"false\"}]",
51
+ "requestedThinkingMode": "THINKING_MODE_DISABLED"
52
+ },
53
+ "fileReviewEventStream": {
54
+ "executionId": "aex_hermetic_0001",
55
+ "events": [
56
+ {
57
+ "eventId": "aex_hermetic_0001:1:aex_hermetic_0001:1:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
58
+ "changeSetId": "aex_hermetic_0001:1",
59
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
60
+ "timestamp": "2026-01-01T00:00:06.000Z",
61
+ "actor": "runner",
62
+ "baselineCaptured": {
63
+ "changeSetId": "aex_hermetic_0001:1",
64
+ "turnId": "aex_hermetic_0001:1",
65
+ "harnessId": "cursor",
66
+ "baselineSnapshot": {
67
+ "kind": "SNAPSHOT_KIND_CAS_MANIFEST"
68
+ }
69
+ }
70
+ }
71
+ ]
72
+ },
73
+ "fileChangeProgress": {
74
+ "changeSetId": "aex_hermetic_0001:1",
75
+ "capturedAt": "2026-01-01T00:00:08.000Z"
76
+ }
77
+ }
@@ -0,0 +1,126 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "Appending the review line.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z",
7
+ "toolCalls": [
8
+ {
9
+ "id": "call-hermetic-edit-0001",
10
+ "name": "edit",
11
+ "args": {
12
+ "path": "notes.md",
13
+ "content": "# Notes\n\nA fixture file.\n\nReviewed by the hermetic run.\n"
14
+ },
15
+ "result": "ok",
16
+ "status": "TOOL_CALL_COMPLETED",
17
+ "startedAt": "2026-01-01T00:00:05.000Z",
18
+ "completedAt": "2026-01-01T00:00:06.000Z",
19
+ "requiresApproval": true,
20
+ "approvalMessage": "Write file: notes.md",
21
+ "argsPreview": "{\"path\":\"notes.md\",\"content\":\"# Notes\\n\\nA fixture file.\\n\\nReviewed by the hermetic run.\\n\"}",
22
+ "toolKind": "TOOL_KIND_FILE_EDIT",
23
+ "approvalPolicySource": "APPROVAL_POLICY_SOURCE_BUILTIN_CATEGORY",
24
+ "policyEngineVersion": "phase-7",
25
+ "fileChangeSetId": "aex_hermetic_0001:0"
26
+ }
27
+ ]
28
+ },
29
+ {
30
+ "type": "MESSAGE_AI",
31
+ "content": "Done — notes.md now records the review.",
32
+ "timestamp": "2026-01-01T00:00:07.000Z"
33
+ }
34
+ ],
35
+ "phase": "EXECUTION_WAITING_FOR_APPROVAL",
36
+ "startedAt": "2026-01-01T00:00:00.000Z",
37
+ "streamingUsage": {
38
+ "inputTokens": "2400",
39
+ "outputTokens": "70",
40
+ "totalTokens": "2470",
41
+ "turnCount": 1,
42
+ "estimatedCostUsd": 0.00268,
43
+ "model": "composer-2.5",
44
+ "observedAt": "2026-01-01T00:00:08.000Z",
45
+ "requestedServiceTier": "SERVICE_TIER_STANDARD",
46
+ "requestedModelParams": "[{\"id\":\"fast\",\"value\":\"false\"},{\"id\":\"thinking\",\"value\":\"false\"}]",
47
+ "requestedThinkingMode": "THINKING_MODE_DISABLED"
48
+ },
49
+ "fileReviewEventStream": {
50
+ "executionId": "aex_hermetic_0001",
51
+ "events": [
52
+ {
53
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
54
+ "changeSetId": "aex_hermetic_0001:0",
55
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
56
+ "timestamp": "2026-01-01T00:00:00.000Z",
57
+ "actor": "runner",
58
+ "baselineCaptured": {
59
+ "changeSetId": "aex_hermetic_0001:0",
60
+ "turnId": "aex_hermetic_0001:0",
61
+ "harnessId": "cursor",
62
+ "baselineSnapshot": {
63
+ "kind": "SNAPSHOT_KIND_GIT_TREE_REF",
64
+ "git": {
65
+ "treeOid": "06669a7bfb7a3e46bda2c295d6851e52e8f778c6",
66
+ "ref": "refs/stigmer/baseline/aex_hermetic_0001"
67
+ }
68
+ }
69
+ }
70
+ },
71
+ {
72
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_CANDIDATE_CAPTURED",
73
+ "changeSetId": "aex_hermetic_0001:0",
74
+ "eventType": "FILE_REVIEW_EVENT_TYPE_CANDIDATE_CAPTURED",
75
+ "timestamp": "2026-01-01T00:00:09.000Z",
76
+ "actor": "runner",
77
+ "candidateCaptured": {
78
+ "changeSetId": "aex_hermetic_0001:0",
79
+ "candidateSnapshot": {
80
+ "kind": "SNAPSHOT_KIND_GIT_TREE_REF",
81
+ "git": {
82
+ "treeOid": "2bb46c28a7498d578d76b52fa1cd9c941032e787",
83
+ "ref": "refs/stigmer/capture/aex_hermetic_0001"
84
+ }
85
+ },
86
+ "changes": [
87
+ {
88
+ "id": "aex_hermetic_0001:0:notes.md",
89
+ "pathBefore": "notes.md",
90
+ "pathAfter": "notes.md",
91
+ "kind": "FILE_CHANGE_KIND_MODIFY",
92
+ "captureClass": "FILE_CAPTURE_CLASS_GIT_TRACKED",
93
+ "before": {
94
+ "inline": "# Notes\n\nA fixture file.\n"
95
+ },
96
+ "after": {
97
+ "inline": "# Notes\n\nA fixture file.\n\nReviewed by the hermetic run.\n"
98
+ },
99
+ "beforeSha256": "0db28d643539d6a16370a30971d73a2ee0f9509dec6cbb5a143373d5ad52b83f",
100
+ "afterSha256": "96e76ecee9e8af5ef051ad2edaeeed6fbc989a50850a3ef1bcf518115fd1c097",
101
+ "diffComplete": true,
102
+ "fileDigest": "10056ad414223572125b6f8a148e79dbed10b58e18957d213992e79f475bedef",
103
+ "linesAdded": 2
104
+ }
105
+ ],
106
+ "aggregateDigest": "0a2af1c9c6e6f36e81beb770fdeea30860686096a409eb6df47d34d8e46737b9",
107
+ "diffCompleteness": "DIFF_COMPLETENESS_COMPLETE"
108
+ }
109
+ }
110
+ ]
111
+ },
112
+ "fileChangeProgress": {
113
+ "changeSetId": "aex_hermetic_0001:0",
114
+ "filesChanged": 1,
115
+ "linesAdded": 2,
116
+ "entries": [
117
+ {
118
+ "pathBefore": "notes.md",
119
+ "pathAfter": "notes.md",
120
+ "kind": "FILE_CHANGE_KIND_MODIFY",
121
+ "linesAdded": 2
122
+ }
123
+ ],
124
+ "capturedAt": "2026-01-01T00:00:05.000Z"
125
+ }
126
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "Starting on the parser.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z"
7
+ },
8
+ {
9
+ "type": "MESSAGE_SYSTEM",
10
+ "content": "Execution paused by user. Use resume to continue.",
11
+ "timestamp": "2026-01-01T00:00:03.000Z"
12
+ }
13
+ ],
14
+ "phase": "EXECUTION_PAUSED",
15
+ "startedAt": "2026-01-01T00:00:00.000Z",
16
+ "fileReviewEventStream": {
17
+ "executionId": "aex_hermetic_0001",
18
+ "events": [
19
+ {
20
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
21
+ "changeSetId": "aex_hermetic_0001:0",
22
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
23
+ "timestamp": "2026-01-01T00:00:00.000Z",
24
+ "actor": "runner",
25
+ "baselineCaptured": {
26
+ "changeSetId": "aex_hermetic_0001:0",
27
+ "turnId": "aex_hermetic_0001:0",
28
+ "harnessId": "cursor",
29
+ "baselineSnapshot": {
30
+ "kind": "SNAPSHOT_KIND_CAS_MANIFEST"
31
+ }
32
+ }
33
+ }
34
+ ]
35
+ },
36
+ "fileChangeProgress": {
37
+ "changeSetId": "aex_hermetic_0001:0",
38
+ "capturedAt": "2026-01-01T00:00:01.000Z"
39
+ }
40
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "Hello there, hermetic world.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z"
7
+ }
8
+ ],
9
+ "phase": "EXECUTION_COMPLETED",
10
+ "startedAt": "2026-01-01T00:00:00.000Z",
11
+ "completedAt": "2026-01-01T00:00:04.000Z",
12
+ "streamingUsage": {
13
+ "inputTokens": "1200",
14
+ "outputTokens": "40",
15
+ "totalTokens": "1240",
16
+ "turnCount": 1,
17
+ "estimatedCostUsd": 0.00136,
18
+ "model": "composer-2.5",
19
+ "observedAt": "2026-01-01T00:00:03.000Z",
20
+ "requestedServiceTier": "SERVICE_TIER_STANDARD",
21
+ "requestedModelParams": "[{\"id\":\"fast\",\"value\":\"false\"},{\"id\":\"thinking\",\"value\":\"false\"}]",
22
+ "requestedThinkingMode": "THINKING_MODE_DISABLED"
23
+ },
24
+ "fileReviewEventStream": {
25
+ "executionId": "aex_hermetic_0001",
26
+ "events": [
27
+ {
28
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
29
+ "changeSetId": "aex_hermetic_0001:0",
30
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
31
+ "timestamp": "2026-01-01T00:00:00.000Z",
32
+ "actor": "runner",
33
+ "baselineCaptured": {
34
+ "changeSetId": "aex_hermetic_0001:0",
35
+ "turnId": "aex_hermetic_0001:0",
36
+ "harnessId": "cursor",
37
+ "baselineSnapshot": {
38
+ "kind": "SNAPSHOT_KIND_CAS_MANIFEST"
39
+ }
40
+ }
41
+ }
42
+ ]
43
+ },
44
+ "fileChangeProgress": {
45
+ "changeSetId": "aex_hermetic_0001:0",
46
+ "capturedAt": "2026-01-01T00:00:01.000Z"
47
+ }
48
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "messages": [
3
+ {
4
+ "type": "MESSAGE_AI",
5
+ "content": "Starting the suite.",
6
+ "timestamp": "2026-01-01T00:00:02.000Z",
7
+ "toolCalls": [
8
+ {
9
+ "id": "call-hermetic-platformstop-0001",
10
+ "name": "read",
11
+ "args": {
12
+ "path": "package.json"
13
+ },
14
+ "result": "{\"name\":\"demo\"}",
15
+ "status": "TOOL_CALL_COMPLETED",
16
+ "startedAt": "2026-01-01T00:00:03.000Z",
17
+ "completedAt": "2026-01-01T00:00:04.000Z",
18
+ "argsPreview": "{\"path\":\"package.json\"}",
19
+ "toolKind": "TOOL_KIND_FILE_READ"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "type": "MESSAGE_SYSTEM",
25
+ "content": "Execution stopped by the platform.",
26
+ "timestamp": "2026-01-01T00:00:04.000Z"
27
+ }
28
+ ],
29
+ "phase": "EXECUTION_COMPLETED",
30
+ "startedAt": "2026-01-01T00:00:00.000Z",
31
+ "completedAt": "2026-01-01T00:00:04.000Z",
32
+ "fileReviewEventStream": {
33
+ "executionId": "aex_hermetic_0001",
34
+ "events": [
35
+ {
36
+ "eventId": "aex_hermetic_0001:0:aex_hermetic_0001:0:FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
37
+ "changeSetId": "aex_hermetic_0001:0",
38
+ "eventType": "FILE_REVIEW_EVENT_TYPE_BASELINE_CAPTURED",
39
+ "timestamp": "2026-01-01T00:00:00.000Z",
40
+ "actor": "runner",
41
+ "baselineCaptured": {
42
+ "changeSetId": "aex_hermetic_0001:0",
43
+ "turnId": "aex_hermetic_0001:0",
44
+ "harnessId": "cursor",
45
+ "baselineSnapshot": {
46
+ "kind": "SNAPSHOT_KIND_CAS_MANIFEST"
47
+ }
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "fileChangeProgress": {
53
+ "changeSetId": "aex_hermetic_0001:0",
54
+ "capturedAt": "2026-01-01T00:00:01.000Z"
55
+ }
56
+ }