@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 +0,0 @@
1
- {"version":3,"file":"file-diff.d.ts","sourceRoot":"","sources":["../../src/dashboard/file-diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAkC,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7E,OAAO,EAAE,YAAY,EAAE,CAAA;AAUvB,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,aAAa,CAAA;IACrB,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAA;IAClB,4FAA4F;IAC5F,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,wFAAwF;AACxF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,aAAa,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,2FAA2F;IAC3F,MAAM,EAAE,OAAO,CAAA;CAChB;AAoCD;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EACrB,GAAG,GAAE,SAA2B,EAChC,KAAK,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACnC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CA4B1B;AAGD,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAUxD;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACvC,GAAG,GAAE,SAA2B,GAC/B,OAAO,CAAC,UAAU,EAAE,CAAC,CAqBvB"}
@@ -1,132 +0,0 @@
1
- import { nodeGitRunner } from '@gemstack/agent-data';
2
- import { cutToPreview, readConfinedFile, safeRepoPath } from './file-read.js';
3
- // `safeRepoPath` moved to file-read.js with #828, where the unchanged-file preview shares it.
4
- // Re-exported so this stays the import site it has been.
5
- export { safeRepoPath };
6
- /** Drop git's `diff --git` / `index` / `mode` preamble, keeping the `---`/`+++`/hunk body. */
7
- function hunksOnly(patch) {
8
- const lines = patch.split('\n');
9
- const start = lines.findIndex(line => line.startsWith('--- ') || line.startsWith('@@'));
10
- return (start === -1 ? [] : lines.slice(start)).join('\n').trimEnd();
11
- }
12
- /** Count the +/- lines of a unified patch, ignoring the `---`/`+++` file headers. */
13
- function countChanges(patch) {
14
- let added = 0;
15
- let removed = 0;
16
- let inHunk = false;
17
- for (const line of patch.split('\n')) {
18
- if (line.startsWith('@@')) {
19
- inHunk = true;
20
- continue;
21
- }
22
- // The file headers only ever precede the first hunk. Past it a line opening the same way is
23
- // content — a removed `---` separator reads `----`, a removed `-- comment` reads `--- comment`
24
- // — and skipping those undercounted the file's own stats.
25
- if (!inHunk && (line.startsWith('+++') || line.startsWith('---')))
26
- continue;
27
- if (line.startsWith('+'))
28
- added++;
29
- else if (line.startsWith('-'))
30
- removed++;
31
- }
32
- return { added, removed };
33
- }
34
- /** An untracked file has no blob to diff against, so render its contents as all-added. */
35
- function asAllAdded(text) {
36
- const lines = text.split('\n');
37
- if (lines[lines.length - 1] === '')
38
- lines.pop(); // a trailing newline is not a line
39
- return lines.map(line => `+${line}`).join('\n');
40
- }
41
- /**
42
- * The diff for one changed file in the checkout at `cwd`, or, given a `range`, between two
43
- * commits of the repository at `cwd` (a run's committed change, `agent-tree.ts`).
44
- *
45
- * Tracked files diff against `HEAD`, not the index, so a change the agent staged still shows;
46
- * that also matches `git status --porcelain`, which is what dotted the file in the first place.
47
- * An untracked file is rendered as all-added from its contents, since `git diff --no-index`
48
- * exits non-zero on a difference and would read as a failure here.
49
- *
50
- * Returns null when the path is unsafe, unreadable, or has no diff to show.
51
- */
52
- export async function readFileDiff(cwd, path, status, git = nodeGitRunner(), range) {
53
- if (!safeRepoPath(path))
54
- return null;
55
- if (!range && status === 'untracked') {
56
- const raw = await readConfinedFile(cwd, path);
57
- if (!raw)
58
- return null;
59
- if (raw.includes(0))
60
- return { path, status, patch: '', added: 0, removed: 0, truncated: false, binary: true };
61
- const all = asAllAdded(raw.toString('utf8'));
62
- const { body: patch, truncated } = cutToPreview(all);
63
- // Every line of an untracked file is an addition, so it is counted rather than parsed — and
64
- // counted over the whole file, not the cut preview: the Changes list reports the file's own
65
- // size, which a long new file used to report as exactly the preview limit.
66
- return { path, status, patch, added: all ? all.split('\n').length : 0, removed: 0, truncated, binary: false };
67
- }
68
- // `HEAD` is missing in a repo with no commits yet; the working-tree diff is the honest answer
69
- // there rather than an error.
70
- const raw = range
71
- ? await git(['diff', '--unified=3', range.from, range.to, '--', path], cwd).catch(() => '')
72
- : await git(['diff', '--unified=3', 'HEAD', '--', path], cwd)
73
- .catch(() => git(['diff', '--unified=3', '--', path], cwd))
74
- .catch(() => '');
75
- if (!raw.trim())
76
- return null;
77
- if (/^Binary files /m.test(raw))
78
- return { path, status, patch: '', added: 0, removed: 0, truncated: false, binary: true };
79
- const { body: patch, truncated } = cutToPreview(hunksOnly(raw));
80
- if (!patch)
81
- return null;
82
- return { path, status, patch, ...countChanges(patch), truncated, binary: false };
83
- }
84
- /**
85
- * Parse `git diff --numstat` output: `added<TAB>removed<TAB>path`, with `-` for both counts
86
- * on a binary file. The one parser for the grammar — it was written here and in run-handoff,
87
- * and the copies had already drifted on a path containing a tab (this side rejoined it, the
88
- * other dropped the line).
89
- */
90
- export function parseNumstat(out) {
91
- const entries = [];
92
- for (const line of out.split('\n')) {
93
- const [added, removed, ...rest] = line.split('\t');
94
- const path = rest.join('\t');
95
- if (!path || added === undefined || removed === undefined)
96
- continue;
97
- const binary = added === '-' || removed === '-';
98
- entries.push({ path, added: binary ? 0 : Number(added) || 0, removed: binary ? 0 : Number(removed) || 0, binary });
99
- }
100
- return entries;
101
- }
102
- /**
103
- * Every changed file in the checkout at `cwd`, with its line counts: the session's Changes list
104
- * (#817). One `git status` plus one `git diff --numstat`, not a diff per file, so a session that
105
- * touched forty files still costs two git calls.
106
- *
107
- * Untracked files have no numstat entry (they are not in the diff at all), so their added count
108
- * is their line count, read from disk. Sorted by path, so the list does not reshuffle as a live
109
- * session edits.
110
- */
111
- export async function readFileChanges(cwd, statuses, git = nodeGitRunner()) {
112
- const paths = Object.keys(statuses).filter(safeRepoPath);
113
- if (paths.length === 0)
114
- return [];
115
- const numstat = await git(['diff', '--numstat', 'HEAD'], cwd)
116
- .catch(() => git(['diff', '--numstat'], cwd))
117
- .catch(() => '');
118
- const counted = new Map(parseNumstat(numstat).map(entry => [entry.path, entry]));
119
- const changes = await Promise.all(paths.map(async (path) => {
120
- const status = statuses[path];
121
- const known = counted.get(path);
122
- if (known)
123
- return { ...known, status };
124
- if (status !== 'untracked')
125
- return { path, status, added: 0, removed: 0, binary: false };
126
- // An untracked file is not in any diff, so its whole content is the addition.
127
- const diff = await readFileDiff(cwd, path, status, git).catch(() => null);
128
- return { path, status, added: diff?.added ?? 0, removed: 0, binary: diff?.binary ?? false };
129
- }));
130
- return changes.sort((a, b) => a.path.localeCompare(b.path));
131
- }
132
- //# sourceMappingURL=file-diff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-diff.js","sourceRoot":"","sources":["../../src/dashboard/file-diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAA;AAEpE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7E,8FAA8F;AAC9F,yDAAyD;AACzD,OAAO,EAAE,YAAY,EAAE,CAAA;AAmCvB,8FAA8F;AAC9F,SAAS,SAAS,CAAC,KAAa;IAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;IACvF,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAA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K,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;IAEhF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAuB,EAAE;QAC5C,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAE,CAAA;QAC9B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAC/B,IAAI,KAAK;YAAE,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAA;QACtC,IAAI,MAAM,KAAK,WAAW;YAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;QACxF,8EAA8E;QAC9E,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;QACzE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,EAAE,CAAA;IAC7F,CAAC,CAAC,CACH,CAAA;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAC7D,CAAC"}
@@ -1,42 +0,0 @@
1
- /** Cap what a hover card renders, whether it is a patch or a file. */
2
- export declare const MAX_PREVIEW_LINES = 500;
3
- /** One unchanged file's contents for the tree's hover card (#828). */
4
- export interface FileContent {
5
- /** The repo-relative path asked for. */
6
- path: string;
7
- /** The file's text, cut at {@link MAX_PREVIEW_LINES}. Empty when binary. */
8
- text: string;
9
- /** The file was longer than the cap and was cut. */
10
- truncated: boolean;
11
- /** Not UTF-8 text, so there is nothing to render. */
12
- binary: boolean;
13
- }
14
- /**
15
- * Whether a client-supplied path may be read: repo-relative, no traversal, no absolute path, no
16
- * leading `-` (git would read it as a flag), and never into `.git` (config and credentials live
17
- * there). Rejecting is the whole contract; the caller resolves it against a checkout it chose.
18
- */
19
- export declare function safeRepoPath(path: string): boolean;
20
- /**
21
- * Read a repo-relative file from `cwd`, or null when it is unsafe, outside the checkout, or
22
- * unreadable.
23
- *
24
- * The confinement check is a `realpath` on both sides, not a string compare on the resolved path.
25
- * `resolve` does not follow symlinks, so `src/link.txt -> /etc/passwd` resolves to a path that sits
26
- * happily under `cwd` and passes a textual check while the read leaves the repo. `realpath` is what
27
- * makes the containment real; it also normalizes the platform's own links (macOS `/tmp`), which is
28
- * why `cwd` goes through it too rather than being compared raw.
29
- */
30
- export declare function readConfinedFile(cwd: string, path: string): Promise<Buffer | null>;
31
- /** Cut a body to {@link MAX_PREVIEW_LINES}, reporting whether anything was dropped. */
32
- export declare function cutToPreview(body: string): {
33
- body: string;
34
- truncated: boolean;
35
- };
36
- /**
37
- * One unchanged file's contents (#828). Null when the path is unsafe, outside the checkout, or
38
- * unreadable. A file git has not touched still reads from the resolved checkout, so a session's
39
- * hover shows its worktree's copy rather than the project root's (#815).
40
- */
41
- export declare function readFileContent(cwd: string, path: string): Promise<FileContent | null>;
42
- //# sourceMappingURL=file-read.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-read.d.ts","sourceRoot":"","sources":["../../src/dashboard/file-read.ts"],"names":[],"mappings":"AAIA,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,MAAM,EAAE,OAAO,CAAA;CAChB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CASlD;AAED;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAUxF;AAED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAI/E;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAM5F"}
@@ -1,69 +0,0 @@
1
- // Reading one file out of a checkout, for the panel's hover card: the diff of a changed file
2
- // (#816, file-diff.ts) and the contents of an unchanged one (#828). Both take a path from the
3
- // client, so the guard and the confined read live here, once, and every caller goes through them.
4
- /** Cap what a hover card renders, whether it is a patch or a file. */
5
- export const MAX_PREVIEW_LINES = 500;
6
- /**
7
- * Whether a client-supplied path may be read: repo-relative, no traversal, no absolute path, no
8
- * leading `-` (git would read it as a flag), and never into `.git` (config and credentials live
9
- * there). Rejecting is the whole contract; the caller resolves it against a checkout it chose.
10
- */
11
- export function safeRepoPath(path) {
12
- if (!path || path.length > 1024 || path.includes('\0'))
13
- return false;
14
- if (path.startsWith('/') || path.startsWith('-') || /^[a-zA-Z]:/.test(path))
15
- return false;
16
- const parts = path.split(/[\\/]/);
17
- // Any `.git` segment, not just a leading one: a nested repo's `.git/config` holds credentials too.
18
- // Compared case-insensitively, because macOS and Windows are: there `.GIT/config` opens the very
19
- // file this refuses, and the path comes from the browser.
20
- if (parts.some(part => part.toLowerCase() === '.git'))
21
- return false;
22
- return parts.every(part => part !== '' && part !== '.' && part !== '..');
23
- }
24
- /**
25
- * Read a repo-relative file from `cwd`, or null when it is unsafe, outside the checkout, or
26
- * unreadable.
27
- *
28
- * The confinement check is a `realpath` on both sides, not a string compare on the resolved path.
29
- * `resolve` does not follow symlinks, so `src/link.txt -> /etc/passwd` resolves to a path that sits
30
- * happily under `cwd` and passes a textual check while the read leaves the repo. `realpath` is what
31
- * makes the containment real; it also normalizes the platform's own links (macOS `/tmp`), which is
32
- * why `cwd` goes through it too rather than being compared raw.
33
- */
34
- export async function readConfinedFile(cwd, path) {
35
- if (!safeRepoPath(path))
36
- return null;
37
- const { readFile, realpath } = await import('node:fs/promises');
38
- const { resolve, sep } = await import('node:path');
39
- const root = await realpath(resolve(cwd)).catch(() => null);
40
- if (!root)
41
- return null;
42
- // A missing file has no realpath, so this also answers "not there" before the read.
43
- const full = await realpath(resolve(cwd, path)).catch(() => null);
44
- if (!full || !full.startsWith(root + sep))
45
- return null;
46
- return readFile(full).catch(() => null);
47
- }
48
- /** Cut a body to {@link MAX_PREVIEW_LINES}, reporting whether anything was dropped. */
49
- export function cutToPreview(body) {
50
- const lines = body.split('\n');
51
- if (lines.length <= MAX_PREVIEW_LINES)
52
- return { body, truncated: false };
53
- return { body: lines.slice(0, MAX_PREVIEW_LINES).join('\n'), truncated: true };
54
- }
55
- /**
56
- * One unchanged file's contents (#828). Null when the path is unsafe, outside the checkout, or
57
- * unreadable. A file git has not touched still reads from the resolved checkout, so a session's
58
- * hover shows its worktree's copy rather than the project root's (#815).
59
- */
60
- export async function readFileContent(cwd, path) {
61
- const raw = await readConfinedFile(cwd, path);
62
- if (!raw)
63
- return null;
64
- if (raw.includes(0))
65
- return { path, text: '', truncated: false, binary: true };
66
- const { body, truncated } = cutToPreview(raw.toString('utf8').replace(/\n$/, ''));
67
- return { path, text: body, truncated, binary: false };
68
- }
69
- //# sourceMappingURL=file-read.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-read.js","sourceRoot":"","sources":["../../src/dash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AC9E,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA;IACjF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AACvD,CAAC"}
@@ -1,21 +0,0 @@
1
- import { type GitRunner } from '@gemstack/agent-data';
2
- /**
3
- * The tree's per-file git state. `added` is a file a commit created (a run's committed change,
4
- * `agent-tree.ts`); the working tree's status here never says it, a new file there is `untracked`.
5
- */
6
- export type FileGitStatus = 'untracked' | 'added' | 'modified' | 'deleted';
7
- /** One `git status --porcelain` line: the two status columns and the path they are about. */
8
- export interface PorcelainEntry {
9
- code: string;
10
- /** Repo-relative; a rename resolves to the new path. */
11
- path: string;
12
- }
13
- /** Parse `git status --porcelain` output. Shared with the handoff's pending-files read (#1173). */
14
- export declare function parsePorcelain(out: string): PorcelainEntry[];
15
- /**
16
- * Read each changed file's status from `git status --porcelain`, keyed by repo-relative path.
17
- * `??` is untracked, a `D` in either column is deleted, anything else (M/A/R/C…) reads as
18
- * modified. Renames map to the new path. Returns `{}` when the path is not a git repo.
19
- */
20
- export declare function readFileStatuses(cwd: string, git?: GitRunner): Promise<Record<string, FileGitStatus>>;
21
- //# sourceMappingURL=file-status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-status.d.ts","sourceRoot":"","sources":["../../src/dashboard/file-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAKpE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAO1E,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,EAAE,CAa5D;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAO5H"}
@@ -1,37 +0,0 @@
1
- import { nodeGitRunner } from '@gemstack/agent-data';
2
- /** Strip git's surrounding quotes from a path with special chars (basic; leaves escapes as-is). */
3
- function unquotePath(path) {
4
- return path.length >= 2 && path.startsWith('"') && path.endsWith('"') ? path.slice(1, -1) : path;
5
- }
6
- /** Parse `git status --porcelain` output. Shared with the handoff's pending-files read (#1173). */
7
- export function parsePorcelain(out) {
8
- const entries = [];
9
- for (const line of out.split('\n')) {
10
- if (line.length < 4)
11
- continue;
12
- const code = line.slice(0, 2);
13
- let path = line.slice(3);
14
- const arrow = path.indexOf(' -> ');
15
- if (arrow !== -1)
16
- path = path.slice(arrow + 4); // a rename: the new path is the one that exists
17
- path = unquotePath(path);
18
- if (!path)
19
- continue;
20
- entries.push({ code, path });
21
- }
22
- return entries;
23
- }
24
- /**
25
- * Read each changed file's status from `git status --porcelain`, keyed by repo-relative path.
26
- * `??` is untracked, a `D` in either column is deleted, anything else (M/A/R/C…) reads as
27
- * modified. Renames map to the new path. Returns `{}` when the path is not a git repo.
28
- */
29
- export async function readFileStatuses(cwd, git = nodeGitRunner()) {
30
- const out = await git(['status', '--porcelain'], cwd).catch(() => '');
31
- const map = {};
32
- for (const { code, path } of parsePorcelain(out)) {
33
- map[path] = code === '??' ? 'untracked' : code.includes('D') ? 'deleted' : 'modified';
34
- }
35
- return map;
36
- }
37
- //# sourceMappingURL=file-status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-status.js","sourceRoot":"","sources":["../../src/dashboard/file-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,a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,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;IACrE,MAAM,GAAG,GAAkC,EAAE,CAAA;IAC7C,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAA;IACvF,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -1,131 +0,0 @@
1
- import { type CliRunner } from '../cli-exec.js';
2
- import { type Cached } from './cache.js';
3
- /**
4
- * The `gh` CLI, in one place: the JSON reads the dashboard makes of pull requests. Reads only:
5
- * pushing, opening and merging are the project's branches provider's (`../store/branches.ts`).
6
- *
7
- * There were four separate `gh` adapters across three modules. Three were reads that each
8
- * hand-rolled `execFile` + `JSON.parse` + a swallowed failure and each spelled the 8s timeout
9
- * again, and two of those differed only in whether a branch positional was passed.
10
- */
11
- /** Runs `gh`, resolving stdout and rejecting with the CLI's own stderr on failure. */
12
- export type GhRunner = CliRunner;
13
- /** A forgiving `gh --json` read: resolves `empty` when gh is missing/unauthed, or its output is not JSON. */
14
- export declare function ghJson<T>(args: string[], cwd: string, empty: T, gh?: GhRunner): Promise<T>;
15
- /** The PR opened for a branch, when there is one. */
16
- export interface LinkedPr {
17
- number: number;
18
- url: string;
19
- /** OPEN / MERGED / CLOSED (as gh reports it). */
20
- state: string;
21
- title: string;
22
- /** ISO creation time, when the read included it: what tells one agent's PR from a predecessor's. */
23
- createdAt?: string;
24
- /**
25
- * The head commit the PR covers, when the read included it (#1512): what tells "the branch's
26
- * PR already landed everything" from "the session kept working after its PR merged".
27
- */
28
- headRefOid?: string;
29
- }
30
- /**
31
- * A best-effort PR lookup, for a named branch or for the checkout's current branch. One type for
32
- * both: the named-branch form is the general one, and "the current branch" is just omitting it.
33
- */
34
- export type PrLookup = (cwd: string, branch?: string) => Promise<LinkedPr | undefined>;
35
- /**
36
- * The branch-addressed form, for a caller that always names one (#799): a finished session's
37
- * worktree may be gone, so "the current branch" would silently be the project's, not the
38
- * session's. Narrower than {@link PrLookup} on purpose, so that invariant is in the type.
39
- */
40
- export type BranchPrLookup = (cwd: string, branch: string) => Promise<LinkedPr | undefined>;
41
- /**
42
- * The PR for `branch`, or for whatever branch `cwd` is on when none is named. Resolves undefined
43
- * when gh is missing/unauthed or there is no PR.
44
- *
45
- * The named-branch form is what a finished session needs (#799): its worktree may be gone, so the
46
- * checkout's current branch is the project's, not the session's. The fields are copied out rather
47
- * than passed through, so a future `--json` addition cannot leak into what callers store.
48
- *
49
- * Every optional field {@link LinkedPr} declares must be both asked for and copied out here, or it
50
- * is silently absent for every caller of this path. `createdAt` was once neither, and it is what
51
- * tells an agent's own PR from a predecessor's on the same branch name ({@link pickAgentPr}).
52
- */
53
- export declare function ghPrView(cwd: string, branch?: string, gh?: GhRunner): Promise<LinkedPr | undefined>;
54
- /**
55
- * The cached form of {@link ghPrView} (#1028), and what the dashboard's panels use.
56
- *
57
- * A PR lookup costs about 600ms where the git reads beside it cost ten, and the answer changes
58
- * about as often as someone opens a PR. Cached per checkout and branch, shared between the
59
- * worktree bar and the handoff summary, and refreshed behind whoever asks. `pending` says the
60
- * answer is not known yet rather than that there is no PR — the difference matters to a caller
61
- * deciding whether to offer "Open PR".
62
- */
63
- export declare function cachedPrView(cwd: string, branch?: string): Promise<Cached<LinkedPr | undefined>>;
64
- /** Forget a branch's PR, after an action that changes whether it has one. */
65
- export declare function forgetPr(cwd: string, branch?: string): void;
66
- /**
67
- * Every PR a branch name has ever had, newest first (#1251).
68
- *
69
- * `gh pr view <branch>` answers with the newest PR for that head *in any state*, so a session
70
- * whose prompt pins its branch name (`the-framework/triage-quick`) inherits a predecessor's
71
- * merged PR as its own. The list form keeps the whole history so {@link pickAgentPr} can decide
72
- * which entry, if any, belongs to the agent asking. Resolves `[]` when gh is missing/unauthed —
73
- * indistinguishable from "no PRs", which is what every caller would do with a failure anyway.
74
- */
75
- export declare function ghPrsForBranch(cwd: string, branch: string): Promise<LinkedPr[]>;
76
- /**
77
- * {@link ghPrsForBranch} for a caller about to *open* a PR (#1601): a listing that fails throws
78
- * instead of reading as "no PRs", because "none" and "could not tell" must not look alike there —
79
- * the difference is a second draft PR on a branch that already has one.
80
- */
81
- export declare function ghPrsForBranchOrThrow(cwd: string, branch: string): Promise<LinkedPr[]>;
82
- /** The cached form of {@link ghPrsForBranch}, shared through the same read-through cache (#1028). */
83
- export declare function cachedPrsForBranch(cwd: string, branch: string): Promise<Cached<LinkedPr[]>>;
84
- /** Forget a branch's PR history, after an action that changes it (opening one). */
85
- export declare function forgetBranchPrs(cwd: string, branch: string): void;
86
- /**
87
- * The PR that belongs to an agent, out of every PR its branch name has had (#1251/#1255).
88
- *
89
- * An OPEN PR always counts: GitHub allows one open PR per head branch, so whatever is open on the
90
- * run's branch is where its pushed commits land. A closed one counts only when it was created
91
- * after the agent started (`since`, the agent's `startedAt`) — the oldest such entry, which is the one
92
- * this agent's handoff opened. Anything older is a previous agent's PR wearing the same branch name,
93
- * which is exactly what showed a merged two-day-old PR as a fresh session's own. Without `since`
94
- * only an open PR is trusted.
95
- *
96
- * `order` exists for the one caller asking a different question (#1512). `'first'` answers
97
- * identity — which PR did *this agent* open, so a later agent's must not be the answer. `'latest'`
98
- * answers the handoff decision — which PR last saw the branch, so "did the session keep working
99
- * past it" is readable off that PR's `headRefOid`; there the oldest entry would call work that a
100
- * second PR already landed unlanded.
101
- */
102
- export declare function pickAgentPr(prs: LinkedPr[], since?: string, order?: 'first' | 'latest'): LinkedPr | undefined;
103
- /** An open PR on the interventions queue (#632). */
104
- export interface OpenPr {
105
- number: number;
106
- title: string;
107
- url: string;
108
- /**
109
- * Draft PRs are generally left off the queue: a draft is not asking for review.
110
- *
111
- * The exception is a draft the framework opened for itself (#1102), which {@link headRefName}
112
- * is what tells apart.
113
- */
114
- isDraft: boolean;
115
- /** The branch the PR is from, so a session's own PR can be recognised as ours (#1102). */
116
- headRefName?: string;
117
- createdAt?: string;
118
- }
119
- /**
120
- * A checkout's open PRs. Unlike the other reads here it *rejects* when gh could not answer — no
121
- * remote, not authenticated, GitHub unreachable — instead of resolving `[]`.
122
- *
123
- * "No PRs are open" and "I could not look" are different answers, and its caller keeps a baseline
124
- * of what it has already announced (#1623): taking the second for the first makes the next
125
- * successful read announce every already-open PR as new. The caller decides what a failure costs;
126
- * it cannot decide what it never hears about.
127
- */
128
- export declare function ghPrList(cwd: string, gh?: GhRunner): Promise<OpenPr[]>;
129
- /** Lists a checkout's open PRs; rejects when there is no remote / gh is unavailable. */
130
- export type PrLister = (cwd: string) => Promise<OpenPr[]>;
131
- //# sourceMappingURL=gh.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gh.d.ts","sourceRoot":"","sources":["../../src/dashboard/gh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAA0B,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAEhE;;;;;;;GAOG;AAEH,sFAAsF;AACtF,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAA;AAQhC,6GAA6G;AAC7G,wBAAsB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,GAAE,QAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,CAMxG;AAED,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,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AE,CAAC,CAAC,CAEjG;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAEjE;AASD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,OAAO,GAAG,QAAkB,GAAG,QAAQ,GAAG,SAAS,CAQtH;AAED,oDAAoD;AACpD,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAE,QAAiB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAIpF;AAED,wFAAwF;AACxF,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA"}
@@ -1,150 +0,0 @@
1
- import { cliRunner } from '../cli-exec.js';
2
- import { cachedRead, invalidate } from './cache.js';
3
- /**
4
- * Reads are capped short and never surface an error: every caller is a panel that renders
5
- * whatever it got, and "gh is not installed" must cost a page load nothing.
6
- */
7
- const readGh = cliRunner({ bin: 'gh', timeoutMs: 8_000 });
8
- /** A forgiving `gh --json` read: resolves `empty` when gh is missing/unauthed, or its output is not JSON. */
9
- export async function ghJson(args, cwd, empty, gh = readGh) {
10
- try {
11
- return JSON.parse(await gh(args, cwd));
12
- }
13
- catch {
14
- return empty;
15
- }
16
- }
17
- const PR_VIEW_FIELDS = 'number,url,state,title,createdAt,headRefOid';
18
- /**
19
- * The PR for `branch`, or for whatever branch `cwd` is on when none is named. Resolves undefined
20
- * when gh is missing/unauthed or there is no PR.
21
- *
22
- * The named-branch form is what a finished session needs (#799): its worktree may be gone, so the
23
- * checkout's current branch is the project's, not the session's. The fields are copied out rather
24
- * than passed through, so a future `--json` addition cannot leak into what callers store.
25
- *
26
- * Every optional field {@link LinkedPr} declares must be both asked for and copied out here, or it
27
- * is silently absent for every caller of this path. `createdAt` was once neither, and it is what
28
- * tells an agent's own PR from a predecessor's on the same branch name ({@link pickAgentPr}).
29
- */
30
- export async function ghPrView(cwd, branch, gh = readGh) {
31
- const args = ['pr', 'view', ...(branch ? [branch] : []), '--json', PR_VIEW_FIELDS];
32
- const pr = await ghJson(args, cwd, undefined, gh);
33
- return pr
34
- ? {
35
- number: pr.number,
36
- url: pr.url,
37
- state: pr.state,
38
- title: pr.title,
39
- ...(pr.createdAt ? { createdAt: pr.createdAt } : {}),
40
- ...(pr.headRefOid ? { headRefOid: pr.headRefOid } : {}),
41
- }
42
- : undefined;
43
- }
44
- /**
45
- * The cached form of {@link ghPrView} (#1028), and what the dashboard's panels use.
46
- *
47
- * A PR lookup costs about 600ms where the git reads beside it cost ten, and the answer changes
48
- * about as often as someone opens a PR. Cached per checkout and branch, shared between the
49
- * worktree bar and the handoff summary, and refreshed behind whoever asks. `pending` says the
50
- * answer is not known yet rather than that there is no PR — the difference matters to a caller
51
- * deciding whether to offer "Open PR".
52
- */
53
- export async function cachedPrView(cwd, branch) {
54
- return cachedRead(prCacheKey(cwd, branch), () => ghPrView(cwd, branch));
55
- }
56
- /** Forget a branch's PR, after an action that changes whether it has one. */
57
- export function forgetPr(cwd, branch) {
58
- invalidate(prCacheKey(cwd, branch));
59
- }
60
- function prCacheKey(cwd, branch) {
61
- return `pr\u0000${cwd}\u0000${branch ?? ''}`;
62
- }
63
- /**
64
- * Every PR a branch name has ever had, newest first (#1251).
65
- *
66
- * `gh pr view <branch>` answers with the newest PR for that head *in any state*, so a session
67
- * whose prompt pins its branch name (`the-framework/triage-quick`) inherits a predecessor's
68
- * merged PR as its own. The list form keeps the whole history so {@link pickAgentPr} can decide
69
- * which entry, if any, belongs to the agent asking. Resolves `[]` when gh is missing/unauthed —
70
- * indistinguishable from "no PRs", which is what every caller would do with a failure anyway.
71
- */
72
- export async function ghPrsForBranch(cwd, branch) {
73
- return linkedPrs(await ghJson(prListArgs(branch), cwd, []));
74
- }
75
- /**
76
- * {@link ghPrsForBranch} for a caller about to *open* a PR (#1601): a listing that fails throws
77
- * instead of reading as "no PRs", because "none" and "could not tell" must not look alike there —
78
- * the difference is a second draft PR on a branch that already has one.
79
- */
80
- export async function ghPrsForBranchOrThrow(cwd, branch) {
81
- return linkedPrs(JSON.parse(await readGh(prListArgs(branch), cwd)));
82
- }
83
- function prListArgs(branch) {
84
- return ['pr', 'list', '--head', branch, '--state', 'all', '--limit', '20', '--json', 'number,url,state,title,createdAt,headRefOid'];
85
- }
86
- function linkedPrs(prs) {
87
- return prs.map(pr => ({
88
- number: pr.number,
89
- url: pr.url,
90
- state: pr.state,
91
- title: pr.title,
92
- ...(pr.createdAt ? { createdAt: pr.createdAt } : {}),
93
- ...(pr.headRefOid ? { headRefOid: pr.headRefOid } : {}),
94
- }));
95
- }
96
- /** The cached form of {@link ghPrsForBranch}, shared through the same read-through cache (#1028). */
97
- export async function cachedPrsForBranch(cwd, branch) {
98
- return cachedRead(branchPrsCacheKey(cwd, branch), () => ghPrsForBranch(cwd, branch));
99
- }
100
- /** Forget a branch's PR history, after an action that changes it (opening one). */
101
- export function forgetBranchPrs(cwd, branch) {
102
- invalidate(branchPrsCacheKey(cwd, branch));
103
- }
104
- /** Same unprintable separator idea as `prCacheKey`, spelled so paths cannot collide with it. */
105
- const KEY_SEP = String.fromCharCode(0);
106
- function branchPrsCacheKey(cwd, branch) {
107
- return ['prs', cwd, branch].join(KEY_SEP);
108
- }
109
- /**
110
- * The PR that belongs to an agent, out of every PR its branch name has had (#1251/#1255).
111
- *
112
- * An OPEN PR always counts: GitHub allows one open PR per head branch, so whatever is open on the
113
- * run's branch is where its pushed commits land. A closed one counts only when it was created
114
- * after the agent started (`since`, the agent's `startedAt`) — the oldest such entry, which is the one
115
- * this agent's handoff opened. Anything older is a previous agent's PR wearing the same branch name,
116
- * which is exactly what showed a merged two-day-old PR as a fresh session's own. Without `since`
117
- * only an open PR is trusted.
118
- *
119
- * `order` exists for the one caller asking a different question (#1512). `'first'` answers
120
- * identity — which PR did *this agent* open, so a later agent's must not be the answer. `'latest'`
121
- * answers the handoff decision — which PR last saw the branch, so "did the session keep working
122
- * past it" is readable off that PR's `headRefOid`; there the oldest entry would call work that a
123
- * second PR already landed unlanded.
124
- */
125
- export function pickAgentPr(prs, since, order = 'first') {
126
- const open = prs.find(pr => pr.state === 'OPEN');
127
- if (open)
128
- return open;
129
- if (!since)
130
- return undefined;
131
- const closed = prs
132
- .filter(pr => pr.createdAt && pr.createdAt >= since)
133
- .sort((a, b) => ((a.createdAt ?? '') < (b.createdAt ?? '') ? -1 : 1));
134
- return order === 'latest' ? closed.at(-1) : closed[0];
135
- }
136
- /**
137
- * A checkout's open PRs. Unlike the other reads here it *rejects* when gh could not answer — no
138
- * remote, not authenticated, GitHub unreachable — instead of resolving `[]`.
139
- *
140
- * "No PRs are open" and "I could not look" are different answers, and its caller keeps a baseline
141
- * of what it has already announced (#1623): taking the second for the first makes the next
142
- * successful read announce every already-open PR as new. The caller decides what a failure costs;
143
- * it cannot decide what it never hears about.
144
- */
145
- export async function ghPrList(cwd, gh = readGh) {
146
- const fields = 'number,title,url,isDraft,headRefName,createdAt';
147
- const args = ['pr', 'list', '--state', 'open', '--limit', '50', '--json', fields];
148
- return JSON.parse(await gh(args, cwd));
149
- }
150
- //# sourceMappingURL=gh.js.map