@band-app/server 0.5.6 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +1 -1
  2. package/dist/client/assets/DockviewTerminalContainer-D5LSr-9J.js +2 -0
  3. package/dist/client/assets/{TerminalPanel-B_30SH7w.js → TerminalPanel-BbdfGSW4.js} +1 -1
  4. package/dist/client/assets/{_basePickBy-DS1DdKpI.js → _basePickBy-BziZv3q9.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-CfquXO5o.js → _baseUniq-GojtfIPH.js} +1 -1
  6. package/dist/client/assets/{arc-BzAFHN3h.js → arc-igGjjsLf.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-0gyHmaKw.js → architectureDiagram-VXUJARFQ-B5bcMjKF.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-BcU0ZZZI.js → blockDiagram-VD42YOAC-BPk_-z7Q.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-Ciwoec2M.js → c4Diagram-YG6GDRKO-rNvGlTMC.js} +1 -1
  10. package/dist/client/assets/channel-Ck8E_oOc.js +1 -0
  11. package/dist/client/assets/{chunk-4BX2VUAB-W_tkduvw.js → chunk-4BX2VUAB-DfJHc-Yj.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-DJCn0BUX.js → chunk-55IACEB6-lcxPT111.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-OLwhCa5k.js → chunk-B4BG7PRW-BNbHxfCm.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-MFZ5-oPD.js → chunk-DI55MBZ5-DMhMapdV.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-BDlrNnpZ.js → chunk-FMBD7UC4-CTPuBKXM.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-CjwPbo5G.js → chunk-QN33PNHL-DWCLrzVK.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-3lGRploy.js → chunk-QZHKN3VN-B-2muY12.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-Dez84DVY.js → chunk-TZMSLE5B-CYwHRJAm.js} +1 -1
  19. package/dist/client/assets/classDiagram-2ON5EDUG-C6Q6Gof1.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-WZHVMYZB-C6Q6Gof1.js +1 -0
  21. package/dist/client/assets/clone-eBd5Zk6t.js +1 -0
  22. package/dist/client/assets/{cose-bilkent-S5V4N54A-olv_le13.js → cose-bilkent-S5V4N54A-BhG4Bwqg.js} +1 -1
  23. package/dist/client/assets/{dagre-6UL2VRFP-DSasPOdo.js → dagre-6UL2VRFP-BNwV9AQU.js} +1 -1
  24. package/dist/client/assets/{diagram-PSM6KHXK-ebd2t3Dh.js → diagram-PSM6KHXK-BECLhoiz.js} +1 -1
  25. package/dist/client/assets/{diagram-QEK2KX5R-DETGbCmh.js → diagram-QEK2KX5R-DKeTOb2O.js} +1 -1
  26. package/dist/client/assets/{diagram-S2PKOQOG-Duif0gCe.js → diagram-S2PKOQOG-MlQ3aWgO.js} +1 -1
  27. package/dist/client/assets/{erDiagram-Q2GNP2WA-7NKTniGi.js → erDiagram-Q2GNP2WA-CdFxFJL2.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-NV44I4VS-B29HpwMu.js → flowDiagram-NV44I4VS-Cx_Py0Y6.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-JELNMOA3-Do43fY0t.js → ganttDiagram-JELNMOA3-Ibl6Ok1u.js} +1 -1
  30. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-BernJnLk.js → gitGraphDiagram-V2S2FVAM-CCOKgIVW.js} +1 -1
  31. package/dist/client/assets/{graph-Cj575nQq.js → graph-CNVRXmMC.js} +1 -1
  32. package/dist/client/assets/{highlighted-body-B3W2YXNL-WhJuPudb.js → highlighted-body-B3W2YXNL-BtGVJGbm.js} +1 -1
  33. package/dist/client/assets/{index-D4KvM7Nf.js → index-B193FOic.js} +1 -1
  34. package/dist/client/assets/index-B6ba6lp-.js +1 -0
  35. package/dist/client/assets/{index-BuCOraAN.js → index-BPIJMneu.js} +1 -1
  36. package/dist/client/assets/{index-Dgv8mF9A.js → index-BYQ5aCti.js} +1 -1
  37. package/dist/client/assets/{index-yYDoQlcT.js → index-Bc-azzme.js} +1 -1
  38. package/dist/client/assets/{index-DlCjHJGt.js → index-BgM7IKgV.js} +1 -1
  39. package/dist/client/assets/{index-BTx3LYAO.js → index-BgWr8ZLw.js} +1 -1
  40. package/dist/client/assets/{index-B8ZpCpou.js → index-Bh5VGFBs.js} +1 -1
  41. package/dist/client/assets/{index-dscSHXn-.js → index-CCO3k6ms.js} +1 -1
  42. package/dist/client/assets/{index-BMY-nliE.js → index-CJw9xTFD.js} +1 -1
  43. package/dist/client/assets/{index-DGMdHUd-.js → index-ClqNiqIT.js} +1 -1
  44. package/dist/client/assets/{index-DeMltHzV.js → index-D559Z80V.js} +1 -1
  45. package/dist/client/assets/{index-DziJ_w_s.js → index-DJJSB6kr.js} +1 -1
  46. package/dist/client/assets/{index-CXlGPE4F.js → index-HP2pymIn.js} +1 -1
  47. package/dist/client/assets/{index-DNJro5ce.js → index-TLij_dqY.js} +1 -1
  48. package/dist/client/assets/{index-CUcxKuUy.js → index-eUzKORIX.js} +1 -1
  49. package/dist/client/assets/{index-xZP1WFvU.js → index-kPQu0v_r.js} +1 -1
  50. package/dist/client/assets/{index-DOlTzcT9.js → index-pW_vp4Sz.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-HS3SLOUP-CwWuIWke.js → infoDiagram-HS3SLOUP-D08GDLLW.js} +1 -1
  52. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-CwAt4sg1.js → journeyDiagram-XKPGCS4Q-CXn3mxfD.js} +1 -1
  53. package/dist/client/assets/{kanban-definition-3W4ZIXB7-IyDhCRuM.js → kanban-definition-3W4ZIXB7-CcSZuyDt.js} +1 -1
  54. package/dist/client/assets/{layout-Cu0JMbW5.js → layout-2wgfgK0z.js} +1 -1
  55. package/dist/client/assets/{linear-DZDqd87L.js → linear-QIcNPfxd.js} +1 -1
  56. package/dist/client/assets/{main-Cv7pKZy_.js → main-BHzKkPch.js} +218 -218
  57. package/dist/client/assets/main-DJFWkBOi.css +1 -0
  58. package/dist/client/assets/{mindmap-definition-VGOIOE7T-Dth1CqLW.js → mindmap-definition-VGOIOE7T-DpStnB2O.js} +1 -1
  59. package/dist/client/assets/{pieDiagram-ADFJNKIX-CF2YDYMu.js → pieDiagram-ADFJNKIX-rzFZOwDj.js} +1 -1
  60. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-nxHcYBhT.js → quadrantDiagram-AYHSOK5B-3xBYeAWj.js} +1 -1
  61. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-DYuaF4G9.js → requirementDiagram-UZGBJVZJ-BJ7G5rvH.js} +1 -1
  62. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-DCeOMpHq.js → sankeyDiagram-TZEHDZUN-wW85Osfk.js} +1 -1
  63. package/dist/client/assets/{sequenceDiagram-WL72ISMW-D3ZzpnOf.js → sequenceDiagram-WL72ISMW-CpHr7-Ie.js} +1 -1
  64. package/dist/client/assets/{stateDiagram-FKZM4ZOC-CephZuT8.js → stateDiagram-FKZM4ZOC-EPEfW1fW.js} +1 -1
  65. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-D7pTZGXc.js +1 -0
  66. package/dist/client/assets/{timeline-definition-IT6M3QCI-CMR_brz2.js → timeline-definition-IT6M3QCI-DfZZ7ocE.js} +1 -1
  67. package/dist/client/assets/{treemap-GDKQZRPO-Dr2RtG6j.js → treemap-GDKQZRPO-BstahH9t.js} +1 -1
  68. package/dist/client/assets/{useSessionListContext-Deo93kBU.js → useSessionListContext-BrRFiQ2U.js} +1 -1
  69. package/dist/client/assets/{workspace._workspaceId-B6AmUJBH.js → workspace._workspaceId-Dtznmnt6.js} +1 -1
  70. package/dist/client/assets/{workspace._workspaceId.changes-DRRihouM.js → workspace._workspaceId.changes-Bny5FowN.js} +1 -1
  71. package/dist/client/assets/workspace._workspaceId.code-C4UWUUUj.js +1 -0
  72. package/dist/client/assets/{workspace._workspaceId.code._-C2W-zGSx.js → workspace._workspaceId.code._-BkkagAVv.js} +1 -1
  73. package/dist/client/assets/{workspace._workspaceId.code.index-D56jkXpA.js → workspace._workspaceId.code.index-yWgRm_ie.js} +1 -1
  74. package/dist/client/assets/{workspace._workspaceId.index-DVYXZuSd.js → workspace._workspaceId.index-LYKG8Zjm.js} +1 -1
  75. package/dist/client/assets/{workspace._workspaceId.terminal--TZaT08S.js → workspace._workspaceId.terminal-mv3brILY.js} +2 -2
  76. package/dist/client/assets/{xychartDiagram-PRI3JC2R-CQ1vfZE5.js → xychartDiagram-PRI3JC2R-DbiHDzrr.js} +1 -1
  77. package/dist/server/assets/{DockviewTerminalContainer-B7m50Lcc.js → DockviewTerminalContainer-Db_wkLqm.js} +3 -3
  78. package/dist/server/assets/{TerminalPanel-C2nFSkcn.js → TerminalPanel-ClczaJzh.js} +2 -2
  79. package/dist/server/assets/{_basePickBy-J3VjyO9D.js → _basePickBy-DJvmB1bR.js} +2 -2
  80. package/dist/server/assets/{_baseUniq-DlbIVh20.js → _baseUniq-CUkuvdrd.js} +1 -1
  81. package/dist/server/assets/{_tanstack-start-manifest_v-C9pSWi1i.js → _tanstack-start-manifest_v-BrA63W9v.js} +1 -1
  82. package/dist/server/assets/{arc-Ds6-Gtmo.js → arc-D7tpRkEi.js} +1 -1
  83. package/dist/server/assets/{architecture-7HQA4BMR-DT3MUSS5.js → architecture-7HQA4BMR-B4QVCJf2.js} +6 -6
  84. package/dist/server/assets/{architectureDiagram-VXUJARFQ-ClVOs7P1.js → architectureDiagram-VXUJARFQ-D9kGXK5k.js} +6 -6
  85. package/dist/server/assets/{blockDiagram-VD42YOAC-CnVWNic_.js → blockDiagram-VD42YOAC-D4qioj7T.js} +6 -6
  86. package/dist/server/assets/{c4Diagram-YG6GDRKO-D9aranD0.js → c4Diagram-YG6GDRKO-BPZ4vpZS.js} +2 -2
  87. package/dist/server/assets/{channel-DQjskrHf.js → channel-g17XXuP8.js} +1 -1
  88. package/dist/server/assets/{chunk-4BX2VUAB-BctuYILS.js → chunk-4BX2VUAB-KOOKfARG.js} +1 -1
  89. package/dist/server/assets/{chunk-55IACEB6-CxcgMpfR.js → chunk-55IACEB6-Nx5TLULR.js} +1 -1
  90. package/dist/server/assets/{chunk-B4BG7PRW-CfsNsYIg.js → chunk-B4BG7PRW-DLoBFDoW.js} +4 -4
  91. package/dist/server/assets/{chunk-DI55MBZ5-B6n-fRVB.js → chunk-DI55MBZ5-Di0RSJbS.js} +3 -3
  92. package/dist/server/assets/{chunk-FMBD7UC4-CvBepTeZ.js → chunk-FMBD7UC4-B772z4UT.js} +1 -1
  93. package/dist/server/assets/{chunk-QN33PNHL-DS5M3nQE.js → chunk-QN33PNHL-DrPmTiI4.js} +1 -1
  94. package/dist/server/assets/{chunk-QZHKN3VN-DCLb0fZ1.js → chunk-QZHKN3VN-Cg5-DxrE.js} +1 -1
  95. package/dist/server/assets/{chunk-TZMSLE5B-B-Uhio6_.js → chunk-TZMSLE5B-C-BexoZY.js} +1 -1
  96. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-B7uMu4wG.js → classDiagram-2ON5EDUG-DCAJOcrY.js} +5 -5
  97. package/dist/server/assets/{classDiagram-2ON5EDUG-B7uMu4wG.js → classDiagram-v2-WZHVMYZB-DCAJOcrY.js} +5 -5
  98. package/dist/server/assets/{clone-B7a1FujU.js → clone-MoYPVXz9.js} +1 -1
  99. package/dist/server/assets/{cose-bilkent-S5V4N54A-_7cffNle.js → cose-bilkent-S5V4N54A-CLRnyAoe.js} +1 -1
  100. package/dist/server/assets/{dagre-6UL2VRFP-Cefu204F.js → dagre-6UL2VRFP-h35DYUhj.js} +6 -6
  101. package/dist/server/assets/{diagram-PSM6KHXK-BeMp8Xfu.js → diagram-PSM6KHXK-Dl-1wWBO.js} +7 -7
  102. package/dist/server/assets/{diagram-QEK2KX5R-UNhxZG5g.js → diagram-QEK2KX5R-CT_9GKHb.js} +6 -6
  103. package/dist/server/assets/{diagram-S2PKOQOG-CHWLN67z.js → diagram-S2PKOQOG-C-Wz6wgo.js} +6 -6
  104. package/dist/server/assets/{erDiagram-Q2GNP2WA-9TUXBEEN.js → erDiagram-Q2GNP2WA-CK577Mto.js} +4 -4
  105. package/dist/server/assets/{flowDiagram-NV44I4VS-DkHr76XI.js → flowDiagram-NV44I4VS-FGtxEFhp.js} +5 -5
  106. package/dist/server/assets/{ganttDiagram-JELNMOA3-D62VSFN-.js → ganttDiagram-JELNMOA3-DAUHIdRM.js} +2 -2
  107. package/dist/server/assets/{gitGraph-G5XIXVHT-wAj_iVxo.js → gitGraph-G5XIXVHT-D-ECs7Lv.js} +6 -6
  108. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-Cq6NrkS2.js → gitGraphDiagram-V2S2FVAM-BoBut3cj.js} +7 -7
  109. package/dist/server/assets/{graph-BQR4IW-M.js → graph-Dyxu_4DG.js} +2 -2
  110. package/dist/server/assets/{highlighted-body-B3W2YXNL-f4qauOuN.js → highlighted-body-B3W2YXNL-CQiQABMj.js} +1 -1
  111. package/dist/server/assets/{index-DgI6m9w2.js → index-B81vrGna.js} +2 -2
  112. package/dist/server/assets/{index-BgRkMr0S.js → index-BEMoQBv1.js} +3 -3
  113. package/dist/server/assets/{index-B07RUisL.js → index-BEXzKtXX.js} +2 -2
  114. package/dist/server/assets/{index-Y-3cIxVF.js → index-BOB72PF1.js} +2 -2
  115. package/dist/server/assets/{index-oSZ-5UB6.js → index-BVBNSmFm.js} +2 -2
  116. package/dist/server/assets/{index-DXlyuzHk.js → index-Bdg-nkIi.js} +2 -2
  117. package/dist/server/assets/{index-CiQmjF-z.js → index-BewnJmdp.js} +2 -2
  118. package/dist/server/assets/{index-DGpgWNbR.js → index-C6elbWmN.js} +1 -1
  119. package/dist/server/assets/{index-ClnAaUnc.js → index-CXKXKZfF.js} +2 -2
  120. package/dist/server/assets/{index-DbtmJMHb.js → index-CYDdV_jY.js} +5 -5
  121. package/dist/server/assets/{index-BnaMl2Ta.js → index-C_g8VSbE.js} +2 -2
  122. package/dist/server/assets/{index-CFtz0N_G.js → index-CcXBjIgw.js} +3 -3
  123. package/dist/server/assets/{index-DZkn94Qw.js → index-DYKc3CTl.js} +2 -2
  124. package/dist/server/assets/{index-CZPx4FSZ.js → index-THiRUHDP.js} +4 -4
  125. package/dist/server/assets/{index-CGs_KUt6.js → index-j7NzRTu6.js} +2 -2
  126. package/dist/server/assets/{index-C-_PyKI8.js → index-xhWv6ALB.js} +5 -5
  127. package/dist/server/assets/{index-C70O-HGl.js → index-yeAPCrVk.js} +2 -2
  128. package/dist/server/assets/{index-OT8s82kA.js → index-z5OKgRXY.js} +2 -2
  129. package/dist/server/assets/{info-VBDWY6EO-DCfkIc0K.js → info-VBDWY6EO-xfLiLDin.js} +6 -6
  130. package/dist/server/assets/{infoDiagram-HS3SLOUP-z48Ilxyy.js → infoDiagram-HS3SLOUP-BUHq7o0p.js} +5 -5
  131. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-2_BMX1ei.js → journeyDiagram-XKPGCS4Q-ueRNPiAY.js} +4 -4
  132. package/dist/server/assets/{kanban-definition-3W4ZIXB7-YMu0hChh.js → kanban-definition-3W4ZIXB7-BaoHjyB8.js} +2 -2
  133. package/dist/server/assets/{layout-Cp5xjTuv.js → layout-DTRCkx2y.js} +4 -4
  134. package/dist/server/assets/{linear-CC3vfL_Z.js → linear-CEd9jvaW.js} +1 -1
  135. package/dist/server/assets/{mermaid-3ZIDBTTL-nj6kJNsf.js → mermaid-3ZIDBTTL-Bocx3zr_.js} +1 -1
  136. package/dist/server/assets/{mermaid-parser.core-CS8wPCwT.js → mermaid-parser.core-CnuB2ez_.js} +11 -11
  137. package/dist/server/assets/{mindmap-definition-VGOIOE7T-BbNEUTwc.js → mindmap-definition-VGOIOE7T-ARN2t0ze.js} +3 -3
  138. package/dist/server/assets/{packet-DYOGHKS2-C4ObDfPs.js → packet-DYOGHKS2-Cfvmxib_.js} +6 -6
  139. package/dist/server/assets/{pie-VRWISCQL-24cVROwS.js → pie-VRWISCQL-DLhUIQek.js} +6 -6
  140. package/dist/server/assets/{pieDiagram-ADFJNKIX-BDcmTNeb.js → pieDiagram-ADFJNKIX-DbZhADgA.js} +7 -7
  141. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-DVfUAm25.js → quadrantDiagram-AYHSOK5B-DKkuOf1X.js} +2 -2
  142. package/dist/server/assets/{radar-ZZBFDIW7-Xb4_ybap.js → radar-ZZBFDIW7-DDKCbnI9.js} +6 -6
  143. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-CQfWrrP_.js → requirementDiagram-UZGBJVZJ-l0bNxwXy.js} +3 -3
  144. package/dist/server/assets/{router-BnXOl-F9.js → router-BsFHVXz9.js} +644 -348
  145. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-BW9xc6Gi.js → sankeyDiagram-TZEHDZUN-Czmu-ri0.js} +1 -1
  146. package/dist/server/assets/{sequenceDiagram-WL72ISMW-_VMzymo9.js → sequenceDiagram-WL72ISMW-TIqdB3wK.js} +3 -3
  147. package/dist/server/assets/{stateDiagram-FKZM4ZOC-P9tJlZ70.js → stateDiagram-FKZM4ZOC-DJf6ARFZ.js} +8 -8
  148. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-Cb6P-c6h.js → stateDiagram-v2-4FDKWEC3-BCWbXNlV.js} +4 -4
  149. package/dist/server/assets/{timeline-definition-IT6M3QCI-tuTHzmXv.js → timeline-definition-IT6M3QCI-Dsbsa9tI.js} +2 -2
  150. package/dist/server/assets/{treemap-GDKQZRPO-COB3TLcF.js → treemap-GDKQZRPO-DQd5eI_l.js} +6 -6
  151. package/dist/server/assets/{workspace._workspaceId-Ca5XltsV.js → workspace._workspaceId-BzntZkG8.js} +1 -1
  152. package/dist/server/assets/{workspace._workspaceId.changes-z2xCX4Ct.js → workspace._workspaceId.changes-DlHr6JjN.js} +1 -1
  153. package/dist/server/assets/{workspace._workspaceId.code._-DQTK_1av.js → workspace._workspaceId.code._-C0plkbYn.js} +1 -1
  154. package/dist/server/assets/{workspace._workspaceId.code.index-DTziHng0.js → workspace._workspaceId.code.index-BEOcVHwT.js} +1 -1
  155. package/dist/server/assets/{workspace._workspaceId.index-C2U_2sVz.js → workspace._workspaceId.index-BZTlk3td.js} +1 -1
  156. package/dist/server/assets/{workspace._workspaceId.terminal-i2FfY7JG.js → workspace._workspaceId.terminal-DrOsp1dy.js} +2 -2
  157. package/dist/server/assets/{xychartDiagram-PRI3JC2R-B8xp3EP5.js → xychartDiagram-PRI3JC2R-Di_FnHiX.js} +2 -2
  158. package/dist/server/server.js +2 -2
  159. package/dist/start-server.mjs +526 -146
  160. package/package.json +5 -5
  161. package/dist/client/assets/DockviewTerminalContainer-BObwxoXE.js +0 -2
  162. package/dist/client/assets/channel-BGuyGJa3.js +0 -1
  163. package/dist/client/assets/classDiagram-2ON5EDUG-Bcoh3oTO.js +0 -1
  164. package/dist/client/assets/classDiagram-v2-WZHVMYZB-Bcoh3oTO.js +0 -1
  165. package/dist/client/assets/clone-DTSWxIr_.js +0 -1
  166. package/dist/client/assets/index-D9yhhi7d.js +0 -1
  167. package/dist/client/assets/main-rWzqMN1o.css +0 -1
  168. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-B2E3_eDe.js +0 -1
  169. package/dist/client/assets/workspace._workspaceId.code-ClodXGQ6.js +0 -1
