@qwen-code/qwen-code 0.21.7 → 0.21.8
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/README.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +43 -30
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +40 -2
- package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
- package/bundled/qc-helper/docs/features/channels/github.md +13 -11
- package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
- package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
- package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
- package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
- package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
- package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +4 -0
- package/bundled/qc-helper/docs/features/commands.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +52 -0
- package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
- package/bundled/qc-helper/docs/qwen-serve.md +4 -1
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
- package/bundled/review/SKILL.md +28 -5
- package/chunks/{MaxSizedBox-ANWZBPTS.js → MaxSizedBox-7PM6BGJ5.js} +26 -22
- package/chunks/{StandaloneSessionPicker-XKS3VU3A.js → StandaloneSessionPicker-3UQHM7GV.js} +44 -40
- package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
- package/chunks/{acpAgent-KUAZ3GCZ.js → acpAgent-5UWLFV6V.js} +534 -262
- package/chunks/{agent-T6PTGX5R.js → agent-624T2BLO.js} +26 -22
- package/chunks/{agent-headless-PR7YCB7S.js → agent-headless-2EE5J2KX.js} +26 -22
- package/chunks/{artifact-tool-U4VOZIK5.js → artifact-tool-N652YE4L.js} +1 -1
- package/chunks/{askUserQuestion-XOBQLPFA.js → askUserQuestion-ONW74PKJ.js} +1 -1
- package/chunks/{bridge-NU6YEEHK.js → bridge-JENKGFFP.js} +29 -25
- package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
- package/chunks/{channel-management-service-FSQ7SHYI.js → channel-management-service-DDWUPHMU.js} +19 -10
- package/chunks/{channel-settings-store-35VQVUVV.js → channel-settings-store-SA6JZSPH.js} +34 -30
- package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-E67EN3RV.js} +5 -5
- package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-SW4C45CF.js} +5 -5
- package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-5SRD24FG.js} +3 -3
- package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
- package/chunks/{chunk-ZJ3VGYHK.js → chunk-2ILAOM2I.js} +34 -17
- package/chunks/{chunk-6XJMFJ4D.js → chunk-2M4K4KYS.js} +177 -120
- package/chunks/{chunk-CNIID3TV.js → chunk-2UUMVNYT.js} +1 -1
- package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
- package/chunks/{chunk-2U3WZGZG.js → chunk-3PY4LPJF.js} +19 -131
- package/chunks/{chunk-SPMY6CX6.js → chunk-3SE7J4DR.js} +3 -3
- package/chunks/{chunk-6UWFTUQL.js → chunk-3WNQOYHQ.js} +66 -22
- package/chunks/{chunk-KXSDEOFU.js → chunk-4ALIARFY.js} +1 -1
- package/chunks/{chunk-D3UEZIQH.js → chunk-4DU3NCHG.js} +48 -55
- package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
- package/chunks/{chunk-H2UQ2M5Z.js → chunk-4WU6NY7F.js} +96 -22
- package/chunks/{chunk-TLV2IMHR.js → chunk-5ZGR6RKJ.js} +3 -3
- package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
- package/chunks/{chunk-EORNAQDT.js → chunk-6TR7CFXH.js} +1 -1
- package/chunks/{chunk-NG2R4N5O.js → chunk-6ZRFAKXK.js} +1 -1
- package/chunks/{chunk-P2AJ7FTI.js → chunk-757GB46F.js} +1 -1
- package/chunks/{chunk-72LNFGUY.js → chunk-77QVBFCU.js} +3 -3
- package/chunks/{chunk-OH2VKQXH.js → chunk-7DVT4LVV.js} +37 -30
- package/chunks/{chunk-KKJJB5X6.js → chunk-7VUERJHS.js} +1503 -815
- package/chunks/{chunk-VOARQPTA.js → chunk-B52AWKBB.js} +65 -21
- package/chunks/{chunk-Y4EWSQF7.js → chunk-BF224XHL.js} +2 -2
- package/chunks/{chunk-PJOBIWUG.js → chunk-BF52U4XJ.js} +1 -1
- package/chunks/{chunk-55LYDVPU.js → chunk-C5VWPTGT.js} +1 -1
- package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
- package/chunks/chunk-COBO5EBO.js +135 -0
- package/chunks/chunk-CPG6P4GG.js +82 -0
- package/chunks/{chunk-DIEFUBV6.js → chunk-DIWZNWZT.js} +205 -35
- package/chunks/{chunk-AE77C5ZU.js → chunk-DQSDACD2.js} +1 -1
- package/chunks/{chunk-P3LEG54R.js → chunk-DX5W5AON.js} +2 -2
- package/chunks/{chunk-EUQTXRKZ.js → chunk-E4ZBKMSF.js} +5 -5
- package/chunks/{chunk-FPM27XN4.js → chunk-EIVICVHM.js} +4 -4
- package/chunks/{chunk-YHEEE624.js → chunk-EN2TKTFH.js} +1 -1
- package/chunks/chunk-F6WFNA7U.js +22 -0
- package/chunks/{chunk-FZBZSYKU.js → chunk-FN6YXJOP.js} +1 -1
- package/chunks/{chunk-KR4ZSC7K.js → chunk-FWBXMANW.js} +3 -3
- package/chunks/{chunk-LA7YLSR6.js → chunk-FYAXKJK7.js} +327 -67
- package/chunks/{chunk-CSZEXZBE.js → chunk-GBDINRIL.js} +3 -3
- package/chunks/{chunk-SCI7K3GM.js → chunk-GOEVOFQI.js} +19 -10
- package/chunks/{chunk-LEMXGVEP.js → chunk-GQCEQPYQ.js} +3 -3
- package/chunks/{chunk-Y7E5LNLO.js → chunk-GXSNGY5M.js} +1027 -876
- package/chunks/{chunk-6XU3PH66.js → chunk-HA3SAB64.js} +22 -69
- package/chunks/{chunk-Y4NGLFGJ.js → chunk-HUWENAHO.js} +1 -1
- package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
- package/chunks/{chunk-CB2464BK.js → chunk-HWX5HPUG.js} +14 -4
- package/chunks/{chunk-LZC3B5N2.js → chunk-IA7TGCN2.js} +2 -2
- package/chunks/{chunk-RERATVSK.js → chunk-IBYULW65.js} +6 -6
- package/chunks/{chunk-HYRDKNUY.js → chunk-IUQ52YJK.js} +1 -1
- package/chunks/{chunk-TDXGKHDN.js → chunk-IYES5WOT.js} +2 -2
- package/chunks/{chunk-RGSBTHSU.js → chunk-KAQCJO6Y.js} +131 -4
- package/chunks/{chunk-VWOVHOTT.js → chunk-KJZ26VBX.js} +1 -1
- package/chunks/{chunk-6GONZVLS.js → chunk-KKDVZLGL.js} +1 -1
- package/chunks/{chunk-MKVZE4ZJ.js → chunk-KTJFU7RT.js} +3 -2
- package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
- package/chunks/{chunk-6EOI4HOK.js → chunk-M3STHEMM.js} +12 -17
- package/chunks/chunk-NGYI5EF5.js +244 -0
- package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
- package/chunks/{chunk-HQB2KUAN.js → chunk-NPUXXRJI.js} +1 -1
- package/chunks/{chunk-QETYKPMG.js → chunk-NVRDQFCX.js} +1 -1
- package/chunks/{chunk-PQBHU2IA.js → chunk-OHKJVAKG.js} +10 -10
- package/chunks/{chunk-CYR3HI5X.js → chunk-OQTXYMKW.js} +2 -2
- package/chunks/{chunk-DBOFL3LQ.js → chunk-PG62DFWD.js} +10 -10
- package/chunks/{chunk-2VSTGY6M.js → chunk-PJRW65JO.js} +1 -1
- package/chunks/{chunk-33ACCIIY.js → chunk-PLFATELK.js} +1 -1
- package/chunks/{chunk-IC4Z6LX6.js → chunk-PYQADEFD.js} +5 -0
- package/chunks/{chunk-MAJS7AT4.js → chunk-QGHSP65Z.js} +2 -2
- package/chunks/{chunk-OHJLEW5J.js → chunk-QQWD7LZV.js} +4 -4
- package/chunks/{chunk-ZXU5UHMI.js → chunk-QXVSWG66.js} +2 -2
- package/chunks/{chunk-E33LOKRA.js → chunk-RPWVIXDB.js} +18 -1
- package/chunks/{chunk-TYKC75AX.js → chunk-S3Y3GBFD.js} +1 -1
- package/chunks/{chunk-7UFKAV7Y.js → chunk-S6HYI3MF.js} +2 -2
- package/chunks/chunk-SAH4BD2J.js +92 -0
- package/chunks/{chunk-OMKQH5C5.js → chunk-SNRT2TJJ.js} +6 -23
- package/chunks/chunk-SR7RZ4MS.js +202 -0
- package/chunks/{chunk-CXE7E23H.js → chunk-TE3ZAJE7.js} +45 -17
- package/chunks/{chunk-S7CV4KO6.js → chunk-TKSZJ5BV.js} +3 -3
- package/chunks/{chunk-3NB7TSE2.js → chunk-U5SLIG7E.js} +1 -1
- package/chunks/chunk-UA5H3DS2.js +203 -0
- package/chunks/{chunk-24ER7UV4.js → chunk-UFALT4LK.js} +1 -1
- package/chunks/{chunk-YJQCUTT2.js → chunk-VWMUDKLC.js} +3 -3
- package/chunks/{chunk-RMH5OWLD.js → chunk-VXZ5HAOV.js} +1 -1
- package/chunks/{chunk-BVWVWGLE.js → chunk-WAUGQKUU.js} +4 -64
- package/chunks/{chunk-SHZYHGQH.js → chunk-WG6542MA.js} +1 -1
- package/chunks/{chunk-5KH532V7.js → chunk-WV5J6Q6N.js} +1 -1
- package/chunks/{chunk-RNVQB725.js → chunk-XHD7CRP2.js} +2 -2
- package/chunks/{chunk-W4B7UBUS.js → chunk-XZKQT2B2.js} +5 -5
- package/chunks/{chunk-6HVUFDS2.js → chunk-Y4TETC74.js} +22 -13
- package/chunks/{chunk-RZHU3ILK.js → chunk-YEF7XEO2.js} +4 -4
- package/chunks/{chunk-RUL4S3K3.js → chunk-YHJFF7KH.js} +146 -45
- package/chunks/{chunk-23RZCH76.js → chunk-YOM7DEGB.js} +3 -3
- package/chunks/{chunk-OFI7IGST.js → chunk-ZCLLJARV.js} +9 -9
- package/chunks/{chunk-GSS34377.js → chunk-ZHA242R4.js} +2 -2
- package/chunks/{chunk-TRLYP7OF.js → chunk-ZPLALRXZ.js} +17 -9
- package/chunks/{chunk-WUC6ZFXO.js → chunk-ZWBUH5UP.js} +1 -1
- package/chunks/{computer-use-KEAPATUY.js → computer-use-ESQYJ3JY.js} +26 -22
- package/chunks/{config-utils-K7SCOWHD.js → config-utils-XQHBJP7G.js} +4 -4
- package/chunks/{contextCommand-ZJA6A5K5.js → contextCommand-CX3YF4ZE.js} +28 -24
- package/chunks/{core-runtime-QMJPWHCI.js → core-runtime-DIAU7JMG.js} +30 -26
- package/chunks/{create-sub-session-DJE6XICH.js → create-sub-session-HDPD6HOA.js} +26 -22
- package/chunks/{create-sub-session-E4PBYXV5.js → create-sub-session-QIDZUOPU.js} +1 -1
- package/chunks/{cron-create-GRBWYMIJ.js → cron-create-VONA5JYY.js} +1 -1
- package/chunks/{cron-delete-4CMKBR2M.js → cron-delete-5JXSP2MI.js} +1 -1
- package/chunks/{cron-list-W7K4ASOA.js → cron-list-KE4F2CIR.js} +1 -1
- package/chunks/{daemon-SCTQMM7Z.js → daemon-VZBGJUNL.js} +30 -0
- package/chunks/{daemon-status-provider-FSWDPE2G.js → daemon-status-provider-H6O4UQ4F.js} +33 -29
- package/chunks/{daemon-trust-policy-P5L5VFAY.js → daemon-trust-policy-BNUXG6MT.js} +33 -29
- package/chunks/{daemon-trust-policy-monitor-73JYN6ET.js → daemon-trust-policy-monitor-E4EQ7GF4.js} +33 -29
- package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
- package/chunks/{deferred-core-runtime-BWRCCFTE.js → deferred-core-runtime-CBMSHPAU.js} +26 -22
- package/chunks/{display-image-O2XFPQTC.js → display-image-NQRSIBXM.js} +2 -2
- package/chunks/{dist-DPPHJAVL.js → dist-EEEQGCZA.js} +918 -142
- package/chunks/{dist-K4WWQBHS.js → dist-HIACTZEK.js} +55 -15
- package/chunks/{dist-3BMEUGTG.js → dist-IRL7WA5Z.js} +1 -1
- package/chunks/{dist-HVBMEYWK.js → dist-KVISB2O2.js} +1 -1
- package/chunks/{dist-KS4O2NKE.js → dist-MBF3I5MX.js} +14 -8
- package/chunks/{dist-SFQ34F4M.js → dist-MKX5OSFF.js} +5 -4
- package/chunks/{dist-7JGAAQSC.js → dist-RCH3I7SS.js} +2 -2
- package/chunks/{dist-C5U4LJKW.js → dist-TUSWNE2I.js} +5 -4
- package/chunks/{earlyInputCapture-L5ST23A6.js → earlyInputCapture-UIOP7OIN.js} +26 -22
- package/chunks/{edit-LHHRFNFK.js → edit-ITMZYFKA.js} +26 -22
- package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
- package/chunks/{enter-worktree-6NXCRZPF.js → enter-worktree-S4PL5UV6.js} +26 -22
- package/chunks/{enterPlanMode-ZVQT4U7D.js → enterPlanMode-YV52NNJT.js} +26 -22
- package/chunks/{environment-GJ2HWJOS.js → environment-NGOWPRZV.js} +30 -26
- package/chunks/{errors-6RLH3XXC.js → errors-BU26DTDX.js} +28 -24
- package/chunks/{exit-worktree-I2YLUHHY.js → exit-worktree-XRM6LH5F.js} +26 -22
- package/chunks/{exitPlanMode-7CCWKO7I.js → exitPlanMode-ZLI5F7KR.js} +26 -22
- package/chunks/{fast-path-DVFD4HQD.js → fast-path-UJWORIED.js} +23 -3
- package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-37WQD5B2.js} +6 -3
- package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
- package/chunks/{gemini-7FWGOYD4.js → gemini-ZSKNDUMU.js} +77 -65
- package/chunks/{geminiContentGenerator-V2WVLIXU.js → geminiContentGenerator-YGEXOEKD.js} +1 -1
- package/chunks/{glob-3N6GGI75.js → glob-7KZG44BR.js} +26 -22
- package/chunks/{goal-tools-APOW6UXL.js → goal-tools-PXWN5VK3.js} +4 -2
- package/chunks/{grep-V43ILZVX.js → grep-6ZFC7RJ5.js} +26 -22
- package/chunks/{handleAutoUpdate-A5WFVWIA.js → handleAutoUpdate-KSEL3TQS.js} +30 -26
- package/chunks/{i18n-PLVQ4FBZ.js → i18n-ZIUXBW5V.js} +27 -23
- package/chunks/{image-gen-7C6IK6DC.js → image-gen-AUIZJJNK.js} +7 -5
- package/chunks/{initializer-CVAIKZYL.js → initializer-7AHY3N6Q.js} +33 -29
- package/chunks/{installationInfo-J6QDHNTK.js → installationInfo-VGBXMYLY.js} +27 -23
- package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
- package/chunks/{list-ZZ4OUUWV.js → list-PSFKQHLB.js} +36 -32
- package/chunks/{list-agents-KFFIIS2G.js → list-agents-Z4WABFDZ.js} +1 -1
- package/chunks/{loadedSettingsAdapter-QRYRJSWL.js → loadedSettingsAdapter-FTMRCTOF.js} +33 -29
- package/chunks/{loggingContentGenerator-OJCO75HM.js → loggingContentGenerator-MZAN52UV.js} +7 -5
- package/chunks/{loop-wakeup-TLMJPMMP.js → loop-wakeup-UZ5RL5Y2.js} +2 -2
- package/chunks/{ls-UVVE2XGE.js → ls-TVHDGIES.js} +1 -1
- package/chunks/{lsp-QMEA2VLB.js → lsp-CVN6OQPI.js} +1 -1
- package/chunks/{managed-npm-update-PCOSCP2N.js → managed-npm-update-O4NHK45X.js} +27 -23
- package/chunks/{mcp-M3WKKWKY.js → mcp-6CFP2AYQ.js} +33 -29
- package/chunks/{monitor-GN24FH6C.js → monitor-DAKD6OU4.js} +26 -22
- package/chunks/{nonInteractiveCli-KPTU3VSQ.js → nonInteractiveCli-RC7VIUZL.js} +66 -60
- package/chunks/{notebook-edit-4YM65BBO.js → notebook-edit-474DPMRL.js} +34 -22
- package/chunks/{openaiContentGenerator-EDQT6GTV.js → openaiContentGenerator-2NFY2MWO.js} +19 -9
- package/chunks/{pidfile-JOIIRN2C.js → pidfile-KBFVDNQP.js} +26 -22
- package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
- package/chunks/{processUtils-5SV4MX3Q.js → processUtils-6GRYH4Y3.js} +2 -2
- package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
- package/chunks/{qwenContentGenerator-ODRJSUGR.js → qwenContentGenerator-KAHU6IZY.js} +33 -28
- package/chunks/{qwenOAuth2-NESCMZ47.js → qwenOAuth2-RRQTCP4W.js} +7 -5
- package/chunks/{read-file-HPSODLPK.js → read-file-3M6WXDXP.js} +6 -4
- package/chunks/{read-mcp-resource-2TNSJTC3.js → read-mcp-resource-PZ4ZF6YL.js} +1 -1
- package/chunks/{record-artifact-RAON52FC.js → record-artifact-P4HFMS7X.js} +2 -2
- package/chunks/{resumeHistoryUtils-TXCOFFMQ.js → resumeHistoryUtils-D6TAY3HX.js} +30 -26
- package/chunks/{ripGrep-ZKQGTQAO.js → ripGrep-PLPENT3E.js} +26 -22
- package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
- package/chunks/{run-qwen-serve-ZPKPKECF.js → run-qwen-serve-ZAFIJKJC.js} +168 -54
- package/chunks/{runtime-2FLNNM36.js → runtime-ZED7CYOZ.js} +38 -34
- package/chunks/{scheduler-365PJHNR.js → scheduler-MD3AL2W5.js} +26 -22
- package/chunks/{send-message-ZM7MRUGP.js → send-message-CAMSLG2L.js} +4 -3
- package/chunks/{serve-QD2RNLKJ.js → serve-E3VUDRZN.js} +33 -29
- package/chunks/{server-XLJVLTYM.js → server-OWMEMAKR.js} +450 -231
- package/chunks/{session-3VTUHH4Q.js → session-HZ57QK7K.js} +158 -97
- package/chunks/{settings-KULVPCQC.js → settings-V7BR3RKP.js} +32 -28
- package/chunks/{shell-3SWW22MH.js → shell-23OMNMW6.js} +26 -22
- package/chunks/{skill-KDHWYS7W.js → skill-6HBDYZRS.js} +7 -5
- package/chunks/{skill-settings-NMY4JEJC.js → skill-settings-HWJLTU7M.js} +32 -28
- package/chunks/{spawnChannel-ZKS4Q5OU.js → spawnChannel-N6KKUW5B.js} +27 -23
- package/chunks/{standalone-update-7CXPGAQ4.js → standalone-update-QGIKHATD.js} +28 -24
- package/chunks/{startInteractiveUI-2QQLEKM6.js → startInteractiveUI-GX2CRL42.js} +365 -155
- package/chunks/{syntheticOutput-ZLCUTKO2.js → syntheticOutput-PEBJQYJV.js} +2 -2
- package/chunks/{task-create-CQP5UEA3.js → task-create-5NWCQSJF.js} +5 -4
- package/chunks/{task-list-XLEZOJXP.js → task-list-53265TRZ.js} +1 -1
- package/chunks/{task-stop-7ZQM5CFF.js → task-stop-FPCOIRYX.js} +1 -1
- package/chunks/{task-update-JA75U2SN.js → task-update-5HN577LS.js} +5 -4
- package/chunks/{team-create-2WTNGAOX.js → team-create-CFFKU7KL.js} +26 -22
- package/chunks/{team-delete-MHY3UZGY.js → team-delete-MMQB4OSC.js} +1 -1
- package/chunks/{team-plan-approval-LZTYLEG4.js → team-plan-approval-6EFOKR6A.js} +26 -22
- package/chunks/{terminal-image-renderer-R5HHAFJN.js → terminal-image-renderer-TLDNACQY.js} +28 -24
- package/chunks/{theme-manager-PAUCSJFF.js → theme-manager-5LJ3H7VO.js} +26 -22
- package/chunks/{todoWrite-UPVOHYGD.js → todoWrite-JGV6VLOX.js} +1 -1
- package/chunks/{tool-search-2BFCGLI6.js → tool-search-UJV3A24H.js} +9 -6
- package/chunks/{total-session-admission-MK4SINFK.js → total-session-admission-D63QYXGO.js} +29 -25
- package/chunks/{trustedFolders-TJ5S26N7.js → trustedFolders-KZCOB53W.js} +30 -24
- package/chunks/{update-relaunch-N7AYLARF.js → update-relaunch-IFILM3SA.js} +5 -5
- package/chunks/{updateCheck-QRZ3DVT5.js → updateCheck-YZ2CRCFC.js} +29 -25
- package/chunks/{useAutoAcceptIndicator-DBJ7Y5AF.js → useAutoAcceptIndicator-AXEVNA3Q.js} +35 -31
- package/chunks/{validateNonInterActiveAuth-6ZQWUDS3.js → validateNonInterActiveAuth-3WTOJFWA.js} +61 -57
- package/chunks/{version-AJQGQWXC.js → version-GXK7OHZY.js} +1 -1
- package/chunks/{web-fetch-QWJYRXFL.js → web-fetch-ILB4GAVR.js} +12 -8
- package/chunks/{web-search-2AOXJGHU.js → web-search-HKRPGPZZ.js} +8 -6
- package/chunks/{workflow-ERH3SJG2.js → workflow-FXIPRQQA.js} +750 -147
- package/chunks/{workspace-providers-status-HZ474RA4.js → workspace-providers-status-NYHC7HSR.js} +35 -31
- package/chunks/{workspace-registration-store-6EUP4JXG.js → workspace-registration-store-AKEB7OMW.js} +1 -1
- package/chunks/{workspace-registry-R4APRRNC.js → workspace-registry-CDAS5TVZ.js} +29 -25
- package/chunks/{workspace-service-HFIFDMU7.js → workspace-service-PAMUKMAV.js} +36 -32
- package/chunks/{workspace-skills-status-HAHEIHGK.js → workspace-skills-status-YQSHCCMS.js} +33 -29
- package/chunks/{workspace-trust-reconciler-65GTAGDK.js → workspace-trust-reconciler-RPTXOIY2.js} +36 -32
- package/chunks/{write-file-B34CDELV.js → write-file-CGS57TS4.js} +26 -22
- package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
- package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
- package/chunks/{zoom-image-HPRBZHSS.js → zoom-image-E7D72GYV.js} +6 -4
- package/cli.js +13 -13
- package/locales/ca.js +10 -0
- package/locales/de.js +9 -0
- package/locales/en.js +10 -0
- package/locales/fr.js +9 -0
- package/locales/ja.js +9 -0
- package/locales/pt.js +9 -0
- package/locales/ru.js +9 -0
- package/locales/zh-TW.js +10 -0
- package/locales/zh.js +10 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-Ip-FFDJ0.js → arc-DybZaz32.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CChqgwIb.js → architectureDiagram-3BPJPVTR-jN3qBd19.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BHN-Tfss.js → blockDiagram-GPEHLZMM-Ct5DZPrj.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BhyjzDjN.js → c4Diagram-AAUBKEIU-CUAFMlUG.js} +1 -1
- package/web-shell/assets/channel-BMwLrwLW.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BB9eyHrx.js → chunk-2J33WTMH-CuV8n90B.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BeV7ce_J.js → chunk-4BX2VUAB-BUzl_kls.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DO7kXDiV.js → chunk-55IACEB6-BnDBLX6A.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-B27MPznD.js → chunk-727SXJPM-B83uTOjm.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DHIjqjD_.js → chunk-AQP2D5EJ-DM3HLgpT.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DabMqyN2.js → chunk-FMBD7UC4-CSQ5hgyb.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-Dw7Nnnxc.js → chunk-ND2GUHAM-BWOF4SxX.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-DdaZew1Q.js → chunk-QZHKN3VN-BsOH9LMi.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BGDv98jY.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BGDv98jY.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CgBpCYH5.js → cose-bilkent-S5V4N54A-IENqH2iJ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BB4IU8G0.js → dagre-BM42HDAG--dyzDTGo.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BcUTHU37.js → diagram-2AECGRRQ-BE7Dcqof.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-B6Lyihyv.js → diagram-5GNKFQAL-Cr8-5OTj.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CRIJOjpG.js → diagram-KO2AKTUF-Bzey3uAY.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DdNiwWWT.js → diagram-LMA3HP47-sErl28Xb.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Dz4b32Do.js → diagram-OG6HWLK6-Dq30ATIo.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-D-8NGw77.js → erDiagram-TEJ5UH35-BkCoEfVW.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-Dun26LyM.js → flowDiagram-I6XJVG4X-DHwO0rrI.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-F10Hu1Gc.js → ganttDiagram-6RSMTGT7-s7vAPxWq.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js → gitGraphDiagram-PVQCEYII-CQxhwPOU.js} +1 -1
- package/web-shell/assets/index-Bckpjr-I.css +5 -0
- package/web-shell/assets/{index-BXqw-nGq.js → index-CF4wApWp.js} +1 -1
- package/web-shell/assets/index-DwEr9HEW.js +1768 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DVgTMLvj.js → infoDiagram-5YYISTIA-BnFrD0bq.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-uT-KepvK.js → ishikawaDiagram-YF4QCWOH-Bf9zK5NK.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Vg_XadQf.js → journeyDiagram-JHISSGLW-CyGAhsxi.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dyv1ESBE.js → kanban-definition-UN3LZRKU-CbsK5akB.js} +1 -1
- package/web-shell/assets/{linear-BMIepYX3.js → linear-cQsF4P8D.js} +1 -1
- package/web-shell/assets/{mermaid.core-zA8pJ9ag.js → mermaid.core-Z4HVqrKY.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BCW_BZ_5.js → mindmap-definition-RKZ34NQL-CYnrBo_f.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DseNEGp2.js → pieDiagram-4H26LBE5-CBzOfhrs.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js → quadrantDiagram-W4KKPZXB-D4LK1Ebn.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CVOlCRPf.js → requirementDiagram-4Y6WPE33-Bzti2Lcj.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CGhgrUJZ.js → sankeyDiagram-5OEKKPKP-yTBw5Z2s.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-dlqmpLuQ.js → sequenceDiagram-3UESZ5HK-D07UVRiZ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-B9EW10Xb.js → stateDiagram-AJRCARHV-UE_lHsTn.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DC6xgXjX.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-BBRh0mgZ.js → timeline-definition-PNZ67QCA-DRvYdiTs.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-B8Gs-REP.js → vennDiagram-CIIHVFJN-CQLIXs0u.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D_y80Ur7.js → wardley-L42UT6IY-JZz_Xqse.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D-CNfHJ-.js → wardleyDiagram-YWT4CUSO--i7BiJwB.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DQ5CvELo.js → xychartDiagram-2RQKCTM6-Bkc-bW0S.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-6PEXNQTX.js +0 -68
- package/chunks/chunk-IUFV6FYU.js +0 -81
- package/web-shell/assets/channel-Cu8qd6OB.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +0 -1
- package/web-shell/assets/index-QQlUCJGg.css +0 -5
- package/web-shell/assets/index-hcgjV7vS.js +0 -1768
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +0 -1
- package/chunks/{anthropicContentGenerator-DTMVEL5M.js → anthropicContentGenerator-SSFE2753.js} +9 -9
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
shouldSuppressRememberErrorDetails,
|
|
22
22
|
workspaceMemoryFailureCode,
|
|
23
23
|
workspaceMemoryFailureDiagnostics
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZPLALRXZ.js";
|
|
25
25
|
import {
|
|
26
26
|
deriveWebSocketBase,
|
|
27
27
|
openQwenAsrRealtimeStream,
|
|
@@ -39,12 +39,12 @@ import {
|
|
|
39
39
|
toJson,
|
|
40
40
|
toJsonl,
|
|
41
41
|
toMarkdown
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2M4K4KYS.js";
|
|
43
43
|
import {
|
|
44
44
|
OBSERVED_CONTACT_MAX_FRESH_WITHIN_SECONDS,
|
|
45
45
|
ObservedChannelContactStore
|
|
46
46
|
} from "./chunk-OWMAZHIX.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-4ALIARFY.js";
|
|
48
48
|
import {
|
|
49
49
|
escapeAnsiCtrlCodes
|
|
50
50
|
} from "./chunk-4NFY2S7N.js";
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
setRateLimiter,
|
|
109
109
|
unsafeRevealSecret,
|
|
110
110
|
validateMcpRuntimeServerName
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-KAQCJO6Y.js";
|
|
112
112
|
import {
|
|
113
113
|
isLoopbackBind
|
|
114
114
|
} from "./chunk-RXFQM6FQ.js";
|
|
@@ -124,17 +124,17 @@ import {
|
|
|
124
124
|
import "./chunk-GRC5HGPI.js";
|
|
125
125
|
import {
|
|
126
126
|
assertValidChannelSecretUpdates
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-4WU6NY7F.js";
|
|
128
128
|
import {
|
|
129
129
|
createWorkspaceProvidersStatusProvider
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-XZKQT2B2.js";
|
|
131
131
|
import {
|
|
132
132
|
getAuthTypeFromEnv,
|
|
133
133
|
resolveCliGenerationConfig
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-GBDINRIL.js";
|
|
135
135
|
import {
|
|
136
136
|
createWorkspaceSkillsStatusProvider
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-DX5W5AON.js";
|
|
138
138
|
import "./chunk-BGXZBI5B.js";
|
|
139
139
|
import {
|
|
140
140
|
isServeDebugMode,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
import {
|
|
148
148
|
evaluateDaemonWorkspaceTrust,
|
|
149
149
|
readDaemonTrustPolicySnapshot
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-SNRT2TJJ.js";
|
|
151
151
|
import {
|
|
152
152
|
EMPTY_WORKSPACE_VOICE_UPDATE_ERROR,
|
|
153
153
|
MAX_WORKSPACE_SKILL_NAME_LENGTH,
|
|
@@ -161,14 +161,14 @@ import {
|
|
|
161
161
|
validateWorkspaceSkillName,
|
|
162
162
|
validateWorkspaceVoiceState,
|
|
163
163
|
voiceSettingsScopeToWire
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-IBYULW65.js";
|
|
165
165
|
import {
|
|
166
166
|
PermissionRulesValidationError,
|
|
167
167
|
buildPermissionSettings,
|
|
168
168
|
isPermissionRuleType,
|
|
169
169
|
normalizePermissionRules,
|
|
170
170
|
readPermissionRuleSet
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-KKDVZLGL.js";
|
|
172
172
|
import {
|
|
173
173
|
assertVoiceBaseUrlNetworkAllowed,
|
|
174
174
|
isStreamingVoiceModel,
|
|
@@ -176,12 +176,12 @@ import {
|
|
|
176
176
|
resolveVoiceTranscriptionConfig,
|
|
177
177
|
sanitizeVoiceErrorMessage,
|
|
178
178
|
transcribeVoiceAudio
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-DQSDACD2.js";
|
|
180
180
|
import {
|
|
181
181
|
isVoiceEnabled,
|
|
182
182
|
isVoiceMode,
|
|
183
183
|
readVoiceModel
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-C5VWPTGT.js";
|
|
185
185
|
import "./chunk-AOHJKPKL.js";
|
|
186
186
|
import "./chunk-Z4X5MTRT.js";
|
|
187
187
|
import {
|
|
@@ -193,8 +193,8 @@ import {
|
|
|
193
193
|
import {
|
|
194
194
|
daemonObservedContactsPath,
|
|
195
195
|
loadChannelsConfig
|
|
196
|
-
} from "./chunk-
|
|
197
|
-
import "./chunk-
|
|
196
|
+
} from "./chunk-E4ZBKMSF.js";
|
|
197
|
+
import "./chunk-QQWD7LZV.js";
|
|
198
198
|
import "./chunk-57OAHC2Y.js";
|
|
199
199
|
import {
|
|
200
200
|
LIVE_HOST_BUNDLE_ID,
|
|
@@ -203,19 +203,19 @@ import {
|
|
|
203
203
|
} from "./chunk-NKLP3DCK.js";
|
|
204
204
|
import {
|
|
205
205
|
createDaemonStatusProvider
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-VWMUDKLC.js";
|
|
207
207
|
import "./chunk-VXZBKKQR.js";
|
|
208
|
-
import "./chunk-
|
|
208
|
+
import "./chunk-3SE7J4DR.js";
|
|
209
209
|
import "./chunk-3SH53ANB.js";
|
|
210
210
|
import {
|
|
211
211
|
snapshotProcessEnv
|
|
212
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-S3Y3GBFD.js";
|
|
213
213
|
import {
|
|
214
214
|
SessionArtifactAuthorizationError,
|
|
215
215
|
SessionArtifactValidationError,
|
|
216
216
|
createAcpSessionBridge,
|
|
217
217
|
parseSessionSource
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-FYAXKJK7.js";
|
|
219
219
|
import {
|
|
220
220
|
EVENT_SCHEMA_VERSION,
|
|
221
221
|
EventBus,
|
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
} from "./chunk-MZSJ43WV.js";
|
|
224
224
|
import "./chunk-XCGIMOLN.js";
|
|
225
225
|
import "./chunk-OCPBI7J5.js";
|
|
226
|
-
import "./chunk-
|
|
226
|
+
import "./chunk-RPWVIXDB.js";
|
|
227
227
|
import {
|
|
228
228
|
STATUS_SCHEMA_VERSION,
|
|
229
229
|
createIdleWorkspaceMemoryStatus,
|
|
@@ -234,11 +234,11 @@ import "./chunk-FC4KQFCS.js";
|
|
|
234
234
|
import "./chunk-T3CHYWJZ.js";
|
|
235
235
|
import {
|
|
236
236
|
parseChannelWebhookConfigLenient
|
|
237
|
-
} from "./chunk-
|
|
238
|
-
import "./chunk-
|
|
237
|
+
} from "./chunk-QXVSWG66.js";
|
|
238
|
+
import "./chunk-KJZ26VBX.js";
|
|
239
239
|
import {
|
|
240
240
|
supportedChannelCatalog
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-NGYI5EF5.js";
|
|
242
242
|
import "./chunk-V6WHFGST.js";
|
|
243
243
|
import {
|
|
244
244
|
MAX_REGISTERED_WORKSPACES,
|
|
@@ -247,8 +247,10 @@ import {
|
|
|
247
247
|
WorkspaceRegistrationStoreLimitError,
|
|
248
248
|
normalizeWorkspaceDisplayName,
|
|
249
249
|
workspaceRegistrationId
|
|
250
|
-
} from "./chunk-
|
|
251
|
-
import
|
|
250
|
+
} from "./chunk-757GB46F.js";
|
|
251
|
+
import {
|
|
252
|
+
gradeActiveWorkCoverage
|
|
253
|
+
} from "./chunk-M2PNLYGY.js";
|
|
252
254
|
import {
|
|
253
255
|
BranchWhilePromptActiveError,
|
|
254
256
|
CancelSentinelCollisionError,
|
|
@@ -300,7 +302,7 @@ import {
|
|
|
300
302
|
} from "./chunk-YP5KH5Y7.js";
|
|
301
303
|
import {
|
|
302
304
|
normalizeWorkerDiagnostic
|
|
303
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-UFALT4LK.js";
|
|
304
306
|
import {
|
|
305
307
|
normalizeServeChannelSelection
|
|
306
308
|
} from "./chunk-ALMR3E6Q.js";
|
|
@@ -312,7 +314,7 @@ import {
|
|
|
312
314
|
import "./chunk-5HBA2Z7V.js";
|
|
313
315
|
import {
|
|
314
316
|
sanitizeLogText
|
|
315
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-DIWZNWZT.js";
|
|
316
318
|
import "./chunk-UDXSXLER.js";
|
|
317
319
|
import {
|
|
318
320
|
getDialogSettingKeys,
|
|
@@ -323,7 +325,7 @@ import {
|
|
|
323
325
|
getWritableScopes,
|
|
324
326
|
loadSettings,
|
|
325
327
|
validateSettingValue
|
|
326
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-OHKJVAKG.js";
|
|
327
329
|
import "./chunk-RKUWKYED.js";
|
|
328
330
|
import "./chunk-GOXKNSDZ.js";
|
|
329
331
|
import "./chunk-IDS7MSUP.js";
|
|
@@ -332,15 +334,15 @@ import {
|
|
|
332
334
|
detectSystemLanguage,
|
|
333
335
|
resolveLanguageSetting,
|
|
334
336
|
resolveSupportedLanguage
|
|
335
|
-
} from "./chunk-
|
|
336
|
-
import "./chunk-
|
|
337
|
-
import "./chunk-
|
|
338
|
-
import "./chunk-
|
|
337
|
+
} from "./chunk-PG62DFWD.js";
|
|
338
|
+
import "./chunk-B52AWKBB.js";
|
|
339
|
+
import "./chunk-UA5H3DS2.js";
|
|
340
|
+
import "./chunk-FN6YXJOP.js";
|
|
339
341
|
import "./chunk-VJNBRRZG.js";
|
|
340
342
|
import {
|
|
341
343
|
getWorkspaceTrustStatus
|
|
342
|
-
} from "./chunk-
|
|
343
|
-
import "./chunk-
|
|
344
|
+
} from "./chunk-HA3SAB64.js";
|
|
345
|
+
import "./chunk-NPQ5ZKRP.js";
|
|
344
346
|
import {
|
|
345
347
|
isWithinRoot as isWithinRoot2
|
|
346
348
|
} from "./chunk-MR3PXB6E.js";
|
|
@@ -360,6 +362,7 @@ import {
|
|
|
360
362
|
MAX_LOG_LIMIT,
|
|
361
363
|
ModelsConfig,
|
|
362
364
|
RUNTIME_MCP_IF_ABSENT_CONFIG_FLAG,
|
|
365
|
+
SESSION_TRANSCRIPT_MAX_EXPANDED_PAGE_BYTES,
|
|
363
366
|
SESSION_TRANSCRIPT_MAX_INDEX_BYTES,
|
|
364
367
|
SESSION_TRANSCRIPT_MAX_LIMIT,
|
|
365
368
|
SESSION_TRANSCRIPT_MAX_PAGE_BYTES,
|
|
@@ -418,7 +421,7 @@ import {
|
|
|
418
421
|
writeWorkspaceContextFile,
|
|
419
422
|
writeWorktreeSession,
|
|
420
423
|
writeWorktreeSessionMarker
|
|
421
|
-
} from "./chunk-
|
|
424
|
+
} from "./chunk-GXSNGY5M.js";
|
|
422
425
|
import "./chunk-GOFAQQZA.js";
|
|
423
426
|
import "./chunk-5M6IDOMF.js";
|
|
424
427
|
import "./chunk-TWPJO254.js";
|
|
@@ -426,12 +429,12 @@ import "./chunk-H6XPXXMH.js";
|
|
|
426
429
|
import {
|
|
427
430
|
MAX_JOBS,
|
|
428
431
|
nextDurableFireMs
|
|
429
|
-
} from "./chunk-
|
|
432
|
+
} from "./chunk-2UUMVNYT.js";
|
|
430
433
|
import "./chunk-MVUQRLOH.js";
|
|
431
434
|
import "./chunk-XCWO3SMQ.js";
|
|
432
435
|
import "./chunk-7MH4J33A.js";
|
|
433
436
|
import "./chunk-6PVPNMXU.js";
|
|
434
|
-
import "./chunk-
|
|
437
|
+
import "./chunk-VXZ5HAOV.js";
|
|
435
438
|
import {
|
|
436
439
|
nextFireTime,
|
|
437
440
|
parseCron
|
|
@@ -445,7 +448,7 @@ import {
|
|
|
445
448
|
taskHasLegacyCondition,
|
|
446
449
|
updateCronTasks
|
|
447
450
|
} from "./chunk-GNPNYXJB.js";
|
|
448
|
-
import "./chunk-
|
|
451
|
+
import "./chunk-HUWENAHO.js";
|
|
449
452
|
import "./chunk-O6GEWCJA.js";
|
|
450
453
|
import "./chunk-T26EAKDL.js";
|
|
451
454
|
import "./chunk-ZPJWUGCS.js";
|
|
@@ -454,22 +457,37 @@ import "./chunk-J6SZID63.js";
|
|
|
454
457
|
import "./chunk-KRXPRVGL.js";
|
|
455
458
|
import "./chunk-GM463R2B.js";
|
|
456
459
|
import "./chunk-SEZ556DZ.js";
|
|
457
|
-
import "./chunk-
|
|
458
|
-
import "./chunk-
|
|
460
|
+
import "./chunk-2FRY5CRX.js";
|
|
461
|
+
import "./chunk-67N6HB5H.js";
|
|
459
462
|
import {
|
|
460
463
|
APPROVAL_MODES
|
|
461
|
-
} from "./chunk-
|
|
464
|
+
} from "./chunk-WAUGQKUU.js";
|
|
465
|
+
import "./chunk-PLFATELK.js";
|
|
466
|
+
import {
|
|
467
|
+
addDaemonRequestAttribute,
|
|
468
|
+
captureDaemonTelemetryContext,
|
|
469
|
+
emitDaemonLog,
|
|
470
|
+
hashDaemonWorkspace,
|
|
471
|
+
recordDaemonBridgeError,
|
|
472
|
+
recordDaemonError,
|
|
473
|
+
recordDaemonHttpRequest,
|
|
474
|
+
recordDaemonHttpResponse,
|
|
475
|
+
runWithDaemonTelemetryContext,
|
|
476
|
+
withDaemonRequestSpan
|
|
477
|
+
} from "./chunk-L4N6TIP7.js";
|
|
478
|
+
import "./chunk-SAH4BD2J.js";
|
|
479
|
+
import "./chunk-CPG6P4GG.js";
|
|
462
480
|
import "./chunk-S6LOFUVP.js";
|
|
481
|
+
import "./chunk-2J3OJGTL.js";
|
|
463
482
|
import {
|
|
464
483
|
SubagentError,
|
|
465
484
|
SubagentErrorCode
|
|
466
|
-
} from "./chunk-
|
|
485
|
+
} from "./chunk-IA7TGCN2.js";
|
|
467
486
|
import "./chunk-K623ENWT.js";
|
|
468
487
|
import {
|
|
469
488
|
escapeXml
|
|
470
489
|
} from "./chunk-AQ37AY7B.js";
|
|
471
490
|
import "./chunk-EQL65XGA.js";
|
|
472
|
-
import "./chunk-IIJEYBNH.js";
|
|
473
491
|
import {
|
|
474
492
|
QwenOAuth2Client,
|
|
475
493
|
QwenOAuthPollError,
|
|
@@ -478,31 +496,18 @@ import {
|
|
|
478
496
|
isDeviceAuthorizationSuccess,
|
|
479
497
|
isDeviceTokenPending,
|
|
480
498
|
isDeviceTokenSuccess
|
|
481
|
-
} from "./chunk-
|
|
499
|
+
} from "./chunk-3P2LV43B.js";
|
|
482
500
|
import "./chunk-NAVJD2PQ.js";
|
|
483
|
-
import "./chunk-
|
|
484
|
-
import "./chunk-
|
|
501
|
+
import "./chunk-HV76SFIA.js";
|
|
502
|
+
import "./chunk-4PYCZH2V.js";
|
|
503
|
+
import "./chunk-P3QQPMQA.js";
|
|
504
|
+
import "./chunk-SR7RZ4MS.js";
|
|
505
|
+
import "./chunk-M6HMMKVG.js";
|
|
485
506
|
import "./chunk-DGEIYUC3.js";
|
|
486
507
|
import "./chunk-MPHPFVKK.js";
|
|
487
508
|
import "./chunk-AXMWHKXA.js";
|
|
488
|
-
import "./chunk-DJ2GSRLV.js";
|
|
489
|
-
import "./chunk-33ACCIIY.js";
|
|
490
|
-
import {
|
|
491
|
-
addDaemonRequestAttribute,
|
|
492
|
-
captureDaemonTelemetryContext,
|
|
493
|
-
emitDaemonLog,
|
|
494
|
-
hashDaemonWorkspace,
|
|
495
|
-
recordDaemonBridgeError,
|
|
496
|
-
recordDaemonError,
|
|
497
|
-
recordDaemonHttpRequest,
|
|
498
|
-
recordDaemonHttpResponse,
|
|
499
|
-
runWithDaemonTelemetryContext,
|
|
500
|
-
withDaemonRequestSpan
|
|
501
|
-
} from "./chunk-L4N6TIP7.js";
|
|
502
|
-
import "./chunk-2J3OJGTL.js";
|
|
503
|
-
import "./chunk-P3QQPMQA.js";
|
|
504
|
-
import "./chunk-M6HMMKVG.js";
|
|
505
509
|
import "./chunk-GLCZKT5V.js";
|
|
510
|
+
import "./chunk-DJ2GSRLV.js";
|
|
506
511
|
import "./chunk-EI3HZX6C.js";
|
|
507
512
|
import "./chunk-CR3C7WXL.js";
|
|
508
513
|
import "./chunk-XWRJCPHC.js";
|
|
@@ -516,13 +521,15 @@ import {
|
|
|
516
521
|
isWithinRoot,
|
|
517
522
|
parseLineTolerant,
|
|
518
523
|
read
|
|
519
|
-
} from "./chunk-
|
|
524
|
+
} from "./chunk-3PY4LPJF.js";
|
|
520
525
|
import "./chunk-WOJZWRAZ.js";
|
|
521
526
|
import "./chunk-VGC4I5JJ.js";
|
|
522
527
|
import "./chunk-FVKHVJZQ.js";
|
|
523
|
-
import "./chunk-
|
|
524
|
-
import "./chunk-
|
|
525
|
-
import "./chunk-
|
|
528
|
+
import "./chunk-COBO5EBO.js";
|
|
529
|
+
import "./chunk-6ZRFAKXK.js";
|
|
530
|
+
import "./chunk-PYQADEFD.js";
|
|
531
|
+
import "./chunk-M3STHEMM.js";
|
|
532
|
+
import "./chunk-F6WFNA7U.js";
|
|
526
533
|
import "./chunk-46UV252V.js";
|
|
527
534
|
import "./chunk-ZBVS26BY.js";
|
|
528
535
|
import "./chunk-KKBPOU75.js";
|
|
@@ -535,6 +542,7 @@ import {
|
|
|
535
542
|
FatalConfigError,
|
|
536
543
|
Storage,
|
|
537
544
|
createDebugLogger,
|
|
545
|
+
getErrorMessage,
|
|
538
546
|
runWithoutDebugLogSession
|
|
539
547
|
} from "./chunk-OIVKILPI.js";
|
|
540
548
|
import "./chunk-VOQXFAY5.js";
|
|
@@ -563,7 +571,7 @@ import {
|
|
|
563
571
|
|
|
564
572
|
// packages/cli/src/serve/server.ts
|
|
565
573
|
init_esbuild_shims();
|
|
566
|
-
var
|
|
574
|
+
var import_express5 = __toESM(require_express(), 1);
|
|
567
575
|
|
|
568
576
|
// packages/cli/src/serve/acp-http/index.ts
|
|
569
577
|
init_esbuild_shims();
|
|
@@ -1180,11 +1188,11 @@ function decodeTextCursor(cursor) {
|
|
|
1180
1188
|
return { off, size, dev, ino };
|
|
1181
1189
|
}
|
|
1182
1190
|
__name(decodeTextCursor, "decodeTextCursor");
|
|
1183
|
-
function assertCursorMatchesFile(cursor, stats,
|
|
1191
|
+
function assertCursorMatchesFile(cursor, stats, path15) {
|
|
1184
1192
|
if (String(stats.dev) !== cursor.dev || String(stats.ino) !== cursor.ino || stats.size < cursor.size) {
|
|
1185
1193
|
throw new FsError(
|
|
1186
1194
|
"hash_mismatch",
|
|
1187
|
-
`cursor no longer matches the file it was issued for: ${
|
|
1195
|
+
`cursor no longer matches the file it was issued for: ${path15}`,
|
|
1188
1196
|
{ hint: "re-read the file from the beginning to get a fresh cursor" }
|
|
1189
1197
|
);
|
|
1190
1198
|
}
|
|
@@ -1946,17 +1954,17 @@ var WorkspaceFileSystemImpl = class {
|
|
|
1946
1954
|
if (err instanceof Error && "code" in err && err.code === "workspace_generation_closed") {
|
|
1947
1955
|
return err;
|
|
1948
1956
|
}
|
|
1949
|
-
const
|
|
1957
|
+
const fs8 = wrapAsFsError(err);
|
|
1950
1958
|
this.deps.audit.recordDenied(this.deps.ctx, {
|
|
1951
1959
|
intent,
|
|
1952
1960
|
input,
|
|
1953
|
-
errorKind:
|
|
1954
|
-
hint:
|
|
1961
|
+
errorKind: fs8.kind,
|
|
1962
|
+
hint: fs8.hint,
|
|
1955
1963
|
// Quote the underlying OS / FsError message so audit
|
|
1956
1964
|
// consumers debugging a production incident can see the
|
|
1957
1965
|
// actual cause (errno text, byte counts, glob pattern,
|
|
1958
1966
|
// etc.) rather than just `errorKind` + `hint`.
|
|
1959
|
-
message:
|
|
1967
|
+
message: fs8.message,
|
|
1960
1968
|
// For glob denials (parse_error pattern rejection,
|
|
1961
1969
|
// catastrophic walk failures) the input IS the pattern
|
|
1962
1970
|
// already; surfacing it on the dedicated `pattern` field
|
|
@@ -1965,7 +1973,7 @@ var WorkspaceFileSystemImpl = class {
|
|
|
1965
1973
|
// branching on intent.
|
|
1966
1974
|
pattern: intent === "glob" ? input : void 0
|
|
1967
1975
|
});
|
|
1968
|
-
return
|
|
1976
|
+
return fs8;
|
|
1969
1977
|
}
|
|
1970
1978
|
};
|
|
1971
1979
|
var CONTENT_HASH_RE = /^sha256:[0-9a-f]{64}$/;
|
|
@@ -3041,12 +3049,12 @@ function sendFsError(res, err, route) {
|
|
|
3041
3049
|
applyReadHeaders(res);
|
|
3042
3050
|
if (sendGenerationClosedError(res, err)) return;
|
|
3043
3051
|
if (isFsError(err)) {
|
|
3044
|
-
const
|
|
3045
|
-
res.status(
|
|
3046
|
-
errorKind:
|
|
3047
|
-
error:
|
|
3048
|
-
hint:
|
|
3049
|
-
status:
|
|
3052
|
+
const fs8 = err;
|
|
3053
|
+
res.status(fs8.status).json({
|
|
3054
|
+
errorKind: fs8.kind,
|
|
3055
|
+
error: fs8.message,
|
|
3056
|
+
hint: fs8.hint,
|
|
3057
|
+
status: fs8.status
|
|
3050
3058
|
});
|
|
3051
3059
|
return;
|
|
3052
3060
|
}
|
|
@@ -3159,13 +3167,13 @@ async function handleGetFile(req, res, deps) {
|
|
|
3159
3167
|
return;
|
|
3160
3168
|
}
|
|
3161
3169
|
const cursor = rawCursor;
|
|
3162
|
-
const
|
|
3170
|
+
const fs8 = factory.forRequest({
|
|
3163
3171
|
originatorClientId: clientId ?? void 0,
|
|
3164
3172
|
route: ROUTE2
|
|
3165
3173
|
});
|
|
3166
3174
|
try {
|
|
3167
|
-
const resolved = await
|
|
3168
|
-
const out = await
|
|
3175
|
+
const resolved = await fs8.resolve(queryPath, "read");
|
|
3176
|
+
const out = await fs8.readText(resolved, {
|
|
3169
3177
|
maxBytes,
|
|
3170
3178
|
line,
|
|
3171
3179
|
limit,
|
|
@@ -3226,13 +3234,13 @@ async function handleGetFileBytes(req, res, deps) {
|
|
|
3226
3234
|
});
|
|
3227
3235
|
return;
|
|
3228
3236
|
}
|
|
3229
|
-
const
|
|
3237
|
+
const fs8 = factory.forRequest({
|
|
3230
3238
|
originatorClientId: clientId ?? void 0,
|
|
3231
3239
|
route: ROUTE2
|
|
3232
3240
|
});
|
|
3233
3241
|
try {
|
|
3234
|
-
const resolved = await
|
|
3235
|
-
const out = await
|
|
3242
|
+
const resolved = await fs8.resolve(queryPath, "read");
|
|
3243
|
+
const out = await fs8.readBytesWindow(resolved, {
|
|
3236
3244
|
offset: offset ?? 0,
|
|
3237
3245
|
maxBytes: maxBytes ?? DEFAULT_FILE_BYTES_MAX_BYTES
|
|
3238
3246
|
});
|
|
@@ -3260,13 +3268,13 @@ async function handleGetStat(req, res, deps) {
|
|
|
3260
3268
|
if (clientId === null) return;
|
|
3261
3269
|
const queryPath = requireStringQuery(res, req.query["path"], "path", ROUTE2);
|
|
3262
3270
|
if (queryPath === null) return;
|
|
3263
|
-
const
|
|
3271
|
+
const fs8 = factory.forRequest({
|
|
3264
3272
|
originatorClientId: clientId ?? void 0,
|
|
3265
3273
|
route: ROUTE2
|
|
3266
3274
|
});
|
|
3267
3275
|
try {
|
|
3268
|
-
const resolved = await
|
|
3269
|
-
const st = await
|
|
3276
|
+
const resolved = await fs8.resolve(queryPath, "stat");
|
|
3277
|
+
const st = await fs8.stat(resolved);
|
|
3270
3278
|
applyReadHeaders(res);
|
|
3271
3279
|
res.status(200).json({
|
|
3272
3280
|
kind: "stat",
|
|
@@ -3289,13 +3297,13 @@ async function handleGetList(req, res, deps) {
|
|
|
3289
3297
|
const queryPath = requireStringQuery(res, req.query["path"], "path", ROUTE2);
|
|
3290
3298
|
if (queryPath === null) return;
|
|
3291
3299
|
const includeIgnored = parseBoolFlag(req.query["includeIgnored"]);
|
|
3292
|
-
const
|
|
3300
|
+
const fs8 = factory.forRequest({
|
|
3293
3301
|
originatorClientId: clientId ?? void 0,
|
|
3294
3302
|
route: ROUTE2
|
|
3295
3303
|
});
|
|
3296
3304
|
try {
|
|
3297
|
-
const resolved = await
|
|
3298
|
-
const entries = await
|
|
3305
|
+
const resolved = await fs8.resolve(queryPath, "list");
|
|
3306
|
+
const entries = await fs8.list(resolved, {
|
|
3299
3307
|
includeIgnored,
|
|
3300
3308
|
maxEntries: MAX_LIST_ENTRIES + 1
|
|
3301
3309
|
});
|
|
@@ -3348,15 +3356,15 @@ async function handleGetGlob(req, res, deps) {
|
|
|
3348
3356
|
}
|
|
3349
3357
|
const cwdRaw = req.query["cwd"];
|
|
3350
3358
|
const cwdString = typeof cwdRaw === "string" && cwdRaw.length > 0 ? cwdRaw : void 0;
|
|
3351
|
-
const
|
|
3359
|
+
const fs8 = factory.forRequest({
|
|
3352
3360
|
originatorClientId: clientId ?? void 0,
|
|
3353
3361
|
route: ROUTE2
|
|
3354
3362
|
});
|
|
3355
3363
|
const start = performance.now();
|
|
3356
3364
|
try {
|
|
3357
|
-
const cwdResolved = cwdString ? await
|
|
3365
|
+
const cwdResolved = cwdString ? await fs8.resolve(cwdString, "list") : void 0;
|
|
3358
3366
|
const cap = maxResults ?? DEFAULT_GLOB_MAX_RESULTS;
|
|
3359
|
-
const probe = await
|
|
3367
|
+
const probe = await fs8.glob(pattern, {
|
|
3360
3368
|
cwd: cwdResolved,
|
|
3361
3369
|
includeIgnored,
|
|
3362
3370
|
maxResults: cap + 1
|
|
@@ -3544,7 +3552,7 @@ function validateClientId(clientId, deps, res) {
|
|
|
3544
3552
|
}
|
|
3545
3553
|
__name(validateClientId, "validateClientId");
|
|
3546
3554
|
function createSetupGithubFileOps(factory, route, originatorClientId, assertGenerationOpen) {
|
|
3547
|
-
const
|
|
3555
|
+
const fs8 = factory.forRequest({
|
|
3548
3556
|
route,
|
|
3549
3557
|
...originatorClientId ? { originatorClientId } : {}
|
|
3550
3558
|
});
|
|
@@ -3572,14 +3580,14 @@ function createSetupGithubFileOps(factory, route, originatorClientId, assertGene
|
|
|
3572
3580
|
);
|
|
3573
3581
|
},
|
|
3574
3582
|
async writeTextFile(_gitRepoRoot, relativePath, content) {
|
|
3575
|
-
const resolved = await
|
|
3576
|
-
const out = await
|
|
3583
|
+
const resolved = await fs8.resolve(relativePath, "write");
|
|
3584
|
+
const out = await fs8.writeTextOverwrite(resolved, content);
|
|
3577
3585
|
return { sizeBytes: out.sizeBytes };
|
|
3578
3586
|
},
|
|
3579
3587
|
async readTextFile(_gitRepoRoot, relativePath) {
|
|
3580
3588
|
try {
|
|
3581
|
-
const resolved = await
|
|
3582
|
-
const out = await
|
|
3589
|
+
const resolved = await fs8.resolve(relativePath, "read");
|
|
3590
|
+
const out = await fs8.readText(resolved);
|
|
3583
3591
|
return out.content;
|
|
3584
3592
|
} catch (error2) {
|
|
3585
3593
|
if (isFsError(error2) && error2.kind === "path_not_found") {
|
|
@@ -10791,7 +10799,7 @@ var AcpDispatcher = class {
|
|
|
10791
10799
|
);
|
|
10792
10800
|
return;
|
|
10793
10801
|
}
|
|
10794
|
-
const
|
|
10802
|
+
const fs8 = this.fsFactory.forRequest({
|
|
10795
10803
|
originatorClientId: conn.clientId,
|
|
10796
10804
|
route: `ACP ${method}`
|
|
10797
10805
|
});
|
|
@@ -10856,8 +10864,8 @@ var AcpDispatcher = class {
|
|
|
10856
10864
|
return;
|
|
10857
10865
|
}
|
|
10858
10866
|
const cursor = rawCursor;
|
|
10859
|
-
const resolved = await
|
|
10860
|
-
const out = await
|
|
10867
|
+
const resolved = await fs8.resolve(p, "read");
|
|
10868
|
+
const out = await fs8.readText(resolved, {
|
|
10861
10869
|
maxBytes,
|
|
10862
10870
|
line,
|
|
10863
10871
|
limit,
|
|
@@ -10884,7 +10892,7 @@ var AcpDispatcher = class {
|
|
|
10884
10892
|
conn.sendConn(error(id, RPC.INVALID_PARAMS, "`path` required"));
|
|
10885
10893
|
return;
|
|
10886
10894
|
}
|
|
10887
|
-
const
|
|
10895
|
+
const fs8 = this.fsFactory.forRequest({
|
|
10888
10896
|
originatorClientId: conn.clientId,
|
|
10889
10897
|
route: `ACP ${method}`
|
|
10890
10898
|
});
|
|
@@ -10920,8 +10928,8 @@ var AcpDispatcher = class {
|
|
|
10920
10928
|
);
|
|
10921
10929
|
return;
|
|
10922
10930
|
}
|
|
10923
|
-
const resolved = await
|
|
10924
|
-
const buf = await
|
|
10931
|
+
const resolved = await fs8.resolve(p, "read");
|
|
10932
|
+
const buf = await fs8.readBytesWindow(resolved, { offset, maxBytes });
|
|
10925
10933
|
this.replyConn(conn, id, { path: p, ...buf });
|
|
10926
10934
|
return;
|
|
10927
10935
|
}
|
|
@@ -10939,12 +10947,12 @@ var AcpDispatcher = class {
|
|
|
10939
10947
|
conn.sendConn(error(id, RPC.INVALID_PARAMS, "`path` required"));
|
|
10940
10948
|
return;
|
|
10941
10949
|
}
|
|
10942
|
-
const
|
|
10950
|
+
const fs8 = this.fsFactory.forRequest({
|
|
10943
10951
|
originatorClientId: conn.clientId,
|
|
10944
10952
|
route: `ACP ${method}`
|
|
10945
10953
|
});
|
|
10946
|
-
const resolved = await
|
|
10947
|
-
const result = await
|
|
10954
|
+
const resolved = await fs8.resolve(p, "read");
|
|
10955
|
+
const result = await fs8.stat(resolved);
|
|
10948
10956
|
this.replyConn(conn, id, { path: p, ...result });
|
|
10949
10957
|
return;
|
|
10950
10958
|
}
|
|
@@ -10962,13 +10970,13 @@ var AcpDispatcher = class {
|
|
|
10962
10970
|
conn.sendConn(error(id, RPC.INVALID_PARAMS, "`path` required"));
|
|
10963
10971
|
return;
|
|
10964
10972
|
}
|
|
10965
|
-
const
|
|
10973
|
+
const fs8 = this.fsFactory.forRequest({
|
|
10966
10974
|
originatorClientId: conn.clientId,
|
|
10967
10975
|
route: `ACP ${method}`
|
|
10968
10976
|
});
|
|
10969
|
-
const resolved = await
|
|
10977
|
+
const resolved = await fs8.resolve(p, "read");
|
|
10970
10978
|
const MAX_LIST = 2e3;
|
|
10971
|
-
const entries = await
|
|
10979
|
+
const entries = await fs8.list(resolved, { maxEntries: MAX_LIST + 1 });
|
|
10972
10980
|
const truncated = entries.length > MAX_LIST;
|
|
10973
10981
|
this.replyConn(conn, id, {
|
|
10974
10982
|
path: p,
|
|
@@ -10993,7 +11001,7 @@ var AcpDispatcher = class {
|
|
|
10993
11001
|
);
|
|
10994
11002
|
return;
|
|
10995
11003
|
}
|
|
10996
|
-
const
|
|
11004
|
+
const fs8 = this.fsFactory.forRequest({
|
|
10997
11005
|
originatorClientId: conn.clientId,
|
|
10998
11006
|
route: `ACP ${method}`
|
|
10999
11007
|
});
|
|
@@ -11013,7 +11021,7 @@ var AcpDispatcher = class {
|
|
|
11013
11021
|
);
|
|
11014
11022
|
return;
|
|
11015
11023
|
}
|
|
11016
|
-
const matches = await
|
|
11024
|
+
const matches = await fs8.glob(pattern, {
|
|
11017
11025
|
maxResults: maxResults + 1
|
|
11018
11026
|
});
|
|
11019
11027
|
const truncated = matches.length > maxResults;
|
|
@@ -11045,11 +11053,11 @@ var AcpDispatcher = class {
|
|
|
11045
11053
|
);
|
|
11046
11054
|
return;
|
|
11047
11055
|
}
|
|
11048
|
-
const
|
|
11056
|
+
const fs8 = this.fsFactory.forRequest({
|
|
11049
11057
|
originatorClientId: conn.clientId,
|
|
11050
11058
|
route: `ACP ${method}`
|
|
11051
11059
|
});
|
|
11052
|
-
const resolved = await
|
|
11060
|
+
const resolved = await fs8.resolve(p, "write");
|
|
11053
11061
|
if (Buffer.byteLength(params["content"], "utf8") > 10 * 1024 * 1024) {
|
|
11054
11062
|
if (id !== void 0)
|
|
11055
11063
|
conn.sendConn(
|
|
@@ -11057,7 +11065,7 @@ var AcpDispatcher = class {
|
|
|
11057
11065
|
);
|
|
11058
11066
|
return;
|
|
11059
11067
|
}
|
|
11060
|
-
await
|
|
11068
|
+
await fs8.writeTextOverwrite(resolved, params["content"]);
|
|
11061
11069
|
assertGenerationOpen?.();
|
|
11062
11070
|
this.replyConn(conn, id, { ok: true, path: p });
|
|
11063
11071
|
return;
|
|
@@ -11087,12 +11095,12 @@ var AcpDispatcher = class {
|
|
|
11087
11095
|
);
|
|
11088
11096
|
return;
|
|
11089
11097
|
}
|
|
11090
|
-
const
|
|
11098
|
+
const fs8 = this.fsFactory.forRequest({
|
|
11091
11099
|
originatorClientId: conn.clientId,
|
|
11092
11100
|
route: `ACP ${method}`
|
|
11093
11101
|
});
|
|
11094
|
-
const resolved = await
|
|
11095
|
-
const result = await
|
|
11102
|
+
const resolved = await fs8.resolve(p, "write");
|
|
11103
|
+
const result = await fs8.edit(
|
|
11096
11104
|
resolved,
|
|
11097
11105
|
params["oldText"],
|
|
11098
11106
|
params["newText"]
|
|
@@ -13935,7 +13943,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
13935
13943
|
if (!enabled) return void 0;
|
|
13936
13944
|
const daemonEnv = opts.daemonEnv ?? process.env;
|
|
13937
13945
|
const getPrimaryEnv = /* @__PURE__ */ __name(() => opts.workspaceRegistry ? runtimeEffectiveEnv(opts.workspaceRegistry.primary, daemonEnv) : daemonEnv, "getPrimaryEnv");
|
|
13938
|
-
const
|
|
13946
|
+
const path15 = opts.path ?? "/acp";
|
|
13939
13947
|
const dispatcherRef = {};
|
|
13940
13948
|
let disposed = false;
|
|
13941
13949
|
const rejectIfDisposed = /* @__PURE__ */ __name((res) => {
|
|
@@ -14107,7 +14115,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14107
14115
|
const primaryMount = {
|
|
14108
14116
|
primary: true,
|
|
14109
14117
|
workspaceCwd: opts.boundWorkspace,
|
|
14110
|
-
routeLabel: logSafe(
|
|
14118
|
+
routeLabel: logSafe(path15),
|
|
14111
14119
|
rateLimitScope: opts.workspaceRegistry?.primary.workspaceId ?? "primary",
|
|
14112
14120
|
registry,
|
|
14113
14121
|
dispatcher,
|
|
@@ -14261,7 +14269,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14261
14269
|
});
|
|
14262
14270
|
}, "handleAcpPost");
|
|
14263
14271
|
app.post(
|
|
14264
|
-
|
|
14272
|
+
path15,
|
|
14265
14273
|
(req, res) => handleAcpPost(primaryMount, req, res)
|
|
14266
14274
|
);
|
|
14267
14275
|
const handleAcpGet = /* @__PURE__ */ __name((mount, req, res) => {
|
|
@@ -14359,10 +14367,10 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14359
14367
|
onPumpSettled();
|
|
14360
14368
|
});
|
|
14361
14369
|
}, "handleAcpGet");
|
|
14362
|
-
app.get(
|
|
14370
|
+
app.get(path15, (req, res) => {
|
|
14363
14371
|
handleAcpGet(primaryMount, req, res);
|
|
14364
14372
|
});
|
|
14365
|
-
app.delete(
|
|
14373
|
+
app.delete(path15, (req, res) => {
|
|
14366
14374
|
handleAcpDelete(primaryMount, req, res);
|
|
14367
14375
|
});
|
|
14368
14376
|
const createSecondaryAcpMount = /* @__PURE__ */ __name((rt) => {
|
|
@@ -14564,7 +14572,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
14564
14572
|
const isPluralAcpShape = pluralRawSelector !== null;
|
|
14565
14573
|
const pluralVoiceRawSelector = opts.workspaceVoiceConnection ? pluralWorkspaceRawSelector(rawPath, PLURAL_VOICE_WS_SUFFIX) : null;
|
|
14566
14574
|
const isPluralVoiceShape = pluralVoiceRawSelector !== null;
|
|
14567
|
-
if (rawPath !==
|
|
14575
|
+
if (rawPath !== path15 && !isCdpPath && !extraRoute && !isPluralAcpShape && !isPluralVoiceShape) {
|
|
14568
14576
|
logReject(`unknown-path ${logSafe(rawPath)}`);
|
|
14569
14577
|
socket.destroy();
|
|
14570
14578
|
return;
|
|
@@ -15101,7 +15109,7 @@ function mountAcpHttp(app, bridge, opts) {
|
|
|
15101
15109
|
});
|
|
15102
15110
|
}, "upgradeListener");
|
|
15103
15111
|
httpServer.on("upgrade", upgradeListener);
|
|
15104
|
-
writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${
|
|
15112
|
+
writeStderrLine(`qwen serve: /acp WebSocket transport enabled on ${path15}`);
|
|
15105
15113
|
}
|
|
15106
15114
|
__name(setupWebSocket, "setupWebSocket");
|
|
15107
15115
|
return {
|
|
@@ -15930,7 +15938,8 @@ function registerDaemonStatusRoutes(app, deps) {
|
|
|
15930
15938
|
getChannelWorkerSnapshots: deps.getChannelWorkerSnapshots,
|
|
15931
15939
|
getPerfSnapshot: deps.getPerfSnapshot,
|
|
15932
15940
|
getMetricsSeries: deps.getMetricsSeries,
|
|
15933
|
-
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot
|
|
15941
|
+
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot,
|
|
15942
|
+
getChildHeapPolicySnapshot: deps.getChildHeapPolicySnapshot
|
|
15934
15943
|
})
|
|
15935
15944
|
);
|
|
15936
15945
|
} catch (err) {
|
|
@@ -16625,19 +16634,32 @@ function createHealthDemoRoutes(deps) {
|
|
|
16625
16634
|
let sessions = 0;
|
|
16626
16635
|
let pendingPermissions = 0;
|
|
16627
16636
|
let activePrompts = 0;
|
|
16637
|
+
let activeWork = false;
|
|
16628
16638
|
let channelAlive = false;
|
|
16629
16639
|
let lastActivity = null;
|
|
16640
|
+
let coveredSessions = 0;
|
|
16641
|
+
let sessionsOnNegotiatedChannel = 0;
|
|
16642
|
+
let oldestReportAt = null;
|
|
16630
16643
|
for (const runtime of runtimes) {
|
|
16631
16644
|
failedWorkspaceId = runtime.workspaceId;
|
|
16632
16645
|
const bridge = runtime.bridge;
|
|
16633
16646
|
const runtimeSessions = bridge.sessionCount;
|
|
16634
16647
|
const runtimePendingPermissions = bridge.pendingPermissionCount;
|
|
16635
16648
|
const runtimeActivePrompts = bridge.activePromptCount;
|
|
16649
|
+
const runtimeActiveWork = bridge.activeWork;
|
|
16650
|
+
const runtimeCoverage = bridge.activeWorkCoverage;
|
|
16651
|
+
const runtimeOldestReportAt = runtimeCoverage.oldestCoveredReportAt;
|
|
16636
16652
|
const runtimeChannelAlive = bridge.isChannelLive();
|
|
16637
16653
|
const runtimeLastActivity = bridge.lastActivityAt;
|
|
16638
16654
|
sessions += runtimeSessions;
|
|
16639
16655
|
pendingPermissions += runtimePendingPermissions;
|
|
16640
16656
|
activePrompts += runtimeActivePrompts;
|
|
16657
|
+
activeWork = activeWork || runtimeActiveWork;
|
|
16658
|
+
coveredSessions += runtimeCoverage.covered;
|
|
16659
|
+
sessionsOnNegotiatedChannel += runtimeCoverage.onNegotiatedChannel;
|
|
16660
|
+
if (runtimeOldestReportAt !== null && (oldestReportAt === null || runtimeOldestReportAt < oldestReportAt)) {
|
|
16661
|
+
oldestReportAt = runtimeOldestReportAt;
|
|
16662
|
+
}
|
|
16641
16663
|
channelAlive = channelAlive || runtimeChannelAlive;
|
|
16642
16664
|
if (runtimeLastActivity !== null && (lastActivity === null || runtimeLastActivity > lastActivity)) {
|
|
16643
16665
|
lastActivity = runtimeLastActivity;
|
|
@@ -16652,6 +16674,17 @@ function createHealthDemoRoutes(deps) {
|
|
|
16652
16674
|
sessions,
|
|
16653
16675
|
pendingPermissions,
|
|
16654
16676
|
activePrompts,
|
|
16677
|
+
activeWork,
|
|
16678
|
+
activeWorkReporting: gradeActiveWorkCoverage({
|
|
16679
|
+
total: sessions,
|
|
16680
|
+
covered: coveredSessions,
|
|
16681
|
+
onNegotiatedChannel: sessionsOnNegotiatedChannel
|
|
16682
|
+
}),
|
|
16683
|
+
// 0 rather than null when nothing is covered: an idle daemon with no
|
|
16684
|
+
// sessions must not read as infinitely stale to a controller applying
|
|
16685
|
+
// its own freshness floor. `oldestReportAt` is the oldest *covered*
|
|
16686
|
+
// report, so this never disagrees with the grade above.
|
|
16687
|
+
activeWorkStaleMs: oldestReportAt === null ? 0 : now - oldestReportAt,
|
|
16655
16688
|
connectedClients: getActiveSseCount2(),
|
|
16656
16689
|
channelAlive,
|
|
16657
16690
|
lastActivityAt: lastActivity !== null ? new Date(lastActivity).toISOString() : null,
|
|
@@ -17177,6 +17210,10 @@ __name(registerWorkspaceAuthRoutes, "registerWorkspaceAuthRoutes");
|
|
|
17177
17210
|
// packages/cli/src/serve/routes/workspace-extensions.ts
|
|
17178
17211
|
init_esbuild_shims();
|
|
17179
17212
|
import * as crypto2 from "node:crypto";
|
|
17213
|
+
import * as fs4 from "node:fs/promises";
|
|
17214
|
+
import * as os from "node:os";
|
|
17215
|
+
import * as path9 from "node:path";
|
|
17216
|
+
var import_express2 = __toESM(require_express(), 1);
|
|
17180
17217
|
|
|
17181
17218
|
// packages/cli/src/serve/extension-operation-scheduler.ts
|
|
17182
17219
|
init_esbuild_shims();
|
|
@@ -17258,6 +17295,7 @@ var MAX_UNFINISHED_EXTENSION_OPERATIONS = 10;
|
|
|
17258
17295
|
var sanitizeDaemonMessage = /* @__PURE__ */ __name((message) => redactUrlCredentials(stripAnsiAndControl(message)), "sanitizeDaemonMessage");
|
|
17259
17296
|
var redactExtensionDisplaySource = /* @__PURE__ */ __name((source) => {
|
|
17260
17297
|
const redacted = redactUrlCredentials(source);
|
|
17298
|
+
if (redacted.startsWith("upload:")) return redacted;
|
|
17261
17299
|
if (/^[A-Za-z]:[\\/]/.test(redacted)) return redacted;
|
|
17262
17300
|
try {
|
|
17263
17301
|
const url = new URL(redacted);
|
|
@@ -17947,6 +17985,39 @@ var EXTENSION_PREPARE_DEADLINE_MS = 10 * 6e4;
|
|
|
17947
17985
|
var EXTENSION_INTERACTION_DEADLINE_MS = 10 * 6e4;
|
|
17948
17986
|
var EXTENSION_INTERACTIVE_PREPARE_DEADLINE_MS = EXTENSION_PREPARE_DEADLINE_MS + EXTENSION_INTERACTION_DEADLINE_MS;
|
|
17949
17987
|
var EXTENSION_UPDATE_CHECK_DEADLINE_MS = 2 * 6e4;
|
|
17988
|
+
var EXTENSION_ARCHIVE_UPLOAD_LIMIT = "10mb";
|
|
17989
|
+
var extensionArchiveBodyParser = import_express2.default.raw({
|
|
17990
|
+
type: "application/octet-stream",
|
|
17991
|
+
limit: EXTENSION_ARCHIVE_UPLOAD_LIMIT
|
|
17992
|
+
});
|
|
17993
|
+
var parseExtensionArchiveFilename = /* @__PURE__ */ __name((value) => {
|
|
17994
|
+
const invalidCharacter = typeof value === "string" && Array.from(value).some((character) => {
|
|
17995
|
+
const code = character.charCodeAt(0);
|
|
17996
|
+
return character === "/" || character === "\\" || code < 32 || code === 127;
|
|
17997
|
+
});
|
|
17998
|
+
if (typeof value !== "string" || value.length === 0 || Buffer.byteLength(value, "utf8") > 255 || invalidCharacter) {
|
|
17999
|
+
return null;
|
|
18000
|
+
}
|
|
18001
|
+
const lower = value.toLowerCase();
|
|
18002
|
+
if (lower.endsWith(".tar.gz")) return { filename: value, suffix: ".tar.gz" };
|
|
18003
|
+
if (lower.endsWith(".zip")) return { filename: value, suffix: ".zip" };
|
|
18004
|
+
return null;
|
|
18005
|
+
}, "parseExtensionArchiveFilename");
|
|
18006
|
+
var extensionArchiveUploadMetadata = /* @__PURE__ */ __name((req, res, next) => {
|
|
18007
|
+
if (req.query["consent"] !== "true") {
|
|
18008
|
+
res.status(400).json({
|
|
18009
|
+
error: "Extension installation requires explicit consent"
|
|
18010
|
+
});
|
|
18011
|
+
return;
|
|
18012
|
+
}
|
|
18013
|
+
if (!parseExtensionArchiveFilename(req.query["filename"])) {
|
|
18014
|
+
res.status(400).json({
|
|
18015
|
+
error: "`filename` must name a .zip or .tar.gz archive"
|
|
18016
|
+
});
|
|
18017
|
+
return;
|
|
18018
|
+
}
|
|
18019
|
+
next();
|
|
18020
|
+
}, "extensionArchiveUploadMetadata");
|
|
17950
18021
|
var parseExtensionScope = /* @__PURE__ */ __name((body, res) => {
|
|
17951
18022
|
const scope = body["scope"];
|
|
17952
18023
|
if (scope !== "user" && scope !== "workspace") {
|
|
@@ -18388,6 +18459,127 @@ function registerWorkspaceExtensionRoutes(app, deps) {
|
|
|
18388
18459
|
}
|
|
18389
18460
|
}
|
|
18390
18461
|
);
|
|
18462
|
+
app.post(
|
|
18463
|
+
`${base}/install-archive`,
|
|
18464
|
+
mutate({ strict: true }),
|
|
18465
|
+
extensionArchiveUploadMetadata,
|
|
18466
|
+
extensionArchiveBodyParser,
|
|
18467
|
+
async (req, res) => {
|
|
18468
|
+
const ctrl = resolve5(req, res, true);
|
|
18469
|
+
if (!ctrl) return;
|
|
18470
|
+
try {
|
|
18471
|
+
if (!ctrl.validateExtensionMutationClient(req, res, {
|
|
18472
|
+
requireClientId: false
|
|
18473
|
+
})) {
|
|
18474
|
+
return;
|
|
18475
|
+
}
|
|
18476
|
+
const archiveName = parseExtensionArchiveFilename(
|
|
18477
|
+
req.query["filename"]
|
|
18478
|
+
);
|
|
18479
|
+
if (!req.is("application/octet-stream")) {
|
|
18480
|
+
res.status(415).json({
|
|
18481
|
+
error: "Extension archive uploads require application/octet-stream"
|
|
18482
|
+
});
|
|
18483
|
+
return;
|
|
18484
|
+
}
|
|
18485
|
+
if (!Buffer.isBuffer(req.body) || req.body.length === 0) {
|
|
18486
|
+
res.status(400).json({ error: "Extension archive is empty" });
|
|
18487
|
+
return;
|
|
18488
|
+
}
|
|
18489
|
+
let archive = req.body;
|
|
18490
|
+
const source = `upload:v1:${crypto2.randomUUID()}:${archiveName.filename}`;
|
|
18491
|
+
ctrl.runQueuedExtensionMutation(
|
|
18492
|
+
"install",
|
|
18493
|
+
{ source },
|
|
18494
|
+
res,
|
|
18495
|
+
async (extensionManager, _signal, context, operationId) => {
|
|
18496
|
+
let uploadDir;
|
|
18497
|
+
const sanitizeUploadError = /* @__PURE__ */ __name((error2) => {
|
|
18498
|
+
const sanitized = new Error(
|
|
18499
|
+
uploadDir ? getErrorMessage(error2).replaceAll(
|
|
18500
|
+
uploadDir,
|
|
18501
|
+
"<extension-upload-dir>"
|
|
18502
|
+
) : "Could not create the temporary extension upload directory"
|
|
18503
|
+
);
|
|
18504
|
+
const code = typeof error2 === "object" && error2 !== null && "code" in error2 && typeof error2.code === "string" ? error2.code : void 0;
|
|
18505
|
+
if (code) Object.assign(sanitized, { code });
|
|
18506
|
+
return sanitized;
|
|
18507
|
+
}, "sanitizeUploadError");
|
|
18508
|
+
let result;
|
|
18509
|
+
let failure;
|
|
18510
|
+
try {
|
|
18511
|
+
uploadDir = await fs4.mkdtemp(
|
|
18512
|
+
path9.join(os.tmpdir(), "qwen-extension-upload-")
|
|
18513
|
+
);
|
|
18514
|
+
const archivePath = path9.join(
|
|
18515
|
+
uploadDir,
|
|
18516
|
+
`extension${archiveName.suffix}`
|
|
18517
|
+
);
|
|
18518
|
+
await fs4.writeFile(archivePath, archive);
|
|
18519
|
+
archive = void 0;
|
|
18520
|
+
const prepared = await context.prepare(async (signal) => {
|
|
18521
|
+
supersedeActiveInstallOperations(ctrl, operationId);
|
|
18522
|
+
return await extensionManager.prepareExtensionInstall({
|
|
18523
|
+
installMetadata: { type: "local", source },
|
|
18524
|
+
localSourcePath: archivePath,
|
|
18525
|
+
initialActivation: { scope: "user" },
|
|
18526
|
+
requestConsent: /* @__PURE__ */ __name(() => Promise.resolve(), "requestConsent"),
|
|
18527
|
+
signal
|
|
18528
|
+
});
|
|
18529
|
+
});
|
|
18530
|
+
try {
|
|
18531
|
+
const committed = await context.commit(
|
|
18532
|
+
async (onCommitted) => await extensionManager.commitPreparedExtension(
|
|
18533
|
+
prepared,
|
|
18534
|
+
onCommitted
|
|
18535
|
+
)
|
|
18536
|
+
);
|
|
18537
|
+
result = {
|
|
18538
|
+
status: "installed",
|
|
18539
|
+
source,
|
|
18540
|
+
name: committed.identity.name,
|
|
18541
|
+
version: committed.version
|
|
18542
|
+
};
|
|
18543
|
+
} finally {
|
|
18544
|
+
await extensionManager.disposePreparedExtension(prepared);
|
|
18545
|
+
}
|
|
18546
|
+
} catch (error2) {
|
|
18547
|
+
failure = sanitizeUploadError(error2);
|
|
18548
|
+
}
|
|
18549
|
+
if (uploadDir) {
|
|
18550
|
+
try {
|
|
18551
|
+
await fs4.rm(uploadDir, { recursive: true, force: true });
|
|
18552
|
+
} catch (error2) {
|
|
18553
|
+
failure ??= sanitizeUploadError(error2);
|
|
18554
|
+
}
|
|
18555
|
+
}
|
|
18556
|
+
if (failure) throw failure;
|
|
18557
|
+
return result;
|
|
18558
|
+
},
|
|
18559
|
+
{
|
|
18560
|
+
createManager: /* @__PURE__ */ __name((operationId) => ctrl.createExtensionManager(
|
|
18561
|
+
void 0,
|
|
18562
|
+
void 0,
|
|
18563
|
+
extensionInteractionHandlers(ctrl, operationId)
|
|
18564
|
+
), "createManager"),
|
|
18565
|
+
onSettled: /* @__PURE__ */ __name((operationId) => {
|
|
18566
|
+
supersededInstallOperations.delete(operationId);
|
|
18567
|
+
cancelPendingExtensionInteraction(
|
|
18568
|
+
operationId,
|
|
18569
|
+
"Extension operation ended"
|
|
18570
|
+
);
|
|
18571
|
+
}, "onSettled"),
|
|
18572
|
+
deadlineMs: EXTENSION_INTERACTIVE_PREPARE_DEADLINE_MS,
|
|
18573
|
+
...globalReconciliationOptions()
|
|
18574
|
+
}
|
|
18575
|
+
);
|
|
18576
|
+
} catch (err) {
|
|
18577
|
+
sendBridgeError2(res, err, {
|
|
18578
|
+
route: `POST ${base}/install-archive`
|
|
18579
|
+
});
|
|
18580
|
+
}
|
|
18581
|
+
}
|
|
18582
|
+
);
|
|
18391
18583
|
app.post(`${base}/install`, mutate({ strict: true }), async (req, res) => {
|
|
18392
18584
|
const ctrl = resolve5(req, res, true);
|
|
18393
18585
|
if (!ctrl) return;
|
|
@@ -19621,13 +19813,13 @@ async function handlePostFileWrite(req, res, deps) {
|
|
|
19621
19813
|
req
|
|
19622
19814
|
);
|
|
19623
19815
|
if (originatorClientId === null) return;
|
|
19624
|
-
const
|
|
19816
|
+
const fs8 = factory.forRequest({
|
|
19625
19817
|
originatorClientId,
|
|
19626
19818
|
route: ROUTE2
|
|
19627
19819
|
});
|
|
19628
19820
|
try {
|
|
19629
|
-
const resolved = await
|
|
19630
|
-
const out = await
|
|
19821
|
+
const resolved = await fs8.resolve(queryPath, "write");
|
|
19822
|
+
const out = await fs8.writeTextAtomic(resolved, content, {
|
|
19631
19823
|
mode,
|
|
19632
19824
|
...expectedHash ? { expectedHash } : {},
|
|
19633
19825
|
...bom !== void 0 ? { bom } : {},
|
|
@@ -19680,13 +19872,13 @@ async function handlePostFileEdit(req, res, deps) {
|
|
|
19680
19872
|
req
|
|
19681
19873
|
);
|
|
19682
19874
|
if (originatorClientId === null) return;
|
|
19683
|
-
const
|
|
19875
|
+
const fs8 = factory.forRequest({
|
|
19684
19876
|
originatorClientId,
|
|
19685
19877
|
route: ROUTE2
|
|
19686
19878
|
});
|
|
19687
19879
|
try {
|
|
19688
|
-
const resolved = await
|
|
19689
|
-
const out = await
|
|
19880
|
+
const resolved = await fs8.resolve(queryPath, "edit");
|
|
19881
|
+
const out = await fs8.editAtomic(resolved, oldText, newText, {
|
|
19690
19882
|
expectedHash
|
|
19691
19883
|
});
|
|
19692
19884
|
applyReadHeaders(res);
|
|
@@ -20337,8 +20529,8 @@ function decodePathSegment(value) {
|
|
|
20337
20529
|
}
|
|
20338
20530
|
__name(decodePathSegment, "decodePathSegment");
|
|
20339
20531
|
function matchLegacySessionTelemetryRoute(method, requestPath) {
|
|
20340
|
-
const
|
|
20341
|
-
const requestSegments =
|
|
20532
|
+
const path15 = requestPath.length > 1 && requestPath.endsWith("/") ? requestPath.slice(0, -1) : requestPath;
|
|
20533
|
+
const requestSegments = path15.split("/").slice(1);
|
|
20342
20534
|
const prefix = requestSegments[0]?.toLowerCase();
|
|
20343
20535
|
if (prefix !== "session" && prefix !== "sessions" && prefix !== "permission") {
|
|
20344
20536
|
return void 0;
|
|
@@ -20390,23 +20582,23 @@ __name(setDaemonTelemetryWorkspace, "setDaemonTelemetryWorkspace");
|
|
|
20390
20582
|
function resolveDaemonTelemetryRoute(req) {
|
|
20391
20583
|
const legacyRoute = matchLegacySessionTelemetryRoute(req.method, req.path);
|
|
20392
20584
|
if (legacyRoute) return legacyRoute;
|
|
20393
|
-
const
|
|
20394
|
-
if (req.method === "GET" &&
|
|
20585
|
+
const path15 = req.path.replace(/\/$/, "") || "/";
|
|
20586
|
+
if (req.method === "GET" && path15 === "/daemon/status") {
|
|
20395
20587
|
return { route: "GET /daemon/status" };
|
|
20396
20588
|
}
|
|
20397
|
-
if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(
|
|
20589
|
+
if (req.method === "GET" && /^\/workspace\/[^/]+\/sessions$/.test(path15)) {
|
|
20398
20590
|
return { route: "GET /workspace/:id/sessions" };
|
|
20399
20591
|
}
|
|
20400
|
-
if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(
|
|
20592
|
+
if (req.method === "GET" && /^\/workspaces\/[^/]+\/sessions$/.test(path15)) {
|
|
20401
20593
|
return { route: "GET /workspace/:id/sessions" };
|
|
20402
20594
|
}
|
|
20403
|
-
if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(
|
|
20595
|
+
if (req.method === "GET" && /^\/workspace\/[^/]+\/session-info$/.test(path15)) {
|
|
20404
20596
|
return { route: "GET /workspace/:id/session-info" };
|
|
20405
20597
|
}
|
|
20406
|
-
if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(
|
|
20598
|
+
if (req.method === "GET" && /^\/workspaces\/[^/]+\/session-info$/.test(path15)) {
|
|
20407
20599
|
return { route: "GET /workspace/:id/session-info" };
|
|
20408
20600
|
}
|
|
20409
|
-
const workspaceTranscript =
|
|
20601
|
+
const workspaceTranscript = path15.match(
|
|
20410
20602
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/transcript$/
|
|
20411
20603
|
);
|
|
20412
20604
|
if (workspaceTranscript?.[1] && req.method === "GET") {
|
|
@@ -20415,7 +20607,7 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20415
20607
|
sessionId: decodePathSegment(workspaceTranscript[1])
|
|
20416
20608
|
};
|
|
20417
20609
|
}
|
|
20418
|
-
const workspaceExport =
|
|
20610
|
+
const workspaceExport = path15.match(
|
|
20419
20611
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/export$/
|
|
20420
20612
|
);
|
|
20421
20613
|
if (workspaceExport?.[1] && req.method === "GET") {
|
|
@@ -20424,7 +20616,7 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20424
20616
|
sessionId: decodePathSegment(workspaceExport[1])
|
|
20425
20617
|
};
|
|
20426
20618
|
}
|
|
20427
|
-
const workspaceArchivedExport =
|
|
20619
|
+
const workspaceArchivedExport = path15.match(
|
|
20428
20620
|
/^\/workspaces\/[^/]+\/session\/([^/]+)\/archive\/export$/
|
|
20429
20621
|
);
|
|
20430
20622
|
if (workspaceArchivedExport?.[1] && req.method === "GET") {
|
|
@@ -20434,8 +20626,8 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20434
20626
|
};
|
|
20435
20627
|
}
|
|
20436
20628
|
const pluralWorkspacePrefix = /^\/workspaces\/[^/]+/;
|
|
20437
|
-
if (pluralWorkspacePrefix.test(
|
|
20438
|
-
const suffix =
|
|
20629
|
+
if (pluralWorkspacePrefix.test(path15)) {
|
|
20630
|
+
const suffix = path15.replace(pluralWorkspacePrefix, "/workspace");
|
|
20439
20631
|
if (req.method === "GET") {
|
|
20440
20632
|
if (suffix === "/workspace/mcp" || suffix === "/workspace/skills" || suffix === "/workspace/tools" || suffix === "/workspace/providers" || suffix === "/workspace/env" || suffix === "/workspace/preflight" || suffix === "/workspace/hooks" || suffix === "/workspace/settings" || suffix === "/workspace/voice" || suffix === "/workspace/permissions" || suffix === "/workspace/trust" || suffix === "/workspace/memory" || suffix === "/workspace/agents") {
|
|
20441
20633
|
return { route: `GET ${suffix}` };
|
|
@@ -20494,58 +20686,58 @@ function resolveDaemonTelemetryRoute(req) {
|
|
|
20494
20686
|
return { route: "DELETE /workspace/session-groups/:groupId" };
|
|
20495
20687
|
}
|
|
20496
20688
|
}
|
|
20497
|
-
if (req.method === "POST" &&
|
|
20689
|
+
if (req.method === "POST" && path15 === "/workspace/init") {
|
|
20498
20690
|
return { route: "POST /workspace/init" };
|
|
20499
20691
|
}
|
|
20500
|
-
if (req.method === "POST" &&
|
|
20692
|
+
if (req.method === "POST" && path15 === "/workspace/setup-github") {
|
|
20501
20693
|
return { route: "POST /workspace/setup-github" };
|
|
20502
20694
|
}
|
|
20503
|
-
if (req.method === "POST" &&
|
|
20695
|
+
if (req.method === "POST" && path15 === "/workspace/reload") {
|
|
20504
20696
|
return { route: "POST /workspace/reload" };
|
|
20505
20697
|
}
|
|
20506
|
-
const mcpRestart =
|
|
20698
|
+
const mcpRestart = path15.match(/^\/workspace\/mcp\/([^/]+)\/restart$/);
|
|
20507
20699
|
if (mcpRestart?.[1] && req.method === "POST") {
|
|
20508
20700
|
return { route: "POST /workspace/mcp/:server/restart" };
|
|
20509
20701
|
}
|
|
20510
|
-
if (req.method === "POST" &&
|
|
20702
|
+
if (req.method === "POST" && path15 === "/workspace/mcp/servers") {
|
|
20511
20703
|
return { route: "POST /workspace/mcp/servers" };
|
|
20512
20704
|
}
|
|
20513
|
-
const mcpDelete =
|
|
20705
|
+
const mcpDelete = path15.match(/^\/workspace\/mcp\/servers\/([^/]+)$/);
|
|
20514
20706
|
if (mcpDelete?.[1] && req.method === "DELETE") {
|
|
20515
20707
|
return { route: "DELETE /workspace/mcp/servers/:name" };
|
|
20516
20708
|
}
|
|
20517
|
-
if (req.method === "POST" &&
|
|
20709
|
+
if (req.method === "POST" && path15 === "/workspace/auth/device-flow") {
|
|
20518
20710
|
return { route: "POST /workspace/auth/device-flow" };
|
|
20519
20711
|
}
|
|
20520
|
-
const deviceFlowDelete =
|
|
20712
|
+
const deviceFlowDelete = path15.match(
|
|
20521
20713
|
/^\/workspace\/auth\/device-flow\/([^/]+)$/
|
|
20522
20714
|
);
|
|
20523
20715
|
if (deviceFlowDelete?.[1] && req.method === "DELETE") {
|
|
20524
20716
|
return { route: "DELETE /workspace/auth/device-flow/:id" };
|
|
20525
20717
|
}
|
|
20526
|
-
const toolEnable =
|
|
20718
|
+
const toolEnable = path15.match(/^\/workspace\/tools\/([^/]+)\/enable$/);
|
|
20527
20719
|
if (toolEnable?.[1] && req.method === "POST") {
|
|
20528
20720
|
return { route: "POST /workspace/tools/:name/enable" };
|
|
20529
20721
|
}
|
|
20530
|
-
if (
|
|
20722
|
+
if (path15 === "/workspace/settings") {
|
|
20531
20723
|
if (req.method === "GET") return { route: "GET /workspace/settings" };
|
|
20532
20724
|
if (req.method === "POST") return { route: "POST /workspace/settings" };
|
|
20533
20725
|
}
|
|
20534
|
-
if (
|
|
20726
|
+
if (path15 === "/workspace/permissions") {
|
|
20535
20727
|
if (req.method === "GET") return { route: "GET /workspace/permissions" };
|
|
20536
20728
|
if (req.method === "POST") return { route: "POST /workspace/permissions" };
|
|
20537
20729
|
}
|
|
20538
|
-
if (
|
|
20730
|
+
if (path15 === "/workspace/trust") {
|
|
20539
20731
|
if (req.method === "GET") return { route: "GET /workspace/trust" };
|
|
20540
20732
|
}
|
|
20541
|
-
if (req.method === "POST" &&
|
|
20733
|
+
if (req.method === "POST" && path15 === "/workspace/trust/request") {
|
|
20542
20734
|
return { route: "POST /workspace/trust/request" };
|
|
20543
20735
|
}
|
|
20544
|
-
if (
|
|
20736
|
+
if (path15 === "/workspace/voice") {
|
|
20545
20737
|
if (req.method === "GET") return { route: "GET /workspace/voice" };
|
|
20546
20738
|
if (req.method === "POST") return { route: "POST /workspace/voice" };
|
|
20547
20739
|
}
|
|
20548
|
-
if (req.method === "POST" &&
|
|
20740
|
+
if (req.method === "POST" && path15 === "/workspace/voice/transcribe") {
|
|
20549
20741
|
return { route: "POST /workspace/voice/transcribe" };
|
|
20550
20742
|
}
|
|
20551
20743
|
return void 0;
|
|
@@ -20813,8 +21005,8 @@ __name(registerPermissionRoutes, "registerPermissionRoutes");
|
|
|
20813
21005
|
// packages/cli/src/serve/routes/session.ts
|
|
20814
21006
|
init_esbuild_shims();
|
|
20815
21007
|
import * as crypto3 from "node:crypto";
|
|
20816
|
-
import * as
|
|
20817
|
-
import * as
|
|
21008
|
+
import * as fs6 from "node:fs";
|
|
21009
|
+
import * as path10 from "node:path";
|
|
20818
21010
|
|
|
20819
21011
|
// packages/cli/src/serve/server/prompt-deadline.ts
|
|
20820
21012
|
init_esbuild_shims();
|
|
@@ -21505,7 +21697,7 @@ __name(deleteBranch, "deleteBranch");
|
|
|
21505
21697
|
|
|
21506
21698
|
// packages/cli/src/serve/virtual-subagent-sessions.ts
|
|
21507
21699
|
init_esbuild_shims();
|
|
21508
|
-
import * as
|
|
21700
|
+
import * as fs5 from "node:fs/promises";
|
|
21509
21701
|
import { createReadStream } from "node:fs";
|
|
21510
21702
|
import readline from "node:readline";
|
|
21511
21703
|
var PREFIX = "subagent.";
|
|
@@ -21699,7 +21891,7 @@ var VirtualSubagentTarget = class _VirtualSubagentTarget {
|
|
|
21699
21891
|
async readNewRecords(endOffset) {
|
|
21700
21892
|
let handle;
|
|
21701
21893
|
try {
|
|
21702
|
-
handle = await
|
|
21894
|
+
handle = await fs5.open(this.task.outputFile, "r");
|
|
21703
21895
|
const stat3 = await handle.stat();
|
|
21704
21896
|
const identity = `${stat3.dev}:${stat3.ino}`;
|
|
21705
21897
|
if (this.transcriptIdentity !== void 0 && this.transcriptIdentity !== identity || stat3.size < this.offset) {
|
|
@@ -21743,7 +21935,7 @@ var VirtualSubagentTarget = class _VirtualSubagentTarget {
|
|
|
21743
21935
|
const filePath = `${this.task.outputFile}.stream`;
|
|
21744
21936
|
let handle;
|
|
21745
21937
|
try {
|
|
21746
|
-
handle = await
|
|
21938
|
+
handle = await fs5.open(filePath, "r");
|
|
21747
21939
|
const stat3 = await handle.stat();
|
|
21748
21940
|
const identity = `${stat3.dev}:${stat3.ino}`;
|
|
21749
21941
|
if (this.streamIdentity !== void 0 && this.streamIdentity !== identity) {
|
|
@@ -21908,7 +22100,7 @@ var VirtualSubagentTarget = class _VirtualSubagentTarget {
|
|
|
21908
22100
|
async captureReadBounds() {
|
|
21909
22101
|
const size = /* @__PURE__ */ __name(async (filePath) => {
|
|
21910
22102
|
try {
|
|
21911
|
-
return (await
|
|
22103
|
+
return (await fs5.stat(filePath)).size;
|
|
21912
22104
|
} catch (error2) {
|
|
21913
22105
|
if (error2.code === "ENOENT") return 0;
|
|
21914
22106
|
throw error2;
|
|
@@ -22037,7 +22229,7 @@ var VirtualSubagentSessions = class {
|
|
|
22037
22229
|
const sessionDir = getSubagentSessionDir(projectDir, parentSessionId);
|
|
22038
22230
|
let names;
|
|
22039
22231
|
try {
|
|
22040
|
-
names = await
|
|
22232
|
+
names = await fs5.readdir(sessionDir);
|
|
22041
22233
|
} catch (error2) {
|
|
22042
22234
|
if (error2.code === "ENOENT") return void 0;
|
|
22043
22235
|
throw error2;
|
|
@@ -22093,7 +22285,7 @@ var VirtualSubagentSessions = class {
|
|
|
22093
22285
|
const sessionDir = getSubagentSessionDir(projectDir, parentSessionId);
|
|
22094
22286
|
let names;
|
|
22095
22287
|
try {
|
|
22096
|
-
names = await
|
|
22288
|
+
names = await fs5.readdir(sessionDir);
|
|
22097
22289
|
} catch (error2) {
|
|
22098
22290
|
if (error2.code === "ENOENT") return void 0;
|
|
22099
22291
|
throw error2;
|
|
@@ -22239,7 +22431,7 @@ var GIT_RESERVED_BRANCH = "HEAD";
|
|
|
22239
22431
|
var MAX_BRANCH_NAME_BYTES = 1e3;
|
|
22240
22432
|
var MAX_BRANCH_COMPONENT_BYTES = 200;
|
|
22241
22433
|
var HTTP_SESSION_ID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
22242
|
-
var WORKSPACE_TRANSCRIPT_RESPONSE_MAX_BYTES =
|
|
22434
|
+
var WORKSPACE_TRANSCRIPT_RESPONSE_MAX_BYTES = 2 * SESSION_TRANSCRIPT_MAX_EXPANDED_PAGE_BYTES;
|
|
22243
22435
|
var WORKSPACE_TRANSCRIPT_CURSOR_MAX_BYTES = 64 * 1024;
|
|
22244
22436
|
var TRANSCRIPT_CURSOR_TOO_LARGE_REPLAY_ERROR = "Transcript pagination state exceeds the safe limit";
|
|
22245
22437
|
var CHANNEL_DELIVERY_AUTHORIZATION_GRACE_MS = 6e4;
|
|
@@ -22582,7 +22774,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
22582
22774
|
const workspaceParam = req.params[paramName] ?? "";
|
|
22583
22775
|
const byId = workspaceRegistry.getByWorkspaceId(workspaceParam);
|
|
22584
22776
|
if (byId) return byId;
|
|
22585
|
-
if (!
|
|
22777
|
+
if (!path10.isAbsolute(workspaceParam)) {
|
|
22586
22778
|
res.status(400).json({
|
|
22587
22779
|
error: `\`:${paramName}\` must decode to a workspace id or absolute path`
|
|
22588
22780
|
});
|
|
@@ -23473,7 +23665,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23473
23665
|
if (worktreeMeta) {
|
|
23474
23666
|
try {
|
|
23475
23667
|
const createAllowedRoots = [
|
|
23476
|
-
|
|
23668
|
+
path10.join(workspaceCwd, ".qwen", "worktrees")
|
|
23477
23669
|
];
|
|
23478
23670
|
let createRepoTop = null;
|
|
23479
23671
|
try {
|
|
@@ -23484,7 +23676,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
23484
23676
|
}
|
|
23485
23677
|
if (createRepoTop && createRepoTop !== workspaceCwd) {
|
|
23486
23678
|
createAllowedRoots.push(
|
|
23487
|
-
|
|
23679
|
+
path10.join(createRepoTop, ".qwen", "worktrees")
|
|
23488
23680
|
);
|
|
23489
23681
|
}
|
|
23490
23682
|
await runtime.bridge.changeSessionCwd(session.sessionId, {
|
|
@@ -23783,10 +23975,10 @@ function registerSessionRoutes(app, deps) {
|
|
|
23783
23975
|
if (sidecar) {
|
|
23784
23976
|
let realTarget;
|
|
23785
23977
|
const candidateRoots = [
|
|
23786
|
-
|
|
23978
|
+
path10.join(workspaceCwd, ".qwen", "worktrees")
|
|
23787
23979
|
];
|
|
23788
23980
|
try {
|
|
23789
|
-
realTarget =
|
|
23981
|
+
realTarget = fs6.realpathSync(sidecar.worktreePath);
|
|
23790
23982
|
let repoTop = null;
|
|
23791
23983
|
try {
|
|
23792
23984
|
repoTop = await new GitWorktreeService(
|
|
@@ -23795,13 +23987,13 @@ function registerSessionRoutes(app, deps) {
|
|
|
23795
23987
|
} catch {
|
|
23796
23988
|
}
|
|
23797
23989
|
if (repoTop && repoTop !== workspaceCwd) {
|
|
23798
|
-
candidateRoots.push(
|
|
23990
|
+
candidateRoots.push(path10.join(repoTop, ".qwen", "worktrees"));
|
|
23799
23991
|
}
|
|
23800
23992
|
const contained = candidateRoots.some((root) => {
|
|
23801
23993
|
try {
|
|
23802
|
-
const realRoot =
|
|
23803
|
-
const rel =
|
|
23804
|
-
return !rel.startsWith("..") && !
|
|
23994
|
+
const realRoot = fs6.realpathSync(root);
|
|
23995
|
+
const rel = path10.relative(realRoot, realTarget);
|
|
23996
|
+
return !rel.startsWith("..") && !path10.isAbsolute(rel);
|
|
23805
23997
|
} catch {
|
|
23806
23998
|
return false;
|
|
23807
23999
|
}
|
|
@@ -24117,7 +24309,7 @@ function registerSessionRoutes(app, deps) {
|
|
|
24117
24309
|
async (req, res, sessionId, runtime) => {
|
|
24118
24310
|
const body = safeBody(req);
|
|
24119
24311
|
const targetPath = body["path"];
|
|
24120
|
-
if (typeof targetPath !== "string" || targetPath.length === 0 || !
|
|
24312
|
+
if (typeof targetPath !== "string" || targetPath.length === 0 || !path10.isAbsolute(targetPath)) {
|
|
24121
24313
|
res.status(400).json({
|
|
24122
24314
|
error: "`path` is required and must be an absolute path",
|
|
24123
24315
|
code: "invalid_path"
|
|
@@ -27151,7 +27343,7 @@ __name(registerUsageStatsRoutes, "registerUsageStatsRoutes");
|
|
|
27151
27343
|
// packages/cli/src/serve/scheduled-task-keepalive.ts
|
|
27152
27344
|
init_esbuild_shims();
|
|
27153
27345
|
import * as fsSync from "node:fs";
|
|
27154
|
-
import * as
|
|
27346
|
+
import * as path11 from "node:path";
|
|
27155
27347
|
var log = createDebugLogger("SCHED_KEEPALIVE");
|
|
27156
27348
|
function collectBoundSessionIds(tasks) {
|
|
27157
27349
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -27377,8 +27569,8 @@ function startScheduledTaskKeepalive(opts) {
|
|
|
27377
27569
|
opts.runtimeBaseDir,
|
|
27378
27570
|
() => getCronFilePath(boundWorkspace)
|
|
27379
27571
|
);
|
|
27380
|
-
const cronDir =
|
|
27381
|
-
const cronFileName =
|
|
27572
|
+
const cronDir = path11.dirname(cronFilePath);
|
|
27573
|
+
const cronFileName = path11.basename(cronFilePath);
|
|
27382
27574
|
let fileWatcher;
|
|
27383
27575
|
try {
|
|
27384
27576
|
fsSync.mkdirSync(cronDir, { recursive: true });
|
|
@@ -30323,7 +30515,7 @@ __name(registerWorkspaceModelsRoutes, "registerWorkspaceModelsRoutes");
|
|
|
30323
30515
|
// packages/cli/src/serve/routes/a2ui-action.ts
|
|
30324
30516
|
init_esbuild_shims();
|
|
30325
30517
|
import * as fsp4 from "node:fs/promises";
|
|
30326
|
-
import * as
|
|
30518
|
+
import * as path12 from "node:path";
|
|
30327
30519
|
var A2UI_MIME = "application/a2ui+json";
|
|
30328
30520
|
var ACTION_TOOL = "action";
|
|
30329
30521
|
var CALL_TIMEOUT_MS = 15e3;
|
|
@@ -30346,7 +30538,7 @@ __name(usableServerConfig, "usableServerConfig");
|
|
|
30346
30538
|
async function findFromSettingsFile(workspaceCwd) {
|
|
30347
30539
|
try {
|
|
30348
30540
|
const raw = await fsp4.readFile(
|
|
30349
|
-
|
|
30541
|
+
path12.join(workspaceCwd, ".qwen", "settings.json"),
|
|
30350
30542
|
"utf8"
|
|
30351
30543
|
);
|
|
30352
30544
|
const settings = JSON.parse(raw);
|
|
@@ -30507,7 +30699,7 @@ __name(registerA2uiActionRoutes, "registerA2uiActionRoutes");
|
|
|
30507
30699
|
|
|
30508
30700
|
// packages/cli/src/serve/server/fs-factory.ts
|
|
30509
30701
|
init_esbuild_shims();
|
|
30510
|
-
import * as
|
|
30702
|
+
import * as path13 from "node:path";
|
|
30511
30703
|
var IDE_WORKSPACE_PATH_ENV_VAR = "QWEN_CODE_IDE_WORKSPACE_PATH";
|
|
30512
30704
|
function createDefaultFsAuditEmit() {
|
|
30513
30705
|
const WARN_EVERY = 100;
|
|
@@ -30582,14 +30774,14 @@ function parseIdeWorkspacePathEnv(value) {
|
|
|
30582
30774
|
const parsed = JSON.parse(value);
|
|
30583
30775
|
if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
|
|
30584
30776
|
return parsed.filter(
|
|
30585
|
-
(workspace) => workspace.length > 0 &&
|
|
30777
|
+
(workspace) => workspace.length > 0 && path13.isAbsolute(workspace)
|
|
30586
30778
|
);
|
|
30587
30779
|
}
|
|
30588
30780
|
throw new Error("IDE workspace path JSON must be a string array");
|
|
30589
30781
|
} catch {
|
|
30590
30782
|
}
|
|
30591
30783
|
}
|
|
30592
|
-
return value.split(
|
|
30784
|
+
return value.split(path13.delimiter).filter((workspace) => workspace.length > 0 && path13.isAbsolute(workspace));
|
|
30593
30785
|
}
|
|
30594
30786
|
__name(parseIdeWorkspacePathEnv, "parseIdeWorkspacePathEnv");
|
|
30595
30787
|
function dropNestedWorkspacesPreservingPrimary(workspaces) {
|
|
@@ -30858,9 +31050,9 @@ __name(setupDeviceFlowRegistry, "setupDeviceFlowRegistry");
|
|
|
30858
31050
|
|
|
30859
31051
|
// packages/cli/src/serve/server/error-handlers.ts
|
|
30860
31052
|
init_esbuild_shims();
|
|
30861
|
-
var
|
|
31053
|
+
var import_express3 = __toESM(require_express(), 1);
|
|
30862
31054
|
function installJsonBodyParser(app) {
|
|
30863
|
-
app.use(
|
|
31055
|
+
app.use(import_express3.default.json({ limit: "10mb" }));
|
|
30864
31056
|
app.use((err, _req, res, next) => {
|
|
30865
31057
|
if (sendJsonBodyParserError(res, err)) return;
|
|
30866
31058
|
next(err);
|
|
@@ -30914,10 +31106,10 @@ function installRateLimiter(app, opts, daemonLog, options = {}) {
|
|
|
30914
31106
|
{ tier, key: key.slice(0, 64) }
|
|
30915
31107
|
);
|
|
30916
31108
|
} : void 0,
|
|
30917
|
-
onError: daemonLog ? (err,
|
|
31109
|
+
onError: daemonLog ? (err, path15) => {
|
|
30918
31110
|
daemonLog.warn(
|
|
30919
31111
|
`rate limiter error (fail-open): ${err instanceof Error ? err.message : String(err)}`,
|
|
30920
|
-
{ path:
|
|
31112
|
+
{ path: path15 }
|
|
30921
31113
|
);
|
|
30922
31114
|
} : void 0
|
|
30923
31115
|
});
|
|
@@ -31113,7 +31305,7 @@ __name(registerWorkspaceQualifiedLifecycleRoutes, "registerWorkspaceQualifiedLif
|
|
|
31113
31305
|
init_esbuild_shims();
|
|
31114
31306
|
import { readdir as readdir2, stat as stat2 } from "node:fs/promises";
|
|
31115
31307
|
import { realpathSync as realpathSync3 } from "node:fs";
|
|
31116
|
-
import { basename as basename4, dirname as dirname4, isAbsolute as isAbsolute7, join as
|
|
31308
|
+
import { basename as basename4, dirname as dirname4, isAbsolute as isAbsolute7, join as join8, resolve as resolve4, sep as sep3 } from "node:path";
|
|
31117
31309
|
|
|
31118
31310
|
// packages/cli/src/serve/native-directory-picker.ts
|
|
31119
31311
|
init_esbuild_shims();
|
|
@@ -31499,7 +31691,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31499
31691
|
return;
|
|
31500
31692
|
}
|
|
31501
31693
|
const endsWithSep = prefix.endsWith("/") || process.platform === "win32" && prefix.endsWith("\\");
|
|
31502
|
-
const dir = endsWithSep ?
|
|
31694
|
+
const dir = endsWithSep ? join8(prefix, ".") : dirname4(prefix);
|
|
31503
31695
|
const filter = endsWithSep ? "" : basename4(prefix);
|
|
31504
31696
|
const filterLower = filter.toLowerCase();
|
|
31505
31697
|
const suggestions = [];
|
|
@@ -31515,7 +31707,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31515
31707
|
let isDir = entry.isDirectory();
|
|
31516
31708
|
if (!isDir && entry.isSymbolicLink()) {
|
|
31517
31709
|
try {
|
|
31518
|
-
isDir = (await stat2(
|
|
31710
|
+
isDir = (await stat2(join8(dir, entry.name))).isDirectory();
|
|
31519
31711
|
} catch {
|
|
31520
31712
|
continue;
|
|
31521
31713
|
}
|
|
@@ -31525,7 +31717,7 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31525
31717
|
truncated = true;
|
|
31526
31718
|
break;
|
|
31527
31719
|
}
|
|
31528
|
-
suggestions.push({ name: entry.name, path:
|
|
31720
|
+
suggestions.push({ name: entry.name, path: join8(dir, entry.name) });
|
|
31529
31721
|
}
|
|
31530
31722
|
} catch {
|
|
31531
31723
|
}
|
|
@@ -31545,11 +31737,11 @@ function registerWorkspaceManagementRoutes(app, deps) {
|
|
|
31545
31737
|
const controller = new AbortController();
|
|
31546
31738
|
res.on("close", () => controller.abort());
|
|
31547
31739
|
try {
|
|
31548
|
-
const
|
|
31740
|
+
const path15 = await pickWorkspaceDirectory(controller.signal);
|
|
31549
31741
|
res.status(200).json({
|
|
31550
31742
|
kind: "workspace-directory-picker",
|
|
31551
|
-
selected:
|
|
31552
|
-
...
|
|
31743
|
+
selected: path15 !== void 0,
|
|
31744
|
+
...path15 === void 0 ? {} : { path: path15 }
|
|
31553
31745
|
});
|
|
31554
31746
|
} catch (error2) {
|
|
31555
31747
|
const detail = error2 instanceof Error ? error2.message : String(error2);
|
|
@@ -32606,8 +32798,8 @@ function buildDiffList(workspaceCwd, result) {
|
|
|
32606
32798
|
hiddenCount: 0
|
|
32607
32799
|
};
|
|
32608
32800
|
}
|
|
32609
|
-
const files = [...result.perFileStats.entries()].map(([
|
|
32610
|
-
path:
|
|
32801
|
+
const files = [...result.perFileStats.entries()].map(([path15, s]) => ({
|
|
32802
|
+
path: path15,
|
|
32611
32803
|
oldPath: s.oldPath,
|
|
32612
32804
|
added: s.added,
|
|
32613
32805
|
removed: s.removed,
|
|
@@ -34696,18 +34888,43 @@ function parsePairingCode(body, res) {
|
|
|
34696
34888
|
return code.trim().toUpperCase();
|
|
34697
34889
|
}
|
|
34698
34890
|
__name(parsePairingCode, "parsePairingCode");
|
|
34699
|
-
function
|
|
34891
|
+
function parsePairingApprovalSubject(body, res) {
|
|
34700
34892
|
const senderId = body["senderId"];
|
|
34701
|
-
|
|
34893
|
+
const groupId = body["groupId"];
|
|
34894
|
+
if (senderId !== void 0 && groupId !== void 0) {
|
|
34895
|
+
res.status(400).json({
|
|
34896
|
+
error: "Provide exactly one of `senderId` or `groupId`.",
|
|
34897
|
+
code: "invalid_channel_pairing_subject"
|
|
34898
|
+
});
|
|
34899
|
+
return void 0;
|
|
34900
|
+
}
|
|
34901
|
+
if (senderId !== void 0) {
|
|
34902
|
+
if (typeof senderId === "string" && senderId.length > 0) {
|
|
34903
|
+
return { type: "user", id: senderId };
|
|
34904
|
+
}
|
|
34702
34905
|
res.status(400).json({
|
|
34703
34906
|
error: "`senderId` must be a non-empty string.",
|
|
34704
34907
|
code: "invalid_channel_pairing_sender_id"
|
|
34705
34908
|
});
|
|
34706
34909
|
return void 0;
|
|
34707
34910
|
}
|
|
34708
|
-
|
|
34911
|
+
if (groupId !== void 0) {
|
|
34912
|
+
if (typeof groupId === "string" && groupId.length > 0) {
|
|
34913
|
+
return { type: "group", id: groupId };
|
|
34914
|
+
}
|
|
34915
|
+
res.status(400).json({
|
|
34916
|
+
error: "`groupId` must be a non-empty string.",
|
|
34917
|
+
code: "invalid_channel_pairing_group_id"
|
|
34918
|
+
});
|
|
34919
|
+
return void 0;
|
|
34920
|
+
}
|
|
34921
|
+
res.status(400).json({
|
|
34922
|
+
error: "Provide exactly one of `senderId` or `groupId`.",
|
|
34923
|
+
code: "invalid_channel_pairing_subject"
|
|
34924
|
+
});
|
|
34925
|
+
return void 0;
|
|
34709
34926
|
}
|
|
34710
|
-
__name(
|
|
34927
|
+
__name(parsePairingApprovalSubject, "parsePairingApprovalSubject");
|
|
34711
34928
|
function errorCode2(error2) {
|
|
34712
34929
|
if (!error2 || typeof error2 !== "object") return void 0;
|
|
34713
34930
|
try {
|
|
@@ -34881,11 +35098,11 @@ function registerWorkspaceChannelManagementRoutes(app, deps) {
|
|
|
34881
35098
|
if (!resolved || !validateClient(req, res, resolved.runtime)) return;
|
|
34882
35099
|
const name = parseInstanceName(req, res);
|
|
34883
35100
|
if (!name) return;
|
|
34884
|
-
const
|
|
34885
|
-
if (!
|
|
35101
|
+
const subject = parsePairingApprovalSubject(deps.safeBody(req), res);
|
|
35102
|
+
if (!subject) return;
|
|
34886
35103
|
try {
|
|
34887
35104
|
noStore(res);
|
|
34888
|
-
res.status(200).json(await resolved.service.revokePairingApproval(name,
|
|
35105
|
+
res.status(200).json(await resolved.service.revokePairingApproval(name, subject));
|
|
34889
35106
|
} catch (error2) {
|
|
34890
35107
|
sendManagementError(res, error2);
|
|
34891
35108
|
}
|
|
@@ -35489,7 +35706,7 @@ __name(registerWorkspaceQualifiedSkillsRoutes, "registerWorkspaceQualifiedSkills
|
|
|
35489
35706
|
|
|
35490
35707
|
// packages/cli/src/serve/routes/channel-webhooks.ts
|
|
35491
35708
|
init_esbuild_shims();
|
|
35492
|
-
var
|
|
35709
|
+
var import_express4 = __toESM(require_express(), 1);
|
|
35493
35710
|
import { createHash as createHash4, timingSafeEqual as timingSafeEqual2 } from "node:crypto";
|
|
35494
35711
|
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set([
|
|
35495
35712
|
"__proto__",
|
|
@@ -35538,7 +35755,7 @@ function registerChannelWebhookRoutes(app, deps) {
|
|
|
35538
35755
|
locals.channelWebhook = { channelName, source, sourceConfig };
|
|
35539
35756
|
next();
|
|
35540
35757
|
},
|
|
35541
|
-
|
|
35758
|
+
import_express4.default.json({ limit: "1mb" }),
|
|
35542
35759
|
async (req, res) => {
|
|
35543
35760
|
const locals = res.locals;
|
|
35544
35761
|
const webhook = locals.channelWebhook;
|
|
@@ -39037,10 +39254,10 @@ __name(registerLiveSetupRoutes, "registerLiveSetupRoutes");
|
|
|
39037
39254
|
init_esbuild_shims();
|
|
39038
39255
|
import { execFile as execFile3 } from "node:child_process";
|
|
39039
39256
|
import { createHash as createHash5, randomUUID as randomUUID11 } from "node:crypto";
|
|
39040
|
-
import * as
|
|
39257
|
+
import * as fs7 from "node:fs";
|
|
39041
39258
|
import * as fsp5 from "node:fs/promises";
|
|
39042
|
-
import * as
|
|
39043
|
-
import * as
|
|
39259
|
+
import * as os2 from "node:os";
|
|
39260
|
+
import * as path14 from "node:path";
|
|
39044
39261
|
import { Readable, Transform } from "node:stream";
|
|
39045
39262
|
import { pipeline } from "node:stream/promises";
|
|
39046
39263
|
import { promisify as promisify3 } from "node:util";
|
|
@@ -39118,7 +39335,7 @@ async function readBundleValue(appPath, key) {
|
|
|
39118
39335
|
"raw",
|
|
39119
39336
|
"-o",
|
|
39120
39337
|
"-",
|
|
39121
|
-
|
|
39338
|
+
path14.join(appPath, "Contents", "Info.plist")
|
|
39122
39339
|
]);
|
|
39123
39340
|
}
|
|
39124
39341
|
__name(readBundleValue, "readBundleValue");
|
|
@@ -39213,7 +39430,7 @@ async function downloadAsset(asset, destination, onProgress) {
|
|
|
39213
39430
|
await pipeline(
|
|
39214
39431
|
Readable.fromWeb(response.body),
|
|
39215
39432
|
guard,
|
|
39216
|
-
|
|
39433
|
+
fs7.createWriteStream(destination, { flags: "wx", mode: 384 })
|
|
39217
39434
|
);
|
|
39218
39435
|
if (received !== asset.size || hash.digest("hex") !== asset.sha256) {
|
|
39219
39436
|
throw new Error("Live Host checksum verification failed.");
|
|
@@ -39224,11 +39441,11 @@ async function installLatestHost(currentArchitecture, onStatus) {
|
|
|
39224
39441
|
const manifest = await fetchManifest();
|
|
39225
39442
|
const asset = manifest.assets[currentArchitecture];
|
|
39226
39443
|
const temporaryDirectory = await fsp5.mkdtemp(
|
|
39227
|
-
|
|
39444
|
+
path14.join(os2.tmpdir(), "qwen-live-host-")
|
|
39228
39445
|
);
|
|
39229
|
-
const archivePath =
|
|
39230
|
-
const extractedPath =
|
|
39231
|
-
const candidatePath =
|
|
39446
|
+
const archivePath = path14.join(temporaryDirectory, asset.name);
|
|
39447
|
+
const extractedPath = path14.join(temporaryDirectory, "extracted");
|
|
39448
|
+
const candidatePath = path14.join(extractedPath, LIVE_HOST_APP_NAME);
|
|
39232
39449
|
const stagingPath = `/Applications/.Qwen Live Host.install-${randomUUID11()}.app`;
|
|
39233
39450
|
const backupPath = `/Applications/.Qwen Live Host.backup-${randomUUID11()}.app`;
|
|
39234
39451
|
let movedExisting = false;
|
|
@@ -39376,13 +39593,13 @@ var LiveHostInstaller = class {
|
|
|
39376
39593
|
init_esbuild_shims();
|
|
39377
39594
|
import { createHash as createHash6, randomUUID as randomUUID12 } from "node:crypto";
|
|
39378
39595
|
import { createWriteStream as createWriteStream2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
39379
|
-
import { join as
|
|
39596
|
+
import { join as join11 } from "node:path";
|
|
39380
39597
|
|
|
39381
39598
|
// packages/cli/src/serve/live/realtime-startup-context.ts
|
|
39382
39599
|
init_esbuild_shims();
|
|
39383
39600
|
import { readdirSync } from "node:fs";
|
|
39384
39601
|
import { homedir } from "node:os";
|
|
39385
|
-
import { basename as basename5, join as
|
|
39602
|
+
import { basename as basename5, join as join10 } from "node:path";
|
|
39386
39603
|
var STARTUP_CONTEXT_HEADER = "Startup context from Qwen Code.\nThis is background context about recent work and machine/workspace layout. It may be incomplete or stale. Use it to inform responses, and do not repeat it back unless relevant.";
|
|
39387
39604
|
var CURRENT_THREAD_SECTION_TOKEN_BUDGET = 1200;
|
|
39388
39605
|
var RECENT_WORK_SECTION_TOKEN_BUDGET = 2200;
|
|
@@ -39624,7 +39841,7 @@ function collectTreeLines(directory, depth, lines) {
|
|
|
39624
39841
|
const indent = " ".repeat(depth);
|
|
39625
39842
|
lines.push(`${indent}- ${entry.name}${entry.isDirectory() ? "/" : ""}`);
|
|
39626
39843
|
if (entry.isDirectory()) {
|
|
39627
|
-
collectTreeLines(
|
|
39844
|
+
collectTreeLines(join10(directory, entry.name), depth + 1, lines);
|
|
39628
39845
|
}
|
|
39629
39846
|
}
|
|
39630
39847
|
if (entries.length > DIR_ENTRY_LIMIT) {
|
|
@@ -39743,13 +39960,13 @@ function openLiveAudioCapture(source, identifier) {
|
|
|
39743
39960
|
try {
|
|
39744
39961
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
39745
39962
|
const safeIdentifier = identifier.replace(/[^A-Za-z0-9_-]/g, "_");
|
|
39746
|
-
const
|
|
39963
|
+
const path15 = join11(
|
|
39747
39964
|
directory,
|
|
39748
39965
|
`${source}-${Date.now()}-${safeIdentifier}.pcm`
|
|
39749
39966
|
);
|
|
39750
|
-
const stream = createWriteStream2(
|
|
39967
|
+
const stream = createWriteStream2(path15, { flags: "wx", mode: 384 });
|
|
39751
39968
|
stream.on("error", () => void 0);
|
|
39752
|
-
return { source, path:
|
|
39969
|
+
return { source, path: path15, stream, hash: createHash6("sha256"), bytes: 0 };
|
|
39753
39970
|
} catch {
|
|
39754
39971
|
return void 0;
|
|
39755
39972
|
}
|
|
@@ -42115,7 +42332,7 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
|
|
|
42115
42332
|
"createServeApp: deps.workspaceRuntimeRemoval requires the matching deps.voiceCoordinator."
|
|
42116
42333
|
);
|
|
42117
42334
|
}
|
|
42118
|
-
const app = (0,
|
|
42335
|
+
const app = (0, import_express5.default)();
|
|
42119
42336
|
const injectedWorkspaceRegistry = deps.workspaceRegistry;
|
|
42120
42337
|
const boundWorkspace = injectedWorkspaceRegistry?.primary.workspaceCwd ?? deps.boundWorkspace ?? canonicalizeWorkspace(opts.workspace ?? process.cwd());
|
|
42121
42338
|
if (injectedWorkspaceRegistry) {
|
|
@@ -42292,8 +42509,9 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
|
|
|
42292
42509
|
// Wire the production status provider so direct embeds / tests
|
|
42293
42510
|
// that don't inject `deps.bridge` get daemon env + preflight cells.
|
|
42294
42511
|
statusProvider,
|
|
42295
|
-
|
|
42296
|
-
//
|
|
42512
|
+
delegateReadTextFileToClient: false,
|
|
42513
|
+
// Final ACP text writes remain delegated through WorkspaceFileSystem.
|
|
42514
|
+
// Unexpected delegated reads still fail closed at the WFS boundary.
|
|
42297
42515
|
fileSystem: createBridgeFileSystemAdapter(fsFactory),
|
|
42298
42516
|
// Reverse tool channel: answer the child's `client_mcp/message`
|
|
42299
42517
|
// ext-method by reaching the WS connection that hosts the named server.
|
|
@@ -42830,7 +43048,8 @@ function createServeApp(opts, getPort = () => opts.port, deps = {}) {
|
|
|
42830
43048
|
getChannelWorkerSnapshots: deps.getChannelWorkerSnapshots,
|
|
42831
43049
|
getPerfSnapshot: deps.getPerfSnapshot,
|
|
42832
43050
|
getMetricsSeries: deps.getMetricsSeries,
|
|
42833
|
-
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot ?? totalSessionAdmission?.snapshot
|
|
43051
|
+
getTotalSessionAdmissionSnapshot: deps.getTotalSessionAdmissionSnapshot ?? totalSessionAdmission?.snapshot,
|
|
43052
|
+
getChildHeapPolicySnapshot: deps.getChildHeapPolicySnapshot
|
|
42834
43053
|
});
|
|
42835
43054
|
if (liveVoiceEnabled) {
|
|
42836
43055
|
app.use("/capabilities", (_req, _res, next) => {
|