@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,89 @@
1
+ import { type AgentStatus, type BranchesFor, type RunsFor } from './store/index.js';
2
+ /** A retained worktree and the agent that left it behind (#752). */
3
+ export interface WorktreeRow {
4
+ /** The agent id. */
5
+ agentId: string;
6
+ /** The branch the agent's work landed on, when its meta recorded one (#799). */
7
+ branch?: string;
8
+ /** How the agent that left this checkout ended, or `running` while it is still going. */
9
+ status?: AgentStatus;
10
+ /** Size on disk in bytes, absent for a live agent (its tree is still changing) or when unreadable. */
11
+ sizeBytes?: number;
12
+ /** True while the agent owning this checkout is still going: it is in use, not retained. */
13
+ live: boolean;
14
+ }
15
+ /** The outcome of {@link removeProjectWorktree}. */
16
+ export type RemoveResult = {
17
+ ok: true;
18
+ /**
19
+ * Branches that went with the checkout: the branch it was on, when that held nothing of
20
+ * its own (#1650); the run-id branch the agent branched away from, when everything on
21
+ * it is in the branch that stays (#1657). Absent when nothing went.
22
+ */
23
+ branchesDeleted?: string[];
24
+ } | {
25
+ ok: false;
26
+ error: string;
27
+ };
28
+ /**
29
+ * The worktrees a project still has on disk (#752), newest first — the same view the dashboard's
30
+ * retained-worktrees list is built from, through the same store reads, so the CLI is a second
31
+ * surface rather than a second behaviour. The checkouts are what the project's branches provider
32
+ * lists (#1774); a project with no provider has none.
33
+ *
34
+ * A live agent's checkout is included and flagged rather than hidden: "what is this directory and
35
+ * why can I not remove it" is exactly the question the list has to answer.
36
+ */
37
+ export declare function listProjectWorktrees(cwd: string, opts?: {
38
+ sizes?: boolean;
39
+ }, branches?: BranchesFor): Promise<WorktreeRow[]>;
40
+ /**
41
+ * Remove one retained worktree (#752/#737/E5): the one implementation behind every surface that
42
+ * removes one: the dashboard's Remove button (#982). The run's own tool reclaims a finished run's
43
+ * checkout by the same rule; this is for the checkouts that rule kept.
44
+ *
45
+ * **One rule: only what is committed may go**: the rule is the branches provider's, whose
46
+ * `remove` takes a clean checkout and leaves its branch on this machine, pushing nothing
47
+ * (#1774); its refusal is answered in its own words.
48
+ *
49
+ * Refuses while the agent is still going — an agent's checkout is where its agent is working, and Stop
50
+ * is how you end an agent, not pulling the floor out from under it.
51
+ */
52
+ export declare function removeProjectWorktree(cwd: string, agentId: string, branches?: BranchesFor): Promise<RemoveResult>;
53
+ /** The outcome of {@link deleteProjectAgent}. */
54
+ export type DeleteAgentResult = {
55
+ ok: true;
56
+ } | {
57
+ ok: false;
58
+ error: string;
59
+ };
60
+ /** Where {@link deleteProjectAgent} reads: the project's providers by default. */
61
+ export interface DeleteAgentOptions {
62
+ /** Where the project's finished runs are read and removed; the project's runs provider by default. */
63
+ runs?: RunsFor;
64
+ /** Where the project's checkouts are read and removed; the project's branches provider by default. */
65
+ branches?: BranchesFor;
66
+ }
67
+ /**
68
+ * Delete a session (#1032): take it out of the dashboard, records and all.
69
+ *
70
+ * This is the sibling of {@link removeProjectWorktree}, and the difference is the whole point.
71
+ * Remove-worktree reclaims the checkout on disk and keeps the session — its row, its replayable
72
+ * log — because the run is recorded on the data branch. Delete removes that record too: the card
73
+ * (`<id>.json`, what the rail lists) and the diary (`<id>.jsonl`, what replays), so the row is
74
+ * gone for good. It is the one destructive-of-history action, which is
75
+ * why the surfaces that call it confirm first. The run is on the data branch, so its deletion is
76
+ * itself a committed, pushed change.
77
+ *
78
+ * What it deliberately leaves is git's, not the dashboard's: the branch `agent-<id>`
79
+ * (or the name the agent gave it) and its commits. Deleting a branch that may carry merged work
80
+ * or an open PR is not a thing a
81
+ * dashboard action should do silently, so the branch stays and delete means "remove from the
82
+ * dashboard", not "erase every trace".
83
+ *
84
+ * Refuses while the agent is still going — Stop is how an agent ends. Any uncommitted work in the
85
+ * worktree is discarded with it, which is the intent here (the session is being thrown away),
86
+ * unlike remove-worktree, which refuses a checkout holding uncommitted work: the branches
87
+ * provider's `remove --discard` (#1774).
88
+ */
89
+ export declare function deleteProjectAgent(cwd: string, agentId: string, opts?: DeleteAgentOptions): Promise<DeleteAgentResult>;
@@ -0,0 +1,50 @@
1
+ /* The dashboard's theme as Tailwind sees it (#1774): the dark variant, the fonts, and the utilities
2
+ (`bg-card`, `text-muted-foreground`, …) that read the page's own tokens. The dashboard imports
3
+ it, and so does a module's stylesheet, so a module's classes read the tokens the page defines in
4
+ tailwind.css — its colours follow the theme and the theme toggle without a copy of either. */
5
+
6
+ /* The theme is the `.dark` class LayoutDefault toggles, not the OS preference. Without this,
7
+ Tailwind v4 compiles `dark:` to `@media (prefers-color-scheme: dark)`, so the `dark:` utilities
8
+ disagreed with the tokens: picking Dark on a light OS applied the dark tokens but left
9
+ `dark:text-*-400` unapplied, and picking Light on a dark OS applied them when it should not. */
10
+ @custom-variant dark (&:where(.dark, .dark *));
11
+
12
+ /* The page is squarer than the old UI, so the radius tightens to ~2px to match. */
13
+ @theme {
14
+ --radius: 0.125rem;
15
+ /* The landing page's typeface (#1118), loaded in pages/+Head.tsx. Overriding these two theme
16
+ keys retargets Tailwind's default body font and every `font-mono` to IBM Plex. */
17
+ --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
18
+ --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
19
+ }
20
+
21
+ @theme inline {
22
+ --color-background: var(--background);
23
+ --color-foreground: var(--foreground);
24
+ --color-card: var(--card);
25
+ --color-card-foreground: var(--card-foreground);
26
+ --color-muted: var(--muted);
27
+ --color-muted-foreground: var(--muted-foreground);
28
+ --color-border: var(--border);
29
+ --color-primary: var(--primary);
30
+ --color-primary-foreground: var(--primary-foreground);
31
+ --color-accent: var(--accent);
32
+ --color-accent-foreground: var(--accent-foreground);
33
+ --color-success: var(--success);
34
+ --color-warning: var(--warning);
35
+ --color-danger: var(--danger);
36
+ --color-info: var(--info);
37
+
38
+ /* The shadcn sidebar reads its own `--sidebar-*` family so a sidebar can be themed apart from
39
+ the page. We keep it in step with the rest of the palette (the rail is the app's own surface,
40
+ not a contrasting slab): background canvas, accent for the hover/active fill, the shared border
41
+ and the primary ring. */
42
+ --color-sidebar: var(--background);
43
+ --color-sidebar-foreground: var(--foreground);
44
+ --color-sidebar-primary: var(--primary);
45
+ --color-sidebar-primary-foreground: var(--primary-foreground);
46
+ --color-sidebar-accent: var(--accent);
47
+ --color-sidebar-accent-foreground: var(--accent-foreground);
48
+ --color-sidebar-border: var(--border);
49
+ --color-sidebar-ring: var(--primary);
50
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The one `node:fs/promises` adapter. Every `node*Fs()` factory in the package
3
+ * returns this under its own narrow type: the store may append, the registry may
4
+ * not, and those interfaces stay separate because they are the consumers'
5
+ * contracts. Only the implementation was worth sharing, and it was written out
6
+ * four times before this.
7
+ *
8
+ * Every import is dynamic, which is the whole point of the convention: a module
9
+ * that reads files keeps a `node:fs` edge out of its static import graph, so it
10
+ * can be reached from browser-safe code as long as the read itself never runs
11
+ * there. `client.test.ts` enforces the graph half.
12
+ */
13
+ export interface NodeFs {
14
+ /** Rejects when the file is absent. */
15
+ read(path: string): Promise<string>;
16
+ write(path: string, contents: string): Promise<void>;
17
+ append(path: string, contents: string): Promise<void>;
18
+ /** True when `path` exists AND is a file. Any stat error reads as `false`. */
19
+ exists(path: string): Promise<boolean>;
20
+ /** True when `path` exists AND is a directory. Any stat error reads as `false`. */
21
+ isDirectory(path: string): Promise<boolean>;
22
+ /** Recursive. */
23
+ mkdir(path: string): Promise<void>;
24
+ /** List a directory's entries (names only). Missing dir yields `[]`. */
25
+ readdir(path: string): Promise<string[]>;
26
+ /** Replace `to` with `from`. Atomic within one filesystem, which is the point of having it. */
27
+ rename(from: string, to: string): Promise<void>;
28
+ /** Set a file's permission bits. Rejects when the path is absent, or the fs cannot express them. */
29
+ chmod(path: string, mode: number): Promise<void>;
30
+ }
31
+ /** The `node:fs/promises` implementation of {@link NodeFs}. */
32
+ export declare function nodeFs(): NodeFs;
33
+ //# sourceMappingURL=node-fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-fs.d.ts","sourceRoot":"","sources":["../src/node-fs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,MAAM;IACrB,uCAAuC;IACvC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACnC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,8EAA8E;IAC9E,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,mFAAmF;IACnF,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC3C,iBAAiB;IACjB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,wEAAwE;IACxE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACxC,+FAA+F;IAC/F,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,oGAAoG;IACpG,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACjD;AAED,+DAA+D;AAC/D,wBAAgB,MAAM,IAAI,MAAM,CAmD/B"}
@@ -0,0 +1,57 @@
1
+ /** The `node:fs/promises` implementation of {@link NodeFs}. */
2
+ export function nodeFs() {
3
+ return {
4
+ async read(path) {
5
+ const { readFile } = await import('node:fs/promises');
6
+ return readFile(path, 'utf8');
7
+ },
8
+ async write(path, contents) {
9
+ const { writeFile } = await import('node:fs/promises');
10
+ await writeFile(path, contents, 'utf8');
11
+ },
12
+ async append(path, contents) {
13
+ const { appendFile } = await import('node:fs/promises');
14
+ await appendFile(path, contents, 'utf8');
15
+ },
16
+ async exists(path) {
17
+ const { stat } = await import('node:fs/promises');
18
+ try {
19
+ return (await stat(path)).isFile();
20
+ }
21
+ catch {
22
+ return false;
23
+ }
24
+ },
25
+ async isDirectory(path) {
26
+ const { stat } = await import('node:fs/promises');
27
+ try {
28
+ return (await stat(path)).isDirectory();
29
+ }
30
+ catch {
31
+ return false;
32
+ }
33
+ },
34
+ async mkdir(path) {
35
+ const { mkdir } = await import('node:fs/promises');
36
+ await mkdir(path, { recursive: true });
37
+ },
38
+ async readdir(path) {
39
+ const { readdir } = await import('node:fs/promises');
40
+ try {
41
+ return await readdir(path);
42
+ }
43
+ catch {
44
+ return [];
45
+ }
46
+ },
47
+ async rename(from, to) {
48
+ const { rename } = await import('node:fs/promises');
49
+ await rename(from, to);
50
+ },
51
+ async chmod(path, mode) {
52
+ const { chmod } = await import('node:fs/promises');
53
+ await chmod(path, mode);
54
+ },
55
+ };
56
+ }
57
+ //# sourceMappingURL=node-fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-fs.js","sourceRoot":"","sources":["../src/node-fs.ts"],"names":[],"mappings":"AA+BA,+DAA+D;AAC/D,MAAM,UAAU,MAAM;IACpB,OAAO;QACL,KAAK,CAAC,IAAI,CAAC,IAAI;YACb,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACrD,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QAC/B,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ;YACxB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACtD,MAAM,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;QACzC,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ;YACzB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACvD,MAAM,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;QAC1C,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACjD,IAAI,CAAC;gBACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;YACpC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QACD,KAAK,CAAC,WAAW,CAAC,IAAI;YACpB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACjD,IAAI,CAAC;gBACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;YACzC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,IAAI;YACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YAClD,MAAM,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QACxC,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,IAAI;YAChB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACpD,IAAI,CAAC;gBACH,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;YAC5B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,EAAE,CAAA;YACX,CAAC;QACH,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE;YACnB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACnD,MAAM,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;QACxB,CAAC;QACD,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI;YACpB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YAClD,MAAM,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACzB,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ChoiceRequest, OpenAgentEvent } from './events.js';
2
+ /**
3
+ * Every question a run still waits on, in the order asked, read off the run's events. One rule
4
+ * for every surface that offers an answer (the run page, the open-questions list, the write
5
+ * that delivers the answer), so none offers what another would refuse.
6
+ *
7
+ * A `choice` event opens a question; asked again under the same id, the later one replaces it.
8
+ * It closes when the agent goes on (any later event of the agent's own: the answer, or the
9
+ * person's text, began a new turn), when a `choice-resolved` names it, and when the run ends
10
+ * for good. An end that says `waiting` closes nothing: the run ended ON the question, its
11
+ * checkout kept, and the answer resumes it. A run that died holding a question ends otherwise,
12
+ * and its question goes with it (#1359): nobody would read the pick.
13
+ */
14
+ export declare function pendingChoices(events: readonly OpenAgentEvent[]): ChoiceRequest[];
15
+ //# sourceMappingURL=open-choices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-choices.d.ts","sourceRoot":"","sources":["../src/open-choices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAKhE;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,GAAG,aAAa,EAAE,CAajF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Every question a run still waits on, in the order asked, read off the run's events. One rule
3
+ * for every surface that offers an answer (the run page, the open-questions list, the write
4
+ * that delivers the answer), so none offers what another would refuse.
5
+ *
6
+ * A `choice` event opens a question; asked again under the same id, the later one replaces it.
7
+ * It closes when the agent goes on (any later event of the agent's own: the answer, or the
8
+ * person's text, began a new turn), when a `choice-resolved` names it, and when the run ends
9
+ * for good. An end that says `waiting` closes nothing: the run ended ON the question, its
10
+ * checkout kept, and the answer resumes it. A run that died holding a question ends otherwise,
11
+ * and its question goes with it (#1359): nobody would read the pick.
12
+ */
13
+ export function pendingChoices(events) {
14
+ const open = new Map();
15
+ for (const event of events) {
16
+ if (event.kind === 'choice-resolved')
17
+ open.delete(event.id);
18
+ else if (event.kind === 'driver')
19
+ open.clear();
20
+ else if (event.kind === 'end') {
21
+ if (event.waiting !== true)
22
+ open.clear();
23
+ }
24
+ else if (event.kind === 'choice') {
25
+ const { kind: _kind, ...request } = event;
26
+ open.set(event.id, request);
27
+ }
28
+ }
29
+ return [...open.values()];
30
+ }
31
+ //# sourceMappingURL=open-choices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-choices.js","sourceRoot":"","sources":["../src/open-choices.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,MAAiC;IAC9D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAyB,CAAA;IAC7C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB;YAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;aACtD,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;YAAE,IAAI,CAAC,KAAK,EAAE,CAAA;aACzC,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;gBAAE,IAAI,CAAC,KAAK,EAAE,CAAA;QAC1C,CAAC;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACnC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,GAAG,KAAoB,CAAA;YACxD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;AAC3B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The directory, under a project root, that holds OpenAgent's own files.
3
+ *
4
+ * Its own module so every reader and writer of the directory (the hooks file, the project's saved
5
+ * prompts, the activation's `.gitignore`, a run's card, diary and inbox) spells it the same way.
6
+ *
7
+ * Nothing of the product's rides on a branch of its own any more: the agent archives are the
8
+ * `logs` skill's runs, on the shared `agent-data` branch that `@openagt/agent-data` names (#1769).
9
+ */
10
+ export declare const OPENAGENT_DIR = ".openagent";
11
+ //# sourceMappingURL=openagent-dir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openagent-dir.d.ts","sourceRoot":"","sources":["../src/openagent-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,eAAe,CAAA"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The directory, under a project root, that holds OpenAgent's own files.
3
+ *
4
+ * Its own module so every reader and writer of the directory (the hooks file, the project's saved
5
+ * prompts, the activation's `.gitignore`, a run's card, diary and inbox) spells it the same way.
6
+ *
7
+ * Nothing of the product's rides on a branch of its own any more: the agent archives are the
8
+ * `logs` skill's runs, on the shared `agent-data` branch that `@openagt/agent-data` names (#1769).
9
+ */
10
+ export const OPENAGENT_DIR = '.openagent';
11
+ //# sourceMappingURL=openagent-dir.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openagent-dir.js","sourceRoot":"","sources":["../src/openagent-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The `.openagent/.gitignore` (#313): one file, one content, written at install.
3
+ *
4
+ * Everything under `.openagent/` is this machine's or transient: a run's live files, the
5
+ * hooks file. The lasting records (the runs, the `logs` skill's) live on the data branch
6
+ * (#1582/#1769), so nothing is tracked, this file included: git shows no trace of the directory.
7
+ */
8
+ /** The `.gitignore` path under `cwd`'s `.openagent/`. */
9
+ export declare function gitignorePath(cwd: string): string;
10
+ /** The whole file: everything under `.openagent/` stays out of git, the file itself too (#1582). */
11
+ export declare function openagentGitignore(): string;
12
+ //# sourceMappingURL=openagent-gitignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openagent-gitignore.d.ts","sourceRoot":"","sources":["../src/openagent-gitignore.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,yDAAyD;AACzD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,oGAAoG;AACpG,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
@@ -0,0 +1,19 @@
1
+ import { join } from 'node:path';
2
+ import { DATA_BRANCH } from '@openagt/agent-data/names';
3
+ import { OPENAGENT_DIR } from './openagent-dir.js';
4
+ /**
5
+ * The `.openagent/.gitignore` (#313): one file, one content, written at install.
6
+ *
7
+ * Everything under `.openagent/` is this machine's or transient: a run's live files, the
8
+ * hooks file. The lasting records (the runs, the `logs` skill's) live on the data branch
9
+ * (#1582/#1769), so nothing is tracked, this file included: git shows no trace of the directory.
10
+ */
11
+ /** The `.gitignore` path under `cwd`'s `.openagent/`. */
12
+ export function gitignorePath(cwd) {
13
+ return join(cwd, OPENAGENT_DIR, '.gitignore');
14
+ }
15
+ /** The whole file: everything under `.openagent/` stays out of git, the file itself too (#1582). */
16
+ export function openagentGitignore() {
17
+ return `# OpenAgent: agent state is transient; the lasting records live on the ${DATA_BRANCH} branch.\n*\n`;
18
+ }
19
+ //# sourceMappingURL=openagent-gitignore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openagent-gitignore.js","sourceRoot":"","sources":["../src/openagent-gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;GAMG;AAEH,yDAAyD;AACzD,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,CAAC,CAAA;AAC/C,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,kBAAkB;IAChC,OAAO,0EAA0E,WAAW,eAAe,CAAA;AAC7G,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The system folder picker behind the dashboard's "Add project" (#1150): the daemon opens the
3
+ * OS's own choose-a-folder dialog and hands the picked absolute path back, because a browser page
4
+ * cannot learn the absolute path of anything the user picks in it.
5
+ */
6
+ /** The outcome of asking the OS for a folder: a path, a dismissed dialog (`path: null`), or why the dialog could not be asked. */
7
+ export type PickDirectoryResult = {
8
+ ok: true;
9
+ path: string | null;
10
+ } | {
11
+ ok: false;
12
+ error: string;
13
+ };
14
+ /** What a dialog command left behind when it exited. */
15
+ export type DialogRun = {
16
+ code: number;
17
+ stdout: string;
18
+ stderr: string;
19
+ };
20
+ /** Injectable seam so tests never open a real dialog. */
21
+ export type DialogRunner = (command: string, args: string[]) => Promise<DialogRun>;
22
+ /**
23
+ * Open the OS folder picker and wait for the user's choice.
24
+ *
25
+ * Dismissing the dialog is a normal outcome (`path: null`), not an error. A Linux daemon with no
26
+ * desktop session to draw on, a Linux machine with neither dialog helper installed, and a platform
27
+ * with no dialog wired up each answer with that reason instead of trying.
28
+ */
29
+ export declare function pickDirectory(platform?: NodeJS.Platform, run?: DialogRunner, env?: NodeJS.ProcessEnv): Promise<PickDirectoryResult>;
30
+ //# sourceMappingURL=pick-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick-directory.d.ts","sourceRoot":"","sources":["../src/pick-directory.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,kIAAkI;AAClI,MAAM,MAAM,mBAAmB,GAC3B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACjC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhC,wDAAwD;AACxD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAExE,yDAAyD;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAA;AA2ElF;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,GAAG,GAAE,YAA+B,EACpC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,mBAAmB,CAAC,CAW9B"}
@@ -0,0 +1,102 @@
1
+ import { execFile } from 'node:child_process';
2
+ /** The exit code standing for "this machine does not have that command", so the next candidate can be tried. */
3
+ const NOT_INSTALLED = 127;
4
+ /** The exit code the Windows script reports a cancelled dialog with, kept clear of PowerShell's own failure exit of 1. */
5
+ const WINDOWS_CANCELLED = 2;
6
+ /** What the user is asked for, in every OS's own dialog. */
7
+ const PROMPT = 'Choose a git repository to add as a project';
8
+ /** macOS: `osascript`'s `choose folder`, which renders the standard folder sheet. */
9
+ const macDialog = {
10
+ command: 'osascript',
11
+ args: ['-e', `POSIX path of (choose folder with prompt "${PROMPT}")`],
12
+ // osascript reports a cancelled dialog as error -128, the one exit we translate rather than surface.
13
+ dismissed: run => run.stderr.includes('-128'),
14
+ };
15
+ /**
16
+ * Windows: PowerShell drives the folder browser that ships with the OS. `-STA` because that dialog
17
+ * needs a single-threaded apartment, `-NoProfile` so a user's startup script cannot print into the
18
+ * path read back off stdout.
19
+ */
20
+ const windowsDialog = {
21
+ command: 'powershell.exe',
22
+ args: [
23
+ '-NoProfile',
24
+ '-STA',
25
+ '-Command',
26
+ [
27
+ 'Add-Type -AssemblyName System.Windows.Forms',
28
+ '$dialog = New-Object System.Windows.Forms.FolderBrowserDialog',
29
+ `$dialog.Description = '${PROMPT}'`,
30
+ '$dialog.ShowNewFolderButton = $false',
31
+ `if ($dialog.ShowDialog() -eq [System.Windows.Forms.DialogResult]::OK) { $dialog.SelectedPath } else { exit ${WINDOWS_CANCELLED} }`,
32
+ ].join('; '),
33
+ ],
34
+ dismissed: run => run.code === WINDOWS_CANCELLED,
35
+ };
36
+ /**
37
+ * Linux: the desktop's own dialog helper, whichever of the two is installed — `zenity` on GTK
38
+ * desktops, `kdialog` on KDE. Both print the chosen folder and report a cancelled dialog as exit 1,
39
+ * and both are told where to open, because `kdialog` takes the starting directory as an argument.
40
+ *
41
+ * Exit 1 is read as a cancellation even though a helper that cannot reach the display exits that
42
+ * way too: a session with no display at all is ruled out before we get here, and mistaking the
43
+ * remaining rarity for a cancellation is better than showing every user who cancels the harmless
44
+ * warnings these helpers print on startup.
45
+ */
46
+ function linuxDialogs(home) {
47
+ const dismissed = (run) => run.code === 1;
48
+ return [
49
+ { command: 'zenity', args: ['--file-selection', '--directory', `--title=${PROMPT}`, `--filename=${home}/`], dismissed },
50
+ { command: 'kdialog', args: ['--title', PROMPT, '--getexistingdirectory', home], dismissed },
51
+ ];
52
+ }
53
+ /** A command that could not be spawned at all reads as not installed; anything else keeps its own exit code. */
54
+ function exitCode(error) {
55
+ if (error.code === 'ENOENT')
56
+ return NOT_INSTALLED;
57
+ return typeof error.code === 'number' ? error.code : 1;
58
+ }
59
+ const nodeDialogRunner = (command, args) => new Promise(done => {
60
+ execFile(command, args, (error, stdout, stderr) => {
61
+ done({ code: error ? exitCode(error) : 0, stdout: String(stdout), stderr: String(stderr) });
62
+ });
63
+ });
64
+ /**
65
+ * Open the OS folder picker and wait for the user's choice.
66
+ *
67
+ * Dismissing the dialog is a normal outcome (`path: null`), not an error. A Linux daemon with no
68
+ * desktop session to draw on, a Linux machine with neither dialog helper installed, and a platform
69
+ * with no dialog wired up each answer with that reason instead of trying.
70
+ */
71
+ export async function pickDirectory(platform = process.platform, run = nodeDialogRunner, env = process.env) {
72
+ if (platform === 'darwin')
73
+ return openDialog([macDialog], run);
74
+ if (platform === 'win32')
75
+ return openDialog([windowsDialog], run);
76
+ if (platform === 'linux') {
77
+ // A dialog needs a screen to appear on, and a daemon started over SSH or inside a container has
78
+ // none — saying so beats spawning a helper that can only fail.
79
+ if (!env.DISPLAY && !env.WAYLAND_DISPLAY)
80
+ return { ok: false, error: 'The machine running OpenAgent has no desktop session, so no folder dialog can open there.' };
81
+ return openDialog(linuxDialogs(env.HOME ?? '.'), run);
82
+ }
83
+ return { ok: false, error: `The system folder picker is not available on ${platform}.` };
84
+ }
85
+ /** Open the first installed dialog of `dialogs`, and read the user's answer out of what it printed. */
86
+ async function openDialog(dialogs, run) {
87
+ for (const dialog of dialogs) {
88
+ const result = await run(dialog.command, dialog.args);
89
+ if (result.code === NOT_INSTALLED)
90
+ continue;
91
+ if (dialog.dismissed(result))
92
+ return { ok: true, path: null };
93
+ if (result.code !== 0)
94
+ return { ok: false, error: result.stderr.trim() || 'The folder dialog could not be opened.' };
95
+ // macOS prints the POSIX path with a trailing slash; the registry stores paths without one.
96
+ const path = result.stdout.trim().replace(/(.)\/$/, '$1');
97
+ return path ? { ok: true, path } : { ok: false, error: 'The folder dialog returned no path.' };
98
+ }
99
+ const names = dialogs.map(dialog => dialog.command).join(' or ');
100
+ return { ok: false, error: `The folder dialog needs ${names}, which the machine running OpenAgent does not have installed.` };
101
+ }
102
+ //# sourceMappingURL=pick-directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pick-directory.js","sourceRoot":"","sources":["../src/pick-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA0B,MAAM,oBAAoB,CAAA;AAmBrE,gHAAgH;AAChH,MAAM,aAAa,GAAG,GAAG,CAAA;AAEzB,0HAA0H;AAC1H,MAAM,iBAAiB,GAAG,CAAC,CAAA;AAE3B,4DAA4D;AAC5D,MAAM,MAAM,GAAG,6CAA6C,CAAA;AAK5D,qFAAqF;AACrF,MAAM,SAAS,GAAW;IACxB,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,CAAC,IAAI,EAAE,6CAA6C,MAAM,IAAI,CAAC;IACrE,qGAAqG;IACrG,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;CAC9C,CAAA;AAED;;;;GAIG;AACH,MAAM,aAAa,GAAW;IAC5B,OAAO,EAAE,gBAAgB;IACzB,IAAI,EAAE;QACJ,YAAY;QACZ,MAAM;QACN,UAAU;QACV;YACE,6CAA6C;YAC7C,+DAA+D;YAC/D,0BAA0B,MAAM,GAAG;YACnC,sCAAsC;YACtC,8GAA8G,iBAAiB,IAAI;SACpI,CAAC,IAAI,CAAC,IAAI,CAAC;KACb;IACD,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,iBAAiB;CACjD,CAAA;AAED;;;;;;;;;GASG;AACH,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,SAAS,GAAG,CAAC,GAAc,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAA;IACpD,OAAO;QACL,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,kBAAkB,EAAE,aAAa,EAAE,WAAW,MAAM,EAAE,EAAE,cAAc,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE;QACvH,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,wBAAwB,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE;KAC7F,CAAA;AACH,CAAC;AAED,gHAAgH;AAChH,SAAS,QAAQ,CAAC,KAAwB;IACxC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,aAAa,CAAA;IACjD,OAAO,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AACxD,CAAC;AAED,MAAM,gBAAgB,GAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CACvD,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;IACjB,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QAChD,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IAC7F,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEJ;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,QAAQ,GAAoB,OAAO,CAAC,QAAQ,EAC5C,GAAG,GAAiB,gBAAgB,EACpC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,UAAU,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAA;IAC9D,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,UAAU,CAAC,CAAC,aAAa,CAAC,EAAE,GAAG,CAAC,CAAA;IACjE,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,gGAAgG;QAChG,+DAA+D;QAC/D,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe;YACtC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,2FAA2F,EAAE,CAAA;QAC1H,OAAO,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;IACvD,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,gDAAgD,QAAQ,GAAG,EAAE,CAAA;AAC1F,CAAC;AAED,uGAAuG;AACvG,KAAK,UAAU,UAAU,CAAC,OAAiB,EAAE,GAAiB;IAC5D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;QACrD,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa;YAAE,SAAQ;QAC3C,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;QAC7D,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;YAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,wCAAwC,EAAE,CAAA;QACpH,4FAA4F;QAC5F,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QACzD,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,qCAAqC,EAAE,CAAA;IAChG,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,2BAA2B,KAAK,gEAAgE,EAAE,CAAA;AAC/H,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { Preferences } from './registry.js';
2
+ /**
3
+ * What an unset preference means, and the bounds the controls that write them share.
4
+ *
5
+ * A leaf module (no `node:*`) so `client.ts` can export it and the dashboard reads the same values
6
+ * the daemon acts on.
7
+ *
8
+ * No cycle: `registry.ts` re-exports the bounds from here, and the `Preferences` import going the
9
+ * other way is type-only, so it erases.
10
+ */
11
+ /**
12
+ * Notifications have two axes (B5): `notifyBrowser` says whether they reach you in the browser at
13
+ * all, and `notifyHumanIntervention` / `notifyNewActivity` say *what* they are about. A category
14
+ * delivers only while the browser switch is on too.
15
+ */
16
+ /** What a notification is about. */
17
+ export type NotifyCategory = 'humanIntervention' | 'newActivity';
18
+ /**
19
+ * What each switch means when nobody has said.
20
+ *
21
+ * The polarities are not uniform, and that is the point of writing them down once: browser
22
+ * delivery and the "needs you" category fire unless you turn them off, while plain activity is
23
+ * opt-in.
24
+ */
25
+ export declare const NOTIFICATION_DEFAULTS: {
26
+ readonly browser: true;
27
+ readonly categories: {
28
+ readonly humanIntervention: true;
29
+ readonly newActivity: false;
30
+ };
31
+ };
32
+ /** Whether browser delivery is switched on, with its default applied. */
33
+ export declare function browserNotifyEnabled(preferences: Preferences): boolean;
34
+ /** Whether a category is switched on, with its default applied. */
35
+ export declare function notifyCategoryEnabled(preferences: Preferences, category: NotifyCategory): boolean;
36
+ /** Whether a category delivers: both browser delivery and the category have to be on. */
37
+ export declare function notifies(preferences: Preferences, category: NotifyCategory): boolean;
38
+ /**
39
+ * How far either side of the quota boundary the usage bar's handle reaches, in percentage points
40
+ * (#960): the bound of the stop line a module puts on the bar, which the bar clamps a drag to.
41
+ */
42
+ export declare const MAX_SPEND_OFFSET = 50;
43
+ //# sourceMappingURL=preference-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-defaults.d.ts","sourceRoot":"","sources":["../src/preference-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD;;;;;;;;GAQG;AAEH;;;;GAIG;AAEH,oCAAoC;AACpC,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,aAAa,CAAA;AAQhE;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;iBAElB,iBAAiB;iBAAQ,WAAW;;CACkC,CAAA;AAEtF,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEtE;AAED,mEAAmE;AACnE,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAEjG;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAEpF;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAA"}
@@ -0,0 +1,34 @@
1
+ /** The preference key each category is stored under. */
2
+ const CATEGORY_KEYS = {
3
+ humanIntervention: 'notifyHumanIntervention',
4
+ newActivity: 'notifyNewActivity',
5
+ };
6
+ /**
7
+ * What each switch means when nobody has said.
8
+ *
9
+ * The polarities are not uniform, and that is the point of writing them down once: browser
10
+ * delivery and the "needs you" category fire unless you turn them off, while plain activity is
11
+ * opt-in.
12
+ */
13
+ export const NOTIFICATION_DEFAULTS = {
14
+ browser: true,
15
+ categories: { humanIntervention: true, newActivity: false },
16
+ };
17
+ /** Whether browser delivery is switched on, with its default applied. */
18
+ export function browserNotifyEnabled(preferences) {
19
+ return preferences.notifyBrowser ?? NOTIFICATION_DEFAULTS.browser;
20
+ }
21
+ /** Whether a category is switched on, with its default applied. */
22
+ export function notifyCategoryEnabled(preferences, category) {
23
+ return preferences[CATEGORY_KEYS[category]] ?? NOTIFICATION_DEFAULTS.categories[category];
24
+ }
25
+ /** Whether a category delivers: both browser delivery and the category have to be on. */
26
+ export function notifies(preferences, category) {
27
+ return browserNotifyEnabled(preferences) && notifyCategoryEnabled(preferences, category);
28
+ }
29
+ /**
30
+ * How far either side of the quota boundary the usage bar's handle reaches, in percentage points
31
+ * (#960): the bound of the stop line a module puts on the bar, which the bar clamps a drag to.
32
+ */
33
+ export const MAX_SPEND_OFFSET = 50;
34
+ //# sourceMappingURL=preference-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preference-defaults.js","sourceRoot":"","sources":["../src/preference-defaults.ts"],"names":[],"mappings":"AAqBA,wDAAwD;AACxD,MAAM,aAAa,GAAG;IACpB,iBAAiB,EAAE,yBAAyB;IAC5C,WAAW,EAAE,mBAAmB;CAC4B,CAAA;AAE9D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;CACyB,CAAA;AAEtF,yEAAyE;AACzE,MAAM,UAAU,oBAAoB,CAAC,WAAwB;IAC3D,OAAO,WAAW,CAAC,aAAa,IAAI,qBAAqB,CAAC,OAAO,CAAA;AACnE,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,qBAAqB,CAAC,WAAwB,EAAE,QAAwB;IACtF,OAAO,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,IAAI,qBAAqB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AAC3F,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,QAAQ,CAAC,WAAwB,EAAE,QAAwB;IACzE,OAAO,oBAAoB,CAAC,WAAW,CAAC,IAAI,qBAAqB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;AAC1F,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A project's commands (#1774): the skills written to be run by a person, read off the folders
3
+ * the coding agents read them from. OpenAgent ships no prompt text; what a project can be
4
+ * asked to do is what its own command skills say. A skill that teaches the agent how to do
5
+ * something (the tickets, the queue) is not a command: typed alone it starts an agent with
6
+ * nothing to do, so the launcher does not list it.
7
+ */
8
+ /** Where coding agents read a project's skills: Claude Code's folder, and the shared one Codex reads. */
9
+ export declare const SKILLS_DIRS: readonly ['.claude/skills', '.agents/skills'];
10
+ /** One skill as the launcher shows it. */
11
+ export interface ProjectCommand {
12
+ /** What is typed after the slash: the skill's folder name. */
13
+ name: string;
14
+ /** The `description` of the skill's front matter, when it has one. */
15
+ description?: string;
16
+ }
17
+ /**
18
+ * The project's commands, by name: the skills whose front matter says
19
+ * `disable-model-invocation: true`, written to be run by a person or a runner and never picked
20
+ * up by the agent on its own. A skill in both folders is listed once. A folder without a
21
+ * readable `SKILL.md` is skipped, and a project with no skills folder has no commands.
22
+ */
23
+ export declare function readProjectCommands(cwd: string): Promise<ProjectCommand[]>;
24
+ //# sourceMappingURL=project-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../src/project-commands.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,yGAAyG;AACzG,eAAO,MAAM,WAAW,YAAI,gBAAgB,EAAE,gBAAgB,CAAU,CAAA;AAExE,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAqBhF"}