@band-app/server 0.5.5 → 0.6.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 (177) hide show
  1. package/README.md +2 -2
  2. package/dist/client/assets/DockviewTerminalContainer-Cz9WlWdH.js +2 -0
  3. package/dist/client/assets/{TerminalPanel-9pW_g2Kd.js → TerminalPanel-CFXq1WFm.js} +1 -1
  4. package/dist/client/assets/{_basePickBy-Dkr8WVHx.js → _basePickBy-BlSII9jq.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-B0BP4Sik.js → _baseUniq-LspNqeMx.js} +1 -1
  6. package/dist/client/assets/{arc-C88WtUPJ.js → arc-BHqnoTLh.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-CyLIdwXX.js → architectureDiagram-VXUJARFQ-DCIibmHk.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-GShygeGY.js → blockDiagram-VD42YOAC-Dyw6cz7i.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-BcpX0Aqn.js → c4Diagram-YG6GDRKO-CBhD8_Hh.js} +1 -1
  10. package/dist/client/assets/channel-DyVBSQNn.js +1 -0
  11. package/dist/client/assets/{chunk-4BX2VUAB-IchBHT92.js → chunk-4BX2VUAB-BfoIiC3c.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-CiMhFR8e.js → chunk-55IACEB6-MseixGRc.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-D-8aj6uR.js → chunk-B4BG7PRW-kNN7PAII.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-C13AzM7U.js → chunk-DI55MBZ5-CfSoI0vz.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-B4gYDpvB.js → chunk-FMBD7UC4-F6mPv_S0.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-DG8uaz-H.js → chunk-QN33PNHL-BYvpvAhN.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-CUeAC5bF.js → chunk-QZHKN3VN-CAQ7z_Ie.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-Crx06Grw.js → chunk-TZMSLE5B-C-XQ_CRy.js} +1 -1
  19. package/dist/client/assets/classDiagram-2ON5EDUG-B-cHSWlO.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-WZHVMYZB-B-cHSWlO.js +1 -0
  21. package/dist/client/assets/clone-DTHJUKz4.js +1 -0
  22. package/dist/client/assets/{cose-bilkent-S5V4N54A-BjyHTZfo.js → cose-bilkent-S5V4N54A-ngzXR_kx.js} +1 -1
  23. package/dist/client/assets/{dagre-6UL2VRFP-C9LatsFq.js → dagre-6UL2VRFP-BbAzSMAb.js} +1 -1
  24. package/dist/client/assets/{diagram-PSM6KHXK-Bzxy2DxA.js → diagram-PSM6KHXK-D1y4JtW0.js} +1 -1
  25. package/dist/client/assets/{diagram-QEK2KX5R--qsdr1em.js → diagram-QEK2KX5R-BG_iQN5l.js} +1 -1
  26. package/dist/client/assets/{diagram-S2PKOQOG-SLCfnLEL.js → diagram-S2PKOQOG-CNtjaaSX.js} +1 -1
  27. package/dist/client/assets/{erDiagram-Q2GNP2WA-Bqfdi51r.js → erDiagram-Q2GNP2WA-Bo66PPvm.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-NV44I4VS-BxNRRaL6.js → flowDiagram-NV44I4VS-Exg4ftcx.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-JELNMOA3-B3nW9Tee.js → ganttDiagram-JELNMOA3-D6zmdAtV.js} +1 -1
  30. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-CJ5dA5iM.js → gitGraphDiagram-V2S2FVAM-Cu6NAnrE.js} +1 -1
  31. package/dist/client/assets/{graph-Ce0puKsP.js → graph-WQ-pCgIF.js} +1 -1
  32. package/dist/client/assets/{highlighted-body-B3W2YXNL-CENKUGzV.js → highlighted-body-B3W2YXNL-DwzNwzXb.js} +1 -1
  33. package/dist/client/assets/{index-DfwX9IUV.js → index-BBPUst2I.js} +1 -1
  34. package/dist/client/assets/{index-C_z1eCvW.js → index-BCYiMfLp.js} +1 -1
  35. package/dist/client/assets/{index-BSd1jAU9.js → index-B_Cl_jLZ.js} +1 -1
  36. package/dist/client/assets/{index-CosJojrk.js → index-Bk2XF8BE.js} +1 -1
  37. package/dist/client/assets/{index-Dd8shGvN.js → index-Bp5eP514.js} +1 -1
  38. package/dist/client/assets/{index-Cdvev7u6.js → index-Bq_xY4Ph.js} +1 -1
  39. package/dist/client/assets/index-CZ3BA0Cx.js +1 -0
  40. package/dist/client/assets/{index-C01QsgdU.js → index-CrvLihp0.js} +1 -1
  41. package/dist/client/assets/{index-B3ozbkAt.js → index-D4GE4Sw0.js} +1 -1
  42. package/dist/client/assets/{index-D3sAIK6P.js → index-DDT5MV0f.js} +1 -1
  43. package/dist/client/assets/{index-GxKLyCuq.js → index-DIETCrpj.js} +1 -1
  44. package/dist/client/assets/{index-BJDmvnal.js → index-DSACz9Bz.js} +1 -1
  45. package/dist/client/assets/{index-BDCONrW_.js → index-DcZkOXX6.js} +1 -1
  46. package/dist/client/assets/{index-qwbh_ssl.js → index-DijU73Gl.js} +1 -1
  47. package/dist/client/assets/{index-DL2wTzK1.js → index-DrmwayhT.js} +1 -1
  48. package/dist/client/assets/{index-jSH-9g1p.js → index-PbwTEF33.js} +1 -1
  49. package/dist/client/assets/{index-DGV19pgb.js → index-plFoXjgS.js} +1 -1
  50. package/dist/client/assets/{index-SWV7MFMV.js → index-tEjp_PJF.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-HS3SLOUP--q9GXvGW.js → infoDiagram-HS3SLOUP-CgP-ZkOl.js} +1 -1
  52. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-C8V3w1dG.js → journeyDiagram-XKPGCS4Q-BQA_b_yg.js} +1 -1
  53. package/dist/client/assets/{kanban-definition-3W4ZIXB7-BJk0X7tz.js → kanban-definition-3W4ZIXB7-DPOkqRAd.js} +1 -1
  54. package/dist/client/assets/{layout-ChwcG4Xl.js → layout-DeyOgqC6.js} +1 -1
  55. package/dist/client/assets/{linear-BDZmJSE8.js → linear-DGKC-_dh.js} +1 -1
  56. package/dist/client/assets/{main-BJRBUBf7.js → main-BreB9CwG.js} +227 -227
  57. package/dist/client/assets/main-D081MUyS.css +1 -0
  58. package/dist/client/assets/{mindmap-definition-VGOIOE7T-ByMpVnYs.js → mindmap-definition-VGOIOE7T-D33s8vQk.js} +1 -1
  59. package/dist/client/assets/{pieDiagram-ADFJNKIX-CD-lmXbd.js → pieDiagram-ADFJNKIX-DkcUUXhA.js} +1 -1
  60. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-BdOgBPk1.js → quadrantDiagram-AYHSOK5B-Db6ej3fP.js} +1 -1
  61. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-f7DPR7JO.js → requirementDiagram-UZGBJVZJ-CRoYkr69.js} +1 -1
  62. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-bi8QNTNx.js → sankeyDiagram-TZEHDZUN-C5kJHH1U.js} +1 -1
  63. package/dist/client/assets/{sequenceDiagram-WL72ISMW-DvrFWc3k.js → sequenceDiagram-WL72ISMW-Bjl7tEqi.js} +1 -1
  64. package/dist/client/assets/{stateDiagram-FKZM4ZOC-pHRodxiR.js → stateDiagram-FKZM4ZOC-BOHkzYsN.js} +1 -1
  65. package/dist/client/assets/stateDiagram-v2-4FDKWEC3--yckNXlZ.js +1 -0
  66. package/dist/client/assets/{timeline-definition-IT6M3QCI-GvuMpLMJ.js → timeline-definition-IT6M3QCI-BRYv8Zo9.js} +1 -1
  67. package/dist/client/assets/{treemap-GDKQZRPO-1Fkk9zI9.js → treemap-GDKQZRPO-CreIyeFj.js} +1 -1
  68. package/dist/client/assets/{useSessionListContext-CRcZVcHa.js → useSessionListContext-B45AkDTo.js} +1 -1
  69. package/dist/client/assets/{workspace._workspaceId-Cy3AEGLV.js → workspace._workspaceId-DDqIo28l.js} +1 -1
  70. package/dist/client/assets/{workspace._workspaceId.changes-Rwu7P9DU.js → workspace._workspaceId.changes-tNj-aYnb.js} +1 -1
  71. package/dist/client/assets/workspace._workspaceId.code-dlq2gsqz.js +1 -0
  72. package/dist/client/assets/{workspace._workspaceId.code._-BJQkX_UC.js → workspace._workspaceId.code._-CZQLyXwR.js} +1 -1
  73. package/dist/client/assets/{workspace._workspaceId.code.index-BRqZeE-M.js → workspace._workspaceId.code.index-BZ26pRQu.js} +1 -1
  74. package/dist/client/assets/{workspace._workspaceId.index-D_CsfVyR.js → workspace._workspaceId.index-D_hEywpO.js} +1 -1
  75. package/dist/client/assets/{workspace._workspaceId.terminal-DfJiaUra.js → workspace._workspaceId.terminal-D_kBTm-z.js} +2 -2
  76. package/dist/client/assets/{xychartDiagram-PRI3JC2R-CQ-W21MD.js → xychartDiagram-PRI3JC2R-Cn2h5HVO.js} +1 -1
  77. package/dist/server/assets/{DockviewTerminalContainer-nurSvNMN.js → DockviewTerminalContainer-DSwflA0D.js} +3 -3
  78. package/dist/server/assets/{TerminalPanel-Cf-9H8Lr.js → TerminalPanel-D2eWHeSY.js} +2 -2
  79. package/dist/server/assets/{_basePickBy-D3FmqT7A.js → _basePickBy-C6PzK77c.js} +2 -2
  80. package/dist/server/assets/{_baseUniq-CZLL_KGQ.js → _baseUniq-DiQVR768.js} +1 -1
  81. package/dist/server/assets/{_tanstack-start-manifest_v-DcXFd6TS.js → _tanstack-start-manifest_v-CsSFK95L.js} +1 -1
  82. package/dist/server/assets/{arc-B-ehAOzx.js → arc-gx_AD1U3.js} +1 -1
  83. package/dist/server/assets/{architecture-7HQA4BMR-Bm2CNNZn.js → architecture-7HQA4BMR-BGd5uu6b.js} +6 -6
  84. package/dist/server/assets/{architectureDiagram-VXUJARFQ-CxaRzb-g.js → architectureDiagram-VXUJARFQ-C_xYzE4-.js} +6 -6
  85. package/dist/server/assets/{blockDiagram-VD42YOAC-CsN3W5TR.js → blockDiagram-VD42YOAC-DpPRXIow.js} +6 -6
  86. package/dist/server/assets/{c4Diagram-YG6GDRKO-C2v52EXK.js → c4Diagram-YG6GDRKO-CAy_xf6J.js} +2 -2
  87. package/dist/server/assets/{channel-C3XN_tlw.js → channel-6B-t4Soa.js} +1 -1
  88. package/dist/server/assets/{chunk-4BX2VUAB-BRZhlA3M.js → chunk-4BX2VUAB-B42FHAWg.js} +1 -1
  89. package/dist/server/assets/{chunk-55IACEB6-CvRWSP7_.js → chunk-55IACEB6-MqdTOSaC.js} +1 -1
  90. package/dist/server/assets/{chunk-B4BG7PRW-CtnW_06V.js → chunk-B4BG7PRW-CTB3bXV5.js} +4 -4
  91. package/dist/server/assets/{chunk-DI55MBZ5-BQw22O7H.js → chunk-DI55MBZ5-BQenTOqK.js} +3 -3
  92. package/dist/server/assets/{chunk-FMBD7UC4-GsUqEYsC.js → chunk-FMBD7UC4-BZoha8Qg.js} +1 -1
  93. package/dist/server/assets/{chunk-QN33PNHL-Cbg19vtg.js → chunk-QN33PNHL-qKkMgf6f.js} +1 -1
  94. package/dist/server/assets/{chunk-QZHKN3VN-BWszKJyV.js → chunk-QZHKN3VN-VrtEAJzx.js} +1 -1
  95. package/dist/server/assets/{chunk-TZMSLE5B-DQrHctmP.js → chunk-TZMSLE5B-DSYbndjw.js} +1 -1
  96. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-CbsNfDCL.js → classDiagram-2ON5EDUG-i_tSGvo3.js} +5 -5
  97. package/dist/server/assets/{classDiagram-2ON5EDUG-CbsNfDCL.js → classDiagram-v2-WZHVMYZB-i_tSGvo3.js} +5 -5
  98. package/dist/server/assets/{clone-x7_sin8C.js → clone-Cxt50u0y.js} +1 -1
  99. package/dist/server/assets/{cose-bilkent-S5V4N54A-BOuoNr7N.js → cose-bilkent-S5V4N54A-CxYiUQkd.js} +1 -1
  100. package/dist/server/assets/{dagre-6UL2VRFP-BEGPY_P8.js → dagre-6UL2VRFP-Df3ty00_.js} +6 -6
  101. package/dist/server/assets/{diagram-PSM6KHXK-DdLXbkDH.js → diagram-PSM6KHXK-Cfylqj1t.js} +7 -7
  102. package/dist/server/assets/{diagram-QEK2KX5R-Ywb8tTSL.js → diagram-QEK2KX5R-BOdeY2WM.js} +6 -6
  103. package/dist/server/assets/{diagram-S2PKOQOG-Bk6j9I_3.js → diagram-S2PKOQOG-DjK_qPmk.js} +6 -6
  104. package/dist/server/assets/{erDiagram-Q2GNP2WA-CS94DyiJ.js → erDiagram-Q2GNP2WA-CDZKFxtV.js} +4 -4
  105. package/dist/server/assets/{flowDiagram-NV44I4VS-DGePuZ_D.js → flowDiagram-NV44I4VS-BkuGyDjs.js} +5 -5
  106. package/dist/server/assets/{ganttDiagram-JELNMOA3-nyPfcgRT.js → ganttDiagram-JELNMOA3-BivmZcb7.js} +2 -2
  107. package/dist/server/assets/{gitGraph-G5XIXVHT-CKTPOKTu.js → gitGraph-G5XIXVHT-CC7wmTrx.js} +6 -6
  108. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-BygjesE-.js → gitGraphDiagram-V2S2FVAM-CQIdCHfs.js} +7 -7
  109. package/dist/server/assets/{graph-B6TDpsg4.js → graph-C8gb_m5f.js} +2 -2
  110. package/dist/server/assets/{highlighted-body-B3W2YXNL-CULjZ_nJ.js → highlighted-body-B3W2YXNL-DrUth0S5.js} +1 -1
  111. package/dist/server/assets/{index-BCMFgTLH.js → index-BjGAzo0D.js} +3 -3
  112. package/dist/server/assets/{index-DYGOZ3mj.js → index-BmO8Ehgw.js} +4 -4
  113. package/dist/server/assets/{index-Can-bHgo.js → index-Bmsr-fBO.js} +2 -2
  114. package/dist/server/assets/{index-BlnGJ9is.js → index-BnH9YiLC.js} +2 -2
  115. package/dist/server/assets/{index-eLPxFa7w.js → index-C4P3mulg.js} +5 -5
  116. package/dist/server/assets/{index-DCJj-J2w.js → index-C5Oqi8tP.js} +2 -2
  117. package/dist/server/assets/{index-Bx2Tna2y.js → index-CCjk4zsA.js} +2 -2
  118. package/dist/server/assets/{index-BRsnuD-O.js → index-CKHwQloa.js} +2 -2
  119. package/dist/server/assets/{index-Bli_q03X.js → index-CT4xIbKa.js} +2 -2
  120. package/dist/server/assets/{index-5SwWQ6oe.js → index-CcD8oUXa.js} +2 -2
  121. package/dist/server/assets/{index-0oeRMDH_.js → index-CitKRHQd.js} +3 -3
  122. package/dist/server/assets/{index-DuWXmjWc.js → index-CmrSb5ez.js} +1 -1
  123. package/dist/server/assets/{index-C1-EaJTv.js → index-DKxaFXTI.js} +2 -2
  124. package/dist/server/assets/{index-D4VsXH_e.js → index-DOYPjTos.js} +2 -2
  125. package/dist/server/assets/{index-DMcpsIUc.js → index-DhHjumm2.js} +5 -5
  126. package/dist/server/assets/{index-CnQ4qso3.js → index-Dn5q9HW4.js} +2 -2
  127. package/dist/server/assets/{index-DJDlsaKi.js → index-F50ZRwue.js} +2 -2
  128. package/dist/server/assets/{index-CsE88Ld8.js → index-qd9Me3nB.js} +2 -2
  129. package/dist/server/assets/{info-VBDWY6EO-B-rB5BtI.js → info-VBDWY6EO-DyGhnNke.js} +6 -6
  130. package/dist/server/assets/{infoDiagram-HS3SLOUP-D83vTisF.js → infoDiagram-HS3SLOUP-Ba9kta0e.js} +5 -5
  131. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-PbUYIdib.js → journeyDiagram-XKPGCS4Q-DpIqL8B7.js} +4 -4
  132. package/dist/server/assets/{kanban-definition-3W4ZIXB7-BQSc_qmP.js → kanban-definition-3W4ZIXB7-DX4-cLBH.js} +2 -2
  133. package/dist/server/assets/{layout-DXYeijc_.js → layout-C_dXxi6_.js} +4 -4
  134. package/dist/server/assets/{linear-Dwrm9Gnq.js → linear-BEU5iS3c.js} +1 -1
  135. package/dist/server/assets/{mermaid-3ZIDBTTL-BnVYO1pJ.js → mermaid-3ZIDBTTL-dDSIn_hx.js} +1 -1
  136. package/dist/server/assets/{mermaid-parser.core-CUfP0S_P.js → mermaid-parser.core-BTu6on9w.js} +11 -11
  137. package/dist/server/assets/{mindmap-definition-VGOIOE7T-BdjAKwAK.js → mindmap-definition-VGOIOE7T-EvNNmlYT.js} +3 -3
  138. package/dist/server/assets/{packet-DYOGHKS2-d7SiXxLo.js → packet-DYOGHKS2-BSKBycIf.js} +6 -6
  139. package/dist/server/assets/{pie-VRWISCQL-euknErR4.js → pie-VRWISCQL-BjrUlgyt.js} +6 -6
  140. package/dist/server/assets/{pieDiagram-ADFJNKIX-Bl150d6W.js → pieDiagram-ADFJNKIX-YhPnTxVL.js} +7 -7
  141. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-ClIy1n9L.js → quadrantDiagram-AYHSOK5B-C_QHaemj.js} +2 -2
  142. package/dist/server/assets/{radar-ZZBFDIW7-hsbqqEeW.js → radar-ZZBFDIW7-CO0WzTp4.js} +6 -6
  143. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-B87j_suL.js → requirementDiagram-UZGBJVZJ-BSt0bNXX.js} +3 -3
  144. package/dist/server/assets/{router-DMoul9bL.js → router-Ccw5_Sy3.js} +900 -753
  145. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-Bq18JLF9.js → sankeyDiagram-TZEHDZUN-C7SL1Bn9.js} +1 -1
  146. package/dist/server/assets/{sequenceDiagram-WL72ISMW-DziQuu14.js → sequenceDiagram-WL72ISMW-DdfWdBp2.js} +3 -3
  147. package/dist/server/assets/{stateDiagram-FKZM4ZOC-7wEsr4R_.js → stateDiagram-FKZM4ZOC-BD7Oj-hn.js} +8 -8
  148. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-D2VjwPAa.js → stateDiagram-v2-4FDKWEC3-e4PXqg0B.js} +4 -4
  149. package/dist/server/assets/{timeline-definition-IT6M3QCI--uelCCOi.js → timeline-definition-IT6M3QCI-f7G2avSH.js} +2 -2
  150. package/dist/server/assets/{treemap-GDKQZRPO-DVHxmTc8.js → treemap-GDKQZRPO-CndQ71as.js} +6 -6
  151. package/dist/server/assets/{workspace._workspaceId-Bs8UzdnH.js → workspace._workspaceId-CR4TOS5A.js} +2 -2
  152. package/dist/server/assets/{workspace._workspaceId.changes-BWu2NrZR.js → workspace._workspaceId.changes-B7PK-I72.js} +1 -1
  153. package/dist/server/assets/{workspace._workspaceId.code._-DKgsvYy3.js → workspace._workspaceId.code._-CA9dP_-G.js} +1 -1
  154. package/dist/server/assets/{workspace._workspaceId.code.index-D9xieBbz.js → workspace._workspaceId.code.index-CLRAQ6Pf.js} +1 -1
  155. package/dist/server/assets/{workspace._workspaceId.index-CM2nPNp3.js → workspace._workspaceId.index-alkhfxK3.js} +1 -1
  156. package/dist/server/assets/{workspace._workspaceId.terminal-ByrTEXV_.js → workspace._workspaceId.terminal-BvpiNe_s.js} +2 -2
  157. package/dist/server/assets/{xychartDiagram-PRI3JC2R-C3ztrSUC.js → xychartDiagram-PRI3JC2R-CAkP7cKw.js} +2 -2
  158. package/dist/server/server.js +2 -2
  159. package/dist/start-server.mjs +501 -225
  160. package/package.json +5 -7
  161. package/dist/client/assets/DockviewTerminalContainer-DX8OFKYR.js +0 -2
  162. package/dist/client/assets/channel-COxuXp7F.js +0 -1
  163. package/dist/client/assets/classDiagram-2ON5EDUG-CtxJr2zo.js +0 -1
  164. package/dist/client/assets/classDiagram-v2-WZHVMYZB-CtxJr2zo.js +0 -1
  165. package/dist/client/assets/clone-Cud65zOY.js +0 -1
  166. package/dist/client/assets/core-mPlcS5K-.js +0 -1
  167. package/dist/client/assets/event-DRyjiKX_.js +0 -1
  168. package/dist/client/assets/index-BkW3q3LQ.js +0 -1
  169. package/dist/client/assets/index-BsMHcPzb.js +0 -1
  170. package/dist/client/assets/main-BnrSCdeV.css +0 -1
  171. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-BUgsJX1c.js +0 -1
  172. package/dist/client/assets/window-BFoF6nYm.js +0 -1
  173. package/dist/client/assets/workspace._workspaceId.code-zGA3uY7G.js +0 -1
  174. package/dist/server/assets/core-dG4_vufa.js +0 -45
  175. package/dist/server/assets/event-2oMkw_LQ.js +0 -63
  176. package/dist/server/assets/index-jMSXp5h7.js +0 -10
  177. package/dist/server/assets/window-Qr88gZCE.js +0 -2005
