@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,184 @@
1
+ import type { BridgeBrowserStatus } from '../bridge-browser.js';
2
+ import { type AgentMeta } from '../store/index.js';
3
+ import { type GitHostHome } from '../store/git-host.js';
4
+ import { type RepositoryOffer } from '../store/repository.js';
5
+ import { type WorkspaceDoc } from '../dashboard/docs.js';
6
+ import { type ProjectQueue } from '../dashboard/queue.js';
7
+ import { type Overview, type RecentAgent } from '../dashboard/overview.js';
8
+ import { type Intervention } from '../dashboard/interventions.js';
9
+ import type { ProjectionRead } from '../dashboard/projects.js';
10
+ import { type OpenQuestion } from '../dashboard/open-questions.js';
11
+ import { type Activity } from '../dashboard/activity.js';
12
+ import { type DashboardData } from '../dashboard/dashboard.js';
13
+ import { type GitStatus } from '../dashboard/git-status.js';
14
+ import { type AgentHandoff } from '../dashboard/agent-handoff.js';
15
+ import type { AgentWorktree } from '../dashboard/types.js';
16
+ import type { OpenAgentEvent } from '../events.js';
17
+ import type { BridgeEvent, BridgeHello, BridgeQuestion } from '../dashboard/bridge-endpoints.js';
18
+ import type { BridgeAnswer, BridgeContact, BridgeVersion } from '../dashboard/bridge-store.js';
19
+ /**
20
+ * The project's runs, most-recent first (or `[]`). The archived (finished) runs
21
+ * from `agents/`, plus every live agent prepended — so the sidebar shows an in-progress
22
+ * run with a `running` status the moment it starts, not only after it closes.
23
+ *
24
+ * Since #736 a project has any number of live agents, each in its own worktree, so this reads
25
+ * them all (#738) instead of the single one that used to sit at the project path. They come
26
+ * back as {@link LiveAgent}s, carrying the `cwd` of the checkout that agent is editing.
27
+ *
28
+ * One row per id, and where both a live and an archived copy exist the live one wins (#768): a
29
+ * continued run (#762) has an archive from its first leg while being live again, and the archive
30
+ * would otherwise show a running agent as finished. The status is not filtered on: `readLiveMeta`
31
+ * may have just self-healed a dead agent to `stopped` (#716), and that freshly-archived row can
32
+ * lag `listAgents` by a poll — keeping it regardless leaves the row visible with no flicker.
33
+ *
34
+ * An agent relayed to a connected device (#1067) lives only in the daemon's memory, never on disk, so
35
+ * its in-memory stub is merged in too (#1077): that is what re-opens it after a dashboard reload
36
+ * instead of losing it.
37
+ */
38
+ export declare function onAgents(projectId: string): Promise<AgentMeta[]>;
39
+ /**
40
+ * A web run whose cloud session is waiting on a human — the bridge holds its parked question, or
41
+ * claude.ai's session list shows it awaiting input (#1332) — is marked waiting (#1668), so its row
42
+ * says so instead of "in cloud": the archive on disk cannot know, only the daemon's bridge store
43
+ * does. Every other run passes through untouched.
44
+ */
45
+ export declare function markCloudWaiting(agent: AgentMeta): AgentMeta;
46
+ /**
47
+ * A run another machine's daemon started is marked as from another host (#1648): the data branch
48
+ * is shared precisely so other machines' runs show up here, and a row that looked exactly like
49
+ * one of this daemon's own sent the user reading the archive by hand to learn whose it was. A run
50
+ * with no recorded host predates the field and passes through untouched.
51
+ */
52
+ export declare function markOtherHost(agent: AgentMeta, thisHost?: string): AgentMeta;
53
+ /**
54
+ * A run that ended clean while the process its card names is still alive on this host is marked
55
+ * saving: the tool that runs it saves the run's record and cleans up its checkout after the card says
56
+ * done, and a row that said "done" through that window read as finished with nothing coming. A
57
+ * run of another host, or with no recorded process, passes through untouched.
58
+ */
59
+ export declare function markSaving(agent: AgentMeta, thisHost?: string, alive?: (pid: number) => boolean): AgentMeta;
60
+ /**
61
+ * The agent ids that still have a worktree on disk (#737). An agent that failed or was stopped keeps
62
+ * its checkout so you can go look at what it was holding; this is how the dashboard knows which
63
+ * finished run has one to offer removing. Live agents are excluded — their worktree is in use.
64
+ */
65
+ export declare function onRetainedWorktrees(projectId: string): Promise<string[]>;
66
+ /**
67
+ * Where a session is working (#798): the checkout it has, its branch, whether it is holding
68
+ * uncommitted changes, and — once it is no longer live — what that checkout costs on disk.
69
+ *
70
+ * The dashboard could not answer "where is this session working". The git status bar reads the
71
+ * *project*, so a session's own branch was visible nowhere, and a worktree an agent kept (#737) was
72
+ * a name in a list with no size and no way in.
73
+ *
74
+ * Every run works in a checkout of its own, so once that checkout is gone there is no tree left to
75
+ * be clean or dirty: the answer is then only what the run recorded, its branch and its pull
76
+ * request. It used to fall back to the project's root and report the user's own checkout (their
77
+ * branch, their "clean") as the run's.
78
+ */
79
+ export declare function onAgentWorktree(projectId: string, agentId: string): Promise<AgentWorktree | null>;
80
+ /** One archived agent's event log for replay (or `[]` when the agent or project is gone). */
81
+ export declare function onAgent(projectId: string, agentId: string): Promise<OpenAgentEvent[]>;
82
+ /** What each of the named runs of a project is doing now, by id; a run that is not working has no entry. */
83
+ export declare function onAgentsDoing(projectId: string, agentIds: string[]): Promise<Record<string, string>>;
84
+ /** The surfaced PLAN/TODO docs at the workspace root, in sidebar order (or `[]`). */
85
+ export declare function onDocs(projectId: string): Promise<WorkspaceDoc[]>;
86
+ /** The aggregated open TODO queue across every registered project (#438), most-open first. */
87
+ export declare function onQueue(): Promise<ProjectQueue[]>;
88
+ /** The cross-project Overview (#437): what is running now, the queue size, and recent projects. */
89
+ export declare function onOverview(): Promise<Overview>;
90
+ /** Recent sessions pooled across every project (#shared-shell), newest first, for the home rail. */
91
+ export declare function onRecentAgents(): Promise<RecentAgent[]>;
92
+ /**
93
+ * The cross-project interventions queue (#632, Queue #624): open PRs that need review, newest first,
94
+ * plus which projects were read whole (#1625).
95
+ *
96
+ * The panels render `items` and ignore the rest. The browser's notifier is the caller that cannot:
97
+ * it keeps a baseline of what was already waiting when the page opened, and a queue that came back
98
+ * empty because the git host was unreachable is not a baseline — taking it for one announces the whole
99
+ * backlog the moment the git host answers.
100
+ */
101
+ export declare function onInterventions(): Promise<ProjectionRead<Intervention>>;
102
+ /** Every session's open question with its full gate (#1455), longest-waiting first: the launcher's hub. */
103
+ export declare function onOpenQuestions(): Promise<OpenQuestion[]>;
104
+ /**
105
+ * The cross-project "New activity" feed (#627): recent run started/finished transitions, newest
106
+ * first, with the projects that were read whole beside them (#1625) — see {@link onInterventions}.
107
+ */
108
+ export declare function onActivity(): Promise<ProjectionRead<Activity>>;
109
+ /** The Overview dashboard page (#471): the {@link onOverview} rollup plus agent counts, run-status totals, and activity. */
110
+ export declare function onDashboard(): Promise<DashboardData>;
111
+ /**
112
+ * The project's files for the `#` context picker (#504) and the Context's file count (#661): every
113
+ * file git sees (tracked + untracked, honoring .gitignore), repo-relative and sorted, via
114
+ * `git ls-files`. Localhost-only by nature — the relay has no checkout, so it resolves `[]`.
115
+ * Pass a live `agentId` to list that agent's worktree instead of the project root (#738). The
116
+ * Files tab reads its own list, through its module.
117
+ */
118
+ export declare function onProjectFiles(projectId: string, agentId?: string): Promise<string[]>;
119
+ /** The project's page on its git host and the git host's name (#489, #1820), or null: no git host package, no remote there, or the relay. */
120
+ export declare function onGitHostHome(projectId: string): Promise<GitHostHome | null>;
121
+ /** The repository the project's provider offers to create for it (a project with no remote), or null: no provider, a remote already there, the host out of reach, or the relay. */
122
+ export declare function onRepositoryOffer(projectId: string): Promise<RepositoryOffer | null>;
123
+ /**
124
+ * The project's git status (#491): active branch, dirty flag, linked PR. Null when not a repo /
125
+ * relay. Pass a live `agentId` to read that agent's worktree, which is the branch and the dirty
126
+ * state that actually belong to it (#738). A run-scoped read is since-filtered (#1255): an agent on
127
+ * a reused pinned branch must not wear a predecessor's merged PR as its own badge.
128
+ */
129
+ export declare function onGitStatus(projectId: string, agentId?: string): Promise<GitStatus | null>;
130
+ /**
131
+ * The end-of-session handoff (#799): the branch a finished session left its work on, what it
132
+ * committed, what it changed, and whether that has been pushed or opened as a PR.
133
+ *
134
+ * Read from the *project* checkout against the session's branch, not from the session's worktree.
135
+ * A clean agent's worktree is removed when it finishes, and `resolveAgentPath` then falls back to the
136
+ * project root — so a worktree-addressed read reports the project's own branch and the user's own
137
+ * uncommitted changes as though they were the session's. The branch is what outlives the agent, so
138
+ * the branch is what this asks about.
139
+ */
140
+ export declare function onAgentHandoff(projectId: string, agentId: string): Promise<AgentHandoff | null>;
141
+ /**
142
+ * The question a Claude web session is parked on, as reported by the browser bridge (#1237).
143
+ *
144
+ * Keyed by cloud session id rather than agent id because that is what the bridge can see: it reads
145
+ * a claude.ai page, which knows its session and nothing about our runs. The agent view already
146
+ * derives that id from the agent's own `cloud <url>` event, so the join happens on the client
147
+ * without the daemon having to index runs by session.
148
+ *
149
+ * Returns null for anything unrecognised, so an agent with no bridge, no question, or a target that
150
+ * is not `web` renders exactly as it did before.
151
+ */
152
+ export declare function onBridgeQuestion(sessionId: string): Promise<BridgeQuestion | null>;
153
+ /**
154
+ * Whether anything has reached the browser bridge, and how it went (#1237).
155
+ *
156
+ * A misconfigured extension and an uninstalled one both leave no question behind, so "nothing is
157
+ * showing" cannot be diagnosed from the questions alone. A refused request at least proves
158
+ * something is trying, and its status says which half is wrong.
159
+ */
160
+ export declare function onBridgeStatus(): Promise<{
161
+ lastContact: BridgeContact | null;
162
+ questions: number;
163
+ page: BridgeHello | null;
164
+ version: BridgeVersion | null;
165
+ }>;
166
+ /**
167
+ * The bridge token, for the setup step where a user pastes it into the extension (#1237).
168
+ *
169
+ * Only while the bridge is on, so a daemon with the feature off never hands the secret to a
170
+ * page. Revealing it here is not a new exposure: anyone who can load this dashboard can already
171
+ * start runs on this machine, and on a non-loopback bind their browser is holding the same token
172
+ * as a cookie. What it replaces is the alternative, which was telling people to open
173
+ * `~/.openagent.json` and copy a field out of it.
174
+ */
175
+ export declare function onBridgeToken(): Promise<string | null>;
176
+ /**
177
+ * Where the answer picked for that session's question stands (#1237): queued for the
178
+ * extension, delivered, or failed with the extension's reason. Null when nothing was picked.
179
+ */
180
+ export declare function onBridgeAnswer(sessionId: string): Promise<BridgeAnswer | null>;
181
+ /** What a Claude web session has said so far, as scraped by the browser bridge (#1237). */
182
+ export declare function onBridgeEvents(sessionId: string): Promise<BridgeEvent[]>;
183
+ /** Where the daemon's own bridge browser stands (#1332): off, starting (and on which step), running, or stopped and why. */
184
+ export declare function onBridgeBrowser(): Promise<BridgeBrowserStatus>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Run a run-scoped RPC locally, or relay it to the device when `agentId` names an agent this daemon is
3
+ * relaying to a connected one (#1067 slice 2). For an ordinary local agent the remote lookup is empty and
4
+ * `local()` runs unchanged. For a remote agent there is no local checkout, so the call is forwarded to the
5
+ * device over the token; if the device is unreachable, `unreachable` is returned - the same empty/error
6
+ * shape `local()` gives on a failed read - so the caller never special-cases a remote agent.
7
+ */
8
+ export declare function relayOr<T>(agentId: string | undefined, fn: string, args: unknown[], local: () => Promise<T>, unreachable: T): Promise<T>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Forward an async-iterable of events to a `send` sink until the source is exhausted or
3
+ * the returned stop function is called (#426). This is the bridge behind a relayed
4
+ * run's live feed: the agent is an `AsyncIterable` that replays its buffered history then follows
5
+ * live, and each value becomes one `send(event)`. Transport-agnostic on purpose — a plain
6
+ * callback, so the pump is driven and tested on its own, and the mount decides what a value
7
+ * becomes on the wire.
8
+ *
9
+ * `onDone` fires when the source runs out on its own — a relayed agent that finished. Without it a
10
+ * consumer cannot tell "nothing more is coming" from "nothing has happened yet", so an SSE
11
+ * response would stay open forever on a stream that was already over.
12
+ *
13
+ * Returns a stop function that halts forwarding and cancels the iterator, releasing the
14
+ * follower waiting on the next event. Idempotent. An absent source is a no-op.
15
+ */
16
+ export declare function forwardStream<T>(iterable: AsyncIterable<T> | undefined, send: (value: T) => void, onDone?: () => void): () => void;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The driver vocabulary (#542), node-free so every surface shares one copy: the registry's
3
+ * preference sanitizer and the dashboard bundle. The names are agent-driver's own, the ones a
4
+ * run's card carries, so the pick handed to a project's start hook as `DRIVER` and the record
5
+ * that comes back say the same word. The dashboard's per-driver UI table is keyed by
6
+ * {@link DriverName}, so a missing entry there is a compile error, not a silent gap.
7
+ */
8
+ /** The coding agents a person can pick for a run, in the order surfaces list them. */
9
+ export declare const DRIVERS: readonly ['claude-code', 'codex'];
10
+ /** A driver the user can pick. */
11
+ export type DriverName = (typeof DRIVERS)[number];
12
+ /** Whether `value` names a driver we can run. */
13
+ export declare function isDriverName(value: string | undefined): value is DriverName;
14
+ /** How each driver reads in a sentence or on a button. */
15
+ export declare const DRIVER_LABELS: Record<DriverName, string>;
16
+ /**
17
+ * The pick behind the driver a run's record names (#831). Every surface Claude ran on is still
18
+ * Claude (#1263): older records name its cloud session and its Actions runner. `undefined` for a
19
+ * driver no pick claims (a fake one, or a record from a newer version).
20
+ */
21
+ export declare function driverFromImpl(impl: string | undefined): DriverName | undefined;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The message of an unknown caught value. `catch` hands back `unknown`, and this ternary was
3
+ * spelled out at over twenty call sites; the next variation in one of them would be a bug (a
4
+ * dropped `String()` turns a thrown string into `[object Object]`'s sibling problems), so the
5
+ * idiom gets one home. Node-free, exported through /client for the dashboard's use too.
6
+ */
7
+ export declare function errorMessage(err: unknown): string;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A replayable, multi-consumer stream of events: buffer every event, hand out live async
3
+ * iterators, and replay history from an offset (tail=N replay).
4
+ *
5
+ * Absorbed from `@gemstack/ai-autopilot` when that package was deleted (A2). Its element type
6
+ * used to default to the supervisor's event; the only caller here passes `OpenAgentEvent`, so
7
+ * the parameter is now required.
8
+ */
9
+ export declare class EventStream<E> {
10
+ private readonly buffer;
11
+ private readonly waiters;
12
+ private closed;
13
+ /** Append an event. Wire this in as an `onEvent` sink. Ignored once closed. */
14
+ readonly push: (event: E) => void;
15
+ /** Alias for {@link push}, reads well at the `onEvent:` call site. */
16
+ get sink(): (event: E) => void;
17
+ /** Events buffered so far, from `fromOffset` (default 0) — Flue-style tail replay. */
18
+ history(fromOffset?: number): E[];
19
+ /** Number of events buffered. */
20
+ get length(): number;
21
+ /** True once {@link close} has run. */
22
+ get isClosed(): boolean;
23
+ /** End the stream: live iterators drain their backlog, then finish. Idempotent. */
24
+ close(): void;
25
+ /**
26
+ * A fresh async iterator that replays every buffered event, then yields new
27
+ * ones as they arrive, and finishes once the stream is closed and drained.
28
+ * Independent iterators each keep their own cursor, so late consumers still
29
+ * see the full history.
30
+ */
31
+ [Symbol.asyncIterator](): AsyncIterableIterator<E>;
32
+ }
@@ -0,0 +1,235 @@
1
+ import type { DriverEvent } from '@openagt/agent-driver';
2
+ /** One selectable option in an interactive {@link ChoiceRequest} (#304). */
3
+ export interface ChoiceOption {
4
+ /** Stable id posted back when this option is picked. */
5
+ id: string;
6
+ /** The option shown to the user. */
7
+ label: string;
8
+ /** Optional one-line detail under the label (e.g. why an alternative lost). */
9
+ detail?: string;
10
+ /** In a multi-select ({@link ChoiceRequest.multi}), whether this option starts checked. Ignored for single-select. */
11
+ default?: boolean;
12
+ }
13
+ /**
14
+ * An interactive choice the agent pauses on until a pick arrives (#304). Emitted as
15
+ * a `choice` {@link OpenAgentEvent}; the dashboard renders it in a panel and posts
16
+ * the pick back. The recommended option is what an agent nobody is watching takes.
17
+ */
18
+ export interface ChoiceRequest {
19
+ /** Unique id for this pending choice; the pick is posted back against it. */
20
+ id: string;
21
+ /** The question shown above the options (e.g. "Approve this plan?"). */
22
+ title: string;
23
+ /** The options to choose between (at least one). */
24
+ options: readonly ChoiceOption[];
25
+ /**
26
+ * The option id pre-selected as the default (taken when nobody is watching). Required
27
+ * for a single-select; omitted for a {@link multi} select, where each option's own
28
+ * {@link ChoiceOption.default} drives the pre-checked set instead.
29
+ */
30
+ recommended?: string;
31
+ /**
32
+ * Render as a multi-select checklist (#332): each option is a checkbox pre-checked
33
+ * per its {@link ChoiceOption.default}, and the pick resolves to the selected
34
+ * *subset* of ids rather than one. Absent = the single-select gate (#304).
35
+ */
36
+ multi?: boolean;
37
+ /** The markdown file under approval (e.g. `PLAN_<slug>.agent.md`); the doc sidebar renders it. */
38
+ file?: string;
39
+ }
40
+ /** Who resolved a {@link ChoiceRequest}: a human, or a headless auto-accept. */
41
+ export type ChoiceBy = 'user' | 'auto';
42
+ /** What a {@link import('./agent.js').RunOpenAgentOptions.requestChoice} handler resolves with. */
43
+ export interface ChoicePick {
44
+ /** The picked option id, or (for a {@link ChoiceRequest.multi} select) the selected subset of ids. */
45
+ picked: string | readonly string[];
46
+ /** Who picked it. Default `'user'`. */
47
+ by?: ChoiceBy;
48
+ }
49
+ /** Normalize a {@link ChoicePick} (single id or subset) to a list of picked ids. */
50
+ export declare function pickedIds(picked: string | readonly string[]): string[];
51
+ /**
52
+ * The single type a run's timeline is read as. OpenAgent emits none of these itself (#1774):
53
+ * a run's tool writes the run's diary, and every line of it is read as one of these so the
54
+ * dashboard and the terminal render one timeline whatever wrote it.
55
+ *
56
+ * What a diary yields today is the agent's own progress (`driver`), the session id it reports
57
+ * (`session-update`), the question a turn ended on (`choice`), what it cost (`usage`) and how it
58
+ * ended (`end`). **The rest of this union is a reading vocabulary for runs recorded before the
59
+ * daemon stopped running agents** — OpenAgent's own narration back then. They are kept
60
+ * because that history is still on the data branch and still has to render.
61
+ *
62
+ * Every event read from a diary line that says when it was written carries that time as `at`
63
+ * (ISO 8601), so the timeline shows the same times live, after a reload, and once the run has
64
+ * ended. Lines written before the diary kept times have none, and show none.
65
+ */
66
+ export type OpenAgentEvent = {
67
+ at?: string;
68
+ } & (
69
+ /**
70
+ * Emitted once at start: which agent is wrapped, the workspace, and a link. `model` is the
71
+ * model id the driver was started with (#1438), recorded per leg — a continuation (#762) emits
72
+ * its own `session` event and may run a different model, so readers fold the latest rather
73
+ * than pinning the first. Absent when the agent left the agent on its own default.
74
+ */
75
+ {
76
+ kind: 'session';
77
+ driver: string;
78
+ workspace: string;
79
+ fake: boolean;
80
+ sessionLink?: string;
81
+ model?: string;
82
+ }
83
+ /**
84
+ * Emitted once the wrapped agent reports its real session id (not known at
85
+ * start). Carries the live id and, when a link template was supplied, the
86
+ * resolved URL to jump into that session (#165). Re-emitted if the id changes
87
+ * (each Claude Code prompt is a fresh session), keeping the link current.
88
+ */
89
+ | {
90
+ kind: 'session-update';
91
+ sessionId: string;
92
+ sessionLink?: string;
93
+ }
94
+ /** What this session was asked for, emitted once as it opens (#211). */
95
+ | {
96
+ kind: 'intent';
97
+ text: string;
98
+ }
99
+ /** The wrapped agent's own progress, forwarded verbatim (never gated on). */
100
+ | {
101
+ kind: 'driver';
102
+ event: DriverEvent;
103
+ }
104
+ /**
105
+ * A live screen something the agent ran is showing: a page on this machine's loopback, shown in
106
+ * the chat where the line is, while it is the newest open screen at that address and the run
107
+ * has not ended. `label` names what it showed then. The same address with `ended` says the
108
+ * screen has gone. A diary line a command appends itself (agent-driver's `DIARY_ENV`);
109
+ * OpenAgent knows nothing of what the page is.
110
+ */
111
+ | {
112
+ kind: 'screen';
113
+ url: string;
114
+ label: string;
115
+ ended?: true;
116
+ }
117
+ /** An OpenAgent-level log line. */
118
+ | {
119
+ kind: 'log';
120
+ message: string;
121
+ }
122
+ /**
123
+ * Something went wrong that only the user can fix (#1500), reported by the agent itself
124
+ * through an `error` block rather than left in prose the reader has to notice. The headline
125
+ * is the first line, the detail is the rest.
126
+ *
127
+ * An event, not a status: it says what happened at this point in the run and stays in the log
128
+ * as history — nothing clears it, because nothing can un-happen it. The project-level errors a
129
+ * background job finds between runs are the other half (project-errors.ts): those are
130
+ * conditions that are true *now*, and clear themselves when the condition is gone.
131
+ */
132
+ | {
133
+ kind: 'error';
134
+ headline: string;
135
+ detail?: string;
136
+ }
137
+ /**
138
+ * An ad-hoc markdown view the agent pushed to show the user (#441), e.g. a plan,
139
+ * a summary, or a diff writeup. Non-blocking (unlike a `choice`): the dashboard
140
+ * renders it as a view in the right rail. `id` is stable per title, so re-showing
141
+ * the same view updates it in place rather than stacking a duplicate.
142
+ */
143
+ | {
144
+ kind: 'view';
145
+ id: string;
146
+ title: string;
147
+ markdown: string;
148
+ }
149
+ /**
150
+ * The pull request this session's work is on (E6), the moment one is opened for it.
151
+ *
152
+ * An event for the same reason `branch` is: only an event reaches the agent's meta,
153
+ * and the meta is what every later surface reads. Before this, each of them re-resolved the PR
154
+ * live from the branch — trying the recorded branch, then the session-name branch, then the
155
+ * run-id branch, and filtering the results by whether the PR predated the session — which is a
156
+ * three-way guess plus a timestamp heuristic standing in for one integer nobody had written down.
157
+ */
158
+ | {
159
+ kind: 'pull-request';
160
+ number: number;
161
+ url: string;
162
+ }
163
+ /**
164
+ * The branch the agent's work is on (#1277), observed off the checkout rather than guessed:
165
+ * emitted at start with the branch the agent actually begins on, and again whenever a later
166
+ * read finds it changed — the agent renames its branch itself, through `branches name`
167
+ * (#1725). Folded to `AgentMeta.branch`, which every surface resolves first — before this event the
168
+ * branch was stamped only at teardown (#799), so any read before that guessed between three
169
+ * naming schemes.
170
+ */
171
+ | {
172
+ kind: 'branch';
173
+ branch: string;
174
+ }
175
+ /**
176
+ * The hand-off anchor a cloud run pushed for its session to clone at (#1601): an empty commit
177
+ * unique to this run, so the branch the session actually works on — a `claude/*` name of the
178
+ * cloud's own choosing, never the designated run branch — is recognizable later by plain
179
+ * ancestry. Folded to `AgentMeta.cloudAnchor`, which the daemon's adoption pass matches
180
+ * against origin's `claude/*` heads once the session has pushed its work.
181
+ */
182
+ | {
183
+ kind: 'cloud-anchor';
184
+ sha: string;
185
+ }
186
+ /**
187
+ * The work has settled and the agent is parked on the user (#785): it stays open as a
188
+ * conversation (#714), so its process is still alive and it still takes messages, but
189
+ * the agent is not doing anything until you say something.
190
+ *
191
+ * Emitted each time the agent parks, and undone by the next `driver` `start` — so "is it
192
+ * working or waiting for me" is answerable from the event log rather than inferred from
193
+ * a status that only changes when the agent ends.
194
+ */
195
+ | {
196
+ kind: 'settled';
197
+ }
198
+ /**
199
+ * The price of one turn in USD (#322): the run's record keeps a cost line per turn the
200
+ * coding agent priced, and no token counts, so a turn without a price has no usage event
201
+ * (#540). The dashboard adds them up into its spend readout. Nothing gates on it: an
202
+ * agent already running is never cut short over spending, and the account's quota
203
+ * decides what may *start* instead.
204
+ */
205
+ | {
206
+ kind: 'usage';
207
+ costUsd: number;
208
+ }
209
+ /**
210
+ * The agent paused on an interactive choice (#304) and is awaiting a pick. The
211
+ * dashboard renders the options with the recommended default pre-selected and
212
+ * posts the pick back; a headless agent auto-accepts the recommended option.
213
+ */
214
+ | ({
215
+ kind: 'choice';
216
+ } & ChoiceRequest)
217
+ /** A pending {@link ChoiceRequest} was resolved — the agent continues on `picked` (one id, or the selected subset). */
218
+ | {
219
+ kind: 'choice-resolved';
220
+ id: string;
221
+ picked: string | readonly string[];
222
+ by: ChoiceBy;
223
+ }
224
+ /**
225
+ * The agent finished. `ok` is false when it threw. `stopped` marks the common,
226
+ * non-error case where the user interrupted it (the dashboard Stop button /
227
+ * Ctrl+C), so a surface can show "stopped" rather than "failed".
228
+ */
229
+ | {
230
+ kind: 'end';
231
+ ok: boolean;
232
+ stopped?: boolean;
233
+ waiting?: boolean;
234
+ detail?: string;
235
+ });
@@ -0,0 +1,2 @@
1
+ /** `1536` → `1.5 KB`. Absent, negative, or unparseable reads as an en dash, like a missing date. */
2
+ export declare function formatBytes(bytes: number | undefined, fallback?: string): string;
@@ -0,0 +1,7 @@
1
+ import { type GitRunner } from '@openagt/agent-data';
2
+ /**
3
+ * Whether the repository at `cwd` has an `origin` remote: the one every push and pull request
4
+ * goes to. A remote under another name counts as none, as for the data sync. A directory that is
5
+ * no repository has none.
6
+ */
7
+ export declare function hasRemote(cwd: string, git?: GitRunner): Promise<boolean>;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The types the dashboard reads the daemon's answers as.
3
+ *
4
+ * Not a library API: nothing imports this package by name, and the browser gets its *values* from
5
+ * `client.ts` (the node-free entry) and its data over `POST /_rpc/<name>`. What is left here is the
6
+ * vocabulary of those answers — one import site for a browser file that would otherwise reach into
7
+ * two dozen modules to name what an RPC returns.
8
+ *
9
+ * Type-only on purpose. A value re-exported here would pull the module that defines it into the
10
+ * browser bundle, which is the failure `client.ts` exists to prevent; `export type` erases at build.
11
+ *
12
+ * Every name below is imported by a file under `dashboard/`. That is the whole rule: this file
13
+ * ends where its consumers end, so a name nothing renders cannot quietly live on in it.
14
+ */
15
+ export type { AgentError, SessionInfo } from './agent-view.js';
16
+ export type { ChoiceRequest, OpenAgentEvent } from './events.js';
17
+ export type { QuotaBoundary } from './quota-boundary.js';
18
+ export type { CustomPreset, Preferences } from './registry.js';
19
+ export type { PublishPick } from './publish-levels.js';
20
+ export type { DriverQuotaWindow } from '@openagt/agent-driver';
21
+ export type { AgentMeta, AgentStatus } from './store/agent-store.js';
22
+ export type { Activity } from './dashboard/activity.js';
23
+ export type { AgentHandoff } from './dashboard/agent-handoff.js';
24
+ export type { GitHostHome } from './store/git-host.js';
25
+ export type { RepositoryOffer, CreateRepositoryResult } from './store/repository.js';
26
+ export type { BranchReach as RecordsReach } from '@openagt/agent-data';
27
+ export type { BridgeEvent } from './dashboard/bridge-endpoints.js';
28
+ export type { BridgeOption, BridgeQuestion } from './dashboard/bridge-question.js';
29
+ export type { BridgeAnswer } from './dashboard/bridge-store.js';
30
+ export type { DashboardData } from './dashboard/dashboard.js';
31
+ export type { WorkspaceDoc } from './dashboard/docs.js';
32
+ export type { GitStatus } from './dashboard/git-status.js';
33
+ export type { Intervention } from './dashboard/interventions.js';
34
+ export type { OpenQuestion } from './dashboard/open-questions.js';
35
+ export type { ActiveAgent, Overview, RecentAgent } from './dashboard/overview.js';
36
+ export type { ProjectSummary, ProjectionRead } from './dashboard/projects.js';
37
+ export type { ProjectError, ProjectErrorCode } from './project-errors.js';
38
+ export type { ProjectQueue } from './dashboard/queue.js';
39
+ export type { QuotaView } from './dashboard/quota.js';
40
+ export type { Ticket } from './store/tickets.js';
41
+ export type { AgentWorktree, CleanupReport, OnboardingSuggestion } from './dashboard/types.js';
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Tails an append-only JSONL log, calling `onLine` for each complete line as it
3
+ * is written. Reads only the bytes appended since the last {@link pull},
4
+ * buffering a torn trailing line until its newline arrives. A file that shrinks
5
+ * (a fresh agent truncated the log) resets to the start so the new content is
6
+ * picked up. The generic base behind the daemon's event tail and the agent's
7
+ * control tail (#344) — one tailer, two directions.
8
+ */
9
+ export declare class JsonlTailer<T> {
10
+ private path;
11
+ private readonly onLine;
12
+ /** Told when the log is found rewritten, before its lines are read again from the top. */
13
+ private readonly onReset?;
14
+ private offset;
15
+ private partial;
16
+ private lastMtimeMs;
17
+ private adoptMtime;
18
+ constructor(path: string, onLine: (value: T) => void,
19
+ /** Told when the log is found rewritten, before its lines are read again from the top. */
20
+ onReset?: (() => void) | undefined);
21
+ /**
22
+ * Point the tailer at the log's new home, keeping the read offset. For a log that is
23
+ * *relocated with its content intact* — a run's diary is copied verbatim onto the data branch
24
+ * when the run ends and its checkout is reclaimed — the bytes already consumed are a prefix of
25
+ * the new file, so the next {@link pull} delivers exactly the lines the move would otherwise
26
+ * have swallowed, without replaying what was already delivered.
27
+ *
28
+ * The first pull after a retarget adopts the new home's mtime instead of running the
29
+ * same-length-rewrite check: the copy is younger than the original by construction, and a
30
+ * fully-consumed log would otherwise read as "rewritten to the same length" and replay
31
+ * every line it already delivered.
32
+ */
33
+ retarget(path: string): void;
34
+ /** Read and dispatch any lines appended since the previous call. */
35
+ pull(): Promise<void>;
36
+ }
37
+ /** Options for {@link followFile}. */
38
+ export interface FollowFileOptions {
39
+ /** How often the backstop poll runs. */
40
+ pollMs: number;
41
+ /**
42
+ * Let the process exit with the tail still running (steering must never hold it open).
43
+ * Covers both handles this opens — the poll timer *and* the `fs.watch` — since either one
44
+ * on its own is enough to keep the event loop alive.
45
+ */
46
+ unref?: boolean;
47
+ }
48
+ /**
49
+ * Drive a {@link JsonlTailer} as the file grows: an `fs.watch` on `dir` for latency, plus a
50
+ * poll backstop because `fs.watch` is unreliable across platforms. Pulls are serialized (a
51
+ * pull already in flight swallows the next trigger) and stop for good once the returned
52
+ * function is called. Shared by the agent's control tail and the dashboard's event tail, which
53
+ * hand-rolled this separately and drifted apart.
54
+ *
55
+ * Nothing here may throw at the process: a failed pull and a watcher error are both survivable,
56
+ * and the poll alone is a complete tail (#996).
57
+ */
58
+ export declare function followFile(dir: string, pull: () => Promise<void>, opts: FollowFileOptions): () => void;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Loopback-address helpers, shared by the daemon (deciding whether a bind gates behind the
3
+ * token, #1051) and the RPC mount (rejecting a rebound `Host`). A leaf module on purpose:
4
+ * `daemon.ts` imports the dashboard, so the mount cannot import these back out of it.
5
+ */
6
+ /**
7
+ * True when `host` is a loopback address the browser reaches without leaving the machine (#1051).
8
+ * A bind-all (`0.0.0.0`, `::`) or a routable address is not, and gates behind the shared token.
9
+ *
10
+ * The IPv4 check matches the whole `127.0.0.0/8` range but only as an address: a bare
11
+ * `startsWith('127.')` also accepts a *registrable name* like `127.evil.com`, which is exactly the
12
+ * rebound `Host` the DNS-rebinding guard exists to reject (it can resolve to `127.0.0.1`).
13
+ */
14
+ export declare function isLoopbackHost(host: string): boolean;
15
+ /**
16
+ * The hostname a `Host` header names, with the port dropped. Keeps the bracketed IPv6 form
17
+ * (`[::1]:4200` → `[::1]`), which splitting on the first colon would mangle.
18
+ */
19
+ export declare function hostnameFromHostHeader(header: string): string;