@openagt/dashboard 0.0.0-stage → 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 (610) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -2
  3. package/dist/agent-id.d.ts +13 -0
  4. package/dist/agent-id.d.ts.map +1 -0
  5. package/dist/agent-id.js +20 -0
  6. package/dist/agent-id.js.map +1 -0
  7. package/dist/agent-locks.d.ts +3 -0
  8. package/dist/agent-locks.d.ts.map +1 -0
  9. package/dist/agent-locks.js +40 -0
  10. package/dist/agent-locks.js.map +1 -0
  11. package/dist/agent-view.d.ts +39 -0
  12. package/dist/agent-view.d.ts.map +1 -0
  13. package/dist/agent-view.js +45 -0
  14. package/dist/agent-view.js.map +1 -0
  15. package/dist/bin.d.ts +3 -0
  16. package/dist/bin.d.ts.map +1 -0
  17. package/dist/bin.js +11 -0
  18. package/dist/bin.js.map +1 -0
  19. package/dist/branch-name.d.ts +8 -0
  20. package/dist/branch-name.d.ts.map +1 -0
  21. package/dist/branch-name.js +20 -0
  22. package/dist/branch-name.js.map +1 -0
  23. package/dist/bridge-browser.d.ts +217 -0
  24. package/dist/bridge-browser.d.ts.map +1 -0
  25. package/dist/bridge-browser.js +520 -0
  26. package/dist/bridge-browser.js.map +1 -0
  27. package/dist/browser-stream.d.ts +20 -0
  28. package/dist/browser-stream.d.ts.map +1 -0
  29. package/dist/browser-stream.js +51 -0
  30. package/dist/browser-stream.js.map +1 -0
  31. package/dist/browser.d.ts +16 -0
  32. package/dist/browser.d.ts.map +1 -0
  33. package/dist/browser.js +38 -0
  34. package/dist/browser.js.map +1 -0
  35. package/dist/built-in.d.ts +38 -0
  36. package/dist/built-in.d.ts.map +1 -0
  37. package/dist/built-in.js +119 -0
  38. package/dist/built-in.js.map +1 -0
  39. package/dist/chrome-extension/background.js +532 -0
  40. package/dist/chrome-extension/content.js +1475 -0
  41. package/dist/chrome-extension/driver-plan.js +41 -0
  42. package/dist/chrome-extension/fingerprint.js +43 -0
  43. package/dist/chrome-extension/manifest.json +31 -0
  44. package/dist/chrome-extension/options.html +48 -0
  45. package/dist/chrome-extension/options.js +122 -0
  46. package/dist/cli.d.ts +43 -0
  47. package/dist/cli.d.ts.map +1 -0
  48. package/dist/cli.js +186 -0
  49. package/dist/cli.js.map +1 -0
  50. package/dist/client.d.ts +16 -0
  51. package/dist/client.d.ts.map +1 -0
  52. package/dist/client.js +30 -0
  53. package/dist/client.js.map +1 -0
  54. package/dist/cloud-run-state.d.ts +27 -0
  55. package/dist/cloud-run-state.d.ts.map +1 -0
  56. package/dist/cloud-run-state.js +36 -0
  57. package/dist/cloud-run-state.js.map +1 -0
  58. package/dist/cloud-scratch-refs.d.ts +85 -0
  59. package/dist/cloud-scratch-refs.d.ts.map +1 -0
  60. package/dist/cloud-scratch-refs.js +275 -0
  61. package/dist/cloud-scratch-refs.js.map +1 -0
  62. package/dist/cloud-work.d.ts +66 -0
  63. package/dist/cloud-work.d.ts.map +1 -0
  64. package/dist/cloud-work.js +204 -0
  65. package/dist/cloud-work.js.map +1 -0
  66. package/dist/daemon-runtime.d.ts +42 -0
  67. package/dist/daemon-runtime.d.ts.map +1 -0
  68. package/dist/daemon-runtime.js +183 -0
  69. package/dist/daemon-runtime.js.map +1 -0
  70. package/dist/daemon-services.d.ts +37 -0
  71. package/dist/daemon-services.d.ts.map +1 -0
  72. package/dist/daemon-services.js +126 -0
  73. package/dist/daemon-services.js.map +1 -0
  74. package/dist/daemon-tick.d.ts +68 -0
  75. package/dist/daemon-tick.d.ts.map +1 -0
  76. package/dist/daemon-tick.js +97 -0
  77. package/dist/daemon-tick.js.map +1 -0
  78. package/dist/daemon.d.ts +65 -0
  79. package/dist/daemon.d.ts.map +1 -0
  80. package/dist/daemon.js +202 -0
  81. package/dist/daemon.js.map +1 -0
  82. package/dist/dashboard/activity.d.ts +41 -0
  83. package/dist/dashboard/activity.d.ts.map +1 -0
  84. package/dist/dashboard/activity.js +56 -0
  85. package/dist/dashboard/activity.js.map +1 -0
  86. package/dist/dashboard/agent-handoff.d.ts +244 -0
  87. package/dist/dashboard/agent-handoff.d.ts.map +1 -0
  88. package/dist/dashboard/agent-handoff.js +310 -0
  89. package/dist/dashboard/agent-handoff.js.map +1 -0
  90. package/dist/dashboard/bridge-endpoints.d.ts +158 -0
  91. package/dist/dashboard/bridge-endpoints.d.ts.map +1 -0
  92. package/dist/dashboard/bridge-endpoints.js +382 -0
  93. package/dist/dashboard/bridge-endpoints.js.map +1 -0
  94. package/dist/dashboard/bridge-question.d.ts +33 -0
  95. package/dist/dashboard/bridge-question.d.ts.map +1 -0
  96. package/dist/dashboard/bridge-question.js +20 -0
  97. package/dist/dashboard/bridge-question.js.map +1 -0
  98. package/dist/dashboard/bridge-sessions.d.ts +25 -0
  99. package/dist/dashboard/bridge-sessions.d.ts.map +1 -0
  100. package/dist/dashboard/bridge-sessions.js +46 -0
  101. package/dist/dashboard/bridge-sessions.js.map +1 -0
  102. package/dist/dashboard/bridge-starts.d.ts +61 -0
  103. package/dist/dashboard/bridge-starts.d.ts.map +1 -0
  104. package/dist/dashboard/bridge-starts.js +94 -0
  105. package/dist/dashboard/bridge-starts.js.map +1 -0
  106. package/dist/dashboard/bridge-store.d.ts +179 -0
  107. package/dist/dashboard/bridge-store.d.ts.map +1 -0
  108. package/dist/dashboard/bridge-store.js +262 -0
  109. package/dist/dashboard/bridge-store.js.map +1 -0
  110. package/dist/dashboard/bundle.d.ts +12 -0
  111. package/dist/dashboard/bundle.d.ts.map +1 -0
  112. package/dist/dashboard/bundle.js +22 -0
  113. package/dist/dashboard/bundle.js.map +1 -0
  114. package/dist/dashboard/cache.d.ts +47 -0
  115. package/dist/dashboard/cache.d.ts.map +1 -0
  116. package/dist/dashboard/cache.js +87 -0
  117. package/dist/dashboard/cache.js.map +1 -0
  118. package/dist/dashboard/content-type.d.ts +3 -0
  119. package/dist/dashboard/content-type.d.ts.map +1 -0
  120. package/dist/dashboard/content-type.js +31 -0
  121. package/dist/dashboard/content-type.js.map +1 -0
  122. package/dist/dashboard/dashboard.d.ts +38 -0
  123. package/dist/dashboard/dashboard.d.ts.map +1 -0
  124. package/dist/dashboard/dashboard.js +42 -0
  125. package/dist/dashboard/dashboard.js.map +1 -0
  126. package/dist/dashboard/docs.d.ts +39 -0
  127. package/dist/dashboard/docs.d.ts.map +1 -0
  128. package/dist/dashboard/docs.js +59 -0
  129. package/dist/dashboard/docs.js.map +1 -0
  130. package/dist/dashboard/git-status.d.ts +44 -0
  131. package/dist/dashboard/git-status.d.ts.map +1 -0
  132. package/dist/dashboard/git-status.js +37 -0
  133. package/dist/dashboard/git-status.js.map +1 -0
  134. package/dist/dashboard/http.d.ts +29 -0
  135. package/dist/dashboard/http.d.ts.map +1 -0
  136. package/dist/dashboard/http.js +74 -0
  137. package/dist/dashboard/http.js.map +1 -0
  138. package/dist/dashboard/index.d.ts +24 -0
  139. package/dist/dashboard/index.d.ts.map +1 -0
  140. package/dist/dashboard/index.js +23 -0
  141. package/dist/dashboard/index.js.map +1 -0
  142. package/dist/dashboard/interventions.d.ts +67 -0
  143. package/dist/dashboard/interventions.d.ts.map +1 -0
  144. package/dist/dashboard/interventions.js +169 -0
  145. package/dist/dashboard/interventions.js.map +1 -0
  146. package/dist/dashboard/keyed-watcher.d.ts +29 -0
  147. package/dist/dashboard/keyed-watcher.d.ts.map +1 -0
  148. package/dist/dashboard/keyed-watcher.js +42 -0
  149. package/dist/dashboard/keyed-watcher.js.map +1 -0
  150. package/dist/dashboard/keys.d.ts +31 -0
  151. package/dist/dashboard/keys.d.ts.map +1 -0
  152. package/dist/dashboard/keys.js +37 -0
  153. package/dist/dashboard/keys.js.map +1 -0
  154. package/dist/dashboard/models.d.ts +25 -0
  155. package/dist/dashboard/models.d.ts.map +1 -0
  156. package/dist/dashboard/models.js +30 -0
  157. package/dist/dashboard/models.js.map +1 -0
  158. package/dist/dashboard/module-host.d.ts +44 -0
  159. package/dist/dashboard/module-host.d.ts.map +1 -0
  160. package/dist/dashboard/module-host.js +91 -0
  161. package/dist/dashboard/module-host.js.map +1 -0
  162. package/dist/dashboard/module-serve.d.ts +15 -0
  163. package/dist/dashboard/module-serve.d.ts.map +1 -0
  164. package/dist/dashboard/module-serve.js +45 -0
  165. package/dist/dashboard/module-serve.js.map +1 -0
  166. package/dist/dashboard/open-in-app.d.ts +43 -0
  167. package/dist/dashboard/open-in-app.d.ts.map +1 -0
  168. package/dist/dashboard/open-in-app.js +98 -0
  169. package/dist/dashboard/open-in-app.js.map +1 -0
  170. package/dist/dashboard/open-questions.d.ts +45 -0
  171. package/dist/dashboard/open-questions.d.ts.map +1 -0
  172. package/dist/dashboard/open-questions.js +62 -0
  173. package/dist/dashboard/open-questions.js.map +1 -0
  174. package/dist/dashboard/overview.d.ts +78 -0
  175. package/dist/dashboard/overview.d.ts.map +1 -0
  176. package/dist/dashboard/overview.js +87 -0
  177. package/dist/dashboard/overview.js.map +1 -0
  178. package/dist/dashboard/projects.d.ts +101 -0
  179. package/dist/dashboard/projects.d.ts.map +1 -0
  180. package/dist/dashboard/projects.js +63 -0
  181. package/dist/dashboard/projects.js.map +1 -0
  182. package/dist/dashboard/pull-requests.d.ts +127 -0
  183. package/dist/dashboard/pull-requests.d.ts.map +1 -0
  184. package/dist/dashboard/pull-requests.js +137 -0
  185. package/dist/dashboard/pull-requests.js.map +1 -0
  186. package/dist/dashboard/queue.d.ts +17 -0
  187. package/dist/dashboard/queue.d.ts.map +1 -0
  188. package/dist/dashboard/queue.js +19 -0
  189. package/dist/dashboard/queue.js.map +1 -0
  190. package/dist/dashboard/quota.d.ts +53 -0
  191. package/dist/dashboard/quota.d.ts.map +1 -0
  192. package/dist/dashboard/quota.js +42 -0
  193. package/dist/dashboard/quota.js.map +1 -0
  194. package/dist/dashboard/relay-endpoints.d.ts +32 -0
  195. package/dist/dashboard/relay-endpoints.d.ts.map +1 -0
  196. package/dist/dashboard/relay-endpoints.js +115 -0
  197. package/dist/dashboard/relay-endpoints.js.map +1 -0
  198. package/dist/dashboard/remote-run.d.ts +95 -0
  199. package/dist/dashboard/remote-run.d.ts.map +1 -0
  200. package/dist/dashboard/remote-run.js +235 -0
  201. package/dist/dashboard/remote-run.js.map +1 -0
  202. package/dist/dashboard/rpc-serve.d.ts +106 -0
  203. package/dist/dashboard/rpc-serve.d.ts.map +1 -0
  204. package/dist/dashboard/rpc-serve.js +180 -0
  205. package/dist/dashboard/rpc-serve.js.map +1 -0
  206. package/dist/dashboard/run-inbox.d.ts +31 -0
  207. package/dist/dashboard/run-inbox.d.ts.map +1 -0
  208. package/dist/dashboard/run-inbox.js +51 -0
  209. package/dist/dashboard/run-inbox.js.map +1 -0
  210. package/dist/dashboard/server.d.ts +105 -0
  211. package/dist/dashboard/server.d.ts.map +1 -0
  212. package/dist/dashboard/server.js +231 -0
  213. package/dist/dashboard/server.js.map +1 -0
  214. package/dist/dashboard/static.d.ts +9 -0
  215. package/dist/dashboard/static.d.ts.map +1 -0
  216. package/dist/dashboard/static.js +54 -0
  217. package/dist/dashboard/static.js.map +1 -0
  218. package/dist/dashboard/types.d.ts +135 -0
  219. package/dist/dashboard/types.d.ts.map +1 -0
  220. package/dist/dashboard/types.js +2 -0
  221. package/dist/dashboard/types.js.map +1 -0
  222. package/dist/dashboard/web-start-endpoints.d.ts +32 -0
  223. package/dist/dashboard/web-start-endpoints.d.ts.map +1 -0
  224. package/dist/dashboard/web-start-endpoints.js +75 -0
  225. package/dist/dashboard/web-start-endpoints.js.map +1 -0
  226. package/dist/dashboard-bundle/assets/client-CbBRB9m4.js +9 -0
  227. package/dist/dashboard-bundle/assets/jsx-runtime-By8HlURe.js +1 -0
  228. package/dist/dashboard-bundle/assets/main-B98UOA3_.js +140 -0
  229. package/dist/dashboard-bundle/assets/main-ByRjbCiA.css +2 -0
  230. package/dist/dashboard-bundle/assets/module-v213KWfH.js +21 -0
  231. package/dist/dashboard-bundle/assets/react-CZI7_Jkm.js +1 -0
  232. package/dist/dashboard-bundle/assets/react-dom-cJyBB_A4.js +1 -0
  233. package/dist/dashboard-bundle/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  234. package/dist/dashboard-bundle/host/module.js +1 -0
  235. package/dist/dashboard-bundle/host/react-dom-client.js +1 -0
  236. package/dist/dashboard-bundle/host/react-dom.js +1 -0
  237. package/dist/dashboard-bundle/host/react-jsx-runtime.js +1 -0
  238. package/dist/dashboard-bundle/host/react.js +1 -0
  239. package/dist/dashboard-bundle/index.html +42 -0
  240. package/dist/dashboard-bundle/logo-animated.svg +34 -0
  241. package/dist/dashboard-bundle/logo.svg +16 -0
  242. package/dist/dashboard-rpc/context.d.ts +56 -0
  243. package/dist/dashboard-rpc/context.d.ts.map +1 -0
  244. package/dist/dashboard-rpc/context.js +106 -0
  245. package/dist/dashboard-rpc/context.js.map +1 -0
  246. package/dist/dashboard-rpc/control.d.ts +124 -0
  247. package/dist/dashboard-rpc/control.d.ts.map +1 -0
  248. package/dist/dashboard-rpc/control.js +284 -0
  249. package/dist/dashboard-rpc/control.js.map +1 -0
  250. package/dist/dashboard-rpc/devices.d.ts +9 -0
  251. package/dist/dashboard-rpc/devices.d.ts.map +1 -0
  252. package/dist/dashboard-rpc/devices.js +12 -0
  253. package/dist/dashboard-rpc/devices.js.map +1 -0
  254. package/dist/dashboard-rpc/events-tail.d.ts +68 -0
  255. package/dist/dashboard-rpc/events-tail.d.ts.map +1 -0
  256. package/dist/dashboard-rpc/events-tail.js +257 -0
  257. package/dist/dashboard-rpc/events-tail.js.map +1 -0
  258. package/dist/dashboard-rpc/events.d.ts +39 -0
  259. package/dist/dashboard-rpc/events.d.ts.map +1 -0
  260. package/dist/dashboard-rpc/events.js +47 -0
  261. package/dist/dashboard-rpc/events.js.map +1 -0
  262. package/dist/dashboard-rpc/index.d.ts +29 -0
  263. package/dist/dashboard-rpc/index.d.ts.map +1 -0
  264. package/dist/dashboard-rpc/index.js +40 -0
  265. package/dist/dashboard-rpc/index.js.map +1 -0
  266. package/dist/dashboard-rpc/models.d.ts +4 -0
  267. package/dist/dashboard-rpc/models.d.ts.map +1 -0
  268. package/dist/dashboard-rpc/models.js +8 -0
  269. package/dist/dashboard-rpc/models.js.map +1 -0
  270. package/dist/dashboard-rpc/modules.d.ts +45 -0
  271. package/dist/dashboard-rpc/modules.d.ts.map +1 -0
  272. package/dist/dashboard-rpc/modules.js +79 -0
  273. package/dist/dashboard-rpc/modules.js.map +1 -0
  274. package/dist/dashboard-rpc/preferences.d.ts +41 -0
  275. package/dist/dashboard-rpc/preferences.d.ts.map +1 -0
  276. package/dist/dashboard-rpc/preferences.js +65 -0
  277. package/dist/dashboard-rpc/preferences.js.map +1 -0
  278. package/dist/dashboard-rpc/projects.d.ts +85 -0
  279. package/dist/dashboard-rpc/projects.d.ts.map +1 -0
  280. package/dist/dashboard-rpc/projects.js +129 -0
  281. package/dist/dashboard-rpc/projects.js.map +1 -0
  282. package/dist/dashboard-rpc/quota.d.ts +4 -0
  283. package/dist/dashboard-rpc/quota.d.ts.map +1 -0
  284. package/dist/dashboard-rpc/quota.js +15 -0
  285. package/dist/dashboard-rpc/quota.js.map +1 -0
  286. package/dist/dashboard-rpc/reads.d.ts +185 -0
  287. package/dist/dashboard-rpc/reads.d.ts.map +1 -0
  288. package/dist/dashboard-rpc/reads.js +370 -0
  289. package/dist/dashboard-rpc/reads.js.map +1 -0
  290. package/dist/dashboard-rpc/relay-agent.d.ts +9 -0
  291. package/dist/dashboard-rpc/relay-agent.d.ts.map +1 -0
  292. package/dist/dashboard-rpc/relay-agent.js +21 -0
  293. package/dist/dashboard-rpc/relay-agent.js.map +1 -0
  294. package/dist/dashboard-rpc/relay-dispatch.d.ts +9 -0
  295. package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -0
  296. package/dist/dashboard-rpc/relay-dispatch.js +24 -0
  297. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -0
  298. package/dist/dashboard-rpc/stream-forward.d.ts +17 -0
  299. package/dist/dashboard-rpc/stream-forward.d.ts.map +1 -0
  300. package/dist/dashboard-rpc/stream-forward.js +38 -0
  301. package/dist/dashboard-rpc/stream-forward.js.map +1 -0
  302. package/dist/dashboard-rpc/test-context.d.ts +23 -0
  303. package/dist/dashboard-rpc/test-context.d.ts.map +1 -0
  304. package/dist/dashboard-rpc/test-context.js +43 -0
  305. package/dist/dashboard-rpc/test-context.js.map +1 -0
  306. package/dist/driver-names.d.ts +22 -0
  307. package/dist/driver-names.d.ts.map +1 -0
  308. package/dist/driver-names.js +29 -0
  309. package/dist/driver-names.js.map +1 -0
  310. package/dist/error-message.d.ts +8 -0
  311. package/dist/error-message.d.ts.map +1 -0
  312. package/dist/error-message.js +10 -0
  313. package/dist/error-message.js.map +1 -0
  314. package/dist/event-stream.d.ts +33 -0
  315. package/dist/event-stream.d.ts.map +1 -0
  316. package/dist/event-stream.js +104 -0
  317. package/dist/event-stream.js.map +1 -0
  318. package/dist/events.d.ts +236 -0
  319. package/dist/events.d.ts.map +1 -0
  320. package/dist/events.js +5 -0
  321. package/dist/events.js.map +1 -0
  322. package/dist/format-bytes.d.ts +3 -0
  323. package/dist/format-bytes.d.ts.map +1 -0
  324. package/dist/format-bytes.js +18 -0
  325. package/dist/format-bytes.js.map +1 -0
  326. package/dist/has-remote.d.ts +8 -0
  327. package/dist/has-remote.d.ts.map +1 -0
  328. package/dist/has-remote.js +10 -0
  329. package/dist/has-remote.js.map +1 -0
  330. package/dist/index.d.ts +42 -0
  331. package/dist/index.d.ts.map +1 -0
  332. package/dist/index.js +16 -0
  333. package/dist/index.js.map +1 -0
  334. package/dist/install.d.ts +31 -0
  335. package/dist/install.d.ts.map +1 -0
  336. package/dist/install.js +54 -0
  337. package/dist/install.js.map +1 -0
  338. package/dist/jsonl-tail.d.ts +59 -0
  339. package/dist/jsonl-tail.d.ts.map +1 -0
  340. package/dist/jsonl-tail.js +152 -0
  341. package/dist/jsonl-tail.js.map +1 -0
  342. package/dist/loopback-host.d.ts +20 -0
  343. package/dist/loopback-host.d.ts.map +1 -0
  344. package/dist/loopback-host.js +31 -0
  345. package/dist/loopback-host.js.map +1 -0
  346. package/dist/module-server.d.ts +56 -0
  347. package/dist/module-types/dashboard/components/DiffStat.d.ts +6 -0
  348. package/dist/module-types/dashboard/components/DriverModelMenu.d.ts +23 -0
  349. package/dist/module-types/dashboard/components/LinkActions.d.ts +26 -0
  350. package/dist/module-types/dashboard/components/Markdown.d.ts +4 -0
  351. package/dist/module-types/dashboard/components/SettingsRows.d.ts +37 -0
  352. package/dist/module-types/dashboard/components/StartAgentButton.d.ts +39 -0
  353. package/dist/module-types/dashboard/components/ui/badge.d.ts +2 -0
  354. package/dist/module-types/dashboard/components/ui/button.d.ts +10 -0
  355. package/dist/module-types/dashboard/components/ui/card.d.ts +5 -0
  356. package/dist/module-types/dashboard/components/ui/checkbox.d.ts +7 -0
  357. package/dist/module-types/dashboard/components/ui/dropdown-menu.d.ts +16 -0
  358. package/dist/module-types/dashboard/components/ui/input.d.ts +2 -0
  359. package/dist/module-types/dashboard/components/ui/option-label.d.ts +4 -0
  360. package/dist/module-types/dashboard/components/ui/popover.d.ts +8 -0
  361. package/dist/module-types/dashboard/components/ui/scroll-area.d.ts +10 -0
  362. package/dist/module-types/dashboard/components/ui/separator.d.ts +3 -0
  363. package/dist/module-types/dashboard/components/ui/skeleton.d.ts +2 -0
  364. package/dist/module-types/dashboard/components/ui/slider.d.ts +9 -0
  365. package/dist/module-types/dashboard/components/ui/tooltip.d.ts +11 -0
  366. package/dist/module-types/dashboard/lib/agent-settings.d.ts +2 -0
  367. package/dist/module-types/dashboard/lib/draft-handoff.d.ts +15 -0
  368. package/dist/module-types/dashboard/lib/format-date.d.ts +51 -0
  369. package/dist/module-types/dashboard/lib/host-services.d.ts +12 -0
  370. package/dist/module-types/dashboard/lib/models.d.ts +24 -0
  371. package/dist/module-types/dashboard/lib/route.d.ts +38 -0
  372. package/dist/module-types/dashboard/lib/rpc.d.ts +31 -0
  373. package/dist/module-types/dashboard/lib/use-action.d.ts +25 -0
  374. package/dist/module-types/dashboard/lib/use-async.d.ts +45 -0
  375. package/dist/module-types/dashboard/lib/use-modules.d.ts +79 -0
  376. package/dist/module-types/dashboard/lib/utils.d.ts +3 -0
  377. package/dist/module-types/dashboard/module/index.d.ts +335 -0
  378. package/dist/module-types/dashboard/rpc/models.d.ts +2 -0
  379. package/dist/module-types/dashboard/rpc/modules.d.ts +5 -0
  380. package/dist/module-types/src/agent-id.d.ts +12 -0
  381. package/dist/module-types/src/agent-locks.d.ts +2 -0
  382. package/dist/module-types/src/agent-view.d.ts +38 -0
  383. package/dist/module-types/src/bridge-browser.d.ts +216 -0
  384. package/dist/module-types/src/browser-stream.d.ts +19 -0
  385. package/dist/module-types/src/browser.d.ts +15 -0
  386. package/dist/module-types/src/built-in.d.ts +37 -0
  387. package/dist/module-types/src/client.d.ts +15 -0
  388. package/dist/module-types/src/cloud-run-state.d.ts +26 -0
  389. package/dist/module-types/src/dashboard/activity.d.ts +40 -0
  390. package/dist/module-types/src/dashboard/agent-handoff.d.ts +243 -0
  391. package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +157 -0
  392. package/dist/module-types/src/dashboard/bridge-question.d.ts +32 -0
  393. package/dist/module-types/src/dashboard/bridge-store.d.ts +178 -0
  394. package/dist/module-types/src/dashboard/cache.d.ts +46 -0
  395. package/dist/module-types/src/dashboard/content-type.d.ts +2 -0
  396. package/dist/module-types/src/dashboard/dashboard.d.ts +37 -0
  397. package/dist/module-types/src/dashboard/docs.d.ts +38 -0
  398. package/dist/module-types/src/dashboard/git-status.d.ts +43 -0
  399. package/dist/module-types/src/dashboard/http.d.ts +28 -0
  400. package/dist/module-types/src/dashboard/interventions.d.ts +66 -0
  401. package/dist/module-types/src/dashboard/keyed-watcher.d.ts +28 -0
  402. package/dist/module-types/src/dashboard/keys.d.ts +30 -0
  403. package/dist/module-types/src/dashboard/models.d.ts +24 -0
  404. package/dist/module-types/src/dashboard/module-host.d.ts +43 -0
  405. package/dist/module-types/src/dashboard/module-serve.d.ts +14 -0
  406. package/dist/module-types/src/dashboard/open-in-app.d.ts +42 -0
  407. package/dist/module-types/src/dashboard/open-questions.d.ts +44 -0
  408. package/dist/module-types/src/dashboard/overview.d.ts +77 -0
  409. package/dist/module-types/src/dashboard/projects.d.ts +100 -0
  410. package/dist/module-types/src/dashboard/pull-requests.d.ts +126 -0
  411. package/dist/module-types/src/dashboard/queue.d.ts +16 -0
  412. package/dist/module-types/src/dashboard/quota.d.ts +52 -0
  413. package/dist/module-types/src/dashboard/remote-run.d.ts +94 -0
  414. package/dist/module-types/src/dashboard/rpc-serve.d.ts +105 -0
  415. package/dist/module-types/src/dashboard/run-inbox.d.ts +30 -0
  416. package/dist/module-types/src/dashboard/types.d.ts +134 -0
  417. package/dist/module-types/src/dashboard-rpc/context.d.ts +55 -0
  418. package/dist/module-types/src/dashboard-rpc/control.d.ts +123 -0
  419. package/dist/module-types/src/dashboard-rpc/devices.d.ts +8 -0
  420. package/dist/module-types/src/dashboard-rpc/events-tail.d.ts +67 -0
  421. package/dist/module-types/src/dashboard-rpc/events.d.ts +38 -0
  422. package/dist/module-types/src/dashboard-rpc/index.d.ts +28 -0
  423. package/dist/module-types/src/dashboard-rpc/models.d.ts +3 -0
  424. package/dist/module-types/src/dashboard-rpc/modules.d.ts +44 -0
  425. package/dist/module-types/src/dashboard-rpc/preferences.d.ts +40 -0
  426. package/dist/module-types/src/dashboard-rpc/projects.d.ts +84 -0
  427. package/dist/module-types/src/dashboard-rpc/quota.d.ts +3 -0
  428. package/dist/module-types/src/dashboard-rpc/reads.d.ts +184 -0
  429. package/dist/module-types/src/dashboard-rpc/relay-agent.d.ts +8 -0
  430. package/dist/module-types/src/dashboard-rpc/stream-forward.d.ts +16 -0
  431. package/dist/module-types/src/driver-names.d.ts +21 -0
  432. package/dist/module-types/src/error-message.d.ts +7 -0
  433. package/dist/module-types/src/event-stream.d.ts +32 -0
  434. package/dist/module-types/src/events.d.ts +235 -0
  435. package/dist/module-types/src/format-bytes.d.ts +2 -0
  436. package/dist/module-types/src/has-remote.d.ts +7 -0
  437. package/dist/module-types/src/index.d.ts +41 -0
  438. package/dist/module-types/src/jsonl-tail.d.ts +58 -0
  439. package/dist/module-types/src/loopback-host.d.ts +19 -0
  440. package/dist/module-types/src/node-fs.d.ts +32 -0
  441. package/dist/module-types/src/open-choices.d.ts +14 -0
  442. package/dist/module-types/src/openagent-dir.d.ts +10 -0
  443. package/dist/module-types/src/openagent-gitignore.d.ts +11 -0
  444. package/dist/module-types/src/pick-directory.d.ts +29 -0
  445. package/dist/module-types/src/preference-defaults.d.ts +42 -0
  446. package/dist/module-types/src/project-commands.d.ts +23 -0
  447. package/dist/module-types/src/project-errors.d.ts +59 -0
  448. package/dist/module-types/src/project-hooks.d.ts +129 -0
  449. package/dist/module-types/src/project-modules.d.ts +49 -0
  450. package/dist/module-types/src/project-presets.d.ts +29 -0
  451. package/dist/module-types/src/project.d.ts +28 -0
  452. package/dist/module-types/src/publish-levels.d.ts +32 -0
  453. package/dist/module-types/src/quota-boundary.d.ts +64 -0
  454. package/dist/module-types/src/quota-poller.d.ts +82 -0
  455. package/dist/module-types/src/registry.d.ts +226 -0
  456. package/dist/module-types/src/store/agent-checkout.d.ts +53 -0
  457. package/dist/module-types/src/store/agent-store.d.ts +266 -0
  458. package/dist/module-types/src/store/branches.d.ts +163 -0
  459. package/dist/module-types/src/store/git-host.d.ts +113 -0
  460. package/dist/module-types/src/store/index.d.ts +9 -0
  461. package/dist/module-types/src/store/provided.d.ts +16 -0
  462. package/dist/module-types/src/store/queue.d.ts +45 -0
  463. package/dist/module-types/src/store/repository.d.ts +32 -0
  464. package/dist/module-types/src/store/run-record.d.ts +21 -0
  465. package/dist/module-types/src/store/runs.d.ts +107 -0
  466. package/dist/module-types/src/store/tickets.d.ts +72 -0
  467. package/dist/module-types/src/terminal.d.ts +3 -0
  468. package/dist/module-types/src/worktrees.d.ts +89 -0
  469. package/dist/module.css +50 -0
  470. package/dist/node-fs.d.ts +33 -0
  471. package/dist/node-fs.d.ts.map +1 -0
  472. package/dist/node-fs.js +57 -0
  473. package/dist/node-fs.js.map +1 -0
  474. package/dist/open-choices.d.ts +15 -0
  475. package/dist/open-choices.d.ts.map +1 -0
  476. package/dist/open-choices.js +31 -0
  477. package/dist/open-choices.js.map +1 -0
  478. package/dist/openagent-dir.d.ts +11 -0
  479. package/dist/openagent-dir.d.ts.map +1 -0
  480. package/dist/openagent-dir.js +11 -0
  481. package/dist/openagent-dir.js.map +1 -0
  482. package/dist/openagent-gitignore.d.ts +12 -0
  483. package/dist/openagent-gitignore.d.ts.map +1 -0
  484. package/dist/openagent-gitignore.js +19 -0
  485. package/dist/openagent-gitignore.js.map +1 -0
  486. package/dist/pick-directory.d.ts +30 -0
  487. package/dist/pick-directory.d.ts.map +1 -0
  488. package/dist/pick-directory.js +102 -0
  489. package/dist/pick-directory.js.map +1 -0
  490. package/dist/preference-defaults.d.ts +43 -0
  491. package/dist/preference-defaults.d.ts.map +1 -0
  492. package/dist/preference-defaults.js +34 -0
  493. package/dist/preference-defaults.js.map +1 -0
  494. package/dist/project-commands.d.ts +24 -0
  495. package/dist/project-commands.d.ts.map +1 -0
  496. package/dist/project-commands.js +57 -0
  497. package/dist/project-commands.js.map +1 -0
  498. package/dist/project-errors.d.ts +60 -0
  499. package/dist/project-errors.d.ts.map +1 -0
  500. package/dist/project-errors.js +51 -0
  501. package/dist/project-errors.js.map +1 -0
  502. package/dist/project-hooks.d.ts +130 -0
  503. package/dist/project-hooks.d.ts.map +1 -0
  504. package/dist/project-hooks.js +232 -0
  505. package/dist/project-hooks.js.map +1 -0
  506. package/dist/project-modules.d.ts +50 -0
  507. package/dist/project-modules.d.ts.map +1 -0
  508. package/dist/project-modules.js +110 -0
  509. package/dist/project-modules.js.map +1 -0
  510. package/dist/project-pass.d.ts +32 -0
  511. package/dist/project-pass.d.ts.map +1 -0
  512. package/dist/project-pass.js +45 -0
  513. package/dist/project-pass.js.map +1 -0
  514. package/dist/project-presets.d.ts +30 -0
  515. package/dist/project-presets.d.ts.map +1 -0
  516. package/dist/project-presets.js +74 -0
  517. package/dist/project-presets.js.map +1 -0
  518. package/dist/project.d.ts +29 -0
  519. package/dist/project.d.ts.map +1 -0
  520. package/dist/project.js +41 -0
  521. package/dist/project.js.map +1 -0
  522. package/dist/publish-levels.d.ts +33 -0
  523. package/dist/publish-levels.d.ts.map +1 -0
  524. package/dist/publish-levels.js +53 -0
  525. package/dist/publish-levels.js.map +1 -0
  526. package/dist/quota-boundary.d.ts +65 -0
  527. package/dist/quota-boundary.d.ts.map +1 -0
  528. package/dist/quota-boundary.js +135 -0
  529. package/dist/quota-boundary.js.map +1 -0
  530. package/dist/quota-poller.d.ts +83 -0
  531. package/dist/quota-poller.d.ts.map +1 -0
  532. package/dist/quota-poller.js +118 -0
  533. package/dist/quota-poller.js.map +1 -0
  534. package/dist/registry.d.ts +227 -0
  535. package/dist/registry.d.ts.map +1 -0
  536. package/dist/registry.js +364 -0
  537. package/dist/registry.js.map +1 -0
  538. package/dist/remove-files.d.ts +24 -0
  539. package/dist/remove-files.d.ts.map +1 -0
  540. package/dist/remove-files.js +98 -0
  541. package/dist/remove-files.js.map +1 -0
  542. package/dist/request-path.d.ts +10 -0
  543. package/dist/request-path.d.ts.map +1 -0
  544. package/dist/request-path.js +16 -0
  545. package/dist/request-path.js.map +1 -0
  546. package/dist/store/agent-checkout.d.ts +54 -0
  547. package/dist/store/agent-checkout.d.ts.map +1 -0
  548. package/dist/store/agent-checkout.js +61 -0
  549. package/dist/store/agent-checkout.js.map +1 -0
  550. package/dist/store/agent-store.d.ts +267 -0
  551. package/dist/store/agent-store.d.ts.map +1 -0
  552. package/dist/store/agent-store.js +190 -0
  553. package/dist/store/agent-store.js.map +1 -0
  554. package/dist/store/branches.d.ts +164 -0
  555. package/dist/store/branches.d.ts.map +1 -0
  556. package/dist/store/branches.js +187 -0
  557. package/dist/store/branches.js.map +1 -0
  558. package/dist/store/git-host.d.ts +114 -0
  559. package/dist/store/git-host.d.ts.map +1 -0
  560. package/dist/store/git-host.js +103 -0
  561. package/dist/store/git-host.js.map +1 -0
  562. package/dist/store/index.d.ts +10 -0
  563. package/dist/store/index.d.ts.map +1 -0
  564. package/dist/store/index.js +10 -0
  565. package/dist/store/index.js.map +1 -0
  566. package/dist/store/provided.d.ts +17 -0
  567. package/dist/store/provided.d.ts.map +1 -0
  568. package/dist/store/provided.js +37 -0
  569. package/dist/store/provided.js.map +1 -0
  570. package/dist/store/queue.d.ts +46 -0
  571. package/dist/store/queue.d.ts.map +1 -0
  572. package/dist/store/queue.js +61 -0
  573. package/dist/store/queue.js.map +1 -0
  574. package/dist/store/repository.d.ts +33 -0
  575. package/dist/store/repository.d.ts.map +1 -0
  576. package/dist/store/repository.js +25 -0
  577. package/dist/store/repository.js.map +1 -0
  578. package/dist/store/run-record.d.ts +22 -0
  579. package/dist/store/run-record.d.ts.map +1 -0
  580. package/dist/store/run-record.js +108 -0
  581. package/dist/store/run-record.js.map +1 -0
  582. package/dist/store/runs.d.ts +108 -0
  583. package/dist/store/runs.d.ts.map +1 -0
  584. package/dist/store/runs.js +146 -0
  585. package/dist/store/runs.js.map +1 -0
  586. package/dist/store/test-branches.d.ts +18 -0
  587. package/dist/store/test-branches.d.ts.map +1 -0
  588. package/dist/store/test-branches.js +59 -0
  589. package/dist/store/test-branches.js.map +1 -0
  590. package/dist/store/test-runs.d.ts +15 -0
  591. package/dist/store/test-runs.d.ts.map +1 -0
  592. package/dist/store/test-runs.js +37 -0
  593. package/dist/store/test-runs.js.map +1 -0
  594. package/dist/store/tickets.d.ts +73 -0
  595. package/dist/store/tickets.d.ts.map +1 -0
  596. package/dist/store/tickets.js +67 -0
  597. package/dist/store/tickets.js.map +1 -0
  598. package/dist/terminal.d.ts +4 -0
  599. package/dist/terminal.d.ts.map +1 -0
  600. package/dist/terminal.js +97 -0
  601. package/dist/terminal.js.map +1 -0
  602. package/dist/update-check.d.ts +44 -0
  603. package/dist/update-check.d.ts.map +1 -0
  604. package/dist/update-check.js +71 -0
  605. package/dist/update-check.js.map +1 -0
  606. package/dist/worktrees.d.ts +90 -0
  607. package/dist/worktrees.d.ts.map +1 -0
  608. package/dist/worktrees.js +123 -0
  609. package/dist/worktrees.js.map +1 -0
  610. package/package.json +103 -3
