@openagt/dashboard 0.8.0 → 0.10.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 (965) hide show
  1. package/README.md +14 -17
  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 +45 -14
  8. package/dist/built-in.d.ts.map +1 -1
  9. package/dist/built-in.js +122 -27
  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 -10
  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/start-branch.d.ts +32 -0
  77. package/dist/dashboard/start-branch.d.ts.map +1 -0
  78. package/dist/dashboard/start-branch.js +47 -0
  79. package/dist/dashboard/start-branch.js.map +1 -0
  80. package/dist/dashboard/static.js +1 -1
  81. package/dist/dashboard/types.d.ts +29 -3
  82. package/dist/dashboard/types.d.ts.map +1 -1
  83. package/dist/dashboard/web-start-endpoints.d.ts +1 -1
  84. package/dist/dashboard/web-start-endpoints.d.ts.map +1 -1
  85. package/dist/dashboard/web-start-endpoints.js +1 -1
  86. package/dist/dashboard/web-start-endpoints.js.map +1 -1
  87. package/dist/dashboard-bundle/assets/main-Q7JMdMJI.css +2 -0
  88. package/dist/dashboard-bundle/assets/main-fDZWGOub.js +140 -0
  89. package/dist/dashboard-bundle/assets/{module-jASZmfSB.js → module-gKz-ZvkG.js} +4 -4
  90. package/dist/dashboard-bundle/host/module.js +1 -1
  91. package/dist/dashboard-bundle/index.html +6 -6
  92. package/dist/dashboard-rpc/context.d.ts +2 -0
  93. package/dist/dashboard-rpc/context.d.ts.map +1 -1
  94. package/dist/dashboard-rpc/context.js +4 -0
  95. package/dist/dashboard-rpc/context.js.map +1 -1
  96. package/dist/dashboard-rpc/control.d.ts +1 -1
  97. package/dist/dashboard-rpc/control.js +3 -3
  98. package/dist/dashboard-rpc/control.js.map +1 -1
  99. package/dist/dashboard-rpc/events.d.ts +3 -3
  100. package/dist/dashboard-rpc/index.d.ts +2 -1
  101. package/dist/dashboard-rpc/index.d.ts.map +1 -1
  102. package/dist/dashboard-rpc/index.js +4 -2
  103. package/dist/dashboard-rpc/index.js.map +1 -1
  104. package/dist/dashboard-rpc/modules.d.ts +8 -6
  105. package/dist/dashboard-rpc/modules.d.ts.map +1 -1
  106. package/dist/dashboard-rpc/modules.js +8 -6
  107. package/dist/dashboard-rpc/modules.js.map +1 -1
  108. package/dist/dashboard-rpc/preferences.d.ts +2 -2
  109. package/dist/dashboard-rpc/preferences.d.ts.map +1 -1
  110. package/dist/dashboard-rpc/preferences.js +2 -2
  111. package/dist/dashboard-rpc/preferences.js.map +1 -1
  112. package/dist/dashboard-rpc/projects.d.ts +29 -3
  113. package/dist/dashboard-rpc/projects.d.ts.map +1 -1
  114. package/dist/dashboard-rpc/projects.js +57 -8
  115. package/dist/dashboard-rpc/projects.js.map +1 -1
  116. package/dist/dashboard-rpc/reads.d.ts +3 -3
  117. package/dist/dashboard-rpc/reads.js +1 -1
  118. package/dist/dashboard-rpc/skills.d.ts +80 -0
  119. package/dist/dashboard-rpc/skills.d.ts.map +1 -0
  120. package/dist/dashboard-rpc/skills.js +84 -0
  121. package/dist/dashboard-rpc/skills.js.map +1 -0
  122. package/dist/dashboard-rpc/test-context.d.ts.map +1 -1
  123. package/dist/dashboard-rpc/test-context.js +4 -3
  124. package/dist/dashboard-rpc/test-context.js.map +1 -1
  125. package/dist/event-stream.d.ts +1 -1
  126. package/dist/event-stream.js +1 -1
  127. package/dist/events.d.ts +8 -8
  128. package/dist/events.d.ts.map +1 -1
  129. package/dist/index.d.ts +3 -2
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/install.d.ts +9 -7
  132. package/dist/install.d.ts.map +1 -1
  133. package/dist/install.js +28 -14
  134. package/dist/install.js.map +1 -1
  135. package/dist/module-server.d.ts +1 -1
  136. package/dist/module-types/dashboard/components/ui/switch.d.ts +7 -0
  137. package/dist/module-types/dashboard/lib/route.d.ts +2 -1
  138. package/dist/module-types/dashboard/lib/use-modules.d.ts +4 -3
  139. package/dist/module-types/dashboard/module/index.d.ts +6 -5
  140. package/dist/module-types/src/agent-view.d.ts +3 -3
  141. package/dist/module-types/src/bridge-browser.d.ts +4 -4
  142. package/dist/module-types/src/built-in.d.ts +45 -14
  143. package/dist/module-types/src/client.d.ts +1 -1
  144. package/dist/module-types/src/cloud-run-state.d.ts +1 -1
  145. package/dist/module-types/src/dashboard/agent-handoff.d.ts +4 -4
  146. package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +3 -3
  147. package/dist/module-types/src/dashboard/docs.d.ts +1 -1
  148. package/dist/module-types/src/dashboard/git-status.d.ts +1 -1
  149. package/dist/module-types/src/dashboard/interventions.d.ts +2 -2
  150. package/dist/module-types/src/dashboard/open-in-app.d.ts +3 -3
  151. package/dist/module-types/src/dashboard/open-questions.d.ts +2 -2
  152. package/dist/module-types/src/dashboard/projects.d.ts +6 -5
  153. package/dist/module-types/src/dashboard/pull-requests.d.ts +5 -5
  154. package/dist/module-types/src/dashboard/remote-run.d.ts +5 -5
  155. package/dist/module-types/src/dashboard/rpc-serve.d.ts +7 -4
  156. package/dist/module-types/src/dashboard/run-inbox.d.ts +2 -2
  157. package/dist/module-types/src/dashboard/start-branch.d.ts +31 -0
  158. package/dist/module-types/src/dashboard/types.d.ts +29 -3
  159. package/dist/module-types/src/dashboard-rpc/context.d.ts +2 -0
  160. package/dist/module-types/src/dashboard-rpc/control.d.ts +1 -1
  161. package/dist/module-types/src/dashboard-rpc/events.d.ts +3 -3
  162. package/dist/module-types/src/dashboard-rpc/index.d.ts +2 -1
  163. package/dist/module-types/src/dashboard-rpc/modules.d.ts +8 -6
  164. package/dist/module-types/src/dashboard-rpc/preferences.d.ts +2 -2
  165. package/dist/module-types/src/dashboard-rpc/projects.d.ts +29 -3
  166. package/dist/module-types/src/dashboard-rpc/reads.d.ts +3 -3
  167. package/dist/module-types/src/dashboard-rpc/skills.d.ts +79 -0
  168. package/dist/module-types/src/event-stream.d.ts +1 -1
  169. package/dist/module-types/src/events.d.ts +8 -8
  170. package/dist/module-types/src/index.d.ts +3 -2
  171. package/dist/module-types/src/open-choices.d.ts +2 -2
  172. package/dist/module-types/src/openagent-dir.d.ts +8 -0
  173. package/dist/module-types/src/openagent-gitignore.d.ts +11 -0
  174. package/dist/module-types/src/project-commands.d.ts +5 -1
  175. package/dist/module-types/src/project-errors.d.ts +11 -7
  176. package/dist/module-types/src/project-hooks.d.ts +12 -9
  177. package/dist/module-types/src/project-modules.d.ts +9 -7
  178. package/dist/module-types/src/project-presets.d.ts +4 -4
  179. package/dist/module-types/src/project.d.ts +6 -6
  180. package/dist/module-types/src/publish-levels.d.ts +4 -4
  181. package/dist/module-types/src/quota-boundary.d.ts +2 -2
  182. package/dist/module-types/src/registry.d.ts +13 -7
  183. package/dist/module-types/src/store/agent-checkout.d.ts +1 -1
  184. package/dist/module-types/src/store/agent-store.d.ts +6 -6
  185. package/dist/module-types/src/store/branches.d.ts +8 -8
  186. package/dist/module-types/src/store/git-host.d.ts +8 -8
  187. package/dist/module-types/src/store/provided.d.ts +3 -3
  188. package/dist/module-types/src/store/queue.d.ts +9 -9
  189. package/dist/module-types/src/store/repository.d.ts +2 -2
  190. package/dist/module-types/src/store/run-record.d.ts +10 -10
  191. package/dist/module-types/src/store/runs.d.ts +7 -7
  192. package/dist/module-types/src/store/tickets.d.ts +8 -8
  193. package/dist/module-types/src/terminal.d.ts +3 -3
  194. package/dist/open-choices.d.ts +2 -2
  195. package/dist/openagent-dir.d.ts +9 -0
  196. package/dist/openagent-dir.d.ts.map +1 -0
  197. package/dist/openagent-dir.js +9 -0
  198. package/dist/openagent-dir.js.map +1 -0
  199. package/dist/openagent-gitignore.d.ts +12 -0
  200. package/dist/openagent-gitignore.d.ts.map +1 -0
  201. package/dist/openagent-gitignore.js +19 -0
  202. package/dist/openagent-gitignore.js.map +1 -0
  203. package/dist/pick-directory.js +2 -2
  204. package/dist/pick-directory.js.map +1 -1
  205. package/dist/project-commands.d.ts +5 -1
  206. package/dist/project-commands.d.ts.map +1 -1
  207. package/dist/project-commands.js +1 -1
  208. package/dist/project-commands.js.map +1 -1
  209. package/dist/project-errors.d.ts +11 -7
  210. package/dist/project-errors.d.ts.map +1 -1
  211. package/dist/project-errors.js +10 -8
  212. package/dist/project-errors.js.map +1 -1
  213. package/dist/project-hooks.d.ts +12 -9
  214. package/dist/project-hooks.d.ts.map +1 -1
  215. package/dist/project-hooks.js +17 -14
  216. package/dist/project-hooks.js.map +1 -1
  217. package/dist/project-modules.d.ts +9 -7
  218. package/dist/project-modules.d.ts.map +1 -1
  219. package/dist/project-modules.js +7 -13
  220. package/dist/project-modules.js.map +1 -1
  221. package/dist/project-presets.d.ts +4 -4
  222. package/dist/project-presets.d.ts.map +1 -1
  223. package/dist/project-presets.js +9 -9
  224. package/dist/project-presets.js.map +1 -1
  225. package/dist/project.d.ts +6 -6
  226. package/dist/project.d.ts.map +1 -1
  227. package/dist/project.js +6 -7
  228. package/dist/project.js.map +1 -1
  229. package/dist/publish-levels.d.ts +4 -4
  230. package/dist/publish-levels.d.ts.map +1 -1
  231. package/dist/publish-levels.js +7 -5
  232. package/dist/publish-levels.js.map +1 -1
  233. package/dist/quota-boundary.d.ts +2 -2
  234. package/dist/quota-boundary.js +2 -2
  235. package/dist/registry.d.ts +13 -7
  236. package/dist/registry.d.ts.map +1 -1
  237. package/dist/registry.js +19 -3
  238. package/dist/registry.js.map +1 -1
  239. package/dist/remove-files.d.ts +24 -0
  240. package/dist/remove-files.d.ts.map +1 -0
  241. package/dist/remove-files.js +98 -0
  242. package/dist/remove-files.js.map +1 -0
  243. package/dist/store/agent-checkout.d.ts +1 -1
  244. package/dist/store/agent-checkout.js +3 -3
  245. package/dist/store/agent-checkout.js.map +1 -1
  246. package/dist/store/agent-store.d.ts +6 -6
  247. package/dist/store/agent-store.js +8 -8
  248. package/dist/store/agent-store.js.map +1 -1
  249. package/dist/store/branches.d.ts +8 -8
  250. package/dist/store/branches.d.ts.map +1 -1
  251. package/dist/store/branches.js +2 -2
  252. package/dist/store/branches.js.map +1 -1
  253. package/dist/store/git-host.d.ts +8 -8
  254. package/dist/store/git-host.d.ts.map +1 -1
  255. package/dist/store/git-host.js +3 -3
  256. package/dist/store/git-host.js.map +1 -1
  257. package/dist/store/provided.d.ts +3 -3
  258. package/dist/store/provided.d.ts.map +1 -1
  259. package/dist/store/provided.js +3 -3
  260. package/dist/store/provided.js.map +1 -1
  261. package/dist/store/queue.d.ts +9 -9
  262. package/dist/store/queue.d.ts.map +1 -1
  263. package/dist/store/queue.js +2 -2
  264. package/dist/store/queue.js.map +1 -1
  265. package/dist/store/repository.d.ts +2 -2
  266. package/dist/store/run-record.d.ts +10 -10
  267. package/dist/store/run-record.d.ts.map +1 -1
  268. package/dist/store/run-record.js +7 -7
  269. package/dist/store/run-record.js.map +1 -1
  270. package/dist/store/runs.d.ts +7 -7
  271. package/dist/store/runs.d.ts.map +1 -1
  272. package/dist/store/runs.js +3 -3
  273. package/dist/store/runs.js.map +1 -1
  274. package/dist/store/test-branches.d.ts +0 -8
  275. package/dist/store/test-branches.d.ts.map +1 -1
  276. package/dist/store/test-branches.js +0 -24
  277. package/dist/store/test-branches.js.map +1 -1
  278. package/dist/store/tickets.d.ts +8 -8
  279. package/dist/store/tickets.d.ts.map +1 -1
  280. package/dist/store/tickets.js +2 -2
  281. package/dist/store/tickets.js.map +1 -1
  282. package/dist/terminal.d.ts +3 -3
  283. package/dist/terminal.js +3 -3
  284. package/package.json +23 -20
  285. package/dist/agent-archive.d.ts +0 -35
  286. package/dist/agent-archive.d.ts.map +0 -1
  287. package/dist/agent-archive.js +0 -67
  288. package/dist/agent-archive.js.map +0 -1
  289. package/dist/agent-commit.d.ts +0 -140
  290. package/dist/agent-commit.d.ts.map +0 -1
  291. package/dist/agent-commit.js +0 -254
  292. package/dist/agent-commit.js.map +0 -1
  293. package/dist/agent-driver.d.ts +0 -28
  294. package/dist/agent-driver.d.ts.map +0 -1
  295. package/dist/agent-driver.js +0 -18
  296. package/dist/agent-driver.js.map +0 -1
  297. package/dist/agent-location.d.ts +0 -11
  298. package/dist/agent-location.d.ts.map +0 -1
  299. package/dist/agent-location.js +0 -10
  300. package/dist/agent-location.js.map +0 -1
  301. package/dist/agent-messages.d.ts +0 -55
  302. package/dist/agent-messages.d.ts.map +0 -1
  303. package/dist/agent-messages.js +0 -73
  304. package/dist/agent-messages.js.map +0 -1
  305. package/dist/agent-names.d.ts +0 -24
  306. package/dist/agent-names.d.ts.map +0 -1
  307. package/dist/agent-names.js +0 -33
  308. package/dist/agent-names.js.map +0 -1
  309. package/dist/agent-options.d.ts +0 -45
  310. package/dist/agent-options.d.ts.map +0 -1
  311. package/dist/agent-options.js +0 -83
  312. package/dist/agent-options.js.map +0 -1
  313. package/dist/agent-spec.d.ts +0 -56
  314. package/dist/agent-spec.d.ts.map +0 -1
  315. package/dist/agent-spec.js +0 -56
  316. package/dist/agent-spec.js.map +0 -1
  317. package/dist/agent-telemetry.d.ts +0 -88
  318. package/dist/agent-telemetry.d.ts.map +0 -1
  319. package/dist/agent-telemetry.js +0 -97
  320. package/dist/agent-telemetry.js.map +0 -1
  321. package/dist/agent.d.ts +0 -113
  322. package/dist/agent.d.ts.map +0 -1
  323. package/dist/agent.js +0 -168
  324. package/dist/agent.js.map +0 -1
  325. package/dist/archived-agent-patch.d.ts +0 -14
  326. package/dist/archived-agent-patch.d.ts.map +0 -1
  327. package/dist/archived-agent-patch.js +0 -22
  328. package/dist/archived-agent-patch.js.map +0 -1
  329. package/dist/auto-pm.d.ts +0 -538
  330. package/dist/auto-pm.d.ts.map +0 -1
  331. package/dist/auto-pm.js +0 -707
  332. package/dist/auto-pm.js.map +0 -1
  333. package/dist/await-gate.d.ts +0 -184
  334. package/dist/await-gate.d.ts.map +0 -1
  335. package/dist/await-gate.js +0 -252
  336. package/dist/await-gate.js.map +0 -1
  337. package/dist/branch-links-pass.d.ts +0 -15
  338. package/dist/branch-links-pass.d.ts.map +0 -1
  339. package/dist/branch-links-pass.js +0 -13
  340. package/dist/branch-links-pass.js.map +0 -1
  341. package/dist/branch-links.d.ts +0 -53
  342. package/dist/branch-links.d.ts.map +0 -1
  343. package/dist/branch-links.js +0 -94
  344. package/dist/branch-links.js.map +0 -1
  345. package/dist/branch-names.d.ts +0 -57
  346. package/dist/branch-names.d.ts.map +0 -1
  347. package/dist/branch-names.js +0 -72
  348. package/dist/branch-names.js.map +0 -1
  349. package/dist/ci-watch.d.ts +0 -123
  350. package/dist/ci-watch.d.ts.map +0 -1
  351. package/dist/ci-watch.js +0 -228
  352. package/dist/ci-watch.js.map +0 -1
  353. package/dist/claude-trust.d.ts +0 -16
  354. package/dist/claude-trust.d.ts.map +0 -1
  355. package/dist/claude-trust.js +0 -72
  356. package/dist/claude-trust.js.map +0 -1
  357. package/dist/cli-exec.d.ts +0 -36
  358. package/dist/cli-exec.d.ts.map +0 -1
  359. package/dist/cli-exec.js +0 -44
  360. package/dist/cli-exec.js.map +0 -1
  361. package/dist/closing-keywords.d.ts +0 -28
  362. package/dist/closing-keywords.d.ts.map +0 -1
  363. package/dist/closing-keywords.js +0 -49
  364. package/dist/closing-keywords.js.map +0 -1
  365. package/dist/config-layers.d.ts +0 -62
  366. package/dist/config-layers.d.ts.map +0 -1
  367. package/dist/config-layers.js +0 -70
  368. package/dist/config-layers.js.map +0 -1
  369. package/dist/config.d.ts +0 -54
  370. package/dist/config.d.ts.map +0 -1
  371. package/dist/config.js +0 -78
  372. package/dist/config.js.map +0 -1
  373. package/dist/consumption-guard.d.ts +0 -53
  374. package/dist/consumption-guard.d.ts.map +0 -1
  375. package/dist/consumption-guard.js +0 -69
  376. package/dist/consumption-guard.js.map +0 -1
  377. package/dist/control.d.ts +0 -75
  378. package/dist/control.d.ts.map +0 -1
  379. package/dist/control.js +0 -68
  380. package/dist/control.js.map +0 -1
  381. package/dist/conversation-commit.d.ts +0 -166
  382. package/dist/conversation-commit.d.ts.map +0 -1
  383. package/dist/conversation-commit.js +0 -309
  384. package/dist/conversation-commit.js.map +0 -1
  385. package/dist/conversations.d.ts +0 -93
  386. package/dist/conversations.d.ts.map +0 -1
  387. package/dist/conversations.js +0 -176
  388. package/dist/conversations.js.map +0 -1
  389. package/dist/daemon-writes.d.ts +0 -33
  390. package/dist/daemon-writes.d.ts.map +0 -1
  391. package/dist/daemon-writes.js +0 -45
  392. package/dist/daemon-writes.js.map +0 -1
  393. package/dist/dashboard/agent-tree.d.ts +0 -106
  394. package/dist/dashboard/agent-tree.d.ts.map +0 -1
  395. package/dist/dashboard/agent-tree.js +0 -180
  396. package/dist/dashboard/agent-tree.js.map +0 -1
  397. package/dist/dashboard/browser-proxy.d.ts +0 -41
  398. package/dist/dashboard/browser-proxy.d.ts.map +0 -1
  399. package/dist/dashboard/browser-proxy.js +0 -96
  400. package/dist/dashboard/browser-proxy.js.map +0 -1
  401. package/dist/dashboard/discord-webhook.d.ts +0 -17
  402. package/dist/dashboard/discord-webhook.d.ts.map +0 -1
  403. package/dist/dashboard/discord-webhook.js +0 -36
  404. package/dist/dashboard/discord-webhook.js.map +0 -1
  405. package/dist/dashboard/file-diff.d.ts +0 -67
  406. package/dist/dashboard/file-diff.d.ts.map +0 -1
  407. package/dist/dashboard/file-diff.js +0 -132
  408. package/dist/dashboard/file-diff.js.map +0 -1
  409. package/dist/dashboard/file-read.d.ts +0 -42
  410. package/dist/dashboard/file-read.d.ts.map +0 -1
  411. package/dist/dashboard/file-read.js +0 -69
  412. package/dist/dashboard/file-read.js.map +0 -1
  413. package/dist/dashboard/file-status.d.ts +0 -21
  414. package/dist/dashboard/file-status.d.ts.map +0 -1
  415. package/dist/dashboard/file-status.js +0 -37
  416. package/dist/dashboard/file-status.js.map +0 -1
  417. package/dist/dashboard/gh.d.ts +0 -131
  418. package/dist/dashboard/gh.d.ts.map +0 -1
  419. package/dist/dashboard/gh.js +0 -150
  420. package/dist/dashboard/gh.js.map +0 -1
  421. package/dist/dashboard/github.d.ts +0 -11
  422. package/dist/dashboard/github.d.ts.map +0 -1
  423. package/dist/dashboard/github.js +0 -33
  424. package/dist/dashboard/github.js.map +0 -1
  425. package/dist/dashboard/run-handoff.d.ts +0 -311
  426. package/dist/dashboard/run-handoff.d.ts.map +0 -1
  427. package/dist/dashboard/run-handoff.js +0 -485
  428. package/dist/dashboard/run-handoff.js.map +0 -1
  429. package/dist/dashboard/scheduler-state.d.ts +0 -73
  430. package/dist/dashboard/scheduler-state.d.ts.map +0 -1
  431. package/dist/dashboard/scheduler-state.js +0 -120
  432. package/dist/dashboard/scheduler-state.js.map +0 -1
  433. package/dist/dashboard/subagent-settings.d.ts +0 -26
  434. package/dist/dashboard/subagent-settings.d.ts.map +0 -1
  435. package/dist/dashboard/subagent-settings.js +0 -52
  436. package/dist/dashboard/subagent-settings.js.map +0 -1
  437. package/dist/dashboard/telefunc-serve.d.ts +0 -118
  438. package/dist/dashboard/telefunc-serve.d.ts.map +0 -1
  439. package/dist/dashboard/telefunc-serve.js +0 -108
  440. package/dist/dashboard/telefunc-serve.js.map +0 -1
  441. package/dist/dashboard/tickets.d.ts +0 -29
  442. package/dist/dashboard/tickets.d.ts.map +0 -1
  443. package/dist/dashboard/tickets.js +0 -38
  444. package/dist/dashboard/tickets.js.map +0 -1
  445. package/dist/dashboard/widget-serve.d.ts +0 -15
  446. package/dist/dashboard/widget-serve.d.ts.map +0 -1
  447. package/dist/dashboard/widget-serve.js +0 -45
  448. package/dist/dashboard/widget-serve.js.map +0 -1
  449. package/dist/dashboard-bundle/assets/main-B3HghPQy.css +0 -2
  450. package/dist/dashboard-bundle/assets/main-om0WOAku.js +0 -140
  451. package/dist/dashboard-client/assets/chunks/chunk-BF9pJudf.js +0 -4
  452. package/dist/dashboard-client/assets/entries/entry-client-routing.CT1e9F0o.js +0 -1
  453. package/dist/dashboard-client/assets/entries/pages_index.CkW5JQ8X.js +0 -428
  454. package/dist/dashboard-client/assets/static/layouts_tailwind-00e65532.8OjKGAbA.css +0 -2
  455. package/dist/dashboard-client/index.html +0 -27
  456. package/dist/dashboard-client/index.pageContext.json +0 -1
  457. package/dist/dashboard-client/logo-animated.svg +0 -34
  458. package/dist/dashboard-client/logo.svg +0 -16
  459. package/dist/dashboard-rpc/control.telefunc.d.ts +0 -176
  460. package/dist/dashboard-rpc/control.telefunc.d.ts.map +0 -1
  461. package/dist/dashboard-rpc/control.telefunc.js +0 -373
  462. package/dist/dashboard-rpc/control.telefunc.js.map +0 -1
  463. package/dist/dashboard-rpc/devices.telefunc.d.ts +0 -9
  464. package/dist/dashboard-rpc/devices.telefunc.d.ts.map +0 -1
  465. package/dist/dashboard-rpc/devices.telefunc.js +0 -12
  466. package/dist/dashboard-rpc/devices.telefunc.js.map +0 -1
  467. package/dist/dashboard-rpc/events.telefunc.d.ts +0 -36
  468. package/dist/dashboard-rpc/events.telefunc.d.ts.map +0 -1
  469. package/dist/dashboard-rpc/events.telefunc.js +0 -70
  470. package/dist/dashboard-rpc/events.telefunc.js.map +0 -1
  471. package/dist/dashboard-rpc/preferences.telefunc.d.ts +0 -97
  472. package/dist/dashboard-rpc/preferences.telefunc.d.ts.map +0 -1
  473. package/dist/dashboard-rpc/preferences.telefunc.js +0 -157
  474. package/dist/dashboard-rpc/preferences.telefunc.js.map +0 -1
  475. package/dist/dashboard-rpc/projects.telefunc.d.ts +0 -56
  476. package/dist/dashboard-rpc/projects.telefunc.d.ts.map +0 -1
  477. package/dist/dashboard-rpc/projects.telefunc.js +0 -96
  478. package/dist/dashboard-rpc/projects.telefunc.js.map +0 -1
  479. package/dist/dashboard-rpc/quota.telefunc.d.ts +0 -40
  480. package/dist/dashboard-rpc/quota.telefunc.d.ts.map +0 -1
  481. package/dist/dashboard-rpc/quota.telefunc.js +0 -84
  482. package/dist/dashboard-rpc/quota.telefunc.js.map +0 -1
  483. package/dist/dashboard-rpc/reads.telefunc.d.ts +0 -197
  484. package/dist/dashboard-rpc/reads.telefunc.d.ts.map +0 -1
  485. package/dist/dashboard-rpc/reads.telefunc.js +0 -403
  486. package/dist/dashboard-rpc/reads.telefunc.js.map +0 -1
  487. package/dist/dashboard-rpc/register.d.ts +0 -18
  488. package/dist/dashboard-rpc/register.d.ts.map +0 -1
  489. package/dist/dashboard-rpc/register.js +0 -66
  490. package/dist/dashboard-rpc/register.js.map +0 -1
  491. package/dist/dashboard-rpc/relay-run.d.ts +0 -9
  492. package/dist/dashboard-rpc/relay-run.d.ts.map +0 -1
  493. package/dist/dashboard-rpc/relay-run.js +0 -21
  494. package/dist/dashboard-rpc/relay-run.js.map +0 -1
  495. package/dist/dashboard-rpc/stream-channel.d.ts +0 -23
  496. package/dist/dashboard-rpc/stream-channel.d.ts.map +0 -1
  497. package/dist/dashboard-rpc/stream-channel.js +0 -52
  498. package/dist/dashboard-rpc/stream-channel.js.map +0 -1
  499. package/dist/dashboard-rpc/subagents.d.ts +0 -12
  500. package/dist/dashboard-rpc/subagents.d.ts.map +0 -1
  501. package/dist/dashboard-rpc/subagents.js +0 -13
  502. package/dist/dashboard-rpc/subagents.js.map +0 -1
  503. package/dist/dashboard-rpc/widgets.d.ts +0 -33
  504. package/dist/dashboard-rpc/widgets.d.ts.map +0 -1
  505. package/dist/dashboard-rpc/widgets.js +0 -54
  506. package/dist/dashboard-rpc/widgets.js.map +0 -1
  507. package/dist/data-branch.d.ts +0 -120
  508. package/dist/data-branch.d.ts.map +0 -1
  509. package/dist/data-branch.js +0 -319
  510. package/dist/data-branch.js.map +0 -1
  511. package/dist/discord/bot.d.ts +0 -61
  512. package/dist/discord/bot.d.ts.map +0 -1
  513. package/dist/discord/bot.js +0 -94
  514. package/dist/discord/bot.js.map +0 -1
  515. package/dist/discord/gateway.d.ts +0 -137
  516. package/dist/discord/gateway.d.ts.map +0 -1
  517. package/dist/discord/gateway.js +0 -315
  518. package/dist/discord/gateway.js.map +0 -1
  519. package/dist/discord/live-run.d.ts +0 -31
  520. package/dist/discord/live-run.d.ts.map +0 -1
  521. package/dist/discord/live-run.js +0 -57
  522. package/dist/discord/live-run.js.map +0 -1
  523. package/dist/discord/reply-mirror.d.ts +0 -83
  524. package/dist/discord/reply-mirror.d.ts.map +0 -1
  525. package/dist/discord/reply-mirror.js +0 -84
  526. package/dist/discord/reply-mirror.js.map +0 -1
  527. package/dist/discord/rest.d.ts +0 -20
  528. package/dist/discord/rest.d.ts.map +0 -1
  529. package/dist/discord/rest.js +0 -41
  530. package/dist/discord/rest.js.map +0 -1
  531. package/dist/discord/routing.d.ts +0 -81
  532. package/dist/discord/routing.d.ts.map +0 -1
  533. package/dist/discord/routing.js +0 -91
  534. package/dist/discord/routing.js.map +0 -1
  535. package/dist/discord-credentials-store.d.ts +0 -14
  536. package/dist/discord-credentials-store.d.ts.map +0 -1
  537. package/dist/discord-credentials-store.js +0 -53
  538. package/dist/discord-credentials-store.js.map +0 -1
  539. package/dist/discord-credentials.d.ts +0 -80
  540. package/dist/discord-credentials.d.ts.map +0 -1
  541. package/dist/discord-credentials.js +0 -55
  542. package/dist/discord-credentials.js.map +0 -1
  543. package/dist/driver/actions-zip.d.ts +0 -2
  544. package/dist/driver/actions-zip.d.ts.map +0 -1
  545. package/dist/driver/actions-zip.js +0 -70
  546. package/dist/driver/actions-zip.js.map +0 -1
  547. package/dist/driver/actions.d.ts +0 -130
  548. package/dist/driver/actions.d.ts.map +0 -1
  549. package/dist/driver/actions.js +0 -261
  550. package/dist/driver/actions.js.map +0 -1
  551. package/dist/driver/agent-cli.d.ts +0 -57
  552. package/dist/driver/agent-cli.d.ts.map +0 -1
  553. package/dist/driver/agent-cli.js +0 -134
  554. package/dist/driver/agent-cli.js.map +0 -1
  555. package/dist/driver/child-registry.d.ts +0 -25
  556. package/dist/driver/child-registry.d.ts.map +0 -1
  557. package/dist/driver/child-registry.js +0 -53
  558. package/dist/driver/child-registry.js.map +0 -1
  559. package/dist/driver/claude-code-quota.d.ts +0 -40
  560. package/dist/driver/claude-code-quota.d.ts.map +0 -1
  561. package/dist/driver/claude-code-quota.js +0 -144
  562. package/dist/driver/claude-code-quota.js.map +0 -1
  563. package/dist/driver/claude-code.d.ts +0 -104
  564. package/dist/driver/claude-code.d.ts.map +0 -1
  565. package/dist/driver/claude-code.js +0 -314
  566. package/dist/driver/claude-code.js.map +0 -1
  567. package/dist/driver/cli-session.d.ts +0 -57
  568. package/dist/driver/cli-session.d.ts.map +0 -1
  569. package/dist/driver/cli-session.js +0 -134
  570. package/dist/driver/cli-session.js.map +0 -1
  571. package/dist/driver/cloud.d.ts +0 -109
  572. package/dist/driver/cloud.d.ts.map +0 -1
  573. package/dist/driver/cloud.js +0 -232
  574. package/dist/driver/cloud.js.map +0 -1
  575. package/dist/driver/codex.d.ts +0 -99
  576. package/dist/driver/codex.d.ts.map +0 -1
  577. package/dist/driver/codex.js +0 -190
  578. package/dist/driver/codex.js.map +0 -1
  579. package/dist/driver/fake.d.ts +0 -54
  580. package/dist/driver/fake.d.ts.map +0 -1
  581. package/dist/driver/fake.js +0 -73
  582. package/dist/driver/fake.js.map +0 -1
  583. package/dist/driver/index.d.ts +0 -10
  584. package/dist/driver/index.d.ts.map +0 -1
  585. package/dist/driver/index.js +0 -14
  586. package/dist/driver/index.js.map +0 -1
  587. package/dist/driver/session-support.d.ts +0 -14
  588. package/dist/driver/session-support.d.ts.map +0 -1
  589. package/dist/driver/session-support.js +0 -37
  590. package/dist/driver/session-support.js.map +0 -1
  591. package/dist/driver/types.d.ts +0 -310
  592. package/dist/driver/types.d.ts.map +0 -1
  593. package/dist/driver/types.js +0 -5
  594. package/dist/driver/types.js.map +0 -1
  595. package/dist/driver-cli.d.ts +0 -61
  596. package/dist/driver-cli.d.ts.map +0 -1
  597. package/dist/driver-cli.js +0 -66
  598. package/dist/driver-cli.js.map +0 -1
  599. package/dist/fake-script.d.ts +0 -15
  600. package/dist/fake-script.d.ts.map +0 -1
  601. package/dist/fake-script.js +0 -58
  602. package/dist/fake-script.js.map +0 -1
  603. package/dist/framework-dir.d.ts +0 -11
  604. package/dist/framework-dir.d.ts.map +0 -1
  605. package/dist/framework-dir.js +0 -11
  606. package/dist/framework-dir.js.map +0 -1
  607. package/dist/framework-gitignore.d.ts +0 -12
  608. package/dist/framework-gitignore.d.ts.map +0 -1
  609. package/dist/framework-gitignore.js +0 -19
  610. package/dist/framework-gitignore.js.map +0 -1
  611. package/dist/gate-keepalive.d.ts +0 -47
  612. package/dist/gate-keepalive.d.ts.map +0 -1
  613. package/dist/gate-keepalive.js +0 -62
  614. package/dist/gate-keepalive.js.map +0 -1
  615. package/dist/git-exclude.d.ts +0 -11
  616. package/dist/git-exclude.d.ts.map +0 -1
  617. package/dist/git-exclude.js +0 -23
  618. package/dist/git-exclude.js.map +0 -1
  619. package/dist/handoff-level.d.ts +0 -56
  620. package/dist/handoff-level.d.ts.map +0 -1
  621. package/dist/handoff-level.js +0 -62
  622. package/dist/handoff-level.js.map +0 -1
  623. package/dist/host-exec.d.ts +0 -21
  624. package/dist/host-exec.d.ts.map +0 -1
  625. package/dist/host-exec.js +0 -30
  626. package/dist/host-exec.js.map +0 -1
  627. package/dist/layout.d.ts +0 -41
  628. package/dist/layout.d.ts.map +0 -1
  629. package/dist/layout.js +0 -69
  630. package/dist/layout.js.map +0 -1
  631. package/dist/logs.d.ts +0 -73
  632. package/dist/logs.d.ts.map +0 -1
  633. package/dist/logs.js +0 -218
  634. package/dist/logs.js.map +0 -1
  635. package/dist/maintenance.d.ts +0 -90
  636. package/dist/maintenance.d.ts.map +0 -1
  637. package/dist/maintenance.js +0 -141
  638. package/dist/maintenance.js.map +0 -1
  639. package/dist/merged-worktrees.d.ts +0 -74
  640. package/dist/merged-worktrees.d.ts.map +0 -1
  641. package/dist/merged-worktrees.js +0 -84
  642. package/dist/merged-worktrees.js.map +0 -1
  643. package/dist/module-types/src/dashboard/agent-tree.d.ts +0 -105
  644. package/dist/module-types/src/dashboard/file-diff.d.ts +0 -66
  645. package/dist/module-types/src/dashboard/file-read.d.ts +0 -41
  646. package/dist/module-types/src/dashboard/file-status.d.ts +0 -20
  647. package/dist/module-types/src/dashboard/scheduler-state.d.ts +0 -72
  648. package/dist/module-types/src/dashboard/subagent-settings.d.ts +0 -25
  649. package/dist/module-types/src/dashboard-rpc/subagents.d.ts +0 -11
  650. package/dist/module-types/src/framework-dir.d.ts +0 -10
  651. package/dist/module-types/src/framework-gitignore.d.ts +0 -11
  652. package/dist/module-types/src/subagent-settings.d.ts +0 -26
  653. package/dist/on-before-mergeable-prompt.d.ts +0 -32
  654. package/dist/on-before-mergeable-prompt.d.ts.map +0 -1
  655. package/dist/on-before-mergeable-prompt.js +0 -26
  656. package/dist/on-before-mergeable-prompt.js.map +0 -1
  657. package/dist/planned-quick-wins.d.ts +0 -102
  658. package/dist/planned-quick-wins.d.ts.map +0 -1
  659. package/dist/planned-quick-wins.js +0 -171
  660. package/dist/planned-quick-wins.js.map +0 -1
  661. package/dist/preflight.d.ts +0 -77
  662. package/dist/preflight.d.ts.map +0 -1
  663. package/dist/preflight.js +0 -91
  664. package/dist/preflight.js.map +0 -1
  665. package/dist/preset-catalog.d.ts +0 -98
  666. package/dist/preset-catalog.d.ts.map +0 -1
  667. package/dist/preset-catalog.js +0 -129
  668. package/dist/preset-catalog.js.map +0 -1
  669. package/dist/preset-prompt.d.ts +0 -81
  670. package/dist/preset-prompt.d.ts.map +0 -1
  671. package/dist/preset-prompt.js +0 -51
  672. package/dist/preset-prompt.js.map +0 -1
  673. package/dist/preset-registry.d.ts +0 -32
  674. package/dist/preset-registry.d.ts.map +0 -1
  675. package/dist/preset-registry.js +0 -35
  676. package/dist/preset-registry.js.map +0 -1
  677. package/dist/presets.d.ts +0 -20
  678. package/dist/presets.d.ts.map +0 -1
  679. package/dist/presets.js +0 -33
  680. package/dist/presets.js.map +0 -1
  681. package/dist/preview-runtime.d.ts +0 -33
  682. package/dist/preview-runtime.d.ts.map +0 -1
  683. package/dist/preview-runtime.js +0 -96
  684. package/dist/preview-runtime.js.map +0 -1
  685. package/dist/preview.d.ts +0 -78
  686. package/dist/preview.d.ts.map +0 -1
  687. package/dist/preview.js +0 -301
  688. package/dist/preview.js.map +0 -1
  689. package/dist/project-widgets.d.ts +0 -46
  690. package/dist/project-widgets.d.ts.map +0 -1
  691. package/dist/project-widgets.js +0 -93
  692. package/dist/project-widgets.js.map +0 -1
  693. package/dist/prompt-run.d.ts +0 -104
  694. package/dist/prompt-run.d.ts.map +0 -1
  695. package/dist/prompt-run.js +0 -112
  696. package/dist/prompt-run.js.map +0 -1
  697. package/dist/prompt-template.d.ts +0 -16
  698. package/dist/prompt-template.d.ts.map +0 -1
  699. package/dist/prompt-template.js +0 -56
  700. package/dist/prompt-template.js.map +0 -1
  701. package/dist/prompts.generated.d.ts +0 -53
  702. package/dist/prompts.generated.d.ts.map +0 -1
  703. package/dist/prompts.generated.js +0 -55
  704. package/dist/prompts.generated.js.map +0 -1
  705. package/dist/queue-promote.d.ts +0 -70
  706. package/dist/queue-promote.d.ts.map +0 -1
  707. package/dist/queue-promote.js +0 -118
  708. package/dist/queue-promote.js.map +0 -1
  709. package/dist/relay.d.ts +0 -84
  710. package/dist/relay.d.ts.map +0 -1
  711. package/dist/relay.js +0 -199
  712. package/dist/relay.js.map +0 -1
  713. package/dist/repos-directory.d.ts +0 -19
  714. package/dist/repos-directory.d.ts.map +0 -1
  715. package/dist/repos-directory.js +0 -23
  716. package/dist/repos-directory.js.map +0 -1
  717. package/dist/retired-project-settings.d.ts +0 -43
  718. package/dist/retired-project-settings.d.ts.map +0 -1
  719. package/dist/retired-project-settings.js +0 -125
  720. package/dist/retired-project-settings.js.map +0 -1
  721. package/dist/routine-locks.d.ts +0 -53
  722. package/dist/routine-locks.d.ts.map +0 -1
  723. package/dist/routine-locks.js +0 -125
  724. package/dist/routine-locks.js.map +0 -1
  725. package/dist/run-driver.d.ts +0 -26
  726. package/dist/run-driver.d.ts.map +0 -1
  727. package/dist/run-driver.js +0 -17
  728. package/dist/run-driver.js.map +0 -1
  729. package/dist/run-locks.d.ts +0 -3
  730. package/dist/run-locks.d.ts.map +0 -1
  731. package/dist/run-locks.js +0 -39
  732. package/dist/run-locks.js.map +0 -1
  733. package/dist/run-messages.d.ts +0 -64
  734. package/dist/run-messages.d.ts.map +0 -1
  735. package/dist/run-messages.js +0 -76
  736. package/dist/run-messages.js.map +0 -1
  737. package/dist/run-options.d.ts +0 -53
  738. package/dist/run-options.d.ts.map +0 -1
  739. package/dist/run-options.js +0 -110
  740. package/dist/run-options.js.map +0 -1
  741. package/dist/run-telemetry.d.ts +0 -115
  742. package/dist/run-telemetry.d.ts.map +0 -1
  743. package/dist/run-telemetry.js +0 -137
  744. package/dist/run-telemetry.js.map +0 -1
  745. package/dist/run-view.d.ts +0 -109
  746. package/dist/run-view.d.ts.map +0 -1
  747. package/dist/run-view.js +0 -118
  748. package/dist/run-view.js.map +0 -1
  749. package/dist/run.d.ts +0 -261
  750. package/dist/run.d.ts.map +0 -1
  751. package/dist/run.js +0 -420
  752. package/dist/run.js.map +0 -1
  753. package/dist/runtime-keys.d.ts +0 -17
  754. package/dist/runtime-keys.d.ts.map +0 -1
  755. package/dist/runtime-keys.js +0 -17
  756. package/dist/runtime-keys.js.map +0 -1
  757. package/dist/sandbox.d.ts +0 -27
  758. package/dist/sandbox.d.ts.map +0 -1
  759. package/dist/sandbox.js +0 -63
  760. package/dist/sandbox.js.map +0 -1
  761. package/dist/session-link.d.ts +0 -19
  762. package/dist/session-link.d.ts.map +0 -1
  763. package/dist/session-link.js +0 -26
  764. package/dist/session-link.js.map +0 -1
  765. package/dist/sessions.d.ts +0 -77
  766. package/dist/sessions.d.ts.map +0 -1
  767. package/dist/sessions.js +0 -146
  768. package/dist/sessions.js.map +0 -1
  769. package/dist/spike-locks.d.ts +0 -75
  770. package/dist/spike-locks.d.ts.map +0 -1
  771. package/dist/spike-locks.js +0 -208
  772. package/dist/spike-locks.js.map +0 -1
  773. package/dist/stale-branch.d.ts +0 -21
  774. package/dist/stale-branch.d.ts.map +0 -1
  775. package/dist/stale-branch.js +0 -32
  776. package/dist/stale-branch.js.map +0 -1
  777. package/dist/steps.d.ts +0 -9
  778. package/dist/steps.d.ts.map +0 -1
  779. package/dist/steps.js +0 -13
  780. package/dist/steps.js.map +0 -1
  781. package/dist/store/forge.d.ts +0 -110
  782. package/dist/store/forge.d.ts.map +0 -1
  783. package/dist/store/forge.js +0 -97
  784. package/dist/store/forge.js.map +0 -1
  785. package/dist/store/run-checkout.d.ts +0 -33
  786. package/dist/store/run-checkout.d.ts.map +0 -1
  787. package/dist/store/run-checkout.js +0 -59
  788. package/dist/store/run-checkout.js.map +0 -1
  789. package/dist/store/run-store.d.ts +0 -501
  790. package/dist/store/run-store.d.ts.map +0 -1
  791. package/dist/store/run-store.js +0 -806
  792. package/dist/store/run-store.js.map +0 -1
  793. package/dist/store/suspend.d.ts +0 -38
  794. package/dist/store/suspend.d.ts.map +0 -1
  795. package/dist/store/suspend.js +0 -45
  796. package/dist/store/suspend.js.map +0 -1
  797. package/dist/store/worktree-deps.d.ts +0 -30
  798. package/dist/store/worktree-deps.d.ts.map +0 -1
  799. package/dist/store/worktree-deps.js +0 -115
  800. package/dist/store/worktree-deps.js.map +0 -1
  801. package/dist/store/worktree.d.ts +0 -194
  802. package/dist/store/worktree.d.ts.map +0 -1
  803. package/dist/store/worktree.js +0 -331
  804. package/dist/store/worktree.js.map +0 -1
  805. package/dist/subagent-settings.d.ts +0 -27
  806. package/dist/subagent-settings.d.ts.map +0 -1
  807. package/dist/subagent-settings.js +0 -35
  808. package/dist/subagent-settings.js.map +0 -1
  809. package/dist/system-prompt-file.d.ts +0 -18
  810. package/dist/system-prompt-file.d.ts.map +0 -1
  811. package/dist/system-prompt-file.js +0 -28
  812. package/dist/system-prompt-file.js.map +0 -1
  813. package/dist/system-prompt.d.ts +0 -148
  814. package/dist/system-prompt.d.ts.map +0 -1
  815. package/dist/system-prompt.js +0 -170
  816. package/dist/system-prompt.js.map +0 -1
  817. package/dist/target-driver.d.ts +0 -28
  818. package/dist/target-driver.d.ts.map +0 -1
  819. package/dist/target-driver.js +0 -18
  820. package/dist/target-driver.js.map +0 -1
  821. package/dist/ticket-locks.d.ts +0 -61
  822. package/dist/ticket-locks.d.ts.map +0 -1
  823. package/dist/ticket-locks.js +0 -137
  824. package/dist/ticket-locks.js.map +0 -1
  825. package/dist/tickets-file.d.ts +0 -7
  826. package/dist/tickets-file.d.ts.map +0 -1
  827. package/dist/tickets-file.js +0 -21
  828. package/dist/tickets-file.js.map +0 -1
  829. package/dist/tickets.d.ts +0 -18
  830. package/dist/tickets.d.ts.map +0 -1
  831. package/dist/tickets.js +0 -23
  832. package/dist/tickets.js.map +0 -1
  833. package/dist/todo-loop.d.ts +0 -110
  834. package/dist/todo-loop.d.ts.map +0 -1
  835. package/dist/todo-loop.js +0 -175
  836. package/dist/todo-loop.js.map +0 -1
  837. package/dist/turn-gate.d.ts +0 -144
  838. package/dist/turn-gate.d.ts.map +0 -1
  839. package/dist/turn-gate.js +0 -217
  840. package/dist/turn-gate.js.map +0 -1
  841. package/dist/usage.d.ts +0 -32
  842. package/dist/usage.d.ts.map +0 -1
  843. package/dist/usage.js +0 -46
  844. package/dist/usage.js.map +0 -1
  845. package/dist/widget-types/dashboard/components/LinkActions.d.ts +0 -26
  846. package/dist/widget-types/dashboard/components/Markdown.d.ts +0 -4
  847. package/dist/widget-types/dashboard/components/StartAgentButton.d.ts +0 -39
  848. package/dist/widget-types/dashboard/components/ui/badge.d.ts +0 -2
  849. package/dist/widget-types/dashboard/components/ui/button.d.ts +0 -10
  850. package/dist/widget-types/dashboard/components/ui/card.d.ts +0 -5
  851. package/dist/widget-types/dashboard/components/ui/checkbox.d.ts +0 -7
  852. package/dist/widget-types/dashboard/components/ui/dropdown-menu.d.ts +0 -16
  853. package/dist/widget-types/dashboard/components/ui/input.d.ts +0 -2
  854. package/dist/widget-types/dashboard/components/ui/option-label.d.ts +0 -4
  855. package/dist/widget-types/dashboard/components/ui/popover.d.ts +0 -8
  856. package/dist/widget-types/dashboard/components/ui/scroll-area.d.ts +0 -10
  857. package/dist/widget-types/dashboard/components/ui/separator.d.ts +0 -3
  858. package/dist/widget-types/dashboard/components/ui/skeleton.d.ts +0 -2
  859. package/dist/widget-types/dashboard/components/ui/slider.d.ts +0 -9
  860. package/dist/widget-types/dashboard/components/ui/tooltip.d.ts +0 -11
  861. package/dist/widget-types/dashboard/lib/draft-handoff.d.ts +0 -15
  862. package/dist/widget-types/dashboard/lib/format-date.d.ts +0 -51
  863. package/dist/widget-types/dashboard/lib/host-services.d.ts +0 -12
  864. package/dist/widget-types/dashboard/lib/route.d.ts +0 -24
  865. package/dist/widget-types/dashboard/lib/rpc.d.ts +0 -31
  866. package/dist/widget-types/dashboard/lib/use-action.d.ts +0 -25
  867. package/dist/widget-types/dashboard/lib/use-async.d.ts +0 -39
  868. package/dist/widget-types/dashboard/lib/use-widgets.d.ts +0 -42
  869. package/dist/widget-types/dashboard/lib/utils.d.ts +0 -3
  870. package/dist/widget-types/dashboard/rpc/widgets.d.ts +0 -4
  871. package/dist/widget-types/dashboard/widget/index.d.ts +0 -207
  872. package/dist/widget-types/src/agent-id.d.ts +0 -12
  873. package/dist/widget-types/src/agent-locks.d.ts +0 -2
  874. package/dist/widget-types/src/agent-view.d.ts +0 -38
  875. package/dist/widget-types/src/bridge-browser.d.ts +0 -216
  876. package/dist/widget-types/src/browser-stream.d.ts +0 -19
  877. package/dist/widget-types/src/browser.d.ts +0 -15
  878. package/dist/widget-types/src/cli-exec.d.ts +0 -35
  879. package/dist/widget-types/src/cloud-run-state.d.ts +0 -26
  880. package/dist/widget-types/src/dashboard/activity.d.ts +0 -40
  881. package/dist/widget-types/src/dashboard/agent-handoff.d.ts +0 -211
  882. package/dist/widget-types/src/dashboard/agent-tree.d.ts +0 -105
  883. package/dist/widget-types/src/dashboard/bridge-endpoints.d.ts +0 -157
  884. package/dist/widget-types/src/dashboard/bridge-question.d.ts +0 -32
  885. package/dist/widget-types/src/dashboard/bridge-store.d.ts +0 -178
  886. package/dist/widget-types/src/dashboard/cache.d.ts +0 -46
  887. package/dist/widget-types/src/dashboard/content-type.d.ts +0 -2
  888. package/dist/widget-types/src/dashboard/dashboard.d.ts +0 -37
  889. package/dist/widget-types/src/dashboard/discord-webhook.d.ts +0 -16
  890. package/dist/widget-types/src/dashboard/docs.d.ts +0 -38
  891. package/dist/widget-types/src/dashboard/file-diff.d.ts +0 -66
  892. package/dist/widget-types/src/dashboard/file-read.d.ts +0 -41
  893. package/dist/widget-types/src/dashboard/file-status.d.ts +0 -20
  894. package/dist/widget-types/src/dashboard/gh.d.ts +0 -130
  895. package/dist/widget-types/src/dashboard/git-status.d.ts +0 -32
  896. package/dist/widget-types/src/dashboard/github.d.ts +0 -10
  897. package/dist/widget-types/src/dashboard/http.d.ts +0 -28
  898. package/dist/widget-types/src/dashboard/interventions.d.ts +0 -66
  899. package/dist/widget-types/src/dashboard/keys.d.ts +0 -30
  900. package/dist/widget-types/src/dashboard/models.d.ts +0 -24
  901. package/dist/widget-types/src/dashboard/open-in-app.d.ts +0 -42
  902. package/dist/widget-types/src/dashboard/open-questions.d.ts +0 -52
  903. package/dist/widget-types/src/dashboard/overview.d.ts +0 -77
  904. package/dist/widget-types/src/dashboard/projects.d.ts +0 -89
  905. package/dist/widget-types/src/dashboard/pull-requests.d.ts +0 -126
  906. package/dist/widget-types/src/dashboard/queue.d.ts +0 -16
  907. package/dist/widget-types/src/dashboard/quota.d.ts +0 -59
  908. package/dist/widget-types/src/dashboard/remote-run.d.ts +0 -94
  909. package/dist/widget-types/src/dashboard/rpc-serve.d.ts +0 -102
  910. package/dist/widget-types/src/dashboard/run-inbox.d.ts +0 -30
  911. package/dist/widget-types/src/dashboard/scheduler-state.d.ts +0 -64
  912. package/dist/widget-types/src/dashboard/tickets.d.ts +0 -28
  913. package/dist/widget-types/src/dashboard/types.d.ts +0 -99
  914. package/dist/widget-types/src/dashboard/widget-serve.d.ts +0 -14
  915. package/dist/widget-types/src/dashboard-rpc/context.d.ts +0 -53
  916. package/dist/widget-types/src/dashboard-rpc/control.d.ts +0 -108
  917. package/dist/widget-types/src/dashboard-rpc/devices.d.ts +0 -8
  918. package/dist/widget-types/src/dashboard-rpc/events-tail.d.ts +0 -53
  919. package/dist/widget-types/src/dashboard-rpc/events.d.ts +0 -29
  920. package/dist/widget-types/src/dashboard-rpc/index.d.ts +0 -28
  921. package/dist/widget-types/src/dashboard-rpc/models.d.ts +0 -3
  922. package/dist/widget-types/src/dashboard-rpc/preferences.d.ts +0 -40
  923. package/dist/widget-types/src/dashboard-rpc/projects.d.ts +0 -54
  924. package/dist/widget-types/src/dashboard-rpc/quota.d.ts +0 -26
  925. package/dist/widget-types/src/dashboard-rpc/reads.d.ts +0 -227
  926. package/dist/widget-types/src/dashboard-rpc/relay-agent.d.ts +0 -8
  927. package/dist/widget-types/src/dashboard-rpc/stream-forward.d.ts +0 -16
  928. package/dist/widget-types/src/dashboard-rpc/widgets.d.ts +0 -32
  929. package/dist/widget-types/src/discord-credentials.d.ts +0 -79
  930. package/dist/widget-types/src/driver-names.d.ts +0 -21
  931. package/dist/widget-types/src/error-message.d.ts +0 -7
  932. package/dist/widget-types/src/event-stream.d.ts +0 -32
  933. package/dist/widget-types/src/events.d.ts +0 -235
  934. package/dist/widget-types/src/framework-dir.d.ts +0 -10
  935. package/dist/widget-types/src/framework-gitignore.d.ts +0 -11
  936. package/dist/widget-types/src/index.d.ts +0 -42
  937. package/dist/widget-types/src/jsonl-tail.d.ts +0 -54
  938. package/dist/widget-types/src/loopback-host.d.ts +0 -19
  939. package/dist/widget-types/src/node-fs.d.ts +0 -32
  940. package/dist/widget-types/src/open-choices.d.ts +0 -14
  941. package/dist/widget-types/src/pick-directory.d.ts +0 -29
  942. package/dist/widget-types/src/preference-defaults.d.ts +0 -53
  943. package/dist/widget-types/src/project-commands.d.ts +0 -23
  944. package/dist/widget-types/src/project-errors.d.ts +0 -43
  945. package/dist/widget-types/src/project-hooks.d.ts +0 -133
  946. package/dist/widget-types/src/project-presets.d.ts +0 -29
  947. package/dist/widget-types/src/project-widgets.d.ts +0 -45
  948. package/dist/widget-types/src/project.d.ts +0 -28
  949. package/dist/widget-types/src/quota-boundary.d.ts +0 -115
  950. package/dist/widget-types/src/quota-poller.d.ts +0 -82
  951. package/dist/widget-types/src/registry.d.ts +0 -210
  952. package/dist/widget-types/src/store/agent-checkout.d.ts +0 -46
  953. package/dist/widget-types/src/store/agent-store.d.ts +0 -237
  954. package/dist/widget-types/src/store/branches.d.ts +0 -133
  955. package/dist/widget-types/src/store/forge.d.ts +0 -109
  956. package/dist/widget-types/src/store/git-host.d.ts +0 -111
  957. package/dist/widget-types/src/store/index.d.ts +0 -9
  958. package/dist/widget-types/src/store/provided.d.ts +0 -16
  959. package/dist/widget-types/src/store/queue.d.ts +0 -45
  960. package/dist/widget-types/src/store/run-record.d.ts +0 -21
  961. package/dist/widget-types/src/store/runs.d.ts +0 -101
  962. package/dist/widget-types/src/store/tickets.d.ts +0 -72
  963. package/dist/widget-types/src/tickets.d.ts +0 -17
  964. package/dist/widget-types/src/worktrees.d.ts +0 -89
  965. 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,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;AACtE,CAAC;AAED,qFAAqF;AACrF,SAAS,YAAY,CAAC,KAAa;IACjC,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,OAAO,GAAG,CAAC,CAAA;IACf,IAAI,MAAM,GAAG,KAAK,CAAA;IAClB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,GAAG,IAAI,CAAA;YACb,SAAQ;QACV,CAAC;QACD,4FAA4F;QAC5F,+FAA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C,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/dashboard/file-read.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,8FAA8F;AAC9F,kGAAkG;AAElG,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAcpC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IACpE,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA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AAC,CAAA;AACzC,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9B,IAAI,KAAK,CAAC,MAAM,IAAI,iBAAiB;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;IACxE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;AAChF,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW,EAAE,IAAY;IAC7D,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAA;IACrB,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IAC9E,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,aAAa,EAAkB,MAAM,sBAAsB,CAAA;AAWpE,mGAAmG;AACnG,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAClG,CAAC;AASD,mGAAmG;AACnG,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,MAAM,OAAO,GAAqB,EAAE,CAAA;IACpC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAA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 @@
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,CAAA;IACb,oGAAoG;IACpG,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAA;AAEtF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAA;AAI3F;;;;;;;;;;;GAWG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,E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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