@@ -5648,7 +5648,7 @@ var require_thread_stream = __commonJS({
5648
5648
  var { version: version2 } = require_package();
5649
5649
  var { EventEmitter } = __require("events");
5650
5650
  var { Worker } = __require("worker_threads");
5651
- var { join: join23 } = __require("path");
5651
+ var { join: join24 } = __require("path");
5652
5652
  var { pathToFileURL } = __require("url");
5653
5653
  var { wait } = require_wait();
5654
5654
  var {
@@ -5684,7 +5684,7 @@ var require_thread_stream = __commonJS({
5684
5684
  function createWorker(stream, opts) {
5685
5685
  const { filename, workerData } = opts;
5686
5686
  const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
5687
- const toExecute = bundlerOverrides["thread-stream-worker"] || join23(__dirname, "lib", "worker.js");
5687
+ const toExecute = bundlerOverrides["thread-stream-worker"] || join24(__dirname, "lib", "worker.js");
5688
5688
  const worker = new Worker(toExecute, {
5689
5689
  ...opts.workerOpts,
5690
5690
  trackUnmanagedFds: false,
@@ -6070,7 +6070,7 @@ var require_transport = __commonJS({
6070
6070
  "use strict";
6071
6071
  var { createRequire: createRequire2 } = __require("module");
6072
6072
  var getCallers = require_caller();
6073
- var { join: join23, isAbsolute, sep: sep2 } = __require("node:path");
6073
+ var { join: join24, isAbsolute, sep: sep2 } = __require("node:path");
6074
6074
  var sleep2 = require_atomic_sleep();
6075
6075
  var onExit = require_on_exit_leak_free();
6076
6076
  var ThreadStream = require_thread_stream();
@@ -6133,7 +6133,7 @@ var require_transport = __commonJS({
6133
6133
  throw new Error("only one of target or targets can be specified");
6134
6134
  }
6135
6135
  if (targets) {
6136
- target = bundlerOverrides["pino-worker"] || join23(__dirname, "worker.js");
6136
+ target = bundlerOverrides["pino-worker"] || join24(__dirname, "worker.js");
6137
6137
  options2.targets = targets.filter((dest) => dest.target).map((dest) => {
6138
6138
  return {
6139
6139
  ...dest,
@@ -6151,7 +6151,7 @@ var require_transport = __commonJS({
6151
6151
  });
6152
6152
  });
6153
6153
  } else if (pipeline) {
6154
- target = bundlerOverrides["pino-worker"] || join23(__dirname, "worker.js");
6154
+ target = bundlerOverrides["pino-worker"] || join24(__dirname, "worker.js");
6155
6155
  options2.pipelines = [pipeline.map((dest) => {
6156
6156
  return {
6157
6157
  ...dest,
@@ -6173,7 +6173,7 @@ var require_transport = __commonJS({
6173
6173
  return origin;
6174
6174
  }
6175
6175
  if (origin === "pino/file") {
6176
- return join23(__dirname, "..", "file.js");
6176
+ return join24(__dirname, "..", "file.js");
6177
6177
  }
6178
6178
  let fixTarget2;
6179
6179
  for (const filePath of callers) {
@@ -7162,7 +7162,7 @@ var require_safe_stable_stringify = __commonJS({
7162
7162
  return circularValue;
7163
7163
  }
7164
7164
  let res = "";
7165
- let join23 = ",";
7165
+ let join24 = ",";
7166
7166
  const originalIndentation = indentation;
7167
7167
  if (Array.isArray(value)) {
7168
7168
  if (value.length === 0) {
@@ -7176,7 +7176,7 @@ var require_safe_stable_stringify = __commonJS({
7176
7176
  indentation += spacer;
7177
7177
  res += `
7178
7178
  ${indentation}`;
7179
- join23 = `,
7179
+ join24 = `,
7180
7180
  ${indentation}`;
7181
7181
  }
7182
7182
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -7184,13 +7184,13 @@ ${indentation}`;
7184
7184
  for (; i2 < maximumValuesToStringify - 1; i2++) {
7185
7185
  const tmp2 = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
7186
7186
  res += tmp2 !== void 0 ? tmp2 : "null";
7187
- res += join23;
7187
+ res += join24;
7188
7188
  }
7189
7189
  const tmp = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
7190
7190
  res += tmp !== void 0 ? tmp : "null";
7191
7191
  if (value.length - 1 > maximumBreadth) {
7192
7192
  const removedKeys = value.length - maximumBreadth - 1;
7193
- res += `${join23}"... ${getItemCount(removedKeys)} not stringified"`;
7193
+ res += `${join24}"... ${getItemCount(removedKeys)} not stringified"`;
7194
7194
  }
7195
7195
  if (spacer !== "") {
7196
7196
  res += `
@@ -7211,7 +7211,7 @@ ${originalIndentation}`;
7211
7211
  let separator = "";
7212
7212
  if (spacer !== "") {
7213
7213
  indentation += spacer;
7214
- join23 = `,
7214
+ join24 = `,
7215
7215
  ${indentation}`;
7216
7216
  whitespace = " ";
7217
7217
  }
@@ -7225,13 +7225,13 @@ ${indentation}`;
7225
7225
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
7226
7226
  if (tmp !== void 0) {
7227
7227
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
7228
- separator = join23;
7228
+ separator = join24;
7229
7229
  }
7230
7230
  }
7231
7231
  if (keyLength > maximumBreadth) {
7232
7232
  const removedKeys = keyLength - maximumBreadth;
7233
7233
  res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
7234
- separator = join23;
7234
+ separator = join24;
7235
7235
  }
7236
7236
  if (spacer !== "" && separator.length > 1) {
7237
7237
  res = `
@@ -7272,7 +7272,7 @@ ${originalIndentation}`;
7272
7272
  }
7273
7273
  const originalIndentation = indentation;
7274
7274
  let res = "";
7275
- let join23 = ",";
7275
+ let join24 = ",";
7276
7276
  if (Array.isArray(value)) {
7277
7277
  if (value.length === 0) {
7278
7278
  return "[]";
@@ -7285,7 +7285,7 @@ ${originalIndentation}`;
7285
7285
  indentation += spacer;
7286
7286
  res += `
7287
7287
  ${indentation}`;
7288
- join23 = `,
7288
+ join24 = `,
7289
7289
  ${indentation}`;
7290
7290
  }
7291
7291
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -7293,13 +7293,13 @@ ${indentation}`;
7293
7293
  for (; i2 < maximumValuesToStringify - 1; i2++) {
7294
7294
  const tmp2 = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
7295
7295
  res += tmp2 !== void 0 ? tmp2 : "null";
7296
- res += join23;
7296
+ res += join24;
7297
7297
  }
7298
7298
  const tmp = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
7299
7299
  res += tmp !== void 0 ? tmp : "null";
7300
7300
  if (value.length - 1 > maximumBreadth) {
7301
7301
  const removedKeys = value.length - maximumBreadth - 1;
7302
- res += `${join23}"... ${getItemCount(removedKeys)} not stringified"`;
7302
+ res += `${join24}"... ${getItemCount(removedKeys)} not stringified"`;
7303
7303
  }
7304
7304
  if (spacer !== "") {
7305
7305
  res += `
@@ -7312,7 +7312,7 @@ ${originalIndentation}`;
7312
7312
  let whitespace = "";
7313
7313
  if (spacer !== "") {
7314
7314
  indentation += spacer;
7315
- join23 = `,
7315
+ join24 = `,
7316
7316
  ${indentation}`;
7317
7317
  whitespace = " ";
7318
7318
  }
@@ -7321,7 +7321,7 @@ ${indentation}`;
7321
7321
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
7322
7322
  if (tmp !== void 0) {
7323
7323
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
7324
- separator = join23;
7324
+ separator = join24;
7325
7325
  }
7326
7326
  }
7327
7327
  if (spacer !== "" && separator.length > 1) {
@@ -7379,20 +7379,20 @@ ${originalIndentation}`;
7379
7379
  indentation += spacer;
7380
7380
  let res2 = `
7381
7381
  ${indentation}`;
7382
- const join24 = `,
7382
+ const join25 = `,
7383
7383
  ${indentation}`;
7384
7384
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
7385
7385
  let i2 = 0;
7386
7386
  for (; i2 < maximumValuesToStringify - 1; i2++) {
7387
7387
  const tmp2 = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
7388
7388
  res2 += tmp2 !== void 0 ? tmp2 : "null";
7389
- res2 += join24;
7389
+ res2 += join25;
7390
7390
  }
7391
7391
  const tmp = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
7392
7392
  res2 += tmp !== void 0 ? tmp : "null";
7393
7393
  if (value.length - 1 > maximumBreadth) {
7394
7394
  const removedKeys = value.length - maximumBreadth - 1;
7395
- res2 += `${join24}"... ${getItemCount(removedKeys)} not stringified"`;
7395
+ res2 += `${join25}"... ${getItemCount(removedKeys)} not stringified"`;
7396
7396
  }
7397
7397
  res2 += `
7398
7398
  ${originalIndentation}`;
@@ -7408,16 +7408,16 @@ ${originalIndentation}`;
7408
7408
  return '"[Object]"';
7409
7409
  }
7410
7410
  indentation += spacer;
7411
- const join23 = `,
7411
+ const join24 = `,
7412
7412
  ${indentation}`;
7413
7413
  let res = "";
7414
7414
  let separator = "";
7415
7415
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
7416
7416
  if (isTypedArrayWithEntries(value)) {
7417
- res += stringifyTypedArray(value, join23, maximumBreadth);
7417
+ res += stringifyTypedArray(value, join24, maximumBreadth);
7418
7418
  keys = keys.slice(value.length);
7419
7419
  maximumPropertiesToStringify -= value.length;
7420
- separator = join23;
7420
+ separator = join24;
7421
7421
  }
7422
7422
  if (deterministic) {
7423
7423
  keys = sort(keys, comparator);
@@ -7428,13 +7428,13 @@ ${indentation}`;
7428
7428
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
7429
7429
  if (tmp !== void 0) {
7430
7430
  res += `${separator}${strEscape(key2)}: ${tmp}`;
7431
- separator = join23;
7431
+ separator = join24;
7432
7432
  }
7433
7433
  }
7434
7434
  if (keyLength > maximumBreadth) {
7435
7435
  const removedKeys = keyLength - maximumBreadth;
7436
7436
  res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
7437
- separator = join23;
7437
+ separator = join24;
7438
7438
  }
7439
7439
  if (separator !== "") {
7440
7440
  res = `
@@ -29557,7 +29557,9 @@ var init_skills = __esm({
29557
29557
  // ../../packages/coding-agent/src/adapters/claude-code.ts
29558
29558
  var claude_code_exports = {};
29559
29559
  __export(claude_code_exports, {
29560
- ClaudeCodeAdapter: () => ClaudeCodeAdapter
29560
+ CLAUDE_CODE_DEFAULT_BINARY: () => CLAUDE_CODE_DEFAULT_BINARY,
29561
+ ClaudeCodeAdapter: () => ClaudeCodeAdapter,
29562
+ getClaudeCodeInstallSkillsDir: () => getClaudeCodeInstallSkillsDir
29561
29563
  });
29562
29564
  import { readdirSync as readdirSync4, readFileSync as readFileSync3, statSync as statSync5 } from "node:fs";
29563
29565
  import { open, stat } from "node:fs/promises";
@@ -29838,6 +29840,9 @@ function* mapClaudeCodeEvent(message, state2) {
29838
29840
  }
29839
29841
  }
29840
29842
  }
29843
+ function getClaudeCodeInstallSkillsDir(home = homedir()) {
29844
+ return join4(home, ".claude", "skills");
29845
+ }
29841
29846
  function discoverClaudeSkills(workspaceDir) {
29842
29847
  const globalSkillsDir = join4(homedir(), ".claude", "skills");
29843
29848
  const projectSkillsDir = join4(workspaceDir, ".claude", "skills");
@@ -29852,7 +29857,7 @@ function discoverClaudeSkills(workspaceDir) {
29852
29857
  }
29853
29858
  return Array.from(skillMap.values()).sort((a6, b10) => a6.name.localeCompare(b10.name));
29854
29859
  }
29855
- var log2, SESSION_TAIL_BYTES, cumulativeUsageBySession, MAX_CUMULATIVE_SESSIONS, ClaudeCodeAdapter;
29860
+ var log2, SESSION_TAIL_BYTES, cumulativeUsageBySession, MAX_CUMULATIVE_SESSIONS, ClaudeCodeAdapter, CLAUDE_CODE_DEFAULT_BINARY;
29856
29861
  var init_claude_code = __esm({
29857
29862
  "../../packages/coding-agent/src/adapters/claude-code.ts"() {
29858
29863
  init_sdk();
@@ -30200,6 +30205,7 @@ var init_claude_code = __esm({
30200
30205
  ];
30201
30206
  }
30202
30207
  };
30208
+ CLAUDE_CODE_DEFAULT_BINARY = "claude";
30203
30209
  }
30204
30210
  });
30205
30211
 
@@ -30847,10 +30853,16 @@ var init_cursor_cli = __esm({
30847
30853
  // ../../packages/coding-agent/src/adapters/openai-codex.ts
30848
30854
  var openai_codex_exports = {};
30849
30855
  __export(openai_codex_exports, {
30850
- OpenAICodexAdapter: () => OpenAICodexAdapter
30856
+ OPENAI_CODEX_DEFAULT_BINARY: () => OPENAI_CODEX_DEFAULT_BINARY,
30857
+ OpenAICodexAdapter: () => OpenAICodexAdapter,
30858
+ getOpenAICodexInstallSkillsDir: () => getOpenAICodexInstallSkillsDir
30851
30859
  });
30852
30860
  import { homedir as homedir2 } from "node:os";
30853
30861
  import { join as join5 } from "node:path";
30862
+ function getOpenAICodexInstallSkillsDir(home = homedir2()) {
30863
+ const codexHome = process.env.CODEX_HOME ?? join5(home, ".codex");
30864
+ return join5(codexHome, "skills");
30865
+ }
30854
30866
  function discoverCodexSkills(workspaceDir) {
30855
30867
  const globalSkillsDir = join5(CODEX_HOME, "skills");
30856
30868
  const systemSkillsDir = join5(CODEX_HOME, "skills", ".system");
@@ -30883,7 +30895,7 @@ function parseInput(args) {
30883
30895
  }
30884
30896
  return {};
30885
30897
  }
30886
- var log4, OpenAICodexAdapter, CODEX_HOME;
30898
+ var log4, OpenAICodexAdapter, CODEX_HOME, OPENAI_CODEX_DEFAULT_BINARY;
30887
30899
  var init_openai_codex = __esm({
30888
30900
  "../../packages/coding-agent/src/adapters/openai-codex.ts"() {
30889
30901
  init_src();
@@ -31033,6 +31045,7 @@ var init_openai_codex = __esm({
31033
31045
  }
31034
31046
  };
31035
31047
  CODEX_HOME = process.env.CODEX_HOME || join5(homedir2(), ".codex");
31048
+ OPENAI_CODEX_DEFAULT_BINARY = "codex";
31036
31049
  }
31037
31050
  });
31038
31051
 
@@ -31501,7 +31514,9 @@ var init_dist2 = __esm({
31501
31514
  // ../../packages/coding-agent/src/adapters/codex.ts
31502
31515
  var codex_exports = {};
31503
31516
  __export(codex_exports, {
31504
- CodexAdapter: () => CodexAdapter
31517
+ CODEX_DEFAULT_BINARY: () => CODEX_DEFAULT_BINARY,
31518
+ CodexAdapter: () => CodexAdapter,
31519
+ getCodexInstallSkillsDir: () => getCodexInstallSkillsDir
31505
31520
  });
31506
31521
  import { execFileSync } from "node:child_process";
31507
31522
  import { createReadStream as createReadStream2 } from "node:fs";
@@ -31526,6 +31541,10 @@ function resolveCodexBinary() {
31526
31541
  return void 0;
31527
31542
  }
31528
31543
  }
31544
+ function getCodexInstallSkillsDir(home = homedir3()) {
31545
+ const codexHome = process.env.CODEX_HOME ?? join6(home, ".codex");
31546
+ return join6(codexHome, "skills");
31547
+ }
31529
31548
  function discoverCodexSkills2(workspaceDir) {
31530
31549
  const globalSkillsDir = join6(CODEX_HOME2, "skills");
31531
31550
  const systemSkillsDir = join6(CODEX_HOME2, "skills", ".system");
@@ -31864,7 +31883,7 @@ async function readCodexSessionMessages(sessionId, options2) {
31864
31883
  const slice = hasMore ? collected.slice(0, requested) : collected;
31865
31884
  return { messages: slice, hasMore, firstOffset: offset4 };
31866
31885
  }
31867
- var log5, cumulativeUsageBySession2, MAX_CUMULATIVE_SESSIONS2, CodexAdapter, CODEX_CTX, CODEX_MODELS, CODEX_HOME2, SESSIONS_DIR;
31886
+ var log5, cumulativeUsageBySession2, MAX_CUMULATIVE_SESSIONS2, CodexAdapter, CODEX_CTX, CODEX_MODELS, CODEX_DEFAULT_BINARY, CODEX_HOME2, SESSIONS_DIR;
31868
31887
  var init_codex = __esm({
31869
31888
  "../../packages/coding-agent/src/adapters/codex.ts"() {
31870
31889
  init_src();
@@ -32184,6 +32203,7 @@ var init_codex = __esm({
32184
32203
  contextWindow: CODEX_CTX
32185
32204
  }
32186
32205
  ];
32206
+ CODEX_DEFAULT_BINARY = "codex";
32187
32207
  CODEX_HOME2 = process.env.CODEX_HOME || join6(homedir3(), ".codex");
32188
32208
  SESSIONS_DIR = join6(CODEX_HOME2, "sessions");
32189
32209
  }
@@ -32192,12 +32212,17 @@ var init_codex = __esm({
32192
32212
  // ../../packages/coding-agent/src/adapters/gemini-cli.ts
32193
32213
  var gemini_cli_exports = {};
32194
32214
  __export(gemini_cli_exports, {
32195
- GeminiCliAdapter: () => GeminiCliAdapter
32215
+ GEMINI_CLI_DEFAULT_BINARY: () => GEMINI_CLI_DEFAULT_BINARY,
32216
+ GeminiCliAdapter: () => GeminiCliAdapter,
32217
+ getGeminiCliInstallSkillsDir: () => getGeminiCliInstallSkillsDir
32196
32218
  });
32197
32219
  import { spawn as spawn3 } from "node:child_process";
32198
32220
  import { homedir as homedir4 } from "node:os";
32199
32221
  import { join as join7 } from "node:path";
32200
32222
  import { createInterface as createInterface2 } from "node:readline";
32223
+ function getGeminiCliInstallSkillsDir(home = homedir4()) {
32224
+ return join7(home, ".gemini", "skills");
32225
+ }
32201
32226
  function discoverGeminiSkills(workspaceDir) {
32202
32227
  const globalSkillsDir = join7(homedir4(), ".gemini", "skills");
32203
32228
  const projectSkillsDir = join7(workspaceDir, ".gemini", "skills");
@@ -32212,7 +32237,7 @@ function discoverGeminiSkills(workspaceDir) {
32212
32237
  }
32213
32238
  return Array.from(skillMap.values()).sort((a6, b10) => a6.name.localeCompare(b10.name));
32214
32239
  }
32215
- var log6, GeminiCliAdapter;
32240
+ var log6, GeminiCliAdapter, GEMINI_CLI_DEFAULT_BINARY;
32216
32241
  var init_gemini_cli = __esm({
32217
32242
  "../../packages/coding-agent/src/adapters/gemini-cli.ts"() {
32218
32243
  init_src();
@@ -32385,13 +32410,16 @@ var init_gemini_cli = __esm({
32385
32410
  ];
32386
32411
  }
32387
32412
  };
32413
+ GEMINI_CLI_DEFAULT_BINARY = "gemini";
32388
32414
  }
32389
32415
  });
32390
32416
 
32391
32417
  // ../../packages/coding-agent/src/adapters/opencode.ts
32392
32418
  var opencode_exports = {};
32393
32419
  __export(opencode_exports, {
32394
- OpenCodeAdapter: () => OpenCodeAdapter
32420
+ OPENCODE_DEFAULT_BINARY: () => OPENCODE_DEFAULT_BINARY,
32421
+ OpenCodeAdapter: () => OpenCodeAdapter,
32422
+ getOpenCodeInstallSkillsDir: () => getOpenCodeInstallSkillsDir
32395
32423
  });
32396
32424
  import { execFile, spawn as spawn4 } from "node:child_process";
32397
32425
  import { homedir as homedir5 } from "node:os";
@@ -32557,6 +32585,9 @@ async function fetchOpenCodeSessionMessages(executablePath, sessionId, options2)
32557
32585
  const slice = hasMore ? collected.slice(0, requested) : collected;
32558
32586
  return { messages: slice, hasMore, firstOffset: offset4 };
32559
32587
  }
32588
+ function getOpenCodeInstallSkillsDir(home = homedir5()) {
32589
+ return join8(home, ".config", "opencode", "skills");
32590
+ }
32560
32591
  function discoverOpenCodeSkills(workspaceDir) {
32561
32592
  const home = homedir5();
32562
32593
  const dirs = [
@@ -32577,7 +32608,7 @@ function discoverOpenCodeSkills(workspaceDir) {
32577
32608
  }
32578
32609
  return Array.from(skillMap.values()).sort((a6, b10) => a6.name.localeCompare(b10.name));
32579
32610
  }
32580
- var log7, OpenCodeAdapter, DEFAULT_MODELS;
32611
+ var log7, OpenCodeAdapter, DEFAULT_MODELS, OPENCODE_DEFAULT_BINARY;
32581
32612
  var init_opencode = __esm({
32582
32613
  "../../packages/coding-agent/src/adapters/opencode.ts"() {
32583
32614
  init_src();
@@ -32831,6 +32862,7 @@ var init_opencode = __esm({
32831
32862
  { id: "opencode/big-pickle", name: "Big Pickle" },
32832
32863
  { id: "opencode/gpt-5-nano", name: "GPT-5 Nano" }
32833
32864
  ];
32865
+ OPENCODE_DEFAULT_BINARY = "opencode";
32834
32866
  }
32835
32867
  });
32836
32868
 
@@ -89169,9 +89201,9 @@ var require_dist5 = __commonJS({
89169
89201
  });
89170
89202
 
89171
89203
  // start-server.ts
89172
- import { appendFileSync as appendFileSync2, createReadStream as createReadStream3, mkdirSync as mkdirSync7, readFileSync as readFileSync8, statSync as statSync6 } from "node:fs";
89204
+ import { appendFileSync as appendFileSync2, createReadStream as createReadStream3, mkdirSync as mkdirSync8, readFileSync as readFileSync9, statSync as statSync7 } from "node:fs";
89173
89205
  import { createServer } from "node:http";
89174
- import { basename as basename2, join as join22, resolve as resolve7 } from "node:path";
89206
+ import { basename as basename2, join as join23, resolve as resolve7 } from "node:path";
89175
89207
 
89176
89208
  // ../../node_modules/.pnpm/@trpc+server@11.12.0_typescript@5.9.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
89177
89209
  function mergeWithoutOverrides(obj1, ...objs) {
@@ -108340,7 +108372,7 @@ init_src();
108340
108372
 
108341
108373
  // src/lib/agent-pool.ts
108342
108374
  import { readFileSync as readFileSync5 } from "node:fs";
108343
- import { homedir as homedir7 } from "node:os";
108375
+ import { homedir as homedir8 } from "node:os";
108344
108376
  import { join as join12 } from "node:path";
108345
108377
 
108346
108378
  // ../../packages/coding-agent/src/config.ts
@@ -108440,13 +108472,68 @@ async function createCodingAgent(config2) {
108440
108472
  }
108441
108473
  }
108442
108474
 
108475
+ // ../../packages/coding-agent/src/install-skills.ts
108476
+ import { homedir as homedir6 } from "node:os";
108477
+ async function getInstallSkillsDir(type, home = homedir6()) {
108478
+ switch (type) {
108479
+ case "claude-code": {
108480
+ const { getClaudeCodeInstallSkillsDir: getClaudeCodeInstallSkillsDir2 } = await Promise.resolve().then(() => (init_claude_code(), claude_code_exports));
108481
+ return getClaudeCodeInstallSkillsDir2(home);
108482
+ }
108483
+ case "codex": {
108484
+ const { getCodexInstallSkillsDir: getCodexInstallSkillsDir2 } = await Promise.resolve().then(() => (init_codex(), codex_exports));
108485
+ return getCodexInstallSkillsDir2(home);
108486
+ }
108487
+ case "openai-codex": {
108488
+ const { getOpenAICodexInstallSkillsDir: getOpenAICodexInstallSkillsDir2 } = await Promise.resolve().then(() => (init_openai_codex(), openai_codex_exports));
108489
+ return getOpenAICodexInstallSkillsDir2(home);
108490
+ }
108491
+ case "gemini-cli": {
108492
+ const { getGeminiCliInstallSkillsDir: getGeminiCliInstallSkillsDir2 } = await Promise.resolve().then(() => (init_gemini_cli(), gemini_cli_exports));
108493
+ return getGeminiCliInstallSkillsDir2(home);
108494
+ }
108495
+ case "opencode": {
108496
+ const { getOpenCodeInstallSkillsDir: getOpenCodeInstallSkillsDir2 } = await Promise.resolve().then(() => (init_opencode(), opencode_exports));
108497
+ return getOpenCodeInstallSkillsDir2(home);
108498
+ }
108499
+ default:
108500
+ return null;
108501
+ }
108502
+ }
108503
+ async function getDefaultAgentBinary(type) {
108504
+ switch (type) {
108505
+ case "claude-code": {
108506
+ const { CLAUDE_CODE_DEFAULT_BINARY: CLAUDE_CODE_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_claude_code(), claude_code_exports));
108507
+ return CLAUDE_CODE_DEFAULT_BINARY2;
108508
+ }
108509
+ case "codex": {
108510
+ const { CODEX_DEFAULT_BINARY: CODEX_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_codex(), codex_exports));
108511
+ return CODEX_DEFAULT_BINARY2;
108512
+ }
108513
+ case "openai-codex": {
108514
+ const { OPENAI_CODEX_DEFAULT_BINARY: OPENAI_CODEX_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_openai_codex(), openai_codex_exports));
108515
+ return OPENAI_CODEX_DEFAULT_BINARY2;
108516
+ }
108517
+ case "gemini-cli": {
108518
+ const { GEMINI_CLI_DEFAULT_BINARY: GEMINI_CLI_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_gemini_cli(), gemini_cli_exports));
108519
+ return GEMINI_CLI_DEFAULT_BINARY2;
108520
+ }
108521
+ case "opencode": {
108522
+ const { OPENCODE_DEFAULT_BINARY: OPENCODE_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_opencode(), opencode_exports));
108523
+ return OPENCODE_DEFAULT_BINARY2;
108524
+ }
108525
+ default:
108526
+ return null;
108527
+ }
108528
+ }
108529
+
108443
108530
  // src/lib/agent-pool.ts
108444
108531
  init_src();
108445
108532
 
108446
108533
  // src/lib/state.ts
108447
108534
  import { randomBytes } from "node:crypto";
108448
108535
  import { mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync } from "node:fs";
108449
- import { homedir as homedir6 } from "node:os";
108536
+ import { homedir as homedir7 } from "node:os";
108450
108537
  import { dirname, join as join11 } from "node:path";
108451
108538
 
108452
108539
  // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.14__@ty_fa89646d7248b32d1762bf88948f6339/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
@@ -116877,7 +116964,7 @@ var buttonVariants = cva(
116877
116964
  variant: {
116878
116965
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
116879
116966
  destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
116880
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
116967
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/60 dark:hover:bg-input/80",
116881
116968
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
116882
116969
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
116883
116970
  link: "text-primary underline-offset-4 hover:underline"
@@ -122967,7 +123054,7 @@ function sql(strings, ...params) {
122967
123054
  return new SQL([new StringChunk(str)]);
122968
123055
  }
122969
123056
  _sql.raw = raw;
122970
- function join23(chunks, separator) {
123057
+ function join24(chunks, separator) {
122971
123058
  const result = [];
122972
123059
  for (const [i2, chunk] of chunks.entries()) {
122973
123060
  if (i2 > 0 && separator !== void 0) result.push(separator);
@@ -122975,7 +123062,7 @@ function sql(strings, ...params) {
122975
123062
  }
122976
123063
  return new SQL(result);
122977
123064
  }
122978
- _sql.join = join23;
123065
+ _sql.join = join24;
122979
123066
  function identifier(value) {
122980
123067
  return new Name(value);
122981
123068
  }
@@ -127423,7 +127510,7 @@ var SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder {
127423
127510
  const baseTableName = this.tableName;
127424
127511
  const tableName = getTableLikeName(table);
127425
127512
  for (const item of extractUsedTable(table)) this.usedTables.add(item);
127426
- if (typeof tableName === "string" && this.config.joins?.some((join23) => join23.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
127513
+ if (typeof tableName === "string" && this.config.joins?.some((join24) => join24.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
127427
127514
  if (!this.isPartialSelect) {
127428
127515
  if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") this.config.fields = { [baseTableName]: this.config.fields };
127429
127516
  if (typeof tableName === "string" && !is(table, SQL)) {
@@ -128631,7 +128718,7 @@ var SQLiteDialect = class {
128631
128718
  if (!joins2) return;
128632
128719
  const withEntries = Object.entries(joins2).filter(([_4, v4]) => v4);
128633
128720
  if (!withEntries.length) return;
128634
- return sql.join(withEntries.map(([k4, join23]) => {
128721
+ return sql.join(withEntries.map(([k4, join24]) => {
128635
128722
  const relation = tableConfig.relations[k4];
128636
128723
  const isSingle2 = is(relation, One);
128637
128724
  const targetTable = aliasedTable(relation.targetTable, `d${currentDepth + 1}`);
@@ -128642,7 +128729,7 @@ var SQLiteDialect = class {
128642
128729
  table: targetTable,
128643
128730
  mode: isSingle2 ? "first" : "many",
128644
128731
  schema,
128645
- queryConfig: join23,
128732
+ queryConfig: join24,
128646
128733
  tableConfig: schema[relation.targetTableName],
128647
128734
  relationWhere: filter2,
128648
128735
  isNested: true,
@@ -128656,7 +128743,7 @@ var SQLiteDialect = class {
128656
128743
  key: k4,
128657
128744
  selection: innerQuery.selection,
128658
128745
  isArray: !isSingle2,
128659
- isOptional: (relation.optional ?? false) || join23 !== true && !!join23.where
128746
+ isOptional: (relation.optional ?? false) || join24 !== true && !!join24.where
128660
128747
  });
128661
128748
  const jsonColumns = sql.join(innerQuery.selection.map((s6) => {
128662
128749
  return sql`${sql.raw(this.escapeString(s6.key))}, ${s6.selection ? sql`${jsonb2}(${sql.identifier(s6.key)})` : sql.identifier(s6.key)}`;
@@ -129125,7 +129212,7 @@ var SQLiteUpdateBase = class extends QueryPromise {
129125
129212
  createJoin(joinType) {
129126
129213
  return ((table, on) => {
129127
129214
  const tableName = getTableLikeName(table);
129128
- if (typeof tableName === "string" && this.config.joins.some((join23) => join23.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
129215
+ if (typeof tableName === "string" && this.config.joins.some((join24) => join24.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
129129
129216
  if (typeof on === "function") {
129130
129217
  const from = this.config.from ? is(table, SQLiteTable) ? table[Table.Symbol.Columns] : is(table, Subquery) ? table._.selectedFields : is(table, SQLiteViewBase) ? table[ViewBaseConfig].selectedFields : void 0 : void 0;
129131
129218
  on = on(new Proxy(this.config.table[Table.Symbol.Columns], new SelectionProxyHandler({
@@ -130017,7 +130104,7 @@ function closeDb() {
130017
130104
  // src/lib/state.ts
130018
130105
  function bandHome() {
130019
130106
  if (process.env.BAND_HOME) return process.env.BAND_HOME;
130020
- return join11(homedir6(), ".band");
130107
+ return join11(homedir7(), ".band");
130021
130108
  }
130022
130109
  function loadState() {
130023
130110
  const db2 = getDb();
@@ -130223,7 +130310,7 @@ var pool = g2[POOL_KEY];
130223
130310
  var pending = g2[PENDING_KEY];
130224
130311
  function loadClaudeSettingsModel() {
130225
130312
  try {
130226
- const data = readFileSync5(join12(homedir7(), ".claude", "settings.json"), "utf-8");
130313
+ const data = readFileSync5(join12(homedir8(), ".claude", "settings.json"), "utf-8");
130227
130314
  const parsed = JSON.parse(data);
130228
130315
  return typeof parsed.model === "string" ? parsed.model : void 0;
130229
130316
  } catch {
@@ -131431,6 +131518,7 @@ function getOrCreateDefaultChat(workspaceId) {
131431
131518
  }
131432
131519
 
131433
131520
  // src/lib/queued-message-store.ts
131521
+ import { randomUUID } from "node:crypto";
131434
131522
  var QUEUED_KEY = Symbol.for("band.queued-messages");
131435
131523
  var LISTENERS_KEY = Symbol.for("band.queued-messages.listeners");
131436
131524
  var g10 = globalThis;
@@ -131439,7 +131527,7 @@ if (!g10[LISTENERS_KEY]) g10[LISTENERS_KEY] = /* @__PURE__ */ new Set();
131439
131527
  var store = g10[QUEUED_KEY];
131440
131528
  var queueListeners = g10[LISTENERS_KEY];
131441
131529
  function notify(chatId) {
131442
- const messages = [...store.get(chatId) ?? []];
131530
+ const messages = (store.get(chatId) ?? []).map(cloneMessage);
131443
131531
  for (const listener of queueListeners) {
131444
131532
  try {
131445
131533
  listener(chatId, messages);
@@ -131447,31 +131535,49 @@ function notify(chatId) {
131447
131535
  }
131448
131536
  }
131449
131537
  }
131538
+ function cloneMessage(msg) {
131539
+ return {
131540
+ id: msg.id,
131541
+ text: msg.text,
131542
+ files: msg.files ? msg.files.map((f10) => ({ ...f10 })) : void 0
131543
+ };
131544
+ }
131450
131545
  function subscribeQueue(listener) {
131451
131546
  queueListeners.add(listener);
131452
131547
  return () => {
131453
131548
  queueListeners.delete(listener);
131454
131549
  };
131455
131550
  }
131456
- function pushQueuedMessage(chatId, text4) {
131551
+ function pushQueuedMessage(chatId, input) {
131552
+ const message = {
131553
+ id: randomUUID(),
131554
+ text: input.text,
131555
+ files: input.files && input.files.length > 0 ? input.files.map((f10) => ({ ...f10 })) : void 0
131556
+ };
131457
131557
  const msgs = store.get(chatId);
131458
131558
  if (msgs) {
131459
- msgs.push(text4);
131559
+ msgs.push(message);
131460
131560
  } else {
131461
- store.set(chatId, [text4]);
131561
+ store.set(chatId, [message]);
131462
131562
  }
131463
131563
  notify(chatId);
131564
+ return cloneMessage(message);
131464
131565
  }
131465
- function setQueuedMessages(chatId, texts) {
131466
- if (texts.length === 0) {
131566
+ function setQueuedMessages(chatId, messages) {
131567
+ if (messages.length === 0) {
131467
131568
  store.delete(chatId);
131468
131569
  } else {
131469
- store.set(chatId, [...texts]);
131570
+ const stored = messages.map((m11) => ({
131571
+ id: m11.id ?? randomUUID(),
131572
+ text: m11.text,
131573
+ files: m11.files && m11.files.length > 0 ? m11.files.map((f10) => ({ ...f10 })) : void 0
131574
+ }));
131575
+ store.set(chatId, stored);
131470
131576
  }
131471
131577
  notify(chatId);
131472
131578
  }
131473
131579
  function getQueuedMessages(chatId) {
131474
- return store.get(chatId) ?? [];
131580
+ return (store.get(chatId) ?? []).map(cloneMessage);
131475
131581
  }
131476
131582
  function shiftQueuedMessage(chatId) {
131477
131583
  const msgs = store.get(chatId);
@@ -131479,12 +131585,21 @@ function shiftQueuedMessage(chatId) {
131479
131585
  const first = msgs.shift();
131480
131586
  if (msgs.length === 0) store.delete(chatId);
131481
131587
  notify(chatId);
131482
- return first;
131588
+ return cloneMessage(first);
131589
+ }
131590
+ function updateQueuedMessage(chatId, id, text4) {
131591
+ const msgs = store.get(chatId);
131592
+ if (!msgs) return false;
131593
+ const idx = msgs.findIndex((m11) => m11.id === id);
131594
+ if (idx === -1) return false;
131595
+ msgs[idx] = { ...msgs[idx], text: text4 };
131596
+ notify(chatId);
131597
+ return true;
131483
131598
  }
131484
- function removeQueuedMessage(chatId, text4) {
131599
+ function removeQueuedMessage(chatId, id) {
131485
131600
  const msgs = store.get(chatId);
131486
131601
  if (!msgs) return false;
131487
- const idx = msgs.indexOf(text4);
131602
+ const idx = msgs.findIndex((m11) => m11.id === id);
131488
131603
  if (idx === -1) return false;
131489
131604
  msgs.splice(idx, 1);
131490
131605
  if (msgs.length === 0) store.delete(chatId);
@@ -131499,7 +131614,7 @@ function clearQueuedMessages(chatId) {
131499
131614
  // src/lib/task-runner.ts
131500
131615
  init_src();
131501
131616
  import { mkdirSync as mkdirSync4, readdirSync as readdirSync6 } from "node:fs";
131502
- import { join as join15 } from "node:path";
131617
+ import { join as join16 } from "node:path";
131503
131618
 
131504
131619
  // src/lib/mime-types.ts
131505
131620
  import { extname } from "node:path";
@@ -131664,6 +131779,38 @@ function rowToRecord(row) {
131664
131779
  };
131665
131780
  }
131666
131781
 
131782
+ // src/lib/upload-utils.ts
131783
+ import { mkdir, writeFile } from "node:fs/promises";
131784
+ import { join as join15 } from "node:path";
131785
+ async function saveUploadedFilesDetailed(fileParts) {
131786
+ const uploadDir = join15(bandHome(), "uploads");
131787
+ await mkdir(uploadDir, { recursive: true });
131788
+ const baseTimestamp = Date.now();
131789
+ const saved = [];
131790
+ for (let i2 = 0; i2 < fileParts.length; i2++) {
131791
+ const part = fileParts[i2];
131792
+ const dataUrlMatch = part.url.match(/^data:[^;]+;base64,(.+)$/);
131793
+ if (!dataUrlMatch) continue;
131794
+ const buffer = Buffer.from(dataUrlMatch[1], "base64");
131795
+ const filename = part.filename || `file-${baseTimestamp}`;
131796
+ const safeOriginal = filename.replace(/[^a-zA-Z0-9._-]/g, "_");
131797
+ const storedName = `${baseTimestamp}-${i2}-${safeOriginal}`;
131798
+ const filePath = join15(uploadDir, storedName);
131799
+ await writeFile(filePath, buffer);
131800
+ saved.push({
131801
+ path: filePath,
131802
+ storedName,
131803
+ mediaType: part.mediaType,
131804
+ originalName: part.filename
131805
+ });
131806
+ }
131807
+ return saved;
131808
+ }
131809
+ async function saveUploadedFiles(fileParts) {
131810
+ const saved = await saveUploadedFilesDetailed(fileParts);
131811
+ return saved.map((f10) => f10.path);
131812
+ }
131813
+
131667
131814
  // src/lib/workspace.ts
131668
131815
  function resolveWorkspace(workspaceId) {
131669
131816
  const state2 = loadState();
@@ -131778,6 +131925,7 @@ function submitTask(options2) {
131778
131925
  prompt,
131779
131926
  sessionId,
131780
131927
  agentPrompt,
131928
+ displayFiles,
131781
131929
  maxTurns,
131782
131930
  mode,
131783
131931
  model,
@@ -131802,6 +131950,7 @@ function submitTask(options2) {
131802
131950
  prompt,
131803
131951
  taskRecordId,
131804
131952
  agentPrompt: agentPrompt ?? prompt,
131953
+ displayFiles: displayFiles && displayFiles.length > 0 ? displayFiles : void 0,
131805
131954
  maxTurns,
131806
131955
  mode,
131807
131956
  model,
@@ -131900,7 +132049,7 @@ async function runTask(chatId, task) {
131900
132049
  updateChatStatus(chatId, "running");
131901
132050
  const working = upsertWorkspaceStatus(task.workspaceId, { status: "working" });
131902
132051
  emit({ kind: "update", status: working });
131903
- const sharedDir = join15(bandHome(), "shared", task.workspaceId);
132052
+ const sharedDir = join16(bandHome(), "shared", task.workspaceId);
131904
132053
  mkdirSync4(sharedDir, { recursive: true });
131905
132054
  const INTERACTIVE_TOOLS = /* @__PURE__ */ new Set(["AskUserQuestion", "ExitPlanMode"]);
131906
132055
  let textPartId = "";
@@ -131957,7 +132106,10 @@ async function runTask(chatId, task) {
131957
132106
  });
131958
132107
  broadcast(chatId, {
131959
132108
  type: "user-message",
131960
- text: task.prompt
132109
+ text: task.prompt,
132110
+ ...task.displayFiles && task.displayFiles.length > 0 && {
132111
+ files: task.displayFiles
132112
+ }
131961
132113
  });
131962
132114
  break;
131963
132115
  }
@@ -132177,14 +132329,35 @@ async function runTask(chatId, task) {
132177
132329
  const queued = shiftQueuedMessage(chatId);
132178
132330
  if (queued) {
132179
132331
  try {
132332
+ let agentPrompt;
132333
+ let displayFiles;
132334
+ if (queued.files && queued.files.length > 0) {
132335
+ const saved = await saveUploadedFilesDetailed(queued.files);
132336
+ if (saved.length > 0) {
132337
+ const fileList = saved.map((s6) => `- ${s6.path}`).join("\n");
132338
+ agentPrompt = `I'm sharing these files with you:
132339
+ ${fileList}
132340
+
132341
+ ${queued.text}`;
132342
+ displayFiles = saved.map((s6) => ({
132343
+ mediaType: s6.mediaType,
132344
+ url: `/api/uploads/${s6.storedName}`,
132345
+ filename: s6.originalName
132346
+ }));
132347
+ }
132348
+ }
132180
132349
  broadcast(chatId, {
132181
132350
  type: "data-prompt",
132182
- data: { text: queued }
132351
+ data: {
132352
+ text: queued.text,
132353
+ ...displayFiles && displayFiles.length > 0 && { files: displayFiles }
132354
+ }
132183
132355
  });
132184
132356
  submitTask({
132185
132357
  workspaceId: task.workspaceId,
132186
132358
  chatId,
132187
- prompt: queued,
132359
+ prompt: queued.text,
132360
+ agentPrompt,
132188
132361
  sessionId: task.sessionId
132189
132362
  });
132190
132363
  autoStarted = true;
@@ -132288,27 +132461,6 @@ function getSessionEventsAfter(sessionId, afterEventId) {
132288
132461
  return buf.events.filter((e2) => (e2.eventId ?? 0) > afterEventId).map((c2) => chunkToRecord(sessionId, c2));
132289
132462
  }
132290
132463
 
132291
- // src/lib/upload-utils.ts
132292
- import { mkdir, writeFile } from "node:fs/promises";
132293
- import { join as join16 } from "node:path";
132294
- async function saveUploadedFiles(fileParts) {
132295
- const uploadDir = join16(bandHome(), "uploads");
132296
- await mkdir(uploadDir, { recursive: true });
132297
- const savedPaths = [];
132298
- for (const part of fileParts) {
132299
- const dataUrlMatch = part.url.match(/^data:[^;]+;base64,(.+)$/);
132300
- if (!dataUrlMatch) continue;
132301
- const buffer = Buffer.from(dataUrlMatch[1], "base64");
132302
- const timestamp2 = Date.now();
132303
- const filename = part.filename || `file-${timestamp2}`;
132304
- const safeName = `${timestamp2}-${filename.replace(/[^a-zA-Z0-9._-]/g, "_")}`;
132305
- const filePath = join16(uploadDir, safeName);
132306
- await writeFile(filePath, buffer);
132307
- savedPaths.push(filePath);
132308
- }
132309
- return savedPaths;
132310
- }
132311
-
132312
132464
  // src/api/task-stream.ts
132313
132465
  var log12 = createLogger("task-stream");
132314
132466
  var INTERNAL_CHUNK_TYPES = /* @__PURE__ */ new Set(["user-message"]);
@@ -132445,14 +132597,20 @@ async function handlePost(req, res, chatId) {
132445
132597
  createChat(workspaceId, { id: chatId, name: "Chat", agent: codingAgentId });
132446
132598
  }
132447
132599
  let agentPrompt;
132600
+ let displayFiles;
132448
132601
  if (files && files.length > 0) {
132449
- const savedPaths = await saveUploadedFiles(files);
132450
- if (savedPaths.length > 0) {
132451
- const fileList = savedPaths.map((p6) => `- ${p6}`).join("\n");
132602
+ const saved = await saveUploadedFilesDetailed(files);
132603
+ if (saved.length > 0) {
132604
+ const fileList = saved.map((s6) => `- ${s6.path}`).join("\n");
132452
132605
  agentPrompt = `I'm sharing these files with you:
132453
132606
  ${fileList}
132454
132607
 
132455
132608
  ${prompt}`;
132609
+ displayFiles = saved.map((s6) => ({
132610
+ mediaType: s6.mediaType,
132611
+ url: `/api/uploads/${s6.storedName}`,
132612
+ filename: s6.originalName
132613
+ }));
132456
132614
  }
132457
132615
  }
132458
132616
  try {
@@ -132462,6 +132620,7 @@ ${prompt}`;
132462
132620
  prompt,
132463
132621
  sessionId,
132464
132622
  agentPrompt,
132623
+ displayFiles,
132465
132624
  maxTurns,
132466
132625
  mode,
132467
132626
  model,
@@ -133751,17 +133910,166 @@ function resolveCliPaths() {
133751
133910
  return { binaryPath, symlinkPath: SYMLINK_PATH };
133752
133911
  }
133753
133912
 
133754
- // src/lib/hooks.ts
133755
- import { mkdirSync as mkdirSync5, readFileSync as readFileSync7, writeFileSync as writeFileSync2 } from "node:fs";
133756
- import { homedir as homedir8 } from "node:os";
133913
+ // src/lib/cli-skills.ts
133914
+ import { execFile as execFile4 } from "node:child_process";
133915
+ import {
133916
+ accessSync as accessSync2,
133917
+ existsSync as existsSync5,
133918
+ constants as fsConstants,
133919
+ mkdirSync as mkdirSync5,
133920
+ mkdtempSync,
133921
+ readFileSync as readFileSync7,
133922
+ rmSync as rmSync2,
133923
+ statSync as statSync6,
133924
+ writeFileSync as writeFileSync2
133925
+ } from "node:fs";
133926
+ import { homedir as homedir9, tmpdir } from "node:os";
133757
133927
  import { dirname as dirname4, join as join19 } from "node:path";
133928
+ var BAND_SKILL_NAMES = ["band", "band-chat", "band-terminal", "band-browser"];
133929
+ var SKILL_FILE = "SKILL.md";
133930
+ async function isAgentInstalled(agent) {
133931
+ if (agent.command) {
133932
+ try {
133933
+ accessSync2(agent.command, fsConstants.X_OK);
133934
+ return true;
133935
+ } catch {
133936
+ return false;
133937
+ }
133938
+ }
133939
+ const binaryName = await getDefaultAgentBinary(agent.type);
133940
+ if (!binaryName) return false;
133941
+ const found = await whichBinary(binaryName);
133942
+ return found !== null;
133943
+ }
133944
+ async function resolveSkillTargets(agents, home = homedir9()) {
133945
+ const seen = /* @__PURE__ */ new Set();
133946
+ const out = [];
133947
+ for (const agent of agents) {
133948
+ if (!await isAgentInstalled(agent)) continue;
133949
+ const skillsDir = await getInstallSkillsDir(agent.type, home);
133950
+ if (!skillsDir) continue;
133951
+ if (seen.has(skillsDir)) continue;
133952
+ seen.add(skillsDir);
133953
+ out.push({ agentType: agent.type, skillsDir });
133954
+ }
133955
+ return out;
133956
+ }
133957
+ async function findBandBinary() {
133958
+ try {
133959
+ const stat5 = statSync6("/usr/local/bin/band");
133960
+ if (stat5) return "/usr/local/bin/band";
133961
+ } catch {
133962
+ }
133963
+ const onPath = await whichBinary("band");
133964
+ if (onPath) return onPath;
133965
+ return findCliBinary();
133966
+ }
133967
+ async function generateSkills(bandPath, outputDir) {
133968
+ await new Promise((resolve8, reject) => {
133969
+ execFile4(
133970
+ bandPath,
133971
+ ["generate-skills", "--output-dir", outputDir],
133972
+ { timeout: 3e4 },
133973
+ (err, _stdout, stderr) => {
133974
+ if (err) {
133975
+ const detail = stderr?.toString().trim();
133976
+ reject(new Error(detail ? `${err.message}: ${detail}` : err.message));
133977
+ return;
133978
+ }
133979
+ resolve8();
133980
+ }
133981
+ );
133982
+ });
133983
+ }
133984
+ async function installSkills(opts = {}) {
133985
+ const result = {
133986
+ written: [],
133987
+ updated: [],
133988
+ unchanged: [],
133989
+ skipped: []
133990
+ };
133991
+ const home = opts.home ?? homedir9();
133992
+ const agents = opts.agents ?? loadSettings().codingAgents ?? [];
133993
+ const targets = await resolveSkillTargets(agents, home);
133994
+ if (targets.length === 0) {
133995
+ return result;
133996
+ }
133997
+ const bandPath = await findBandBinary();
133998
+ if (!bandPath) {
133999
+ opts.log?.warn(
134000
+ "Skipping CLI skills sync \u2014 band binary not found (no symlink, not on PATH, no bundled sidecar)"
134001
+ );
134002
+ for (const target of targets) {
134003
+ for (const name24 of BAND_SKILL_NAMES) {
134004
+ result.skipped.push(join19(target.skillsDir, name24, SKILL_FILE));
134005
+ }
134006
+ }
134007
+ return result;
134008
+ }
134009
+ const stagingDir = mkdtempSync(join19(tmpdir(), "band-skills-"));
134010
+ try {
134011
+ await generateSkills(bandPath, stagingDir);
134012
+ for (const target of targets) {
134013
+ for (const name24 of BAND_SKILL_NAMES) {
134014
+ const sourcePath = join19(stagingDir, name24, SKILL_FILE);
134015
+ const destPath = join19(target.skillsDir, name24, SKILL_FILE);
134016
+ if (!existsSync5(sourcePath)) {
134017
+ opts.log?.warn("Generated skill missing from staging dir: %s (skipping)", sourcePath);
134018
+ continue;
134019
+ }
134020
+ const sourceContent = readFileSync7(sourcePath);
134021
+ let existingContent = null;
134022
+ try {
134023
+ existingContent = readFileSync7(destPath);
134024
+ } catch (err) {
134025
+ const code = err.code;
134026
+ if (code !== "ENOENT") {
134027
+ opts.log?.warn(
134028
+ "Failed to read existing skill at %s: %s \u2014 overwriting",
134029
+ destPath,
134030
+ err instanceof Error ? err.message : String(err)
134031
+ );
134032
+ }
134033
+ }
134034
+ if (existingContent?.equals(sourceContent)) {
134035
+ result.unchanged.push(destPath);
134036
+ continue;
134037
+ }
134038
+ mkdirSync5(dirname4(destPath), { recursive: true });
134039
+ writeFileSync2(destPath, sourceContent);
134040
+ if (existingContent) {
134041
+ result.updated.push(destPath);
134042
+ opts.log?.info(
134043
+ "Updated %s skill at %s (content differed \u2014 local edits, if any, were overwritten)",
134044
+ name24,
134045
+ destPath
134046
+ );
134047
+ } else {
134048
+ result.written.push(destPath);
134049
+ opts.log?.info("Installed %s skill at %s", name24, destPath);
134050
+ }
134051
+ }
134052
+ }
134053
+ } finally {
134054
+ try {
134055
+ rmSync2(stagingDir, { recursive: true, force: true });
134056
+ } catch {
134057
+ }
134058
+ }
134059
+ return result;
134060
+ }
134061
+
134062
+ // src/lib/hooks.ts
134063
+ import { mkdirSync as mkdirSync6, readFileSync as readFileSync8, writeFileSync as writeFileSync3 } from "node:fs";
134064
+ import { homedir as homedir10 } from "node:os";
134065
+ import { dirname as dirname5, join as join20 } from "node:path";
133758
134066
  var HOOK_EVENTS = ["PreToolUse", "PermissionRequest", "UserPromptSubmit", "PostToolUse", "Stop"];
133759
134067
  function claudeSettingsPath() {
133760
- return join19(homedir8(), ".claude", "settings.json");
134068
+ return join20(homedir10(), ".claude", "settings.json");
133761
134069
  }
133762
134070
  function loadClaudeSettings() {
133763
134071
  try {
133764
- const data = readFileSync7(claudeSettingsPath(), "utf-8");
134072
+ const data = readFileSync8(claudeSettingsPath(), "utf-8");
133765
134073
  return JSON.parse(data);
133766
134074
  } catch {
133767
134075
  return {};
@@ -133813,7 +134121,7 @@ async function installHooks() {
133813
134121
  throw new Error("Could not find band CLI binary. Please install it first.");
133814
134122
  }
133815
134123
  const settingsPath = claudeSettingsPath();
133816
- mkdirSync5(dirname4(settingsPath), { recursive: true });
134124
+ mkdirSync6(dirname5(settingsPath), { recursive: true });
133817
134125
  const settings = loadClaudeSettings();
133818
134126
  const hooks = settings.hooks || {};
133819
134127
  for (const [event, eventHooks] of Object.entries(hooks)) {
@@ -133843,7 +134151,7 @@ async function installHooks() {
133843
134151
  hooks[event] = filtered;
133844
134152
  }
133845
134153
  settings.hooks = hooks;
133846
- writeFileSync2(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
134154
+ writeFileSync3(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
133847
134155
  }
133848
134156
 
133849
134157
  // src/lib/setup.ts
@@ -133858,6 +134166,7 @@ async function runFirstTimeSetup() {
133858
134166
  await ensureDefaultCodingAgents();
133859
134167
  ensureNotificationDefaults();
133860
134168
  await ensureClaudeHooks();
134169
+ await ensureSkillsInstalled();
133861
134170
  }
133862
134171
  async function ensureCliInstalled() {
133863
134172
  let cliStatus;
@@ -133936,11 +134245,28 @@ async function ensureClaudeHooks() {
133936
134245
  );
133937
134246
  }
133938
134247
  }
134248
+ async function ensureSkillsInstalled() {
134249
+ try {
134250
+ const result = await installSkills({ log: log16 });
134251
+ const wrote = result.written.length + result.updated.length;
134252
+ if (wrote > 0) {
134253
+ log16.info(
134254
+ "Synced CLI skills (%d written, %d updated, %d unchanged, %d skipped)",
134255
+ result.written.length,
134256
+ result.updated.length,
134257
+ result.unchanged.length,
134258
+ result.skipped.length
134259
+ );
134260
+ }
134261
+ } catch (err) {
134262
+ log16.warn("Failed to sync CLI skills: %s", err instanceof Error ? err.message : String(err));
134263
+ }
134264
+ }
133939
134265
 
133940
134266
  // src/lib/terminal-manager.ts
133941
134267
  init_src();
133942
- import { existsSync as existsSync5 } from "node:fs";
133943
- import { join as join20 } from "node:path";
134268
+ import { existsSync as existsSync6 } from "node:fs";
134269
+ import { join as join21 } from "node:path";
133944
134270
 
133945
134271
  // src/lib/terminal-layout-manager.ts
133946
134272
  var manager2 = new DockviewLayoutManager("terminal_layout");
@@ -133995,19 +134321,19 @@ async function spawnTerminal(workspaceId, terminalId, options2) {
133995
134321
  const workspaceRoot = workspace.worktree.path;
133996
134322
  let cwd = workspaceRoot;
133997
134323
  if (options2?.cwd) {
133998
- const resolved = join20(workspaceRoot, options2.cwd);
134324
+ const resolved = join21(workspaceRoot, options2.cwd);
133999
134325
  if (!resolved.startsWith(workspaceRoot)) {
134000
134326
  log17.warn("Ignoring cwd %s \u2014 resolves outside workspace root %s", options2.cwd, workspaceRoot);
134001
- } else if (existsSync5(resolved)) {
134327
+ } else if (existsSync6(resolved)) {
134002
134328
  cwd = resolved;
134003
134329
  } else {
134004
134330
  log17.warn("Ignoring cwd %s \u2014 directory does not exist", options2.cwd);
134005
134331
  }
134006
134332
  }
134007
- if (!existsSync5(cwd)) {
134333
+ if (!existsSync6(cwd)) {
134008
134334
  throw new Error(`Workspace directory does not exist: ${cwd}`);
134009
134335
  }
134010
- if (!existsSync5(shell)) {
134336
+ if (!existsSync6(shell)) {
134011
134337
  throw new Error(`Shell not found: ${shell}`);
134012
134338
  }
134013
134339
  log17.debug(
@@ -141325,11 +141651,11 @@ function createContext7() {
141325
141651
  }
141326
141652
 
141327
141653
  // src/trpc/router.ts
141328
- import { execFile as execFile4, execFileSync as execFileSync2 } from "node:child_process";
141329
- import { randomUUID } from "node:crypto";
141330
- import { existsSync as existsSync6, mkdirSync as mkdirSync6, unlinkSync as unlinkSync3 } from "node:fs";
141654
+ import { execFile as execFile5, execFileSync as execFileSync2 } from "node:child_process";
141655
+ import { randomUUID as randomUUID2 } from "node:crypto";
141656
+ import { existsSync as existsSync7, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3 } from "node:fs";
141331
141657
  import { readdir as readdir2, readFile as readFile2, rm, stat as stat4, writeFile as writeFile2 } from "node:fs/promises";
141332
- import { basename, extname as extname2, join as join21, resolve as resolve6 } from "node:path";
141658
+ import { basename, extname as extname2, join as join22, resolve as resolve6 } from "node:path";
141333
141659
  import { promisify } from "node:util";
141334
141660
  init_src();
141335
141661
  init_zod();
@@ -141650,10 +141976,22 @@ function convertEventsToUIMessages(events) {
141650
141976
  case "user-message": {
141651
141977
  flushText();
141652
141978
  currentAssistant = null;
141979
+ const userParts = [{ type: "text", text: chunk.text }];
141980
+ const userFiles = chunk.files;
141981
+ if (Array.isArray(userFiles)) {
141982
+ for (const f10 of userFiles) {
141983
+ userParts.push({
141984
+ type: "file",
141985
+ mediaType: f10.mediaType,
141986
+ url: f10.url,
141987
+ ...f10.filename && { filename: f10.filename }
141988
+ });
141989
+ }
141990
+ }
141653
141991
  messages.push({
141654
141992
  id: crypto.randomUUID(),
141655
141993
  role: "user",
141656
- parts: [{ type: "text", text: chunk.text }]
141994
+ parts: userParts
141657
141995
  });
141658
141996
  break;
141659
141997
  }
@@ -141661,10 +141999,21 @@ function convertEventsToUIMessages(events) {
141661
141999
  flushText();
141662
142000
  currentAssistant = null;
141663
142001
  const data = chunk.data;
142002
+ const promptParts = [{ type: "text", text: data.text }];
142003
+ if (Array.isArray(data.files)) {
142004
+ for (const f10 of data.files) {
142005
+ promptParts.push({
142006
+ type: "file",
142007
+ mediaType: f10.mediaType,
142008
+ url: f10.url,
142009
+ ...f10.filename && { filename: f10.filename }
142010
+ });
142011
+ }
142012
+ }
141664
142013
  messages.push({
141665
142014
  id: crypto.randomUUID(),
141666
142015
  role: "user",
141667
- parts: [{ type: "text", text: data.text }]
142016
+ parts: promptParts
141668
142017
  });
141669
142018
  break;
141670
142019
  }
@@ -141907,7 +142256,7 @@ function loadWorkspaceTerminalConfig(worktreePath, projectPath) {
141907
142256
  }
141908
142257
 
141909
142258
  // src/trpc/router.ts
141910
- var execFileAsync = promisify(execFile4);
142259
+ var execFileAsync = promisify(execFile5);
141911
142260
  var log23 = createLogger("trpc");
141912
142261
  var t2 = initTRPC.context().create();
141913
142262
  var publicProcedure = t2.procedure;
@@ -141919,10 +142268,11 @@ var projectsRouter = t2.router({
141919
142268
  const statusMap = new Map(statuses.map((s6) => [s6.workspaceId, s6]));
141920
142269
  const projects2 = await Promise.all(
141921
142270
  state2.projects.map(async (project) => {
142271
+ const trackedBranches = new Set(project.worktrees.map((wt) => wt.branch));
141922
142272
  let worktrees2 = project.worktrees;
141923
142273
  try {
141924
142274
  const gitWorktrees = await listWorktrees(project.path);
141925
- worktrees2 = gitWorktrees.filter((wt) => !wt.isBare).map((wt) => ({
142275
+ worktrees2 = gitWorktrees.filter((wt) => !wt.isBare && trackedBranches.has(wt.branch)).map((wt) => ({
141926
142276
  branch: wt.branch,
141927
142277
  path: wt.path,
141928
142278
  head: wt.head
@@ -141950,7 +142300,7 @@ var projectsRouter = t2.router({
141950
142300
  }),
141951
142301
  checkPath: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).query(({ input }) => {
141952
142302
  const resolvedPath = resolve6(input.path);
141953
- const isGitRepo = existsSync6(join21(resolvedPath, ".git"));
142303
+ const isGitRepo = existsSync7(join22(resolvedPath, ".git"));
141954
142304
  return { isGitRepo };
141955
142305
  }),
141956
142306
  gitInit: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).mutation(async ({ input }) => {
@@ -142059,8 +142409,8 @@ var workspacesRouter = t2.router({
142059
142409
  return { ok: true, path: existing.path };
142060
142410
  }
142061
142411
  const wtDir = worktreesDir();
142062
- const worktreePath = join21(wtDir, input.project, input.branch);
142063
- mkdirSync6(join21(wtDir, input.project), { recursive: true });
142412
+ const worktreePath = join22(wtDir, input.project, input.branch);
142413
+ mkdirSync7(join22(wtDir, input.project), { recursive: true });
142064
142414
  const { command, env } = gitCmd();
142065
142415
  const args = ["worktree", "add"];
142066
142416
  if (input.base) {
@@ -142124,7 +142474,7 @@ var workspacesRouter = t2.router({
142124
142474
  saveState(state2);
142125
142475
  const workspaceId = toWorkspaceId(input.project, input.branch);
142126
142476
  try {
142127
- unlinkSync3(join21(bandHome(), "workspace-prompts", `${workspaceId}.json`));
142477
+ unlinkSync3(join22(bandHome(), "workspace-prompts", `${workspaceId}.json`));
142128
142478
  } catch {
142129
142479
  }
142130
142480
  deleteWorkspaceStatus(workspaceId);
@@ -142228,12 +142578,12 @@ var workspacesRouter = t2.router({
142228
142578
  return { ok: true };
142229
142579
  }),
142230
142580
  runScript: publicProcedure.input(external_exports2.object({ path: external_exports2.string(), scriptType: external_exports2.string() })).mutation(({ input }) => {
142231
- const scriptPath = join21(input.path, ".band", input.scriptType);
142232
- if (!existsSync6(scriptPath)) {
142581
+ const scriptPath = join22(input.path, ".band", input.scriptType);
142582
+ if (!existsSync7(scriptPath)) {
142233
142583
  throw new Error(`Script "${input.scriptType}" not found`);
142234
142584
  }
142235
142585
  return new Promise((resolve8, reject) => {
142236
- execFile4("bash", [scriptPath], { cwd: input.path }, (err) => {
142586
+ execFile5("bash", [scriptPath], { cwd: input.path }, (err) => {
142237
142587
  if (err) {
142238
142588
  reject(new Error(err.message));
142239
142589
  } else {
@@ -142366,7 +142716,7 @@ function parseFileStatuses(nameStatusOutput) {
142366
142716
  }
142367
142717
  async function readUntrackedFileLines(cwd, file2) {
142368
142718
  try {
142369
- const content2 = await readFile2(join21(cwd, file2), "utf-8");
142719
+ const content2 = await readFile2(join22(cwd, file2), "utf-8");
142370
142720
  const lines = content2.split("\n");
142371
142721
  if (lines.length > 0 && lines[lines.length - 1] === "") {
142372
142722
  lines.pop();
@@ -142540,7 +142890,7 @@ var workspaceRouter = t2.router({
142540
142890
  const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
142541
142891
  if (untrackedFiles.includes(input.filePath)) {
142542
142892
  try {
142543
- const content2 = await readFile2(join21(cwd, input.filePath), "utf-8");
142893
+ const content2 = await readFile2(join22(cwd, input.filePath), "utf-8");
142544
142894
  const lines = content2.split("\n");
142545
142895
  if (lines.length > 0 && lines[lines.length - 1] === "") {
142546
142896
  lines.pop();
@@ -142585,7 +142935,7 @@ var workspaceRouter = t2.router({
142585
142935
  const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
142586
142936
  const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
142587
142937
  if (untrackedFiles.includes(filePath)) {
142588
- await rm(join21(cwd, filePath), { force: true });
142938
+ await rm(join22(cwd, filePath), { force: true });
142589
142939
  return { ok: true };
142590
142940
  }
142591
142941
  const { mergeBase: ref } = await resolveDiffContext(
@@ -142610,7 +142960,7 @@ var workspaceRouter = t2.router({
142610
142960
  throw new Error("Workspace not found");
142611
142961
  }
142612
142962
  const root = workspace.worktree.path;
142613
- const target = resolve6(join21(root, input.path));
142963
+ const target = resolve6(join22(root, input.path));
142614
142964
  if (!target.startsWith(root)) {
142615
142965
  throw new Error("Invalid path");
142616
142966
  }
@@ -142633,7 +142983,7 @@ var workspaceRouter = t2.router({
142633
142983
  throw new Error("Path is required");
142634
142984
  }
142635
142985
  const root = workspace.worktree.path;
142636
- const target = resolve6(join21(root, input.path));
142986
+ const target = resolve6(join22(root, input.path));
142637
142987
  if (!target.startsWith(root)) {
142638
142988
  throw new Error("Invalid path");
142639
142989
  }
@@ -142667,7 +143017,7 @@ var workspaceRouter = t2.router({
142667
143017
  throw new Error("Workspace not found");
142668
143018
  }
142669
143019
  const root = workspace.worktree.path;
142670
- const target = resolve6(join21(root, input.path));
143020
+ const target = resolve6(join22(root, input.path));
142671
143021
  if (!target.startsWith(root)) {
142672
143022
  throw new Error("Invalid path");
142673
143023
  }
@@ -142808,7 +143158,7 @@ var prereqsRouter = t2.router({
142808
143158
  installTunnel: publicProcedure.mutation(async () => {
142809
143159
  const resolvedPath = await shellPath();
142810
143160
  await new Promise((resolve8, reject) => {
142811
- execFile4(
143161
+ execFile5(
142812
143162
  "brew",
142813
143163
  ["install", "cloudflared"],
142814
143164
  { env: { ...process.env, PATH: resolvedPath }, timeout: 12e4 },
@@ -143624,37 +143974,67 @@ var browsersRouter = t2.router({
143624
143974
  return { ok: true };
143625
143975
  })
143626
143976
  });
143977
+ var queuedFileSchema = external_exports2.object({
143978
+ mediaType: external_exports2.string(),
143979
+ url: external_exports2.string(),
143980
+ filename: external_exports2.string().optional()
143981
+ });
143627
143982
  var queueRouter = t2.router({
143628
- push: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string(), chatId: external_exports2.string().optional(), text: external_exports2.string() })).mutation(({ input }) => {
143983
+ push: publicProcedure.input(
143984
+ external_exports2.object({
143985
+ workspaceId: external_exports2.string(),
143986
+ chatId: external_exports2.string().optional(),
143987
+ text: external_exports2.string(),
143988
+ files: external_exports2.array(queuedFileSchema).optional()
143989
+ })
143990
+ ).mutation(({ input }) => {
143629
143991
  const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
143630
- pushQueuedMessage(chatId, input.text);
143631
- return { ok: true, messages: getQueuedMessages(chatId) };
143992
+ const message = pushQueuedMessage(chatId, { text: input.text, files: input.files });
143993
+ return { ok: true, message, messages: getQueuedMessages(chatId) };
143632
143994
  }),
143633
143995
  set: publicProcedure.input(
143634
143996
  external_exports2.object({
143635
143997
  workspaceId: external_exports2.string(),
143636
143998
  chatId: external_exports2.string().optional(),
143637
- messages: external_exports2.array(external_exports2.string())
143999
+ messages: external_exports2.array(
144000
+ external_exports2.object({
144001
+ id: external_exports2.string().optional(),
144002
+ text: external_exports2.string(),
144003
+ files: external_exports2.array(queuedFileSchema).optional()
144004
+ })
144005
+ )
143638
144006
  })
143639
144007
  ).mutation(({ input }) => {
143640
144008
  const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
143641
144009
  setQueuedMessages(chatId, input.messages);
143642
- return { ok: true };
144010
+ return { ok: true, messages: getQueuedMessages(chatId) };
143643
144011
  }),
143644
144012
  get: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string(), chatId: external_exports2.string().optional() })).query(({ input }) => {
143645
144013
  const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
143646
144014
  const messages = getQueuedMessages(chatId);
143647
144015
  return { messages };
143648
144016
  }),
143649
- remove: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string(), chatId: external_exports2.string().optional(), text: external_exports2.string() })).mutation(({ input }) => {
144017
+ remove: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string(), chatId: external_exports2.string().optional(), id: external_exports2.string() })).mutation(({ input }) => {
143650
144018
  const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
143651
- removeQueuedMessage(chatId, input.text);
143652
- return { ok: true, messages: getQueuedMessages(chatId) };
144019
+ const removed = removeQueuedMessage(chatId, input.id);
144020
+ return { ok: true, removed, messages: getQueuedMessages(chatId) };
144021
+ }),
144022
+ update: publicProcedure.input(
144023
+ external_exports2.object({
144024
+ workspaceId: external_exports2.string(),
144025
+ chatId: external_exports2.string().optional(),
144026
+ id: external_exports2.string(),
144027
+ text: external_exports2.string()
144028
+ })
144029
+ ).mutation(({ input }) => {
144030
+ const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
144031
+ const updated = updateQueuedMessage(chatId, input.id, input.text);
144032
+ return { ok: true, updated, messages: getQueuedMessages(chatId) };
143653
144033
  }),
143654
144034
  shift: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string(), chatId: external_exports2.string().optional() })).mutation(({ input }) => {
143655
144035
  const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
143656
- const text4 = shiftQueuedMessage(chatId);
143657
- return { text: text4 };
144036
+ const message = shiftQueuedMessage(chatId);
144037
+ return { message };
143658
144038
  }),
143659
144039
  clear: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string(), chatId: external_exports2.string().optional() })).mutation(({ input }) => {
143660
144040
  const chatId = input.chatId ?? getOrCreateDefaultChat(input.workspaceId).id;
@@ -143713,7 +144093,7 @@ var terminalRouter = t2.router({
143713
144093
  env: external_exports2.record(external_exports2.string()).optional()
143714
144094
  })
143715
144095
  ).mutation(async ({ input }) => {
143716
- const terminalId = input.id ?? randomUUID();
144096
+ const terminalId = input.id ?? randomUUID2();
143717
144097
  const session = await spawnTerminal(input.workspaceId, terminalId, {
143718
144098
  command: input.command,
143719
144099
  cwd: input.cwd,
@@ -143933,8 +144313,8 @@ function getScalarHtml(specUrl) {
143933
144313
  // start-server.ts
143934
144314
  function logCrash(message) {
143935
144315
  try {
143936
- mkdirSync7(bandHome(), { recursive: true });
143937
- appendFileSync2(join22(bandHome(), "server.log"), message, "utf-8");
144316
+ mkdirSync8(bandHome(), { recursive: true });
144317
+ appendFileSync2(join23(bandHome(), "server.log"), message, "utf-8");
143938
144318
  } catch {
143939
144319
  }
143940
144320
  }
@@ -143959,7 +144339,7 @@ ${error40.stack || error40.message}
143959
144339
  `);
143960
144340
  process.exit(1);
143961
144341
  });
143962
- var clientDir = join22(import.meta.dirname, "client");
144342
+ var clientDir = join23(import.meta.dirname, "client");
143963
144343
  var port = parseInt(process.env.PORT || "3456", 10);
143964
144344
  delete process.env.PORT;
143965
144345
  process.env.BAND_PORT = String(port);
@@ -143970,7 +144350,7 @@ var assets = build_default(clientDir, {
143970
144350
  gzip: true,
143971
144351
  etag: true
143972
144352
  });
143973
- var openApiDoc = JSON.parse(readFileSync8(join22(import.meta.dirname, "openapi.json"), "utf-8"));
144353
+ var openApiDoc = JSON.parse(readFileSync9(join23(import.meta.dirname, "openapi.json"), "utf-8"));
143974
144354
  openApiDoc.servers = [{ url: "/trpc" }];
143975
144355
  var openApiSpec = JSON.stringify(openApiDoc, null, 2);
143976
144356
  var scalarHtml = getScalarHtml("/api/openapi.json");
@@ -143981,9 +144361,9 @@ function serveStaticFile(res, root, subdir, rawFilename) {
143981
144361
  res.end("Bad request");
143982
144362
  return;
143983
144363
  }
143984
- const filePath = join22(root, subdir, filename);
144364
+ const filePath = join23(root, subdir, filename);
143985
144365
  try {
143986
- const fileStat = statSync6(filePath);
144366
+ const fileStat = statSync7(filePath);
143987
144367
  const contentType = mimeTypeFromFilename(filename);
143988
144368
  res.writeHead(200, {
143989
144369
  "Content-Type": contentType,
@@ -144004,14 +144384,14 @@ function serveWorkspaceFile(res, workspaceId, rawPath) {
144004
144384
  return;
144005
144385
  }
144006
144386
  const root = workspace.worktree.path;
144007
- const target = resolve7(join22(root, rawPath));
144387
+ const target = resolve7(join23(root, rawPath));
144008
144388
  if (!target.startsWith(`${root}/`) && target !== root) {
144009
144389
  res.writeHead(400);
144010
144390
  res.end("Bad request");
144011
144391
  return;
144012
144392
  }
144013
144393
  try {
144014
- const fileStat = statSync6(target);
144394
+ const fileStat = statSync7(target);
144015
144395
  const contentType = mimeTypeFromFilename(basename2(target));
144016
144396
  res.writeHead(200, {
144017
144397
  "Content-Type": contentType,
@@ -144056,7 +144436,7 @@ async function main() {
144056
144436
  res.end("Bad request");
144057
144437
  return;
144058
144438
  }
144059
- serveStaticFile(res, bandHome(), join22("shared", partition), rest.slice(slashIdx + 1));
144439
+ serveStaticFile(res, bandHome(), join23("shared", partition), rest.slice(slashIdx + 1));
144060
144440
  return;
144061
144441
  }
144062
144442
  if (req.url?.startsWith("/api/workspace-file/")) {