@wjarka/cezarion 0.17.0-dev.5680 → 0.17.0-dev.5736

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 (1903) hide show
  1. package/bin.js +2 -0
  2. package/cez.js +2 -0
  3. package/cezarion.js +2 -0
  4. package/dist/cez.js +1 -2
  5. package/dist/cezarion.js +1 -2
  6. package/dist/hsq.js +1 -2
  7. package/dist/index.js +1 -121
  8. package/dist/server/app-type.d.ts +1 -6
  9. package/dist/server/app-type.js +1 -2
  10. package/hsq.js +2 -0
  11. package/package.json +18 -64
  12. package/web/dist/assets/{activity-motion-CtVYvdRc.js → activity-motion-hhx0e841.js} +1 -1
  13. package/web/dist/assets/{activity-route-BEZr6b9Y.js → activity-route-De0BnSrc.js} +1 -1
  14. package/web/dist/assets/{agent-accounts-Ce9Q2wTj.js → agent-accounts-BCg-578Q.js} +1 -1
  15. package/web/dist/assets/{alert-dialog-BJlarNJS.js → alert-dialog-Dj464rjk.js} +1 -1
  16. package/web/dist/assets/{button-DRCTAIzF.js → button-CHUAMTHK.js} +1 -1
  17. package/web/dist/assets/{centered-state-xPENgUmo.js → centered-state-DGyy0SuA.js} +1 -1
  18. package/web/dist/assets/{commit-diff-panel-B30oa25e.js → commit-diff-panel-DYtYc_dH.js} +1 -1
  19. package/web/dist/assets/{control-locations-Cv_zRDaS.js → control-locations-CA9TMupq.js} +1 -1
  20. package/web/dist/assets/{diff-controls-DGsiUDJ0.js → diff-controls-BR2uqhwG.js} +1 -1
  21. package/web/dist/assets/{diff-CpkTjlLm.js → diff-tVGVhYyc.js} +2 -2
  22. package/web/dist/assets/{diff-view-Bf7YEIF1.js → diff-view-CNM3u77o.js} +1 -1
  23. package/web/dist/assets/{dropdown-menu-C2_BT6YH.js → dropdown-menu-DhrBcVgr.js} +1 -1
  24. package/web/dist/assets/{es2015-Ba_E31c-.js → es2015-D345RR4o.js} +1 -1
  25. package/web/dist/assets/{file-preview-Bdw0qHJB.js → file-preview-C1eTdJLJ.js} +1 -1
  26. package/web/dist/assets/{git-toolbar-DJi8-Bfp.js → git-toolbar-Dwz8p8GW.js} +1 -1
  27. package/web/dist/assets/{github-DPa3UFus.js → github-BSezqH6f.js} +1 -1
  28. package/web/dist/assets/{github-sidebar-model-DcgyXEtm.js → github-sidebar-model-Ct0DltOv.js} +1 -1
  29. package/web/dist/assets/{global-activity-route-CijiH9Gc.js → global-activity-route-BZiYz-B0.js} +1 -1
  30. package/web/dist/assets/{image-preview-Dawt8eiK.js → image-preview-Cq1vDiEo.js} +1 -1
  31. package/web/dist/assets/{index-BDNQ4NIe.js → index-D489J7QW.js} +5 -5
  32. package/web/dist/assets/{live-refetch-XCxoSAGq.js → live-refetch-C0kQc3-z.js} +1 -1
  33. package/web/dist/assets/{markdown-BiGKaTG5.js → markdown-D7DUNWcJ.js} +1 -1
  34. package/web/dist/assets/{nav-row-styles-rWMZ9e0U.js → nav-row-styles-BZUUavOF.js} +1 -1
  35. package/web/dist/assets/{popover-CiVpqps-.js → popover-DRcRI46x.js} +1 -1
  36. package/web/dist/assets/{preview-pane-connected-DJ3e7KtI.js → preview-pane-connected-DGkEs_L3.js} +1 -1
  37. package/web/dist/assets/{project-router-DudcMzJa.js → project-router-1m_VlC22.js} +1 -1
  38. package/web/dist/assets/{project-scope-context-DDZVS0W-.js → project-scope-context-CaUqlAd7.js} +1 -1
  39. package/web/dist/assets/{queries-C6in05vw.js → queries-DYfIpJ-d.js} +1 -1
  40. package/web/dist/assets/{repo-git-DwFyXJVP.js → repo-git-CU1S5P-y.js} +1 -1
  41. package/web/dist/assets/{report-reader-DiG_FZRc.js → report-reader-DlZol2Ux.js} +1 -1
  42. package/web/dist/assets/{reports-CDhnbSD0.js → reports-DIGGjk7C.js} +1 -1
  43. package/web/dist/assets/{run-header-DGWkKFX-.js → run-header-DPjiPKRe.js} +1 -1
  44. package/web/dist/assets/{skills-BvfGIWap.js → skills-BMwanop_.js} +1 -1
  45. package/web/dist/assets/{tab-link-ACcEPANz.js → tab-link-DCUifQ46.js} +1 -1
  46. package/web/dist/assets/{task-changes-Duy_yoTa.js → task-changes-BZXWvQN3.js} +1 -1
  47. package/web/dist/assets/{task-commits-DsZjecLb.js → task-commits-ByI9MSfc.js} +1 -1
  48. package/web/dist/assets/{task-files-WSwRMISh.js → task-files-LJbenpiH.js} +1 -1
  49. package/web/dist/assets/{task-github-item-B89c4yDz.js → task-github-item-B0CU9lGR.js} +1 -1
  50. package/web/dist/assets/{task-thread-BMa8FQJC.js → task-thread-CXCN__1a.js} +1 -1
  51. package/web/dist/assets/{textarea-ffrAeHUi.js → textarea-DlVUfdWG.js} +1 -1
  52. package/web/dist/assets/{thread-state-D_1f2_nG.js → thread-state-BLaCzqeX.js} +1 -1
  53. package/web/dist/assets/{toaster-Dk0xOpec.js → toaster-B1MyeHiE.js} +1 -1
  54. package/web/dist/assets/{use-hand-to-agent-state-eVuuwFpt.js → use-hand-to-agent-state-BkmKad8x.js} +1 -1
  55. package/web/dist/assets/{useInfiniteQuery-DpLjNcbu.js → useInfiniteQuery-qEY8OhKb.js} +1 -1
  56. package/web/dist/assets/useQuery-DOJQOEBO.js +1 -0
  57. package/web/dist/assets/{workflows-iby-hm0Z.js → workflows-Dbxb-d-6.js} +1 -1
  58. package/web/dist/assets/{ws-DKkrIJ6v.js → ws-DvGmrP4z.js} +1 -1
  59. package/web/dist/assets/{zoomable-image-DJmOaz4D.js → zoomable-image-5pOUaPEg.js} +1 -1
  60. package/web/dist/index.html +22 -22
  61. package/LICENSE +0 -22
  62. package/README.md +0 -1832
  63. package/dist/activity/demand.d.ts +0 -21
  64. package/dist/activity/demand.js +0 -49
  65. package/dist/activity/demand.js.map +0 -1
  66. package/dist/activity/publisher.d.ts +0 -48
  67. package/dist/activity/publisher.js +0 -175
  68. package/dist/activity/publisher.js.map +0 -1
  69. package/dist/activity/read-model.d.ts +0 -50
  70. package/dist/activity/read-model.js +0 -142
  71. package/dist/activity/read-model.js.map +0 -1
  72. package/dist/activity/requests.d.ts +0 -27
  73. package/dist/activity/requests.js +0 -81
  74. package/dist/activity/requests.js.map +0 -1
  75. package/dist/activity/text.d.ts +0 -4
  76. package/dist/activity/text.js +0 -13
  77. package/dist/activity/text.js.map +0 -1
  78. package/dist/activity/tool-activity.d.ts +0 -87
  79. package/dist/activity/tool-activity.js +0 -250
  80. package/dist/activity/tool-activity.js.map +0 -1
  81. package/dist/activity/wait.d.ts +0 -19
  82. package/dist/activity/wait.js +0 -91
  83. package/dist/activity/wait.js.map +0 -1
  84. package/dist/agent-config/account-identity.d.ts +0 -28
  85. package/dist/agent-config/account-identity.js +0 -132
  86. package/dist/agent-config/account-identity.js.map +0 -1
  87. package/dist/agent-config/catalog.d.ts +0 -70
  88. package/dist/agent-config/catalog.js +0 -384
  89. package/dist/agent-config/catalog.js.map +0 -1
  90. package/dist/agent-config/files.d.ts +0 -42
  91. package/dist/agent-config/files.js +0 -115
  92. package/dist/agent-config/files.js.map +0 -1
  93. package/dist/agent-config/model-settings/claude.d.ts +0 -2
  94. package/dist/agent-config/model-settings/claude.js +0 -11
  95. package/dist/agent-config/model-settings/claude.js.map +0 -1
  96. package/dist/agent-config/model-settings/codex.d.ts +0 -2
  97. package/dist/agent-config/model-settings/codex.js +0 -16
  98. package/dist/agent-config/model-settings/codex.js.map +0 -1
  99. package/dist/agent-config/model-settings/opencode.d.ts +0 -2
  100. package/dist/agent-config/model-settings/opencode.js +0 -8
  101. package/dist/agent-config/model-settings/opencode.js.map +0 -1
  102. package/dist/agent-config/model-settings/pi.d.ts +0 -2
  103. package/dist/agent-config/model-settings/pi.js +0 -38
  104. package/dist/agent-config/model-settings/pi.js.map +0 -1
  105. package/dist/agent-config/model-settings/shared.d.ts +0 -12
  106. package/dist/agent-config/model-settings/shared.js +0 -100
  107. package/dist/agent-config/model-settings/shared.js.map +0 -1
  108. package/dist/agent-config/model-settings/types.d.ts +0 -9
  109. package/dist/agent-config/model-settings/types.js +0 -2
  110. package/dist/agent-config/model-settings/types.js.map +0 -1
  111. package/dist/agent-config/models.d.ts +0 -9
  112. package/dist/agent-config/models.js +0 -40
  113. package/dist/agent-config/models.js.map +0 -1
  114. package/dist/agent-config/seed.d.ts +0 -15
  115. package/dist/agent-config/seed.js +0 -94
  116. package/dist/agent-config/seed.js.map +0 -1
  117. package/dist/agent-config/service.d.ts +0 -44
  118. package/dist/agent-config/service.js +0 -73
  119. package/dist/agent-config/service.js.map +0 -1
  120. package/dist/agent-config/validate.d.ts +0 -18
  121. package/dist/agent-config/validate.js +0 -82
  122. package/dist/agent-config/validate.js.map +0 -1
  123. package/dist/application-update/bin-recovery.d.ts +0 -5
  124. package/dist/application-update/bin-recovery.js +0 -96
  125. package/dist/application-update/bin-recovery.js.map +0 -1
  126. package/dist/application-update/discovery.d.ts +0 -23
  127. package/dist/application-update/discovery.js +0 -131
  128. package/dist/application-update/discovery.js.map +0 -1
  129. package/dist/application-update/helper.d.ts +0 -58
  130. package/dist/application-update/helper.js +0 -363
  131. package/dist/application-update/helper.js.map +0 -1
  132. package/dist/application-update/launcher.d.ts +0 -12
  133. package/dist/application-update/launcher.js +0 -61
  134. package/dist/application-update/launcher.js.map +0 -1
  135. package/dist/application-update/lock.d.ts +0 -4
  136. package/dist/application-update/lock.js +0 -70
  137. package/dist/application-update/lock.js.map +0 -1
  138. package/dist/application-update/npm-process.d.ts +0 -17
  139. package/dist/application-update/npm-process.js +0 -156
  140. package/dist/application-update/npm-process.js.map +0 -1
  141. package/dist/application-update/runtime-layout.d.ts +0 -20
  142. package/dist/application-update/runtime-layout.js +0 -91
  143. package/dist/application-update/runtime-layout.js.map +0 -1
  144. package/dist/application-update/scoped-recovery.d.ts +0 -32
  145. package/dist/application-update/scoped-recovery.js +0 -210
  146. package/dist/application-update/scoped-recovery.js.map +0 -1
  147. package/dist/application-update/service.d.ts +0 -86
  148. package/dist/application-update/service.js +0 -523
  149. package/dist/application-update/service.js.map +0 -1
  150. package/dist/archive-on-merge-setting.d.ts +0 -15
  151. package/dist/archive-on-merge-setting.js +0 -15
  152. package/dist/archive-on-merge-setting.js.map +0 -1
  153. package/dist/artifacts/cli.d.ts +0 -1
  154. package/dist/artifacts/cli.js +0 -54
  155. package/dist/artifacts/cli.js.map +0 -1
  156. package/dist/artifacts/lifecycle.d.ts +0 -4
  157. package/dist/artifacts/lifecycle.js +0 -42
  158. package/dist/artifacts/lifecycle.js.map +0 -1
  159. package/dist/artifacts/reports-index.d.ts +0 -46
  160. package/dist/artifacts/reports-index.js +0 -278
  161. package/dist/artifacts/reports-index.js.map +0 -1
  162. package/dist/artifacts/reports-watch.d.ts +0 -43
  163. package/dist/artifacts/reports-watch.js +0 -128
  164. package/dist/artifacts/reports-watch.js.map +0 -1
  165. package/dist/artifacts/resolve.d.ts +0 -18
  166. package/dist/artifacts/resolve.js +0 -128
  167. package/dist/artifacts/resolve.js.map +0 -1
  168. package/dist/artifacts/store.d.ts +0 -40
  169. package/dist/artifacts/store.js +0 -513
  170. package/dist/artifacts/store.js.map +0 -1
  171. package/dist/automations/automation-cli.d.ts +0 -61
  172. package/dist/automations/automation-cli.js +0 -519
  173. package/dist/automations/automation-cli.js.map +0 -1
  174. package/dist/automations/builtin-skill.d.ts +0 -7
  175. package/dist/automations/builtin-skill.js +0 -14
  176. package/dist/automations/builtin-skill.js.map +0 -1
  177. package/dist/automations/coordinator.d.ts +0 -53
  178. package/dist/automations/coordinator.js +0 -135
  179. package/dist/automations/coordinator.js.map +0 -1
  180. package/dist/automations/github-baseline.d.ts +0 -3
  181. package/dist/automations/github-baseline.js +0 -17
  182. package/dist/automations/github-baseline.js.map +0 -1
  183. package/dist/automations/github-poller.d.ts +0 -93
  184. package/dist/automations/github-poller.js +0 -303
  185. package/dist/automations/github-poller.js.map +0 -1
  186. package/dist/automations/project-files.d.ts +0 -6
  187. package/dist/automations/project-files.js +0 -43
  188. package/dist/automations/project-files.js.map +0 -1
  189. package/dist/automations/prompts.d.ts +0 -12
  190. package/dist/automations/prompts.js +0 -162
  191. package/dist/automations/prompts.js.map +0 -1
  192. package/dist/automations/schedule-runner.d.ts +0 -153
  193. package/dist/automations/schedule-runner.js +0 -529
  194. package/dist/automations/schedule-runner.js.map +0 -1
  195. package/dist/automations/scheduler.d.ts +0 -95
  196. package/dist/automations/scheduler.js +0 -462
  197. package/dist/automations/scheduler.js.map +0 -1
  198. package/dist/automations/service.d.ts +0 -793
  199. package/dist/automations/service.js +0 -444
  200. package/dist/automations/service.js.map +0 -1
  201. package/dist/automations/store.d.ts +0 -168
  202. package/dist/automations/store.js +0 -805
  203. package/dist/automations/store.js.map +0 -1
  204. package/dist/automations/task-template.d.ts +0 -59
  205. package/dist/automations/task-template.js +0 -285
  206. package/dist/automations/task-template.js.map +0 -1
  207. package/dist/automations/tool-adapter.d.ts +0 -6
  208. package/dist/automations/tool-adapter.js +0 -115
  209. package/dist/automations/tool-adapter.js.map +0 -1
  210. package/dist/automations/types.d.ts +0 -1
  211. package/dist/automations/types.js +0 -2
  212. package/dist/automations/types.js.map +0 -1
  213. package/dist/autosave-cleanup.d.ts +0 -26
  214. package/dist/autosave-cleanup.js +0 -87
  215. package/dist/autosave-cleanup.js.map +0 -1
  216. package/dist/autosave-git.d.ts +0 -23
  217. package/dist/autosave-git.js +0 -210
  218. package/dist/autosave-git.js.map +0 -1
  219. package/dist/autosave-group.d.ts +0 -8
  220. package/dist/autosave-group.js +0 -61
  221. package/dist/autosave-group.js.map +0 -1
  222. package/dist/autosave-holders.d.ts +0 -34
  223. package/dist/autosave-holders.js +0 -228
  224. package/dist/autosave-holders.js.map +0 -1
  225. package/dist/autosave-windows.d.ts +0 -25
  226. package/dist/autosave-windows.js +0 -169
  227. package/dist/autosave-windows.js.map +0 -1
  228. package/dist/cez.d.ts +0 -2
  229. package/dist/cez.js.map +0 -1
  230. package/dist/cezarion.d.ts +0 -2
  231. package/dist/cezarion.js.map +0 -1
  232. package/dist/ci-wait/client.d.ts +0 -28
  233. package/dist/ci-wait/client.js +0 -123
  234. package/dist/ci-wait/client.js.map +0 -1
  235. package/dist/ci-wait/controller.d.ts +0 -824
  236. package/dist/ci-wait/controller.js +0 -305
  237. package/dist/ci-wait/controller.js.map +0 -1
  238. package/dist/ci-wait/errors.d.ts +0 -35
  239. package/dist/ci-wait/errors.js +0 -273
  240. package/dist/ci-wait/errors.js.map +0 -1
  241. package/dist/ci-wait/github.d.ts +0 -105
  242. package/dist/ci-wait/github.js +0 -324
  243. package/dist/ci-wait/github.js.map +0 -1
  244. package/dist/ci-wait/injection.d.ts +0 -3
  245. package/dist/ci-wait/injection.js +0 -13
  246. package/dist/ci-wait/injection.js.map +0 -1
  247. package/dist/ci-wait/mcp.d.ts +0 -3
  248. package/dist/ci-wait/mcp.js +0 -30
  249. package/dist/ci-wait/mcp.js.map +0 -1
  250. package/dist/ci-wait/merge-progress.d.ts +0 -84
  251. package/dist/ci-wait/merge-progress.js +0 -50
  252. package/dist/ci-wait/merge-progress.js.map +0 -1
  253. package/dist/ci-wait/progress.d.ts +0 -56
  254. package/dist/ci-wait/progress.js +0 -100
  255. package/dist/ci-wait/progress.js.map +0 -1
  256. package/dist/ci-wait/resources.d.ts +0 -9
  257. package/dist/ci-wait/resources.js +0 -45
  258. package/dist/ci-wait/resources.js.map +0 -1
  259. package/dist/ci-wait/supervisor.d.ts +0 -47
  260. package/dist/ci-wait/supervisor.js +0 -334
  261. package/dist/ci-wait/supervisor.js.map +0 -1
  262. package/dist/ci-wait/text.d.ts +0 -2
  263. package/dist/ci-wait/text.js +0 -5
  264. package/dist/ci-wait/text.js.map +0 -1
  265. package/dist/ci-wait/tools.d.ts +0 -845
  266. package/dist/ci-wait/tools.js +0 -232
  267. package/dist/ci-wait/tools.js.map +0 -1
  268. package/dist/cli-dispatch.d.ts +0 -33
  269. package/dist/cli-dispatch.js +0 -235
  270. package/dist/cli-dispatch.js.map +0 -1
  271. package/dist/config.d.ts +0 -117
  272. package/dist/config.js +0 -341
  273. package/dist/config.js.map +0 -1
  274. package/dist/contract/active-provider.d.ts +0 -12
  275. package/dist/contract/activity.d.ts +0 -1478
  276. package/dist/contract/agent-config.d.ts +0 -160
  277. package/dist/contract/agent-profiles.d.ts +0 -369
  278. package/dist/contract/application-update.d.ts +0 -32
  279. package/dist/contract/artifacts.d.ts +0 -100
  280. package/dist/contract/ask-schema.d.ts +0 -50
  281. package/dist/contract/ask.d.ts +0 -11
  282. package/dist/contract/attachments.d.ts +0 -35
  283. package/dist/contract/attention.d.ts +0 -99
  284. package/dist/contract/automation-requests.d.ts +0 -314
  285. package/dist/contract/automation-schedule.d.ts +0 -89
  286. package/dist/contract/automation-storage.d.ts +0 -518
  287. package/dist/contract/automations.d.ts +0 -1560
  288. package/dist/contract/ci-wait.d.ts +0 -281
  289. package/dist/contract/config-requests.d.ts +0 -36
  290. package/dist/contract/control-locations.d.ts +0 -10
  291. package/dist/contract/conversations.d.ts +0 -415
  292. package/dist/contract/defined.d.ts +0 -8
  293. package/dist/contract/delegation.d.ts +0 -2168
  294. package/dist/contract/discovery.d.ts +0 -228
  295. package/dist/contract/effort.d.ts +0 -18
  296. package/dist/contract/events.d.ts +0 -324
  297. package/dist/contract/github-requests.d.ts +0 -26
  298. package/dist/contract/github.d.ts +0 -732
  299. package/dist/contract/handoff.d.ts +0 -43
  300. package/dist/contract/health.d.ts +0 -128
  301. package/dist/contract/home-recovery.d.ts +0 -71
  302. package/dist/contract/image-path.d.ts +0 -6
  303. package/dist/contract/index.d.ts +0 -68
  304. package/dist/contract/index.js +0 -6709
  305. package/dist/contract/live-coordination.d.ts +0 -164
  306. package/dist/contract/live-limits.d.ts +0 -8
  307. package/dist/contract/live.d.ts +0 -123
  308. package/dist/contract/pending-ask.d.ts +0 -58
  309. package/dist/contract/per-runner-optional-strings.d.ts +0 -10
  310. package/dist/contract/permissions.d.ts +0 -54
  311. package/dist/contract/preview.d.ts +0 -568
  312. package/dist/contract/project-limits.d.ts +0 -35
  313. package/dist/contract/projects.d.ts +0 -716
  314. package/dist/contract/provider-requests.d.ts +0 -77
  315. package/dist/contract/query-requests.d.ts +0 -52
  316. package/dist/contract/repo-requests.d.ts +0 -12
  317. package/dist/contract/repo.d.ts +0 -515
  318. package/dist/contract/report-title.d.ts +0 -3
  319. package/dist/contract/reports.d.ts +0 -101
  320. package/dist/contract/run-labels.d.ts +0 -8
  321. package/dist/contract/run-limits.d.ts +0 -8
  322. package/dist/contract/run-predicates.d.ts +0 -87
  323. package/dist/contract/run-requests.d.ts +0 -33
  324. package/dist/contract/run-search.d.ts +0 -193
  325. package/dist/contract/runs.d.ts +0 -7108
  326. package/dist/contract/scheduled-tasks.d.ts +0 -188
  327. package/dist/contract/self-update.d.ts +0 -255
  328. package/dist/contract/skill-sources.d.ts +0 -125
  329. package/dist/contract/skills.d.ts +0 -56
  330. package/dist/contract/task-options.d.ts +0 -18
  331. package/dist/contract/team-skill-ref.d.ts +0 -10
  332. package/dist/contract/tool-display.d.ts +0 -25
  333. package/dist/contract/ui-state-requests.d.ts +0 -60
  334. package/dist/contract/version.d.ts +0 -3
  335. package/dist/contract/voice.d.ts +0 -213
  336. package/dist/contract/waits.d.ts +0 -1996
  337. package/dist/contract/workflow-file.d.ts +0 -37
  338. package/dist/contract/workflow-requests.d.ts +0 -7
  339. package/dist/contract/workflows.d.ts +0 -250
  340. package/dist/contract/workspace-events.d.ts +0 -410
  341. package/dist/contract/workspace.d.ts +0 -631
  342. package/dist/contract/zoned-time.d.ts +0 -26
  343. package/dist/core/agent-env.d.ts +0 -34
  344. package/dist/core/agent-env.js +0 -411
  345. package/dist/core/agent-env.js.map +0 -1
  346. package/dist/core/agent-model-policy.d.ts +0 -11
  347. package/dist/core/agent-model-policy.js +0 -38
  348. package/dist/core/agent-model-policy.js.map +0 -1
  349. package/dist/core/agent-profiles.d.ts +0 -50
  350. package/dist/core/agent-profiles.js +0 -105
  351. package/dist/core/agent-profiles.js.map +0 -1
  352. package/dist/core/agent-runner.d.ts +0 -425
  353. package/dist/core/agent-runner.js +0 -98
  354. package/dist/core/agent-runner.js.map +0 -1
  355. package/dist/core/ask.d.ts +0 -26
  356. package/dist/core/ask.js +0 -35
  357. package/dist/core/ask.js.map +0 -1
  358. package/dist/core/backend-detect.d.ts +0 -18
  359. package/dist/core/backend-detect.js +0 -216
  360. package/dist/core/backend-detect.js.map +0 -1
  361. package/dist/core/claude-cli-runner.d.ts +0 -85
  362. package/dist/core/claude-cli-runner.js +0 -899
  363. package/dist/core/claude-cli-runner.js.map +0 -1
  364. package/dist/core/claude-executable.d.ts +0 -2
  365. package/dist/core/claude-executable.js +0 -15
  366. package/dist/core/claude-executable.js.map +0 -1
  367. package/dist/core/claude-model-catalog.d.ts +0 -16
  368. package/dist/core/claude-model-catalog.js +0 -198
  369. package/dist/core/claude-model-catalog.js.map +0 -1
  370. package/dist/core/claude-stream.d.ts +0 -38
  371. package/dist/core/claude-stream.js +0 -77
  372. package/dist/core/claude-stream.js.map +0 -1
  373. package/dist/core/claude-ui-mapper.d.ts +0 -88
  374. package/dist/core/claude-ui-mapper.js +0 -851
  375. package/dist/core/claude-ui-mapper.js.map +0 -1
  376. package/dist/core/codex-app-server-runner.d.ts +0 -76
  377. package/dist/core/codex-app-server-runner.js +0 -1271
  378. package/dist/core/codex-app-server-runner.js.map +0 -1
  379. package/dist/core/codex-app-server-transport.d.ts +0 -52
  380. package/dist/core/codex-app-server-transport.js +0 -200
  381. package/dist/core/codex-app-server-transport.js.map +0 -1
  382. package/dist/core/codex-approvals.d.ts +0 -12
  383. package/dist/core/codex-approvals.js +0 -180
  384. package/dist/core/codex-approvals.js.map +0 -1
  385. package/dist/core/codex-hook-mapper.d.ts +0 -15
  386. package/dist/core/codex-hook-mapper.js +0 -73
  387. package/dist/core/codex-hook-mapper.js.map +0 -1
  388. package/dist/core/codex-model-catalog.d.ts +0 -10
  389. package/dist/core/codex-model-catalog.js +0 -110
  390. package/dist/core/codex-model-catalog.js.map +0 -1
  391. package/dist/core/codex-native-frames.d.ts +0 -35
  392. package/dist/core/codex-native-frames.js +0 -80
  393. package/dist/core/codex-native-frames.js.map +0 -1
  394. package/dist/core/codex-permissions.d.ts +0 -6
  395. package/dist/core/codex-permissions.js +0 -27
  396. package/dist/core/codex-permissions.js.map +0 -1
  397. package/dist/core/codex-stream-error.d.ts +0 -2
  398. package/dist/core/codex-stream-error.js +0 -12
  399. package/dist/core/codex-stream-error.js.map +0 -1
  400. package/dist/core/codex-turn-outcome.d.ts +0 -10
  401. package/dist/core/codex-turn-outcome.js +0 -35
  402. package/dist/core/codex-turn-outcome.js.map +0 -1
  403. package/dist/core/codex-ui-mapper-state.d.ts +0 -84
  404. package/dist/core/codex-ui-mapper-state.js +0 -8
  405. package/dist/core/codex-ui-mapper-state.js.map +0 -1
  406. package/dist/core/codex-ui-mapper.d.ts +0 -44
  407. package/dist/core/codex-ui-mapper.js +0 -799
  408. package/dist/core/codex-ui-mapper.js.map +0 -1
  409. package/dist/core/cursor-cli-flags.d.ts +0 -19
  410. package/dist/core/cursor-cli-flags.js +0 -47
  411. package/dist/core/cursor-cli-flags.js.map +0 -1
  412. package/dist/core/cursor-config-options.d.ts +0 -18
  413. package/dist/core/cursor-config-options.js +0 -31
  414. package/dist/core/cursor-config-options.js.map +0 -1
  415. package/dist/core/cursor-model-catalog.d.ts +0 -50
  416. package/dist/core/cursor-model-catalog.js +0 -306
  417. package/dist/core/cursor-model-catalog.js.map +0 -1
  418. package/dist/core/cursor-print-capabilities.d.ts +0 -14
  419. package/dist/core/cursor-print-capabilities.js +0 -169
  420. package/dist/core/cursor-print-capabilities.js.map +0 -1
  421. package/dist/core/cursor-print-process.d.ts +0 -31
  422. package/dist/core/cursor-print-process.js +0 -117
  423. package/dist/core/cursor-print-process.js.map +0 -1
  424. package/dist/core/cursor-print-runner.d.ts +0 -43
  425. package/dist/core/cursor-print-runner.js +0 -574
  426. package/dist/core/cursor-print-runner.js.map +0 -1
  427. package/dist/core/cursor-print-tool-catalog.d.ts +0 -3
  428. package/dist/core/cursor-print-tool-catalog.js +0 -13
  429. package/dist/core/cursor-print-tool-catalog.js.map +0 -1
  430. package/dist/core/cursor-print-ui-mapper.d.ts +0 -47
  431. package/dist/core/cursor-print-ui-mapper.js +0 -574
  432. package/dist/core/cursor-print-ui-mapper.js.map +0 -1
  433. package/dist/core/cursor-provider-error.d.ts +0 -9
  434. package/dist/core/cursor-provider-error.js +0 -15
  435. package/dist/core/cursor-provider-error.js.map +0 -1
  436. package/dist/core/cursor-runner.d.ts +0 -46
  437. package/dist/core/cursor-runner.js +0 -144
  438. package/dist/core/cursor-runner.js.map +0 -1
  439. package/dist/core/defined.d.ts +0 -1
  440. package/dist/core/defined.js +0 -2
  441. package/dist/core/defined.js.map +0 -1
  442. package/dist/core/disclaim-spawn.d.ts +0 -11
  443. package/dist/core/disclaim-spawn.js +0 -60
  444. package/dist/core/disclaim-spawn.js.map +0 -1
  445. package/dist/core/edit-write-key.d.ts +0 -2
  446. package/dist/core/edit-write-key.js +0 -6
  447. package/dist/core/edit-write-key.js.map +0 -1
  448. package/dist/core/hook-items.d.ts +0 -14
  449. package/dist/core/hook-items.js +0 -13
  450. package/dist/core/hook-items.js.map +0 -1
  451. package/dist/core/host-model-catalog.d.ts +0 -7
  452. package/dist/core/host-model-catalog.js +0 -21
  453. package/dist/core/host-model-catalog.js.map +0 -1
  454. package/dist/core/input-submissions.d.ts +0 -14
  455. package/dist/core/input-submissions.js +0 -26
  456. package/dist/core/input-submissions.js.map +0 -1
  457. package/dist/core/managed-session.d.ts +0 -6
  458. package/dist/core/managed-session.js +0 -116
  459. package/dist/core/managed-session.js.map +0 -1
  460. package/dist/core/model-discovery-options.d.ts +0 -8
  461. package/dist/core/model-discovery-options.js +0 -2
  462. package/dist/core/model-discovery-options.js.map +0 -1
  463. package/dist/core/model-identity.d.ts +0 -108
  464. package/dist/core/model-identity.js +0 -137
  465. package/dist/core/model-identity.js.map +0 -1
  466. package/dist/core/model-presets.d.ts +0 -10
  467. package/dist/core/model-presets.js +0 -77
  468. package/dist/core/model-presets.js.map +0 -1
  469. package/dist/core/model-probe-teardown.d.ts +0 -4
  470. package/dist/core/model-probe-teardown.js +0 -20
  471. package/dist/core/model-probe-teardown.js.map +0 -1
  472. package/dist/core/ndjson.d.ts +0 -6
  473. package/dist/core/ndjson.js +0 -23
  474. package/dist/core/ndjson.js.map +0 -1
  475. package/dist/core/omp-model-catalog.d.ts +0 -39
  476. package/dist/core/omp-model-catalog.js +0 -182
  477. package/dist/core/omp-model-catalog.js.map +0 -1
  478. package/dist/core/omp-runner.d.ts +0 -86
  479. package/dist/core/omp-runner.js +0 -818
  480. package/dist/core/omp-runner.js.map +0 -1
  481. package/dist/core/omp-subagent-rows.d.ts +0 -21
  482. package/dist/core/omp-subagent-rows.js +0 -99
  483. package/dist/core/omp-subagent-rows.js.map +0 -1
  484. package/dist/core/omp-ui-mapper.d.ts +0 -112
  485. package/dist/core/omp-ui-mapper.js +0 -807
  486. package/dist/core/omp-ui-mapper.js.map +0 -1
  487. package/dist/core/opencode-model-catalog.d.ts +0 -27
  488. package/dist/core/opencode-model-catalog.js +0 -189
  489. package/dist/core/opencode-model-catalog.js.map +0 -1
  490. package/dist/core/opencode-permissions.d.ts +0 -52
  491. package/dist/core/opencode-permissions.js +0 -101
  492. package/dist/core/opencode-permissions.js.map +0 -1
  493. package/dist/core/opencode-runtime-config.d.ts +0 -9
  494. package/dist/core/opencode-runtime-config.js +0 -26
  495. package/dist/core/opencode-runtime-config.js.map +0 -1
  496. package/dist/core/opencode-server-runner.d.ts +0 -75
  497. package/dist/core/opencode-server-runner.js +0 -1690
  498. package/dist/core/opencode-server-runner.js.map +0 -1
  499. package/dist/core/opencode-session-error.d.ts +0 -19
  500. package/dist/core/opencode-session-error.js +0 -42
  501. package/dist/core/opencode-session-error.js.map +0 -1
  502. package/dist/core/opencode-task-scope.d.ts +0 -9
  503. package/dist/core/opencode-task-scope.js +0 -19
  504. package/dist/core/opencode-task-scope.js.map +0 -1
  505. package/dist/core/opencode-ui-mapper-state.d.ts +0 -82
  506. package/dist/core/opencode-ui-mapper-state.js +0 -7
  507. package/dist/core/opencode-ui-mapper-state.js.map +0 -1
  508. package/dist/core/opencode-ui-mapper.d.ts +0 -59
  509. package/dist/core/opencode-ui-mapper.js +0 -724
  510. package/dist/core/opencode-ui-mapper.js.map +0 -1
  511. package/dist/core/opencode-usage.d.ts +0 -32
  512. package/dist/core/opencode-usage.js +0 -105
  513. package/dist/core/opencode-usage.js.map +0 -1
  514. package/dist/core/pi-model-catalog.d.ts +0 -34
  515. package/dist/core/pi-model-catalog.js +0 -247
  516. package/dist/core/pi-model-catalog.js.map +0 -1
  517. package/dist/core/pi-rpc-turn.d.ts +0 -179
  518. package/dist/core/pi-rpc-turn.js +0 -370
  519. package/dist/core/pi-rpc-turn.js.map +0 -1
  520. package/dist/core/pi-rpc-wire.d.ts +0 -31
  521. package/dist/core/pi-rpc-wire.js +0 -88
  522. package/dist/core/pi-rpc-wire.js.map +0 -1
  523. package/dist/core/pi-runner.d.ts +0 -58
  524. package/dist/core/pi-runner.js +0 -587
  525. package/dist/core/pi-runner.js.map +0 -1
  526. package/dist/core/pi-ui-mapper.d.ts +0 -52
  527. package/dist/core/pi-ui-mapper.js +0 -408
  528. package/dist/core/pi-ui-mapper.js.map +0 -1
  529. package/dist/core/process-usage.d.ts +0 -74
  530. package/dist/core/process-usage.js +0 -218
  531. package/dist/core/process-usage.js.map +0 -1
  532. package/dist/core/product-env.d.ts +0 -21
  533. package/dist/core/product-env.js +0 -38
  534. package/dist/core/product-env.js.map +0 -1
  535. package/dist/core/provider-auth.d.ts +0 -168
  536. package/dist/core/provider-auth.js +0 -661
  537. package/dist/core/provider-auth.js.map +0 -1
  538. package/dist/core/provider-availability.d.ts +0 -3
  539. package/dist/core/provider-availability.js +0 -14
  540. package/dist/core/provider-availability.js.map +0 -1
  541. package/dist/core/runner-factory.d.ts +0 -11
  542. package/dist/core/runner-factory.js +0 -36
  543. package/dist/core/runner-factory.js.map +0 -1
  544. package/dist/core/runner-facts.d.ts +0 -135
  545. package/dist/core/runner-facts.js +0 -59
  546. package/dist/core/runner-facts.js.map +0 -1
  547. package/dist/core/runner-model-catalog.d.ts +0 -34
  548. package/dist/core/runner-model-catalog.js +0 -109
  549. package/dist/core/runner-model-catalog.js.map +0 -1
  550. package/dist/core/runner-runtime.d.ts +0 -40
  551. package/dist/core/runner-runtime.js +0 -88
  552. package/dist/core/runner-runtime.js.map +0 -1
  553. package/dist/core/runner-stderr.d.ts +0 -2
  554. package/dist/core/runner-stderr.js +0 -20
  555. package/dist/core/runner-stderr.js.map +0 -1
  556. package/dist/core/runner-tool-grants.d.ts +0 -19
  557. package/dist/core/runner-tool-grants.js +0 -54
  558. package/dist/core/runner-tool-grants.js.map +0 -1
  559. package/dist/core/secret-redaction.d.ts +0 -20
  560. package/dist/core/secret-redaction.js +0 -95
  561. package/dist/core/secret-redaction.js.map +0 -1
  562. package/dist/core/session-process.d.ts +0 -43
  563. package/dist/core/session-process.js +0 -363
  564. package/dist/core/session-process.js.map +0 -1
  565. package/dist/core/shell-env.d.ts +0 -17
  566. package/dist/core/shell-env.js +0 -51
  567. package/dist/core/shell-env.js.map +0 -1
  568. package/dist/core/ui-events.d.ts +0 -356
  569. package/dist/core/ui-events.js +0 -13
  570. package/dist/core/ui-events.js.map +0 -1
  571. package/dist/core/usage-limit.d.ts +0 -42
  572. package/dist/core/usage-limit.js +0 -152
  573. package/dist/core/usage-limit.js.map +0 -1
  574. package/dist/core/usage.d.ts +0 -11
  575. package/dist/core/usage.js +0 -15
  576. package/dist/core/usage.js.map +0 -1
  577. package/dist/core/v1-text-coalescer.d.ts +0 -36
  578. package/dist/core/v1-text-coalescer.js +0 -72
  579. package/dist/core/v1-text-coalescer.js.map +0 -1
  580. package/dist/data-gitignore.d.ts +0 -6
  581. package/dist/data-gitignore.js +0 -80
  582. package/dist/data-gitignore.js.map +0 -1
  583. package/dist/delegation/capacity.d.ts +0 -15
  584. package/dist/delegation/capacity.js +0 -30
  585. package/dist/delegation/capacity.js.map +0 -1
  586. package/dist/delegation/cli.d.ts +0 -5
  587. package/dist/delegation/cli.js +0 -572
  588. package/dist/delegation/cli.js.map +0 -1
  589. package/dist/delegation/context.d.ts +0 -40
  590. package/dist/delegation/context.js +0 -398
  591. package/dist/delegation/context.js.map +0 -1
  592. package/dist/delegation/conversation-send.d.ts +0 -64
  593. package/dist/delegation/conversation-send.js +0 -73
  594. package/dist/delegation/conversation-send.js.map +0 -1
  595. package/dist/delegation/conversations.d.ts +0 -2186
  596. package/dist/delegation/conversations.js +0 -285
  597. package/dist/delegation/conversations.js.map +0 -1
  598. package/dist/delegation/credentials.d.ts +0 -21
  599. package/dist/delegation/credentials.js +0 -66
  600. package/dist/delegation/credentials.js.map +0 -1
  601. package/dist/delegation/destroy-observation.d.ts +0 -42
  602. package/dist/delegation/destroy-observation.js +0 -115
  603. package/dist/delegation/destroy-observation.js.map +0 -1
  604. package/dist/delegation/effort.d.ts +0 -1
  605. package/dist/delegation/effort.js +0 -11
  606. package/dist/delegation/effort.js.map +0 -1
  607. package/dist/delegation/execution-identity.d.ts +0 -257
  608. package/dist/delegation/execution-identity.js +0 -253
  609. package/dist/delegation/execution-identity.js.map +0 -1
  610. package/dist/delegation/execution-settings.d.ts +0 -11
  611. package/dist/delegation/execution-settings.js +0 -65
  612. package/dist/delegation/execution-settings.js.map +0 -1
  613. package/dist/delegation/idle-test-app.d.ts +0 -4
  614. package/dist/delegation/idle-test-app.js +0 -185
  615. package/dist/delegation/idle-test-app.js.map +0 -1
  616. package/dist/delegation/input.d.ts +0 -12
  617. package/dist/delegation/input.js +0 -50
  618. package/dist/delegation/input.js.map +0 -1
  619. package/dist/delegation/park-notice.d.ts +0 -45
  620. package/dist/delegation/park-notice.js +0 -80
  621. package/dist/delegation/park-notice.js.map +0 -1
  622. package/dist/delegation/policy.d.ts +0 -27
  623. package/dist/delegation/policy.js +0 -110
  624. package/dist/delegation/policy.js.map +0 -1
  625. package/dist/delegation/process-liveness.d.ts +0 -98
  626. package/dist/delegation/process-liveness.js +0 -213
  627. package/dist/delegation/process-liveness.js.map +0 -1
  628. package/dist/delegation/provision.d.ts +0 -36
  629. package/dist/delegation/provision.js +0 -217
  630. package/dist/delegation/provision.js.map +0 -1
  631. package/dist/delegation/questions.d.ts +0 -24
  632. package/dist/delegation/questions.js +0 -55
  633. package/dist/delegation/questions.js.map +0 -1
  634. package/dist/delegation/readiness.d.ts +0 -13
  635. package/dist/delegation/readiness.js +0 -19
  636. package/dist/delegation/readiness.js.map +0 -1
  637. package/dist/delegation/results.d.ts +0 -13
  638. package/dist/delegation/results.js +0 -153
  639. package/dist/delegation/results.js.map +0 -1
  640. package/dist/delegation/retry-backoff.d.ts +0 -31
  641. package/dist/delegation/retry-backoff.js +0 -26
  642. package/dist/delegation/retry-backoff.js.map +0 -1
  643. package/dist/delegation/routes.d.ts +0 -1017
  644. package/dist/delegation/routes.js +0 -85
  645. package/dist/delegation/routes.js.map +0 -1
  646. package/dist/delegation/scratch-cleanup.d.ts +0 -33
  647. package/dist/delegation/scratch-cleanup.js +0 -155
  648. package/dist/delegation/scratch-cleanup.js.map +0 -1
  649. package/dist/delegation/service.d.ts +0 -264
  650. package/dist/delegation/service.js +0 -806
  651. package/dist/delegation/service.js.map +0 -1
  652. package/dist/delegation/task-discovery.d.ts +0 -6
  653. package/dist/delegation/task-discovery.js +0 -27
  654. package/dist/delegation/task-discovery.js.map +0 -1
  655. package/dist/delegation/transport.d.ts +0 -995
  656. package/dist/delegation/transport.js +0 -22
  657. package/dist/delegation/transport.js.map +0 -1
  658. package/dist/delegation/wait.d.ts +0 -7
  659. package/dist/delegation/wait.js +0 -44
  660. package/dist/delegation/wait.js.map +0 -1
  661. package/dist/delegation/windows-test-app.d.ts +0 -5
  662. package/dist/delegation/windows-test-app.js +0 -63
  663. package/dist/delegation/windows-test-app.js.map +0 -1
  664. package/dist/delegation/windows-workspace-identity.d.ts +0 -3
  665. package/dist/delegation/windows-workspace-identity.js +0 -22
  666. package/dist/delegation/windows-workspace-identity.js.map +0 -1
  667. package/dist/delegation/worker-cleanup.d.ts +0 -53
  668. package/dist/delegation/worker-cleanup.js +0 -330
  669. package/dist/delegation/worker-cleanup.js.map +0 -1
  670. package/dist/delegation/workspace.d.ts +0 -40
  671. package/dist/delegation/workspace.js +0 -592
  672. package/dist/delegation/workspace.js.map +0 -1
  673. package/dist/detached-process.d.ts +0 -125
  674. package/dist/detached-process.js +0 -448
  675. package/dist/detached-process.js.map +0 -1
  676. package/dist/discovery/catalog.d.ts +0 -16
  677. package/dist/discovery/catalog.js +0 -31
  678. package/dist/discovery/catalog.js.map +0 -1
  679. package/dist/discovery/cli.d.ts +0 -8
  680. package/dist/discovery/cli.js +0 -122
  681. package/dist/discovery/cli.js.map +0 -1
  682. package/dist/git-command.d.ts +0 -7
  683. package/dist/git-command.js +0 -8
  684. package/dist/git-command.js.map +0 -1
  685. package/dist/git-diff-base.d.ts +0 -41
  686. package/dist/git-diff-base.js +0 -116
  687. package/dist/git-diff-base.js.map +0 -1
  688. package/dist/git-index-copy.d.ts +0 -4
  689. package/dist/git-index-copy.js +0 -10
  690. package/dist/git-index-copy.js.map +0 -1
  691. package/dist/git-private-index.d.ts +0 -11
  692. package/dist/git-private-index.js +0 -51
  693. package/dist/git-private-index.js.map +0 -1
  694. package/dist/git-refs.d.ts +0 -11
  695. package/dist/git-refs.js +0 -14
  696. package/dist/git-refs.js.map +0 -1
  697. package/dist/git-worktree-lock-helper.d.ts +0 -7
  698. package/dist/git-worktree-lock-helper.js +0 -178
  699. package/dist/git-worktree-lock-helper.js.map +0 -1
  700. package/dist/git-worktree-lock.d.ts +0 -17
  701. package/dist/git-worktree-lock.js +0 -90
  702. package/dist/git-worktree-lock.js.map +0 -1
  703. package/dist/git-worktree-release.d.ts +0 -20
  704. package/dist/git-worktree-release.js +0 -27
  705. package/dist/git-worktree-release.js.map +0 -1
  706. package/dist/git-worktree.d.ts +0 -148
  707. package/dist/git-worktree.js +0 -857
  708. package/dist/git-worktree.js.map +0 -1
  709. package/dist/handoff.d.ts +0 -72
  710. package/dist/handoff.js +0 -212
  711. package/dist/handoff.js.map +0 -1
  712. package/dist/headless-run.d.ts +0 -48
  713. package/dist/headless-run.js +0 -158
  714. package/dist/headless-run.js.map +0 -1
  715. package/dist/home/boundary.d.ts +0 -5
  716. package/dist/home/boundary.js +0 -76
  717. package/dist/home/boundary.js.map +0 -1
  718. package/dist/home/changes.d.ts +0 -3
  719. package/dist/home/changes.js +0 -11
  720. package/dist/home/changes.js.map +0 -1
  721. package/dist/home/command.d.ts +0 -9
  722. package/dist/home/command.js +0 -37
  723. package/dist/home/command.js.map +0 -1
  724. package/dist/home/deprecation.d.ts +0 -9
  725. package/dist/home/deprecation.js +0 -17
  726. package/dist/home/deprecation.js.map +0 -1
  727. package/dist/home/display.d.ts +0 -2
  728. package/dist/home/display.js +0 -7
  729. package/dist/home/display.js.map +0 -1
  730. package/dist/home/entry-authorization.d.ts +0 -17
  731. package/dist/home/entry-authorization.js +0 -39
  732. package/dist/home/entry-authorization.js.map +0 -1
  733. package/dist/home/entry.d.ts +0 -16
  734. package/dist/home/entry.js +0 -95
  735. package/dist/home/entry.js.map +0 -1
  736. package/dist/home/file-location.d.ts +0 -14
  737. package/dist/home/file-location.js +0 -24
  738. package/dist/home/file-location.js.map +0 -1
  739. package/dist/home/home.d.ts +0 -42
  740. package/dist/home/home.js +0 -70
  741. package/dist/home/home.js.map +0 -1
  742. package/dist/home/identity.d.ts +0 -22
  743. package/dist/home/identity.js +0 -25
  744. package/dist/home/identity.js.map +0 -1
  745. package/dist/home/install-marker.d.ts +0 -27
  746. package/dist/home/install-marker.js +0 -77
  747. package/dist/home/install-marker.js.map +0 -1
  748. package/dist/home/kind-roots.d.ts +0 -10
  749. package/dist/home/kind-roots.js +0 -36
  750. package/dist/home/kind-roots.js.map +0 -1
  751. package/dist/home/leases.d.ts +0 -14
  752. package/dist/home/leases.js +0 -55
  753. package/dist/home/leases.js.map +0 -1
  754. package/dist/home/legacy-account-paths.d.ts +0 -4
  755. package/dist/home/legacy-account-paths.js +0 -41
  756. package/dist/home/legacy-account-paths.js.map +0 -1
  757. package/dist/home/legacy-merge.d.ts +0 -3
  758. package/dist/home/legacy-merge.js +0 -45
  759. package/dist/home/legacy-merge.js.map +0 -1
  760. package/dist/home/legacy-recovery.d.ts +0 -5
  761. package/dist/home/legacy-recovery.js +0 -154
  762. package/dist/home/legacy-recovery.js.map +0 -1
  763. package/dist/home/legacy-source.d.ts +0 -15
  764. package/dist/home/legacy-source.js +0 -57
  765. package/dist/home/legacy-source.js.map +0 -1
  766. package/dist/home/migrate.d.ts +0 -19
  767. package/dist/home/migrate.js +0 -321
  768. package/dist/home/migrate.js.map +0 -1
  769. package/dist/home/migration-account-source.d.ts +0 -2
  770. package/dist/home/migration-account-source.js +0 -17
  771. package/dist/home/migration-account-source.js.map +0 -1
  772. package/dist/home/migration-accounts.d.ts +0 -23
  773. package/dist/home/migration-accounts.js +0 -173
  774. package/dist/home/migration-accounts.js.map +0 -1
  775. package/dist/home/migration-boot.d.ts +0 -23
  776. package/dist/home/migration-boot.js +0 -61
  777. package/dist/home/migration-boot.js.map +0 -1
  778. package/dist/home/migration-claim.d.ts +0 -4
  779. package/dist/home/migration-claim.js +0 -69
  780. package/dist/home/migration-claim.js.map +0 -1
  781. package/dist/home/migration-cli.d.ts +0 -3
  782. package/dist/home/migration-cli.js +0 -64
  783. package/dist/home/migration-cli.js.map +0 -1
  784. package/dist/home/migration-files.d.ts +0 -14
  785. package/dist/home/migration-files.js +0 -192
  786. package/dist/home/migration-files.js.map +0 -1
  787. package/dist/home/migration-guard.d.ts +0 -2
  788. package/dist/home/migration-guard.js +0 -19
  789. package/dist/home/migration-guard.js.map +0 -1
  790. package/dist/home/migration-plan.d.ts +0 -20
  791. package/dist/home/migration-plan.js +0 -71
  792. package/dist/home/migration-plan.js.map +0 -1
  793. package/dist/home/migration-record.d.ts +0 -79
  794. package/dist/home/migration-record.js +0 -39
  795. package/dist/home/migration-record.js.map +0 -1
  796. package/dist/home/private-files.d.ts +0 -13
  797. package/dist/home/private-files.js +0 -101
  798. package/dist/home/private-files.js.map +0 -1
  799. package/dist/home/process-identity.d.ts +0 -2
  800. package/dist/home/process-identity.js +0 -8
  801. package/dist/home/process-identity.js.map +0 -1
  802. package/dist/home/protected-roots.d.ts +0 -25
  803. package/dist/home/protected-roots.js +0 -90
  804. package/dist/home/protected-roots.js.map +0 -1
  805. package/dist/home/recovery-watch.d.ts +0 -3
  806. package/dist/home/recovery-watch.js +0 -75
  807. package/dist/home/recovery-watch.js.map +0 -1
  808. package/dist/home/recovery.d.ts +0 -10
  809. package/dist/home/recovery.js +0 -94
  810. package/dist/home/recovery.js.map +0 -1
  811. package/dist/home/registry-content.d.ts +0 -2
  812. package/dist/home/registry-content.js +0 -17
  813. package/dist/home/registry-content.js.map +0 -1
  814. package/dist/home/reset-detection.d.ts +0 -5
  815. package/dist/home/reset-detection.js +0 -22
  816. package/dist/home/reset-detection.js.map +0 -1
  817. package/dist/home/resolve.d.ts +0 -10
  818. package/dist/home/resolve.js +0 -28
  819. package/dist/home/resolve.js.map +0 -1
  820. package/dist/home/store.d.ts +0 -48
  821. package/dist/home/store.js +0 -324
  822. package/dist/home/store.js.map +0 -1
  823. package/dist/home/switch.d.ts +0 -2
  824. package/dist/home/switch.js +0 -3
  825. package/dist/home/switch.js.map +0 -1
  826. package/dist/home/version-log.d.ts +0 -48
  827. package/dist/home/version-log.js +0 -216
  828. package/dist/home/version-log.js.map +0 -1
  829. package/dist/home/write-lock.d.ts +0 -6
  830. package/dist/home/write-lock.js +0 -96
  831. package/dist/home/write-lock.js.map +0 -1
  832. package/dist/hsq.d.ts +0 -2
  833. package/dist/hsq.js.map +0 -1
  834. package/dist/index.d.ts +0 -2
  835. package/dist/index.js.map +0 -1
  836. package/dist/install-as-command.d.ts +0 -32
  837. package/dist/install-as-command.js +0 -55
  838. package/dist/install-as-command.js.map +0 -1
  839. package/dist/jobs/cli.d.ts +0 -2
  840. package/dist/jobs/cli.js +0 -53
  841. package/dist/jobs/cli.js.map +0 -1
  842. package/dist/jobs/command.d.ts +0 -9
  843. package/dist/jobs/command.js +0 -19
  844. package/dist/jobs/command.js.map +0 -1
  845. package/dist/jobs/job.d.ts +0 -77
  846. package/dist/jobs/job.js +0 -252
  847. package/dist/jobs/job.js.map +0 -1
  848. package/dist/merge-observations.d.ts +0 -13
  849. package/dist/merge-observations.js +0 -55
  850. package/dist/merge-observations.js.map +0 -1
  851. package/dist/merged-streams.d.ts +0 -13
  852. package/dist/merged-streams.js +0 -33
  853. package/dist/merged-streams.js.map +0 -1
  854. package/dist/open-url.d.ts +0 -2
  855. package/dist/open-url.js +0 -10
  856. package/dist/open-url.js.map +0 -1
  857. package/dist/pack-check.d.ts +0 -17
  858. package/dist/pack-check.js +0 -27
  859. package/dist/pack-check.js.map +0 -1
  860. package/dist/paths.d.ts +0 -118
  861. package/dist/paths.js +0 -191
  862. package/dist/paths.js.map +0 -1
  863. package/dist/planner.d.ts +0 -30
  864. package/dist/planner.js +0 -270
  865. package/dist/planner.js.map +0 -1
  866. package/dist/preview/agent-address.d.ts +0 -34
  867. package/dist/preview/agent-address.js +0 -52
  868. package/dist/preview/agent-address.js.map +0 -1
  869. package/dist/preview/agent-marker.d.ts +0 -17
  870. package/dist/preview/agent-marker.js +0 -71
  871. package/dist/preview/agent-marker.js.map +0 -1
  872. package/dist/preview/browser-launch.d.ts +0 -28
  873. package/dist/preview/browser-launch.js +0 -64
  874. package/dist/preview/browser-launch.js.map +0 -1
  875. package/dist/preview/cdp-proxy.d.ts +0 -54
  876. package/dist/preview/cdp-proxy.js +0 -152
  877. package/dist/preview/cdp-proxy.js.map +0 -1
  878. package/dist/preview/cdp.d.ts +0 -49
  879. package/dist/preview/cdp.js +0 -167
  880. package/dist/preview/cdp.js.map +0 -1
  881. package/dist/preview/chromium-launch-progress.d.ts +0 -10
  882. package/dist/preview/chromium-launch-progress.js +0 -48
  883. package/dist/preview/chromium-launch-progress.js.map +0 -1
  884. package/dist/preview/chromium.d.ts +0 -91
  885. package/dist/preview/chromium.js +0 -500
  886. package/dist/preview/chromium.js.map +0 -1
  887. package/dist/preview/density.d.ts +0 -17
  888. package/dist/preview/density.js +0 -62
  889. package/dist/preview/density.js.map +0 -1
  890. package/dist/preview/dev-server.d.ts +0 -68
  891. package/dist/preview/dev-server.js +0 -318
  892. package/dist/preview/dev-server.js.map +0 -1
  893. package/dist/preview/host.d.ts +0 -215
  894. package/dist/preview/host.js +0 -954
  895. package/dist/preview/host.js.map +0 -1
  896. package/dist/preview/registration.d.ts +0 -68
  897. package/dist/preview/registration.js +0 -111
  898. package/dist/preview/registration.js.map +0 -1
  899. package/dist/preview/run-tools.d.ts +0 -9
  900. package/dist/preview/run-tools.js +0 -72
  901. package/dist/preview/run-tools.js.map +0 -1
  902. package/dist/preview/session.d.ts +0 -139
  903. package/dist/preview/session.js +0 -479
  904. package/dist/preview/session.js.map +0 -1
  905. package/dist/preview/url.d.ts +0 -6
  906. package/dist/preview/url.js +0 -17
  907. package/dist/preview/url.js.map +0 -1
  908. package/dist/process-wait/exit-file.d.ts +0 -29
  909. package/dist/process-wait/exit-file.js +0 -67
  910. package/dist/process-wait/exit-file.js.map +0 -1
  911. package/dist/process-wait/supervisor.d.ts +0 -30
  912. package/dist/process-wait/supervisor.js +0 -71
  913. package/dist/process-wait/supervisor.js.map +0 -1
  914. package/dist/project-commands.d.ts +0 -14
  915. package/dist/project-commands.js +0 -91
  916. package/dist/project-commands.js.map +0 -1
  917. package/dist/project-migration/answer.d.ts +0 -23
  918. package/dist/project-migration/answer.js +0 -37
  919. package/dist/project-migration/answer.js.map +0 -1
  920. package/dist/project-migration/auto.d.ts +0 -73
  921. package/dist/project-migration/auto.js +0 -161
  922. package/dist/project-migration/auto.js.map +0 -1
  923. package/dist/project-migration/cli.d.ts +0 -18
  924. package/dist/project-migration/cli.js +0 -57
  925. package/dist/project-migration/cli.js.map +0 -1
  926. package/dist/project-migration/containment.d.ts +0 -52
  927. package/dist/project-migration/containment.js +0 -200
  928. package/dist/project-migration/containment.js.map +0 -1
  929. package/dist/project-migration/durable.d.ts +0 -25
  930. package/dist/project-migration/durable.js +0 -69
  931. package/dist/project-migration/durable.js.map +0 -1
  932. package/dist/project-migration/engine.d.ts +0 -47
  933. package/dist/project-migration/engine.js +0 -103
  934. package/dist/project-migration/engine.js.map +0 -1
  935. package/dist/project-migration/fresh.d.ts +0 -4
  936. package/dist/project-migration/fresh.js +0 -25
  937. package/dist/project-migration/fresh.js.map +0 -1
  938. package/dist/project-migration/journal.d.ts +0 -139
  939. package/dist/project-migration/journal.js +0 -69
  940. package/dist/project-migration/journal.js.map +0 -1
  941. package/dist/project-migration/live.d.ts +0 -48
  942. package/dist/project-migration/live.js +0 -148
  943. package/dist/project-migration/live.js.map +0 -1
  944. package/dist/project-migration/offline.d.ts +0 -25
  945. package/dist/project-migration/offline.js +0 -54
  946. package/dist/project-migration/offline.js.map +0 -1
  947. package/dist/project-migration/plan.d.ts +0 -91
  948. package/dist/project-migration/plan.js +0 -466
  949. package/dist/project-migration/plan.js.map +0 -1
  950. package/dist/project-migration/recovery.d.ts +0 -28
  951. package/dist/project-migration/recovery.js +0 -78
  952. package/dist/project-migration/recovery.js.map +0 -1
  953. package/dist/project-migration/steps.d.ts +0 -18
  954. package/dist/project-migration/steps.js +0 -312
  955. package/dist/project-migration/steps.js.map +0 -1
  956. package/dist/project-paths.d.ts +0 -61
  957. package/dist/project-paths.js +0 -185
  958. package/dist/project-paths.js.map +0 -1
  959. package/dist/release/compatibility.d.ts +0 -12
  960. package/dist/release/compatibility.js +0 -62
  961. package/dist/release/compatibility.js.map +0 -1
  962. package/dist/release/manifests.d.ts +0 -112
  963. package/dist/release/manifests.js +0 -104
  964. package/dist/release/manifests.js.map +0 -1
  965. package/dist/release/publication.d.ts +0 -3
  966. package/dist/release/publication.js +0 -34
  967. package/dist/release/publication.js.map +0 -1
  968. package/dist/release/snapshot.d.ts +0 -67
  969. package/dist/release/snapshot.js +0 -97
  970. package/dist/release/snapshot.js.map +0 -1
  971. package/dist/release/stable.d.ts +0 -38
  972. package/dist/release/stable.js +0 -55
  973. package/dist/release/stable.js.map +0 -1
  974. package/dist/remote-settings-cli.d.ts +0 -24
  975. package/dist/remote-settings-cli.js +0 -156
  976. package/dist/remote-settings-cli.js.map +0 -1
  977. package/dist/remote-settings.d.ts +0 -41
  978. package/dist/remote-settings.js +0 -110
  979. package/dist/remote-settings.js.map +0 -1
  980. package/dist/runs/agent-tmpdir-removal.d.ts +0 -15
  981. package/dist/runs/agent-tmpdir-removal.js +0 -60
  982. package/dist/runs/agent-tmpdir-removal.js.map +0 -1
  983. package/dist/runs/agent-tmpdir.d.ts +0 -119
  984. package/dist/runs/agent-tmpdir.js +0 -855
  985. package/dist/runs/agent-tmpdir.js.map +0 -1
  986. package/dist/runs/archive-family.d.ts +0 -33
  987. package/dist/runs/archive-family.js +0 -90
  988. package/dist/runs/archive-family.js.map +0 -1
  989. package/dist/runs/arm-repo-handle.d.ts +0 -10
  990. package/dist/runs/arm-repo-handle.js +0 -45
  991. package/dist/runs/arm-repo-handle.js.map +0 -1
  992. package/dist/runs/auto-name.d.ts +0 -77
  993. package/dist/runs/auto-name.js +0 -179
  994. package/dist/runs/auto-name.js.map +0 -1
  995. package/dist/runs/claim-families.d.ts +0 -37
  996. package/dist/runs/claim-families.js +0 -101
  997. package/dist/runs/claim-families.js.map +0 -1
  998. package/dist/runs/client-request.d.ts +0 -11
  999. package/dist/runs/client-request.js +0 -26
  1000. package/dist/runs/client-request.js.map +0 -1
  1001. package/dist/runs/cold-reads.d.ts +0 -40
  1002. package/dist/runs/cold-reads.js +0 -56
  1003. package/dist/runs/cold-reads.js.map +0 -1
  1004. package/dist/runs/conversation-identity.d.ts +0 -19
  1005. package/dist/runs/conversation-identity.js +0 -31
  1006. package/dist/runs/conversation-identity.js.map +0 -1
  1007. package/dist/runs/delegation-state.d.ts +0 -409
  1008. package/dist/runs/delegation-state.js +0 -22
  1009. package/dist/runs/delegation-state.js.map +0 -1
  1010. package/dist/runs/event-history-agent-context.d.ts +0 -15
  1011. package/dist/runs/event-history-agent-context.js +0 -119
  1012. package/dist/runs/event-history-agent-context.js.map +0 -1
  1013. package/dist/runs/event-history-context.d.ts +0 -15
  1014. package/dist/runs/event-history-context.js +0 -109
  1015. package/dist/runs/event-history-context.js.map +0 -1
  1016. package/dist/runs/event-history.d.ts +0 -53
  1017. package/dist/runs/event-history.js +0 -563
  1018. package/dist/runs/event-history.js.map +0 -1
  1019. package/dist/runs/exit-events.d.ts +0 -32
  1020. package/dist/runs/exit-events.js +0 -40
  1021. package/dist/runs/exit-events.js.map +0 -1
  1022. package/dist/runs/history-compressor.d.ts +0 -29
  1023. package/dist/runs/history-compressor.js +0 -116
  1024. package/dist/runs/history-compressor.js.map +0 -1
  1025. package/dist/runs/history-file.d.ts +0 -36
  1026. package/dist/runs/history-file.js +0 -463
  1027. package/dist/runs/history-file.js.map +0 -1
  1028. package/dist/runs/history-stream.d.ts +0 -2
  1029. package/dist/runs/history-stream.js +0 -62
  1030. package/dist/runs/history-stream.js.map +0 -1
  1031. package/dist/runs/legacy-index.d.ts +0 -49
  1032. package/dist/runs/legacy-index.js +0 -156
  1033. package/dist/runs/legacy-index.js.map +0 -1
  1034. package/dist/runs/legacy-run-rows.d.ts +0 -12
  1035. package/dist/runs/legacy-run-rows.js +0 -33
  1036. package/dist/runs/legacy-run-rows.js.map +0 -1
  1037. package/dist/runs/legacy-waits.d.ts +0 -64
  1038. package/dist/runs/legacy-waits.js +0 -335
  1039. package/dist/runs/legacy-waits.js.map +0 -1
  1040. package/dist/runs/live-item-snapshots.d.ts +0 -15
  1041. package/dist/runs/live-item-snapshots.js +0 -95
  1042. package/dist/runs/live-item-snapshots.js.map +0 -1
  1043. package/dist/runs/loaded-run-exits.d.ts +0 -6
  1044. package/dist/runs/loaded-run-exits.js +0 -32
  1045. package/dist/runs/loaded-run-exits.js.map +0 -1
  1046. package/dist/runs/loaded-run-healing.d.ts +0 -3
  1047. package/dist/runs/loaded-run-healing.js +0 -17
  1048. package/dist/runs/loaded-run-healing.js.map +0 -1
  1049. package/dist/runs/outcome-commit.d.ts +0 -119
  1050. package/dist/runs/outcome-commit.js +0 -155
  1051. package/dist/runs/outcome-commit.js.map +0 -1
  1052. package/dist/runs/owned-run-create.d.ts +0 -33
  1053. package/dist/runs/owned-run-create.js +0 -98
  1054. package/dist/runs/owned-run-create.js.map +0 -1
  1055. package/dist/runs/project-run-connection.d.ts +0 -76
  1056. package/dist/runs/project-run-connection.js +0 -287
  1057. package/dist/runs/project-run-connection.js.map +0 -1
  1058. package/dist/runs/project-run-sources.d.ts +0 -21
  1059. package/dist/runs/project-run-sources.js +0 -85
  1060. package/dist/runs/project-run-sources.js.map +0 -1
  1061. package/dist/runs/pull-requests.d.ts +0 -14
  1062. package/dist/runs/pull-requests.js +0 -96
  1063. package/dist/runs/pull-requests.js.map +0 -1
  1064. package/dist/runs/raw-record.d.ts +0 -40
  1065. package/dist/runs/raw-record.js +0 -133
  1066. package/dist/runs/raw-record.js.map +0 -1
  1067. package/dist/runs/record-write-rules.d.ts +0 -129
  1068. package/dist/runs/record-write-rules.js +0 -326
  1069. package/dist/runs/record-write-rules.js.map +0 -1
  1070. package/dist/runs/report-rows.d.ts +0 -36
  1071. package/dist/runs/report-rows.js +0 -102
  1072. package/dist/runs/report-rows.js.map +0 -1
  1073. package/dist/runs/retention.d.ts +0 -91
  1074. package/dist/runs/retention.js +0 -192
  1075. package/dist/runs/retention.js.map +0 -1
  1076. package/dist/runs/review-gate.d.ts +0 -18
  1077. package/dist/runs/review-gate.js +0 -22
  1078. package/dist/runs/review-gate.js.map +0 -1
  1079. package/dist/runs/run-claims.d.ts +0 -30
  1080. package/dist/runs/run-claims.js +0 -52
  1081. package/dist/runs/run-claims.js.map +0 -1
  1082. package/dist/runs/run-database-peer-page.d.ts +0 -12
  1083. package/dist/runs/run-database-peer-page.js +0 -25
  1084. package/dist/runs/run-database-peer-page.js.map +0 -1
  1085. package/dist/runs/run-database-row.d.ts +0 -39
  1086. package/dist/runs/run-database-row.js +0 -83
  1087. package/dist/runs/run-database-row.js.map +0 -1
  1088. package/dist/runs/run-database-version.d.ts +0 -14
  1089. package/dist/runs/run-database-version.js +0 -19
  1090. package/dist/runs/run-database-version.js.map +0 -1
  1091. package/dist/runs/run-database.d.ts +0 -389
  1092. package/dist/runs/run-database.js +0 -957
  1093. package/dist/runs/run-database.js.map +0 -1
  1094. package/dist/runs/run-exits.d.ts +0 -4510
  1095. package/dist/runs/run-exits.js +0 -191
  1096. package/dist/runs/run-exits.js.map +0 -1
  1097. package/dist/runs/run-index.d.ts +0 -36
  1098. package/dist/runs/run-index.js +0 -261
  1099. package/dist/runs/run-index.js.map +0 -1
  1100. package/dist/runs/run-references.d.ts +0 -61
  1101. package/dist/runs/run-references.js +0 -421
  1102. package/dist/runs/run-references.js.map +0 -1
  1103. package/dist/runs/run-row.d.ts +0 -14
  1104. package/dist/runs/run-row.js +0 -56
  1105. package/dist/runs/run-row.js.map +0 -1
  1106. package/dist/runs/run-summary-page.d.ts +0 -36
  1107. package/dist/runs/run-summary-page.js +0 -46
  1108. package/dist/runs/run-summary-page.js.map +0 -1
  1109. package/dist/runs/run-title.d.ts +0 -8
  1110. package/dist/runs/run-title.js +0 -28
  1111. package/dist/runs/run-title.js.map +0 -1
  1112. package/dist/runs/store-open-error.d.ts +0 -24
  1113. package/dist/runs/store-open-error.js +0 -62
  1114. package/dist/runs/store-open-error.js.map +0 -1
  1115. package/dist/runs/store.d.ts +0 -3974
  1116. package/dist/runs/store.js +0 -3516
  1117. package/dist/runs/store.js.map +0 -1
  1118. package/dist/runs/task-markers.d.ts +0 -29
  1119. package/dist/runs/task-markers.js +0 -78
  1120. package/dist/runs/task-markers.js.map +0 -1
  1121. package/dist/runs/task-refs.d.ts +0 -39
  1122. package/dist/runs/task-refs.js +0 -107
  1123. package/dist/runs/task-refs.js.map +0 -1
  1124. package/dist/runs/transcript-facts-fold.d.ts +0 -64
  1125. package/dist/runs/transcript-facts-fold.js +0 -109
  1126. package/dist/runs/transcript-facts-fold.js.map +0 -1
  1127. package/dist/runs/transcript-facts-load.d.ts +0 -11
  1128. package/dist/runs/transcript-facts-load.js +0 -66
  1129. package/dist/runs/transcript-facts-load.js.map +0 -1
  1130. package/dist/runs/transcript-facts-queue.d.ts +0 -30
  1131. package/dist/runs/transcript-facts-queue.js +0 -227
  1132. package/dist/runs/transcript-facts-queue.js.map +0 -1
  1133. package/dist/runs/transcript-facts-worker.d.ts +0 -15
  1134. package/dist/runs/transcript-facts-worker.js +0 -26
  1135. package/dist/runs/transcript-facts-worker.js.map +0 -1
  1136. package/dist/runs/transcript-facts.d.ts +0 -40
  1137. package/dist/runs/transcript-facts.js +0 -192
  1138. package/dist/runs/transcript-facts.js.map +0 -1
  1139. package/dist/runs/ui-event-sink.d.ts +0 -59
  1140. package/dist/runs/ui-event-sink.js +0 -197
  1141. package/dist/runs/ui-event-sink.js.map +0 -1
  1142. package/dist/runs/wait-capacity.d.ts +0 -8
  1143. package/dist/runs/wait-capacity.js +0 -28
  1144. package/dist/runs/wait-capacity.js.map +0 -1
  1145. package/dist/runs/wait-phases.d.ts +0 -4
  1146. package/dist/runs/wait-phases.js +0 -11
  1147. package/dist/runs/wait-phases.js.map +0 -1
  1148. package/dist/runs/wait-registration-write.d.ts +0 -5
  1149. package/dist/runs/wait-registration-write.js +0 -35
  1150. package/dist/runs/wait-registration-write.js.map +0 -1
  1151. package/dist/runs/webhook.d.ts +0 -193
  1152. package/dist/runs/webhook.js +0 -362
  1153. package/dist/runs/webhook.js.map +0 -1
  1154. package/dist/runs/worker-deletion-proof.d.ts +0 -13
  1155. package/dist/runs/worker-deletion-proof.js +0 -13
  1156. package/dist/runs/worker-deletion-proof.js.map +0 -1
  1157. package/dist/runs/worker-execution.d.ts +0 -22
  1158. package/dist/runs/worker-execution.js +0 -30
  1159. package/dist/runs/worker-execution.js.map +0 -1
  1160. package/dist/runs/worker-resource-holders.d.ts +0 -17
  1161. package/dist/runs/worker-resource-holders.js +0 -34
  1162. package/dist/runs/worker-resource-holders.js.map +0 -1
  1163. package/dist/runs/worker-result-commit.d.ts +0 -26
  1164. package/dist/runs/worker-result-commit.js +0 -121
  1165. package/dist/runs/worker-result-commit.js.map +0 -1
  1166. package/dist/self-update/checkouts.d.ts +0 -46
  1167. package/dist/self-update/checkouts.js +0 -284
  1168. package/dist/self-update/checkouts.js.map +0 -1
  1169. package/dist/self-update/cli.d.ts +0 -19
  1170. package/dist/self-update/cli.js +0 -243
  1171. package/dist/self-update/cli.js.map +0 -1
  1172. package/dist/self-update/installer.d.ts +0 -24
  1173. package/dist/self-update/installer.js +0 -139
  1174. package/dist/self-update/installer.js.map +0 -1
  1175. package/dist/self-update/launcher.d.ts +0 -30
  1176. package/dist/self-update/launcher.js +0 -172
  1177. package/dist/self-update/launcher.js.map +0 -1
  1178. package/dist/self-update/layout.d.ts +0 -108
  1179. package/dist/self-update/layout.js +0 -276
  1180. package/dist/self-update/layout.js.map +0 -1
  1181. package/dist/self-update/pulls.d.ts +0 -30
  1182. package/dist/self-update/pulls.js +0 -128
  1183. package/dist/self-update/pulls.js.map +0 -1
  1184. package/dist/self-update/registry.d.ts +0 -37
  1185. package/dist/self-update/registry.js +0 -86
  1186. package/dist/self-update/registry.js.map +0 -1
  1187. package/dist/self-update/restart.d.ts +0 -25
  1188. package/dist/self-update/restart.js +0 -79
  1189. package/dist/self-update/restart.js.map +0 -1
  1190. package/dist/self-update/semver.d.ts +0 -19
  1191. package/dist/self-update/semver.js +0 -79
  1192. package/dist/self-update/semver.js.map +0 -1
  1193. package/dist/self-update/service.d.ts +0 -115
  1194. package/dist/self-update/service.js +0 -332
  1195. package/dist/self-update/service.js.map +0 -1
  1196. package/dist/self-update/supervisor.d.ts +0 -10
  1197. package/dist/self-update/supervisor.js +0 -52
  1198. package/dist/self-update/supervisor.js.map +0 -1
  1199. package/dist/serve-boot.d.ts +0 -60
  1200. package/dist/serve-boot.js +0 -142
  1201. package/dist/serve-boot.js.map +0 -1
  1202. package/dist/serve-command.d.ts +0 -71
  1203. package/dist/serve-command.js +0 -168
  1204. package/dist/serve-command.js.map +0 -1
  1205. package/dist/serve-listener.d.ts +0 -12
  1206. package/dist/serve-listener.js +0 -52
  1207. package/dist/serve-listener.js.map +0 -1
  1208. package/dist/server/activity-project-topic.d.ts +0 -44
  1209. package/dist/server/activity-project-topic.js +0 -137
  1210. package/dist/server/activity-project-topic.js.map +0 -1
  1211. package/dist/server/activity-routes.d.ts +0 -317
  1212. package/dist/server/activity-routes.js +0 -116
  1213. package/dist/server/activity-routes.js.map +0 -1
  1214. package/dist/server/activity-sources.d.ts +0 -26
  1215. package/dist/server/activity-sources.js +0 -45
  1216. package/dist/server/activity-sources.js.map +0 -1
  1217. package/dist/server/activity-topic.d.ts +0 -33
  1218. package/dist/server/activity-topic.js +0 -48
  1219. package/dist/server/activity-topic.js.map +0 -1
  1220. package/dist/server/app-type.js.map +0 -1
  1221. package/dist/server/archive-on-merge.d.ts +0 -45
  1222. package/dist/server/archive-on-merge.js +0 -242
  1223. package/dist/server/archive-on-merge.js.map +0 -1
  1224. package/dist/server/automation-log-retry.d.ts +0 -27
  1225. package/dist/server/automation-log-retry.js +0 -88
  1226. package/dist/server/automation-log-retry.js.map +0 -1
  1227. package/dist/server/capabilities.d.ts +0 -69
  1228. package/dist/server/capabilities.js +0 -111
  1229. package/dist/server/capabilities.js.map +0 -1
  1230. package/dist/server/checkout-progress.d.ts +0 -10
  1231. package/dist/server/checkout-progress.js +0 -27
  1232. package/dist/server/checkout-progress.js.map +0 -1
  1233. package/dist/server/checkout.d.ts +0 -153
  1234. package/dist/server/checkout.js +0 -323
  1235. package/dist/server/checkout.js.map +0 -1
  1236. package/dist/server/cockpit-ownership.d.ts +0 -112
  1237. package/dist/server/cockpit-ownership.js +0 -419
  1238. package/dist/server/cockpit-ownership.js.map +0 -1
  1239. package/dist/server/cold-repo-handles.d.ts +0 -17
  1240. package/dist/server/cold-repo-handles.js +0 -82
  1241. package/dist/server/cold-repo-handles.js.map +0 -1
  1242. package/dist/server/completion-actions.d.ts +0 -37
  1243. package/dist/server/completion-actions.js +0 -261
  1244. package/dist/server/completion-actions.js.map +0 -1
  1245. package/dist/server/config-merge.d.ts +0 -11
  1246. package/dist/server/config-merge.js +0 -74
  1247. package/dist/server/config-merge.js.map +0 -1
  1248. package/dist/server/create-project.d.ts +0 -71
  1249. package/dist/server/create-project.js +0 -466
  1250. package/dist/server/create-project.js.map +0 -1
  1251. package/dist/server/forge/draft-pr.d.ts +0 -8
  1252. package/dist/server/forge/draft-pr.js +0 -123
  1253. package/dist/server/forge/draft-pr.js.map +0 -1
  1254. package/dist/server/forge/github-filters.d.ts +0 -22
  1255. package/dist/server/forge/github-filters.js +0 -128
  1256. package/dist/server/forge/github-filters.js.map +0 -1
  1257. package/dist/server/forge/github-merge-requirements.d.ts +0 -18
  1258. package/dist/server/forge/github-merge-requirements.js +0 -148
  1259. package/dist/server/forge/github-merge-requirements.js.map +0 -1
  1260. package/dist/server/forge/github-merge-state.d.ts +0 -27
  1261. package/dist/server/forge/github-merge-state.js +0 -248
  1262. package/dist/server/forge/github-merge-state.js.map +0 -1
  1263. package/dist/server/forge/github-timeline.d.ts +0 -117
  1264. package/dist/server/forge/github-timeline.js +0 -273
  1265. package/dist/server/forge/github-timeline.js.map +0 -1
  1266. package/dist/server/forge/github.d.ts +0 -393
  1267. package/dist/server/forge/github.js +0 -2881
  1268. package/dist/server/forge/github.js.map +0 -1
  1269. package/dist/server/forge/index.d.ts +0 -47
  1270. package/dist/server/forge/index.js +0 -81
  1271. package/dist/server/forge/index.js.map +0 -1
  1272. package/dist/server/forge/repo-handle-discovery.d.ts +0 -16
  1273. package/dist/server/forge/repo-handle-discovery.js +0 -2
  1274. package/dist/server/forge/repo-handle-discovery.js.map +0 -1
  1275. package/dist/server/forge/types.d.ts +0 -278
  1276. package/dist/server/forge/types.js +0 -2
  1277. package/dist/server/forge/types.js.map +0 -1
  1278. package/dist/server/fs-browse.d.ts +0 -82
  1279. package/dist/server/fs-browse.js +0 -217
  1280. package/dist/server/fs-browse.js.map +0 -1
  1281. package/dist/server/git-changes.d.ts +0 -205
  1282. package/dist/server/git-changes.js +0 -531
  1283. package/dist/server/git-changes.js.map +0 -1
  1284. package/dist/server/git.d.ts +0 -52
  1285. package/dist/server/git.js +0 -174
  1286. package/dist/server/git.js.map +0 -1
  1287. package/dist/server/home-recovery-routes.d.ts +0 -171
  1288. package/dist/server/home-recovery-routes.js +0 -56
  1289. package/dist/server/home-recovery-routes.js.map +0 -1
  1290. package/dist/server/launch-key.d.ts +0 -5
  1291. package/dist/server/launch-key.js +0 -35
  1292. package/dist/server/launch-key.js.map +0 -1
  1293. package/dist/server/live-routes.d.ts +0 -73
  1294. package/dist/server/live-routes.js +0 -161
  1295. package/dist/server/live-routes.js.map +0 -1
  1296. package/dist/server/open-in-app.d.ts +0 -57
  1297. package/dist/server/open-in-app.js +0 -178
  1298. package/dist/server/open-in-app.js.map +0 -1
  1299. package/dist/server/open-in-targets.d.ts +0 -53
  1300. package/dist/server/open-in-targets.js +0 -112
  1301. package/dist/server/open-in-targets.js.map +0 -1
  1302. package/dist/server/open-in-terminal.d.ts +0 -73
  1303. package/dist/server/open-in-terminal.js +0 -160
  1304. package/dist/server/open-in-terminal.js.map +0 -1
  1305. package/dist/server/preview-cdp-socket.d.ts +0 -21
  1306. package/dist/server/preview-cdp-socket.js +0 -112
  1307. package/dist/server/preview-cdp-socket.js.map +0 -1
  1308. package/dist/server/preview-socket.d.ts +0 -36
  1309. package/dist/server/preview-socket.js +0 -142
  1310. package/dist/server/preview-socket.js.map +0 -1
  1311. package/dist/server/preview-sockets.d.ts +0 -14
  1312. package/dist/server/preview-sockets.js +0 -18
  1313. package/dist/server/preview-sockets.js.map +0 -1
  1314. package/dist/server/project-context.d.ts +0 -218
  1315. package/dist/server/project-context.js +0 -524
  1316. package/dist/server/project-context.js.map +0 -1
  1317. package/dist/server/project-run-files.d.ts +0 -13
  1318. package/dist/server/project-run-files.js +0 -52
  1319. package/dist/server/project-run-files.js.map +0 -1
  1320. package/dist/server/provider-action-gate.d.ts +0 -5
  1321. package/dist/server/provider-action-gate.js +0 -28
  1322. package/dist/server/provider-action-gate.js.map +0 -1
  1323. package/dist/server/provider-auth-runtime.d.ts +0 -34
  1324. package/dist/server/provider-auth-runtime.js +0 -118
  1325. package/dist/server/provider-auth-runtime.js.map +0 -1
  1326. package/dist/server/repo-branch-forge.d.ts +0 -61
  1327. package/dist/server/repo-branch-forge.js +0 -158
  1328. package/dist/server/repo-branch-forge.js.map +0 -1
  1329. package/dist/server/repo-branch-sweep.d.ts +0 -21
  1330. package/dist/server/repo-branch-sweep.js +0 -64
  1331. package/dist/server/repo-branch-sweep.js.map +0 -1
  1332. package/dist/server/repo-branches.d.ts +0 -103
  1333. package/dist/server/repo-branches.js +0 -804
  1334. package/dist/server/repo-branches.js.map +0 -1
  1335. package/dist/server/repo-pull.d.ts +0 -18
  1336. package/dist/server/repo-pull.js +0 -97
  1337. package/dist/server/repo-pull.js.map +0 -1
  1338. package/dist/server/reports-api.d.ts +0 -90
  1339. package/dist/server/reports-api.js +0 -21
  1340. package/dist/server/reports-api.js.map +0 -1
  1341. package/dist/server/reports-topic.d.ts +0 -5
  1342. package/dist/server/reports-topic.js +0 -37
  1343. package/dist/server/reports-topic.js.map +0 -1
  1344. package/dist/server/run-checkout.d.ts +0 -56
  1345. package/dist/server/run-checkout.js +0 -141
  1346. package/dist/server/run-checkout.js.map +0 -1
  1347. package/dist/server/run-event-feed.d.ts +0 -20
  1348. package/dist/server/run-event-feed.js +0 -203
  1349. package/dist/server/run-event-feed.js.map +0 -1
  1350. package/dist/server/self-update-routes.d.ts +0 -308
  1351. package/dist/server/self-update-routes.js +0 -80
  1352. package/dist/server/self-update-routes.js.map +0 -1
  1353. package/dist/server/server-deps.d.ts +0 -40
  1354. package/dist/server/server-deps.js +0 -132
  1355. package/dist/server/server-deps.js.map +0 -1
  1356. package/dist/server/server.d.ts +0 -35332
  1357. package/dist/server/server.js +0 -5046
  1358. package/dist/server/server.js.map +0 -1
  1359. package/dist/server/skill-sources.d.ts +0 -264
  1360. package/dist/server/skill-sources.js +0 -130
  1361. package/dist/server/skill-sources.js.map +0 -1
  1362. package/dist/server/start-run-options.d.ts +0 -84
  1363. package/dist/server/start-run-options.js +0 -114
  1364. package/dist/server/start-run-options.js.map +0 -1
  1365. package/dist/server/static-ui.d.ts +0 -49
  1366. package/dist/server/static-ui.js +0 -99
  1367. package/dist/server/static-ui.js.map +0 -1
  1368. package/dist/server/upgrade-router.d.ts +0 -23
  1369. package/dist/server/upgrade-router.js +0 -53
  1370. package/dist/server/upgrade-router.js.map +0 -1
  1371. package/dist/server/validators.d.ts +0 -80
  1372. package/dist/server/validators.js +0 -85
  1373. package/dist/server/validators.js.map +0 -1
  1374. package/dist/server/workflow-files.d.ts +0 -9
  1375. package/dist/server/workflow-files.js +0 -27
  1376. package/dist/server/workflow-files.js.map +0 -1
  1377. package/dist/server/workspace-config-patch.d.ts +0 -11
  1378. package/dist/server/workspace-config-patch.js +0 -75
  1379. package/dist/server/workspace-config-patch.js.map +0 -1
  1380. package/dist/server/workspace-live-routes.d.ts +0 -222
  1381. package/dist/server/workspace-live-routes.js +0 -8
  1382. package/dist/server/workspace-live-routes.js.map +0 -1
  1383. package/dist/server/workspace-projects.d.ts +0 -51
  1384. package/dist/server/workspace-projects.js +0 -160
  1385. package/dist/server/workspace-projects.js.map +0 -1
  1386. package/dist/server/workspace-run-feed.d.ts +0 -66
  1387. package/dist/server/workspace-run-feed.js +0 -171
  1388. package/dist/server/workspace-run-feed.js.map +0 -1
  1389. package/dist/server/ws.d.ts +0 -80
  1390. package/dist/server/ws.js +0 -280
  1391. package/dist/server/ws.js.map +0 -1
  1392. package/dist/server/wsl.d.ts +0 -25
  1393. package/dist/server/wsl.js +0 -92
  1394. package/dist/server/wsl.js.map +0 -1
  1395. package/dist/server-command.d.ts +0 -53
  1396. package/dist/server-command.js +0 -180
  1397. package/dist/server-command.js.map +0 -1
  1398. package/dist/server-install/engine.d.ts +0 -51
  1399. package/dist/server-install/engine.js +0 -358
  1400. package/dist/server-install/engine.js.map +0 -1
  1401. package/dist/server-install/group-migrate.d.ts +0 -26
  1402. package/dist/server-install/group-migrate.js +0 -241
  1403. package/dist/server-install/group-migrate.js.map +0 -1
  1404. package/dist/server-install/migrate-cli.d.ts +0 -12
  1405. package/dist/server-install/migrate-cli.js +0 -44
  1406. package/dist/server-install/migrate-cli.js.map +0 -1
  1407. package/dist/server-install/migrate-journal.d.ts +0 -15
  1408. package/dist/server-install/migrate-journal.js +0 -48
  1409. package/dist/server-install/migrate-journal.js.map +0 -1
  1410. package/dist/server-install/migration-report.d.ts +0 -3
  1411. package/dist/server-install/migration-report.js +0 -21
  1412. package/dist/server-install/migration-report.js.map +0 -1
  1413. package/dist/server-install/npx-cache.d.ts +0 -34
  1414. package/dist/server-install/npx-cache.js +0 -142
  1415. package/dist/server-install/npx-cache.js.map +0 -1
  1416. package/dist/server-install/platforms/macosx-launchd-files.d.ts +0 -11
  1417. package/dist/server-install/platforms/macosx-launchd-files.js +0 -60
  1418. package/dist/server-install/platforms/macosx-launchd-files.js.map +0 -1
  1419. package/dist/server-install/platforms/macosx-migration.d.ts +0 -17
  1420. package/dist/server-install/platforms/macosx-migration.js +0 -239
  1421. package/dist/server-install/platforms/macosx-migration.js.map +0 -1
  1422. package/dist/server-install/platforms/macosx-ngrok.d.ts +0 -12
  1423. package/dist/server-install/platforms/macosx-ngrok.js +0 -490
  1424. package/dist/server-install/platforms/macosx-ngrok.js.map +0 -1
  1425. package/dist/server-install/platforms/service-env.d.ts +0 -4
  1426. package/dist/server-install/platforms/service-env.js +0 -17
  1427. package/dist/server-install/platforms/service-env.js.map +0 -1
  1428. package/dist/server-install/platforms/ubuntu-vps-files.d.ts +0 -18
  1429. package/dist/server-install/platforms/ubuntu-vps-files.js +0 -43
  1430. package/dist/server-install/platforms/ubuntu-vps-files.js.map +0 -1
  1431. package/dist/server-install/platforms/ubuntu-vps-migration.d.ts +0 -26
  1432. package/dist/server-install/platforms/ubuntu-vps-migration.js +0 -391
  1433. package/dist/server-install/platforms/ubuntu-vps-migration.js.map +0 -1
  1434. package/dist/server-install/platforms/ubuntu-vps-names.d.ts +0 -30
  1435. package/dist/server-install/platforms/ubuntu-vps-names.js +0 -50
  1436. package/dist/server-install/platforms/ubuntu-vps-names.js.map +0 -1
  1437. package/dist/server-install/platforms/ubuntu-vps-redeploy.d.ts +0 -42
  1438. package/dist/server-install/platforms/ubuntu-vps-redeploy.js +0 -127
  1439. package/dist/server-install/platforms/ubuntu-vps-redeploy.js.map +0 -1
  1440. package/dist/server-install/platforms/ubuntu-vps.d.ts +0 -57
  1441. package/dist/server-install/platforms/ubuntu-vps.js +0 -945
  1442. package/dist/server-install/platforms/ubuntu-vps.js.map +0 -1
  1443. package/dist/server-install/state.d.ts +0 -51
  1444. package/dist/server-install/state.js +0 -177
  1445. package/dist/server-install/state.js.map +0 -1
  1446. package/dist/server-install/steps.d.ts +0 -108
  1447. package/dist/server-install/steps.js +0 -348
  1448. package/dist/server-install/steps.js.map +0 -1
  1449. package/dist/server-install/strategies.d.ts +0 -6
  1450. package/dist/server-install/strategies.js +0 -24
  1451. package/dist/server-install/strategies.js.map +0 -1
  1452. package/dist/server-install/types.d.ts +0 -316
  1453. package/dist/server-install/types.js +0 -118
  1454. package/dist/server-install/types.js.map +0 -1
  1455. package/dist/server-install/ui.d.ts +0 -36
  1456. package/dist/server-install/ui.js +0 -130
  1457. package/dist/server-install/ui.js.map +0 -1
  1458. package/dist/session-context.d.ts +0 -66
  1459. package/dist/session-context.js +0 -266
  1460. package/dist/session-context.js.map +0 -1
  1461. package/dist/skills-provision.d.ts +0 -64
  1462. package/dist/skills-provision.js +0 -325
  1463. package/dist/skills-provision.js.map +0 -1
  1464. package/dist/skills-remote.d.ts +0 -144
  1465. package/dist/skills-remote.js +0 -847
  1466. package/dist/skills-remote.js.map +0 -1
  1467. package/dist/skills.d.ts +0 -81
  1468. package/dist/skills.js +0 -288
  1469. package/dist/skills.js.map +0 -1
  1470. package/dist/subcommands.d.ts +0 -12
  1471. package/dist/subcommands.js +0 -59
  1472. package/dist/subcommands.js.map +0 -1
  1473. package/dist/task-cli/cli.d.ts +0 -39
  1474. package/dist/task-cli/cli.js +0 -773
  1475. package/dist/task-cli/cli.js.map +0 -1
  1476. package/dist/task-cli/discovery.d.ts +0 -32
  1477. package/dist/task-cli/discovery.js +0 -133
  1478. package/dist/task-cli/discovery.js.map +0 -1
  1479. package/dist/task-cli/hint.d.ts +0 -20
  1480. package/dist/task-cli/hint.js +0 -15
  1481. package/dist/task-cli/hint.js.map +0 -1
  1482. package/dist/task-cli/http.d.ts +0 -42
  1483. package/dist/task-cli/http.js +0 -110
  1484. package/dist/task-cli/http.js.map +0 -1
  1485. package/dist/task-cli/projections.d.ts +0 -68
  1486. package/dist/task-cli/projections.js +0 -76
  1487. package/dist/task-cli/projections.js.map +0 -1
  1488. package/dist/task-cli/watch.d.ts +0 -119
  1489. package/dist/task-cli/watch.js +0 -494
  1490. package/dist/task-cli/watch.js.map +0 -1
  1491. package/dist/ui-state.d.ts +0 -41
  1492. package/dist/ui-state.js +0 -93
  1493. package/dist/ui-state.js.map +0 -1
  1494. package/dist/update-check.d.ts +0 -2
  1495. package/dist/update-check.js +0 -28
  1496. package/dist/update-check.js.map +0 -1
  1497. package/dist/use-command-notice.d.ts +0 -1
  1498. package/dist/use-command-notice.js +0 -6
  1499. package/dist/use-command-notice.js.map +0 -1
  1500. package/dist/voice/decide.d.ts +0 -35
  1501. package/dist/voice/decide.js +0 -329
  1502. package/dist/voice/decide.js.map +0 -1
  1503. package/dist/voice/decision-log.d.ts +0 -48
  1504. package/dist/voice/decision-log.js +0 -117
  1505. package/dist/voice/decision-log.js.map +0 -1
  1506. package/dist/voice/engine.d.ts +0 -119
  1507. package/dist/voice/engine.js +0 -61
  1508. package/dist/voice/engine.js.map +0 -1
  1509. package/dist/voice/fake-engine.d.ts +0 -10
  1510. package/dist/voice/fake-engine.js +0 -192
  1511. package/dist/voice/fake-engine.js.map +0 -1
  1512. package/dist/voice/jev-engine.d.ts +0 -17
  1513. package/dist/voice/jev-engine.js +0 -110
  1514. package/dist/voice/jev-engine.js.map +0 -1
  1515. package/dist/voice/pending-ask.d.ts +0 -17
  1516. package/dist/voice/pending-ask.js +0 -51
  1517. package/dist/voice/pending-ask.js.map +0 -1
  1518. package/dist/voice/routes.d.ts +0 -115
  1519. package/dist/voice/routes.js +0 -92
  1520. package/dist/voice/routes.js.map +0 -1
  1521. package/dist/voice/sentence.d.ts +0 -21
  1522. package/dist/voice/sentence.js +0 -61
  1523. package/dist/voice/sentence.js.map +0 -1
  1524. package/dist/voice/thresholds.d.ts +0 -28
  1525. package/dist/voice/thresholds.js +0 -29
  1526. package/dist/voice/thresholds.js.map +0 -1
  1527. package/dist/webhooks/cli.d.ts +0 -18
  1528. package/dist/webhooks/cli.js +0 -127
  1529. package/dist/webhooks/cli.js.map +0 -1
  1530. package/dist/webhooks/prompt.d.ts +0 -5
  1531. package/dist/webhooks/prompt.js +0 -26
  1532. package/dist/webhooks/prompt.js.map +0 -1
  1533. package/dist/workflows/active-run.d.ts +0 -46
  1534. package/dist/workflows/active-run.js +0 -46
  1535. package/dist/workflows/active-run.js.map +0 -1
  1536. package/dist/workflows/attachment-path.d.ts +0 -6
  1537. package/dist/workflows/attachment-path.js +0 -40
  1538. package/dist/workflows/attachment-path.js.map +0 -1
  1539. package/dist/workflows/completion-policy.d.ts +0 -98
  1540. package/dist/workflows/completion-policy.js +0 -76
  1541. package/dist/workflows/completion-policy.js.map +0 -1
  1542. package/dist/workflows/continuation-admission.d.ts +0 -1229
  1543. package/dist/workflows/continuation-admission.js +0 -277
  1544. package/dist/workflows/continuation-admission.js.map +0 -1
  1545. package/dist/workflows/execution-account.d.ts +0 -13
  1546. package/dist/workflows/execution-account.js +0 -18
  1547. package/dist/workflows/execution-account.js.map +0 -1
  1548. package/dist/workflows/grouped-command.d.ts +0 -31
  1549. package/dist/workflows/grouped-command.js +0 -147
  1550. package/dist/workflows/grouped-command.js.map +0 -1
  1551. package/dist/workflows/input-acknowledgement.d.ts +0 -233
  1552. package/dist/workflows/input-acknowledgement.js +0 -41
  1553. package/dist/workflows/input-acknowledgement.js.map +0 -1
  1554. package/dist/workflows/line-order.d.ts +0 -5
  1555. package/dist/workflows/line-order.js +0 -25
  1556. package/dist/workflows/line-order.js.map +0 -1
  1557. package/dist/workflows/load.d.ts +0 -19
  1558. package/dist/workflows/load.js +0 -74
  1559. package/dist/workflows/load.js.map +0 -1
  1560. package/dist/workflows/outcome-batches.d.ts +0 -32
  1561. package/dist/workflows/outcome-batches.js +0 -55
  1562. package/dist/workflows/outcome-batches.js.map +0 -1
  1563. package/dist/workflows/pasted-content.d.ts +0 -60
  1564. package/dist/workflows/pasted-content.js +0 -69
  1565. package/dist/workflows/pasted-content.js.map +0 -1
  1566. package/dist/workflows/question-routing.d.ts +0 -16
  1567. package/dist/workflows/question-routing.js +0 -28
  1568. package/dist/workflows/question-routing.js.map +0 -1
  1569. package/dist/workflows/run/attachment-writer.d.ts +0 -34
  1570. package/dist/workflows/run/attachment-writer.js +0 -98
  1571. package/dist/workflows/run/attachment-writer.js.map +0 -1
  1572. package/dist/workflows/run/auto-resume.d.ts +0 -91
  1573. package/dist/workflows/run/auto-resume.js +0 -247
  1574. package/dist/workflows/run/auto-resume.js.map +0 -1
  1575. package/dist/workflows/run/cezar-tools.d.ts +0 -45
  1576. package/dist/workflows/run/cezar-tools.js +0 -117
  1577. package/dist/workflows/run/cezar-tools.js.map +0 -1
  1578. package/dist/workflows/run/completion-gate.d.ts +0 -77
  1579. package/dist/workflows/run/completion-gate.js +0 -93
  1580. package/dist/workflows/run/completion-gate.js.map +0 -1
  1581. package/dist/workflows/run/compose.d.ts +0 -181
  1582. package/dist/workflows/run/compose.js +0 -413
  1583. package/dist/workflows/run/compose.js.map +0 -1
  1584. package/dist/workflows/run/constants.d.ts +0 -48
  1585. package/dist/workflows/run/constants.js +0 -49
  1586. package/dist/workflows/run/constants.js.map +0 -1
  1587. package/dist/workflows/run/continuation-acceptance.d.ts +0 -70
  1588. package/dist/workflows/run/continuation-acceptance.js +0 -188
  1589. package/dist/workflows/run/continuation-acceptance.js.map +0 -1
  1590. package/dist/workflows/run/continuation-session.d.ts +0 -130
  1591. package/dist/workflows/run/continuation-session.js +0 -597
  1592. package/dist/workflows/run/continuation-session.js.map +0 -1
  1593. package/dist/workflows/run/drop-active.d.ts +0 -4
  1594. package/dist/workflows/run/drop-active.js +0 -11
  1595. package/dist/workflows/run/drop-active.js.map +0 -1
  1596. package/dist/workflows/run/family-reconciler.d.ts +0 -78
  1597. package/dist/workflows/run/family-reconciler.js +0 -308
  1598. package/dist/workflows/run/family-reconciler.js.map +0 -1
  1599. package/dist/workflows/run/human-waits.d.ts +0 -85
  1600. package/dist/workflows/run/human-waits.js +0 -162
  1601. package/dist/workflows/run/human-waits.js.map +0 -1
  1602. package/dist/workflows/run/inbox-claims.d.ts +0 -38
  1603. package/dist/workflows/run/inbox-claims.js +0 -107
  1604. package/dist/workflows/run/inbox-claims.js.map +0 -1
  1605. package/dist/workflows/run/input-batch.d.ts +0 -15
  1606. package/dist/workflows/run/input-batch.js +0 -32
  1607. package/dist/workflows/run/input-batch.js.map +0 -1
  1608. package/dist/workflows/run/input-delivery.d.ts +0 -202
  1609. package/dist/workflows/run/input-delivery.js +0 -817
  1610. package/dist/workflows/run/input-delivery.js.map +0 -1
  1611. package/dist/workflows/run/input-receipts.d.ts +0 -65
  1612. package/dist/workflows/run/input-receipts.js +0 -220
  1613. package/dist/workflows/run/input-receipts.js.map +0 -1
  1614. package/dist/workflows/run/input-timers.d.ts +0 -10
  1615. package/dist/workflows/run/input-timers.js +0 -32
  1616. package/dist/workflows/run/input-timers.js.map +0 -1
  1617. package/dist/workflows/run/launch-context.d.ts +0 -62
  1618. package/dist/workflows/run/launch-context.js +0 -119
  1619. package/dist/workflows/run/launch-context.js.map +0 -1
  1620. package/dist/workflows/run/launch-read-resolver.d.ts +0 -510
  1621. package/dist/workflows/run/launch-read-resolver.js +0 -658
  1622. package/dist/workflows/run/launch-read-resolver.js.map +0 -1
  1623. package/dist/workflows/run/launch-settings.d.ts +0 -10
  1624. package/dist/workflows/run/launch-settings.js +0 -11
  1625. package/dist/workflows/run/launch-settings.js.map +0 -1
  1626. package/dist/workflows/run/live-session-state.d.ts +0 -49
  1627. package/dist/workflows/run/live-session-state.js +0 -83
  1628. package/dist/workflows/run/live-session-state.js.map +0 -1
  1629. package/dist/workflows/run/maintenance-claims.d.ts +0 -47
  1630. package/dist/workflows/run/maintenance-claims.js +0 -83
  1631. package/dist/workflows/run/maintenance-claims.js.map +0 -1
  1632. package/dist/workflows/run/memory-guard.d.ts +0 -25
  1633. package/dist/workflows/run/memory-guard.js +0 -64
  1634. package/dist/workflows/run/memory-guard.js.map +0 -1
  1635. package/dist/workflows/run/opening.d.ts +0 -30
  1636. package/dist/workflows/run/opening.js +0 -6
  1637. package/dist/workflows/run/opening.js.map +0 -1
  1638. package/dist/workflows/run/pending-ask-facts.d.ts +0 -10
  1639. package/dist/workflows/run/pending-ask-facts.js +0 -19
  1640. package/dist/workflows/run/pending-ask-facts.js.map +0 -1
  1641. package/dist/workflows/run/prompts.d.ts +0 -74
  1642. package/dist/workflows/run/prompts.js +0 -140
  1643. package/dist/workflows/run/prompts.js.map +0 -1
  1644. package/dist/workflows/run/queued-input.d.ts +0 -108
  1645. package/dist/workflows/run/queued-input.js +0 -249
  1646. package/dist/workflows/run/queued-input.js.map +0 -1
  1647. package/dist/workflows/run/queued-revival.d.ts +0 -44
  1648. package/dist/workflows/run/queued-revival.js +0 -124
  1649. package/dist/workflows/run/queued-revival.js.map +0 -1
  1650. package/dist/workflows/run/readonly-collections.d.ts +0 -24
  1651. package/dist/workflows/run/readonly-collections.js +0 -33
  1652. package/dist/workflows/run/readonly-collections.js.map +0 -1
  1653. package/dist/workflows/run/repo-root-lease.d.ts +0 -34
  1654. package/dist/workflows/run/repo-root-lease.js +0 -71
  1655. package/dist/workflows/run/repo-root-lease.js.map +0 -1
  1656. package/dist/workflows/run/resolved-wait-input-batch.d.ts +0 -7
  1657. package/dist/workflows/run/resolved-wait-input-batch.js +0 -23
  1658. package/dist/workflows/run/resolved-wait-input-batch.js.map +0 -1
  1659. package/dist/workflows/run/run-cancel.d.ts +0 -36
  1660. package/dist/workflows/run/run-cancel.js +0 -130
  1661. package/dist/workflows/run/run-cancel.js.map +0 -1
  1662. package/dist/workflows/run/run-finish.d.ts +0 -72
  1663. package/dist/workflows/run/run-finish.js +0 -255
  1664. package/dist/workflows/run/run-finish.js.map +0 -1
  1665. package/dist/workflows/run/run-guards.d.ts +0 -15
  1666. package/dist/workflows/run/run-guards.js +0 -39
  1667. package/dist/workflows/run/run-guards.js.map +0 -1
  1668. package/dist/workflows/run/run-line.d.ts +0 -187
  1669. package/dist/workflows/run/run-line.js +0 -437
  1670. package/dist/workflows/run/run-line.js.map +0 -1
  1671. package/dist/workflows/run/run-recovery.d.ts +0 -116
  1672. package/dist/workflows/run/run-recovery.js +0 -421
  1673. package/dist/workflows/run/run-recovery.js.map +0 -1
  1674. package/dist/workflows/run/run-settlement.d.ts +0 -177
  1675. package/dist/workflows/run/run-settlement.js +0 -504
  1676. package/dist/workflows/run/run-settlement.js.map +0 -1
  1677. package/dist/workflows/run/run-skills.d.ts +0 -114
  1678. package/dist/workflows/run/run-skills.js +0 -233
  1679. package/dist/workflows/run/run-skills.js.map +0 -1
  1680. package/dist/workflows/run/run-start.d.ts +0 -64
  1681. package/dist/workflows/run/run-start.js +0 -126
  1682. package/dist/workflows/run/run-start.js.map +0 -1
  1683. package/dist/workflows/run/run-workspace.d.ts +0 -25
  1684. package/dist/workflows/run/run-workspace.js +0 -66
  1685. package/dist/workflows/run/run-workspace.js.map +0 -1
  1686. package/dist/workflows/run/session-events.d.ts +0 -155
  1687. package/dist/workflows/run/session-events.js +0 -282
  1688. package/dist/workflows/run/session-events.js.map +0 -1
  1689. package/dist/workflows/run/step-decisions.d.ts +0 -37
  1690. package/dist/workflows/run/step-decisions.js +0 -43
  1691. package/dist/workflows/run/step-decisions.js.map +0 -1
  1692. package/dist/workflows/run/step-loop.d.ts +0 -143
  1693. package/dist/workflows/run/step-loop.js +0 -488
  1694. package/dist/workflows/run/step-loop.js.map +0 -1
  1695. package/dist/workflows/run/step-session.d.ts +0 -65
  1696. package/dist/workflows/run/step-session.js +0 -280
  1697. package/dist/workflows/run/step-session.js.map +0 -1
  1698. package/dist/workflows/run/steps.d.ts +0 -13
  1699. package/dist/workflows/run/steps.js +0 -14
  1700. package/dist/workflows/run/steps.js.map +0 -1
  1701. package/dist/workflows/run/subagent-waits.d.ts +0 -138
  1702. package/dist/workflows/run/subagent-waits.js +0 -304
  1703. package/dist/workflows/run/subagent-waits.js.map +0 -1
  1704. package/dist/workflows/run/tracked-work.d.ts +0 -12
  1705. package/dist/workflows/run/tracked-work.js +0 -29
  1706. package/dist/workflows/run/tracked-work.js.map +0 -1
  1707. package/dist/workflows/run/turn-bookkeeping.d.ts +0 -67
  1708. package/dist/workflows/run/turn-bookkeeping.js +0 -173
  1709. package/dist/workflows/run/turn-bookkeeping.js.map +0 -1
  1710. package/dist/workflows/run/turn-boundary.d.ts +0 -215
  1711. package/dist/workflows/run/turn-boundary.js +0 -329
  1712. package/dist/workflows/run/turn-boundary.js.map +0 -1
  1713. package/dist/workflows/run/turn-markers.d.ts +0 -62
  1714. package/dist/workflows/run/turn-markers.js +0 -86
  1715. package/dist/workflows/run/turn-markers.js.map +0 -1
  1716. package/dist/workflows/run/turn-nudges.d.ts +0 -104
  1717. package/dist/workflows/run/turn-nudges.js +0 -243
  1718. package/dist/workflows/run/turn-nudges.js.map +0 -1
  1719. package/dist/workflows/run/turn-settler.d.ts +0 -161
  1720. package/dist/workflows/run/turn-settler.js +0 -468
  1721. package/dist/workflows/run/turn-settler.js.map +0 -1
  1722. package/dist/workflows/run/types.d.ts +0 -293
  1723. package/dist/workflows/run/types.js +0 -2
  1724. package/dist/workflows/run/types.js.map +0 -1
  1725. package/dist/workflows/run/usage-accounting.d.ts +0 -49
  1726. package/dist/workflows/run/usage-accounting.js +0 -213
  1727. package/dist/workflows/run/usage-accounting.js.map +0 -1
  1728. package/dist/workflows/run/wait-engine.d.ts +0 -1210
  1729. package/dist/workflows/run/wait-engine.js +0 -455
  1730. package/dist/workflows/run/wait-engine.js.map +0 -1
  1731. package/dist/workflows/run/wait-kinds.d.ts +0 -336
  1732. package/dist/workflows/run/wait-kinds.js +0 -470
  1733. package/dist/workflows/run/wait-kinds.js.map +0 -1
  1734. package/dist/workflows/run/wait-registration-tool.d.ts +0 -3
  1735. package/dist/workflows/run/wait-registration-tool.js +0 -68
  1736. package/dist/workflows/run/wait-registration-tool.js.map +0 -1
  1737. package/dist/workflows/run/wait-registration.d.ts +0 -7
  1738. package/dist/workflows/run/wait-registration.js +0 -39
  1739. package/dist/workflows/run/wait-registration.js.map +0 -1
  1740. package/dist/workflows/run/wait-registry.d.ts +0 -120
  1741. package/dist/workflows/run/wait-registry.js +0 -365
  1742. package/dist/workflows/run/wait-registry.js.map +0 -1
  1743. package/dist/workflows/run/wait-watches.d.ts +0 -13
  1744. package/dist/workflows/run/wait-watches.js +0 -12
  1745. package/dist/workflows/run/wait-watches.js.map +0 -1
  1746. package/dist/workflows/run/wake-admission.d.ts +0 -150
  1747. package/dist/workflows/run/wake-admission.js +0 -397
  1748. package/dist/workflows/run/wake-admission.js.map +0 -1
  1749. package/dist/workflows/run/wake-ledger.d.ts +0 -61
  1750. package/dist/workflows/run/wake-ledger.js +0 -78
  1751. package/dist/workflows/run/wake-ledger.js.map +0 -1
  1752. package/dist/workflows/run/wake-retries.d.ts +0 -31
  1753. package/dist/workflows/run/wake-retries.js +0 -93
  1754. package/dist/workflows/run/wake-retries.js.map +0 -1
  1755. package/dist/workflows/run/worker-executions.d.ts +0 -54
  1756. package/dist/workflows/run/worker-executions.js +0 -148
  1757. package/dist/workflows/run/worker-executions.js.map +0 -1
  1758. package/dist/workflows/run/worker-orphans.d.ts +0 -91
  1759. package/dist/workflows/run/worker-orphans.js +0 -275
  1760. package/dist/workflows/run/worker-orphans.js.map +0 -1
  1761. package/dist/workflows/run/worker-questions.d.ts +0 -169
  1762. package/dist/workflows/run/worker-questions.js +0 -462
  1763. package/dist/workflows/run/worker-questions.js.map +0 -1
  1764. package/dist/workflows/run/workflow-position.d.ts +0 -7
  1765. package/dist/workflows/run/workflow-position.js +0 -9
  1766. package/dist/workflows/run/workflow-position.js.map +0 -1
  1767. package/dist/workflows/run/worktree-autosave.d.ts +0 -48
  1768. package/dist/workflows/run/worktree-autosave.js +0 -175
  1769. package/dist/workflows/run/worktree-autosave.js.map +0 -1
  1770. package/dist/workflows/run-scheduling.d.ts +0 -38
  1771. package/dist/workflows/run-scheduling.js +0 -76
  1772. package/dist/workflows/run-scheduling.js.map +0 -1
  1773. package/dist/workflows/run-states.d.ts +0 -73
  1774. package/dist/workflows/run-states.js +0 -233
  1775. package/dist/workflows/run-states.js.map +0 -1
  1776. package/dist/workflows/run.d.ts +0 -275
  1777. package/dist/workflows/run.js +0 -626
  1778. package/dist/workflows/run.js.map +0 -1
  1779. package/dist/workflows/turn-end.d.ts +0 -119
  1780. package/dist/workflows/turn-end.js +0 -74
  1781. package/dist/workflows/turn-end.js.map +0 -1
  1782. package/dist/workflows/types.d.ts +0 -83
  1783. package/dist/workflows/types.js +0 -192
  1784. package/dist/workflows/types.js.map +0 -1
  1785. package/dist/workflows/wait-scope.d.ts +0 -75
  1786. package/dist/workflows/wait-scope.js +0 -115
  1787. package/dist/workflows/wait-scope.js.map +0 -1
  1788. package/dist/workflows/waits.d.ts +0 -58
  1789. package/dist/workflows/waits.js +0 -89
  1790. package/dist/workflows/waits.js.map +0 -1
  1791. package/dist/workspace/agent-accounts.d.ts +0 -135
  1792. package/dist/workspace/agent-accounts.js +0 -352
  1793. package/dist/workspace/agent-accounts.js.map +0 -1
  1794. package/dist/workspace/agent-profiles.d.ts +0 -125
  1795. package/dist/workspace/agent-profiles.js +0 -190
  1796. package/dist/workspace/agent-profiles.js.map +0 -1
  1797. package/dist/workspace/backup-cli.d.ts +0 -9
  1798. package/dist/workspace/backup-cli.js +0 -146
  1799. package/dist/workspace/backup-cli.js.map +0 -1
  1800. package/dist/workspace/backups.d.ts +0 -36
  1801. package/dist/workspace/backups.js +0 -248
  1802. package/dist/workspace/backups.js.map +0 -1
  1803. package/dist/workspace/config.d.ts +0 -179
  1804. package/dist/workspace/config.js +0 -395
  1805. package/dist/workspace/config.js.map +0 -1
  1806. package/dist/workspace/migrations.d.ts +0 -37
  1807. package/dist/workspace/migrations.js +0 -148
  1808. package/dist/workspace/migrations.js.map +0 -1
  1809. package/dist/workspace/projects-cli.d.ts +0 -27
  1810. package/dist/workspace/projects-cli.js +0 -175
  1811. package/dist/workspace/projects-cli.js.map +0 -1
  1812. package/dist/workspace/projects.d.ts +0 -131
  1813. package/dist/workspace/projects.js +0 -274
  1814. package/dist/workspace/projects.js.map +0 -1
  1815. package/dist/workspace/root-probe-cache.d.ts +0 -10
  1816. package/dist/workspace/root-probe-cache.js +0 -43
  1817. package/dist/workspace/root-probe-cache.js.map +0 -1
  1818. package/dist/workspace/semaphore.d.ts +0 -147
  1819. package/dist/workspace/semaphore.js +0 -196
  1820. package/dist/workspace/semaphore.js.map +0 -1
  1821. package/dist/workspace/ui-state.d.ts +0 -17
  1822. package/dist/workspace/ui-state.js +0 -59
  1823. package/dist/workspace/ui-state.js.map +0 -1
  1824. package/dist/workspace/webhooks.d.ts +0 -40
  1825. package/dist/workspace/webhooks.js +0 -146
  1826. package/dist/workspace/webhooks.js.map +0 -1
  1827. package/dist/worktree-manifest.d.ts +0 -165
  1828. package/dist/worktree-manifest.js +0 -535
  1829. package/dist/worktree-manifest.js.map +0 -1
  1830. package/dist/worktree-setup.d.ts +0 -88
  1831. package/dist/worktree-setup.js +0 -170
  1832. package/dist/worktree-setup.js.map +0 -1
  1833. package/scripts/benchmark-family-reconcile.ts +0 -119
  1834. package/scripts/benchmark-home.ts +0 -32
  1835. package/scripts/benchmark-project-probes.mjs +0 -158
  1836. package/scripts/benchmark-run-store-fixture.ts +0 -432
  1837. package/scripts/benchmark-run-store.ts +0 -767
  1838. package/scripts/benchmark-stuck-destroys.ts +0 -144
  1839. package/scripts/benchmark-workspace-events.ts +0 -339
  1840. package/scripts/check-pack.mjs +0 -48
  1841. package/scripts/inline-contract.mjs +0 -165
  1842. package/scripts/install-as-command.mjs +0 -125
  1843. package/scripts/measure-transcript-facts-health.mjs +0 -100
  1844. package/scripts/measure-transcript-facts-lag.mjs +0 -69
  1845. package/scripts/mock-autonomous.mjs +0 -13
  1846. package/scripts/mock-ci-tool.mjs +0 -159
  1847. package/scripts/mock-claude-model-refusal.mjs +0 -76
  1848. package/scripts/mock-claude-subagents.mjs +0 -54
  1849. package/scripts/mock-claude.mjs +0 -800
  1850. package/scripts/mock-codex-app-server.mjs +0 -767
  1851. package/scripts/mock-codex-coalesce-steer.mjs +0 -59
  1852. package/scripts/mock-codex-reverse-steer.mjs +0 -143
  1853. package/scripts/mock-codex-subagents.mjs +0 -52
  1854. package/scripts/mock-controls.d.mts +0 -11
  1855. package/scripts/mock-controls.mjs +0 -13
  1856. package/scripts/mock-cursor-hang-stdin-late.mjs +0 -35
  1857. package/scripts/mock-cursor-hang-stdin.mjs +0 -30
  1858. package/scripts/mock-cursor-print.mjs +0 -237
  1859. package/scripts/mock-deferred-turn-start.mjs +0 -16
  1860. package/scripts/mock-delivery-control.d.mts +0 -23
  1861. package/scripts/mock-delivery-control.mjs +0 -80
  1862. package/scripts/mock-env-record.mjs +0 -11
  1863. package/scripts/mock-failure-control.d.mts +0 -13
  1864. package/scripts/mock-failure-control.mjs +0 -68
  1865. package/scripts/mock-lifecycle.mjs +0 -51
  1866. package/scripts/mock-multi-pr.mjs +0 -10
  1867. package/scripts/mock-nudge.mjs +0 -43
  1868. package/scripts/mock-omp-rpc.mjs +0 -536
  1869. package/scripts/mock-opencode-serve.mjs +0 -1000
  1870. package/scripts/mock-pi-rpc.mjs +0 -421
  1871. package/scripts/mock-publish.mjs +0 -13
  1872. package/scripts/mock-runner-crash.mjs +0 -64
  1873. package/scripts/mock-scenario.d.mts +0 -71
  1874. package/scripts/mock-scenario.mjs +0 -295
  1875. package/scripts/mock-session-context.d.mts +0 -5
  1876. package/scripts/mock-session-context.mjs +0 -56
  1877. package/scripts/mock-silent-tail.mjs +0 -93
  1878. package/scripts/mock-turn-messages.mjs +0 -5
  1879. package/scripts/mock-wire-evidence.config.mjs +0 -12
  1880. package/scripts/mock-wire-recorder.mjs +0 -66
  1881. package/scripts/mock-wire-tools.mjs +0 -7
  1882. package/scripts/omp-ci-wait.mjs +0 -29
  1883. package/scripts/opencode-task-scope.d.mts +0 -18
  1884. package/scripts/opencode-task-scope.mjs +0 -59
  1885. package/scripts/parity-rows.ts +0 -160
  1886. package/scripts/pi-ci-wait.mjs +0 -17
  1887. package/scripts/pi-default-tools.mjs +0 -22
  1888. package/scripts/pi-project-skills.mjs +0 -59
  1889. package/scripts/pi-retry-degraded-service.mjs +0 -16
  1890. package/scripts/probe-cursor-print.mjs +0 -699
  1891. package/scripts/probe-session-env.ts +0 -8
  1892. package/scripts/product-env.mjs +0 -6
  1893. package/scripts/product-identity.mjs +0 -12
  1894. package/scripts/record-mock-wires.mjs +0 -16
  1895. package/scripts/seed-archive-profile.ts +0 -53
  1896. package/scripts/sync-readme.mjs +0 -20
  1897. package/scripts/test-process-usage.mjs +0 -47
  1898. package/scripts/transcript-facts-fixture.mjs +0 -53
  1899. package/scripts/transcript-facts-timing.mjs +0 -42
  1900. package/scripts/voice-replay.ts +0 -50
  1901. package/scripts/windows-workspace-identity.cs +0 -208
  1902. package/scripts/windows-workspace-identity.ps1 +0 -10
  1903. package/web/dist/assets/useQuery-DSoTrqQG.js +0 -1
@@ -1,2 +1,2 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,L as n,S as r,d as i,t as a,u as o}from"./button-DRCTAIzF.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import"./live-refetch-XCxoSAGq.js";import{$n as l,A as u,Hn as d,Jr as ee,Kt as te,er as f,i as p,qt as m,s as h,wr as g}from"./project-scope-context-DDZVS0W-.js";import{$ as ne,$t as _,B as re,Bn as ie,Cn as v,Et as ae,H as y,Hn as oe,J as b,P as se,Qt as x,St as S,U as C,Un as w,Vn as ce,W as le,Zt as ue,an as de,cn as T,et as fe,gt as pe,in as me,n as he,on as ge,rn as _e,rt as E,xn as ve,z as ye}from"./queries-C6in05vw.js";import{n as D}from"./toaster-Dk0xOpec.js";import{a as O,i as k,l as A,n as j,p as M,r as N,t as P}from"./dropdown-menu-C2_BT6YH.js";import{a as be,c as xe,i as Se,n as Ce,o as we,r as F,s as I,t as L}from"./alert-dialog-BJlarNJS.js";import{i as Te,r as Ee,t as De}from"./popover-CiVpqps-.js";import{I as Oe,S as ke,Y as Ae,a as R,m as je,mt as z,st as Me,t as Ne,u as Pe,y as B}from"./design-icons-DmYTv2r1.js";import{a as Fe,c as Ie,i as Le,n as Re,o as ze,s as Be,t as Ve}from"./textarea-ffrAeHUi.js";import{n as He}from"./loader-circle-CZkGEdoI.js";import{t as V}from"./createLucideIcon-BHp8sXmF.js";import{t as Ue}from"./app-window-CSHwDX9N.js";import{t as We}from"./info-DA1x_4bz.js";import{t as Ge}from"./message-square-B-MD-8rD.js";import{a as Ke,n as H,r as qe}from"./control-locations-Cv_zRDaS.js";import{c as Je,s as Ye,t as U}from"./project-router-DudcMzJa.js";import{r as W,t as Xe}from"./markdown-BiGKaTG5.js";import{Dt as Ze,H as G,J as Qe,L as $e,Lt as et,N as tt,Ot as nt,P as rt,V as K,Vt as it,W as at,Y as ot,_ as st,at as ct,g as lt,h as ut,it as dt,j as ft,kt as pt,nn as mt,ot as ht,pt as gt,qt as _t,rt as vt,zt as yt}from"./index-BDNQ4NIe.js";import{t as q}from"./tab-link-ACcEPANz.js";var bt=V(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),xt=V(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),St=V(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),J=e(s(),1),Y=c();function Ct(e){let t=ie();return w({mutationFn:t=>h(oe(e),t),onSuccess:()=>t.invalidateAfter(`runs`,()=>ce()),onError:e=>D(e.message,{tone:`danger`})})}function wt(e){return e.archived?`Unarchive`:`Archive task`}function Tt({run:e,open:t,onOpenChange:n,onConfirm:r}){return(0,Y.jsx)(L,{open:t,onOpenChange:n,children:(0,Y.jsxs)(Se,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(I,{children:[(0,Y.jsx)(xe,{children:`Archive task?`}),(0,Y.jsxs)(be,{children:[`Move “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:v(e),children:v(e)}),`” out of Active tasks. You can restore it from Archived.`]})]}),(0,Y.jsxs)(we,{children:[(0,Y.jsx)(F,{children:`Cancel`}),(0,Y.jsx)(Ce,{className:`bg-accent-strong text-accent-strong-foreground hover:brightness-[0.96]`,onClick:r,children:`Archive task`})]})]})})}function X({run:e,className:t,compactOnMobile:n=!1}){let[r,i]=(0,J.useState)(!1),s=Ct(e.id),c=wt(e);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(a,{type:`button`,variant:`outline`,"data-slot":`archive-action`,"aria-label":c,title:e.archived?`Put this task back in Active tasks`:`Move this task out of Active tasks`,disabled:s.isPending,className:o(`h-11 gap-[7px] px-3`,n&&`max-md:size-11 max-md:px-0`,t),onClick:()=>e.archived?s.mutate(!1):i(!0),children:[e.archived?(0,Y.jsx)(mt,{"aria-hidden":`true`}):(0,Y.jsx)(Ne,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:o(n&&`max-md:sr-only`),children:c})]}),(0,Y.jsx)(Tt,{run:e,open:r,onOpenChange:i,onConfirm:()=>{s.mutate(!0),i(!1)}})]})}function Et({run:e,action:t,prUrl:n,patch:r}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:t.phase===`blocked`?`Completion blocked`:`Completion pending`}),` · `,t.message||(t.phase===`blocked`?`Completion needs attention.`:`Checking completion actions.`)]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&i(n)?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:`Open PR`})}):null,e.autoMergePr?(0,Y.jsx)(a,{variant:`outline`,disabled:r.isPending,onClick:()=>r.mutate({autoMergePr:!1},{onError:e=>D(e.message,{tone:`danger`})}),children:r.isPending?`Saving…`:`Disable auto-merge`}):null]})]})}function Dt({run:e,blocker:t,flags:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:`Archive blocked`}),` · `,t.message]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[t.runId?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(U,{to:`/tasks/${t.runId}`,children:`Open blocking task`})}):null,t.pullRequestUrl&&i(t.pullRequestUrl)?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:t.pullRequestUrl,target:`_blank`,rel:`noopener noreferrer`,children:`Open blocking PR`})}):null,n.archive?(0,Y.jsx)(X,{run:e}):null]})]})}function Ot({run:e}){let t=C(e.id),n=G(e),r=e.status===`done`?e.completionAction:void 0,i=n.archive?e.archiveBlocker:void 0,a=r&&r.phase!==`complete`?r:void 0;if(!a&&!i)return null;let o=e.pullRequestUrl??e.pullRequests?.find(e=>e.url)?.url;return(0,Y.jsxs)(`section`,{"data-slot":`completion-status`,"aria-label":`Completion action`,className:`grid min-w-0 gap-2 rounded-lg border border-border bg-card p-3 [margin-block:0.75rem]`,children:[a?(0,Y.jsx)(Et,{run:e,action:a,prUrl:o,patch:t}):null,i?(0,Y.jsx)(Dt,{run:e,blocker:i,flags:n}):null]})}var kt=[`running`,`queued`,`waiting`];function At(e,{queuePosition:t,now:n=new Date}){let r=d(e),i=r.label.charAt(0).toUpperCase()+r.label.slice(1),a=t===void 0?i:`${i} #${t}`,o=kt.includes(e.status)?Mt(e,n):void 0;return o?{attention:r,label:a,nextCheck:o}:{attention:r,label:a}}function jt(e){return e.nextCheck?`${e.label} · Next check ${e.nextCheck.text}`:e.label}function Mt(e,t){let n;for(let t of Array.isArray(e.waits)?e.waits:[]){if(t?.kind!==`timer`||t.phase!==`open`)continue;let e=new Date(t.deadline);Number.isFinite(e.getTime())&&(!n||e<n)&&(n=e)}if(n)return{at:n.toISOString(),text:He(n,t)}}async function Z(e,t){try{await navigator.clipboard.writeText(e),D(t)}catch{D(`Run manually: ${e}`)}}function Nt(e){let t=b(),n=E(),r=(0,J.useMemo)(()=>T(e,t),[e,t]);return{referenceProjectId:n,repoBase:t,references:r,requests:(0,J.useMemo)(()=>n===void 0?[]:r.filter(e=>ue(e,t)).map(e=>({projectId:n,kind:e.kind,number:e.number})),[r,n,t])}}function Pt(e){return w({mutationFn:()=>m(e.id),onError:e=>{if(e instanceof p&&e.command){Z(e.command,`No terminal found — command copied to clipboard.`);return}D(e.message,{tone:`danger`})}})}function Q(e,t){let n=y(),r=fe(),i=w({mutationFn:t=>te(e.id,t),onError:e=>D(e.message,{tone:`danger`})}),a=g(r.data),o=e=>!r.isSuccess||a.includes(e??`claude`);return{canResumeHere:t&&o($e(e)),choices:e.worktreePath?(n.data?.targets??[]).filter(e=>{let t=dt(e.id);return t===void 0||o(t)}).map(t=>({target:t,...rt(e,t.id)?{suffix:` (resume)`,title:`Resume this run's session`}:{}})):[],open:i}}function Ft({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:o}=Q(e,t),s=K(e);return!r&&i.length===0&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[r||i.length>0?(0,Y.jsxs)(`div`,{className:`task-open-targets flex flex-wrap gap-3`,children:[r?(0,Y.jsxs)(a,{variant:`outline`,"data-target":`terminal-resume`,onClick:n,children:[(0,Y.jsx)(et,{}),`Terminal (resume session)`]}):null,i.map(({target:e,suffix:t,title:n})=>{let r=ct(e);return(0,Y.jsxs)(a,{variant:`outline`,"data-target":e.id,title:n,disabled:o.isPending,onClick:()=>o.mutate(e.id),children:[(0,Y.jsx)(r,{"aria-hidden":`true`}),e.label,t??``]},e.id)}),e.worktreePath?(0,Y.jsxs)(a,{variant:`outline`,onClick:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>D(`Worktree path copied`)).catch(()=>D(`Path: ${t}`))},children:[(0,Y.jsx)(B,{}),`Copy worktree path`]}):null]}):null,s?(0,Y.jsxs)(`div`,{"data-slot":`resume-command`,className:`mt-5 border-t border-border pt-5`,children:[(0,Y.jsx)(`h3`,{className:`text-base font-medium`,children:`Resume in a terminal`}),(0,Y.jsx)(`pre`,{className:`my-4 whitespace-pre-wrap break-all rounded-lg border border-border bg-background p-4 text-xs`,children:s}),(0,Y.jsxs)(a,{variant:`outline`,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{}),`Copy resume command`]})]}):null]})}function It({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:o}=Q(e,t),s=K(e),c=e.worktreePath;if(!r&&i.length===0&&!s&&!c)return null;let l=`max-md:min-h-11`;return(0,Y.jsxs)(`div`,{"data-slot":`workspace-tools`,className:`flex min-w-0 flex-wrap gap-2`,children:[r||i.length>0?(0,Y.jsx)(vt,{choices:i,onPick:e=>o.mutate(e),disabled:o.isPending,triggerVariant:`outline`,className:l,leading:r?(0,Y.jsxs)(k,{"data-target":`terminal-resume`,onSelect:n,children:[(0,Y.jsx)(et,{"aria-hidden":`true`}),`Terminal (resume session)`]}):void 0}):null,c?(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,className:l,onClick:()=>void Z(c,`Worktree path copied`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),`Copy worktree path`]}):null,s?(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`resume-command`,title:s,className:l,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),`Copy resume command`]}):null]})}function Lt({run:e,canResume:t,onResume:n,onOpen:r,onClose:i}){let{canResumeHere:o,choices:s}=Q(e,t);return!o&&s.length===0?null:r?(0,Y.jsx)(k,{onSelect:r,children:`Open in…`}):(0,Y.jsxs)(`section`,{"aria-label":`Open task worktree in…`,className:`task-action-panel my-5 rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Open task worktree in…`}),(0,Y.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Close worktree chooser`,onClick:i,children:(0,Y.jsx)(z,{})})]}),e.worktreePath?(0,Y.jsx)(`p`,{className:`my-4 break-all text-xs text-muted-foreground`,children:e.worktreePath}):null,(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(Ft,{run:e,canResume:t,onResume:n})})]})}function Rt({branch:e}){let[t,n]=(0,J.useState)(null),r=(0,J.useRef)(null);(0,J.useEffect)(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);let i=t===e,a=async()=>{r.current!==null&&clearTimeout(r.current),n(null);try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard unavailable`);await navigator.clipboard.writeText(e),n(e),r.current=setTimeout(()=>n(null),2e3)}catch{D(`Could not copy branch. Select and copy: ${e}`)}};return(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1`,children:[(0,Y.jsx)(`span`,{"data-slot":`branch-chip`,className:`min-w-0 rounded-sm border border-border bg-card px-1.5 py-px font-mono text-[11px] font-medium break-all`,children:e}),(0,Y.jsxs)(`button`,{type:`button`,"aria-label":i?`Copied branch name`:`Copy branch name`,onClick:()=>void a(),className:`inline-flex min-h-11 shrink-0 items-center gap-1 rounded-sm px-2 text-xs font-medium text-foreground hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-link-foreground md:min-h-8`,children:[(0,Y.jsx)(B,{className:`size-3.5`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{"aria-live":`polite`,children:i?`Copied`:`Copy`})]})]})}function zt({run:e}){let t=b(),n=E(),r=r=>n===void 0?void 0:me(n,e.id,r,t),a=(0,J.useMemo)(()=>T(e,t),[e,t]),o=[],s=[],c=a.filter(e=>e.kind===`PR`);for(let t of c)o.push((0,Y.jsx)(H,{reference:t,to:r(t),taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`,conflictAction:(0,Y.jsx)(ft,{run:e,prNumber:t.number})},_(t)));let l=ge(e);l&&i(l)&&!c.some(e=>e.url===l)&&o.push((0,Y.jsx)(H,{reference:{kind:`PR`,url:l},taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`pr`));let u=a.filter(e=>e.kind===`Issue`);for(let t of u)s.push((0,Y.jsx)(H,{reference:t,to:r(t),taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},_(t)));let d=_e(e,t);if(d&&i(d)&&!u.some(e=>e.url===d)){let t=x(d);s.push((0,Y.jsx)(H,{reference:{kind:`Issue`,...t?{number:Number(t)}:{},url:d},to:t?r({kind:`Issue`,number:Number(t),url:d}):void 0,taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`issue`))}return o.length===0&&s.length===0?null:(0,Y.jsx)(`div`,{"data-slot":`linked-references`,className:`flex min-w-0 flex-col gap-3`,children:[[`PR`,`PRs`,o],[`Issue`,`Issues`,s]].map(([e,t,n])=>n.length>0?(0,Y.jsxs)(`div`,{"data-reference-kind":e,className:`grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-center gap-x-2 gap-y-1`,children:[(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,children:t}),(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:n})]},e):null)})}function $(){let e=Ye(),t=ne();return Ze(t.data?.projects?.find(n=>n.id===(e??t.data?.bootProject)))}var Bt=e=>e.map(e=>`${e.name}: ${nt(e.url)}`).join(`
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,L as n,S as r,d as i,t as a,u as o}from"./button-CHUAMTHK.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import"./live-refetch-C0kQc3-z.js";import{$n as l,A as u,Hn as d,Jr as ee,Kt as te,er as f,i as p,qt as m,s as h,wr as g}from"./project-scope-context-CaUqlAd7.js";import{$ as ne,$t as _,B as re,Bn as ie,Cn as v,Et as ae,H as y,Hn as oe,J as b,P as se,Qt as x,St as S,U as C,Un as w,Vn as ce,W as le,Zt as ue,an as de,cn as T,et as fe,gt as pe,in as me,n as he,on as ge,rn as _e,rt as E,xn as ve,z as ye}from"./queries-DYfIpJ-d.js";import{n as D}from"./toaster-B1MyeHiE.js";import{a as O,i as k,l as A,n as j,p as M,r as N,t as P}from"./dropdown-menu-DhrBcVgr.js";import{a as be,c as xe,i as Se,n as Ce,o as we,r as F,s as I,t as L}from"./alert-dialog-Dj464rjk.js";import{i as Te,r as Ee,t as De}from"./popover-DRcRI46x.js";import{I as Oe,S as ke,Y as Ae,a as R,m as je,mt as z,st as Me,t as Ne,u as Pe,y as B}from"./design-icons-DmYTv2r1.js";import{a as Fe,c as Ie,i as Le,n as Re,o as ze,s as Be,t as Ve}from"./textarea-DlVUfdWG.js";import{n as He}from"./loader-circle-CZkGEdoI.js";import{t as V}from"./createLucideIcon-BHp8sXmF.js";import{t as Ue}from"./app-window-CSHwDX9N.js";import{t as We}from"./info-DA1x_4bz.js";import{t as Ge}from"./message-square-B-MD-8rD.js";import{a as Ke,n as H,r as qe}from"./control-locations-CA9TMupq.js";import{c as Je,s as Ye,t as U}from"./project-router-1m_VlC22.js";import{r as W,t as Xe}from"./markdown-D7DUNWcJ.js";import{Dt as Ze,H as G,J as Qe,L as $e,Lt as et,N as tt,Ot as nt,P as rt,V as K,Vt as it,W as at,Y as ot,_ as st,at as ct,g as lt,h as ut,it as dt,j as ft,kt as pt,nn as mt,ot as ht,pt as gt,qt as _t,rt as vt,zt as yt}from"./index-D489J7QW.js";import{t as q}from"./tab-link-DCUifQ46.js";var bt=V(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),xt=V(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),St=V(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),J=e(s(),1),Y=c();function Ct(e){let t=ie();return w({mutationFn:t=>h(oe(e),t),onSuccess:()=>t.invalidateAfter(`runs`,()=>ce()),onError:e=>D(e.message,{tone:`danger`})})}function wt(e){return e.archived?`Unarchive`:`Archive task`}function Tt({run:e,open:t,onOpenChange:n,onConfirm:r}){return(0,Y.jsx)(L,{open:t,onOpenChange:n,children:(0,Y.jsxs)(Se,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(I,{children:[(0,Y.jsx)(xe,{children:`Archive task?`}),(0,Y.jsxs)(be,{children:[`Move “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:v(e),children:v(e)}),`” out of Active tasks. You can restore it from Archived.`]})]}),(0,Y.jsxs)(we,{children:[(0,Y.jsx)(F,{children:`Cancel`}),(0,Y.jsx)(Ce,{className:`bg-accent-strong text-accent-strong-foreground hover:brightness-[0.96]`,onClick:r,children:`Archive task`})]})]})})}function X({run:e,className:t,compactOnMobile:n=!1}){let[r,i]=(0,J.useState)(!1),s=Ct(e.id),c=wt(e);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(a,{type:`button`,variant:`outline`,"data-slot":`archive-action`,"aria-label":c,title:e.archived?`Put this task back in Active tasks`:`Move this task out of Active tasks`,disabled:s.isPending,className:o(`h-11 gap-[7px] px-3`,n&&`max-md:size-11 max-md:px-0`,t),onClick:()=>e.archived?s.mutate(!1):i(!0),children:[e.archived?(0,Y.jsx)(mt,{"aria-hidden":`true`}):(0,Y.jsx)(Ne,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:o(n&&`max-md:sr-only`),children:c})]}),(0,Y.jsx)(Tt,{run:e,open:r,onOpenChange:i,onConfirm:()=>{s.mutate(!0),i(!1)}})]})}function Et({run:e,action:t,prUrl:n,patch:r}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:t.phase===`blocked`?`Completion blocked`:`Completion pending`}),` · `,t.message||(t.phase===`blocked`?`Completion needs attention.`:`Checking completion actions.`)]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&i(n)?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:`Open PR`})}):null,e.autoMergePr?(0,Y.jsx)(a,{variant:`outline`,disabled:r.isPending,onClick:()=>r.mutate({autoMergePr:!1},{onError:e=>D(e.message,{tone:`danger`})}),children:r.isPending?`Saving…`:`Disable auto-merge`}):null]})]})}function Dt({run:e,blocker:t,flags:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:`Archive blocked`}),` · `,t.message]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[t.runId?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(U,{to:`/tasks/${t.runId}`,children:`Open blocking task`})}):null,t.pullRequestUrl&&i(t.pullRequestUrl)?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:t.pullRequestUrl,target:`_blank`,rel:`noopener noreferrer`,children:`Open blocking PR`})}):null,n.archive?(0,Y.jsx)(X,{run:e}):null]})]})}function Ot({run:e}){let t=C(e.id),n=G(e),r=e.status===`done`?e.completionAction:void 0,i=n.archive?e.archiveBlocker:void 0,a=r&&r.phase!==`complete`?r:void 0;if(!a&&!i)return null;let o=e.pullRequestUrl??e.pullRequests?.find(e=>e.url)?.url;return(0,Y.jsxs)(`section`,{"data-slot":`completion-status`,"aria-label":`Completion action`,className:`grid min-w-0 gap-2 rounded-lg border border-border bg-card p-3 [margin-block:0.75rem]`,children:[a?(0,Y.jsx)(Et,{run:e,action:a,prUrl:o,patch:t}):null,i?(0,Y.jsx)(Dt,{run:e,blocker:i,flags:n}):null]})}var kt=[`running`,`queued`,`waiting`];function At(e,{queuePosition:t,now:n=new Date}){let r=d(e),i=r.label.charAt(0).toUpperCase()+r.label.slice(1),a=t===void 0?i:`${i} #${t}`,o=kt.includes(e.status)?Mt(e,n):void 0;return o?{attention:r,label:a,nextCheck:o}:{attention:r,label:a}}function jt(e){return e.nextCheck?`${e.label} · Next check ${e.nextCheck.text}`:e.label}function Mt(e,t){let n;for(let t of Array.isArray(e.waits)?e.waits:[]){if(t?.kind!==`timer`||t.phase!==`open`)continue;let e=new Date(t.deadline);Number.isFinite(e.getTime())&&(!n||e<n)&&(n=e)}if(n)return{at:n.toISOString(),text:He(n,t)}}async function Z(e,t){try{await navigator.clipboard.writeText(e),D(t)}catch{D(`Run manually: ${e}`)}}function Nt(e){let t=b(),n=E(),r=(0,J.useMemo)(()=>T(e,t),[e,t]);return{referenceProjectId:n,repoBase:t,references:r,requests:(0,J.useMemo)(()=>n===void 0?[]:r.filter(e=>ue(e,t)).map(e=>({projectId:n,kind:e.kind,number:e.number})),[r,n,t])}}function Pt(e){return w({mutationFn:()=>m(e.id),onError:e=>{if(e instanceof p&&e.command){Z(e.command,`No terminal found — command copied to clipboard.`);return}D(e.message,{tone:`danger`})}})}function Q(e,t){let n=y(),r=fe(),i=w({mutationFn:t=>te(e.id,t),onError:e=>D(e.message,{tone:`danger`})}),a=g(r.data),o=e=>!r.isSuccess||a.includes(e??`claude`);return{canResumeHere:t&&o($e(e)),choices:e.worktreePath?(n.data?.targets??[]).filter(e=>{let t=dt(e.id);return t===void 0||o(t)}).map(t=>({target:t,...rt(e,t.id)?{suffix:` (resume)`,title:`Resume this run's session`}:{}})):[],open:i}}function Ft({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:o}=Q(e,t),s=K(e);return!r&&i.length===0&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[r||i.length>0?(0,Y.jsxs)(`div`,{className:`task-open-targets flex flex-wrap gap-3`,children:[r?(0,Y.jsxs)(a,{variant:`outline`,"data-target":`terminal-resume`,onClick:n,children:[(0,Y.jsx)(et,{}),`Terminal (resume session)`]}):null,i.map(({target:e,suffix:t,title:n})=>{let r=ct(e);return(0,Y.jsxs)(a,{variant:`outline`,"data-target":e.id,title:n,disabled:o.isPending,onClick:()=>o.mutate(e.id),children:[(0,Y.jsx)(r,{"aria-hidden":`true`}),e.label,t??``]},e.id)}),e.worktreePath?(0,Y.jsxs)(a,{variant:`outline`,onClick:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>D(`Worktree path copied`)).catch(()=>D(`Path: ${t}`))},children:[(0,Y.jsx)(B,{}),`Copy worktree path`]}):null]}):null,s?(0,Y.jsxs)(`div`,{"data-slot":`resume-command`,className:`mt-5 border-t border-border pt-5`,children:[(0,Y.jsx)(`h3`,{className:`text-base font-medium`,children:`Resume in a terminal`}),(0,Y.jsx)(`pre`,{className:`my-4 whitespace-pre-wrap break-all rounded-lg border border-border bg-background p-4 text-xs`,children:s}),(0,Y.jsxs)(a,{variant:`outline`,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{}),`Copy resume command`]})]}):null]})}function It({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:o}=Q(e,t),s=K(e),c=e.worktreePath;if(!r&&i.length===0&&!s&&!c)return null;let l=`max-md:min-h-11`;return(0,Y.jsxs)(`div`,{"data-slot":`workspace-tools`,className:`flex min-w-0 flex-wrap gap-2`,children:[r||i.length>0?(0,Y.jsx)(vt,{choices:i,onPick:e=>o.mutate(e),disabled:o.isPending,triggerVariant:`outline`,className:l,leading:r?(0,Y.jsxs)(k,{"data-target":`terminal-resume`,onSelect:n,children:[(0,Y.jsx)(et,{"aria-hidden":`true`}),`Terminal (resume session)`]}):void 0}):null,c?(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,className:l,onClick:()=>void Z(c,`Worktree path copied`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),`Copy worktree path`]}):null,s?(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`resume-command`,title:s,className:l,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),`Copy resume command`]}):null]})}function Lt({run:e,canResume:t,onResume:n,onOpen:r,onClose:i}){let{canResumeHere:o,choices:s}=Q(e,t);return!o&&s.length===0?null:r?(0,Y.jsx)(k,{onSelect:r,children:`Open in…`}):(0,Y.jsxs)(`section`,{"aria-label":`Open task worktree in…`,className:`task-action-panel my-5 rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Open task worktree in…`}),(0,Y.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Close worktree chooser`,onClick:i,children:(0,Y.jsx)(z,{})})]}),e.worktreePath?(0,Y.jsx)(`p`,{className:`my-4 break-all text-xs text-muted-foreground`,children:e.worktreePath}):null,(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(Ft,{run:e,canResume:t,onResume:n})})]})}function Rt({branch:e}){let[t,n]=(0,J.useState)(null),r=(0,J.useRef)(null);(0,J.useEffect)(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);let i=t===e,a=async()=>{r.current!==null&&clearTimeout(r.current),n(null);try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard unavailable`);await navigator.clipboard.writeText(e),n(e),r.current=setTimeout(()=>n(null),2e3)}catch{D(`Could not copy branch. Select and copy: ${e}`)}};return(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1`,children:[(0,Y.jsx)(`span`,{"data-slot":`branch-chip`,className:`min-w-0 rounded-sm border border-border bg-card px-1.5 py-px font-mono text-[11px] font-medium break-all`,children:e}),(0,Y.jsxs)(`button`,{type:`button`,"aria-label":i?`Copied branch name`:`Copy branch name`,onClick:()=>void a(),className:`inline-flex min-h-11 shrink-0 items-center gap-1 rounded-sm px-2 text-xs font-medium text-foreground hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-link-foreground md:min-h-8`,children:[(0,Y.jsx)(B,{className:`size-3.5`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{"aria-live":`polite`,children:i?`Copied`:`Copy`})]})]})}function zt({run:e}){let t=b(),n=E(),r=r=>n===void 0?void 0:me(n,e.id,r,t),a=(0,J.useMemo)(()=>T(e,t),[e,t]),o=[],s=[],c=a.filter(e=>e.kind===`PR`);for(let t of c)o.push((0,Y.jsx)(H,{reference:t,to:r(t),taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`,conflictAction:(0,Y.jsx)(ft,{run:e,prNumber:t.number})},_(t)));let l=ge(e);l&&i(l)&&!c.some(e=>e.url===l)&&o.push((0,Y.jsx)(H,{reference:{kind:`PR`,url:l},taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`pr`));let u=a.filter(e=>e.kind===`Issue`);for(let t of u)s.push((0,Y.jsx)(H,{reference:t,to:r(t),taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},_(t)));let d=_e(e,t);if(d&&i(d)&&!u.some(e=>e.url===d)){let t=x(d);s.push((0,Y.jsx)(H,{reference:{kind:`Issue`,...t?{number:Number(t)}:{},url:d},to:t?r({kind:`Issue`,number:Number(t),url:d}):void 0,taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`issue`))}return o.length===0&&s.length===0?null:(0,Y.jsx)(`div`,{"data-slot":`linked-references`,className:`flex min-w-0 flex-col gap-3`,children:[[`PR`,`PRs`,o],[`Issue`,`Issues`,s]].map(([e,t,n])=>n.length>0?(0,Y.jsxs)(`div`,{"data-reference-kind":e,className:`grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-center gap-x-2 gap-y-1`,children:[(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,children:t}),(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:n})]},e):null)})}function $(){let e=Ye(),t=ne();return Ze(t.data?.projects?.find(n=>n.id===(e??t.data?.bootProject)))}var Bt=e=>e.map(e=>`${e.name}: ${nt(e.url)}`).join(`
2
2
  `);function Vt(e){return $().length>0||e.notify===!0}function Ht({run:e}){let t=$(),n=t.length>0,r=re(e.id),[i,o]=(0,J.useState)(null),s=e.notify===!0;return!n&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[s?(0,Y.jsxs)(P,{children:[(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`notifying-chip`,className:`h-11 gap-1.5 md:h-[30px]`,"aria-label":n?`Notifying ${pt(t)} — webhook actions`:`Notifying — webhook actions`,title:n?Bt(t):void 0,children:[(0,Y.jsx)(ht,{tone:`success`}),(0,Y.jsx)(`span`,{children:`Notifying`}),(0,Y.jsx)(Pe,{"aria-hidden":`true`,className:`size-3.5`})]})}),(0,Y.jsxs)(N,{align:`end`,"data-slot":`notifying-menu`,className:`w-[240px] max-w-[calc(100vw-2rem)] p-2`,children:[n?(0,Y.jsx)(O,{"data-slot":`notifying-targets`,className:`flex flex-col gap-0.5 px-2 py-1.5 text-[11px] font-normal text-muted-foreground`,children:t.map(e=>(0,Y.jsx)(`span`,{"data-webhook-target":e.id,className:`truncate`,title:nt(e.url),children:e.name},e.id))}):null,n?(0,Y.jsxs)(k,{className:`min-h-11`,onSelect:()=>o(`note`),children:[(0,Y.jsx)(Ge,{"aria-hidden":`true`}),` Send a note…`]}):null,(0,Y.jsxs)(k,{variant:`destructive`,className:`min-h-11`,disabled:r.isPending,onSelect:()=>r.mutate({notify:!1},{onSuccess:()=>D(`Stopped notifying the webhook`),onError:e=>D(`Could not stop notifying. ${e.message}`,{tone:`danger`})}),children:[(0,Y.jsx)(bt,{"aria-hidden":`true`}),` Stop notifying`]})]})]}):(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-action":`handoff`,className:`size-11 px-0 md:h-[30px] md:w-auto md:px-2.5`,"aria-label":`Hand off to webhook`,onClick:()=>o(`handoff`),children:[(0,Y.jsx)(yt,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`max-md:sr-only`,children:`Hand off`})]}),n?(0,Y.jsx)(Ut,{mode:i,targets:t,pending:r.isPending,onOpenChange:e=>!e&&o(null),onSubmit:e=>r.mutate({notify:!0,...e?{message:e}:{}},{onSuccess:()=>{o(null),D(i===`note`?`Note sent to the webhook`:`Handed off to the webhook`)},onError:e=>D(`Could not hand off. ${e.message}`,{tone:`danger`})})}):null]})}function Ut({mode:e,targets:t,pending:n,onOpenChange:r,onSubmit:i}){let o=(0,J.useId)(),s=(0,J.useId)(),[c,l]=(0,J.useState)(``);(0,J.useEffect)(()=>{e!==null&&l(``)},[e]);let u=e===`note`,d=pt(t);return(0,Y.jsx)(Re,{open:e!==null,onOpenChange:e=>{e||l(``),r(e)},children:(0,Y.jsx)(Le,{"data-slot":`handoff-dialog`,className:`max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-none max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:border-x-0 max-sm:border-b-0 max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100`,children:(0,Y.jsxs)(`form`,{className:`grid gap-4`,onSubmit:e=>{e.preventDefault(),i(c.trim())},children:[(0,Y.jsxs)(Be,{className:`text-left`,children:[(0,Y.jsx)(Ie,{children:u?`Send a note to ${t.length===1?`the webhook`:`the webhooks`}`:`Hand off to webhook`}),(0,Y.jsx)(Fe,{children:(0,Y.jsx)(`span`,{"data-webhook-destination":``,title:Bt(t),children:u?`${d} ${t.length===1?`gets`:`get`} this note with the task's current status.`:`${d} will start receiving this task's status updates. Add a note (optional).`})})]}),(0,Y.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,Y.jsx)(`label`,{htmlFor:o,className:`text-[13px] font-medium`,children:`Note`}),(0,Y.jsx)(Ve,{id:o,"data-slot":`handoff-note`,"aria-describedby":s,rows:4,maxLength:1e5,className:`min-h-24`,placeholder:`e.g. Take over from here, ping me when the PR is green`,value:c,onChange:e=>l(e.target.value)}),(0,Y.jsxs)(`p`,{id:s,className:`flex items-center gap-1.5 text-[12px] text-muted-foreground`,children:[(0,Y.jsx)(We,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`The note goes to the webhook only, not to the agent.`]})]}),(0,Y.jsxs)(ze,{className:`gap-2 max-sm:flex-col-reverse max-sm:[&>button]:h-11 max-sm:[&>button]:w-full`,children:[(0,Y.jsx)(a,{type:`button`,variant:`ghost`,className:`sm:h-9`,onClick:()=>r(!1),children:`Cancel`}),(0,Y.jsxs)(a,{type:`submit`,variant:`contrast`,className:`sm:h-9`,"data-action":`handoff-submit`,disabled:n||u&&c.trim()===``,children:[(0,Y.jsx)(yt,{"aria-hidden":`true`}),u?`Send note`:`Hand off`]})]})]})})})}function Wt({runId:e,children:t}){let n=r(),i=(0,J.useMemo)(()=>({runId:e}),[e]);return n?(0,Y.jsx)(Gt,{runId:e,children:t}):(0,Y.jsx)(W.Provider,{value:i,children:t})}function Gt({runId:e,children:n}){let{projectId:r}=t(),i=(0,J.useMemo)(()=>({runId:e,...r?{projectId:r}:{}}),[e,r]);return(0,Y.jsx)(W.Provider,{value:i,children:n})}function Kt({id:e}){return(0,Y.jsxs)(U,{to:`/tasks/${e}`,"aria-label":`Parent task ${e}`,"data-slot":`mobile-parent-task-link`,className:`inline-flex shrink-0 items-center justify-center gap-1 rounded-sm px-2 text-[13px] text-muted-foreground [min-block-size:2.75rem] [min-inline-size:2.75rem] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:bg-muted active:text-foreground`,children:[(0,Y.jsx)(R,{"aria-hidden":!0,className:`shrink-0 [block-size:1.2cap] [inline-size:auto]`}),`Parent`]})}function qt({id:e}){let t=pe(e),n=t.data?v(t.data):e;return(0,Y.jsxs)(`div`,{"data-slot":`parent-task`,className:`flex min-w-0 flex-wrap items-center gap-x-2 text-[13px] text-muted-foreground`,children:[(0,Y.jsxs)(U,{to:`/tasks/${e}`,"aria-label":`Parent task ${e}`,title:`Parent · ${n}`,"data-slot":`parent-task-link`,className:`flex min-h-11 min-w-0 max-w-full items-center gap-2 rounded-sm text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:text-foreground`,children:[(0,Y.jsx)(R,{"aria-hidden":!0,className:`h-[1.2cap] w-auto shrink-0`}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:`Parent`}),(0,Y.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,Y.jsx)(`span`,{className:`min-w-0 overflow-clip text-ellipsis whitespace-nowrap`,children:n})]}),t.isError?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{children:`Parent record unavailable or deleted`}),(0,Y.jsx)(a,{variant:`outline`,className:`min-h-11`,onClick:()=>void t.refetch(),children:`Retry parent task`})]}):null]})}var Jt=3,Yt=(e,t)=>e.kind===t.kind&&e.number===t.number;function Xt(e,t,n=Jt){let r=t?e.findIndex(e=>Yt(e,t)):-1;if(e.length<=n||r<n)return{inline:e.slice(0,n),overflow:e.slice(n)};let i=[...e.slice(0,n-1),e[r]];return{inline:i,overflow:e.filter(e=>!i.includes(e))}}var Zt=(e,t)=>`/tasks/${e}/${t.kind}/${t.number}`;function Qt({tab:e}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(e.kind===`pr`?Oe:je,{"aria-hidden":`true`,className:`mr-1 size-3.5 shrink-0`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:e.kind===`pr`?`Pull request`:`Issue`}),` #`,e.number,(0,Y.jsx)(qe,{kind:e.kind===`pr`?`PR`:`Issue`,number:e.number,className:`ml-1`})]})}function $t(e,t){let n=e[0],r=e.length+ +!!t;return n?`Preview :${n.port}${r>1?` +${r-1}`:``}`:t?`Preview · agent`:`Preview`}function en({servers:e}){let t=gt();if(t===null)return null;let n=t.agentLive===!0,r=e[0],i=e.length+ +!!n===1?r?{port:r.port}:{agent:!0}:{};return(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`preview-toggle`,className:`max-md:h-11`,"aria-pressed":t.open,onClick:()=>t.openPane(i),children:[(0,Y.jsx)(Ue,{"aria-hidden":`true`}),$t(e,n),t.live?(0,Y.jsx)(ht,{tone:`success`,"aria-label":`Preview is live`}):null]})}function tn(e){return e?.role===`worker`?`Worker session`:e?.role===`root`?`Parent session`:`Task session`}function nn({run:e,compact:t=!1}){return e.delegation?.role===`worker`?t?(0,Y.jsx)(Kt,{id:e.delegation.parentRunId}):(0,Y.jsx)(qt,{id:e.delegation.parentRunId}):null}function rn(e,t,n){return!e.archiveBlocker&&t.archive&&(n!==`session`||!tt(e))?(0,Y.jsx)(X,{run:e}):null}function an({run:e}){return e.archived&&e.autoArchive?.reason===`pull-requests-merged`&&e.autoArchive.archivedAt===e.archivedAt?(0,Y.jsx)(`p`,{"data-slot":`auto-archive-reason`,className:`text-[13px] text-muted-foreground`,children:`Archived automatically after all associated PRs merged.`}):null}function on({shown:e,run:t,archiveButton:n,previewToggle:r}){let i=Vt(t);return e&&(n||r||i)?(0,Y.jsxs)(`div`,{"data-slot":`run-mobile-actions`,className:`flex flex-wrap items-center gap-2 pt-2`,children:[n,r,(0,Y.jsx)(Ht,{run:t})]}):null}function sn({run:e,tab:t,activeItem:n,inlineItemTabs:r,overflowItemTabs:i,phoneBar:a,isDesktop:o}){let s=(0,J.useRef)(null),c=n?`${n.kind}#${n.number}`:null;return(0,J.useEffect)(()=>{!c||o||s.current?.querySelector(`[aria-current="page"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[c,r.map(e=>`${e.kind}#${e.number}`).join(`,`),o]),(0,Y.jsxs)(`div`,{ref:s,"data-slot":`run-tabs`,"data-phone-bar":a||void 0,className:`mt-3 flex flex-wrap items-end gap-1 border-b border-border md:mt-5 max-md:flex-nowrap max-md:overflow-x-auto max-md:border-b-0 max-md:shadow-[inset_0_-1px_0_var(--border)] max-md:gap-0 max-md:[&>*]:mb-0 max-md:[&>*]:shrink-0 max-md:[&>a]:min-h-11 max-md:[&>a]:px-3.5 max-md:[&>a]:text-[13.5px]`,children:[(0,Y.jsx)(q,{to:`/tasks/${e.id}`,active:t===`session`,replace:a,children:`Session`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/changes`,active:t===`changes`,replace:a,count:e.diffStat&&e.diffStat.files>0?e.diffStat.files:void 0,children:`Changes`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/commits`,active:t===`commits`,replace:a,children:`Commits`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/files`,active:t===`files`,replace:a,children:`Files`}),r.map(t=>(0,Y.jsx)(q,{to:Zt(e.id,t),active:n!==null&&Yt(t,n),replace:a,children:(0,Y.jsx)(Qt,{tab:t})},`${t.kind}-${t.number}`)),i.length>0?(0,Y.jsxs)(P,{children:[(0,Y.jsxs)(M,{"data-slot":`run-tabs-more`,"aria-label":`${i.length} more linked items`,className:`-mb-px flex h-8 items-center rounded-t-md border-b-2 border-transparent px-3 text-[13px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-link-foreground max-md:min-h-11 max-md:px-3.5 max-md:text-[13.5px]`,children:[`+`,i.length]}),(0,Y.jsx)(N,{align:`end`,children:i.map(t=>(0,Y.jsx)(k,{asChild:!0,children:(0,Y.jsx)(U,{to:Zt(e.id,t),replace:a,children:(0,Y.jsx)(Qt,{tab:t})})},`${t.kind}-${t.number}`))})]}):null]})}function cn({run:e,tab:t=`session`,onMarkedUnread:n}){let r=d(e),i=G(e),[a,s]=(0,J.useState)(!1),[c,l]=(0,J.useState)(!1),u=ln(e,n),ee=ae(),te=se(),f=At(e,{queuePosition:e.status===`queued`?ve(ee.data??[]).get(e.id):void 0}),p=st(),m=lt(),h=p!==null&&!m?p:null,g=h!==null,{referenceProjectId:ne,repoBase:_,requests:re}=Nt(e),ie=(0,J.useMemo)(()=>de(e,_),[e,_]),v=typeof t==`object`?t:null,{inline:y,overflow:oe}=Xt(ie,v),b=te.data?.capabilities?.preview===!0,x=e.worktreePath&&b?(0,Y.jsx)(en,{servers:e.previewServers??[]}):null,S=(0,Y.jsx)(pn,{run:e,actions:u,onOpenChooser:()=>l(!0),onToggleNotes:()=>s(e=>!e)}),C=rn(e,i,t);return(0,Y.jsx)(Ke,{projectId:ne,repoBase:_,requests:re,children:(0,Y.jsxs)(`header`,{"data-slot":`run-header`,className:o(`relative z-20 bg-background px-[18px] md:px-9 md:pt-7`,g?`pt-0`:`pt-[18px]`,t===`session`&&`md:sticky md:top-0`),children:[(0,Y.jsx)(an,{run:e}),(0,Y.jsx)(Ot,{run:e}),(0,Y.jsxs)(`div`,{className:`w-full`,children:[(0,Y.jsx)(nn,{run:e}),h?(0,Y.jsxs)(ut,{slot:h,children:[(0,Y.jsx)(fn,{run:e}),(0,Y.jsx)(nn,{run:e,compact:!0}),S]}):(0,Y.jsxs)(`div`,{"data-slot":`run-title-row`,className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 md:flex-nowrap`,children:[(0,Y.jsx)(`p`,{"data-slot":`session-kind`,className:`text-[12px] font-semibold tracking-[0.14em] text-muted-foreground uppercase md:hidden`,children:tn(e.delegation)}),(0,Y.jsx)(dn,{run:e}),(0,Y.jsx)(at,{dot:r.tone,shape:r.shape,pulse:r.pulse,className:`max-md:hidden`,children:jt(f)}),(0,Y.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1 md:gap-2.5`,children:[C,x,(0,Y.jsx)(Ht,{run:e}),S]})]}),(0,Y.jsx)(on,{shown:h!==null,run:e,archiveButton:C,previewToggle:x}),(0,Y.jsx)(sn,{run:e,tab:t,activeItem:v,inlineItemTabs:y,overflowItemTabs:oe,phoneBar:g,isDesktop:m}),a?(0,Y.jsx)(gn,{runId:e.id,onClose:()=>s(!1)}):null,c?(0,Y.jsx)(Lt,{run:e,canResume:G(e).terminal,onResume:()=>u.terminal.mutate(),onClose:()=>l(!1)}):null]}),(0,Y.jsx)(hn,{run:e,actions:u})]})})}function ln(e,t){let n=ee(),r=Je(),[i,a]=(0,J.useState)(null),o=()=>n.invalidateQueries({queryKey:he.runs.all}),s=e=>D(e.message,{tone:`danger`}),c=le(),l={isPending:c.isPending,mutate:()=>c.mutate({id:e.id,pinned:!e.pinned})},d=ye();return{pin:l,markUnread:{isPending:d.isPending,mutate:()=>{t?.(),d.mutate(e.id,{onError:s})}},delete:w({mutationFn:()=>u(e.id),onSuccess:()=>{o(),r(`/`)},onError:s}),terminal:Pt(e),confirming:i,setConfirming:a}}function un(e){let t=C(e.id),n=v(e);return{title:n,editor:ot(n,e=>t.mutate({title:e},{onError:e=>D(e.message,{tone:`danger`})}))}}function dn({run:e}){let{title:t,editor:n}=un(e);return n.editing?(0,Y.jsx)(Qe,{editor:n,className:`flex-1 text-[16px] font-semibold`}):(0,Y.jsxs)(`span`,{className:`group flex min-w-0 items-center gap-1`,children:[(0,Y.jsx)(`h1`,{className:`line-clamp-2 min-w-0 break-words text-2xl font-semibold tracking-tight`,title:e.task,children:t}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,onClick:n.begin,className:`shrink-0 rounded-sm p-1 text-soft-foreground opacity-0 transition-opacity group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(it,{className:`size-3.5`,"aria-hidden":`true`})})]})}function fn({run:e}){let{title:t,editor:n}=un(e);return(0,Y.jsxs)(De,{open:n.editing,onOpenChange:e=>{e?n.begin():n.commit()},children:[(0,Y.jsx)(`div`,{"data-slot":`mobile-run-title`,className:`flex min-w-0 flex-1 flex-col gap-px`,children:(0,Y.jsx)(`h1`,{className:`truncate text-[15px] leading-tight font-semibold text-foreground`,title:e.task,children:t})}),(0,Y.jsx)(Te,{asChild:!0,children:(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,className:`flex size-11 shrink-0 items-center justify-center rounded-sm text-soft-foreground hover:bg-muted hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(it,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,Y.jsx)(Ee,{align:`end`,className:`w-64 max-w-[calc(100vw-16px)] p-2`,onEscapeKeyDown:e=>{e.preventDefault(),n.cancel()},children:(0,Y.jsx)(Qe,{editor:n,className:`text-[16px] font-semibold`})})]})}function pn({run:e,actions:t,onToggleNotes:n,onOpenChooser:r}){let i=G(e),o=K(e),s=C(e.id),c=(0,J.useId)();return(0,Y.jsxs)(P,{children:[(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsx)(a,{variant:`ghost`,size:`icon-sm`,className:`size-11`,"aria-label":`Run actions`,children:(0,Y.jsx)(ke,{"aria-hidden":`true`})})}),(0,Y.jsxs)(N,{align:`end`,"data-slot":`run-actions-menu`,className:`w-[270px] max-w-[calc(100vw-2rem)] p-3`,children:[(0,Y.jsx)(O,{className:`px-2 py-3 text-[12px] font-normal text-muted-foreground`,children:`TASK ACTIONS`}),(0,Y.jsxs)(k,{onSelect:n,children:[(0,Y.jsx)(_t,{"aria-hidden":`true`}),` Notes / handoff`]}),(0,Y.jsx)(Lt,{run:e,canResume:i.terminal,onResume:()=>t.terminal.mutate(),onOpen:r}),o?(0,Y.jsxs)(k,{onSelect:()=>void Z(o,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),` Copy resume command`]}):null,i.markUnread?(0,Y.jsxs)(k,{disabled:t.markUnread.isPending,onSelect:()=>t.markUnread.mutate(),children:[(0,Y.jsx)(xt,{"aria-hidden":`true`}),` Mark unread`]}):null,i.pin?(0,Y.jsxs)(j,{"data-slot":`pin-run`,className:`min-h-11`,checked:!!e.pinned,disabled:t.pin.isPending,onCheckedChange:()=>t.pin.mutate(),children:[e.pinned?(0,Y.jsx)(St,{"aria-hidden":`true`}):(0,Y.jsx)(Ae,{"aria-hidden":`true`}),e.pinned?`Unpin task`:`Pin task`]}):null,(0,Y.jsx)(A,{}),(0,Y.jsx)(O,{className:`text-xs text-muted-foreground`,children:`AFTER DONE`}),(0,Y.jsx)(j,{"data-slot":`archive-when-done`,className:`min-h-11`,checked:e.archiveWhenDone===!0,disabled:s.isPending,onCheckedChange:e=>s.mutate({archiveWhenDone:e},{onError:e=>D(e.message,{tone:`danger`})}),children:`Archive when Done`}),(0,Y.jsx)(j,{"data-slot":`auto-merge-pr`,className:`min-h-11`,checked:e.autoMergePr===!0,disabled:s.isPending,"aria-describedby":c,onCheckedChange:e=>s.mutate({autoMergePr:e},{onError:e=>D(e.message,{tone:`danger`})}),children:`Auto-merge PR`}),(0,Y.jsx)(`p`,{id:c,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block:0.5rem]`,children:`After Done, auto-merge can mark a draft PR ready. It waits for current-head CI and GitHub rules. Merge comes before archive.`}),e.delegation?.role===`worker`?null:(0,Y.jsx)(mn,{run:e,patch:s}),i.deleteRun?(0,Y.jsx)(A,{}):null,i.deleteRun?(0,Y.jsxs)(k,{variant:`destructive`,onSelect:()=>t.setConfirming(`delete`),children:[(0,Y.jsx)(Me,{"aria-hidden":`true`}),` Delete task…`]}):null]})]})}function mn({run:e,patch:t}){let r=(0,J.useId)(),i=(0,J.useId)(),a=(0,J.useId)(),o=e=>D(e.message,{tone:`danger`});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(A,{}),(0,Y.jsx)(O,{className:`text-xs text-muted-foreground`,children:`TASK ACCESS`}),(0,Y.jsxs)(j,{"data-slot":`allow-workers`,className:`min-h-11`,checked:f(e),disabled:t.isPending,"aria-describedby":`${r} ${a}`,onCheckedChange:e=>t.mutate({allowWorkers:e},{onError:o}),children:[`Allow `,n(`cezar`),` workers`]}),(0,Y.jsxs)(`p`,{id:r,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:[`Agents in this task can start `,n(`Cezar`),` workers. Each worker is a separate paid agent session. Worker limits cap resources, not spending.`]}),(0,Y.jsx)(j,{"data-slot":`allow-messaging`,className:`min-h-11`,checked:l(e),disabled:t.isPending,"aria-describedby":`${i} ${a}`,onCheckedChange:e=>t.mutate({allowMessaging:e},{onError:o}),children:`Allow task messaging`}),(0,Y.jsx)(`p`,{id:i,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Agents in this task can message other tasks in this project.`}),(0,Y.jsx)(`p`,{id:a,"data-slot":`task-access-session-note`,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Turning one off applies at once. Turning one on reaches a running agent at its next session.`})]})}function hn({run:e,actions:t}){let n=t.confirming;return(0,Y.jsx)(L,{open:n!==null,onOpenChange:e=>!e&&t.setConfirming(null),children:(0,Y.jsxs)(Se,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(I,{children:[(0,Y.jsx)(xe,{className:`text-danger`,children:`Delete task permanently?`}),(0,Y.jsx)(be,{children:(0,Y.jsxs)(Y.Fragment,{children:[`Delete “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:v(e),children:v(e)}),`” and its transcript, worktree and branch. This cannot be undone.`]})})]}),(0,Y.jsxs)(we,{children:[(0,Y.jsx)(F,{children:`Cancel`}),(0,Y.jsx)(Ce,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{t.delete.mutate(),t.setConfirming(null)},children:`Delete task`})]})]})})}function gn({runId:e,onClose:t}){let n=S(e);return(0,Y.jsxs)(`div`,{"data-slot":`notes-panel`,className:`my-5 rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Notes / handoff`}),(0,Y.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Close notes`,onClick:t,children:(0,Y.jsx)(z,{})})]}),n.isPending?(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Loading notes…`}):n.isError?(0,Y.jsx)(`p`,{className:`text-xs text-danger`,children:n.error.message}):n.data.trim().length>0?(0,Y.jsx)(Wt,{runId:e,children:(0,Y.jsx)(Xe,{children:n.data})}):(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`No notes yet — the handoff file is seeded when the task starts.`}),(0,Y.jsxs)(`div`,{className:`mt-4 flex gap-3`,children:[(0,Y.jsx)(a,{variant:`outline`,disabled:!n.data?.trim(),onClick:()=>void Z(n.data??``,`Notes copied`),children:`Copy notes`}),(0,Y.jsx)(a,{variant:`outline`,onClick:t,children:`Close`})]})]})}export{It as a,At as c,zt as i,X as l,Wt as n,Pt as o,Rt as r,Nt as s,cn as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{D as t,I as n,L as r,M as i,t as a,u as o}from"./button-DRCTAIzF.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import{En as l,Jr as u,nn as d,p as f,sn as p,zt as m}from"./project-scope-context-DDZVS0W-.js";import{$ as h,Q as g,Y as _,Z as ee,et as v,nt as y,ot as b,rt as x,z as S}from"./live-protocol-BDY7JJpT.js";import{I as te,Rt as ne,Un as C,Z as w,jt as re,n as T}from"./queries-C6in05vw.js";import{t as ie}from"./useQuery-DSoTrqQG.js";import{n as E}from"./toaster-Dk0xOpec.js";import{S as ae,x as oe,y as se}from"./github-sidebar-model-DcgyXEtm.js";import{G as ce,Q as le,Z as D,ct as O,d as ue,ht as de,l as fe,mt as pe,u as me}from"./design-icons-DmYTv2r1.js";import{t as k}from"./project-router-DudcMzJa.js";import{t as he}from"./centered-state-xPENgUmo.js";import{c as ge,i as _e,o as ve,p as ye}from"./skills-DFBiAuJG.js";/* empty css */import{et as be,rn as A}from"./index-BDNQ4NIe.js";import{t as xe}from"./skill-empty-hint-YDmkqgo-.js";var j=e(s(),1),M=`owner/name, an https, ssh or git URL, git@host:path, or a local or file:// path`,Se=new Set([`https`,`http`,`ssh`,`git`,`file`]);function N(e){let t=e.trim();if(!t||t.startsWith(`-`)||t.includes(`::`))return null;if(t.startsWith(`~/`))return`home`;if(/^(\/|\.\/|\.\.\/)/.test(t)||/^[A-Za-z]:[\\/]/.test(t))return`local`;if(/^[\w.-]+\/[\w.-]+$/.test(t))return`github`;let n=/^([a-z][a-z0-9+.-]*):\/\//i.exec(t);return n?Se.has(n[1].toLowerCase())?`url`:null:/^[\w.-]+@[\w.-]+:/.test(t)?`scp`:null}function P(e){return e.length>0&&e.length<=256&&!e.startsWith(`-`)&&!e.includes(`..`)&&/^[A-Za-z0-9._/-]+$/.test(e)}var Ce=b().trim().min(1).max(500).refine(e=>N(e)!==null,{message:`Use ${M}.`}),we=b().trim().refine(P,{message:`Use a branch, tag or commit SHA, such as main.`}),Te=x({repo:b().min(1).max(500),ref:b().min(1).max(256)}).strict();x({repo:Ce,ref:we.optional()}).strict(),Te.extend({enabled:g()}).strict();var Ee=_([`refused-format`,`fetch-failed`,`ref-not-found`]),De=h(`state`,[x({state:v(`idle`)}),x({state:v(`loading`)}),x({state:v(`ok`),skillCount:y().int().min(0)}),x({state:v(`error`),cause:Ee,detail:b(),skillCount:y().int().min(0)})]);x({sources:ee(x({repo:b(),ref:b(),enabled:g(),status:De})),editable:g(),configIssue:b().nullable()});var F=()=>[i(),`skills`,`sources`];async function Oe(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$get({param:{projectId:i()}},m(e)),`/skills/sources`)}async function ke(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$post({param:{projectId:i()},json:e}),`/skills/sources`)}async function Ae(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$patch({param:{projectId:i()},json:e}),`/skills/sources`)}async function je(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$delete({param:{projectId:i()},json:e}),`/skills/sources`)}async function Me(e){return l(await f.api.v1.p[`:projectId`].skills.sources.retry.$post({param:{projectId:i()},json:e}),`/skills/sources/retry`)}var I=c(),Ne=1e3,L=e=>`${e.repo} @ ${e.ref}`;function Pe(){return ie({queryKey:F(),queryFn:({signal:e})=>Oe({signal:e}),refetchInterval:e=>e.state.data?.sources.some(e=>e.status.state===`loading`)?Ne:!1})}function R(){return{sources:F(),lists:[T.skills,T.skillsReady,T.importableSkills,T.importableSkillsReady]}}function z(e,t=R()){for(let n of t.lists)e.invalidateQueries({queryKey:n,exact:!0})}function B(e,t){let n=u();return C({mutationFn:async t=>{let n=R();return{answer:await e(t),keys:n}},onSuccess:({answer:e,keys:r},i)=>{n.setQueryData(r.sources,e),n.invalidateQueries({queryKey:r.sources,exact:!0}),z(n,r),t?.(i)},onError:e=>E(e.message,{tone:`danger`})})}function Fe(e){let t=u(),n=(0,j.useRef)(!1),r=e?.sources.some(e=>e.status.state===`loading`)??!1;(0,j.useEffect)(()=>{n.current&&!r&&z(t),n.current=r},[r,t])}function Ie(){let e=Pe();Fe(e.data);let t=B(Ae),i=B(je,e=>E(`Removed ${L(e)}. Add it again to restore its skill switches.`)),o=B(Me),s=e.data,c=s?.editable===!0&&s.configIssue===null,l=t.isPending||i.isPending;return(0,I.jsxs)(`section`,{"data-slot":`skill-sources`,"aria-labelledby":`skill-sources-heading`,className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-3 @min-[520px]:p-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{id:`skill-sources-heading`,className:`text-[15px] font-semibold`,children:`Team skill sources`}),(0,I.jsxs)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:[`Repos whose skills this project can use. Changes are saved to`,` `,(0,I.jsx)(`span`,{className:`font-mono`,children:`.ai/cezar/config.json`}),`.`]})]}),e.isError?(0,I.jsxs)(V,{slot:`skill-sources-error`,alert:!0,children:[`Could not load the team skill sources: `,e.error.message,` `,(0,I.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,className:`mt-2 min-h-11`,disabled:e.isFetching,onClick:()=>void e.refetch(),children:`Retry`})]}):null,s?.configIssue?(0,I.jsx)(V,{slot:`skill-sources-config-issue`,alert:!0,children:s.configIssue}):null,s&&!s.editable?(0,I.jsxs)(V,{slot:`skill-sources-read-only`,children:[`Sources are read-only on this remote cockpit. To edit them here, run`,` `,(0,I.jsxs)(`span`,{className:`font-mono`,children:[n(),` remote-settings enable`]}),` on the machine running `,r(`cezar`),`.`]}):null,e.isPending?(0,I.jsx)(`p`,{role:`status`,"aria-busy":`true`,className:`text-xs text-muted-foreground`,children:`Loading sources…`}):s&&s.configIssue===null&&s.sources.length===0?(0,I.jsx)(`p`,{"data-slot":`skill-sources-empty`,className:`text-xs leading-relaxed text-soft-foreground`,children:`No team skill sources yet. Add a repo below to use its skills in this project.`}):s&&s.sources.length>0?(0,I.jsx)(`ul`,{"data-slot":`skill-source-list`,className:`flex flex-col divide-y divide-border rounded-lg border border-border`,children:s.sources.map(e=>(0,I.jsx)(Le,{source:e,editable:c,busy:l,retrying:o.isPending,onToggle:()=>t.mutate({repo:e.repo,ref:e.ref,enabled:!e.enabled}),onRemove:()=>i.mutate({repo:e.repo,ref:e.ref}),onRetry:()=>o.mutate({repo:e.repo,ref:e.ref})},JSON.stringify([e.repo,e.ref])))}):null,s?(0,I.jsx)(Ve,{disabled:!c}):null]})}function V({slot:e,alert:t=!1,children:n}){return(0,I.jsxs)(`div`,{role:t?`alert`:void 0,"data-slot":e,className:`flex items-start gap-2 rounded-lg border border-border bg-background p-3 text-xs leading-relaxed text-muted-foreground`,children:[t?(0,I.jsx)(O,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-danger`}):null,(0,I.jsx)(`div`,{className:`min-w-0 break-words`,children:n})]})}function Le({source:e,editable:t,busy:n,retrying:r,onToggle:i,onRemove:o,onRetry:s}){let c=(0,j.useId)(),l=Re(e),u=e.status.state===`error`,d=e.enabled&&(u||e.status.state===`idle`);return(0,I.jsxs)(`li`,{"data-slot":`skill-source`,"data-repo":e.repo,"data-ref":e.ref,"data-state":e.enabled?e.status.state:`disabled`,className:`flex flex-col gap-2 p-2.5 @min-[520px]:flex-row @min-[520px]:items-center`,children:[(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`p`,{className:`break-all font-mono text-[13px] text-foreground`,children:[e.repo,` `,(0,I.jsxs)(`span`,{className:`text-muted-foreground`,children:[`@ `,e.ref]})]}),(0,I.jsx)(`p`,{id:c,"data-slot":`skill-source-status`,role:u?`alert`:void 0,"aria-live":u?void 0:`polite`,className:u?`mt-1 text-xs leading-relaxed text-danger`:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:l})]}),(0,I.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[d?(0,I.jsxs)(a,{type:`button`,variant:`outline`,size:`sm`,"data-slot":`skill-source-retry`,className:`min-h-11`,disabled:!t||r,"aria-label":`Retry ${L(e)}`,onClick:s,children:[(0,I.jsx)(D,{"aria-hidden":`true`}),`Retry`]}):null,(0,I.jsx)(`span`,{className:`inline-flex min-h-11 min-w-11 items-center justify-center`,children:(0,I.jsx)(ae,{"data-slot":`skill-source-switch`,"aria-label":`Enable ${L(e)}`,"aria-describedby":c,checked:e.enabled,disabled:!t||n,onCheckedChange:i,className:`relative before:absolute before:-inset-x-1 before:-inset-y-2.5 before:content-['']`})}),(0,I.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,"data-slot":`skill-source-remove`,className:`size-11`,disabled:!t||n,"aria-label":`Remove ${L(e)}`,onClick:o,children:(0,I.jsx)(pe,{"aria-hidden":`true`})})]})]})}function Re(e){if(!e.enabled)return`Disabled. Its skills are hidden from the catalog and from tasks.`;let t=e.status;switch(t.state){case`loading`:return`Fetching…`;case`idle`:return`Not fetched yet. Use Retry to fetch it now.`;case`ok`:return t.skillCount===1?`1 skill`:`${t.skillCount} skills`;case`error`:{let e=t.skillCount>0?` Skills from an earlier fetch still show.`:``;return t.cause===`refused-format`?`${r(`cezar`)} does not accept this repo format. Remove it, then add it as ${M}.`:t.cause===`ref-not-found`?`${t.detail} Check the ref, or remove the source and add it with another ref.${e}`:`Could not fetch: ${ze(t.detail)} Check the network and your access to the repo, then Retry.${e}`}}}var ze=e=>/[.!?]$/.test(e.trim())?e.trim():`${e.trim()}.`;function Be(e,t){return e.trim()?N(e)===null?`Use ${M}.`:t.trim()&&!P(t.trim())?`Use a branch, tag or commit SHA for the ref, such as main.`:null:`Enter a repo.`}function Ve({disabled:e}){let[t,n]=(0,j.useState)(``),[r,i]=(0,j.useState)(``),[o,s]=(0,j.useState)(null),c=(0,j.useId)(),l=(0,j.useId)(),u=(0,j.useId)(),d=B(ke,()=>{n(``),i(``)});return(0,I.jsxs)(`form`,{"data-slot":`skill-source-add`,"aria-label":`Add a team skill source`,noValidate:!0,onSubmit:e=>{e.preventDefault();let n=Be(t,r);s(n),!n&&d.mutate(r.trim()?{repo:t.trim(),ref:r.trim()}:{repo:t.trim()})},className:`flex flex-col gap-2 @min-[520px]:flex-row @min-[520px]:flex-wrap @min-[520px]:items-end`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,I.jsx)(`label`,{htmlFor:c,className:`text-xs font-medium`,children:`Repo`}),(0,I.jsx)(A,{id:c,"data-slot":`skill-source-repo`,value:t,placeholder:`owner/name`,autoComplete:`off`,spellCheck:!1,disabled:e,"aria-invalid":o?!0:void 0,"aria-describedby":o?u:void 0,onChange:e=>{n(e.target.value),s(null)},className:`h-11 font-mono text-[13px]`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 @min-[520px]:w-36`,children:[(0,I.jsx)(`label`,{htmlFor:l,className:`text-xs font-medium`,children:`Ref`}),(0,I.jsx)(A,{id:l,"data-slot":`skill-source-ref`,value:r,placeholder:`main`,autoComplete:`off`,spellCheck:!1,disabled:e,onChange:e=>{i(e.target.value),s(null)},className:`h-11 font-mono text-[13px]`})]}),(0,I.jsx)(a,{type:`submit`,"data-slot":`skill-source-submit`,className:`h-11`,disabled:e||d.isPending,children:`Add source`}),o?(0,I.jsx)(`p`,{id:u,role:`alert`,"data-slot":`skill-source-problem`,className:`text-xs text-danger @min-[520px]:basis-full`,children:o}):null]})}var He=[[`.ai`,`cezar`,`skills`],[`.ai`,`squawk`,`skills`],[`.ai`,`skills`],[`.claude`,`skills`],[`.agents`,`skills`],[`skills`]];function Ue(e){let t=e.split(`/`).slice(0,-1);if((e===`SKILL.md`||e.endsWith(`/SKILL.md`)||t.at(-1)===`commands`)&&t.pop(),t[0]===`plugins`&&t[1])return{kind:`plugin`,name:t[1]};for(let e of He){let n=We(t,e);if(n!==-1&&(e.length>1||n===t.length-1)){t.splice(n,e.length);break}}return t.length>0?{kind:`directory`,name:t.join(`/`)}:null}function We(e,t){for(let n=e.length-t.length;n>=0;n--)if(t.every((t,r)=>e[n+r]===t))return n;return-1}var H=[{id:`project`,label:`This project`,sources:new Set([`ai`,`cezar`,`agents`])},{id:`global`,label:`Global`,sources:new Set([`global`])},{id:`builtin`,label:`Built-in`,sources:new Set([`builtin`])}],U=(e,t,n,r)=>({key:e,label:t,kind:n,locked:r,items:[],children:[]});function Ge(e){let t=H.map(e=>U(`source\u0000${e.id}`,e.label,`source`,!0)),n=new Map;for(let r of e){let{skill:e}=r;if(!e.team){let n=H.findIndex(t=>t.sources.has(e.source));t[n===-1?0:n].items.push(r);continue}let{repo:i,path:a}=e.team,o=n.get(i);o||(o=U(`repo\u0000${i}`,i,`repo`,!1),n.set(i,o));let s=Ue(a);if(!s){o.items.push(r);continue}let c=`${o.key}\u0000${s.kind}\u0000${s.name}`,l=o.children.find(e=>e.key===c);l||(l=U(c,s.name,s.kind,!1),o.children.push(l)),l.items.push(r)}for(let e of n.values())e.children.sort((e,t)=>e.label.localeCompare(t.label));let r=[...n.values()].sort((e,t)=>e.label.localeCompare(t.label));return[t[0],...r,t[1],t[2]].filter(e=>e.items.length>0||e.children.length>0)}function W(e){return e.flatMap(e=>[e.key,...W(e.children)])}function G(e){return[...e.items,...e.children.flatMap(G)]}function Ke(e,t){let n=G(e);if(e.locked)return{enabled:n.length,total:n.length,state:`on`,refs:[]};let r=[],i=0;for(let{skill:e}of n)e.team&&(r.push({repo:e.team.repo,name:e.name}),t(e)&&i++);let a=i===0?`off`:i===r.length?`on`:`mixed`;return{enabled:i,total:r.length,state:a,refs:r}}function K(e,t){if(t.trim()===``)return null;let n=new Set,r=(e,i)=>{let a=[...i,e.label];for(let{skill:r,key:i}of e.items){let e=[r.description??``,...a].join(` `);ge(r.name,e,t)>0&&n.add(i)}for(let t of e.children)r(t,a)};for(let t of e)r(t,[]);return n}function q(e,t){let n=[],r=(e,i)=>{let a=[...i,e.key],o=e.items.some(e=>t.has(e.key));o&&n.push(...a.filter(e=>!n.includes(e)));for(let t of e.children)o=r(t,a)||o;return o};for(let t of e)r(t,[]);return n}function J(e){let t=e?.disabledTeamSkills;if(!Array.isArray(t))return[];let n=[];for(let e of t){let t=S.safeParse(e);t.success&&n.push(t.data)}return n}var Y=(e,t)=>e.repo===t.repo&&e.name===t.name;function X(e){return e.team?{repo:e.team.repo,name:e.name}:void 0}function qe(e,t,n){let r=new Map;for(let e of t)r.has(e.name)||r.set(e.name,e);let i=[],a=new Set;for(let t of e){let e=X(t);if(!e)continue;let o=JSON.stringify([e.repo,e.name]);if(a.has(o))continue;a.add(o);let s=n(e),c=r.get(t.name),l=c?X(c):void 0;s&&c&&!(l&&Y(l,e))?i.push({skill:t,on:s,hiddenBy:c.team?.repo??c.source}):i.push({skill:t,on:s})}return i}var Z=new Map;function Je(e){let t=Z.get(e);return t||(t={chain:Promise.resolve(),latest:0},Z.set(e,t)),t}function Ye(e){let t=u(),n=w(e),[r,i]=j.useState(0),a=j.useMemo(()=>J(n.data),[n.data]),o=j.useCallback(e=>!a.some(t=>Y(t,e)),[a]),s=j.useCallback(n=>{let r=[e,`ui-state`],a=[e,`skills`],o=t.getQueryData(r),s=n(J(o));t.setQueryData(r,{...o,disabledTeamSkills:s});let c=Je(e),l=++c.latest;i(e=>e+1),c.chain=c.chain.then(async()=>{try{let n=await d({disabledTeamSkills:s},e);l===c.latest&&(t.setQueryData(r,n),t.invalidateQueries({queryKey:a}))}catch(e){E(e instanceof Error?e.message:String(e),{tone:`danger`}),l===c.latest&&t.invalidateQueries({queryKey:r})}finally{i(e=>e-1)}})},[e,t]);return{disabled:a,isOn:o,toggle:j.useCallback(e=>{let t={repo:e.repo,name:e.name};s(e=>e.some(e=>Y(e,t))?e.filter(e=>!Y(e,t)):[...e,t])},[s]),setMany:j.useCallback((e,t)=>{let n=e.map(e=>({repo:e.repo,name:e.name}));s(e=>{if(t)return e.filter(e=>!n.some(t=>Y(e,t)));let r=[...e];for(let e of n)r.some(t=>Y(t,e))||r.push(e);return r})},[s]),pending:r>0,ready:n.isSuccess}}var Q=`__bm`,Xe=`__import`,$=e=>e.team?`${e.team.repo}\u0000${e.name}`:e.path,Ze=e=>e.source!==`team`&&e.source!==`builtin`;function Qe(){return(0,I.jsx)(`div`,{"data-route":`skills`,className:`mx-auto min-h-full w-full px-[18px] py-6 md:p-9`,children:(0,I.jsx)($e,{})})}function $e(){let e=re(),n=ne(),r=te(),[a]=t(),[o,s]=(0,j.useState)(``),c=Ye(i()),l=et(),u=(0,j.useMemo)(()=>e.data??[],[e.data]),d=(0,j.useMemo)(()=>r.data??[],[r.data]),f=r.isSuccess,p=(0,j.useMemo)(()=>tt(u,f?d:null,c.isOn),[u,d,f,c.isOn]),m=(0,j.useMemo)(()=>Ge(p),[p]),h=new Map;for(let e of p)h.set(e.skill.name,(h.get(e.skill.name)??0)+1);let g=e=>(h.get(e.name)??0)>1&&e.team!==void 0,_=e=>{let t=X(e);return t&&f?c.isOn(t):!0},ee=e=>{let t=X(e);return t?{ariaLabel:g(e)?`Enable ${e.name} from ${t.repo}`:`Enable ${e.name}`,checked:_(e),disabled:!f||!c.ready,locked:!1,onCheckedChange:()=>c.toggle(t)}:{ariaLabel:`${e.name} is always enabled`,checked:!0,disabled:!0,locked:!0,onCheckedChange:()=>{}}},v=e=>`/skills?skill=${encodeURIComponent(e.name)}${g(e)?`&repo=${encodeURIComponent(e.team.repo)}`:``}`,y=a.get(`skill`),b=nt(p,y,a.get(`repo`),_)?.key??null,x=rt(m,b),S=e=>{s(e);let t=K(m,e);t&&t.size>0&&x.open(q(m,t))};if(e.isError)return(0,I.jsx)(he,{icon:(0,I.jsx)(O,{}),tone:`danger`,heading:`h2`,title:`Could not load skills`,subtitle:e.error.message});let C=y===Q,w=e.isPending?[]:it({tree:m,matches:K(m,o),isOpen:x.isOpen,onFold:x.toggle,openKey:b,workflows:n.data?.workflows??[],activationFor:ee,linkFor:v,groupActivationFor:e=>Ke(e,_),switchable:f&&c.ready,onActivate:c.setMany});return(0,I.jsxs)(`div`,{"data-slot":`skills-section`,className:`@container flex min-w-0 flex-col gap-[22px]`,children:[(0,I.jsxs)(`header`,{className:`flex flex-col gap-4 @min-[700px]:flex-row @min-[700px]:items-center @min-[700px]:justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-[25px] font-semibold md:text-[30px]`,children:`Skills`}),(0,I.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground md:text-[13px]`,children:`Markdown playbooks your agents can follow.`})]}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,I.jsxs)(k,{to:C?`/skills`:`/skills?skill=${Q}`,"data-slot":`bookmarklets-row`,"aria-current":C?`page`:void 0,"aria-expanded":C,className:`inline-flex min-h-11 items-center gap-2 rounded-lg border border-border bg-card px-3 text-xs font-medium aria-[current=page]:bg-accent-strong/10 hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,I.jsx)(de,{"aria-hidden":`true`,className:`size-4 text-link-foreground`}),`Run from GitHub`]})})]}),C?(0,I.jsx)(`section`,{"data-slot":`skills-bookmarklets`,className:`min-w-0 rounded-xl border border-border bg-card p-5`,children:(0,I.jsx)(be,{skills:p.filter(e=>_(e.skill)&&!e.hiddenBy).map(e=>e.skill)})}):null,(0,I.jsx)(Ie,{}),(0,I.jsx)(ot,{query:o,onQuery:S,refreshing:l.isPending,onRefresh:()=>l.mutate(),onFoldAll:x.setAll}),(0,I.jsxs)(`section`,{"data-slot":`skills-list`,"aria-label":`Skills`,className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-2 @min-[520px]:p-3`,children:[r.isError?(0,I.jsx)(st,{message:r.error.message,retrying:r.isFetching,onRetry:()=>void r.refetch()}):null,(0,I.jsx)(`div`,{"data-slot":`skill-rows`,className:`min-h-0 overflow-y-auto md:max-h-[calc(100dvh-260px)]`,children:e.isPending?(0,I.jsx)(`p`,{role:`status`,"aria-busy":`true`,className:`min-h-72 p-3 text-[13px] text-muted-foreground`,children:`Loading skills…`}):w.length>0?(0,I.jsxs)(`table`,{"data-slot":`skills-table`,className:`w-full table-fixed border-collapse text-left`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{className:`border-b border-border text-[12px] text-muted-foreground`,children:[(0,I.jsx)(`th`,{scope:`col`,className:`px-2 py-2 font-semibold`,children:`Skill / group`}),(0,I.jsx)(`th`,{scope:`col`,className:`hidden w-[30%] px-2 py-2 font-semibold @min-[520px]:table-cell`,children:`Used by`}),(0,I.jsx)(`th`,{scope:`col`,className:`w-[116px] px-2 py-2 text-right font-semibold`,children:`Enabled`})]})}),(0,I.jsx)(`tbody`,{children:w})]}):(0,I.jsx)(`p`,{className:`px-2.5 py-2 text-xs leading-relaxed text-soft-foreground`,children:p.length>0?`(no skills match)`:(0,I.jsx)(xe,{})})})]})]})}function et(){let e=u();return C({mutationFn:()=>p(),onSuccess:t=>{e.setQueryData(T.skills,t),e.invalidateQueries({queryKey:T.importableSkills}),E(`Team skills refreshed.`)},onError:e=>E(e.message,{tone:`danger`})})}function tt(e,t,n){let r=new Set(e.filter(Ze).map(e=>e.name)),i=t?qe(t.filter(e=>!r.has(e.name)),e,n):[],a=(e,t)=>({skill:e,key:$(e),...t?{hiddenBy:t}:{}}),o=new Set((t??[]).map($)),s=[...e.filter(e=>e.source!==`team`||!o.has($(e))).map(e=>a(e)),...i.map(e=>a(e.skill,e.on?e.hiddenBy:void 0))].sort((e,t)=>e.skill.name.localeCompare(t.skill.name)),c=new Map(s.map(e=>[e.skill,e]));return ve(s.map(e=>e.skill)).map(e=>c.get(e))}function nt(e,t,n,r){if(t===null||t===Q)return null;if(t===Xe)return e.find(e=>!r(e.skill))??null;let i=e.filter(e=>e.skill.name===t);return i.find(e=>n===null||e.skill.team?.repo===n)??i[0]??null}function rt(e,t){let[n,r]=(0,j.useState)({}),i=e=>r(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),a=t?q(e,new Set([t])).join(``):``;return(0,j.useEffect)(()=>{a&&r(e=>({...e,...Object.fromEntries(a.split(``).map(e=>[e,!0]))}))},[a]),{isOpen:(e,t)=>n[e.key]??t===0,toggle:(e,t)=>r(n=>({...n,[e]:t})),open:i,setAll:t=>r(Object.fromEntries(W(e).map(e=>[e,t])))}}function it(e){let t=[],n=t=>e.matches===null||e.matches.has(t.key),r=e=>e.items.some(n)||e.children.some(r),i=(a,o)=>{if(!r(a))return;let s=e.isOpen(a,o);if(t.push((0,I.jsx)(ut,{node:a,depth:o,open:s,onFold:()=>e.onFold(a.key,!s),activation:e.groupActivationFor(a),switchable:e.switchable,onActivate:e.onActivate},a.key)),s){for(let r of a.items.filter(n)){let n=r.key===e.openKey,i=ye(e.workflows,r.skill.name),a=e.activationFor(r.skill);t.push((0,I.jsx)(ft,{item:r,depth:o+1,href:n?`/skills`:e.linkFor(r.skill),expanded:n,usedBy:i,activation:a},r.key)),n&&t.push((0,I.jsx)(at,{skill:r.skill,usedBy:i,activation:a},`${r.key}\u0000detail`))}for(let e of a.children)i(e,o+1)}};for(let t of e.tree)i(t,0);return t}function at({skill:e,usedBy:t,activation:n}){return(0,I.jsx)(`tr`,{"data-slot":`skill-detail-row`,children:(0,I.jsx)(`td`,{colSpan:3,className:`border-b border-border px-3 pb-5 @min-[520px]:px-5`,children:(0,I.jsx)(`div`,{"data-slot":`skills-detail`,className:`min-w-0 rounded-lg border border-border bg-background p-4 md:p-5`,children:(0,I.jsx)(se,{skill:e,usedBy:t,activation:n})})})})}function ot({query:e,onQuery:t,refreshing:n,onRefresh:r,onFoldAll:i}){return(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsxs)(`div`,{className:`sw-search relative min-w-0 basis-full sm:basis-auto sm:flex-1`,children:[(0,I.jsx)(le,{"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,I.jsx)(A,{"data-slot":`skills-filter`,placeholder:`Filter skills…`,"aria-label":`Filter skills`,value:e,onChange:e=>t(e.target.value),className:`h-11 min-w-0 bg-card pl-9 text-xs`})]}),(0,I.jsxs)(`button`,{type:`button`,"data-slot":`skills-refresh`,title:`git fetch the team skills repos`,disabled:n,onClick:r,className:`flex h-11 shrink-0 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-55`,children:[(0,I.jsx)(D,{"aria-hidden":`true`,className:o(`size-3`,n&&`motion-safe:animate-spin`)}),n?`Refreshing…`:`Refresh`]}),(0,I.jsx)(a,{type:`button`,variant:`outline`,"data-slot":`skills-expand-all`,className:`h-11 text-xs`,onClick:()=>i(!0),children:`Expand groups`}),(0,I.jsx)(a,{type:`button`,variant:`outline`,"data-slot":`skills-collapse-all`,className:`h-11 text-xs`,onClick:()=>i(!1),children:`Collapse groups`})]})}function st({message:e,retrying:t,onRetry:n}){return(0,I.jsxs)(`div`,{role:`alert`,"data-slot":`skills-importable-error`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-background p-3 text-xs text-muted-foreground`,children:[(0,I.jsxs)(`span`,{children:[`Could not load the team skills, so they cannot be switched right now. Your saved choice is kept.`,` `,e]}),(0,I.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,className:`min-h-11`,disabled:t,onClick:n,children:`Retry`})]})}var ct={repo:`repository`,plugin:`plugin`,directory:`directory`},lt=e=>({paddingInlineStart:`${e*16}px`});function ut({node:e,depth:t,open:n,onFold:r,activation:i,switchable:a,onActivate:s}){let c=n?me:ue,l=ct[e.kind],u=e.locked||a;return(0,I.jsxs)(`tr`,{"data-slot":`skill-group-row`,"data-group":e.label,"data-kind":e.kind,"data-level":t,className:o(`border-b border-border`,t===0&&`bg-muted/40`),children:[(0,I.jsx)(`th`,{scope:`row`,className:`min-w-0 p-0 text-left font-normal`,children:(0,I.jsx)(`span`,{className:`flex min-w-0`,style:lt(t),children:(0,I.jsxs)(`button`,{type:`button`,"data-slot":`skill-group-toggle`,"aria-expanded":n,onClick:r,className:`flex min-h-11 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-left hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground`,children:[(0,I.jsx)(c,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,I.jsx)(`span`,{className:o(`min-w-0 [overflow-wrap:anywhere]`,t===0?`text-[13px] font-semibold`:`text-[13px] font-medium`),children:e.label}),l?(0,I.jsx)(`span`,{className:`shrink-0 text-[12px] text-soft-foreground`,children:l}):null]})})}),(0,I.jsx)(`td`,{"aria-hidden":`true`,className:`hidden @min-[520px]:table-cell`}),(0,I.jsx)(`td`,{className:`px-1 py-0 text-right`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center justify-end gap-1`,children:[(0,I.jsx)(`span`,{"data-slot":`skill-group-count`,className:`text-[12px] tabular-nums text-muted-foreground`,children:u?`${i.enabled} / ${i.total}`:`—`}),(0,I.jsx)(dt,{label:e.label,locked:e.locked,state:u?i.state:null,disabled:e.locked||!a||i.total===0,onClick:()=>s(i.refs,i.state!==`on`)})]})})]})}function dt({label:e,locked:t,state:n,disabled:r,onClick:i}){return(0,I.jsx)(`button`,{type:`button`,role:`checkbox`,"data-slot":`skill-group-switch`,"data-state":n??`unknown`,"aria-checked":n===null?void 0:n===`mixed`?`mixed`:n===`on`,"aria-busy":n===null||void 0,"aria-label":t?`${e} skills are always enabled`:`Enable all skills in ${e}`,disabled:r,onClick:i,className:`group/check inline-flex size-11 shrink-0 items-center justify-center rounded-md focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground disabled:cursor-default`,children:(0,I.jsx)(`span`,{"aria-hidden":`true`,className:o(`inline-flex size-5 items-center justify-center rounded border-2 transition-colors`,n===`on`||n===`mixed`?`border-accent-strong bg-accent-strong text-accent-strong-foreground`:`border-muted-foreground bg-card text-transparent`,n===null&&`border-dashed border-soft-foreground`,`group-disabled/check:opacity-60`),children:n===`mixed`?(0,I.jsx)(ce,{className:`size-3.5`}):(0,I.jsx)(fe,{className:`size-3.5`})})})}function ft({item:e,depth:t,href:n,expanded:r,usedBy:i,activation:a}){let{skill:s,hiddenBy:c}=e,l=_e(s),u=[...new Set(i.map(e=>e.split(` › `)[0]))];return(0,I.jsxs)(`tr`,{"data-slot":`skill-table-row`,className:o(`border-b border-border`,r&&`border-transparent`),children:[(0,I.jsx)(`td`,{className:`min-w-0 p-0`,style:lt(t),children:(0,I.jsxs)(k,{to:n,"data-slot":`skill-row`,"data-skill":s.name,"data-repo":s.team?.repo,"data-project":l?`true`:void 0,"data-enabled":a.checked?`true`:void 0,"aria-current":r?`page`:void 0,"aria-expanded":r,className:o(`selection-row flex min-h-11 min-w-0 flex-col justify-center gap-1 rounded-md px-3 py-2 transition-colors hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground`,r&&`bg-accent-strong/10`),children:[(0,I.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:(0,I.jsx)(`span`,{className:o(`min-w-0 break-words text-[13px]`,l?`font-semibold text-foreground`:`font-normal text-muted-foreground`),children:s.name})}),s.description?(0,I.jsx)(`span`,{className:`line-clamp-1 text-xs leading-relaxed text-supporting-foreground`,children:s.description}):null,u.length>0?(0,I.jsxs)(`span`,{"data-slot":`skill-used-by-inline`,className:`text-xs text-supporting-foreground @min-[520px]:hidden`,children:[`Used by `,u.join(`, `)]}):null,c?(0,I.jsxs)(`span`,{"data-slot":`skill-hidden-by`,className:`min-w-0 text-xs text-supporting-foreground [overflow-wrap:anywhere]`,children:[`hidden by `,c]}):null]})}),(0,I.jsx)(`td`,{"data-slot":`skill-used-by-cell`,className:`hidden px-2 py-2 align-middle text-xs text-supporting-foreground @min-[520px]:table-cell`,children:u.length>0?(0,I.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:u.join(`, `)}):(0,I.jsx)(`span`,{className:`text-soft-foreground`,children:`—`})}),(0,I.jsx)(`td`,{className:`px-1 py-0 text-right align-middle`,children:(0,I.jsx)(`span`,{className:`inline-flex justify-end`,children:(0,I.jsx)(oe,{skill:s,activation:a})})})]})}export{Qe as SkillsRoute};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{D as t,I as n,L as r,M as i,t as a,u as o}from"./button-CHUAMTHK.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import{En as l,Jr as u,nn as d,p as f,sn as p,zt as m}from"./project-scope-context-CaUqlAd7.js";import{$ as h,Q as g,Y as _,Z as ee,et as v,nt as y,ot as b,rt as x,z as S}from"./live-protocol-BDY7JJpT.js";import{I as te,Rt as ne,Un as C,Z as w,jt as re,n as T}from"./queries-DYfIpJ-d.js";import{t as ie}from"./useQuery-DOJQOEBO.js";import{n as E}from"./toaster-B1MyeHiE.js";import{S as ae,x as oe,y as se}from"./github-sidebar-model-Ct0DltOv.js";import{G as ce,Q as le,Z as D,ct as O,d as ue,ht as de,l as fe,mt as pe,u as me}from"./design-icons-DmYTv2r1.js";import{t as k}from"./project-router-1m_VlC22.js";import{t as he}from"./centered-state-DGyy0SuA.js";import{c as ge,i as _e,o as ve,p as ye}from"./skills-DFBiAuJG.js";/* empty css */import{et as be,rn as A}from"./index-D489J7QW.js";import{t as xe}from"./skill-empty-hint-YDmkqgo-.js";var j=e(s(),1),M=`owner/name, an https, ssh or git URL, git@host:path, or a local or file:// path`,Se=new Set([`https`,`http`,`ssh`,`git`,`file`]);function N(e){let t=e.trim();if(!t||t.startsWith(`-`)||t.includes(`::`))return null;if(t.startsWith(`~/`))return`home`;if(/^(\/|\.\/|\.\.\/)/.test(t)||/^[A-Za-z]:[\\/]/.test(t))return`local`;if(/^[\w.-]+\/[\w.-]+$/.test(t))return`github`;let n=/^([a-z][a-z0-9+.-]*):\/\//i.exec(t);return n?Se.has(n[1].toLowerCase())?`url`:null:/^[\w.-]+@[\w.-]+:/.test(t)?`scp`:null}function P(e){return e.length>0&&e.length<=256&&!e.startsWith(`-`)&&!e.includes(`..`)&&/^[A-Za-z0-9._/-]+$/.test(e)}var Ce=b().trim().min(1).max(500).refine(e=>N(e)!==null,{message:`Use ${M}.`}),we=b().trim().refine(P,{message:`Use a branch, tag or commit SHA, such as main.`}),Te=x({repo:b().min(1).max(500),ref:b().min(1).max(256)}).strict();x({repo:Ce,ref:we.optional()}).strict(),Te.extend({enabled:g()}).strict();var Ee=_([`refused-format`,`fetch-failed`,`ref-not-found`]),De=h(`state`,[x({state:v(`idle`)}),x({state:v(`loading`)}),x({state:v(`ok`),skillCount:y().int().min(0)}),x({state:v(`error`),cause:Ee,detail:b(),skillCount:y().int().min(0)})]);x({sources:ee(x({repo:b(),ref:b(),enabled:g(),status:De})),editable:g(),configIssue:b().nullable()});var F=()=>[i(),`skills`,`sources`];async function Oe(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$get({param:{projectId:i()}},m(e)),`/skills/sources`)}async function ke(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$post({param:{projectId:i()},json:e}),`/skills/sources`)}async function Ae(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$patch({param:{projectId:i()},json:e}),`/skills/sources`)}async function je(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$delete({param:{projectId:i()},json:e}),`/skills/sources`)}async function Me(e){return l(await f.api.v1.p[`:projectId`].skills.sources.retry.$post({param:{projectId:i()},json:e}),`/skills/sources/retry`)}var I=c(),Ne=1e3,L=e=>`${e.repo} @ ${e.ref}`;function Pe(){return ie({queryKey:F(),queryFn:({signal:e})=>Oe({signal:e}),refetchInterval:e=>e.state.data?.sources.some(e=>e.status.state===`loading`)?Ne:!1})}function R(){return{sources:F(),lists:[T.skills,T.skillsReady,T.importableSkills,T.importableSkillsReady]}}function z(e,t=R()){for(let n of t.lists)e.invalidateQueries({queryKey:n,exact:!0})}function B(e,t){let n=u();return C({mutationFn:async t=>{let n=R();return{answer:await e(t),keys:n}},onSuccess:({answer:e,keys:r},i)=>{n.setQueryData(r.sources,e),n.invalidateQueries({queryKey:r.sources,exact:!0}),z(n,r),t?.(i)},onError:e=>E(e.message,{tone:`danger`})})}function Fe(e){let t=u(),n=(0,j.useRef)(!1),r=e?.sources.some(e=>e.status.state===`loading`)??!1;(0,j.useEffect)(()=>{n.current&&!r&&z(t),n.current=r},[r,t])}function Ie(){let e=Pe();Fe(e.data);let t=B(Ae),i=B(je,e=>E(`Removed ${L(e)}. Add it again to restore its skill switches.`)),o=B(Me),s=e.data,c=s?.editable===!0&&s.configIssue===null,l=t.isPending||i.isPending;return(0,I.jsxs)(`section`,{"data-slot":`skill-sources`,"aria-labelledby":`skill-sources-heading`,className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-3 @min-[520px]:p-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{id:`skill-sources-heading`,className:`text-[15px] font-semibold`,children:`Team skill sources`}),(0,I.jsxs)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:[`Repos whose skills this project can use. Changes are saved to`,` `,(0,I.jsx)(`span`,{className:`font-mono`,children:`.ai/cezar/config.json`}),`.`]})]}),e.isError?(0,I.jsxs)(V,{slot:`skill-sources-error`,alert:!0,children:[`Could not load the team skill sources: `,e.error.message,` `,(0,I.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,className:`mt-2 min-h-11`,disabled:e.isFetching,onClick:()=>void e.refetch(),children:`Retry`})]}):null,s?.configIssue?(0,I.jsx)(V,{slot:`skill-sources-config-issue`,alert:!0,children:s.configIssue}):null,s&&!s.editable?(0,I.jsxs)(V,{slot:`skill-sources-read-only`,children:[`Sources are read-only on this remote cockpit. To edit them here, run`,` `,(0,I.jsxs)(`span`,{className:`font-mono`,children:[n(),` remote-settings enable`]}),` on the machine running `,r(`cezar`),`.`]}):null,e.isPending?(0,I.jsx)(`p`,{role:`status`,"aria-busy":`true`,className:`text-xs text-muted-foreground`,children:`Loading sources…`}):s&&s.configIssue===null&&s.sources.length===0?(0,I.jsx)(`p`,{"data-slot":`skill-sources-empty`,className:`text-xs leading-relaxed text-soft-foreground`,children:`No team skill sources yet. Add a repo below to use its skills in this project.`}):s&&s.sources.length>0?(0,I.jsx)(`ul`,{"data-slot":`skill-source-list`,className:`flex flex-col divide-y divide-border rounded-lg border border-border`,children:s.sources.map(e=>(0,I.jsx)(Le,{source:e,editable:c,busy:l,retrying:o.isPending,onToggle:()=>t.mutate({repo:e.repo,ref:e.ref,enabled:!e.enabled}),onRemove:()=>i.mutate({repo:e.repo,ref:e.ref}),onRetry:()=>o.mutate({repo:e.repo,ref:e.ref})},JSON.stringify([e.repo,e.ref])))}):null,s?(0,I.jsx)(Ve,{disabled:!c}):null]})}function V({slot:e,alert:t=!1,children:n}){return(0,I.jsxs)(`div`,{role:t?`alert`:void 0,"data-slot":e,className:`flex items-start gap-2 rounded-lg border border-border bg-background p-3 text-xs leading-relaxed text-muted-foreground`,children:[t?(0,I.jsx)(O,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-danger`}):null,(0,I.jsx)(`div`,{className:`min-w-0 break-words`,children:n})]})}function Le({source:e,editable:t,busy:n,retrying:r,onToggle:i,onRemove:o,onRetry:s}){let c=(0,j.useId)(),l=Re(e),u=e.status.state===`error`,d=e.enabled&&(u||e.status.state===`idle`);return(0,I.jsxs)(`li`,{"data-slot":`skill-source`,"data-repo":e.repo,"data-ref":e.ref,"data-state":e.enabled?e.status.state:`disabled`,className:`flex flex-col gap-2 p-2.5 @min-[520px]:flex-row @min-[520px]:items-center`,children:[(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`p`,{className:`break-all font-mono text-[13px] text-foreground`,children:[e.repo,` `,(0,I.jsxs)(`span`,{className:`text-muted-foreground`,children:[`@ `,e.ref]})]}),(0,I.jsx)(`p`,{id:c,"data-slot":`skill-source-status`,role:u?`alert`:void 0,"aria-live":u?void 0:`polite`,className:u?`mt-1 text-xs leading-relaxed text-danger`:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:l})]}),(0,I.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[d?(0,I.jsxs)(a,{type:`button`,variant:`outline`,size:`sm`,"data-slot":`skill-source-retry`,className:`min-h-11`,disabled:!t||r,"aria-label":`Retry ${L(e)}`,onClick:s,children:[(0,I.jsx)(D,{"aria-hidden":`true`}),`Retry`]}):null,(0,I.jsx)(`span`,{className:`inline-flex min-h-11 min-w-11 items-center justify-center`,children:(0,I.jsx)(ae,{"data-slot":`skill-source-switch`,"aria-label":`Enable ${L(e)}`,"aria-describedby":c,checked:e.enabled,disabled:!t||n,onCheckedChange:i,className:`relative before:absolute before:-inset-x-1 before:-inset-y-2.5 before:content-['']`})}),(0,I.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,"data-slot":`skill-source-remove`,className:`size-11`,disabled:!t||n,"aria-label":`Remove ${L(e)}`,onClick:o,children:(0,I.jsx)(pe,{"aria-hidden":`true`})})]})]})}function Re(e){if(!e.enabled)return`Disabled. Its skills are hidden from the catalog and from tasks.`;let t=e.status;switch(t.state){case`loading`:return`Fetching…`;case`idle`:return`Not fetched yet. Use Retry to fetch it now.`;case`ok`:return t.skillCount===1?`1 skill`:`${t.skillCount} skills`;case`error`:{let e=t.skillCount>0?` Skills from an earlier fetch still show.`:``;return t.cause===`refused-format`?`${r(`cezar`)} does not accept this repo format. Remove it, then add it as ${M}.`:t.cause===`ref-not-found`?`${t.detail} Check the ref, or remove the source and add it with another ref.${e}`:`Could not fetch: ${ze(t.detail)} Check the network and your access to the repo, then Retry.${e}`}}}var ze=e=>/[.!?]$/.test(e.trim())?e.trim():`${e.trim()}.`;function Be(e,t){return e.trim()?N(e)===null?`Use ${M}.`:t.trim()&&!P(t.trim())?`Use a branch, tag or commit SHA for the ref, such as main.`:null:`Enter a repo.`}function Ve({disabled:e}){let[t,n]=(0,j.useState)(``),[r,i]=(0,j.useState)(``),[o,s]=(0,j.useState)(null),c=(0,j.useId)(),l=(0,j.useId)(),u=(0,j.useId)(),d=B(ke,()=>{n(``),i(``)});return(0,I.jsxs)(`form`,{"data-slot":`skill-source-add`,"aria-label":`Add a team skill source`,noValidate:!0,onSubmit:e=>{e.preventDefault();let n=Be(t,r);s(n),!n&&d.mutate(r.trim()?{repo:t.trim(),ref:r.trim()}:{repo:t.trim()})},className:`flex flex-col gap-2 @min-[520px]:flex-row @min-[520px]:flex-wrap @min-[520px]:items-end`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,I.jsx)(`label`,{htmlFor:c,className:`text-xs font-medium`,children:`Repo`}),(0,I.jsx)(A,{id:c,"data-slot":`skill-source-repo`,value:t,placeholder:`owner/name`,autoComplete:`off`,spellCheck:!1,disabled:e,"aria-invalid":o?!0:void 0,"aria-describedby":o?u:void 0,onChange:e=>{n(e.target.value),s(null)},className:`h-11 font-mono text-[13px]`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 @min-[520px]:w-36`,children:[(0,I.jsx)(`label`,{htmlFor:l,className:`text-xs font-medium`,children:`Ref`}),(0,I.jsx)(A,{id:l,"data-slot":`skill-source-ref`,value:r,placeholder:`main`,autoComplete:`off`,spellCheck:!1,disabled:e,onChange:e=>{i(e.target.value),s(null)},className:`h-11 font-mono text-[13px]`})]}),(0,I.jsx)(a,{type:`submit`,"data-slot":`skill-source-submit`,className:`h-11`,disabled:e||d.isPending,children:`Add source`}),o?(0,I.jsx)(`p`,{id:u,role:`alert`,"data-slot":`skill-source-problem`,className:`text-xs text-danger @min-[520px]:basis-full`,children:o}):null]})}var He=[[`.ai`,`cezar`,`skills`],[`.ai`,`squawk`,`skills`],[`.ai`,`skills`],[`.claude`,`skills`],[`.agents`,`skills`],[`skills`]];function Ue(e){let t=e.split(`/`).slice(0,-1);if((e===`SKILL.md`||e.endsWith(`/SKILL.md`)||t.at(-1)===`commands`)&&t.pop(),t[0]===`plugins`&&t[1])return{kind:`plugin`,name:t[1]};for(let e of He){let n=We(t,e);if(n!==-1&&(e.length>1||n===t.length-1)){t.splice(n,e.length);break}}return t.length>0?{kind:`directory`,name:t.join(`/`)}:null}function We(e,t){for(let n=e.length-t.length;n>=0;n--)if(t.every((t,r)=>e[n+r]===t))return n;return-1}var H=[{id:`project`,label:`This project`,sources:new Set([`ai`,`cezar`,`agents`])},{id:`global`,label:`Global`,sources:new Set([`global`])},{id:`builtin`,label:`Built-in`,sources:new Set([`builtin`])}],U=(e,t,n,r)=>({key:e,label:t,kind:n,locked:r,items:[],children:[]});function Ge(e){let t=H.map(e=>U(`source\u0000${e.id}`,e.label,`source`,!0)),n=new Map;for(let r of e){let{skill:e}=r;if(!e.team){let n=H.findIndex(t=>t.sources.has(e.source));t[n===-1?0:n].items.push(r);continue}let{repo:i,path:a}=e.team,o=n.get(i);o||(o=U(`repo\u0000${i}`,i,`repo`,!1),n.set(i,o));let s=Ue(a);if(!s){o.items.push(r);continue}let c=`${o.key}\u0000${s.kind}\u0000${s.name}`,l=o.children.find(e=>e.key===c);l||(l=U(c,s.name,s.kind,!1),o.children.push(l)),l.items.push(r)}for(let e of n.values())e.children.sort((e,t)=>e.label.localeCompare(t.label));let r=[...n.values()].sort((e,t)=>e.label.localeCompare(t.label));return[t[0],...r,t[1],t[2]].filter(e=>e.items.length>0||e.children.length>0)}function W(e){return e.flatMap(e=>[e.key,...W(e.children)])}function G(e){return[...e.items,...e.children.flatMap(G)]}function Ke(e,t){let n=G(e);if(e.locked)return{enabled:n.length,total:n.length,state:`on`,refs:[]};let r=[],i=0;for(let{skill:e}of n)e.team&&(r.push({repo:e.team.repo,name:e.name}),t(e)&&i++);let a=i===0?`off`:i===r.length?`on`:`mixed`;return{enabled:i,total:r.length,state:a,refs:r}}function K(e,t){if(t.trim()===``)return null;let n=new Set,r=(e,i)=>{let a=[...i,e.label];for(let{skill:r,key:i}of e.items){let e=[r.description??``,...a].join(` `);ge(r.name,e,t)>0&&n.add(i)}for(let t of e.children)r(t,a)};for(let t of e)r(t,[]);return n}function q(e,t){let n=[],r=(e,i)=>{let a=[...i,e.key],o=e.items.some(e=>t.has(e.key));o&&n.push(...a.filter(e=>!n.includes(e)));for(let t of e.children)o=r(t,a)||o;return o};for(let t of e)r(t,[]);return n}function J(e){let t=e?.disabledTeamSkills;if(!Array.isArray(t))return[];let n=[];for(let e of t){let t=S.safeParse(e);t.success&&n.push(t.data)}return n}var Y=(e,t)=>e.repo===t.repo&&e.name===t.name;function X(e){return e.team?{repo:e.team.repo,name:e.name}:void 0}function qe(e,t,n){let r=new Map;for(let e of t)r.has(e.name)||r.set(e.name,e);let i=[],a=new Set;for(let t of e){let e=X(t);if(!e)continue;let o=JSON.stringify([e.repo,e.name]);if(a.has(o))continue;a.add(o);let s=n(e),c=r.get(t.name),l=c?X(c):void 0;s&&c&&!(l&&Y(l,e))?i.push({skill:t,on:s,hiddenBy:c.team?.repo??c.source}):i.push({skill:t,on:s})}return i}var Z=new Map;function Je(e){let t=Z.get(e);return t||(t={chain:Promise.resolve(),latest:0},Z.set(e,t)),t}function Ye(e){let t=u(),n=w(e),[r,i]=j.useState(0),a=j.useMemo(()=>J(n.data),[n.data]),o=j.useCallback(e=>!a.some(t=>Y(t,e)),[a]),s=j.useCallback(n=>{let r=[e,`ui-state`],a=[e,`skills`],o=t.getQueryData(r),s=n(J(o));t.setQueryData(r,{...o,disabledTeamSkills:s});let c=Je(e),l=++c.latest;i(e=>e+1),c.chain=c.chain.then(async()=>{try{let n=await d({disabledTeamSkills:s},e);l===c.latest&&(t.setQueryData(r,n),t.invalidateQueries({queryKey:a}))}catch(e){E(e instanceof Error?e.message:String(e),{tone:`danger`}),l===c.latest&&t.invalidateQueries({queryKey:r})}finally{i(e=>e-1)}})},[e,t]);return{disabled:a,isOn:o,toggle:j.useCallback(e=>{let t={repo:e.repo,name:e.name};s(e=>e.some(e=>Y(e,t))?e.filter(e=>!Y(e,t)):[...e,t])},[s]),setMany:j.useCallback((e,t)=>{let n=e.map(e=>({repo:e.repo,name:e.name}));s(e=>{if(t)return e.filter(e=>!n.some(t=>Y(e,t)));let r=[...e];for(let e of n)r.some(t=>Y(t,e))||r.push(e);return r})},[s]),pending:r>0,ready:n.isSuccess}}var Q=`__bm`,Xe=`__import`,$=e=>e.team?`${e.team.repo}\u0000${e.name}`:e.path,Ze=e=>e.source!==`team`&&e.source!==`builtin`;function Qe(){return(0,I.jsx)(`div`,{"data-route":`skills`,className:`mx-auto min-h-full w-full px-[18px] py-6 md:p-9`,children:(0,I.jsx)($e,{})})}function $e(){let e=re(),n=ne(),r=te(),[a]=t(),[o,s]=(0,j.useState)(``),c=Ye(i()),l=et(),u=(0,j.useMemo)(()=>e.data??[],[e.data]),d=(0,j.useMemo)(()=>r.data??[],[r.data]),f=r.isSuccess,p=(0,j.useMemo)(()=>tt(u,f?d:null,c.isOn),[u,d,f,c.isOn]),m=(0,j.useMemo)(()=>Ge(p),[p]),h=new Map;for(let e of p)h.set(e.skill.name,(h.get(e.skill.name)??0)+1);let g=e=>(h.get(e.name)??0)>1&&e.team!==void 0,_=e=>{let t=X(e);return t&&f?c.isOn(t):!0},ee=e=>{let t=X(e);return t?{ariaLabel:g(e)?`Enable ${e.name} from ${t.repo}`:`Enable ${e.name}`,checked:_(e),disabled:!f||!c.ready,locked:!1,onCheckedChange:()=>c.toggle(t)}:{ariaLabel:`${e.name} is always enabled`,checked:!0,disabled:!0,locked:!0,onCheckedChange:()=>{}}},v=e=>`/skills?skill=${encodeURIComponent(e.name)}${g(e)?`&repo=${encodeURIComponent(e.team.repo)}`:``}`,y=a.get(`skill`),b=nt(p,y,a.get(`repo`),_)?.key??null,x=rt(m,b),S=e=>{s(e);let t=K(m,e);t&&t.size>0&&x.open(q(m,t))};if(e.isError)return(0,I.jsx)(he,{icon:(0,I.jsx)(O,{}),tone:`danger`,heading:`h2`,title:`Could not load skills`,subtitle:e.error.message});let C=y===Q,w=e.isPending?[]:it({tree:m,matches:K(m,o),isOpen:x.isOpen,onFold:x.toggle,openKey:b,workflows:n.data?.workflows??[],activationFor:ee,linkFor:v,groupActivationFor:e=>Ke(e,_),switchable:f&&c.ready,onActivate:c.setMany});return(0,I.jsxs)(`div`,{"data-slot":`skills-section`,className:`@container flex min-w-0 flex-col gap-[22px]`,children:[(0,I.jsxs)(`header`,{className:`flex flex-col gap-4 @min-[700px]:flex-row @min-[700px]:items-center @min-[700px]:justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-[25px] font-semibold md:text-[30px]`,children:`Skills`}),(0,I.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground md:text-[13px]`,children:`Markdown playbooks your agents can follow.`})]}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,I.jsxs)(k,{to:C?`/skills`:`/skills?skill=${Q}`,"data-slot":`bookmarklets-row`,"aria-current":C?`page`:void 0,"aria-expanded":C,className:`inline-flex min-h-11 items-center gap-2 rounded-lg border border-border bg-card px-3 text-xs font-medium aria-[current=page]:bg-accent-strong/10 hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,I.jsx)(de,{"aria-hidden":`true`,className:`size-4 text-link-foreground`}),`Run from GitHub`]})})]}),C?(0,I.jsx)(`section`,{"data-slot":`skills-bookmarklets`,className:`min-w-0 rounded-xl border border-border bg-card p-5`,children:(0,I.jsx)(be,{skills:p.filter(e=>_(e.skill)&&!e.hiddenBy).map(e=>e.skill)})}):null,(0,I.jsx)(Ie,{}),(0,I.jsx)(ot,{query:o,onQuery:S,refreshing:l.isPending,onRefresh:()=>l.mutate(),onFoldAll:x.setAll}),(0,I.jsxs)(`section`,{"data-slot":`skills-list`,"aria-label":`Skills`,className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-2 @min-[520px]:p-3`,children:[r.isError?(0,I.jsx)(st,{message:r.error.message,retrying:r.isFetching,onRetry:()=>void r.refetch()}):null,(0,I.jsx)(`div`,{"data-slot":`skill-rows`,className:`min-h-0 overflow-y-auto md:max-h-[calc(100dvh-260px)]`,children:e.isPending?(0,I.jsx)(`p`,{role:`status`,"aria-busy":`true`,className:`min-h-72 p-3 text-[13px] text-muted-foreground`,children:`Loading skills…`}):w.length>0?(0,I.jsxs)(`table`,{"data-slot":`skills-table`,className:`w-full table-fixed border-collapse text-left`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{className:`border-b border-border text-[12px] text-muted-foreground`,children:[(0,I.jsx)(`th`,{scope:`col`,className:`px-2 py-2 font-semibold`,children:`Skill / group`}),(0,I.jsx)(`th`,{scope:`col`,className:`hidden w-[30%] px-2 py-2 font-semibold @min-[520px]:table-cell`,children:`Used by`}),(0,I.jsx)(`th`,{scope:`col`,className:`w-[116px] px-2 py-2 text-right font-semibold`,children:`Enabled`})]})}),(0,I.jsx)(`tbody`,{children:w})]}):(0,I.jsx)(`p`,{className:`px-2.5 py-2 text-xs leading-relaxed text-soft-foreground`,children:p.length>0?`(no skills match)`:(0,I.jsx)(xe,{})})})]})]})}function et(){let e=u();return C({mutationFn:()=>p(),onSuccess:t=>{e.setQueryData(T.skills,t),e.invalidateQueries({queryKey:T.importableSkills}),E(`Team skills refreshed.`)},onError:e=>E(e.message,{tone:`danger`})})}function tt(e,t,n){let r=new Set(e.filter(Ze).map(e=>e.name)),i=t?qe(t.filter(e=>!r.has(e.name)),e,n):[],a=(e,t)=>({skill:e,key:$(e),...t?{hiddenBy:t}:{}}),o=new Set((t??[]).map($)),s=[...e.filter(e=>e.source!==`team`||!o.has($(e))).map(e=>a(e)),...i.map(e=>a(e.skill,e.on?e.hiddenBy:void 0))].sort((e,t)=>e.skill.name.localeCompare(t.skill.name)),c=new Map(s.map(e=>[e.skill,e]));return ve(s.map(e=>e.skill)).map(e=>c.get(e))}function nt(e,t,n,r){if(t===null||t===Q)return null;if(t===Xe)return e.find(e=>!r(e.skill))??null;let i=e.filter(e=>e.skill.name===t);return i.find(e=>n===null||e.skill.team?.repo===n)??i[0]??null}function rt(e,t){let[n,r]=(0,j.useState)({}),i=e=>r(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),a=t?q(e,new Set([t])).join(``):``;return(0,j.useEffect)(()=>{a&&r(e=>({...e,...Object.fromEntries(a.split(``).map(e=>[e,!0]))}))},[a]),{isOpen:(e,t)=>n[e.key]??t===0,toggle:(e,t)=>r(n=>({...n,[e]:t})),open:i,setAll:t=>r(Object.fromEntries(W(e).map(e=>[e,t])))}}function it(e){let t=[],n=t=>e.matches===null||e.matches.has(t.key),r=e=>e.items.some(n)||e.children.some(r),i=(a,o)=>{if(!r(a))return;let s=e.isOpen(a,o);if(t.push((0,I.jsx)(ut,{node:a,depth:o,open:s,onFold:()=>e.onFold(a.key,!s),activation:e.groupActivationFor(a),switchable:e.switchable,onActivate:e.onActivate},a.key)),s){for(let r of a.items.filter(n)){let n=r.key===e.openKey,i=ye(e.workflows,r.skill.name),a=e.activationFor(r.skill);t.push((0,I.jsx)(ft,{item:r,depth:o+1,href:n?`/skills`:e.linkFor(r.skill),expanded:n,usedBy:i,activation:a},r.key)),n&&t.push((0,I.jsx)(at,{skill:r.skill,usedBy:i,activation:a},`${r.key}\u0000detail`))}for(let e of a.children)i(e,o+1)}};for(let t of e.tree)i(t,0);return t}function at({skill:e,usedBy:t,activation:n}){return(0,I.jsx)(`tr`,{"data-slot":`skill-detail-row`,children:(0,I.jsx)(`td`,{colSpan:3,className:`border-b border-border px-3 pb-5 @min-[520px]:px-5`,children:(0,I.jsx)(`div`,{"data-slot":`skills-detail`,className:`min-w-0 rounded-lg border border-border bg-background p-4 md:p-5`,children:(0,I.jsx)(se,{skill:e,usedBy:t,activation:n})})})})}function ot({query:e,onQuery:t,refreshing:n,onRefresh:r,onFoldAll:i}){return(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsxs)(`div`,{className:`sw-search relative min-w-0 basis-full sm:basis-auto sm:flex-1`,children:[(0,I.jsx)(le,{"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,I.jsx)(A,{"data-slot":`skills-filter`,placeholder:`Filter skills…`,"aria-label":`Filter skills`,value:e,onChange:e=>t(e.target.value),className:`h-11 min-w-0 bg-card pl-9 text-xs`})]}),(0,I.jsxs)(`button`,{type:`button`,"data-slot":`skills-refresh`,title:`git fetch the team skills repos`,disabled:n,onClick:r,className:`flex h-11 shrink-0 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-55`,children:[(0,I.jsx)(D,{"aria-hidden":`true`,className:o(`size-3`,n&&`motion-safe:animate-spin`)}),n?`Refreshing…`:`Refresh`]}),(0,I.jsx)(a,{type:`button`,variant:`outline`,"data-slot":`skills-expand-all`,className:`h-11 text-xs`,onClick:()=>i(!0),children:`Expand groups`}),(0,I.jsx)(a,{type:`button`,variant:`outline`,"data-slot":`skills-collapse-all`,className:`h-11 text-xs`,onClick:()=>i(!1),children:`Collapse groups`})]})}function st({message:e,retrying:t,onRetry:n}){return(0,I.jsxs)(`div`,{role:`alert`,"data-slot":`skills-importable-error`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-background p-3 text-xs text-muted-foreground`,children:[(0,I.jsxs)(`span`,{children:[`Could not load the team skills, so they cannot be switched right now. Your saved choice is kept.`,` `,e]}),(0,I.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,className:`min-h-11`,disabled:t,onClick:n,children:`Retry`})]})}var ct={repo:`repository`,plugin:`plugin`,directory:`directory`},lt=e=>({paddingInlineStart:`${e*16}px`});function ut({node:e,depth:t,open:n,onFold:r,activation:i,switchable:a,onActivate:s}){let c=n?me:ue,l=ct[e.kind],u=e.locked||a;return(0,I.jsxs)(`tr`,{"data-slot":`skill-group-row`,"data-group":e.label,"data-kind":e.kind,"data-level":t,className:o(`border-b border-border`,t===0&&`bg-muted/40`),children:[(0,I.jsx)(`th`,{scope:`row`,className:`min-w-0 p-0 text-left font-normal`,children:(0,I.jsx)(`span`,{className:`flex min-w-0`,style:lt(t),children:(0,I.jsxs)(`button`,{type:`button`,"data-slot":`skill-group-toggle`,"aria-expanded":n,onClick:r,className:`flex min-h-11 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-left hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground`,children:[(0,I.jsx)(c,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,I.jsx)(`span`,{className:o(`min-w-0 [overflow-wrap:anywhere]`,t===0?`text-[13px] font-semibold`:`text-[13px] font-medium`),children:e.label}),l?(0,I.jsx)(`span`,{className:`shrink-0 text-[12px] text-soft-foreground`,children:l}):null]})})}),(0,I.jsx)(`td`,{"aria-hidden":`true`,className:`hidden @min-[520px]:table-cell`}),(0,I.jsx)(`td`,{className:`px-1 py-0 text-right`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center justify-end gap-1`,children:[(0,I.jsx)(`span`,{"data-slot":`skill-group-count`,className:`text-[12px] tabular-nums text-muted-foreground`,children:u?`${i.enabled} / ${i.total}`:`—`}),(0,I.jsx)(dt,{label:e.label,locked:e.locked,state:u?i.state:null,disabled:e.locked||!a||i.total===0,onClick:()=>s(i.refs,i.state!==`on`)})]})})]})}function dt({label:e,locked:t,state:n,disabled:r,onClick:i}){return(0,I.jsx)(`button`,{type:`button`,role:`checkbox`,"data-slot":`skill-group-switch`,"data-state":n??`unknown`,"aria-checked":n===null?void 0:n===`mixed`?`mixed`:n===`on`,"aria-busy":n===null||void 0,"aria-label":t?`${e} skills are always enabled`:`Enable all skills in ${e}`,disabled:r,onClick:i,className:`group/check inline-flex size-11 shrink-0 items-center justify-center rounded-md focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground disabled:cursor-default`,children:(0,I.jsx)(`span`,{"aria-hidden":`true`,className:o(`inline-flex size-5 items-center justify-center rounded border-2 transition-colors`,n===`on`||n===`mixed`?`border-accent-strong bg-accent-strong text-accent-strong-foreground`:`border-muted-foreground bg-card text-transparent`,n===null&&`border-dashed border-soft-foreground`,`group-disabled/check:opacity-60`),children:n===`mixed`?(0,I.jsx)(ce,{className:`size-3.5`}):(0,I.jsx)(fe,{className:`size-3.5`})})})}function ft({item:e,depth:t,href:n,expanded:r,usedBy:i,activation:a}){let{skill:s,hiddenBy:c}=e,l=_e(s),u=[...new Set(i.map(e=>e.split(` › `)[0]))];return(0,I.jsxs)(`tr`,{"data-slot":`skill-table-row`,className:o(`border-b border-border`,r&&`border-transparent`),children:[(0,I.jsx)(`td`,{className:`min-w-0 p-0`,style:lt(t),children:(0,I.jsxs)(k,{to:n,"data-slot":`skill-row`,"data-skill":s.name,"data-repo":s.team?.repo,"data-project":l?`true`:void 0,"data-enabled":a.checked?`true`:void 0,"aria-current":r?`page`:void 0,"aria-expanded":r,className:o(`selection-row flex min-h-11 min-w-0 flex-col justify-center gap-1 rounded-md px-3 py-2 transition-colors hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground`,r&&`bg-accent-strong/10`),children:[(0,I.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:(0,I.jsx)(`span`,{className:o(`min-w-0 break-words text-[13px]`,l?`font-semibold text-foreground`:`font-normal text-muted-foreground`),children:s.name})}),s.description?(0,I.jsx)(`span`,{className:`line-clamp-1 text-xs leading-relaxed text-supporting-foreground`,children:s.description}):null,u.length>0?(0,I.jsxs)(`span`,{"data-slot":`skill-used-by-inline`,className:`text-xs text-supporting-foreground @min-[520px]:hidden`,children:[`Used by `,u.join(`, `)]}):null,c?(0,I.jsxs)(`span`,{"data-slot":`skill-hidden-by`,className:`min-w-0 text-xs text-supporting-foreground [overflow-wrap:anywhere]`,children:[`hidden by `,c]}):null]})}),(0,I.jsx)(`td`,{"data-slot":`skill-used-by-cell`,className:`hidden px-2 py-2 align-middle text-xs text-supporting-foreground @min-[520px]:table-cell`,children:u.length>0?(0,I.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:u.join(`, `)}):(0,I.jsx)(`span`,{className:`text-soft-foreground`,children:`—`})}),(0,I.jsx)(`td`,{className:`px-1 py-0 text-right align-middle`,children:(0,I.jsx)(`span`,{className:`inline-flex justify-end`,children:(0,I.jsx)(oe,{skill:s,activation:a})})})]})}export{Qe as SkillsRoute};
@@ -1 +1 @@
1
- import{l as e,u as t}from"./button-DRCTAIzF.js";import{t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./project-router-DudcMzJa.js";var i=n();function a({to:n,active:a=!1,onClick:o,count:s,replace:c,className:l,children:u}){return(0,i.jsxs)(r,{to:n,...e({replace:c}),"aria-current":a?`page`:void 0,onClick:o,className:t(`-mb-px flex h-8 items-center rounded-t-md border-b-2 px-3 text-[13px] font-medium`,a?`border-foreground font-semibold text-foreground`:`border-transparent text-muted-foreground hover:bg-muted hover:text-foreground`,l),children:[u,s===void 0?null:(0,i.jsx)(`span`,{"data-slot":`tab-count`,className:`ml-1.5 text-[11.5px] font-normal text-soft-foreground`,children:s})]})}export{a as t};
1
+ import{l as e,u as t}from"./button-CHUAMTHK.js";import{t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./project-router-1m_VlC22.js";var i=n();function a({to:n,active:a=!1,onClick:o,count:s,replace:c,className:l,children:u}){return(0,i.jsxs)(r,{to:n,...e({replace:c}),"aria-current":a?`page`:void 0,onClick:o,className:t(`-mb-px flex h-8 items-center rounded-t-md border-b-2 px-3 text-[13px] font-medium`,a?`border-foreground font-semibold text-foreground`:`border-transparent text-muted-foreground hover:bg-muted hover:text-foreground`,l),children:[u,s===void 0?null:(0,i.jsx)(`span`,{"data-slot":`tab-count`,className:`ml-1.5 text-[11.5px] font-normal text-soft-foreground`,children:s})]})}export{a as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,t as n}from"./button-DRCTAIzF.js";import{i as r,t as i}from"./react-runtime-CCIEwYL0.js";import{$t as a,Gt as o,Jr as s,T as c,g as l,i as u,qt as d,vn as f,wt as p}from"./project-scope-context-DDZVS0W-.js";import{Cn as m,Nn as h,P as g,Un as _,_t as v,dt as y,gt as b,n as x}from"./queries-C6in05vw.js";import{n as S}from"./toaster-Dk0xOpec.js";import{M as C,w}from"./design-icons-DmYTv2r1.js";import{a as T,c as E,i as D,n as O,o as k,s as A,t as j}from"./textarea-ffrAeHUi.js";import{t as M}from"./run-header-DGWkKFX-.js";import{i as N,n as P,r as F}from"./git-toolbar-DJi8-Bfp.js";import{t as I}from"./centered-state-xPENgUmo.js";import{Ct as L,Mt as R,R as z,St as B,q as V}from"./index-BDNQ4NIe.js";import{t as H}from"./markdown-BBDDg-4t.js";import{t as U}from"./diff-CpkTjlLm.js";var W=e(r(),1),G=e=>e===`running`||e===`queued`||e===`waiting`,K=`no worktree — this task ran directly in the repo working tree`;function q(e){let t=e=>({id:`commit`,label:`Commit`,enabled:!1,reason:e});return e.hasWorktree?e.status===`running`?t(`Commit unavailable — the agent is still working in this worktree`):e.changedFiles===void 0?t(`Commit unavailable — changes are still loading`):e.changedFiles===0?t(`Commit unavailable — no changes to commit`):{id:`commit`,label:`Commit`,enabled:!0}:t(`Commit unavailable — ${K}`)}function J(e){let t=e=>({id:`push`,label:`Push`,enabled:!1,reason:e});return e.hasWorktree?e.remote===void 0?t(`Push unavailable — no remote configured`):e.branch===void 0?t(`Push unavailable — the run has no branch to push`):e.status===`running`?t(`Push unavailable — the agent is still working in this worktree`):{id:`push`,label:`Push`,enabled:!0}:t(`Push unavailable — ${K}`)}function Y(e){let t=e=>({id:`create-pr`,label:`Create PR`,enabled:!1,reason:e});return!e.hasWorktree||e.branch===void 0?t(`Create PR unavailable — ${K}`):e.forge===null?t(`Create PR unavailable — no supported forge remote (GitHub) detected`):e.forge.available?G(e.status)?t(`Create PR unavailable — the run is still active; wait for the review gate`):{id:`create-pr`,label:`Create PR`,enabled:!0}:t(`Create PR unavailable — ${e.forge.reason??`the forge is unreachable`}`)}function X(e){let t=e.prUrl?{id:`view-pr`,label:`View PR`,enabled:!0,href:e.prUrl}:q(e),n=e.prUrl?[q(e),J(e)]:[J(e),Y(e)],r=[];if(e.localHandoff){let t=e.hasSession?G(e.status)?{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — the session is still active in the engine`}:{id:`open-terminal`,label:`Open in terminal`,enabled:!0}:{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — no agent session to resume`};r.push(t)}return{primary:t,secondary:n,menu:r}}var Z=i();function Q({run:e,open:t,onOpenChange:r}){let i=s(),[a,o]=(0,W.useState)(``),c=m(e),u=(0,W.useRef)(c);u.current=c,(0,W.useEffect)(()=>{t&&o(u.current)},[t]);let d=_({mutationFn:t=>l(e.id,t),onSuccess:t=>{S(`Committed ${t.sha.slice(0,7)}`),r(!1),i.invalidateQueries({queryKey:x.runs.changes(e.id)}),i.invalidateQueries({queryKey:x.runs.all})},onError:e=>S(e.message,{tone:`danger`})}),f=()=>{let e=a.trim();e.length===0||d.isPending||d.mutate(e)};return(0,Z.jsx)(O,{open:t,onOpenChange:r,children:(0,Z.jsxs)(D,{"data-slot":`commit-dialog`,children:[(0,Z.jsxs)(A,{children:[(0,Z.jsx)(E,{children:`Commit changes`}),(0,Z.jsxs)(T,{children:[`Stages everything in the task's worktree (git add -A) and commits to`,` `,e.branch?(0,Z.jsx)(`span`,{className:`font-mono`,children:e.branch}):`its branch`,`.`]})]}),(0,Z.jsx)(j,{"data-slot":`commit-message`,"aria-label":`Commit message`,rows:3,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{R({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),f())}}),(0,Z.jsxs)(k,{children:[(0,Z.jsx)(n,{variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),(0,Z.jsx)(n,{"data-slot":`commit-confirm`,disabled:a.trim().length===0||d.isPending,onClick:f,children:d.isPending?`Committing…`:`Commit`})]})]})})}function $(){let{id:e}=t(),n=b(e);return n.isPending?(0,Z.jsx)(L,{tab:`changes`}):n.isError?(0,Z.jsx)(B,{tab:`changes`,error:n.error}):(0,Z.jsx)(ee,{run:n.data})}function ee({run:e}){let t=g(),n=y(),r=v(e.id,h(e)),i=V(),[l,f]=(0,W.useState)(`unified`),[p,m]=(0,W.useState)(!1),[b,C]=(0,W.useState)(!1),[w,T]=(0,W.useState)(null),[E,D]=(0,W.useState)(!1),O=(0,W.useRef)(null),k=s(),A=()=>k.invalidateQueries({queryKey:x.runs.all}),j=e=>S(e.message,{tone:`danger`}),N=_({mutationFn:()=>a(e.id),onSuccess:e=>S(e.upstreamSet?`Pushed ${e.branch} to ${e.remote} (upstream set)`:`Pushed ${e.branch} to ${e.remote}`),onError:j}),I=_({mutationFn:()=>c(e.id),onSuccess:e=>{S(`Draft PR created — ${e.url}`),A()},onError:j}),L=_({mutationFn:()=>d(e.id),onError:e=>{if(e instanceof u&&e.command){navigator.clipboard.writeText(e.command).then(()=>S(`No terminal found — command copied to clipboard.`)).catch(()=>S(`Run manually: ${e.command}`));return}j(e)}}),R=_({mutationFn:t=>o(e.id,t),onError:j}),B=r.isError&&r.error instanceof u&&r.error.status===409,U=X({status:e.status,hasWorktree:!!e.worktreePath&&!B,branch:e.branch,changedFiles:r.data?.stat.files,remote:n.data?.info?.remote,forge:t.data?.forge??null,localHandoff:t.data?.capabilities.localHandoff??!1,hasSession:z(e)!==void 0,prUrl:e.pullRequestUrl}),G=e=>{switch(e){case`commit`:D(!0);break;case`push`:N.mutate();break;case`create-pr`:I.mutate();break;case`open-terminal`:L.mutate();break;case`view-pr`:break}},K=r.data?.files??[],q=(0,W.useMemo)(()=>F(K),[K]),J=(0,W.useMemo)(()=>K.some(H),[K]),Y=i?l:`unified`,$=!i||p;return(0,Z.jsxs)(`div`,{"data-route":`task-changes`,className:`flex min-h-full flex-col`,children:[(0,Z.jsx)(M,{run:e,tab:`changes`}),(0,Z.jsx)(P,{bar:U,healthReady:t.data!==void 0,branch:e.branch,stat:r.data?.stat,mode:Y,wrap:$,preview:b,onModeChange:f,onWrapChange:m,onPreviewChange:J?C:void 0,onAction:G}),r.data?.repointedHead?(0,Z.jsxs)(`p`,{"data-slot":`repointed-head-note`,className:`border-b px-4 py-2 text-xs text-soft-foreground md:px-9`,children:[`HEAD is on `,(0,Z.jsx)(`code`,{children:r.data.repointedHead.headBranch}),`, not this task's branch`,` `,(0,Z.jsx)(`code`,{children:r.data.repointedHead.taskBranch}),` — showing only what this task changed there.`]}):null,(0,Z.jsx)(te,{changes:r,changesRefused:B,fileCount:K.length,children:(0,Z.jsx)(ne,{runId:e.id,files:K,tree:q,selected:w,selectFile:e=>{T(e),O.current?.scrollToPath(e)},diffRef:O,effectiveMode:Y,effectiveWrap:$,preview:b,localHandoff:t.data?.capabilities.localHandoff,onOpenInApp:R.mutate})}),(0,Z.jsx)(Q,{run:e,open:E,onOpenChange:D})]})}function te({changes:e,changesRefused:t,fileCount:n,children:r}){return e.isPending?(0,Z.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-9`,children:`Loading changes…`}):e.isError?(0,Z.jsx)(I,{icon:t?(0,Z.jsx)(w,{size:16}):(0,Z.jsx)(C,{size:16}),tone:t?`neutral`:`danger`,heading:`h2`,title:t?`No changes to show`:`Could not load the changes`,subtitle:e.error.message}):n===0?(0,Z.jsx)(I,{icon:(0,Z.jsx)(w,{size:16}),tone:`neutral`,heading:`h2`,title:`No changes yet`,subtitle:`The worktree matches its base branch. Changes appear here as the agent works.`}):r}function ne({runId:e,files:t,tree:n,selected:r,selectFile:i,diffRef:a,effectiveMode:o,effectiveWrap:s,preview:c,localHandoff:l,onOpenInApp:u}){return(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-stretch gap-5 md:flex-row md:items-start px-[18px] pb-9 pt-0 [--diff-sticky-top:0px] md:[--diff-sticky-top:1rem] md:px-9`,children:[(0,Z.jsxs)(`aside`,{"data-slot":`changes-tree-pane`,className:`md:sticky md:top-4 max-h-[calc(100dvh_-_64px_-_var(--diff-sticky-top)_-_1rem)] w-full md:w-60 shrink-0 overflow-y-auto overscroll-contain rounded-xl border border-border bg-card p-3.5 md:block lg:w-[250px]`,children:[(0,Z.jsx)(`h2`,{className:`mb-3 border-b border-border pb-3 text-xs font-semibold`,children:`Changed files`}),(0,Z.jsx)(N,{root:n,selected:r,onSelect:i})]}),(0,Z.jsx)(U,{files:t,viewRef:a,mode:o,wrap:s,preview:c,loadFileText:t=>re(e,t),imageSrc:t=>f(e,t),onOpenInApp:l?e=>u(e):void 0,className:`min-w-0 flex-1`})]})}async function re(e,t){try{let n=await p(e,t);return n.type!==`file`||n.binary||n.tooLarge?null:n.content??null}catch{return null}}export{$ as TaskChangesRoute};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,t as n}from"./button-CHUAMTHK.js";import{i as r,t as i}from"./react-runtime-CCIEwYL0.js";import{$t as a,Gt as o,Jr as s,T as c,g as l,i as u,qt as d,vn as f,wt as p}from"./project-scope-context-CaUqlAd7.js";import{Cn as m,Nn as h,P as g,Un as _,_t as v,dt as y,gt as b,n as x}from"./queries-DYfIpJ-d.js";import{n as S}from"./toaster-B1MyeHiE.js";import{M as C,w}from"./design-icons-DmYTv2r1.js";import{a as T,c as E,i as D,n as O,o as k,s as A,t as j}from"./textarea-DlVUfdWG.js";import{t as M}from"./run-header-DPjiPKRe.js";import{i as N,n as P,r as F}from"./git-toolbar-Dwz8p8GW.js";import{t as I}from"./centered-state-DGyy0SuA.js";import{Ct as L,Mt as R,R as z,St as B,q as V}from"./index-D489J7QW.js";import{t as H}from"./markdown-BBDDg-4t.js";import{t as U}from"./diff-tVGVhYyc.js";var W=e(r(),1),G=e=>e===`running`||e===`queued`||e===`waiting`,K=`no worktree — this task ran directly in the repo working tree`;function q(e){let t=e=>({id:`commit`,label:`Commit`,enabled:!1,reason:e});return e.hasWorktree?e.status===`running`?t(`Commit unavailable — the agent is still working in this worktree`):e.changedFiles===void 0?t(`Commit unavailable — changes are still loading`):e.changedFiles===0?t(`Commit unavailable — no changes to commit`):{id:`commit`,label:`Commit`,enabled:!0}:t(`Commit unavailable — ${K}`)}function J(e){let t=e=>({id:`push`,label:`Push`,enabled:!1,reason:e});return e.hasWorktree?e.remote===void 0?t(`Push unavailable — no remote configured`):e.branch===void 0?t(`Push unavailable — the run has no branch to push`):e.status===`running`?t(`Push unavailable — the agent is still working in this worktree`):{id:`push`,label:`Push`,enabled:!0}:t(`Push unavailable — ${K}`)}function Y(e){let t=e=>({id:`create-pr`,label:`Create PR`,enabled:!1,reason:e});return!e.hasWorktree||e.branch===void 0?t(`Create PR unavailable — ${K}`):e.forge===null?t(`Create PR unavailable — no supported forge remote (GitHub) detected`):e.forge.available?G(e.status)?t(`Create PR unavailable — the run is still active; wait for the review gate`):{id:`create-pr`,label:`Create PR`,enabled:!0}:t(`Create PR unavailable — ${e.forge.reason??`the forge is unreachable`}`)}function X(e){let t=e.prUrl?{id:`view-pr`,label:`View PR`,enabled:!0,href:e.prUrl}:q(e),n=e.prUrl?[q(e),J(e)]:[J(e),Y(e)],r=[];if(e.localHandoff){let t=e.hasSession?G(e.status)?{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — the session is still active in the engine`}:{id:`open-terminal`,label:`Open in terminal`,enabled:!0}:{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — no agent session to resume`};r.push(t)}return{primary:t,secondary:n,menu:r}}var Z=i();function Q({run:e,open:t,onOpenChange:r}){let i=s(),[a,o]=(0,W.useState)(``),c=m(e),u=(0,W.useRef)(c);u.current=c,(0,W.useEffect)(()=>{t&&o(u.current)},[t]);let d=_({mutationFn:t=>l(e.id,t),onSuccess:t=>{S(`Committed ${t.sha.slice(0,7)}`),r(!1),i.invalidateQueries({queryKey:x.runs.changes(e.id)}),i.invalidateQueries({queryKey:x.runs.all})},onError:e=>S(e.message,{tone:`danger`})}),f=()=>{let e=a.trim();e.length===0||d.isPending||d.mutate(e)};return(0,Z.jsx)(O,{open:t,onOpenChange:r,children:(0,Z.jsxs)(D,{"data-slot":`commit-dialog`,children:[(0,Z.jsxs)(A,{children:[(0,Z.jsx)(E,{children:`Commit changes`}),(0,Z.jsxs)(T,{children:[`Stages everything in the task's worktree (git add -A) and commits to`,` `,e.branch?(0,Z.jsx)(`span`,{className:`font-mono`,children:e.branch}):`its branch`,`.`]})]}),(0,Z.jsx)(j,{"data-slot":`commit-message`,"aria-label":`Commit message`,rows:3,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{R({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),f())}}),(0,Z.jsxs)(k,{children:[(0,Z.jsx)(n,{variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),(0,Z.jsx)(n,{"data-slot":`commit-confirm`,disabled:a.trim().length===0||d.isPending,onClick:f,children:d.isPending?`Committing…`:`Commit`})]})]})})}function $(){let{id:e}=t(),n=b(e);return n.isPending?(0,Z.jsx)(L,{tab:`changes`}):n.isError?(0,Z.jsx)(B,{tab:`changes`,error:n.error}):(0,Z.jsx)(ee,{run:n.data})}function ee({run:e}){let t=g(),n=y(),r=v(e.id,h(e)),i=V(),[l,f]=(0,W.useState)(`unified`),[p,m]=(0,W.useState)(!1),[b,C]=(0,W.useState)(!1),[w,T]=(0,W.useState)(null),[E,D]=(0,W.useState)(!1),O=(0,W.useRef)(null),k=s(),A=()=>k.invalidateQueries({queryKey:x.runs.all}),j=e=>S(e.message,{tone:`danger`}),N=_({mutationFn:()=>a(e.id),onSuccess:e=>S(e.upstreamSet?`Pushed ${e.branch} to ${e.remote} (upstream set)`:`Pushed ${e.branch} to ${e.remote}`),onError:j}),I=_({mutationFn:()=>c(e.id),onSuccess:e=>{S(`Draft PR created — ${e.url}`),A()},onError:j}),L=_({mutationFn:()=>d(e.id),onError:e=>{if(e instanceof u&&e.command){navigator.clipboard.writeText(e.command).then(()=>S(`No terminal found — command copied to clipboard.`)).catch(()=>S(`Run manually: ${e.command}`));return}j(e)}}),R=_({mutationFn:t=>o(e.id,t),onError:j}),B=r.isError&&r.error instanceof u&&r.error.status===409,U=X({status:e.status,hasWorktree:!!e.worktreePath&&!B,branch:e.branch,changedFiles:r.data?.stat.files,remote:n.data?.info?.remote,forge:t.data?.forge??null,localHandoff:t.data?.capabilities.localHandoff??!1,hasSession:z(e)!==void 0,prUrl:e.pullRequestUrl}),G=e=>{switch(e){case`commit`:D(!0);break;case`push`:N.mutate();break;case`create-pr`:I.mutate();break;case`open-terminal`:L.mutate();break;case`view-pr`:break}},K=r.data?.files??[],q=(0,W.useMemo)(()=>F(K),[K]),J=(0,W.useMemo)(()=>K.some(H),[K]),Y=i?l:`unified`,$=!i||p;return(0,Z.jsxs)(`div`,{"data-route":`task-changes`,className:`flex min-h-full flex-col`,children:[(0,Z.jsx)(M,{run:e,tab:`changes`}),(0,Z.jsx)(P,{bar:U,healthReady:t.data!==void 0,branch:e.branch,stat:r.data?.stat,mode:Y,wrap:$,preview:b,onModeChange:f,onWrapChange:m,onPreviewChange:J?C:void 0,onAction:G}),r.data?.repointedHead?(0,Z.jsxs)(`p`,{"data-slot":`repointed-head-note`,className:`border-b px-4 py-2 text-xs text-soft-foreground md:px-9`,children:[`HEAD is on `,(0,Z.jsx)(`code`,{children:r.data.repointedHead.headBranch}),`, not this task's branch`,` `,(0,Z.jsx)(`code`,{children:r.data.repointedHead.taskBranch}),` — showing only what this task changed there.`]}):null,(0,Z.jsx)(te,{changes:r,changesRefused:B,fileCount:K.length,children:(0,Z.jsx)(ne,{runId:e.id,files:K,tree:q,selected:w,selectFile:e=>{T(e),O.current?.scrollToPath(e)},diffRef:O,effectiveMode:Y,effectiveWrap:$,preview:b,localHandoff:t.data?.capabilities.localHandoff,onOpenInApp:R.mutate})}),(0,Z.jsx)(Q,{run:e,open:E,onOpenChange:D})]})}function te({changes:e,changesRefused:t,fileCount:n,children:r}){return e.isPending?(0,Z.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-9`,children:`Loading changes…`}):e.isError?(0,Z.jsx)(I,{icon:t?(0,Z.jsx)(w,{size:16}):(0,Z.jsx)(C,{size:16}),tone:t?`neutral`:`danger`,heading:`h2`,title:t?`No changes to show`:`Could not load the changes`,subtitle:e.error.message}):n===0?(0,Z.jsx)(I,{icon:(0,Z.jsx)(w,{size:16}),tone:`neutral`,heading:`h2`,title:`No changes yet`,subtitle:`The worktree matches its base branch. Changes appear here as the agent works.`}):r}function ne({runId:e,files:t,tree:n,selected:r,selectFile:i,diffRef:a,effectiveMode:o,effectiveWrap:s,preview:c,localHandoff:l,onOpenInApp:u}){return(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-stretch gap-5 md:flex-row md:items-start px-[18px] pb-9 pt-0 [--diff-sticky-top:0px] md:[--diff-sticky-top:1rem] md:px-9`,children:[(0,Z.jsxs)(`aside`,{"data-slot":`changes-tree-pane`,className:`md:sticky md:top-4 max-h-[calc(100dvh_-_64px_-_var(--diff-sticky-top)_-_1rem)] w-full md:w-60 shrink-0 overflow-y-auto overscroll-contain rounded-xl border border-border bg-card p-3.5 md:block lg:w-[250px]`,children:[(0,Z.jsx)(`h2`,{className:`mb-3 border-b border-border pb-3 text-xs font-semibold`,children:`Changed files`}),(0,Z.jsx)(N,{root:n,selected:r,onSelect:i})]}),(0,Z.jsx)(U,{files:t,viewRef:a,mode:o,wrap:s,preview:c,loadFileText:t=>re(e,t),imageSrc:t=>f(e,t),onOpenInApp:l?e=>u(e):void 0,className:`min-w-0 flex-1`})]})}async function re(e,t){try{let n=await p(e,t);return n.type!==`file`||n.binary||n.tooLarge?null:n.content??null}catch{return null}}export{$ as TaskChangesRoute};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,u as n}from"./button-DRCTAIzF.js";import{i as r,t as i}from"./react-runtime-CCIEwYL0.js";import{i as a}from"./project-scope-context-DDZVS0W-.js";import{Nn as o,_t as s,gt as c,vt as l,yt as u}from"./queries-C6in05vw.js";import{C as d,M as f,Q as p,w as m}from"./design-icons-DmYTv2r1.js";import{t as h}from"./run-header-DGWkKFX-.js";import{t as g}from"./project-router-DudcMzJa.js";import{t as _}from"./centered-state-xPENgUmo.js";import{Ct as v,St as y,X as b,rn as x}from"./index-BDNQ4NIe.js";import{t as S}from"./commit-diff-panel-B30oa25e.js";var C=e(r(),1),w=i(),T=77;function E({slot:e,commits:t,className:r,heading:i}){let[a,o]=(0,C.useState)(``),s=a.trim().toLowerCase(),c=s?t.filter(e=>e.subject.toLowerCase().includes(s)):t,l=c.length>150,u=(0,C.useRef)(null),d=(0,C.useRef)(null),[f,m]=(0,C.useState)(0);(0,C.useLayoutEffect)(()=>{if(!l)return;let e=()=>{let e=u.current,t=d.current;!e||!t||m(Math.max(0,Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l]);let h=c.map(n=>(0,w.jsx)(D,{commit:n,detailed:e===`task-commits`&&t.length===1},n.sha));return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`label`,{className:`relative mb-[22px] block`,children:[(0,w.jsx)(p,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-3.5 left-3 size-4 text-muted-foreground`}),(0,w.jsx)(x,{"aria-label":`Search commit messages`,placeholder:`Search commit messages…`,value:a,onChange:e=>o(e.target.value),className:`h-11 bg-card pl-10`})]}),(0,w.jsxs)(`div`,{ref:e=>{u.current=e,e&&(d.current=e.closest(`[data-slot="main"]`))},"data-slot":e,"data-virtualized":l,className:n(`flex flex-col divide-y divide-border rounded-xl border border-border bg-card px-4 py-1 md:px-5`,r),children:[i?(0,w.jsx)(`div`,{className:`flex min-h-14 flex-wrap items-center gap-2 py-4`,children:i}):null,c.length===0?(0,w.jsx)(`p`,{role:`status`,className:`py-5 text-sm text-muted-foreground`,children:`No loaded commits match your search.`}):null,l?(0,w.jsx)(b,{scrollRef:d,startMargin:f,itemSize:T,children:h}):h]})]})}function D({commit:e,detailed:t}){return(0,w.jsx)(`div`,{className:`[contain-intrinsic-block-size:auto_77px] [content-visibility:auto]`,children:(0,w.jsxs)(g,{"data-slot":`commit-row`,"data-sha":e.sha,to:e.href,className:n(`flex min-h-[76px] min-w-0 flex-col items-start gap-3 rounded-sm py-4 hover:bg-muted`,!t&&`md:flex-row md:items-center md:py-3`),children:[(0,w.jsx)(f,{size:16,"aria-hidden":`true`,className:n(`shrink-0 text-accent-text`,t?`size-[22px]`:`size-4`)}),(0,w.jsxs)(`span`,{className:n(`min-w-0 w-full`,!t&&`md:w-auto md:flex-1`),children:[(0,w.jsx)(`span`,{className:n(`block font-normal`,t?`text-[22px] leading-snug`:`text-[13px] md:truncate`),children:e.subject}),(0,w.jsxs)(`span`,{className:`mt-1 block truncate text-[11px] text-soft-foreground`,children:[e.author,` · `,e.when]})]}),(0,w.jsx)(`span`,{className:`shrink-0 rounded-md bg-muted px-2 py-1 font-mono text-[11px] text-muted-foreground`,children:e.shaLabel}),t?(0,w.jsxs)(`span`,{className:`inline-flex min-h-11 items-center gap-2 rounded-lg bg-action px-3 text-xs font-medium text-action-foreground`,children:[(0,w.jsx)(m,{size:16,"aria-hidden":`true`,className:`size-4`}),`View changes`]}):null]})})}function O(){let{id:e}=t(),n=c(e);return n.isPending?(0,w.jsx)(v,{tab:`changes`}):n.isError?(0,w.jsx)(y,{tab:`changes`,error:n.error}):(0,w.jsx)(k,{run:n.data})}function k({run:e}){let{sha:n}=t(),r=u(e.id,o(e));return(0,w.jsxs)(`div`,{"data-route":`task-commits`,className:`flex min-h-full flex-col`,children:[(0,w.jsx)(h,{run:e,tab:`commits`}),n?(0,w.jsx)(A,{runId:e.id,sha:n}):r.isPending?(0,w.jsx)(`p`,{"data-slot":`commits-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commits…`}):r.isError?(0,w.jsx)(_,{icon:(0,w.jsx)(f,{size:16}),tone:r.error instanceof a&&r.error.status===409?`neutral`:`danger`,heading:`h2`,title:r.error instanceof a&&r.error.status===409?`No commits to show`:`Could not load the commits`,subtitle:r.error.message}):r.data.commits.length===0?(0,w.jsx)(_,{icon:(0,w.jsx)(f,{size:16}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`This task hasn't committed anything on its branch. Autosave commits and any the agent makes appear here.`}):(0,w.jsxs)(`div`,{className:`px-[18px] py-[22px] md:px-9`,children:[(0,w.jsx)(E,{slot:`task-commits`,heading:(0,w.jsxs)(`h2`,{className:`text-base font-semibold`,children:[r.data.commits.length,` `,r.data.commits.length===1?`commit`:`commits`,` in this task`]}),className:`w-full`,commits:r.data.commits.map(t=>({...t,shaLabel:t.sha.slice(0,8),href:`/tasks/${e.id}/commits/${t.sha}`}))}),(0,w.jsx)(j,{run:e})]})]})}function A({runId:e,sha:t}){return(0,w.jsx)(S,{commit:l(e,t),sha:t,backTo:`/tasks/${e}/commits`,backLabel:`All commits`,slot:`task-commit`,className:`mx-auto flex min-h-0 w-full max-w-[var(--measure)] flex-1 flex-col`,diffClassName:`px-4 py-4 [--diff-sticky-top:0px] md:[--diff-sticky-top:1rem] md:px-6`})}function j({run:e}){let t=s(e.id,o(e));return t.isPending?(0,w.jsx)(`p`,{className:`mt-[22px] text-xs text-muted-foreground`,children:`Loading changed files…`}):t.isError?(0,w.jsxs)(`p`,{role:`status`,className:`mt-[22px] text-xs text-danger`,children:[`Could not load changed files: `,t.error.message]}):t.data.files.length===0?null:(0,w.jsxs)(`section`,{"data-slot":`task-commit-files`,className:`mt-[22px] rounded-[10px] border border-border bg-card p-5`,children:[(0,w.jsxs)(`h2`,{className:`mb-4 text-[16px] font-semibold`,children:[t.data.files.length,` changed files`]}),(0,w.jsx)(`ul`,{className:`space-y-4`,children:t.data.files.map(t=>(0,w.jsx)(`li`,{children:(0,w.jsxs)(g,{to:`/tasks/${e.id}/changes`,className:`flex min-h-11 items-center gap-2 text-xs text-muted-foreground hover:text-foreground`,children:[(0,w.jsx)(d,{size:16,"aria-hidden":`true`,className:`size-[15px] shrink-0`}),(0,w.jsx)(`span`,{className:`break-all`,children:t.path})]})},t.path))})]})}export{O as TaskCommitsRoute};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,u as n}from"./button-CHUAMTHK.js";import{i as r,t as i}from"./react-runtime-CCIEwYL0.js";import{i as a}from"./project-scope-context-CaUqlAd7.js";import{Nn as o,_t as s,gt as c,vt as l,yt as u}from"./queries-DYfIpJ-d.js";import{C as d,M as f,Q as p,w as m}from"./design-icons-DmYTv2r1.js";import{t as h}from"./run-header-DPjiPKRe.js";import{t as g}from"./project-router-1m_VlC22.js";import{t as _}from"./centered-state-DGyy0SuA.js";import{Ct as v,St as y,X as b,rn as x}from"./index-D489J7QW.js";import{t as S}from"./commit-diff-panel-DYtYc_dH.js";var C=e(r(),1),w=i(),T=77;function E({slot:e,commits:t,className:r,heading:i}){let[a,o]=(0,C.useState)(``),s=a.trim().toLowerCase(),c=s?t.filter(e=>e.subject.toLowerCase().includes(s)):t,l=c.length>150,u=(0,C.useRef)(null),d=(0,C.useRef)(null),[f,m]=(0,C.useState)(0);(0,C.useLayoutEffect)(()=>{if(!l)return;let e=()=>{let e=u.current,t=d.current;!e||!t||m(Math.max(0,Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l]);let h=c.map(n=>(0,w.jsx)(D,{commit:n,detailed:e===`task-commits`&&t.length===1},n.sha));return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`label`,{className:`relative mb-[22px] block`,children:[(0,w.jsx)(p,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-3.5 left-3 size-4 text-muted-foreground`}),(0,w.jsx)(x,{"aria-label":`Search commit messages`,placeholder:`Search commit messages…`,value:a,onChange:e=>o(e.target.value),className:`h-11 bg-card pl-10`})]}),(0,w.jsxs)(`div`,{ref:e=>{u.current=e,e&&(d.current=e.closest(`[data-slot="main"]`))},"data-slot":e,"data-virtualized":l,className:n(`flex flex-col divide-y divide-border rounded-xl border border-border bg-card px-4 py-1 md:px-5`,r),children:[i?(0,w.jsx)(`div`,{className:`flex min-h-14 flex-wrap items-center gap-2 py-4`,children:i}):null,c.length===0?(0,w.jsx)(`p`,{role:`status`,className:`py-5 text-sm text-muted-foreground`,children:`No loaded commits match your search.`}):null,l?(0,w.jsx)(b,{scrollRef:d,startMargin:f,itemSize:T,children:h}):h]})]})}function D({commit:e,detailed:t}){return(0,w.jsx)(`div`,{className:`[contain-intrinsic-block-size:auto_77px] [content-visibility:auto]`,children:(0,w.jsxs)(g,{"data-slot":`commit-row`,"data-sha":e.sha,to:e.href,className:n(`flex min-h-[76px] min-w-0 flex-col items-start gap-3 rounded-sm py-4 hover:bg-muted`,!t&&`md:flex-row md:items-center md:py-3`),children:[(0,w.jsx)(f,{size:16,"aria-hidden":`true`,className:n(`shrink-0 text-accent-text`,t?`size-[22px]`:`size-4`)}),(0,w.jsxs)(`span`,{className:n(`min-w-0 w-full`,!t&&`md:w-auto md:flex-1`),children:[(0,w.jsx)(`span`,{className:n(`block font-normal`,t?`text-[22px] leading-snug`:`text-[13px] md:truncate`),children:e.subject}),(0,w.jsxs)(`span`,{className:`mt-1 block truncate text-[11px] text-soft-foreground`,children:[e.author,` · `,e.when]})]}),(0,w.jsx)(`span`,{className:`shrink-0 rounded-md bg-muted px-2 py-1 font-mono text-[11px] text-muted-foreground`,children:e.shaLabel}),t?(0,w.jsxs)(`span`,{className:`inline-flex min-h-11 items-center gap-2 rounded-lg bg-action px-3 text-xs font-medium text-action-foreground`,children:[(0,w.jsx)(m,{size:16,"aria-hidden":`true`,className:`size-4`}),`View changes`]}):null]})})}function O(){let{id:e}=t(),n=c(e);return n.isPending?(0,w.jsx)(v,{tab:`changes`}):n.isError?(0,w.jsx)(y,{tab:`changes`,error:n.error}):(0,w.jsx)(k,{run:n.data})}function k({run:e}){let{sha:n}=t(),r=u(e.id,o(e));return(0,w.jsxs)(`div`,{"data-route":`task-commits`,className:`flex min-h-full flex-col`,children:[(0,w.jsx)(h,{run:e,tab:`commits`}),n?(0,w.jsx)(A,{runId:e.id,sha:n}):r.isPending?(0,w.jsx)(`p`,{"data-slot":`commits-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commits…`}):r.isError?(0,w.jsx)(_,{icon:(0,w.jsx)(f,{size:16}),tone:r.error instanceof a&&r.error.status===409?`neutral`:`danger`,heading:`h2`,title:r.error instanceof a&&r.error.status===409?`No commits to show`:`Could not load the commits`,subtitle:r.error.message}):r.data.commits.length===0?(0,w.jsx)(_,{icon:(0,w.jsx)(f,{size:16}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`This task hasn't committed anything on its branch. Autosave commits and any the agent makes appear here.`}):(0,w.jsxs)(`div`,{className:`px-[18px] py-[22px] md:px-9`,children:[(0,w.jsx)(E,{slot:`task-commits`,heading:(0,w.jsxs)(`h2`,{className:`text-base font-semibold`,children:[r.data.commits.length,` `,r.data.commits.length===1?`commit`:`commits`,` in this task`]}),className:`w-full`,commits:r.data.commits.map(t=>({...t,shaLabel:t.sha.slice(0,8),href:`/tasks/${e.id}/commits/${t.sha}`}))}),(0,w.jsx)(j,{run:e})]})]})}function A({runId:e,sha:t}){return(0,w.jsx)(S,{commit:l(e,t),sha:t,backTo:`/tasks/${e}/commits`,backLabel:`All commits`,slot:`task-commit`,className:`mx-auto flex min-h-0 w-full max-w-[var(--measure)] flex-1 flex-col`,diffClassName:`px-4 py-4 [--diff-sticky-top:0px] md:[--diff-sticky-top:1rem] md:px-6`})}function j({run:e}){let t=s(e.id,o(e));return t.isPending?(0,w.jsx)(`p`,{className:`mt-[22px] text-xs text-muted-foreground`,children:`Loading changed files…`}):t.isError?(0,w.jsxs)(`p`,{role:`status`,className:`mt-[22px] text-xs text-danger`,children:[`Could not load changed files: `,t.error.message]}):t.data.files.length===0?null:(0,w.jsxs)(`section`,{"data-slot":`task-commit-files`,className:`mt-[22px] rounded-[10px] border border-border bg-card p-5`,children:[(0,w.jsxs)(`h2`,{className:`mb-4 text-[16px] font-semibold`,children:[t.data.files.length,` changed files`]}),(0,w.jsx)(`ul`,{className:`space-y-4`,children:t.data.files.map(t=>(0,w.jsx)(`li`,{children:(0,w.jsxs)(g,{to:`/tasks/${e.id}/changes`,className:`flex min-h-11 items-center gap-2 text-xs text-muted-foreground hover:text-foreground`,children:[(0,w.jsx)(d,{size:16,"aria-hidden":`true`,className:`size-[15px] shrink-0`}),(0,w.jsx)(`span`,{className:`break-all`,children:t.path})]})},t.path))})]})}export{O as TaskCommitsRoute};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,D as n,E as r,T as i,t as a,u as o}from"./button-DRCTAIzF.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import{P as l,c as u,i as d}from"./project-scope-context-DDZVS0W-.js";import{C as f,f as p,gt as m,u as h,xt as g}from"./queries-C6in05vw.js";import{C as _,E as v,Q as y,ct as b,d as x}from"./design-icons-DmYTv2r1.js";import{t as S}from"./createLucideIcon-BHp8sXmF.js";import{n as C,t as w}from"./run-header-DGWkKFX-.js";import{a as T,i as E,n as D,r as O}from"./file-preview-Bdw0qHJB.js";import{t as k}from"./centered-state-xPENgUmo.js";import{r as A}from"./markdown-BiGKaTG5.js";import{Ct as j,St as M,rn as N}from"./index-BDNQ4NIe.js";var P=S(`folder-tree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),F=S(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),I=e(s(),1),L=c();function R({runId:e,path:n,artifactId:r}){let i=f(e,r?null:n),o=h(e,r),s=r?o:i,c=(0,I.useContext)(A),d=t(),p=d.pathname.replace(/\/files\/?$/,`/report`)+d.search,m=s.data,g=(0,I.useMemo)(()=>m?.type===`file`&&m.source!==`artifact`?{runId:e,...c,basePath:m.path}:null,[m,c,e]);if(!n&&!r)return(0,L.jsx)(O,{runId:e,path:null,className:`min-w-0 flex-1`});if(s.isPending)return(0,L.jsx)(`p`,{role:`status`,className:`p-4`,children:`Loading file…`});if(s.isError)return(0,L.jsxs)(`section`,{"data-slot":`file-preview`,className:`min-w-0 flex-1 rounded-lg border p-4`,children:[(0,L.jsx)(`h2`,{children:`Could not load this file`}),(0,L.jsx)(`p`,{className:`wrap-anywhere text-sm`,children:s.error.message}),(0,L.jsx)(a,{variant:`outline`,onClick:()=>void s.refetch(),children:`Retry`})]});if(!m)return(0,L.jsx)(`p`,{role:`alert`,className:`p-4`,children:`No file data was returned.`});if(m.type!==`file`)return(0,L.jsxs)(`section`,{"data-slot":`file-preview`,className:`min-w-0 flex-1 rounded-lg border p-4`,children:[(0,L.jsx)(`h2`,{children:m.type===`unpublished`?`File not published`:`Cannot preview this file`}),(0,L.jsx)(`p`,{className:`wrap-anywhere py-2 font-mono text-xs`,children:m.path}),(0,L.jsx)(`p`,{className:`text-sm`,children:m.reason}),(0,L.jsx)(a,{variant:`outline`,onClick:()=>void s.refetch(),children:`Retry`})]});let _=m.artifact;return(0,L.jsx)(A.Provider,{value:g,children:(0,L.jsx)(D,{runId:e,entry:m,documentPreview:!0,readerHref:p,className:`min-w-0 flex-1`,imageUrl:_?u(e,_.id,`image`):l(e,n),..._?{downloadUrl:u(e,_.id,`download`),snapshot:new Date(_.createdAt).toLocaleString()}:{}},_?.id??m.path)})}var z=new Map;function B(e){let t=e?.filesRestoreKey;return typeof t==`string`&&t?t:null}var V=(0,I.createContext)(null);function H(){let{key:e}=t(),n=i()===`POP`,[r,a]=(0,I.useState)({key:e,generation:0});if(r.key===e)return r.generation;let o={key:e,generation:n?r.generation+1:r.generation};return a(o),o.generation}var U=()=>document.querySelector(`[data-slot="main"]`);function W(e,n){let r=(0,I.useRef)(null),a=t(),o=i()===`POP`?a.key:B(a.state),[s]=(0,I.useState)(()=>{let t=o?z.get(o):void 0;return t?.runId===e?t:null}),c=(0,I.useRef)(new Set(s?.folders??[])),l=(0,I.useRef)(new Set),[u,d]=(0,I.useState)(0),f=(0,I.useRef)(s===null),p=(0,I.useCallback)(()=>{f.current&&z.set(a.key,{runId:e,folders:new Set(c.current),tree:r.current?.scrollTop??0,main:U()?.scrollTop??0})},[a.key,e]),m=(0,I.useMemo)(()=>({isOpen:e=>c.current.has(e),setOpen:(e,t)=>{t?c.current.add(e):c.current.delete(e),p()},loading:(e,t)=>{s?.folders.has(e)&&(t?l.current.add(e):l.current.delete(e),d(l.current.size))}}),[s,p]);return(0,I.useEffect)(()=>{if(f.current||!s||!n||l.current.size>0)return;r.current&&(r.current.scrollTop=s.tree);let e=U();e&&(e.scrollTop=s.main),f.current=!0,p()},[s,n,u,p]),(0,I.useEffect)(()=>{p();let e=[r.current,U()].filter(e=>e!==null);for(let t of e)t.addEventListener(`scroll`,p,{passive:!0});return()=>{for(let t of e)t.removeEventListener(`scroll`,p)}},[p]),{tree:r,folders:m}}function G({runId:e,selected:t,onSelect:n}){return(0,L.jsx)(`nav`,{"data-slot":`files-tree`,"aria-label":`Worktree files`,className:`min-w-0 text-[13px]`,children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-px`,children:(0,L.jsx)(K,{runId:e,path:``,depth:0,selected:t,onSelect:n})})})}function K({runId:e,path:t,depth:n,selected:r,onSelect:i}){let a=g(e,t),o=(0,I.useContext)(V);return(0,I.useEffect)(()=>{if(!(!t||!o))return o.loading(t,a.isPending),()=>o.loading(t,!1)},[o,t,a.isPending]),a.isPending?(0,L.jsx)(`li`,{"data-slot":`files-tree-loading`,className:`px-1.5 py-1 text-xs text-soft-foreground`,style:{paddingLeft:`${6+n*14}px`},children:`Loading…`}):a.isError?(0,L.jsx)(`li`,{"data-slot":`files-tree-error`,className:`px-1.5 py-1 text-xs text-danger`,style:{paddingLeft:`${6+n*14}px`},children:a.error.message}):a.data.type===`dir`?a.data.entries.length===0?(0,L.jsx)(`li`,{"data-slot":`files-tree-empty`,className:`px-1.5 py-1 text-xs text-soft-foreground`,style:{paddingLeft:`${6+n*14}px`},children:`Empty directory`}):(0,L.jsx)(L.Fragment,{children:a.data.entries.map(a=>a.type===`dir`?(0,L.jsx)(q,{runId:e,name:a.name,path:t===``?a.name:`${t}/${a.name}`,depth:n,selected:r,onSelect:i},a.name):(0,L.jsx)(J,{name:a.name,path:t===``?a.name:`${t}/${a.name}`,size:a.size,depth:n,selected:r,onSelect:i},a.name))}):null}function q({runId:e,name:t,path:n,depth:r,selected:i,onSelect:a}){let s=(0,I.useContext)(V),[c,l]=(0,I.useState)(()=>s?.isOpen(n)??!1);return(0,L.jsxs)(`li`,{children:[(0,L.jsxs)(`button`,{type:`button`,"data-slot":`files-dir`,"data-path":n,"data-state":c?`open`:`closed`,"aria-expanded":c,onClick:()=>{s?.setOpen(n,!c),l(!c)},className:`flex min-h-11 md:min-h-8 w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left text-muted-foreground hover:bg-muted hover:text-foreground`,style:{paddingLeft:`${6+r*14}px`},children:[(0,L.jsx)(x,{size:16,"aria-hidden":`true`,className:o(`order-last ml-auto size-3.5 shrink-0 transition-transform motion-reduce:transition-none`,c&&`rotate-90`)}),(0,L.jsx)(v,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 truncate font-normal`,children:t})]}),c?(0,L.jsx)(`ul`,{className:`flex flex-col gap-px`,children:(0,L.jsx)(K,{runId:e,path:n,depth:r+1,selected:i,onSelect:a})}):null]})}function J({name:e,path:t,size:n,depth:r,selected:i,onSelect:a}){let s=i===t,c=T(t)?F:_;return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{type:`button`,"data-slot":`files-file`,"data-path":t,"aria-current":s?`true`:void 0,onClick:()=>a(t),className:o(`flex min-h-11 md:min-h-8 w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left hover:bg-muted`,s?`bg-muted font-medium text-foreground`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${6+r*14}px`},children:[(0,L.jsx)(c,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:e}),n===void 0?null:(0,L.jsx)(`span`,{className:`ml-auto shrink-0 pl-2 font-mono text-[11px] tabular-nums text-soft-foreground`,children:E(n)})]})})}function Y(){let{id:e}=r(),t=m(e),n=H();return t.isPending?(0,L.jsx)(j,{tab:`files`}):t.isError?(0,L.jsx)(M,{tab:`files`,error:t.error}):(0,L.jsx)(C,{runId:t.data.id,children:(0,L.jsx)(Z,{run:t.data},`${t.data.id}:${n}`)})}function X(e,t,n,r){let i=f(e,r||n!==null?null:t),a=h(e,r?null:n);return r||t===null&&n===null?!0:!(n===null?i:a).isPending}function Z({run:e}){let t=g(e.id,``),r=p(e.id),[i,o]=n(),s=i.get(`path`),c=i.get(`artifact`),l=i.getAll(`path`).length>1||i.getAll(`artifact`).length>1||s!==null&&c!==null,[u,f]=(0,I.useState)(s??``);(0,I.useEffect)(()=>f(s??``),[s]);let m=(e,t)=>{let n=new URLSearchParams(i);n.delete(`path`),n.delete(`artifact`),n.set(e,t),o(n)},h=t.isError&&t.error instanceof d&&t.error.status===409,_=X(e.id,s,c,l),v=W(e.id,!t.isPending&&_);return(0,L.jsxs)(`div`,{"data-route":`task-files`,className:`flex min-h-full flex-col`,children:[(0,L.jsx)(w,{run:e,tab:`files`}),(0,L.jsxs)(`form`,{className:`flex min-w-0 gap-2 px-[18px] pt-[22px] md:px-9`,onSubmit:e=>{e.preventDefault(),u.trim()&&m(`path`,u.trim())},children:[(0,L.jsxs)(`label`,{className:`relative min-w-0 flex-1`,children:[(0,L.jsx)(y,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,L.jsx)(N,{"aria-label":`File path in the worktree`,placeholder:`Open a file by path…`,value:u,onChange:e=>f(e.target.value),className:`h-11 min-w-0 bg-card pl-10`})]}),(0,L.jsx)(a,{type:`submit`,variant:`outline`,className:`h-11 shrink-0`,disabled:!u.trim(),children:`Open file`})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-col items-stretch gap-5 px-[18px] py-[22px] [--diff-sticky-top:1rem] md:flex-row md:items-start md:px-9`,children:[(0,L.jsxs)(`aside`,{ref:v.tree,"data-slot":`files-tree-pane`,className:`w-full shrink-0 rounded-xl border border-border bg-card p-3.5 md:sticky md:top-[var(--diff-sticky-top)] md:max-h-[calc(100dvh_-_64px_-_var(--diff-sticky-top)_-_1rem)] md:w-60 md:overflow-y-auto md:overscroll-contain lg:w-72`,children:[(0,L.jsx)(`h2`,{className:`sr-only`,children:`Worktree files`}),t.isPending?(0,L.jsx)(`p`,{"data-slot":`files-loading`,className:`py-4 text-xs`,children:`Loading files…`}):t.isError?(0,L.jsx)(k,{icon:h?(0,L.jsx)(P,{}):(0,L.jsx)(b,{size:16}),tone:h?`neutral`:`danger`,heading:`h2`,title:h?`No files to browse`:`Could not load the files`,subtitle:t.error.message}):(0,L.jsx)(V.Provider,{value:v.folders,children:(0,L.jsx)(G,{runId:e.id,selected:s,onSelect:e=>m(`path`,e)})}),(0,L.jsxs)(`section`,{className:`mt-4 border-t border-border pt-3`,"aria-label":`Published artifacts`,children:[(0,L.jsx)(`h2`,{className:`text-sm font-medium`,children:`Published artifacts`}),r.isPending?(0,L.jsx)(`p`,{className:`py-2 text-xs`,children:`Loading published files…`}):r.isError?(0,L.jsx)(`p`,{role:`alert`,className:`py-2 text-xs`,children:`Could not load published files.`}):r.data.artifacts.length===0?(0,L.jsx)(`p`,{className:`py-2 text-xs text-muted-foreground`,children:`No published files yet.`}):(0,L.jsx)(`ul`,{children:r.data.artifacts.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(`button`,{type:`button`,"aria-current":e.id===c?`true`:void 0,className:`min-h-11 w-full rounded px-2 py-2 text-left text-xs wrap-anywhere hover:bg-muted focus-visible:ring-2`,onClick:()=>m(`artifact`,e.id),children:e.name})},e.id))}),(0,L.jsx)(a,{variant:`ghost`,className:`min-h-11`,onClick:()=>void r.refetch(),children:`Refresh published files`})]})]}),l?(0,L.jsx)(`p`,{role:`alert`,className:`p-4`,children:`Invalid file link: choose either a path or a published artifact.`}):s!==null||c!==null||t.isSuccess?(0,L.jsx)(R,{runId:e.id,path:s,artifactId:c}):null]}),(0,L.jsx)(`p`,{className:`px-[18px] pb-6 text-xs text-muted-foreground md:px-9`,children:`Browsing files is read-only. Worktree contents may differ from your main checkout. Published files are snapshots.`})]})}export{Y as TaskFilesRoute};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,D as n,E as r,T as i,t as a,u as o}from"./button-CHUAMTHK.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import{P as l,c as u,i as d}from"./project-scope-context-CaUqlAd7.js";import{C as f,f as p,gt as m,u as h,xt as g}from"./queries-DYfIpJ-d.js";import{C as _,E as v,Q as y,ct as b,d as x}from"./design-icons-DmYTv2r1.js";import{t as S}from"./createLucideIcon-BHp8sXmF.js";import{n as C,t as w}from"./run-header-DPjiPKRe.js";import{a as T,i as E,n as D,r as O}from"./file-preview-C1eTdJLJ.js";import{t as k}from"./centered-state-DGyy0SuA.js";import{r as A}from"./markdown-D7DUNWcJ.js";import{Ct as j,St as M,rn as N}from"./index-D489J7QW.js";var P=S(`folder-tree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),F=S(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),I=e(s(),1),L=c();function R({runId:e,path:n,artifactId:r}){let i=f(e,r?null:n),o=h(e,r),s=r?o:i,c=(0,I.useContext)(A),d=t(),p=d.pathname.replace(/\/files\/?$/,`/report`)+d.search,m=s.data,g=(0,I.useMemo)(()=>m?.type===`file`&&m.source!==`artifact`?{runId:e,...c,basePath:m.path}:null,[m,c,e]);if(!n&&!r)return(0,L.jsx)(O,{runId:e,path:null,className:`min-w-0 flex-1`});if(s.isPending)return(0,L.jsx)(`p`,{role:`status`,className:`p-4`,children:`Loading file…`});if(s.isError)return(0,L.jsxs)(`section`,{"data-slot":`file-preview`,className:`min-w-0 flex-1 rounded-lg border p-4`,children:[(0,L.jsx)(`h2`,{children:`Could not load this file`}),(0,L.jsx)(`p`,{className:`wrap-anywhere text-sm`,children:s.error.message}),(0,L.jsx)(a,{variant:`outline`,onClick:()=>void s.refetch(),children:`Retry`})]});if(!m)return(0,L.jsx)(`p`,{role:`alert`,className:`p-4`,children:`No file data was returned.`});if(m.type!==`file`)return(0,L.jsxs)(`section`,{"data-slot":`file-preview`,className:`min-w-0 flex-1 rounded-lg border p-4`,children:[(0,L.jsx)(`h2`,{children:m.type===`unpublished`?`File not published`:`Cannot preview this file`}),(0,L.jsx)(`p`,{className:`wrap-anywhere py-2 font-mono text-xs`,children:m.path}),(0,L.jsx)(`p`,{className:`text-sm`,children:m.reason}),(0,L.jsx)(a,{variant:`outline`,onClick:()=>void s.refetch(),children:`Retry`})]});let _=m.artifact;return(0,L.jsx)(A.Provider,{value:g,children:(0,L.jsx)(D,{runId:e,entry:m,documentPreview:!0,readerHref:p,className:`min-w-0 flex-1`,imageUrl:_?u(e,_.id,`image`):l(e,n),..._?{downloadUrl:u(e,_.id,`download`),snapshot:new Date(_.createdAt).toLocaleString()}:{}},_?.id??m.path)})}var z=new Map;function B(e){let t=e?.filesRestoreKey;return typeof t==`string`&&t?t:null}var V=(0,I.createContext)(null);function H(){let{key:e}=t(),n=i()===`POP`,[r,a]=(0,I.useState)({key:e,generation:0});if(r.key===e)return r.generation;let o={key:e,generation:n?r.generation+1:r.generation};return a(o),o.generation}var U=()=>document.querySelector(`[data-slot="main"]`);function W(e,n){let r=(0,I.useRef)(null),a=t(),o=i()===`POP`?a.key:B(a.state),[s]=(0,I.useState)(()=>{let t=o?z.get(o):void 0;return t?.runId===e?t:null}),c=(0,I.useRef)(new Set(s?.folders??[])),l=(0,I.useRef)(new Set),[u,d]=(0,I.useState)(0),f=(0,I.useRef)(s===null),p=(0,I.useCallback)(()=>{f.current&&z.set(a.key,{runId:e,folders:new Set(c.current),tree:r.current?.scrollTop??0,main:U()?.scrollTop??0})},[a.key,e]),m=(0,I.useMemo)(()=>({isOpen:e=>c.current.has(e),setOpen:(e,t)=>{t?c.current.add(e):c.current.delete(e),p()},loading:(e,t)=>{s?.folders.has(e)&&(t?l.current.add(e):l.current.delete(e),d(l.current.size))}}),[s,p]);return(0,I.useEffect)(()=>{if(f.current||!s||!n||l.current.size>0)return;r.current&&(r.current.scrollTop=s.tree);let e=U();e&&(e.scrollTop=s.main),f.current=!0,p()},[s,n,u,p]),(0,I.useEffect)(()=>{p();let e=[r.current,U()].filter(e=>e!==null);for(let t of e)t.addEventListener(`scroll`,p,{passive:!0});return()=>{for(let t of e)t.removeEventListener(`scroll`,p)}},[p]),{tree:r,folders:m}}function G({runId:e,selected:t,onSelect:n}){return(0,L.jsx)(`nav`,{"data-slot":`files-tree`,"aria-label":`Worktree files`,className:`min-w-0 text-[13px]`,children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-px`,children:(0,L.jsx)(K,{runId:e,path:``,depth:0,selected:t,onSelect:n})})})}function K({runId:e,path:t,depth:n,selected:r,onSelect:i}){let a=g(e,t),o=(0,I.useContext)(V);return(0,I.useEffect)(()=>{if(!(!t||!o))return o.loading(t,a.isPending),()=>o.loading(t,!1)},[o,t,a.isPending]),a.isPending?(0,L.jsx)(`li`,{"data-slot":`files-tree-loading`,className:`px-1.5 py-1 text-xs text-soft-foreground`,style:{paddingLeft:`${6+n*14}px`},children:`Loading…`}):a.isError?(0,L.jsx)(`li`,{"data-slot":`files-tree-error`,className:`px-1.5 py-1 text-xs text-danger`,style:{paddingLeft:`${6+n*14}px`},children:a.error.message}):a.data.type===`dir`?a.data.entries.length===0?(0,L.jsx)(`li`,{"data-slot":`files-tree-empty`,className:`px-1.5 py-1 text-xs text-soft-foreground`,style:{paddingLeft:`${6+n*14}px`},children:`Empty directory`}):(0,L.jsx)(L.Fragment,{children:a.data.entries.map(a=>a.type===`dir`?(0,L.jsx)(q,{runId:e,name:a.name,path:t===``?a.name:`${t}/${a.name}`,depth:n,selected:r,onSelect:i},a.name):(0,L.jsx)(J,{name:a.name,path:t===``?a.name:`${t}/${a.name}`,size:a.size,depth:n,selected:r,onSelect:i},a.name))}):null}function q({runId:e,name:t,path:n,depth:r,selected:i,onSelect:a}){let s=(0,I.useContext)(V),[c,l]=(0,I.useState)(()=>s?.isOpen(n)??!1);return(0,L.jsxs)(`li`,{children:[(0,L.jsxs)(`button`,{type:`button`,"data-slot":`files-dir`,"data-path":n,"data-state":c?`open`:`closed`,"aria-expanded":c,onClick:()=>{s?.setOpen(n,!c),l(!c)},className:`flex min-h-11 md:min-h-8 w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left text-muted-foreground hover:bg-muted hover:text-foreground`,style:{paddingLeft:`${6+r*14}px`},children:[(0,L.jsx)(x,{size:16,"aria-hidden":`true`,className:o(`order-last ml-auto size-3.5 shrink-0 transition-transform motion-reduce:transition-none`,c&&`rotate-90`)}),(0,L.jsx)(v,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 truncate font-normal`,children:t})]}),c?(0,L.jsx)(`ul`,{className:`flex flex-col gap-px`,children:(0,L.jsx)(K,{runId:e,path:n,depth:r+1,selected:i,onSelect:a})}):null]})}function J({name:e,path:t,size:n,depth:r,selected:i,onSelect:a}){let s=i===t,c=T(t)?F:_;return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{type:`button`,"data-slot":`files-file`,"data-path":t,"aria-current":s?`true`:void 0,onClick:()=>a(t),className:o(`flex min-h-11 md:min-h-8 w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left hover:bg-muted`,s?`bg-muted font-medium text-foreground`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${6+r*14}px`},children:[(0,L.jsx)(c,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:e}),n===void 0?null:(0,L.jsx)(`span`,{className:`ml-auto shrink-0 pl-2 font-mono text-[11px] tabular-nums text-soft-foreground`,children:E(n)})]})})}function Y(){let{id:e}=r(),t=m(e),n=H();return t.isPending?(0,L.jsx)(j,{tab:`files`}):t.isError?(0,L.jsx)(M,{tab:`files`,error:t.error}):(0,L.jsx)(C,{runId:t.data.id,children:(0,L.jsx)(Z,{run:t.data},`${t.data.id}:${n}`)})}function X(e,t,n,r){let i=f(e,r||n!==null?null:t),a=h(e,r?null:n);return r||t===null&&n===null?!0:!(n===null?i:a).isPending}function Z({run:e}){let t=g(e.id,``),r=p(e.id),[i,o]=n(),s=i.get(`path`),c=i.get(`artifact`),l=i.getAll(`path`).length>1||i.getAll(`artifact`).length>1||s!==null&&c!==null,[u,f]=(0,I.useState)(s??``);(0,I.useEffect)(()=>f(s??``),[s]);let m=(e,t)=>{let n=new URLSearchParams(i);n.delete(`path`),n.delete(`artifact`),n.set(e,t),o(n)},h=t.isError&&t.error instanceof d&&t.error.status===409,_=X(e.id,s,c,l),v=W(e.id,!t.isPending&&_);return(0,L.jsxs)(`div`,{"data-route":`task-files`,className:`flex min-h-full flex-col`,children:[(0,L.jsx)(w,{run:e,tab:`files`}),(0,L.jsxs)(`form`,{className:`flex min-w-0 gap-2 px-[18px] pt-[22px] md:px-9`,onSubmit:e=>{e.preventDefault(),u.trim()&&m(`path`,u.trim())},children:[(0,L.jsxs)(`label`,{className:`relative min-w-0 flex-1`,children:[(0,L.jsx)(y,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,L.jsx)(N,{"aria-label":`File path in the worktree`,placeholder:`Open a file by path…`,value:u,onChange:e=>f(e.target.value),className:`h-11 min-w-0 bg-card pl-10`})]}),(0,L.jsx)(a,{type:`submit`,variant:`outline`,className:`h-11 shrink-0`,disabled:!u.trim(),children:`Open file`})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-col items-stretch gap-5 px-[18px] py-[22px] [--diff-sticky-top:1rem] md:flex-row md:items-start md:px-9`,children:[(0,L.jsxs)(`aside`,{ref:v.tree,"data-slot":`files-tree-pane`,className:`w-full shrink-0 rounded-xl border border-border bg-card p-3.5 md:sticky md:top-[var(--diff-sticky-top)] md:max-h-[calc(100dvh_-_64px_-_var(--diff-sticky-top)_-_1rem)] md:w-60 md:overflow-y-auto md:overscroll-contain lg:w-72`,children:[(0,L.jsx)(`h2`,{className:`sr-only`,children:`Worktree files`}),t.isPending?(0,L.jsx)(`p`,{"data-slot":`files-loading`,className:`py-4 text-xs`,children:`Loading files…`}):t.isError?(0,L.jsx)(k,{icon:h?(0,L.jsx)(P,{}):(0,L.jsx)(b,{size:16}),tone:h?`neutral`:`danger`,heading:`h2`,title:h?`No files to browse`:`Could not load the files`,subtitle:t.error.message}):(0,L.jsx)(V.Provider,{value:v.folders,children:(0,L.jsx)(G,{runId:e.id,selected:s,onSelect:e=>m(`path`,e)})}),(0,L.jsxs)(`section`,{className:`mt-4 border-t border-border pt-3`,"aria-label":`Published artifacts`,children:[(0,L.jsx)(`h2`,{className:`text-sm font-medium`,children:`Published artifacts`}),r.isPending?(0,L.jsx)(`p`,{className:`py-2 text-xs`,children:`Loading published files…`}):r.isError?(0,L.jsx)(`p`,{role:`alert`,className:`py-2 text-xs`,children:`Could not load published files.`}):r.data.artifacts.length===0?(0,L.jsx)(`p`,{className:`py-2 text-xs text-muted-foreground`,children:`No published files yet.`}):(0,L.jsx)(`ul`,{children:r.data.artifacts.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(`button`,{type:`button`,"aria-current":e.id===c?`true`:void 0,className:`min-h-11 w-full rounded px-2 py-2 text-left text-xs wrap-anywhere hover:bg-muted focus-visible:ring-2`,onClick:()=>m(`artifact`,e.id),children:e.name})},e.id))}),(0,L.jsx)(a,{variant:`ghost`,className:`min-h-11`,onClick:()=>void r.refetch(),children:`Refresh published files`})]})]}),l?(0,L.jsx)(`p`,{role:`alert`,className:`p-4`,children:`Invalid file link: choose either a path or a published artifact.`}):s!==null||c!==null||t.isSuccess?(0,L.jsx)(R,{runId:e.id,path:s,artifactId:c}):null]}),(0,L.jsx)(`p`,{className:`px-[18px] pb-6 text-xs text-muted-foreground md:px-9`,children:`Browsing files is read-only. Worktree contents may differ from your main checkout. Published files are snapshots.`})]})}export{Y as TaskFilesRoute};
@@ -1 +1 @@
1
- import{E as e,d as t,t as n}from"./button-DRCTAIzF.js";import{t as r}from"./react-runtime-CCIEwYL0.js";import{Jr as i,tt as a}from"./project-scope-context-DDZVS0W-.js";import{$ as o,E as s,J as c,P as l,Un as u,an as d,cn as f,gt as p,k as m,n as h}from"./queries-C6in05vw.js";import{s as g}from"./popover-CiVpqps-.js";import{I as _,ct as v,m as y}from"./design-icons-DmYTv2r1.js";import{t as b}from"./run-header-DGWkKFX-.js";import{u as x}from"./control-locations-Cv_zRDaS.js";import{t as S}from"./project-router-DudcMzJa.js";import{t as C}from"./centered-state-xPENgUmo.js";import{St as w,Wt as T,xt as E}from"./index-BDNQ4NIe.js";import{n as D,o as O,t as k}from"./use-hand-to-agent-state-eVuuwFpt.js";var A=r(),j={issue:`Issue`,pr:`Pull request`};function M({kind:t}){let{id:n}=e(),r=p(n);return r.isPending?(0,A.jsx)(E,{kind:t}):r.isError?(0,A.jsx)(w,{tab:`github-item`,error:r.error}):(0,A.jsx)(N,{run:r.data,kind:t})}function N({run:t,kind:r}){let{n:i}=e(),a=Number(i),s=c(),u=o(),f=l(),p=u.isPending||f.isPending,h=d(t,s).some(e=>e.kind===r&&e.number===a),g=m(r,a,h);return(0,A.jsxs)(`div`,{"data-route":`task-github-item`,className:`flex min-h-full flex-col`,children:[(0,A.jsx)(b,{run:t,tab:{kind:r,number:a}}),h?(0,A.jsx)(V,{run:t,kind:r,number:a,repoBase:s,item:g}):p?(0,A.jsx)(E,{kind:r,number:a,heading:`h2`}):(0,A.jsx)(C,{icon:(0,A.jsx)(T,{size:16}),tone:`neutral`,heading:`h2`,title:`#${i} is not linked to this task`,subtitle:`Only the issues and pull requests this task references open here.`,actions:(0,A.jsx)(n,{asChild:!0,variant:`outline`,children:(0,A.jsx)(S,{to:`/tasks/${t.id}`,children:`Back to the session`})})})]})}function P(e,t){return e===`pr`&&t.data?.available===!0&&t.data.item!==null}function F(e,t,n,r){return e===`pr`?n?.[t]??r:r}function I({retry:e,kind:t,number:r}){return(0,A.jsx)(n,{variant:`outline`,disabled:e.isPending,onClick:()=>e.mutate(h.githubItem(t,r)),children:`Retry`})}function L({kind:e,number:t,error:n,retryButton:r}){return(0,A.jsx)(C,{icon:(0,A.jsx)(v,{size:16}),tone:`danger`,heading:`h2`,title:`Could not load ${j[e].toLowerCase()} #${t}`,subtitle:n.message,actions:r})}function R({run:e,kind:r,number:i,repoBase:a,reason:o,retryError:s,retryButton:c}){let l=r===`pr`?_:y,u=f(e,a).find(e=>e.kind===`PR`==(r===`pr`)&&e.number===i)?.url;return(0,A.jsx)(C,{icon:(0,A.jsx)(l,{size:16}),tone:`neutral`,heading:`h2`,title:`GitHub is unavailable`,subtitle:s?.message??o,actions:(0,A.jsxs)(A.Fragment,{children:[c,u&&t(u)?(0,A.jsx)(n,{asChild:!0,variant:`outline`,children:(0,A.jsxs)(`a`,{href:u,target:`_blank`,rel:`noopener noreferrer`,children:[`open on GitHub`,(0,A.jsx)(g,{"aria-hidden":`true`})]})}):null]})})}function z({label:e,repoBase:t}){return(0,A.jsx)(C,{icon:(0,A.jsx)(x,{}),tone:`neutral`,heading:`h2`,title:`${e} was not found in ${H(t)}`,subtitle:`It may have been deleted, or the number points at a different repository.`})}function B({kind:e,item:t,labelColors:n,checks:r}){return(0,A.jsx)(`div`,{className:`min-w-0 px-0.5 md:px-2`,children:(0,A.jsx)(O,{item:t,colors:n??{},checks:r,backLink:null,subNav:null,children:e===`issue`?(0,A.jsx)(U,{item:t},t.url):null})})}function V({run:e,kind:t,number:n,repoBase:r,item:o}){let c=i(),l=u({mutationFn:e=>a(t,n,{refresh:!0}),onSuccess:(e,t)=>c.setQueryData(t,e)}),d=P(t,o),f=s(d?[n]:[],d),p=f.data?.available?f.data.checks:void 0,m=`${j[t]} #${n}`,h=(0,A.jsx)(I,{retry:l,kind:t,number:n});if(o.isPending)return(0,A.jsx)(E,{kind:t,number:n,heading:`h2`});if(o.isError)return(0,A.jsx)(L,{kind:t,number:n,error:l.error??o.error,retryButton:h});let g=o.data;return g.available?g.item?(0,A.jsx)(B,{kind:t,item:g.item,labelColors:g.labelColors,checks:F(t,n,p,g.item.checks)}):(0,A.jsx)(z,{label:m,repoBase:r}):(0,A.jsx)(R,{run:e,kind:t,number:n,repoBase:r,reason:g.reason,retryError:l.error,retryButton:h})}function H(e){if(!e)return`this repository`;try{return new URL(e).pathname.split(`/`).filter(Boolean).slice(0,2).join(`/`)||`this repository`}catch{return`this repository`}}function U({item:e}){let t=k();return(0,A.jsx)(D,{item:e,workflows:t.workflows.data?.workflows??[],skills:t.skillList,workflow:t.workflow,onWorkflowChange:t.setWorkflow,selectedSkills:t.selectedSkills,onSkillsChange:t.setSelectedSkills,engine:t.engine,onEngineChange:t.setEngine,queuedRunId:t.queued.get(e.url)??null,onQueued:t.onQueued},e.url)}export{M as TaskGithubItemRoute};
1
+ import{E as e,d as t,t as n}from"./button-CHUAMTHK.js";import{t as r}from"./react-runtime-CCIEwYL0.js";import{Jr as i,tt as a}from"./project-scope-context-CaUqlAd7.js";import{$ as o,E as s,J as c,P as l,Un as u,an as d,cn as f,gt as p,k as m,n as h}from"./queries-DYfIpJ-d.js";import{s as g}from"./popover-DRcRI46x.js";import{I as _,ct as v,m as y}from"./design-icons-DmYTv2r1.js";import{t as b}from"./run-header-DPjiPKRe.js";import{u as x}from"./control-locations-CA9TMupq.js";import{t as S}from"./project-router-1m_VlC22.js";import{t as C}from"./centered-state-DGyy0SuA.js";import{St as w,Wt as T,xt as E}from"./index-D489J7QW.js";import{n as D,o as O,t as k}from"./use-hand-to-agent-state-BkmKad8x.js";var A=r(),j={issue:`Issue`,pr:`Pull request`};function M({kind:t}){let{id:n}=e(),r=p(n);return r.isPending?(0,A.jsx)(E,{kind:t}):r.isError?(0,A.jsx)(w,{tab:`github-item`,error:r.error}):(0,A.jsx)(N,{run:r.data,kind:t})}function N({run:t,kind:r}){let{n:i}=e(),a=Number(i),s=c(),u=o(),f=l(),p=u.isPending||f.isPending,h=d(t,s).some(e=>e.kind===r&&e.number===a),g=m(r,a,h);return(0,A.jsxs)(`div`,{"data-route":`task-github-item`,className:`flex min-h-full flex-col`,children:[(0,A.jsx)(b,{run:t,tab:{kind:r,number:a}}),h?(0,A.jsx)(V,{run:t,kind:r,number:a,repoBase:s,item:g}):p?(0,A.jsx)(E,{kind:r,number:a,heading:`h2`}):(0,A.jsx)(C,{icon:(0,A.jsx)(T,{size:16}),tone:`neutral`,heading:`h2`,title:`#${i} is not linked to this task`,subtitle:`Only the issues and pull requests this task references open here.`,actions:(0,A.jsx)(n,{asChild:!0,variant:`outline`,children:(0,A.jsx)(S,{to:`/tasks/${t.id}`,children:`Back to the session`})})})]})}function P(e,t){return e===`pr`&&t.data?.available===!0&&t.data.item!==null}function F(e,t,n,r){return e===`pr`?n?.[t]??r:r}function I({retry:e,kind:t,number:r}){return(0,A.jsx)(n,{variant:`outline`,disabled:e.isPending,onClick:()=>e.mutate(h.githubItem(t,r)),children:`Retry`})}function L({kind:e,number:t,error:n,retryButton:r}){return(0,A.jsx)(C,{icon:(0,A.jsx)(v,{size:16}),tone:`danger`,heading:`h2`,title:`Could not load ${j[e].toLowerCase()} #${t}`,subtitle:n.message,actions:r})}function R({run:e,kind:r,number:i,repoBase:a,reason:o,retryError:s,retryButton:c}){let l=r===`pr`?_:y,u=f(e,a).find(e=>e.kind===`PR`==(r===`pr`)&&e.number===i)?.url;return(0,A.jsx)(C,{icon:(0,A.jsx)(l,{size:16}),tone:`neutral`,heading:`h2`,title:`GitHub is unavailable`,subtitle:s?.message??o,actions:(0,A.jsxs)(A.Fragment,{children:[c,u&&t(u)?(0,A.jsx)(n,{asChild:!0,variant:`outline`,children:(0,A.jsxs)(`a`,{href:u,target:`_blank`,rel:`noopener noreferrer`,children:[`open on GitHub`,(0,A.jsx)(g,{"aria-hidden":`true`})]})}):null]})})}function z({label:e,repoBase:t}){return(0,A.jsx)(C,{icon:(0,A.jsx)(x,{}),tone:`neutral`,heading:`h2`,title:`${e} was not found in ${H(t)}`,subtitle:`It may have been deleted, or the number points at a different repository.`})}function B({kind:e,item:t,labelColors:n,checks:r}){return(0,A.jsx)(`div`,{className:`min-w-0 px-0.5 md:px-2`,children:(0,A.jsx)(O,{item:t,colors:n??{},checks:r,backLink:null,subNav:null,children:e===`issue`?(0,A.jsx)(U,{item:t},t.url):null})})}function V({run:e,kind:t,number:n,repoBase:r,item:o}){let c=i(),l=u({mutationFn:e=>a(t,n,{refresh:!0}),onSuccess:(e,t)=>c.setQueryData(t,e)}),d=P(t,o),f=s(d?[n]:[],d),p=f.data?.available?f.data.checks:void 0,m=`${j[t]} #${n}`,h=(0,A.jsx)(I,{retry:l,kind:t,number:n});if(o.isPending)return(0,A.jsx)(E,{kind:t,number:n,heading:`h2`});if(o.isError)return(0,A.jsx)(L,{kind:t,number:n,error:l.error??o.error,retryButton:h});let g=o.data;return g.available?g.item?(0,A.jsx)(B,{kind:t,item:g.item,labelColors:g.labelColors,checks:F(t,n,p,g.item.checks)}):(0,A.jsx)(z,{label:m,repoBase:r}):(0,A.jsx)(R,{run:e,kind:t,number:n,repoBase:r,reason:g.reason,retryError:l.error,retryButton:h})}function H(e){if(!e)return`this repository`;try{return new URL(e).pathname.split(`/`).filter(Boolean).slice(0,2).join(`/`)||`this repository`}catch{return`this repository`}}function U({item:e}){let t=k();return(0,A.jsx)(D,{item:e,workflows:t.workflows.data?.workflows??[],skills:t.skillList,workflow:t.workflow,onWorkflowChange:t.setWorkflow,selectedSkills:t.selectedSkills,onSkillsChange:t.setSelectedSkills,engine:t.engine,onEngineChange:t.setEngine,queuedRunId:t.queued.get(e.url)??null,onQueued:t.onQueued},e.url)}export{M as TaskGithubItemRoute};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,E as n,I as r,L as i,N as a,d as o,p as s,t as c,u as l,w as u}from"./button-DRCTAIzF.js";import{i as d,r as f,t as p}from"./react-runtime-CCIEwYL0.js";import{r as m}from"./live-refetch-XCxoSAGq.js";import{D as h,F as g,Hn as _,Jr as v,T as y,Un as b,Wn as x,ar as S,cr as C,f as w,i as T,ir as E,or as D,pr as ee,rr as te,u as O,ur as k,v as ne,wr as re}from"./project-scope-context-DDZVS0W-.js";import{$t as A,At as j,Bn as M,Cn as N,Ct as P,Et as F,Hn as I,In as L,J as R,Jt as ie,Nn as z,P as ae,Pn as oe,R as se,S as ce,Tt as B,U as le,Un as V,bt as ue,c as de,d as fe,et as pe,gt as me,h as he,n as H,on as ge,rn as _e,un as U,ut as ve,x as ye,xn as be}from"./queries-C6in05vw.js";import{n as W}from"./toaster-Dk0xOpec.js";import{a as xe,s as Se}from"./popover-CiVpqps-.js";import{A as Ce,B as we,I as Te,J as Ee,Q as De,V as Oe,_ as ke,b as Ae,c as je,ct as Me,d as G,ft as Ne,g as Pe,h as Fe,j as Ie,l as Le,n as Re,o as ze,ot as Be,p as Ve,pt as He,st as Ue,u as We,y as Ge}from"./design-icons-DmYTv2r1.js";import{t as Ke}from"./textarea-ffrAeHUi.js";import{t as qe}from"./loader-circle-CZkGEdoI.js";import{t as K}from"./createLucideIcon-BHp8sXmF.js";import{a as Je,c as Ye,i as Xe,l as Ze,n as Qe,o as $e,r as et,s as tt,t as nt}from"./run-header-DGWkKFX-.js";import{t as rt}from"./eye-B8okNWXU.js";import{t as it}from"./message-square-B-MD-8rD.js";import{a as at,i as ot,n as st,o as ct,r as lt,t as ut}from"./thread-state-D_1f2_nG.js";import{a as dt,n as ft,s as pt,u as mt}from"./control-locations-Cv_zRDaS.js";import{s as ht,t as q}from"./project-router-DudcMzJa.js";import{n as gt,t as _t}from"./centered-state-xPENgUmo.js";import{_ as vt,a as yt,f as bt,g as xt,i as St,m as Ct,n as wt,p as Tt,r as Et,t as Dt,v as Ot}from"./agent-accounts-Ce9Q2wTj.js";import{i as kt,m as At,p as jt,r as Mt,s as Nt,t as Pt}from"./markdown-BiGKaTG5.js";import{$ as J,At as Ft,B as It,C as Lt,E as Rt,F as zt,G as Bt,Gt as Vt,H as Ht,I as Ut,Lt as Wt,M as Gt,Mt as Kt,N as qt,Q as Y,S as Jt,T as Yt,U as Xt,V as Zt,X as Qt,Xt as $t,Z as X,b as en,bt as tn,ct as nn,jt as rn,ot as an,pt as on,q as sn,qt as cn,v as ln,vt as un,w as dn,x as fn,y as pn,z as mn,zt as hn}from"./index-BDNQ4NIe.js";import{t as gn}from"./zoomable-image-DJmOaz4D.js";import{t as _n}from"./report-title-D4Mbu2Er.js";var vn=K(`anchor`,[[`path`,{d:`M12 6v16`,key:`nqf5sj`}],[`path`,{d:`m19 13 2-1a9 9 0 0 1-18 0l2 1`,key:`y7qv08`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}]]),yn=K(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),bn=K(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),xn=K(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),Sn=K(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),Cn=K(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),wn=K(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Z=e(d(),1),Q=p();function Tn({run:e}){let t=v(),n=V({mutationFn:()=>O(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:H.runs.detail(e.id)}),t.invalidateQueries({queryKey:H.runs.list()}),W(`This task will not resume itself`)},onError:e=>W(e.message,{tone:`danger`})});if(!S(e))return null;let r=new Date(e.autoResumeAt);if(!Number.isFinite(r.getTime()))return null;let i=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`long`}).format(r);return(0,Q.jsxs)(`div`,{"data-slot":`auto-resume-hint`,role:`status`,className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-xs text-muted-foreground`,children:[(0,Q.jsx)(an,{tone:`neutral`,shape:`ring`}),(0,Q.jsxs)(`span`,{children:[`Usage limit reached — this task resumes automatically at`,` `,(0,Q.jsx)(`time`,{dateTime:e.autoResumeAt,className:`font-medium text-foreground`,children:i})]}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`auto-resume-cancel`,disabled:n.isPending,onClick:()=>n.mutate(),className:`font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground disabled:opacity-50`,children:`Don’t resume`}),(0,Q.jsx)(s,{to:`/settings/global/resources`,"data-slot":`auto-resume-settings-link`,className:`font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground`,children:`Auto-resume settings`})]})}function En(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Dn=/^[A-Za-z0-9_./:=+,@%-]+$/;function On(e){return e.replaceAll(`'`,`'\\''`)}function kn(e){return e===``?`''`:Dn.test(e)?e:`\u0027${On(e)}\u0027`}function An(e){if(!En(e))return;let t=e.command;if(typeof t==`string`&&t!==``)return t;if(Array.isArray(t)){let e=t.filter(e=>typeof e==`string`);if(e.length>0)return e.map(kn).join(` `)}}function jn(e){let t="`".repeat(3),n=`~`.repeat(3);return e.split(t).filter((e,t)=>t%2==0).join(` `).split(n).filter((e,t)=>t%2==0).join(` `).split("`").filter((e,t)=>t%2==0).join(` `)}function Mn(e){return e.replace(/!\[(?:\\.|[^\]\\])*\]\([^)\s]*(?:\s+"[^"]*")?\)/g,` `)}function Nn(e){return e.replace(/(?<!\\)(?:\*\*|\*|__|~~|`)/g,``).replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\]\\^_`{|}~])/g,`$1`)}function Pn(e){let t=e.trim();return t===``||t.startsWith(`#`)||/^(https?:|mailto:)/i.test(t)?!0:!/^[a-z][a-z0-9+.-]*:/i.test(t)}function Fn(e){let t=jn(Mn(e)),n=new Map;for(let e of t.matchAll(/^\s*\[([^\]]+)\]:\s*(\S+)/gm))Pn(e[2])&&n.set(e[1].toLowerCase(),e[2]);let r=t.replace(/^\s*\[[^\]]+\]:\s*\S+.*$/gm,` `),i=[];for(let e of r.matchAll(/(?<!!)\[((?:\\.|[^\]\\])+)\](?:\(((?:[^()\s]|\([^)]*\))+)(?:\s+"[^"]*")?\)|\[([^\]]*)\])|<(https?:\/\/[^>\s]+)>|(https?:\/\/[^\s<]+)/g)){if(e[2]){Pn(e[2])&&i.push({label:Nn(e[1]),href:e[2]});continue}if(e[1]!==void 0&&e[3]!==void 0){let t=(e[3].length>0?e[3]:e[1]).toLowerCase(),r=n.get(t);r&&i.push({label:Nn(e[1]),href:r});continue}let t=(e[4]??e[5])?.replace(/[.,;:!?]+$/,``);t&&Pn(t)&&i.push({label:t,href:t})}return i}var In=(0,Z.createContext)(void 0),Ln=(0,Z.createContext)(void 0);function Rn(e,t){let n=new Map;for(let r of Fn(e)){let e=kt(r.href,t);if(!e)continue;let i=new URL(e,`https://cockpit.invalid`),a=/^\/p\/([^/]+)\/tasks\/([^/]+)\/report$/.exec(i.pathname),o=/^\/tasks\/([^/]+)\/report$/.exec(i.pathname),s=i.searchParams.get(`artifact`);if(!s||(a?decodeURIComponent(a[1])!==t.projectId:!o))continue;let c=decodeURIComponent(a?a[2]:o[1]),l=`${c}:${s}`;n.has(l)||n.set(l,{runId:c,artifactId:s,label:r.label,href:e})}return[...n.values()]}function zn(e,t){return`report-card-${encodeURIComponent(e)}-${t}`}function Bn({text:e,messageKey:t}){let n=(0,Z.useContext)(Mt),r=(0,Z.useContext)(Ln),i=t??r;if(!n||i===void 0)return null;let a=Rn(e,n);return a.length===0?null:(0,Q.jsx)(`div`,{"data-slot":`report-cards`,className:`flex flex-col gap-3 [margin-block-start:1rem]`,children:a.map(e=>(0,Q.jsx)(Vn,{reference:e,messageKey:i},`${e.runId}:${e.artifactId}`))})}function Vn({reference:e,messageKey:n}){let{artifactId:r,runId:i,label:a,href:o}=e,c=(0,Z.useContext)(In),l=(0,Z.useContext)(un);(0,Z.useLayoutEffect)(()=>l?.register(r,i),[l,r,i]);let d=fe(i,r),f=t(),p=u();if(d.isError)return(0,Q.jsx)(s,{id:zn(n,r),"data-slot":`report-card-fallback`,to:o,state:{readerFrom:f.pathname+f.search},children:a});let m=d.data?.artifact;if(m&&!Nt(m.name))return null;let h=new URLSearchParams(f.search);h.set(`report`,r),h.set(`card`,n);let g=new URLSearchParams(f.search).has(`report`)?f.state:null,_=new URLSearchParams(f.search);_.delete(`report`),_.delete(`card`);let v=`${f.pathname}${_.size?`?${_}`:``}`,y=window.navigation,b={reportCardEntry:!0,reportReturnTo:g?.reportReturnTo??v,reportReturnKey:g?.reportReturnKey??y?.currentEntry?.key,reportScrollTop:g?.reportScrollTop},x={pathname:f.pathname,search:`?${h}`,hash:new URL(o,`https://cockpit.invalid`).hash};return(0,Q.jsxs)(`section`,{"data-slot":`report-card`,"data-artifact-id":r,"data-report-run-id":i,"aria-busy":d.isPending,className:`flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-card p-3 text-foreground`,children:[(0,Q.jsx)(`h3`,{className:`break-words text-sm font-medium`,children:m?_n(m):a}),(0,Q.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`HTML report`}),(0,Q.jsx)(s,{id:zn(n,r),to:x,state:b,onClick:e=>{if(e.button!==0||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault(),c?.(n);let t=b.reportScrollTop??document.querySelector(`[data-slot="main"]`)?.scrollTop;p(x,{state:{...b,reportScrollTop:t}})},className:`inline-flex min-h-11 min-w-11 items-center self-start rounded-md border border-border px-3 text-sm active:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring ${d.isPending?`text-soft-foreground`:`text-accent-text`}`,children:`Read report`})]})}var Hn={message:!0,reasoning:!0,tool:!0,hook:!0};function Un(e){return Object.hasOwn(Hn,e)&&Hn[e]}var Wn=e=>e.kind===`tool`,Gn=e=>e.kind===`conversation`,Kn=e=>(e.toolKind===`read`||e.toolKind===`search`)&&e.status===`completed`,qn=(e,t,n)=>`${e} ${e===1?t:n}`;function Jn(e,t){let n=[];return e>0&&n.push(qn(e,`file`,`files`)),t>0&&n.push(qn(t,`search`,`searches`)),`Explored ${n.join(` · `)}`}function Yn(e){return`${e} earlier tool call${e===1?``:`s`}`}var Xn=[`Web search`,`Ran`,`Edit`,`Write`,`Read`,`Search`,`Fetch`,`Task:`];function Zn(e){for(let t of Xn)if(e.startsWith(`${t} `)&&e.length>t.length+1)return{verb:t===`Task:`?`Task`:t,detail:e.slice(t.length+1)};return{verb:e}}function Qn(e){let t=e.filter(e=>!(e.kind===`tool`&&e.toolKind===`plan`)&&!(e.kind===`reasoning`&&e.text.trim()===``)),n=new Set(t.filter(Wn).map(e=>e.id)),r=new Map,i=[];for(let e of t){let t=Un(e.kind)&&`parentItemId`in e&&e.parentItemId!==void 0&&e.parentItemId!==e.id&&n.has(e.parentItemId)?e.parentItemId:void 0;if(t===void 0)i.push(e);else{let n=r.get(t);n?n.push(e):r.set(t,[e])}}let a=[],o=[],s=()=>{if(o.length>=2){let e=o.filter(e=>e.toolKind===`read`).length;a.push({kind:`context-group`,id:`group:${o[0].id}`,tools:o,files:e,searches:o.length-e,label:Jn(e,o.length-e)})}else for(let e of o)a.push({kind:`tool-card`,id:e.id,item:e,children:r.get(e.id)??[]});o=[]},c=[],l=()=>{if(c.length!==0){for(let e of $n(c).batches)a.push({kind:`worker-conversation`,id:`worker:${e.messages[0].id}`,batches:[e]});c=[]}};for(let e of i){if(Gn(e)){s(),c.push(e);continue}l(),Wn(e)&&Kn(e)&&!r.has(e.id)?o.push(e):(s(),Wn(e)?a.push({kind:`tool-card`,id:e.id,item:e,children:r.get(e.id)??[]}):a.push({kind:`entry`,id:e.id,entry:e}))}s(),l();let u=e=>e.kind===`context-group`||e.kind===`tool-card`&&e.item.status===`completed`,d=e=>e.kind===`context-group`?e.tools.length:1,f=[],p=[],m=()=>{if(p.length>3){let e=p.slice(0,p.length-3);f.push({kind:`streak`,id:`streak:${e[0].id}`,count:e.reduce((e,t)=>e+d(t),0),blocks:e}),f.push(...p.slice(p.length-3))}else f.push(...p);p=[]};for(let e of a)u(e)?p.push(e):(m(),f.push(e));return m(),f}function $n(e){let t=[];for(let n of e){let e=t.at(-1);n.messageKind===`request`&&e?.kind===`request`&&e.senderRunId===n.senderRunId&&e.text===n.text&&e.messages[0].relationship===`peer`==(n.relationship===`peer`)&&!e.messages.some(e=>e.recipientRunId===n.recipientRunId)?e.messages.push(n):t.push({id:`worker-batch:${n.messageId}`,kind:n.messageKind,text:n.text,senderRunId:n.senderRunId,messages:[n]})}return{kind:`worker-conversation`,id:`worker:${e[0].id}`,batches:t}}var er=new Map,tr=(0,Z.createContext)(null);function nr(){return(0,Z.useContext)(tr)}function rr({runId:e,children:t}){let n=(0,Z.useMemo)(()=>({get:t=>er.get(e)?.get(t),set:(t,n)=>{let r=er.get(e)??new Map;r.set(t,n),er.set(e,r)}}),[e]);return(0,Q.jsx)(tr.Provider,{value:n,children:t})}function ir(e){return e.scrollTop<Math.max(600,e.clientHeight)}function ar(e,t){let n=t.find(({bottom:t})=>t>e);return n===void 0?void 0:{key:n.key,offset:n.top-e}}function or(e,t,n,r,i){if(n===void 0)return i;let a=r.find(({key:e})=>e===n.key);return a===void 0?i:e+(a.top-t-n.offset)}function sr(e,t=24){return e.scrollHeight-e.scrollTop-e.clientHeight<t}function cr(e,t){let n=new URLSearchParams(e).get(`thread`);return n===`flat`||n===`virtual`?n:t>300?`virtual`:`flat`}var lr=new Map;function ur(e,t){lr.set(e,t)}function dr(e){return lr.get(e)}var fr=new Map;function pr(e,t){fr.set(e,{...t,...t.rowKeys?{rowKeys:[...t.rowKeys]}:{}})}function mr(e){return fr.get(e)}function hr(e,t,n){let r=fr.get(e);if(!r||r.rows!==t)return;let i=r.rowKeys;if(!(n&&i&&(n.length!==t||i.length!==t||!n.every((e,t)=>e===i[t]))))return r.cache}var gr=new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}),_r=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`medium`}),vr=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`}),yr=new Intl.DateTimeFormat(void 0,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`}),br=new Intl.DateTimeFormat(void 0,{dateStyle:`full`});function $(e){if(typeof e!=`string`||e===``)return;let t=new Date(e);return Number.isFinite(t.getTime())?t:void 0}function xr(e){let t=$(e);return t===void 0?void 0:gr.format(t)}function Sr(e){let t=$(e);return t===void 0?void 0:_r.format(t)}var Cr=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`;function wr(e){let t=$(e);return t===void 0?void 0:Cr(t)}function Tr(e,t=new Date){let n=$(e);if(n===void 0)return;let r=Cr(n);return r===Cr(t)?`Today`:r===Cr(new Date(t.getFullYear(),t.getMonth(),t.getDate()-1))?`Yesterday`:(n.getFullYear()===t.getFullYear()?vr:yr).format(n)}function Er(e,t){let n=$(e),r=$(t);if(n===void 0||r===void 0)return;let i=Math.round((r.getTime()-n.getTime())/1e3);if(i<0)return;if(i<60)return`${i}s`;let a=Math.floor(i/60);return a<60?`${a}m ${String(i%60).padStart(2,`0`)}s`:`${Math.floor(a/60)}h ${String(a%60).padStart(2,`0`)}m`}function Dr({ts:e}){let t=xr(e);return t===void 0?null:(0,Q.jsx)(`time`,{"data-slot":`message-time`,dateTime:e,title:Sr(e),className:`text-[11px] leading-none text-soft-foreground`,children:t})}function Or({startedAt:e,completedAt:t}){let n=xr(t);if(n===void 0)return null;let r=Er(e,t);return(0,Q.jsxs)(`div`,{"data-slot":`turn-time`,className:`flex items-center gap-1.5 px-0.5 text-[11px] leading-none text-soft-foreground`,children:[(0,Q.jsx)(`time`,{dateTime:t,title:Sr(t),children:n}),r===void 0?null:(0,Q.jsxs)(`span`,{title:`Replied in ${r}`,children:[`· `,r]})]})}function kr({ts:e}){let t=Tr(e),n=$(e);if(t===void 0||n===void 0)return null;let r=br.format(n);return(0,Q.jsxs)(`div`,{"data-slot":`day-separator`,role:`separator`,"aria-label":t===`Today`||t===`Yesterday`?`${t}, ${r}`:r,className:`flex items-center gap-3 py-1 text-[11px] font-medium text-soft-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`h-px flex-1 bg-border`}),(0,Q.jsx)(`time`,{dateTime:wr(e),title:r,children:t}),(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`h-px flex-1 bg-border`})]})}var Ar={user:{label:`YOUR MESSAGE`,speaker:`Your message`,classes:`border-message-user-border bg-message-user-bg [html:not(.light)_&]:border-s-[3px] [html:not(.light)_&]:border-s-message-user-accent`,accent:`text-message-user-accent`,body:`max-md:text-[12px]`},agent:{label:`AGENT RESPONSE`,speaker:`Agent response`,classes:`border-message-agent-border bg-message-agent-bg [html:not(.light)_&]:border-s-[3px] [html:not(.light)_&]:border-s-message-agent-accent`,accent:`text-message-agent-accent`,body:`text-[15px] md:text-[14px]`}};function jr({role:e,children:t,className:n,ts:r,headerActions:i,...a}){let o=Ar[e],s=r===void 0?void 0:xr(r);return(0,Q.jsxs)(`article`,{...a,"data-role":e,"aria-label":o.speaker,className:l(`flex w-full min-w-0 flex-col gap-2 self-stretch rounded-[8px] border p-3 md:px-4 md:py-[14px]`,o.classes,n),children:[(0,Q.jsxs)(`p`,{className:l(`m-0 flex w-full min-w-0 items-start gap-2 text-[11px] leading-[1.2] font-semibold tracking-[0.6px] uppercase`,o.accent),children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1 normal-case tracking-normal`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2 uppercase tracking-[0.6px]`,children:[(0,Q.jsx)(it,{"aria-hidden":`true`,className:`size-4 shrink-0`}),o.label]}),i]}),s===void 0?null:(0,Q.jsx)(`span`,{className:`shrink-0 font-normal tracking-normal normal-case`,children:(0,Q.jsx)(Dr,{ts:r})})]}),(0,Q.jsx)(`div`,{className:l(`min-w-0 break-words text-[14px] text-foreground select-text [overflow-wrap:anywhere]`,o.body,`leading-[1.6]`),children:t})]})}function Mr({text:e,imageCount:t=0,images:n=[],ts:r,onEdit:i,onRemove:o,editLabel:s=`Edit message`,removeLabel:c=`Remove message`,children:l}){let u=t-n.length,[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(e),[h,g]=(0,Z.useState)(!1),[_,v]=(0,Z.useState)(),y=()=>{m(e),v(void 0),f(!0)},b=async()=>{let t=p.trim();if(!t||t===e){f(!1);return}g(!0),v(void 0);try{await i?.(t),f(!1)}catch(e){v(e instanceof Error?e.message:`Could not save the message`)}finally{g(!1)}},x=async()=>{g(!0),v(void 0);try{await o?.()}catch(e){v(e instanceof Error?e.message:`Could not remove the message`)}finally{g(!1)}};return d?(0,Q.jsxs)(jr,{role:`user`,ts:r,"data-slot":`user-bubble`,"data-editing":`true`,children:[(0,Q.jsx)(`textarea`,{autoFocus:!0,"aria-label":`Edit the message`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Escape`?(e.stopPropagation(),f(!1)):e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())},className:`block max-h-[220px] min-h-[60px] w-full resize-none rounded-md bg-background px-2 py-1.5 text-[14px] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50`}),(0,Q.jsxs)(`span`,{className:`mt-1.5 flex justify-end gap-1.5`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>f(!1),disabled:h,className:`inline-flex min-h-11 min-w-11 items-center justify-center rounded-sm px-2 text-xs font-medium text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:`Cancel`}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>void b(),disabled:h,className:`inline-flex min-h-11 min-w-11 items-center justify-center rounded-sm bg-action px-2 text-xs font-semibold text-action-foreground hover:brightness-[0.96] focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:h?(0,Q.jsx)(qe,{className:`size-3.5 animate-spin`}):`Save`})]}),_?(0,Q.jsx)(`p`,{role:`alert`,className:`mt-1.5 text-xs text-danger`,children:_}):null]}):(0,Q.jsxs)(jr,{role:`user`,ts:r,"data-slot":`user-bubble`,className:`group`,children:[i||o?(0,Q.jsxs)(`span`,{"data-slot":`bubble-actions`,className:`mb-1 flex justify-end gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`,children:[i?(0,Q.jsx)(`button`,{type:`button`,"aria-label":s,onClick:y,disabled:h,className:`inline-flex size-11 items-center justify-center rounded-sm text-soft-foreground hover:bg-background hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(wn,{className:`size-3.5`})}):null,o?(0,Q.jsx)(`button`,{type:`button`,"aria-label":c,onClick:()=>void x(),disabled:h,className:`inline-flex size-11 items-center justify-center rounded-sm text-soft-foreground hover:bg-background hover:text-danger focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(Ue,{className:`size-3.5`})}):null]}):null,_?(0,Q.jsx)(`p`,{role:`alert`,className:`mb-1 text-xs text-danger`,children:_}):null,l??(0,Q.jsx)(Pt,{breaks:!0,children:e}),n.length>0?(0,Q.jsx)(`span`,{"data-slot":`user-images`,className:`mt-2 flex flex-wrap items-center justify-end gap-1.5`,children:n.map(e=>ee(e.split(`/`).pop()??``)?(0,Q.jsx)(gn,{src:e,alt:`attached`,className:`max-h-40 max-w-[220px] rounded-md border border-border object-contain`},e):(0,Q.jsxs)(`a`,{href:a(e),download:!0,"data-slot":`user-file`,className:`inline-flex min-h-11 min-w-11 max-w-[220px] items-center gap-1.5 rounded-md border border-border bg-background/60 px-2 py-1 text-xs text-muted-foreground hover:text-foreground`,children:[(0,Q.jsx)(Ee,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.split(`/`).pop()})]},e))}):null,u>0?(0,Q.jsxs)(`span`,{className:`mt-1 block text-xs text-soft-foreground`,children:[u,` image`,u>1?`s`:``,` attached`]}):null]})}var Nr=`inline-flex h-11 min-w-11 items-center justify-center gap-1 rounded-sm px-2 text-xs font-medium text-soft-foreground hover:bg-background hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,Pr=[`[data-streamdown="code-block-actions"]`,`[data-streamdown="code-copy-button"]`,`[data-streamdown="code-block-copy-button"]`,`[data-streamdown="code-block-header"]`].join(`,`);function Fr(e,t){let n=e.cloneNode(!0);n.querySelectorAll(Pr).forEach(e=>e.remove());let r=Fn(t);return[...n.querySelectorAll(`button[data-streamdown="link"]`)].forEach(e=>{let t=e.textContent??``,i=r.findIndex(e=>e.label===t);if(i<0)return;let a=r.splice(i,1)[0];if(!a||!Pn(a.href))return;let o=n.ownerDocument.createElement(`a`);o.setAttribute(`href`,a.href),o.setAttribute(`data-streamdown`,`link`),o.textContent=e.textContent,e.replaceWith(o)}),n.innerHTML}async function Ir(e,t,n){if(e===`markdown`){if(!navigator.clipboard?.writeText)throw Error(`Clipboard unavailable`);await navigator.clipboard.writeText(t);return}if(!navigator.clipboard?.write||typeof ClipboardItem>`u`||!n)throw Error(`Clipboard unavailable`);let r=Fr(n,t);await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([r],{type:`text/html`}),"text/plain":new Blob([t],{type:`text/plain`})})])}function Lr({text:e,ts:t,messageKey:n}){let r=(0,Z.useRef)(null),[i,a]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(null),c=(0,Z.useRef)(null);(0,Z.useEffect)(()=>()=>{c.current!==null&&clearTimeout(c.current)},[]);let l=async t=>{c.current!==null&&clearTimeout(c.current),a(null),s(null);try{await Ir(t,e,r.current),a(t),c.current=setTimeout(()=>a(null),2e3)}catch{s(`Couldn't copy to the clipboard`)}};return(0,Q.jsxs)(jr,{role:`agent`,ts:t,"data-slot":`assistant-message`,headerActions:(0,Q.jsxs)(`span`,{"data-slot":`bubble-actions`,className:`flex items-center gap-0.5`,children:[(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Copy reply`,onClick:()=>void l(`html`),className:Nr,children:[(0,Q.jsx)(Ge,{className:`size-3.5`,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{"aria-live":`polite`,children:i===`html`?`Copied`:`Copy`})]}),(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Copy reply as markdown`,onClick:()=>void l(`markdown`),className:Nr,children:[(0,Q.jsx)(cn,{className:`size-3.5`,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{"aria-live":`polite`,children:i===`markdown`?`Copied`:`Copy markdown`})]})]}),children:[o?(0,Q.jsx)(`p`,{role:`alert`,className:`mb-1 text-xs text-danger`,children:o}):null,(0,Q.jsx)(`div`,{ref:r,children:(0,Q.jsx)(Pt,{breaks:!0,children:e})}),(0,Q.jsx)(Bn,{text:e,messageKey:n})]})}function Rr({note:e}){return e.icon===`handoff`?(0,Q.jsxs)(`div`,{"data-slot":`note-line`,"data-tone":e.tone,"data-icon":`handoff`,className:`flex items-start gap-2 px-0.5 text-xs text-muted-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`mt-[-1px] flex size-5 shrink-0 items-center justify-center rounded-full border border-border text-success`,children:(0,Q.jsx)(hn,{className:`size-3`})}),(0,Q.jsx)(`span`,{className:`min-w-0 break-words`,children:e.text})]}):(0,Q.jsxs)(`div`,{"data-slot":`note-line`,"data-tone":e.tone,className:l(`px-0.5 text-xs`,e.tone===`danger`?`text-danger [.light_&]:text-red-700`:`text-soft-foreground`),children:[e.tone===`danger`?`✗ `:`· `,e.text]})}var zr={claude:`Claude Code`,codex:`Codex`,opencode:`OpenCode`,pi:`pi`,cursor:`Cursor`,omp:`OMP`};function Br({incident:e}){let t=zr[e.provider];return(0,Q.jsxs)(`div`,{role:`alert`,"data-slot":`provider-auth-required`,className:`rounded-md border border-danger/30 bg-danger/5 px-3.5 py-3`,children:[(0,Q.jsxs)(`p`,{className:`text-[13px] font-semibold text-foreground`,children:[`This run needed `,t,` authorization`]}),(0,Q.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Review `,t,` settings before retrying.`]}),(0,Q.jsx)(q,{to:`/settings/agents#providers`,className:`mt-2 inline-flex text-xs font-medium text-foreground underline-offset-2 hover:underline`,children:`Open provider settings`})]})}function Vr({text:e}){let t=(0,Z.useId)();if(e.trim()===``)return null;let n=e.split(`
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,E as n,I as r,L as i,N as a,d as o,p as s,t as c,u as l,w as u}from"./button-CHUAMTHK.js";import{i as d,r as f,t as p}from"./react-runtime-CCIEwYL0.js";import{r as m}from"./live-refetch-C0kQc3-z.js";import{D as h,F as g,Hn as _,Jr as v,T as y,Un as b,Wn as x,ar as S,cr as C,f as w,i as T,ir as E,or as D,pr as ee,rr as te,u as O,ur as k,v as ne,wr as re}from"./project-scope-context-CaUqlAd7.js";import{$t as A,At as j,Bn as M,Cn as N,Ct as P,Et as F,Hn as I,In as L,J as R,Jt as ie,Nn as z,P as ae,Pn as oe,R as se,S as ce,Tt as B,U as le,Un as V,bt as ue,c as de,d as fe,et as pe,gt as me,h as he,n as H,on as ge,rn as _e,un as U,ut as ve,x as ye,xn as be}from"./queries-DYfIpJ-d.js";import{n as W}from"./toaster-B1MyeHiE.js";import{a as xe,s as Se}from"./popover-DRcRI46x.js";import{A as Ce,B as we,I as Te,J as Ee,Q as De,V as Oe,_ as ke,b as Ae,c as je,ct as Me,d as G,ft as Ne,g as Pe,h as Fe,j as Ie,l as Le,n as Re,o as ze,ot as Be,p as Ve,pt as He,st as Ue,u as We,y as Ge}from"./design-icons-DmYTv2r1.js";import{t as Ke}from"./textarea-DlVUfdWG.js";import{t as qe}from"./loader-circle-CZkGEdoI.js";import{t as K}from"./createLucideIcon-BHp8sXmF.js";import{a as Je,c as Ye,i as Xe,l as Ze,n as Qe,o as $e,r as et,s as tt,t as nt}from"./run-header-DPjiPKRe.js";import{t as rt}from"./eye-B8okNWXU.js";import{t as it}from"./message-square-B-MD-8rD.js";import{a as at,i as ot,n as st,o as ct,r as lt,t as ut}from"./thread-state-BLaCzqeX.js";import{a as dt,n as ft,s as pt,u as mt}from"./control-locations-CA9TMupq.js";import{s as ht,t as q}from"./project-router-1m_VlC22.js";import{n as gt,t as _t}from"./centered-state-DGyy0SuA.js";import{_ as vt,a as yt,f as bt,g as xt,i as St,m as Ct,n as wt,p as Tt,r as Et,t as Dt,v as Ot}from"./agent-accounts-BCg-578Q.js";import{i as kt,m as At,p as jt,r as Mt,s as Nt,t as Pt}from"./markdown-D7DUNWcJ.js";import{$ as J,At as Ft,B as It,C as Lt,E as Rt,F as zt,G as Bt,Gt as Vt,H as Ht,I as Ut,Lt as Wt,M as Gt,Mt as Kt,N as qt,Q as Y,S as Jt,T as Yt,U as Xt,V as Zt,X as Qt,Xt as $t,Z as X,b as en,bt as tn,ct as nn,jt as rn,ot as an,pt as on,q as sn,qt as cn,v as ln,vt as un,w as dn,x as fn,y as pn,z as mn,zt as hn}from"./index-D489J7QW.js";import{t as gn}from"./zoomable-image-5pOUaPEg.js";import{t as _n}from"./report-title-D4Mbu2Er.js";var vn=K(`anchor`,[[`path`,{d:`M12 6v16`,key:`nqf5sj`}],[`path`,{d:`m19 13 2-1a9 9 0 0 1-18 0l2 1`,key:`y7qv08`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}]]),yn=K(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),bn=K(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),xn=K(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),Sn=K(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),Cn=K(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),wn=K(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Z=e(d(),1),Q=p();function Tn({run:e}){let t=v(),n=V({mutationFn:()=>O(e.id),onSuccess:()=>{t.invalidateQueries({queryKey:H.runs.detail(e.id)}),t.invalidateQueries({queryKey:H.runs.list()}),W(`This task will not resume itself`)},onError:e=>W(e.message,{tone:`danger`})});if(!S(e))return null;let r=new Date(e.autoResumeAt);if(!Number.isFinite(r.getTime()))return null;let i=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`long`}).format(r);return(0,Q.jsxs)(`div`,{"data-slot":`auto-resume-hint`,role:`status`,className:`flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-xs text-muted-foreground`,children:[(0,Q.jsx)(an,{tone:`neutral`,shape:`ring`}),(0,Q.jsxs)(`span`,{children:[`Usage limit reached — this task resumes automatically at`,` `,(0,Q.jsx)(`time`,{dateTime:e.autoResumeAt,className:`font-medium text-foreground`,children:i})]}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`auto-resume-cancel`,disabled:n.isPending,onClick:()=>n.mutate(),className:`font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground disabled:opacity-50`,children:`Don’t resume`}),(0,Q.jsx)(s,{to:`/settings/global/resources`,"data-slot":`auto-resume-settings-link`,className:`font-medium text-foreground underline decoration-border underline-offset-2 hover:decoration-foreground`,children:`Auto-resume settings`})]})}function En(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Dn=/^[A-Za-z0-9_./:=+,@%-]+$/;function On(e){return e.replaceAll(`'`,`'\\''`)}function kn(e){return e===``?`''`:Dn.test(e)?e:`\u0027${On(e)}\u0027`}function An(e){if(!En(e))return;let t=e.command;if(typeof t==`string`&&t!==``)return t;if(Array.isArray(t)){let e=t.filter(e=>typeof e==`string`);if(e.length>0)return e.map(kn).join(` `)}}function jn(e){let t="`".repeat(3),n=`~`.repeat(3);return e.split(t).filter((e,t)=>t%2==0).join(` `).split(n).filter((e,t)=>t%2==0).join(` `).split("`").filter((e,t)=>t%2==0).join(` `)}function Mn(e){return e.replace(/!\[(?:\\.|[^\]\\])*\]\([^)\s]*(?:\s+"[^"]*")?\)/g,` `)}function Nn(e){return e.replace(/(?<!\\)(?:\*\*|\*|__|~~|`)/g,``).replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\]\\^_`{|}~])/g,`$1`)}function Pn(e){let t=e.trim();return t===``||t.startsWith(`#`)||/^(https?:|mailto:)/i.test(t)?!0:!/^[a-z][a-z0-9+.-]*:/i.test(t)}function Fn(e){let t=jn(Mn(e)),n=new Map;for(let e of t.matchAll(/^\s*\[([^\]]+)\]:\s*(\S+)/gm))Pn(e[2])&&n.set(e[1].toLowerCase(),e[2]);let r=t.replace(/^\s*\[[^\]]+\]:\s*\S+.*$/gm,` `),i=[];for(let e of r.matchAll(/(?<!!)\[((?:\\.|[^\]\\])+)\](?:\(((?:[^()\s]|\([^)]*\))+)(?:\s+"[^"]*")?\)|\[([^\]]*)\])|<(https?:\/\/[^>\s]+)>|(https?:\/\/[^\s<]+)/g)){if(e[2]){Pn(e[2])&&i.push({label:Nn(e[1]),href:e[2]});continue}if(e[1]!==void 0&&e[3]!==void 0){let t=(e[3].length>0?e[3]:e[1]).toLowerCase(),r=n.get(t);r&&i.push({label:Nn(e[1]),href:r});continue}let t=(e[4]??e[5])?.replace(/[.,;:!?]+$/,``);t&&Pn(t)&&i.push({label:t,href:t})}return i}var In=(0,Z.createContext)(void 0),Ln=(0,Z.createContext)(void 0);function Rn(e,t){let n=new Map;for(let r of Fn(e)){let e=kt(r.href,t);if(!e)continue;let i=new URL(e,`https://cockpit.invalid`),a=/^\/p\/([^/]+)\/tasks\/([^/]+)\/report$/.exec(i.pathname),o=/^\/tasks\/([^/]+)\/report$/.exec(i.pathname),s=i.searchParams.get(`artifact`);if(!s||(a?decodeURIComponent(a[1])!==t.projectId:!o))continue;let c=decodeURIComponent(a?a[2]:o[1]),l=`${c}:${s}`;n.has(l)||n.set(l,{runId:c,artifactId:s,label:r.label,href:e})}return[...n.values()]}function zn(e,t){return`report-card-${encodeURIComponent(e)}-${t}`}function Bn({text:e,messageKey:t}){let n=(0,Z.useContext)(Mt),r=(0,Z.useContext)(Ln),i=t??r;if(!n||i===void 0)return null;let a=Rn(e,n);return a.length===0?null:(0,Q.jsx)(`div`,{"data-slot":`report-cards`,className:`flex flex-col gap-3 [margin-block-start:1rem]`,children:a.map(e=>(0,Q.jsx)(Vn,{reference:e,messageKey:i},`${e.runId}:${e.artifactId}`))})}function Vn({reference:e,messageKey:n}){let{artifactId:r,runId:i,label:a,href:o}=e,c=(0,Z.useContext)(In),l=(0,Z.useContext)(un);(0,Z.useLayoutEffect)(()=>l?.register(r,i),[l,r,i]);let d=fe(i,r),f=t(),p=u();if(d.isError)return(0,Q.jsx)(s,{id:zn(n,r),"data-slot":`report-card-fallback`,to:o,state:{readerFrom:f.pathname+f.search},children:a});let m=d.data?.artifact;if(m&&!Nt(m.name))return null;let h=new URLSearchParams(f.search);h.set(`report`,r),h.set(`card`,n);let g=new URLSearchParams(f.search).has(`report`)?f.state:null,_=new URLSearchParams(f.search);_.delete(`report`),_.delete(`card`);let v=`${f.pathname}${_.size?`?${_}`:``}`,y=window.navigation,b={reportCardEntry:!0,reportReturnTo:g?.reportReturnTo??v,reportReturnKey:g?.reportReturnKey??y?.currentEntry?.key,reportScrollTop:g?.reportScrollTop},x={pathname:f.pathname,search:`?${h}`,hash:new URL(o,`https://cockpit.invalid`).hash};return(0,Q.jsxs)(`section`,{"data-slot":`report-card`,"data-artifact-id":r,"data-report-run-id":i,"aria-busy":d.isPending,className:`flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-card p-3 text-foreground`,children:[(0,Q.jsx)(`h3`,{className:`break-words text-sm font-medium`,children:m?_n(m):a}),(0,Q.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`HTML report`}),(0,Q.jsx)(s,{id:zn(n,r),to:x,state:b,onClick:e=>{if(e.button!==0||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault(),c?.(n);let t=b.reportScrollTop??document.querySelector(`[data-slot="main"]`)?.scrollTop;p(x,{state:{...b,reportScrollTop:t}})},className:`inline-flex min-h-11 min-w-11 items-center self-start rounded-md border border-border px-3 text-sm active:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring ${d.isPending?`text-soft-foreground`:`text-accent-text`}`,children:`Read report`})]})}var Hn={message:!0,reasoning:!0,tool:!0,hook:!0};function Un(e){return Object.hasOwn(Hn,e)&&Hn[e]}var Wn=e=>e.kind===`tool`,Gn=e=>e.kind===`conversation`,Kn=e=>(e.toolKind===`read`||e.toolKind===`search`)&&e.status===`completed`,qn=(e,t,n)=>`${e} ${e===1?t:n}`;function Jn(e,t){let n=[];return e>0&&n.push(qn(e,`file`,`files`)),t>0&&n.push(qn(t,`search`,`searches`)),`Explored ${n.join(` · `)}`}function Yn(e){return`${e} earlier tool call${e===1?``:`s`}`}var Xn=[`Web search`,`Ran`,`Edit`,`Write`,`Read`,`Search`,`Fetch`,`Task:`];function Zn(e){for(let t of Xn)if(e.startsWith(`${t} `)&&e.length>t.length+1)return{verb:t===`Task:`?`Task`:t,detail:e.slice(t.length+1)};return{verb:e}}function Qn(e){let t=e.filter(e=>!(e.kind===`tool`&&e.toolKind===`plan`)&&!(e.kind===`reasoning`&&e.text.trim()===``)),n=new Set(t.filter(Wn).map(e=>e.id)),r=new Map,i=[];for(let e of t){let t=Un(e.kind)&&`parentItemId`in e&&e.parentItemId!==void 0&&e.parentItemId!==e.id&&n.has(e.parentItemId)?e.parentItemId:void 0;if(t===void 0)i.push(e);else{let n=r.get(t);n?n.push(e):r.set(t,[e])}}let a=[],o=[],s=()=>{if(o.length>=2){let e=o.filter(e=>e.toolKind===`read`).length;a.push({kind:`context-group`,id:`group:${o[0].id}`,tools:o,files:e,searches:o.length-e,label:Jn(e,o.length-e)})}else for(let e of o)a.push({kind:`tool-card`,id:e.id,item:e,children:r.get(e.id)??[]});o=[]},c=[],l=()=>{if(c.length!==0){for(let e of $n(c).batches)a.push({kind:`worker-conversation`,id:`worker:${e.messages[0].id}`,batches:[e]});c=[]}};for(let e of i){if(Gn(e)){s(),c.push(e);continue}l(),Wn(e)&&Kn(e)&&!r.has(e.id)?o.push(e):(s(),Wn(e)?a.push({kind:`tool-card`,id:e.id,item:e,children:r.get(e.id)??[]}):a.push({kind:`entry`,id:e.id,entry:e}))}s(),l();let u=e=>e.kind===`context-group`||e.kind===`tool-card`&&e.item.status===`completed`,d=e=>e.kind===`context-group`?e.tools.length:1,f=[],p=[],m=()=>{if(p.length>3){let e=p.slice(0,p.length-3);f.push({kind:`streak`,id:`streak:${e[0].id}`,count:e.reduce((e,t)=>e+d(t),0),blocks:e}),f.push(...p.slice(p.length-3))}else f.push(...p);p=[]};for(let e of a)u(e)?p.push(e):(m(),f.push(e));return m(),f}function $n(e){let t=[];for(let n of e){let e=t.at(-1);n.messageKind===`request`&&e?.kind===`request`&&e.senderRunId===n.senderRunId&&e.text===n.text&&e.messages[0].relationship===`peer`==(n.relationship===`peer`)&&!e.messages.some(e=>e.recipientRunId===n.recipientRunId)?e.messages.push(n):t.push({id:`worker-batch:${n.messageId}`,kind:n.messageKind,text:n.text,senderRunId:n.senderRunId,messages:[n]})}return{kind:`worker-conversation`,id:`worker:${e[0].id}`,batches:t}}var er=new Map,tr=(0,Z.createContext)(null);function nr(){return(0,Z.useContext)(tr)}function rr({runId:e,children:t}){let n=(0,Z.useMemo)(()=>({get:t=>er.get(e)?.get(t),set:(t,n)=>{let r=er.get(e)??new Map;r.set(t,n),er.set(e,r)}}),[e]);return(0,Q.jsx)(tr.Provider,{value:n,children:t})}function ir(e){return e.scrollTop<Math.max(600,e.clientHeight)}function ar(e,t){let n=t.find(({bottom:t})=>t>e);return n===void 0?void 0:{key:n.key,offset:n.top-e}}function or(e,t,n,r,i){if(n===void 0)return i;let a=r.find(({key:e})=>e===n.key);return a===void 0?i:e+(a.top-t-n.offset)}function sr(e,t=24){return e.scrollHeight-e.scrollTop-e.clientHeight<t}function cr(e,t){let n=new URLSearchParams(e).get(`thread`);return n===`flat`||n===`virtual`?n:t>300?`virtual`:`flat`}var lr=new Map;function ur(e,t){lr.set(e,t)}function dr(e){return lr.get(e)}var fr=new Map;function pr(e,t){fr.set(e,{...t,...t.rowKeys?{rowKeys:[...t.rowKeys]}:{}})}function mr(e){return fr.get(e)}function hr(e,t,n){let r=fr.get(e);if(!r||r.rows!==t)return;let i=r.rowKeys;if(!(n&&i&&(n.length!==t||i.length!==t||!n.every((e,t)=>e===i[t]))))return r.cache}var gr=new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}),_r=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`medium`}),vr=new Intl.DateTimeFormat(void 0,{weekday:`short`,month:`short`,day:`numeric`}),yr=new Intl.DateTimeFormat(void 0,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`}),br=new Intl.DateTimeFormat(void 0,{dateStyle:`full`});function $(e){if(typeof e!=`string`||e===``)return;let t=new Date(e);return Number.isFinite(t.getTime())?t:void 0}function xr(e){let t=$(e);return t===void 0?void 0:gr.format(t)}function Sr(e){let t=$(e);return t===void 0?void 0:_r.format(t)}var Cr=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`;function wr(e){let t=$(e);return t===void 0?void 0:Cr(t)}function Tr(e,t=new Date){let n=$(e);if(n===void 0)return;let r=Cr(n);return r===Cr(t)?`Today`:r===Cr(new Date(t.getFullYear(),t.getMonth(),t.getDate()-1))?`Yesterday`:(n.getFullYear()===t.getFullYear()?vr:yr).format(n)}function Er(e,t){let n=$(e),r=$(t);if(n===void 0||r===void 0)return;let i=Math.round((r.getTime()-n.getTime())/1e3);if(i<0)return;if(i<60)return`${i}s`;let a=Math.floor(i/60);return a<60?`${a}m ${String(i%60).padStart(2,`0`)}s`:`${Math.floor(a/60)}h ${String(a%60).padStart(2,`0`)}m`}function Dr({ts:e}){let t=xr(e);return t===void 0?null:(0,Q.jsx)(`time`,{"data-slot":`message-time`,dateTime:e,title:Sr(e),className:`text-[11px] leading-none text-soft-foreground`,children:t})}function Or({startedAt:e,completedAt:t}){let n=xr(t);if(n===void 0)return null;let r=Er(e,t);return(0,Q.jsxs)(`div`,{"data-slot":`turn-time`,className:`flex items-center gap-1.5 px-0.5 text-[11px] leading-none text-soft-foreground`,children:[(0,Q.jsx)(`time`,{dateTime:t,title:Sr(t),children:n}),r===void 0?null:(0,Q.jsxs)(`span`,{title:`Replied in ${r}`,children:[`· `,r]})]})}function kr({ts:e}){let t=Tr(e),n=$(e);if(t===void 0||n===void 0)return null;let r=br.format(n);return(0,Q.jsxs)(`div`,{"data-slot":`day-separator`,role:`separator`,"aria-label":t===`Today`||t===`Yesterday`?`${t}, ${r}`:r,className:`flex items-center gap-3 py-1 text-[11px] font-medium text-soft-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`h-px flex-1 bg-border`}),(0,Q.jsx)(`time`,{dateTime:wr(e),title:r,children:t}),(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`h-px flex-1 bg-border`})]})}var Ar={user:{label:`YOUR MESSAGE`,speaker:`Your message`,classes:`border-message-user-border bg-message-user-bg [html:not(.light)_&]:border-s-[3px] [html:not(.light)_&]:border-s-message-user-accent`,accent:`text-message-user-accent`,body:`max-md:text-[12px]`},agent:{label:`AGENT RESPONSE`,speaker:`Agent response`,classes:`border-message-agent-border bg-message-agent-bg [html:not(.light)_&]:border-s-[3px] [html:not(.light)_&]:border-s-message-agent-accent`,accent:`text-message-agent-accent`,body:`text-[15px] md:text-[14px]`}};function jr({role:e,children:t,className:n,ts:r,headerActions:i,...a}){let o=Ar[e],s=r===void 0?void 0:xr(r);return(0,Q.jsxs)(`article`,{...a,"data-role":e,"aria-label":o.speaker,className:l(`flex w-full min-w-0 flex-col gap-2 self-stretch rounded-[8px] border p-3 md:px-4 md:py-[14px]`,o.classes,n),children:[(0,Q.jsxs)(`p`,{className:l(`m-0 flex w-full min-w-0 items-start gap-2 text-[11px] leading-[1.2] font-semibold tracking-[0.6px] uppercase`,o.accent),children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1 normal-case tracking-normal`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2 uppercase tracking-[0.6px]`,children:[(0,Q.jsx)(it,{"aria-hidden":`true`,className:`size-4 shrink-0`}),o.label]}),i]}),s===void 0?null:(0,Q.jsx)(`span`,{className:`shrink-0 font-normal tracking-normal normal-case`,children:(0,Q.jsx)(Dr,{ts:r})})]}),(0,Q.jsx)(`div`,{className:l(`min-w-0 break-words text-[14px] text-foreground select-text [overflow-wrap:anywhere]`,o.body,`leading-[1.6]`),children:t})]})}function Mr({text:e,imageCount:t=0,images:n=[],ts:r,onEdit:i,onRemove:o,editLabel:s=`Edit message`,removeLabel:c=`Remove message`,children:l}){let u=t-n.length,[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(e),[h,g]=(0,Z.useState)(!1),[_,v]=(0,Z.useState)(),y=()=>{m(e),v(void 0),f(!0)},b=async()=>{let t=p.trim();if(!t||t===e){f(!1);return}g(!0),v(void 0);try{await i?.(t),f(!1)}catch(e){v(e instanceof Error?e.message:`Could not save the message`)}finally{g(!1)}},x=async()=>{g(!0),v(void 0);try{await o?.()}catch(e){v(e instanceof Error?e.message:`Could not remove the message`)}finally{g(!1)}};return d?(0,Q.jsxs)(jr,{role:`user`,ts:r,"data-slot":`user-bubble`,"data-editing":`true`,children:[(0,Q.jsx)(`textarea`,{autoFocus:!0,"aria-label":`Edit the message`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Escape`?(e.stopPropagation(),f(!1)):e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())},className:`block max-h-[220px] min-h-[60px] w-full resize-none rounded-md bg-background px-2 py-1.5 text-[14px] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50`}),(0,Q.jsxs)(`span`,{className:`mt-1.5 flex justify-end gap-1.5`,children:[(0,Q.jsx)(`button`,{type:`button`,onClick:()=>f(!1),disabled:h,className:`inline-flex min-h-11 min-w-11 items-center justify-center rounded-sm px-2 text-xs font-medium text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:`Cancel`}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>void b(),disabled:h,className:`inline-flex min-h-11 min-w-11 items-center justify-center rounded-sm bg-action px-2 text-xs font-semibold text-action-foreground hover:brightness-[0.96] focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:h?(0,Q.jsx)(qe,{className:`size-3.5 animate-spin`}):`Save`})]}),_?(0,Q.jsx)(`p`,{role:`alert`,className:`mt-1.5 text-xs text-danger`,children:_}):null]}):(0,Q.jsxs)(jr,{role:`user`,ts:r,"data-slot":`user-bubble`,className:`group`,children:[i||o?(0,Q.jsxs)(`span`,{"data-slot":`bubble-actions`,className:`mb-1 flex justify-end gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`,children:[i?(0,Q.jsx)(`button`,{type:`button`,"aria-label":s,onClick:y,disabled:h,className:`inline-flex size-11 items-center justify-center rounded-sm text-soft-foreground hover:bg-background hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(wn,{className:`size-3.5`})}):null,o?(0,Q.jsx)(`button`,{type:`button`,"aria-label":c,onClick:()=>void x(),disabled:h,className:`inline-flex size-11 items-center justify-center rounded-sm text-soft-foreground hover:bg-background hover:text-danger focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(Ue,{className:`size-3.5`})}):null]}):null,_?(0,Q.jsx)(`p`,{role:`alert`,className:`mb-1 text-xs text-danger`,children:_}):null,l??(0,Q.jsx)(Pt,{breaks:!0,children:e}),n.length>0?(0,Q.jsx)(`span`,{"data-slot":`user-images`,className:`mt-2 flex flex-wrap items-center justify-end gap-1.5`,children:n.map(e=>ee(e.split(`/`).pop()??``)?(0,Q.jsx)(gn,{src:e,alt:`attached`,className:`max-h-40 max-w-[220px] rounded-md border border-border object-contain`},e):(0,Q.jsxs)(`a`,{href:a(e),download:!0,"data-slot":`user-file`,className:`inline-flex min-h-11 min-w-11 max-w-[220px] items-center gap-1.5 rounded-md border border-border bg-background/60 px-2 py-1 text-xs text-muted-foreground hover:text-foreground`,children:[(0,Q.jsx)(Ee,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:e.split(`/`).pop()})]},e))}):null,u>0?(0,Q.jsxs)(`span`,{className:`mt-1 block text-xs text-soft-foreground`,children:[u,` image`,u>1?`s`:``,` attached`]}):null]})}var Nr=`inline-flex h-11 min-w-11 items-center justify-center gap-1 rounded-sm px-2 text-xs font-medium text-soft-foreground hover:bg-background hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,Pr=[`[data-streamdown="code-block-actions"]`,`[data-streamdown="code-copy-button"]`,`[data-streamdown="code-block-copy-button"]`,`[data-streamdown="code-block-header"]`].join(`,`);function Fr(e,t){let n=e.cloneNode(!0);n.querySelectorAll(Pr).forEach(e=>e.remove());let r=Fn(t);return[...n.querySelectorAll(`button[data-streamdown="link"]`)].forEach(e=>{let t=e.textContent??``,i=r.findIndex(e=>e.label===t);if(i<0)return;let a=r.splice(i,1)[0];if(!a||!Pn(a.href))return;let o=n.ownerDocument.createElement(`a`);o.setAttribute(`href`,a.href),o.setAttribute(`data-streamdown`,`link`),o.textContent=e.textContent,e.replaceWith(o)}),n.innerHTML}async function Ir(e,t,n){if(e===`markdown`){if(!navigator.clipboard?.writeText)throw Error(`Clipboard unavailable`);await navigator.clipboard.writeText(t);return}if(!navigator.clipboard?.write||typeof ClipboardItem>`u`||!n)throw Error(`Clipboard unavailable`);let r=Fr(n,t);await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([r],{type:`text/html`}),"text/plain":new Blob([t],{type:`text/plain`})})])}function Lr({text:e,ts:t,messageKey:n}){let r=(0,Z.useRef)(null),[i,a]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(null),c=(0,Z.useRef)(null);(0,Z.useEffect)(()=>()=>{c.current!==null&&clearTimeout(c.current)},[]);let l=async t=>{c.current!==null&&clearTimeout(c.current),a(null),s(null);try{await Ir(t,e,r.current),a(t),c.current=setTimeout(()=>a(null),2e3)}catch{s(`Couldn't copy to the clipboard`)}};return(0,Q.jsxs)(jr,{role:`agent`,ts:t,"data-slot":`assistant-message`,headerActions:(0,Q.jsxs)(`span`,{"data-slot":`bubble-actions`,className:`flex items-center gap-0.5`,children:[(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Copy reply`,onClick:()=>void l(`html`),className:Nr,children:[(0,Q.jsx)(Ge,{className:`size-3.5`,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{"aria-live":`polite`,children:i===`html`?`Copied`:`Copy`})]}),(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Copy reply as markdown`,onClick:()=>void l(`markdown`),className:Nr,children:[(0,Q.jsx)(cn,{className:`size-3.5`,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{"aria-live":`polite`,children:i===`markdown`?`Copied`:`Copy markdown`})]})]}),children:[o?(0,Q.jsx)(`p`,{role:`alert`,className:`mb-1 text-xs text-danger`,children:o}):null,(0,Q.jsx)(`div`,{ref:r,children:(0,Q.jsx)(Pt,{breaks:!0,children:e})}),(0,Q.jsx)(Bn,{text:e,messageKey:n})]})}function Rr({note:e}){return e.icon===`handoff`?(0,Q.jsxs)(`div`,{"data-slot":`note-line`,"data-tone":e.tone,"data-icon":`handoff`,className:`flex items-start gap-2 px-0.5 text-xs text-muted-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`mt-[-1px] flex size-5 shrink-0 items-center justify-center rounded-full border border-border text-success`,children:(0,Q.jsx)(hn,{className:`size-3`})}),(0,Q.jsx)(`span`,{className:`min-w-0 break-words`,children:e.text})]}):(0,Q.jsxs)(`div`,{"data-slot":`note-line`,"data-tone":e.tone,className:l(`px-0.5 text-xs`,e.tone===`danger`?`text-danger [.light_&]:text-red-700`:`text-soft-foreground`),children:[e.tone===`danger`?`✗ `:`· `,e.text]})}var zr={claude:`Claude Code`,codex:`Codex`,opencode:`OpenCode`,pi:`pi`,cursor:`Cursor`,omp:`OMP`};function Br({incident:e}){let t=zr[e.provider];return(0,Q.jsxs)(`div`,{role:`alert`,"data-slot":`provider-auth-required`,className:`rounded-md border border-danger/30 bg-danger/5 px-3.5 py-3`,children:[(0,Q.jsxs)(`p`,{className:`text-[13px] font-semibold text-foreground`,children:[`This run needed `,t,` authorization`]}),(0,Q.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Review `,t,` settings before retrying.`]}),(0,Q.jsx)(q,{to:`/settings/agents#providers`,className:`mt-2 inline-flex text-xs font-medium text-foreground underline-offset-2 hover:underline`,children:`Open provider settings`})]})}function Vr({text:e}){let t=(0,Z.useId)();if(e.trim()===``)return null;let n=e.split(`
2
2
  `,1)[0]??``,r=n.length<e.length;return(0,Q.jsxs)(X,{"data-slot":`reasoning`,className:`group/reasoning min-w-0`,children:[(0,Q.jsxs)(`div`,{id:t,className:`relative flex w-full items-center gap-1.5 rounded-md p-0.5 text-left text-[13px] text-soft-foreground hover:text-muted-foreground`,children:[(0,Q.jsx)(G,{"aria-hidden":!0,className:`size-3.5 shrink-0 transition-transform group-data-[state=open]/reasoning:rotate-90`}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:`Thinking — `}),(0,Q.jsx)(`div`,{className:`min-w-0 truncate text-muted-foreground`,children:(0,Q.jsx)(Pt,{inline:!0,children:n})}),r?(0,Q.jsx)(`span`,{"aria-hidden":!0,children:`…`}):null,(0,Q.jsx)(J,{"aria-labelledby":t,className:`absolute inset-0 rounded-md focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`})]}),(0,Q.jsx)(Y,{children:(0,Q.jsx)(`div`,{className:`px-6 py-1.5 text-[13px] leading-[1.6] text-soft-foreground`,children:(0,Q.jsx)(Pt,{children:e})})})]})}function Hr(){return(0,Q.jsxs)(`div`,{"data-slot":`working-indicator`,className:`flex items-center gap-2 py-1 text-[13px] text-soft-foreground`,children:[(0,Q.jsx)(qe,{role:`status`,"aria-label":`Working`,className:`size-3.5 shrink-0 animate-spin`}),(0,Q.jsx)(`span`,{className:`shimmer font-medium`,children:`Working…`})]})}var Ur={read:cn,edit:wn,delete:Ue,move:Sn,search:De,execute:Wt,think:yn,fetch:Vt,task:je,plan:Oe,other:He},Wr=e=>e.split(`
3
3
  `).length;function Gr({text:e,streaming:t}){let[n,r]=(0,Z.useState)(!1),i=(0,Z.useRef)(null),a=(0,Z.useRef)(!0);(0,Z.useEffect)(()=>{let e=i.current;t&&e&&a.current&&(e.scrollTop=e.scrollHeight)},[e,t]);let o=Wr(e),s=!t&&!n&&o>12;return(0,Q.jsxs)(`div`,{"data-slot":`tool-output`,"data-clamped":s?`true`:void 0,children:[(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(`div`,{ref:i,onScroll:t?e=>{a.current=sr(e.currentTarget)}:void 0,className:l(`overflow-x-auto`,t&&`max-h-[216px] overflow-y-auto`,s&&`max-h-[216px] overflow-y-hidden`),children:(0,Q.jsx)(`pre`,{className:`px-4 py-3 font-mono text-xs leading-[1.7] whitespace-pre text-muted-foreground`,children:e})}),s?(0,Q.jsx)(`div`,{"data-slot":`tool-output-fade`,"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 bottom-0 h-14 bg-gradient-to-b from-transparent to-card-2`}):null]}),!t&&o>12?(0,Q.jsx)(`button`,{type:`button`,"data-slot":`tool-output-toggle`,onClick:()=>r(e=>!e),className:`block w-full border-t border-border/50 px-4 py-1.5 text-left text-[11px] font-medium text-soft-foreground hover:text-foreground`,children:n?`Show less`:`Show all ${o} lines`}):null]})}function Kr({diffs:e}){return(0,Q.jsx)(Q.Fragment,{children:e.map((e,t)=>(0,Q.jsxs)(`div`,{"data-slot":`diff-preview`,className:`min-w-0`,children:[(0,Q.jsx)(`div`,{className:`border-b border-border/50 px-4 py-1.5 font-mono text-[11px] text-soft-foreground`,children:e.path}),(0,Q.jsx)(`pre`,{className:`overflow-x-auto py-2 font-mono text-xs leading-[1.7] whitespace-pre`,children:e.unified===void 0?[...qr(e.oldText).map((e,t)=>(0,Q.jsxs)(`span`,{className:`block bg-diff-del px-4 text-muted-foreground`,children:[`- `,e]},`old-${t}`)),...qr(e.newText).map((e,t)=>(0,Q.jsxs)(`span`,{className:`block bg-diff-add px-4`,children:[`+ `,e]},`new-${t}`))]:e.unified.split(`
4
4
  `).map((e,t)=>(0,Q.jsx)(Jr,{text:e},t))})]},`${e.path}:${t}`))})}function qr(e){return e==null||e===``?[]:e.replace(/\n$/,``).split(`