@qwen-code/qwen-code 0.23.5-dev.codemode-responses.20260915.af4da34719 → 0.23.5-preview.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/bundled/computer-use/SKILL.md +24 -3
- package/bundled/qc-helper/docs/configuration/model-providers.md +43 -0
- package/bundled/qc-helper/docs/configuration/settings.md +10 -9
- package/bundled/qc-helper/docs/extension/agent-plugins.md +1 -0
- package/bundled/qc-helper/docs/extension/introduction.md +49 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +39 -4
- package/bundled/qc-helper/docs/features/channels/overview.md +12 -0
- package/bundled/qc-helper/docs/features/commands.md +57 -52
- package/bundled/qc-helper/docs/features/computer-use.md +1 -1
- package/bundled/qc-helper/docs/features/goals.md +8 -0
- package/bundled/qc-helper/docs/features/hooks.md +16 -0
- package/bundled/qc-helper/docs/qwen-serve.md +3 -1
- package/bundled/workflow-authoring/SKILL.md +48 -22
- package/chunks/{MaxSizedBox-3K65WFGY.js → MaxSizedBox-FCF6M53W.js} +40 -43
- package/chunks/{StandaloneSessionPicker-JKM33JPY.js → StandaloneSessionPicker-V635V72I.js} +60 -63
- package/chunks/{acp-startup-profiler-RUQNTNU5.js → acp-startup-profiler-MOOU37VM.js} +2 -2
- package/chunks/{acp-subagent-executor-KIZBB2CL.js → acp-subagent-executor-TND6W2O5.js} +46 -47
- package/chunks/{acpAgent-SHI4L5EV.js → acpAgent-3DPWZTNC.js} +954 -322
- package/chunks/{agent-AJXNVRX2.js → agent-KIHGINKN.js} +27 -30
- package/chunks/{agent-headless-2JPJKYHK.js → agent-headless-EJ4QOUSM.js} +27 -30
- package/chunks/{anthropicContentGenerator-H5YPXIDE.js → anthropicContentGenerator-4FGOM5LK.js} +46 -64
- package/chunks/{artifact-tool-MFGORTWZ.js → artifact-tool-MUTNH4NI.js} +1 -1
- package/chunks/{askUserQuestion-WS4GUT7C.js → askUserQuestion-AKIRLVB5.js} +1 -1
- package/chunks/bareMode-QWKZPLPX.js +14 -0
- package/chunks/{bridge-KZYSMV4N.js → bridge-MUX5YJZT.js} +46 -49
- package/chunks/{ca-GZ4FDJU2.js → ca-WC3A5B3Q.js} +12 -1
- package/chunks/{channel-management-service-AFVIT4VH.js → channel-management-service-RRILWSXX.js} +4 -4
- package/chunks/{channel-settings-store-IJG52IDV.js → channel-settings-store-7CBIRZER.js} +51 -54
- package/chunks/{channel-worker-group-JR6JOELM.js → channel-worker-group-3DUJFZJR.js} +8 -8
- package/chunks/{channel-worker-manager-AVKJEZFL.js → channel-worker-manager-E5UW2VLA.js} +8 -8
- package/chunks/{channel-worker-supervisor-OOYY7BAQ.js → channel-worker-supervisor-VN33GSEC.js} +5 -5
- package/chunks/{chunk-2YMRRI2C.js → chunk-2C5TR6HN.js} +82 -9
- package/chunks/{chunk-YDFOHRS5.js → chunk-2GP6BQ2J.js} +1 -1
- package/chunks/{chunk-JATZTB7X.js → chunk-347O2YZJ.js} +158 -290
- package/chunks/{chunk-RYREFZFH.js → chunk-36NRLIR6.js} +10 -8
- package/chunks/{chunk-AXZMWAJV.js → chunk-36SDZ2Q4.js} +8 -0
- package/chunks/{chunk-QR4Q425T.js → chunk-3BZI5GDP.js} +1 -1
- package/chunks/{chunk-IP6NRULS.js → chunk-3HTUE6ZR.js} +3 -3
- package/chunks/{chunk-B2VSRPS6.js → chunk-3LLEB5CU.js} +2 -2
- package/chunks/{chunk-L2XNHRDL.js → chunk-3UGMLA4V.js} +10 -8
- package/chunks/{chunk-66N6C4EH.js → chunk-3WILPKTJ.js} +2 -2
- package/chunks/{chunk-SROLVJFY.js → chunk-3WWPEFMX.js} +1 -1
- package/chunks/{chunk-ZKIAGIGH.js → chunk-3XBUCOWS.js} +1 -1
- package/chunks/{chunk-737SVOO7.js → chunk-43Y26NPF.js} +3 -3
- package/chunks/{chunk-INGBUYL6.js → chunk-4FLUQWJ4.js} +1 -1
- package/chunks/{chunk-BTBJEB27.js → chunk-4JFLRHNE.js} +1 -1
- package/chunks/{chunk-MJHLKWGJ.js → chunk-4QPVZA5J.js} +70 -23
- package/chunks/{chunk-XX5HQLCZ.js → chunk-6OTF7TTE.js} +32 -1
- package/chunks/{chunk-4Y2I3CI3.js → chunk-6USYH3EU.js} +99 -6
- package/chunks/{chunk-Q3TFRP5G.js → chunk-7D4CV7JH.js} +102 -9
- package/chunks/{chunk-EWJTAP3Y.js → chunk-7O5PYQ3M.js} +20 -1
- package/chunks/chunk-ADN5KESB.js +28 -0
- package/chunks/chunk-AKRSSKUT.js +229 -0
- package/chunks/{chunk-IOXJX7XE.js → chunk-AQP3H22J.js} +1 -1
- package/chunks/{chunk-YP7QCE7X.js → chunk-AUX2FL5T.js} +24 -7
- package/chunks/{chunk-YGFJ6BRT.js → chunk-AZCTY64Z.js} +1 -1
- package/chunks/{chunk-5CDDYYNI.js → chunk-B5TJK7B3.js} +1 -1
- package/chunks/{chunk-7MKB7L25.js → chunk-B6RMK4ED.js} +4 -4
- package/chunks/{chunk-YH24ZJ65.js → chunk-BHG3H6OZ.js} +1 -1
- package/chunks/{chunk-BRPYJQDD.js → chunk-BHVF3R6B.js} +7 -5
- package/chunks/{chunk-HFJSQ4GL.js → chunk-BTICBRPL.js} +1 -1
- package/chunks/{chunk-KZCK5JUN.js → chunk-C3T6HPNM.js} +1 -1
- package/chunks/{chunk-UB2MATP5.js → chunk-CDDP4ONL.js} +164 -27
- package/chunks/{chunk-OL3TNHFM.js → chunk-CQPM66MG.js} +4 -4
- package/chunks/{chunk-WKVZES7O.js → chunk-CXONOVBN.js} +1 -1
- package/chunks/{chunk-6IHJLXNF.js → chunk-CXY6BICQ.js} +501 -479
- package/chunks/{chunk-I5QPDANL.js → chunk-D3KVGQUV.js} +1 -1
- package/chunks/{chunk-LMJSPC55.js → chunk-D7JMO2GP.js} +3 -7
- package/chunks/{chunk-CXXAZ2LZ.js → chunk-DC4ZNGH4.js} +1 -1
- package/chunks/{chunk-FMLBBXHB.js → chunk-DRAX5YAI.js} +2 -2
- package/chunks/{chunk-DOTF2PF2.js → chunk-DRD6VBNH.js} +1 -1
- package/chunks/chunk-DX6JTDMR.js +105 -0
- package/chunks/{chunk-HJAJ6MR6.js → chunk-E2VSBAFA.js} +53 -11
- package/chunks/{chunk-G7ZYRFHS.js → chunk-EIBECN2J.js} +3 -3
- package/chunks/{chunk-LWWRJRCD.js → chunk-ESBYWATJ.js} +1 -1
- package/chunks/{chunk-2PLQ3CXJ.js → chunk-FASYATAZ.js} +5 -7
- package/chunks/{chunk-3ADU34IF.js → chunk-FBY32737.js} +4 -4
- package/chunks/{chunk-SIDVJZWH.js → chunk-FCPJXKDG.js} +10 -7
- package/chunks/{chunk-5GXJBU7K.js → chunk-FEDFZBGR.js} +3 -3
- package/chunks/{chunk-CALVKIIG.js → chunk-FIJODK52.js} +3 -3
- package/chunks/{chunk-ZTVYMZBD.js → chunk-FX6PZBOV.js} +3 -3
- package/chunks/{chunk-L6DIANLD.js → chunk-G45B3INR.js} +1 -1
- package/chunks/{chunk-TATT2THJ.js → chunk-GI7SLDOI.js} +2 -2
- package/chunks/chunk-GJKP6XOB.js +1092 -0
- package/chunks/{chunk-I6YJZGHS.js → chunk-GSAOVDTH.js} +9 -9
- package/chunks/{chunk-7MIOAF77.js → chunk-H6L4NEAT.js} +1 -1
- package/chunks/{chunk-MJGJF6G6.js → chunk-HNFKYKHH.js} +103 -22
- package/chunks/{chunk-PN6D5LWJ.js → chunk-HX4WXX3H.js} +301 -138
- package/chunks/{chunk-HG46TTAG.js → chunk-HXUI5D4H.js} +1 -1
- package/chunks/{chunk-JF2CFBDK.js → chunk-HYHSMTRA.js} +4 -4
- package/chunks/{chunk-4DZMYFZA.js → chunk-IKBEIDOH.js} +14 -14
- package/chunks/{chunk-QEENIXYB.js → chunk-INN5ORKX.js} +1 -1
- package/chunks/{chunk-GNV2SFO7.js → chunk-IVFTLUZD.js} +26 -1
- package/chunks/{chunk-L2NII7PZ.js → chunk-IXO2OCIP.js} +2 -2
- package/chunks/{chunk-6MAHSVMB.js → chunk-K4XMAIRX.js} +30 -33
- package/chunks/{chunk-AYMSNIYL.js → chunk-KAYC5FBN.js} +5269 -2785
- package/chunks/chunk-KEM7MWS7.js +3541 -0
- package/chunks/{chunk-ADQUK6WA.js → chunk-KVC7HZWK.js} +1 -1
- package/chunks/{chunk-Z35OSDIT.js → chunk-KVQ3QL4K.js} +3 -3
- package/chunks/{chunk-7U5G6JXI.js → chunk-KWYTSSTJ.js} +105 -6
- package/chunks/{chunk-PZRAE65J.js → chunk-L2A5VBDL.js} +3019 -2352
- package/chunks/{chunk-WD6YQI5M.js → chunk-L3SNMEDW.js} +1 -1
- package/chunks/{chunk-BYUAT5OC.js → chunk-L7TJUPNR.js} +19 -3
- package/chunks/{chunk-ABNX6E6K.js → chunk-LFKXIOGC.js} +1 -1
- package/chunks/{chunk-NFQOOITE.js → chunk-LO2UWNO5.js} +2 -2
- package/chunks/{chunk-LWUTZKDU.js → chunk-M22WLKLI.js} +5 -5
- package/chunks/{chunk-54B2LTKP.js → chunk-M23GFJ5B.js} +24 -5
- package/chunks/{chunk-VGY2RGXL.js → chunk-M4U2LTD2.js} +1 -1
- package/chunks/{chunk-ZNI3YJHS.js → chunk-MFDKHGTD.js} +1 -1
- package/chunks/{chunk-R7OO56VZ.js → chunk-MMRGG6R4.js} +1 -1
- package/chunks/{chunk-E6IR653O.js → chunk-MO4XID7S.js} +1 -1
- package/chunks/{chunk-FZQQMVLB.js → chunk-NKTMUPHJ.js} +3 -6
- package/chunks/{chunk-V77DTVCM.js → chunk-NQ272MQG.js} +1 -1
- package/chunks/{chunk-TDFLM7BE.js → chunk-OALXNGUA.js} +6 -6
- package/chunks/{chunk-FBDHP23D.js → chunk-OSG23MR3.js} +1 -1
- package/chunks/{chunk-NJ2OFVUX.js → chunk-P42KMMU6.js} +860 -1
- package/chunks/{chunk-Y33TCKXL.js → chunk-PF7GAP6K.js} +60 -58
- package/chunks/{chunk-MQRLLBMQ.js → chunk-PPJSG2PU.js} +2 -2
- package/chunks/{chunk-EPVEPTI3.js → chunk-PZRXWQUA.js} +753 -18
- package/chunks/{chunk-OLN7QX4P.js → chunk-Q54O3EIA.js} +30 -28
- package/chunks/{chunk-DQH3EVAD.js → chunk-QGEISOJ2.js} +4 -4
- package/chunks/{chunk-3M4O2AY3.js → chunk-QHSOINX6.js} +2 -2
- package/chunks/{chunk-HIQEL7EM.js → chunk-QIPLWW6Q.js} +1 -1
- package/chunks/chunk-QMENOK5T.js +1246 -0
- package/chunks/chunk-QT6Z2IBF.js +347 -0
- package/chunks/{chunk-TBSCTWKF.js → chunk-RN6A53UJ.js} +25 -0
- package/chunks/{chunk-65BKWMMH.js → chunk-RRI764F7.js} +21 -19
- package/chunks/{chunk-YI2YCNSP.js → chunk-SENYKRII.js} +1 -1
- package/chunks/chunk-SFHX5G2S.js +2796 -0
- package/chunks/chunk-SK3RZOPS.js +34 -0
- package/chunks/{chunk-MD6KXINN.js → chunk-SOLRBF7L.js} +13 -9
- package/chunks/{chunk-6BCN3VOY.js → chunk-SSWTA7CH.js} +12 -12
- package/chunks/{chunk-IAS753HG.js → chunk-SYMXYRM5.js} +11 -2
- package/chunks/{chunk-FGROOEKM.js → chunk-TDKUXSJO.js} +34 -6
- package/chunks/{chunk-ZJ7JQUGY.js → chunk-TKF4JINY.js} +1 -1
- package/chunks/{chunk-RVK37FWG.js → chunk-TPY6HW55.js} +4 -4
- package/chunks/{chunk-EDB556X7.js → chunk-TRZ22SG5.js} +1 -1
- package/chunks/{chunk-7LG4MUUD.js → chunk-TXTCM3TC.js} +4 -4
- package/chunks/{chunk-5ODRE7E5.js → chunk-U4AASWUQ.js} +28 -12
- package/chunks/{chunk-WPMRT4AR.js → chunk-UQGRJTDK.js} +2 -2
- package/chunks/{chunk-JBS56C7O.js → chunk-UZSB57EV.js} +6 -8
- package/chunks/{chunk-S4M6BDNE.js → chunk-V4JJAVHQ.js} +2 -2
- package/chunks/chunk-VEXUA6DX.js +1026 -0
- package/chunks/{chunk-ME4JBHSB.js → chunk-VQDWCQOE.js} +2 -0
- package/chunks/{chunk-3XXDCC5C.js → chunk-VU3XMZ5I.js} +23 -4
- package/chunks/{chunk-RD2HAF25.js → chunk-WL36KHUQ.js} +6 -6
- package/chunks/{chunk-WYRSEVBQ.js → chunk-WNQIJTOP.js} +8 -8
- package/chunks/{chunk-GTBXQ5W2.js → chunk-WSJI6ODG.js} +99 -30
- package/chunks/{chunk-VN5G33G7.js → chunk-WZWTY7SG.js} +6 -6
- package/chunks/{chunk-EKMJR7M3.js → chunk-X7AYIXC7.js} +1 -1
- package/chunks/{chunk-IBRQG2MP.js → chunk-XAJZFGD2.js} +11 -11
- package/chunks/{chunk-VRQZESKP.js → chunk-XICCGDWF.js} +2 -2
- package/chunks/{chunk-OZ2KDR2L.js → chunk-Y2KJC55Y.js} +12 -7
- package/chunks/{chunk-2S2WIGCM.js → chunk-Y4NNIGYO.js} +1 -1
- package/chunks/{chunk-J7LBAKDH.js → chunk-YL3UJML3.js} +7 -7
- package/chunks/{chunk-GSS4SZNG.js → chunk-YP2K3WOS.js} +40 -56
- package/chunks/{chunk-ZZUXUBEB.js → chunk-YQQ2U7AS.js} +8 -5
- package/chunks/{chunk-FAWTMDX7.js → chunk-YXHY6BKS.js} +15 -0
- package/chunks/{chunk-VIV2I3R7.js → chunk-YZXSDPOQ.js} +140 -39
- package/chunks/{chunk-KZ63S3HX.js → chunk-ZFHKUQZ4.js} +3 -3
- package/chunks/{chunk-B6KSTADQ.js → chunk-ZMYKNKET.js} +6 -6
- package/chunks/{codex-subagent-executor-6M7TD3MF.js → codex-subagent-executor-AEAIQZDC.js} +48 -49
- package/chunks/{config-utils-TB4QERW7.js → config-utils-KX2YS725.js} +43 -46
- package/chunks/{contextCommand-BFQMDECM.js → contextCommand-RV6Y5LNJ.js} +41 -44
- package/chunks/{core-runtime-Z2QJJMHR.js → core-runtime-ZI4RTOJQ.js} +45 -48
- package/chunks/{create-sub-session-GE4U3D7C.js → create-sub-session-BBWFQARJ.js} +46 -48
- package/chunks/{daemon-NJB4PWZ7.js → daemon-INCM4VBX.js} +3 -1
- package/chunks/{daemon-git-worktree-guard-IPA22S72.js → daemon-git-worktree-guard-KECEMV6A.js} +39 -42
- package/chunks/{daemon-status-provider-2U5WPCCB.js → daemon-status-provider-NULJNAEV.js} +53 -56
- package/chunks/{daemon-trust-policy-GEIGMVDQ.js → daemon-trust-policy-S4KWGPV3.js} +47 -50
- package/chunks/{daemon-trust-policy-monitor-JETBW5FX.js → daemon-trust-policy-monitor-546N5ZVL.js} +47 -50
- package/chunks/{de-VGY3VNBU.js → de-6AVKPTXQ.js} +11 -0
- package/chunks/{deferred-core-runtime-LANRK77C.js → deferred-core-runtime-T23ZT443.js} +39 -42
- package/chunks/{dist-NIOJXMGY.js → dist-4P3ZJYGI.js} +1 -1
- package/chunks/{dist-VDLSBCLM.js → dist-7MGRENQ5.js} +1 -1
- package/chunks/{dist-SE4J6Z4O.js → dist-BNW423XT.js} +326 -77
- package/chunks/{dist-TFGETXFN.js → dist-CESMUYGN.js} +4 -4
- package/chunks/{dist-MPUZZOG5.js → dist-DBBOFWSC.js} +1 -1
- package/chunks/{dist-T6DDPDLQ.js → dist-G5UMXIGF.js} +1 -1
- package/chunks/{dist-PA7WPFVE.js → dist-UXVNLQHG.js} +3 -3
- package/chunks/{dist-GUB7QRYA.js → dist-VA4LREAQ.js} +2 -2
- package/chunks/{dist-2QYIVNS6.js → dist-XDRTR4QP.js} +1 -1
- package/chunks/{edit-QC63PJOZ.js → edit-CMSQB7NP.js} +27 -30
- package/chunks/{en-E5ZO5TZW.js → en-56QLKXS2.js} +23 -1
- package/chunks/{enter-worktree-CAARFWBI.js → enter-worktree-DA6A4XC5.js} +3 -3
- package/chunks/{enterPlanMode-5TMWDRXD.js → enterPlanMode-UDPMNESD.js} +27 -30
- package/chunks/{environment-TNQVM5B3.js → environment-TSQJUTPV.js} +42 -45
- package/chunks/{errors-KWDDLG7P.js → errors-RIVYJS6T.js} +41 -44
- package/chunks/{exit-worktree-JXGGUOBP.js → exit-worktree-4H6Z2VQI.js} +3 -3
- package/chunks/{exitPlanMode-CLEWPZIE.js → exitPlanMode-BYBBFN2T.js} +27 -30
- package/chunks/{fast-path-PMRLQT7J.js → fast-path-F2CYDDZ4.js} +4 -4
- package/chunks/{fast-path-settings-XDYX7X5Z.js → fast-path-settings-N2VGRGDJ.js} +2 -2
- package/chunks/{fr-UAZJJH5N.js → fr-EBUDHJL3.js} +11 -0
- package/chunks/{glob-3AK4KKCE.js → glob-Z2JMJKKN.js} +27 -30
- package/chunks/{goal-tools-FD6OCE6Q.js → goal-tools-HXVVLGCV.js} +27 -30
- package/chunks/{handleAutoUpdate-QUNNMMY6.js → handleAutoUpdate-FZP45KOR.js} +43 -46
- package/chunks/{i18n-DVN326VM.js → i18n-OTB62AKW.js} +40 -43
- package/chunks/{image-gen-5G2TQ3DY.js → image-gen-HIAZCB5T.js} +6 -7
- package/chunks/{initializer-JHEJBPVJ.js → initializer-4JXZEC4B.js} +47 -50
- package/chunks/{installationInfo-DYOI4I5U.js → installationInfo-2IJV5QKC.js} +39 -42
- package/chunks/{ja-2RITCMAJ.js → ja-NCDT4CGV.js} +11 -0
- package/chunks/{list-MW74DDMO.js → list-KQSQ4A5G.js} +50 -53
- package/chunks/{llm-HUDP76IA.js → llm-LSUBOJAR.js} +154 -974
- package/chunks/{llm-content-generator-KYD6ZEM6.js → llm-content-generator-MLIONRXE.js} +17 -12
- package/chunks/{loadedSettingsAdapter-RRAZOPRB.js → loadedSettingsAdapter-TZTTNRHI.js} +47 -50
- package/chunks/{loggingContentGenerator-MHE6Z2OZ.js → loggingContentGenerator-TUPEXFMM.js} +31 -34
- package/chunks/{loop-wakeup-VG6CGBQA.js → loop-wakeup-ZBVRI6VH.js} +1 -1
- package/chunks/{managed-npm-update-3G3O3T3R.js → managed-npm-update-WEA5XMFZ.js} +40 -43
- package/chunks/{mcp-JGLBFJQB.js → mcp-TFDTUPIA.js} +47 -50
- package/chunks/{model-configuration-EGWMLK4P.js → model-configuration-ZCAKKIOF.js} +48 -51
- package/chunks/{modelConfigUtils-H4WFGWQD.js → modelConfigUtils-J3ZPW7ZK.js} +41 -44
- package/chunks/{monitor-62V72TGX.js → monitor-CI7YE7MT.js} +29 -32
- package/chunks/{nonInteractiveCli-GYKHG7RX.js → nonInteractiveCli-GPT3TVOK.js} +96 -98
- package/chunks/{notebook-edit-HOJLHP3F.js → notebook-edit-3WCVRNGL.js} +27 -30
- package/chunks/{openaiContentGenerator-ZAJTUWVO.js → openaiContentGenerator-OGILGUZE.js} +12 -17
- package/chunks/{openaiResponsesContentGenerator-AWRYZLJU.js → openaiResponsesContentGenerator-NXOXUPFM.js} +45 -13
- package/chunks/{pidfile-CS7LHAN5.js → pidfile-GBTBIGHF.js} +39 -42
- package/chunks/{process-registry-X6ZCASEN.js → process-registry-7LAPI3ZB.js} +1 -1
- package/chunks/{processUtils-OWQU3JQM.js → processUtils-O4II3RYH.js} +2 -2
- package/chunks/{prompt-terminal-ledger-76P527XD.js → prompt-terminal-ledger-ILIXZI3E.js} +40 -43
- package/chunks/{pt-5ZF7ZQUV.js → pt-FYYFWYUC.js} +11 -0
- package/chunks/{qwenContentGenerator-QZCQ3UTX.js → qwenContentGenerator-I4LRYADV.js} +33 -36
- package/chunks/{qwenOAuth2-WIEUEFEY.js → qwenOAuth2-3J66TOT5.js} +6 -7
- package/chunks/{read-file-KR5BES2E.js → read-file-G4XKW2CS.js} +5 -9
- package/chunks/{record-artifact-PXMNP7GZ.js → record-artifact-L3CFJOMA.js} +2 -2
- package/chunks/{report-findings-W6GR7SYZ.js → report-findings-LY5HQY4K.js} +3 -3
- package/chunks/{resumeHistoryUtils-36NM5S3D.js → resumeHistoryUtils-YPJU4XFE.js} +44 -47
- package/chunks/{ripGrep-QGFIVODS.js → ripGrep-AAKMALLM.js} +7 -11
- package/chunks/{ru-7BNZFQKG.js → ru-RHEB3RNS.js} +11 -0
- package/chunks/{run-qwen-serve-UFEOUIDD.js → run-qwen-serve-ZVEKGS7Y.js} +177 -98
- package/chunks/{runtime-7LTR2C7Q.js → runtime-SJCRYNPA.js} +52 -55
- package/chunks/safe-mode-KLGUG54M.js +11 -0
- package/chunks/sandbox-UIXL423Z.js +146 -0
- package/chunks/sandboxConfig-CY343YNJ.js +114 -0
- package/chunks/{scheduled-tasks-MV22T3JO.js → scheduled-tasks-5UGBEVNZ.js} +50 -53
- package/chunks/{scheduler-HSNQ53ML.js → scheduler-GCZYLZ2P.js} +41 -44
- package/chunks/{sdk-exporters-http-3R2TRQHE.js → sdk-exporters-http-DR4G663K.js} +1 -1
- package/chunks/{sdk-impl-4WF3VZ2F.js → sdk-impl-SJR26MQF.js} +3 -3
- package/chunks/{send-message-UMJKN27Q.js → send-message-DN76MXDX.js} +6 -6
- package/chunks/{serve-LDD4FEJQ.js → serve-2XXQLVK2.js} +48 -51
- package/chunks/{server-IKTZFW3E.js → server-UHMKPCAZ.js} +408 -211
- package/chunks/{session-T77EXOOI.js → session-ZLUK7E4P.js} +108 -108
- package/chunks/{session-attachments-root-FBASBVAO.js → session-attachments-root-DHQM5IEZ.js} +39 -42
- package/chunks/{session-pr-refresh-2BHKIMIN.js → session-pr-refresh-3OMTQWCZ.js} +48 -51
- package/chunks/{settings-TJNUFBGG.js → settings-P4DHIIUP.js} +50 -53
- package/chunks/{shell-HDI5VPGD.js → shell-IMFUVQQ5.js} +27 -30
- package/chunks/{skill-VTA6FNDX.js → skill-NB5RJGZW.js} +7 -11
- package/chunks/{skill-settings-K4LSGCKA.js → skill-settings-IXG5CTQO.js} +47 -50
- package/chunks/{spawnChannel-YSGSPD5D.js → spawnChannel-Q3YALTCJ.js} +44 -45
- package/chunks/{standalone-update-O5LYCCMB.js → standalone-update-H5OJ7MM7.js} +41 -44
- package/chunks/{start-opentui-ui-CS6HKYCE.js → start-opentui-ui-JKAIWGF7.js} +733 -386
- package/chunks/{startInteractiveUI-IVP5HEDD.js → startInteractiveUI-YRPOT6GH.js} +370 -337
- package/chunks/task-create-75HVPEAH.js +1 -1
- package/chunks/{team-create-DW4KE2PR.js → team-create-2XTBYRJF.js} +31 -34
- package/chunks/{team-plan-approval-33UL4JDG.js → team-plan-approval-CFNWW7ZQ.js} +27 -30
- package/chunks/{terminal-image-renderer-4FK76L22.js → terminal-image-renderer-UDPJPGPQ.js} +39 -42
- package/chunks/{theme-manager-UQ3EKEJ4.js → theme-manager-SK57EKMO.js} +39 -42
- package/chunks/{tool-search-QUOG6M6M.js → tool-search-ZHTJU2MV.js} +5 -9
- package/chunks/{total-session-admission-QRWPWSK5.js → total-session-admission-UUZBDQCG.js} +47 -50
- package/chunks/{tree-sitter-ALGO6NDO.js → tree-sitter-4D7QS7F6.js} +1 -1
- package/chunks/{tree-sitter-bash-H6YH7EBF.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
- package/chunks/{trustedFolders-HESP75BK.js → trustedFolders-4LDBLNTS.js} +40 -43
- package/chunks/{update-relaunch-YROJ7A26.js → update-relaunch-LI7GRP36.js} +5 -5
- package/chunks/{updateCheck-CUKTRHID.js → updateCheck-PKSSORPO.js} +43 -46
- package/chunks/{useAutoAcceptIndicator-BQGSRBHX.js → useAutoAcceptIndicator-I32UEQPI.js} +50 -53
- package/chunks/{validateNonInterActiveAuth-UM5U2ZZI.js → validateNonInterActiveAuth-YFPCYYNL.js} +93 -95
- package/chunks/{version-A6G2KO4K.js → version-4MTL4JVU.js} +1 -1
- package/chunks/{web-fetch-A3RMCVQY.js → web-fetch-O6RG6ISB.js} +9 -13
- package/chunks/{web-search-3XGJ773E.js → web-search-JHAXVEMD.js} +9 -14
- package/chunks/{web-shell-static-T7UGLVE4.js → web-shell-static-FFWCUUZS.js} +8 -4
- package/chunks/{workflow-4TWAFNIB.js → workflow-O7L6VDYU.js} +396 -113
- package/chunks/{workspace-providers-status-GNTJ4OIZ.js → workspace-providers-status-WRX6CJM4.js} +53 -56
- package/chunks/{workspace-registration-store-D3K34O63.js → workspace-registration-store-7G4E7YPY.js} +1 -1
- package/chunks/{workspace-registry-ZE5ZSWNF.js → workspace-registry-SXIMGT4D.js} +47 -50
- package/chunks/{workspace-runtime-coordinator-DEXM2635.js → workspace-runtime-coordinator-7DOEHXYT.js} +47 -50
- package/chunks/{workspace-service-OGYORPWD.js → workspace-service-HDXOZMYC.js} +53 -56
- package/chunks/{workspace-skills-status-4W4H3BGJ.js → workspace-skills-status-VN4L37CA.js} +50 -53
- package/chunks/{workspace-trust-reconciler-BHR7S7UJ.js → workspace-trust-reconciler-XEBW5FUL.js} +57 -60
- package/chunks/{write-file-EP5AEO5E.js → write-file-LKX4ETIO.js} +29 -32
- package/chunks/{zh-V2EYTYJP.js → zh-F76MZTL3.js} +23 -1
- package/chunks/{zh-TW-7PRVUGLW.js → zh-TW-S3YTQ4DS.js} +23 -1
- package/chunks/{zoom-image-DDEGWG3R.js → zoom-image-RDPRTP4B.js} +5 -9
- package/cli.js +19 -15
- package/export-transcript-document.css +1 -1
- package/export-transcript-document.js +151 -150
- package/locales/ca.js +19 -2
- package/locales/de.js +18 -0
- package/locales/en.js +33 -2
- package/locales/fr.js +18 -0
- package/locales/ja.js +18 -0
- package/locales/pt.js +18 -0
- package/locales/ru.js +18 -0
- package/locales/zh-TW.js +33 -2
- package/locales/zh.js +33 -2
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-BtpzKw3A.js → abnfDiagram-VCTEODGH-RxykUDmi.js} +1 -1
- package/web-shell/assets/{arc-CQiVKZJP.js → arc-CZpgGCJC.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-ekIPBb2d.js → architectureDiagram-5GKGNRK7-BHSMzNDT.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-BrRWkWri.js → blockDiagram-NRAW4CY4-Bn4mF9SZ.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-qYS8CYZ3.js → c4Diagram-UCG6FXSJ-CBM-Bj6t.js} +1 -1
- package/web-shell/assets/channel-DFYs_LlK.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-ZasyyEZm.js → chunk-2Q5K7J3B-D5Fin58O.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-C_IzCGeA.js → chunk-5VM5RSS4-CY05weF7.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-C25NZOyD.js → chunk-F27PBJKO-3neZnj5Y.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-XPOHNSGX.js → chunk-G27WJ6UU-Cd7EU4BE.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-BQBh0Xni.js → chunk-JWPE2WC7-DwK1mqFw.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-CoShjpX7.js → chunk-LCL6LL3I-Sl7vY22C.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-BwRmCDSz.js → chunk-POPQ4Y6H-BXNzpbVg.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-DSzE5-Mw.js → chunk-SVP7TREG-DjjButcp.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-BQSQv30h.js → chunk-XXDRQBXY-DNOiCjOJ.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DnGrKXoM.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DnGrKXoM.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-XVUVTHVo.js → cose-bilkent-JH36ORCC-BUnker7a.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-CrsKx4lQ.js → cynefin-OW5HDTMX-DcUgdWE5.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BPeZEuHw.js → cynefinDiagram-5FMLGOSQ-CvDKsZsL.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-D31cQ2Qs.js → dagre-3AP2YEHR-jpCmUbr1.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-zyiG097Q.js → diagram-S7CK7UJ4-DBe_bKE5.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-Br3vtfsy.js → diagram-UQ7AKVKN-oXvPpDgs.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-Bxkhjx4u.js → diagram-VSXAHHWV-BD7-_SGh.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-BQH8QiDk.js → diagram-VX7I27RA-DOJL0wub.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-B_aQ1cw0.js → diagram-Z3DM3KII-DRIiodDD.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-B9N7BRQE.js → ebnfDiagram-PWID7BFC-Db31Ulmb.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-Cx6Hb1Re.js → erDiagram-SSCWMZ5O-CVHhwI2_.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-DTuLP7GU.js → flowDiagram-A5DVABFB-DWOFy1FK.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DYS3d-sL.js → ganttDiagram-EL5Y4UJY-C0sxQtPd.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Cp0EGx04.js → gitGraphDiagram-WWUBYQGX-CNituBYC.js} +1 -1
- package/web-shell/assets/index-B15NlwB8.js +2213 -0
- package/web-shell/assets/index-BSrS0tQ6.css +36 -0
- package/web-shell/assets/{index-45-LkPDB.js → index-gm9tLk7h.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-9--kukiT.js → infoDiagram-RXCK75RN-CxhJYtIR.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CGBdsDLD.js → ishikawaDiagram-5VMMS53U-By2mchUy.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-DeXhcscd.js → journeyDiagram-EYS64GPL-CVH-OweI.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-CFdvsU3b.js → kanban-definition-3QL26DDD-Cc9dQXLy.js} +1 -1
- package/web-shell/assets/knowledge-Dg9788h4.svg +1 -0
- package/web-shell/assets/{layout-DAnwQ3KB.js → layout-C_60ysHw.js} +1 -1
- package/web-shell/assets/{linear-CTo7v7Nh.js → linear-BvAVfqwu.js} +1 -1
- package/web-shell/assets/{mermaid.core-jggSxF1i.js → mermaid.core-C3CoBKAc.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DzIepvlJ.js → mindmap-definition-FBJOCRG2-Cuu8Q8LM.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-BFGS9GJv.js → pegDiagram-XKGWAZYB-DmAeyDO2.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-B2UUcNIT.js → pieDiagram-E7YTZNPT-B7vbB_xv.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-BgM6htrX.js → quadrantDiagram-AXDQQJYC-BqOBkRR7.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-Dk9cS7N-.js → railroadDiagram-O6MQD6OU-sI06lZIu.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-C9oRg7xi.js → requirementDiagram-EFPCY7ZU-Bg13d10S.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-B-_c7GzI.js → sankeyDiagram-P5KCCOFB-WFOzZHrR.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-R0M-347u.js → sequenceDiagram-WJ2MYXX4-CCdRbA4E.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-Df0f8UAW.js → sizeCapture-X5ZJPWSS-BH5F3bGg.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-CsUEfAA-.js → stateDiagram-HBIQ2CUA-NwS2X3QB.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-1aU2JZXO.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-9OGHVSrx.js → swimlanes-XN3QIQJK-Bm38pM28.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Dp-u6kQG.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-DAfGqS2B.js → timeline-definition-24CTP7MA-Do-agLSo.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CKATpwHi.js → vennDiagram-4TSXK5OY-aggLfZzl.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CQHdhTrm.js → wardleyDiagram-VM6X3IG4-D5JR3mXX.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-5k9NLqlY.js → xychartDiagram-S5SC5T6Z-DhtLDuXs.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-7MIBD3LG.js +0 -137
- package/chunks/chunk-ARDHE6MM.js +0 -235
- package/chunks/chunk-C75BXMPM.js +0 -169
- package/chunks/chunk-ERU3SDXT.js +0 -27
- package/chunks/chunk-FPGTNKCP.js +0 -251
- package/chunks/chunk-JL6APGBX.js +0 -43
- package/chunks/chunk-L5OBTAXN.js +0 -137
- package/chunks/chunk-MZ3W3F44.js +0 -4172
- package/chunks/chunk-OIDF7L67.js +0 -514
- package/chunks/chunk-VSXX6VUI.js +0 -2812
- package/chunks/chunk-ZFYACOVD.js +0 -1416
- package/web-shell/assets/channel-DSQQnOZj.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-V94ta08R.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-V94ta08R.js +0 -1
- package/web-shell/assets/index-H8um-iEl.js +0 -2207
- package/web-shell/assets/index-n6N-2a3v.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-CnSuTPJ2.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Bb7TcWQw.js +0 -8
- package/chunks/{chunk-QZW6WRB7.js → chunk-5NUKK2DT.js} +2 -2
- package/chunks/{chunk-JS73NNWF.js → chunk-FUSEMYFX.js} +0 -0
- package/chunks/{chunk-SVWWF5TZ.js → chunk-WVURIAEE.js} +3 -3
- package/chunks/{task-update-RI7QNVDP.js → task-update-3LSYQDRW.js} +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
startEarlyStartupPrefetches
|
|
5
|
-
} from "./chunk-4DZMYFZA.js";
|
|
6
3
|
import {
|
|
7
4
|
registerMcpHotReload,
|
|
8
5
|
registerModelProvidersHotReload
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZFHKUQZ4.js";
|
|
7
|
+
import {
|
|
8
|
+
startEarlyStartupPrefetches
|
|
9
|
+
} from "./chunk-IKBEIDOH.js";
|
|
10
10
|
import {
|
|
11
11
|
ExtensionRefreshState,
|
|
12
12
|
appEvents,
|
|
@@ -14,21 +14,27 @@ import {
|
|
|
14
14
|
buildEnabledSkillNamesProvider,
|
|
15
15
|
isDebugMode,
|
|
16
16
|
loadCliConfig,
|
|
17
|
-
loadSandboxConfig,
|
|
18
17
|
parseArguments,
|
|
19
18
|
validateAuthMethod
|
|
20
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CXY6BICQ.js";
|
|
20
|
+
import "./chunk-FBY32737.js";
|
|
21
|
+
import "./chunk-B6RMK4ED.js";
|
|
22
|
+
import {
|
|
23
|
+
loadSandboxConfig
|
|
24
|
+
} from "./chunk-QT6Z2IBF.js";
|
|
25
|
+
import {
|
|
26
|
+
start_sandbox
|
|
27
|
+
} from "./chunk-QMENOK5T.js";
|
|
21
28
|
import {
|
|
22
29
|
CUSTOM_SANDBOX_IMAGE_ENV_VAR,
|
|
23
30
|
HOST_UPDATE_RELAUNCH_ENV_VAR,
|
|
24
31
|
RELAUNCH_EXIT_CODE,
|
|
25
|
-
SKIP_UPDATE_CHECK_ENV_VAR,
|
|
26
32
|
UPDATE_COMPLETE_EXIT_CODE,
|
|
27
33
|
UPDATE_ON_EXIT_MESSAGE,
|
|
28
34
|
UPDATE_RELAUNCH_EXIT_CODE
|
|
29
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-B5TJK7B3.js";
|
|
30
36
|
import "./chunk-24FVUD5P.js";
|
|
31
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-ZMYKNKET.js";
|
|
32
38
|
import {
|
|
33
39
|
getHeadlessYoloSafetyWarning
|
|
34
40
|
} from "./chunk-6H67XLET.js";
|
|
@@ -36,9 +42,7 @@ import {
|
|
|
36
42
|
isAcpStartupProfilerEnabled,
|
|
37
43
|
markAcpStartup,
|
|
38
44
|
recordAcpConfigStartupEvent
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-3ADU34IF.js";
|
|
41
|
-
import "./chunk-7MKB7L25.js";
|
|
45
|
+
} from "./chunk-DRD6VBNH.js";
|
|
42
46
|
import "./chunk-M3JGHRMQ.js";
|
|
43
47
|
import {
|
|
44
48
|
sanitizeTerminalText
|
|
@@ -53,30 +57,31 @@ import {
|
|
|
53
57
|
isValidSessionId
|
|
54
58
|
} from "./chunk-ZEZKIS2K.js";
|
|
55
59
|
import "./chunk-Y53DG2HA.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-3LLEB5CU.js";
|
|
61
|
+
import "./chunk-UZSB57EV.js";
|
|
62
|
+
import "./chunk-4FLUQWJ4.js";
|
|
63
|
+
import "./chunk-D7JMO2GP.js";
|
|
64
|
+
import "./chunk-WZWTY7SG.js";
|
|
65
|
+
import "./chunk-E2VSBAFA.js";
|
|
66
|
+
import "./chunk-57OAHC2Y.js";
|
|
67
|
+
import "./chunk-SYMXYRM5.js";
|
|
68
|
+
import "./chunk-U4AASWUQ.js";
|
|
69
|
+
import "./chunk-LFKXIOGC.js";
|
|
70
|
+
import "./chunk-KWYTSSTJ.js";
|
|
59
71
|
import "./chunk-WCCLLK7X.js";
|
|
60
72
|
import "./chunk-LYD3T3H7.js";
|
|
61
|
-
import "./chunk-JBS56C7O.js";
|
|
62
|
-
import "./chunk-INGBUYL6.js";
|
|
63
|
-
import "./chunk-VN5G33G7.js";
|
|
64
|
-
import "./chunk-HJAJ6MR6.js";
|
|
65
|
-
import "./chunk-57OAHC2Y.js";
|
|
66
|
-
import "./chunk-IAS753HG.js";
|
|
67
|
-
import "./chunk-5ODRE7E5.js";
|
|
68
|
-
import "./chunk-ABNX6E6K.js";
|
|
69
73
|
import "./chunk-V6WHFGST.js";
|
|
70
|
-
import "./chunk-
|
|
74
|
+
import "./chunk-RN6A53UJ.js";
|
|
71
75
|
import "./chunk-6PLDPT2C.js";
|
|
72
76
|
import "./chunk-FYJ7W2PI.js";
|
|
73
77
|
import "./chunk-STUJ7IMZ.js";
|
|
78
|
+
import "./chunk-L3SNMEDW.js";
|
|
74
79
|
import "./chunk-GYTKQYDB.js";
|
|
75
|
-
import "./chunk-WD6YQI5M.js";
|
|
76
80
|
import "./chunk-GDWE23OR.js";
|
|
77
|
-
import "./chunk-RKFGE7JH.js";
|
|
78
81
|
import "./chunk-CJ3DHN5I.js";
|
|
82
|
+
import "./chunk-RKFGE7JH.js";
|
|
79
83
|
import "./chunk-UDG5EZJI.js";
|
|
84
|
+
import "./chunk-M5GB774H.js";
|
|
80
85
|
import {
|
|
81
86
|
EXTERNAL_TOOL_GUARD_PROVIDER_ATTACHED_VALUE,
|
|
82
87
|
EXTERNAL_TOOL_GUARD_REQUIRED_VALUE,
|
|
@@ -84,131 +89,129 @@ import {
|
|
|
84
89
|
PRIVATE_EXTERNAL_TOOL_GUARD_ENV,
|
|
85
90
|
PRIVATE_EXTERNAL_TOOL_GUARD_PROVIDER_ENV
|
|
86
91
|
} from "./chunk-3VUENPWF.js";
|
|
87
|
-
import "./chunk-M5GB774H.js";
|
|
88
92
|
import "./chunk-NFXXBWSE.js";
|
|
89
|
-
import "./chunk-
|
|
90
|
-
import "./chunk-
|
|
93
|
+
import "./chunk-ESBYWATJ.js";
|
|
94
|
+
import "./chunk-PZRXWQUA.js";
|
|
91
95
|
import "./chunk-IJOS26LH.js";
|
|
92
|
-
import "./chunk-
|
|
96
|
+
import "./chunk-WL36KHUQ.js";
|
|
93
97
|
import {
|
|
94
98
|
createMinimalSettings,
|
|
95
99
|
getFlattenedSchema,
|
|
96
100
|
getSettingsWarnings,
|
|
97
|
-
getUserSettingsDir,
|
|
98
101
|
initializeLlmOutputLanguage,
|
|
99
102
|
loadSettings
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import "./chunk-YP7QCE7X.js";
|
|
103
|
+
} from "./chunk-RRI764F7.js";
|
|
102
104
|
import "./chunk-RKUWKYED.js";
|
|
105
|
+
import "./chunk-AUX2FL5T.js";
|
|
106
|
+
import "./chunk-BW4333PP.js";
|
|
107
|
+
import "./chunk-IDS7MSUP.js";
|
|
103
108
|
import {
|
|
104
109
|
initializeI18n,
|
|
105
110
|
resolveLanguageSetting
|
|
106
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-GSAOVDTH.js";
|
|
107
112
|
import "./chunk-5EJZE3FP.js";
|
|
108
113
|
import {
|
|
109
|
-
SETTINGS_DIRECTORY_NAME,
|
|
110
114
|
preResolveHomeEnvOverrides
|
|
111
|
-
} from "./chunk-
|
|
112
|
-
import {
|
|
113
|
-
getInstallationInfo
|
|
114
|
-
} from "./chunk-SFL6U7U7.js";
|
|
115
|
-
import "./chunk-BW4333PP.js";
|
|
116
|
-
import "./chunk-IDS7MSUP.js";
|
|
115
|
+
} from "./chunk-NKTMUPHJ.js";
|
|
117
116
|
import {
|
|
118
117
|
ENV_CORRUPTED_PATH,
|
|
119
118
|
ENV_WAS_RECOVERED,
|
|
120
|
-
QWEN_CODE_DESKTOP_ENV,
|
|
121
119
|
QWEN_CODE_SERVE_ENV,
|
|
122
120
|
scrubAndReportInheritedLoaderEnv
|
|
123
|
-
} from "./chunk-
|
|
124
|
-
import
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
import "./chunk-
|
|
128
|
-
import "./chunk-W3N5XAZ6.js";
|
|
129
|
-
import "./chunk-V77DTVCM.js";
|
|
121
|
+
} from "./chunk-6OTF7TTE.js";
|
|
122
|
+
import {
|
|
123
|
+
getInstallationInfo
|
|
124
|
+
} from "./chunk-SFL6U7U7.js";
|
|
125
|
+
import "./chunk-NQ272MQG.js";
|
|
130
126
|
import "./chunk-NPQ5ZKRP.js";
|
|
131
127
|
import "./chunk-MR3PXB6E.js";
|
|
132
|
-
import "./chunk-
|
|
128
|
+
import "./chunk-347O2YZJ.js";
|
|
133
129
|
import "./chunk-GELRJXE2.js";
|
|
134
130
|
import {
|
|
135
131
|
PRIVATE_CONVERSATIONS_RUNTIME_ENABLE,
|
|
136
132
|
PRIVATE_CONVERSATIONS_RUNTIME_ENV
|
|
137
133
|
} from "./chunk-32CM56LO.js";
|
|
134
|
+
import "./chunk-XFSFZCM5.js";
|
|
135
|
+
import "./chunk-2EAZ43JQ.js";
|
|
136
|
+
import "./chunk-NF5J2WFA.js";
|
|
137
|
+
import "./chunk-AQP3H22J.js";
|
|
138
|
+
import "./chunk-W3N5XAZ6.js";
|
|
138
139
|
import "./chunk-6WXVEDT2.js";
|
|
139
140
|
import "./chunk-LJZSMWOH.js";
|
|
140
|
-
import "./chunk-
|
|
141
|
-
import "./chunk-
|
|
142
|
-
import "./chunk-
|
|
143
|
-
import "./chunk-
|
|
141
|
+
import "./chunk-VEXUA6DX.js";
|
|
142
|
+
import "./chunk-TXTCM3TC.js";
|
|
143
|
+
import "./chunk-X7AYIXC7.js";
|
|
144
|
+
import "./chunk-TRZ22SG5.js";
|
|
144
145
|
import {
|
|
145
146
|
isSessionRuntimeActive,
|
|
146
147
|
readWorktreeSession,
|
|
147
148
|
writeWorktreeSession
|
|
148
|
-
} from "./chunk-
|
|
149
|
-
import "./chunk-
|
|
149
|
+
} from "./chunk-3BZI5GDP.js";
|
|
150
|
+
import "./chunk-ZPJWUGCS.js";
|
|
151
|
+
import "./chunk-YM6KUQ2S.js";
|
|
152
|
+
import "./chunk-IXO2OCIP.js";
|
|
150
153
|
import "./chunk-DJXSOEFB.js";
|
|
154
|
+
import "./chunk-SFHX5G2S.js";
|
|
151
155
|
import "./chunk-5VQR2DD7.js";
|
|
152
156
|
import "./chunk-BUQN5LTI.js";
|
|
153
|
-
import "./chunk-
|
|
154
|
-
import "./chunk-YM6KUQ2S.js";
|
|
155
|
-
import "./chunk-MZ3W3F44.js";
|
|
156
|
-
import "./chunk-NFQOOITE.js";
|
|
157
|
+
import "./chunk-LO2UWNO5.js";
|
|
157
158
|
import {
|
|
158
|
-
QWEN_CODE_SIMPLE_ENV_VAR,
|
|
159
159
|
SessionService,
|
|
160
160
|
computeInitialTurnFromHistory,
|
|
161
|
-
isBareMode,
|
|
162
161
|
persistSessionUsage,
|
|
163
162
|
setStartupEventSink,
|
|
164
163
|
watch
|
|
165
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-KAYC5FBN.js";
|
|
166
165
|
import "./chunk-GOFAQQZA.js";
|
|
166
|
+
import "./chunk-65I7S4Z3.js";
|
|
167
167
|
import "./chunk-HEOH7JZY.js";
|
|
168
168
|
import "./chunk-TWPJO254.js";
|
|
169
169
|
import "./chunk-CQ35AJ4Z.js";
|
|
170
|
-
import
|
|
170
|
+
import {
|
|
171
|
+
closeFileWatcher,
|
|
172
|
+
prepareFileWatchersForProcessExit
|
|
173
|
+
} from "./chunk-IVFTLUZD.js";
|
|
171
174
|
import "./chunk-7CLLH5TI.js";
|
|
172
175
|
import "./chunk-WK6DEH3Q.js";
|
|
173
176
|
import "./chunk-6PVPNMXU.js";
|
|
174
|
-
import "./chunk-
|
|
175
|
-
import "./chunk-
|
|
176
|
-
import "./chunk-GNV2SFO7.js";
|
|
177
|
+
import "./chunk-DX6JTDMR.js";
|
|
178
|
+
import "./chunk-VQDWCQOE.js";
|
|
177
179
|
import "./chunk-5EZRLTLQ.js";
|
|
178
180
|
import "./chunk-QHWCP53L.js";
|
|
179
181
|
import "./chunk-3LMDSCLU.js";
|
|
182
|
+
import "./chunk-QJNDUTOL.js";
|
|
180
183
|
import "./chunk-O6GEWCJA.js";
|
|
181
184
|
import {
|
|
182
185
|
GitWorktreeService,
|
|
183
186
|
readWorktreeSessionMarker,
|
|
184
187
|
worktreeBranchForSlug,
|
|
185
188
|
writeWorktreeSessionMarker
|
|
186
|
-
} from "./chunk-
|
|
187
|
-
import "./chunk-
|
|
189
|
+
} from "./chunk-CXONOVBN.js";
|
|
190
|
+
import "./chunk-OWUAZXXN.js";
|
|
191
|
+
import "./chunk-CH2YDT6X.js";
|
|
192
|
+
import "./chunk-P42KMMU6.js";
|
|
188
193
|
import {
|
|
189
194
|
canUseRipgrep
|
|
190
|
-
} from "./chunk-
|
|
191
|
-
import "./chunk-
|
|
192
|
-
import
|
|
193
|
-
|
|
194
|
-
} from "./chunk-V545KI73.js";
|
|
195
|
-
import "./chunk-MQRLLBMQ.js";
|
|
195
|
+
} from "./chunk-BTICBRPL.js";
|
|
196
|
+
import "./chunk-V545KI73.js";
|
|
197
|
+
import "./chunk-ADN5KESB.js";
|
|
198
|
+
import "./chunk-PPJSG2PU.js";
|
|
196
199
|
import "./chunk-ELRMZTPF.js";
|
|
197
200
|
import "./chunk-U6H3XTFA.js";
|
|
198
|
-
import
|
|
199
|
-
resolveBundleDir
|
|
200
|
-
} from "./chunk-ACHCT36C.js";
|
|
201
|
+
import "./chunk-ACHCT36C.js";
|
|
201
202
|
import "./chunk-CHEIIBT3.js";
|
|
202
203
|
import "./chunk-AEWCOE64.js";
|
|
203
|
-
import "./chunk-OWUAZXXN.js";
|
|
204
|
-
import "./chunk-CH2YDT6X.js";
|
|
205
204
|
import "./chunk-JX6XHPTX.js";
|
|
206
205
|
import "./chunk-ZSTCM3MX.js";
|
|
206
|
+
import {
|
|
207
|
+
QWEN_CODE_SIMPLE_ENV_VAR,
|
|
208
|
+
isBareMode
|
|
209
|
+
} from "./chunk-SK3RZOPS.js";
|
|
207
210
|
import "./chunk-MLXTMF7H.js";
|
|
208
|
-
import "./chunk-
|
|
211
|
+
import "./chunk-36SDZ2Q4.js";
|
|
209
212
|
import "./chunk-NXUZFW3G.js";
|
|
210
213
|
import "./chunk-WFNEY5G7.js";
|
|
211
|
-
import "./chunk-
|
|
214
|
+
import "./chunk-YP2K3WOS.js";
|
|
212
215
|
import "./chunk-BW2SMO6L.js";
|
|
213
216
|
import "./chunk-S6LOFUVP.js";
|
|
214
217
|
import "./chunk-VVI7MK3V.js";
|
|
@@ -217,48 +220,42 @@ import "./chunk-G6UUOCUT.js";
|
|
|
217
220
|
import "./chunk-IZ2U57NY.js";
|
|
218
221
|
import "./chunk-Z72PLR74.js";
|
|
219
222
|
import "./chunk-NUQ4GK5I.js";
|
|
220
|
-
import "./chunk-
|
|
223
|
+
import "./chunk-DC4ZNGH4.js";
|
|
221
224
|
import "./chunk-NAVJD2PQ.js";
|
|
222
|
-
import "./chunk-
|
|
223
|
-
import "./chunk-
|
|
225
|
+
import "./chunk-3WILPKTJ.js";
|
|
226
|
+
import "./chunk-DRAX5YAI.js";
|
|
224
227
|
import "./chunk-VNOVK4I7.js";
|
|
225
228
|
import "./chunk-S7UQ3V2H.js";
|
|
226
|
-
import "./chunk-JL6APGBX.js";
|
|
227
229
|
import "./chunk-DJ2GSRLV.js";
|
|
228
|
-
import "./chunk-
|
|
229
|
-
import "./chunk-
|
|
230
|
-
import "./chunk-C75BXMPM.js";
|
|
230
|
+
import "./chunk-3XBUCOWS.js";
|
|
231
|
+
import "./chunk-M4U2LTD2.js";
|
|
231
232
|
import "./chunk-KFFCDLKV.js";
|
|
232
233
|
import "./chunk-KP2FHIFR.js";
|
|
233
|
-
import "./chunk-
|
|
234
|
+
import "./chunk-KEM7MWS7.js";
|
|
235
|
+
import "./chunk-G45B3INR.js";
|
|
234
236
|
import {
|
|
235
237
|
logUserPrompt,
|
|
236
238
|
uiTelemetryService
|
|
237
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-CDDP4ONL.js";
|
|
238
240
|
import {
|
|
239
241
|
PRIVATE_ACP_CAPABILITY_ENV
|
|
240
242
|
} from "./chunk-5ETULJLP.js";
|
|
241
|
-
import "./chunk-7MIBD3LG.js";
|
|
242
243
|
import "./chunk-VGC4I5JJ.js";
|
|
243
|
-
import "./chunk-
|
|
244
|
+
import "./chunk-5NUKK2DT.js";
|
|
244
245
|
import "./chunk-EDIDYZBT.js";
|
|
245
246
|
import "./chunk-HD7O6WLV.js";
|
|
246
247
|
import "./chunk-CFMZLE3L.js";
|
|
247
248
|
import "./chunk-WZAD4ZNJ.js";
|
|
248
|
-
import "./chunk-ARDHE6MM.js";
|
|
249
|
-
import "./chunk-FPGTNKCP.js";
|
|
250
249
|
import "./chunk-TIGXX4PA.js";
|
|
251
|
-
import "./chunk-OIDF7L67.js";
|
|
252
250
|
import "./chunk-XFFRI3WM.js";
|
|
253
|
-
import "./chunk-
|
|
254
|
-
import "./chunk-
|
|
251
|
+
import "./chunk-GJKP6XOB.js";
|
|
252
|
+
import "./chunk-7O5PYQ3M.js";
|
|
255
253
|
import "./chunk-HHJLM3WQ.js";
|
|
256
|
-
import "./chunk-
|
|
254
|
+
import "./chunk-6USYH3EU.js";
|
|
257
255
|
import "./chunk-74TONY4F.js";
|
|
258
256
|
import "./chunk-SYROIHU7.js";
|
|
259
257
|
import "./chunk-RSWBT7AZ.js";
|
|
260
258
|
import {
|
|
261
|
-
FatalSandboxError,
|
|
262
259
|
Storage,
|
|
263
260
|
createDebugLogger,
|
|
264
261
|
getErrorMessage,
|
|
@@ -275,6 +272,11 @@ import {
|
|
|
275
272
|
clearInheritedPeerMessagingEnv
|
|
276
273
|
} from "./chunk-V5U2NZNJ.js";
|
|
277
274
|
import "./chunk-BSIOCNDK.js";
|
|
275
|
+
import {
|
|
276
|
+
cleanupCheckpoints,
|
|
277
|
+
registerCleanup,
|
|
278
|
+
runExitCleanup
|
|
279
|
+
} from "./chunk-H6L4NEAT.js";
|
|
278
280
|
import {
|
|
279
281
|
finalizeStartupProfile,
|
|
280
282
|
isStartupProfilerEnabled,
|
|
@@ -283,11 +285,6 @@ import {
|
|
|
283
285
|
setInteractiveMode
|
|
284
286
|
} from "./chunk-QILD6R27.js";
|
|
285
287
|
import "./chunk-JVEGA3MM.js";
|
|
286
|
-
import {
|
|
287
|
-
cleanupCheckpoints,
|
|
288
|
-
registerCleanup,
|
|
289
|
-
runExitCleanup
|
|
290
|
-
} from "./chunk-7MIOAF77.js";
|
|
291
288
|
import {
|
|
292
289
|
writeStderrLine,
|
|
293
290
|
writeStderrLineSafe
|
|
@@ -301,16 +298,15 @@ import {
|
|
|
301
298
|
init_esbuild_shims
|
|
302
299
|
} from "./chunk-5O2XNYP6.js";
|
|
303
300
|
import {
|
|
304
|
-
__name
|
|
305
|
-
__toESM
|
|
301
|
+
__name
|
|
306
302
|
} from "./chunk-J2S4EL5Y.js";
|
|
307
303
|
|
|
308
304
|
// packages/cli/src/llm.tsx
|
|
309
305
|
init_esbuild_shims();
|
|
310
306
|
import dns from "node:dns";
|
|
311
|
-
import
|
|
312
|
-
import
|
|
313
|
-
import
|
|
307
|
+
import fs6 from "node:fs";
|
|
308
|
+
import os from "node:os";
|
|
309
|
+
import path6 from "node:path";
|
|
314
310
|
import v8 from "node:v8";
|
|
315
311
|
|
|
316
312
|
// packages/cli/src/config/settingsWatcher.ts
|
|
@@ -493,7 +489,7 @@ var SettingsWatcher = class _SettingsWatcher {
|
|
|
493
489
|
this.watchStage.delete(scope);
|
|
494
490
|
if (watcher) {
|
|
495
491
|
try {
|
|
496
|
-
await watcher
|
|
492
|
+
await closeFileWatcher(watcher);
|
|
497
493
|
} catch (err) {
|
|
498
494
|
debugLogger.warn("Settings watcher close error:", err);
|
|
499
495
|
}
|
|
@@ -508,7 +504,7 @@ var SettingsWatcher = class _SettingsWatcher {
|
|
|
508
504
|
if (!this.started) return;
|
|
509
505
|
this.started = false;
|
|
510
506
|
for (const [, watcher] of this.watchers) {
|
|
511
|
-
watcher
|
|
507
|
+
closeFileWatcher(watcher).catch((err) => {
|
|
512
508
|
debugLogger.warn("Settings watcher close error:", err);
|
|
513
509
|
});
|
|
514
510
|
}
|
|
@@ -696,7 +692,7 @@ var LspConfigWatcher = class _LspConfigWatcher {
|
|
|
696
692
|
await this.activeDrain;
|
|
697
693
|
this.listener = void 0;
|
|
698
694
|
try {
|
|
699
|
-
await this.watcher
|
|
695
|
+
await closeFileWatcher(this.watcher);
|
|
700
696
|
} catch (error) {
|
|
701
697
|
debugLogger2.warn("LSP config watcher close error:", error);
|
|
702
698
|
}
|
|
@@ -870,7 +866,12 @@ var EXTENSION_FILES = /* @__PURE__ */ new Set([
|
|
|
870
866
|
"qwen-extension.json",
|
|
871
867
|
".qwen-extension-install.json"
|
|
872
868
|
]);
|
|
873
|
-
var AUTO_REFRESH_DIRS = /* @__PURE__ */ new Set([
|
|
869
|
+
var AUTO_REFRESH_DIRS = /* @__PURE__ */ new Set([
|
|
870
|
+
"commands",
|
|
871
|
+
"skills",
|
|
872
|
+
"agents",
|
|
873
|
+
"workflows"
|
|
874
|
+
]);
|
|
874
875
|
var STALE_DIRS = /* @__PURE__ */ new Set(["hooks"]);
|
|
875
876
|
var ExtensionFileWatcher = class {
|
|
876
877
|
constructor(config, extensionsDir = Storage.getUserExtensionsDir(), refreshState = new ExtensionRefreshState(), storeStatePath) {
|
|
@@ -957,10 +958,10 @@ var ExtensionFileWatcher = class {
|
|
|
957
958
|
this.mutationListenerDisposer?.();
|
|
958
959
|
this.mutationListenerDisposer = void 0;
|
|
959
960
|
this.endPendingMutationSuppressions();
|
|
960
|
-
watcher
|
|
961
|
+
closeFileWatcher(watcher).catch((error) => {
|
|
961
962
|
debugLogger3.warn("Extension file watcher close error:", error);
|
|
962
963
|
});
|
|
963
|
-
bootstrapWatcher
|
|
964
|
+
closeFileWatcher(bootstrapWatcher).catch((error) => {
|
|
964
965
|
debugLogger3.warn("Extension bootstrap watcher close error:", error);
|
|
965
966
|
});
|
|
966
967
|
}
|
|
@@ -1148,7 +1149,7 @@ var ExtensionFileWatcher = class {
|
|
|
1148
1149
|
closeBootstrapWatcher() {
|
|
1149
1150
|
const bootstrapWatcher = this.bootstrapWatcher;
|
|
1150
1151
|
this.bootstrapWatcher = void 0;
|
|
1151
|
-
bootstrapWatcher
|
|
1152
|
+
closeFileWatcher(bootstrapWatcher).catch((error) => {
|
|
1152
1153
|
debugLogger3.warn("Extension bootstrap watcher close error:", error);
|
|
1153
1154
|
});
|
|
1154
1155
|
}
|
|
@@ -1578,841 +1579,18 @@ async function relaunchAppInChildProcess(additionalNodeArgs, additionalScriptArg
|
|
|
1578
1579
|
}
|
|
1579
1580
|
__name(relaunchAppInChildProcess, "relaunchAppInChildProcess");
|
|
1580
1581
|
|
|
1581
|
-
// packages/cli/src/serve/sandbox.ts
|
|
1582
|
-
init_esbuild_shims();
|
|
1583
|
-
var import_shell_quote = __toESM(require_shell_quote(), 1);
|
|
1584
|
-
import { exec, execSync, spawn as spawn2 } from "node:child_process";
|
|
1585
|
-
import os2 from "node:os";
|
|
1586
|
-
import path6 from "node:path";
|
|
1587
|
-
import fs4 from "node:fs";
|
|
1588
|
-
import { promisify } from "node:util";
|
|
1589
|
-
import { randomBytes } from "node:crypto";
|
|
1590
|
-
|
|
1591
|
-
// packages/cli/src/utils/sandboxImageName.ts
|
|
1592
|
-
init_esbuild_shims();
|
|
1593
|
-
function parseSandboxImageName(image) {
|
|
1594
|
-
const imageWithoutDigest = image.split("@")[0] ?? image;
|
|
1595
|
-
const lastSlash = imageWithoutDigest.lastIndexOf("/");
|
|
1596
|
-
const lastColon = imageWithoutDigest.lastIndexOf(":");
|
|
1597
|
-
const hasTag = lastColon > lastSlash;
|
|
1598
|
-
const fullName = hasTag ? imageWithoutDigest.slice(0, lastColon) : imageWithoutDigest;
|
|
1599
|
-
const tag = hasTag ? imageWithoutDigest.slice(lastColon + 1) : void 0;
|
|
1600
|
-
const name = fullName.split("/").at(-1) || "unknown-image";
|
|
1601
|
-
return tag ? `${name}-${tag}` : name;
|
|
1602
|
-
}
|
|
1603
|
-
__name(parseSandboxImageName, "parseSandboxImageName");
|
|
1604
|
-
|
|
1605
|
-
// packages/cli/src/utils/sandbox-path.ts
|
|
1606
|
-
init_esbuild_shims();
|
|
1607
|
-
import path5 from "node:path";
|
|
1608
|
-
function isContainerPathWithinWorkdir(containerWorkdir, containerPath) {
|
|
1609
|
-
const normalize = /* @__PURE__ */ __name((value) => {
|
|
1610
|
-
const normalized = path5.posix.normalize(value.replace(/\\/g, "/")).replace(/\/+$/, "").toLowerCase();
|
|
1611
|
-
return normalized || "/";
|
|
1612
|
-
}, "normalize");
|
|
1613
|
-
const normalizedWorkdir = normalize(containerWorkdir);
|
|
1614
|
-
const normalizedPath = normalize(containerPath);
|
|
1615
|
-
if (normalizedWorkdir === "/") {
|
|
1616
|
-
return normalizedPath.startsWith("/");
|
|
1617
|
-
}
|
|
1618
|
-
return normalizedPath === normalizedWorkdir || normalizedPath.startsWith(`${normalizedWorkdir}/`);
|
|
1619
|
-
}
|
|
1620
|
-
__name(isContainerPathWithinWorkdir, "isContainerPathWithinWorkdir");
|
|
1621
|
-
|
|
1622
|
-
// packages/cli/src/utils/sandboxMounts.ts
|
|
1623
|
-
init_esbuild_shims();
|
|
1624
|
-
import os from "node:os";
|
|
1625
|
-
function parseSandboxMountSpec(rawMount, platform = os.platform()) {
|
|
1626
|
-
const mount = rawMount.trim();
|
|
1627
|
-
const mountSeparator = platform === "win32" && /^[A-Za-z]:[\\/]/.test(mount) ? mount.indexOf(":", 2) : mount.indexOf(":");
|
|
1628
|
-
const from = mountSeparator === -1 ? mount : mount.slice(0, mountSeparator);
|
|
1629
|
-
const rest = mountSeparator === -1 ? "" : mount.slice(mountSeparator + 1);
|
|
1630
|
-
const [toPart, optsPart] = rest.split(":");
|
|
1631
|
-
return {
|
|
1632
|
-
from,
|
|
1633
|
-
to: toPart || from,
|
|
1634
|
-
opts: optsPart || "ro"
|
|
1635
|
-
};
|
|
1636
|
-
}
|
|
1637
|
-
__name(parseSandboxMountSpec, "parseSandboxMountSpec");
|
|
1638
|
-
|
|
1639
|
-
// packages/cli/src/serve/sandbox.ts
|
|
1640
|
-
var execAsync = promisify(exec);
|
|
1641
|
-
function getContainerPath(hostPath) {
|
|
1642
|
-
if (os2.platform() !== "win32") {
|
|
1643
|
-
return hostPath;
|
|
1644
|
-
}
|
|
1645
|
-
const withForwardSlashes = hostPath.replace(/\\/g, "/");
|
|
1646
|
-
const match = withForwardSlashes.match(/^([A-Z]):\/(.*)/i);
|
|
1647
|
-
if (match) {
|
|
1648
|
-
return `/${match[1].toLowerCase()}/${match[2]}`;
|
|
1649
|
-
}
|
|
1650
|
-
return hostPath;
|
|
1651
|
-
}
|
|
1652
|
-
__name(getContainerPath, "getContainerPath");
|
|
1653
|
-
function ensureDirectoryAndGetRealPath(dir) {
|
|
1654
|
-
if (!fs4.existsSync(dir)) {
|
|
1655
|
-
fs4.mkdirSync(dir, { recursive: true });
|
|
1656
|
-
}
|
|
1657
|
-
return fs4.realpathSync(dir);
|
|
1658
|
-
}
|
|
1659
|
-
__name(ensureDirectoryAndGetRealPath, "ensureDirectoryAndGetRealPath");
|
|
1660
|
-
var LOCAL_DEV_SANDBOX_IMAGE_NAME = "qwen-code-sandbox";
|
|
1661
|
-
var SANDBOX_NETWORK_NAME = "qwen-code-sandbox";
|
|
1662
|
-
var SANDBOX_PROXY_NAME = "qwen-code-sandbox-proxy";
|
|
1663
|
-
var BUILTIN_SEATBELT_PROFILES = [
|
|
1664
|
-
"permissive-open",
|
|
1665
|
-
"permissive-closed",
|
|
1666
|
-
"permissive-proxied",
|
|
1667
|
-
"restrictive-open",
|
|
1668
|
-
"restrictive-closed",
|
|
1669
|
-
"restrictive-proxied"
|
|
1670
|
-
];
|
|
1671
|
-
function getSandboxPassthroughEnvArgs(env = process.env) {
|
|
1672
|
-
return [
|
|
1673
|
-
"QWEN_DEBUG_LOG_FILE",
|
|
1674
|
-
"QWEN_CODE_LEGACY_MCP_BLOCKING",
|
|
1675
|
-
SKIP_UPDATE_CHECK_ENV_VAR,
|
|
1676
|
-
CUSTOM_SANDBOX_IMAGE_ENV_VAR,
|
|
1677
|
-
HOST_UPDATE_RELAUNCH_ENV_VAR,
|
|
1678
|
-
QWEN_CODE_SERVE_ENV,
|
|
1679
|
-
QWEN_CODE_DESKTOP_ENV
|
|
1680
|
-
].flatMap(
|
|
1681
|
-
(envVar) => env[envVar] === void 0 ? [] : ["--env", `${envVar}=${env[envVar]}`]
|
|
1682
|
-
);
|
|
1683
|
-
}
|
|
1684
|
-
__name(getSandboxPassthroughEnvArgs, "getSandboxPassthroughEnvArgs");
|
|
1685
|
-
function resolveSeatbeltProfileFile(profile, importMetaUrl = import.meta.url) {
|
|
1686
|
-
if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
|
|
1687
|
-
return path6.join(SETTINGS_DIRECTORY_NAME, `sandbox-macos-${profile}.sb`);
|
|
1688
|
-
}
|
|
1689
|
-
return path6.join(
|
|
1690
|
-
resolveBundleDir(importMetaUrl),
|
|
1691
|
-
`sandbox-macos-${profile}.sb`
|
|
1692
|
-
);
|
|
1693
|
-
}
|
|
1694
|
-
__name(resolveSeatbeltProfileFile, "resolveSeatbeltProfileFile");
|
|
1695
|
-
async function shouldUseCurrentUserInSandbox() {
|
|
1696
|
-
const envVar = process.env["SANDBOX_SET_UID_GID"]?.toLowerCase().trim();
|
|
1697
|
-
if (envVar === "1" || envVar === "true") {
|
|
1698
|
-
return true;
|
|
1699
|
-
}
|
|
1700
|
-
if (envVar === "0" || envVar === "false") {
|
|
1701
|
-
return false;
|
|
1702
|
-
}
|
|
1703
|
-
if (os2.platform() === "linux") {
|
|
1704
|
-
const debugEnv = [process.env["DEBUG"], process.env["DEBUG_MODE"]].some(
|
|
1705
|
-
(v) => v === "true" || v === "1"
|
|
1706
|
-
);
|
|
1707
|
-
if (debugEnv) {
|
|
1708
|
-
writeStderrLine(
|
|
1709
|
-
"INFO: Using current user UID/GID in Linux sandbox. Set SANDBOX_SET_UID_GID=false to disable."
|
|
1710
|
-
);
|
|
1711
|
-
}
|
|
1712
|
-
return true;
|
|
1713
|
-
}
|
|
1714
|
-
return false;
|
|
1715
|
-
}
|
|
1716
|
-
__name(shouldUseCurrentUserInSandbox, "shouldUseCurrentUserInSandbox");
|
|
1717
|
-
function ports() {
|
|
1718
|
-
return (process.env["SANDBOX_PORTS"] ?? "").split(",").filter((p) => p.trim()).map((p) => p.trim());
|
|
1719
|
-
}
|
|
1720
|
-
__name(ports, "ports");
|
|
1721
|
-
function entrypoint(workdir, cliArgs) {
|
|
1722
|
-
const isWindows = os2.platform() === "win32";
|
|
1723
|
-
const containerWorkdir = getContainerPath(workdir);
|
|
1724
|
-
const shellCmds = [];
|
|
1725
|
-
const pathSeparator = isWindows ? ";" : ":";
|
|
1726
|
-
let pathSuffix = "";
|
|
1727
|
-
if (process.env["PATH"]) {
|
|
1728
|
-
const paths = process.env["PATH"].split(pathSeparator);
|
|
1729
|
-
for (const p of paths) {
|
|
1730
|
-
const containerPath = getContainerPath(p);
|
|
1731
|
-
if (isContainerPathWithinWorkdir(containerWorkdir, containerPath)) {
|
|
1732
|
-
pathSuffix += `:${containerPath}`;
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
}
|
|
1736
|
-
if (pathSuffix) {
|
|
1737
|
-
shellCmds.push(`export PATH="$PATH${pathSuffix}";`);
|
|
1738
|
-
}
|
|
1739
|
-
let pythonPathSuffix = "";
|
|
1740
|
-
if (process.env["PYTHONPATH"]) {
|
|
1741
|
-
const paths = process.env["PYTHONPATH"].split(pathSeparator);
|
|
1742
|
-
for (const p of paths) {
|
|
1743
|
-
const containerPath = getContainerPath(p);
|
|
1744
|
-
if (isContainerPathWithinWorkdir(containerWorkdir, containerPath)) {
|
|
1745
|
-
pythonPathSuffix += `:${containerPath}`;
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
if (pythonPathSuffix) {
|
|
1750
|
-
shellCmds.push(`export PYTHONPATH="$PYTHONPATH${pythonPathSuffix}";`);
|
|
1751
|
-
}
|
|
1752
|
-
const projectSandboxBashrc = path6.join(
|
|
1753
|
-
SETTINGS_DIRECTORY_NAME,
|
|
1754
|
-
"sandbox.bashrc"
|
|
1755
|
-
);
|
|
1756
|
-
if (fs4.existsSync(projectSandboxBashrc)) {
|
|
1757
|
-
shellCmds.push(`source ${getContainerPath(projectSandboxBashrc)};`);
|
|
1758
|
-
}
|
|
1759
|
-
ports().forEach(
|
|
1760
|
-
(p) => shellCmds.push(
|
|
1761
|
-
`socat TCP4-LISTEN:${p},bind=$(hostname -i),fork,reuseaddr TCP4:127.0.0.1:${p} 2> /dev/null &`
|
|
1762
|
-
)
|
|
1763
|
-
);
|
|
1764
|
-
const quotedCliArgs = cliArgs.slice(2).map((arg) => (0, import_shell_quote.quote)([arg]));
|
|
1765
|
-
const cliCmd = false ? process.env["DEBUG"] ? "npm run debug --" : "npm rebuild && npm run start --" : process.env["DEBUG"] ? `node --inspect-brk=0.0.0.0:${process.env["DEBUG_PORT"] || "9229"} $(which qwen)` : "qwen";
|
|
1766
|
-
const args = [...shellCmds, cliCmd, ...quotedCliArgs];
|
|
1767
|
-
return ["bash", "-c", args.join(" ")];
|
|
1768
|
-
}
|
|
1769
|
-
__name(entrypoint, "entrypoint");
|
|
1770
|
-
async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = [], childEnv) {
|
|
1771
|
-
if (config.command === "sandbox-exec") {
|
|
1772
|
-
if (process.env["BUILD_SANDBOX"]) {
|
|
1773
|
-
throw new FatalSandboxError(
|
|
1774
|
-
"Cannot BUILD_SANDBOX when using macOS Seatbelt"
|
|
1775
|
-
);
|
|
1776
|
-
}
|
|
1777
|
-
const profile = process.env["SEATBELT_PROFILE"] ??= "permissive-open";
|
|
1778
|
-
const profileFile = resolveSeatbeltProfileFile(profile);
|
|
1779
|
-
if (!fs4.existsSync(profileFile)) {
|
|
1780
|
-
throw new FatalSandboxError(
|
|
1781
|
-
`Missing macos seatbelt profile file '${profileFile}'`
|
|
1782
|
-
);
|
|
1783
|
-
}
|
|
1784
|
-
writeStderrLine(`using macos seatbelt (profile: ${profile}) ...`);
|
|
1785
|
-
const nodeOptions = [
|
|
1786
|
-
...process.env["DEBUG"] ? ["--inspect-brk"] : [],
|
|
1787
|
-
...nodeArgs
|
|
1788
|
-
].join(" ");
|
|
1789
|
-
const qwenDir = Storage.getGlobalQwenDir();
|
|
1790
|
-
const runtimeDir = Storage.getRuntimeBaseDir();
|
|
1791
|
-
fs4.mkdirSync(qwenDir, { recursive: true });
|
|
1792
|
-
fs4.mkdirSync(runtimeDir, { recursive: true });
|
|
1793
|
-
const args2 = [
|
|
1794
|
-
"-D",
|
|
1795
|
-
`TARGET_DIR=${fs4.realpathSync(process.cwd())}`,
|
|
1796
|
-
"-D",
|
|
1797
|
-
`TMP_DIR=${fs4.realpathSync(os2.tmpdir())}`,
|
|
1798
|
-
"-D",
|
|
1799
|
-
`HOME_DIR=${fs4.realpathSync(os2.homedir())}`,
|
|
1800
|
-
"-D",
|
|
1801
|
-
`CACHE_DIR=${fs4.realpathSync(execSync(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`,
|
|
1802
|
-
"-D",
|
|
1803
|
-
`QWEN_DIR=${fs4.realpathSync(qwenDir)}`,
|
|
1804
|
-
"-D",
|
|
1805
|
-
`RUNTIME_DIR=${fs4.realpathSync(runtimeDir)}`
|
|
1806
|
-
];
|
|
1807
|
-
const MAX_INCLUDE_DIRS = 5;
|
|
1808
|
-
const targetDir = fs4.realpathSync(cliConfig?.getTargetDir() || "");
|
|
1809
|
-
const includedDirs = [];
|
|
1810
|
-
if (cliConfig) {
|
|
1811
|
-
const workspaceContext = cliConfig.getWorkspaceContext();
|
|
1812
|
-
const directories = workspaceContext.getDirectories();
|
|
1813
|
-
for (const dir of directories) {
|
|
1814
|
-
const realDir = fs4.realpathSync(dir);
|
|
1815
|
-
if (realDir !== targetDir) {
|
|
1816
|
-
includedDirs.push(realDir);
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
for (let i = 0; i < MAX_INCLUDE_DIRS; i++) {
|
|
1821
|
-
let dirPath = "/dev/null";
|
|
1822
|
-
if (i < includedDirs.length) {
|
|
1823
|
-
dirPath = includedDirs[i];
|
|
1824
|
-
}
|
|
1825
|
-
args2.push("-D", `INCLUDE_DIR_${i}=${dirPath}`);
|
|
1826
|
-
}
|
|
1827
|
-
const finalArgv = cliArgs;
|
|
1828
|
-
args2.push(
|
|
1829
|
-
"-f",
|
|
1830
|
-
profileFile,
|
|
1831
|
-
"sh",
|
|
1832
|
-
"-c",
|
|
1833
|
-
[
|
|
1834
|
-
...process.env["QWEN_CODE_SCRUB_ELECTRON_RUN_AS_NODE"] === "1" ? ["ELECTRON_RUN_AS_NODE=1"] : [],
|
|
1835
|
-
`SANDBOX=sandbox-exec`,
|
|
1836
|
-
`NODE_OPTIONS="${nodeOptions}"`,
|
|
1837
|
-
...finalArgv.map((arg) => (0, import_shell_quote.quote)([arg]))
|
|
1838
|
-
].join(" ")
|
|
1839
|
-
);
|
|
1840
|
-
const proxyCommand2 = process.env["QWEN_SANDBOX_PROXY_COMMAND"];
|
|
1841
|
-
let proxyProcess2 = void 0;
|
|
1842
|
-
let sandboxProcess2 = void 0;
|
|
1843
|
-
const sandboxEnv = { ...process.env };
|
|
1844
|
-
if (proxyCommand2) {
|
|
1845
|
-
const proxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"] || process.env["HTTP_PROXY"] || process.env["http_proxy"] || "http://localhost:8877";
|
|
1846
|
-
sandboxEnv["HTTPS_PROXY"] = proxy;
|
|
1847
|
-
sandboxEnv["https_proxy"] = proxy;
|
|
1848
|
-
sandboxEnv["HTTP_PROXY"] = proxy;
|
|
1849
|
-
sandboxEnv["http_proxy"] = proxy;
|
|
1850
|
-
const noProxy = process.env["NO_PROXY"] || process.env["no_proxy"];
|
|
1851
|
-
if (noProxy) {
|
|
1852
|
-
sandboxEnv["NO_PROXY"] = noProxy;
|
|
1853
|
-
sandboxEnv["no_proxy"] = noProxy;
|
|
1854
|
-
}
|
|
1855
|
-
proxyProcess2 = spawn2("bash", ["-c", proxyCommand2], {
|
|
1856
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
1857
|
-
detached: true
|
|
1858
|
-
});
|
|
1859
|
-
const stopProxy = /* @__PURE__ */ __name(() => {
|
|
1860
|
-
writeStderrLine("stopping proxy ...");
|
|
1861
|
-
if (proxyProcess2?.pid) {
|
|
1862
|
-
process.kill(-proxyProcess2.pid, "SIGTERM");
|
|
1863
|
-
}
|
|
1864
|
-
}, "stopProxy");
|
|
1865
|
-
process.on("exit", stopProxy);
|
|
1866
|
-
process.on("SIGINT", stopProxy);
|
|
1867
|
-
process.on("SIGTERM", stopProxy);
|
|
1868
|
-
proxyProcess2.stderr?.on("data", (data) => {
|
|
1869
|
-
writeStderrLine(data.toString());
|
|
1870
|
-
});
|
|
1871
|
-
proxyProcess2.on("close", (code, signal) => {
|
|
1872
|
-
if (sandboxProcess2?.pid) {
|
|
1873
|
-
process.kill(-sandboxProcess2.pid, "SIGTERM");
|
|
1874
|
-
}
|
|
1875
|
-
throw new FatalSandboxError(
|
|
1876
|
-
`Proxy command '${proxyCommand2}' exited with code ${code}, signal ${signal}`
|
|
1877
|
-
);
|
|
1878
|
-
});
|
|
1879
|
-
writeStderrLine("waiting for proxy to start ...");
|
|
1880
|
-
await execAsync(
|
|
1881
|
-
`until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done`
|
|
1882
|
-
);
|
|
1883
|
-
}
|
|
1884
|
-
process.stdin.pause();
|
|
1885
|
-
sandboxProcess2 = spawn2(config.command, args2, {
|
|
1886
|
-
stdio: "inherit",
|
|
1887
|
-
...childEnv ? { env: { ...process.env, ...childEnv } } : {}
|
|
1888
|
-
});
|
|
1889
|
-
return new Promise((resolve3, reject) => {
|
|
1890
|
-
sandboxProcess2?.on("error", reject);
|
|
1891
|
-
sandboxProcess2?.on("close", (code) => {
|
|
1892
|
-
process.stdin.resume();
|
|
1893
|
-
resolve3(code ?? 1);
|
|
1894
|
-
});
|
|
1895
|
-
});
|
|
1896
|
-
}
|
|
1897
|
-
writeStderrLine(`hopping into sandbox (command: ${config.command}) ...`);
|
|
1898
|
-
const gcPath = fs4.realpathSync(process.argv[1]);
|
|
1899
|
-
const projectSandboxDockerfile = path6.join(
|
|
1900
|
-
SETTINGS_DIRECTORY_NAME,
|
|
1901
|
-
"sandbox.Dockerfile"
|
|
1902
|
-
);
|
|
1903
|
-
const isCustomProjectSandbox = fs4.existsSync(projectSandboxDockerfile);
|
|
1904
|
-
const image = config.image;
|
|
1905
|
-
const workdir = path6.resolve(process.cwd());
|
|
1906
|
-
const containerWorkdir = getContainerPath(workdir);
|
|
1907
|
-
if (process.env["BUILD_SANDBOX"]) {
|
|
1908
|
-
if (!gcPath.includes("qwen-code/packages/")) {
|
|
1909
|
-
throw new FatalSandboxError(
|
|
1910
|
-
"Cannot build sandbox using installed Qwen Code binary; run `npm link ./packages/cli` under QwenCode-cli repo to switch to linked binary."
|
|
1911
|
-
);
|
|
1912
|
-
} else {
|
|
1913
|
-
writeStderrLine("building sandbox ...");
|
|
1914
|
-
const gcRoot = gcPath.split("/packages/")[0];
|
|
1915
|
-
let buildArgs = "";
|
|
1916
|
-
const projectSandboxDockerfile2 = path6.join(
|
|
1917
|
-
SETTINGS_DIRECTORY_NAME,
|
|
1918
|
-
"sandbox.Dockerfile"
|
|
1919
|
-
);
|
|
1920
|
-
if (isCustomProjectSandbox) {
|
|
1921
|
-
writeStderrLine(`using ${projectSandboxDockerfile2} for sandbox`);
|
|
1922
|
-
buildArgs += `-f ${path6.resolve(projectSandboxDockerfile2)} -i ${image}`;
|
|
1923
|
-
}
|
|
1924
|
-
execSync(
|
|
1925
|
-
`cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`,
|
|
1926
|
-
{
|
|
1927
|
-
stdio: "inherit",
|
|
1928
|
-
env: {
|
|
1929
|
-
...process.env,
|
|
1930
|
-
QWEN_SANDBOX: config.command
|
|
1931
|
-
// in case sandbox is enabled via flags (see config.ts under cli package)
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
);
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
if (!await ensureSandboxImageIsPresent(config.command, image)) {
|
|
1938
|
-
const remedy = image === LOCAL_DEV_SANDBOX_IMAGE_NAME ? "Try running `npm run build:all` or `npm run build:sandbox` under the qwen-code repo to build it locally, or check the image name and your network connection." : "Please check the image name, your network connection, or notify qwen-code-dev@service.alibaba.com if the issue persists.";
|
|
1939
|
-
throw new FatalSandboxError(
|
|
1940
|
-
`Sandbox image '${image}' is missing or could not be pulled. ${remedy}`
|
|
1941
|
-
);
|
|
1942
|
-
}
|
|
1943
|
-
const args = ["run", "-i", "--rm", "--init", "--workdir", containerWorkdir];
|
|
1944
|
-
if (process.env["SANDBOX_FLAGS"]) {
|
|
1945
|
-
const flags = (0, import_shell_quote.parse)(process.env["SANDBOX_FLAGS"], process.env).filter(
|
|
1946
|
-
(f) => typeof f === "string"
|
|
1947
|
-
);
|
|
1948
|
-
args.push(...flags);
|
|
1949
|
-
}
|
|
1950
|
-
if (process.stdin.isTTY) {
|
|
1951
|
-
args.push("-t");
|
|
1952
|
-
}
|
|
1953
|
-
args.push("--add-host", "host.docker.internal:host-gateway");
|
|
1954
|
-
args.push("--volume", `${workdir}:${containerWorkdir}`);
|
|
1955
|
-
const userSettingsDirOnHost = getUserSettingsDir();
|
|
1956
|
-
const runtimeBaseDirOnHost = Storage.getRuntimeBaseDir();
|
|
1957
|
-
const userSettingsDirRealPath = ensureDirectoryAndGetRealPath(
|
|
1958
|
-
userSettingsDirOnHost
|
|
1959
|
-
);
|
|
1960
|
-
const runtimeBaseDirRealPath = ensureDirectoryAndGetRealPath(runtimeBaseDirOnHost);
|
|
1961
|
-
const userSettingsDirInSandbox = getContainerPath(
|
|
1962
|
-
`/home/node/${SETTINGS_DIRECTORY_NAME}`
|
|
1963
|
-
);
|
|
1964
|
-
const userSettingsDirContainerPath = getContainerPath(
|
|
1965
|
-
userSettingsDirRealPath
|
|
1966
|
-
);
|
|
1967
|
-
const runtimeBaseDirContainerPath = getContainerPath(runtimeBaseDirRealPath);
|
|
1968
|
-
const runtimeCoveredByUserSettings = isSubpath(
|
|
1969
|
-
userSettingsDirRealPath,
|
|
1970
|
-
runtimeBaseDirRealPath
|
|
1971
|
-
);
|
|
1972
|
-
const userSettingsCoveredByRuntime = isSubpath(
|
|
1973
|
-
runtimeBaseDirRealPath,
|
|
1974
|
-
userSettingsDirRealPath
|
|
1975
|
-
);
|
|
1976
|
-
const runtimeSameAsUserSettings = runtimeCoveredByUserSettings && userSettingsCoveredByRuntime;
|
|
1977
|
-
args.push(
|
|
1978
|
-
"--volume",
|
|
1979
|
-
`${userSettingsDirRealPath}:${userSettingsDirInSandbox}`
|
|
1980
|
-
);
|
|
1981
|
-
if ((!userSettingsCoveredByRuntime || runtimeSameAsUserSettings) && userSettingsDirInSandbox !== userSettingsDirContainerPath) {
|
|
1982
|
-
args.push(
|
|
1983
|
-
"--volume",
|
|
1984
|
-
`${userSettingsDirRealPath}:${userSettingsDirContainerPath}`
|
|
1985
|
-
);
|
|
1986
|
-
}
|
|
1987
|
-
args.push("--env", `QWEN_HOME=${userSettingsDirContainerPath}`);
|
|
1988
|
-
if (!runtimeCoveredByUserSettings) {
|
|
1989
|
-
args.push(
|
|
1990
|
-
"--volume",
|
|
1991
|
-
`${runtimeBaseDirRealPath}:${runtimeBaseDirContainerPath}`
|
|
1992
|
-
);
|
|
1993
|
-
}
|
|
1994
|
-
if (!runtimeSameAsUserSettings) {
|
|
1995
|
-
args.push("--env", `QWEN_RUNTIME_DIR=${runtimeBaseDirContainerPath}`);
|
|
1996
|
-
}
|
|
1997
|
-
args.push("--volume", `${os2.tmpdir()}:${getContainerPath(os2.tmpdir())}`);
|
|
1998
|
-
const gcloudConfigDir = path6.join(os2.homedir(), ".config", "gcloud");
|
|
1999
|
-
if (fs4.existsSync(gcloudConfigDir)) {
|
|
2000
|
-
args.push(
|
|
2001
|
-
"--volume",
|
|
2002
|
-
`${gcloudConfigDir}:${getContainerPath(gcloudConfigDir)}:ro`
|
|
2003
|
-
);
|
|
2004
|
-
}
|
|
2005
|
-
if (process.env["GOOGLE_APPLICATION_CREDENTIALS"]) {
|
|
2006
|
-
const adcFile = process.env["GOOGLE_APPLICATION_CREDENTIALS"];
|
|
2007
|
-
if (fs4.existsSync(adcFile)) {
|
|
2008
|
-
args.push("--volume", `${adcFile}:${getContainerPath(adcFile)}:ro`);
|
|
2009
|
-
args.push(
|
|
2010
|
-
"--env",
|
|
2011
|
-
`GOOGLE_APPLICATION_CREDENTIALS=${getContainerPath(adcFile)}`
|
|
2012
|
-
);
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
if (process.env["SANDBOX_MOUNTS"]) {
|
|
2016
|
-
for (let mount of process.env["SANDBOX_MOUNTS"].split(",")) {
|
|
2017
|
-
if (mount.trim()) {
|
|
2018
|
-
const { from, to, opts } = parseSandboxMountSpec(mount);
|
|
2019
|
-
mount = `${from}:${to}:${opts}`;
|
|
2020
|
-
if (!path6.isAbsolute(from)) {
|
|
2021
|
-
throw new FatalSandboxError(
|
|
2022
|
-
`Path '${from}' listed in SANDBOX_MOUNTS must be absolute`
|
|
2023
|
-
);
|
|
2024
|
-
}
|
|
2025
|
-
if (!fs4.existsSync(from)) {
|
|
2026
|
-
throw new FatalSandboxError(
|
|
2027
|
-
`Missing mount path '${from}' listed in SANDBOX_MOUNTS`
|
|
2028
|
-
);
|
|
2029
|
-
}
|
|
2030
|
-
writeStderrLine(`SANDBOX_MOUNTS: ${from} -> ${to} (${opts})`);
|
|
2031
|
-
args.push("--volume", mount);
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
}
|
|
2035
|
-
ports().forEach((p) => args.push("--publish", `${p}:${p}`));
|
|
2036
|
-
if (process.env["DEBUG"]) {
|
|
2037
|
-
const debugPort = process.env["DEBUG_PORT"] || "9229";
|
|
2038
|
-
args.push(`--publish`, `${debugPort}:${debugPort}`);
|
|
2039
|
-
}
|
|
2040
|
-
const proxyCommand = process.env["QWEN_SANDBOX_PROXY_COMMAND"];
|
|
2041
|
-
if (proxyCommand) {
|
|
2042
|
-
let proxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"] || process.env["HTTP_PROXY"] || process.env["http_proxy"] || "http://localhost:8877";
|
|
2043
|
-
proxy = proxy.replace("localhost", SANDBOX_PROXY_NAME);
|
|
2044
|
-
if (proxy) {
|
|
2045
|
-
args.push("--env", `HTTPS_PROXY=${proxy}`);
|
|
2046
|
-
args.push("--env", `https_proxy=${proxy}`);
|
|
2047
|
-
args.push("--env", `HTTP_PROXY=${proxy}`);
|
|
2048
|
-
args.push("--env", `http_proxy=${proxy}`);
|
|
2049
|
-
}
|
|
2050
|
-
const noProxy = process.env["NO_PROXY"] || process.env["no_proxy"];
|
|
2051
|
-
if (noProxy) {
|
|
2052
|
-
args.push("--env", `NO_PROXY=${noProxy}`);
|
|
2053
|
-
args.push("--env", `no_proxy=${noProxy}`);
|
|
2054
|
-
}
|
|
2055
|
-
if (proxy) {
|
|
2056
|
-
execSync(
|
|
2057
|
-
`${config.command} network inspect ${SANDBOX_NETWORK_NAME} || ${config.command} network create --internal ${SANDBOX_NETWORK_NAME}`
|
|
2058
|
-
);
|
|
2059
|
-
args.push("--network", SANDBOX_NETWORK_NAME);
|
|
2060
|
-
if (proxyCommand) {
|
|
2061
|
-
execSync(
|
|
2062
|
-
`${config.command} network inspect ${SANDBOX_PROXY_NAME} || ${config.command} network create ${SANDBOX_PROXY_NAME}`
|
|
2063
|
-
);
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
}
|
|
2067
|
-
const imageName = parseSandboxImageName(image);
|
|
2068
|
-
const isIntegrationTest = process.env["QWEN_CODE_INTEGRATION_TEST"] === "true";
|
|
2069
|
-
let containerName;
|
|
2070
|
-
if (isIntegrationTest) {
|
|
2071
|
-
containerName = `qwen-code-integration-test-${randomBytes(4).toString(
|
|
2072
|
-
"hex"
|
|
2073
|
-
)}`;
|
|
2074
|
-
writeStderrLine(`ContainerName: ${containerName}`);
|
|
2075
|
-
} else {
|
|
2076
|
-
containerName = `${imageName}-${randomBytes(4).toString("hex")}`;
|
|
2077
|
-
writeStderrLine(`ContainerName (regular): ${containerName}`);
|
|
2078
|
-
}
|
|
2079
|
-
args.push("--name", containerName);
|
|
2080
|
-
if (containerName.length <= 64) {
|
|
2081
|
-
args.push("--hostname", containerName);
|
|
2082
|
-
}
|
|
2083
|
-
if (process.env["QWEN_CODE_TEST_VAR"]) {
|
|
2084
|
-
args.push(
|
|
2085
|
-
"--env",
|
|
2086
|
-
`QWEN_CODE_TEST_VAR=${process.env["QWEN_CODE_TEST_VAR"]}`
|
|
2087
|
-
);
|
|
2088
|
-
}
|
|
2089
|
-
args.push(...getSandboxPassthroughEnvArgs());
|
|
2090
|
-
if (process.env["QWEN_CODE_MCP_APPROVALS_PATH"]) {
|
|
2091
|
-
args.push(
|
|
2092
|
-
"--env",
|
|
2093
|
-
`QWEN_CODE_MCP_APPROVALS_PATH=${getContainerPath(
|
|
2094
|
-
process.env["QWEN_CODE_MCP_APPROVALS_PATH"]
|
|
2095
|
-
)}`
|
|
2096
|
-
);
|
|
2097
|
-
}
|
|
2098
|
-
if (process.env["QWEN_CODE_WARNINGS_FILE"]) {
|
|
2099
|
-
args.push(
|
|
2100
|
-
"--env",
|
|
2101
|
-
`QWEN_CODE_WARNINGS_FILE=${getContainerPath(
|
|
2102
|
-
process.env["QWEN_CODE_WARNINGS_FILE"]
|
|
2103
|
-
)}`
|
|
2104
|
-
);
|
|
2105
|
-
}
|
|
2106
|
-
if (process.env["GEMINI_API_KEY"]) {
|
|
2107
|
-
args.push("--env", `GEMINI_API_KEY=${process.env["GEMINI_API_KEY"]}`);
|
|
2108
|
-
}
|
|
2109
|
-
if (process.env["GOOGLE_API_KEY"]) {
|
|
2110
|
-
args.push("--env", `GOOGLE_API_KEY=${process.env["GOOGLE_API_KEY"]}`);
|
|
2111
|
-
}
|
|
2112
|
-
if (process.env["OPENAI_API_KEY"]) {
|
|
2113
|
-
args.push("--env", `OPENAI_API_KEY=${process.env["OPENAI_API_KEY"]}`);
|
|
2114
|
-
}
|
|
2115
|
-
if (process.env["OPENAI_BASE_URL"]) {
|
|
2116
|
-
args.push("--env", `OPENAI_BASE_URL=${process.env["OPENAI_BASE_URL"]}`);
|
|
2117
|
-
}
|
|
2118
|
-
if (process.env["OPENAI_MODEL"]) {
|
|
2119
|
-
args.push("--env", `OPENAI_MODEL=${process.env["OPENAI_MODEL"]}`);
|
|
2120
|
-
}
|
|
2121
|
-
if (process.env["GOOGLE_GENAI_USE_VERTEXAI"]) {
|
|
2122
|
-
args.push(
|
|
2123
|
-
"--env",
|
|
2124
|
-
`GOOGLE_GENAI_USE_VERTEXAI=${process.env["GOOGLE_GENAI_USE_VERTEXAI"]}`
|
|
2125
|
-
);
|
|
2126
|
-
}
|
|
2127
|
-
if (process.env["GOOGLE_GENAI_USE_GCA"]) {
|
|
2128
|
-
args.push(
|
|
2129
|
-
"--env",
|
|
2130
|
-
`GOOGLE_GENAI_USE_GCA=${process.env["GOOGLE_GENAI_USE_GCA"]}`
|
|
2131
|
-
);
|
|
2132
|
-
}
|
|
2133
|
-
if (process.env["GOOGLE_CLOUD_PROJECT"]) {
|
|
2134
|
-
args.push(
|
|
2135
|
-
"--env",
|
|
2136
|
-
`GOOGLE_CLOUD_PROJECT=${process.env["GOOGLE_CLOUD_PROJECT"]}`
|
|
2137
|
-
);
|
|
2138
|
-
}
|
|
2139
|
-
if (process.env["GOOGLE_CLOUD_LOCATION"]) {
|
|
2140
|
-
args.push(
|
|
2141
|
-
"--env",
|
|
2142
|
-
`GOOGLE_CLOUD_LOCATION=${process.env["GOOGLE_CLOUD_LOCATION"]}`
|
|
2143
|
-
);
|
|
2144
|
-
}
|
|
2145
|
-
if (process.env["GEMINI_MODEL"]) {
|
|
2146
|
-
args.push("--env", `GEMINI_MODEL=${process.env["GEMINI_MODEL"]}`);
|
|
2147
|
-
}
|
|
2148
|
-
if (process.env["TERM"]) {
|
|
2149
|
-
args.push("--env", `TERM=${process.env["TERM"]}`);
|
|
2150
|
-
}
|
|
2151
|
-
if (process.env["COLORTERM"]) {
|
|
2152
|
-
args.push("--env", `COLORTERM=${process.env["COLORTERM"]}`);
|
|
2153
|
-
}
|
|
2154
|
-
for (const envVar of [
|
|
2155
|
-
"QWEN_CODE_IDE_SERVER_PORT",
|
|
2156
|
-
"QWEN_CODE_IDE_WORKSPACE_PATH",
|
|
2157
|
-
"TERM_PROGRAM"
|
|
2158
|
-
]) {
|
|
2159
|
-
if (process.env[envVar]) {
|
|
2160
|
-
args.push("--env", `${envVar}=${process.env[envVar]}`);
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
const virtualEnv = process.env["VIRTUAL_ENV"];
|
|
2164
|
-
if (virtualEnv && isContainerPathWithinWorkdir(
|
|
2165
|
-
getContainerPath(workdir),
|
|
2166
|
-
getContainerPath(virtualEnv)
|
|
2167
|
-
)) {
|
|
2168
|
-
const sandboxVenvPath = path6.resolve(
|
|
2169
|
-
SETTINGS_DIRECTORY_NAME,
|
|
2170
|
-
"sandbox.venv"
|
|
2171
|
-
);
|
|
2172
|
-
if (!fs4.existsSync(sandboxVenvPath)) {
|
|
2173
|
-
fs4.mkdirSync(sandboxVenvPath, { recursive: true });
|
|
2174
|
-
}
|
|
2175
|
-
args.push("--volume", `${sandboxVenvPath}:${getContainerPath(virtualEnv)}`);
|
|
2176
|
-
args.push("--env", `VIRTUAL_ENV=${getContainerPath(virtualEnv)}`);
|
|
2177
|
-
}
|
|
2178
|
-
if (process.env["SANDBOX_ENV"]) {
|
|
2179
|
-
for (let env of process.env["SANDBOX_ENV"].split(",")) {
|
|
2180
|
-
if (env = env.trim()) {
|
|
2181
|
-
if (env.includes("=")) {
|
|
2182
|
-
writeStderrLine(`SANDBOX_ENV: ${env}`);
|
|
2183
|
-
args.push("--env", env);
|
|
2184
|
-
} else {
|
|
2185
|
-
throw new FatalSandboxError(
|
|
2186
|
-
"SANDBOX_ENV must be a comma-separated list of key=value pairs"
|
|
2187
|
-
);
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
for (const name of Object.keys(childEnv ?? {})) {
|
|
2193
|
-
args.push("--env", name);
|
|
2194
|
-
}
|
|
2195
|
-
const existingNodeOptions = process.env["NODE_OPTIONS"] || "";
|
|
2196
|
-
const allNodeOptions = [
|
|
2197
|
-
...existingNodeOptions ? [existingNodeOptions] : [],
|
|
2198
|
-
...nodeArgs
|
|
2199
|
-
].join(" ");
|
|
2200
|
-
if (allNodeOptions.length > 0) {
|
|
2201
|
-
args.push("--env", `NODE_OPTIONS="${allNodeOptions}"`);
|
|
2202
|
-
}
|
|
2203
|
-
args.push("--env", `SANDBOX=${containerName}`);
|
|
2204
|
-
if (config.command === "podman") {
|
|
2205
|
-
const emptyAuthFilePath = path6.join(os2.tmpdir(), "empty_auth.json");
|
|
2206
|
-
fs4.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
|
|
2207
|
-
args.push("--authfile", emptyAuthFilePath);
|
|
2208
|
-
}
|
|
2209
|
-
let userFlag = "";
|
|
2210
|
-
const finalEntrypoint = entrypoint(workdir, cliArgs);
|
|
2211
|
-
const useCurrentUser = await shouldUseCurrentUserInSandbox();
|
|
2212
|
-
if (useCurrentUser) {
|
|
2213
|
-
args.push("--user", "root");
|
|
2214
|
-
const uid = execSync("id -u").toString().trim();
|
|
2215
|
-
const gid = execSync("id -g").toString().trim();
|
|
2216
|
-
const username = "qwen";
|
|
2217
|
-
const homeDir = getContainerPath(os2.homedir());
|
|
2218
|
-
const setupUserCommands = [
|
|
2219
|
-
// Use -f with groupadd to avoid errors if the group already exists.
|
|
2220
|
-
`groupadd -f -g ${gid} ${username}`,
|
|
2221
|
-
// Create user only if it doesn't exist. Use -o for non-unique UID.
|
|
2222
|
-
`id -u ${username} &>/dev/null || useradd -o -u ${uid} -g ${gid} -d ${homeDir} -s /bin/bash ${username}`
|
|
2223
|
-
].join(" && ");
|
|
2224
|
-
const originalCommand = finalEntrypoint[2];
|
|
2225
|
-
const escapedOriginalCommand = originalCommand.replace(/'/g, "'\\''");
|
|
2226
|
-
const suCommand = `su -p ${username} -c '${escapedOriginalCommand}'`;
|
|
2227
|
-
finalEntrypoint[2] = `${setupUserCommands} && ${suCommand}`;
|
|
2228
|
-
userFlag = `--user ${uid}:${gid}`;
|
|
2229
|
-
args.push("--env", `HOME=${os2.homedir()}`);
|
|
2230
|
-
} else if (isIntegrationTest) {
|
|
2231
|
-
args.push("--user", "root");
|
|
2232
|
-
userFlag = "--user root";
|
|
2233
|
-
}
|
|
2234
|
-
args.push(image);
|
|
2235
|
-
args.push(...finalEntrypoint);
|
|
2236
|
-
let proxyProcess = void 0;
|
|
2237
|
-
let sandboxProcess = void 0;
|
|
2238
|
-
if (proxyCommand) {
|
|
2239
|
-
const proxyContainerCommand = `${config.command} run --rm --init ${userFlag} --name ${SANDBOX_PROXY_NAME} --network ${SANDBOX_PROXY_NAME} -p 8877:8877 -v ${process.cwd()}:${workdir} --workdir ${workdir} ${image} ${proxyCommand}`;
|
|
2240
|
-
const isWindows = os2.platform() === "win32";
|
|
2241
|
-
const proxyShell = isWindows ? "cmd.exe" : "bash";
|
|
2242
|
-
const proxyShellArgs = isWindows ? ["/c", proxyContainerCommand] : ["-c", proxyContainerCommand];
|
|
2243
|
-
proxyProcess = spawn2(proxyShell, proxyShellArgs, {
|
|
2244
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
2245
|
-
detached: true
|
|
2246
|
-
});
|
|
2247
|
-
const stopProxy = /* @__PURE__ */ __name(() => {
|
|
2248
|
-
writeStderrLine("stopping proxy container ...");
|
|
2249
|
-
execSync(`${config.command} rm -f ${SANDBOX_PROXY_NAME}`);
|
|
2250
|
-
}, "stopProxy");
|
|
2251
|
-
process.on("exit", stopProxy);
|
|
2252
|
-
process.on("SIGINT", stopProxy);
|
|
2253
|
-
process.on("SIGTERM", stopProxy);
|
|
2254
|
-
proxyProcess.stderr?.on("data", (data) => {
|
|
2255
|
-
writeStderrLine(data.toString().trim());
|
|
2256
|
-
});
|
|
2257
|
-
proxyProcess.on("close", (code, signal) => {
|
|
2258
|
-
if (sandboxProcess?.pid) {
|
|
2259
|
-
process.kill(-sandboxProcess.pid, "SIGTERM");
|
|
2260
|
-
}
|
|
2261
|
-
throw new FatalSandboxError(
|
|
2262
|
-
`Proxy container command '${proxyContainerCommand}' exited with code ${code}, signal ${signal}`
|
|
2263
|
-
);
|
|
2264
|
-
});
|
|
2265
|
-
writeStderrLine("waiting for proxy to start ...");
|
|
2266
|
-
await execAsync(
|
|
2267
|
-
`until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done`
|
|
2268
|
-
);
|
|
2269
|
-
await execAsync(
|
|
2270
|
-
`${config.command} network connect ${SANDBOX_NETWORK_NAME} ${SANDBOX_PROXY_NAME}`
|
|
2271
|
-
);
|
|
2272
|
-
}
|
|
2273
|
-
process.stdin.pause();
|
|
2274
|
-
sandboxProcess = spawn2(config.command, args, {
|
|
2275
|
-
stdio: "inherit",
|
|
2276
|
-
...childEnv ? { env: { ...process.env, ...childEnv } } : {}
|
|
2277
|
-
});
|
|
2278
|
-
return new Promise((resolve3, reject) => {
|
|
2279
|
-
sandboxProcess.on("error", (err) => {
|
|
2280
|
-
writeStderrLine(`Sandbox process error: ${err}`);
|
|
2281
|
-
reject(err);
|
|
2282
|
-
});
|
|
2283
|
-
sandboxProcess?.on("close", (code, signal) => {
|
|
2284
|
-
process.stdin.resume();
|
|
2285
|
-
if (code !== 0 && code !== null) {
|
|
2286
|
-
writeStderrLine(
|
|
2287
|
-
`Sandbox process exited with code: ${code}, signal: ${signal}`
|
|
2288
|
-
);
|
|
2289
|
-
}
|
|
2290
|
-
resolve3(code ?? 1);
|
|
2291
|
-
});
|
|
2292
|
-
});
|
|
2293
|
-
}
|
|
2294
|
-
__name(start_sandbox, "start_sandbox");
|
|
2295
|
-
async function imageExists(sandbox, image) {
|
|
2296
|
-
return new Promise((resolve3) => {
|
|
2297
|
-
const args = ["image", "inspect", "--format", "{{.Id}}", image];
|
|
2298
|
-
const checkProcess = spawn2(sandbox, args);
|
|
2299
|
-
let stdoutData = "";
|
|
2300
|
-
if (checkProcess.stdout) {
|
|
2301
|
-
checkProcess.stdout.on("data", (data) => {
|
|
2302
|
-
stdoutData += data.toString();
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
checkProcess.on("error", (err) => {
|
|
2306
|
-
writeStderrLine(
|
|
2307
|
-
`Failed to start '${sandbox}' command for image check: ${err.message}`
|
|
2308
|
-
);
|
|
2309
|
-
resolve3(false);
|
|
2310
|
-
});
|
|
2311
|
-
checkProcess.on("close", () => {
|
|
2312
|
-
resolve3(stdoutData.trim() !== "");
|
|
2313
|
-
});
|
|
2314
|
-
});
|
|
2315
|
-
}
|
|
2316
|
-
__name(imageExists, "imageExists");
|
|
2317
|
-
async function pullImage(sandbox, image) {
|
|
2318
|
-
writeStderrLine(`Attempting to pull image ${image} using ${sandbox}...`);
|
|
2319
|
-
return new Promise((resolve3) => {
|
|
2320
|
-
const args = ["pull", image];
|
|
2321
|
-
const pullProcess = spawn2(sandbox, args, { stdio: "pipe" });
|
|
2322
|
-
let stderrData = "";
|
|
2323
|
-
const onStdoutData = /* @__PURE__ */ __name((data) => {
|
|
2324
|
-
writeStderrLine(data.toString().trim());
|
|
2325
|
-
}, "onStdoutData");
|
|
2326
|
-
const onStderrData = /* @__PURE__ */ __name((data) => {
|
|
2327
|
-
stderrData += data.toString();
|
|
2328
|
-
writeStderrLine(data.toString().trim());
|
|
2329
|
-
}, "onStderrData");
|
|
2330
|
-
const onError = /* @__PURE__ */ __name((err) => {
|
|
2331
|
-
writeStderrLine(
|
|
2332
|
-
`Failed to start '${sandbox} pull ${image}' command: ${err.message}`
|
|
2333
|
-
);
|
|
2334
|
-
cleanup();
|
|
2335
|
-
resolve3(false);
|
|
2336
|
-
}, "onError");
|
|
2337
|
-
const onClose = /* @__PURE__ */ __name((code) => {
|
|
2338
|
-
if (code === 0) {
|
|
2339
|
-
writeStderrLine(`Successfully pulled image ${image}.`);
|
|
2340
|
-
cleanup();
|
|
2341
|
-
resolve3(true);
|
|
2342
|
-
} else {
|
|
2343
|
-
writeStderrLine(
|
|
2344
|
-
`Failed to pull image ${image}. '${sandbox} pull ${image}' exited with code ${code}.`
|
|
2345
|
-
);
|
|
2346
|
-
if (stderrData.trim()) {
|
|
2347
|
-
}
|
|
2348
|
-
cleanup();
|
|
2349
|
-
resolve3(false);
|
|
2350
|
-
}
|
|
2351
|
-
}, "onClose");
|
|
2352
|
-
const cleanup = /* @__PURE__ */ __name(() => {
|
|
2353
|
-
if (pullProcess.stdout) {
|
|
2354
|
-
pullProcess.stdout.removeListener("data", onStdoutData);
|
|
2355
|
-
}
|
|
2356
|
-
if (pullProcess.stderr) {
|
|
2357
|
-
pullProcess.stderr.removeListener("data", onStderrData);
|
|
2358
|
-
}
|
|
2359
|
-
pullProcess.removeListener("error", onError);
|
|
2360
|
-
pullProcess.removeListener("close", onClose);
|
|
2361
|
-
if (pullProcess.connected) {
|
|
2362
|
-
pullProcess.disconnect();
|
|
2363
|
-
}
|
|
2364
|
-
}, "cleanup");
|
|
2365
|
-
if (pullProcess.stdout) {
|
|
2366
|
-
pullProcess.stdout.on("data", onStdoutData);
|
|
2367
|
-
}
|
|
2368
|
-
if (pullProcess.stderr) {
|
|
2369
|
-
pullProcess.stderr.on("data", onStderrData);
|
|
2370
|
-
}
|
|
2371
|
-
pullProcess.on("error", onError);
|
|
2372
|
-
pullProcess.on("close", onClose);
|
|
2373
|
-
});
|
|
2374
|
-
}
|
|
2375
|
-
__name(pullImage, "pullImage");
|
|
2376
|
-
async function ensureSandboxImageIsPresent(sandbox, image) {
|
|
2377
|
-
writeStderrLine(`Checking for sandbox image: ${image}`);
|
|
2378
|
-
if (await imageExists(sandbox, image)) {
|
|
2379
|
-
writeStderrLine(`Sandbox image ${image} found locally.`);
|
|
2380
|
-
return true;
|
|
2381
|
-
}
|
|
2382
|
-
writeStderrLine(`Sandbox image ${image} not found locally.`);
|
|
2383
|
-
if (image === LOCAL_DEV_SANDBOX_IMAGE_NAME) {
|
|
2384
|
-
return false;
|
|
2385
|
-
}
|
|
2386
|
-
if (await pullImage(sandbox, image)) {
|
|
2387
|
-
if (await imageExists(sandbox, image)) {
|
|
2388
|
-
writeStderrLine(`Sandbox image ${image} is now available after pulling.`);
|
|
2389
|
-
return true;
|
|
2390
|
-
} else {
|
|
2391
|
-
writeStderrLine(
|
|
2392
|
-
`Sandbox image ${image} still not found after a pull attempt. This might indicate an issue with the image name or registry, or the pull command reported success but failed to make the image available.`
|
|
2393
|
-
);
|
|
2394
|
-
return false;
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
writeStderrLine(
|
|
2398
|
-
`Failed to obtain sandbox image ${image} after check and pull attempt.`
|
|
2399
|
-
);
|
|
2400
|
-
return false;
|
|
2401
|
-
}
|
|
2402
|
-
__name(ensureSandboxImageIsPresent, "ensureSandboxImageIsPresent");
|
|
2403
|
-
|
|
2404
1582
|
// packages/cli/src/utils/startupWarnings.ts
|
|
2405
1583
|
init_esbuild_shims();
|
|
2406
|
-
import
|
|
1584
|
+
import fs4 from "node:fs/promises";
|
|
2407
1585
|
async function getStartupWarnings() {
|
|
2408
1586
|
const warningsFilePath = process.env["QWEN_CODE_WARNINGS_FILE"];
|
|
2409
1587
|
if (!warningsFilePath) return [];
|
|
2410
1588
|
try {
|
|
2411
|
-
await
|
|
2412
|
-
const warningsContent = await
|
|
1589
|
+
await fs4.access(warningsFilePath);
|
|
1590
|
+
const warningsContent = await fs4.readFile(warningsFilePath, "utf-8");
|
|
2413
1591
|
const warnings = warningsContent.split("\n").filter((line) => line.trim() !== "");
|
|
2414
1592
|
try {
|
|
2415
|
-
await
|
|
1593
|
+
await fs4.unlink(warningsFilePath);
|
|
2416
1594
|
} catch {
|
|
2417
1595
|
warnings.push("Warning: Could not delete temporary warnings file.");
|
|
2418
1596
|
}
|
|
@@ -2428,15 +1606,15 @@ __name(getStartupWarnings, "getStartupWarnings");
|
|
|
2428
1606
|
|
|
2429
1607
|
// packages/cli/src/utils/userStartupWarnings.ts
|
|
2430
1608
|
init_esbuild_shims();
|
|
2431
|
-
import
|
|
2432
|
-
import
|
|
1609
|
+
import fs5 from "node:fs/promises";
|
|
1610
|
+
import path5 from "node:path";
|
|
2433
1611
|
var rootDirectoryCheck = {
|
|
2434
1612
|
id: "root-directory",
|
|
2435
1613
|
check: /* @__PURE__ */ __name(async (options) => {
|
|
2436
1614
|
try {
|
|
2437
|
-
const workspaceRealPath = await
|
|
1615
|
+
const workspaceRealPath = await fs5.realpath(options.workspaceRoot);
|
|
2438
1616
|
const errorMessage = "Warning: You are running Qwen Code in the root directory. Your entire folder structure will be used for context. It is strongly recommended to run in a project-specific directory.";
|
|
2439
|
-
if (
|
|
1617
|
+
if (path5.dirname(workspaceRealPath) === workspaceRealPath) {
|
|
2440
1618
|
return errorMessage;
|
|
2441
1619
|
}
|
|
2442
1620
|
return null;
|
|
@@ -2533,7 +1711,7 @@ function getNodeMemoryArgs(isDebugMode3) {
|
|
|
2533
1711
|
if ("bun" in process.versions) {
|
|
2534
1712
|
return [];
|
|
2535
1713
|
}
|
|
2536
|
-
const totalMemoryMB =
|
|
1714
|
+
const totalMemoryMB = os.totalmem() / (1024 * 1024);
|
|
2537
1715
|
const heapStats = v8.getHeapStatistics();
|
|
2538
1716
|
const currentMaxOldSpaceSizeMb = Math.floor(
|
|
2539
1717
|
heapStats.heap_size_limit / 1024 / 1024
|
|
@@ -2577,8 +1755,8 @@ ${error.stack ?? ""}
|
|
|
2577
1755
|
let logPath;
|
|
2578
1756
|
try {
|
|
2579
1757
|
logPath = Storage.getDebugLogPath(config.getSessionId());
|
|
2580
|
-
|
|
2581
|
-
|
|
1758
|
+
fs6.mkdirSync(path6.dirname(logPath), { recursive: true });
|
|
1759
|
+
fs6.appendFileSync(logPath, line, "utf8");
|
|
2582
1760
|
logged = true;
|
|
2583
1761
|
} catch {
|
|
2584
1762
|
}
|
|
@@ -2600,7 +1778,7 @@ ${sanitizeTerminalText(error.stack ?? error.message)}`
|
|
|
2600
1778
|
monitorRegistry.abortAll({ notify: false });
|
|
2601
1779
|
try {
|
|
2602
1780
|
if (logPath) {
|
|
2603
|
-
|
|
1781
|
+
fs6.appendFileSync(
|
|
2604
1782
|
logPath,
|
|
2605
1783
|
`${(/* @__PURE__ */ new Date()).toISOString()} [ERROR] [STARTUP] [MONITOR_REAP] reaped=${reapCount}
|
|
2606
1784
|
`,
|
|
@@ -2613,7 +1791,7 @@ ${sanitizeTerminalText(error.stack ?? error.message)}`
|
|
|
2613
1791
|
try {
|
|
2614
1792
|
if (logPath) {
|
|
2615
1793
|
const detail = reapError instanceof Error ? reapError.stack : String(reapError);
|
|
2616
|
-
|
|
1794
|
+
fs6.appendFileSync(
|
|
2617
1795
|
logPath,
|
|
2618
1796
|
`${(/* @__PURE__ */ new Date()).toISOString()} [ERROR] [STARTUP] [MONITOR_REAP_FAILED] ${detail ?? ""}
|
|
2619
1797
|
`,
|
|
@@ -2783,7 +1961,7 @@ async function main() {
|
|
|
2783
1961
|
await initializeI18n(
|
|
2784
1962
|
resolveLanguageSetting(settings.merged.general?.language)
|
|
2785
1963
|
);
|
|
2786
|
-
const { handleList: handleListExtensions } = await import("./list-
|
|
1964
|
+
const { handleList: handleListExtensions } = await import("./list-KQSQ4A5G.js");
|
|
2787
1965
|
await handleListExtensions();
|
|
2788
1966
|
process.exit(0);
|
|
2789
1967
|
}
|
|
@@ -2797,7 +1975,7 @@ async function main() {
|
|
|
2797
1975
|
dns.setDefaultResultOrder(
|
|
2798
1976
|
validateDnsResolutionOrder(settings.merged.advanced?.dnsResolutionOrder)
|
|
2799
1977
|
);
|
|
2800
|
-
const { themeManager, AUTO_THEME_NAME } = await import("./theme-manager-
|
|
1978
|
+
const { themeManager, AUTO_THEME_NAME } = await import("./theme-manager-SK57EKMO.js");
|
|
2801
1979
|
themeManager.loadCustomThemes(settings.merged.ui?.customThemes);
|
|
2802
1980
|
const configuredTheme = settings.merged.ui?.theme;
|
|
2803
1981
|
if (configuredTheme && configuredTheme !== AUTO_THEME_NAME) {
|
|
@@ -2814,7 +1992,7 @@ async function main() {
|
|
|
2814
1992
|
await initializeI18n(
|
|
2815
1993
|
resolveLanguageSetting(settings.merged.general?.language)
|
|
2816
1994
|
);
|
|
2817
|
-
const { updateBeforeRelaunch } = await import("./update-relaunch-
|
|
1995
|
+
const { updateBeforeRelaunch } = await import("./update-relaunch-LI7GRP36.js");
|
|
2818
1996
|
const shouldRelaunch = await updateBeforeRelaunch(
|
|
2819
1997
|
settings,
|
|
2820
1998
|
updateProjectRoot,
|
|
@@ -2824,9 +2002,10 @@ async function main() {
|
|
|
2824
2002
|
}, "onUpdateRelaunch");
|
|
2825
2003
|
const sandboxConfig = await loadSandboxConfig(settings.merged, argv);
|
|
2826
2004
|
const customSandboxImage = argv.sandboxImage ?? process.env["QWEN_SANDBOX_IMAGE"] ?? settings.merged.tools?.sandboxImage;
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2005
|
+
const containerSandbox = sandboxConfig?.command === "docker" || sandboxConfig?.command === "podman" ? sandboxConfig : void 0;
|
|
2006
|
+
if (containerSandbox?.image && customSandboxImage) {
|
|
2007
|
+
process.env[CUSTOM_SANDBOX_IMAGE_ENV_VAR] = containerSandbox.image;
|
|
2008
|
+
} else if (containerSandbox) {
|
|
2830
2009
|
const hostInstallationInfo = getInstallationInfo(updateProjectRoot, true);
|
|
2831
2010
|
process.env[HOST_UPDATE_RELAUNCH_ENV_VAR] = String(
|
|
2832
2011
|
Boolean(
|
|
@@ -2943,7 +2122,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2943
2122
|
const resolveIfPath = /* @__PURE__ */ __name((v) => {
|
|
2944
2123
|
if (typeof v !== "string" || v.length === 0) return v;
|
|
2945
2124
|
if (looksLikeInlineJson(v)) return v;
|
|
2946
|
-
return
|
|
2125
|
+
return path6.resolve(launchCwdForPaths, v);
|
|
2947
2126
|
}, "resolveIfPath");
|
|
2948
2127
|
argv.mcpConfig = resolveIfPath(argv.mcpConfig);
|
|
2949
2128
|
argv.openaiLoggingDir = resolveIfPath(argv.openaiLoggingDir);
|
|
@@ -2952,15 +2131,15 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2952
2131
|
argv.telemetryOutfile = resolveIfPath(argv.telemetryOutfile);
|
|
2953
2132
|
if (Array.isArray(argv.includeDirectories)) {
|
|
2954
2133
|
argv.includeDirectories = argv.includeDirectories.map(
|
|
2955
|
-
(d) => typeof d === "string" && d.length > 0 ?
|
|
2134
|
+
(d) => typeof d === "string" && d.length > 0 ? path6.resolve(launchCwdForPaths, d) : d
|
|
2956
2135
|
);
|
|
2957
2136
|
}
|
|
2958
2137
|
if (typeof argv.jsonSchema === "string") {
|
|
2959
2138
|
const trimmedSchema = argv.jsonSchema.trim();
|
|
2960
2139
|
if (trimmedSchema.startsWith("@")) {
|
|
2961
2140
|
const rel = trimmedSchema.slice(1);
|
|
2962
|
-
if (rel.length > 0 && !
|
|
2963
|
-
argv.jsonSchema = "@" +
|
|
2141
|
+
if (rel.length > 0 && !path6.isAbsolute(rel)) {
|
|
2142
|
+
argv.jsonSchema = "@" + path6.resolve(launchCwdForPaths, rel);
|
|
2964
2143
|
}
|
|
2965
2144
|
}
|
|
2966
2145
|
}
|
|
@@ -2991,7 +2170,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2991
2170
|
);
|
|
2992
2171
|
let resolvedSessionId;
|
|
2993
2172
|
if (argv.resume === "") {
|
|
2994
|
-
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-
|
|
2173
|
+
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-V635V72I.js");
|
|
2995
2174
|
resolvedSessionId = await showResumeSessionPicker();
|
|
2996
2175
|
} else if (!isValidSessionId(argv.resume)) {
|
|
2997
2176
|
const sessionService = new SessionService(process.cwd());
|
|
@@ -3002,7 +2181,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3002
2181
|
writeStderrLine(
|
|
3003
2182
|
`Multiple sessions found with title "${argv.resume}". Please select one:`
|
|
3004
2183
|
);
|
|
3005
|
-
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-
|
|
2184
|
+
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-V635V72I.js");
|
|
3006
2185
|
resolvedSessionId = await showResumeSessionPicker(
|
|
3007
2186
|
process.cwd(),
|
|
3008
2187
|
matches
|
|
@@ -3047,7 +2226,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3047
2226
|
);
|
|
3048
2227
|
markAcpStartup("configConstructionEnd");
|
|
3049
2228
|
profileCheckpoint("after_load_cli_config");
|
|
3050
|
-
const nonInteractiveHousekeeping = !config.isInteractive() || config.getExperimentalZedIntegration() ? await import("./scheduler-
|
|
2229
|
+
const nonInteractiveHousekeeping = !config.isInteractive() || config.getExperimentalZedIntegration() ? await import("./scheduler-GCZYLZ2P.js") : void 0;
|
|
3051
2230
|
if (nonInteractiveHousekeeping) {
|
|
3052
2231
|
registerCleanup(
|
|
3053
2232
|
() => nonInteractiveHousekeeping.stopNonInteractiveOpenAILogHousekeeping()
|
|
@@ -3152,11 +2331,11 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3152
2331
|
}
|
|
3153
2332
|
}
|
|
3154
2333
|
if (config.isInteractive()) {
|
|
3155
|
-
const { setMaxSizedBoxDebugging } = await import("./MaxSizedBox-
|
|
2334
|
+
const { setMaxSizedBoxDebugging } = await import("./MaxSizedBox-FCF6M53W.js");
|
|
3156
2335
|
setMaxSizedBoxDebugging(isDebugMode3);
|
|
3157
2336
|
}
|
|
3158
2337
|
const inputFormat = process.stdin.isTTY ? "text" /* TEXT */ : typeof config.getInputFormat === "function" ? config.getInputFormat() : "text" /* TEXT */;
|
|
3159
|
-
const { initializeApp } = await import("./initializer-
|
|
2338
|
+
const { initializeApp } = await import("./initializer-4JXZEC4B.js");
|
|
3160
2339
|
let input = config.getQuestion();
|
|
3161
2340
|
const hasRemoteInput = Boolean(config.getInputFile?.());
|
|
3162
2341
|
const deferIdeConnection = config.isInteractive() && !config.getExperimentalZedIntegration() && !input && !hasRemoteInput;
|
|
@@ -3168,7 +2347,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3168
2347
|
profileCheckpoint("after_initialize_app");
|
|
3169
2348
|
if (config.getExperimentalZedIntegration()) {
|
|
3170
2349
|
markAcpStartup("acpImportStart");
|
|
3171
|
-
const { runAcpAgent } = await import("./acpAgent-
|
|
2350
|
+
const { runAcpAgent } = await import("./acpAgent-3DPWZTNC.js");
|
|
3172
2351
|
markAcpStartup("acpImportEnd");
|
|
3173
2352
|
try {
|
|
3174
2353
|
await runAcpAgent(config, settings, argv, {
|
|
@@ -3178,6 +2357,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3178
2357
|
externalToolGuardProviderAttached: isAcpMode && privateAcpParentCapability !== void 0 && privateExternalToolGuardProvider === EXTERNAL_TOOL_GUARD_PROVIDER_ATTACHED_VALUE
|
|
3179
2358
|
});
|
|
3180
2359
|
} finally {
|
|
2360
|
+
prepareFileWatchersForProcessExit();
|
|
3181
2361
|
await runExitCleanup();
|
|
3182
2362
|
}
|
|
3183
2363
|
process.exit(0);
|
|
@@ -3220,7 +2400,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3220
2400
|
const selection = selectTuiRenderer();
|
|
3221
2401
|
if (selection.renderer === "opentui") {
|
|
3222
2402
|
try {
|
|
3223
|
-
const { startOpenTuiUI } = await import("./start-opentui-ui-
|
|
2403
|
+
const { startOpenTuiUI } = await import("./start-opentui-ui-JKAIWGF7.js");
|
|
3224
2404
|
const started = await startOpenTuiUI(
|
|
3225
2405
|
config,
|
|
3226
2406
|
settings,
|
|
@@ -3253,7 +2433,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3253
2433
|
} else {
|
|
3254
2434
|
debugLogger5.debug(`TUI renderer: ${selection.reason}`);
|
|
3255
2435
|
}
|
|
3256
|
-
const { startInteractiveUI } = await import("./startInteractiveUI-
|
|
2436
|
+
const { startInteractiveUI } = await import("./startInteractiveUI-YRPOT6GH.js");
|
|
3257
2437
|
await startInteractiveUI(
|
|
3258
2438
|
config,
|
|
3259
2439
|
settings,
|
|
@@ -3314,7 +2494,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
3314
2494
|
${input}`;
|
|
3315
2495
|
}
|
|
3316
2496
|
}
|
|
3317
|
-
const { validateNonInteractiveAuth } = await import("./validateNonInterActiveAuth-
|
|
2497
|
+
const { validateNonInteractiveAuth } = await import("./validateNonInterActiveAuth-YFPCYYNL.js");
|
|
3318
2498
|
const nonInteractiveConfig = await validateNonInteractiveAuth(
|
|
3319
2499
|
settings.merged.security?.auth?.useExternal,
|
|
3320
2500
|
config,
|
|
@@ -3326,7 +2506,7 @@ ${input}`;
|
|
|
3326
2506
|
);
|
|
3327
2507
|
if (inputFormat === "stream-json" /* STREAM_JSON */) {
|
|
3328
2508
|
const trimmedInput = (input ?? "").trim();
|
|
3329
|
-
const { runNonInteractiveStreamJson } = await import("./session-
|
|
2509
|
+
const { runNonInteractiveStreamJson } = await import("./session-ZLUK7E4P.js");
|
|
3330
2510
|
nonInteractiveHousekeeping?.startNonInteractiveOpenAILogHousekeeping(
|
|
3331
2511
|
nonInteractiveConfig,
|
|
3332
2512
|
settings
|
|
@@ -3357,7 +2537,7 @@ ${input}`;
|
|
|
3357
2537
|
prompt_length: input.length
|
|
3358
2538
|
});
|
|
3359
2539
|
debugLogger5.debug(`Session ID: ${config.getSessionId()}`);
|
|
3360
|
-
const { runNonInteractive } = await import("./nonInteractiveCli-
|
|
2540
|
+
const { runNonInteractive } = await import("./nonInteractiveCli-GPT3TVOK.js");
|
|
3361
2541
|
nonInteractiveHousekeeping?.startNonInteractiveOpenAILogHousekeeping(
|
|
3362
2542
|
nonInteractiveConfig,
|
|
3363
2543
|
settings
|