@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,22 @@
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;
22
+ //# sourceMappingURL=driver-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driver-names.d.ts","sourceRoot":"","sources":["../src/driver-names.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,sFAAsF;AACtF,eAAO,MAAM,OAAO,YAAI,aAAa,EAAE,OAAO,CAAU,CAAA;AAExD,kCAAkC;AAClC,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjD,iDAAiD;AACjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,IAAI,UAAU,CAE3E;AAED,0DAA0D;AAC1D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAGpD,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAG/E"}
@@ -0,0 +1,29 @@
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 const DRIVERS = ['claude-code', 'codex'];
10
+ /** Whether `value` names a driver we can run. */
11
+ export function isDriverName(value) {
12
+ return value !== undefined && DRIVERS.includes(value);
13
+ }
14
+ /** How each driver reads in a sentence or on a button. */
15
+ export const DRIVER_LABELS = {
16
+ 'claude-code': 'Claude Code',
17
+ codex: 'Codex',
18
+ };
19
+ /**
20
+ * The pick behind the driver a run's record names (#831). Every surface Claude ran on is still
21
+ * Claude (#1263): older records name its cloud session and its Actions runner. `undefined` for a
22
+ * driver no pick claims (a fake one, or a record from a newer version).
23
+ */
24
+ export function driverFromImpl(impl) {
25
+ if (impl === 'claude-web' || impl === 'github-actions')
26
+ return 'claude-code';
27
+ return isDriverName(impl) ? impl : undefined;
28
+ }
29
+ //# sourceMappingURL=driver-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"driver-names.js","sourceRoot":"","sources":["../src/driver-names.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,aAAa,EAAE,OAAO,CAAU,CAAA;AAKxD,iDAAiD;AACjD,MAAM,UAAU,YAAY,CAAC,KAAyB;IACpD,OAAO,KAAK,KAAK,SAAS,IAAK,OAA6B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC9E,CAAC;AAED,0DAA0D;AAC1D,MAAM,CAAC,MAAM,aAAa,GAA+B;IACvD,aAAa,EAAE,aAAa;IAC5B,KAAK,EAAE,OAAO;CACf,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAwB;IACrD,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,gBAAgB;QAAE,OAAO,aAAa,CAAA;IAC5E,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAA;AAC9C,CAAC"}
@@ -0,0 +1,8 @@
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;
8
+ //# sourceMappingURL=error-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../src/error-message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEjD"}
@@ -0,0 +1,10 @@
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 function errorMessage(err) {
8
+ return err instanceof Error ? err.message : String(err);
9
+ }
10
+ //# sourceMappingURL=error-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-message.js","sourceRoot":"","sources":["../src/error-message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AACzD,CAAC"}
@@ -0,0 +1,33 @@
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
+ }
33
+ //# sourceMappingURL=event-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-stream.d.ts","sourceRoot":"","sources":["../src/event-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,WAAW,CAAC,CAAC;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,OAAO,CAAC,MAAM,CAAQ;IAEtB,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,UAAW,CAAC,KAAG,IAAI,CAI/B;IAED,sEAAsE;IACtE,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAE7B;IAED,sFAAsF;IACtF,OAAO,CAAC,UAAU,SAAI,GAAG,CAAC,EAAE,CAE3B;IAED,iCAAiC;IACjC,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,uCAAuC;IACvC,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,mFAAmF;IACnF,KAAK,IAAI,IAAI,CAIZ;IAED;;;;;OAKG;IACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,CA6CjD;CACF"}
@@ -0,0 +1,104 @@
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 class EventStream {
10
+ buffer = [];
11
+ waiters = [];
12
+ closed = false;
13
+ /** Append an event. Wire this in as an `onEvent` sink. Ignored once closed. */
14
+ push = (event) => {
15
+ if (this.closed)
16
+ return;
17
+ this.buffer.push(event);
18
+ for (const wake of this.waiters.splice(0))
19
+ wake();
20
+ };
21
+ /** Alias for {@link push}, reads well at the `onEvent:` call site. */
22
+ get sink() {
23
+ return this.push;
24
+ }
25
+ /** Events buffered so far, from `fromOffset` (default 0) — Flue-style tail replay. */
26
+ history(fromOffset = 0) {
27
+ return this.buffer.slice(fromOffset);
28
+ }
29
+ /** Number of events buffered. */
30
+ get length() {
31
+ return this.buffer.length;
32
+ }
33
+ /** True once {@link close} has run. */
34
+ get isClosed() {
35
+ return this.closed;
36
+ }
37
+ /** End the stream: live iterators drain their backlog, then finish. Idempotent. */
38
+ close() {
39
+ if (this.closed)
40
+ return;
41
+ this.closed = true;
42
+ for (const wake of this.waiters.splice(0))
43
+ wake();
44
+ }
45
+ /**
46
+ * A fresh async iterator that replays every buffered event, then yields new
47
+ * ones as they arrive, and finishes once the stream is closed and drained.
48
+ * Independent iterators each keep their own cursor, so late consumers still
49
+ * see the full history.
50
+ */
51
+ [Symbol.asyncIterator]() {
52
+ let index = 0;
53
+ let done = false;
54
+ let pending;
55
+ const stream = this;
56
+ return {
57
+ [Symbol.asyncIterator]() {
58
+ return this;
59
+ },
60
+ next() {
61
+ if (done)
62
+ return Promise.resolve({ value: undefined, done: true });
63
+ if (index < stream.buffer.length) {
64
+ return Promise.resolve({ value: stream.buffer[index++], done: false });
65
+ }
66
+ if (stream.closed)
67
+ return Promise.resolve({ value: undefined, done: true });
68
+ return new Promise(resolve => {
69
+ const wake = () => {
70
+ pending = undefined;
71
+ if (done)
72
+ return resolve({ value: undefined, done: true });
73
+ if (index < stream.buffer.length)
74
+ return resolve({ value: stream.buffer[index++], done: false });
75
+ if (stream.closed)
76
+ return resolve({ value: undefined, done: true });
77
+ // Woken with nothing left for us (a concurrent next() on this iterator took the
78
+ // event): the stream is still open, so wait again rather than resolve a false done.
79
+ pending = wake;
80
+ stream.waiters.push(wake);
81
+ };
82
+ pending = wake;
83
+ stream.waiters.push(wake);
84
+ });
85
+ },
86
+ // Cancel this iterator (e.g. an SSE client disconnected): drop its waiter so
87
+ // it does not linger in `waiters` until the next push, and settle any pending
88
+ // `next()`. Without this, a disconnected consumer leaks until the stream ends.
89
+ return() {
90
+ done = true;
91
+ if (pending) {
92
+ const i = stream.waiters.indexOf(pending);
93
+ if (i >= 0)
94
+ stream.waiters.splice(i, 1);
95
+ const wake = pending;
96
+ pending = undefined;
97
+ wake();
98
+ }
99
+ return Promise.resolve({ value: undefined, done: true });
100
+ },
101
+ };
102
+ }
103
+ }
104
+ //# sourceMappingURL=event-stream.js.map
@@ -0,0 +1 @@
1
+ {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I,CAAC,IAAI,CAAC,CAAA;oBAC3B,CAAC,CAAA;oBACD,OAAO,GAAG,IAAI,CAAA;oBACd,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAC3B,CAAC,CAAC,CAAA;YACJ,CAAC;YACD,6EAA6E;YAC7E,8EAA8E;YAC9E,+EAA+E;YAC/E,MAAM;gBACJ,IAAI,GAAG,IAAI,CAAA;gBACX,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;oBACzC,IAAI,CAAC,IAAI,CAAC;wBAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;oBACvC,MAAM,IAAI,GAAG,OAAO,CAAA;oBACpB,OAAO,GAAG,SAAS,CAAA;oBACnB,IAAI,EAAE,CAAA;gBACR,CAAC;gBACD,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;YAC1D,CAAC;SACF,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,236 @@
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
+ });
236
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACpC;;;;GAIG;GACD,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,aAAa,CAAC;AACtC,uHAAuH;GACrH;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAAC,EAAE,EAAE,QAAQ,CAAA;CAAE;AAC3F;;;;GAIG;GACD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CACtF,CAAA"}
package/dist/events.js ADDED
@@ -0,0 +1,5 @@
1
+ /** Normalize a {@link ChoicePick} (single id or subset) to a list of picked ids. */
2
+ export function pickedIds(picked) {
3
+ return Array.isArray(picked) ? [...picked] : picked ? [picked] : [];
4
+ }
5
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAqDA,oFAAoF;AACpF,MAAM,UAAU,SAAS,CAAC,MAAkC;IAC1D,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC/E,CAAC"}
@@ -0,0 +1,3 @@
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;
3
+ //# sourceMappingURL=format-bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-bytes.d.ts","sourceRoot":"","sources":["../src/format-bytes.ts"],"names":[],"mappings":"AAKA,oGAAoG;AACpG,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,SAAM,GAAG,MAAM,CAW7E"}
@@ -0,0 +1,18 @@
1
+ // A size for a label, not a report: two significant-ish digits and a unit, so "how much would
2
+ // removing this give me back" is answerable at a glance (#798).
3
+ const UNITS = ['B', 'KB', 'MB', 'GB', 'TB'];
4
+ /** `1536` → `1.5 KB`. Absent, negative, or unparseable reads as an en dash, like a missing date. */
5
+ export function formatBytes(bytes, fallback = '–') {
6
+ if (typeof bytes !== 'number' || !Number.isFinite(bytes) || bytes < 0)
7
+ return fallback;
8
+ let value = bytes;
9
+ let unit = 0;
10
+ while (value >= 1024 && unit < UNITS.length - 1) {
11
+ value /= 1024;
12
+ unit++;
13
+ }
14
+ // Whole numbers above 10 read better without a decimal: `512 MB`, not `512.0 MB`.
15
+ const rounded = value < 10 && unit > 0 ? Math.round(value * 10) / 10 : Math.round(value);
16
+ return `${rounded} ${UNITS[unit]}`;
17
+ }
18
+ //# sourceMappingURL=format-bytes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-bytes.js","sourceRoot":"","sources":["../src/format-bytes.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gEAAgE;AAEhE,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA;AAEpD,oGAAoG;AACpG,MAAM,UAAU,WAAW,CAAC,KAAyB,EAAE,QAAQ,GAAG,GAAG;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAA;IACtF,IAAI,KAAK,GAAG,KAAK,CAAA;IACjB,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,OAAO,KAAK,IAAI,IAAI,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,KAAK,IAAI,IAAI,CAAA;QACb,IAAI,EAAE,CAAA;IACR,CAAC;IACD,kFAAkF;IAClF,MAAM,OAAO,GAAG,KAAK,GAAG,EAAE,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACxF,OAAO,GAAG,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAA;AACpC,CAAC"}
@@ -0,0 +1,8 @@
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>;
8
+ //# sourceMappingURL=has-remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-remote.d.ts","sourceRoot":"","sources":["../src/has-remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEnE;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/F"}
@@ -0,0 +1,10 @@
1
+ import { nodeGitRunner } 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 async function hasRemote(cwd, git = nodeGitRunner()) {
8
+ return git(['remote'], cwd).then(out => out.split('\n').some(line => line.trim() === 'origin'), () => false);
9
+ }
10
+ //# sourceMappingURL=has-remote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-remote.js","sourceRoot":"","sources":["../src/has-remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,qBAAqB,CAAA;AAEnE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,GAAW,EAAE,GAAG,GAAc,aAAa,EAAE;IAC3E,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAA;AAC9G,CAAC"}
@@ -0,0 +1,42 @@
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';
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC9D,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAChE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC9D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,YAAY,EAAE,SAAS,EAAE,WAAW,EAA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
+ *
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 {};
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}