@@ -0,0 +1,178 @@
1
+ import type { BridgeEvent, BridgeHello, BridgeQuestion, BridgeSessionStatus } from './bridge-endpoints.js';
2
+ /**
3
+ * An answer picked in the dashboard, on its way back to the session (#1237).
4
+ *
5
+ * `queued` until the extension fetches it, delivers it into the composer and acknowledges;
6
+ * then `sent`, or `failed` with the extension's reason. The id is what the acknowledgement
7
+ * references, so a stale ack from a tab that died mid-delivery cannot resolve a newer answer.
8
+ */
9
+ export interface BridgeAnswer {
10
+ id: string;
11
+ sessionId: string;
12
+ /** The label(s) picked — one, or a `multi` question's subset (possibly none). */
13
+ labels: string[];
14
+ /**
15
+ * What the extension types into the session (#1554): the same continuation a local gate
16
+ * re-prompts with, so a cloud session hears its answer exactly as a local one does — and, on a
17
+ * `stop` pick, that the user is taking over, since nothing of ours can end a session over there.
18
+ */
19
+ text: string;
20
+ queuedAt: string;
21
+ /**
22
+ * When a Driver collected it to type (#1332). Two Drivers can serve one daemon — the user's own
23
+ * Chrome and the daemon's bridge browser — and an answer handed to both would be typed twice.
24
+ */
25
+ claimedAt?: string;
26
+ state: 'queued' | 'sent' | 'failed';
27
+ note?: string;
28
+ }
29
+ /** How long a collected answer stays with the Driver that collected it before it is offered again. */
30
+ export declare const ANSWER_CLAIM_TTL_MS = 90000;
31
+ /**
32
+ * The questions a Claude web session is parked on, keyed by its cloud session id (#1237).
33
+ *
34
+ * A cloud agent has no live local session to hang a choice gate on: #1231 ends the agent at the
35
+ * hand-off, so by the time the agent asks anything the agent is already `done`. The join back to
36
+ * an agent is `AgentMeta.sessionId`, which a web agent already carries because `CloudSession` reports
37
+ * the cloud id on its result.
38
+ *
39
+ * In memory on purpose. A question is only answerable while the session that asked it is still
40
+ * parked, and the bridge that reported it re-reports on reconnect, so surviving a daemon restart
41
+ * would preserve a question that may already have been answered elsewhere.
42
+ */
43
+ /** The last time anything spoke to the bridge, and how it went. */
44
+ export interface BridgeContact {
45
+ at: string;
46
+ route: string;
47
+ status: number;
48
+ }
49
+ /** The extension's last version claim, and whether the doorway turned it away (#1519). */
50
+ export interface BridgeVersion {
51
+ got: string;
52
+ expected: string;
53
+ blocked: boolean;
54
+ at: string;
55
+ }
56
+ /**
57
+ * What a cloud session is told when the user picks a `stop` option (#358, #1554). It lives on
58
+ * claude.ai where nothing of ours can end it, so the bridge types this instead of a continuation:
59
+ * the decision, and that the user is taking over from here.
60
+ */
61
+ export declare function takeoverPrompt(question: string, answer: string): string;
62
+ export declare class BridgeQuestions {
63
+ private readonly bySession;
64
+ private contact;
65
+ /**
66
+ * Note that something reached the bridge, whatever the outcome.
67
+ *
68
+ * Failures are recorded too, and that is the point: an extension that is misconfigured looks
69
+ * exactly like one that is not installed, because both leave no question behind. A refused
70
+ * request at least proves something is trying.
71
+ */
72
+ recordContact(route: string, status: number): void;
73
+ private versionState;
74
+ /**
75
+ * What version the extension last claimed and whether it was refused for it (#1519).
76
+ *
77
+ * The accepted claims are recorded too, which is what clears a blocked banner: the moment an
78
+ * updated extension gets through, the last word is no longer a refusal.
79
+ */
80
+ recordVersion(got: string, expected: string, blocked: boolean): void;
81
+ /** The last version claim, or undefined while nothing has stated one. */
82
+ version(): BridgeVersion | undefined;
83
+ private helloState;
84
+ /** What the injected page script last said about itself. */
85
+ recordHello(hello: BridgeHello): void;
86
+ /** The page script's last report, or undefined if none has ever arrived. */
87
+ hello(): BridgeHello | undefined;
88
+ /** The last contact, or undefined if nothing has ever reached the bridge. */
89
+ lastContact(): BridgeContact | undefined;
90
+ private readonly statusBySession;
91
+ /**
92
+ * What claude.ai's session list last said about a session (#1332), as the Driver tab read it.
93
+ *
94
+ * This is the read-back a web run's own record cannot give: the run ends at its hand-off, so
95
+ * the record says `done` whether the session is parked on its user or finished hours ago.
96
+ */
97
+ recordStatus(status: BridgeSessionStatus): void;
98
+ /** The session's last list status, or undefined while the Driver has never reported one. */
99
+ status(sessionId: string): BridgeSessionStatus | undefined;
100
+ /**
101
+ * Whether the session is waiting on a human: the bridge holds the question it is parked on, or
102
+ * claude.ai's list shows it awaiting input — a question asked in prose carries no block for
103
+ * the bridge to hold, and the list is the only thing that says the session stopped for it.
104
+ *
105
+ * A list status older than the session window no longer counts: the Driver stops reading a
106
+ * session past the window, so its last word would otherwise stand forever.
107
+ */
108
+ waiting(sessionId: string, now?: Date): boolean;
109
+ /**
110
+ * Whether an extension is around (#1328): something reached the bridge and was let in within
111
+ * the window. The worker polls every half minute while it lives, so a longer silence means
112
+ * there is nobody to drain a request.
113
+ */
114
+ extensionAlive(now?: Date, windowMs?: number): boolean;
115
+ private readonly eventsBySession;
116
+ /**
117
+ * Record one transcript entry, keyed by its position.
118
+ *
119
+ * Keyed rather than appended because the page is re-read on every DOM change, so the same
120
+ * message arrives repeatedly and a growing list would be mostly duplicates. Position also lets
121
+ * a later read replace an earlier one, which is what a message still being streamed needs.
122
+ */
123
+ recordEvent(event: BridgeEvent): void;
124
+ /** That session's transcript so far, in order. */
125
+ events(sessionId: string): BridgeEvent[];
126
+ private readonly answersBySession;
127
+ /** The fingerprint of the question each session's `sent` answer resolved. */
128
+ private readonly answeredBySession;
129
+ /**
130
+ * Record the question a session is parked on, replacing any earlier one for that session.
131
+ *
132
+ * A question identical to one an answer was already delivered for is dropped: the extension's
133
+ * worker forgets what it sent when it restarts, and the answered block stays in the page's DOM,
134
+ * so the same question would otherwise resurface as parked right after being answered.
135
+ */
136
+ record(question: BridgeQuestion): void;
137
+ /**
138
+ * Queue an answer picked in the dashboard (#1237). Refuses anything but labels of the question
139
+ * currently parked — exactly one unless the question is `multi` — so the only text this can
140
+ * ever put in a composer is composed from what the session itself offered.
141
+ */
142
+ queueAnswer(sessionId: string, labels: string[]): BridgeAnswer | string;
143
+ /** Withdraw a queued answer. Too late once a Driver has collected it or the extension has delivered it. */
144
+ cancelAnswer(sessionId: string, now?: number): boolean;
145
+ /** The answer waiting for the extension to deliver, if any — collected by a Driver or not. */
146
+ pendingAnswer(sessionId: string): BridgeAnswer | undefined;
147
+ /** Whether a Driver holds the answer: collected, and not so long ago that it is presumed lost. */
148
+ private claimed;
149
+ /**
150
+ * Hand the queued answer to the Driver asking, once (#1332): the next Driver asking within the
151
+ * claim's lifetime gets nothing, so a session served by two browsers is not answered twice. A
152
+ * claim nobody acknowledged — the Driver died mid-delivery — expires, and the answer is offered
153
+ * again.
154
+ */
155
+ claimAnswer(sessionId: string, now?: number): BridgeAnswer | undefined;
156
+ /**
157
+ * Every session with an answer waiting to be delivered. The Driver serves these whatever the
158
+ * session window says: the page reports whichever session the user is on, so a pick can be for
159
+ * a session no listed run carries, and one nothing serves would sit queued forever.
160
+ */
161
+ pendingAnswerSessions(): string[];
162
+ /** The session's answer in whatever state, for the dashboard to render. */
163
+ answer(sessionId: string): BridgeAnswer | undefined;
164
+ /**
165
+ * The extension's word on what happened to a delivery. On success the question is resolved:
166
+ * it is dropped, and re-reports of the same block are ignored (see {@link record}).
167
+ */
168
+ resolveAnswer(sessionId: string, id: string, ok: boolean, note?: string): void;
169
+ /** The question that session is parked on, if the bridge has reported one. */
170
+ get(sessionId: string): BridgeQuestion | undefined;
171
+ /** Every parked question, newest first. */
172
+ list(): BridgeQuestion[];
173
+ /** Drop a session's question, once it is answered or its agent is gone. */
174
+ clear(sessionId: string): void;
175
+ }
176
+ export declare function bridgeQuestions(): BridgeQuestions;
177
+ /** Replace the store. Tests only: a module singleton would otherwise leak between them. */
178
+ export declare function resetBridgeQuestions(): void;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * A read-through cache for the dashboard's slow reads (#1028).
3
+ *
4
+ * The dashboard polls. Every session view asks for its branch's PR, twice (the worktree bar and
5
+ * the handoff summary), on every navigation and again every ten seconds — and a git host read costs
6
+ * about 600ms against a local git read's ten. So the same answer was being bought over and over,
7
+ * and the panel waited for it each time.
8
+ *
9
+ * Three behaviours, and each one is load-bearing:
10
+ * - **single flight** — concurrent asks for the same key share one call, so two panels and a
11
+ * poll tick do not become three subprocesses
12
+ * - **stale while revalidate** — once a value exists it is returned immediately, and refreshed
13
+ * in the background when it is older than `ttlMs`; nobody waits twice for the same answer
14
+ * - **a budget on the cold ask** — the first ask waits only `budgetMs` for the answer before
15
+ * reporting `pending`, so a slow lookup delays one panel's extra detail rather than the page
16
+ *
17
+ * `pending` is not "failed": it means the answer is on its way and the next read will have it.
18
+ * A caller that must not act on a half-answer (offering to open a PR that may already exist)
19
+ * uses it to hold off.
20
+ */
21
+ /** What a cached read answers with: the value, and whether it is still being fetched. */
22
+ export interface Cached<T> {
23
+ value: T | undefined;
24
+ /** True when no value is known yet and a read is still running. */
25
+ pending: boolean;
26
+ }
27
+ /** Clock seam, so the tests do not sleep. */
28
+ export type Now = () => number;
29
+ export interface CacheOptions {
30
+ /** How old a value may be before a background refresh is started. */
31
+ ttlMs?: number;
32
+ /** How long a first, uncached ask waits before reporting `pending`. */
33
+ budgetMs?: number;
34
+ now?: Now;
35
+ }
36
+ /**
37
+ * Read `key` through the cache, calling `load` when it is missing or stale.
38
+ *
39
+ * A failed load is not cached: it leaves whatever was there (a panel keeps showing the last PR it
40
+ * knew about rather than dropping it because the git host hiccuped) and the next read tries again.
41
+ */
42
+ export declare function cachedRead<T>(key: string, load: () => Promise<T>, options?: CacheOptions): Promise<Cached<T>>;
43
+ /** Drop what is cached under `key`, so the next read is a fresh one. */
44
+ export declare function invalidate(key: string): void;
45
+ /** Test seam: forget everything. */
46
+ export declare function clearCache(): void;
@@ -0,0 +1,2 @@
1
+ /** The content type for a file path (by its extension), or `application/octet-stream`. */
2
+ export declare function contentTypeFor(path: string): string;
@@ -0,0 +1,37 @@
1
+ import type { ProjectSummary } from './projects.js';
2
+ import { type ProjectQueue } from './queue.js';
3
+ import { type ActiveAgent, type OverviewDeps } from './overview.js';
4
+ /** One project's rollup row. */
5
+ export interface ProjectStat {
6
+ projectId: string;
7
+ /** Whether the repo has any ticket in `tickets/` (#958) — presence only, not a count. */
8
+ hasTickets: boolean;
9
+ /** Whether one of the project's packages provides tickets at all (#1774): without one, there is nothing to populate. */
10
+ providesTickets: boolean;
11
+ }
12
+ /** The dashboard page payload (#471). */
13
+ export interface DashboardData {
14
+ totals: {
15
+ projects: number;
16
+ openTodos: number;
17
+ };
18
+ /** Agents going right now, most-recently-updated first (from {@link buildOverview}). */
19
+ active: ActiveAgent[];
20
+ /** Every registered project, most-recently-active first. */
21
+ projects: ProjectStat[];
22
+ /** The per-project agent queue (from {@link collectQueue}): the projects that have one, with their open entries. */
23
+ queue: ProjectQueue[];
24
+ }
25
+ /** Injectable readers so {@link buildDashboard} is unit-testable off disk. */
26
+ export interface DashboardDeps extends OverviewDeps {
27
+ /** Whether a project has tickets (#958). Defaults to the provider's list being non-empty (false on any error). */
28
+ tickets?: (cwd: string) => Promise<boolean>;
29
+ /** Whether a project's packages provide tickets (#1774). Defaults to the provider lookup (false on any error). */
30
+ providesTickets?: (cwd: string) => Promise<boolean>;
31
+ }
32
+ /**
33
+ * Build the Overview dashboard: the {@link buildOverview} rollup (working now / queue) plus the
34
+ * per-project ticket presence the onboarding checklist reads. Forgiving — a project whose state
35
+ * cannot be read simply contributes nothing.
36
+ */
37
+ export declare function buildDashboard(projects: ProjectSummary[], deps?: DashboardDeps): Promise<DashboardData>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The plan/backlog document categories the dashboard surfaces in its sidebar
3
+ * (#319, part of the MVP UI #309), so the human can read them beside the agent.
4
+ *
5
+ * These are written per session as `PLAN_<SESSION>.agent.md` (the plan for now) and
6
+ * `TODO_<SESSION>.agent.md` (the backlog), where SESSION is a git-branch slug — by
7
+ * OpenAgent's own system prompt back when it ran the agent (#323/#326), and by
8
+ * whatever a project's own skills tell an agent to write now. The flat fallback is `PLAN.md`
9
+ * at the root; the `TODO` category has no flat file: the agent queue is not a document of the
10
+ * checkout but a project package's data, and the dashboard shows it on that package's own page
11
+ * and the Overview's AI Queue card (#1774), not here. Scoped and flat-root names are matched
12
+ * against a flat readdir of the root, never taken from user input, so there is no path
13
+ * traversal to guard against.
14
+ */
15
+ export declare const DOC_CATEGORIES: readonly [{
16
+ readonly flat: 'PLAN.md';
17
+ readonly scoped: RegExp;
18
+ }, {
19
+ readonly scoped: RegExp;
20
+ }];
21
+ /** One surfaced document: its filename and current contents. */
22
+ export interface WorkspaceDoc {
23
+ name: string;
24
+ content: string;
25
+ }
26
+ /**
27
+ * The workspace-root filenames to surface, in sidebar order: per category the flat
28
+ * file (if present) then its session-scoped files (sorted). Every name is a bare
29
+ * readdir entry matched against a fixed pattern, so none can traverse. Returns
30
+ * empty when the workspace is missing or unreadable.
31
+ */
32
+ /**
33
+ * Read the surfaced plan/todo docs, in sidebar order: per category the flat file (if the
34
+ * category has one and it is present) then its session-scoped files (sorted), every one a
35
+ * workspace-root file. Missing or blank files are skipped; a file over the size cap is
36
+ * truncated. Never throws — a read error just omits that doc.
37
+ */
38
+ export declare function readDocs(cwd: string): Promise<WorkspaceDoc[]>;
@@ -0,0 +1,43 @@
1
+ import { type GitRunner } from '@openagt/agent-data';
2
+ import { type LinkedPr, type PrLookup } from './pull-requests.js';
3
+ /** A project's git status for the panel. */
4
+ export interface GitStatus {
5
+ branch: string;
6
+ /** Uncommitted changes present. */
7
+ dirty: boolean;
8
+ pr?: LinkedPr;
9
+ /** The PR is not known yet, rather than absent (#1028): the lookup is still running. */
10
+ prPending?: boolean;
11
+ }
12
+ /** Injectable seams so {@link readGitStatus} is unit-testable off disk. */
13
+ export interface GitStatusDeps {
14
+ git?: GitRunner;
15
+ pr?: PrLookup;
16
+ /**
17
+ * The agent's start, when the status is read for an agent's checkout (#1255). The default lookup
18
+ * answers the newest PR for the branch *in any state* — so an agent on a reused pinned branch
19
+ * (`openagent/triage-quick`) wears a predecessor's merged PR as its own badge.
20
+ * With `since` set the PR is picked from the branch's whole history by {@link pickAgentPr}
21
+ * instead: an open PR, or a closed one no older than the agent itself.
22
+ */
23
+ since?: string;
24
+ /** The branch's full PR history, for the {@link GitStatusDeps.since} path (default {@link cachedPrsForBranch}). */
25
+ prs?: (cwd: string, branch: string) => Promise<LinkedPr[]>;
26
+ /**
27
+ * The project's folder, for a status read in a run's checkout: the branch's PR history is looked
28
+ * up and cached by it, as the run's handoff reads it, so the lookup the bar made while the run
29
+ * worked is warm once the run ends and its Open PR is asked about.
30
+ */
31
+ prRoot?: string;
32
+ }
33
+ /**
34
+ * The branch `cwd` has checked out, by its short name; `HEAD` when it is on no branch. Undefined
35
+ * when `cwd` is not a git repo, or git failed.
36
+ */
37
+ export declare function currentBranch(cwd: string, git?: GitRunner): Promise<string | undefined>;
38
+ /**
39
+ * Read a project's git status: the current branch and dirty flag (from git), plus the linked
40
+ * PR (best-effort). Returns undefined when the path is not a git repo. Forgiving — a failed
41
+ * `git status` reads as clean, and a failed PR lookup simply omits the PR.
42
+ */
43
+ export declare function readGitStatus(cwd: string, deps?: GitStatusDeps): Promise<GitStatus | undefined>;
@@ -0,0 +1,28 @@
1
+ import type { IncomingMessage, ServerResponse } from 'node:http';
2
+ /**
3
+ * The plumbing every one of the daemon's non-RPC HTTP surfaces shares: the browser bridge
4
+ * (`/_bridge`), the web-start queue (`/_web-start`) and the device relay (`/_relay`).
5
+ *
6
+ * All three answer plain-text statuses, JSON payloads, and read capped JSON request bodies, and
7
+ * each carried its own copy — two body readers that differed only in which message they rejected
8
+ * with, and three identical status responders.
9
+ */
10
+ /** Answer with a plain-text status line. */
11
+ export declare function end(res: ServerResponse, status: number, message: string, headers?: Record<string, string>): void;
12
+ /** Answer with a JSON payload. */
13
+ export declare function sendJson(res: ServerResponse, payload: unknown, status?: number): void;
14
+ /**
15
+ * Read a JSON body, refusing anything past the cap rather than buffering it. Rejects with
16
+ * `body too large` on overflow and `body must be JSON` on anything unparseable — the messages the
17
+ * bridge and web-start routes answer 400 with, so a caller learns which of the two it hit.
18
+ */
19
+ export declare function readJsonBody(req: IncomingMessage, maxBytes: number): Promise<unknown>;
20
+ /**
21
+ * The preamble every POST route runs: refuse a non-POST, then read the body. Answers the request
22
+ * itself on either failure and resolves `undefined`, so a caller's whole check is
23
+ * `const body = await readPost(...); if (body === undefined) return`. JSON has no `undefined`, so
24
+ * the sentinel cannot collide with a body that parsed.
25
+ */
26
+ export declare function readPost(req: IncomingMessage, res: ServerResponse, maxBytes: number): Promise<unknown>;
27
+ /** Refuse anything but a GET, answering 405 itself. `false` means the request is already answered. */
28
+ export declare function requireGet(req: IncomingMessage, res: ServerResponse): boolean;
@@ -0,0 +1,66 @@
1
+ import { type LiveAgent, type AgentMeta } from '../store/index.js';
2
+ import type { OpenAgentEvent } from '../events.js';
3
+ import type { ProjectSummary, ProjectionRead } from './projects.js';
4
+ import { type BranchesFor } from '../store/branches.js';
5
+ import { type PrLister } from './pull-requests.js';
6
+ export { interventionKey } from './keys.js';
7
+ /**
8
+ * One item awaiting the human. Two kinds: an open `pr` to review/merge or close, and an
9
+ * `awaiting` run paused on a choice gate. The card and the browser hook both iterate the flat
10
+ * list, branching on `kind` for the fields that differ.
11
+ */
12
+ export interface Intervention {
13
+ projectId: string;
14
+ projectName: string;
15
+ /**
16
+ * `pr` = an open PR to review/merge or close; `awaiting` = a run waiting on the question it ended on (#636/#1774);
17
+ * `unpushed` = a finished agent whose branch has commits that were never pushed (#860).
18
+ */
19
+ kind: 'pr' | 'awaiting' | 'unpushed';
20
+ title: string;
21
+ /** The PR on the git host (`pr` only): where a click takes the user. */
22
+ url?: string;
23
+ /** The PR number (`pr` only). */
24
+ number?: number;
25
+ /** The question's id (`awaiting` only) — its stable identity, so it notifies exactly once. */
26
+ awaitId?: string;
27
+ /** Which run this is about (`awaiting` #738 / `unpushed`): a project has several agents. */
28
+ agentId?: string;
29
+ /** The branch the work is sitting on (`unpushed` only). */
30
+ branch?: string;
31
+ /** How many commits are waiting (`unpushed` only). */
32
+ commits?: number;
33
+ /** When the PR was opened (`pr`) or the agent last updated (the other two), ISO, for ordering. */
34
+ createdAt?: string;
35
+ }
36
+ /** Injectable seam so {@link buildInterventions} is unit-testable off disk. */
37
+ export interface InterventionsDeps {
38
+ prs?: PrLister;
39
+ /** The reader of the runs that have a checkout (default {@link readLiveMetas}): a waiting run keeps its own; drives the `awaiting` source (#636). */
40
+ liveAgents?: (cwd: string) => Promise<LiveAgent[]>;
41
+ /** One run's events, by the project's path and the run's id (default {@link loadAgentEvents}): where a waiting run's question is read. */
42
+ events?: (cwd: string, agentId: string) => Promise<OpenAgentEvent[] | undefined>;
43
+ /** The finished-agent reader (default {@link listAgents}); drives the `unpushed` source (#860). */
44
+ agents?: (cwd: string) => Promise<AgentMeta[]>;
45
+ /** The project's checkouts and branches (default the project's provider, {@link projectBranches}): where a branch's state is read; drives the `unpushed` source (#860). */
46
+ branches?: BranchesFor;
47
+ /**
48
+ * How many of a project's most recent finished agents to inspect for unpushed work. Each one costs
49
+ * a handful of git reads, and this runs on a poll, so old history is not re-walked every minute:
50
+ * work that has sat unpushed for dozens of agents is not news, and the agent list stays the record.
51
+ */
52
+ handoffLimit?: number;
53
+ }
54
+ /**
55
+ * Build the cross-project interventions queue: every registered project's open PRs, plus any run
56
+ * currently paused on a choice gate (#636), newest first. Forgiving — a project with no remote
57
+ * (or an unreadable one) simply contributes nothing. Hand-opened draft PRs are excluded: they are
58
+ * not yet asking for review. A draft on an agent's branch is not (#1102): an agent publishes a
59
+ * draft when a person should look first, and cloud work adoption opens its PRs as drafts.
60
+ *
61
+ * Which projects were read whole comes back alongside the items (#1623): forgiveness here is what
62
+ * lets one unreachable project keep the queue useful, and it is also what would let that project's
63
+ * whole backlog announce itself as new the moment it came back. The queue's panels ignore this;
64
+ * the notification watcher is the caller that cannot.
65
+ */
66
+ export declare function buildInterventions(projects: ProjectSummary[], deps?: InterventionsDeps): Promise<ProjectionRead<Intervention>>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Tracks which items have been announced, so only new ones notify. Identity is the caller's
3
+ * (`keyOf`), since what makes two items "the same" is a property of what is being watched.
4
+ * Testable without timers.
5
+ *
6
+ * The baseline is kept per project (`scopeOf`), not once for the whole poll (#1623). A poll that
7
+ * reached three projects out of four knows what already existed on those three and knows nothing
8
+ * about the fourth, and announcing is a per-project decision anyway. Held globally, one project
9
+ * that can never be read — a registered repo with no remote is an ordinary case — would either
10
+ * silence every project's notifications or hand the whole set a baseline it had not earned.
11
+ */
12
+ export declare class SeenTracker<T> {
13
+ private readonly keyOf;
14
+ private readonly scopeOf;
15
+ private readonly seen;
16
+ private readonly warmedUp;
17
+ constructor(keyOf: (item: T) => string, scopeOf: (item: T) => string);
18
+ /**
19
+ * Fold a poll's items into the baseline and return the ones worth announcing: the items not seen
20
+ * before, from projects this watcher has a real baseline for. `whole` names the projects the poll
21
+ * read completely, and only those earn a baseline — so whatever already existed at start-up is
22
+ * never announced, and a project that could not be read stays quiet until it can be.
23
+ *
24
+ * Items keep being folded in either way: a partial read can only under-report, never invent, so
25
+ * anything it did see is still something the user should not later hear about as new.
26
+ */
27
+ observe(items: T[], whole: Iterable<string>): T[];
28
+ }
@@ -0,0 +1,30 @@
1
+ import type { Activity } from './activity.js';
2
+ import type { Intervention } from './interventions.js';
3
+ /**
4
+ * The stable identity of a watched item, which the browser notifications dedupe on.
5
+ *
6
+ * A leaf module on purpose: `activity.ts` and `interventions.ts` build their items by reading the
7
+ * store, so they import `node:*` and cannot be reached from the browser bundle. These functions
8
+ * are pure and depend on nothing but the item, so they live here and are re-exported from
9
+ * `client.ts` — which is what lets the dashboard share them instead of keeping a copy that could
10
+ * drift from the item types.
11
+ *
12
+ * The type imports are erased at compile time, so they add no edge to the graph `client.test.ts`
13
+ * walks.
14
+ */
15
+ /**
16
+ * The stable identity of an intervention. A PR is its url (survives title edits and re-sorts);
17
+ * the other two have no url and are keyed on the project plus the thing waiting — the agent and
18
+ * the gate it is parked on, or the agent whose branch is unpushed.
19
+ *
20
+ * The agent is part of the awaiting key because a gate id is only unique within its own agent:
21
+ * every agent's first gate is `await-choices`. Two agents running in one project (#736) and both
22
+ * parked would otherwise share one identity, and the dedupe would announce only one of them.
23
+ */
24
+ export declare function interventionKey(item: Intervention): string;
25
+ /**
26
+ * The stable identity of an activity item: its kind + project + run. The kind is part of the key
27
+ * so an agent's `started` and `finished` are two separate announcements (one when it kicks off, one
28
+ * when it lands), each firing exactly once.
29
+ */
30
+ export declare function activityKey(item: Activity): string;
@@ -0,0 +1,24 @@
1
+ import type { Driver, DriverModel } from '@openagt/agent-driver';
2
+ import { type DriverName } from '../driver-names.js';
3
+ /** What one coding agent offers: its models, or why it could not say. */
4
+ export type DriverModels = {
5
+ models: DriverModel[];
6
+ } | {
7
+ models: [];
8
+ error: string;
9
+ };
10
+ /** The models of every coding agent a person can pick, by driver. */
11
+ export type ModelsView = Record<DriverName, DriverModels>;
12
+ /** Where the dashboard reads which models each coding agent offers. */
13
+ export interface ModelsSource {
14
+ read(): Promise<ModelsView>;
15
+ }
16
+ /**
17
+ * Ask each coding agent for its models, once: the first read asks, every later read answers from
18
+ * what it said, for the daemon's life. The list changes only with a new CLI version or a new
19
+ * login, and each question starts a CLI, so a menu opened again never waits on one. An agent that
20
+ * could not say is asked again at the next read, so a CLI installed or logged in since is found.
21
+ */
22
+ export declare function cachedModelsSource(drivers: Record<DriverName, Pick<Driver, 'listModels'>>): ModelsSource;
23
+ /** The daemon's own source: the coding agents on this machine, asked as the person's own login. */
24
+ export declare function defaultModelsSource(): ModelsSource;
@@ -0,0 +1,43 @@
1
+ import { type BranchesFor } from '../store/index.js';
2
+ import { type LinkedPr } from './pull-requests.js';
3
+ import type { Cached } from './cache.js';
4
+ import type { ModuleServerHost } from '../module-server.js';
5
+ /** What {@link serverHost} reads through; each defaults to the production reader. */
6
+ export interface ServerHostDeps {
7
+ branches?: BranchesFor;
8
+ agent?: (root: string, agentId: string) => Promise<{
9
+ id: string;
10
+ status?: string;
11
+ host?: string;
12
+ branch?: string;
13
+ pr?: {
14
+ number: number;
15
+ };
16
+ base?: string;
17
+ baseCommit?: string;
18
+ landed?: string;
19
+ } | undefined>;
20
+ /** This machine's name, against a run's `host`. */
21
+ host?: string;
22
+ prs?: (root: string, branch: string) => Promise<Cached<LinkedPr[]>>;
23
+ }
24
+ /** The host a read of the project at `root` is given. */
25
+ export declare function serverHost(root: string, deps?: ServerHostDeps): ModuleServerHost;
26
+ /** How large the input of one read may be, as JSON: what a page asks with, never a payload. */
27
+ export declare const MAX_READ_INPUT: number;
28
+ /** How long one read may take before it answers an error instead. */
29
+ export declare const READ_TIMEOUT_MS = 20000;
30
+ /** What a read answered: its JSON, or why there is none. */
31
+ export type ModuleReadResult = {
32
+ ok: true;
33
+ output: unknown;
34
+ } | {
35
+ ok: false;
36
+ error: string;
37
+ };
38
+ /**
39
+ * Call read `name` of the server part at `file` with `host` and `input`. Refused: a part that did
40
+ * not load, a read it does not have, an input that is not an object or is too large. A read that
41
+ * throws or runs past {@link READ_TIMEOUT_MS} answers an error; nothing a read does stops the daemon.
42
+ */
43
+ export declare function callModuleRead(file: string, name: string, host: ModuleServerHost, input: unknown, timeoutMs?: number): Promise<ModuleReadResult>;
@@ -0,0 +1,14 @@
1
+ import type { IncomingMessage, ServerResponse } from 'node:http';
2
+ import { type ProjectsProvider } from './projects.js';
3
+ import { type ProjectModule } from '../project-modules.js';
4
+ /** Where module files are served: `/_modules/<project id>/<package>/<file>`, each segment encoded. */
5
+ export declare const MODULES_PREFIX = "/_modules";
6
+ /** The URL a module's browser part is served at from one project. */
7
+ export declare function moduleUrl(projectId: string, module: Pick<ProjectModule, 'package' | 'entry'>): string;
8
+ /**
9
+ * Serve one module file (#1774): the project must be registered, the package must be a module of
10
+ * that project, and the file must sit inside the module's browser part's own directory. Anything else is a
11
+ * 404, never a fallback: a module URL is asked for by the dashboard's loader, not typed by a person.
12
+ * Served as `no-cache`, since a module is rebuilt in place under the same name.
13
+ */
14
+ export declare function serveModuleFile(req: IncomingMessage, res: ServerResponse, pathname: string, projects?: ProjectsProvider): Promise<void>;
@@ -0,0 +1,42 @@
1
+ /** Which app to open the project in. */
2
+ export type OpenTarget = 'files' | 'editor';
3
+ /** A known editor: its launcher CLI plus a human label for the picker (#727). */
4
+ export interface EditorInfo {
5
+ bin: string;
6
+ label: string;
7
+ }
8
+ /**
9
+ * The editors the picker can offer (#727), probed by their CLI launcher on PATH. Order is the
10
+ * display order. `$OPENAGENT_EDITOR` and a hand-typed value stay valid beyond this list; this is
11
+ * only what auto-detection looks for.
12
+ */
13
+ export declare const KNOWN_EDITORS: EditorInfo[];
14
+ /** Whether an editor launcher is installed (on PATH). A seam so detection is unit-testable. */
15
+ export type EditorProbe = (bin: string) => Promise<boolean>;
16
+ /** The installed subset of {@link KNOWN_EDITORS}, in display order (#727). */
17
+ export declare function detectEditors(probe?: EditorProbe): Promise<EditorInfo[]>;
18
+ /** The outcome of an open attempt. */
19
+ export type OpenResult = {
20
+ ok: true;
21
+ } | {
22
+ ok: false;
23
+ error: string;
24
+ };
25
+ /** Spawns a command, resolving once it launches (not on exit) and rejecting if it can't start. */
26
+ export type SpawnRunner = (command: string, args: string[]) => Promise<void>;
27
+ /** The OS command that reveals a path in the file manager. */
28
+ export declare function fileManagerCommand(path: string, os?: NodeJS.Platform): {
29
+ command: string;
30
+ args: string[];
31
+ };
32
+ /** The command to open a path in an editor: `$OPENAGENT_EDITOR` when set, else the VS Code CLI. */
33
+ export declare function editorCommand(path: string, editor?: string | undefined): {
34
+ command: string;
35
+ args: string[];
36
+ };
37
+ /**
38
+ * Open the project at `cwd` in the file manager or an editor. Failures are values, never throws.
39
+ * `editor` (#727) is the stored preference; when unset {@link editorCommand} falls back to
40
+ * `$OPENAGENT_EDITOR`, then `code`.
41
+ */
42
+ export declare function openInApp(cwd: string, target: OpenTarget, agent?: SpawnRunner, editor?: string): Promise<OpenResult>;