@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,335 @@
1
+ import { type ComponentType } from 'react';
2
+ import type { AgentStatus } from '../../src/index.js';
3
+ import type { ModuleCommandResult, ModuleReadResult } from '../rpc/modules.js';
4
+ export type { ModuleCommandResult, ModuleReadResult, AgentStatus };
5
+ /** A registered project that has the module's package, as a page gets it. */
6
+ export interface ModuleProject {
7
+ id: string;
8
+ name: string;
9
+ /** Whether one of the project's packages provides a git host; without one no pull request can be opened there. */
10
+ gitHost: boolean;
11
+ }
12
+ /**
13
+ * What a module page is rendered with. A page reads its sub-path and navigates within itself
14
+ * through {@link ModuleHost.openPage}; the dashboard's own pages reach it the same way, by the
15
+ * link convention below.
16
+ *
17
+ * A link into a project's files (`ModuleLink.href` such as `tickets/2026-01-01_x.md`) opens the
18
+ * mounted page named by its first segment, at `/<segment>/<projectId>/<rest…>`: the path a page
19
+ * gets for it is `[projectId, ...rest]`. So a page that shows one project's file under its own
20
+ * segment is where every such link in the dashboard lands, and the dashboard names no page.
21
+ */
22
+ export interface ModulePageProps {
23
+ /** The registered projects whose dependencies include the module's package, in the registry's order. */
24
+ projects: ModuleProject[];
25
+ /** The URL's segments after the page's own, decoded: `/logs/a` gives `['a']`. */
26
+ path: string[];
27
+ }
28
+ /** A page a module adds: its own URL segment and its row in the sidebar. */
29
+ export interface ModulePage {
30
+ /** The page's URL, `/<segment>`: a lowercase letter, then lowercase letters and digits (never a project's id, which always has a dash). */
31
+ segment: string;
32
+ /** The sidebar row's label. */
33
+ label: string;
34
+ /** The sidebar row's icon; a generic one when absent. */
35
+ icon?: ComponentType<{
36
+ className?: string;
37
+ 'aria-hidden'?: boolean;
38
+ }>;
39
+ /** The page itself. */
40
+ Page: ComponentType<ModulePageProps>;
41
+ }
42
+ /**
43
+ * A link a dashboard page shows (#1774): the name of some work and where it points. What a
44
+ * {@link LinkAction} is given. The dashboard knows nothing of what the link names; the page that
45
+ * shows it does, and says so in these three fields.
46
+ */
47
+ export interface ModuleLink {
48
+ /** The link's text: the name of the work. */
49
+ text: string;
50
+ /**
51
+ * Where the link points: a path inside the project's repository (`tickets/2026-01-01_x.md`) or an
52
+ * absolute URL. Absent for plain text that names work without pointing anywhere.
53
+ */
54
+ href?: string;
55
+ /** How urgent the page says the work is, 0 (only if capacity) to 10 (critical); absent when the page does not say. */
56
+ priority?: number;
57
+ }
58
+ /** What a link action did: done, or stopped, with the reason the action or its command gave. */
59
+ export type LinkActionResult = {
60
+ ok: true;
61
+ } | {
62
+ ok: false;
63
+ error: string;
64
+ };
65
+ /**
66
+ * An action a module offers on the links dashboard pages show (#1774): one verb, done by the
67
+ * module package's own command. The dashboard shows it as a button beside any link whose project
68
+ * has the module's package, with no page naming the module: the page shows links, the module acts
69
+ * on links, the dashboard puts the two together.
70
+ */
71
+ export interface LinkAction {
72
+ /** The button's label, a short verb phrase: "Add to queue". */
73
+ label: string;
74
+ /** What the button says once the action is done: "Queued". The label with a check mark otherwise. */
75
+ doneLabel?: string;
76
+ /** The button's icon; none otherwise. */
77
+ icon?: ComponentType<{
78
+ className?: string;
79
+ 'aria-hidden'?: boolean;
80
+ }>;
81
+ /**
82
+ * Act on the links, in the order given, all in one project. `host` runs the module package's
83
+ * own commands in that project. A batch stops at its first failure and says why.
84
+ */
85
+ run(host: ModuleHost, projectId: string, links: ModuleLink[]): Promise<LinkActionResult>;
86
+ }
87
+ /** What a module card is rendered with: the projects that have its package, never none: the card is not drawn then. With a project picked in the dashboard, that project alone. A card has no URL and no sub-path. */
88
+ export interface ModuleCardProps {
89
+ /** The registered projects that have the module's package, in the registry's order; with a project picked in the dashboard, that project alone. Never empty. */
90
+ projects: ModuleProject[];
91
+ }
92
+ /**
93
+ * A card a module adds to the Overview (#1818): the package's own summary of its data across the
94
+ * projects that have it, drawn beside the dashboard's own cards. Drawn only when one of the
95
+ * projects the Overview shows has the package: with a project picked, only when that project has it.
96
+ */
97
+ export interface ModuleCard {
98
+ /** Which card this is, for the shell's key and its error line; never shown as a title. */
99
+ id: string;
100
+ /** Its place among every installed package's cards, lower first; 50 when unsaid, ties by package name. */
101
+ order?: number;
102
+ /** The card itself. */
103
+ Card: ComponentType<ModuleCardProps>;
104
+ }
105
+ /** What a Settings section is rendered with: the projects that have its package. */
106
+ export interface ModuleSettingsProps {
107
+ /** The registered projects whose dependencies include the module's package, in the registry's order. */
108
+ projects: ModuleProject[];
109
+ }
110
+ /**
111
+ * A section a module adds to the Settings page: the package's own settings, read and written
112
+ * through its own command, drawn after the dashboard's own sections. A package with no projects
113
+ * registered shows none.
114
+ */
115
+ export interface ModuleSettings {
116
+ /** Which section this is, for the shell's key and its error line; the section draws its own title. */
117
+ id: string;
118
+ /** Its place among every installed package's sections, lower first; 50 when unsaid, ties by package name. */
119
+ order?: number;
120
+ /** The section itself, usually a {@link SettingsSection} of rows. */
121
+ Section: ComponentType<ModuleSettingsProps>;
122
+ }
123
+ /** How saving a usage limit went: done, or stopped, with the reason the module's command gave. */
124
+ export type UsageLimitSaved = {
125
+ ok: true;
126
+ } | {
127
+ ok: false;
128
+ error: string;
129
+ };
130
+ /**
131
+ * The stop line a module puts on the Overview's usage bar: where its unattended work stops, as an
132
+ * offset from the quota boundary in percentage points, negative before it and positive past it.
133
+ * The bar draws the line and its handle, and asks the module to read the offset and to save the
134
+ * one a drag picked, through the module package's own command. The first module that declares one
135
+ * (in package order) has the line.
136
+ */
137
+ export interface ModuleUsageLimit {
138
+ /** The offset in force across the projects, or undefined when none says one: the bar then draws no line. */
139
+ read(host: ModuleHost, projects: ModuleProject[]): Promise<number | undefined>;
140
+ /** Save the offset the handle was dragged to, within ±{@link MAX_SPEND_OFFSET}. */
141
+ save(host: ModuleHost, projects: ModuleProject[], points: number): Promise<UsageLimitSaved>;
142
+ }
143
+ /**
144
+ * The Context as a side-rail tab sees it (#504): the files the next run is pointed at. A tab may
145
+ * show which files are in it and add or remove one.
146
+ */
147
+ export interface ModuleContext {
148
+ /** The Context's files, as repo-relative paths. */
149
+ files: ReadonlySet<string>;
150
+ /** Add the path to the Context, or take it out when it is in. */
151
+ toggle(path: string): void;
152
+ }
153
+ /** What a side-rail tab is rendered with: the project on screen, the run selected in it (if any), the Context. */
154
+ export interface ModulePanelProps {
155
+ projectId: string;
156
+ /** The run whose page this is; absent on the project's own page. */
157
+ agentId?: string;
158
+ /**
159
+ * How many events the run's feed has shown: it grows each time the agent does something, so a
160
+ * tab showing what the agent changes reads again then, rather than on its next poll. Absent on
161
+ * the project's own page.
162
+ */
163
+ activity?: number;
164
+ /**
165
+ * On a tab that lists what a run changed (`changes`): the changed file a click in the chat
166
+ * asked to see, by its path in the run's checkout. `at` tells one ask from the next for the
167
+ * same file. Absent until a file is asked for.
168
+ */
169
+ reveal?: {
170
+ path: string;
171
+ at: number;
172
+ };
173
+ context: ModuleContext;
174
+ }
175
+ /**
176
+ * A tab a module adds to the side rail (#492), shown on every project's page and every run's page
177
+ * of the projects that have the module, before the dashboard's own tabs. A tab with nothing to
178
+ * show says so inside it: the rail cannot know a module is empty without rendering it.
179
+ */
180
+ export interface ModulePanel {
181
+ /** Which tab this is among the module's own, for the rail's key and its remembered pick. */
182
+ id: string;
183
+ /** The tab's label. */
184
+ label: string;
185
+ /** The tab's tooltip: one sentence on what it shows. */
186
+ help: string;
187
+ /** A count shown on the tab beside its label; none when absent or 0. */
188
+ count?(props: ModulePanelProps): number;
189
+ /**
190
+ * This tab lists what a run changed. The chat's row of a changed file then opens the side panel
191
+ * on it, and hands it the file as `reveal`. Without such a tab, those rows open nothing.
192
+ */
193
+ changes?: true;
194
+ /** The tab's contents. */
195
+ Panel: ComponentType<ModulePanelProps>;
196
+ }
197
+ /** What a run slot is rendered with: the run, and whether its agent is working. */
198
+ export interface ModuleRunProps {
199
+ projectId: string;
200
+ agentId: string;
201
+ /** The run's agent is still working: a run that ended, or stopped on a question, is not. */
202
+ working: boolean;
203
+ }
204
+ /**
205
+ * What a module adds to a run's page: `summary`, a few words in the bar above the message box,
206
+ * shown until the run has ended and its branch has been read (the dashboard's own words about the
207
+ * branch take over then).
208
+ */
209
+ export interface ModuleRunSlots {
210
+ summary?: ComponentType<ModuleRunProps>;
211
+ }
212
+ /** What a module's browser part default-exports. */
213
+ export interface ModuleDefinition {
214
+ /** The pages the module adds, each with a sidebar row. */
215
+ pages?: ModulePage[];
216
+ /** The cards the module adds to the Overview. */
217
+ cards?: ModuleCard[];
218
+ /** The actions the module offers on the links dashboard pages show, wherever the link's project has the module's package. */
219
+ linkActions?: LinkAction[];
220
+ /** The tabs the module adds to the side rail. */
221
+ panels?: ModulePanel[];
222
+ /** What the module adds to a run's page. */
223
+ run?: ModuleRunSlots;
224
+ /** The sections the module adds to the Settings page. */
225
+ settings?: ModuleSettings[];
226
+ /** The stop line the module puts on the usage bar. */
227
+ usageLimit?: ModuleUsageLimit;
228
+ /** A stylesheet to load with the module, relative to the module's browser part's own URL. */
229
+ stylesheet?: string;
230
+ }
231
+ /** Type the default export: `export default defineModule({ ... })`. */
232
+ export declare function defineModule(definition: ModuleDefinition): ModuleDefinition;
233
+ /** A run of a project as the dashboard knows it (#1774): enough for a page to name one and link to it. */
234
+ export interface ModuleAgent {
235
+ /** The run's id, the one {@link ModuleHost.openAgent} takes. */
236
+ id: string;
237
+ /** The run's branch, the name the agent gave its work, when its record carries one. */
238
+ name?: string;
239
+ /** What the run was asked, as typed or as queued; absent when its record carries none. */
240
+ ask?: string;
241
+ status: AgentStatus;
242
+ /** ISO 8601. */
243
+ startedAt: string;
244
+ }
245
+ /** What starting a run answered: the run's id, or in words why there is none. */
246
+ export type StartRunResult = {
247
+ ok: true;
248
+ agentId: string;
249
+ } | {
250
+ ok: false;
251
+ error: string;
252
+ };
253
+ /**
254
+ * What the dashboard gives the module it is rendering. Every service is generic — a project, a
255
+ * run, a page, a command — and none names a skill: what a module composes out of them is its own.
256
+ */
257
+ export interface ModuleHost {
258
+ /** The package the module came from: the one whose commands {@link runCommand} runs. */
259
+ package: string;
260
+ /**
261
+ * Run one of the module package's own commands in one project and get its JSON output: the
262
+ * same command an agent runs (`npx <command> …`). `command` names one when the package has several.
263
+ */
264
+ runCommand(projectId: string, args: string[], command?: string): Promise<ModuleCommandResult>;
265
+ /**
266
+ * The same, for a command that changes the project's data (a claim released, an entry added):
267
+ * the dashboard then syncs the project's data with origin and forgets what it had read, so the
268
+ * change shows at once instead of at the next sync. A link action's host runs every command so.
269
+ */
270
+ act(projectId: string, args: string[], command?: string): Promise<ModuleCommandResult>;
271
+ /**
272
+ * Call one of the module's own server reads (its package's `./server`) in one project, with
273
+ * `input`, a JSON object; `input.agentId` names the run the read is about, when it is about one.
274
+ * Answered in the daemon's own process, so it suits a read made every few seconds.
275
+ */
276
+ read(projectId: string, name: string, input?: Record<string, unknown>): Promise<ModuleReadResult>;
277
+ /** Open one agent's page in the dashboard: its live feed while it runs, its record after. */
278
+ openAgent(projectId: string, agentId: string): void;
279
+ /** Open a page a module adds (this one's or another's), at a sub-path: `openPage('tickets', [projectId, file])`. With a project picked in the dashboard, a page that project's packages do not add shows "No such page". */
280
+ openPage(segment: string, path?: string[]): void;
281
+ /**
282
+ * Start a run in one project with this prompt, with the person's own picks (which tool, which
283
+ * model, where it runs), and land on it, unless `land` is false: then the dashboard stays where
284
+ * it is, for a module that starts several runs in a row. Answers the run's id, or why there is none.
285
+ */
286
+ startRun(projectId: string, prompt: string, opts?: {
287
+ land?: boolean;
288
+ }): Promise<StartRunResult>;
289
+ /** Open the project's launcher with this prompt drafted in, to set it up before sending: "Configure first, then run". */
290
+ configureRun(projectId: string, prompt: string): void;
291
+ /** The project's runs the dashboard knows: the ones running, and the recorded ones when the project records them. */
292
+ agents(projectId: string): Promise<ModuleAgent[]>;
293
+ }
294
+ /** What the dashboard knows about the module it is serving: every service but the commands and the reads, which it binds to the package. */
295
+ export type ModuleHostBase = Omit<ModuleHost, 'runCommand' | 'act' | 'read'>;
296
+ /**
297
+ * The host for one module: the dashboard's services, and its commands bound to the module's own
298
+ * package. `acts` marks every command as an action on the project rather than a page's read: the
299
+ * dashboard builds a link action's host with it, so what the action wrote is read back at once.
300
+ */
301
+ export declare function moduleHost(base: ModuleHostBase, opts?: {
302
+ acts?: boolean;
303
+ }): ModuleHost;
304
+ /**
305
+ * Set by the dashboard around every module page it renders: the module's package and the
306
+ * dashboard's services. A test of a module page provides a whole host here, commands included,
307
+ * and {@link useModuleHost} hands it over as it is.
308
+ */
309
+ export declare const ModuleHostContext: import("react").Context<ModuleHost | ModuleHostBase | null>;
310
+ /** The dashboard's services for the module being rendered. Only valid inside a module page. */
311
+ export declare function useModuleHost(): ModuleHost;
312
+ export { Button, buttonVariants, type ButtonProps } from '../components/ui/button.js';
313
+ export { Badge } from '../components/ui/badge.js';
314
+ export { Card, CardHeader, CardTitle, CardContent } from '../components/ui/card.js';
315
+ export { Skeleton } from '../components/ui/skeleton.js';
316
+ export { Checkbox } from '../components/ui/checkbox.js';
317
+ export { Input } from '../components/ui/input.js';
318
+ export { Popover, PopoverContent, PopoverTrigger } from '../components/ui/popover.js';
319
+ export { RangeSlider } from '../components/ui/slider.js';
320
+ export { Separator } from '../components/ui/separator.js';
321
+ export { PreviewCard } from '@base-ui-components/react/preview-card';
322
+ export { DiffStat } from '../components/DiffStat.js';
323
+ export { ScrollArea } from '../components/ui/scroll-area.js';
324
+ export { Tooltip, TooltipTrigger, TooltipContent } from '../components/ui/tooltip.js';
325
+ export { DropdownMenu, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '../components/ui/dropdown-menu.js';
326
+ export { Markdown } from '../components/Markdown.js';
327
+ export { StartAgentButton } from '../components/StartAgentButton.js';
328
+ export { LinkActions, type ProjectLinks, type LinkTargets } from '../components/LinkActions.js';
329
+ export { cn } from '../lib/utils.js';
330
+ export { SettingsSection, SettingsRow, SettingsSelectRow, type SettingsOption } from '../components/SettingsRows.js';
331
+ export { useCodingAgents, type CodingAgent } from '../lib/models.js';
332
+ export { MAX_SPEND_OFFSET } from '../../src/preference-defaults.js';
333
+ export { formatRelative, formatDateTime, formatDuration, formatAge } from '../lib/format-date.js';
334
+ export { usePolled, useLoaded, forgetRemembered } from '../lib/use-async.js';
335
+ export { useAction } from '../lib/use-action.js';
@@ -0,0 +1,2 @@
1
+ export type * from '../../src/dashboard/models.js';
2
+ export declare const onModels: () => Promise<import("./models.js").ModelsView>;
@@ -0,0 +1,5 @@
1
+ import type * as impl from '../../src/dashboard-rpc/modules.js';
2
+ export type * from '../../src/dashboard-rpc/modules.js';
3
+ export declare const onModules: () => Promise<impl.DashboardModule[]>;
4
+ export declare const runModuleCommand: (projectId: string, pkg: string, args: string[], command?: string | undefined, acts?: boolean | undefined) => Promise<import("@openagt/agent-data").PackageCommandResult>;
5
+ export declare const readModule: (projectId: string, pkg: string, name: string, input: unknown) => Promise<impl.ModuleReadResult>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * An agent's id, derived from the moment it starts. Pure — no node imports — because the sweep
3
+ * that mints ids ahead of a claim (#1748) is reachable from the dashboard's browser bundle.
4
+ */
5
+ /** Filesystem-safe, lexicographically-sortable agent id from an ISO start time. */
6
+ export declare function agentIdFromStartedAt(startedAt: string): string;
7
+ /**
8
+ * The inverse of {@link agentIdFromStartedAt}, for a caller that has the id but not the meta
9
+ * (#1251): picking which PR is the agent's needs the start time to tell the agent's own PR from a
10
+ * predecessor's on the same branch name. Undefined for an id that is not one of ours.
11
+ */
12
+ export declare function startedAtFromAgentId(id: string): string | undefined;
@@ -0,0 +1,2 @@
1
+ /** Run `fn` once every earlier holder of `checkout`'s lock has settled. */
2
+ export declare function withAgentLock<T>(checkout: string, fn: () => Promise<T>): Promise<T>;
@@ -0,0 +1,38 @@
1
+ import type { OpenAgentEvent } from './events.js';
2
+ /** One error of a run: one the agent reported through an `error` block (#1500), or one its tool wrote in the diary. */
3
+ export interface AgentError {
4
+ /** What is wrong, in one line. */
5
+ headline: string;
6
+ /** What it ran and what that said, when the agent wrote any. */
7
+ detail?: string;
8
+ }
9
+ /**
10
+ * Every error of the run (#1500), oldest first — the count the dashboard shows on the session, and
11
+ * the latest headline it shows beside it. Two sources: the `error` lines the run's tool writes in
12
+ * the diary when the coding agent or its transport fails (the message's first line is the
13
+ * headline, the rest the detail), and the `error` blocks of runs recorded before the daemon
14
+ * stopped running agents.
15
+ *
16
+ * A fold over the log rather than state of its own: an error is an event that happened, so the
17
+ * list only ever grows, and reopening a finished agent shows exactly what it showed while it ran.
18
+ */
19
+ export declare function agentErrors(events: readonly OpenAgentEvent[]): AgentError[];
20
+ /** The wrapped agent session (#431): its id and a deep link, when one is known. */
21
+ export interface SessionInfo {
22
+ sessionId?: string;
23
+ sessionLink?: string;
24
+ /**
25
+ * The directory the agent ran in (#1195), from the opening `session` event.
26
+ *
27
+ * Taken from the event rather than the filesystem on purpose: an agent that finishes cleanly has
28
+ * its worktree removed (`tearDownWorktree`), so the event is the only surviving record of where
29
+ * the session lived — and that path is exactly what `claude --resume` needs to find it again.
30
+ */
31
+ workspace?: string;
32
+ }
33
+ /**
34
+ * The session behind the agent (#431): the workspace from the opening `session`
35
+ * event, then the id and any deep link from the latest `session-update`. Null before the
36
+ * session opens. The link is what the old dashboard surfaced as "open session".
37
+ */
38
+ export declare function sessionInfo(events: readonly OpenAgentEvent[]): SessionInfo | null;
@@ -0,0 +1,216 @@
1
+ /**
2
+ * The bridge browser (#1332): a Chrome for Testing the daemon launches and owns, with the Claude
3
+ * web bridge extension installed, signed in to claude.ai once by the user and kept minimized.
4
+ *
5
+ * The bridge's far end is a browser signed in to claude.ai. Until now that was the user's own
6
+ * Chrome with the extension loaded, so a web run could only start — and a parked question could
7
+ * only be noticed — while that Chrome happened to be open. The spike on #1332 settled what a
8
+ * browser nobody attends has to be: headed, because claude.ai's Cloudflare gate never clears a
9
+ * headless one; Chrome for Testing, because branded Chrome stopped loading unpacked extensions
10
+ * from the command line; and installed over CDP with developer mode on, because an extension
11
+ * loaded any other way is disabled the first time it reloads itself (#1712).
12
+ *
13
+ * Nothing here talks to claude.ai. The daemon launches the browser, hands the extension the
14
+ * bridge token, and from then on the extension's Driver tab does exactly what it does in the
15
+ * user's own Chrome — the daemon only keeps the window out of the way and brings it up when the
16
+ * user has to sign in.
17
+ */
18
+ /** The directory holding the bridge browser's profile and binary, next to the registry file. */
19
+ export declare const BRIDGE_BROWSER_DIR = "openagent-browser";
20
+ /**
21
+ * Where the bridge browser lives: `$XDG_CONFIG_HOME/openagent-browser` when set, else the
22
+ * dotted `$HOME/.openagent-browser`. Beside the registry, so the same variable that isolates
23
+ * a test's registry isolates its browser, and a machine's real one is never touched from a test.
24
+ * The profile inside it is persistent on purpose: the user signs in once and the sign-in outlives
25
+ * every daemon restart.
26
+ */
27
+ export declare function bridgeBrowserDir(env: NodeJS.ProcessEnv): string;
28
+ /**
29
+ * The launch flags. Headed (no `--headless`): claude.ai's bot gate rejects a headless browser
30
+ * outright, and a headed one whose window is minimized passes. The unsafe-extension-debugging
31
+ * flag is what lets `Extensions.loadUnpacked` install the extension over CDP. The keychain flags
32
+ * keep the cookie-encryption key out of the OS keychain (macOS asks for the login password on
33
+ * every launch otherwise, and Linux for the wallet) — the same choice Puppeteer makes; the profile
34
+ * directory's own permissions are what guard the sign-in.
35
+ */
36
+ export declare function bridgeBrowserLaunchArgs(port: number, profileDir: string): string[];
37
+ /** Where the extension's files are, and whether that is a checkout, where they are edited in place. */
38
+ export interface BridgeExtensionSource {
39
+ dir: string;
40
+ checkout: boolean;
41
+ }
42
+ /**
43
+ * The extension's files (#1720): the checkout's `packages/chrome-extension` next to this package,
44
+ * so an edit there reaches the browser through the extension's self-reload; else the copy the
45
+ * build puts in `dist/chrome-extension`, which is what an installed package has. A folder counts
46
+ * only when its manifest names the bridge extension. Undefined when neither is there.
47
+ * `moduleUrl` is this file's URL; tests point it elsewhere.
48
+ */
49
+ export declare function bridgeExtensionSource(moduleUrl?: string): BridgeExtensionSource | undefined;
50
+ /**
51
+ * The process holding a profile's singleton lock, or undefined when nothing does. Chrome leaves
52
+ * the lock behind as a symlink whose target is `<host>-<pid>`; a daemon that died without closing
53
+ * its browser leaves that browser running, and a second Chrome on the same profile would hand its
54
+ * command line to the first and exit at once.
55
+ */
56
+ export declare function profileLockOwner(profileDir: string, readLink?: (path: string) => Promise<string>): Promise<number | undefined>;
57
+ /** One page, worker or browser-internal target Chrome lists. */
58
+ export interface CdpTarget {
59
+ id: string;
60
+ type: string;
61
+ url: string;
62
+ webSocketDebuggerUrl?: string;
63
+ }
64
+ /** A session on one target: the calls go to that page or worker rather than to the browser. */
65
+ export interface CdpTargetSession {
66
+ send(method: string, params?: Record<string, unknown>): Promise<unknown>;
67
+ close(): void;
68
+ }
69
+ /** How the daemon talks to its browser. Injectable: the real one speaks WebSocket to Chrome. */
70
+ export interface BridgeBrowserCdp {
71
+ /** A browser-level call: installing the extension, opening and closing targets, window bounds. */
72
+ call(method: string, params?: Record<string, unknown>): Promise<unknown>;
73
+ /** Every target Chrome lists — pages, the extension's worker, browser-internal pages. */
74
+ targets(): Promise<CdpTarget[]>;
75
+ /** Attach to one target. */
76
+ attach(target: CdpTarget): Promise<CdpTargetSession>;
77
+ /** Drop the browser-level connection. The browser keeps running. */
78
+ close(): void;
79
+ }
80
+ /** The real connection: the browser socket from `/json/version`, targets from `/json/list`. */
81
+ export declare function connectBridgeBrowser(browserUrl: string): Promise<BridgeBrowserCdp>;
82
+ /** Install the extension from its directory. Chrome answers with the extension's id. */
83
+ export declare function installExtension(cdp: BridgeBrowserCdp, extensionDir: string): Promise<string>;
84
+ /**
85
+ * The developer-mode switch on Chrome's extensions page, flipped on if it is off. Chrome (137
86
+ * and later) disables an unpacked extension on reload while the mode is off, and the extension
87
+ * reloads itself whenever its files change (#1712), so without this the bridge would die on the
88
+ * first edit or pull. The profile remembers the setting, but writing the preference into the
89
+ * profile directly does nothing — the switch is the one way that works.
90
+ */
91
+ export declare const DEVELOPER_MODE_ON = "(() => {\n const manager = document.querySelector('extensions-manager')?.shadowRoot\n const toggle = manager?.querySelector('extensions-toolbar')?.shadowRoot?.querySelector('#devMode')\n if (!toggle) return 'missing'\n if (!toggle.checked) toggle.click()\n return 'on'\n})()";
92
+ /** Open Chrome's extensions page in the background, switch developer mode on, close the page. */
93
+ export declare function enableDeveloperMode(cdp: BridgeBrowserCdp, sleep: (ms: number) => Promise<void>): Promise<void>;
94
+ /**
95
+ * What the extension is told, run inside its own worker: the daemon's address and the bridge
96
+ * token go into the storage its options page would have written, and the Driver tab is opened
97
+ * as the one pinned claude.ai/code tab — the shape the extension adopts as its Driver — in place
98
+ * of the blank page the browser started on. Opened here rather than left to the extension
99
+ * because the extension opens no Driver tab while the daemon lists no cloud session, and the user
100
+ * signs in on that tab before any session exists.
101
+ */
102
+ export declare function seedExpression(daemonUrl: string, token: string): string;
103
+ /** Hand the freshly installed extension its daemon and token, in its service worker. */
104
+ export declare function seedExtension(cdp: BridgeBrowserCdp, extensionId: string, daemonUrl: string, token: string, sleep: (ms: number) => Promise<void>): Promise<void>;
105
+ /** The bridge browser once it runs. */
106
+ export interface BridgeBrowser {
107
+ extensionId: string;
108
+ /** The path the claude.ai tab is on (`/login` while signed out), or undefined without such a tab. */
109
+ page(): Promise<string | undefined>;
110
+ /** Restore the window and bring the browser to the front, for the user to sign in. */
111
+ show(): Promise<void>;
112
+ /** Minimize the window again. */
113
+ hide(): Promise<void>;
114
+ /** Called once if Chrome exits on its own — the user quit it, or it crashed. */
115
+ onExit(listener: (detail: string) => void): void;
116
+ /** Close the browser. Safe to call twice. */
117
+ close(): Promise<void>;
118
+ }
119
+ /** The Chrome process, as much of it as this module needs. */
120
+ export interface BridgeBrowserProcess {
121
+ pid?: number | undefined;
122
+ kill(signal?: NodeJS.Signals): unknown;
123
+ on(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): unknown;
124
+ on(event: 'error', listener: (err: Error) => void): unknown;
125
+ }
126
+ /** Everything the launch touches outside its own logic. Injectable so the sequence is testable without a Chrome. */
127
+ export interface BridgeBrowserDeps {
128
+ /** The Chrome for Testing binary, downloaded into `cacheDir` if none is there yet. */
129
+ binary(cacheDir: string, report: (detail: string) => void): Promise<string>;
130
+ /** The process holding the profile's lock, if any. */
131
+ lockOwner(profileDir: string): Promise<number | undefined>;
132
+ alive(pid: number): boolean;
133
+ kill(pid: number, signal: NodeJS.Signals): void;
134
+ port(): Promise<number>;
135
+ spawn(binary: string, args: string[]): BridgeBrowserProcess;
136
+ ready(browserUrl: string): Promise<boolean>;
137
+ connect(browserUrl: string): Promise<BridgeBrowserCdp>;
138
+ /** Bring the browser application to the front (macOS: activate the app bundle). */
139
+ activate(binary: string): void;
140
+ sleep(ms: number): Promise<void>;
141
+ }
142
+ /**
143
+ * The Chrome for Testing binary in `cacheDir`, or the current stable one downloaded there (about
144
+ * 150 MB, once). Chrome for Testing rather than whatever Chrome the machine has: branded Chrome
145
+ * ignores an unpacked extension handed to it from outside, and the agent's own browser lookup
146
+ * would find exactly that.
147
+ */
148
+ export declare function bridgeBrowserBinary(cacheDir: string, report: (detail: string) => void): Promise<string>;
149
+ /** macOS: the `.app` bundle the binary lives in, which `open` activates. Undefined elsewhere. */
150
+ export declare function appBundle(binary: string): string | undefined;
151
+ /** The real dependencies. */
152
+ export declare function bridgeBrowserDeps(): BridgeBrowserDeps;
153
+ /**
154
+ * Make sure nothing else holds the profile: a browser a dead daemon left behind is stopped,
155
+ * gently first. It is OpenAgent's own profile, so whatever holds it is OpenAgent's own
156
+ * leftover; nothing the user runs shares it.
157
+ */
158
+ export declare function freeProfile(profileDir: string, deps: BridgeBrowserDeps): Promise<boolean>;
159
+ /** What a launch needs to know. */
160
+ export interface BridgeBrowserOptions {
161
+ /** Where the daemon listens — what the extension is told to call. */
162
+ daemonUrl: string;
163
+ /** The bridge token the extension presents on every call. */
164
+ token: string;
165
+ /** The bridge browser's directory: the profile and the binary live under it. */
166
+ dir: string;
167
+ /** The extension's files. Default: `bridgeExtensionSource()`. */
168
+ extension?: BridgeExtensionSource | undefined;
169
+ /** Progress, one line at a time, for the dashboard to show while the launch runs. */
170
+ report?: ((detail: string) => void) | undefined;
171
+ }
172
+ /**
173
+ * Launch the bridge browser and get it ready: binary, profile, extension, developer mode, token,
174
+ * Driver tab, minimized. Throws with the step that failed; the browser is closed again on a
175
+ * failure after the spawn, so a half-set-up browser is never left running.
176
+ */
177
+ export declare function startBridgeBrowser(opts: BridgeBrowserOptions, deps?: BridgeBrowserDeps): Promise<BridgeBrowser>;
178
+ /** Where the bridge browser stands, for the dashboard. */
179
+ export type BridgeBrowserStatus = {
180
+ state: 'off';
181
+ } | {
182
+ state: 'starting';
183
+ detail: string;
184
+ }
185
+ /** `signIn`: the claude.ai tab is on the sign-in page, so a person has to sign in before anything is served. */
186
+ | {
187
+ state: 'running';
188
+ since: string;
189
+ visible: boolean;
190
+ signIn: boolean;
191
+ } | {
192
+ state: 'stopped';
193
+ detail: string;
194
+ };
195
+ /** What the dashboard can ask of the bridge browser. */
196
+ export type BridgeBrowserAction = 'show' | 'hide' | 'restart';
197
+ /** The daemon's handle on its bridge browser: one at a time, started and stopped from the preference and the dashboard. */
198
+ export interface BridgeBrowserOwner {
199
+ /** Where the browser stands; a running one is asked which page its claude.ai tab is on. */
200
+ status(): Promise<BridgeBrowserStatus>;
201
+ /** Launch it, unless it is running or on its way. Resolves once the launch is over, either way. */
202
+ start(): Promise<void>;
203
+ /** Close it, or cancel a launch under way. */
204
+ stop(): Promise<void>;
205
+ act(action: BridgeBrowserAction): Promise<void>;
206
+ }
207
+ /** How the owner launches a browser: the daemon's real launch, or a test's fake. */
208
+ export type BridgeBrowserLauncher = (report: (detail: string) => void) => Promise<BridgeBrowser>;
209
+ /**
210
+ * The one bridge browser a daemon runs. A launch is slow — the first one downloads Chrome — so
211
+ * the status carries the step it is on, and a stop that lands mid-launch closes the browser the
212
+ * launch then hands over rather than leaving it running unowned. A browser that exits on its own
213
+ * (the user quit it) is reported as stopped with the reason, and not relaunched: quitting it was
214
+ * an act, and the dashboard offers a restart.
215
+ */
216
+ export declare function bridgeBrowserOwner(launch: BridgeBrowserLauncher, log?: (line: string) => void): BridgeBrowserOwner;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The DevTools connection to a Chrome the daemon owns: the bridge browser's (#1332). Chrome
3
+ * refuses DevTools socket connections carrying an `Origin` header unless launched with
4
+ * `--remote-allow-origins`, and opening that up would let any page the user happens to visit
5
+ * drive the browser. So the debug port stays unreachable from the web, and this process is the
6
+ * only one that talks to it.
7
+ */
8
+ /** What a caller needs from a CDP connection, so a test can stand in for Chrome. */
9
+ export interface CdpSession {
10
+ send(method: string, params?: Record<string, unknown>): Promise<unknown>;
11
+ close(): void;
12
+ }
13
+ /** How a caller reaches a browser or a page. Injectable: the real one speaks WebSocket to Chrome. */
14
+ export type CdpConnect = (webSocketDebuggerUrl: string) => Promise<CdpSession>;
15
+ /**
16
+ * Talk CDP to Chrome over its debugger socket. Node's global WebSocket is enough, which is
17
+ * what keeps this dependency-free.
18
+ */
19
+ export declare const connectCdp: CdpConnect;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * What launching a Chrome with its DevTools port open needs, whoever launches it: a port nobody
3
+ * holds, and a way to know the port answers. The bridge browser (#1332) is the one caller.
4
+ */
5
+ /** A free localhost port, asked of the OS rather than guessed. */
6
+ export declare function freePort(): Promise<number>;
7
+ /**
8
+ * Poll `/json/version` until Chrome answers. Chrome opens the port a beat after the process
9
+ * starts, so connecting to a URL that is not listening yet is the obvious race.
10
+ */
11
+ export declare function waitForDebugEndpoint(browserUrl: string, opts?: {
12
+ timeoutMs?: number;
13
+ intervalMs?: number;
14
+ fetchImpl?: typeof fetch;
15
+ }): Promise<boolean>;