@openagt/dashboard 0.0.0-stage → 0.8.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 (1275) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -2
  3. package/dist/agent-archive.d.ts +35 -0
  4. package/dist/agent-archive.d.ts.map +1 -0
  5. package/dist/agent-archive.js +67 -0
  6. package/dist/agent-archive.js.map +1 -0
  7. package/dist/agent-commit.d.ts +140 -0
  8. package/dist/agent-commit.d.ts.map +1 -0
  9. package/dist/agent-commit.js +254 -0
  10. package/dist/agent-commit.js.map +1 -0
  11. package/dist/agent-driver.d.ts +28 -0
  12. package/dist/agent-driver.d.ts.map +1 -0
  13. package/dist/agent-driver.js +18 -0
  14. package/dist/agent-driver.js.map +1 -0
  15. package/dist/agent-id.d.ts +13 -0
  16. package/dist/agent-id.d.ts.map +1 -0
  17. package/dist/agent-id.js +20 -0
  18. package/dist/agent-id.js.map +1 -0
  19. package/dist/agent-location.d.ts +11 -0
  20. package/dist/agent-location.d.ts.map +1 -0
  21. package/dist/agent-location.js +10 -0
  22. package/dist/agent-location.js.map +1 -0
  23. package/dist/agent-locks.d.ts +3 -0
  24. package/dist/agent-locks.d.ts.map +1 -0
  25. package/dist/agent-locks.js +40 -0
  26. package/dist/agent-locks.js.map +1 -0
  27. package/dist/agent-messages.d.ts +55 -0
  28. package/dist/agent-messages.d.ts.map +1 -0
  29. package/dist/agent-messages.js +73 -0
  30. package/dist/agent-messages.js.map +1 -0
  31. package/dist/agent-names.d.ts +24 -0
  32. package/dist/agent-names.d.ts.map +1 -0
  33. package/dist/agent-names.js +33 -0
  34. package/dist/agent-names.js.map +1 -0
  35. package/dist/agent-options.d.ts +45 -0
  36. package/dist/agent-options.d.ts.map +1 -0
  37. package/dist/agent-options.js +83 -0
  38. package/dist/agent-options.js.map +1 -0
  39. package/dist/agent-spec.d.ts +56 -0
  40. package/dist/agent-spec.d.ts.map +1 -0
  41. package/dist/agent-spec.js +56 -0
  42. package/dist/agent-spec.js.map +1 -0
  43. package/dist/agent-telemetry.d.ts +88 -0
  44. package/dist/agent-telemetry.d.ts.map +1 -0
  45. package/dist/agent-telemetry.js +97 -0
  46. package/dist/agent-telemetry.js.map +1 -0
  47. package/dist/agent-view.d.ts +39 -0
  48. package/dist/agent-view.d.ts.map +1 -0
  49. package/dist/agent-view.js +45 -0
  50. package/dist/agent-view.js.map +1 -0
  51. package/dist/agent.d.ts +113 -0
  52. package/dist/agent.d.ts.map +1 -0
  53. package/dist/agent.js +168 -0
  54. package/dist/agent.js.map +1 -0
  55. package/dist/archived-agent-patch.d.ts +14 -0
  56. package/dist/archived-agent-patch.d.ts.map +1 -0
  57. package/dist/archived-agent-patch.js +22 -0
  58. package/dist/archived-agent-patch.js.map +1 -0
  59. package/dist/auto-pm.d.ts +538 -0
  60. package/dist/auto-pm.d.ts.map +1 -0
  61. package/dist/auto-pm.js +707 -0
  62. package/dist/auto-pm.js.map +1 -0
  63. package/dist/await-gate.d.ts +184 -0
  64. package/dist/await-gate.d.ts.map +1 -0
  65. package/dist/await-gate.js +252 -0
  66. package/dist/await-gate.js.map +1 -0
  67. package/dist/bin.d.ts +3 -0
  68. package/dist/bin.d.ts.map +1 -0
  69. package/dist/bin.js +11 -0
  70. package/dist/bin.js.map +1 -0
  71. package/dist/branch-links-pass.d.ts +15 -0
  72. package/dist/branch-links-pass.d.ts.map +1 -0
  73. package/dist/branch-links-pass.js +13 -0
  74. package/dist/branch-links-pass.js.map +1 -0
  75. package/dist/branch-links.d.ts +53 -0
  76. package/dist/branch-links.d.ts.map +1 -0
  77. package/dist/branch-links.js +94 -0
  78. package/dist/branch-links.js.map +1 -0
  79. package/dist/branch-name.d.ts +8 -0
  80. package/dist/branch-name.d.ts.map +1 -0
  81. package/dist/branch-name.js +20 -0
  82. package/dist/branch-name.js.map +1 -0
  83. package/dist/branch-names.d.ts +57 -0
  84. package/dist/branch-names.d.ts.map +1 -0
  85. package/dist/branch-names.js +72 -0
  86. package/dist/branch-names.js.map +1 -0
  87. package/dist/bridge-browser.d.ts +217 -0
  88. package/dist/bridge-browser.d.ts.map +1 -0
  89. package/dist/bridge-browser.js +520 -0
  90. package/dist/bridge-browser.js.map +1 -0
  91. package/dist/browser-stream.d.ts +20 -0
  92. package/dist/browser-stream.d.ts.map +1 -0
  93. package/dist/browser-stream.js +51 -0
  94. package/dist/browser-stream.js.map +1 -0
  95. package/dist/browser.d.ts +16 -0
  96. package/dist/browser.d.ts.map +1 -0
  97. package/dist/browser.js +38 -0
  98. package/dist/browser.js.map +1 -0
  99. package/dist/built-in.d.ts +29 -0
  100. package/dist/built-in.d.ts.map +1 -0
  101. package/dist/built-in.js +78 -0
  102. package/dist/built-in.js.map +1 -0
  103. package/dist/chrome-extension/background.js +532 -0
  104. package/dist/chrome-extension/content.js +1475 -0
  105. package/dist/chrome-extension/driver-plan.js +41 -0
  106. package/dist/chrome-extension/fingerprint.js +43 -0
  107. package/dist/chrome-extension/manifest.json +31 -0
  108. package/dist/chrome-extension/options.html +48 -0
  109. package/dist/chrome-extension/options.js +122 -0
  110. package/dist/ci-watch.d.ts +123 -0
  111. package/dist/ci-watch.d.ts.map +1 -0
  112. package/dist/ci-watch.js +228 -0
  113. package/dist/ci-watch.js.map +1 -0
  114. package/dist/claude-trust.d.ts +16 -0
  115. package/dist/claude-trust.d.ts.map +1 -0
  116. package/dist/claude-trust.js +72 -0
  117. package/dist/claude-trust.js.map +1 -0
  118. package/dist/cli-exec.d.ts +36 -0
  119. package/dist/cli-exec.d.ts.map +1 -0
  120. package/dist/cli-exec.js +44 -0
  121. package/dist/cli-exec.js.map +1 -0
  122. package/dist/cli.d.ts +43 -0
  123. package/dist/cli.d.ts.map +1 -0
  124. package/dist/cli.js +186 -0
  125. package/dist/cli.js.map +1 -0
  126. package/dist/client.d.ts +16 -0
  127. package/dist/client.d.ts.map +1 -0
  128. package/dist/client.js +30 -0
  129. package/dist/client.js.map +1 -0
  130. package/dist/closing-keywords.d.ts +28 -0
  131. package/dist/closing-keywords.d.ts.map +1 -0
  132. package/dist/closing-keywords.js +49 -0
  133. package/dist/closing-keywords.js.map +1 -0
  134. package/dist/cloud-run-state.d.ts +27 -0
  135. package/dist/cloud-run-state.d.ts.map +1 -0
  136. package/dist/cloud-run-state.js +36 -0
  137. package/dist/cloud-run-state.js.map +1 -0
  138. package/dist/cloud-scratch-refs.d.ts +85 -0
  139. package/dist/cloud-scratch-refs.d.ts.map +1 -0
  140. package/dist/cloud-scratch-refs.js +275 -0
  141. package/dist/cloud-scratch-refs.js.map +1 -0
  142. package/dist/cloud-work.d.ts +66 -0
  143. package/dist/cloud-work.d.ts.map +1 -0
  144. package/dist/cloud-work.js +204 -0
  145. package/dist/cloud-work.js.map +1 -0
  146. package/dist/config-layers.d.ts +62 -0
  147. package/dist/config-layers.d.ts.map +1 -0
  148. package/dist/config-layers.js +70 -0
  149. package/dist/config-layers.js.map +1 -0
  150. package/dist/config.d.ts +54 -0
  151. package/dist/config.d.ts.map +1 -0
  152. package/dist/config.js +78 -0
  153. package/dist/config.js.map +1 -0
  154. package/dist/consumption-guard.d.ts +53 -0
  155. package/dist/consumption-guard.d.ts.map +1 -0
  156. package/dist/consumption-guard.js +69 -0
  157. package/dist/consumption-guard.js.map +1 -0
  158. package/dist/control.d.ts +75 -0
  159. package/dist/control.d.ts.map +1 -0
  160. package/dist/control.js +68 -0
  161. package/dist/control.js.map +1 -0
  162. package/dist/conversation-commit.d.ts +166 -0
  163. package/dist/conversation-commit.d.ts.map +1 -0
  164. package/dist/conversation-commit.js +309 -0
  165. package/dist/conversation-commit.js.map +1 -0
  166. package/dist/conversations.d.ts +93 -0
  167. package/dist/conversations.d.ts.map +1 -0
  168. package/dist/conversations.js +176 -0
  169. package/dist/conversations.js.map +1 -0
  170. package/dist/daemon-runtime.d.ts +41 -0
  171. package/dist/daemon-runtime.d.ts.map +1 -0
  172. package/dist/daemon-runtime.js +133 -0
  173. package/dist/daemon-runtime.js.map +1 -0
  174. package/dist/daemon-services.d.ts +36 -0
  175. package/dist/daemon-services.d.ts.map +1 -0
  176. package/dist/daemon-services.js +120 -0
  177. package/dist/daemon-services.js.map +1 -0
  178. package/dist/daemon-tick.d.ts +68 -0
  179. package/dist/daemon-tick.d.ts.map +1 -0
  180. package/dist/daemon-tick.js +97 -0
  181. package/dist/daemon-tick.js.map +1 -0
  182. package/dist/daemon-writes.d.ts +33 -0
  183. package/dist/daemon-writes.d.ts.map +1 -0
  184. package/dist/daemon-writes.js +45 -0
  185. package/dist/daemon-writes.js.map +1 -0
  186. package/dist/daemon.d.ts +76 -0
  187. package/dist/daemon.d.ts.map +1 -0
  188. package/dist/daemon.js +225 -0
  189. package/dist/daemon.js.map +1 -0
  190. package/dist/dashboard/activity.d.ts +41 -0
  191. package/dist/dashboard/activity.d.ts.map +1 -0
  192. package/dist/dashboard/activity.js +56 -0
  193. package/dist/dashboard/activity.js.map +1 -0
  194. package/dist/dashboard/agent-handoff.d.ts +244 -0
  195. package/dist/dashboard/agent-handoff.d.ts.map +1 -0
  196. package/dist/dashboard/agent-handoff.js +310 -0
  197. package/dist/dashboard/agent-handoff.js.map +1 -0
  198. package/dist/dashboard/agent-tree.d.ts +106 -0
  199. package/dist/dashboard/agent-tree.d.ts.map +1 -0
  200. package/dist/dashboard/agent-tree.js +180 -0
  201. package/dist/dashboard/agent-tree.js.map +1 -0
  202. package/dist/dashboard/bridge-endpoints.d.ts +158 -0
  203. package/dist/dashboard/bridge-endpoints.d.ts.map +1 -0
  204. package/dist/dashboard/bridge-endpoints.js +382 -0
  205. package/dist/dashboard/bridge-endpoints.js.map +1 -0
  206. package/dist/dashboard/bridge-question.d.ts +33 -0
  207. package/dist/dashboard/bridge-question.d.ts.map +1 -0
  208. package/dist/dashboard/bridge-question.js +20 -0
  209. package/dist/dashboard/bridge-question.js.map +1 -0
  210. package/dist/dashboard/bridge-sessions.d.ts +25 -0
  211. package/dist/dashboard/bridge-sessions.d.ts.map +1 -0
  212. package/dist/dashboard/bridge-sessions.js +46 -0
  213. package/dist/dashboard/bridge-sessions.js.map +1 -0
  214. package/dist/dashboard/bridge-starts.d.ts +61 -0
  215. package/dist/dashboard/bridge-starts.d.ts.map +1 -0
  216. package/dist/dashboard/bridge-starts.js +94 -0
  217. package/dist/dashboard/bridge-starts.js.map +1 -0
  218. package/dist/dashboard/bridge-store.d.ts +179 -0
  219. package/dist/dashboard/bridge-store.d.ts.map +1 -0
  220. package/dist/dashboard/bridge-store.js +262 -0
  221. package/dist/dashboard/bridge-store.js.map +1 -0
  222. package/dist/dashboard/browser-proxy.d.ts +41 -0
  223. package/dist/dashboard/browser-proxy.d.ts.map +1 -0
  224. package/dist/dashboard/browser-proxy.js +96 -0
  225. package/dist/dashboard/browser-proxy.js.map +1 -0
  226. package/dist/dashboard/bundle.d.ts +12 -0
  227. package/dist/dashboard/bundle.d.ts.map +1 -0
  228. package/dist/dashboard/bundle.js +22 -0
  229. package/dist/dashboard/bundle.js.map +1 -0
  230. package/dist/dashboard/cache.d.ts +47 -0
  231. package/dist/dashboard/cache.d.ts.map +1 -0
  232. package/dist/dashboard/cache.js +87 -0
  233. package/dist/dashboard/cache.js.map +1 -0
  234. package/dist/dashboard/content-type.d.ts +3 -0
  235. package/dist/dashboard/content-type.d.ts.map +1 -0
  236. package/dist/dashboard/content-type.js +31 -0
  237. package/dist/dashboard/content-type.js.map +1 -0
  238. package/dist/dashboard/dashboard.d.ts +38 -0
  239. package/dist/dashboard/dashboard.d.ts.map +1 -0
  240. package/dist/dashboard/dashboard.js +42 -0
  241. package/dist/dashboard/dashboard.js.map +1 -0
  242. package/dist/dashboard/discord-webhook.d.ts +17 -0
  243. package/dist/dashboard/discord-webhook.d.ts.map +1 -0
  244. package/dist/dashboard/discord-webhook.js +36 -0
  245. package/dist/dashboard/discord-webhook.js.map +1 -0
  246. package/dist/dashboard/docs.d.ts +39 -0
  247. package/dist/dashboard/docs.d.ts.map +1 -0
  248. package/dist/dashboard/docs.js +59 -0
  249. package/dist/dashboard/docs.js.map +1 -0
  250. package/dist/dashboard/file-diff.d.ts +67 -0
  251. package/dist/dashboard/file-diff.d.ts.map +1 -0
  252. package/dist/dashboard/file-diff.js +132 -0
  253. package/dist/dashboard/file-diff.js.map +1 -0
  254. package/dist/dashboard/file-read.d.ts +42 -0
  255. package/dist/dashboard/file-read.d.ts.map +1 -0
  256. package/dist/dashboard/file-read.js +69 -0
  257. package/dist/dashboard/file-read.js.map +1 -0
  258. package/dist/dashboard/file-status.d.ts +21 -0
  259. package/dist/dashboard/file-status.d.ts.map +1 -0
  260. package/dist/dashboard/file-status.js +37 -0
  261. package/dist/dashboard/file-status.js.map +1 -0
  262. package/dist/dashboard/gh.d.ts +131 -0
  263. package/dist/dashboard/gh.d.ts.map +1 -0
  264. package/dist/dashboard/gh.js +150 -0
  265. package/dist/dashboard/gh.js.map +1 -0
  266. package/dist/dashboard/git-status.d.ts +44 -0
  267. package/dist/dashboard/git-status.d.ts.map +1 -0
  268. package/dist/dashboard/git-status.js +37 -0
  269. package/dist/dashboard/git-status.js.map +1 -0
  270. package/dist/dashboard/github.d.ts +11 -0
  271. package/dist/dashboard/github.d.ts.map +1 -0
  272. package/dist/dashboard/github.js +33 -0
  273. package/dist/dashboard/github.js.map +1 -0
  274. package/dist/dashboard/http.d.ts +29 -0
  275. package/dist/dashboard/http.d.ts.map +1 -0
  276. package/dist/dashboard/http.js +74 -0
  277. package/dist/dashboard/http.js.map +1 -0
  278. package/dist/dashboard/index.d.ts +24 -0
  279. package/dist/dashboard/index.d.ts.map +1 -0
  280. package/dist/dashboard/index.js +23 -0
  281. package/dist/dashboard/index.js.map +1 -0
  282. package/dist/dashboard/interventions.d.ts +67 -0
  283. package/dist/dashboard/interventions.d.ts.map +1 -0
  284. package/dist/dashboard/interventions.js +169 -0
  285. package/dist/dashboard/interventions.js.map +1 -0
  286. package/dist/dashboard/keyed-watcher.d.ts +29 -0
  287. package/dist/dashboard/keyed-watcher.d.ts.map +1 -0
  288. package/dist/dashboard/keyed-watcher.js +42 -0
  289. package/dist/dashboard/keyed-watcher.js.map +1 -0
  290. package/dist/dashboard/keys.d.ts +31 -0
  291. package/dist/dashboard/keys.d.ts.map +1 -0
  292. package/dist/dashboard/keys.js +37 -0
  293. package/dist/dashboard/keys.js.map +1 -0
  294. package/dist/dashboard/models.d.ts +25 -0
  295. package/dist/dashboard/models.d.ts.map +1 -0
  296. package/dist/dashboard/models.js +30 -0
  297. package/dist/dashboard/models.js.map +1 -0
  298. package/dist/dashboard/module-host.d.ts +44 -0
  299. package/dist/dashboard/module-host.d.ts.map +1 -0
  300. package/dist/dashboard/module-host.js +91 -0
  301. package/dist/dashboard/module-host.js.map +1 -0
  302. package/dist/dashboard/module-serve.d.ts +15 -0
  303. package/dist/dashboard/module-serve.d.ts.map +1 -0
  304. package/dist/dashboard/module-serve.js +45 -0
  305. package/dist/dashboard/module-serve.js.map +1 -0
  306. package/dist/dashboard/open-in-app.d.ts +43 -0
  307. package/dist/dashboard/open-in-app.d.ts.map +1 -0
  308. package/dist/dashboard/open-in-app.js +98 -0
  309. package/dist/dashboard/open-in-app.js.map +1 -0
  310. package/dist/dashboard/open-questions.d.ts +45 -0
  311. package/dist/dashboard/open-questions.d.ts.map +1 -0
  312. package/dist/dashboard/open-questions.js +62 -0
  313. package/dist/dashboard/open-questions.js.map +1 -0
  314. package/dist/dashboard/overview.d.ts +78 -0
  315. package/dist/dashboard/overview.d.ts.map +1 -0
  316. package/dist/dashboard/overview.js +87 -0
  317. package/dist/dashboard/overview.js.map +1 -0
  318. package/dist/dashboard/projects.d.ts +100 -0
  319. package/dist/dashboard/projects.d.ts.map +1 -0
  320. package/dist/dashboard/projects.js +63 -0
  321. package/dist/dashboard/projects.js.map +1 -0
  322. package/dist/dashboard/pull-requests.d.ts +127 -0
  323. package/dist/dashboard/pull-requests.d.ts.map +1 -0
  324. package/dist/dashboard/pull-requests.js +137 -0
  325. package/dist/dashboard/pull-requests.js.map +1 -0
  326. package/dist/dashboard/queue.d.ts +17 -0
  327. package/dist/dashboard/queue.d.ts.map +1 -0
  328. package/dist/dashboard/queue.js +19 -0
  329. package/dist/dashboard/queue.js.map +1 -0
  330. package/dist/dashboard/quota.d.ts +53 -0
  331. package/dist/dashboard/quota.d.ts.map +1 -0
  332. package/dist/dashboard/quota.js +42 -0
  333. package/dist/dashboard/quota.js.map +1 -0
  334. package/dist/dashboard/relay-endpoints.d.ts +32 -0
  335. package/dist/dashboard/relay-endpoints.d.ts.map +1 -0
  336. package/dist/dashboard/relay-endpoints.js +115 -0
  337. package/dist/dashboard/relay-endpoints.js.map +1 -0
  338. package/dist/dashboard/remote-run.d.ts +95 -0
  339. package/dist/dashboard/remote-run.d.ts.map +1 -0
  340. package/dist/dashboard/remote-run.js +235 -0
  341. package/dist/dashboard/remote-run.js.map +1 -0
  342. package/dist/dashboard/rpc-serve.d.ts +103 -0
  343. package/dist/dashboard/rpc-serve.d.ts.map +1 -0
  344. package/dist/dashboard/rpc-serve.js +180 -0
  345. package/dist/dashboard/rpc-serve.js.map +1 -0
  346. package/dist/dashboard/run-handoff.d.ts +311 -0
  347. package/dist/dashboard/run-handoff.d.ts.map +1 -0
  348. package/dist/dashboard/run-handoff.js +485 -0
  349. package/dist/dashboard/run-handoff.js.map +1 -0
  350. package/dist/dashboard/run-inbox.d.ts +31 -0
  351. package/dist/dashboard/run-inbox.d.ts.map +1 -0
  352. package/dist/dashboard/run-inbox.js +51 -0
  353. package/dist/dashboard/run-inbox.js.map +1 -0
  354. package/dist/dashboard/scheduler-state.d.ts +73 -0
  355. package/dist/dashboard/scheduler-state.d.ts.map +1 -0
  356. package/dist/dashboard/scheduler-state.js +120 -0
  357. package/dist/dashboard/scheduler-state.js.map +1 -0
  358. package/dist/dashboard/server.d.ts +103 -0
  359. package/dist/dashboard/server.d.ts.map +1 -0
  360. package/dist/dashboard/server.js +230 -0
  361. package/dist/dashboard/server.js.map +1 -0
  362. package/dist/dashboard/static.d.ts +9 -0
  363. package/dist/dashboard/static.d.ts.map +1 -0
  364. package/dist/dashboard/static.js +54 -0
  365. package/dist/dashboard/static.js.map +1 -0
  366. package/dist/dashboard/subagent-settings.d.ts +26 -0
  367. package/dist/dashboard/subagent-settings.d.ts.map +1 -0
  368. package/dist/dashboard/subagent-settings.js +52 -0
  369. package/dist/dashboard/subagent-settings.js.map +1 -0
  370. package/dist/dashboard/telefunc-serve.d.ts +118 -0
  371. package/dist/dashboard/telefunc-serve.d.ts.map +1 -0
  372. package/dist/dashboard/telefunc-serve.js +108 -0
  373. package/dist/dashboard/telefunc-serve.js.map +1 -0
  374. package/dist/dashboard/tickets.d.ts +29 -0
  375. package/dist/dashboard/tickets.d.ts.map +1 -0
  376. package/dist/dashboard/tickets.js +38 -0
  377. package/dist/dashboard/tickets.js.map +1 -0
  378. package/dist/dashboard/types.d.ts +109 -0
  379. package/dist/dashboard/types.d.ts.map +1 -0
  380. package/dist/dashboard/types.js +2 -0
  381. package/dist/dashboard/types.js.map +1 -0
  382. package/dist/dashboard/web-start-endpoints.d.ts +32 -0
  383. package/dist/dashboard/web-start-endpoints.d.ts.map +1 -0
  384. package/dist/dashboard/web-start-endpoints.js +75 -0
  385. package/dist/dashboard/web-start-endpoints.js.map +1 -0
  386. package/dist/dashboard/widget-serve.d.ts +15 -0
  387. package/dist/dashboard/widget-serve.d.ts.map +1 -0
  388. package/dist/dashboard/widget-serve.js +45 -0
  389. package/dist/dashboard/widget-serve.js.map +1 -0
  390. package/dist/dashboard-bundle/assets/client-CbBRB9m4.js +9 -0
  391. package/dist/dashboard-bundle/assets/jsx-runtime-By8HlURe.js +1 -0
  392. package/dist/dashboard-bundle/assets/main-B3HghPQy.css +2 -0
  393. package/dist/dashboard-bundle/assets/main-om0WOAku.js +140 -0
  394. package/dist/dashboard-bundle/assets/module-jASZmfSB.js +21 -0
  395. package/dist/dashboard-bundle/assets/react-CZI7_Jkm.js +1 -0
  396. package/dist/dashboard-bundle/assets/react-dom-cJyBB_A4.js +1 -0
  397. package/dist/dashboard-bundle/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  398. package/dist/dashboard-bundle/host/module.js +1 -0
  399. package/dist/dashboard-bundle/host/react-dom-client.js +1 -0
  400. package/dist/dashboard-bundle/host/react-dom.js +1 -0
  401. package/dist/dashboard-bundle/host/react-jsx-runtime.js +1 -0
  402. package/dist/dashboard-bundle/host/react.js +1 -0
  403. package/dist/dashboard-bundle/index.html +42 -0
  404. package/dist/dashboard-bundle/logo-animated.svg +34 -0
  405. package/dist/dashboard-bundle/logo.svg +16 -0
  406. package/dist/dashboard-client/assets/chunks/chunk-BF9pJudf.js +4 -0
  407. package/dist/dashboard-client/assets/entries/entry-client-routing.CT1e9F0o.js +1 -0
  408. package/dist/dashboard-client/assets/entries/pages_index.CkW5JQ8X.js +428 -0
  409. package/dist/dashboard-client/assets/static/layouts_tailwind-00e65532.8OjKGAbA.css +2 -0
  410. package/dist/dashboard-client/index.html +27 -0
  411. package/dist/dashboard-client/index.pageContext.json +1 -0
  412. package/dist/dashboard-client/logo-animated.svg +34 -0
  413. package/dist/dashboard-client/logo.svg +16 -0
  414. package/dist/dashboard-rpc/context.d.ts +54 -0
  415. package/dist/dashboard-rpc/context.d.ts.map +1 -0
  416. package/dist/dashboard-rpc/context.js +102 -0
  417. package/dist/dashboard-rpc/context.js.map +1 -0
  418. package/dist/dashboard-rpc/control.d.ts +124 -0
  419. package/dist/dashboard-rpc/control.d.ts.map +1 -0
  420. package/dist/dashboard-rpc/control.js +284 -0
  421. package/dist/dashboard-rpc/control.js.map +1 -0
  422. package/dist/dashboard-rpc/control.telefunc.d.ts +176 -0
  423. package/dist/dashboard-rpc/control.telefunc.d.ts.map +1 -0
  424. package/dist/dashboard-rpc/control.telefunc.js +373 -0
  425. package/dist/dashboard-rpc/control.telefunc.js.map +1 -0
  426. package/dist/dashboard-rpc/devices.d.ts +9 -0
  427. package/dist/dashboard-rpc/devices.d.ts.map +1 -0
  428. package/dist/dashboard-rpc/devices.js +12 -0
  429. package/dist/dashboard-rpc/devices.js.map +1 -0
  430. package/dist/dashboard-rpc/devices.telefunc.d.ts +9 -0
  431. package/dist/dashboard-rpc/devices.telefunc.d.ts.map +1 -0
  432. package/dist/dashboard-rpc/devices.telefunc.js +12 -0
  433. package/dist/dashboard-rpc/devices.telefunc.js.map +1 -0
  434. package/dist/dashboard-rpc/events-tail.d.ts +68 -0
  435. package/dist/dashboard-rpc/events-tail.d.ts.map +1 -0
  436. package/dist/dashboard-rpc/events-tail.js +257 -0
  437. package/dist/dashboard-rpc/events-tail.js.map +1 -0
  438. package/dist/dashboard-rpc/events.d.ts +39 -0
  439. package/dist/dashboard-rpc/events.d.ts.map +1 -0
  440. package/dist/dashboard-rpc/events.js +47 -0
  441. package/dist/dashboard-rpc/events.js.map +1 -0
  442. package/dist/dashboard-rpc/events.telefunc.d.ts +36 -0
  443. package/dist/dashboard-rpc/events.telefunc.d.ts.map +1 -0
  444. package/dist/dashboard-rpc/events.telefunc.js +70 -0
  445. package/dist/dashboard-rpc/events.telefunc.js.map +1 -0
  446. package/dist/dashboard-rpc/index.d.ts +29 -0
  447. package/dist/dashboard-rpc/index.d.ts.map +1 -0
  448. package/dist/dashboard-rpc/index.js +40 -0
  449. package/dist/dashboard-rpc/index.js.map +1 -0
  450. package/dist/dashboard-rpc/models.d.ts +4 -0
  451. package/dist/dashboard-rpc/models.d.ts.map +1 -0
  452. package/dist/dashboard-rpc/models.js +8 -0
  453. package/dist/dashboard-rpc/models.js.map +1 -0
  454. package/dist/dashboard-rpc/modules.d.ts +43 -0
  455. package/dist/dashboard-rpc/modules.d.ts.map +1 -0
  456. package/dist/dashboard-rpc/modules.js +77 -0
  457. package/dist/dashboard-rpc/modules.js.map +1 -0
  458. package/dist/dashboard-rpc/preferences.d.ts +41 -0
  459. package/dist/dashboard-rpc/preferences.d.ts.map +1 -0
  460. package/dist/dashboard-rpc/preferences.js +65 -0
  461. package/dist/dashboard-rpc/preferences.js.map +1 -0
  462. package/dist/dashboard-rpc/preferences.telefunc.d.ts +97 -0
  463. package/dist/dashboard-rpc/preferences.telefunc.d.ts.map +1 -0
  464. package/dist/dashboard-rpc/preferences.telefunc.js +157 -0
  465. package/dist/dashboard-rpc/preferences.telefunc.js.map +1 -0
  466. package/dist/dashboard-rpc/projects.d.ts +59 -0
  467. package/dist/dashboard-rpc/projects.d.ts.map +1 -0
  468. package/dist/dashboard-rpc/projects.js +87 -0
  469. package/dist/dashboard-rpc/projects.js.map +1 -0
  470. package/dist/dashboard-rpc/projects.telefunc.d.ts +56 -0
  471. package/dist/dashboard-rpc/projects.telefunc.d.ts.map +1 -0
  472. package/dist/dashboard-rpc/projects.telefunc.js +96 -0
  473. package/dist/dashboard-rpc/projects.telefunc.js.map +1 -0
  474. package/dist/dashboard-rpc/quota.d.ts +4 -0
  475. package/dist/dashboard-rpc/quota.d.ts.map +1 -0
  476. package/dist/dashboard-rpc/quota.js +15 -0
  477. package/dist/dashboard-rpc/quota.js.map +1 -0
  478. package/dist/dashboard-rpc/quota.telefunc.d.ts +40 -0
  479. package/dist/dashboard-rpc/quota.telefunc.d.ts.map +1 -0
  480. package/dist/dashboard-rpc/quota.telefunc.js +84 -0
  481. package/dist/dashboard-rpc/quota.telefunc.js.map +1 -0
  482. package/dist/dashboard-rpc/reads.d.ts +185 -0
  483. package/dist/dashboard-rpc/reads.d.ts.map +1 -0
  484. package/dist/dashboard-rpc/reads.js +370 -0
  485. package/dist/dashboard-rpc/reads.js.map +1 -0
  486. package/dist/dashboard-rpc/reads.telefunc.d.ts +197 -0
  487. package/dist/dashboard-rpc/reads.telefunc.d.ts.map +1 -0
  488. package/dist/dashboard-rpc/reads.telefunc.js +403 -0
  489. package/dist/dashboard-rpc/reads.telefunc.js.map +1 -0
  490. package/dist/dashboard-rpc/register.d.ts +18 -0
  491. package/dist/dashboard-rpc/register.d.ts.map +1 -0
  492. package/dist/dashboard-rpc/register.js +66 -0
  493. package/dist/dashboard-rpc/register.js.map +1 -0
  494. package/dist/dashboard-rpc/relay-agent.d.ts +9 -0
  495. package/dist/dashboard-rpc/relay-agent.d.ts.map +1 -0
  496. package/dist/dashboard-rpc/relay-agent.js +21 -0
  497. package/dist/dashboard-rpc/relay-agent.js.map +1 -0
  498. package/dist/dashboard-rpc/relay-dispatch.d.ts +9 -0
  499. package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -0
  500. package/dist/dashboard-rpc/relay-dispatch.js +24 -0
  501. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -0
  502. package/dist/dashboard-rpc/relay-run.d.ts +9 -0
  503. package/dist/dashboard-rpc/relay-run.d.ts.map +1 -0
  504. package/dist/dashboard-rpc/relay-run.js +21 -0
  505. package/dist/dashboard-rpc/relay-run.js.map +1 -0
  506. package/dist/dashboard-rpc/stream-channel.d.ts +23 -0
  507. package/dist/dashboard-rpc/stream-channel.d.ts.map +1 -0
  508. package/dist/dashboard-rpc/stream-channel.js +52 -0
  509. package/dist/dashboard-rpc/stream-channel.js.map +1 -0
  510. package/dist/dashboard-rpc/stream-forward.d.ts +17 -0
  511. package/dist/dashboard-rpc/stream-forward.d.ts.map +1 -0
  512. package/dist/dashboard-rpc/stream-forward.js +38 -0
  513. package/dist/dashboard-rpc/stream-forward.js.map +1 -0
  514. package/dist/dashboard-rpc/subagents.d.ts +12 -0
  515. package/dist/dashboard-rpc/subagents.d.ts.map +1 -0
  516. package/dist/dashboard-rpc/subagents.js +13 -0
  517. package/dist/dashboard-rpc/subagents.js.map +1 -0
  518. package/dist/dashboard-rpc/test-context.d.ts +23 -0
  519. package/dist/dashboard-rpc/test-context.d.ts.map +1 -0
  520. package/dist/dashboard-rpc/test-context.js +42 -0
  521. package/dist/dashboard-rpc/test-context.js.map +1 -0
  522. package/dist/dashboard-rpc/widgets.d.ts +33 -0
  523. package/dist/dashboard-rpc/widgets.d.ts.map +1 -0
  524. package/dist/dashboard-rpc/widgets.js +54 -0
  525. package/dist/dashboard-rpc/widgets.js.map +1 -0
  526. package/dist/data-branch.d.ts +120 -0
  527. package/dist/data-branch.d.ts.map +1 -0
  528. package/dist/data-branch.js +319 -0
  529. package/dist/data-branch.js.map +1 -0
  530. package/dist/discord/bot.d.ts +61 -0
  531. package/dist/discord/bot.d.ts.map +1 -0
  532. package/dist/discord/bot.js +94 -0
  533. package/dist/discord/bot.js.map +1 -0
  534. package/dist/discord/gateway.d.ts +137 -0
  535. package/dist/discord/gateway.d.ts.map +1 -0
  536. package/dist/discord/gateway.js +315 -0
  537. package/dist/discord/gateway.js.map +1 -0
  538. package/dist/discord/live-run.d.ts +31 -0
  539. package/dist/discord/live-run.d.ts.map +1 -0
  540. package/dist/discord/live-run.js +57 -0
  541. package/dist/discord/live-run.js.map +1 -0
  542. package/dist/discord/reply-mirror.d.ts +83 -0
  543. package/dist/discord/reply-mirror.d.ts.map +1 -0
  544. package/dist/discord/reply-mirror.js +84 -0
  545. package/dist/discord/reply-mirror.js.map +1 -0
  546. package/dist/discord/rest.d.ts +20 -0
  547. package/dist/discord/rest.d.ts.map +1 -0
  548. package/dist/discord/rest.js +41 -0
  549. package/dist/discord/rest.js.map +1 -0
  550. package/dist/discord/routing.d.ts +81 -0
  551. package/dist/discord/routing.d.ts.map +1 -0
  552. package/dist/discord/routing.js +91 -0
  553. package/dist/discord/routing.js.map +1 -0
  554. package/dist/discord-credentials-store.d.ts +14 -0
  555. package/dist/discord-credentials-store.d.ts.map +1 -0
  556. package/dist/discord-credentials-store.js +53 -0
  557. package/dist/discord-credentials-store.js.map +1 -0
  558. package/dist/discord-credentials.d.ts +80 -0
  559. package/dist/discord-credentials.d.ts.map +1 -0
  560. package/dist/discord-credentials.js +55 -0
  561. package/dist/discord-credentials.js.map +1 -0
  562. package/dist/driver/actions-zip.d.ts +2 -0
  563. package/dist/driver/actions-zip.d.ts.map +1 -0
  564. package/dist/driver/actions-zip.js +70 -0
  565. package/dist/driver/actions-zip.js.map +1 -0
  566. package/dist/driver/actions.d.ts +130 -0
  567. package/dist/driver/actions.d.ts.map +1 -0
  568. package/dist/driver/actions.js +261 -0
  569. package/dist/driver/actions.js.map +1 -0
  570. package/dist/driver/agent-cli.d.ts +57 -0
  571. package/dist/driver/agent-cli.d.ts.map +1 -0
  572. package/dist/driver/agent-cli.js +134 -0
  573. package/dist/driver/agent-cli.js.map +1 -0
  574. package/dist/driver/child-registry.d.ts +25 -0
  575. package/dist/driver/child-registry.d.ts.map +1 -0
  576. package/dist/driver/child-registry.js +53 -0
  577. package/dist/driver/child-registry.js.map +1 -0
  578. package/dist/driver/claude-code-quota.d.ts +40 -0
  579. package/dist/driver/claude-code-quota.d.ts.map +1 -0
  580. package/dist/driver/claude-code-quota.js +144 -0
  581. package/dist/driver/claude-code-quota.js.map +1 -0
  582. package/dist/driver/claude-code.d.ts +104 -0
  583. package/dist/driver/claude-code.d.ts.map +1 -0
  584. package/dist/driver/claude-code.js +314 -0
  585. package/dist/driver/claude-code.js.map +1 -0
  586. package/dist/driver/cli-session.d.ts +57 -0
  587. package/dist/driver/cli-session.d.ts.map +1 -0
  588. package/dist/driver/cli-session.js +134 -0
  589. package/dist/driver/cli-session.js.map +1 -0
  590. package/dist/driver/cloud.d.ts +109 -0
  591. package/dist/driver/cloud.d.ts.map +1 -0
  592. package/dist/driver/cloud.js +232 -0
  593. package/dist/driver/cloud.js.map +1 -0
  594. package/dist/driver/codex.d.ts +99 -0
  595. package/dist/driver/codex.d.ts.map +1 -0
  596. package/dist/driver/codex.js +190 -0
  597. package/dist/driver/codex.js.map +1 -0
  598. package/dist/driver/fake.d.ts +54 -0
  599. package/dist/driver/fake.d.ts.map +1 -0
  600. package/dist/driver/fake.js +73 -0
  601. package/dist/driver/fake.js.map +1 -0
  602. package/dist/driver/index.d.ts +10 -0
  603. package/dist/driver/index.d.ts.map +1 -0
  604. package/dist/driver/index.js +14 -0
  605. package/dist/driver/index.js.map +1 -0
  606. package/dist/driver/session-support.d.ts +14 -0
  607. package/dist/driver/session-support.d.ts.map +1 -0
  608. package/dist/driver/session-support.js +37 -0
  609. package/dist/driver/session-support.js.map +1 -0
  610. package/dist/driver/types.d.ts +310 -0
  611. package/dist/driver/types.d.ts.map +1 -0
  612. package/dist/driver/types.js +5 -0
  613. package/dist/driver/types.js.map +1 -0
  614. package/dist/driver-cli.d.ts +61 -0
  615. package/dist/driver-cli.d.ts.map +1 -0
  616. package/dist/driver-cli.js +66 -0
  617. package/dist/driver-cli.js.map +1 -0
  618. package/dist/driver-names.d.ts +22 -0
  619. package/dist/driver-names.d.ts.map +1 -0
  620. package/dist/driver-names.js +29 -0
  621. package/dist/driver-names.js.map +1 -0
  622. package/dist/error-message.d.ts +8 -0
  623. package/dist/error-message.d.ts.map +1 -0
  624. package/dist/error-message.js +10 -0
  625. package/dist/error-message.js.map +1 -0
  626. package/dist/event-stream.d.ts +33 -0
  627. package/dist/event-stream.d.ts.map +1 -0
  628. package/dist/event-stream.js +104 -0
  629. package/dist/event-stream.js.map +1 -0
  630. package/dist/events.d.ts +236 -0
  631. package/dist/events.d.ts.map +1 -0
  632. package/dist/events.js +5 -0
  633. package/dist/events.js.map +1 -0
  634. package/dist/fake-script.d.ts +15 -0
  635. package/dist/fake-script.d.ts.map +1 -0
  636. package/dist/fake-script.js +58 -0
  637. package/dist/fake-script.js.map +1 -0
  638. package/dist/format-bytes.d.ts +3 -0
  639. package/dist/format-bytes.d.ts.map +1 -0
  640. package/dist/format-bytes.js +18 -0
  641. package/dist/format-bytes.js.map +1 -0
  642. package/dist/framework-dir.d.ts +11 -0
  643. package/dist/framework-dir.d.ts.map +1 -0
  644. package/dist/framework-dir.js +11 -0
  645. package/dist/framework-dir.js.map +1 -0
  646. package/dist/framework-gitignore.d.ts +12 -0
  647. package/dist/framework-gitignore.d.ts.map +1 -0
  648. package/dist/framework-gitignore.js +19 -0
  649. package/dist/framework-gitignore.js.map +1 -0
  650. package/dist/gate-keepalive.d.ts +47 -0
  651. package/dist/gate-keepalive.d.ts.map +1 -0
  652. package/dist/gate-keepalive.js +62 -0
  653. package/dist/gate-keepalive.js.map +1 -0
  654. package/dist/git-exclude.d.ts +11 -0
  655. package/dist/git-exclude.d.ts.map +1 -0
  656. package/dist/git-exclude.js +23 -0
  657. package/dist/git-exclude.js.map +1 -0
  658. package/dist/handoff-level.d.ts +56 -0
  659. package/dist/handoff-level.d.ts.map +1 -0
  660. package/dist/handoff-level.js +62 -0
  661. package/dist/handoff-level.js.map +1 -0
  662. package/dist/has-remote.d.ts +8 -0
  663. package/dist/has-remote.d.ts.map +1 -0
  664. package/dist/has-remote.js +10 -0
  665. package/dist/has-remote.js.map +1 -0
  666. package/dist/host-exec.d.ts +21 -0
  667. package/dist/host-exec.d.ts.map +1 -0
  668. package/dist/host-exec.js +30 -0
  669. package/dist/host-exec.js.map +1 -0
  670. package/dist/index.d.ts +41 -0
  671. package/dist/index.d.ts.map +1 -0
  672. package/dist/index.js +16 -0
  673. package/dist/index.js.map +1 -0
  674. package/dist/install.d.ts +29 -0
  675. package/dist/install.d.ts.map +1 -0
  676. package/dist/install.js +40 -0
  677. package/dist/install.js.map +1 -0
  678. package/dist/jsonl-tail.d.ts +59 -0
  679. package/dist/jsonl-tail.d.ts.map +1 -0
  680. package/dist/jsonl-tail.js +152 -0
  681. package/dist/jsonl-tail.js.map +1 -0
  682. package/dist/layout.d.ts +41 -0
  683. package/dist/layout.d.ts.map +1 -0
  684. package/dist/layout.js +69 -0
  685. package/dist/layout.js.map +1 -0
  686. package/dist/logs.d.ts +73 -0
  687. package/dist/logs.d.ts.map +1 -0
  688. package/dist/logs.js +218 -0
  689. package/dist/logs.js.map +1 -0
  690. package/dist/loopback-host.d.ts +20 -0
  691. package/dist/loopback-host.d.ts.map +1 -0
  692. package/dist/loopback-host.js +31 -0
  693. package/dist/loopback-host.js.map +1 -0
  694. package/dist/maintenance.d.ts +90 -0
  695. package/dist/maintenance.d.ts.map +1 -0
  696. package/dist/maintenance.js +141 -0
  697. package/dist/maintenance.js.map +1 -0
  698. package/dist/merged-worktrees.d.ts +74 -0
  699. package/dist/merged-worktrees.d.ts.map +1 -0
  700. package/dist/merged-worktrees.js +84 -0
  701. package/dist/merged-worktrees.js.map +1 -0
  702. package/dist/module-server.d.ts +56 -0
  703. package/dist/module-types/dashboard/components/DiffStat.d.ts +6 -0
  704. package/dist/module-types/dashboard/components/DriverModelMenu.d.ts +23 -0
  705. package/dist/module-types/dashboard/components/LinkActions.d.ts +26 -0
  706. package/dist/module-types/dashboard/components/Markdown.d.ts +4 -0
  707. package/dist/module-types/dashboard/components/SettingsRows.d.ts +37 -0
  708. package/dist/module-types/dashboard/components/StartAgentButton.d.ts +39 -0
  709. package/dist/module-types/dashboard/components/ui/badge.d.ts +2 -0
  710. package/dist/module-types/dashboard/components/ui/button.d.ts +10 -0
  711. package/dist/module-types/dashboard/components/ui/card.d.ts +5 -0
  712. package/dist/module-types/dashboard/components/ui/checkbox.d.ts +7 -0
  713. package/dist/module-types/dashboard/components/ui/dropdown-menu.d.ts +16 -0
  714. package/dist/module-types/dashboard/components/ui/input.d.ts +2 -0
  715. package/dist/module-types/dashboard/components/ui/option-label.d.ts +4 -0
  716. package/dist/module-types/dashboard/components/ui/popover.d.ts +8 -0
  717. package/dist/module-types/dashboard/components/ui/scroll-area.d.ts +10 -0
  718. package/dist/module-types/dashboard/components/ui/separator.d.ts +3 -0
  719. package/dist/module-types/dashboard/components/ui/skeleton.d.ts +2 -0
  720. package/dist/module-types/dashboard/components/ui/slider.d.ts +9 -0
  721. package/dist/module-types/dashboard/components/ui/tooltip.d.ts +11 -0
  722. package/dist/module-types/dashboard/lib/agent-settings.d.ts +2 -0
  723. package/dist/module-types/dashboard/lib/draft-handoff.d.ts +15 -0
  724. package/dist/module-types/dashboard/lib/format-date.d.ts +51 -0
  725. package/dist/module-types/dashboard/lib/host-services.d.ts +12 -0
  726. package/dist/module-types/dashboard/lib/models.d.ts +24 -0
  727. package/dist/module-types/dashboard/lib/route.d.ts +37 -0
  728. package/dist/module-types/dashboard/lib/rpc.d.ts +31 -0
  729. package/dist/module-types/dashboard/lib/use-action.d.ts +25 -0
  730. package/dist/module-types/dashboard/lib/use-async.d.ts +45 -0
  731. package/dist/module-types/dashboard/lib/use-modules.d.ts +78 -0
  732. package/dist/module-types/dashboard/lib/utils.d.ts +3 -0
  733. package/dist/module-types/dashboard/module/index.d.ts +335 -0
  734. package/dist/module-types/dashboard/rpc/models.d.ts +2 -0
  735. package/dist/module-types/dashboard/rpc/modules.d.ts +5 -0
  736. package/dist/module-types/src/agent-id.d.ts +12 -0
  737. package/dist/module-types/src/agent-locks.d.ts +2 -0
  738. package/dist/module-types/src/agent-view.d.ts +38 -0
  739. package/dist/module-types/src/bridge-browser.d.ts +216 -0
  740. package/dist/module-types/src/browser-stream.d.ts +19 -0
  741. package/dist/module-types/src/browser.d.ts +15 -0
  742. package/dist/module-types/src/built-in.d.ts +28 -0
  743. package/dist/module-types/src/client.d.ts +15 -0
  744. package/dist/module-types/src/cloud-run-state.d.ts +26 -0
  745. package/dist/module-types/src/dashboard/activity.d.ts +40 -0
  746. package/dist/module-types/src/dashboard/agent-handoff.d.ts +243 -0
  747. package/dist/module-types/src/dashboard/agent-tree.d.ts +105 -0
  748. package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +157 -0
  749. package/dist/module-types/src/dashboard/bridge-question.d.ts +32 -0
  750. package/dist/module-types/src/dashboard/bridge-store.d.ts +178 -0
  751. package/dist/module-types/src/dashboard/cache.d.ts +46 -0
  752. package/dist/module-types/src/dashboard/content-type.d.ts +2 -0
  753. package/dist/module-types/src/dashboard/dashboard.d.ts +37 -0
  754. package/dist/module-types/src/dashboard/docs.d.ts +38 -0
  755. package/dist/module-types/src/dashboard/file-diff.d.ts +66 -0
  756. package/dist/module-types/src/dashboard/file-read.d.ts +41 -0
  757. package/dist/module-types/src/dashboard/file-status.d.ts +20 -0
  758. package/dist/module-types/src/dashboard/git-status.d.ts +43 -0
  759. package/dist/module-types/src/dashboard/http.d.ts +28 -0
  760. package/dist/module-types/src/dashboard/interventions.d.ts +66 -0
  761. package/dist/module-types/src/dashboard/keyed-watcher.d.ts +28 -0
  762. package/dist/module-types/src/dashboard/keys.d.ts +30 -0
  763. package/dist/module-types/src/dashboard/models.d.ts +24 -0
  764. package/dist/module-types/src/dashboard/module-host.d.ts +43 -0
  765. package/dist/module-types/src/dashboard/module-serve.d.ts +14 -0
  766. package/dist/module-types/src/dashboard/open-in-app.d.ts +42 -0
  767. package/dist/module-types/src/dashboard/open-questions.d.ts +44 -0
  768. package/dist/module-types/src/dashboard/overview.d.ts +77 -0
  769. package/dist/module-types/src/dashboard/projects.d.ts +99 -0
  770. package/dist/module-types/src/dashboard/pull-requests.d.ts +126 -0
  771. package/dist/module-types/src/dashboard/queue.d.ts +16 -0
  772. package/dist/module-types/src/dashboard/quota.d.ts +52 -0
  773. package/dist/module-types/src/dashboard/remote-run.d.ts +94 -0
  774. package/dist/module-types/src/dashboard/rpc-serve.d.ts +102 -0
  775. package/dist/module-types/src/dashboard/run-inbox.d.ts +30 -0
  776. package/dist/module-types/src/dashboard/scheduler-state.d.ts +72 -0
  777. package/dist/module-types/src/dashboard/subagent-settings.d.ts +25 -0
  778. package/dist/module-types/src/dashboard/types.d.ts +108 -0
  779. package/dist/module-types/src/dashboard-rpc/context.d.ts +53 -0
  780. package/dist/module-types/src/dashboard-rpc/control.d.ts +123 -0
  781. package/dist/module-types/src/dashboard-rpc/devices.d.ts +8 -0
  782. package/dist/module-types/src/dashboard-rpc/events-tail.d.ts +67 -0
  783. package/dist/module-types/src/dashboard-rpc/events.d.ts +38 -0
  784. package/dist/module-types/src/dashboard-rpc/index.d.ts +28 -0
  785. package/dist/module-types/src/dashboard-rpc/models.d.ts +3 -0
  786. package/dist/module-types/src/dashboard-rpc/modules.d.ts +42 -0
  787. package/dist/module-types/src/dashboard-rpc/preferences.d.ts +40 -0
  788. package/dist/module-types/src/dashboard-rpc/projects.d.ts +58 -0
  789. package/dist/module-types/src/dashboard-rpc/quota.d.ts +3 -0
  790. package/dist/module-types/src/dashboard-rpc/reads.d.ts +184 -0
  791. package/dist/module-types/src/dashboard-rpc/relay-agent.d.ts +8 -0
  792. package/dist/module-types/src/dashboard-rpc/stream-forward.d.ts +16 -0
  793. package/dist/module-types/src/dashboard-rpc/subagents.d.ts +11 -0
  794. package/dist/module-types/src/driver-names.d.ts +21 -0
  795. package/dist/module-types/src/error-message.d.ts +7 -0
  796. package/dist/module-types/src/event-stream.d.ts +32 -0
  797. package/dist/module-types/src/events.d.ts +235 -0
  798. package/dist/module-types/src/format-bytes.d.ts +2 -0
  799. package/dist/module-types/src/framework-dir.d.ts +10 -0
  800. package/dist/module-types/src/framework-gitignore.d.ts +11 -0
  801. package/dist/module-types/src/has-remote.d.ts +7 -0
  802. package/dist/module-types/src/index.d.ts +40 -0
  803. package/dist/module-types/src/jsonl-tail.d.ts +58 -0
  804. package/dist/module-types/src/loopback-host.d.ts +19 -0
  805. package/dist/module-types/src/node-fs.d.ts +32 -0
  806. package/dist/module-types/src/open-choices.d.ts +14 -0
  807. package/dist/module-types/src/pick-directory.d.ts +29 -0
  808. package/dist/module-types/src/preference-defaults.d.ts +42 -0
  809. package/dist/module-types/src/project-commands.d.ts +23 -0
  810. package/dist/module-types/src/project-errors.d.ts +55 -0
  811. package/dist/module-types/src/project-hooks.d.ts +129 -0
  812. package/dist/module-types/src/project-modules.d.ts +49 -0
  813. package/dist/module-types/src/project-presets.d.ts +29 -0
  814. package/dist/module-types/src/project.d.ts +28 -0
  815. package/dist/module-types/src/publish-levels.d.ts +32 -0
  816. package/dist/module-types/src/quota-boundary.d.ts +64 -0
  817. package/dist/module-types/src/quota-poller.d.ts +82 -0
  818. package/dist/module-types/src/registry.d.ts +220 -0
  819. package/dist/module-types/src/store/agent-checkout.d.ts +53 -0
  820. package/dist/module-types/src/store/agent-store.d.ts +266 -0
  821. package/dist/module-types/src/store/branches.d.ts +163 -0
  822. package/dist/module-types/src/store/git-host.d.ts +113 -0
  823. package/dist/module-types/src/store/index.d.ts +9 -0
  824. package/dist/module-types/src/store/provided.d.ts +16 -0
  825. package/dist/module-types/src/store/queue.d.ts +45 -0
  826. package/dist/module-types/src/store/repository.d.ts +32 -0
  827. package/dist/module-types/src/store/run-record.d.ts +21 -0
  828. package/dist/module-types/src/store/runs.d.ts +107 -0
  829. package/dist/module-types/src/store/tickets.d.ts +72 -0
  830. package/dist/module-types/src/subagent-settings.d.ts +26 -0
  831. package/dist/module-types/src/terminal.d.ts +3 -0
  832. package/dist/module-types/src/worktrees.d.ts +89 -0
  833. package/dist/module.css +50 -0
  834. package/dist/node-fs.d.ts +33 -0
  835. package/dist/node-fs.d.ts.map +1 -0
  836. package/dist/node-fs.js +57 -0
  837. package/dist/node-fs.js.map +1 -0
  838. package/dist/on-before-mergeable-prompt.d.ts +32 -0
  839. package/dist/on-before-mergeable-prompt.d.ts.map +1 -0
  840. package/dist/on-before-mergeable-prompt.js +26 -0
  841. package/dist/on-before-mergeable-prompt.js.map +1 -0
  842. package/dist/open-choices.d.ts +15 -0
  843. package/dist/open-choices.d.ts.map +1 -0
  844. package/dist/open-choices.js +31 -0
  845. package/dist/open-choices.js.map +1 -0
  846. package/dist/pick-directory.d.ts +30 -0
  847. package/dist/pick-directory.d.ts.map +1 -0
  848. package/dist/pick-directory.js +102 -0
  849. package/dist/pick-directory.js.map +1 -0
  850. package/dist/planned-quick-wins.d.ts +102 -0
  851. package/dist/planned-quick-wins.d.ts.map +1 -0
  852. package/dist/planned-quick-wins.js +171 -0
  853. package/dist/planned-quick-wins.js.map +1 -0
  854. package/dist/preference-defaults.d.ts +43 -0
  855. package/dist/preference-defaults.d.ts.map +1 -0
  856. package/dist/preference-defaults.js +34 -0
  857. package/dist/preference-defaults.js.map +1 -0
  858. package/dist/preflight.d.ts +77 -0
  859. package/dist/preflight.d.ts.map +1 -0
  860. package/dist/preflight.js +91 -0
  861. package/dist/preflight.js.map +1 -0
  862. package/dist/preset-catalog.d.ts +98 -0
  863. package/dist/preset-catalog.d.ts.map +1 -0
  864. package/dist/preset-catalog.js +129 -0
  865. package/dist/preset-catalog.js.map +1 -0
  866. package/dist/preset-prompt.d.ts +81 -0
  867. package/dist/preset-prompt.d.ts.map +1 -0
  868. package/dist/preset-prompt.js +51 -0
  869. package/dist/preset-prompt.js.map +1 -0
  870. package/dist/preset-registry.d.ts +32 -0
  871. package/dist/preset-registry.d.ts.map +1 -0
  872. package/dist/preset-registry.js +35 -0
  873. package/dist/preset-registry.js.map +1 -0
  874. package/dist/presets.d.ts +20 -0
  875. package/dist/presets.d.ts.map +1 -0
  876. package/dist/presets.js +33 -0
  877. package/dist/presets.js.map +1 -0
  878. package/dist/preview-runtime.d.ts +33 -0
  879. package/dist/preview-runtime.d.ts.map +1 -0
  880. package/dist/preview-runtime.js +96 -0
  881. package/dist/preview-runtime.js.map +1 -0
  882. package/dist/preview.d.ts +78 -0
  883. package/dist/preview.d.ts.map +1 -0
  884. package/dist/preview.js +301 -0
  885. package/dist/preview.js.map +1 -0
  886. package/dist/project-commands.d.ts +24 -0
  887. package/dist/project-commands.d.ts.map +1 -0
  888. package/dist/project-commands.js +57 -0
  889. package/dist/project-commands.js.map +1 -0
  890. package/dist/project-errors.d.ts +56 -0
  891. package/dist/project-errors.d.ts.map +1 -0
  892. package/dist/project-errors.js +49 -0
  893. package/dist/project-errors.js.map +1 -0
  894. package/dist/project-hooks.d.ts +130 -0
  895. package/dist/project-hooks.d.ts.map +1 -0
  896. package/dist/project-hooks.js +232 -0
  897. package/dist/project-hooks.js.map +1 -0
  898. package/dist/project-modules.d.ts +50 -0
  899. package/dist/project-modules.d.ts.map +1 -0
  900. package/dist/project-modules.js +110 -0
  901. package/dist/project-modules.js.map +1 -0
  902. package/dist/project-pass.d.ts +32 -0
  903. package/dist/project-pass.d.ts.map +1 -0
  904. package/dist/project-pass.js +45 -0
  905. package/dist/project-pass.js.map +1 -0
  906. package/dist/project-presets.d.ts +30 -0
  907. package/dist/project-presets.d.ts.map +1 -0
  908. package/dist/project-presets.js +74 -0
  909. package/dist/project-presets.js.map +1 -0
  910. package/dist/project-widgets.d.ts +46 -0
  911. package/dist/project-widgets.d.ts.map +1 -0
  912. package/dist/project-widgets.js +93 -0
  913. package/dist/project-widgets.js.map +1 -0
  914. package/dist/project.d.ts +29 -0
  915. package/dist/project.d.ts.map +1 -0
  916. package/dist/project.js +41 -0
  917. package/dist/project.js.map +1 -0
  918. package/dist/prompt-run.d.ts +104 -0
  919. package/dist/prompt-run.d.ts.map +1 -0
  920. package/dist/prompt-run.js +112 -0
  921. package/dist/prompt-run.js.map +1 -0
  922. package/dist/prompt-template.d.ts +16 -0
  923. package/dist/prompt-template.d.ts.map +1 -0
  924. package/dist/prompt-template.js +56 -0
  925. package/dist/prompt-template.js.map +1 -0
  926. package/dist/prompts.generated.d.ts +53 -0
  927. package/dist/prompts.generated.d.ts.map +1 -0
  928. package/dist/prompts.generated.js +55 -0
  929. package/dist/prompts.generated.js.map +1 -0
  930. package/dist/publish-levels.d.ts +33 -0
  931. package/dist/publish-levels.d.ts.map +1 -0
  932. package/dist/publish-levels.js +51 -0
  933. package/dist/publish-levels.js.map +1 -0
  934. package/dist/queue-promote.d.ts +70 -0
  935. package/dist/queue-promote.d.ts.map +1 -0
  936. package/dist/queue-promote.js +118 -0
  937. package/dist/queue-promote.js.map +1 -0
  938. package/dist/quota-boundary.d.ts +65 -0
  939. package/dist/quota-boundary.d.ts.map +1 -0
  940. package/dist/quota-boundary.js +135 -0
  941. package/dist/quota-boundary.js.map +1 -0
  942. package/dist/quota-poller.d.ts +83 -0
  943. package/dist/quota-poller.d.ts.map +1 -0
  944. package/dist/quota-poller.js +118 -0
  945. package/dist/quota-poller.js.map +1 -0
  946. package/dist/registry.d.ts +221 -0
  947. package/dist/registry.d.ts.map +1 -0
  948. package/dist/registry.js +348 -0
  949. package/dist/registry.js.map +1 -0
  950. package/dist/relay.d.ts +84 -0
  951. package/dist/relay.d.ts.map +1 -0
  952. package/dist/relay.js +199 -0
  953. package/dist/relay.js.map +1 -0
  954. package/dist/repos-directory.d.ts +19 -0
  955. package/dist/repos-directory.d.ts.map +1 -0
  956. package/dist/repos-directory.js +23 -0
  957. package/dist/repos-directory.js.map +1 -0
  958. package/dist/request-path.d.ts +10 -0
  959. package/dist/request-path.d.ts.map +1 -0
  960. package/dist/request-path.js +16 -0
  961. package/dist/request-path.js.map +1 -0
  962. package/dist/retired-project-settings.d.ts +43 -0
  963. package/dist/retired-project-settings.d.ts.map +1 -0
  964. package/dist/retired-project-settings.js +125 -0
  965. package/dist/retired-project-settings.js.map +1 -0
  966. package/dist/routine-locks.d.ts +53 -0
  967. package/dist/routine-locks.d.ts.map +1 -0
  968. package/dist/routine-locks.js +125 -0
  969. package/dist/routine-locks.js.map +1 -0
  970. package/dist/run-driver.d.ts +26 -0
  971. package/dist/run-driver.d.ts.map +1 -0
  972. package/dist/run-driver.js +17 -0
  973. package/dist/run-driver.js.map +1 -0
  974. package/dist/run-locks.d.ts +3 -0
  975. package/dist/run-locks.d.ts.map +1 -0
  976. package/dist/run-locks.js +39 -0
  977. package/dist/run-locks.js.map +1 -0
  978. package/dist/run-messages.d.ts +64 -0
  979. package/dist/run-messages.d.ts.map +1 -0
  980. package/dist/run-messages.js +76 -0
  981. package/dist/run-messages.js.map +1 -0
  982. package/dist/run-options.d.ts +53 -0
  983. package/dist/run-options.d.ts.map +1 -0
  984. package/dist/run-options.js +110 -0
  985. package/dist/run-options.js.map +1 -0
  986. package/dist/run-telemetry.d.ts +115 -0
  987. package/dist/run-telemetry.d.ts.map +1 -0
  988. package/dist/run-telemetry.js +137 -0
  989. package/dist/run-telemetry.js.map +1 -0
  990. package/dist/run-view.d.ts +109 -0
  991. package/dist/run-view.d.ts.map +1 -0
  992. package/dist/run-view.js +118 -0
  993. package/dist/run-view.js.map +1 -0
  994. package/dist/run.d.ts +261 -0
  995. package/dist/run.d.ts.map +1 -0
  996. package/dist/run.js +420 -0
  997. package/dist/run.js.map +1 -0
  998. package/dist/runtime-keys.d.ts +17 -0
  999. package/dist/runtime-keys.d.ts.map +1 -0
  1000. package/dist/runtime-keys.js +17 -0
  1001. package/dist/runtime-keys.js.map +1 -0
  1002. package/dist/sandbox.d.ts +27 -0
  1003. package/dist/sandbox.d.ts.map +1 -0
  1004. package/dist/sandbox.js +63 -0
  1005. package/dist/sandbox.js.map +1 -0
  1006. package/dist/session-link.d.ts +19 -0
  1007. package/dist/session-link.d.ts.map +1 -0
  1008. package/dist/session-link.js +26 -0
  1009. package/dist/session-link.js.map +1 -0
  1010. package/dist/sessions.d.ts +77 -0
  1011. package/dist/sessions.d.ts.map +1 -0
  1012. package/dist/sessions.js +146 -0
  1013. package/dist/sessions.js.map +1 -0
  1014. package/dist/spike-locks.d.ts +75 -0
  1015. package/dist/spike-locks.d.ts.map +1 -0
  1016. package/dist/spike-locks.js +208 -0
  1017. package/dist/spike-locks.js.map +1 -0
  1018. package/dist/stale-branch.d.ts +21 -0
  1019. package/dist/stale-branch.d.ts.map +1 -0
  1020. package/dist/stale-branch.js +32 -0
  1021. package/dist/stale-branch.js.map +1 -0
  1022. package/dist/steps.d.ts +9 -0
  1023. package/dist/steps.d.ts.map +1 -0
  1024. package/dist/steps.js +13 -0
  1025. package/dist/steps.js.map +1 -0
  1026. package/dist/store/agent-checkout.d.ts +54 -0
  1027. package/dist/store/agent-checkout.d.ts.map +1 -0
  1028. package/dist/store/agent-checkout.js +61 -0
  1029. package/dist/store/agent-checkout.js.map +1 -0
  1030. package/dist/store/agent-store.d.ts +267 -0
  1031. package/dist/store/agent-store.d.ts.map +1 -0
  1032. package/dist/store/agent-store.js +190 -0
  1033. package/dist/store/agent-store.js.map +1 -0
  1034. package/dist/store/branches.d.ts +164 -0
  1035. package/dist/store/branches.d.ts.map +1 -0
  1036. package/dist/store/branches.js +187 -0
  1037. package/dist/store/branches.js.map +1 -0
  1038. package/dist/store/forge.d.ts +110 -0
  1039. package/dist/store/forge.d.ts.map +1 -0
  1040. package/dist/store/forge.js +97 -0
  1041. package/dist/store/forge.js.map +1 -0
  1042. package/dist/store/git-host.d.ts +114 -0
  1043. package/dist/store/git-host.d.ts.map +1 -0
  1044. package/dist/store/git-host.js +103 -0
  1045. package/dist/store/git-host.js.map +1 -0
  1046. package/dist/store/index.d.ts +10 -0
  1047. package/dist/store/index.d.ts.map +1 -0
  1048. package/dist/store/index.js +10 -0
  1049. package/dist/store/index.js.map +1 -0
  1050. package/dist/store/provided.d.ts +17 -0
  1051. package/dist/store/provided.d.ts.map +1 -0
  1052. package/dist/store/provided.js +37 -0
  1053. package/dist/store/provided.js.map +1 -0
  1054. package/dist/store/queue.d.ts +46 -0
  1055. package/dist/store/queue.d.ts.map +1 -0
  1056. package/dist/store/queue.js +61 -0
  1057. package/dist/store/queue.js.map +1 -0
  1058. package/dist/store/repository.d.ts +33 -0
  1059. package/dist/store/repository.d.ts.map +1 -0
  1060. package/dist/store/repository.js +25 -0
  1061. package/dist/store/repository.js.map +1 -0
  1062. package/dist/store/run-checkout.d.ts +33 -0
  1063. package/dist/store/run-checkout.d.ts.map +1 -0
  1064. package/dist/store/run-checkout.js +59 -0
  1065. package/dist/store/run-checkout.js.map +1 -0
  1066. package/dist/store/run-record.d.ts +22 -0
  1067. package/dist/store/run-record.d.ts.map +1 -0
  1068. package/dist/store/run-record.js +108 -0
  1069. package/dist/store/run-record.js.map +1 -0
  1070. package/dist/store/run-store.d.ts +501 -0
  1071. package/dist/store/run-store.d.ts.map +1 -0
  1072. package/dist/store/run-store.js +806 -0
  1073. package/dist/store/run-store.js.map +1 -0
  1074. package/dist/store/runs.d.ts +108 -0
  1075. package/dist/store/runs.d.ts.map +1 -0
  1076. package/dist/store/runs.js +146 -0
  1077. package/dist/store/runs.js.map +1 -0
  1078. package/dist/store/suspend.d.ts +38 -0
  1079. package/dist/store/suspend.d.ts.map +1 -0
  1080. package/dist/store/suspend.js +45 -0
  1081. package/dist/store/suspend.js.map +1 -0
  1082. package/dist/store/test-branches.d.ts +18 -0
  1083. package/dist/store/test-branches.d.ts.map +1 -0
  1084. package/dist/store/test-branches.js +59 -0
  1085. package/dist/store/test-branches.js.map +1 -0
  1086. package/dist/store/test-runs.d.ts +15 -0
  1087. package/dist/store/test-runs.d.ts.map +1 -0
  1088. package/dist/store/test-runs.js +37 -0
  1089. package/dist/store/test-runs.js.map +1 -0
  1090. package/dist/store/tickets.d.ts +73 -0
  1091. package/dist/store/tickets.d.ts.map +1 -0
  1092. package/dist/store/tickets.js +67 -0
  1093. package/dist/store/tickets.js.map +1 -0
  1094. package/dist/store/worktree-deps.d.ts +30 -0
  1095. package/dist/store/worktree-deps.d.ts.map +1 -0
  1096. package/dist/store/worktree-deps.js +115 -0
  1097. package/dist/store/worktree-deps.js.map +1 -0
  1098. package/dist/store/worktree.d.ts +194 -0
  1099. package/dist/store/worktree.d.ts.map +1 -0
  1100. package/dist/store/worktree.js +331 -0
  1101. package/dist/store/worktree.js.map +1 -0
  1102. package/dist/subagent-settings.d.ts +27 -0
  1103. package/dist/subagent-settings.d.ts.map +1 -0
  1104. package/dist/subagent-settings.js +35 -0
  1105. package/dist/subagent-settings.js.map +1 -0
  1106. package/dist/system-prompt-file.d.ts +18 -0
  1107. package/dist/system-prompt-file.d.ts.map +1 -0
  1108. package/dist/system-prompt-file.js +28 -0
  1109. package/dist/system-prompt-file.js.map +1 -0
  1110. package/dist/system-prompt.d.ts +148 -0
  1111. package/dist/system-prompt.d.ts.map +1 -0
  1112. package/dist/system-prompt.js +170 -0
  1113. package/dist/system-prompt.js.map +1 -0
  1114. package/dist/target-driver.d.ts +28 -0
  1115. package/dist/target-driver.d.ts.map +1 -0
  1116. package/dist/target-driver.js +18 -0
  1117. package/dist/target-driver.js.map +1 -0
  1118. package/dist/terminal.d.ts +4 -0
  1119. package/dist/terminal.d.ts.map +1 -0
  1120. package/dist/terminal.js +97 -0
  1121. package/dist/terminal.js.map +1 -0
  1122. package/dist/ticket-locks.d.ts +61 -0
  1123. package/dist/ticket-locks.d.ts.map +1 -0
  1124. package/dist/ticket-locks.js +137 -0
  1125. package/dist/ticket-locks.js.map +1 -0
  1126. package/dist/tickets-file.d.ts +7 -0
  1127. package/dist/tickets-file.d.ts.map +1 -0
  1128. package/dist/tickets-file.js +21 -0
  1129. package/dist/tickets-file.js.map +1 -0
  1130. package/dist/tickets.d.ts +18 -0
  1131. package/dist/tickets.d.ts.map +1 -0
  1132. package/dist/tickets.js +23 -0
  1133. package/dist/tickets.js.map +1 -0
  1134. package/dist/todo-loop.d.ts +110 -0
  1135. package/dist/todo-loop.d.ts.map +1 -0
  1136. package/dist/todo-loop.js +175 -0
  1137. package/dist/todo-loop.js.map +1 -0
  1138. package/dist/turn-gate.d.ts +144 -0
  1139. package/dist/turn-gate.d.ts.map +1 -0
  1140. package/dist/turn-gate.js +217 -0
  1141. package/dist/turn-gate.js.map +1 -0
  1142. package/dist/update-check.d.ts +44 -0
  1143. package/dist/update-check.d.ts.map +1 -0
  1144. package/dist/update-check.js +71 -0
  1145. package/dist/update-check.js.map +1 -0
  1146. package/dist/usage.d.ts +32 -0
  1147. package/dist/usage.d.ts.map +1 -0
  1148. package/dist/usage.js +46 -0
  1149. package/dist/usage.js.map +1 -0
  1150. package/dist/widget-types/dashboard/components/LinkActions.d.ts +26 -0
  1151. package/dist/widget-types/dashboard/components/Markdown.d.ts +4 -0
  1152. package/dist/widget-types/dashboard/components/StartAgentButton.d.ts +39 -0
  1153. package/dist/widget-types/dashboard/components/ui/badge.d.ts +2 -0
  1154. package/dist/widget-types/dashboard/components/ui/button.d.ts +10 -0
  1155. package/dist/widget-types/dashboard/components/ui/card.d.ts +5 -0
  1156. package/dist/widget-types/dashboard/components/ui/checkbox.d.ts +7 -0
  1157. package/dist/widget-types/dashboard/components/ui/dropdown-menu.d.ts +16 -0
  1158. package/dist/widget-types/dashboard/components/ui/input.d.ts +2 -0
  1159. package/dist/widget-types/dashboard/components/ui/option-label.d.ts +4 -0
  1160. package/dist/widget-types/dashboard/components/ui/popover.d.ts +8 -0
  1161. package/dist/widget-types/dashboard/components/ui/scroll-area.d.ts +10 -0
  1162. package/dist/widget-types/dashboard/components/ui/separator.d.ts +3 -0
  1163. package/dist/widget-types/dashboard/components/ui/skeleton.d.ts +2 -0
  1164. package/dist/widget-types/dashboard/components/ui/slider.d.ts +9 -0
  1165. package/dist/widget-types/dashboard/components/ui/tooltip.d.ts +11 -0
  1166. package/dist/widget-types/dashboard/lib/draft-handoff.d.ts +15 -0
  1167. package/dist/widget-types/dashboard/lib/format-date.d.ts +51 -0
  1168. package/dist/widget-types/dashboard/lib/host-services.d.ts +12 -0
  1169. package/dist/widget-types/dashboard/lib/route.d.ts +24 -0
  1170. package/dist/widget-types/dashboard/lib/rpc.d.ts +31 -0
  1171. package/dist/widget-types/dashboard/lib/use-action.d.ts +25 -0
  1172. package/dist/widget-types/dashboard/lib/use-async.d.ts +39 -0
  1173. package/dist/widget-types/dashboard/lib/use-widgets.d.ts +42 -0
  1174. package/dist/widget-types/dashboard/lib/utils.d.ts +3 -0
  1175. package/dist/widget-types/dashboard/rpc/widgets.d.ts +4 -0
  1176. package/dist/widget-types/dashboard/widget/index.d.ts +207 -0
  1177. package/dist/widget-types/src/agent-id.d.ts +12 -0
  1178. package/dist/widget-types/src/agent-locks.d.ts +2 -0
  1179. package/dist/widget-types/src/agent-view.d.ts +38 -0
  1180. package/dist/widget-types/src/bridge-browser.d.ts +216 -0
  1181. package/dist/widget-types/src/browser-stream.d.ts +19 -0
  1182. package/dist/widget-types/src/browser.d.ts +15 -0
  1183. package/dist/widget-types/src/cli-exec.d.ts +35 -0
  1184. package/dist/widget-types/src/cloud-run-state.d.ts +26 -0
  1185. package/dist/widget-types/src/dashboard/activity.d.ts +40 -0
  1186. package/dist/widget-types/src/dashboard/agent-handoff.d.ts +211 -0
  1187. package/dist/widget-types/src/dashboard/agent-tree.d.ts +105 -0
  1188. package/dist/widget-types/src/dashboard/bridge-endpoints.d.ts +157 -0
  1189. package/dist/widget-types/src/dashboard/bridge-question.d.ts +32 -0
  1190. package/dist/widget-types/src/dashboard/bridge-store.d.ts +178 -0
  1191. package/dist/widget-types/src/dashboard/cache.d.ts +46 -0
  1192. package/dist/widget-types/src/dashboard/content-type.d.ts +2 -0
  1193. package/dist/widget-types/src/dashboard/dashboard.d.ts +37 -0
  1194. package/dist/widget-types/src/dashboard/discord-webhook.d.ts +16 -0
  1195. package/dist/widget-types/src/dashboard/docs.d.ts +38 -0
  1196. package/dist/widget-types/src/dashboard/file-diff.d.ts +66 -0
  1197. package/dist/widget-types/src/dashboard/file-read.d.ts +41 -0
  1198. package/dist/widget-types/src/dashboard/file-status.d.ts +20 -0
  1199. package/dist/widget-types/src/dashboard/gh.d.ts +130 -0
  1200. package/dist/widget-types/src/dashboard/git-status.d.ts +32 -0
  1201. package/dist/widget-types/src/dashboard/github.d.ts +10 -0
  1202. package/dist/widget-types/src/dashboard/http.d.ts +28 -0
  1203. package/dist/widget-types/src/dashboard/interventions.d.ts +66 -0
  1204. package/dist/widget-types/src/dashboard/keys.d.ts +30 -0
  1205. package/dist/widget-types/src/dashboard/models.d.ts +24 -0
  1206. package/dist/widget-types/src/dashboard/open-in-app.d.ts +42 -0
  1207. package/dist/widget-types/src/dashboard/open-questions.d.ts +52 -0
  1208. package/dist/widget-types/src/dashboard/overview.d.ts +77 -0
  1209. package/dist/widget-types/src/dashboard/projects.d.ts +89 -0
  1210. package/dist/widget-types/src/dashboard/pull-requests.d.ts +126 -0
  1211. package/dist/widget-types/src/dashboard/queue.d.ts +16 -0
  1212. package/dist/widget-types/src/dashboard/quota.d.ts +59 -0
  1213. package/dist/widget-types/src/dashboard/remote-run.d.ts +94 -0
  1214. package/dist/widget-types/src/dashboard/rpc-serve.d.ts +102 -0
  1215. package/dist/widget-types/src/dashboard/run-inbox.d.ts +30 -0
  1216. package/dist/widget-types/src/dashboard/scheduler-state.d.ts +64 -0
  1217. package/dist/widget-types/src/dashboard/tickets.d.ts +28 -0
  1218. package/dist/widget-types/src/dashboard/types.d.ts +99 -0
  1219. package/dist/widget-types/src/dashboard/widget-serve.d.ts +14 -0
  1220. package/dist/widget-types/src/dashboard-rpc/context.d.ts +53 -0
  1221. package/dist/widget-types/src/dashboard-rpc/control.d.ts +108 -0
  1222. package/dist/widget-types/src/dashboard-rpc/devices.d.ts +8 -0
  1223. package/dist/widget-types/src/dashboard-rpc/events-tail.d.ts +53 -0
  1224. package/dist/widget-types/src/dashboard-rpc/events.d.ts +29 -0
  1225. package/dist/widget-types/src/dashboard-rpc/index.d.ts +28 -0
  1226. package/dist/widget-types/src/dashboard-rpc/models.d.ts +3 -0
  1227. package/dist/widget-types/src/dashboard-rpc/preferences.d.ts +40 -0
  1228. package/dist/widget-types/src/dashboard-rpc/projects.d.ts +54 -0
  1229. package/dist/widget-types/src/dashboard-rpc/quota.d.ts +26 -0
  1230. package/dist/widget-types/src/dashboard-rpc/reads.d.ts +227 -0
  1231. package/dist/widget-types/src/dashboard-rpc/relay-agent.d.ts +8 -0
  1232. package/dist/widget-types/src/dashboard-rpc/stream-forward.d.ts +16 -0
  1233. package/dist/widget-types/src/dashboard-rpc/widgets.d.ts +32 -0
  1234. package/dist/widget-types/src/discord-credentials.d.ts +79 -0
  1235. package/dist/widget-types/src/driver-names.d.ts +21 -0
  1236. package/dist/widget-types/src/error-message.d.ts +7 -0
  1237. package/dist/widget-types/src/event-stream.d.ts +32 -0
  1238. package/dist/widget-types/src/events.d.ts +235 -0
  1239. package/dist/widget-types/src/framework-dir.d.ts +10 -0
  1240. package/dist/widget-types/src/framework-gitignore.d.ts +11 -0
  1241. package/dist/widget-types/src/index.d.ts +42 -0
  1242. package/dist/widget-types/src/jsonl-tail.d.ts +54 -0
  1243. package/dist/widget-types/src/loopback-host.d.ts +19 -0
  1244. package/dist/widget-types/src/node-fs.d.ts +32 -0
  1245. package/dist/widget-types/src/open-choices.d.ts +14 -0
  1246. package/dist/widget-types/src/pick-directory.d.ts +29 -0
  1247. package/dist/widget-types/src/preference-defaults.d.ts +53 -0
  1248. package/dist/widget-types/src/project-commands.d.ts +23 -0
  1249. package/dist/widget-types/src/project-errors.d.ts +43 -0
  1250. package/dist/widget-types/src/project-hooks.d.ts +133 -0
  1251. package/dist/widget-types/src/project-presets.d.ts +29 -0
  1252. package/dist/widget-types/src/project-widgets.d.ts +45 -0
  1253. package/dist/widget-types/src/project.d.ts +28 -0
  1254. package/dist/widget-types/src/quota-boundary.d.ts +115 -0
  1255. package/dist/widget-types/src/quota-poller.d.ts +82 -0
  1256. package/dist/widget-types/src/registry.d.ts +210 -0
  1257. package/dist/widget-types/src/store/agent-checkout.d.ts +46 -0
  1258. package/dist/widget-types/src/store/agent-store.d.ts +237 -0
  1259. package/dist/widget-types/src/store/branches.d.ts +133 -0
  1260. package/dist/widget-types/src/store/forge.d.ts +109 -0
  1261. package/dist/widget-types/src/store/git-host.d.ts +111 -0
  1262. package/dist/widget-types/src/store/index.d.ts +9 -0
  1263. package/dist/widget-types/src/store/provided.d.ts +16 -0
  1264. package/dist/widget-types/src/store/queue.d.ts +45 -0
  1265. package/dist/widget-types/src/store/run-record.d.ts +21 -0
  1266. package/dist/widget-types/src/store/runs.d.ts +101 -0
  1267. package/dist/widget-types/src/store/tickets.d.ts +72 -0
  1268. package/dist/widget-types/src/tickets.d.ts +17 -0
  1269. package/dist/widget-types/src/worktrees.d.ts +89 -0
  1270. package/dist/widget.css +50 -0
  1271. package/dist/worktrees.d.ts +90 -0
  1272. package/dist/worktrees.d.ts.map +1 -0
  1273. package/dist/worktrees.js +123 -0
  1274. package/dist/worktrees.js.map +1 -0
  1275. package/package.json +103 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-link.js","sourceRoot":"","sources":["../src/session-link.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,mFAAmF;AACnF,qFAAqF;AAErF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAA;AAEnD,kFAAkF;AAClF,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO,QAAQ,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAA;AAClD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,SAAiB;IACpE,OAAO,QAAQ,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,wBAAwB,CAAA"}