@@ -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"
@@ -119948,7 +120035,6 @@ var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
119948
120035
 
119949
120036
  // ../../packages/dashboard-core/src/components/DashboardShell.tsx
119950
120037
  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
119951
- var isTauri = typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
119952
120038
  var isElectron = typeof window !== "undefined" && "__BAND_DESKTOP__" in window;
119953
120039
 
119954
120040
  // ../../packages/dashboard-core/src/components/DiffView.tsx
@@ -122968,7 +123054,7 @@ function sql(strings, ...params) {
122968
123054
  return new SQL([new StringChunk(str)]);
122969
123055
  }
122970
123056
  _sql.raw = raw;
122971
- function join23(chunks, separator) {
123057
+ function join24(chunks, separator) {
122972
123058
  const result = [];
122973
123059
  for (const [i2, chunk] of chunks.entries()) {
122974
123060
  if (i2 > 0 && separator !== void 0) result.push(separator);
@@ -122976,7 +123062,7 @@ function sql(strings, ...params) {
122976
123062
  }
122977
123063
  return new SQL(result);
122978
123064
  }
122979
- _sql.join = join23;
123065
+ _sql.join = join24;
122980
123066
  function identifier(value) {
122981
123067
  return new Name(value);
122982
123068
  }
@@ -127424,7 +127510,7 @@ var SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder {
127424
127510
  const baseTableName = this.tableName;
127425
127511
  const tableName = getTableLikeName(table);
127426
127512
  for (const item of extractUsedTable(table)) this.usedTables.add(item);
127427
- 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`);
127428
127514
  if (!this.isPartialSelect) {
127429
127515
  if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") this.config.fields = { [baseTableName]: this.config.fields };
127430
127516
  if (typeof tableName === "string" && !is(table, SQL)) {
@@ -128632,7 +128718,7 @@ var SQLiteDialect = class {
128632
128718
  if (!joins2) return;
128633
128719
  const withEntries = Object.entries(joins2).filter(([_4, v4]) => v4);
128634
128720
  if (!withEntries.length) return;
128635
- return sql.join(withEntries.map(([k4, join23]) => {
128721
+ return sql.join(withEntries.map(([k4, join24]) => {
128636
128722
  const relation = tableConfig.relations[k4];
128637
128723
  const isSingle2 = is(relation, One);
128638
128724
  const targetTable = aliasedTable(relation.targetTable, `d${currentDepth + 1}`);
@@ -128643,7 +128729,7 @@ var SQLiteDialect = class {
128643
128729
  table: targetTable,
128644
128730
  mode: isSingle2 ? "first" : "many",
128645
128731
  schema,
128646
- queryConfig: join23,
128732
+ queryConfig: join24,
128647
128733
  tableConfig: schema[relation.targetTableName],
128648
128734
  relationWhere: filter2,
128649
128735
  isNested: true,
@@ -128657,7 +128743,7 @@ var SQLiteDialect = class {
128657
128743
  key: k4,
128658
128744
  selection: innerQuery.selection,
128659
128745
  isArray: !isSingle2,
128660
- isOptional: (relation.optional ?? false) || join23 !== true && !!join23.where
128746
+ isOptional: (relation.optional ?? false) || join24 !== true && !!join24.where
128661
128747
  });
128662
128748
  const jsonColumns = sql.join(innerQuery.selection.map((s6) => {
128663
128749
  return sql`${sql.raw(this.escapeString(s6.key))}, ${s6.selection ? sql`${jsonb2}(${sql.identifier(s6.key)})` : sql.identifier(s6.key)}`;
@@ -129126,7 +129212,7 @@ var SQLiteUpdateBase = class extends QueryPromise {
129126
129212
  createJoin(joinType) {
129127
129213
  return ((table, on) => {
129128
129214
  const tableName = getTableLikeName(table);
129129
- 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`);
129130
129216
  if (typeof on === "function") {
129131
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;
129132
129218
  on = on(new Proxy(this.config.table[Table.Symbol.Columns], new SelectionProxyHandler({
@@ -130018,7 +130104,7 @@ function closeDb() {
130018
130104
  // src/lib/state.ts
130019
130105
  function bandHome() {
130020
130106
  if (process.env.BAND_HOME) return process.env.BAND_HOME;
130021
- return join11(homedir6(), ".band");
130107
+ return join11(homedir7(), ".band");
130022
130108
  }
130023
130109
  function loadState() {
130024
130110
  const db2 = getDb();
@@ -130224,7 +130310,7 @@ var pool = g2[POOL_KEY];
130224
130310
  var pending = g2[PENDING_KEY];
130225
130311
  function loadClaudeSettingsModel() {
130226
130312
  try {
130227
- const data = readFileSync5(join12(homedir7(), ".claude", "settings.json"), "utf-8");
130313
+ const data = readFileSync5(join12(homedir8(), ".claude", "settings.json"), "utf-8");
130228
130314
  const parsed = JSON.parse(data);
130229
130315
  return typeof parsed.model === "string" ? parsed.model : void 0;
130230
130316
  } catch {
@@ -133752,17 +133838,166 @@ function resolveCliPaths() {
133752
133838
  return { binaryPath, symlinkPath: SYMLINK_PATH };
133753
133839
  }
133754
133840
 
133755
- // src/lib/hooks.ts
133756
- import { mkdirSync as mkdirSync5, readFileSync as readFileSync7, writeFileSync as writeFileSync2 } from "node:fs";
133757
- import { homedir as homedir8 } from "node:os";
133841
+ // src/lib/cli-skills.ts
133842
+ import { execFile as execFile4 } from "node:child_process";
133843
+ import {
133844
+ accessSync as accessSync2,
133845
+ existsSync as existsSync5,
133846
+ constants as fsConstants,
133847
+ mkdirSync as mkdirSync5,
133848
+ mkdtempSync,
133849
+ readFileSync as readFileSync7,
133850
+ rmSync as rmSync2,
133851
+ statSync as statSync6,
133852
+ writeFileSync as writeFileSync2
133853
+ } from "node:fs";
133854
+ import { homedir as homedir9, tmpdir } from "node:os";
133758
133855
  import { dirname as dirname4, join as join19 } from "node:path";
133856
+ var BAND_SKILL_NAMES = ["band", "band-chat", "band-terminal", "band-browser"];
133857
+ var SKILL_FILE = "SKILL.md";
133858
+ async function isAgentInstalled(agent) {
133859
+ if (agent.command) {
133860
+ try {
133861
+ accessSync2(agent.command, fsConstants.X_OK);
133862
+ return true;
133863
+ } catch {
133864
+ return false;
133865
+ }
133866
+ }
133867
+ const binaryName = await getDefaultAgentBinary(agent.type);
133868
+ if (!binaryName) return false;
133869
+ const found = await whichBinary(binaryName);
133870
+ return found !== null;
133871
+ }
133872
+ async function resolveSkillTargets(agents, home = homedir9()) {
133873
+ const seen = /* @__PURE__ */ new Set();
133874
+ const out = [];
133875
+ for (const agent of agents) {
133876
+ if (!await isAgentInstalled(agent)) continue;
133877
+ const skillsDir = await getInstallSkillsDir(agent.type, home);
133878
+ if (!skillsDir) continue;
133879
+ if (seen.has(skillsDir)) continue;
133880
+ seen.add(skillsDir);
133881
+ out.push({ agentType: agent.type, skillsDir });
133882
+ }
133883
+ return out;
133884
+ }
133885
+ async function findBandBinary() {
133886
+ try {
133887
+ const stat5 = statSync6("/usr/local/bin/band");
133888
+ if (stat5) return "/usr/local/bin/band";
133889
+ } catch {
133890
+ }
133891
+ const onPath = await whichBinary("band");
133892
+ if (onPath) return onPath;
133893
+ return findCliBinary();
133894
+ }
133895
+ async function generateSkills(bandPath, outputDir) {
133896
+ await new Promise((resolve8, reject) => {
133897
+ execFile4(
133898
+ bandPath,
133899
+ ["generate-skills", "--output-dir", outputDir],
133900
+ { timeout: 3e4 },
133901
+ (err, _stdout, stderr) => {
133902
+ if (err) {
133903
+ const detail = stderr?.toString().trim();
133904
+ reject(new Error(detail ? `${err.message}: ${detail}` : err.message));
133905
+ return;
133906
+ }
133907
+ resolve8();
133908
+ }
133909
+ );
133910
+ });
133911
+ }
133912
+ async function installSkills(opts = {}) {
133913
+ const result = {
133914
+ written: [],
133915
+ updated: [],
133916
+ unchanged: [],
133917
+ skipped: []
133918
+ };
133919
+ const home = opts.home ?? homedir9();
133920
+ const agents = opts.agents ?? loadSettings().codingAgents ?? [];
133921
+ const targets = await resolveSkillTargets(agents, home);
133922
+ if (targets.length === 0) {
133923
+ return result;
133924
+ }
133925
+ const bandPath = await findBandBinary();
133926
+ if (!bandPath) {
133927
+ opts.log?.warn(
133928
+ "Skipping CLI skills sync \u2014 band binary not found (no symlink, not on PATH, no bundled sidecar)"
133929
+ );
133930
+ for (const target of targets) {
133931
+ for (const name24 of BAND_SKILL_NAMES) {
133932
+ result.skipped.push(join19(target.skillsDir, name24, SKILL_FILE));
133933
+ }
133934
+ }
133935
+ return result;
133936
+ }
133937
+ const stagingDir = mkdtempSync(join19(tmpdir(), "band-skills-"));
133938
+ try {
133939
+ await generateSkills(bandPath, stagingDir);
133940
+ for (const target of targets) {
133941
+ for (const name24 of BAND_SKILL_NAMES) {
133942
+ const sourcePath = join19(stagingDir, name24, SKILL_FILE);
133943
+ const destPath = join19(target.skillsDir, name24, SKILL_FILE);
133944
+ if (!existsSync5(sourcePath)) {
133945
+ opts.log?.warn("Generated skill missing from staging dir: %s (skipping)", sourcePath);
133946
+ continue;
133947
+ }
133948
+ const sourceContent = readFileSync7(sourcePath);
133949
+ let existingContent = null;
133950
+ try {
133951
+ existingContent = readFileSync7(destPath);
133952
+ } catch (err) {
133953
+ const code = err.code;
133954
+ if (code !== "ENOENT") {
133955
+ opts.log?.warn(
133956
+ "Failed to read existing skill at %s: %s \u2014 overwriting",
133957
+ destPath,
133958
+ err instanceof Error ? err.message : String(err)
133959
+ );
133960
+ }
133961
+ }
133962
+ if (existingContent?.equals(sourceContent)) {
133963
+ result.unchanged.push(destPath);
133964
+ continue;
133965
+ }
133966
+ mkdirSync5(dirname4(destPath), { recursive: true });
133967
+ writeFileSync2(destPath, sourceContent);
133968
+ if (existingContent) {
133969
+ result.updated.push(destPath);
133970
+ opts.log?.info(
133971
+ "Updated %s skill at %s (content differed \u2014 local edits, if any, were overwritten)",
133972
+ name24,
133973
+ destPath
133974
+ );
133975
+ } else {
133976
+ result.written.push(destPath);
133977
+ opts.log?.info("Installed %s skill at %s", name24, destPath);
133978
+ }
133979
+ }
133980
+ }
133981
+ } finally {
133982
+ try {
133983
+ rmSync2(stagingDir, { recursive: true, force: true });
133984
+ } catch {
133985
+ }
133986
+ }
133987
+ return result;
133988
+ }
133989
+
133990
+ // src/lib/hooks.ts
133991
+ import { mkdirSync as mkdirSync6, readFileSync as readFileSync8, writeFileSync as writeFileSync3 } from "node:fs";
133992
+ import { homedir as homedir10 } from "node:os";
133993
+ import { dirname as dirname5, join as join20 } from "node:path";
133759
133994
  var HOOK_EVENTS = ["PreToolUse", "PermissionRequest", "UserPromptSubmit", "PostToolUse", "Stop"];
133760
133995
  function claudeSettingsPath() {
133761
- return join19(homedir8(), ".claude", "settings.json");
133996
+ return join20(homedir10(), ".claude", "settings.json");
133762
133997
  }
133763
133998
  function loadClaudeSettings() {
133764
133999
  try {
133765
- const data = readFileSync7(claudeSettingsPath(), "utf-8");
134000
+ const data = readFileSync8(claudeSettingsPath(), "utf-8");
133766
134001
  return JSON.parse(data);
133767
134002
  } catch {
133768
134003
  return {};
@@ -133814,7 +134049,7 @@ async function installHooks() {
133814
134049
  throw new Error("Could not find band CLI binary. Please install it first.");
133815
134050
  }
133816
134051
  const settingsPath = claudeSettingsPath();
133817
- mkdirSync5(dirname4(settingsPath), { recursive: true });
134052
+ mkdirSync6(dirname5(settingsPath), { recursive: true });
133818
134053
  const settings = loadClaudeSettings();
133819
134054
  const hooks = settings.hooks || {};
133820
134055
  for (const [event, eventHooks] of Object.entries(hooks)) {
@@ -133844,7 +134079,7 @@ async function installHooks() {
133844
134079
  hooks[event] = filtered;
133845
134080
  }
133846
134081
  settings.hooks = hooks;
133847
- writeFileSync2(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
134082
+ writeFileSync3(settingsPath, JSON.stringify(settings, null, 2), "utf-8");
133848
134083
  }
133849
134084
 
133850
134085
  // src/lib/setup.ts
@@ -133859,6 +134094,7 @@ async function runFirstTimeSetup() {
133859
134094
  await ensureDefaultCodingAgents();
133860
134095
  ensureNotificationDefaults();
133861
134096
  await ensureClaudeHooks();
134097
+ await ensureSkillsInstalled();
133862
134098
  }
133863
134099
  async function ensureCliInstalled() {
133864
134100
  let cliStatus;
@@ -133937,11 +134173,28 @@ async function ensureClaudeHooks() {
133937
134173
  );
133938
134174
  }
133939
134175
  }
134176
+ async function ensureSkillsInstalled() {
134177
+ try {
134178
+ const result = await installSkills({ log: log16 });
134179
+ const wrote = result.written.length + result.updated.length;
134180
+ if (wrote > 0) {
134181
+ log16.info(
134182
+ "Synced CLI skills (%d written, %d updated, %d unchanged, %d skipped)",
134183
+ result.written.length,
134184
+ result.updated.length,
134185
+ result.unchanged.length,
134186
+ result.skipped.length
134187
+ );
134188
+ }
134189
+ } catch (err) {
134190
+ log16.warn("Failed to sync CLI skills: %s", err instanceof Error ? err.message : String(err));
134191
+ }
134192
+ }
133940
134193
 
133941
134194
  // src/lib/terminal-manager.ts
133942
134195
  init_src();
133943
- import { existsSync as existsSync5 } from "node:fs";
133944
- import { join as join20 } from "node:path";
134196
+ import { existsSync as existsSync6 } from "node:fs";
134197
+ import { join as join21 } from "node:path";
133945
134198
 
133946
134199
  // src/lib/terminal-layout-manager.ts
133947
134200
  var manager2 = new DockviewLayoutManager("terminal_layout");
@@ -133996,19 +134249,19 @@ async function spawnTerminal(workspaceId, terminalId, options2) {
133996
134249
  const workspaceRoot = workspace.worktree.path;
133997
134250
  let cwd = workspaceRoot;
133998
134251
  if (options2?.cwd) {
133999
- const resolved = join20(workspaceRoot, options2.cwd);
134252
+ const resolved = join21(workspaceRoot, options2.cwd);
134000
134253
  if (!resolved.startsWith(workspaceRoot)) {
134001
134254
  log17.warn("Ignoring cwd %s \u2014 resolves outside workspace root %s", options2.cwd, workspaceRoot);
134002
- } else if (existsSync5(resolved)) {
134255
+ } else if (existsSync6(resolved)) {
134003
134256
  cwd = resolved;
134004
134257
  } else {
134005
134258
  log17.warn("Ignoring cwd %s \u2014 directory does not exist", options2.cwd);
134006
134259
  }
134007
134260
  }
134008
- if (!existsSync5(cwd)) {
134261
+ if (!existsSync6(cwd)) {
134009
134262
  throw new Error(`Workspace directory does not exist: ${cwd}`);
134010
134263
  }
134011
- if (!existsSync5(shell)) {
134264
+ if (!existsSync6(shell)) {
134012
134265
  throw new Error(`Shell not found: ${shell}`);
134013
134266
  }
134014
134267
  log17.debug(
@@ -141326,11 +141579,11 @@ function createContext7() {
141326
141579
  }
141327
141580
 
141328
141581
  // src/trpc/router.ts
141329
- import { execFile as execFile4, execFileSync as execFileSync2 } from "node:child_process";
141582
+ import { execFile as execFile5, execFileSync as execFileSync2 } from "node:child_process";
141330
141583
  import { randomUUID } from "node:crypto";
141331
- import { existsSync as existsSync6, mkdirSync as mkdirSync6, unlinkSync as unlinkSync3 } from "node:fs";
141584
+ import { existsSync as existsSync7, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3 } from "node:fs";
141332
141585
  import { readdir as readdir2, readFile as readFile2, rm, stat as stat4, writeFile as writeFile2 } from "node:fs/promises";
141333
- import { basename, extname as extname2, join as join21, resolve as resolve6 } from "node:path";
141586
+ import { basename, extname as extname2, join as join22, resolve as resolve6 } from "node:path";
141334
141587
  import { promisify } from "node:util";
141335
141588
  init_src();
141336
141589
  init_zod();
@@ -141908,7 +142161,7 @@ function loadWorkspaceTerminalConfig(worktreePath, projectPath) {
141908
142161
  }
141909
142162
 
141910
142163
  // src/trpc/router.ts
141911
- var execFileAsync = promisify(execFile4);
142164
+ var execFileAsync = promisify(execFile5);
141912
142165
  var log23 = createLogger("trpc");
141913
142166
  var t2 = initTRPC.context().create();
141914
142167
  var publicProcedure = t2.procedure;
@@ -141920,10 +142173,11 @@ var projectsRouter = t2.router({
141920
142173
  const statusMap = new Map(statuses.map((s6) => [s6.workspaceId, s6]));
141921
142174
  const projects2 = await Promise.all(
141922
142175
  state2.projects.map(async (project) => {
142176
+ const trackedBranches = new Set(project.worktrees.map((wt) => wt.branch));
141923
142177
  let worktrees2 = project.worktrees;
141924
142178
  try {
141925
142179
  const gitWorktrees = await listWorktrees(project.path);
141926
- worktrees2 = gitWorktrees.filter((wt) => !wt.isBare).map((wt) => ({
142180
+ worktrees2 = gitWorktrees.filter((wt) => !wt.isBare && trackedBranches.has(wt.branch)).map((wt) => ({
141927
142181
  branch: wt.branch,
141928
142182
  path: wt.path,
141929
142183
  head: wt.head
@@ -141951,7 +142205,7 @@ var projectsRouter = t2.router({
141951
142205
  }),
141952
142206
  checkPath: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).query(({ input }) => {
141953
142207
  const resolvedPath = resolve6(input.path);
141954
- const isGitRepo = existsSync6(join21(resolvedPath, ".git"));
142208
+ const isGitRepo = existsSync7(join22(resolvedPath, ".git"));
141955
142209
  return { isGitRepo };
141956
142210
  }),
141957
142211
  gitInit: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).mutation(async ({ input }) => {
@@ -142060,8 +142314,8 @@ var workspacesRouter = t2.router({
142060
142314
  return { ok: true, path: existing.path };
142061
142315
  }
142062
142316
  const wtDir = worktreesDir();
142063
- const worktreePath = join21(wtDir, input.project, input.branch);
142064
- mkdirSync6(join21(wtDir, input.project), { recursive: true });
142317
+ const worktreePath = join22(wtDir, input.project, input.branch);
142318
+ mkdirSync7(join22(wtDir, input.project), { recursive: true });
142065
142319
  const { command, env } = gitCmd();
142066
142320
  const args = ["worktree", "add"];
142067
142321
  if (input.base) {
@@ -142125,7 +142379,7 @@ var workspacesRouter = t2.router({
142125
142379
  saveState(state2);
142126
142380
  const workspaceId = toWorkspaceId(input.project, input.branch);
142127
142381
  try {
142128
- unlinkSync3(join21(bandHome(), "workspace-prompts", `${workspaceId}.json`));
142382
+ unlinkSync3(join22(bandHome(), "workspace-prompts", `${workspaceId}.json`));
142129
142383
  } catch {
142130
142384
  }
142131
142385
  deleteWorkspaceStatus(workspaceId);
@@ -142229,12 +142483,12 @@ var workspacesRouter = t2.router({
142229
142483
  return { ok: true };
142230
142484
  }),
142231
142485
  runScript: publicProcedure.input(external_exports2.object({ path: external_exports2.string(), scriptType: external_exports2.string() })).mutation(({ input }) => {
142232
- const scriptPath = join21(input.path, ".band", input.scriptType);
142233
- if (!existsSync6(scriptPath)) {
142486
+ const scriptPath = join22(input.path, ".band", input.scriptType);
142487
+ if (!existsSync7(scriptPath)) {
142234
142488
  throw new Error(`Script "${input.scriptType}" not found`);
142235
142489
  }
142236
142490
  return new Promise((resolve8, reject) => {
142237
- execFile4("bash", [scriptPath], { cwd: input.path }, (err) => {
142491
+ execFile5("bash", [scriptPath], { cwd: input.path }, (err) => {
142238
142492
  if (err) {
142239
142493
  reject(new Error(err.message));
142240
142494
  } else {
@@ -142314,6 +142568,69 @@ var LANG_MAP = {
142314
142568
  ".svelte": "svelte",
142315
142569
  ".diff": "diff"
142316
142570
  };
142571
+ var compareBranchSchema = external_exports2.string().min(1).regex(/^[^-]/, "branch name must not start with '-'").optional();
142572
+ var EMPTY_TREE_ARGS = ["hash-object", "-t", "tree", "/dev/null"];
142573
+ async function resolveDiffContext(cwd, defaultBranch, diffMode, compareBranchInput) {
142574
+ const compareBranch = diffMode === "uncommitted" ? defaultBranch : compareBranchInput ?? defaultBranch;
142575
+ let headBranch;
142576
+ try {
142577
+ headBranch = (await execGit(["rev-parse", "--abbrev-ref", "HEAD"], cwd)).trim();
142578
+ } catch {
142579
+ headBranch = defaultBranch;
142580
+ }
142581
+ let mergeBase;
142582
+ if (diffMode === "uncommitted") {
142583
+ try {
142584
+ mergeBase = (await execGit(["rev-parse", "HEAD"], cwd)).trim();
142585
+ } catch {
142586
+ mergeBase = (await execGit(EMPTY_TREE_ARGS, cwd)).trim();
142587
+ }
142588
+ } else {
142589
+ try {
142590
+ mergeBase = (await execGit(["merge-base", compareBranch, "HEAD"], cwd)).trim();
142591
+ } catch {
142592
+ mergeBase = (await execGit(EMPTY_TREE_ARGS, cwd)).trim();
142593
+ }
142594
+ }
142595
+ return { compareBranch, headBranch, mergeBase };
142596
+ }
142597
+ function parseDiffStatSummary(statOutput) {
142598
+ const statLines = statOutput.trim().split("\n");
142599
+ const summaryLine = statLines[statLines.length - 1] || "";
142600
+ const filesMatch = summaryLine.match(/(\d+)\s+files?\s+changed/);
142601
+ const insertMatch = summaryLine.match(/(\d+)\s+insertions?\(\+\)/);
142602
+ const deleteMatch = summaryLine.match(/(\d+)\s+deletions?\(-\)/);
142603
+ return {
142604
+ filesChanged: filesMatch ? Number.parseInt(filesMatch[1], 10) : 0,
142605
+ insertions: insertMatch ? Number.parseInt(insertMatch[1], 10) : 0,
142606
+ deletions: deleteMatch ? Number.parseInt(deleteMatch[1], 10) : 0
142607
+ };
142608
+ }
142609
+ function parseFileStatuses(nameStatusOutput) {
142610
+ const fileStatuses = {};
142611
+ for (const line2 of nameStatusOutput.trim().split("\n").filter(Boolean)) {
142612
+ const parts = line2.split(" ");
142613
+ const statusCode = parts[0][0];
142614
+ if (statusCode === "R" && parts[2]) {
142615
+ fileStatuses[parts[2]] = "R";
142616
+ } else if (parts[1]) {
142617
+ fileStatuses[parts[1]] = statusCode;
142618
+ }
142619
+ }
142620
+ return fileStatuses;
142621
+ }
142622
+ async function readUntrackedFileLines(cwd, file2) {
142623
+ try {
142624
+ const content2 = await readFile2(join22(cwd, file2), "utf-8");
142625
+ const lines = content2.split("\n");
142626
+ if (lines.length > 0 && lines[lines.length - 1] === "") {
142627
+ lines.pop();
142628
+ }
142629
+ return lines;
142630
+ } catch {
142631
+ return null;
142632
+ }
142633
+ }
142317
142634
  var workspaceRouter = t2.router({
142318
142635
  getTerminalConfig: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string() })).query(({ input }) => {
142319
142636
  const workspace = resolveWorkspace(input.workspaceId);
@@ -142321,39 +142638,64 @@ var workspaceRouter = t2.router({
142321
142638
  const config2 = loadWorkspaceTerminalConfig(workspace.worktree.path, workspace.project.path);
142322
142639
  return { config: config2 };
142323
142640
  }),
142324
- getDiff: publicProcedure.input(
142325
- external_exports2.object({
142326
- workspaceId: external_exports2.string(),
142327
- contextLines: external_exports2.number().int().min(0).max(99999).optional(),
142328
- diffMode: external_exports2.enum(["uncommitted", "branch"]).optional()
142329
- })
142330
- ).query(async ({ input }) => {
142641
+ listBranches: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string() })).query(async ({ input }) => {
142331
142642
  const workspace = resolveWorkspace(input.workspaceId);
142332
142643
  if (!workspace) {
142333
142644
  throw new Error("Workspace not found");
142334
142645
  }
142335
142646
  const cwd = workspace.worktree.path;
142336
142647
  const defaultBranch = workspace.project.defaultBranch;
142337
- let headBranch;
142648
+ let headBranch = null;
142338
142649
  try {
142339
142650
  headBranch = (await execGit(["rev-parse", "--abbrev-ref", "HEAD"], cwd)).trim();
142340
142651
  } catch {
142341
- headBranch = defaultBranch;
142342
142652
  }
142343
- let mergeBase;
142344
- if (input.diffMode === "uncommitted") {
142345
- try {
142346
- mergeBase = (await execGit(["rev-parse", "HEAD"], cwd)).trim();
142347
- } catch {
142348
- mergeBase = (await execGit(["hash-object", "-t", "tree", "/dev/null"], cwd)).trim();
142349
- }
142350
- } else {
142351
- try {
142352
- mergeBase = (await execGit(["merge-base", defaultBranch, "HEAD"], cwd)).trim();
142353
- } catch {
142354
- mergeBase = (await execGit(["hash-object", "-t", "tree", "/dev/null"], cwd)).trim();
142653
+ let branches = [];
142654
+ try {
142655
+ const output = await execGit(
142656
+ ["for-each-ref", "--format=%(refname:short)", "refs/heads/"],
142657
+ cwd
142658
+ );
142659
+ branches = output.trim().split("\n").map((b10) => b10.trim()).filter(Boolean);
142660
+ } catch (err) {
142661
+ log23.error(
142662
+ `listBranches: for-each-ref failed for ${cwd}: ${err instanceof Error ? err.message : err}`
142663
+ );
142664
+ }
142665
+ const filtered = branches.filter((b10) => b10 !== headBranch);
142666
+ if (defaultBranch !== headBranch) {
142667
+ const idx = filtered.indexOf(defaultBranch);
142668
+ if (idx >= 0) {
142669
+ filtered.splice(idx, 1);
142355
142670
  }
142671
+ filtered.unshift(defaultBranch);
142672
+ }
142673
+ return {
142674
+ branches: filtered,
142675
+ defaultBranch,
142676
+ headBranch: headBranch ?? defaultBranch
142677
+ };
142678
+ }),
142679
+ getDiff: publicProcedure.input(
142680
+ external_exports2.object({
142681
+ workspaceId: external_exports2.string(),
142682
+ contextLines: external_exports2.number().int().min(0).max(99999).optional(),
142683
+ diffMode: external_exports2.enum(["uncommitted", "branch"]).optional(),
142684
+ compareBranch: compareBranchSchema
142685
+ })
142686
+ ).query(async ({ input }) => {
142687
+ const workspace = resolveWorkspace(input.workspaceId);
142688
+ if (!workspace) {
142689
+ throw new Error("Workspace not found");
142356
142690
  }
142691
+ const cwd = workspace.worktree.path;
142692
+ const defaultBranch = workspace.project.defaultBranch;
142693
+ const { compareBranch, headBranch, mergeBase } = await resolveDiffContext(
142694
+ cwd,
142695
+ defaultBranch,
142696
+ input.diffMode ?? "branch",
142697
+ input.compareBranch
142698
+ );
142357
142699
  const diffArgs = ["diff"];
142358
142700
  if (input.contextLines !== void 0) {
142359
142701
  diffArgs.push(`-U${input.contextLines}`);
@@ -142361,57 +142703,36 @@ var workspaceRouter = t2.router({
142361
142703
  diffArgs.push(mergeBase);
142362
142704
  let diff = await execGit(diffArgs, cwd);
142363
142705
  const statOutput = await execGit(["diff", "--stat", mergeBase], cwd);
142364
- const statLines = statOutput.trim().split("\n");
142365
- const summaryLine = statLines[statLines.length - 1] || "";
142366
- let filesChanged = 0;
142367
- let insertions = 0;
142368
- let deletions = 0;
142369
- const filesMatch = summaryLine.match(/(\d+)\s+files?\s+changed/);
142370
- const insertMatch = summaryLine.match(/(\d+)\s+insertions?\(\+\)/);
142371
- const deleteMatch = summaryLine.match(/(\d+)\s+deletions?\(-\)/);
142372
- if (filesMatch) filesChanged = Number.parseInt(filesMatch[1], 10);
142373
- if (insertMatch) insertions = Number.parseInt(insertMatch[1], 10);
142374
- if (deleteMatch) deletions = Number.parseInt(deleteMatch[1], 10);
142375
- const fileStatuses = {};
142706
+ const stats = parseDiffStatSummary(statOutput);
142376
142707
  const nameStatusOutput = await execGit(["diff", "--name-status", mergeBase], cwd);
142377
- for (const line2 of nameStatusOutput.trim().split("\n").filter(Boolean)) {
142378
- const parts = line2.split(" ");
142379
- const statusCode = parts[0][0];
142380
- if (statusCode === "R" && parts[2]) {
142381
- fileStatuses[parts[2]] = "R";
142382
- } else if (parts[1]) {
142383
- fileStatuses[parts[1]] = statusCode;
142384
- }
142385
- }
142708
+ const fileStatuses = parseFileStatuses(nameStatusOutput);
142386
142709
  const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
142387
142710
  const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
142388
142711
  for (const file2 of untrackedFiles) {
142389
- try {
142390
- const content2 = await readFile2(join21(cwd, file2), "utf-8");
142391
- const lines = content2.split("\n");
142392
- if (lines.length > 0 && lines[lines.length - 1] === "") {
142393
- lines.pop();
142394
- }
142395
- diff += `diff --git a/${file2} b/${file2}
142712
+ const lines = await readUntrackedFileLines(cwd, file2);
142713
+ if (lines === null) continue;
142714
+ diff += `diff --git a/${file2} b/${file2}
142396
142715
  `;
142397
- diff += "new file mode 100644\n";
142398
- diff += "--- /dev/null\n";
142399
- diff += `+++ b/${file2}
142716
+ diff += "new file mode 100644\n";
142717
+ diff += "--- /dev/null\n";
142718
+ diff += `+++ b/${file2}
142400
142719
  `;
142401
- diff += `@@ -0,0 +1,${lines.length} @@
142720
+ diff += `@@ -0,0 +1,${lines.length} @@
142402
142721
  `;
142403
- diff += lines.map((l) => `+${l}`).join("\n");
142404
- diff += "\n";
142405
- filesChanged++;
142406
- insertions += lines.length;
142407
- fileStatuses[file2] = "U";
142408
- } catch {
142409
- }
142722
+ diff += lines.map((l) => `+${l}`).join("\n");
142723
+ diff += "\n";
142724
+ stats.filesChanged++;
142725
+ stats.insertions += lines.length;
142726
+ fileStatuses[file2] = "U";
142410
142727
  }
142411
142728
  return {
142412
142729
  diff,
142413
- stats: { filesChanged, insertions, deletions },
142414
- baseBranch: defaultBranch,
142730
+ stats,
142731
+ // `compareBranch` is the branch we diffed against (the user's pick, or
142732
+ // the project default). `defaultBranch` is the project default. They
142733
+ // diverge once a non-default branch is picked.
142734
+ compareBranch,
142735
+ defaultBranch,
142415
142736
  headBranch,
142416
142737
  fileStatuses
142417
142738
  };
@@ -142419,7 +142740,8 @@ var workspaceRouter = t2.router({
142419
142740
  getDiffSummary: publicProcedure.input(
142420
142741
  external_exports2.object({
142421
142742
  workspaceId: external_exports2.string(),
142422
- diffMode: external_exports2.enum(["uncommitted", "branch"]).optional()
142743
+ diffMode: external_exports2.enum(["uncommitted", "branch"]).optional(),
142744
+ compareBranch: compareBranchSchema
142423
142745
  })
142424
142746
  ).query(async ({ input }) => {
142425
142747
  const workspace = resolveWorkspace(input.workspaceId);
@@ -142428,67 +142750,29 @@ var workspaceRouter = t2.router({
142428
142750
  }
142429
142751
  const cwd = workspace.worktree.path;
142430
142752
  const defaultBranch = workspace.project.defaultBranch;
142431
- let headBranch;
142432
- try {
142433
- headBranch = (await execGit(["rev-parse", "--abbrev-ref", "HEAD"], cwd)).trim();
142434
- } catch {
142435
- headBranch = defaultBranch;
142436
- }
142437
- let mergeBase;
142438
- if (input.diffMode === "uncommitted") {
142439
- try {
142440
- mergeBase = (await execGit(["rev-parse", "HEAD"], cwd)).trim();
142441
- } catch {
142442
- mergeBase = (await execGit(["hash-object", "-t", "tree", "/dev/null"], cwd)).trim();
142443
- }
142444
- } else {
142445
- try {
142446
- mergeBase = (await execGit(["merge-base", defaultBranch, "HEAD"], cwd)).trim();
142447
- } catch {
142448
- mergeBase = (await execGit(["hash-object", "-t", "tree", "/dev/null"], cwd)).trim();
142449
- }
142450
- }
142753
+ const { compareBranch, headBranch, mergeBase } = await resolveDiffContext(
142754
+ cwd,
142755
+ defaultBranch,
142756
+ input.diffMode ?? "branch",
142757
+ input.compareBranch
142758
+ );
142451
142759
  const statOutput = await execGit(["diff", "--stat", mergeBase], cwd);
142452
- const statLines = statOutput.trim().split("\n");
142453
- const summaryLine = statLines[statLines.length - 1] || "";
142454
- let filesChanged = 0;
142455
- let insertions = 0;
142456
- let deletions = 0;
142457
- const filesMatch = summaryLine.match(/(\d+)\s+files?\s+changed/);
142458
- const insertMatch = summaryLine.match(/(\d+)\s+insertions?\(\+\)/);
142459
- const deleteMatch = summaryLine.match(/(\d+)\s+deletions?\(-\)/);
142460
- if (filesMatch) filesChanged = Number.parseInt(filesMatch[1], 10);
142461
- if (insertMatch) insertions = Number.parseInt(insertMatch[1], 10);
142462
- if (deleteMatch) deletions = Number.parseInt(deleteMatch[1], 10);
142463
- const fileStatuses = {};
142760
+ const stats = parseDiffStatSummary(statOutput);
142464
142761
  const nameStatusOutput = await execGit(["diff", "--name-status", mergeBase], cwd);
142465
- for (const line2 of nameStatusOutput.trim().split("\n").filter(Boolean)) {
142466
- const parts = line2.split(" ");
142467
- const statusCode = parts[0][0];
142468
- if (statusCode === "R" && parts[2]) {
142469
- fileStatuses[parts[2]] = "R";
142470
- } else if (parts[1]) {
142471
- fileStatuses[parts[1]] = statusCode;
142472
- }
142473
- }
142762
+ const fileStatuses = parseFileStatuses(nameStatusOutput);
142474
142763
  const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
142475
142764
  const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
142476
142765
  for (const file2 of untrackedFiles) {
142477
- try {
142478
- const content2 = await readFile2(join21(cwd, file2), "utf-8");
142479
- const lines = content2.split("\n");
142480
- if (lines.length > 0 && lines[lines.length - 1] === "") {
142481
- lines.pop();
142482
- }
142483
- filesChanged++;
142484
- insertions += lines.length;
142485
- fileStatuses[file2] = "U";
142486
- } catch {
142487
- }
142766
+ const lines = await readUntrackedFileLines(cwd, file2);
142767
+ if (lines === null) continue;
142768
+ stats.filesChanged++;
142769
+ stats.insertions += lines.length;
142770
+ fileStatuses[file2] = "U";
142488
142771
  }
142489
142772
  return {
142490
- stats: { filesChanged, insertions, deletions },
142491
- baseBranch: defaultBranch,
142773
+ stats,
142774
+ compareBranch,
142775
+ defaultBranch,
142492
142776
  headBranch,
142493
142777
  fileStatuses,
142494
142778
  mergeBase
@@ -142511,7 +142795,7 @@ var workspaceRouter = t2.router({
142511
142795
  const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
142512
142796
  if (untrackedFiles.includes(input.filePath)) {
142513
142797
  try {
142514
- const content2 = await readFile2(join21(cwd, input.filePath), "utf-8");
142798
+ const content2 = await readFile2(join22(cwd, input.filePath), "utf-8");
142515
142799
  const lines = content2.split("\n");
142516
142800
  if (lines.length > 0 && lines[lines.length - 1] === "") {
142517
142801
  lines.pop();
@@ -142543,7 +142827,8 @@ var workspaceRouter = t2.router({
142543
142827
  external_exports2.object({
142544
142828
  workspaceId: external_exports2.string(),
142545
142829
  filePath: external_exports2.string(),
142546
- diffMode: external_exports2.enum(["uncommitted", "branch"])
142830
+ diffMode: external_exports2.enum(["uncommitted", "branch"]),
142831
+ compareBranch: compareBranchSchema
142547
142832
  })
142548
142833
  ).mutation(async ({ input }) => {
142549
142834
  const workspace = resolveWorkspace(input.workspaceId);
@@ -142555,24 +142840,15 @@ var workspaceRouter = t2.router({
142555
142840
  const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
142556
142841
  const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
142557
142842
  if (untrackedFiles.includes(filePath)) {
142558
- await rm(join21(cwd, filePath), { force: true });
142843
+ await rm(join22(cwd, filePath), { force: true });
142559
142844
  return { ok: true };
142560
142845
  }
142561
- let ref;
142562
- if (diffMode === "uncommitted") {
142563
- try {
142564
- ref = (await execGit(["rev-parse", "HEAD"], cwd)).trim();
142565
- } catch {
142566
- ref = (await execGit(["hash-object", "-t", "tree", "/dev/null"], cwd)).trim();
142567
- }
142568
- } else {
142569
- const defaultBranch = workspace.project.defaultBranch;
142570
- try {
142571
- ref = (await execGit(["merge-base", defaultBranch, "HEAD"], cwd)).trim();
142572
- } catch {
142573
- ref = (await execGit(["hash-object", "-t", "tree", "/dev/null"], cwd)).trim();
142574
- }
142575
- }
142846
+ const { mergeBase: ref } = await resolveDiffContext(
142847
+ cwd,
142848
+ workspace.project.defaultBranch,
142849
+ diffMode,
142850
+ input.compareBranch
142851
+ );
142576
142852
  const nameStatusOutput = await execGit(["diff", "--name-status", ref, "--", filePath], cwd);
142577
142853
  const statusLine = nameStatusOutput.trim().split("\n").filter(Boolean)[0];
142578
142854
  const fileStatus = statusLine ? statusLine[0] : null;
@@ -142589,7 +142865,7 @@ var workspaceRouter = t2.router({
142589
142865
  throw new Error("Workspace not found");
142590
142866
  }
142591
142867
  const root = workspace.worktree.path;
142592
- const target = resolve6(join21(root, input.path));
142868
+ const target = resolve6(join22(root, input.path));
142593
142869
  if (!target.startsWith(root)) {
142594
142870
  throw new Error("Invalid path");
142595
142871
  }
@@ -142612,7 +142888,7 @@ var workspaceRouter = t2.router({
142612
142888
  throw new Error("Path is required");
142613
142889
  }
142614
142890
  const root = workspace.worktree.path;
142615
- const target = resolve6(join21(root, input.path));
142891
+ const target = resolve6(join22(root, input.path));
142616
142892
  if (!target.startsWith(root)) {
142617
142893
  throw new Error("Invalid path");
142618
142894
  }
@@ -142646,7 +142922,7 @@ var workspaceRouter = t2.router({
142646
142922
  throw new Error("Workspace not found");
142647
142923
  }
142648
142924
  const root = workspace.worktree.path;
142649
- const target = resolve6(join21(root, input.path));
142925
+ const target = resolve6(join22(root, input.path));
142650
142926
  if (!target.startsWith(root)) {
142651
142927
  throw new Error("Invalid path");
142652
142928
  }
@@ -142787,7 +143063,7 @@ var prereqsRouter = t2.router({
142787
143063
  installTunnel: publicProcedure.mutation(async () => {
142788
143064
  const resolvedPath = await shellPath();
142789
143065
  await new Promise((resolve8, reject) => {
142790
- execFile4(
143066
+ execFile5(
142791
143067
  "brew",
142792
143068
  ["install", "cloudflared"],
142793
143069
  { env: { ...process.env, PATH: resolvedPath }, timeout: 12e4 },
@@ -143912,8 +144188,8 @@ function getScalarHtml(specUrl) {
143912
144188
  // start-server.ts
143913
144189
  function logCrash(message) {
143914
144190
  try {
143915
- mkdirSync7(bandHome(), { recursive: true });
143916
- appendFileSync2(join22(bandHome(), "server.log"), message, "utf-8");
144191
+ mkdirSync8(bandHome(), { recursive: true });
144192
+ appendFileSync2(join23(bandHome(), "server.log"), message, "utf-8");
143917
144193
  } catch {
143918
144194
  }
143919
144195
  }
@@ -143938,7 +144214,7 @@ ${error40.stack || error40.message}
143938
144214
  `);
143939
144215
  process.exit(1);
143940
144216
  });
143941
- var clientDir = join22(import.meta.dirname, "client");
144217
+ var clientDir = join23(import.meta.dirname, "client");
143942
144218
  var port = parseInt(process.env.PORT || "3456", 10);
143943
144219
  delete process.env.PORT;
143944
144220
  process.env.BAND_PORT = String(port);
@@ -143949,7 +144225,7 @@ var assets = build_default(clientDir, {
143949
144225
  gzip: true,
143950
144226
  etag: true
143951
144227
  });
143952
- var openApiDoc = JSON.parse(readFileSync8(join22(import.meta.dirname, "openapi.json"), "utf-8"));
144228
+ var openApiDoc = JSON.parse(readFileSync9(join23(import.meta.dirname, "openapi.json"), "utf-8"));
143953
144229
  openApiDoc.servers = [{ url: "/trpc" }];
143954
144230
  var openApiSpec = JSON.stringify(openApiDoc, null, 2);
143955
144231
  var scalarHtml = getScalarHtml("/api/openapi.json");
@@ -143960,9 +144236,9 @@ function serveStaticFile(res, root, subdir, rawFilename) {
143960
144236
  res.end("Bad request");
143961
144237
  return;
143962
144238
  }
143963
- const filePath = join22(root, subdir, filename);
144239
+ const filePath = join23(root, subdir, filename);
143964
144240
  try {
143965
- const fileStat = statSync6(filePath);
144241
+ const fileStat = statSync7(filePath);
143966
144242
  const contentType = mimeTypeFromFilename(filename);
143967
144243
  res.writeHead(200, {
143968
144244
  "Content-Type": contentType,
@@ -143983,14 +144259,14 @@ function serveWorkspaceFile(res, workspaceId, rawPath) {
143983
144259
  return;
143984
144260
  }
143985
144261
  const root = workspace.worktree.path;
143986
- const target = resolve7(join22(root, rawPath));
144262
+ const target = resolve7(join23(root, rawPath));
143987
144263
  if (!target.startsWith(`${root}/`) && target !== root) {
143988
144264
  res.writeHead(400);
143989
144265
  res.end("Bad request");
143990
144266
  return;
143991
144267
  }
143992
144268
  try {
143993
- const fileStat = statSync6(target);
144269
+ const fileStat = statSync7(target);
143994
144270
  const contentType = mimeTypeFromFilename(basename2(target));
143995
144271
  res.writeHead(200, {
143996
144272
  "Content-Type": contentType,
@@ -144035,7 +144311,7 @@ async function main() {
144035
144311
  res.end("Bad request");
144036
144312
  return;
144037
144313
  }
144038
- serveStaticFile(res, bandHome(), join22("shared", partition), rest.slice(slashIdx + 1));
144314
+ serveStaticFile(res, bandHome(), join23("shared", partition), rest.slice(slashIdx + 1));
144039
144315
  return;
144040
144316
  }
144041
144317
  if (req.url?.startsWith("/api/workspace-file/")) {