@qwen-code/qwen-code 0.21.0 → 0.21.1-simplify-system-prompt.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{MaxSizedBox-5DPPWPGT.js → MaxSizedBox-INHRH72H.js} +11 -10
- package/chunks/{StandaloneSessionPicker-BIRMPLRD.js → StandaloneSessionPicker-O6RKBPU4.js} +25 -24
- package/chunks/{acpAgent-6J2U72PQ.js → acpAgent-HYFVXVDR.js} +119 -74
- package/chunks/{agent-6ODUANDO.js → agent-VXDAN5JK.js} +10 -9
- package/chunks/{agent-headless-7BYQTMHW.js → agent-headless-K4ZMMNBD.js} +10 -9
- package/chunks/{anthropicContentGenerator-75BKLTSP.js → anthropicContentGenerator-LXUXMOE7.js} +20 -9
- package/chunks/{bridge-ZUB64FAE.js → bridge-LGPZCFHO.js} +14 -13
- package/chunks/channel-management-service-G74LFADV.js +403 -0
- package/chunks/channel-settings-store-CHCDRTPY.js +89 -0
- package/chunks/{channel-worker-group-2ZD7TVAT.js → channel-worker-group-PTJIJSKC.js} +6 -5
- package/chunks/{channel-worker-manager-4OA4BCGB.js → channel-worker-manager-WIMGM2FD.js} +6 -5
- package/chunks/{channel-worker-supervisor-V7KCFJTS.js → channel-worker-supervisor-KUFTR6P5.js} +5 -4
- package/chunks/{chunk-OFDOK3VM.js → chunk-2JM6GZ5D.js} +3 -3
- package/chunks/{chunk-H4SBPHSA.js → chunk-2OM7GEXO.js} +1 -1
- package/chunks/{chunk-TGILQ3YH.js → chunk-2Q3OT4OV.js} +7 -7
- package/chunks/{chunk-PC6JANNU.js → chunk-2YZJCM5T.js} +4 -4
- package/chunks/{chunk-QAF7NMK7.js → chunk-32MVHM4T.js} +1 -1
- package/chunks/{chunk-K36B6G2O.js → chunk-3HBZKBMQ.js} +3 -3
- package/chunks/{chunk-GSN55ZRI.js → chunk-3IXOIAKE.js} +4 -4
- package/chunks/{chunk-IJTOWOD7.js → chunk-3JAQDSXN.js} +12 -0
- package/chunks/{chunk-UDX5OBWR.js → chunk-3MSHSCSN.js} +2 -2
- package/chunks/{chunk-ZFDTEDCF.js → chunk-4M377AZG.js} +3 -3
- package/chunks/{chunk-U7M2DMGW.js → chunk-52O2CIUL.js} +2 -2
- package/chunks/{chunk-R5AFZNQW.js → chunk-5THCYPLO.js} +3 -3
- package/chunks/{chunk-7MVVZO4N.js → chunk-5U4IPFBR.js} +4 -4
- package/chunks/{chunk-KIM5GUMA.js → chunk-66RMLJHC.js} +21 -21
- package/chunks/{chunk-FSITMZJH.js → chunk-6PSLCFQ2.js} +5 -5
- package/chunks/{chunk-ACY3A37B.js → chunk-7FZEBPKS.js} +3 -3
- package/chunks/{chunk-7JURR4JT.js → chunk-A6UO2C7C.js} +1 -1
- package/chunks/{chunk-JLU636DO.js → chunk-ALMR3E6Q.js} +1 -0
- package/chunks/{chunk-PWVFN2LF.js → chunk-B4UMZKMU.js} +1 -1
- package/chunks/{chunk-SQCQ4KO2.js → chunk-B6ZJ7SI6.js} +14 -14
- package/chunks/{chunk-YPE6A4GC.js → chunk-B7QDM6Z7.js} +1 -1
- package/chunks/{chunk-NIBLUX3Y.js → chunk-BO4XCS7P.js} +195 -3
- package/chunks/{chunk-WCXCRJYB.js → chunk-BRRAJXPA.js} +1 -1
- package/chunks/{chunk-TPRQ7RZH.js → chunk-BYFNTGKI.js} +37 -35
- package/chunks/{chunk-Y34KJKDC.js → chunk-C3NS4F2Q.js} +1 -1
- package/chunks/{chunk-Q4M4MDQ4.js → chunk-CC4N4M36.js} +1 -1
- package/chunks/{chunk-EBJQ6AXW.js → chunk-DM22XS4K.js} +5 -5
- package/chunks/{chunk-PHOF65IG.js → chunk-DM4Q4JJH.js} +1059 -722
- package/chunks/{chunk-JXJFVC6E.js → chunk-DN6ZX5AY.js} +3 -3
- package/chunks/{chunk-J24WCGIN.js → chunk-E5WH5O3C.js} +4 -4
- package/chunks/{chunk-4WIZGAH3.js → chunk-ER5LWJR6.js} +5 -57
- package/chunks/chunk-FY3M44RD.js +463 -0
- package/chunks/{chunk-IO3IX5Q4.js → chunk-G4WFQUYQ.js} +1 -1
- package/chunks/{chunk-VULLI6WQ.js → chunk-GDIPH4JY.js} +3 -3
- package/chunks/chunk-HV3G62R6.js +76 -0
- package/chunks/{chunk-YX324OPW.js → chunk-I7XZ3RY5.js} +1 -1
- package/chunks/{chunk-BULDBTYC.js → chunk-INADJJGW.js} +1 -26
- package/chunks/{chunk-RIBKPMRP.js → chunk-J6D3VXCC.js} +3 -3
- package/chunks/{chunk-TEHGS6UP.js → chunk-JALU3ZDU.js} +6 -6
- package/chunks/{chunk-YBL3QUDD.js → chunk-KIUFNBHR.js} +1 -1
- package/chunks/{chunk-VIA5XA4U.js → chunk-KU5XMLDK.js} +1 -1
- package/chunks/{chunk-KMQ33DO4.js → chunk-LG4GZIVV.js} +3 -3
- package/chunks/{chunk-ZNAUOR2I.js → chunk-LNARWLZQ.js} +1 -1
- package/chunks/{chunk-LQIW3YFY.js → chunk-LNURQEMZ.js} +4 -4
- package/chunks/{chunk-VRYUBFMC.js → chunk-LZEMEFKY.js} +1 -1
- package/chunks/{chunk-LB6DUZ26.js → chunk-M4UKFCZ2.js} +65 -46
- package/chunks/chunk-MK7VQDN3.js +79 -0
- package/chunks/{chunk-RWTEFFPU.js → chunk-ML52PL6O.js} +211 -209
- package/chunks/{chunk-RF3EXIHJ.js → chunk-MSLKI6C2.js} +12 -12
- package/chunks/{chunk-X5XDDSSH.js → chunk-MVS3NS2N.js} +1 -1
- package/chunks/{chunk-5NBDS5S6.js → chunk-N3FAY5CM.js} +7 -5
- package/chunks/{chunk-55DJUCI2.js → chunk-OJGCZBB7.js} +14 -9
- package/chunks/{chunk-BKHWX6I2.js → chunk-P5V4T7NK.js} +3 -3
- package/chunks/{chunk-LH2BYDQ5.js → chunk-PANH4R3B.js} +1 -1
- package/chunks/{chunk-RZIX2G32.js → chunk-PHVR5UUY.js} +1 -1
- package/chunks/{chunk-MZAXJAUM.js → chunk-PSWQZHEA.js} +1 -1
- package/chunks/{chunk-3RN6GBKS.js → chunk-QPDRAXDJ.js} +1 -1
- package/chunks/{chunk-2X55UKQE.js → chunk-QY5MMZ6O.js} +2 -2
- package/chunks/{chunk-CIKQ7KKO.js → chunk-RWS5VYWC.js} +14 -8
- package/chunks/{chunk-MVSUYZDT.js → chunk-SASBXAQL.js} +3 -3
- package/chunks/chunk-SQBYH7PX.js +1252 -0
- package/chunks/{chunk-MB4MZHMJ.js → chunk-SRZ6DXVG.js} +170 -389
- package/chunks/chunk-TF2X2WCT.js +363 -0
- package/chunks/{chunk-2SCDWPXI.js → chunk-TQCBGUHN.js} +2 -2
- package/chunks/{chunk-LK7CHLVP.js → chunk-U4VTUMMK.js} +0 -60
- package/chunks/{chunk-IKCX4CCL.js → chunk-U7TXFVUN.js} +6 -6
- package/chunks/{chunk-2NH6DYI4.js → chunk-V6VRAM7B.js} +10 -10
- package/chunks/{chunk-Z2BC6UJ5.js → chunk-VCBZUOSI.js} +1 -1
- package/chunks/{chunk-IKYJHJNF.js → chunk-VFSJ5VRH.js} +2 -2
- package/chunks/{chunk-LKEJ26GS.js → chunk-VV6XU5L7.js} +1 -1
- package/chunks/{chunk-7ZCNENPP.js → chunk-W4CQXHT6.js} +1 -1
- package/chunks/{chunk-HTR4WV6U.js → chunk-W4RQUHY3.js} +31 -1
- package/chunks/{chunk-ETSW4KLJ.js → chunk-WDSWXQU3.js} +1 -1
- package/chunks/{chunk-PSOO6YXD.js → chunk-XHRTVPG2.js} +8 -6
- package/chunks/{chunk-ZJHVAS7M.js → chunk-YAF5VNU7.js} +1 -1
- package/chunks/{chunk-JVPM2ULZ.js → chunk-Z5BLYMZM.js} +4 -4
- package/chunks/{chunk-M4FMGVY4.js → chunk-ZE5WPL4I.js} +2 -2
- package/chunks/{computer-use-SOQ4E3VX.js → computer-use-DOFAHZAB.js} +10 -9
- package/chunks/{config-utils-7V7GGIW6.js → config-utils-VFQXVGNR.js} +4 -3
- package/chunks/{contextCommand-JLHYA34Z.js → contextCommand-QIZYHDR5.js} +12 -11
- package/chunks/{create-sub-session-QRJLW5BV.js → create-sub-session-7543K2QA.js} +10 -9
- package/chunks/{daemon-YO6433NF.js → daemon-VOMQW7KZ.js} +189 -0
- package/chunks/{daemon-status-provider-2233Q37D.js → daemon-status-provider-OS5UWBHV.js} +18 -17
- package/chunks/{dist-WEAHOXDM.js → dist-ANLAT3GS.js} +1 -1
- package/chunks/{dist-BBLXMS3N.js → dist-BRB6EXK4.js} +1 -1
- package/chunks/{dist-YFNEUWSE.js → dist-K6Y4E7FX.js} +1 -1
- package/chunks/{dist-F6IBUDR4.js → dist-KTYYJ2C5.js} +1 -1
- package/chunks/{dist-46NQKLTW.js → dist-NNVBBOGU.js} +2 -2
- package/chunks/{dist-AIKFMUKK.js → dist-RTJFMNEZ.js} +1 -1
- package/chunks/{earlyInputCapture-A7NDU3PF.js → earlyInputCapture-WQT24RWD.js} +10 -9
- package/chunks/{edit-OBDSQURM.js → edit-RIEOJWKB.js} +10 -9
- package/chunks/{enter-worktree-U6MRPQ2P.js → enter-worktree-OGK5FQ3R.js} +10 -9
- package/chunks/{enterPlanMode-BC5QUZZ2.js → enterPlanMode-IWZYALIB.js} +10 -9
- package/chunks/{environment-W5UFC2CH.js → environment-VZ7BRI4Q.js} +12 -11
- package/chunks/{errors-M7CLORXH.js → errors-PCX25DVP.js} +12 -11
- package/chunks/{exit-worktree-DGNYMECB.js → exit-worktree-4TEYVIVP.js} +10 -9
- package/chunks/{exitPlanMode-GXTBWQAR.js → exitPlanMode-GHPUHBZJ.js} +38 -18
- package/chunks/{fast-path-JJZFJANL.js → fast-path-HYE7IFEV.js} +5 -5
- package/chunks/{gemini-QS36EBZV.js → gemini-NGRQX3YJ.js} +54 -51
- package/chunks/{geminiContentGenerator-AG4KB6CV.js → geminiContentGenerator-FQHPFZSR.js} +36 -7
- package/chunks/{glob-V7R3PSK3.js → glob-FRTM3X2E.js} +10 -9
- package/chunks/{grep-QYPSK7OP.js → grep-RKWVROCW.js} +10 -9
- package/chunks/{handleAutoUpdate-6DBEZYPV.js → handleAutoUpdate-2CZQRJ66.js} +14 -13
- package/chunks/{i18n-VUJJZIMU.js → i18n-XEQVMRKN.js} +11 -10
- package/chunks/{image-gen-Z3VPGKRC.js → image-gen-WIEM7KZA.js} +1 -1
- package/chunks/{initializer-UWAK5U5O.js → initializer-OVGZ4FLY.js} +15 -14
- package/chunks/{installationInfo-6O2YAA52.js → installationInfo-5UUQJI6Y.js} +11 -10
- package/chunks/{list-GB4ESM3T.js → list-HODU6RXD.js} +18 -17
- package/chunks/{loadedSettingsAdapter-OT6JVQ7U.js → loadedSettingsAdapter-TYNLBALY.js} +15 -14
- package/chunks/{loggingContentGenerator-HS3S5H3Q.js → loggingContentGenerator-WGM27QAW.js} +55 -91
- package/chunks/{managed-npm-update-JYEMMXA3.js → managed-npm-update-JQ2CG3RH.js} +11 -10
- package/chunks/{mcp-6DBDJPFU.js → mcp-J3DFWX4A.js} +15 -14
- package/chunks/{monitor-R3ODH5U6.js → monitor-7FEWXX5F.js} +10 -9
- package/chunks/{nonInteractiveCli-MOYCYBBU.js → nonInteractiveCli-F4GYSMHT.js} +50 -47
- package/chunks/{notebook-edit-BNOK452R.js → notebook-edit-JGJV2K6J.js} +10 -9
- package/chunks/{openaiContentGenerator-WMCU3O2H.js → openaiContentGenerator-JPVXDTAO.js} +8 -7
- package/chunks/{pidfile-TFRZZZIO.js → pidfile-4VNAR3EP.js} +10 -9
- package/chunks/{processUtils-RT7UNCC2.js → processUtils-V2LCK6T6.js} +2 -2
- package/chunks/{qwenContentGenerator-HHCRK4SX.js → qwenContentGenerator-TICV2W2Z.js} +12 -11
- package/chunks/{qwenOAuth2-OWLB5AKH.js → qwenOAuth2-XGFI5XJG.js} +1 -1
- package/chunks/{read-file-APMO3PSX.js → read-file-LZXUR4TO.js} +5 -5
- package/chunks/{resumeHistoryUtils-6KRYEAWZ.js → resumeHistoryUtils-65OX3SGJ.js} +14 -13
- package/chunks/{ripGrep-BEJDEDXW.js → ripGrep-2U2FRGMV.js} +10 -9
- package/chunks/{run-qwen-serve-FU6HEM4J.js → run-qwen-serve-3VCV4I7E.js} +69 -33
- package/chunks/{runtime-XXRRTNP6.js → runtime-AXJWIEDU.js} +20 -18
- package/chunks/{scheduler-G2ZS2Z7E.js → scheduler-RS2I6RU5.js} +10 -9
- package/chunks/{sdk-exporters-http-FYBSUCPD.js → sdk-exporters-http-FS6ZV7MF.js} +2 -2
- package/chunks/{sdk-impl-GMVPB7NB.js → sdk-impl-7FZSCSXB.js} +6 -6
- package/chunks/{serve-7BSTXJ4T.js → serve-W2GC47CM.js} +16 -15
- package/chunks/{server-4UMH7OIZ.js → server-HRZ23U7M.js} +499 -93
- package/chunks/{session-K3O3Q2SV.js → session-7XHZKTVV.js} +51 -48
- package/chunks/{settings-CR2EWTBA.js → settings-7ZGZDXAS.js} +14 -13
- package/chunks/{shell-HH3PF3A2.js → shell-45IPBDP5.js} +10 -9
- package/chunks/{skill-I3SDA4MB.js → skill-LIWXNLDW.js} +7 -6
- package/chunks/{spawnChannel-RWNDBXGA.js → spawnChannel-PVXQ5AGV.js} +12 -11
- package/chunks/{src-GE4TTTML.js → src-AY65BYR7.js} +36 -17
- package/chunks/{standalone-update-Q6WFRZZQ.js → standalone-update-ZMFNKAEY.js} +12 -11
- package/chunks/{startInteractiveUI-SLZGHRPH.js → startInteractiveUI-IW3CSKHA.js} +87 -88
- package/chunks/{team-create-YJALH5D2.js → team-create-O2FROQ4R.js} +10 -9
- package/chunks/{team-plan-approval-34QFYKGN.js → team-plan-approval-Q6WDBXTQ.js} +10 -9
- package/chunks/{theme-manager-SWRILQHI.js → theme-manager-YYPZFBAH.js} +10 -9
- package/chunks/{tool-search-NF7GB6LE.js → tool-search-APECNQ3Z.js} +5 -5
- package/chunks/{total-session-admission-DLHHHLD3.js → total-session-admission-JXES723M.js} +14 -13
- package/chunks/{tree-sitter-4D7QS7F6.js → tree-sitter-FS4VPMZA.js} +1 -1
- package/chunks/{tree-sitter-bash-VEJGF5XF.js → tree-sitter-bash-6B46JJCV.js} +1 -1
- package/chunks/{trustedFolders-KHXHY6PY.js → trustedFolders-HVI7IXUH.js} +11 -10
- package/chunks/{update-relaunch-WBUZJC5O.js → update-relaunch-ON5MDJQG.js} +5 -5
- package/chunks/{updateCheck-RKL6M5XN.js → updateCheck-WUJGHWZZ.js} +13 -12
- package/chunks/{useAutoAcceptIndicator-CFQ5BUJL.js → useAutoAcceptIndicator-CHSTZLZD.js} +17 -16
- package/chunks/{validateNonInterActiveAuth-3R223G3R.js → validateNonInterActiveAuth-JBLKBKRD.js} +47 -44
- package/chunks/{version-HS7YSFHV.js → version-LTNUBQJY.js} +1 -1
- package/chunks/{web-fetch-NKCSG7ZE.js → web-fetch-L5UTI53V.js} +5 -5
- package/chunks/{web-search-S62WAP4S.js → web-search-KM33JOS3.js} +2 -2
- package/chunks/{workflow-QAGU5RU4.js → workflow-K7FAWV77.js} +11 -10
- package/chunks/{workspace-providers-status-QSVZUETE.js → workspace-providers-status-GAKSF4LL.js} +18 -17
- package/chunks/{workspace-registration-store-24JMHDGF.js → workspace-registration-store-6TGVDJV5.js} +1 -1
- package/chunks/{workspace-registry-UT4RBNBM.js → workspace-registry-A7NQUONG.js} +14 -13
- package/chunks/{workspace-service-JFWRUS4V.js → workspace-service-STGVSO4N.js} +19 -18
- package/chunks/{workspace-skills-status-ZBBKJOI2.js → workspace-skills-status-66AK3DUA.js} +16 -15
- package/chunks/{write-file-VHIXW5M7.js → write-file-HUUCEG4P.js} +10 -9
- package/cli.js +12 -12
- package/package.json +3 -3
- package/web-shell/assets/{arc-DcbWnB9T.js → arc-BbHijhiN.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-kMMF5sud.js → architectureDiagram-3BPJPVTR-Cb4B_JD0.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-Htl9vTJS.js → blockDiagram-GPEHLZMM-Dsjlh3H-.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BnZnm0mQ.js → c4Diagram-AAUBKEIU-Cp5AeR4U.js} +1 -1
- package/web-shell/assets/channel-Bzdx6E8P.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DziB7kDG.js → chunk-2J33WTMH-CLcY7W2e.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-CmkD8daw.js → chunk-4BX2VUAB-BUhvY2LR.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-CHAd9A_U.js → chunk-55IACEB6-kDIFC_71.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Dqaam3fE.js → chunk-727SXJPM-CIBO15f2.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-D_-saBYM.js → chunk-AQP2D5EJ-BJ_T_slV.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-B9r_veWD.js → chunk-FMBD7UC4-BEkW35J8.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-B3EaCSpL.js → chunk-ND2GUHAM-GGPxofay.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CYq8x9mn.js → chunk-QZHKN3VN-Bifllrb6.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cd6wbiuK.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cd6wbiuK.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-D0ng4uiB.js → cose-bilkent-S5V4N54A-C-Add_Dp.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DCZollQv.js → dagre-BM42HDAG-B7MfwNq2.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-Dfk2pWS0.js → diagram-2AECGRRQ-CY_0zuDz.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-kX38ltWR.js → diagram-5GNKFQAL-VyYSbCgA.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CJz2vsXh.js → diagram-KO2AKTUF-CBiIZ2PL.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BvMLZm_7.js → diagram-LMA3HP47-BL3CrVOx.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-l7kfStkO.js → diagram-OG6HWLK6-CZUPx96P.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BSVa8GGT.js → erDiagram-TEJ5UH35-B81xHr1-.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CoawKIXH.js → flowDiagram-I6XJVG4X-EZWhir-J.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFUDH0zF.js → ganttDiagram-6RSMTGT7-CVFSuIAg.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Y2pvpT4e.js → gitGraphDiagram-PVQCEYII-C1H2uQDv.js} +1 -1
- package/web-shell/assets/{index-ckX9Pq5k.js → index-B2bXx96W.js} +273 -254
- package/web-shell/assets/{index-D0GX0zZf.js → index-BYo99NBH.js} +1 -1
- package/web-shell/assets/{index-D9haPt0X.css → index-_8mKjx8q.css} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-CU8_zLiX.js → infoDiagram-5YYISTIA-BwyFMlF8.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AVQiV0DU.js → ishikawaDiagram-YF4QCWOH-CQ7Yhn2Y.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DQ0VSKa3.js → journeyDiagram-JHISSGLW-CJn2sf0l.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-BqnWqsE_.js → kanban-definition-UN3LZRKU-DaNRqwVN.js} +1 -1
- package/web-shell/assets/{linear-BkoihsaA.js → linear-DCKODZe2.js} +1 -1
- package/web-shell/assets/{mermaid.core-5RJs-31j.js → mermaid.core-CTGJOk27.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D33Bxnpd.js → mindmap-definition-RKZ34NQL-BKU3_3rg.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BuEAw3BH.js → pieDiagram-4H26LBE5-COcwBJ82.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Kox_usEq.js → quadrantDiagram-W4KKPZXB-CQnQ443x.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CNjeUif0.js → requirementDiagram-4Y6WPE33-CZ2oj5cD.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BCd2OL_U.js → sankeyDiagram-5OEKKPKP-BxAv5mNu.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CF2ZTsz0.js → sequenceDiagram-3UESZ5HK-CztaySPs.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-qenSzHtm.js → stateDiagram-AJRCARHV-CTQT1oGD.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BjMdT6E_.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-B5DyWdgs.js → timeline-definition-PNZ67QCA-K9Mkex5A.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DqP4I_o_.js → vennDiagram-CIIHVFJN-B2rVIw76.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CJe2e4mg.js → wardley-L42UT6IY-Z1w2JR4M.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BMDSw-Rr.js → wardleyDiagram-YWT4CUSO-CIX9aKXf.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BTVZYkxD.js → xychartDiagram-2RQKCTM6-CI9DLIKB.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-LEH5C7FV.js +0 -232
- package/web-shell/assets/channel-Cq7YKtfC.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +0 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +0 -1
|
@@ -45,8 +45,11 @@ function sanitizeLogText(text, maxLen) {
|
|
|
45
45
|
}
|
|
46
46
|
__name(sanitizeLogText, "sanitizeLogText");
|
|
47
47
|
|
|
48
|
-
// packages/channels/base/dist/
|
|
48
|
+
// packages/channels/base/dist/PairingStore.js
|
|
49
49
|
init_esbuild_shims();
|
|
50
|
+
import * as crypto2 from "node:crypto";
|
|
51
|
+
import * as fs2 from "node:fs";
|
|
52
|
+
import * as path2 from "node:path";
|
|
50
53
|
|
|
51
54
|
// packages/channels/base/dist/paths.js
|
|
52
55
|
init_esbuild_shims();
|
|
@@ -89,6 +92,202 @@ function getWorkspaceScopeDirName(workspaceCwd) {
|
|
|
89
92
|
}
|
|
90
93
|
__name(getWorkspaceScopeDirName, "getWorkspaceScopeDirName");
|
|
91
94
|
|
|
95
|
+
// packages/channels/base/dist/PairingStore.js
|
|
96
|
+
var SAFE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
|
97
|
+
var CODE_LENGTH = 8;
|
|
98
|
+
var EXPIRY_MS = 60 * 60 * 1e3;
|
|
99
|
+
var MAX_PENDING = 3;
|
|
100
|
+
var PairingStore = class {
|
|
101
|
+
static {
|
|
102
|
+
__name(this, "PairingStore");
|
|
103
|
+
}
|
|
104
|
+
dir;
|
|
105
|
+
pendingPath;
|
|
106
|
+
allowlistPath;
|
|
107
|
+
migratedSentinelPath;
|
|
108
|
+
/**
|
|
109
|
+
* @param channelName Channel name the state is keyed by.
|
|
110
|
+
* @param workspaceCwd Workspace working directory to scope the state to.
|
|
111
|
+
* When provided, files live under
|
|
112
|
+
* `<qwen-home>/channels/<workspace-scope>/` so two workspaces using the
|
|
113
|
+
* same channel name never share pairing requests or allowlist entries
|
|
114
|
+
* (see #7017 — sharing them is an authorization-boundary violation in
|
|
115
|
+
* multi-workspace daemon deployments). Omitting it preserves the legacy
|
|
116
|
+
* global layout (`<qwen-home>/channels/`).
|
|
117
|
+
*/
|
|
118
|
+
constructor(channelName, workspaceCwd) {
|
|
119
|
+
const channelsRoot = path2.join(getGlobalQwenDir(), "channels");
|
|
120
|
+
this.dir = workspaceCwd ? path2.join(channelsRoot, getWorkspaceScopeDirName(workspaceCwd)) : channelsRoot;
|
|
121
|
+
const safeChannelName = encodeURIComponent(channelName);
|
|
122
|
+
this.pendingPath = path2.join(this.dir, `${safeChannelName}-pairing.json`);
|
|
123
|
+
this.allowlistPath = path2.join(this.dir, `${safeChannelName}-allowlist.json`);
|
|
124
|
+
this.migratedSentinelPath = path2.join(this.dir, `${safeChannelName}.migrated`);
|
|
125
|
+
if (workspaceCwd) {
|
|
126
|
+
this.migrateLegacyState(channelsRoot, channelName);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* One-time grandfathering of pre-scoping state: the first time this
|
|
131
|
+
* (workspace, channel) pair is constructed, copy the legacy GLOBAL files in
|
|
132
|
+
* so senders that were already approved stay approved after upgrading.
|
|
133
|
+
*
|
|
134
|
+
* Gated by a per-channel sentinel file inside the scope directory — NOT by
|
|
135
|
+
* the directory itself: one workspace can start several channels in turn,
|
|
136
|
+
* and a directory-level gate would let only the first channel ever migrate.
|
|
137
|
+
* The sentinel is written even when there was nothing to copy, so a legacy
|
|
138
|
+
* file written later (e.g. by an older version still running concurrently)
|
|
139
|
+
* is never absorbed into a scope that already went through this decision.
|
|
140
|
+
*
|
|
141
|
+
* Each file is copied independently and best-effort (an unreadable pairing
|
|
142
|
+
* file must not block the allowlist, and vice versa), via a
|
|
143
|
+
* uniquely-named temp file + atomic rename so a crash mid-copy cannot
|
|
144
|
+
* leave a truncated scoped file behind the closed gate. A file the scoped
|
|
145
|
+
* store already has is never overwritten.
|
|
146
|
+
*
|
|
147
|
+
* Copy, not move: another workspace upgrading later must be able to
|
|
148
|
+
* grandfather the same baseline, and an older qwen version running
|
|
149
|
+
* concurrently still reads the global files.
|
|
150
|
+
*
|
|
151
|
+
* Revocation therefore means REMOVING ENTRIES from the scoped allowlist
|
|
152
|
+
* (and from the legacy global file, while it exists) — not deleting files.
|
|
153
|
+
*/
|
|
154
|
+
migrateLegacyState(channelsRoot, channelName) {
|
|
155
|
+
try {
|
|
156
|
+
if (fs2.existsSync(this.migratedSentinelPath)) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
const legacyPairs = [
|
|
160
|
+
[
|
|
161
|
+
path2.join(channelsRoot, `${channelName}-pairing.json`),
|
|
162
|
+
this.pendingPath
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
path2.join(channelsRoot, `${channelName}-allowlist.json`),
|
|
166
|
+
this.allowlistPath
|
|
167
|
+
]
|
|
168
|
+
];
|
|
169
|
+
this.ensureDir();
|
|
170
|
+
let allSucceeded = true;
|
|
171
|
+
for (const [legacyPath, scopedPath] of legacyPairs) {
|
|
172
|
+
try {
|
|
173
|
+
if (path2.dirname(path2.resolve(legacyPath)) !== channelsRoot) {
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if (fs2.existsSync(scopedPath) || !fs2.existsSync(legacyPath)) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
const tmpPath = `${scopedPath}.${process.pid}.migrating`;
|
|
180
|
+
fs2.copyFileSync(legacyPath, tmpPath);
|
|
181
|
+
fs2.renameSync(tmpPath, scopedPath);
|
|
182
|
+
} catch (err) {
|
|
183
|
+
allSucceeded = false;
|
|
184
|
+
process.stderr.write(`[PairingStore] legacy migration of ${path2.basename(legacyPath)} failed for channel "${channelName}": ${err?.message}; will retry on next start
|
|
185
|
+
`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (allSucceeded) {
|
|
189
|
+
fs2.writeFileSync(this.migratedSentinelPath, "");
|
|
190
|
+
}
|
|
191
|
+
} catch (err) {
|
|
192
|
+
process.stderr.write(`[PairingStore] legacy migration failed for channel "${channelName}": ${err?.message}; scoped store starts empty
|
|
193
|
+
`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
isApproved(senderId) {
|
|
197
|
+
const list = this.readAllowlist();
|
|
198
|
+
return list.includes(senderId);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create a pairing request for an unknown sender.
|
|
202
|
+
* Returns the code if created, or null if the pending cap is reached.
|
|
203
|
+
* If the sender already has a non-expired pending request, returns that code.
|
|
204
|
+
*/
|
|
205
|
+
createRequest(senderId, senderName) {
|
|
206
|
+
const pending = this.readPending();
|
|
207
|
+
const now = Date.now();
|
|
208
|
+
const active = pending.filter((r) => now - r.createdAt < EXPIRY_MS);
|
|
209
|
+
const existing = active.find((r) => r.senderId === senderId);
|
|
210
|
+
if (existing) {
|
|
211
|
+
return existing.code;
|
|
212
|
+
}
|
|
213
|
+
if (active.length >= MAX_PENDING) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
const code = generateCode();
|
|
217
|
+
active.push({ senderId, senderName, code, createdAt: now });
|
|
218
|
+
this.writePending(active);
|
|
219
|
+
return code;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Approve a pairing request by code.
|
|
223
|
+
* Returns the sender ID if found, or null if not found / expired.
|
|
224
|
+
*/
|
|
225
|
+
approve(code) {
|
|
226
|
+
const pending = this.readPending();
|
|
227
|
+
const now = Date.now();
|
|
228
|
+
const idx = pending.findIndex((r) => r.code === code.toUpperCase() && now - r.createdAt < EXPIRY_MS);
|
|
229
|
+
if (idx === -1)
|
|
230
|
+
return null;
|
|
231
|
+
const request = pending[idx];
|
|
232
|
+
pending.splice(idx, 1);
|
|
233
|
+
this.writePending(pending);
|
|
234
|
+
const list = this.readAllowlist();
|
|
235
|
+
if (!list.includes(request.senderId)) {
|
|
236
|
+
list.push(request.senderId);
|
|
237
|
+
this.writeAllowlist(list);
|
|
238
|
+
}
|
|
239
|
+
return request;
|
|
240
|
+
}
|
|
241
|
+
listPending() {
|
|
242
|
+
const pending = this.readPending();
|
|
243
|
+
const now = Date.now();
|
|
244
|
+
return pending.filter((r) => now - r.createdAt < EXPIRY_MS);
|
|
245
|
+
}
|
|
246
|
+
getAllowlist() {
|
|
247
|
+
return this.readAllowlist();
|
|
248
|
+
}
|
|
249
|
+
ensureDir() {
|
|
250
|
+
if (!fs2.existsSync(this.dir)) {
|
|
251
|
+
fs2.mkdirSync(this.dir, { recursive: true });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
readPending() {
|
|
255
|
+
try {
|
|
256
|
+
const data = fs2.readFileSync(this.pendingPath, "utf-8");
|
|
257
|
+
return JSON.parse(data);
|
|
258
|
+
} catch {
|
|
259
|
+
return [];
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
writePending(requests) {
|
|
263
|
+
this.ensureDir();
|
|
264
|
+
fs2.writeFileSync(this.pendingPath, JSON.stringify(requests, null, 2));
|
|
265
|
+
}
|
|
266
|
+
readAllowlist() {
|
|
267
|
+
try {
|
|
268
|
+
const data = fs2.readFileSync(this.allowlistPath, "utf-8");
|
|
269
|
+
return JSON.parse(data);
|
|
270
|
+
} catch {
|
|
271
|
+
return [];
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
writeAllowlist(list) {
|
|
275
|
+
this.ensureDir();
|
|
276
|
+
fs2.writeFileSync(this.allowlistPath, JSON.stringify(list, null, 2));
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
function generateCode() {
|
|
280
|
+
let code = "";
|
|
281
|
+
for (let i = 0; i < CODE_LENGTH; i++) {
|
|
282
|
+
code += SAFE_ALPHABET[crypto2.randomInt(SAFE_ALPHABET.length)];
|
|
283
|
+
}
|
|
284
|
+
return code;
|
|
285
|
+
}
|
|
286
|
+
__name(generateCode, "generateCode");
|
|
287
|
+
|
|
288
|
+
// packages/channels/base/dist/index.js
|
|
289
|
+
init_esbuild_shims();
|
|
290
|
+
|
|
92
291
|
// packages/channels/base/dist/AcpBridge.js
|
|
93
292
|
init_esbuild_shims();
|
|
94
293
|
import { spawn } from "node:child_process";
|
|
@@ -1515,8 +1714,8 @@ var DmGate = class {
|
|
|
1515
1714
|
|
|
1516
1715
|
// packages/channels/base/dist/group-history-store.js
|
|
1517
1716
|
init_esbuild_shims();
|
|
1518
|
-
import { appendFileSync, chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
1519
|
-
import { dirname, join as
|
|
1717
|
+
import { appendFileSync, chmodSync, existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
1718
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
1520
1719
|
var DEFAULT_MAX_KEYS = 1e3;
|
|
1521
1720
|
var DEFAULT_COMPACT_AFTER_RECORDS = 1e3;
|
|
1522
1721
|
var GroupHistoryStore = class {
|
|
@@ -1628,12 +1827,12 @@ var GroupHistoryStore = class {
|
|
|
1628
1827
|
};
|
|
1629
1828
|
}
|
|
1630
1829
|
readRecords() {
|
|
1631
|
-
if (!
|
|
1830
|
+
if (!existsSync2(this.filePath)) {
|
|
1632
1831
|
return { records: [], hadInvalidRecords: false };
|
|
1633
1832
|
}
|
|
1634
1833
|
let data;
|
|
1635
1834
|
try {
|
|
1636
|
-
data =
|
|
1835
|
+
data = readFileSync2(this.filePath, "utf-8");
|
|
1637
1836
|
} catch (err) {
|
|
1638
1837
|
if (isErrnoCode(err, "ENOENT")) {
|
|
1639
1838
|
return { records: [], hadInvalidRecords: false };
|
|
@@ -1660,8 +1859,8 @@ var GroupHistoryStore = class {
|
|
|
1660
1859
|
return { records, hadInvalidRecords };
|
|
1661
1860
|
}
|
|
1662
1861
|
append(record) {
|
|
1663
|
-
const dir =
|
|
1664
|
-
|
|
1862
|
+
const dir = dirname2(this.filePath);
|
|
1863
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
1665
1864
|
chmodPrivate(dir, 448);
|
|
1666
1865
|
appendFileSync(this.filePath, `${JSON.stringify(record)}
|
|
1667
1866
|
`, {
|
|
@@ -1671,8 +1870,8 @@ var GroupHistoryStore = class {
|
|
|
1671
1870
|
chmodPrivate(this.filePath, 384);
|
|
1672
1871
|
}
|
|
1673
1872
|
compact(state, limits) {
|
|
1674
|
-
const dir =
|
|
1675
|
-
|
|
1873
|
+
const dir = dirname2(this.filePath);
|
|
1874
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
1676
1875
|
chmodPrivate(dir, 448);
|
|
1677
1876
|
const records = [];
|
|
1678
1877
|
const recordedAt = Date.now();
|
|
@@ -1689,10 +1888,10 @@ var GroupHistoryStore = class {
|
|
|
1689
1888
|
}
|
|
1690
1889
|
const data = records.length > 0 ? `${records.map((record) => JSON.stringify(record)).join("\n")}
|
|
1691
1890
|
` : "";
|
|
1692
|
-
const tempPath =
|
|
1693
|
-
|
|
1891
|
+
const tempPath = join3(dir, `${Date.now()}-${process.pid}-${Math.random().toString(16).slice(2)}.tmp`);
|
|
1892
|
+
writeFileSync2(tempPath, data, { encoding: "utf-8", mode: 384 });
|
|
1694
1893
|
chmodPrivate(tempPath, 384);
|
|
1695
|
-
|
|
1894
|
+
renameSync2(tempPath, this.filePath);
|
|
1696
1895
|
chmodPrivate(this.filePath, 384);
|
|
1697
1896
|
}
|
|
1698
1897
|
};
|
|
@@ -1798,203 +1997,6 @@ var SenderGate = class {
|
|
|
1798
1997
|
}
|
|
1799
1998
|
};
|
|
1800
1999
|
|
|
1801
|
-
// packages/channels/base/dist/PairingStore.js
|
|
1802
|
-
init_esbuild_shims();
|
|
1803
|
-
import * as crypto2 from "node:crypto";
|
|
1804
|
-
import * as fs2 from "node:fs";
|
|
1805
|
-
import * as path2 from "node:path";
|
|
1806
|
-
var SAFE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
|
1807
|
-
var CODE_LENGTH = 8;
|
|
1808
|
-
var EXPIRY_MS = 60 * 60 * 1e3;
|
|
1809
|
-
var MAX_PENDING = 3;
|
|
1810
|
-
var PairingStore = class {
|
|
1811
|
-
static {
|
|
1812
|
-
__name(this, "PairingStore");
|
|
1813
|
-
}
|
|
1814
|
-
dir;
|
|
1815
|
-
pendingPath;
|
|
1816
|
-
allowlistPath;
|
|
1817
|
-
migratedSentinelPath;
|
|
1818
|
-
/**
|
|
1819
|
-
* @param channelName Channel name the state is keyed by.
|
|
1820
|
-
* @param workspaceCwd Workspace working directory to scope the state to.
|
|
1821
|
-
* When provided, files live under
|
|
1822
|
-
* `<qwen-home>/channels/<workspace-scope>/` so two workspaces using the
|
|
1823
|
-
* same channel name never share pairing requests or allowlist entries
|
|
1824
|
-
* (see #7017 — sharing them is an authorization-boundary violation in
|
|
1825
|
-
* multi-workspace daemon deployments). Omitting it preserves the legacy
|
|
1826
|
-
* global layout (`<qwen-home>/channels/`).
|
|
1827
|
-
*/
|
|
1828
|
-
constructor(channelName, workspaceCwd) {
|
|
1829
|
-
const channelsRoot = path2.join(getGlobalQwenDir(), "channels");
|
|
1830
|
-
this.dir = workspaceCwd ? path2.join(channelsRoot, getWorkspaceScopeDirName(workspaceCwd)) : channelsRoot;
|
|
1831
|
-
const safeChannelName = encodeURIComponent(channelName);
|
|
1832
|
-
this.pendingPath = path2.join(this.dir, `${safeChannelName}-pairing.json`);
|
|
1833
|
-
this.allowlistPath = path2.join(this.dir, `${safeChannelName}-allowlist.json`);
|
|
1834
|
-
this.migratedSentinelPath = path2.join(this.dir, `${safeChannelName}.migrated`);
|
|
1835
|
-
if (workspaceCwd) {
|
|
1836
|
-
this.migrateLegacyState(channelsRoot, channelName);
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
* One-time grandfathering of pre-scoping state: the first time this
|
|
1841
|
-
* (workspace, channel) pair is constructed, copy the legacy GLOBAL files in
|
|
1842
|
-
* so senders that were already approved stay approved after upgrading.
|
|
1843
|
-
*
|
|
1844
|
-
* Gated by a per-channel sentinel file inside the scope directory — NOT by
|
|
1845
|
-
* the directory itself: one workspace can start several channels in turn,
|
|
1846
|
-
* and a directory-level gate would let only the first channel ever migrate.
|
|
1847
|
-
* The sentinel is written even when there was nothing to copy, so a legacy
|
|
1848
|
-
* file written later (e.g. by an older version still running concurrently)
|
|
1849
|
-
* is never absorbed into a scope that already went through this decision.
|
|
1850
|
-
*
|
|
1851
|
-
* Each file is copied independently and best-effort (an unreadable pairing
|
|
1852
|
-
* file must not block the allowlist, and vice versa), via a
|
|
1853
|
-
* uniquely-named temp file + atomic rename so a crash mid-copy cannot
|
|
1854
|
-
* leave a truncated scoped file behind the closed gate. A file the scoped
|
|
1855
|
-
* store already has is never overwritten.
|
|
1856
|
-
*
|
|
1857
|
-
* Copy, not move: another workspace upgrading later must be able to
|
|
1858
|
-
* grandfather the same baseline, and an older qwen version running
|
|
1859
|
-
* concurrently still reads the global files.
|
|
1860
|
-
*
|
|
1861
|
-
* Revocation therefore means REMOVING ENTRIES from the scoped allowlist
|
|
1862
|
-
* (and from the legacy global file, while it exists) — not deleting files.
|
|
1863
|
-
*/
|
|
1864
|
-
migrateLegacyState(channelsRoot, channelName) {
|
|
1865
|
-
try {
|
|
1866
|
-
if (fs2.existsSync(this.migratedSentinelPath)) {
|
|
1867
|
-
return;
|
|
1868
|
-
}
|
|
1869
|
-
const legacyPairs = [
|
|
1870
|
-
[
|
|
1871
|
-
path2.join(channelsRoot, `${channelName}-pairing.json`),
|
|
1872
|
-
this.pendingPath
|
|
1873
|
-
],
|
|
1874
|
-
[
|
|
1875
|
-
path2.join(channelsRoot, `${channelName}-allowlist.json`),
|
|
1876
|
-
this.allowlistPath
|
|
1877
|
-
]
|
|
1878
|
-
];
|
|
1879
|
-
this.ensureDir();
|
|
1880
|
-
let allSucceeded = true;
|
|
1881
|
-
for (const [legacyPath, scopedPath] of legacyPairs) {
|
|
1882
|
-
try {
|
|
1883
|
-
if (path2.dirname(path2.resolve(legacyPath)) !== channelsRoot) {
|
|
1884
|
-
continue;
|
|
1885
|
-
}
|
|
1886
|
-
if (fs2.existsSync(scopedPath) || !fs2.existsSync(legacyPath)) {
|
|
1887
|
-
continue;
|
|
1888
|
-
}
|
|
1889
|
-
const tmpPath = `${scopedPath}.${process.pid}.migrating`;
|
|
1890
|
-
fs2.copyFileSync(legacyPath, tmpPath);
|
|
1891
|
-
fs2.renameSync(tmpPath, scopedPath);
|
|
1892
|
-
} catch (err) {
|
|
1893
|
-
allSucceeded = false;
|
|
1894
|
-
process.stderr.write(`[PairingStore] legacy migration of ${path2.basename(legacyPath)} failed for channel "${channelName}": ${err?.message}; will retry on next start
|
|
1895
|
-
`);
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
if (allSucceeded) {
|
|
1899
|
-
fs2.writeFileSync(this.migratedSentinelPath, "");
|
|
1900
|
-
}
|
|
1901
|
-
} catch (err) {
|
|
1902
|
-
process.stderr.write(`[PairingStore] legacy migration failed for channel "${channelName}": ${err?.message}; scoped store starts empty
|
|
1903
|
-
`);
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
isApproved(senderId) {
|
|
1907
|
-
const list = this.readAllowlist();
|
|
1908
|
-
return list.includes(senderId);
|
|
1909
|
-
}
|
|
1910
|
-
/**
|
|
1911
|
-
* Create a pairing request for an unknown sender.
|
|
1912
|
-
* Returns the code if created, or null if the pending cap is reached.
|
|
1913
|
-
* If the sender already has a non-expired pending request, returns that code.
|
|
1914
|
-
*/
|
|
1915
|
-
createRequest(senderId, senderName) {
|
|
1916
|
-
const pending = this.readPending();
|
|
1917
|
-
const now = Date.now();
|
|
1918
|
-
const active = pending.filter((r) => now - r.createdAt < EXPIRY_MS);
|
|
1919
|
-
const existing = active.find((r) => r.senderId === senderId);
|
|
1920
|
-
if (existing) {
|
|
1921
|
-
return existing.code;
|
|
1922
|
-
}
|
|
1923
|
-
if (active.length >= MAX_PENDING) {
|
|
1924
|
-
return null;
|
|
1925
|
-
}
|
|
1926
|
-
const code = generateCode();
|
|
1927
|
-
active.push({ senderId, senderName, code, createdAt: now });
|
|
1928
|
-
this.writePending(active);
|
|
1929
|
-
return code;
|
|
1930
|
-
}
|
|
1931
|
-
/**
|
|
1932
|
-
* Approve a pairing request by code.
|
|
1933
|
-
* Returns the sender ID if found, or null if not found / expired.
|
|
1934
|
-
*/
|
|
1935
|
-
approve(code) {
|
|
1936
|
-
const pending = this.readPending();
|
|
1937
|
-
const now = Date.now();
|
|
1938
|
-
const idx = pending.findIndex((r) => r.code === code.toUpperCase() && now - r.createdAt < EXPIRY_MS);
|
|
1939
|
-
if (idx === -1)
|
|
1940
|
-
return null;
|
|
1941
|
-
const request = pending[idx];
|
|
1942
|
-
pending.splice(idx, 1);
|
|
1943
|
-
this.writePending(pending);
|
|
1944
|
-
const list = this.readAllowlist();
|
|
1945
|
-
if (!list.includes(request.senderId)) {
|
|
1946
|
-
list.push(request.senderId);
|
|
1947
|
-
this.writeAllowlist(list);
|
|
1948
|
-
}
|
|
1949
|
-
return request;
|
|
1950
|
-
}
|
|
1951
|
-
listPending() {
|
|
1952
|
-
const pending = this.readPending();
|
|
1953
|
-
const now = Date.now();
|
|
1954
|
-
return pending.filter((r) => now - r.createdAt < EXPIRY_MS);
|
|
1955
|
-
}
|
|
1956
|
-
getAllowlist() {
|
|
1957
|
-
return this.readAllowlist();
|
|
1958
|
-
}
|
|
1959
|
-
ensureDir() {
|
|
1960
|
-
if (!fs2.existsSync(this.dir)) {
|
|
1961
|
-
fs2.mkdirSync(this.dir, { recursive: true });
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
readPending() {
|
|
1965
|
-
try {
|
|
1966
|
-
const data = fs2.readFileSync(this.pendingPath, "utf-8");
|
|
1967
|
-
return JSON.parse(data);
|
|
1968
|
-
} catch {
|
|
1969
|
-
return [];
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
writePending(requests) {
|
|
1973
|
-
this.ensureDir();
|
|
1974
|
-
fs2.writeFileSync(this.pendingPath, JSON.stringify(requests, null, 2));
|
|
1975
|
-
}
|
|
1976
|
-
readAllowlist() {
|
|
1977
|
-
try {
|
|
1978
|
-
const data = fs2.readFileSync(this.allowlistPath, "utf-8");
|
|
1979
|
-
return JSON.parse(data);
|
|
1980
|
-
} catch {
|
|
1981
|
-
return [];
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
writeAllowlist(list) {
|
|
1985
|
-
this.ensureDir();
|
|
1986
|
-
fs2.writeFileSync(this.allowlistPath, JSON.stringify(list, null, 2));
|
|
1987
|
-
}
|
|
1988
|
-
};
|
|
1989
|
-
function generateCode() {
|
|
1990
|
-
let code = "";
|
|
1991
|
-
for (let i = 0; i < CODE_LENGTH; i++) {
|
|
1992
|
-
code += SAFE_ALPHABET[crypto2.randomInt(SAFE_ALPHABET.length)];
|
|
1993
|
-
}
|
|
1994
|
-
return code;
|
|
1995
|
-
}
|
|
1996
|
-
__name(generateCode, "generateCode");
|
|
1997
|
-
|
|
1998
2000
|
// packages/channels/base/dist/SessionRouter.js
|
|
1999
2001
|
init_esbuild_shims();
|
|
2000
2002
|
import { chmodSync as chmodSync2, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, renameSync as renameSync3, rmSync, unlinkSync, writeFileSync as writeFileSync3 } from "node:fs";
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import {
|
|
4
4
|
settleChatRecording,
|
|
5
5
|
subscribeToHeadlessChatRecordingFailures
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-B7QDM6Z7.js";
|
|
7
7
|
import {
|
|
8
8
|
handleAtCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GDIPH4JY.js";
|
|
10
10
|
import {
|
|
11
11
|
JsonOutputAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QPDRAXDJ.js";
|
|
13
13
|
import {
|
|
14
14
|
StreamJsonOutputAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P5V4T7NK.js";
|
|
16
16
|
import {
|
|
17
17
|
buildInitialSystemReminders,
|
|
18
18
|
buildSystemMessage,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
insertAfterFunctionResponses,
|
|
25
25
|
isSlashCommand,
|
|
26
26
|
normalizePartList
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-M4UKFCZ2.js";
|
|
28
28
|
import {
|
|
29
29
|
RunBudgetEnforcer,
|
|
30
30
|
cleanupReviewWorktreeLeases
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BYFNTGKI.js";
|
|
32
32
|
import {
|
|
33
33
|
AlreadyReportedError,
|
|
34
34
|
handleBudgetExceededError,
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
handleError,
|
|
37
37
|
handleMaxTurnsExceededError,
|
|
38
38
|
handleToolError
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VFSJ5VRH.js";
|
|
40
40
|
import {
|
|
41
41
|
isInlineModelOverrideAllowed
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LG4GZIVV.js";
|
|
43
43
|
import {
|
|
44
44
|
PLAN_MODE_ENTRY_SIBLING_SKIP_MESSAGE,
|
|
45
45
|
buildSessionRecoveryPlanFromApiHistory,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
partitionByConcurrencySafety,
|
|
58
58
|
promptIdContext,
|
|
59
59
|
restoreWorktreeContext
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-DM4Q4JJH.js";
|
|
61
61
|
import {
|
|
62
62
|
parsePositiveIntegerEnv
|
|
63
63
|
} from "./chunk-6PVPNMXU.js";
|
|
@@ -66,11 +66,11 @@ import {
|
|
|
66
66
|
} from "./chunk-L26JL52R.js";
|
|
67
67
|
import {
|
|
68
68
|
uiTelemetryService
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-RWS5VYWC.js";
|
|
70
70
|
import {
|
|
71
71
|
isTelemetrySdkInitialized,
|
|
72
72
|
shutdownTelemetry
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-SRZ6DXVG.js";
|
|
74
74
|
import {
|
|
75
75
|
ToolNames
|
|
76
76
|
} from "./chunk-PR75REBZ.js";
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
} from "./chunk-NL7LTRLR.js";
|
|
81
81
|
import {
|
|
82
82
|
registerCleanup
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-B4UMZKMU.js";
|
|
84
84
|
import {
|
|
85
85
|
init_esbuild_shims
|
|
86
86
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -18,21 +18,23 @@ import {
|
|
|
18
18
|
QWEN_SERVER_TOKEN_ENV,
|
|
19
19
|
createChannelDeliveryMessage,
|
|
20
20
|
createChannelWebhookTaskMessage,
|
|
21
|
-
createWorkerDiagnosticRedactor,
|
|
22
21
|
isChannelDeliveryResultMessage,
|
|
23
22
|
isChannelStartupReportMessage,
|
|
24
23
|
isChannelStartupReportType,
|
|
25
24
|
isChannelWebhookEnqueueErrorCode,
|
|
26
|
-
isChannelWebhookTaskResultMessage
|
|
25
|
+
isChannelWebhookTaskResultMessage
|
|
26
|
+
} from "./chunk-U4VTUMMK.js";
|
|
27
|
+
import {
|
|
28
|
+
createWorkerDiagnosticRedactor,
|
|
27
29
|
normalizeWorkerDiagnostic,
|
|
28
30
|
sanitizeWorkerDiagnostic
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HV3G62R6.js";
|
|
30
32
|
import {
|
|
31
33
|
channelSelectionNames
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-ALMR3E6Q.js";
|
|
33
35
|
import {
|
|
34
36
|
sanitizeLogText
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ML52PL6O.js";
|
|
36
38
|
import {
|
|
37
39
|
CHANNEL_WORKER_KILL_GRACE_MS,
|
|
38
40
|
CHANNEL_WORKER_STARTUP_TIMEOUT_MS,
|
|
@@ -34,12 +34,14 @@ import {
|
|
|
34
34
|
runtimeDiagnostics
|
|
35
35
|
} from "./chunk-LS77BEZP.js";
|
|
36
36
|
import {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
reportOpenAiChunk,
|
|
38
|
+
reportOpenAiRequest,
|
|
39
|
+
reportOpenAiResponse
|
|
40
|
+
} from "./chunk-FY3M44RD.js";
|
|
39
41
|
import {
|
|
40
42
|
ProtocolTagSanitizedEvent,
|
|
41
43
|
logProtocolTagSanitized
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RWS5VYWC.js";
|
|
43
45
|
import {
|
|
44
46
|
reconcileMaxTokens
|
|
45
47
|
} from "./chunk-UW5EOVUN.js";
|
|
@@ -1074,7 +1076,7 @@ var ContentGenerationPipeline = class {
|
|
|
1074
1076
|
request,
|
|
1075
1077
|
userPromptId,
|
|
1076
1078
|
false,
|
|
1077
|
-
async (openaiRequest, context) => {
|
|
1079
|
+
async (openaiRequest, context, telemetryAttempt) => {
|
|
1078
1080
|
const parentSignal = request.config?.abortSignal;
|
|
1079
1081
|
const perRequestAc = parentSignal ? createChildAbortController(parentSignal) : void 0;
|
|
1080
1082
|
try {
|
|
@@ -1084,6 +1086,7 @@ var ContentGenerationPipeline = class {
|
|
|
1084
1086
|
signal: perRequestAc?.signal
|
|
1085
1087
|
}
|
|
1086
1088
|
);
|
|
1089
|
+
reportOpenAiResponse(telemetryAttempt, openaiResponse);
|
|
1087
1090
|
const geminiResponse = OpenAIContentConverter.convertOpenAIResponseToGemini(
|
|
1088
1091
|
openaiResponse,
|
|
1089
1092
|
context
|
|
@@ -1100,7 +1103,7 @@ var ContentGenerationPipeline = class {
|
|
|
1100
1103
|
request,
|
|
1101
1104
|
userPromptId,
|
|
1102
1105
|
true,
|
|
1103
|
-
async (openaiRequest, context) => {
|
|
1106
|
+
async (openaiRequest, context, telemetryAttempt) => {
|
|
1104
1107
|
const parentSignal = request.config?.abortSignal;
|
|
1105
1108
|
const perRequestAc = createChildAbortController(parentSignal);
|
|
1106
1109
|
let stream;
|
|
@@ -1155,7 +1158,8 @@ var ContentGenerationPipeline = class {
|
|
|
1155
1158
|
guarded,
|
|
1156
1159
|
context,
|
|
1157
1160
|
request,
|
|
1158
|
-
userPromptId
|
|
1161
|
+
userPromptId,
|
|
1162
|
+
telemetryAttempt
|
|
1159
1163
|
);
|
|
1160
1164
|
async function* drainThenCleanup() {
|
|
1161
1165
|
try {
|
|
@@ -1177,7 +1181,7 @@ var ContentGenerationPipeline = class {
|
|
|
1177
1181
|
* 3. Handle chunk merging for providers that send finishReason and usageMetadata separately
|
|
1178
1182
|
* 4. Handle success/error logging
|
|
1179
1183
|
*/
|
|
1180
|
-
async *processStreamWithLogging(stream, context, request, userPromptId) {
|
|
1184
|
+
async *processStreamWithLogging(stream, context, request, userPromptId, telemetryAttempt) {
|
|
1181
1185
|
let pendingFinishResponse = null;
|
|
1182
1186
|
let finishYielded = false;
|
|
1183
1187
|
let pendingFinishProtocolTagSanitized;
|
|
@@ -1201,6 +1205,7 @@ var ContentGenerationPipeline = class {
|
|
|
1201
1205
|
}, "logPendingProtocolTagSanitized");
|
|
1202
1206
|
try {
|
|
1203
1207
|
for await (const chunk of stream) {
|
|
1208
|
+
reportOpenAiChunk(telemetryAttempt, chunk);
|
|
1204
1209
|
if (chunk.choices?.[0]?.finish_reason === "error_finish") {
|
|
1205
1210
|
const errorContent = chunk.choices?.[0]?.delta?.content?.trim() || "Unknown stream error";
|
|
1206
1211
|
throw new StreamContentError(errorContent);
|
|
@@ -1513,8 +1518,8 @@ var ContentGenerationPipeline = class {
|
|
|
1513
1518
|
);
|
|
1514
1519
|
openaiRequestCaptureContext.getStore()?.(openaiRequest);
|
|
1515
1520
|
runtimeDiagnostics.recordOpenAIWireRequest(openaiRequest);
|
|
1516
|
-
reportOpenAiRequest(openaiRequest);
|
|
1517
|
-
return executor(openaiRequest, context);
|
|
1521
|
+
const telemetryAttempt = reportOpenAiRequest(openaiRequest);
|
|
1522
|
+
return executor(openaiRequest, context, telemetryAttempt);
|
|
1518
1523
|
}, "executeAttempt");
|
|
1519
1524
|
try {
|
|
1520
1525
|
return await executeAttempt();
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
functionResponsePartsToString
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M4UKFCZ2.js";
|
|
6
6
|
import {
|
|
7
7
|
parseAndFormatApiError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DM4Q4JJH.js";
|
|
9
9
|
import {
|
|
10
10
|
formatVisionBridgeNoticeDisplay,
|
|
11
11
|
isVisionBridgeNoticeDisplay
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RWS5VYWC.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esbuild_shims
|
|
15
15
|
} from "./chunk-5O2XNYP6.js";
|