@@ -0,0 +1,77 @@
1
+ import { SESSIONS_DIR, type StoreFs } from './store/index.js';
2
+ import { type GitRunner } from './project.js';
3
+ /**
4
+ * Committed session history (#1179): where a project's finished runs are archived so they survive
5
+ * the repo being cleaned.
6
+ *
7
+ * The bug this exists for: run state was written to `.the-framework/runs/`, which the install-time
8
+ * `.gitignore` keeps untracked, so `git clean -fdx` — an ordinary thing to do to a repo — deleted
9
+ * every session a project had ever run. Nothing was recoverable, because nothing had ever been
10
+ * committed.
11
+ *
12
+ * Scoped per user, as `.the-framework/<user>/sessions/`, rather than one shared directory. Two
13
+ * people working the same repo would otherwise write the same paths from different machines and
14
+ * conflict on every merge; under their own directory their histories simply sit side by side. The
15
+ * list being visible to the whole team is the intended outcome, not a leak — see the issue.
16
+ *
17
+ * The identity is the git `user.email` already configured in the repo, so there is nothing new to
18
+ * set up and the directory matches the name on the commits.
19
+ */
20
+ /** The directory, under a user's own directory, that holds their archived runs. */
21
+ export { SESSIONS_DIR };
22
+ /** Where a run's history goes when git has no identity configured. */
23
+ export declare const ANONYMOUS_USER_DIR = "anonymous";
24
+ /**
25
+ * An email as a directory name: lowercased, with anything outside a conservative set replaced by
26
+ * `-`. The result must start with a letter or digit, which is what rules out `.`, `..` and dotfile
27
+ * names — this value comes from repo configuration and is joined onto a path, so a name that could
28
+ * climb out of the directory is the one thing that must be impossible. Anything that cannot be made
29
+ * to fit falls back to {@link ANONYMOUS_USER_DIR} rather than to a guess.
30
+ */
31
+ export declare function userDirName(email: string | undefined): string;
32
+ /** The `.the-framework/<user>/sessions` directory under a project root. */
33
+ export declare function sessionsDir(cwd: string, user: string): string;
34
+ /**
35
+ * The `.the-framework/.gitignore` rules that make every user's sessions tracked. Three lines, not
36
+ * one: the seeded allow-list ignores everything with `*`, and git never descends into an ignored
37
+ * directory, so each directory on the way down has to be re-included before the files under it can
38
+ * be. Same shape as the conversations rules (#908), which this sits beside.
39
+ *
40
+ * User-agnostic on purpose (#1312). Naming each user meant every person who ever ran a session in
41
+ * the repo appended their own three lines to a *tracked* file: their checkout went dirty, the next
42
+ * safety commit swept the edit into a branch, and two machines doing it near each other conflicted.
43
+ * A glob covers everyone, including people who have not run anything yet, so the file is written
44
+ * once and then never again.
45
+ *
46
+ * A star matches one path segment and never a slash, so the sessions rule reaches exactly
47
+ * `<user>/sessions/` and not `worktrees/<run>/sessions/`. The transient siblings stay ignored
48
+ * either way: un-ignoring a directory only lets git descend into it, and the bare `*` still
49
+ * ignores every file it finds there.
50
+ */
51
+ export declare function sessionsGitignore(): string;
52
+ /**
53
+ * Drop the per-user session rules, keeping every other line.
54
+ *
55
+ * Only users the file actually names a `sessions` rule for are stripped, and only those three
56
+ * exact lines. The conversations rules (#908) are a literal directory name rather than a user, so
57
+ * they never match, and a hand-written rule this does not recognize is left where it is.
58
+ */
59
+ export declare function withoutPerUserRules(md: string): string;
60
+ /**
61
+ * Make sure `.the-framework/.gitignore` un-ignores archived sessions, returning whether it wrote.
62
+ * Done lazily on archive rather than at install time: the ignore file is seeded once and only when
63
+ * absent, so every repo activated before this feature carries the old allow-list.
64
+ *
65
+ * Writes at most twice in a repo's life, and usually once: a file already on the glob form is left
66
+ * alone, and a file still naming users is upgraded to the glob form in place — the per-user lines
67
+ * come out in the same write that puts the glob in, so the churn (#1312) ends rather than being
68
+ * added to. `user` no longer selects the rules; it stays because the caller has it and a future
69
+ * rule may need it again.
70
+ *
71
+ * Only a file we recognize is touched; anything hand-edited beyond recognition is left alone.
72
+ */
73
+ export declare function ensureSessionsIgnored(cwd: string, _user: string, fs?: StoreFs): Promise<boolean>;
74
+ export declare function resolveUserDir(cwd: string, git?: GitRunner): Promise<string>;
75
+ /** Drop the {@link resolveUserDir} cache. For tests, and for a daemon that outlives a config change. */
76
+ export declare function forgetUserDirs(): void;
77
+ //# sourceMappingURL=sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../src/sessions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAE5D;;;;;;;;;;;;;;;;GAgBG;AAEH,mFAAmF;AACnF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,cAAc,CAAA;AAQ7C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ7D;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAUD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAE,OAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,CAarH;AAYD,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAOnG;AAED,wGAAwG;AACxG,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
@@ -0,0 +1,146 @@
1
+ import { join } from 'node:path';
2
+ import { THE_FRAMEWORK_DIR } from './framework-dir.js';
3
+ import { gitignorePath, LOGS_GITIGNORE } from './logs.js';
4
+ import { nodeStoreFs, SESSIONS_DIR } from './store/index.js';
5
+ import { nodeGitRunner } from './project.js';
6
+ /**
7
+ * Committed session history (#1179): where a project's finished runs are archived so they survive
8
+ * the repo being cleaned.
9
+ *
10
+ * The bug this exists for: run state was written to `.the-framework/runs/`, which the install-time
11
+ * `.gitignore` keeps untracked, so `git clean -fdx` — an ordinary thing to do to a repo — deleted
12
+ * every session a project had ever run. Nothing was recoverable, because nothing had ever been
13
+ * committed.
14
+ *
15
+ * Scoped per user, as `.the-framework/<user>/sessions/`, rather than one shared directory. Two
16
+ * people working the same repo would otherwise write the same paths from different machines and
17
+ * conflict on every merge; under their own directory their histories simply sit side by side. The
18
+ * list being visible to the whole team is the intended outcome, not a leak — see the issue.
19
+ *
20
+ * The identity is the git `user.email` already configured in the repo, so there is nothing new to
21
+ * set up and the directory matches the name on the commits.
22
+ */
23
+ /** The directory, under a user's own directory, that holds their archived runs. */
24
+ export { SESSIONS_DIR };
25
+ /** Where a run's history goes when git has no identity configured. */
26
+ export const ANONYMOUS_USER_DIR = 'anonymous';
27
+ /**
28
+ * Longest directory name we will make from an email. Well past any real address, and short enough
29
+ * that the archive paths under it stay inside the path limits of every platform we run on.
30
+ */
31
+ const MAX_USER_DIR = 64;
32
+ /**
33
+ * An email as a directory name: lowercased, with anything outside a conservative set replaced by
34
+ * `-`. The result must start with a letter or digit, which is what rules out `.`, `..` and dotfile
35
+ * names — this value comes from repo configuration and is joined onto a path, so a name that could
36
+ * climb out of the directory is the one thing that must be impossible. Anything that cannot be made
37
+ * to fit falls back to {@link ANONYMOUS_USER_DIR} rather than to a guess.
38
+ */
39
+ export function userDirName(email) {
40
+ const cleaned = (email ?? '')
41
+ .trim()
42
+ .toLowerCase()
43
+ .replace(/[^a-z0-9@._+-]/g, '-');
44
+ return cleaned.length > 0 && cleaned.length <= MAX_USER_DIR && /^[a-z0-9][a-z0-9@._+-]*$/.test(cleaned)
45
+ ? cleaned
46
+ : ANONYMOUS_USER_DIR;
47
+ }
48
+ /** The `.the-framework/<user>/sessions` directory under a project root. */
49
+ export function sessionsDir(cwd, user) {
50
+ return join(cwd, THE_FRAMEWORK_DIR, user, SESSIONS_DIR);
51
+ }
52
+ /**
53
+ * The `.the-framework/.gitignore` rules that make every user's sessions tracked. Three lines, not
54
+ * one: the seeded allow-list ignores everything with `*`, and git never descends into an ignored
55
+ * directory, so each directory on the way down has to be re-included before the files under it can
56
+ * be. Same shape as the conversations rules (#908), which this sits beside.
57
+ *
58
+ * User-agnostic on purpose (#1312). Naming each user meant every person who ever ran a session in
59
+ * the repo appended their own three lines to a *tracked* file: their checkout went dirty, the next
60
+ * safety commit swept the edit into a branch, and two machines doing it near each other conflicted.
61
+ * A glob covers everyone, including people who have not run anything yet, so the file is written
62
+ * once and then never again.
63
+ *
64
+ * A star matches one path segment and never a slash, so the sessions rule reaches exactly
65
+ * `<user>/sessions/` and not `worktrees/<run>/sessions/`. The transient siblings stay ignored
66
+ * either way: un-ignoring a directory only lets git descend into it, and the bare `*` still
67
+ * ignores every file it finds there.
68
+ */
69
+ export function sessionsGitignore() {
70
+ return `!*/\n!*/${SESSIONS_DIR}/\n!*/${SESSIONS_DIR}/**\n`;
71
+ }
72
+ /** The glob rule whose presence means a file is already on the #1312 form. */
73
+ const GLOB_RULE = `!*/${SESSIONS_DIR}/**`;
74
+ /** `!<user>/`, `!<user>/sessions/` and `!<user>/sessions/**` for one named user. */
75
+ function perUserRules(user) {
76
+ return [`!${user}/`, `!${user}/${SESSIONS_DIR}/`, `!${user}/${SESSIONS_DIR}/**`];
77
+ }
78
+ /**
79
+ * Drop the per-user session rules, keeping every other line.
80
+ *
81
+ * Only users the file actually names a `sessions` rule for are stripped, and only those three
82
+ * exact lines. The conversations rules (#908) are a literal directory name rather than a user, so
83
+ * they never match, and a hand-written rule this does not recognize is left where it is.
84
+ */
85
+ export function withoutPerUserRules(md) {
86
+ const lines = md.split('\n');
87
+ const users = lines
88
+ .map(line => /^!(.+)\/sessions\/\*\*$/.exec(line.trim())?.[1])
89
+ .filter((user) => user !== undefined && user !== '*');
90
+ if (!users.length)
91
+ return md;
92
+ const drop = new Set(users.flatMap(perUserRules));
93
+ return lines.filter(line => !drop.has(line.trim())).join('\n');
94
+ }
95
+ /**
96
+ * Make sure `.the-framework/.gitignore` un-ignores archived sessions, returning whether it wrote.
97
+ * Done lazily on archive rather than at install time: the ignore file is seeded once and only when
98
+ * absent, so every repo activated before this feature carries the old allow-list.
99
+ *
100
+ * Writes at most twice in a repo's life, and usually once: a file already on the glob form is left
101
+ * alone, and a file still naming users is upgraded to the glob form in place — the per-user lines
102
+ * come out in the same write that puts the glob in, so the churn (#1312) ends rather than being
103
+ * added to. `user` no longer selects the rules; it stays because the caller has it and a future
104
+ * rule may need it again.
105
+ *
106
+ * Only a file we recognize is touched; anything hand-edited beyond recognition is left alone.
107
+ */
108
+ export async function ensureSessionsIgnored(cwd, _user, fs = nodeStoreFs()) {
109
+ const path = gitignorePath(cwd);
110
+ const rules = sessionsGitignore();
111
+ if (!(await fs.exists(path))) {
112
+ await fs.write(path, LOGS_GITIGNORE + rules);
113
+ return true;
114
+ }
115
+ const current = await fs.read(path);
116
+ if (current.includes(GLOB_RULE))
117
+ return false;
118
+ if (!current.includes('!LOGS.md'))
119
+ return false;
120
+ const pruned = withoutPerUserRules(current);
121
+ await fs.write(path, pruned.endsWith('\n') ? pruned + rules : pruned + '\n' + rules);
122
+ return true;
123
+ }
124
+ /**
125
+ * The directory name for the identity this repo commits under, from `git config user.email`.
126
+ *
127
+ * Cached per repo for the process's life: it is read on every archive, it changes about as often
128
+ * as a git identity does, and a run that outlived a config change would only mean the next run
129
+ * files itself correctly. A missing or unreadable identity yields {@link ANONYMOUS_USER_DIR}, so
130
+ * history is still kept — filing it under a placeholder is strictly better than dropping it.
131
+ */
132
+ const cache = new Map();
133
+ export async function resolveUserDir(cwd, git = nodeGitRunner()) {
134
+ const hit = cache.get(cwd);
135
+ if (hit !== undefined)
136
+ return hit;
137
+ const email = await git(['config', 'user.email'], cwd).catch(() => '');
138
+ const dir = userDirName(email.trim());
139
+ cache.set(cwd, dir);
140
+ return dir;
141
+ }
142
+ /** Drop the {@link resolveUserDir} cache. For tests, and for a daemon that outlives a config change. */
143
+ export function forgetUserDirs() {
144
+ cache.clear();
145
+ }
146
+ //# sourceMappingURL=sessions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions.js","sourceRoot":"","sources":["../src/sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAgB,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAkB,MAAM,cAAc,CAAA;AAE5D;;;;;;;;;;;;;;;;GAgBG;AAEH,mFAAmF;AACnF,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,sEAAsE;AACtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAA;AAE7C;;;GAGG;AACH,MAAM,YAAY,GAAG,EAAE,CAAA;AAEvB;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAyB;IACnD,MAAM,OAAO,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SAC1B,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAA;IAClC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,IAAI,YAAY,IAAI,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC;QACrG,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,kBAAkB,CAAA;AACxB,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,WAAW,CAAC,GAAW,EAAE,IAAY;IACnD,OAAO,IAAI,CAAC,GAA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,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IACrC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IACnB,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,cAAc;IAC5B,KAAK,CAAC,KAAK,EAAE,CAAA;AACf,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { type GitRunner } from './project.js';
2
+ import type { SpikeAssignment } from './auto-pm.js';
3
+ /** The first line of a placeholder sibling: the claim, naming the agent that holds it. */
4
+ export declare const SPIKE_LOCK_PREFIX = "PENDING:";
5
+ /**
6
+ * How old a PENDING lock must be before it is presumed dead and released. Generous against the
7
+ * slowest live path — spiking and planning can take hours, on top of a cloud queue — because a
8
+ * lock released under a live agent re-opens the double-work window the lock exists to close,
9
+ * while a dead agent's ticket only waits one interval longer. This is a bug-recovery mechanism
10
+ * that ideally never fires (#1364 review), so erring long costs nearly nothing.
11
+ */
12
+ export declare const SPIKE_LOCK_STALE_MS: number;
13
+ /** Whether a sibling's content is a PENDING placeholder rather than a real spike or plan. */
14
+ export declare function isSpikeLock(md: string): boolean;
15
+ /** What a lock file holds: the claim line and nothing else, so the check above stays trivial. */
16
+ export declare function spikeLockContent(agentId: string): string;
17
+ /** The commit a batch of locks lands as. Names the count so the history reads as what happened. */
18
+ export declare function lockMessage(count: number): string;
19
+ /** The commit a release lands as. */
20
+ export declare function releaseMessage(count: number): string;
21
+ /** Injectable seams so both operations are unit-testable off disk, git, and GitHub. */
22
+ export interface SpikeLockDeps {
23
+ git?: GitRunner;
24
+ /** Write one lock file (default `fs.writeFile`). */
25
+ write?: (path: string, content: string) => Promise<void>;
26
+ /** Read one sibling (default `fs.readFile`); a rejection reads as "not a lock". */
27
+ read?: (path: string) => Promise<string>;
28
+ /** Delete one lock file (default `fs.rm`). */
29
+ remove?: (path: string) => Promise<void>;
30
+ /** List `tickets/` (default `fs.readdir`); a rejection reads as an empty directory. */
31
+ list?: (dir: string) => Promise<string[]>;
32
+ /**
33
+ * Whether any open PR touches `file` (#1313's read, reused): a finished agent's PR carries the
34
+ * real sibling, so an open one keeps the lock however old it is. `undefined` means the answer
35
+ * could not be read, which also keeps the lock — releasing on a `gh` hiccup would re-open the
36
+ * double-work window over a network blip.
37
+ */
38
+ prTouches?: (cwd: string, file: string) => Promise<boolean | undefined>;
39
+ /** Clock, injectable for tests. */
40
+ now?: () => number;
41
+ /** Override {@link SPIKE_LOCK_STALE_MS}. */
42
+ staleMs?: number;
43
+ /** Progress line. */
44
+ log?: (message: string) => void;
45
+ }
46
+ /**
47
+ * Claim `assignments`' tickets for their agents: write both placeholder siblings per ticket,
48
+ * commit the whole batch in one pathspec-scoped commit, and push it to origin's default branch
49
+ * ({@link pushLockCommit}). Resolves the subset actually locked — a ticket whose sibling appeared since the candidates
50
+ * were enumerated is skipped, not overwritten: an existing file is someone's claim or someone's
51
+ * work, and either outranks this batch.
52
+ *
53
+ * A batch whose commit failed is rolled back (the written files removed) and resolves `[]`:
54
+ * uncommitted placeholders in the user's checkout would be noise git blames on nobody. A batch
55
+ * whose *push* failed is kept and resolved as locked — the commit still guards every run forked
56
+ * from this checkout, which is the common case, and the sweep should not stand a healthy local
57
+ * fan-out down over a network blip. The push is what closes the cross-machine window (#1320), so
58
+ * its failure is logged rather than swallowed.
59
+ *
60
+ * Never throws: this runs on a background tick with nothing to catch it.
61
+ */
62
+ export declare function acquireSpikeLocks(cwd: string, assignments: readonly SpikeAssignment[], deps?: SpikeLockDeps): Promise<SpikeAssignment[]>;
63
+ /**
64
+ * Release the PENDING locks whose agents are presumed dead, so a crashed spike does not brick its
65
+ * ticket forever. A lock is stale exactly when all three hold (#1327's rule): its content is still
66
+ * the placeholder, no open PR touches it (a finished agent's PR carries the real sibling — the
67
+ * #1313 claim takes over from here), and its last commit is older than {@link SPIKE_LOCK_STALE_MS}.
68
+ * An *uncommitted* placeholder is left alone: it is a batch being acquired right now, or a commit
69
+ * failure {@link acquireSpikeLocks} already rolled back.
70
+ *
71
+ * Deletions land as one pathspec-scoped commit, pushed best-effort like the acquisition.
72
+ * Resolves the released tickets' filenames. Never throws.
73
+ */
74
+ export declare function releaseStaleSpikeLocks(cwd: string, deps?: SpikeLockDeps): Promise<string[]>;
75
+ //# sourceMappingURL=spike-locks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spike-locks.d.ts","sourceRoot":"","sources":["../src/spike-locks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAG5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAgBnD,0FAA0F;AAC1F,eAAO,MAAM,iBAAiB,aAAa,CAAA;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAqB,CAAA;AAErD,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,qCAAqC;AACrC,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,uFAAuF;AACvF,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,oDAAoD;IACpD,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,mFAAmF;IACnF,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACxC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxC,uFAAuF;IACvF,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACzC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACvE,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qBAAqB;IACrB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAmCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,SAAS,eAAe,EAAE,EACvC,IAAI,GAAE,aAAkB,GACvB,OAAO,CAAC,eAAe,EAAE,CAAC,CAqC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAyDrG"}
@@ -0,0 +1,208 @@
1
+ import { readdir, readFile, rm, writeFile } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { nodeGitRunner } from './project.js';
4
+ import { cachedOpenPrFilePatches } from './dashboard/gh.js';
5
+ import { TICKETS_DIR } from './tickets.js';
6
+ // The PENDING lock for concurrent spike agents (#1327).
7
+ //
8
+ // A batch of Spike & plan agents must not double-work a ticket, and the guard cannot be the
9
+ // daemon's memory: a hands-off web run's local process ends at the hand-off (#1253), another
10
+ // machine's daemon never shared this one's memory at all, and the #1313 PR-diff claims only start
11
+ // once a PR exists. So the claim is made where every agent already looks — the ticket's own
12
+ // sibling files. Before an agent starts, its `.spike.md` and `.plan.md` are created as
13
+ // placeholders reading `PENDING:<AGENT_ID>`, committed in one batch and pushed to the default
14
+ // branch. A file that exists is a spike the stock prompt skips, so the lock needs no cooperation
15
+ // from anyone who has not heard of it.
16
+ //
17
+ // The daemon writes and pushes the locks, never the agent (#1320): a cloud session has no push
18
+ // access, and a lock that only existed inside the run it protects would protect nothing.
19
+ /** The first line of a placeholder sibling: the claim, naming the agent that holds it. */
20
+ export const SPIKE_LOCK_PREFIX = 'PENDING:';
21
+ /**
22
+ * How old a PENDING lock must be before it is presumed dead and released. Generous against the
23
+ * slowest live path — spiking and planning can take hours, on top of a cloud queue — because a
24
+ * lock released under a live agent re-opens the double-work window the lock exists to close,
25
+ * while a dead agent's ticket only waits one interval longer. This is a bug-recovery mechanism
26
+ * that ideally never fires (#1364 review), so erring long costs nearly nothing.
27
+ */
28
+ export const SPIKE_LOCK_STALE_MS = 6 * 60 * 60 * 1000;
29
+ /** Whether a sibling's content is a PENDING placeholder rather than a real spike or plan. */
30
+ export function isSpikeLock(md) {
31
+ return md.trimStart().startsWith(SPIKE_LOCK_PREFIX);
32
+ }
33
+ /** What a lock file holds: the claim line and nothing else, so the check above stays trivial. */
34
+ export function spikeLockContent(agentId) {
35
+ return `${SPIKE_LOCK_PREFIX}${agentId}\n`;
36
+ }
37
+ /** The commit a batch of locks lands as. Names the count so the history reads as what happened. */
38
+ export function lockMessage(count) {
39
+ return `[The Framework] lock ${count} ticket${count === 1 ? '' : 's'} for concurrent spike agents`;
40
+ }
41
+ /** The commit a release lands as. */
42
+ export function releaseMessage(count) {
43
+ return `[The Framework] release ${count} stale spike lock${count === 1 ? '' : 's'}`;
44
+ }
45
+ const defaultPrTouches = async (cwd, file) => {
46
+ const { value } = await cachedOpenPrFilePatches(cwd, file);
47
+ return value === undefined ? undefined : value.length > 0;
48
+ };
49
+ /**
50
+ * Push the just-made lock commit to origin's default branch — the branch other machines fork
51
+ * from, the only place a lock closes the cross-machine window (#1320, #1364 review). Pushed only
52
+ * when the checkout is *on* that branch: `HEAD:main` from anywhere else would carry the branch's
53
+ * own commits onto main, and the old `HEAD:<current branch>` published whatever branch the
54
+ * checkout happened to be on. Resolves false when the push was skipped for that reason; a failed
55
+ * push still throws, so each caller keeps its own log line.
56
+ */
57
+ async function pushLockCommit(git, cwd) {
58
+ const current = (await git(['rev-parse', '--abbrev-ref', 'HEAD'], cwd)).trim();
59
+ // `origin/main` in almost every checkout; asked rather than assumed, with the assumption as
60
+ // the fallback for a clone whose origin/HEAD was never set.
61
+ const head = await git(['symbolic-ref', '--short', 'refs/remotes/origin/HEAD'], cwd).then(out => out.trim(), () => 'origin/main');
62
+ const target = head.replace(/^origin\//, '');
63
+ if (current !== target)
64
+ return false;
65
+ await git(['push', 'origin', `HEAD:${target}`], cwd);
66
+ return true;
67
+ }
68
+ /** A ticket filename's lock paths, relative to the repo root. */
69
+ function lockPaths(ticket) {
70
+ const stem = ticket.replace(/\.md$/, '');
71
+ return {
72
+ spike: `${TICKETS_DIR}/${stem}.spike.md`,
73
+ plan: `${TICKETS_DIR}/${stem}.plan.md`,
74
+ };
75
+ }
76
+ /**
77
+ * Claim `assignments`' tickets for their agents: write both placeholder siblings per ticket,
78
+ * commit the whole batch in one pathspec-scoped commit, and push it to origin's default branch
79
+ * ({@link pushLockCommit}). Resolves the subset actually locked — a ticket whose sibling appeared since the candidates
80
+ * were enumerated is skipped, not overwritten: an existing file is someone's claim or someone's
81
+ * work, and either outranks this batch.
82
+ *
83
+ * A batch whose commit failed is rolled back (the written files removed) and resolves `[]`:
84
+ * uncommitted placeholders in the user's checkout would be noise git blames on nobody. A batch
85
+ * whose *push* failed is kept and resolved as locked — the commit still guards every run forked
86
+ * from this checkout, which is the common case, and the sweep should not stand a healthy local
87
+ * fan-out down over a network blip. The push is what closes the cross-machine window (#1320), so
88
+ * its failure is logged rather than swallowed.
89
+ *
90
+ * Never throws: this runs on a background tick with nothing to catch it.
91
+ */
92
+ export async function acquireSpikeLocks(cwd, assignments, deps = {}) {
93
+ const git = deps.git ?? nodeGitRunner();
94
+ const write = deps.write ?? ((path, content) => writeFile(path, content, 'utf8'));
95
+ const read = deps.read ?? (path => readFile(path, 'utf8'));
96
+ const remove = deps.remove ?? (path => rm(path));
97
+ const log = deps.log ?? (() => { });
98
+ const locked = [];
99
+ const files = [];
100
+ try {
101
+ for (const assignment of assignments) {
102
+ const { spike, plan } = lockPaths(assignment.ticket);
103
+ // Existence via a read, so one seam serves both operations. Either sibling present — real
104
+ // or placeholder — means the ticket is not this batch's to claim.
105
+ const taken = await Promise.all([read(join(cwd, spike)).then(() => true, () => false), read(join(cwd, plan)).then(() => true, () => false)]);
106
+ if (taken.some(Boolean))
107
+ continue;
108
+ await write(join(cwd, spike), spikeLockContent(assignment.agentId));
109
+ await write(join(cwd, plan), spikeLockContent(assignment.agentId));
110
+ locked.push(assignment);
111
+ files.push(spike, plan);
112
+ }
113
+ if (!locked.length)
114
+ return [];
115
+ await git(['add', '--', ...files], cwd);
116
+ await git(['commit', '-m', lockMessage(locked.length), '--', ...files], cwd);
117
+ }
118
+ catch {
119
+ // The claim is the *commit*: files that never reached one claim nothing, so they are removed
120
+ // rather than left as uncommitted noise, and the sweep falls back to a single unpinned agent.
121
+ await Promise.all(files.map(file => remove(join(cwd, file)).catch(() => undefined)));
122
+ return [];
123
+ }
124
+ try {
125
+ if (!(await pushLockCommit(git, cwd)))
126
+ log(`[framework] spike locks: the checkout is not on the default branch, so the lock commit was not pushed — agents on other machines cannot see these ${locked.length} claim(s)`);
127
+ }
128
+ catch {
129
+ log(`[framework] spike locks: the lock commit could not be pushed, so agents on other machines cannot see these ${locked.length} claim(s)`);
130
+ }
131
+ return locked;
132
+ }
133
+ /**
134
+ * Release the PENDING locks whose agents are presumed dead, so a crashed spike does not brick its
135
+ * ticket forever. A lock is stale exactly when all three hold (#1327's rule): its content is still
136
+ * the placeholder, no open PR touches it (a finished agent's PR carries the real sibling — the
137
+ * #1313 claim takes over from here), and its last commit is older than {@link SPIKE_LOCK_STALE_MS}.
138
+ * An *uncommitted* placeholder is left alone: it is a batch being acquired right now, or a commit
139
+ * failure {@link acquireSpikeLocks} already rolled back.
140
+ *
141
+ * Deletions land as one pathspec-scoped commit, pushed best-effort like the acquisition.
142
+ * Resolves the released tickets' filenames. Never throws.
143
+ */
144
+ export async function releaseStaleSpikeLocks(cwd, deps = {}) {
145
+ const git = deps.git ?? nodeGitRunner();
146
+ const read = deps.read ?? (path => readFile(path, 'utf8'));
147
+ const remove = deps.remove ?? (path => rm(path));
148
+ const list = deps.list ?? (dir => readdir(dir));
149
+ const prTouches = deps.prTouches ?? defaultPrTouches;
150
+ const now = deps.now ?? (() => Date.now());
151
+ const staleMs = deps.staleMs ?? SPIKE_LOCK_STALE_MS;
152
+ const log = deps.log ?? (() => { });
153
+ try {
154
+ const names = await list(join(cwd, TICKETS_DIR)).catch(() => []);
155
+ const released = [];
156
+ const files = [];
157
+ for (const name of names) {
158
+ if (!/\.spike\.md$/.test(name))
159
+ continue;
160
+ const ticket = `${name.replace(/\.spike\.md$/, '')}.md`;
161
+ const { spike, plan } = lockPaths(ticket);
162
+ const [spikeMd, planMd] = await Promise.all([
163
+ read(join(cwd, spike)).catch(() => undefined),
164
+ read(join(cwd, plan)).catch(() => undefined),
165
+ ]);
166
+ const pending = [
167
+ ...(spikeMd !== undefined && isSpikeLock(spikeMd) ? [spike] : []),
168
+ ...(planMd !== undefined && isSpikeLock(planMd) ? [plan] : []),
169
+ ];
170
+ if (!pending.length)
171
+ continue;
172
+ // The newest lock commit is the claim's age. An empty answer is an uncommitted placeholder:
173
+ // a batch mid-acquisition, which is the opposite of stale.
174
+ const stamps = await Promise.all(pending.map(file => git(['log', '-1', '--format=%ct', '--', file], cwd).then(out => out.trim(), () => '')));
175
+ if (stamps.some(stamp => !stamp))
176
+ continue;
177
+ const newest = Math.max(...stamps.map(stamp => Number(stamp) * 1000));
178
+ if (!Number.isFinite(newest) || now() - newest < staleMs)
179
+ continue;
180
+ // Asked last because it is the expensive read, and only about the pending files: a stem
181
+ // whose real spike rode in on a PR while the plan stayed PENDING keeps the plan too.
182
+ const touched = await Promise.all(pending.map(file => prTouches(cwd, file)));
183
+ if (touched.some(t => t !== false))
184
+ continue;
185
+ for (const file of pending)
186
+ await remove(join(cwd, file));
187
+ files.push(...pending);
188
+ released.push(ticket);
189
+ }
190
+ if (!released.length)
191
+ return [];
192
+ await git(['add', '--', ...files], cwd);
193
+ await git(['commit', '-m', releaseMessage(files.length), '--', ...files], cwd);
194
+ try {
195
+ if (!(await pushLockCommit(git, cwd)))
196
+ log(`[framework] spike locks: the checkout is not on the default branch, so the release commit was not pushed`);
197
+ }
198
+ catch {
199
+ log(`[framework] spike locks: the release commit could not be pushed`);
200
+ }
201
+ log(`[framework] spike locks: released ${released.length} stale lock(s): ${released.join(', ')}`);
202
+ return released;
203
+ }
204
+ catch {
205
+ return [];
206
+ }
207
+ }
208
+ //# sourceMappingURL=spike-locks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spike-locks.js","sourceRoot":"","sources":["../src/spike-locks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAkB,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAG1C,wDAAwD;AACxD,EAAE;AACF,4FAA4F;AAC5F,6FAA6F;AAC7F,kGAAkG;AAClG,4FAA4F;AAC5F,uFAAuF;AACvF,8FAA8F;AAC9F,iGAAiG;AACjG,uCAAuC;AACvC,EAAE;AACF,+FAA+F;AAC/F,yFAAyF;AAEzF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAA;AAE3C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAG,EA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CAAC,CAAC,CAAC,CAAA;YAC5E,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC;gBAAE,SAAQ;YAC5C,KAAK,MAAM,IAAI,IAAI,OAAO;gBAAE,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;YACzD,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAA;YACtB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvB,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,EAAE,CAAA;QAC/B,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAA;QACvC,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAA;QAC9E,IAAI,CAAC;YACH,IAAI,CAAC,CAAC,MAAM,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBACnC,GAAG,CAAC,0GAA0G,CAAC,CAAA;QACnH,CAAC;QAAC,MAAM,CAAC;YACP,GAAG,CAAC,iEAAiE,CAAC,CAAA;QACxE,CAAC;QACD,GAAG,CAAC,qCAAqC,QAAQ,CAAC,MAAM,mBAAmB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACjG,OAAO,QAAQ,CAAA;IACjB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type GitRunner } from './project.js';
2
+ import { type LinkedPr } from './dashboard/gh.js';
3
+ /** What became of one pinned branch: gone already, genuinely busy, unprovable, or released. */
4
+ export type StaleBranchOutcome = 'absent' | 'pending' | 'unproven' | 'released';
5
+ /** Injectable seams so the release is unit-testable off disk and off GitHub. */
6
+ export interface StaleBranchDeps {
7
+ git?: GitRunner;
8
+ /** The branch's full PR history (default {@link ghPrsForBranch}). */
9
+ prs?: (cwd: string, branch: string) => Promise<LinkedPr[]>;
10
+ }
11
+ /**
12
+ * Delete a pinned routine branch whose PR is closed or merged, so the next firing proceeds.
13
+ *
14
+ * Deliberately conservative on the two unprovable cases: an open PR keeps the branch (that is a
15
+ * triage genuinely pending), and a branch with no PR history at all keeps it too — that is either
16
+ * an agent still working toward its handoff or a `gh` that could not answer, and deleting on a
17
+ * hiccup would discard work. Never throws: a release that could not happen leaves the routine
18
+ * exactly as jammed as it was, which the next tick retries.
19
+ */
20
+ export declare function releaseStalePinnedBranch(cwd: string, branch: string, deps?: StaleBranchDeps): Promise<StaleBranchOutcome>;
21
+ //# sourceMappingURL=stale-branch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stale-branch.d.ts","sourceRoot":"","sources":["../src/stale-branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAsBjE,+FAA+F;AAC/F,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;AAE/E,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,qEAAqE;IACrE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;CAC3D;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAuB7B"}
@@ -0,0 +1,32 @@
1
+ import { nodeGitRunner } from './project.js';
2
+ import { ghPrsForBranch } from './dashboard/gh.js';
3
+ /**
4
+ * Delete a pinned routine branch whose PR is closed or merged, so the next firing proceeds.
5
+ *
6
+ * Deliberately conservative on the two unprovable cases: an open PR keeps the branch (that is a
7
+ * triage genuinely pending), and a branch with no PR history at all keeps it too — that is either
8
+ * an agent still working toward its handoff or a `gh` that could not answer, and deleting on a
9
+ * hiccup would discard work. Never throws: a release that could not happen leaves the routine
10
+ * exactly as jammed as it was, which the next tick retries.
11
+ */
12
+ export async function releaseStalePinnedBranch(cwd, branch, deps = {}) {
13
+ const git = deps.git ?? nodeGitRunner();
14
+ const prs = deps.prs ?? ghPrsForBranch;
15
+ const local = await git(['show-ref', '--verify', `refs/heads/${branch}`], cwd).then(() => true, () => false);
16
+ const remote = await git(['ls-remote', '--heads', 'origin', branch], cwd).then(out => out.trim() !== '', () => false);
17
+ if (!local && !remote)
18
+ return 'absent';
19
+ const history = await prs(cwd, branch).catch(() => []);
20
+ if (history.some(pr => pr.state === 'OPEN'))
21
+ return 'pending';
22
+ if (history.length === 0)
23
+ return 'unproven';
24
+ if (remote)
25
+ await git(['push', 'origin', '--delete', branch], cwd).catch(() => undefined);
26
+ // -D, not -d: a squash merge leaves the branch unmerged in git's eyes. And git refusing because
27
+ // a worktree still has the branch checked out is the in-flight guard working, not a failure.
28
+ if (local)
29
+ await git(['branch', '-D', branch], cwd).catch(() => undefined);
30
+ return 'released';
31
+ }
32
+ //# sourceMappingURL=stale-branch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stale-branch.js","sourceRoot":"","sources":["../src/stale-branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAiB,MAAM,mBAAmB,CAAA;AAgCjE;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,GAAW,EACX,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AE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IAC1E,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The opening prompt of a build session (`prompts/extend_prompt.md`): the work is delivered
3
+ * within the existing codebase (#185) — a project is a repo that already exists, so the old
4
+ * greenfield/scaffold framings are gone (#1683 review). The text lives in `prompts/` like every
5
+ * other agent-facing prompt (#551/#1347); this only fills the user's intent, under the same
6
+ * `tf.prompt` name the system prompt uses.
7
+ */
8
+ export declare function extendPrompt(intent: string): string;
9
+ //# sourceMappingURL=steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../src/steps.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD"}