@openagt/dashboard 0.8.0 → 0.9.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 (940) hide show
  1. package/README.md +6 -6
  2. package/dist/agent-view.d.ts +3 -3
  3. package/dist/bridge-browser.d.ts +4 -4
  4. package/dist/bridge-browser.d.ts.map +1 -1
  5. package/dist/bridge-browser.js +8 -8
  6. package/dist/bridge-browser.js.map +1 -1
  7. package/dist/built-in.d.ts +13 -4
  8. package/dist/built-in.d.ts.map +1 -1
  9. package/dist/built-in.js +45 -4
  10. package/dist/built-in.js.map +1 -1
  11. package/dist/chrome-extension/background.js +11 -11
  12. package/dist/chrome-extension/content.js +37 -37
  13. package/dist/chrome-extension/driver-plan.js +1 -1
  14. package/dist/chrome-extension/fingerprint.js +1 -1
  15. package/dist/chrome-extension/manifest.json +3 -3
  16. package/dist/chrome-extension/options.html +4 -4
  17. package/dist/chrome-extension/options.js +4 -4
  18. package/dist/cli.d.ts +1 -1
  19. package/dist/cli.js +7 -7
  20. package/dist/cli.js.map +1 -1
  21. package/dist/client.d.ts +1 -1
  22. package/dist/client.js +2 -2
  23. package/dist/cloud-run-state.d.ts +1 -1
  24. package/dist/cloud-scratch-refs.js +7 -7
  25. package/dist/cloud-scratch-refs.js.map +1 -1
  26. package/dist/cloud-work.js +2 -2
  27. package/dist/daemon-runtime.d.ts +5 -4
  28. package/dist/daemon-runtime.d.ts.map +1 -1
  29. package/dist/daemon-runtime.js +59 -9
  30. package/dist/daemon-runtime.js.map +1 -1
  31. package/dist/daemon-services.d.ts +4 -3
  32. package/dist/daemon-services.d.ts.map +1 -1
  33. package/dist/daemon-services.js +14 -8
  34. package/dist/daemon-services.js.map +1 -1
  35. package/dist/daemon-tick.js +1 -1
  36. package/dist/daemon.d.ts +1 -12
  37. package/dist/daemon.d.ts.map +1 -1
  38. package/dist/daemon.js +9 -32
  39. package/dist/daemon.js.map +1 -1
  40. package/dist/dashboard/agent-handoff.d.ts +4 -4
  41. package/dist/dashboard/agent-handoff.js +7 -7
  42. package/dist/dashboard/agent-handoff.js.map +1 -1
  43. package/dist/dashboard/bridge-endpoints.d.ts +3 -3
  44. package/dist/dashboard/bridge-endpoints.js +3 -3
  45. package/dist/dashboard/content-type.js +1 -1
  46. package/dist/dashboard/docs.d.ts +1 -1
  47. package/dist/dashboard/docs.js +1 -1
  48. package/dist/dashboard/git-status.d.ts +1 -1
  49. package/dist/dashboard/index.d.ts +1 -1
  50. package/dist/dashboard/index.d.ts.map +1 -1
  51. package/dist/dashboard/interventions.d.ts +2 -2
  52. package/dist/dashboard/open-in-app.d.ts +3 -3
  53. package/dist/dashboard/open-in-app.js +4 -4
  54. package/dist/dashboard/open-questions.d.ts +2 -2
  55. package/dist/dashboard/projects.d.ts +6 -5
  56. package/dist/dashboard/projects.d.ts.map +1 -1
  57. package/dist/dashboard/projects.js.map +1 -1
  58. package/dist/dashboard/pull-requests.d.ts +5 -5
  59. package/dist/dashboard/pull-requests.d.ts.map +1 -1
  60. package/dist/dashboard/pull-requests.js +2 -2
  61. package/dist/dashboard/pull-requests.js.map +1 -1
  62. package/dist/dashboard/relay-endpoints.d.ts +3 -3
  63. package/dist/dashboard/relay-endpoints.js +1 -1
  64. package/dist/dashboard/remote-run.d.ts +5 -5
  65. package/dist/dashboard/remote-run.js +3 -3
  66. package/dist/dashboard/rpc-serve.d.ts +7 -4
  67. package/dist/dashboard/rpc-serve.d.ts.map +1 -1
  68. package/dist/dashboard/rpc-serve.js.map +1 -1
  69. package/dist/dashboard/run-inbox.d.ts +2 -2
  70. package/dist/dashboard/run-inbox.js +4 -4
  71. package/dist/dashboard/run-inbox.js.map +1 -1
  72. package/dist/dashboard/server.d.ts +6 -4
  73. package/dist/dashboard/server.d.ts.map +1 -1
  74. package/dist/dashboard/server.js +3 -2
  75. package/dist/dashboard/server.js.map +1 -1
  76. package/dist/dashboard/static.js +1 -1
  77. package/dist/dashboard/types.d.ts +29 -3
  78. package/dist/dashboard/types.d.ts.map +1 -1
  79. package/dist/dashboard/web-start-endpoints.d.ts +1 -1
  80. package/dist/dashboard/web-start-endpoints.d.ts.map +1 -1
  81. package/dist/dashboard/web-start-endpoints.js +1 -1
  82. package/dist/dashboard/web-start-endpoints.js.map +1 -1
  83. package/dist/dashboard-bundle/assets/{main-om0WOAku.js → main-B98UOA3_.js} +48 -48
  84. package/dist/dashboard-bundle/assets/main-ByRjbCiA.css +2 -0
  85. package/dist/dashboard-bundle/assets/{module-jASZmfSB.js → module-v213KWfH.js} +4 -4
  86. package/dist/dashboard-bundle/host/module.js +1 -1
  87. package/dist/dashboard-bundle/index.html +6 -6
  88. package/dist/dashboard-rpc/context.d.ts +2 -0
  89. package/dist/dashboard-rpc/context.d.ts.map +1 -1
  90. package/dist/dashboard-rpc/context.js +4 -0
  91. package/dist/dashboard-rpc/context.js.map +1 -1
  92. package/dist/dashboard-rpc/control.d.ts +1 -1
  93. package/dist/dashboard-rpc/control.js +3 -3
  94. package/dist/dashboard-rpc/control.js.map +1 -1
  95. package/dist/dashboard-rpc/events.d.ts +3 -3
  96. package/dist/dashboard-rpc/index.d.ts +1 -1
  97. package/dist/dashboard-rpc/index.d.ts.map +1 -1
  98. package/dist/dashboard-rpc/index.js +1 -1
  99. package/dist/dashboard-rpc/index.js.map +1 -1
  100. package/dist/dashboard-rpc/modules.d.ts +8 -6
  101. package/dist/dashboard-rpc/modules.d.ts.map +1 -1
  102. package/dist/dashboard-rpc/modules.js +8 -6
  103. package/dist/dashboard-rpc/modules.js.map +1 -1
  104. package/dist/dashboard-rpc/preferences.d.ts +2 -2
  105. package/dist/dashboard-rpc/preferences.d.ts.map +1 -1
  106. package/dist/dashboard-rpc/preferences.js +2 -2
  107. package/dist/dashboard-rpc/preferences.js.map +1 -1
  108. package/dist/dashboard-rpc/projects.d.ts +29 -3
  109. package/dist/dashboard-rpc/projects.d.ts.map +1 -1
  110. package/dist/dashboard-rpc/projects.js +49 -7
  111. package/dist/dashboard-rpc/projects.js.map +1 -1
  112. package/dist/dashboard-rpc/reads.d.ts +3 -3
  113. package/dist/dashboard-rpc/reads.js +1 -1
  114. package/dist/dashboard-rpc/test-context.d.ts.map +1 -1
  115. package/dist/dashboard-rpc/test-context.js +4 -3
  116. package/dist/dashboard-rpc/test-context.js.map +1 -1
  117. package/dist/event-stream.d.ts +1 -1
  118. package/dist/event-stream.js +1 -1
  119. package/dist/events.d.ts +8 -8
  120. package/dist/events.d.ts.map +1 -1
  121. package/dist/index.d.ts +3 -2
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/install.d.ts +9 -7
  124. package/dist/install.d.ts.map +1 -1
  125. package/dist/install.js +28 -14
  126. package/dist/install.js.map +1 -1
  127. package/dist/module-server.d.ts +1 -1
  128. package/dist/module-types/dashboard/lib/route.d.ts +2 -1
  129. package/dist/module-types/dashboard/lib/use-modules.d.ts +4 -3
  130. package/dist/module-types/dashboard/module/index.d.ts +5 -5
  131. package/dist/module-types/src/agent-view.d.ts +3 -3
  132. package/dist/module-types/src/bridge-browser.d.ts +4 -4
  133. package/dist/module-types/src/built-in.d.ts +13 -4
  134. package/dist/module-types/src/client.d.ts +1 -1
  135. package/dist/module-types/src/cloud-run-state.d.ts +1 -1
  136. package/dist/module-types/src/dashboard/agent-handoff.d.ts +4 -4
  137. package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +3 -3
  138. package/dist/module-types/src/dashboard/docs.d.ts +1 -1
  139. package/dist/module-types/src/dashboard/git-status.d.ts +1 -1
  140. package/dist/module-types/src/dashboard/interventions.d.ts +2 -2
  141. package/dist/module-types/src/dashboard/open-in-app.d.ts +3 -3
  142. package/dist/module-types/src/dashboard/open-questions.d.ts +2 -2
  143. package/dist/module-types/src/dashboard/projects.d.ts +6 -5
  144. package/dist/module-types/src/dashboard/pull-requests.d.ts +5 -5
  145. package/dist/module-types/src/dashboard/remote-run.d.ts +5 -5
  146. package/dist/module-types/src/dashboard/rpc-serve.d.ts +7 -4
  147. package/dist/module-types/src/dashboard/run-inbox.d.ts +2 -2
  148. package/dist/module-types/src/dashboard/types.d.ts +29 -3
  149. package/dist/module-types/src/dashboard-rpc/context.d.ts +2 -0
  150. package/dist/module-types/src/dashboard-rpc/control.d.ts +1 -1
  151. package/dist/module-types/src/dashboard-rpc/events.d.ts +3 -3
  152. package/dist/module-types/src/dashboard-rpc/index.d.ts +1 -1
  153. package/dist/module-types/src/dashboard-rpc/modules.d.ts +8 -6
  154. package/dist/module-types/src/dashboard-rpc/preferences.d.ts +2 -2
  155. package/dist/module-types/src/dashboard-rpc/projects.d.ts +29 -3
  156. package/dist/module-types/src/dashboard-rpc/reads.d.ts +3 -3
  157. package/dist/module-types/src/event-stream.d.ts +1 -1
  158. package/dist/module-types/src/events.d.ts +8 -8
  159. package/dist/module-types/src/index.d.ts +3 -2
  160. package/dist/module-types/src/open-choices.d.ts +2 -2
  161. package/dist/module-types/src/{framework-dir.d.ts → openagent-dir.d.ts} +2 -2
  162. package/dist/module-types/src/openagent-gitignore.d.ts +11 -0
  163. package/dist/module-types/src/project-commands.d.ts +1 -1
  164. package/dist/module-types/src/project-errors.d.ts +11 -7
  165. package/dist/module-types/src/project-hooks.d.ts +4 -4
  166. package/dist/module-types/src/project-modules.d.ts +5 -5
  167. package/dist/module-types/src/project-presets.d.ts +4 -4
  168. package/dist/module-types/src/project.d.ts +6 -6
  169. package/dist/module-types/src/publish-levels.d.ts +4 -4
  170. package/dist/module-types/src/quota-boundary.d.ts +2 -2
  171. package/dist/module-types/src/registry.d.ts +13 -7
  172. package/dist/module-types/src/store/agent-checkout.d.ts +1 -1
  173. package/dist/module-types/src/store/agent-store.d.ts +6 -6
  174. package/dist/module-types/src/store/branches.d.ts +7 -7
  175. package/dist/module-types/src/store/git-host.d.ts +7 -7
  176. package/dist/module-types/src/store/provided.d.ts +3 -3
  177. package/dist/module-types/src/store/queue.d.ts +8 -8
  178. package/dist/module-types/src/store/repository.d.ts +2 -2
  179. package/dist/module-types/src/store/run-record.d.ts +10 -10
  180. package/dist/module-types/src/store/runs.d.ts +6 -6
  181. package/dist/module-types/src/store/tickets.d.ts +7 -7
  182. package/dist/module-types/src/terminal.d.ts +3 -3
  183. package/dist/open-choices.d.ts +2 -2
  184. package/dist/{framework-dir.js → openagent-dir.d.ts} +3 -3
  185. package/dist/openagent-dir.d.ts.map +1 -0
  186. package/dist/{framework-dir.d.ts → openagent-dir.js} +3 -3
  187. package/dist/openagent-dir.js.map +1 -0
  188. package/dist/openagent-gitignore.d.ts +12 -0
  189. package/dist/openagent-gitignore.d.ts.map +1 -0
  190. package/dist/openagent-gitignore.js +19 -0
  191. package/dist/openagent-gitignore.js.map +1 -0
  192. package/dist/pick-directory.js +2 -2
  193. package/dist/pick-directory.js.map +1 -1
  194. package/dist/project-commands.d.ts +1 -1
  195. package/dist/project-commands.js +1 -1
  196. package/dist/project-errors.d.ts +11 -7
  197. package/dist/project-errors.d.ts.map +1 -1
  198. package/dist/project-errors.js +10 -8
  199. package/dist/project-errors.js.map +1 -1
  200. package/dist/project-hooks.d.ts +4 -4
  201. package/dist/project-hooks.d.ts.map +1 -1
  202. package/dist/project-hooks.js +8 -8
  203. package/dist/project-hooks.js.map +1 -1
  204. package/dist/project-modules.d.ts +5 -5
  205. package/dist/project-modules.js +2 -2
  206. package/dist/project-presets.d.ts +4 -4
  207. package/dist/project-presets.d.ts.map +1 -1
  208. package/dist/project-presets.js +9 -9
  209. package/dist/project-presets.js.map +1 -1
  210. package/dist/project.d.ts +6 -6
  211. package/dist/project.js +6 -6
  212. package/dist/publish-levels.d.ts +4 -4
  213. package/dist/publish-levels.d.ts.map +1 -1
  214. package/dist/publish-levels.js +7 -5
  215. package/dist/publish-levels.js.map +1 -1
  216. package/dist/quota-boundary.d.ts +2 -2
  217. package/dist/quota-boundary.js +2 -2
  218. package/dist/registry.d.ts +13 -7
  219. package/dist/registry.d.ts.map +1 -1
  220. package/dist/registry.js +19 -3
  221. package/dist/registry.js.map +1 -1
  222. package/dist/remove-files.d.ts +24 -0
  223. package/dist/remove-files.d.ts.map +1 -0
  224. package/dist/remove-files.js +98 -0
  225. package/dist/remove-files.js.map +1 -0
  226. package/dist/store/agent-checkout.d.ts +1 -1
  227. package/dist/store/agent-checkout.js +3 -3
  228. package/dist/store/agent-checkout.js.map +1 -1
  229. package/dist/store/agent-store.d.ts +6 -6
  230. package/dist/store/agent-store.js +8 -8
  231. package/dist/store/agent-store.js.map +1 -1
  232. package/dist/store/branches.d.ts +7 -7
  233. package/dist/store/branches.d.ts.map +1 -1
  234. package/dist/store/branches.js +1 -1
  235. package/dist/store/branches.js.map +1 -1
  236. package/dist/store/git-host.d.ts +7 -7
  237. package/dist/store/git-host.d.ts.map +1 -1
  238. package/dist/store/git-host.js +1 -1
  239. package/dist/store/git-host.js.map +1 -1
  240. package/dist/store/provided.d.ts +3 -3
  241. package/dist/store/provided.d.ts.map +1 -1
  242. package/dist/store/provided.js +3 -3
  243. package/dist/store/provided.js.map +1 -1
  244. package/dist/store/queue.d.ts +8 -8
  245. package/dist/store/queue.d.ts.map +1 -1
  246. package/dist/store/queue.js +1 -1
  247. package/dist/store/queue.js.map +1 -1
  248. package/dist/store/repository.d.ts +2 -2
  249. package/dist/store/run-record.d.ts +10 -10
  250. package/dist/store/run-record.d.ts.map +1 -1
  251. package/dist/store/run-record.js +7 -7
  252. package/dist/store/run-record.js.map +1 -1
  253. package/dist/store/runs.d.ts +6 -6
  254. package/dist/store/runs.d.ts.map +1 -1
  255. package/dist/store/runs.js +2 -2
  256. package/dist/store/runs.js.map +1 -1
  257. package/dist/store/tickets.d.ts +7 -7
  258. package/dist/store/tickets.d.ts.map +1 -1
  259. package/dist/store/tickets.js +1 -1
  260. package/dist/store/tickets.js.map +1 -1
  261. package/dist/terminal.d.ts +3 -3
  262. package/dist/terminal.js +3 -3
  263. package/package.json +19 -19
  264. package/dist/agent-archive.d.ts +0 -35
  265. package/dist/agent-archive.d.ts.map +0 -1
  266. package/dist/agent-archive.js +0 -67
  267. package/dist/agent-archive.js.map +0 -1
  268. package/dist/agent-commit.d.ts +0 -140
  269. package/dist/agent-commit.d.ts.map +0 -1
  270. package/dist/agent-commit.js +0 -254
  271. package/dist/agent-commit.js.map +0 -1
  272. package/dist/agent-driver.d.ts +0 -28
  273. package/dist/agent-driver.d.ts.map +0 -1
  274. package/dist/agent-driver.js +0 -18
  275. package/dist/agent-driver.js.map +0 -1
  276. package/dist/agent-location.d.ts +0 -11
  277. package/dist/agent-location.d.ts.map +0 -1
  278. package/dist/agent-location.js +0 -10
  279. package/dist/agent-location.js.map +0 -1
  280. package/dist/agent-messages.d.ts +0 -55
  281. package/dist/agent-messages.d.ts.map +0 -1
  282. package/dist/agent-messages.js +0 -73
  283. package/dist/agent-messages.js.map +0 -1
  284. package/dist/agent-names.d.ts +0 -24
  285. package/dist/agent-names.d.ts.map +0 -1
  286. package/dist/agent-names.js +0 -33
  287. package/dist/agent-names.js.map +0 -1
  288. package/dist/agent-options.d.ts +0 -45
  289. package/dist/agent-options.d.ts.map +0 -1
  290. package/dist/agent-options.js +0 -83
  291. package/dist/agent-options.js.map +0 -1
  292. package/dist/agent-spec.d.ts +0 -56
  293. package/dist/agent-spec.d.ts.map +0 -1
  294. package/dist/agent-spec.js +0 -56
  295. package/dist/agent-spec.js.map +0 -1
  296. package/dist/agent-telemetry.d.ts +0 -88
  297. package/dist/agent-telemetry.d.ts.map +0 -1
  298. package/dist/agent-telemetry.js +0 -97
  299. package/dist/agent-telemetry.js.map +0 -1
  300. package/dist/agent.d.ts +0 -113
  301. package/dist/agent.d.ts.map +0 -1
  302. package/dist/agent.js +0 -168
  303. package/dist/agent.js.map +0 -1
  304. package/dist/archived-agent-patch.d.ts +0 -14
  305. package/dist/archived-agent-patch.d.ts.map +0 -1
  306. package/dist/archived-agent-patch.js +0 -22
  307. package/dist/archived-agent-patch.js.map +0 -1
  308. package/dist/auto-pm.d.ts +0 -538
  309. package/dist/auto-pm.d.ts.map +0 -1
  310. package/dist/auto-pm.js +0 -707
  311. package/dist/auto-pm.js.map +0 -1
  312. package/dist/await-gate.d.ts +0 -184
  313. package/dist/await-gate.d.ts.map +0 -1
  314. package/dist/await-gate.js +0 -252
  315. package/dist/await-gate.js.map +0 -1
  316. package/dist/branch-links-pass.d.ts +0 -15
  317. package/dist/branch-links-pass.d.ts.map +0 -1
  318. package/dist/branch-links-pass.js +0 -13
  319. package/dist/branch-links-pass.js.map +0 -1
  320. package/dist/branch-links.d.ts +0 -53
  321. package/dist/branch-links.d.ts.map +0 -1
  322. package/dist/branch-links.js +0 -94
  323. package/dist/branch-links.js.map +0 -1
  324. package/dist/branch-names.d.ts +0 -57
  325. package/dist/branch-names.d.ts.map +0 -1
  326. package/dist/branch-names.js +0 -72
  327. package/dist/branch-names.js.map +0 -1
  328. package/dist/ci-watch.d.ts +0 -123
  329. package/dist/ci-watch.d.ts.map +0 -1
  330. package/dist/ci-watch.js +0 -228
  331. package/dist/ci-watch.js.map +0 -1
  332. package/dist/claude-trust.d.ts +0 -16
  333. package/dist/claude-trust.d.ts.map +0 -1
  334. package/dist/claude-trust.js +0 -72
  335. package/dist/claude-trust.js.map +0 -1
  336. package/dist/cli-exec.d.ts +0 -36
  337. package/dist/cli-exec.d.ts.map +0 -1
  338. package/dist/cli-exec.js +0 -44
  339. package/dist/cli-exec.js.map +0 -1
  340. package/dist/closing-keywords.d.ts +0 -28
  341. package/dist/closing-keywords.d.ts.map +0 -1
  342. package/dist/closing-keywords.js +0 -49
  343. package/dist/closing-keywords.js.map +0 -1
  344. package/dist/config-layers.d.ts +0 -62
  345. package/dist/config-layers.d.ts.map +0 -1
  346. package/dist/config-layers.js +0 -70
  347. package/dist/config-layers.js.map +0 -1
  348. package/dist/config.d.ts +0 -54
  349. package/dist/config.d.ts.map +0 -1
  350. package/dist/config.js +0 -78
  351. package/dist/config.js.map +0 -1
  352. package/dist/consumption-guard.d.ts +0 -53
  353. package/dist/consumption-guard.d.ts.map +0 -1
  354. package/dist/consumption-guard.js +0 -69
  355. package/dist/consumption-guard.js.map +0 -1
  356. package/dist/control.d.ts +0 -75
  357. package/dist/control.d.ts.map +0 -1
  358. package/dist/control.js +0 -68
  359. package/dist/control.js.map +0 -1
  360. package/dist/conversation-commit.d.ts +0 -166
  361. package/dist/conversation-commit.d.ts.map +0 -1
  362. package/dist/conversation-commit.js +0 -309
  363. package/dist/conversation-commit.js.map +0 -1
  364. package/dist/conversations.d.ts +0 -93
  365. package/dist/conversations.d.ts.map +0 -1
  366. package/dist/conversations.js +0 -176
  367. package/dist/conversations.js.map +0 -1
  368. package/dist/daemon-writes.d.ts +0 -33
  369. package/dist/daemon-writes.d.ts.map +0 -1
  370. package/dist/daemon-writes.js +0 -45
  371. package/dist/daemon-writes.js.map +0 -1
  372. package/dist/dashboard/agent-tree.d.ts +0 -106
  373. package/dist/dashboard/agent-tree.d.ts.map +0 -1
  374. package/dist/dashboard/agent-tree.js +0 -180
  375. package/dist/dashboard/agent-tree.js.map +0 -1
  376. package/dist/dashboard/browser-proxy.d.ts +0 -41
  377. package/dist/dashboard/browser-proxy.d.ts.map +0 -1
  378. package/dist/dashboard/browser-proxy.js +0 -96
  379. package/dist/dashboard/browser-proxy.js.map +0 -1
  380. package/dist/dashboard/discord-webhook.d.ts +0 -17
  381. package/dist/dashboard/discord-webhook.d.ts.map +0 -1
  382. package/dist/dashboard/discord-webhook.js +0 -36
  383. package/dist/dashboard/discord-webhook.js.map +0 -1
  384. package/dist/dashboard/file-diff.d.ts +0 -67
  385. package/dist/dashboard/file-diff.d.ts.map +0 -1
  386. package/dist/dashboard/file-diff.js +0 -132
  387. package/dist/dashboard/file-diff.js.map +0 -1
  388. package/dist/dashboard/file-read.d.ts +0 -42
  389. package/dist/dashboard/file-read.d.ts.map +0 -1
  390. package/dist/dashboard/file-read.js +0 -69
  391. package/dist/dashboard/file-read.js.map +0 -1
  392. package/dist/dashboard/file-status.d.ts +0 -21
  393. package/dist/dashboard/file-status.d.ts.map +0 -1
  394. package/dist/dashboard/file-status.js +0 -37
  395. package/dist/dashboard/file-status.js.map +0 -1
  396. package/dist/dashboard/gh.d.ts +0 -131
  397. package/dist/dashboard/gh.d.ts.map +0 -1
  398. package/dist/dashboard/gh.js +0 -150
  399. package/dist/dashboard/gh.js.map +0 -1
  400. package/dist/dashboard/github.d.ts +0 -11
  401. package/dist/dashboard/github.d.ts.map +0 -1
  402. package/dist/dashboard/github.js +0 -33
  403. package/dist/dashboard/github.js.map +0 -1
  404. package/dist/dashboard/run-handoff.d.ts +0 -311
  405. package/dist/dashboard/run-handoff.d.ts.map +0 -1
  406. package/dist/dashboard/run-handoff.js +0 -485
  407. package/dist/dashboard/run-handoff.js.map +0 -1
  408. package/dist/dashboard/scheduler-state.d.ts +0 -73
  409. package/dist/dashboard/scheduler-state.d.ts.map +0 -1
  410. package/dist/dashboard/scheduler-state.js +0 -120
  411. package/dist/dashboard/scheduler-state.js.map +0 -1
  412. package/dist/dashboard/subagent-settings.d.ts +0 -26
  413. package/dist/dashboard/subagent-settings.d.ts.map +0 -1
  414. package/dist/dashboard/subagent-settings.js +0 -52
  415. package/dist/dashboard/subagent-settings.js.map +0 -1
  416. package/dist/dashboard/telefunc-serve.d.ts +0 -118
  417. package/dist/dashboard/telefunc-serve.d.ts.map +0 -1
  418. package/dist/dashboard/telefunc-serve.js +0 -108
  419. package/dist/dashboard/telefunc-serve.js.map +0 -1
  420. package/dist/dashboard/tickets.d.ts +0 -29
  421. package/dist/dashboard/tickets.d.ts.map +0 -1
  422. package/dist/dashboard/tickets.js +0 -38
  423. package/dist/dashboard/tickets.js.map +0 -1
  424. package/dist/dashboard/widget-serve.d.ts +0 -15
  425. package/dist/dashboard/widget-serve.d.ts.map +0 -1
  426. package/dist/dashboard/widget-serve.js +0 -45
  427. package/dist/dashboard/widget-serve.js.map +0 -1
  428. package/dist/dashboard-bundle/assets/main-B3HghPQy.css +0 -2
  429. package/dist/dashboard-client/assets/chunks/chunk-BF9pJudf.js +0 -4
  430. package/dist/dashboard-client/assets/entries/entry-client-routing.CT1e9F0o.js +0 -1
  431. package/dist/dashboard-client/assets/entries/pages_index.CkW5JQ8X.js +0 -428
  432. package/dist/dashboard-client/assets/static/layouts_tailwind-00e65532.8OjKGAbA.css +0 -2
  433. package/dist/dashboard-client/index.html +0 -27
  434. package/dist/dashboard-client/index.pageContext.json +0 -1
  435. package/dist/dashboard-client/logo-animated.svg +0 -34
  436. package/dist/dashboard-client/logo.svg +0 -16
  437. package/dist/dashboard-rpc/control.telefunc.d.ts +0 -176
  438. package/dist/dashboard-rpc/control.telefunc.d.ts.map +0 -1
  439. package/dist/dashboard-rpc/control.telefunc.js +0 -373
  440. package/dist/dashboard-rpc/control.telefunc.js.map +0 -1
  441. package/dist/dashboard-rpc/devices.telefunc.d.ts +0 -9
  442. package/dist/dashboard-rpc/devices.telefunc.d.ts.map +0 -1
  443. package/dist/dashboard-rpc/devices.telefunc.js +0 -12
  444. package/dist/dashboard-rpc/devices.telefunc.js.map +0 -1
  445. package/dist/dashboard-rpc/events.telefunc.d.ts +0 -36
  446. package/dist/dashboard-rpc/events.telefunc.d.ts.map +0 -1
  447. package/dist/dashboard-rpc/events.telefunc.js +0 -70
  448. package/dist/dashboard-rpc/events.telefunc.js.map +0 -1
  449. package/dist/dashboard-rpc/preferences.telefunc.d.ts +0 -97
  450. package/dist/dashboard-rpc/preferences.telefunc.d.ts.map +0 -1
  451. package/dist/dashboard-rpc/preferences.telefunc.js +0 -157
  452. package/dist/dashboard-rpc/preferences.telefunc.js.map +0 -1
  453. package/dist/dashboard-rpc/projects.telefunc.d.ts +0 -56
  454. package/dist/dashboard-rpc/projects.telefunc.d.ts.map +0 -1
  455. package/dist/dashboard-rpc/projects.telefunc.js +0 -96
  456. package/dist/dashboard-rpc/projects.telefunc.js.map +0 -1
  457. package/dist/dashboard-rpc/quota.telefunc.d.ts +0 -40
  458. package/dist/dashboard-rpc/quota.telefunc.d.ts.map +0 -1
  459. package/dist/dashboard-rpc/quota.telefunc.js +0 -84
  460. package/dist/dashboard-rpc/quota.telefunc.js.map +0 -1
  461. package/dist/dashboard-rpc/reads.telefunc.d.ts +0 -197
  462. package/dist/dashboard-rpc/reads.telefunc.d.ts.map +0 -1
  463. package/dist/dashboard-rpc/reads.telefunc.js +0 -403
  464. package/dist/dashboard-rpc/reads.telefunc.js.map +0 -1
  465. package/dist/dashboard-rpc/register.d.ts +0 -18
  466. package/dist/dashboard-rpc/register.d.ts.map +0 -1
  467. package/dist/dashboard-rpc/register.js +0 -66
  468. package/dist/dashboard-rpc/register.js.map +0 -1
  469. package/dist/dashboard-rpc/relay-run.d.ts +0 -9
  470. package/dist/dashboard-rpc/relay-run.d.ts.map +0 -1
  471. package/dist/dashboard-rpc/relay-run.js +0 -21
  472. package/dist/dashboard-rpc/relay-run.js.map +0 -1
  473. package/dist/dashboard-rpc/stream-channel.d.ts +0 -23
  474. package/dist/dashboard-rpc/stream-channel.d.ts.map +0 -1
  475. package/dist/dashboard-rpc/stream-channel.js +0 -52
  476. package/dist/dashboard-rpc/stream-channel.js.map +0 -1
  477. package/dist/dashboard-rpc/subagents.d.ts +0 -12
  478. package/dist/dashboard-rpc/subagents.d.ts.map +0 -1
  479. package/dist/dashboard-rpc/subagents.js +0 -13
  480. package/dist/dashboard-rpc/subagents.js.map +0 -1
  481. package/dist/dashboard-rpc/widgets.d.ts +0 -33
  482. package/dist/dashboard-rpc/widgets.d.ts.map +0 -1
  483. package/dist/dashboard-rpc/widgets.js +0 -54
  484. package/dist/dashboard-rpc/widgets.js.map +0 -1
  485. package/dist/data-branch.d.ts +0 -120
  486. package/dist/data-branch.d.ts.map +0 -1
  487. package/dist/data-branch.js +0 -319
  488. package/dist/data-branch.js.map +0 -1
  489. package/dist/discord/bot.d.ts +0 -61
  490. package/dist/discord/bot.d.ts.map +0 -1
  491. package/dist/discord/bot.js +0 -94
  492. package/dist/discord/bot.js.map +0 -1
  493. package/dist/discord/gateway.d.ts +0 -137
  494. package/dist/discord/gateway.d.ts.map +0 -1
  495. package/dist/discord/gateway.js +0 -315
  496. package/dist/discord/gateway.js.map +0 -1
  497. package/dist/discord/live-run.d.ts +0 -31
  498. package/dist/discord/live-run.d.ts.map +0 -1
  499. package/dist/discord/live-run.js +0 -57
  500. package/dist/discord/live-run.js.map +0 -1
  501. package/dist/discord/reply-mirror.d.ts +0 -83
  502. package/dist/discord/reply-mirror.d.ts.map +0 -1
  503. package/dist/discord/reply-mirror.js +0 -84
  504. package/dist/discord/reply-mirror.js.map +0 -1
  505. package/dist/discord/rest.d.ts +0 -20
  506. package/dist/discord/rest.d.ts.map +0 -1
  507. package/dist/discord/rest.js +0 -41
  508. package/dist/discord/rest.js.map +0 -1
  509. package/dist/discord/routing.d.ts +0 -81
  510. package/dist/discord/routing.d.ts.map +0 -1
  511. package/dist/discord/routing.js +0 -91
  512. package/dist/discord/routing.js.map +0 -1
  513. package/dist/discord-credentials-store.d.ts +0 -14
  514. package/dist/discord-credentials-store.d.ts.map +0 -1
  515. package/dist/discord-credentials-store.js +0 -53
  516. package/dist/discord-credentials-store.js.map +0 -1
  517. package/dist/discord-credentials.d.ts +0 -80
  518. package/dist/discord-credentials.d.ts.map +0 -1
  519. package/dist/discord-credentials.js +0 -55
  520. package/dist/discord-credentials.js.map +0 -1
  521. package/dist/driver/actions-zip.d.ts +0 -2
  522. package/dist/driver/actions-zip.d.ts.map +0 -1
  523. package/dist/driver/actions-zip.js +0 -70
  524. package/dist/driver/actions-zip.js.map +0 -1
  525. package/dist/driver/actions.d.ts +0 -130
  526. package/dist/driver/actions.d.ts.map +0 -1
  527. package/dist/driver/actions.js +0 -261
  528. package/dist/driver/actions.js.map +0 -1
  529. package/dist/driver/agent-cli.d.ts +0 -57
  530. package/dist/driver/agent-cli.d.ts.map +0 -1
  531. package/dist/driver/agent-cli.js +0 -134
  532. package/dist/driver/agent-cli.js.map +0 -1
  533. package/dist/driver/child-registry.d.ts +0 -25
  534. package/dist/driver/child-registry.d.ts.map +0 -1
  535. package/dist/driver/child-registry.js +0 -53
  536. package/dist/driver/child-registry.js.map +0 -1
  537. package/dist/driver/claude-code-quota.d.ts +0 -40
  538. package/dist/driver/claude-code-quota.d.ts.map +0 -1
  539. package/dist/driver/claude-code-quota.js +0 -144
  540. package/dist/driver/claude-code-quota.js.map +0 -1
  541. package/dist/driver/claude-code.d.ts +0 -104
  542. package/dist/driver/claude-code.d.ts.map +0 -1
  543. package/dist/driver/claude-code.js +0 -314
  544. package/dist/driver/claude-code.js.map +0 -1
  545. package/dist/driver/cli-session.d.ts +0 -57
  546. package/dist/driver/cli-session.d.ts.map +0 -1
  547. package/dist/driver/cli-session.js +0 -134
  548. package/dist/driver/cli-session.js.map +0 -1
  549. package/dist/driver/cloud.d.ts +0 -109
  550. package/dist/driver/cloud.d.ts.map +0 -1
  551. package/dist/driver/cloud.js +0 -232
  552. package/dist/driver/cloud.js.map +0 -1
  553. package/dist/driver/codex.d.ts +0 -99
  554. package/dist/driver/codex.d.ts.map +0 -1
  555. package/dist/driver/codex.js +0 -190
  556. package/dist/driver/codex.js.map +0 -1
  557. package/dist/driver/fake.d.ts +0 -54
  558. package/dist/driver/fake.d.ts.map +0 -1
  559. package/dist/driver/fake.js +0 -73
  560. package/dist/driver/fake.js.map +0 -1
  561. package/dist/driver/index.d.ts +0 -10
  562. package/dist/driver/index.d.ts.map +0 -1
  563. package/dist/driver/index.js +0 -14
  564. package/dist/driver/index.js.map +0 -1
  565. package/dist/driver/session-support.d.ts +0 -14
  566. package/dist/driver/session-support.d.ts.map +0 -1
  567. package/dist/driver/session-support.js +0 -37
  568. package/dist/driver/session-support.js.map +0 -1
  569. package/dist/driver/types.d.ts +0 -310
  570. package/dist/driver/types.d.ts.map +0 -1
  571. package/dist/driver/types.js +0 -5
  572. package/dist/driver/types.js.map +0 -1
  573. package/dist/driver-cli.d.ts +0 -61
  574. package/dist/driver-cli.d.ts.map +0 -1
  575. package/dist/driver-cli.js +0 -66
  576. package/dist/driver-cli.js.map +0 -1
  577. package/dist/fake-script.d.ts +0 -15
  578. package/dist/fake-script.d.ts.map +0 -1
  579. package/dist/fake-script.js +0 -58
  580. package/dist/fake-script.js.map +0 -1
  581. package/dist/framework-dir.d.ts.map +0 -1
  582. package/dist/framework-dir.js.map +0 -1
  583. package/dist/framework-gitignore.d.ts +0 -12
  584. package/dist/framework-gitignore.d.ts.map +0 -1
  585. package/dist/framework-gitignore.js +0 -19
  586. package/dist/framework-gitignore.js.map +0 -1
  587. package/dist/gate-keepalive.d.ts +0 -47
  588. package/dist/gate-keepalive.d.ts.map +0 -1
  589. package/dist/gate-keepalive.js +0 -62
  590. package/dist/gate-keepalive.js.map +0 -1
  591. package/dist/git-exclude.d.ts +0 -11
  592. package/dist/git-exclude.d.ts.map +0 -1
  593. package/dist/git-exclude.js +0 -23
  594. package/dist/git-exclude.js.map +0 -1
  595. package/dist/handoff-level.d.ts +0 -56
  596. package/dist/handoff-level.d.ts.map +0 -1
  597. package/dist/handoff-level.js +0 -62
  598. package/dist/handoff-level.js.map +0 -1
  599. package/dist/host-exec.d.ts +0 -21
  600. package/dist/host-exec.d.ts.map +0 -1
  601. package/dist/host-exec.js +0 -30
  602. package/dist/host-exec.js.map +0 -1
  603. package/dist/layout.d.ts +0 -41
  604. package/dist/layout.d.ts.map +0 -1
  605. package/dist/layout.js +0 -69
  606. package/dist/layout.js.map +0 -1
  607. package/dist/logs.d.ts +0 -73
  608. package/dist/logs.d.ts.map +0 -1
  609. package/dist/logs.js +0 -218
  610. package/dist/logs.js.map +0 -1
  611. package/dist/maintenance.d.ts +0 -90
  612. package/dist/maintenance.d.ts.map +0 -1
  613. package/dist/maintenance.js +0 -141
  614. package/dist/maintenance.js.map +0 -1
  615. package/dist/merged-worktrees.d.ts +0 -74
  616. package/dist/merged-worktrees.d.ts.map +0 -1
  617. package/dist/merged-worktrees.js +0 -84
  618. package/dist/merged-worktrees.js.map +0 -1
  619. package/dist/module-types/src/dashboard/agent-tree.d.ts +0 -105
  620. package/dist/module-types/src/dashboard/file-diff.d.ts +0 -66
  621. package/dist/module-types/src/dashboard/file-read.d.ts +0 -41
  622. package/dist/module-types/src/dashboard/file-status.d.ts +0 -20
  623. package/dist/module-types/src/dashboard/scheduler-state.d.ts +0 -72
  624. package/dist/module-types/src/dashboard/subagent-settings.d.ts +0 -25
  625. package/dist/module-types/src/dashboard-rpc/subagents.d.ts +0 -11
  626. package/dist/module-types/src/framework-gitignore.d.ts +0 -11
  627. package/dist/module-types/src/subagent-settings.d.ts +0 -26
  628. package/dist/on-before-mergeable-prompt.d.ts +0 -32
  629. package/dist/on-before-mergeable-prompt.d.ts.map +0 -1
  630. package/dist/on-before-mergeable-prompt.js +0 -26
  631. package/dist/on-before-mergeable-prompt.js.map +0 -1
  632. package/dist/planned-quick-wins.d.ts +0 -102
  633. package/dist/planned-quick-wins.d.ts.map +0 -1
  634. package/dist/planned-quick-wins.js +0 -171
  635. package/dist/planned-quick-wins.js.map +0 -1
  636. package/dist/preflight.d.ts +0 -77
  637. package/dist/preflight.d.ts.map +0 -1
  638. package/dist/preflight.js +0 -91
  639. package/dist/preflight.js.map +0 -1
  640. package/dist/preset-catalog.d.ts +0 -98
  641. package/dist/preset-catalog.d.ts.map +0 -1
  642. package/dist/preset-catalog.js +0 -129
  643. package/dist/preset-catalog.js.map +0 -1
  644. package/dist/preset-prompt.d.ts +0 -81
  645. package/dist/preset-prompt.d.ts.map +0 -1
  646. package/dist/preset-prompt.js +0 -51
  647. package/dist/preset-prompt.js.map +0 -1
  648. package/dist/preset-registry.d.ts +0 -32
  649. package/dist/preset-registry.d.ts.map +0 -1
  650. package/dist/preset-registry.js +0 -35
  651. package/dist/preset-registry.js.map +0 -1
  652. package/dist/presets.d.ts +0 -20
  653. package/dist/presets.d.ts.map +0 -1
  654. package/dist/presets.js +0 -33
  655. package/dist/presets.js.map +0 -1
  656. package/dist/preview-runtime.d.ts +0 -33
  657. package/dist/preview-runtime.d.ts.map +0 -1
  658. package/dist/preview-runtime.js +0 -96
  659. package/dist/preview-runtime.js.map +0 -1
  660. package/dist/preview.d.ts +0 -78
  661. package/dist/preview.d.ts.map +0 -1
  662. package/dist/preview.js +0 -301
  663. package/dist/preview.js.map +0 -1
  664. package/dist/project-widgets.d.ts +0 -46
  665. package/dist/project-widgets.d.ts.map +0 -1
  666. package/dist/project-widgets.js +0 -93
  667. package/dist/project-widgets.js.map +0 -1
  668. package/dist/prompt-run.d.ts +0 -104
  669. package/dist/prompt-run.d.ts.map +0 -1
  670. package/dist/prompt-run.js +0 -112
  671. package/dist/prompt-run.js.map +0 -1
  672. package/dist/prompt-template.d.ts +0 -16
  673. package/dist/prompt-template.d.ts.map +0 -1
  674. package/dist/prompt-template.js +0 -56
  675. package/dist/prompt-template.js.map +0 -1
  676. package/dist/prompts.generated.d.ts +0 -53
  677. package/dist/prompts.generated.d.ts.map +0 -1
  678. package/dist/prompts.generated.js +0 -55
  679. package/dist/prompts.generated.js.map +0 -1
  680. package/dist/queue-promote.d.ts +0 -70
  681. package/dist/queue-promote.d.ts.map +0 -1
  682. package/dist/queue-promote.js +0 -118
  683. package/dist/queue-promote.js.map +0 -1
  684. package/dist/relay.d.ts +0 -84
  685. package/dist/relay.d.ts.map +0 -1
  686. package/dist/relay.js +0 -199
  687. package/dist/relay.js.map +0 -1
  688. package/dist/repos-directory.d.ts +0 -19
  689. package/dist/repos-directory.d.ts.map +0 -1
  690. package/dist/repos-directory.js +0 -23
  691. package/dist/repos-directory.js.map +0 -1
  692. package/dist/retired-project-settings.d.ts +0 -43
  693. package/dist/retired-project-settings.d.ts.map +0 -1
  694. package/dist/retired-project-settings.js +0 -125
  695. package/dist/retired-project-settings.js.map +0 -1
  696. package/dist/routine-locks.d.ts +0 -53
  697. package/dist/routine-locks.d.ts.map +0 -1
  698. package/dist/routine-locks.js +0 -125
  699. package/dist/routine-locks.js.map +0 -1
  700. package/dist/run-driver.d.ts +0 -26
  701. package/dist/run-driver.d.ts.map +0 -1
  702. package/dist/run-driver.js +0 -17
  703. package/dist/run-driver.js.map +0 -1
  704. package/dist/run-locks.d.ts +0 -3
  705. package/dist/run-locks.d.ts.map +0 -1
  706. package/dist/run-locks.js +0 -39
  707. package/dist/run-locks.js.map +0 -1
  708. package/dist/run-messages.d.ts +0 -64
  709. package/dist/run-messages.d.ts.map +0 -1
  710. package/dist/run-messages.js +0 -76
  711. package/dist/run-messages.js.map +0 -1
  712. package/dist/run-options.d.ts +0 -53
  713. package/dist/run-options.d.ts.map +0 -1
  714. package/dist/run-options.js +0 -110
  715. package/dist/run-options.js.map +0 -1
  716. package/dist/run-telemetry.d.ts +0 -115
  717. package/dist/run-telemetry.d.ts.map +0 -1
  718. package/dist/run-telemetry.js +0 -137
  719. package/dist/run-telemetry.js.map +0 -1
  720. package/dist/run-view.d.ts +0 -109
  721. package/dist/run-view.d.ts.map +0 -1
  722. package/dist/run-view.js +0 -118
  723. package/dist/run-view.js.map +0 -1
  724. package/dist/run.d.ts +0 -261
  725. package/dist/run.d.ts.map +0 -1
  726. package/dist/run.js +0 -420
  727. package/dist/run.js.map +0 -1
  728. package/dist/runtime-keys.d.ts +0 -17
  729. package/dist/runtime-keys.d.ts.map +0 -1
  730. package/dist/runtime-keys.js +0 -17
  731. package/dist/runtime-keys.js.map +0 -1
  732. package/dist/sandbox.d.ts +0 -27
  733. package/dist/sandbox.d.ts.map +0 -1
  734. package/dist/sandbox.js +0 -63
  735. package/dist/sandbox.js.map +0 -1
  736. package/dist/session-link.d.ts +0 -19
  737. package/dist/session-link.d.ts.map +0 -1
  738. package/dist/session-link.js +0 -26
  739. package/dist/session-link.js.map +0 -1
  740. package/dist/sessions.d.ts +0 -77
  741. package/dist/sessions.d.ts.map +0 -1
  742. package/dist/sessions.js +0 -146
  743. package/dist/sessions.js.map +0 -1
  744. package/dist/spike-locks.d.ts +0 -75
  745. package/dist/spike-locks.d.ts.map +0 -1
  746. package/dist/spike-locks.js +0 -208
  747. package/dist/spike-locks.js.map +0 -1
  748. package/dist/stale-branch.d.ts +0 -21
  749. package/dist/stale-branch.d.ts.map +0 -1
  750. package/dist/stale-branch.js +0 -32
  751. package/dist/stale-branch.js.map +0 -1
  752. package/dist/steps.d.ts +0 -9
  753. package/dist/steps.d.ts.map +0 -1
  754. package/dist/steps.js +0 -13
  755. package/dist/steps.js.map +0 -1
  756. package/dist/store/forge.d.ts +0 -110
  757. package/dist/store/forge.d.ts.map +0 -1
  758. package/dist/store/forge.js +0 -97
  759. package/dist/store/forge.js.map +0 -1
  760. package/dist/store/run-checkout.d.ts +0 -33
  761. package/dist/store/run-checkout.d.ts.map +0 -1
  762. package/dist/store/run-checkout.js +0 -59
  763. package/dist/store/run-checkout.js.map +0 -1
  764. package/dist/store/run-store.d.ts +0 -501
  765. package/dist/store/run-store.d.ts.map +0 -1
  766. package/dist/store/run-store.js +0 -806
  767. package/dist/store/run-store.js.map +0 -1
  768. package/dist/store/suspend.d.ts +0 -38
  769. package/dist/store/suspend.d.ts.map +0 -1
  770. package/dist/store/suspend.js +0 -45
  771. package/dist/store/suspend.js.map +0 -1
  772. package/dist/store/worktree-deps.d.ts +0 -30
  773. package/dist/store/worktree-deps.d.ts.map +0 -1
  774. package/dist/store/worktree-deps.js +0 -115
  775. package/dist/store/worktree-deps.js.map +0 -1
  776. package/dist/store/worktree.d.ts +0 -194
  777. package/dist/store/worktree.d.ts.map +0 -1
  778. package/dist/store/worktree.js +0 -331
  779. package/dist/store/worktree.js.map +0 -1
  780. package/dist/subagent-settings.d.ts +0 -27
  781. package/dist/subagent-settings.d.ts.map +0 -1
  782. package/dist/subagent-settings.js +0 -35
  783. package/dist/subagent-settings.js.map +0 -1
  784. package/dist/system-prompt-file.d.ts +0 -18
  785. package/dist/system-prompt-file.d.ts.map +0 -1
  786. package/dist/system-prompt-file.js +0 -28
  787. package/dist/system-prompt-file.js.map +0 -1
  788. package/dist/system-prompt.d.ts +0 -148
  789. package/dist/system-prompt.d.ts.map +0 -1
  790. package/dist/system-prompt.js +0 -170
  791. package/dist/system-prompt.js.map +0 -1
  792. package/dist/target-driver.d.ts +0 -28
  793. package/dist/target-driver.d.ts.map +0 -1
  794. package/dist/target-driver.js +0 -18
  795. package/dist/target-driver.js.map +0 -1
  796. package/dist/ticket-locks.d.ts +0 -61
  797. package/dist/ticket-locks.d.ts.map +0 -1
  798. package/dist/ticket-locks.js +0 -137
  799. package/dist/ticket-locks.js.map +0 -1
  800. package/dist/tickets-file.d.ts +0 -7
  801. package/dist/tickets-file.d.ts.map +0 -1
  802. package/dist/tickets-file.js +0 -21
  803. package/dist/tickets-file.js.map +0 -1
  804. package/dist/tickets.d.ts +0 -18
  805. package/dist/tickets.d.ts.map +0 -1
  806. package/dist/tickets.js +0 -23
  807. package/dist/tickets.js.map +0 -1
  808. package/dist/todo-loop.d.ts +0 -110
  809. package/dist/todo-loop.d.ts.map +0 -1
  810. package/dist/todo-loop.js +0 -175
  811. package/dist/todo-loop.js.map +0 -1
  812. package/dist/turn-gate.d.ts +0 -144
  813. package/dist/turn-gate.d.ts.map +0 -1
  814. package/dist/turn-gate.js +0 -217
  815. package/dist/turn-gate.js.map +0 -1
  816. package/dist/usage.d.ts +0 -32
  817. package/dist/usage.d.ts.map +0 -1
  818. package/dist/usage.js +0 -46
  819. package/dist/usage.js.map +0 -1
  820. package/dist/widget-types/dashboard/components/LinkActions.d.ts +0 -26
  821. package/dist/widget-types/dashboard/components/Markdown.d.ts +0 -4
  822. package/dist/widget-types/dashboard/components/StartAgentButton.d.ts +0 -39
  823. package/dist/widget-types/dashboard/components/ui/badge.d.ts +0 -2
  824. package/dist/widget-types/dashboard/components/ui/button.d.ts +0 -10
  825. package/dist/widget-types/dashboard/components/ui/card.d.ts +0 -5
  826. package/dist/widget-types/dashboard/components/ui/checkbox.d.ts +0 -7
  827. package/dist/widget-types/dashboard/components/ui/dropdown-menu.d.ts +0 -16
  828. package/dist/widget-types/dashboard/components/ui/input.d.ts +0 -2
  829. package/dist/widget-types/dashboard/components/ui/option-label.d.ts +0 -4
  830. package/dist/widget-types/dashboard/components/ui/popover.d.ts +0 -8
  831. package/dist/widget-types/dashboard/components/ui/scroll-area.d.ts +0 -10
  832. package/dist/widget-types/dashboard/components/ui/separator.d.ts +0 -3
  833. package/dist/widget-types/dashboard/components/ui/skeleton.d.ts +0 -2
  834. package/dist/widget-types/dashboard/components/ui/slider.d.ts +0 -9
  835. package/dist/widget-types/dashboard/components/ui/tooltip.d.ts +0 -11
  836. package/dist/widget-types/dashboard/lib/draft-handoff.d.ts +0 -15
  837. package/dist/widget-types/dashboard/lib/format-date.d.ts +0 -51
  838. package/dist/widget-types/dashboard/lib/host-services.d.ts +0 -12
  839. package/dist/widget-types/dashboard/lib/route.d.ts +0 -24
  840. package/dist/widget-types/dashboard/lib/rpc.d.ts +0 -31
  841. package/dist/widget-types/dashboard/lib/use-action.d.ts +0 -25
  842. package/dist/widget-types/dashboard/lib/use-async.d.ts +0 -39
  843. package/dist/widget-types/dashboard/lib/use-widgets.d.ts +0 -42
  844. package/dist/widget-types/dashboard/lib/utils.d.ts +0 -3
  845. package/dist/widget-types/dashboard/rpc/widgets.d.ts +0 -4
  846. package/dist/widget-types/dashboard/widget/index.d.ts +0 -207
  847. package/dist/widget-types/src/agent-id.d.ts +0 -12
  848. package/dist/widget-types/src/agent-locks.d.ts +0 -2
  849. package/dist/widget-types/src/agent-view.d.ts +0 -38
  850. package/dist/widget-types/src/bridge-browser.d.ts +0 -216
  851. package/dist/widget-types/src/browser-stream.d.ts +0 -19
  852. package/dist/widget-types/src/browser.d.ts +0 -15
  853. package/dist/widget-types/src/cli-exec.d.ts +0 -35
  854. package/dist/widget-types/src/cloud-run-state.d.ts +0 -26
  855. package/dist/widget-types/src/dashboard/activity.d.ts +0 -40
  856. package/dist/widget-types/src/dashboard/agent-handoff.d.ts +0 -211
  857. package/dist/widget-types/src/dashboard/agent-tree.d.ts +0 -105
  858. package/dist/widget-types/src/dashboard/bridge-endpoints.d.ts +0 -157
  859. package/dist/widget-types/src/dashboard/bridge-question.d.ts +0 -32
  860. package/dist/widget-types/src/dashboard/bridge-store.d.ts +0 -178
  861. package/dist/widget-types/src/dashboard/cache.d.ts +0 -46
  862. package/dist/widget-types/src/dashboard/content-type.d.ts +0 -2
  863. package/dist/widget-types/src/dashboard/dashboard.d.ts +0 -37
  864. package/dist/widget-types/src/dashboard/discord-webhook.d.ts +0 -16
  865. package/dist/widget-types/src/dashboard/docs.d.ts +0 -38
  866. package/dist/widget-types/src/dashboard/file-diff.d.ts +0 -66
  867. package/dist/widget-types/src/dashboard/file-read.d.ts +0 -41
  868. package/dist/widget-types/src/dashboard/file-status.d.ts +0 -20
  869. package/dist/widget-types/src/dashboard/gh.d.ts +0 -130
  870. package/dist/widget-types/src/dashboard/git-status.d.ts +0 -32
  871. package/dist/widget-types/src/dashboard/github.d.ts +0 -10
  872. package/dist/widget-types/src/dashboard/http.d.ts +0 -28
  873. package/dist/widget-types/src/dashboard/interventions.d.ts +0 -66
  874. package/dist/widget-types/src/dashboard/keys.d.ts +0 -30
  875. package/dist/widget-types/src/dashboard/models.d.ts +0 -24
  876. package/dist/widget-types/src/dashboard/open-in-app.d.ts +0 -42
  877. package/dist/widget-types/src/dashboard/open-questions.d.ts +0 -52
  878. package/dist/widget-types/src/dashboard/overview.d.ts +0 -77
  879. package/dist/widget-types/src/dashboard/projects.d.ts +0 -89
  880. package/dist/widget-types/src/dashboard/pull-requests.d.ts +0 -126
  881. package/dist/widget-types/src/dashboard/queue.d.ts +0 -16
  882. package/dist/widget-types/src/dashboard/quota.d.ts +0 -59
  883. package/dist/widget-types/src/dashboard/remote-run.d.ts +0 -94
  884. package/dist/widget-types/src/dashboard/rpc-serve.d.ts +0 -102
  885. package/dist/widget-types/src/dashboard/run-inbox.d.ts +0 -30
  886. package/dist/widget-types/src/dashboard/scheduler-state.d.ts +0 -64
  887. package/dist/widget-types/src/dashboard/tickets.d.ts +0 -28
  888. package/dist/widget-types/src/dashboard/types.d.ts +0 -99
  889. package/dist/widget-types/src/dashboard/widget-serve.d.ts +0 -14
  890. package/dist/widget-types/src/dashboard-rpc/context.d.ts +0 -53
  891. package/dist/widget-types/src/dashboard-rpc/control.d.ts +0 -108
  892. package/dist/widget-types/src/dashboard-rpc/devices.d.ts +0 -8
  893. package/dist/widget-types/src/dashboard-rpc/events-tail.d.ts +0 -53
  894. package/dist/widget-types/src/dashboard-rpc/events.d.ts +0 -29
  895. package/dist/widget-types/src/dashboard-rpc/index.d.ts +0 -28
  896. package/dist/widget-types/src/dashboard-rpc/models.d.ts +0 -3
  897. package/dist/widget-types/src/dashboard-rpc/preferences.d.ts +0 -40
  898. package/dist/widget-types/src/dashboard-rpc/projects.d.ts +0 -54
  899. package/dist/widget-types/src/dashboard-rpc/quota.d.ts +0 -26
  900. package/dist/widget-types/src/dashboard-rpc/reads.d.ts +0 -227
  901. package/dist/widget-types/src/dashboard-rpc/relay-agent.d.ts +0 -8
  902. package/dist/widget-types/src/dashboard-rpc/stream-forward.d.ts +0 -16
  903. package/dist/widget-types/src/dashboard-rpc/widgets.d.ts +0 -32
  904. package/dist/widget-types/src/discord-credentials.d.ts +0 -79
  905. package/dist/widget-types/src/driver-names.d.ts +0 -21
  906. package/dist/widget-types/src/error-message.d.ts +0 -7
  907. package/dist/widget-types/src/event-stream.d.ts +0 -32
  908. package/dist/widget-types/src/events.d.ts +0 -235
  909. package/dist/widget-types/src/framework-dir.d.ts +0 -10
  910. package/dist/widget-types/src/framework-gitignore.d.ts +0 -11
  911. package/dist/widget-types/src/index.d.ts +0 -42
  912. package/dist/widget-types/src/jsonl-tail.d.ts +0 -54
  913. package/dist/widget-types/src/loopback-host.d.ts +0 -19
  914. package/dist/widget-types/src/node-fs.d.ts +0 -32
  915. package/dist/widget-types/src/open-choices.d.ts +0 -14
  916. package/dist/widget-types/src/pick-directory.d.ts +0 -29
  917. package/dist/widget-types/src/preference-defaults.d.ts +0 -53
  918. package/dist/widget-types/src/project-commands.d.ts +0 -23
  919. package/dist/widget-types/src/project-errors.d.ts +0 -43
  920. package/dist/widget-types/src/project-hooks.d.ts +0 -133
  921. package/dist/widget-types/src/project-presets.d.ts +0 -29
  922. package/dist/widget-types/src/project-widgets.d.ts +0 -45
  923. package/dist/widget-types/src/project.d.ts +0 -28
  924. package/dist/widget-types/src/quota-boundary.d.ts +0 -115
  925. package/dist/widget-types/src/quota-poller.d.ts +0 -82
  926. package/dist/widget-types/src/registry.d.ts +0 -210
  927. package/dist/widget-types/src/store/agent-checkout.d.ts +0 -46
  928. package/dist/widget-types/src/store/agent-store.d.ts +0 -237
  929. package/dist/widget-types/src/store/branches.d.ts +0 -133
  930. package/dist/widget-types/src/store/forge.d.ts +0 -109
  931. package/dist/widget-types/src/store/git-host.d.ts +0 -111
  932. package/dist/widget-types/src/store/index.d.ts +0 -9
  933. package/dist/widget-types/src/store/provided.d.ts +0 -16
  934. package/dist/widget-types/src/store/queue.d.ts +0 -45
  935. package/dist/widget-types/src/store/run-record.d.ts +0 -21
  936. package/dist/widget-types/src/store/runs.d.ts +0 -101
  937. package/dist/widget-types/src/store/tickets.d.ts +0 -72
  938. package/dist/widget-types/src/tickets.d.ts +0 -17
  939. package/dist/widget-types/src/worktrees.d.ts +0 -89
  940. package/dist/widget.css +0 -50
