@band-app/server 0.12.0 → 0.13.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.
- package/dist/client/assets/{DockviewTerminalContainer-B6ls12RP.js → DockviewTerminalContainer-CLlvqDbZ.js} +2 -2
- package/dist/client/assets/TerminalPanel-BE9r8rEY.js +4 -0
- package/dist/client/assets/{_basePickBy-D4ggI4i0.js → _basePickBy-Dh2WFRMd.js} +1 -1
- package/dist/client/assets/{_baseUniq-E0-L58sh.js → _baseUniq-2BIwN7J1.js} +1 -1
- package/dist/client/assets/{arc-Cd0JgGvM.js → arc-Wsw6SggN.js} +1 -1
- package/dist/client/assets/{architectureDiagram-VXUJARFQ-BngJQDkI.js → architectureDiagram-VXUJARFQ-XSuarAoX.js} +1 -1
- package/dist/client/assets/{blockDiagram-VD42YOAC-dcYRXfph.js → blockDiagram-VD42YOAC-DSc5TOI1.js} +1 -1
- package/dist/client/assets/{c4Diagram-YG6GDRKO-B_8XfvfL.js → c4Diagram-YG6GDRKO-DLlwzfnX.js} +1 -1
- package/dist/client/assets/channel-C5uboiOE.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-CFd2iELe.js → chunk-4BX2VUAB-CWduv96U.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-ZI-o1tfy.js → chunk-55IACEB6-D9A39zkK.js} +1 -1
- package/dist/client/assets/{chunk-B4BG7PRW-GcKh0u0t.js → chunk-B4BG7PRW-CUMptYWA.js} +1 -1
- package/dist/client/assets/{chunk-DI55MBZ5-asFoohq8.js → chunk-DI55MBZ5-DIwkyxaQ.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-GmvgLSQe.js → chunk-FMBD7UC4-D8F2lei-.js} +1 -1
- package/dist/client/assets/{chunk-QN33PNHL-CbSPviK8.js → chunk-QN33PNHL-C83_AULb.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-C5_8IhWQ.js → chunk-QZHKN3VN-Dtw-3_KI.js} +1 -1
- package/dist/client/assets/{chunk-TZMSLE5B-CvwKA6rf.js → chunk-TZMSLE5B-Cg9TlQ9E.js} +1 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-CbG2RU7R.js +1 -0
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-CbG2RU7R.js +1 -0
- package/dist/client/assets/clone-vDxxg1dv.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-CFOKjm00.js → cose-bilkent-S5V4N54A-Drnoe6yO.js} +1 -1
- package/dist/client/assets/{dagre-6UL2VRFP-XkiKAfAP.js → dagre-6UL2VRFP-BgY7fnyf.js} +2 -2
- package/dist/client/assets/{diagram-PSM6KHXK-D7OJGDF1.js → diagram-PSM6KHXK-bmxBt_Q-.js} +1 -1
- package/dist/client/assets/{diagram-QEK2KX5R-CNDqB5ur.js → diagram-QEK2KX5R-DGUqlb8j.js} +1 -1
- package/dist/client/assets/{diagram-S2PKOQOG-DHWhfYWy.js → diagram-S2PKOQOG-DxXpOhvW.js} +1 -1
- package/dist/client/assets/{erDiagram-Q2GNP2WA-DlhzEgw7.js → erDiagram-Q2GNP2WA-eZBtaSzD.js} +1 -1
- package/dist/client/assets/{flowDiagram-NV44I4VS-BabYr6zd.js → flowDiagram-NV44I4VS-Dfwd3PGB.js} +1 -1
- package/dist/client/assets/{ganttDiagram-JELNMOA3-CUHxh1TA.js → ganttDiagram-JELNMOA3-BAMeSthd.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-DSDd-EJ_.js → gitGraphDiagram-V2S2FVAM-Dts_Yrpu.js} +1 -1
- package/dist/client/assets/{graph-DXNVnA6H.js → graph-BuNOEI6L.js} +1 -1
- package/dist/client/assets/{highlighted-body-B3W2YXNL-B79dTSwx.js → highlighted-body-B3W2YXNL-Btj0UZe1.js} +1 -1
- package/dist/client/assets/{index-_J9aGl-d.js → index-B4xvdE9X.js} +1 -1
- package/dist/client/assets/{index-BqDdB0tU.js → index-BFyseSVV.js} +1 -1
- package/dist/client/assets/{index-CjixM2mV.js → index-Bmhh2EB_.js} +1 -1
- package/dist/client/assets/{index-DutxFSic.js → index-CF7iJtA6.js} +1 -1
- package/dist/client/assets/{index-D-7FXjIA.js → index-D7TqJ9RF.js} +1 -1
- package/dist/client/assets/{index-EdY6fqdn.js → index-DOb48mtv.js} +2 -2
- package/dist/client/assets/{index-DRS8jN52.js → index-DR-TpUg3.js} +1 -1
- package/dist/client/assets/{index-CTR_yHqa.js → index-DaorCZSP.js} +1 -1
- package/dist/client/assets/{index-DktZbpGM.js → index-JytYW91Z.js} +1 -1
- package/dist/client/assets/{index-Cu2rqq8f.js → index-Ktl6P-nc.js} +1 -1
- package/dist/client/assets/{index-Bvony7H7.js → index-Qm_HbX1-.js} +1 -1
- package/dist/client/assets/{index-4srNURyv.js → index-Vaa1H_pP.js} +1 -1
- package/dist/client/assets/{index-okqFBuO9.js → index-cErwJT25.js} +1 -1
- package/dist/client/assets/{index-5jOljAlc.js → index-g5xXrehm.js} +1 -1
- package/dist/client/assets/{index-BNkxX-BD.js → index-gv6bT0S4.js} +1 -1
- package/dist/client/assets/{index-BQU-JREs.js → index-sMR7WunY.js} +1 -1
- package/dist/client/assets/{index-BVLYlk0y.js → index-tIReXko0.js} +1 -1
- package/dist/client/assets/{index-CPo0kKmX.js → index-xEL9mxnj.js} +1 -1
- package/dist/client/assets/{infoDiagram-HS3SLOUP-tDVIKvh1.js → infoDiagram-HS3SLOUP-ygUopIDr.js} +1 -1
- package/dist/client/assets/{journeyDiagram-XKPGCS4Q-cFY68TOP.js → journeyDiagram-XKPGCS4Q-C7fCACOj.js} +1 -1
- package/dist/client/assets/{kanban-definition-3W4ZIXB7-CTQ8WBzj.js → kanban-definition-3W4ZIXB7-4jf7Ztsb.js} +1 -1
- package/dist/client/assets/{layout-BDsby01A.js → layout-DBEGDIe2.js} +1 -1
- package/dist/client/assets/{linear-B321DwjU.js → linear-2Gp1gLY9.js} +1 -1
- package/dist/client/assets/main-4FaYQ5DQ.css +1 -0
- package/dist/client/assets/{main-gKX_m5Ko.js → main-CzHZzsmJ.js} +206 -206
- package/dist/client/assets/{mindmap-definition-VGOIOE7T-CMbXBgve.js → mindmap-definition-VGOIOE7T-CiziEudd.js} +1 -1
- package/dist/client/assets/{pieDiagram-ADFJNKIX-pTHsfneI.js → pieDiagram-ADFJNKIX-DTFtaGug.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AYHSOK5B-DNGhzaPi.js → quadrantDiagram-AYHSOK5B-fbALF3fd.js} +1 -1
- package/dist/client/assets/{requirementDiagram-UZGBJVZJ-E5dChVU-.js → requirementDiagram-UZGBJVZJ-CRl9BPyr.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-TZEHDZUN-B858cwBV.js → sankeyDiagram-TZEHDZUN-RgshY6u-.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WL72ISMW-Clbop1Lh.js → sequenceDiagram-WL72ISMW-BbgPIX0Q.js} +1 -1
- package/dist/client/assets/{square-terminal-zBRLwN9m.js → square-terminal-DCU0c-OS.js} +1 -1
- package/dist/client/assets/{stateDiagram-FKZM4ZOC-BRIoi38Z.js → stateDiagram-FKZM4ZOC-feRu8oRh.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-By7mP9TH.js +1 -0
- package/dist/client/assets/{timeline-definition-IT6M3QCI-C26dPldo.js → timeline-definition-IT6M3QCI-BqWKbKID.js} +1 -1
- package/dist/client/assets/{treemap-GDKQZRPO-l9jcKCpW.js → treemap-GDKQZRPO-D0xFOnga.js} +1 -1
- package/dist/client/assets/{useSessionListContext-MLsp0tQx.js → useSessionListContext-PZqsgbdH.js} +1 -1
- package/dist/client/assets/workspace._workspaceId-djkhDM0B.js +1 -0
- package/dist/client/assets/{workspace._workspaceId.changes-sSj8FhGC.js → workspace._workspaceId.changes-InUdTCW0.js} +1 -1
- package/dist/client/assets/workspace._workspaceId.code-B2HMVWnI.js +1 -0
- package/dist/client/assets/{workspace._workspaceId.code._-BVzwjj6w.js → workspace._workspaceId.code._-iCOKNXeZ.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.code.index-V90FWX2z.js → workspace._workspaceId.code.index-DMKkXryF.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.index-Cczg6N56.js → workspace._workspaceId.index-BZyamHNS.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.terminal-CFJVgZLo.js → workspace._workspaceId.terminal-4F7quTy3.js} +2 -2
- package/dist/client/assets/{xychartDiagram-PRI3JC2R-Cwsp2BWQ.js → xychartDiagram-PRI3JC2R-DicPcjot.js} +1 -1
- package/dist/server/assets/{DockviewTerminalContainer-B5lZSZ8Y.js → DockviewTerminalContainer-BBQnIZa3.js} +3 -3
- package/dist/server/assets/TerminalPanel-B1dKqOMK.js +1016 -0
- package/dist/server/assets/{_basePickBy-CD1u5dYZ.js → _basePickBy-BoCJVKe_.js} +2 -2
- package/dist/server/assets/{_baseUniq-BdmRs4hY.js → _baseUniq-DCXNOsnI.js} +1 -1
- package/dist/server/assets/{_tanstack-start-manifest_v-D4xipytj.js → _tanstack-start-manifest_v-2CeISY5W.js} +1 -1
- package/dist/server/assets/{arc-CbjxAGh2.js → arc-BFMEbbxV.js} +1 -1
- package/dist/server/assets/{architecture-7HQA4BMR-PvoHywyl.js → architecture-7HQA4BMR-4b2GJppC.js} +6 -6
- package/dist/server/assets/{architectureDiagram-VXUJARFQ-CYVR-HeO.js → architectureDiagram-VXUJARFQ-iVW_FQ4S.js} +6 -6
- package/dist/server/assets/{blockDiagram-VD42YOAC-oFwYjSKc.js → blockDiagram-VD42YOAC-D1iPUb9l.js} +6 -6
- package/dist/server/assets/{c4Diagram-YG6GDRKO-BRcTuK4Y.js → c4Diagram-YG6GDRKO-DI4Ztwr3.js} +2 -2
- package/dist/server/assets/{channel-DkpUIvTk.js → channel-VwPrL84U.js} +1 -1
- package/dist/server/assets/{chunk-4BX2VUAB-Db1P5ZKT.js → chunk-4BX2VUAB-B9WFGVXO.js} +1 -1
- package/dist/server/assets/{chunk-55IACEB6-CgF3c_s9.js → chunk-55IACEB6-cnFKsxmn.js} +1 -1
- package/dist/server/assets/{chunk-B4BG7PRW-C4lPp_gR.js → chunk-B4BG7PRW-DVIhTopX.js} +4 -4
- package/dist/server/assets/{chunk-DI55MBZ5-DBc5FE0O.js → chunk-DI55MBZ5-a2cj65b-.js} +3 -3
- package/dist/server/assets/{chunk-FMBD7UC4-BmyVhHTD.js → chunk-FMBD7UC4-D79uNYe4.js} +1 -1
- package/dist/server/assets/{chunk-QN33PNHL-MEMc-HV1.js → chunk-QN33PNHL-BDbkmWdo.js} +1 -1
- package/dist/server/assets/{chunk-QZHKN3VN-D0s55-ob.js → chunk-QZHKN3VN-CIC4C0nk.js} +1 -1
- package/dist/server/assets/{chunk-TZMSLE5B-CHLAtcyP.js → chunk-TZMSLE5B-BQBr1RGS.js} +1 -1
- package/dist/server/assets/{classDiagram-v2-WZHVMYZB-D_KqC8CP.js → classDiagram-2ON5EDUG-CtbqESgu.js} +5 -5
- package/dist/server/assets/{classDiagram-2ON5EDUG-D_KqC8CP.js → classDiagram-v2-WZHVMYZB-CtbqESgu.js} +5 -5
- package/dist/server/assets/{clone-pAcegSV_.js → clone-Bnbf9Iqg.js} +1 -1
- package/dist/server/assets/{cose-bilkent-S5V4N54A-I5bimXZO.js → cose-bilkent-S5V4N54A-DQl5SFk6.js} +1 -1
- package/dist/server/assets/{dagre-6UL2VRFP-BFEXHp44.js → dagre-6UL2VRFP-DWcFImvS.js} +6 -6
- package/dist/server/assets/{diagram-PSM6KHXK-B4UG8ra3.js → diagram-PSM6KHXK-CAIVqsc3.js} +7 -7
- package/dist/server/assets/{diagram-QEK2KX5R-B65vkBbU.js → diagram-QEK2KX5R-Dc8wo9c1.js} +6 -6
- package/dist/server/assets/{diagram-S2PKOQOG-DUV65VxH.js → diagram-S2PKOQOG-ZNcpDFrx.js} +6 -6
- package/dist/server/assets/{erDiagram-Q2GNP2WA-eEKIOvT3.js → erDiagram-Q2GNP2WA-BYLAWy_j.js} +4 -4
- package/dist/server/assets/{flowDiagram-NV44I4VS-B0GxfKRu.js → flowDiagram-NV44I4VS-CzcX8svk.js} +5 -5
- package/dist/server/assets/{ganttDiagram-JELNMOA3-etJ_j_I0.js → ganttDiagram-JELNMOA3-Dxwzox2R.js} +2 -2
- package/dist/server/assets/{gitGraph-G5XIXVHT-DE59sCs-.js → gitGraph-G5XIXVHT-LK8-a2sz.js} +6 -6
- package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-BZuXPjR3.js → gitGraphDiagram-V2S2FVAM-DlgLrJB0.js} +7 -7
- package/dist/server/assets/{graph-HlbQNgKh.js → graph-BXmxFNFp.js} +2 -2
- package/dist/server/assets/{highlighted-body-B3W2YXNL-CGZmJ48I.js → highlighted-body-B3W2YXNL-DsSe47sR.js} +1 -1
- package/dist/server/assets/{index-B_gLaw5q.js → index-4YgzFKOD.js} +5 -5
- package/dist/server/assets/{index-kEUC1eer.js → index-5upQdcP2.js} +2 -2
- package/dist/server/assets/{index-DfuZ1SKx.js → index-B-LK0PYZ.js} +2 -2
- package/dist/server/assets/{index-CReShbyg.js → index-BSojqZdf.js} +2 -2
- package/dist/server/assets/{index-DVIqYu1B.js → index-BbjwIyTa.js} +5 -5
- package/dist/server/assets/{index-B2NbB5n_.js → index-BdNVOcCL.js} +2 -2
- package/dist/server/assets/{index-DoEmUqp6.js → index-BrkgyCV3.js} +2 -2
- package/dist/server/assets/{index-BggD7xEz.js → index-BsoOL_wq.js} +2 -2
- package/dist/server/assets/{index-BquoD96E.js → index-CVjIVbLj.js} +2 -2
- package/dist/server/assets/{index-0Vp2EuiF.js → index-CWtvbkAQ.js} +3 -3
- package/dist/server/assets/{index-CqJMMgyN.js → index-CXycOokw.js} +2 -2
- package/dist/server/assets/{index-CcRwhNJ0.js → index-CaaOSPL7.js} +3 -3
- package/dist/server/assets/{index-Cq-S8ocb.js → index-CnLND4um.js} +1 -1
- package/dist/server/assets/{index-CozxyE6F.js → index-DM2r-vGW.js} +2 -2
- package/dist/server/assets/{index-KO85K6gg.js → index-DdVNSMNY.js} +2 -2
- package/dist/server/assets/{index-BYATJkV0.js → index-Do1Nx4aA.js} +1 -1
- package/dist/server/assets/{index-oAvn7Kbw.js → index-nKutdysv.js} +2 -2
- package/dist/server/assets/{index-DsW29Azb.js → index-oC76KgvT.js} +4 -4
- package/dist/server/assets/{info-VBDWY6EO-DFb5bmEE.js → info-VBDWY6EO-CM7NSJD8.js} +6 -6
- package/dist/server/assets/{infoDiagram-HS3SLOUP-DUDXdFYe.js → infoDiagram-HS3SLOUP-QMxyRHM5.js} +5 -5
- package/dist/server/assets/{journeyDiagram-XKPGCS4Q-BnEH3kK2.js → journeyDiagram-XKPGCS4Q-BoA6PlCZ.js} +4 -4
- package/dist/server/assets/{kanban-definition-3W4ZIXB7-BPnM08KT.js → kanban-definition-3W4ZIXB7-r6KtKaEH.js} +2 -2
- package/dist/server/assets/{layout-CnirhobE.js → layout-D3Do3Tbk.js} +4 -4
- package/dist/server/assets/{linear-CLJDiqhJ.js → linear-CC2CX22M.js} +1 -1
- package/dist/server/assets/{mermaid-3ZIDBTTL-Dyndt6u2.js → mermaid-3ZIDBTTL-De3B4GT2.js} +1 -1
- package/dist/server/assets/{mermaid-parser.core-DxDjr9RA.js → mermaid-parser.core-BNbfHMQU.js} +11 -11
- package/dist/server/assets/{mindmap-definition-VGOIOE7T-CPnGCXl9.js → mindmap-definition-VGOIOE7T-BZA0jx43.js} +3 -3
- package/dist/server/assets/{packet-DYOGHKS2-Bt7VjiqG.js → packet-DYOGHKS2-FVoQy92R.js} +6 -6
- package/dist/server/assets/{pie-VRWISCQL-CpD4BgbA.js → pie-VRWISCQL-BGUPFoed.js} +6 -6
- package/dist/server/assets/{pieDiagram-ADFJNKIX-BSx8zl8i.js → pieDiagram-ADFJNKIX-6xe9bPcx.js} +7 -7
- package/dist/server/assets/{quadrantDiagram-AYHSOK5B-B08pRdHD.js → quadrantDiagram-AYHSOK5B-DrjB4XQc.js} +2 -2
- package/dist/server/assets/{radar-ZZBFDIW7-BeHVWQbv.js → radar-ZZBFDIW7-BioEa_Uy.js} +6 -6
- package/dist/server/assets/{requirementDiagram-UZGBJVZJ-BtjVtNFU.js → requirementDiagram-UZGBJVZJ-BQUraj5G.js} +3 -3
- package/dist/server/assets/{router-VlIt4cC5.js → router-Ch9bBOlF.js} +312 -236
- package/dist/server/assets/{sankeyDiagram-TZEHDZUN-CG6DECc6.js → sankeyDiagram-TZEHDZUN-qdkVPLba.js} +1 -1
- package/dist/server/assets/{sequenceDiagram-WL72ISMW-DEfVJQli.js → sequenceDiagram-WL72ISMW-Bh5Gu2_v.js} +3 -3
- package/dist/server/assets/{square-terminal-DTO02O7S.js → square-terminal-DVnlJfcM.js} +1 -1
- package/dist/server/assets/{stateDiagram-FKZM4ZOC-DblYyAIC.js → stateDiagram-FKZM4ZOC-BUasl40g.js} +8 -8
- package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-YhMCeOsH.js → stateDiagram-v2-4FDKWEC3-BL56MbOT.js} +4 -4
- package/dist/server/assets/{timeline-definition-IT6M3QCI-CDEJSclA.js → timeline-definition-IT6M3QCI-oGfd7fF8.js} +2 -2
- package/dist/server/assets/{treemap-GDKQZRPO-Tg2S6NSt.js → treemap-GDKQZRPO-CELUCxyO.js} +6 -6
- package/dist/server/assets/{workspace._workspaceId-CVnwrhnX.js → workspace._workspaceId-DhJMpGAq.js} +10 -4
- package/dist/server/assets/{workspace._workspaceId.changes-CsJMr9Ve.js → workspace._workspaceId.changes-5-0MP0m5.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.code._-CjSLVs7D.js → workspace._workspaceId.code._-BFbAz_ei.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.code.index-BhUZuUX-.js → workspace._workspaceId.code.index-BepZ481b.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.index-CmBIxfCl.js → workspace._workspaceId.index-Cp3_jFDn.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.terminal-BehWU5SY.js → workspace._workspaceId.terminal-B5beQDh_.js} +2 -2
- package/dist/server/assets/{xychartDiagram-PRI3JC2R-DAT7FXvH.js → xychartDiagram-PRI3JC2R-qDOKCR8M.js} +2 -2
- package/dist/server/server.js +2 -2
- package/dist/start-server.mjs +438 -246
- package/package.json +5 -5
- package/dist/client/assets/TerminalPanel-CTjPLr1l.js +0 -4
- package/dist/client/assets/channel-BN9rr7kd.js +0 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-f-3sWSXi.js +0 -1
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-f-3sWSXi.js +0 -1
- package/dist/client/assets/clone-DyjKoDMl.js +0 -1
- package/dist/client/assets/main-7lUOPiu0.css +0 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-BXdrXPzW.js +0 -1
- package/dist/client/assets/workspace._workspaceId-CKxw1xn1.js +0 -1
- package/dist/client/assets/workspace._workspaceId.code-CTG7u893.js +0 -1
- package/dist/server/assets/TerminalPanel-_8vdN94i.js +0 -442
package/dist/start-server.mjs
CHANGED
|
@@ -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:
|
|
5651
|
+
var { join: join25 } = __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"] ||
|
|
5687
|
+
const toExecute = bundlerOverrides["thread-stream-worker"] || join25(__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:
|
|
6073
|
+
var { join: join25, isAbsolute, sep: sep3 } = __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"] ||
|
|
6136
|
+
target = bundlerOverrides["pino-worker"] || join25(__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"] ||
|
|
6154
|
+
target = bundlerOverrides["pino-worker"] || join25(__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
|
|
6176
|
+
return join25(__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
|
|
7165
|
+
let join25 = ",";
|
|
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
|
-
|
|
7179
|
+
join25 = `,
|
|
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 +=
|
|
7187
|
+
res += join25;
|
|
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 += `${
|
|
7193
|
+
res += `${join25}"... ${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
|
-
|
|
7214
|
+
join25 = `,
|
|
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 =
|
|
7228
|
+
separator = join25;
|
|
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 =
|
|
7234
|
+
separator = join25;
|
|
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
|
|
7275
|
+
let join25 = ",";
|
|
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
|
-
|
|
7288
|
+
join25 = `,
|
|
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 +=
|
|
7296
|
+
res += join25;
|
|
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 += `${
|
|
7302
|
+
res += `${join25}"... ${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
|
-
|
|
7315
|
+
join25 = `,
|
|
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 =
|
|
7324
|
+
separator = join25;
|
|
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
|
|
7382
|
+
const join26 = `,
|
|
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 +=
|
|
7389
|
+
res2 += join26;
|
|
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 += `${
|
|
7395
|
+
res2 += `${join26}"... ${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
|
|
7411
|
+
const join25 = `,
|
|
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,
|
|
7417
|
+
res += stringifyTypedArray(value, join25, maximumBreadth);
|
|
7418
7418
|
keys = keys.slice(value.length);
|
|
7419
7419
|
maximumPropertiesToStringify -= value.length;
|
|
7420
|
-
separator =
|
|
7420
|
+
separator = join25;
|
|
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 =
|
|
7431
|
+
separator = join25;
|
|
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 =
|
|
7437
|
+
separator = join25;
|
|
7438
7438
|
}
|
|
7439
7439
|
if (separator !== "") {
|
|
7440
7440
|
res = `
|
|
@@ -30918,7 +30918,7 @@ __export(openai_codex_exports, {
|
|
|
30918
30918
|
import { homedir as homedir2 } from "node:os";
|
|
30919
30919
|
import { join as join5 } from "node:path";
|
|
30920
30920
|
function getOpenAICodexInstallSkillsDir(home = homedir2()) {
|
|
30921
|
-
const codexHome = process.env.CODEX_HOME
|
|
30921
|
+
const codexHome = process.env.CODEX_HOME || join5(home, ".codex");
|
|
30922
30922
|
return join5(codexHome, "skills");
|
|
30923
30923
|
}
|
|
30924
30924
|
function discoverCodexSkills(workspaceDir) {
|
|
@@ -31600,7 +31600,7 @@ function resolveCodexBinary() {
|
|
|
31600
31600
|
}
|
|
31601
31601
|
}
|
|
31602
31602
|
function getCodexInstallSkillsDir(home = homedir3()) {
|
|
31603
|
-
const codexHome = process.env.CODEX_HOME
|
|
31603
|
+
const codexHome = process.env.CODEX_HOME || join6(home, ".codex");
|
|
31604
31604
|
return join6(codexHome, "skills");
|
|
31605
31605
|
}
|
|
31606
31606
|
function discoverCodexSkills2(workspaceDir) {
|
|
@@ -89261,7 +89261,7 @@ var require_dist5 = __commonJS({
|
|
|
89261
89261
|
// start-server.ts
|
|
89262
89262
|
import { appendFileSync as appendFileSync2, createReadStream as createReadStream3, mkdirSync as mkdirSync8, readFileSync as readFileSync9, statSync as statSync7 } from "node:fs";
|
|
89263
89263
|
import { createServer } from "node:http";
|
|
89264
|
-
import { basename as basename2, join as
|
|
89264
|
+
import { basename as basename2, join as join24, resolve as resolve7 } from "node:path";
|
|
89265
89265
|
|
|
89266
89266
|
// ../../node_modules/.pnpm/@trpc+server@11.12.0_typescript@5.9.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
|
|
89267
89267
|
function mergeWithoutOverrides(obj1, ...objs) {
|
|
@@ -108432,7 +108432,7 @@ init_src();
|
|
|
108432
108432
|
// src/lib/agent-pool.ts
|
|
108433
108433
|
import { readFileSync as readFileSync5 } from "node:fs";
|
|
108434
108434
|
import { homedir as homedir8 } from "node:os";
|
|
108435
|
-
import { join as
|
|
108435
|
+
import { join as join13 } from "node:path";
|
|
108436
108436
|
|
|
108437
108437
|
// ../../packages/coding-agent/src/config.ts
|
|
108438
108438
|
init_zod();
|
|
@@ -108540,6 +108540,7 @@ async function createCodingAgent(config2) {
|
|
|
108540
108540
|
|
|
108541
108541
|
// ../../packages/coding-agent/src/install-skills.ts
|
|
108542
108542
|
import { homedir as homedir6 } from "node:os";
|
|
108543
|
+
import { join as join9 } from "node:path";
|
|
108543
108544
|
async function getInstallSkillsDir(type, home = homedir6()) {
|
|
108544
108545
|
switch (type) {
|
|
108545
108546
|
case "claude-code": {
|
|
@@ -108566,28 +108567,27 @@ async function getInstallSkillsDir(type, home = homedir6()) {
|
|
|
108566
108567
|
return null;
|
|
108567
108568
|
}
|
|
108568
108569
|
}
|
|
108569
|
-
|
|
108570
|
+
function getSharedSkillsDir(home = homedir6()) {
|
|
108571
|
+
return join9(home, ".agents", "skills");
|
|
108572
|
+
}
|
|
108573
|
+
var SUPPORTED_AGENT_TYPES = [
|
|
108574
|
+
"claude-code",
|
|
108575
|
+
"codex",
|
|
108576
|
+
"openai-codex",
|
|
108577
|
+
"gemini-cli",
|
|
108578
|
+
"opencode"
|
|
108579
|
+
];
|
|
108580
|
+
function getAgentConfigDir(type, home = homedir6()) {
|
|
108570
108581
|
switch (type) {
|
|
108571
|
-
case "claude-code":
|
|
108572
|
-
|
|
108573
|
-
|
|
108574
|
-
|
|
108575
|
-
|
|
108576
|
-
|
|
108577
|
-
return
|
|
108578
|
-
|
|
108579
|
-
|
|
108580
|
-
const { OPENAI_CODEX_DEFAULT_BINARY: OPENAI_CODEX_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_openai_codex(), openai_codex_exports));
|
|
108581
|
-
return OPENAI_CODEX_DEFAULT_BINARY2;
|
|
108582
|
-
}
|
|
108583
|
-
case "gemini-cli": {
|
|
108584
|
-
const { GEMINI_CLI_DEFAULT_BINARY: GEMINI_CLI_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_gemini_cli(), gemini_cli_exports));
|
|
108585
|
-
return GEMINI_CLI_DEFAULT_BINARY2;
|
|
108586
|
-
}
|
|
108587
|
-
case "opencode": {
|
|
108588
|
-
const { OPENCODE_DEFAULT_BINARY: OPENCODE_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_opencode(), opencode_exports));
|
|
108589
|
-
return OPENCODE_DEFAULT_BINARY2;
|
|
108590
|
-
}
|
|
108582
|
+
case "claude-code":
|
|
108583
|
+
return join9(home, ".claude");
|
|
108584
|
+
case "codex":
|
|
108585
|
+
case "openai-codex":
|
|
108586
|
+
return process.env.CODEX_HOME || join9(home, ".codex");
|
|
108587
|
+
case "gemini-cli":
|
|
108588
|
+
return join9(home, ".gemini");
|
|
108589
|
+
case "opencode":
|
|
108590
|
+
return join9(home, ".config", "opencode");
|
|
108591
108591
|
default:
|
|
108592
108592
|
return null;
|
|
108593
108593
|
}
|
|
@@ -108600,7 +108600,7 @@ init_src();
|
|
|
108600
108600
|
import { randomBytes } from "node:crypto";
|
|
108601
108601
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync } from "node:fs";
|
|
108602
108602
|
import { homedir as homedir7 } from "node:os";
|
|
108603
|
-
import { dirname, join as
|
|
108603
|
+
import { dirname, join as join12 } from "node:path";
|
|
108604
108604
|
|
|
108605
108605
|
// ../../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
|
|
108606
108606
|
var React4 = __toESM(require_react(), 1);
|
|
@@ -120627,22 +120627,25 @@ var isElectron = typeof window !== "undefined" && "__BAND_DESKTOP__" in window;
|
|
|
120627
120627
|
|
|
120628
120628
|
// ../../packages/dashboard-core/src/components/DiffView.tsx
|
|
120629
120629
|
init_dist4();
|
|
120630
|
-
var
|
|
120630
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
120631
120631
|
|
|
120632
|
-
// ../../packages/dashboard-core/src/hooks/use-
|
|
120632
|
+
// ../../packages/dashboard-core/src/hooks/use-diff-target.ts
|
|
120633
120633
|
var import_react25 = __toESM(require_react(), 1);
|
|
120634
120634
|
|
|
120635
|
+
// ../../packages/dashboard-core/src/hooks/use-search.ts
|
|
120636
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
120637
|
+
|
|
120635
120638
|
// ../../packages/dashboard-core/src/components/ChangesFileTree.tsx
|
|
120636
|
-
var
|
|
120639
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
120637
120640
|
|
|
120638
120641
|
// ../../packages/dashboard-core/src/hooks/use-deferred-menu-action.ts
|
|
120639
|
-
var
|
|
120642
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
120640
120643
|
function useDeferredMenuAction() {
|
|
120641
|
-
const pendingRef = (0,
|
|
120642
|
-
const queue = (0,
|
|
120644
|
+
const pendingRef = (0, import_react27.useRef)(null);
|
|
120645
|
+
const queue = (0, import_react27.useCallback)((fn) => {
|
|
120643
120646
|
pendingRef.current = fn;
|
|
120644
120647
|
}, []);
|
|
120645
|
-
const flush = (0,
|
|
120648
|
+
const flush = (0, import_react27.useCallback)((e2) => {
|
|
120646
120649
|
e2.preventDefault();
|
|
120647
120650
|
const fn = pendingRef.current;
|
|
120648
120651
|
pendingRef.current = null;
|
|
@@ -120801,7 +120804,7 @@ var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
|
120801
120804
|
|
|
120802
120805
|
// ../../packages/dashboard-core/src/components/SearchBar.tsx
|
|
120803
120806
|
var import_lucide_react7 = __toESM(require_lucide_react(), 1);
|
|
120804
|
-
var
|
|
120807
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
120805
120808
|
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
120806
120809
|
var DEFAULT_VISIBLE_OPTIONS = ["caseSensitive", "wholeWord", "regex"];
|
|
120807
120810
|
function ToggleButton({
|
|
@@ -120821,7 +120824,7 @@ function ToggleButton({
|
|
|
120821
120824
|
}
|
|
120822
120825
|
);
|
|
120823
120826
|
}
|
|
120824
|
-
var SearchBar = (0,
|
|
120827
|
+
var SearchBar = (0, import_react29.forwardRef)(function SearchBar2({
|
|
120825
120828
|
query,
|
|
120826
120829
|
onQueryChange,
|
|
120827
120830
|
options: options2,
|
|
@@ -120837,18 +120840,18 @@ var SearchBar = (0, import_react28.forwardRef)(function SearchBar2({
|
|
|
120837
120840
|
const showCase = visibleOptions.includes("caseSensitive");
|
|
120838
120841
|
const showWholeWord = visibleOptions.includes("wholeWord");
|
|
120839
120842
|
const showRegex = visibleOptions.includes("regex");
|
|
120840
|
-
const inputRef = (0,
|
|
120841
|
-
(0,
|
|
120843
|
+
const inputRef = (0, import_react29.useRef)(null);
|
|
120844
|
+
(0, import_react29.useImperativeHandle)(ref, () => ({
|
|
120842
120845
|
focus: () => inputRef.current?.focus(),
|
|
120843
120846
|
select: () => inputRef.current?.select()
|
|
120844
120847
|
}));
|
|
120845
|
-
const toggleCase = (0,
|
|
120848
|
+
const toggleCase = (0, import_react29.useCallback)(() => {
|
|
120846
120849
|
onOptionsChange({ ...options2, caseSensitive: !options2.caseSensitive });
|
|
120847
120850
|
}, [options2, onOptionsChange]);
|
|
120848
|
-
const toggleWholeWord = (0,
|
|
120851
|
+
const toggleWholeWord = (0, import_react29.useCallback)(() => {
|
|
120849
120852
|
onOptionsChange({ ...options2, wholeWord: !options2.wholeWord });
|
|
120850
120853
|
}, [options2, onOptionsChange]);
|
|
120851
|
-
const toggleRegex = (0,
|
|
120854
|
+
const toggleRegex = (0, import_react29.useCallback)(() => {
|
|
120852
120855
|
onOptionsChange({ ...options2, regex: !options2.regex });
|
|
120853
120856
|
}, [options2, onOptionsChange]);
|
|
120854
120857
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
@@ -120971,7 +120974,7 @@ var diffTheme = EditorView.theme({
|
|
|
120971
120974
|
|
|
120972
120975
|
// ../../packages/dashboard-core/src/components/FileBrowser.tsx
|
|
120973
120976
|
var import_lucide_react8 = __toESM(require_lucide_react(), 1);
|
|
120974
|
-
var
|
|
120977
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
120975
120978
|
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
120976
120979
|
var expandedStateCache = /* @__PURE__ */ new Map();
|
|
120977
120980
|
var dirContentsCache = /* @__PURE__ */ new Map();
|
|
@@ -121001,11 +121004,11 @@ function EntryNameInput({
|
|
|
121001
121004
|
onSubmit,
|
|
121002
121005
|
onCancel
|
|
121003
121006
|
}) {
|
|
121004
|
-
const [value, setValue] = (0,
|
|
121005
|
-
const [submitting, setSubmitting] = (0,
|
|
121006
|
-
const [error40, setError] = (0,
|
|
121007
|
-
const inputRef = (0,
|
|
121008
|
-
(0,
|
|
121007
|
+
const [value, setValue] = (0, import_react31.useState)(initialValue);
|
|
121008
|
+
const [submitting, setSubmitting] = (0, import_react31.useState)(false);
|
|
121009
|
+
const [error40, setError] = (0, import_react31.useState)(null);
|
|
121010
|
+
const inputRef = (0, import_react31.useRef)(null);
|
|
121011
|
+
(0, import_react31.useEffect)(() => {
|
|
121009
121012
|
const el = inputRef.current;
|
|
121010
121013
|
if (!el) return;
|
|
121011
121014
|
el.focus();
|
|
@@ -121388,7 +121391,7 @@ function TreeNode2({
|
|
|
121388
121391
|
})()
|
|
121389
121392
|
] });
|
|
121390
121393
|
}
|
|
121391
|
-
var FileBrowser = (0,
|
|
121394
|
+
var FileBrowser = (0, import_react31.forwardRef)(function FileBrowser2({
|
|
121392
121395
|
workspaceId,
|
|
121393
121396
|
onOpenFile,
|
|
121394
121397
|
onOpenFilePinned,
|
|
@@ -121398,23 +121401,23 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121398
121401
|
onPathDeleted
|
|
121399
121402
|
}, handleRef) {
|
|
121400
121403
|
const adapter = useAdapter();
|
|
121401
|
-
const [expandedPaths, setExpandedPaths] = (0,
|
|
121404
|
+
const [expandedPaths, setExpandedPaths] = (0, import_react31.useState)(
|
|
121402
121405
|
() => new Set(getCachedExpanded(workspaceId))
|
|
121403
121406
|
);
|
|
121404
|
-
const [dirContents, setDirContents] = (0,
|
|
121407
|
+
const [dirContents, setDirContents] = (0, import_react31.useState)(
|
|
121405
121408
|
() => new Map(getCachedContents(workspaceId))
|
|
121406
121409
|
);
|
|
121407
|
-
const [loadingPaths, setLoadingPaths] = (0,
|
|
121408
|
-
const [newEntry, setNewEntry] = (0,
|
|
121409
|
-
const [pendingDelete, setPendingDelete] = (0,
|
|
121410
|
-
const [deleteError, setDeleteError] = (0,
|
|
121411
|
-
const [deleteSubmitting, setDeleteSubmitting] = (0,
|
|
121412
|
-
const [renamingPath, setRenamingPath] = (0,
|
|
121413
|
-
const [clipboard, setClipboard] = (0,
|
|
121414
|
-
const [treeSelection, setTreeSelection] = (0,
|
|
121415
|
-
const selectedRef = (0,
|
|
121416
|
-
const prevWorkspaceRef = (0,
|
|
121417
|
-
(0,
|
|
121410
|
+
const [loadingPaths, setLoadingPaths] = (0, import_react31.useState)(/* @__PURE__ */ new Set());
|
|
121411
|
+
const [newEntry, setNewEntry] = (0, import_react31.useState)(null);
|
|
121412
|
+
const [pendingDelete, setPendingDelete] = (0, import_react31.useState)(null);
|
|
121413
|
+
const [deleteError, setDeleteError] = (0, import_react31.useState)(null);
|
|
121414
|
+
const [deleteSubmitting, setDeleteSubmitting] = (0, import_react31.useState)(false);
|
|
121415
|
+
const [renamingPath, setRenamingPath] = (0, import_react31.useState)(null);
|
|
121416
|
+
const [clipboard, setClipboard] = (0, import_react31.useState)(null);
|
|
121417
|
+
const [treeSelection, setTreeSelection] = (0, import_react31.useState)(() => selectedFile ? { path: selectedFile, kind: "file" } : null);
|
|
121418
|
+
const selectedRef = (0, import_react31.useRef)(null);
|
|
121419
|
+
const prevWorkspaceRef = (0, import_react31.useRef)(workspaceId);
|
|
121420
|
+
(0, import_react31.useEffect)(() => {
|
|
121418
121421
|
if (prevWorkspaceRef.current !== workspaceId) {
|
|
121419
121422
|
prevWorkspaceRef.current = workspaceId;
|
|
121420
121423
|
setExpandedPaths(new Set(getCachedExpanded(workspaceId)));
|
|
@@ -121429,18 +121432,18 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121429
121432
|
setClipboard(null);
|
|
121430
121433
|
}
|
|
121431
121434
|
}, [workspaceId]);
|
|
121432
|
-
(0,
|
|
121435
|
+
(0, import_react31.useEffect)(() => {
|
|
121433
121436
|
if (selectedFile) {
|
|
121434
121437
|
setTreeSelection({ path: selectedFile, kind: "file" });
|
|
121435
121438
|
}
|
|
121436
121439
|
}, [selectedFile]);
|
|
121437
|
-
const handleSelectRow = (0,
|
|
121440
|
+
const handleSelectRow = (0, import_react31.useCallback)((path3, kind) => {
|
|
121438
121441
|
setTreeSelection({ path: path3, kind });
|
|
121439
121442
|
}, []);
|
|
121440
|
-
const clearTreeSelection = (0,
|
|
121443
|
+
const clearTreeSelection = (0, import_react31.useCallback)(() => {
|
|
121441
121444
|
setTreeSelection(null);
|
|
121442
121445
|
}, []);
|
|
121443
|
-
const fetchDir = (0,
|
|
121446
|
+
const fetchDir = (0, import_react31.useCallback)(
|
|
121444
121447
|
async (dirPath, opts) => {
|
|
121445
121448
|
if (!adapter.listWorkspaceFiles) return;
|
|
121446
121449
|
const cache = getCachedContents(workspaceId);
|
|
@@ -121464,10 +121467,10 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121464
121467
|
},
|
|
121465
121468
|
[adapter, workspaceId]
|
|
121466
121469
|
);
|
|
121467
|
-
(0,
|
|
121470
|
+
(0, import_react31.useEffect)(() => {
|
|
121468
121471
|
fetchDir("");
|
|
121469
121472
|
}, [fetchDir]);
|
|
121470
|
-
(0,
|
|
121473
|
+
(0, import_react31.useEffect)(() => {
|
|
121471
121474
|
if (!adapter.subscribeFileChanges) return;
|
|
121472
121475
|
const unsubscribe = adapter.subscribeFileChanges(workspaceId, (changedPath) => {
|
|
121473
121476
|
const cache = getCachedContents(workspaceId);
|
|
@@ -121476,8 +121479,8 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121476
121479
|
});
|
|
121477
121480
|
return unsubscribe;
|
|
121478
121481
|
}, [adapter, workspaceId, fetchDir]);
|
|
121479
|
-
const prevSelectedRef = (0,
|
|
121480
|
-
(0,
|
|
121482
|
+
const prevSelectedRef = (0, import_react31.useRef)(void 0);
|
|
121483
|
+
(0, import_react31.useEffect)(() => {
|
|
121481
121484
|
if (!selectedFile || selectedFile === prevSelectedRef.current) {
|
|
121482
121485
|
prevSelectedRef.current = selectedFile;
|
|
121483
121486
|
return;
|
|
@@ -121504,7 +121507,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121504
121507
|
fetchDir(dir);
|
|
121505
121508
|
}
|
|
121506
121509
|
}, [selectedFile, workspaceId, fetchDir]);
|
|
121507
|
-
(0,
|
|
121510
|
+
(0, import_react31.useEffect)(() => {
|
|
121508
121511
|
if (selectedFile && selectedRef.current) {
|
|
121509
121512
|
const timer = setTimeout(() => {
|
|
121510
121513
|
selectedRef.current?.scrollIntoView({ block: "nearest" });
|
|
@@ -121512,7 +121515,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121512
121515
|
return () => clearTimeout(timer);
|
|
121513
121516
|
}
|
|
121514
121517
|
}, [selectedFile, dirContents]);
|
|
121515
|
-
const toggleExpand = (0,
|
|
121518
|
+
const toggleExpand = (0, import_react31.useCallback)(
|
|
121516
121519
|
(dirPath) => {
|
|
121517
121520
|
setExpandedPaths((prev) => {
|
|
121518
121521
|
const next = new Set(prev);
|
|
@@ -121528,7 +121531,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121528
121531
|
},
|
|
121529
121532
|
[workspaceId, fetchDir]
|
|
121530
121533
|
);
|
|
121531
|
-
const ensureDirExpanded = (0,
|
|
121534
|
+
const ensureDirExpanded = (0, import_react31.useCallback)(
|
|
121532
121535
|
async (dirPath) => {
|
|
121533
121536
|
const cached2 = getCachedExpanded(workspaceId);
|
|
121534
121537
|
if (!cached2.has(dirPath)) {
|
|
@@ -121540,17 +121543,17 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121540
121543
|
},
|
|
121541
121544
|
[workspaceId, fetchDir]
|
|
121542
121545
|
);
|
|
121543
|
-
const requestNewEntry = (0,
|
|
121546
|
+
const requestNewEntry = (0, import_react31.useCallback)(
|
|
121544
121547
|
(parentPath, kind) => {
|
|
121545
121548
|
void ensureDirExpanded(parentPath);
|
|
121546
121549
|
setNewEntry({ parentPath, kind });
|
|
121547
121550
|
},
|
|
121548
121551
|
[ensureDirExpanded]
|
|
121549
121552
|
);
|
|
121550
|
-
const cancelNewEntry = (0,
|
|
121553
|
+
const cancelNewEntry = (0, import_react31.useCallback)(() => {
|
|
121551
121554
|
setNewEntry(null);
|
|
121552
121555
|
}, []);
|
|
121553
|
-
const submitNewEntry = (0,
|
|
121556
|
+
const submitNewEntry = (0, import_react31.useCallback)(
|
|
121554
121557
|
async (name24) => {
|
|
121555
121558
|
if (!newEntry) return;
|
|
121556
121559
|
const fullPath = newEntry.parentPath ? `${newEntry.parentPath}/${name24}` : name24;
|
|
@@ -121583,16 +121586,16 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121583
121586
|
[adapter, newEntry, fetchDir, onOpenFile, workspaceId]
|
|
121584
121587
|
);
|
|
121585
121588
|
const canDelete = Boolean(adapter.deleteWorkspacePath);
|
|
121586
|
-
const requestDelete = (0,
|
|
121589
|
+
const requestDelete = (0, import_react31.useCallback)((path3, kind) => {
|
|
121587
121590
|
setDeleteError(null);
|
|
121588
121591
|
setPendingDelete({ path: path3, kind });
|
|
121589
121592
|
}, []);
|
|
121590
|
-
const cancelDelete = (0,
|
|
121593
|
+
const cancelDelete = (0, import_react31.useCallback)(() => {
|
|
121591
121594
|
if (deleteSubmitting) return;
|
|
121592
121595
|
setPendingDelete(null);
|
|
121593
121596
|
setDeleteError(null);
|
|
121594
121597
|
}, [deleteSubmitting]);
|
|
121595
|
-
const confirmDelete = (0,
|
|
121598
|
+
const confirmDelete = (0, import_react31.useCallback)(async () => {
|
|
121596
121599
|
if (!pendingDelete || !adapter.deleteWorkspacePath) return;
|
|
121597
121600
|
setDeleteSubmitting(true);
|
|
121598
121601
|
setDeleteError(null);
|
|
@@ -121638,13 +121641,13 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121638
121641
|
}
|
|
121639
121642
|
}, [adapter, pendingDelete, fetchDir, workspaceId, onPathDeleted]);
|
|
121640
121643
|
const canRename = Boolean(adapter.renameWorkspacePath);
|
|
121641
|
-
const requestRename = (0,
|
|
121644
|
+
const requestRename = (0, import_react31.useCallback)((path3) => {
|
|
121642
121645
|
setRenamingPath(path3);
|
|
121643
121646
|
}, []);
|
|
121644
|
-
const cancelRename = (0,
|
|
121647
|
+
const cancelRename = (0, import_react31.useCallback)(() => {
|
|
121645
121648
|
setRenamingPath(null);
|
|
121646
121649
|
}, []);
|
|
121647
|
-
const submitRename = (0,
|
|
121650
|
+
const submitRename = (0, import_react31.useCallback)(
|
|
121648
121651
|
async (newName) => {
|
|
121649
121652
|
if (renamingPath == null || !adapter.renameWorkspacePath) return;
|
|
121650
121653
|
const oldPath = renamingPath;
|
|
@@ -121700,7 +121703,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121700
121703
|
},
|
|
121701
121704
|
[adapter, renamingPath, fetchDir, onPathRenamed, workspaceId]
|
|
121702
121705
|
);
|
|
121703
|
-
const resolveDefaultTarget = (0,
|
|
121706
|
+
const resolveDefaultTarget = (0, import_react31.useCallback)(() => {
|
|
121704
121707
|
if (treeSelection?.kind === "directory") return treeSelection.path;
|
|
121705
121708
|
if (treeSelection?.kind === "file") {
|
|
121706
121709
|
const idx = treeSelection.path.lastIndexOf("/");
|
|
@@ -121713,13 +121716,13 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121713
121716
|
const canPaste = Boolean(
|
|
121714
121717
|
clipboard && (clipboard.op === "copy" && adapter.copyWorkspacePath || clipboard.op === "cut" && adapter.renameWorkspacePath)
|
|
121715
121718
|
);
|
|
121716
|
-
const cutPath = (0,
|
|
121719
|
+
const cutPath = (0, import_react31.useCallback)((path3, kind) => {
|
|
121717
121720
|
setClipboard({ path: path3, kind, op: "cut" });
|
|
121718
121721
|
}, []);
|
|
121719
|
-
const copyPath = (0,
|
|
121722
|
+
const copyPath = (0, import_react31.useCallback)((path3, kind) => {
|
|
121720
121723
|
setClipboard({ path: path3, kind, op: "copy" });
|
|
121721
121724
|
}, []);
|
|
121722
|
-
const uniqueCopyName = (0,
|
|
121725
|
+
const uniqueCopyName = (0, import_react31.useCallback)(
|
|
121723
121726
|
(baseName, destFolder, kind) => {
|
|
121724
121727
|
const siblings = new Set(
|
|
121725
121728
|
(getCachedContents(workspaceId).get(destFolder) ?? []).map((e2) => e2.name)
|
|
@@ -121737,7 +121740,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121737
121740
|
},
|
|
121738
121741
|
[workspaceId]
|
|
121739
121742
|
);
|
|
121740
|
-
const pasteInto = (0,
|
|
121743
|
+
const pasteInto = (0, import_react31.useCallback)(
|
|
121741
121744
|
async (destFolder) => {
|
|
121742
121745
|
if (!clipboard) return;
|
|
121743
121746
|
const sourcePath = clipboard.path;
|
|
@@ -121801,7 +121804,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121801
121804
|
},
|
|
121802
121805
|
[adapter, clipboard, fetchDir, onPathRenamed, uniqueCopyName, workspaceId]
|
|
121803
121806
|
);
|
|
121804
|
-
(0,
|
|
121807
|
+
(0, import_react31.useImperativeHandle)(
|
|
121805
121808
|
handleRef,
|
|
121806
121809
|
() => ({
|
|
121807
121810
|
startNewFile(parentPath) {
|
|
@@ -121997,10 +122000,10 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121997
122000
|
});
|
|
121998
122001
|
|
|
121999
122002
|
// ../../packages/dashboard-core/src/components/FileViewer.tsx
|
|
122000
|
-
var
|
|
122003
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
122001
122004
|
|
|
122002
122005
|
// ../../packages/dashboard-core/src/components/ImagePreview.tsx
|
|
122003
|
-
var
|
|
122006
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
122004
122007
|
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
122005
122008
|
|
|
122006
122009
|
// ../../packages/dashboard-core/src/components/PdfPreview.tsx
|
|
@@ -122010,22 +122013,22 @@ var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
|
122010
122013
|
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
122011
122014
|
|
|
122012
122015
|
// ../../packages/dashboard-core/src/components/QuickOpenDialog.tsx
|
|
122013
|
-
var
|
|
122016
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
122014
122017
|
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
|
|
122015
122018
|
|
|
122016
122019
|
// ../../packages/dashboard-core/src/components/SearchFilesDialog.tsx
|
|
122017
|
-
var
|
|
122020
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
122018
122021
|
var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
|
|
122019
122022
|
|
|
122020
122023
|
// ../../packages/dashboard-core/src/components/WorkspacePickerDialog.tsx
|
|
122021
|
-
var
|
|
122024
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
122022
122025
|
var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
|
|
122023
122026
|
|
|
122024
122027
|
// ../../packages/dashboard-core/src/components/WorkspaceTabNav.tsx
|
|
122025
122028
|
var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
|
|
122026
122029
|
|
|
122027
122030
|
// ../../packages/dashboard-core/src/hooks/use-editor-history.ts
|
|
122028
|
-
var
|
|
122031
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
122029
122032
|
|
|
122030
122033
|
// ../../node_modules/.pnpm/marked@15.0.12/node_modules/marked/lib/marked.esm.js
|
|
122031
122034
|
function _getDefaults() {
|
|
@@ -124825,7 +124828,7 @@ function sql(strings, ...params) {
|
|
|
124825
124828
|
return new SQL([new StringChunk(str)]);
|
|
124826
124829
|
}
|
|
124827
124830
|
_sql.raw = raw;
|
|
124828
|
-
function
|
|
124831
|
+
function join25(chunks, separator) {
|
|
124829
124832
|
const result = [];
|
|
124830
124833
|
for (const [i2, chunk] of chunks.entries()) {
|
|
124831
124834
|
if (i2 > 0 && separator !== void 0) result.push(separator);
|
|
@@ -124833,7 +124836,7 @@ function sql(strings, ...params) {
|
|
|
124833
124836
|
}
|
|
124834
124837
|
return new SQL(result);
|
|
124835
124838
|
}
|
|
124836
|
-
_sql.join =
|
|
124839
|
+
_sql.join = join25;
|
|
124837
124840
|
function identifier(value) {
|
|
124838
124841
|
return new Name(value);
|
|
124839
124842
|
}
|
|
@@ -126106,7 +126109,7 @@ function getTableAsAliasSQL(table) {
|
|
|
126106
126109
|
|
|
126107
126110
|
// src/lib/db/connection.ts
|
|
126108
126111
|
import { mkdirSync as mkdirSync2 } from "node:fs";
|
|
126109
|
-
import { join as
|
|
126112
|
+
import { join as join11 } from "node:path";
|
|
126110
126113
|
import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
|
|
126111
126114
|
|
|
126112
126115
|
// ../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.1_@opentelemetry+api@1.9.0_@types+better-sqlite3@7.6.13_better-sql_95478898f63cc8c3fbbd0c5f8c1e464f/node_modules/drizzle-orm/pg-core/foreign-keys.js
|
|
@@ -129335,7 +129338,7 @@ var SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder {
|
|
|
129335
129338
|
const baseTableName = this.tableName;
|
|
129336
129339
|
const tableName = getTableLikeName(table);
|
|
129337
129340
|
for (const item of extractUsedTable(table)) this.usedTables.add(item);
|
|
129338
|
-
if (typeof tableName === "string" && this.config.joins?.some((
|
|
129341
|
+
if (typeof tableName === "string" && this.config.joins?.some((join25) => join25.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
129339
129342
|
if (!this.isPartialSelect) {
|
|
129340
129343
|
if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") this.config.fields = { [baseTableName]: this.config.fields };
|
|
129341
129344
|
if (typeof tableName === "string" && !is(table, SQL)) {
|
|
@@ -130543,7 +130546,7 @@ var SQLiteDialect = class {
|
|
|
130543
130546
|
if (!joins2) return;
|
|
130544
130547
|
const withEntries = Object.entries(joins2).filter(([_4, v4]) => v4);
|
|
130545
130548
|
if (!withEntries.length) return;
|
|
130546
|
-
return sql.join(withEntries.map(([k4,
|
|
130549
|
+
return sql.join(withEntries.map(([k4, join25]) => {
|
|
130547
130550
|
const relation = tableConfig.relations[k4];
|
|
130548
130551
|
const isSingle2 = is(relation, One);
|
|
130549
130552
|
const targetTable = aliasedTable(relation.targetTable, `d${currentDepth + 1}`);
|
|
@@ -130554,7 +130557,7 @@ var SQLiteDialect = class {
|
|
|
130554
130557
|
table: targetTable,
|
|
130555
130558
|
mode: isSingle2 ? "first" : "many",
|
|
130556
130559
|
schema,
|
|
130557
|
-
queryConfig:
|
|
130560
|
+
queryConfig: join25,
|
|
130558
130561
|
tableConfig: schema[relation.targetTableName],
|
|
130559
130562
|
relationWhere: filter2,
|
|
130560
130563
|
isNested: true,
|
|
@@ -130568,7 +130571,7 @@ var SQLiteDialect = class {
|
|
|
130568
130571
|
key: k4,
|
|
130569
130572
|
selection: innerQuery.selection,
|
|
130570
130573
|
isArray: !isSingle2,
|
|
130571
|
-
isOptional: (relation.optional ?? false) ||
|
|
130574
|
+
isOptional: (relation.optional ?? false) || join25 !== true && !!join25.where
|
|
130572
130575
|
});
|
|
130573
130576
|
const jsonColumns = sql.join(innerQuery.selection.map((s6) => {
|
|
130574
130577
|
return sql`${sql.raw(this.escapeString(s6.key))}, ${s6.selection ? sql`${jsonb2}(${sql.identifier(s6.key)})` : sql.identifier(s6.key)}`;
|
|
@@ -131037,7 +131040,7 @@ var SQLiteUpdateBase = class extends QueryPromise {
|
|
|
131037
131040
|
createJoin(joinType) {
|
|
131038
131041
|
return ((table, on) => {
|
|
131039
131042
|
const tableName = getTableLikeName(table);
|
|
131040
|
-
if (typeof tableName === "string" && this.config.joins.some((
|
|
131043
|
+
if (typeof tableName === "string" && this.config.joins.some((join25) => join25.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
131041
131044
|
if (typeof on === "function") {
|
|
131042
131045
|
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;
|
|
131043
131046
|
on = on(new Proxy(this.config.table[Table.Symbol.Columns], new SelectionProxyHandler({
|
|
@@ -131780,13 +131783,13 @@ function drizzle(...params) {
|
|
|
131780
131783
|
// ../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.1_@opentelemetry+api@1.9.0_@types+better-sqlite3@7.6.13_better-sql_95478898f63cc8c3fbbd0c5f8c1e464f/node_modules/drizzle-orm/migrator.js
|
|
131781
131784
|
import crypto2 from "node:crypto";
|
|
131782
131785
|
import fs3, { existsSync as existsSync3, readdirSync as readdirSync5 } from "node:fs";
|
|
131783
|
-
import { join as
|
|
131786
|
+
import { join as join10 } from "node:path";
|
|
131784
131787
|
function readMigrationFiles(config2) {
|
|
131785
131788
|
if (fs3.existsSync(`${config2.migrationsFolder}/meta/_journal.json`)) throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');
|
|
131786
131789
|
const migrationFolderTo = config2.migrationsFolder;
|
|
131787
131790
|
const migrationQueries = [];
|
|
131788
131791
|
const migrations = readdirSync5(migrationFolderTo).map((subdir) => ({
|
|
131789
|
-
path:
|
|
131792
|
+
path: join10(migrationFolderTo, subdir, "migration.sql"),
|
|
131790
131793
|
name: subdir
|
|
131791
131794
|
})).filter((it) => existsSync3(it.path));
|
|
131792
131795
|
migrations.sort((a6, b10) => a6.name.localeCompare(b10.name));
|
|
@@ -131921,14 +131924,14 @@ var browserHistory = sqliteTable(
|
|
|
131921
131924
|
);
|
|
131922
131925
|
|
|
131923
131926
|
// src/lib/db/connection.ts
|
|
131924
|
-
var migrationsFolder =
|
|
131927
|
+
var migrationsFolder = join11(import.meta.dirname, "migrations");
|
|
131925
131928
|
var _db = null;
|
|
131926
131929
|
var _sqlite = null;
|
|
131927
131930
|
function getDb() {
|
|
131928
131931
|
if (_db) return _db;
|
|
131929
131932
|
const home = bandHome();
|
|
131930
131933
|
mkdirSync2(home, { recursive: true });
|
|
131931
|
-
const dbPath =
|
|
131934
|
+
const dbPath = join11(home, "band.db");
|
|
131932
131935
|
_sqlite = new DatabaseSync2(dbPath);
|
|
131933
131936
|
_sqlite.exec("PRAGMA journal_mode = WAL");
|
|
131934
131937
|
_sqlite.exec("PRAGMA foreign_keys = ON");
|
|
@@ -131947,7 +131950,7 @@ function closeDb() {
|
|
|
131947
131950
|
// src/lib/state.ts
|
|
131948
131951
|
function bandHome() {
|
|
131949
131952
|
if (process.env.BAND_HOME) return process.env.BAND_HOME;
|
|
131950
|
-
return
|
|
131953
|
+
return join12(homedir7(), ".band");
|
|
131951
131954
|
}
|
|
131952
131955
|
function loadState() {
|
|
131953
131956
|
const db2 = getDb();
|
|
@@ -132001,7 +132004,7 @@ function saveState(state2) {
|
|
|
132001
132004
|
});
|
|
132002
132005
|
}
|
|
132003
132006
|
function settingsFile() {
|
|
132004
|
-
return
|
|
132007
|
+
return join12(bandHome(), "settings.json");
|
|
132005
132008
|
}
|
|
132006
132009
|
function loadSettings() {
|
|
132007
132010
|
try {
|
|
@@ -132051,7 +132054,7 @@ function getOrCreateToken() {
|
|
|
132051
132054
|
}
|
|
132052
132055
|
function worktreesDir() {
|
|
132053
132056
|
const settings = loadSettings();
|
|
132054
|
-
return settings.worktreesDir ??
|
|
132057
|
+
return settings.worktreesDir ?? join12(bandHome(), "worktrees");
|
|
132055
132058
|
}
|
|
132056
132059
|
function loadCurrentStatuses() {
|
|
132057
132060
|
const db2 = getDb();
|
|
@@ -132155,7 +132158,7 @@ var pool = g2[POOL_KEY];
|
|
|
132155
132158
|
var pending = g2[PENDING_KEY];
|
|
132156
132159
|
function loadClaudeSettingsModel() {
|
|
132157
132160
|
try {
|
|
132158
|
-
const data = readFileSync5(
|
|
132161
|
+
const data = readFileSync5(join13(homedir8(), ".claude", "settings.json"), "utf-8");
|
|
132159
132162
|
const parsed = JSON.parse(data);
|
|
132160
132163
|
return typeof parsed.model === "string" ? parsed.model : void 0;
|
|
132161
132164
|
} catch {
|
|
@@ -132174,7 +132177,7 @@ function getAgentConfig(worktreePath, agentId) {
|
|
|
132174
132177
|
type: agentDef.type,
|
|
132175
132178
|
workspaceDir: worktreePath,
|
|
132176
132179
|
maxTurns: 100,
|
|
132177
|
-
additionalDirectories: [
|
|
132180
|
+
additionalDirectories: [join13(bandHome(), "uploads"), join13(bandHome(), "shared")],
|
|
132178
132181
|
options: {
|
|
132179
132182
|
executablePath: agentDef.command,
|
|
132180
132183
|
model,
|
|
@@ -132491,7 +132494,7 @@ function removeChatFromLayout(workspaceId, chatId) {
|
|
|
132491
132494
|
// src/lib/git.ts
|
|
132492
132495
|
import { execFile as execFile2 } from "node:child_process";
|
|
132493
132496
|
import { readFile, stat as stat3 } from "node:fs/promises";
|
|
132494
|
-
import { join as
|
|
132497
|
+
import { join as join14 } from "node:path";
|
|
132495
132498
|
function parseGitRemoteUrl(url2) {
|
|
132496
132499
|
const sshMatch = url2.match(/^[\w.-]+@([^:]+):([^/]+)\/(.+?)(?:\.git)?$/);
|
|
132497
132500
|
if (sshMatch) {
|
|
@@ -132601,7 +132604,7 @@ async function listWorktrees(repoPath) {
|
|
|
132601
132604
|
return worktrees2;
|
|
132602
132605
|
}
|
|
132603
132606
|
async function resolveDetachedBranch(worktreePath) {
|
|
132604
|
-
const dotGit =
|
|
132607
|
+
const dotGit = join14(worktreePath, ".git");
|
|
132605
132608
|
let gitdir;
|
|
132606
132609
|
try {
|
|
132607
132610
|
const st = await stat3(dotGit);
|
|
@@ -132618,7 +132621,7 @@ async function resolveDetachedBranch(worktreePath) {
|
|
|
132618
132621
|
}
|
|
132619
132622
|
for (const rebaseDir of ["rebase-merge", "rebase-apply"]) {
|
|
132620
132623
|
try {
|
|
132621
|
-
const headName = await readFile(
|
|
132624
|
+
const headName = await readFile(join14(gitdir, rebaseDir, "head-name"), "utf-8");
|
|
132622
132625
|
const name24 = headName.trim();
|
|
132623
132626
|
return name24.startsWith("refs/heads/") ? name24.slice("refs/heads/".length) : name24;
|
|
132624
132627
|
} catch {
|
|
@@ -133062,10 +133065,10 @@ import { spawn as spawn5 } from "node:child_process";
|
|
|
133062
133065
|
|
|
133063
133066
|
// src/lib/project-config.ts
|
|
133064
133067
|
import { existsSync as existsSync4, readFileSync as readFileSync6 } from "node:fs";
|
|
133065
|
-
import { join as
|
|
133068
|
+
import { join as join15 } from "node:path";
|
|
133066
133069
|
function loadProjectConfig(worktreePath, projectPath) {
|
|
133067
133070
|
for (const base2 of [worktreePath, projectPath]) {
|
|
133068
|
-
const configPath =
|
|
133071
|
+
const configPath = join15(base2, ".band", "config.json");
|
|
133069
133072
|
if (existsSync4(configPath)) {
|
|
133070
133073
|
try {
|
|
133071
133074
|
return JSON.parse(readFileSync6(configPath, "utf-8"));
|
|
@@ -133492,7 +133495,7 @@ function clearQueuedMessages(chatId) {
|
|
|
133492
133495
|
// src/lib/task-runner.ts
|
|
133493
133496
|
init_src();
|
|
133494
133497
|
import { mkdirSync as mkdirSync4, readdirSync as readdirSync6 } from "node:fs";
|
|
133495
|
-
import { join as
|
|
133498
|
+
import { join as join17 } from "node:path";
|
|
133496
133499
|
|
|
133497
133500
|
// src/lib/mime-types.ts
|
|
133498
133501
|
import { extname } from "node:path";
|
|
@@ -133634,6 +133637,68 @@ function cleanupStaleTasks() {
|
|
|
133634
133637
|
}
|
|
133635
133638
|
return count3;
|
|
133636
133639
|
}
|
|
133640
|
+
function deleteWorkspaceTasks(workspaceId) {
|
|
133641
|
+
const db2 = getDb();
|
|
133642
|
+
const result = db2.delete(tasks).where(eq2(tasks.workspaceId, workspaceId)).run();
|
|
133643
|
+
return result.changes;
|
|
133644
|
+
}
|
|
133645
|
+
function deleteTasksOlderThan(cutoffMs) {
|
|
133646
|
+
const db2 = getDb();
|
|
133647
|
+
const result = db2.delete(tasks).where(
|
|
133648
|
+
or(
|
|
133649
|
+
and(isNull(tasks.completedAt), lt(tasks.startedAt, cutoffMs)),
|
|
133650
|
+
// The explicit `isNotNull` guard is technically redundant — SQLite
|
|
133651
|
+
// treats `NULL < cutoffMs` as NULL (falsy) in a WHERE predicate, so
|
|
133652
|
+
// null-`completedAt` rows would be skipped here regardless. We keep
|
|
133653
|
+
// it so the intent is obvious without leaning on SQLite NULL
|
|
133654
|
+
// semantics, and so the query stays correct under a future Drizzle
|
|
133655
|
+
// or backend swap.
|
|
133656
|
+
and(isNotNull2(tasks.completedAt), lt(tasks.completedAt, cutoffMs))
|
|
133657
|
+
)
|
|
133658
|
+
).run();
|
|
133659
|
+
return result.changes;
|
|
133660
|
+
}
|
|
133661
|
+
var TASK_RETENTION_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
133662
|
+
var TASK_PRUNE_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
133663
|
+
var PRUNE_SCHEDULER_KEY = Symbol.for("band.task-prune-scheduler");
|
|
133664
|
+
var pruneG = globalThis;
|
|
133665
|
+
if (!pruneG[PRUNE_SCHEDULER_KEY]) {
|
|
133666
|
+
pruneG[PRUNE_SCHEDULER_KEY] = { timer: null };
|
|
133667
|
+
}
|
|
133668
|
+
var pruneState = pruneG[PRUNE_SCHEDULER_KEY];
|
|
133669
|
+
function pruneOldTasks(retentionMs = TASK_RETENTION_MS) {
|
|
133670
|
+
const cutoff = Date.now() - retentionMs;
|
|
133671
|
+
const count3 = deleteTasksOlderThan(cutoff);
|
|
133672
|
+
if (count3 > 0) {
|
|
133673
|
+
log10.info({ count: count3, retentionMs }, "pruned tasks older than retention window");
|
|
133674
|
+
}
|
|
133675
|
+
return count3;
|
|
133676
|
+
}
|
|
133677
|
+
function startTaskPruneScheduler(options2 = {}) {
|
|
133678
|
+
if (pruneState.timer) return;
|
|
133679
|
+
const retentionMs = options2.retentionMs ?? TASK_RETENTION_MS;
|
|
133680
|
+
const intervalMs = options2.intervalMs ?? TASK_PRUNE_INTERVAL_MS;
|
|
133681
|
+
try {
|
|
133682
|
+
pruneOldTasks(retentionMs);
|
|
133683
|
+
} catch (err) {
|
|
133684
|
+
log10.error({ err }, "initial task prune on boot failed");
|
|
133685
|
+
}
|
|
133686
|
+
const timer = setInterval(() => {
|
|
133687
|
+
try {
|
|
133688
|
+
pruneOldTasks(retentionMs);
|
|
133689
|
+
} catch (err) {
|
|
133690
|
+
log10.error({ err }, "scheduled task prune failed");
|
|
133691
|
+
}
|
|
133692
|
+
}, intervalMs);
|
|
133693
|
+
timer.unref();
|
|
133694
|
+
pruneState.timer = timer;
|
|
133695
|
+
}
|
|
133696
|
+
function stopTaskPruneScheduler() {
|
|
133697
|
+
if (pruneState.timer) {
|
|
133698
|
+
clearInterval(pruneState.timer);
|
|
133699
|
+
pruneState.timer = null;
|
|
133700
|
+
}
|
|
133701
|
+
}
|
|
133637
133702
|
function markTaskFailed(id) {
|
|
133638
133703
|
const task = loadTask(id);
|
|
133639
133704
|
if (!task || task.status !== "running") return null;
|
|
@@ -133665,9 +133730,9 @@ function rowToRecord(row) {
|
|
|
133665
133730
|
|
|
133666
133731
|
// src/lib/upload-utils.ts
|
|
133667
133732
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
133668
|
-
import { join as
|
|
133733
|
+
import { join as join16 } from "node:path";
|
|
133669
133734
|
async function saveUploadedFilesDetailed(fileParts) {
|
|
133670
|
-
const uploadDir =
|
|
133735
|
+
const uploadDir = join16(bandHome(), "uploads");
|
|
133671
133736
|
await mkdir(uploadDir, { recursive: true });
|
|
133672
133737
|
const baseTimestamp = Date.now();
|
|
133673
133738
|
const saved = [];
|
|
@@ -133679,7 +133744,7 @@ async function saveUploadedFilesDetailed(fileParts) {
|
|
|
133679
133744
|
const filename = part.filename || `file-${baseTimestamp}`;
|
|
133680
133745
|
const safeOriginal = filename.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
133681
133746
|
const storedName = `${baseTimestamp}-${i2}-${safeOriginal}`;
|
|
133682
|
-
const filePath =
|
|
133747
|
+
const filePath = join16(uploadDir, storedName);
|
|
133683
133748
|
await writeFile(filePath, buffer);
|
|
133684
133749
|
saved.push({
|
|
133685
133750
|
path: filePath,
|
|
@@ -133933,7 +133998,7 @@ async function runTask(chatId, task) {
|
|
|
133933
133998
|
updateChatStatus(chatId, "running");
|
|
133934
133999
|
const working = upsertWorkspaceStatus(task.workspaceId, { status: "working" });
|
|
133935
134000
|
emit({ kind: "update", status: working });
|
|
133936
|
-
const sharedDir =
|
|
134001
|
+
const sharedDir = join17(bandHome(), "shared", task.workspaceId);
|
|
133937
134002
|
mkdirSync4(sharedDir, { recursive: true });
|
|
133938
134003
|
const INTERACTIVE_TOOLS = /* @__PURE__ */ new Set(["AskUserQuestion", "ExitPlanMode"]);
|
|
133939
134004
|
let textPartId = "";
|
|
@@ -135822,7 +135887,7 @@ function runMigrations() {
|
|
|
135822
135887
|
// src/lib/lsp-manager.ts
|
|
135823
135888
|
init_src();
|
|
135824
135889
|
import { spawn as spawn6 } from "node:child_process";
|
|
135825
|
-
import { dirname as dirname2, join as
|
|
135890
|
+
import { dirname as dirname2, join as join18, resolve as resolve4 } from "node:path";
|
|
135826
135891
|
import { fileURLToPath } from "node:url";
|
|
135827
135892
|
|
|
135828
135893
|
// src/lib/process-utils.ts
|
|
@@ -135900,7 +135965,7 @@ async function getOrSpawnServer(workspaceId, lang) {
|
|
|
135900
135965
|
const cwd = workspace.worktree.path;
|
|
135901
135966
|
const appBin = resolve4(__dirname2, "../../node_modules/.bin");
|
|
135902
135967
|
const bundledBin = resolve4(__dirname2, "node_modules/.bin");
|
|
135903
|
-
const workspaceBin =
|
|
135968
|
+
const workspaceBin = join18(cwd, "node_modules/.bin");
|
|
135904
135969
|
const pathSep = process.platform === "win32" ? ";" : ":";
|
|
135905
135970
|
const combinedPath = [bundledBin, appBin, workspaceBin, resolvedPath].join(pathSep);
|
|
135906
135971
|
log18.debug("Spawning %s language server in %s for workspace %s", lang, cwd, workspaceId);
|
|
@@ -136117,7 +136182,7 @@ init_src();
|
|
|
136117
136182
|
// src/lib/cli.ts
|
|
136118
136183
|
import { accessSync, constants, lstatSync as lstatSync2, realpathSync as realpathSync2, symlinkSync as symlinkSync2, unlinkSync as unlinkSync2 } from "node:fs";
|
|
136119
136184
|
import { platform as platform2 } from "node:os";
|
|
136120
|
-
import { dirname as dirname3, join as
|
|
136185
|
+
import { dirname as dirname3, join as join19, resolve as resolve5 } from "node:path";
|
|
136121
136186
|
var SYMLINK_PATH = "/usr/local/bin/band";
|
|
136122
136187
|
function findCliBinary() {
|
|
136123
136188
|
const appsStrategies = [
|
|
@@ -136130,7 +136195,7 @@ function findCliBinary() {
|
|
|
136130
136195
|
];
|
|
136131
136196
|
for (const appsDir of appsStrategies) {
|
|
136132
136197
|
for (const profile of ["release", "debug"]) {
|
|
136133
|
-
const p6 =
|
|
136198
|
+
const p6 = join19(appsDir, "cli", "target", profile, "band");
|
|
136134
136199
|
try {
|
|
136135
136200
|
lstatSync2(p6);
|
|
136136
136201
|
return p6;
|
|
@@ -136166,8 +136231,8 @@ async function checkCli() {
|
|
|
136166
136231
|
} catch {
|
|
136167
136232
|
return "NotInstalled";
|
|
136168
136233
|
}
|
|
136169
|
-
const isCargoBuild = target.includes(
|
|
136170
|
-
const isElectronSidecar = target.endsWith(
|
|
136234
|
+
const isCargoBuild = target.includes(join19("apps", "cli", "target"));
|
|
136235
|
+
const isElectronSidecar = target.endsWith(join19("binaries", "band"));
|
|
136171
136236
|
if (isCargoBuild || isElectronSidecar) {
|
|
136172
136237
|
return "Installed";
|
|
136173
136238
|
}
|
|
@@ -136233,18 +136298,20 @@ function resolveCliPaths() {
|
|
|
136233
136298
|
// src/lib/cli-skills.ts
|
|
136234
136299
|
import { execFile as execFile4 } from "node:child_process";
|
|
136235
136300
|
import {
|
|
136236
|
-
accessSync as accessSync2,
|
|
136237
136301
|
existsSync as existsSync5,
|
|
136238
|
-
|
|
136302
|
+
lstatSync as lstatSync3,
|
|
136239
136303
|
mkdirSync as mkdirSync5,
|
|
136240
136304
|
mkdtempSync,
|
|
136241
136305
|
readFileSync as readFileSync7,
|
|
136306
|
+
readlinkSync as readlinkSync2,
|
|
136307
|
+
realpathSync as realpathSync3,
|
|
136242
136308
|
rmSync as rmSync2,
|
|
136243
136309
|
statSync as statSync6,
|
|
136310
|
+
symlinkSync as symlinkSync3,
|
|
136244
136311
|
writeFileSync as writeFileSync2
|
|
136245
136312
|
} from "node:fs";
|
|
136246
136313
|
import { homedir as homedir9, tmpdir } from "node:os";
|
|
136247
|
-
import { dirname as dirname4, join as
|
|
136314
|
+
import { dirname as dirname4, join as join20 } from "node:path";
|
|
136248
136315
|
var BAND_SKILL_NAMES = [
|
|
136249
136316
|
"band",
|
|
136250
136317
|
"band-chat",
|
|
@@ -136254,30 +136321,23 @@ var BAND_SKILL_NAMES = [
|
|
|
136254
136321
|
"band-loop"
|
|
136255
136322
|
];
|
|
136256
136323
|
var SKILL_FILE = "SKILL.md";
|
|
136257
|
-
async function
|
|
136258
|
-
|
|
136324
|
+
async function resolveSkillTargets(home = homedir9()) {
|
|
136325
|
+
const seen = /* @__PURE__ */ new Set();
|
|
136326
|
+
const out = [];
|
|
136327
|
+
for (const type of SUPPORTED_AGENT_TYPES) {
|
|
136328
|
+
const configDir = getAgentConfigDir(type, home);
|
|
136329
|
+
if (!configDir) continue;
|
|
136259
136330
|
try {
|
|
136260
|
-
|
|
136261
|
-
|
|
136331
|
+
const stat5 = statSync6(configDir);
|
|
136332
|
+
if (!stat5.isDirectory()) continue;
|
|
136262
136333
|
} catch {
|
|
136263
|
-
|
|
136334
|
+
continue;
|
|
136264
136335
|
}
|
|
136265
|
-
|
|
136266
|
-
const binaryName = await getDefaultAgentBinary(agent.type);
|
|
136267
|
-
if (!binaryName) return false;
|
|
136268
|
-
const found = await whichBinary(binaryName);
|
|
136269
|
-
return found !== null;
|
|
136270
|
-
}
|
|
136271
|
-
async function resolveSkillTargets(agents, home = homedir9()) {
|
|
136272
|
-
const seen = /* @__PURE__ */ new Set();
|
|
136273
|
-
const out = [];
|
|
136274
|
-
for (const agent of agents) {
|
|
136275
|
-
if (!await isAgentInstalled(agent)) continue;
|
|
136276
|
-
const skillsDir = await getInstallSkillsDir(agent.type, home);
|
|
136336
|
+
const skillsDir = await getInstallSkillsDir(type, home);
|
|
136277
136337
|
if (!skillsDir) continue;
|
|
136278
136338
|
if (seen.has(skillsDir)) continue;
|
|
136279
136339
|
seen.add(skillsDir);
|
|
136280
|
-
out.push({ agentType:
|
|
136340
|
+
out.push({ agentType: type, skillsDir });
|
|
136281
136341
|
}
|
|
136282
136342
|
return out;
|
|
136283
136343
|
}
|
|
@@ -136313,67 +136373,99 @@ async function installSkills(opts = {}) {
|
|
|
136313
136373
|
written: [],
|
|
136314
136374
|
updated: [],
|
|
136315
136375
|
unchanged: [],
|
|
136376
|
+
linked: [],
|
|
136377
|
+
alreadyLinked: [],
|
|
136378
|
+
conflicts: [],
|
|
136316
136379
|
skipped: []
|
|
136317
136380
|
};
|
|
136318
136381
|
const home = opts.home ?? homedir9();
|
|
136319
|
-
const
|
|
136320
|
-
const targets = await resolveSkillTargets(
|
|
136321
|
-
if (targets.length === 0) {
|
|
136322
|
-
return result;
|
|
136323
|
-
}
|
|
136382
|
+
const sharedDir = getSharedSkillsDir(home);
|
|
136383
|
+
const targets = await resolveSkillTargets(home);
|
|
136324
136384
|
const bandPath = await findBandBinary();
|
|
136325
136385
|
if (!bandPath) {
|
|
136326
136386
|
opts.log?.warn(
|
|
136327
136387
|
"Skipping CLI skills sync \u2014 band binary not found (no symlink, not on PATH, no bundled sidecar)"
|
|
136328
136388
|
);
|
|
136329
|
-
for (const
|
|
136330
|
-
|
|
136331
|
-
result.skipped.push(join19(target.skillsDir, name24, SKILL_FILE));
|
|
136332
|
-
}
|
|
136389
|
+
for (const name24 of BAND_SKILL_NAMES) {
|
|
136390
|
+
result.skipped.push(join20(sharedDir, name24, SKILL_FILE));
|
|
136333
136391
|
}
|
|
136334
136392
|
return result;
|
|
136335
136393
|
}
|
|
136336
|
-
const stagingDir = mkdtempSync(
|
|
136394
|
+
const stagingDir = mkdtempSync(join20(tmpdir(), "band-skills-"));
|
|
136337
136395
|
try {
|
|
136338
136396
|
await generateSkills(bandPath, stagingDir);
|
|
136397
|
+
for (const name24 of BAND_SKILL_NAMES) {
|
|
136398
|
+
const sourcePath = join20(stagingDir, name24, SKILL_FILE);
|
|
136399
|
+
const destPath = join20(sharedDir, name24, SKILL_FILE);
|
|
136400
|
+
if (!existsSync5(sourcePath)) {
|
|
136401
|
+
opts.log?.warn("Generated skill missing from staging dir: %s (skipping)", sourcePath);
|
|
136402
|
+
result.skipped.push(destPath);
|
|
136403
|
+
continue;
|
|
136404
|
+
}
|
|
136405
|
+
const sourceContent = readFileSync7(sourcePath);
|
|
136406
|
+
let existingContent = null;
|
|
136407
|
+
try {
|
|
136408
|
+
existingContent = readFileSync7(destPath);
|
|
136409
|
+
} catch (err) {
|
|
136410
|
+
const code = err.code;
|
|
136411
|
+
if (code !== "ENOENT") {
|
|
136412
|
+
opts.log?.warn(
|
|
136413
|
+
"Failed to read existing shared skill at %s: %s \u2014 overwriting",
|
|
136414
|
+
destPath,
|
|
136415
|
+
err instanceof Error ? err.message : String(err)
|
|
136416
|
+
);
|
|
136417
|
+
}
|
|
136418
|
+
}
|
|
136419
|
+
if (existingContent?.equals(sourceContent)) {
|
|
136420
|
+
result.unchanged.push(destPath);
|
|
136421
|
+
continue;
|
|
136422
|
+
}
|
|
136423
|
+
mkdirSync5(dirname4(destPath), { recursive: true });
|
|
136424
|
+
writeFileSync2(destPath, sourceContent);
|
|
136425
|
+
if (existingContent) {
|
|
136426
|
+
result.updated.push(destPath);
|
|
136427
|
+
opts.log?.info(
|
|
136428
|
+
"Updated %s skill at %s (content differed \u2014 local edits, if any, were overwritten)",
|
|
136429
|
+
name24,
|
|
136430
|
+
destPath
|
|
136431
|
+
);
|
|
136432
|
+
} else {
|
|
136433
|
+
result.written.push(destPath);
|
|
136434
|
+
opts.log?.info("Installed %s skill at %s", name24, destPath);
|
|
136435
|
+
}
|
|
136436
|
+
}
|
|
136437
|
+
if (targets.length === 0) {
|
|
136438
|
+
opts.log?.info(
|
|
136439
|
+
"No supported coding agents detected on host \u2014 skills installed to %s but no agent symlinks created",
|
|
136440
|
+
sharedDir
|
|
136441
|
+
);
|
|
136442
|
+
return result;
|
|
136443
|
+
}
|
|
136339
136444
|
for (const target of targets) {
|
|
136340
136445
|
for (const name24 of BAND_SKILL_NAMES) {
|
|
136341
|
-
const
|
|
136342
|
-
const
|
|
136343
|
-
if (!existsSync5(
|
|
136344
|
-
|
|
136446
|
+
const shared2 = join20(sharedDir, name24);
|
|
136447
|
+
const link2 = join20(target.skillsDir, name24);
|
|
136448
|
+
if (!existsSync5(shared2)) {
|
|
136449
|
+
result.skipped.push(link2);
|
|
136345
136450
|
continue;
|
|
136346
136451
|
}
|
|
136347
|
-
const
|
|
136348
|
-
|
|
136349
|
-
|
|
136350
|
-
|
|
136351
|
-
|
|
136352
|
-
|
|
136353
|
-
|
|
136452
|
+
const outcome = ensureSymlink({ link: link2, target: shared2, log: opts.log });
|
|
136453
|
+
switch (outcome.kind) {
|
|
136454
|
+
case "created":
|
|
136455
|
+
result.linked.push(link2);
|
|
136456
|
+
opts.log?.info("Linked %s skills/%s \u2192 %s", target.agentType, name24, shared2);
|
|
136457
|
+
break;
|
|
136458
|
+
case "already":
|
|
136459
|
+
result.alreadyLinked.push(link2);
|
|
136460
|
+
break;
|
|
136461
|
+
case "conflict":
|
|
136462
|
+
result.conflicts.push(`${link2}: ${outcome.reason}`);
|
|
136354
136463
|
opts.log?.warn(
|
|
136355
|
-
"
|
|
136356
|
-
|
|
136357
|
-
|
|
136464
|
+
"Skill symlink conflict at %s \u2014 %s (leaving as-is; remove it manually to re-link)",
|
|
136465
|
+
link2,
|
|
136466
|
+
outcome.reason
|
|
136358
136467
|
);
|
|
136359
|
-
|
|
136360
|
-
}
|
|
136361
|
-
if (existingContent?.equals(sourceContent)) {
|
|
136362
|
-
result.unchanged.push(destPath);
|
|
136363
|
-
continue;
|
|
136364
|
-
}
|
|
136365
|
-
mkdirSync5(dirname4(destPath), { recursive: true });
|
|
136366
|
-
writeFileSync2(destPath, sourceContent);
|
|
136367
|
-
if (existingContent) {
|
|
136368
|
-
result.updated.push(destPath);
|
|
136369
|
-
opts.log?.info(
|
|
136370
|
-
"Updated %s skill at %s (content differed \u2014 local edits, if any, were overwritten)",
|
|
136371
|
-
name24,
|
|
136372
|
-
destPath
|
|
136373
|
-
);
|
|
136374
|
-
} else {
|
|
136375
|
-
result.written.push(destPath);
|
|
136376
|
-
opts.log?.info("Installed %s skill at %s", name24, destPath);
|
|
136468
|
+
break;
|
|
136377
136469
|
}
|
|
136378
136470
|
}
|
|
136379
136471
|
}
|
|
@@ -136385,14 +136477,97 @@ async function installSkills(opts = {}) {
|
|
|
136385
136477
|
}
|
|
136386
136478
|
return result;
|
|
136387
136479
|
}
|
|
136480
|
+
function ensureSymlink(args) {
|
|
136481
|
+
return ensureSymlinkInner(args, false);
|
|
136482
|
+
}
|
|
136483
|
+
function ensureSymlinkInner(args, retried) {
|
|
136484
|
+
const { link: link2, target } = args;
|
|
136485
|
+
mkdirSync5(dirname4(link2), { recursive: true });
|
|
136486
|
+
let existing = null;
|
|
136487
|
+
try {
|
|
136488
|
+
existing = lstatSync3(link2);
|
|
136489
|
+
} catch (err) {
|
|
136490
|
+
const code = err.code;
|
|
136491
|
+
if (code !== "ENOENT") {
|
|
136492
|
+
return {
|
|
136493
|
+
kind: "conflict",
|
|
136494
|
+
reason: `lstat failed: ${err instanceof Error ? err.message : String(err)}`
|
|
136495
|
+
};
|
|
136496
|
+
}
|
|
136497
|
+
}
|
|
136498
|
+
if (existing === null) {
|
|
136499
|
+
try {
|
|
136500
|
+
symlinkSync3(target, link2, "dir");
|
|
136501
|
+
return { kind: "created" };
|
|
136502
|
+
} catch (err) {
|
|
136503
|
+
if (err.code === "EEXIST") {
|
|
136504
|
+
if (retried) {
|
|
136505
|
+
return {
|
|
136506
|
+
kind: "conflict",
|
|
136507
|
+
reason: "EEXIST after retry \u2014 filesystem state is inconsistent"
|
|
136508
|
+
};
|
|
136509
|
+
}
|
|
136510
|
+
return ensureSymlinkInner(args, true);
|
|
136511
|
+
}
|
|
136512
|
+
return {
|
|
136513
|
+
kind: "conflict",
|
|
136514
|
+
reason: `failed to create symlink: ${err instanceof Error ? err.message : String(err)}`
|
|
136515
|
+
};
|
|
136516
|
+
}
|
|
136517
|
+
}
|
|
136518
|
+
if (existing.isSymbolicLink()) {
|
|
136519
|
+
let pointsAt;
|
|
136520
|
+
try {
|
|
136521
|
+
pointsAt = realpathSync3(link2);
|
|
136522
|
+
} catch (err) {
|
|
136523
|
+
return {
|
|
136524
|
+
kind: "conflict",
|
|
136525
|
+
reason: `existing symlink is broken (${err instanceof Error ? err.message : String(err)})`
|
|
136526
|
+
};
|
|
136527
|
+
}
|
|
136528
|
+
let targetReal;
|
|
136529
|
+
try {
|
|
136530
|
+
targetReal = realpathSync3(target);
|
|
136531
|
+
} catch (err) {
|
|
136532
|
+
return {
|
|
136533
|
+
kind: "conflict",
|
|
136534
|
+
reason: `target unreadable (${err instanceof Error ? err.message : String(err)})`
|
|
136535
|
+
};
|
|
136536
|
+
}
|
|
136537
|
+
if (pointsAt === targetReal) {
|
|
136538
|
+
return { kind: "already" };
|
|
136539
|
+
}
|
|
136540
|
+
return {
|
|
136541
|
+
kind: "conflict",
|
|
136542
|
+
reason: `symlink points to ${readlinkSafe(link2)} (expected ${target})`
|
|
136543
|
+
};
|
|
136544
|
+
}
|
|
136545
|
+
if (existing.isDirectory()) {
|
|
136546
|
+
return {
|
|
136547
|
+
kind: "conflict",
|
|
136548
|
+
reason: "path is a real directory (not a symlink)"
|
|
136549
|
+
};
|
|
136550
|
+
}
|
|
136551
|
+
return {
|
|
136552
|
+
kind: "conflict",
|
|
136553
|
+
reason: "path is a regular file (not a directory or symlink)"
|
|
136554
|
+
};
|
|
136555
|
+
}
|
|
136556
|
+
function readlinkSafe(p6) {
|
|
136557
|
+
try {
|
|
136558
|
+
return readlinkSync2(p6);
|
|
136559
|
+
} catch {
|
|
136560
|
+
return "<unreadable>";
|
|
136561
|
+
}
|
|
136562
|
+
}
|
|
136388
136563
|
|
|
136389
136564
|
// src/lib/hooks.ts
|
|
136390
136565
|
import { mkdirSync as mkdirSync6, readFileSync as readFileSync8, writeFileSync as writeFileSync3 } from "node:fs";
|
|
136391
136566
|
import { homedir as homedir10 } from "node:os";
|
|
136392
|
-
import { dirname as dirname5, join as
|
|
136567
|
+
import { dirname as dirname5, join as join21 } from "node:path";
|
|
136393
136568
|
var HOOK_EVENTS = ["PreToolUse", "PermissionRequest", "UserPromptSubmit", "PostToolUse", "Stop"];
|
|
136394
136569
|
function claudeSettingsPath() {
|
|
136395
|
-
return
|
|
136570
|
+
return join21(homedir10(), ".claude", "settings.json");
|
|
136396
136571
|
}
|
|
136397
136572
|
function loadClaudeSettings() {
|
|
136398
136573
|
try {
|
|
@@ -136576,12 +136751,16 @@ async function ensureSkillsInstalled() {
|
|
|
136576
136751
|
try {
|
|
136577
136752
|
const result = await installSkills({ log: log20 });
|
|
136578
136753
|
const wrote = result.written.length + result.updated.length;
|
|
136579
|
-
|
|
136754
|
+
const linkChange = result.linked.length;
|
|
136755
|
+
if (wrote > 0 || linkChange > 0 || result.conflicts.length > 0) {
|
|
136580
136756
|
log20.info(
|
|
136581
|
-
"Synced CLI skills (%d written, %d updated, %d unchanged, %d skipped)",
|
|
136757
|
+
"Synced CLI skills (shared: %d written, %d updated, %d unchanged; symlinks: %d created, %d already-linked, %d conflicts, %d skipped)",
|
|
136582
136758
|
result.written.length,
|
|
136583
136759
|
result.updated.length,
|
|
136584
136760
|
result.unchanged.length,
|
|
136761
|
+
result.linked.length,
|
|
136762
|
+
result.alreadyLinked.length,
|
|
136763
|
+
result.conflicts.length,
|
|
136585
136764
|
result.skipped.length
|
|
136586
136765
|
);
|
|
136587
136766
|
}
|
|
@@ -136593,7 +136772,7 @@ async function ensureSkillsInstalled() {
|
|
|
136593
136772
|
// src/lib/terminal-manager.ts
|
|
136594
136773
|
init_src();
|
|
136595
136774
|
import { existsSync as existsSync6 } from "node:fs";
|
|
136596
|
-
import { join as
|
|
136775
|
+
import { join as join22 } from "node:path";
|
|
136597
136776
|
|
|
136598
136777
|
// src/lib/terminal-layout-manager.ts
|
|
136599
136778
|
var manager3 = new DockviewLayoutManager("terminal_layout");
|
|
@@ -136649,7 +136828,7 @@ async function spawnTerminal(workspaceId, terminalId, options2) {
|
|
|
136649
136828
|
const workspaceRoot = workspace.worktree.path;
|
|
136650
136829
|
let cwd = workspaceRoot;
|
|
136651
136830
|
if (options2?.cwd) {
|
|
136652
|
-
const resolved =
|
|
136831
|
+
const resolved = join22(workspaceRoot, options2.cwd);
|
|
136653
136832
|
if (!resolved.startsWith(workspaceRoot)) {
|
|
136654
136833
|
log21.warn("Ignoring cwd %s \u2014 resolves outside workspace root %s", options2.cwd, workspaceRoot);
|
|
136655
136834
|
} else if (existsSync6(resolved)) {
|
|
@@ -143983,7 +144162,7 @@ import { execFile as execFile5, execFileSync as execFileSync2 } from "node:child
|
|
|
143983
144162
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
143984
144163
|
import { existsSync as existsSync7, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3 } from "node:fs";
|
|
143985
144164
|
import { cp, mkdir as mkdir2, readdir as readdir2, readFile as readFile2, rename, rm, stat as stat4, writeFile as writeFile2 } from "node:fs/promises";
|
|
143986
|
-
import { basename, dirname as dirname6, extname as extname2, join as
|
|
144165
|
+
import { basename, dirname as dirname6, extname as extname2, join as join23, resolve as resolve6, sep as sep2 } from "node:path";
|
|
143987
144166
|
import { promisify } from "node:util";
|
|
143988
144167
|
init_src();
|
|
143989
144168
|
init_zod();
|
|
@@ -144649,7 +144828,7 @@ var projectsRouter = t2.router({
|
|
|
144649
144828
|
}),
|
|
144650
144829
|
checkPath: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).query(({ input }) => {
|
|
144651
144830
|
const resolvedPath = resolve6(input.path);
|
|
144652
|
-
const isGitRepo = existsSync7(
|
|
144831
|
+
const isGitRepo = existsSync7(join23(resolvedPath, ".git"));
|
|
144653
144832
|
return { isGitRepo };
|
|
144654
144833
|
}),
|
|
144655
144834
|
gitInit: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).mutation(async ({ input }) => {
|
|
@@ -144758,8 +144937,8 @@ var workspacesRouter = t2.router({
|
|
|
144758
144937
|
return { ok: true, path: existing.path };
|
|
144759
144938
|
}
|
|
144760
144939
|
const wtDir = worktreesDir();
|
|
144761
|
-
const worktreePath =
|
|
144762
|
-
mkdirSync7(
|
|
144940
|
+
const worktreePath = join23(wtDir, input.project, input.branch);
|
|
144941
|
+
mkdirSync7(join23(wtDir, input.project), { recursive: true });
|
|
144763
144942
|
const { command, env } = gitCmd();
|
|
144764
144943
|
const args = ["worktree", "add"];
|
|
144765
144944
|
if (input.base) {
|
|
@@ -144823,7 +145002,7 @@ var workspacesRouter = t2.router({
|
|
|
144823
145002
|
saveState(state2);
|
|
144824
145003
|
const workspaceId = toWorkspaceId(input.project, input.branch);
|
|
144825
145004
|
try {
|
|
144826
|
-
unlinkSync3(
|
|
145005
|
+
unlinkSync3(join23(bandHome(), "workspace-prompts", `${workspaceId}.json`));
|
|
144827
145006
|
} catch {
|
|
144828
145007
|
}
|
|
144829
145008
|
deleteWorkspaceStatus(workspaceId);
|
|
@@ -144837,6 +145016,17 @@ var workspacesRouter = t2.router({
|
|
|
144837
145016
|
killWorkspaceServers(workspaceId);
|
|
144838
145017
|
stopJobsForKey(workspaceId);
|
|
144839
145018
|
deleteCronjobFile(workspaceId);
|
|
145019
|
+
try {
|
|
145020
|
+
const deletedTasks = deleteWorkspaceTasks(workspaceId);
|
|
145021
|
+
if (deletedTasks > 0) {
|
|
145022
|
+
log26.info(
|
|
145023
|
+
{ workspaceId, count: deletedTasks },
|
|
145024
|
+
"deleted workspace tasks on removal"
|
|
145025
|
+
);
|
|
145026
|
+
}
|
|
145027
|
+
} catch (err) {
|
|
145028
|
+
log26.error({ workspaceId, err }, "failed to delete workspace tasks on removal");
|
|
145029
|
+
}
|
|
144840
145030
|
emit({ kind: "remove", workspaceId });
|
|
144841
145031
|
const projPath = proj.path;
|
|
144842
145032
|
setImmediate(() => {
|
|
@@ -144941,7 +145131,7 @@ var workspacesRouter = t2.router({
|
|
|
144941
145131
|
return { ok: true };
|
|
144942
145132
|
}),
|
|
144943
145133
|
runScript: publicProcedure.input(external_exports2.object({ path: external_exports2.string(), scriptType: external_exports2.string() })).mutation(({ input }) => {
|
|
144944
|
-
const scriptPath =
|
|
145134
|
+
const scriptPath = join23(input.path, ".band", input.scriptType);
|
|
144945
145135
|
if (!existsSync7(scriptPath)) {
|
|
144946
145136
|
throw new Error(`Script "${input.scriptType}" not found`);
|
|
144947
145137
|
}
|
|
@@ -145079,7 +145269,7 @@ function parseFileStatuses(nameStatusOutput) {
|
|
|
145079
145269
|
}
|
|
145080
145270
|
async function readUntrackedFileLines(cwd, file2) {
|
|
145081
145271
|
try {
|
|
145082
|
-
const content2 = await readFile2(
|
|
145272
|
+
const content2 = await readFile2(join23(cwd, file2), "utf-8");
|
|
145083
145273
|
const lines = content2.split("\n");
|
|
145084
145274
|
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
145085
145275
|
lines.pop();
|
|
@@ -145305,7 +145495,7 @@ var workspaceRouter = t2.router({
|
|
|
145305
145495
|
const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
|
|
145306
145496
|
if (untrackedFiles.includes(input.filePath)) {
|
|
145307
145497
|
try {
|
|
145308
|
-
const content2 = await readFile2(
|
|
145498
|
+
const content2 = await readFile2(join23(cwd, input.filePath), "utf-8");
|
|
145309
145499
|
const lines = content2.split("\n");
|
|
145310
145500
|
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
145311
145501
|
lines.pop();
|
|
@@ -145350,7 +145540,7 @@ var workspaceRouter = t2.router({
|
|
|
145350
145540
|
const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
|
|
145351
145541
|
const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
|
|
145352
145542
|
if (untrackedFiles.includes(filePath)) {
|
|
145353
|
-
await rm(
|
|
145543
|
+
await rm(join23(cwd, filePath), { force: true });
|
|
145354
145544
|
return { ok: true };
|
|
145355
145545
|
}
|
|
145356
145546
|
const { mergeBase: ref } = await resolveDiffContext(
|
|
@@ -145513,7 +145703,7 @@ var workspaceRouter = t2.router({
|
|
|
145513
145703
|
throw new Error("Workspace not found");
|
|
145514
145704
|
}
|
|
145515
145705
|
const root = workspace.worktree.path;
|
|
145516
|
-
const target = resolve6(
|
|
145706
|
+
const target = resolve6(join23(root, input.path));
|
|
145517
145707
|
if (!target.startsWith(root)) {
|
|
145518
145708
|
throw new Error("Invalid path");
|
|
145519
145709
|
}
|
|
@@ -145536,7 +145726,7 @@ var workspaceRouter = t2.router({
|
|
|
145536
145726
|
throw new Error("Path is required");
|
|
145537
145727
|
}
|
|
145538
145728
|
const root = workspace.worktree.path;
|
|
145539
|
-
const target = resolve6(
|
|
145729
|
+
const target = resolve6(join23(root, input.path));
|
|
145540
145730
|
if (!target.startsWith(root)) {
|
|
145541
145731
|
throw new Error("Invalid path");
|
|
145542
145732
|
}
|
|
@@ -145570,7 +145760,7 @@ var workspaceRouter = t2.router({
|
|
|
145570
145760
|
throw new Error("Workspace not found");
|
|
145571
145761
|
}
|
|
145572
145762
|
const root = workspace.worktree.path;
|
|
145573
|
-
const target = resolve6(
|
|
145763
|
+
const target = resolve6(join23(root, input.path));
|
|
145574
145764
|
if (!target.startsWith(root)) {
|
|
145575
145765
|
throw new Error("Invalid path");
|
|
145576
145766
|
}
|
|
@@ -145593,7 +145783,7 @@ var workspaceRouter = t2.router({
|
|
|
145593
145783
|
throw new Error("Workspace not found");
|
|
145594
145784
|
}
|
|
145595
145785
|
const root = workspace.worktree.path;
|
|
145596
|
-
const target = resolve6(
|
|
145786
|
+
const target = resolve6(join23(root, input.path));
|
|
145597
145787
|
if (!target.startsWith(root) || target === root) {
|
|
145598
145788
|
throw new Error("Invalid path");
|
|
145599
145789
|
}
|
|
@@ -145622,7 +145812,7 @@ var workspaceRouter = t2.router({
|
|
|
145622
145812
|
throw new Error("Workspace not found");
|
|
145623
145813
|
}
|
|
145624
145814
|
const root = workspace.worktree.path;
|
|
145625
|
-
const target = resolve6(
|
|
145815
|
+
const target = resolve6(join23(root, input.path));
|
|
145626
145816
|
if (!target.startsWith(root) || target === root) {
|
|
145627
145817
|
throw new Error("Invalid path");
|
|
145628
145818
|
}
|
|
@@ -145651,7 +145841,7 @@ var workspaceRouter = t2.router({
|
|
|
145651
145841
|
throw new Error("Workspace not found");
|
|
145652
145842
|
}
|
|
145653
145843
|
const root = workspace.worktree.path;
|
|
145654
|
-
const target = resolve6(
|
|
145844
|
+
const target = resolve6(join23(root, input.path));
|
|
145655
145845
|
if (!target.startsWith(root) || target === root) {
|
|
145656
145846
|
throw new Error("Invalid path");
|
|
145657
145847
|
}
|
|
@@ -145683,8 +145873,8 @@ var workspaceRouter = t2.router({
|
|
|
145683
145873
|
throw new Error("Workspace not found");
|
|
145684
145874
|
}
|
|
145685
145875
|
const root = workspace.worktree.path;
|
|
145686
|
-
const fromTarget = resolve6(
|
|
145687
|
-
const toTarget = resolve6(
|
|
145876
|
+
const fromTarget = resolve6(join23(root, input.fromPath));
|
|
145877
|
+
const toTarget = resolve6(join23(root, input.toPath));
|
|
145688
145878
|
if (!fromTarget.startsWith(root) || fromTarget === root) {
|
|
145689
145879
|
throw new Error("Invalid source path");
|
|
145690
145880
|
}
|
|
@@ -145734,8 +145924,8 @@ var workspaceRouter = t2.router({
|
|
|
145734
145924
|
throw new Error("Workspace not found");
|
|
145735
145925
|
}
|
|
145736
145926
|
const root = workspace.worktree.path;
|
|
145737
|
-
const fromTarget = resolve6(
|
|
145738
|
-
const toTarget = resolve6(
|
|
145927
|
+
const fromTarget = resolve6(join23(root, input.fromPath));
|
|
145928
|
+
const toTarget = resolve6(join23(root, input.toPath));
|
|
145739
145929
|
if (!fromTarget.startsWith(root) || fromTarget === root) {
|
|
145740
145930
|
throw new Error("Invalid source path");
|
|
145741
145931
|
}
|
|
@@ -147208,7 +147398,7 @@ function getScalarHtml(specUrl) {
|
|
|
147208
147398
|
function logCrash(message) {
|
|
147209
147399
|
try {
|
|
147210
147400
|
mkdirSync8(bandHome(), { recursive: true });
|
|
147211
|
-
appendFileSync2(
|
|
147401
|
+
appendFileSync2(join24(bandHome(), "server.log"), message, "utf-8");
|
|
147212
147402
|
} catch {
|
|
147213
147403
|
}
|
|
147214
147404
|
}
|
|
@@ -147233,7 +147423,7 @@ ${error40.stack || error40.message}
|
|
|
147233
147423
|
`);
|
|
147234
147424
|
process.exit(1);
|
|
147235
147425
|
});
|
|
147236
|
-
var clientDir =
|
|
147426
|
+
var clientDir = join24(import.meta.dirname, "client");
|
|
147237
147427
|
var port = parseInt(process.env.PORT || "3456", 10);
|
|
147238
147428
|
delete process.env.PORT;
|
|
147239
147429
|
process.env.BAND_PORT = String(port);
|
|
@@ -147245,7 +147435,7 @@ var assets = build_default(clientDir, {
|
|
|
147245
147435
|
gzip: true,
|
|
147246
147436
|
etag: true
|
|
147247
147437
|
});
|
|
147248
|
-
var openApiDoc = JSON.parse(readFileSync9(
|
|
147438
|
+
var openApiDoc = JSON.parse(readFileSync9(join24(import.meta.dirname, "openapi.json"), "utf-8"));
|
|
147249
147439
|
openApiDoc.servers = [{ url: "/trpc" }];
|
|
147250
147440
|
var openApiSpec = JSON.stringify(openApiDoc, null, 2);
|
|
147251
147441
|
var scalarHtml = getScalarHtml("/api/openapi.json");
|
|
@@ -147256,7 +147446,7 @@ function serveStaticFile(res, root, subdir, rawFilename) {
|
|
|
147256
147446
|
res.end("Bad request");
|
|
147257
147447
|
return;
|
|
147258
147448
|
}
|
|
147259
|
-
const filePath =
|
|
147449
|
+
const filePath = join24(root, subdir, filename);
|
|
147260
147450
|
try {
|
|
147261
147451
|
const fileStat = statSync7(filePath);
|
|
147262
147452
|
const contentType = mimeTypeFromFilename(filename);
|
|
@@ -147279,7 +147469,7 @@ function serveWorkspaceFile(res, workspaceId, rawPath) {
|
|
|
147279
147469
|
return;
|
|
147280
147470
|
}
|
|
147281
147471
|
const root = workspace.worktree.path;
|
|
147282
|
-
const target = resolve7(
|
|
147472
|
+
const target = resolve7(join24(root, rawPath));
|
|
147283
147473
|
if (!target.startsWith(`${root}/`) && target !== root) {
|
|
147284
147474
|
res.writeHead(400);
|
|
147285
147475
|
res.end("Bad request");
|
|
@@ -147303,6 +147493,7 @@ async function main() {
|
|
|
147303
147493
|
runMigrations();
|
|
147304
147494
|
loadChatsFromDb();
|
|
147305
147495
|
cleanupStaleTasks();
|
|
147496
|
+
startTaskPruneScheduler();
|
|
147306
147497
|
const resetCount = resetAgentStatuses();
|
|
147307
147498
|
if (resetCount > 0) {
|
|
147308
147499
|
console.log(`Reset ${resetCount} stale agent status(es) on startup`);
|
|
@@ -147331,7 +147522,7 @@ async function main() {
|
|
|
147331
147522
|
res.end("Bad request");
|
|
147332
147523
|
return;
|
|
147333
147524
|
}
|
|
147334
|
-
serveStaticFile(res, bandHome(),
|
|
147525
|
+
serveStaticFile(res, bandHome(), join24("shared", partition), rest.slice(slashIdx + 1));
|
|
147335
147526
|
return;
|
|
147336
147527
|
}
|
|
147337
147528
|
if (req.url?.startsWith("/api/workspace-file/")) {
|
|
@@ -147553,6 +147744,7 @@ async function main() {
|
|
|
147553
147744
|
const shutdown = async () => {
|
|
147554
147745
|
stopBranchStatusPoller();
|
|
147555
147746
|
stopCronjobScheduler();
|
|
147747
|
+
stopTaskPruneScheduler();
|
|
147556
147748
|
killAllTerminals();
|
|
147557
147749
|
killAllServers();
|
|
147558
147750
|
await stopTunnel().catch(() => {
|