@@ -1,806 +0,0 @@
1
- import { join } from 'node:path';
2
- import { hostname } from 'node:os';
3
- import { nodeFs } from '../node-fs.js';
4
- /**
5
- * Persisted orchestration state (#211). The dashboard is a pure projection of the
6
- * {@link FrameworkEvent} stream, so persisting *is* durably logging that stream:
7
- * the stack rationale, the loop status, and the decisions ledger are all events
8
- * that already flow through it. We store the log append-only and rehydrate a
9
- * restarted dashboard by replaying it into a fresh stream — no separate state
10
- * model to keep in sync. Per the sync, we do **not** persist the agent's chat
11
- * transcript (Claude Code owns that); only our own orchestration events.
12
- */
13
- /**
14
- * The directory, under the workspace root, that holds the persisted run. Same
15
- * `.the-framework/` directory as the committed project log (#313): one dir holds
16
- * both the transient run state (events.jsonl / run.json / runs/) and the DB
17
- * (LOGS.md); a seeded `.the-framework/.gitignore` keeps the run state untracked.
18
- */
19
- export const FRAMEWORK_DIR = '.the-framework';
20
- /**
21
- * Per-run worktrees live under `<repo>/.the-framework/worktrees/` (#736). Kept out of git by
22
- * the install-time `.the-framework/.gitignore` (`*` rule, #313), so a worktree's checkout never
23
- * shows up as dirty in the parent. Declared here beside {@link FRAMEWORK_DIR} rather than in
24
- * `worktree.ts`, which imports from this module: {@link readLiveMetas} needs it to find the
25
- * runs living in those worktrees, and the other direction would be an import cycle.
26
- */
27
- export const WORKTREES_DIR = 'worktrees';
28
- /** The append-only event log: one {@link FrameworkEvent} per line (JSONL). */
29
- export const EVENTS_FILE = 'events.jsonl';
30
- /** A small snapshot for cheap status reads without replaying the whole log. */
31
- export const META_FILE = 'run.json';
32
- /**
33
- * Where finished runs are archived, so the dashboard can list a project's run
34
- * history (#303). The live run stays at `events.jsonl`/`run.json` (the daemon
35
- * tails it); on {@link RunStore.close} a copy lands here as `<id>.jsonl` +
36
- * `<id>.json`, giving the history sidebar a per-run log to replay.
37
- */
38
- export const RUNS_DIR = 'runs';
39
- /**
40
- * Where a project's finished runs are archived now (#1179): `.the-framework/<user>/sessions/`,
41
- * which the install-time ignore un-ignores so the history is committed and survives a
42
- * `git clean -fdx`. {@link RUNS_DIR} stays the transient location — a run worktree still archives
43
- * into its own throwaway checkout there, and it is where every run archived before this shipped
44
- * still lives, so both are read.
45
- *
46
- * The name lives here beside its sibling rather than in `sessions.ts`, which owns the per-user
47
- * naming: that module reads the store, so the constant travelling the other way would be a cycle.
48
- */
49
- export const SESSIONS_DIR = 'sessions';
50
- /** Filesystem-safe, lexicographically-sortable run id from an ISO start time. */
51
- export function runIdFromStartedAt(startedAt) {
52
- // ISO is fixed-width, so replacing the `:`/`.` separators keeps lexical order
53
- // in step with chronological order — the history list sorts by id alone.
54
- return startedAt.replace(/[:.]/g, '-');
55
- }
56
- /** A run id is path-safe: no separators or traversal, only our own charset. */
57
- export function isSafeRunId(id) {
58
- return /^[A-Za-z0-9_-]+$/.test(id);
59
- }
60
- /**
61
- * The inverse of {@link runIdFromStartedAt}, for a caller that has the id but not the meta
62
- * (#1251): the CLI's end-of-run handoff needs the start time to tell the run's own PR from a
63
- * predecessor's on the same branch name. Undefined for an id that is not one of ours.
64
- */
65
- export function startedAtFromRunId(id) {
66
- const match = /^(\d{4}-\d{2}-\d{2}T\d{2})-(\d{2})-(\d{2})-(\d{3})Z$/.exec(id);
67
- return match ? `${match[1]}:${match[2]}:${match[3]}.${match[4]}Z` : undefined;
68
- }
69
- /** Bumped when the on-disk shape changes, so a reader can detect an old file. */
70
- export const RUN_META_VERSION = 2;
71
- /**
72
- * Fold one event into the running {@link RunMeta}. Pure, so the same derivation
73
- * drives both a live append and reconstructing meta from a replayed log.
74
- */
75
- export function applyEventToMeta(meta, event, at) {
76
- const next = { ...meta, updatedAt: at };
77
- switch (event.kind) {
78
- case 'session':
79
- next.driver = event.driver;
80
- next.workspace = event.workspace;
81
- if (event.sessionLink)
82
- next.sessionLink = event.sessionLink;
83
- // Per-leg (#1438): a leg that recorded no model leaves it unknown rather than
84
- // inheriting the prior leg's — the agent may have resolved a different default.
85
- if (event.model)
86
- next.model = event.model;
87
- else
88
- delete next.model;
89
- break;
90
- case 'session-update':
91
- next.sessionId = event.sessionId;
92
- if (event.sessionLink)
93
- next.sessionLink = event.sessionLink;
94
- break;
95
- case 'session-name':
96
- next.sessionName = event.name;
97
- break;
98
- case 'ready-for-merge':
99
- next.readyForMerge = true;
100
- break;
101
- case 'choice':
102
- next.pendingChoice = { id: event.id, title: event.title };
103
- break;
104
- case 'choice-resolved':
105
- if (next.pendingChoice?.id === event.id)
106
- delete next.pendingChoice;
107
- break;
108
- case 'bootstrap': {
109
- const b = event.event;
110
- if (b.type === 'scope') {
111
- next.intent = b.intent;
112
- next.scope = b.scope;
113
- }
114
- else if (b.type === 'checklist') {
115
- next.passes = b.pass;
116
- }
117
- else if (b.type === 'done') {
118
- next.passes = b.result.passes;
119
- }
120
- break;
121
- }
122
- case 'browser-stream':
123
- next.browserStreamPort = event.port;
124
- break;
125
- case 'handoff-armed':
126
- next.handoff = { push: event.push, pr: event.pr, ...(event.merge !== undefined ? { merge: event.merge } : {}) };
127
- break;
128
- case 'handoff':
129
- next.handoffReport = event.outcome;
130
- if (event.outcome !== 'failed' && event.merge)
131
- next.mergeOutcome = event.merge.outcome;
132
- break;
133
- case 'ticket':
134
- next.ticket = event.path;
135
- break;
136
- case 'queue-entry':
137
- next.queueEntry = event.entry;
138
- break;
139
- case 'branch':
140
- next.branch = event.branch;
141
- break;
142
- case 'settled':
143
- next.settledAt = at;
144
- break;
145
- case 'bind':
146
- next.boundProjectId = event.projectId;
147
- break;
148
- case 'driver':
149
- // Any new turn means the agent is working again, so the run is no longer parked (#785).
150
- if (event.event.type === 'start')
151
- delete next.settledAt;
152
- break;
153
- case 'end':
154
- next.status = event.ok ? 'done' : event.stopped ? 'stopped' : 'failed';
155
- delete next.pendingChoice; // a finished run is not awaiting anything
156
- delete next.settledAt; // nor is it waiting on you
157
- // The bridge dies with the run, so a kept port would send the pane at whatever else
158
- // the OS handed that number next.
159
- delete next.browserStreamPort;
160
- break;
161
- default:
162
- break;
163
- }
164
- return next;
165
- }
166
- /** The seed meta a run starts from, before any event is folded in. */
167
- function freshMeta(startedAt, intent, owner, id, target, topic, kind) {
168
- return {
169
- version: RUN_META_VERSION,
170
- status: 'running',
171
- id: id && isSafeRunId(id) ? id : runIdFromStartedAt(startedAt),
172
- startedAt,
173
- updatedAt: startedAt,
174
- passes: 0,
175
- ...(owner ? { pid: owner.pid, host: owner.host } : {}),
176
- ...(intent ? { intent } : {}),
177
- // Only a non-local target travels; `local` is the default every reader already assumes.
178
- ...(target && target !== 'local' ? { target } : {}),
179
- // Only the topic flag travels; a project run is the default (absent).
180
- ...(topic ? { topic: true } : {}),
181
- ...(kind ? { kind } : {}),
182
- };
183
- }
184
- /**
185
- * Parse a JSONL event log. A blank or malformed trailing line (e.g. a crash
186
- * mid-write) stops the read rather than throwing, so a partial run still replays
187
- * everything up to the cut.
188
- */
189
- function parseEventLog(raw) {
190
- const events = [];
191
- for (const line of raw.split('\n')) {
192
- const trimmed = line.trim();
193
- if (!trimmed)
194
- continue;
195
- try {
196
- events.push(JSON.parse(trimmed));
197
- }
198
- catch {
199
- break; // a torn last line from an interrupted write; keep what we have
200
- }
201
- }
202
- return events;
203
- }
204
- /** Read + parse a persisted {@link RunMeta} file, or `undefined` if missing/unreadable. */
205
- async function readMetaFile(fs, path) {
206
- if (!(await fs.exists(path)))
207
- return undefined;
208
- try {
209
- return JSON.parse(await fs.read(path));
210
- }
211
- catch {
212
- return undefined;
213
- }
214
- }
215
- /** Write a {@link RunMeta} file. The one owner of the on-disk encoding, symmetric to
216
- * {@link readMetaFile} — every meta write in this module goes through it. */
217
- function writeMetaFile(fs, path, meta) {
218
- return fs.write(path, JSON.stringify(meta, null, 2) + '\n');
219
- }
220
- /**
221
- * The `end` event written on behalf of a run whose process died without reporting one (#1359):
222
- * a crash, a `kill -9`, or the empty-event-loop exit a parked gate used to cause. Every reader
223
- * of the stream — the dashboard's outcome pill, its choice rail, the meta fold — keys "over"
224
- * off a single `end` event, so a death that skipped it left the run's last question rendering
225
- * as answerable forever while its picks were read by nobody.
226
- */
227
- function orphanEndEvent() {
228
- return { kind: 'end', ok: false, stopped: true, detail: 'its process died without reporting an end' };
229
- }
230
- /**
231
- * Record a dead run's missing ending in place (#1359): append the surrogate `end` event to the
232
- * checkout's live log and fold it into the meta via {@link applyEventToMeta} — so the status
233
- * flips to `stopped` and a `pendingChoice` the run died holding expires exactly as a run-written
234
- * end would expire it. Best-effort on both writes: healing must never make a read throw.
235
- */
236
- async function recordOrphanEnd(fs, dir, meta) {
237
- const event = orphanEndEvent();
238
- await fs.append(join(dir, EVENTS_FILE), JSON.stringify(event) + '\n').catch(() => { });
239
- const ended = applyEventToMeta(meta, event, new Date().toISOString());
240
- await writeMetaFile(fs, join(dir, META_FILE), ended).catch(() => { });
241
- return ended;
242
- }
243
- /**
244
- * Flip the live run at `dir` to `stopped` and archive it, returning the stopped meta. The
245
- * shared tail of every self-heal: a `running` meta whose process is gone must both stop
246
- * showing as live and keep its history. The flip goes through {@link recordOrphanEnd}, so
247
- * the log gains the `end` event the dead process never wrote (#1359) before the archive
248
- * copies it. Best-effort on both writes — healing must never make a read throw.
249
- */
250
- async function stopAndArchiveLive(fs, dir, meta) {
251
- const stopped = await recordOrphanEnd(fs, dir, meta);
252
- await archivePriorRun(fs, dir).catch(() => { });
253
- return stopped;
254
- }
255
- /** Rebuild {@link RunMeta} from a full event log (used when resuming). */
256
- export function metaFromEvents(events, startedAt) {
257
- let meta = freshMeta(startedAt);
258
- for (const event of events)
259
- meta = applyEventToMeta(meta, event, startedAt);
260
- return meta;
261
- }
262
- /**
263
- * Durable, append-only store for a single run's orchestration events, plus a
264
- * derived {@link RunMeta} snapshot. Writes are serialized through one tail
265
- * promise so an append and its meta rewrite never interleave; {@link close}
266
- * flushes that queue before the process exits.
267
- */
268
- export class RunStore {
269
- fs;
270
- dir;
271
- clock;
272
- tail = Promise.resolve();
273
- meta;
274
- /**
275
- * The intent a continuation must keep (#762/#1467): a reopened run keeps its original label,
276
- * but a build continuation re-runs the bootstrap, whose `scope` event carries the resume
277
- * message and would relabel the row through {@link applyEventToMeta}'s normal refinement.
278
- * Unset for a fresh run, where the scope event's refinement stands.
279
- */
280
- pinnedIntent;
281
- constructor(fs, dir, clock, startMeta) {
282
- this.fs = fs;
283
- this.dir = dir;
284
- this.clock = clock;
285
- this.meta = startMeta;
286
- }
287
- /** The event log path. */
288
- get eventsPath() {
289
- return join(this.dir, EVENTS_FILE);
290
- }
291
- /** The meta snapshot path. */
292
- get metaPath() {
293
- return join(this.dir, META_FILE);
294
- }
295
- /**
296
- * Open (creating `.the-framework/` if needed) under the workspace `cwd`. `fresh`
297
- * truncates any prior log for a new run; the default preserves it so a resume
298
- * can {@link loadEvents}.
299
- */
300
- static async open(cwd, opts = {}) {
301
- const fs = opts.fs ?? nodeStoreFs();
302
- const dir = join(cwd, FRAMEWORK_DIR);
303
- const now = opts.now ?? new Date().toISOString();
304
- await fs.mkdir(dir);
305
- const owner = opts.owner ?? { pid: process.pid, host: hostname() };
306
- const clock = opts.clock ?? (() => new Date().toISOString());
307
- const store = new RunStore(fs, dir, clock, freshMeta(now, opts.intent, owner, opts.id, opts.target, opts.topic, opts.kind));
308
- if (opts.continueRun) {
309
- // Reopen: the log stays, the row keeps its original intent, and this process takes ownership
310
- // so a liveness probe (#716) reads the run as alive rather than as an orphan.
311
- const prior = await readMetaFile(fs, store.metaPath);
312
- if (prior) {
313
- store.meta = { ...prior, status: 'running', pid: owner.pid, host: owner.host, updatedAt: now };
314
- store.pinnedIntent = prior.intent;
315
- await store.writeMeta();
316
- return store;
317
- }
318
- }
319
- if (opts.fresh) {
320
- // A new run truncates the live log. First rescue the prior run if it never
321
- // got archived (e.g. a crash exited before close), so no history is lost.
322
- await archivePriorRun(fs, dir).catch(() => { });
323
- await fs.write(store.eventsPath, '');
324
- await store.writeMeta();
325
- }
326
- return store;
327
- }
328
- /**
329
- * Append one event to the log and refresh the meta snapshot. Fire-and-forget at
330
- * the call site: internally chained so writes stay ordered. A failed write is
331
- * swallowed (persistence is best-effort — it must never break a live run).
332
- */
333
- append(event) {
334
- this.meta = applyEventToMeta(this.meta, event, this.clock());
335
- // A continuation keeps the run's original label (#762) even through a re-entered
336
- // bootstrap's scope event, which carries the resume message rather than a name (#1467).
337
- if (this.pinnedIntent)
338
- this.meta = { ...this.meta, intent: this.pinnedIntent };
339
- this.tail = this.tail
340
- .then(() => this.fs.append(this.eventsPath, JSON.stringify(event) + '\n'))
341
- .then(() => this.writeMeta())
342
- .catch(err => {
343
- console.error('[framework] failed to persist orchestration state:', err);
344
- });
345
- return this.tail;
346
- }
347
- /**
348
- * Flush any queued writes, then archive this run into `runs/` so it shows up in
349
- * the dashboard's history (#303). Both best-effort: persistence must never break
350
- * a run, so an archive failure is logged, not thrown.
351
- */
352
- async close() {
353
- await this.tail;
354
- try {
355
- await archiveRun(this.fs, this.dir, this.meta, this.eventsPath);
356
- }
357
- catch (err) {
358
- console.error('[framework] failed to archive run history:', err);
359
- }
360
- }
361
- /** The current derived snapshot. */
362
- snapshot() {
363
- return { ...this.meta };
364
- }
365
- /**
366
- * Read and parse the persisted event log. A blank or malformed trailing line
367
- * (e.g. a crash mid-write) is skipped rather than throwing, so a partial run
368
- * still replays everything up to the cut. Missing file yields `[]`.
369
- */
370
- async loadEvents() {
371
- if (!(await this.fs.exists(this.eventsPath)))
372
- return [];
373
- return parseEventLog(await this.fs.read(this.eventsPath));
374
- }
375
- /** Read the persisted meta snapshot, or `undefined` if none/unreadable. */
376
- readMeta() {
377
- return readMetaFile(this.fs, this.metaPath);
378
- }
379
- writeMeta() {
380
- return writeMetaFile(this.fs, this.metaPath, this.meta);
381
- }
382
- }
383
- /**
384
- * The directory a run's archive lives in: this user's committed `sessions/` when a caller named
385
- * one (#1179), else the transient `runs/`. Callers pass a user only where the archive is meant to
386
- * be kept — the project's copy — never for the copy a run leaves inside its own worktree.
387
- */
388
- function archiveDir(dir, user) {
389
- return user ? join(dir, user, SESSIONS_DIR) : join(dir, RUNS_DIR);
390
- }
391
- /** Paths of a run's archived log + meta. */
392
- function archivePaths(dir, id, user) {
393
- const runs = archiveDir(dir, user);
394
- return { events: join(runs, `${id}.jsonl`), meta: join(runs, `${id}.json`) };
395
- }
396
- /**
397
- * Every directory a project's archived runs may sit in, newest scheme first: each user's
398
- * `<user>/sessions/`, then the legacy `runs/`.
399
- *
400
- * Both are read because both exist in the wild: `runs/` holds everything archived before #1179,
401
- * and a user directory is only created once that user has run something. Every user's sessions are
402
- * listed, not just the reader's — the history is a team-visible record of what the agent has done
403
- * to the repo, which is the point of committing it.
404
- *
405
- * A directory is recognized by having a readable `sessions/` child, so a stray file in
406
- * `.the-framework/` is simply not one (readdir yields `[]` for anything that is not a directory).
407
- */
408
- /**
409
- * Where one run's archive actually sits, searched across {@link archiveDirs}, or `undefined` when
410
- * it is nowhere. A run id alone no longer names a path: which user archived it decides that, and a
411
- * reader (the #762 continue, a removal) only has the id.
412
- */
413
- async function findArchive(fs, dir, runId) {
414
- for (const runsDir of await archiveDirs(fs, dir)) {
415
- const paths = { events: join(runsDir, `${runId}.jsonl`), meta: join(runsDir, `${runId}.json`) };
416
- if (await fs.exists(paths.meta))
417
- return paths;
418
- }
419
- return undefined;
420
- }
421
- async function archiveDirs(fs, dir) {
422
- const dirs = [];
423
- for (const name of await fs.readdir(dir)) {
424
- const candidate = join(dir, name, SESSIONS_DIR);
425
- if ((await fs.readdir(candidate)).length > 0)
426
- dirs.push(candidate);
427
- }
428
- dirs.push(join(dir, RUNS_DIR));
429
- return dirs;
430
- }
431
- /**
432
- * Copy a run's live log + meta into its archive as `<id>.jsonl` / `<id>.json`. The live files stay
433
- * put (the daemon keeps tailing them until the next run); this is a durable snapshot for the
434
- * history list. Idempotent per id. `user` files it under that user's committed sessions (#1179).
435
- */
436
- async function archiveRun(fs, dir, meta, eventsPath, user) {
437
- if (!isSafeRunId(meta.id))
438
- return;
439
- await fs.mkdir(archiveDir(dir, user));
440
- const out = archivePaths(dir, meta.id, user);
441
- const events = (await fs.exists(eventsPath)) ? await fs.read(eventsPath) : '';
442
- await fs.write(out.events, events);
443
- await writeMetaFile(fs, out.meta, meta);
444
- }
445
- /**
446
- * Archive the run currently sitting in the live files, unless it is already in
447
- * `runs/`. Used at the start of a fresh run so a crash that skipped
448
- * {@link RunStore.close} still leaves its history behind.
449
- */
450
- async function archivePriorRun(fs, dir) {
451
- const meta = await readMetaFile(fs, join(dir, META_FILE));
452
- if (!meta?.id || !isSafeRunId(meta.id))
453
- return;
454
- if (await fs.exists(archivePaths(dir, meta.id).meta))
455
- return;
456
- await archiveRun(fs, dir, meta, join(dir, EVENTS_FILE));
457
- }
458
- /**
459
- * Put an archived run's history back where a run reads it (#762), so a continued run picks up its
460
- * own log rather than starting empty. The inverse of {@link archiveWorktreeRun}: teardown moved the
461
- * history to the repo, and continuing needs it in the checkout again.
462
- *
463
- * A no-op when the worktree already holds a live run (nothing to restore, and its log is newer),
464
- * or when there is no archive. Never throws.
465
- */
466
- export async function restoreArchivedRun(repo, worktree, runId, fs = nodeStoreFs()) {
467
- try {
468
- if (!isSafeRunId(runId))
469
- return false;
470
- const dir = join(worktree, FRAMEWORK_DIR);
471
- if (await fs.exists(join(dir, META_FILE)))
472
- return false;
473
- const archive = await findArchive(fs, join(repo, FRAMEWORK_DIR), runId);
474
- if (!archive)
475
- return false;
476
- await fs.mkdir(dir);
477
- await fs.write(join(dir, EVENTS_FILE), (await fs.exists(archive.events)) ? await fs.read(archive.events) : '');
478
- await fs.write(join(dir, META_FILE), await fs.read(archive.meta));
479
- return true;
480
- }
481
- catch {
482
- return false;
483
- }
484
- }
485
- /**
486
- * The run ids that have a worktree directory under `.the-framework/worktrees/` (#737). Names
487
- * only, from the filesystem: a directory here IS a run's checkout, and its name is the run id.
488
- * Forgiving — a project that never ran concurrently has no such dir and yields `[]`.
489
- */
490
- export async function listWorktreeDirs(cwd, fs = nodeStoreFs()) {
491
- const names = await fs.readdir(join(cwd, FRAMEWORK_DIR, WORKTREES_DIR)).catch(() => []);
492
- return names.filter(isSafeRunId);
493
- }
494
- /**
495
- * Archive a worktree run's history into the *main repo* (#737), returning the meta it archived.
496
- *
497
- * A run writes its `run.json` / `events.jsonl` inside its own worktree (#736), so deleting that
498
- * worktree would delete the run's history with it. This copies it into the repo, which is the one
499
- * place the dashboard's history reads from, so teardown becomes safe.
500
- *
501
- * `user` files the copy under that user's committed `sessions/` (#1179) instead of the transient
502
- * `runs/`. It is this copy, not the one the run left in its own worktree, that is meant to last:
503
- * every run in a git repo gets a worktree, so this is the only archive of it that outlives the
504
- * checkout, and committing it is what makes the history survive `git clean -fdx`. The worktree's
505
- * own copy deliberately stays untracked — it would otherwise be committed onto the run's branch as
506
- * well and collide with this one on merge.
507
- *
508
- * A meta still marked `running` is flipped to `stopped` first: this runs when the process is
509
- * already gone, so `running` means it died without closing (crash, kill -9), exactly the case
510
- * {@link reconcileOrphanedRuns} handles for the project path. Idempotent per id, and forgiving:
511
- * a worktree with no run, or an unreadable one, yields `undefined` rather than throwing.
512
- */
513
- export async function archiveWorktreeRun(worktree, repo, fs = nodeStoreFs(), branch, user) {
514
- try {
515
- const worktreeDir = join(worktree, FRAMEWORK_DIR);
516
- const live = await readMetaFile(fs, join(worktreeDir, META_FILE));
517
- if (!live?.id || !isSafeRunId(live.id))
518
- return undefined;
519
- // The flip writes the worktree's own log + meta too (#1359): the death gains its `end`
520
- // event before the archive copies the log, so no reader — live tail or archived replay —
521
- // is left holding an open gate for a dead run.
522
- const stopped = live.status === 'running' ? await recordOrphanEnd(fs, worktreeDir, live) : live;
523
- // The branch is read from the checkout by the caller and stamped here, because this is the
524
- // last moment it can be observed: the worktree is about to go (#799).
525
- const meta = branch ? { ...stopped, branch } : stopped;
526
- await archiveRun(fs, join(repo, FRAMEWORK_DIR), meta, join(worktreeDir, EVENTS_FILE), user);
527
- return meta;
528
- }
529
- catch {
530
- return undefined;
531
- }
532
- }
533
- /**
534
- * The archived log + meta paths of one run, wherever it is filed, or `[]` when it is nowhere.
535
- * Exported so a caller that deletes a session (the dashboard's Remove) does not have to know which
536
- * user archived it — before #1179 the path was derivable from the id alone, and now it is not.
537
- */
538
- export async function archivedRunPaths(cwd, runId, fs = nodeStoreFs()) {
539
- if (!isSafeRunId(runId))
540
- return [];
541
- const archive = await findArchive(fs, join(cwd, FRAMEWORK_DIR), runId).catch(() => undefined);
542
- return archive ? [archive.meta, archive.events] : [];
543
- }
544
- /** Newest run first: an id sorts chronologically, so the id order IS the time order (no parse). */
545
- const byIdDesc = (a, b) => (a.id < b.id ? 1 : a.id > b.id ? -1 : 0);
546
- /**
547
- * Every `runs/*.json` archived meta with the path it was read from, torn/half-written entries
548
- * skipped. The one home of the archived-history read loop, shared by {@link listRuns} and the
549
- * boot reconcile. A missing/unreadable dir throws to the caller, as both callers always let it.
550
- */
551
- async function readArchivedMetaEntries(fs, runsDir) {
552
- const entries = [];
553
- for (const name of await fs.readdir(runsDir)) {
554
- if (!name.endsWith('.json'))
555
- continue;
556
- const path = join(runsDir, name);
557
- try {
558
- entries.push({ path, meta: JSON.parse(await fs.read(path)) });
559
- }
560
- catch {
561
- // torn/half-written meta — skip it
562
- }
563
- }
564
- return entries;
565
- }
566
- /**
567
- * A `running` meta whose owning process is provably gone (or unknowable on boot): the orphan
568
- * {@link reconcileOrphanedRuns} flips to `stopped`. A live pid on this host, or a non-running
569
- * meta, is left be. The narrowing lets a caller use the meta as present in the true branch.
570
- */
571
- function isDeadRunning(meta, isAlive) {
572
- return meta?.status === 'running' && ownerLiveness(meta, isAlive) !== 'live';
573
- }
574
- /**
575
- * Every archived meta a project has, across all of {@link archiveDirs}, with the path it came from.
576
- * De-duplicated by run id, first directory winning: a run archived before #1179 and re-archived
577
- * into its user's sessions afterwards exists in both places, and the history must show it once.
578
- * The user directories are searched before `runs/`, so the committed copy is the one that wins.
579
- */
580
- async function readAllArchivedMetaEntries(fs, dir) {
581
- const seen = new Set();
582
- const entries = [];
583
- for (const runsDir of await archiveDirs(fs, dir)) {
584
- for (const entry of await readArchivedMetaEntries(fs, runsDir).catch(() => [])) {
585
- if (seen.has(entry.meta.id))
586
- continue;
587
- seen.add(entry.meta.id);
588
- entries.push(entry);
589
- }
590
- }
591
- return entries;
592
- }
593
- /**
594
- * List a project's archived runs, most-recent first: every user's committed `sessions/` plus the
595
- * legacy `runs/`. The id sorts chronologically so no timestamp parse is needed. Missing or
596
- * unreadable dir/entries are skipped, never thrown.
597
- */
598
- export async function listRuns(cwd, fs = nodeStoreFs()) {
599
- const entries = await readAllArchivedMetaEntries(fs, join(cwd, FRAMEWORK_DIR));
600
- return entries.map(entry => entry.meta).sort(byIdDesc);
601
- }
602
- /**
603
- * Whether a `running` meta's owning process is provably there, provably gone, or unknowable.
604
- *
605
- * `'unknown'` is the load-bearing third state (#716/#926): a meta with no `pid` (it predates the
606
- * field) or one owned by another host cannot be probed from here. The two callers treat it
607
- * differently on purpose — the boot reconcile flips an unknown to `stopped` (a fresh daemon
608
- * drives no in-flight run, and there is nothing better to go on), while the self-heal on read
609
- * leaves it alone (a routine read must not kill a run another machine may own).
610
- */
611
- function ownerLiveness(meta, isAlive) {
612
- if (meta.status !== 'running' || meta.pid === undefined || meta.host !== hostname())
613
- return 'unknown';
614
- return isAlive(meta.pid) ? 'live' : 'dead';
615
- }
616
- /**
617
- * Reconcile runs a dead process left marked `running` — the live `run.json`, an archived
618
- * `runs/*.json`, or a run inside a worktree. Such a run shows as active while nothing is left
619
- * to read its `control.jsonl`, so its Stop is a no-op. Each is flipped to `stopped`; the live
620
- * run is archived first (idempotent) so its history is kept. Returns how many were reconciled.
621
- * Best-effort: a read/write error skips that run, never throws.
622
- *
623
- * A run whose pid is alive on this host is left alone (#926). This used to flip every `running`
624
- * meta on the assumption that a fresh daemon drives no in-flight run, which holds only while
625
- * exactly one daemon ever boots: a second one (and before #922, every failed `framework --daemon`
626
- * spawned one) marked genuinely live runs as finished, giving them a no-op Stop in the dashboard.
627
- * A meta with no `pid` keeps the old behaviour, since there is nothing better to go on.
628
- */
629
- export async function reconcileOrphanedRuns(cwd, fs = nodeStoreFs(), isAlive = isPidAlive) {
630
- const dir = join(cwd, FRAMEWORK_DIR);
631
- let fixed = 0;
632
- // Archived runs stuck at `running` (e.g. a prior live run the next run never rescued), wherever
633
- // they are archived. Done before the live run so its fresh archive isn't re-counted here.
634
- for (const { path, meta } of await readAllArchivedMetaEntries(fs, dir)) {
635
- if (!isDeadRunning(meta, isAlive))
636
- continue;
637
- try {
638
- // The archived pair sits side by side (`<id>.json` + `<id>.jsonl`), so the surrogate end
639
- // (#1359) lands in both: the replayed log sees the run finish, and the meta fold drops
640
- // the pendingChoice the run died holding.
641
- const event = orphanEndEvent();
642
- await fs.append(path.replace(/\.json$/, '.jsonl'), JSON.stringify(event) + '\n').catch(() => { });
643
- await writeMetaFile(fs, path, applyEventToMeta(meta, event, new Date().toISOString()));
644
- fixed++;
645
- }
646
- catch {
647
- // write failed — best-effort, skip
648
- }
649
- }
650
- // The live run: flip it, then archive so a crash that skipped close() still
651
- // leaves the stopped run in the history list.
652
- const live = await readMetaFile(fs, join(dir, META_FILE));
653
- if (isDeadRunning(live, isAlive)) {
654
- await stopAndArchiveLive(fs, dir, live);
655
- fixed++;
656
- }
657
- // Runs living in worktrees (#736/#737). A daemon that died mid-run never ran its teardown, so
658
- // each of those runs is orphaned the same way — except its history sits inside the worktree,
659
- // where nothing reads it. Flip it in place (so the dashboard stops showing it as live) and copy
660
- // it into the repo's history. The worktree itself is left on disk: a run that ended this way did
661
- // not end cleanly, and those are kept for inspection. Removing one is an explicit action.
662
- for (const name of await fs.readdir(join(dir, WORKTREES_DIR))) {
663
- if (!isSafeRunId(name))
664
- continue;
665
- const worktreeDir = join(dir, WORKTREES_DIR, name, FRAMEWORK_DIR);
666
- const meta = await readMetaFile(fs, join(worktreeDir, META_FILE));
667
- if (!isDeadRunning(meta, isAlive))
668
- continue;
669
- // recordOrphanEnd rather than a bare status flip (#1359): the worktree's log gains the
670
- // `end` event first, so the archive below copies a stream that actually ends.
671
- await recordOrphanEnd(fs, worktreeDir, meta);
672
- await archiveWorktreeRun(join(dir, WORKTREES_DIR, name), cwd, fs).catch(() => undefined);
673
- fixed++;
674
- }
675
- return fixed;
676
- }
677
- /**
678
- * Whether `pid` is a live process on this host. `process.kill(pid, 0)` sends no signal but
679
- * throws `ESRCH` once the process is gone; `EPERM` means it exists under another user (still
680
- * alive). A pid on a *different* host is unknowable here, so callers guard on {@link RunMeta.host}
681
- * before trusting a result. A recycled pid (another process reusing a dead run's number) reads as
682
- * alive — an accepted, vanishingly rare miss on a single dev box.
683
- */
684
- export function isPidAlive(pid) {
685
- try {
686
- process.kill(pid, 0);
687
- return true;
688
- }
689
- catch (err) {
690
- return err.code === 'EPERM';
691
- }
692
- }
693
- /**
694
- * The live (in-progress) run's meta snapshot from `.the-framework/run.json`, or
695
- * `undefined` when none/unreadable. Unlike {@link listRuns} (which reads the
696
- * archived `runs/` copies written on close), this is the run the daemon is
697
- * tailing right now — so the dashboard can list it with a `running` status
698
- * before it finishes. Missing or torn file yields `undefined`, never throws.
699
- *
700
- * Self-heals a stale run on read (#716): if the meta says `running` but its owning process died
701
- * without writing `end` (a crash, `kill -9`, or the machine sleeping), nothing is left to consume
702
- * `control.jsonl` — so Stop is a no-op and the row is stuck. When the owning pid is gone on this
703
- * host, flip it to `stopped` and archive it, so the dashboard clears the row on the next poll
704
- * instead of only after a daemon restart's boot-time {@link reconcileOrphanedRuns}. A run whose
705
- * meta predates this field (no `pid`) is left untouched — the boot reconcile still catches it.
706
- */
707
- export async function readLiveMeta(cwd, fs = nodeStoreFs(), isAlive = isPidAlive) {
708
- const dir = join(cwd, FRAMEWORK_DIR);
709
- const meta = await readMetaFile(fs, join(dir, META_FILE));
710
- if (!meta)
711
- return undefined;
712
- // Only a provably dead owner heals here — 'unknown' (no pid / another host) is left alone.
713
- if (ownerLiveness(meta, isAlive) === 'dead')
714
- return stopAndArchiveLive(fs, dir, meta);
715
- return meta;
716
- }
717
- /**
718
- * Every live run of a project (#738): the list variant of {@link readLiveMeta}.
719
- *
720
- * A run started from the dashboard gets its own worktree (#736) and writes its `run.json`
721
- * inside it, so the project path alone no longer sees any of them. This looks in both places:
722
- * each `.the-framework/worktrees/*` checkout, and the repo root itself, which is where a
723
- * project that cannot be given a worktree (not a git repo) still runs and where every run
724
- * from before #736 lives.
725
- *
726
- * Each candidate goes through {@link readLiveMeta}, so a stale run self-heals exactly as it
727
- * did. Newest first, by id. Never throws: an unreadable worktree is skipped.
728
- */
729
- export async function readLiveMetas(cwd, fs = nodeStoreFs(), isAlive = isPidAlive) {
730
- const worktreesDir = join(cwd, FRAMEWORK_DIR, WORKTREES_DIR);
731
- const names = await fs.readdir(worktreesDir).catch(() => []);
732
- // isSafeRunId: the directory name is the run id, and anything else in there is not ours.
733
- const candidates = [cwd, ...names.filter(isSafeRunId).map(name => join(worktreesDir, name))];
734
- const runs = [];
735
- for (const candidate of candidates) {
736
- const meta = await readLiveMeta(candidate, fs, isAlive).catch(() => undefined);
737
- if (meta)
738
- runs.push({ ...meta, cwd: candidate });
739
- }
740
- return runs.sort(byIdDesc);
741
- }
742
- /**
743
- * Read one archived run's event log for replay. Returns `undefined` for an
744
- * unknown or unsafe id; a torn trailing line is dropped (same rule as the live
745
- * {@link RunStore.loadEvents}).
746
- */
747
- export async function loadRunEvents(cwd, id, fs = nodeStoreFs()) {
748
- if (!isSafeRunId(id))
749
- return undefined;
750
- const archive = await findArchive(fs, join(cwd, FRAMEWORK_DIR), id);
751
- if (!archive || !(await fs.exists(archive.events)))
752
- return undefined;
753
- return parseEventLog(await fs.read(archive.events));
754
- }
755
- /** A {@link StoreFs} backed by `node:fs/promises`. See {@link nodeFs}. */
756
- export function nodeStoreFs() {
757
- // Destructured rather than returned whole: the narrow interface is the contract,
758
- // so the object should not carry methods the store was never handed.
759
- const { read, write, append, exists, mkdir, readdir } = nodeFs();
760
- return { read, write, append, exists, mkdir, readdir };
761
- }
762
- /**
763
- * A project's runs: the live ones prepended to the archived history, newest-first. Forgiving —
764
- * a side that cannot be read simply contributes nothing.
765
- *
766
- * Live wins over archived (#768). The dedup used to drop the live copy, which was right while
767
- * "archived" meant "finished for good": a run was only ever copied into `runs/` on its way out.
768
- * Continuing a run (#762) breaks that — the run has an archived copy from its first leg AND is
769
- * live again — and keeping the archive showed a running run as finished.
770
- *
771
- * This composition, not its two halves, is what every caller actually wants; the store exporting
772
- * only the halves is why three separate modules each grew their own copy of it.
773
- */
774
- export async function readAllRuns(cwd, fs = nodeStoreFs()) {
775
- const [archived, live] = await Promise.all([
776
- listRuns(cwd, fs).catch(() => []),
777
- readLiveMetas(cwd, fs).catch(() => []),
778
- ]);
779
- return [...live, ...archived.filter(run => !live.some(l => l.id === run.id))];
780
- }
781
- /**
782
- * One run's meta by id, live copy winning over archived — {@link readAllRuns}'s rule for a
783
- * single row. The find-by-id shape the RPCs kept privately rebuilding, for the same reason
784
- * the list shape did: the store exported only the halves.
785
- */
786
- export async function findRun(cwd, runId, fs = nodeStoreFs()) {
787
- return (await readAllRuns(cwd, fs)).find(run => run.id === runId);
788
- }
789
- /**
790
- * Read a checkout's live event log (`.the-framework/events.jsonl`). Missing or unreadable
791
- * yields `[]`, and a torn trailing line is dropped — the same rule as
792
- * {@link RunStore.loadEvents}, exported so a reader outside the store (the Discord bot's gate
793
- * lookup) cannot keep a second parser with a drifted torn-line policy.
794
- */
795
- export async function readEventLog(cwd, fs = nodeStoreFs()) {
796
- const path = join(cwd, FRAMEWORK_DIR, EVENTS_FILE);
797
- try {
798
- if (!(await fs.exists(path)))
799
- return [];
800
- return parseEventLog(await fs.read(path));
801
- }
802
- catch {
803
- return [];
804
- }
805
- }
806
- //# sourceMappingURL=run-store.js.map