@qwen-code/qwen-code 0.19.6 → 0.19.7-nightly.20260708.394c1a289
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/model-providers.md +5 -1
- package/bundled/qc-helper/docs/configuration/settings.md +33 -1
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +41 -31
- package/bundled/qc-helper/docs/features/channels/wecom.md +111 -0
- package/bundled/qc-helper/docs/features/code-review.md +16 -6
- package/bundled/qc-helper/docs/features/commands.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +6 -0
- package/bundled/qc-helper/docs/features/skills.md +5 -3
- package/bundled/qc-helper/docs/integration-github-action.md +1 -1
- package/bundled/review/DESIGN.md +50 -18
- package/bundled/review/SKILL.md +102 -12
- package/chunks/{MaxSizedBox-SK7CUWZQ.js → MaxSizedBox-XS37LWTD.js} +31 -29
- package/chunks/{StandaloneSessionPicker-G44HGSAP.js → StandaloneSessionPicker-LPALJTKN.js} +44 -41
- package/chunks/{acpAgent-PKCTYWJV.js → acpAgent-4VE3FGJX.js} +769 -366
- package/chunks/{agent-IYMHUXWB.js → agent-CCHERW6L.js} +24 -24
- package/chunks/{agent-headless-L2DAW6I5.js → agent-headless-55N6UBUU.js} +24 -24
- package/chunks/{anthropicContentGenerator-H5ZOEENQ.js → anthropicContentGenerator-AKYPSZIV.js} +7 -7
- package/chunks/{artifact-tool-SLYPWG3C.js → artifact-tool-D233YJFH.js} +27 -8
- package/chunks/{askUserQuestion-OKPTECON.js → askUserQuestion-MKL5ZTMC.js} +2 -2
- package/chunks/{bridge-DF3IJQ5V.js → bridge-U6HXOHE7.js} +34 -32
- package/chunks/{channel-worker-supervisor-JUYQ5Z4R.js → channel-worker-supervisor-CRCVYQIE.js} +1 -1
- package/chunks/{chunk-AVQDCKNF.js → chunk-22MNNNXE.js} +4 -0
- package/chunks/chunk-2DYY5XUZ.js +8223 -0
- package/chunks/chunk-2FHWCKWA.js +262 -0
- package/chunks/{chunk-6BEOH4KK.js → chunk-2NPS2UDH.js} +767 -122
- package/chunks/{chunk-N2IJLN2L.js → chunk-2SWMCXVR.js} +13 -5
- package/chunks/{chunk-OBVBTAX5.js → chunk-2YELHTUE.js} +2 -2
- package/chunks/chunk-332PWN27.js +19 -0
- package/chunks/{chunk-CLQPBI4H.js → chunk-3B26UVCX.js} +132 -26
- package/chunks/{chunk-HCFSKO6K.js → chunk-3QDZDAJG.js} +1 -1
- package/chunks/{chunk-G7OQ3RFJ.js → chunk-42XGFRJS.js} +3 -3
- package/chunks/{chunk-SL2P3JUA.js → chunk-43W4YSO6.js} +1 -12
- package/chunks/{chunk-JA5KWZTJ.js → chunk-44NROQYV.js} +5 -3
- package/chunks/{chunk-BOAWGUY6.js → chunk-4AFOWB47.js} +121 -49
- package/chunks/{chunk-MOUXUCXQ.js → chunk-4KJ2BPIT.js} +1 -1
- package/chunks/{chunk-YTWX5TT2.js → chunk-5FL2K3ZB.js} +1 -1
- package/chunks/{chunk-UNXGEDX2.js → chunk-5OSSOBZC.js} +133 -25
- package/chunks/{chunk-JN2VJ33O.js → chunk-7I4MGFBN.js} +966 -121
- package/chunks/{chunk-T42ACHFI.js → chunk-7LTB54MK.js} +1 -1
- package/chunks/chunk-A2X3KLC3.js +3807 -0
- package/chunks/{chunk-EWALXUAD.js → chunk-AGHU5VRK.js} +8 -0
- package/chunks/{chunk-GLPV75ES.js → chunk-AHNJGLFV.js} +2 -2
- package/chunks/{chunk-IUSKVKH5.js → chunk-AXTPFMRS.js} +1 -1
- package/chunks/{chunk-T22H4V4R.js → chunk-B34OV7K2.js} +1 -1
- package/chunks/{chunk-FZ5NVRVK.js → chunk-B5FOCTEZ.js} +3 -3
- package/chunks/{chunk-3UC7ZC43.js → chunk-B6WUEODT.js} +7 -7
- package/chunks/{chunk-MJKEQSZI.js → chunk-BGL43SJ3.js} +1 -1
- package/chunks/{chunk-OAYOHSGP.js → chunk-BHRU4SDF.js} +4 -4
- package/chunks/{chunk-YPCPZSZB.js → chunk-CCGOFQV3.js} +56 -4
- package/chunks/{chunk-FDY3XOTM.js → chunk-CR5IU2RX.js} +4 -4
- package/chunks/{chunk-LWGLBVWA.js → chunk-CSOTA7KX.js} +1 -1
- package/chunks/{chunk-AGZF43UV.js → chunk-E7HM76PR.js} +7153 -4406
- package/chunks/{chunk-NIOPRZNN.js → chunk-E7KNELIZ.js} +1 -1
- package/chunks/{chunk-YSU33ACT.js → chunk-ELMPRVCB.js} +5 -13
- package/chunks/{chunk-SEZC2725.js → chunk-ER3BKOLB.js} +13 -0
- package/chunks/{chunk-3VJ7MT3N.js → chunk-EXPMGZZV.js} +14 -3
- package/chunks/{chunk-DBF3HTLT.js → chunk-FB2ULV4M.js} +4 -4
- package/chunks/{chunk-RZORUN6X.js → chunk-FEJ2FZ3U.js} +1 -1
- package/chunks/chunk-FK77ILF5.js +2477 -0
- package/chunks/{chunk-DMSNJDWG.js → chunk-FV7425LN.js} +38 -3
- package/chunks/{chunk-ALX6BUYW.js → chunk-G7ZG7CA6.js} +186 -27
- package/chunks/{chunk-2INJBYLJ.js → chunk-GIY6JTTC.js} +6 -6
- package/chunks/{chunk-D5KISTLW.js → chunk-H6EMK6QK.js} +1 -1
- package/chunks/{chunk-KYTQOCDE.js → chunk-HW4N45EE.js} +17 -46
- package/chunks/{chunk-VXGPYF7U.js → chunk-IFEWJXFS.js} +1 -1
- package/chunks/chunk-II73RK2S.js +158 -0
- package/chunks/{chunk-TENOUWY2.js → chunk-IJRL2S3D.js} +3 -3
- package/chunks/{chunk-GQBRGBLS.js → chunk-J43WPR6U.js} +9 -9
- package/chunks/{chunk-SRNPMG7J.js → chunk-JYOWO2F7.js} +16 -10
- package/chunks/{chunk-57NRQM3P.js → chunk-K34DD7FH.js} +2 -2
- package/chunks/{chunk-O2RJARYU.js → chunk-KKWO4IX2.js} +1409 -4088
- package/chunks/{chunk-SOT7OMGL.js → chunk-KT3SI3CQ.js} +2 -2
- package/chunks/{chunk-NUK2PFSU.js → chunk-L7IWK7JY.js} +1 -1
- package/chunks/{chunk-MHQKYQDS.js → chunk-LC4SMGYY.js} +158 -3
- package/chunks/chunk-LGFAYIKX.js +115 -0
- package/chunks/{chunk-MBWLP5OT.js → chunk-LKXDC3AW.js} +162 -40
- package/chunks/{chunk-7Z6UEJA4.js → chunk-ME344634.js} +5 -2
- package/chunks/{chunk-V6NH3CUC.js → chunk-MOQOAH7N.js} +3 -3
- package/chunks/{chunk-FPHA7WIZ.js → chunk-MYZWWRVW.js} +3 -3
- package/chunks/{chunk-YHTNWGRR.js → chunk-MZ7BABX3.js} +1 -1
- package/chunks/chunk-N74BA4VP.js +949 -0
- package/chunks/{chunk-B236XPGF.js → chunk-NQKLOAVJ.js} +29 -2
- package/chunks/{chunk-LXFCHX4X.js → chunk-OU6FPTJZ.js} +312 -25
- package/chunks/{chunk-HTWHAN44.js → chunk-PC4ZXHU2.js} +1 -1
- package/chunks/{chunk-3X76L4UF.js → chunk-PLGONYEL.js} +5 -5
- package/chunks/{chunk-WXUDZHOJ.js → chunk-PVXPDMGP.js} +10 -2
- package/chunks/{chunk-ZO5EA3XJ.js → chunk-QCSLZO6J.js} +1 -1
- package/chunks/{chunk-CEYA7K7C.js → chunk-QHT5USLK.js} +62 -12
- package/chunks/{chunk-NPQWQYU6.js → chunk-QYNNN7BK.js} +1 -1
- package/chunks/{chunk-N4YJQTRL.js → chunk-RFIL6REB.js} +71 -2
- package/chunks/{chunk-KSPVDFE4.js → chunk-SAIILPQ3.js} +0 -3
- package/chunks/{chunk-OIFSBXSP.js → chunk-SJHAUELE.js} +3 -3
- package/chunks/{chunk-BZHLWC6T.js → chunk-SUAKHHK7.js} +2 -2
- package/chunks/{chunk-QOKV6AO4.js → chunk-T2EJHSE3.js} +184 -147
- package/chunks/{chunk-ZI4MGBB5.js → chunk-TBAZMRW3.js} +1 -1
- package/chunks/{chunk-6QVRLKTZ.js → chunk-TBLJNMI7.js} +7 -7
- package/chunks/{chunk-J6ABRKAB.js → chunk-TDGF35EN.js} +2 -2
- package/chunks/chunk-TEYGKLIZ.js +167 -0
- package/chunks/{chunk-TOAUDIS7.js → chunk-TLWA7TPR.js} +6 -2
- package/chunks/chunk-UIDXQNMV.js +13 -0
- package/chunks/{chunk-MX7CTJHR.js → chunk-UZCT5OLN.js} +9 -9
- package/chunks/{chunk-LM3YCCZJ.js → chunk-VEB3NYSO.js} +1 -1
- package/chunks/{chunk-UTL7KABL.js → chunk-VQJ64BIQ.js} +7 -7
- package/chunks/{chunk-C2QKQZEQ.js → chunk-VTCPREC7.js} +3 -3
- package/chunks/{chunk-5ES5YPED.js → chunk-VZ7HY3YU.js} +1 -1
- package/chunks/{chunk-QOMAHFYI.js → chunk-W7EEOR7D.js} +3 -3
- package/chunks/{chunk-NVFJSIAX.js → chunk-WMPVYQ4P.js} +1 -1
- package/chunks/{chunk-V5VTULL5.js → chunk-X265R5C6.js} +3 -3
- package/chunks/{chunk-LKWAVAB5.js → chunk-X2XNQQJI.js} +2 -2
- package/chunks/{chunk-MJKMIQMK.js → chunk-X3YGAX7V.js} +1 -1
- package/chunks/{chunk-5WQF27GW.js → chunk-XQ2GVLNJ.js} +1 -1
- package/chunks/chunk-XUSONNJ4.js +28 -0
- package/chunks/{chunk-DXXNMPJH.js → chunk-YMWIKAEE.js} +460 -93
- package/chunks/{chunk-A34EPIUV.js → chunk-YYU6H66M.js} +18 -15
- package/chunks/{chunk-XH7H6YG4.js → chunk-ZK5EI6NR.js} +4 -107
- package/chunks/{computer-use-5S3NVXRA.js → computer-use-4CTF6WS3.js} +24 -24
- package/chunks/{contextCommand-DPBALZFK.js → contextCommand-Z3XWQCY6.js} +28 -27
- package/chunks/{cron-create-7JYUDTUY.js → cron-create-JSXEIPVS.js} +4 -4
- package/chunks/{cron-delete-YPULQQAK.js → cron-delete-OIFVEPGU.js} +4 -4
- package/chunks/{cron-list-HJIW5MHP.js → cron-list-D4ZX4IOE.js} +11 -7
- package/chunks/{daemon-7XYW4BC3.js → daemon-F3I2RXP6.js} +208 -63
- package/chunks/daemon-status-provider-6A4QCG6Q.js +74 -0
- package/chunks/dist-573HNSVO.js +3217 -0
- package/chunks/{dist-ABQ7VWRR.js → dist-FQ5WRJPL.js} +2 -2
- package/chunks/{dist-JPSVN367.js → dist-IMFFBMAT.js} +6 -3792
- package/chunks/{dist-BV56HW3W.js → dist-OT7G2WNM.js} +250 -1
- package/chunks/{dist-AW5ZYMUI.js → dist-PKFTNUHO.js} +10 -11
- package/chunks/{dist-AAO65DPC.js → dist-YTRKAVUB.js} +1 -1
- package/chunks/{earlyInputCapture-GGPV4IFT.js → earlyInputCapture-7O47HW62.js} +25 -25
- package/chunks/{edit-HJ7ISN4C.js → edit-E32KWLF2.js} +25 -25
- package/chunks/{en-XR3S5VWY.js → en-GA2RMXY5.js} +6 -1
- package/chunks/{enter-worktree-2BQT675D.js → enter-worktree-ZKFFMHUD.js} +24 -24
- package/chunks/{enterPlanMode-SJXHJ3WD.js → enterPlanMode-HLDC6NGX.js} +24 -24
- package/chunks/{errors-EVGER4AZ.js → errors-MTIDDXX7.js} +26 -26
- package/chunks/{exit-worktree-RPDDOSPM.js → exit-worktree-YHY72XA2.js} +24 -24
- package/chunks/{exitPlanMode-BQEROAJ7.js → exitPlanMode-JNXKBZ2C.js} +24 -24
- package/chunks/{fast-path-FX2ICJ2O.js → fast-path-DVAGBROV.js} +5 -2
- package/chunks/{fr-MBMNQSQ6.js → fr-GWNQG4XH.js} +4 -0
- package/chunks/{gemini-EHUXCOUI.js → gemini-2TMHJVRC.js} +444 -256
- package/chunks/{geminiContentGenerator-YDUUKAM2.js → geminiContentGenerator-WCH4GWD3.js} +4 -4
- package/chunks/{glob-3VIGV2DL.js → glob-I6Y4AGKO.js} +52 -28
- package/chunks/{grep-4D3S4NUC.js → grep-3P2J3LU5.js} +24 -24
- package/chunks/handleAutoUpdate-4IVRMRG4.js +65 -0
- package/chunks/{initializer-QZTZSSLW.js → initializer-DVNCPVTC.js} +31 -29
- package/chunks/{ja-HFV5QCHR.js → ja-2HOTA47X.js} +4 -0
- package/chunks/{keychain-token-storage-GPAKRDKQ.js → keychain-token-storage-UJV5XP4Z.js} +2 -2
- package/chunks/{list-WQ24EAMK.js → list-4D6QK2KZ.js} +30 -30
- package/chunks/{loadedSettingsAdapter-XV74KOSR.js → loadedSettingsAdapter-GNGELH6Q.js} +28 -28
- package/chunks/{loop-wakeup-34YK7T7O.js → loop-wakeup-OHWEMFP5.js} +5 -5
- package/chunks/{ls-MPD5OJUX.js → ls-L654WOAT.js} +4 -4
- package/chunks/{lsp-72PWTDW7.js → lsp-M35KE54Y.js} +2 -2
- package/chunks/{mcp-CO3MKM7N.js → mcp-2IL72YJP.js} +28 -28
- package/chunks/{monitor-GB56T65A.js → monitor-BLVCZAVX.js} +32 -27
- package/chunks/nonInteractiveCli-UD3V7UOO.js +116 -0
- package/chunks/{notebook-edit-VMXAAE3R.js → notebook-edit-5TVMWIWY.js} +25 -25
- package/chunks/{openaiContentGenerator-GM77FLII.js → openaiContentGenerator-5LJ5A7YY.js} +12 -12
- package/chunks/{pidfile-HFXSHR64.js → pidfile-AN5JQJ2T.js} +25 -25
- package/chunks/{qwenContentGenerator-QSCXQIKJ.js → qwenContentGenerator-E2JSB4FJ.js} +26 -26
- package/chunks/{qwenOAuth2-LWLA6MQG.js → qwenOAuth2-ZV7YLMND.js} +5 -5
- package/chunks/{read-file-SVH6CGQY.js → read-file-N5DEFUDU.js} +8 -8
- package/chunks/{read-mcp-resource-OWOBJY72.js → read-mcp-resource-CNQHBSJM.js} +2 -2
- package/chunks/{record-artifact-URK3YUDJ.js → record-artifact-PP3LKHTS.js} +2 -2
- package/chunks/{ripGrep-JD5O2FLX.js → ripGrep-BLJHTHKE.js} +24 -24
- package/chunks/{run-qwen-serve-FADLRJUN.js → run-qwen-serve-4JDO64RN.js} +785 -35
- package/chunks/{scheduler-Q65SB7DJ.js → scheduler-FQR4XA7J.js} +24 -24
- package/chunks/{send-message-L7OLQEKH.js → send-message-OA6MV4EU.js} +3 -3
- package/chunks/{serve-6ZXAMQ4M.js → serve-ZOCFC7YM.js} +29 -29
- package/chunks/{server-WKDQA6XR.js → server-GEOYEPYT.js} +2504 -439
- package/chunks/{session-STWOX7RA.js → session-NJCONHGX.js} +66 -61
- package/chunks/{settings-LC4CCWQQ.js → settings-QBGGXANI.js} +27 -27
- package/chunks/{shell-FEG3RLPW.js → shell-2DVPSEKT.js} +24 -24
- package/chunks/{skill-XTXAMDAP.js → skill-HIPXUHV7.js} +24 -12
- package/chunks/{spawnChannel-B6JJPBPV.js → spawnChannel-3JYXY52G.js} +27 -27
- package/chunks/{src-HITDGVRM.js → src-NLEX4CUC.js} +91 -36
- package/chunks/{startInteractiveUI-IT423PW4.js → startInteractiveUI-TYGZIU27.js} +6213 -14273
- package/chunks/{syntheticOutput-J3MLCQAR.js → syntheticOutput-F7LSDCAR.js} +3 -3
- package/chunks/{task-create-ELEBZ7H2.js → task-create-RPFZNB4B.js} +7 -7
- package/chunks/{task-list-IEUZLF3Y.js → task-list-TGGJX7EA.js} +5 -5
- package/chunks/{task-stop-QEZW3UDY.js → task-stop-W7NGTMYQ.js} +2 -2
- package/chunks/{task-update-DW36J5P5.js → task-update-5WUG5MVQ.js} +7 -7
- package/chunks/{team-create-DAG6SNHZ.js → team-create-MGX57SZJ.js} +24 -24
- package/chunks/{team-delete-SVITIMBO.js → team-delete-UHQQ2QQX.js} +5 -5
- package/chunks/{team-plan-approval-DRDY5OPC.js → team-plan-approval-BO2N7J3E.js} +24 -24
- package/chunks/{theme-manager-N67EZC6B.js → theme-manager-WU7LOA64.js} +25 -25
- package/chunks/{todoWrite-SFFQHZYY.js → todoWrite-C4ZAMSR3.js} +4 -4
- package/chunks/{tool-search-CMDJ5HGM.js → tool-search-CLBKVEVK.js} +11 -28
- package/chunks/{trustedFolders-JD4QX6UJ.js → trustedFolders-GAQM2GHB.js} +25 -25
- package/chunks/updateCheck-RIK2YIQE.js +65 -0
- package/chunks/{validateNonInterActiveAuth-ADDCGZ6A.js → validateNonInterActiveAuth-NS3GBIJZ.js} +61 -56
- package/chunks/{version-VAONYVE5.js → version-B3RSLP54.js} +2 -1
- package/chunks/{web-fetch-SXAXJHIO.js → web-fetch-UYGMOHW4.js} +5 -5
- package/chunks/{workflow-DG2BR42M.js → workflow-7APPIGND.js} +25 -25
- package/chunks/{workspace-providers-status-XGW5OZTD.js → workspace-providers-status-SC67GLMY.js} +30 -30
- package/chunks/{workspace-service-GX3GGZLU.js → workspace-service-ZJHF22WA.js} +35 -35
- package/chunks/{workspace-skills-status-LFK5WV2V.js → workspace-skills-status-NJEK6P6Y.js} +29 -29
- package/chunks/{write-file-UR7FXWOU.js → write-file-R6Z3VLRY.js} +25 -25
- package/chunks/{zh-FSVJTXA4.js → zh-7XVVRTDH.js} +6 -1
- package/chunks/{zh-TW-66MG4LWL.js → zh-TW-DPH554OG.js} +6 -1
- package/cli.js +19 -11
- package/locales/en.js +9 -2
- package/locales/fr.js +6 -0
- package/locales/ja.js +6 -0
- package/locales/zh-TW.js +9 -2
- package/locales/zh.js +9 -2
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CUpe0ibu.js → arc-C7hjaa7g.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-JvyrY_mK.js → architectureDiagram-3BPJPVTR-pm9KtMZY.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CK3Y_vom.js → blockDiagram-GPEHLZMM-CApElKsU.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DprSnyrf.js → c4Diagram-AAUBKEIU-BeDe0-9N.js} +1 -1
- package/web-shell/assets/channel-BNf1dW-j.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DJtRJPmu.js → chunk-2J33WTMH-DJEkmLdl.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-ON6Q2-BG.js → chunk-4BX2VUAB-DXX8gdpe.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-c60ou5HZ.js → chunk-55IACEB6-DORmk1kQ.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-BamtPKxx.js → chunk-727SXJPM-DWmO4mCZ.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CsVgpu-T.js → chunk-AQP2D5EJ-C7LRaYw2.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-vZrpjAx4.js → chunk-FMBD7UC4-CCdXgyC5.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-qxyNOd5t.js → chunk-ND2GUHAM-SyL_xvWc.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BvTJSM_S.js → chunk-QZHKN3VN-BzOuCKxa.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-1tXB4pju.js → cose-bilkent-S5V4N54A-BMPWyDKc.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DglBzme8.js → dagre-BM42HDAG-B_GnPWik.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DEJpqsWz.js → diagram-2AECGRRQ-fJqMc3S_.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CsQ1NrMG.js → diagram-5GNKFQAL-ximV3O9D.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Z-3codAi.js → diagram-KO2AKTUF-2vVyjzqw.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-mBuPTA2i.js → diagram-LMA3HP47-Dckcx1sT.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-tcA3K3s9.js → diagram-OG6HWLK6-BAVv47ga.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-D9bXFRyZ.js → erDiagram-TEJ5UH35-Bn3nf5J0.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-Ck0Py04s.js → flowDiagram-I6XJVG4X-BIbGF9JT.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-rOevCekE.js → ganttDiagram-6RSMTGT7-CDbhb3AH.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CoPQaLj0.js → gitGraphDiagram-PVQCEYII-CbKG1a_w.js} +1 -1
- package/web-shell/assets/index-CnE2ur2L.js +779 -0
- package/web-shell/assets/index-hSKXrlSE.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-a77CUKoI.js → infoDiagram-5YYISTIA-DUFxTy8m.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DlLgUAO-.js → ishikawaDiagram-YF4QCWOH-D69hrBG8.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BXR5kVAZ.js → journeyDiagram-JHISSGLW-DsvEw51Y.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-h5CoHZg7.js → kanban-definition-UN3LZRKU-lFFjZEYd.js} +1 -1
- package/web-shell/assets/{linear-BkaREbyD.js → linear-Bo5bWzvo.js} +1 -1
- package/web-shell/assets/{mermaid.core-Bkagz0ng.js → mermaid.core-C_HKMJx5.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D7EMKR_5.js → mindmap-definition-RKZ34NQL-DlV-NUTs.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DAmPOjsL.js → pieDiagram-4H26LBE5-B2e6FH2a.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-e4WFQkQu.js → quadrantDiagram-W4KKPZXB-D75kSk-b.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-v1zo7OiV.js → requirementDiagram-4Y6WPE33-CQ6xakhM.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bstm4aW_.js → sankeyDiagram-5OEKKPKP-J_XTKrcY.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DzcZy6xN.js → sequenceDiagram-3UESZ5HK-D7jTcBtf.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-BEJH6YbH.js → stateDiagram-AJRCARHV-CrlM_OT3.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-TI1wH-Pm.js → timeline-definition-PNZ67QCA-5oZi76Ef.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-YaH8VDMS.js → vennDiagram-CIIHVFJN-DO5YptPK.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B80co7OP.js → wardley-L42UT6IY-4t1eJDvM.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-4fHNDEMl.js → wardleyDiagram-YWT4CUSO-DKZc661S.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DT3q4Z3J.js → xychartDiagram-2RQKCTM6-su9hp08G.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-L7QPM2YD.js +0 -481
- package/chunks/daemon-status-provider-2EWTHT7Y.js +0 -73
- package/chunks/nonInteractiveCli-HNZRIM5I.js +0 -111
- package/web-shell/assets/channel-BAxQ2-aZ.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cvd_xhZI.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvd_xhZI.js +0 -1
- package/web-shell/assets/index-Cr7MYW6T.css +0 -5
- package/web-shell/assets/index-DCHPAUp3.js +0 -730
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BopifCBI.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-22MNNNXE.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esbuild_shims
|
|
8
8
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -97,7 +97,33 @@ ${body}
|
|
|
97
97
|
`;
|
|
98
98
|
}
|
|
99
99
|
__name(buildSkillLlmContent, "buildSkillLlmContent");
|
|
100
|
+
var collectCache = /* @__PURE__ */ new WeakMap();
|
|
101
|
+
var COLLECT_CACHE_TTL_MS = 2e3;
|
|
102
|
+
function clearCollectedSkillEntriesCache(skillManager) {
|
|
103
|
+
if (skillManager) {
|
|
104
|
+
collectCache.delete(skillManager);
|
|
105
|
+
} else {
|
|
106
|
+
collectCache = /* @__PURE__ */ new WeakMap();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
__name(clearCollectedSkillEntriesCache, "clearCollectedSkillEntriesCache");
|
|
100
110
|
async function collectAvailableSkillEntries(skillManager, config) {
|
|
111
|
+
const cached = collectCache.get(skillManager);
|
|
112
|
+
if (cached && Date.now() - cached.ts < COLLECT_CACHE_TTL_MS) {
|
|
113
|
+
return cached.promise;
|
|
114
|
+
}
|
|
115
|
+
const promise = collectAvailableSkillEntriesUncached(skillManager, config);
|
|
116
|
+
collectCache.set(skillManager, { promise, ts: Date.now() });
|
|
117
|
+
promise.catch(() => {
|
|
118
|
+
const entry = collectCache.get(skillManager);
|
|
119
|
+
if (entry?.promise === promise) {
|
|
120
|
+
collectCache.delete(skillManager);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return promise;
|
|
124
|
+
}
|
|
125
|
+
__name(collectAvailableSkillEntries, "collectAvailableSkillEntries");
|
|
126
|
+
async function collectAvailableSkillEntriesUncached(skillManager, config) {
|
|
101
127
|
const allSkills = await skillManager.listSkills();
|
|
102
128
|
const disabledNames = config.getDisabledSkillNames();
|
|
103
129
|
const isDisabled = /* @__PURE__ */ __name((name) => disabledNames.has(name.toLowerCase()), "isDisabled");
|
|
@@ -136,7 +162,7 @@ async function collectAvailableSkillEntries(skillManager, config) {
|
|
|
136
162
|
entries
|
|
137
163
|
};
|
|
138
164
|
}
|
|
139
|
-
__name(
|
|
165
|
+
__name(collectAvailableSkillEntriesUncached, "collectAvailableSkillEntriesUncached");
|
|
140
166
|
function compareSkillEntries(a, b) {
|
|
141
167
|
const aGroup = a.level !== void 0 ? 0 : 1;
|
|
142
168
|
const bGroup = b.level !== void 0 ? 0 : 1;
|
|
@@ -247,6 +273,7 @@ export {
|
|
|
247
273
|
escapeXml,
|
|
248
274
|
escapeSystemReminderTags,
|
|
249
275
|
buildSkillLlmContent,
|
|
276
|
+
clearCollectedSkillEntriesCache,
|
|
250
277
|
collectAvailableSkillEntries,
|
|
251
278
|
renderAvailableSkillsBlock,
|
|
252
279
|
applySkillAllowedTools,
|
|
@@ -22,18 +22,22 @@ import {
|
|
|
22
22
|
SessionShellDisabledError,
|
|
23
23
|
WorkspaceMismatchError,
|
|
24
24
|
isNotCurrentlyGeneratingCancelError
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-B34OV7K2.js";
|
|
26
26
|
import {
|
|
27
|
+
LOAD_REPLAY_BULK_MODE,
|
|
28
|
+
LOAD_REPLAY_META_KEY,
|
|
29
|
+
LOAD_REPLAY_MODE_META_KEY,
|
|
30
|
+
LOAD_REPLAY_VERSION,
|
|
27
31
|
MID_TURN_QUEUE_DRAIN_METHOD
|
|
28
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AGHU5VRK.js";
|
|
29
33
|
import {
|
|
30
34
|
canonicalizeWorkspace
|
|
31
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ER3BKOLB.js";
|
|
32
36
|
import {
|
|
33
37
|
DEFAULT_RING_SIZE,
|
|
34
38
|
EVENT_SCHEMA_VERSION,
|
|
35
39
|
EventBus
|
|
36
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-G7ZG7CA6.js";
|
|
37
41
|
import {
|
|
38
42
|
ClientSideConnection,
|
|
39
43
|
PROTOCOL_VERSION,
|
|
@@ -41,7 +45,7 @@ import {
|
|
|
41
45
|
} from "./chunk-VRDMOSQS.js";
|
|
42
46
|
import {
|
|
43
47
|
defaultSpawnChannelFactory
|
|
44
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-K34DD7FH.js";
|
|
45
49
|
import {
|
|
46
50
|
BridgeChannelClosedError,
|
|
47
51
|
BridgeTimeoutError,
|
|
@@ -50,15 +54,15 @@ import {
|
|
|
50
54
|
STATUS_SCHEMA_VERSION,
|
|
51
55
|
createIdleWorkspaceExtensionsStatus,
|
|
52
56
|
createIdleWorkspaceHooksStatus
|
|
53
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-ME344634.js";
|
|
54
58
|
import {
|
|
55
59
|
ShellExecutionService,
|
|
56
60
|
TrustGateError
|
|
57
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-E7HM76PR.js";
|
|
58
62
|
import {
|
|
59
63
|
DAEMON_TRACEPARENT_META_KEY,
|
|
60
64
|
DAEMON_TRACESTATE_META_KEY
|
|
61
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-7I4MGFBN.js";
|
|
62
66
|
import {
|
|
63
67
|
init_esbuild_shims
|
|
64
68
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -1198,7 +1202,7 @@ function sliceLineRange(content, startLine, endLine) {
|
|
|
1198
1202
|
}
|
|
1199
1203
|
__name(sliceLineRange, "sliceLineRange");
|
|
1200
1204
|
var BridgeClient = class {
|
|
1201
|
-
constructor(resolveEntry, resolvePendingRestoreEvents, mediator, permissionTimeoutMs, maxPendingPerSession, fileSystem, onModelPromoted, onModePromoted, clientMcpSender, ownsSession = () => true) {
|
|
1205
|
+
constructor(resolveEntry, resolvePendingRestoreEvents, mediator, permissionTimeoutMs, maxPendingPerSession, fileSystem, onModelPromoted, onModePromoted, clientMcpSender, ownsSession = () => true, onTokenUsage) {
|
|
1202
1206
|
this.resolveEntry = resolveEntry;
|
|
1203
1207
|
this.resolvePendingRestoreEvents = resolvePendingRestoreEvents;
|
|
1204
1208
|
this.mediator = mediator;
|
|
@@ -1209,6 +1213,7 @@ var BridgeClient = class {
|
|
|
1209
1213
|
this.onModePromoted = onModePromoted;
|
|
1210
1214
|
this.clientMcpSender = clientMcpSender;
|
|
1211
1215
|
this.ownsSession = ownsSession;
|
|
1216
|
+
this.onTokenUsage = onTokenUsage;
|
|
1212
1217
|
}
|
|
1213
1218
|
static {
|
|
1214
1219
|
__name(this, "BridgeClient");
|
|
@@ -1271,11 +1276,27 @@ var BridgeClient = class {
|
|
|
1271
1276
|
const entry = this.resolveEntry(params.sessionId);
|
|
1272
1277
|
const events = entry?.events ?? this.resolvePendingRestoreEvents(params.sessionId);
|
|
1273
1278
|
if (!events) return;
|
|
1279
|
+
const prepared = this.prepareSessionUpdateFrames(params, entry);
|
|
1280
|
+
for (const frame of prepared.frames) {
|
|
1281
|
+
events.publish(frame);
|
|
1282
|
+
}
|
|
1283
|
+
try {
|
|
1284
|
+
this.recordLiveTokenUsage(params, entry);
|
|
1285
|
+
} catch {
|
|
1286
|
+
}
|
|
1287
|
+
if (entry && prepared.artifacts.length > 0) {
|
|
1288
|
+
await this.upsertAndPublishArtifacts(entry, prepared.artifacts, {
|
|
1289
|
+
trustedPublisher: prepared.trustedPublisher
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
prepareSessionUpdateFrames(params, entry) {
|
|
1274
1294
|
const originator = entry?.activePromptOriginatorClientId ? { originatorClientId: entry.activePromptOriginatorClientId } : {};
|
|
1295
|
+
const frames = [];
|
|
1275
1296
|
const a2ui = extractA2uiToolUpdate(params);
|
|
1276
1297
|
if (a2ui) {
|
|
1277
1298
|
for (const surface of a2ui.surfaces) {
|
|
1278
|
-
|
|
1299
|
+
frames.push({
|
|
1279
1300
|
type: "session_update",
|
|
1280
1301
|
data: {
|
|
1281
1302
|
sessionId: params.sessionId,
|
|
@@ -1304,19 +1325,70 @@ var BridgeClient = class {
|
|
|
1304
1325
|
entry.sessionId
|
|
1305
1326
|
) : [];
|
|
1306
1327
|
const publishParams = sanitizeSessionUpdateArtifacts(params, updateMeta);
|
|
1307
|
-
|
|
1328
|
+
frames.push({
|
|
1308
1329
|
type: "session_update",
|
|
1309
1330
|
data: publishParams,
|
|
1310
1331
|
...originator,
|
|
1311
1332
|
...serverTimestamp !== void 0 ? { _meta: { serverTimestamp } } : {}
|
|
1312
1333
|
});
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1334
|
+
return {
|
|
1335
|
+
frames,
|
|
1336
|
+
artifacts,
|
|
1337
|
+
trustedPublisher: isTrustedArtifactToolUpdate(params, updateMeta)
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
async seedSessionUpdates(entry, updates) {
|
|
1341
|
+
const frames = [];
|
|
1342
|
+
const artifactBatches = [];
|
|
1343
|
+
for (const update of updates) {
|
|
1344
|
+
const prepared = this.prepareSessionUpdateFrames(
|
|
1345
|
+
{ sessionId: entry.sessionId, update },
|
|
1346
|
+
entry
|
|
1347
|
+
);
|
|
1348
|
+
frames.push(...prepared.frames);
|
|
1349
|
+
if (prepared.artifacts.length > 0) {
|
|
1350
|
+
artifactBatches.push({
|
|
1351
|
+
artifacts: prepared.artifacts,
|
|
1352
|
+
trustedPublisher: prepared.trustedPublisher
|
|
1317
1353
|
});
|
|
1318
1354
|
}
|
|
1319
1355
|
}
|
|
1356
|
+
entry.events.seedReplayEvents(frames);
|
|
1357
|
+
for (const batch of artifactBatches) {
|
|
1358
|
+
await this.upsertAndPublishArtifacts(entry, batch.artifacts, {
|
|
1359
|
+
trustedPublisher: batch.trustedPublisher
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
/**
|
|
1364
|
+
* Daemon token-burn accounting for LIVE model turns. Called only from
|
|
1365
|
+
* `sessionUpdate` (the live session/update fan-in), never from
|
|
1366
|
+
* `seedSessionUpdates` — so batch load-replay never lands historical usage in
|
|
1367
|
+
* the current metrics window. Additionally guarded on a live `entry`: a stray
|
|
1368
|
+
* pending-restore frame (entry not yet registered) is skipped too, so replayed
|
|
1369
|
+
* history can't post a phantom burn spike with no model call.
|
|
1370
|
+
*
|
|
1371
|
+
* Usage rides an otherwise-empty `agent_message_chunk` as `update._meta.usage`
|
|
1372
|
+
* with per-round camelCase increments; subagent frames carry their own usage
|
|
1373
|
+
* (tagged `parentToolCallId`) and are independent turns, so counting each
|
|
1374
|
+
* frame once is the correct total. `_meta`/`usage` are optional and untyped.
|
|
1375
|
+
*/
|
|
1376
|
+
recordLiveTokenUsage(params, entry) {
|
|
1377
|
+
if (!this.onTokenUsage || !entry) return;
|
|
1378
|
+
const updateMeta = params.update._meta;
|
|
1379
|
+
const usage = updateMeta?.["usage"];
|
|
1380
|
+
if (usage === null || typeof usage !== "object") return;
|
|
1381
|
+
const inputTokens = usage.inputTokens;
|
|
1382
|
+
const outputTokens = usage.outputTokens;
|
|
1383
|
+
if (typeof inputTokens !== "number" && typeof outputTokens !== "number") {
|
|
1384
|
+
return;
|
|
1385
|
+
}
|
|
1386
|
+
const durationMs = updateMeta?.["durationMs"];
|
|
1387
|
+
this.onTokenUsage(
|
|
1388
|
+
typeof inputTokens === "number" ? inputTokens : 0,
|
|
1389
|
+
typeof outputTokens === "number" ? outputTokens : 0,
|
|
1390
|
+
typeof durationMs === "number" ? durationMs : void 0
|
|
1391
|
+
);
|
|
1320
1392
|
}
|
|
1321
1393
|
/**
|
|
1322
1394
|
* Bounded early-event buffer. Frames are keyed by sessionId; each
|
|
@@ -3068,6 +3140,95 @@ var NOOP_BRIDGE_TELEMETRY = {
|
|
|
3068
3140
|
return { ...request, _meta: nextMeta };
|
|
3069
3141
|
}
|
|
3070
3142
|
};
|
|
3143
|
+
var KNOWN_SESSION_UPDATE_TYPES = /* @__PURE__ */ new Set([
|
|
3144
|
+
"user_message_chunk",
|
|
3145
|
+
"agent_message_chunk",
|
|
3146
|
+
"agent_thought_chunk",
|
|
3147
|
+
"tool_call",
|
|
3148
|
+
"tool_call_update",
|
|
3149
|
+
"plan",
|
|
3150
|
+
"available_commands_update",
|
|
3151
|
+
"current_mode_update",
|
|
3152
|
+
"config_option_update",
|
|
3153
|
+
"session_info_update",
|
|
3154
|
+
"usage_update"
|
|
3155
|
+
]);
|
|
3156
|
+
var MAX_BULK_REPLAY_UPDATES = 1e4;
|
|
3157
|
+
function isRecord2(value) {
|
|
3158
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3159
|
+
}
|
|
3160
|
+
__name(isRecord2, "isRecord");
|
|
3161
|
+
function isBulkReplayUpdate(value) {
|
|
3162
|
+
if (!isRecord2(value)) return false;
|
|
3163
|
+
const updateType = value["sessionUpdate"];
|
|
3164
|
+
return typeof updateType === "string" && KNOWN_SESSION_UPDATE_TYPES.has(updateType);
|
|
3165
|
+
}
|
|
3166
|
+
__name(isBulkReplayUpdate, "isBulkReplayUpdate");
|
|
3167
|
+
function describeLoadReplayValue(value) {
|
|
3168
|
+
if (Array.isArray(value)) return "array";
|
|
3169
|
+
if (value === null) return "null";
|
|
3170
|
+
return typeof value;
|
|
3171
|
+
}
|
|
3172
|
+
__name(describeLoadReplayValue, "describeLoadReplayValue");
|
|
3173
|
+
function extractLoadReplayResponse(state) {
|
|
3174
|
+
const meta = isRecord2(state._meta) ? state._meta : void 0;
|
|
3175
|
+
const replay = meta?.[LOAD_REPLAY_META_KEY];
|
|
3176
|
+
if (replay === void 0) return { state, updates: [] };
|
|
3177
|
+
if (!isRecord2(replay) || replay["v"] !== LOAD_REPLAY_VERSION) {
|
|
3178
|
+
const version = isRecord2(replay) ? replay["v"] : void 0;
|
|
3179
|
+
throw new Error(
|
|
3180
|
+
`Invalid qwen.session.loadReplay payload (type=${describeLoadReplayValue(replay)}, version=${JSON.stringify(version)})`
|
|
3181
|
+
);
|
|
3182
|
+
}
|
|
3183
|
+
const rawUpdates = replay["updates"];
|
|
3184
|
+
if (!Array.isArray(rawUpdates)) {
|
|
3185
|
+
throw new Error(
|
|
3186
|
+
`Invalid qwen.session.loadReplay updates (version=${LOAD_REPLAY_VERSION}, count=not-array)`
|
|
3187
|
+
);
|
|
3188
|
+
}
|
|
3189
|
+
if (rawUpdates.length > MAX_BULK_REPLAY_UPDATES) {
|
|
3190
|
+
throw new Error(
|
|
3191
|
+
`qwen.session.loadReplay updates exceed limit (${rawUpdates.length} > ${MAX_BULK_REPLAY_UPDATES})`
|
|
3192
|
+
);
|
|
3193
|
+
}
|
|
3194
|
+
const partial = replay["partial"];
|
|
3195
|
+
if (partial !== void 0 && partial !== true) {
|
|
3196
|
+
throw new Error(
|
|
3197
|
+
`Invalid qwen.session.loadReplay partial (version=${LOAD_REPLAY_VERSION}, partial=${JSON.stringify(partial)})`
|
|
3198
|
+
);
|
|
3199
|
+
}
|
|
3200
|
+
const replayError = replay["replayError"];
|
|
3201
|
+
if (replayError !== void 0 && typeof replayError !== "string") {
|
|
3202
|
+
throw new Error(
|
|
3203
|
+
`Invalid qwen.session.loadReplay replayError (version=${LOAD_REPLAY_VERSION}, replayError=${describeLoadReplayValue(replayError)})`
|
|
3204
|
+
);
|
|
3205
|
+
}
|
|
3206
|
+
const invalidUpdateIndex = rawUpdates.findIndex(
|
|
3207
|
+
(update) => !isBulkReplayUpdate(update)
|
|
3208
|
+
);
|
|
3209
|
+
if (invalidUpdateIndex !== -1) {
|
|
3210
|
+
const invalidUpdate = rawUpdates[invalidUpdateIndex];
|
|
3211
|
+
const discriminator = isRecord2(invalidUpdate) ? invalidUpdate["sessionUpdate"] : void 0;
|
|
3212
|
+
throw new Error(
|
|
3213
|
+
`Invalid qwen.session.loadReplay update at index ${invalidUpdateIndex} (version=${LOAD_REPLAY_VERSION}, count=${rawUpdates.length}, sessionUpdate=${JSON.stringify(discriminator)})`
|
|
3214
|
+
);
|
|
3215
|
+
}
|
|
3216
|
+
const nextMeta = { ...meta ?? {} };
|
|
3217
|
+
delete nextMeta[LOAD_REPLAY_META_KEY];
|
|
3218
|
+
const cleanState = { ...state };
|
|
3219
|
+
if (Object.keys(nextMeta).length > 0) {
|
|
3220
|
+
cleanState._meta = nextMeta;
|
|
3221
|
+
} else {
|
|
3222
|
+
delete cleanState._meta;
|
|
3223
|
+
}
|
|
3224
|
+
return {
|
|
3225
|
+
state: cleanState,
|
|
3226
|
+
updates: rawUpdates,
|
|
3227
|
+
...partial === true ? { partial: true } : {},
|
|
3228
|
+
...typeof replayError === "string" ? { replayError } : {}
|
|
3229
|
+
};
|
|
3230
|
+
}
|
|
3231
|
+
__name(extractLoadReplayResponse, "extractLoadReplayResponse");
|
|
3071
3232
|
function isServeDebugLoggingEnabled() {
|
|
3072
3233
|
const value = process.env["QWEN_SERVE_DEBUG"];
|
|
3073
3234
|
if (!value) return false;
|
|
@@ -3271,9 +3432,19 @@ function extractErrorCode(err) {
|
|
|
3271
3432
|
return void 0;
|
|
3272
3433
|
}
|
|
3273
3434
|
__name(extractErrorCode, "extractErrorCode");
|
|
3435
|
+
function classifyTurnErrorKind(message) {
|
|
3436
|
+
return message.trim().toLowerCase() === "terminated" ? "model_stream_interrupted" : void 0;
|
|
3437
|
+
}
|
|
3438
|
+
__name(classifyTurnErrorKind, "classifyTurnErrorKind");
|
|
3274
3439
|
function broadcastTurnError(entry, sessionId, err, promptId, originatorClientId) {
|
|
3275
3440
|
const message = extractErrorMessage(err);
|
|
3276
3441
|
const code = extractErrorCode(err);
|
|
3442
|
+
const errorKind = classifyTurnErrorKind(message);
|
|
3443
|
+
if (errorKind) {
|
|
3444
|
+
writeServeDebugLine(
|
|
3445
|
+
`turn_error classified session=${JSON.stringify(sessionId)} message=${JSON.stringify(message)} errorKind=${JSON.stringify(errorKind)}` + (code ? ` code=${JSON.stringify(code)}` : "") + (promptId ? ` promptId=${JSON.stringify(promptId)}` : "")
|
|
3446
|
+
);
|
|
3447
|
+
}
|
|
3277
3448
|
entry.retryAllowed = true;
|
|
3278
3449
|
try {
|
|
3279
3450
|
entry.events.publish({
|
|
@@ -3282,6 +3453,7 @@ function broadcastTurnError(entry, sessionId, err, promptId, originatorClientId)
|
|
|
3282
3453
|
sessionId,
|
|
3283
3454
|
message,
|
|
3284
3455
|
...code ? { code } : {},
|
|
3456
|
+
...errorKind ? { errorKind } : {},
|
|
3285
3457
|
...promptId ? { promptId } : {}
|
|
3286
3458
|
},
|
|
3287
3459
|
...originatorClientId ? { originatorClientId } : {}
|
|
@@ -3669,7 +3841,16 @@ function createAcpSessionBridge(opts) {
|
|
|
3669
3841
|
// Mode A) never host a client MCP server, so the method stays
|
|
3670
3842
|
// unreachable.
|
|
3671
3843
|
opts.clientMcpSender,
|
|
3672
|
-
(sessionId) => sessionIds.has(sessionId)
|
|
3844
|
+
(sessionId) => sessionIds.has(sessionId),
|
|
3845
|
+
// Daemon token-burn accounting: forward per-round token usage observed
|
|
3846
|
+
// at the session/update fan-in to the daemon host's metrics ring via
|
|
3847
|
+
// the telemetry seam. Optional-chained so non-daemon callers (tests,
|
|
3848
|
+
// Mode A) that wire no `tokenUsage` metric are a silent no-op.
|
|
3849
|
+
(inputTokens, outputTokens, durationMs) => telemetry.metrics?.tokenUsage?.(
|
|
3850
|
+
inputTokens,
|
|
3851
|
+
outputTokens,
|
|
3852
|
+
durationMs
|
|
3853
|
+
)
|
|
3673
3854
|
);
|
|
3674
3855
|
const connection = new ClientSideConnection(() => client, channel.stream);
|
|
3675
3856
|
const info = {
|
|
@@ -3976,6 +4157,42 @@ function createAcpSessionBridge(opts) {
|
|
|
3976
4157
|
);
|
|
3977
4158
|
return response;
|
|
3978
4159
|
}, "requestWorkspaceStatus");
|
|
4160
|
+
const STALE_CHILD_RESOURCE_MS = 3e4;
|
|
4161
|
+
let childResourceRefreshing = false;
|
|
4162
|
+
const refreshChildResource = /* @__PURE__ */ __name(async () => {
|
|
4163
|
+
if (childResourceRefreshing) return;
|
|
4164
|
+
const info = liveChannelInfo();
|
|
4165
|
+
if (!info) return;
|
|
4166
|
+
childResourceRefreshing = true;
|
|
4167
|
+
try {
|
|
4168
|
+
const res = await requestWorkspaceStatus(SERVE_STATUS_EXT_METHODS.workspaceResource, () => ({}));
|
|
4169
|
+
if (liveChannelInfo() !== info) return;
|
|
4170
|
+
if (typeof res.rssBytes === "number" && Number.isFinite(res.rssBytes)) {
|
|
4171
|
+
info.childRssBytes = res.rssBytes;
|
|
4172
|
+
}
|
|
4173
|
+
if (typeof res.cpuPercent === "number" && Number.isFinite(res.cpuPercent)) {
|
|
4174
|
+
info.childCpuPercent = Math.min(100, Math.max(0, res.cpuPercent));
|
|
4175
|
+
}
|
|
4176
|
+
info.childResourceAt = Date.now();
|
|
4177
|
+
} catch (err) {
|
|
4178
|
+
teeServeDebugLine(
|
|
4179
|
+
`child-resource refresh failed: ${err instanceof Error ? err.message : String(err)}`
|
|
4180
|
+
);
|
|
4181
|
+
} finally {
|
|
4182
|
+
childResourceRefreshing = false;
|
|
4183
|
+
}
|
|
4184
|
+
}, "refreshChildResource");
|
|
4185
|
+
const getChildResourceSnapshot = /* @__PURE__ */ __name(() => {
|
|
4186
|
+
const info = liveChannelInfo();
|
|
4187
|
+
if (!info || info.childResourceAt === void 0) return void 0;
|
|
4188
|
+
if (Date.now() - info.childResourceAt > STALE_CHILD_RESOURCE_MS) {
|
|
4189
|
+
return void 0;
|
|
4190
|
+
}
|
|
4191
|
+
return {
|
|
4192
|
+
rssBytes: info.childRssBytes ?? 0,
|
|
4193
|
+
cpuPercent: info.childCpuPercent ?? 0
|
|
4194
|
+
};
|
|
4195
|
+
}, "getChildResourceSnapshot");
|
|
3979
4196
|
const requestSessionStatus = /* @__PURE__ */ __name(async (sessionId, method, params = {}) => {
|
|
3980
4197
|
const entry = byId.get(sessionId);
|
|
3981
4198
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
@@ -4144,7 +4361,7 @@ function createAcpSessionBridge(opts) {
|
|
|
4144
4361
|
if (rerun) void reconcileAfterRoundtrip(entry, target);
|
|
4145
4362
|
}
|
|
4146
4363
|
}, "reconcileAfterRoundtrip");
|
|
4147
|
-
const createSessionEntry = /* @__PURE__ */ __name((ci, sessionId, workspaceCwd, events = createSessionEventBus()) => {
|
|
4364
|
+
const createSessionEntry = /* @__PURE__ */ __name((ci, sessionId, workspaceCwd, events = createSessionEventBus(), options = {}) => {
|
|
4148
4365
|
const entry = {
|
|
4149
4366
|
sessionId,
|
|
4150
4367
|
workspaceCwd,
|
|
@@ -4173,7 +4390,9 @@ function createAcpSessionBridge(opts) {
|
|
|
4173
4390
|
byId.set(entry.sessionId, entry);
|
|
4174
4391
|
touchActivity();
|
|
4175
4392
|
telemetry.metrics?.sessionLifecycle("spawn");
|
|
4176
|
-
|
|
4393
|
+
if (options.drainEarlyEvents !== false) {
|
|
4394
|
+
ci.client.drainEarlyEvents(entry.sessionId, entry);
|
|
4395
|
+
}
|
|
4177
4396
|
return entry;
|
|
4178
4397
|
}, "createSessionEntry");
|
|
4179
4398
|
const publishArtifactChanges = /* @__PURE__ */ __name((entry, changes, originatorClientId) => {
|
|
@@ -4233,22 +4452,30 @@ function createAcpSessionBridge(opts) {
|
|
|
4233
4452
|
return typeof maybe.message === "string" && maybe.message === `Resource not found: ${expectedUri}`;
|
|
4234
4453
|
}, "isAcpSessionResourceNotFound");
|
|
4235
4454
|
const replayFieldsFor = /* @__PURE__ */ __name((entry, action) => {
|
|
4455
|
+
const replayStatus = action === "load" && entry.restoreReplayPartial === true ? {
|
|
4456
|
+
partial: true,
|
|
4457
|
+
...typeof entry.restoreReplayError === "string" ? { replayError: entry.restoreReplayError } : {}
|
|
4458
|
+
} : {};
|
|
4236
4459
|
const snapshot = entry.events.snapshotReplay();
|
|
4237
|
-
if (!snapshot)
|
|
4460
|
+
if (!snapshot) {
|
|
4461
|
+
return { lastEventId: entry.events.lastEventId, ...replayStatus };
|
|
4462
|
+
}
|
|
4238
4463
|
if (action === "load") {
|
|
4239
4464
|
return {
|
|
4240
4465
|
compactedReplay: snapshot.compactedTurns,
|
|
4241
4466
|
liveJournal: snapshot.liveJournal,
|
|
4242
|
-
lastEventId: snapshot.lastEventId
|
|
4467
|
+
lastEventId: snapshot.lastEventId,
|
|
4468
|
+
...replayStatus
|
|
4243
4469
|
};
|
|
4244
4470
|
}
|
|
4245
|
-
return { lastEventId: snapshot.lastEventId };
|
|
4471
|
+
return { lastEventId: snapshot.lastEventId, ...replayStatus };
|
|
4246
4472
|
}, "replayFieldsFor");
|
|
4247
4473
|
async function restoreSession(action, req) {
|
|
4248
4474
|
if (shuttingDown) {
|
|
4249
4475
|
throw new Error("AcpSessionBridge is shutting down");
|
|
4250
4476
|
}
|
|
4251
4477
|
const workspaceKey = resolveWorkspaceKey(req.workspaceCwd);
|
|
4478
|
+
const historyReplay = action === "load" ? req.historyReplay ?? "stream" : "stream";
|
|
4252
4479
|
const existing = byId.get(req.sessionId);
|
|
4253
4480
|
if (existing) {
|
|
4254
4481
|
existing.attachCount++;
|
|
@@ -4268,7 +4495,7 @@ function createAcpSessionBridge(opts) {
|
|
|
4268
4495
|
}
|
|
4269
4496
|
const inFlight = inFlightRestores.get(req.sessionId);
|
|
4270
4497
|
if (inFlight) {
|
|
4271
|
-
if (action !== inFlight.action) {
|
|
4498
|
+
if (action !== inFlight.action || historyReplay !== inFlight.historyReplay) {
|
|
4272
4499
|
throw new RestoreInProgressError(
|
|
4273
4500
|
req.sessionId,
|
|
4274
4501
|
inFlight.action,
|
|
@@ -4317,6 +4544,9 @@ function createAcpSessionBridge(opts) {
|
|
|
4317
4544
|
transportClosed.catch(() => {
|
|
4318
4545
|
});
|
|
4319
4546
|
let state;
|
|
4547
|
+
let replayUpdates = [];
|
|
4548
|
+
let replayPartial;
|
|
4549
|
+
let replayError;
|
|
4320
4550
|
try {
|
|
4321
4551
|
if (action === "load") {
|
|
4322
4552
|
state = await Promise.race([
|
|
@@ -4329,7 +4559,12 @@ function createAcpSessionBridge(opts) {
|
|
|
4329
4559
|
// the agent side. The SDK's `RestoreSessionRequest`
|
|
4330
4560
|
// intentionally has no `mcpServers` field for the
|
|
4331
4561
|
// same reason.
|
|
4332
|
-
mcpServers: []
|
|
4562
|
+
mcpServers: [],
|
|
4563
|
+
...historyReplay === "response" ? {
|
|
4564
|
+
_meta: {
|
|
4565
|
+
[LOAD_REPLAY_MODE_META_KEY]: LOAD_REPLAY_BULK_MODE
|
|
4566
|
+
}
|
|
4567
|
+
} : {}
|
|
4333
4568
|
}),
|
|
4334
4569
|
initTimeoutMs,
|
|
4335
4570
|
"loadSession"
|
|
@@ -4350,6 +4585,13 @@ function createAcpSessionBridge(opts) {
|
|
|
4350
4585
|
transportClosed
|
|
4351
4586
|
]);
|
|
4352
4587
|
}
|
|
4588
|
+
if (action === "load" && historyReplay === "response") {
|
|
4589
|
+
const extracted = extractLoadReplayResponse(state);
|
|
4590
|
+
state = extracted.state;
|
|
4591
|
+
replayUpdates = extracted.updates;
|
|
4592
|
+
replayPartial = extracted.partial;
|
|
4593
|
+
replayError = extracted.replayError;
|
|
4594
|
+
}
|
|
4353
4595
|
} catch (err) {
|
|
4354
4596
|
restoreEvents.close();
|
|
4355
4597
|
if (isAcpSessionResourceNotFound(err, req.sessionId)) {
|
|
@@ -4393,10 +4635,21 @@ function createAcpSessionBridge(opts) {
|
|
|
4393
4635
|
ci,
|
|
4394
4636
|
req.sessionId,
|
|
4395
4637
|
workspaceKey,
|
|
4396
|
-
restoreEvents
|
|
4638
|
+
restoreEvents,
|
|
4639
|
+
{ drainEarlyEvents: replayUpdates.length === 0 }
|
|
4397
4640
|
);
|
|
4398
4641
|
entry.restoreState = state;
|
|
4642
|
+
if (replayPartial === true) {
|
|
4643
|
+
entry.restoreReplayPartial = true;
|
|
4644
|
+
}
|
|
4645
|
+
if (replayError !== void 0) {
|
|
4646
|
+
entry.restoreReplayError = replayError;
|
|
4647
|
+
}
|
|
4399
4648
|
seedSnapshotCaches(entry, state);
|
|
4649
|
+
if (replayUpdates.length > 0) {
|
|
4650
|
+
await ci.client.seedSessionUpdates(entry, replayUpdates);
|
|
4651
|
+
ci.client.drainEarlyEvents(entry.sessionId, entry);
|
|
4652
|
+
}
|
|
4400
4653
|
const clientId = registerClient(entry, req.clientId);
|
|
4401
4654
|
entry.attachCount = coalesceState.count;
|
|
4402
4655
|
registeredEntry = entry;
|
|
@@ -4416,13 +4669,28 @@ function createAcpSessionBridge(opts) {
|
|
|
4416
4669
|
pendingRestoreEvents.delete(req.sessionId);
|
|
4417
4670
|
if (!registeredEntry) {
|
|
4418
4671
|
restoreEvents.close();
|
|
4672
|
+
let removedRestoreEntry = false;
|
|
4673
|
+
if (byId.get(req.sessionId)?.events === restoreEvents) {
|
|
4674
|
+
byId.delete(req.sessionId);
|
|
4675
|
+
ci?.sessionIds.delete(req.sessionId);
|
|
4676
|
+
removedRestoreEntry = true;
|
|
4677
|
+
}
|
|
4678
|
+
if (removedRestoreEntry && ci && hasNoChannelWork(ci)) {
|
|
4679
|
+
ci.emptyReapPending = true;
|
|
4680
|
+
ci.isDying = true;
|
|
4681
|
+
}
|
|
4419
4682
|
ci?.client.markSessionClosed(req.sessionId);
|
|
4420
4683
|
}
|
|
4421
4684
|
if (ci) {
|
|
4422
4685
|
await reapPendingEmptyChannel(ci);
|
|
4423
4686
|
}
|
|
4424
4687
|
});
|
|
4425
|
-
inFlightRestores.set(req.sessionId, {
|
|
4688
|
+
inFlightRestores.set(req.sessionId, {
|
|
4689
|
+
action,
|
|
4690
|
+
historyReplay,
|
|
4691
|
+
promise,
|
|
4692
|
+
coalesceState
|
|
4693
|
+
});
|
|
4426
4694
|
try {
|
|
4427
4695
|
return await promise;
|
|
4428
4696
|
} finally {
|
|
@@ -4548,6 +4816,19 @@ function createAcpSessionBridge(opts) {
|
|
|
4548
4816
|
get sessionCount() {
|
|
4549
4817
|
return byId.size;
|
|
4550
4818
|
},
|
|
4819
|
+
get pendingPromptTotal() {
|
|
4820
|
+
let total = 0;
|
|
4821
|
+
for (const entry of byId.values()) {
|
|
4822
|
+
for (const pending of entry.pendingPromptList) {
|
|
4823
|
+
if (pending.state === "queued") total += 1;
|
|
4824
|
+
}
|
|
4825
|
+
}
|
|
4826
|
+
return total;
|
|
4827
|
+
},
|
|
4828
|
+
// Daemon Status child-resource: sync cache read for the sampler + the async
|
|
4829
|
+
// refresh it fires each tick to update that cache.
|
|
4830
|
+
getChildResourceSnapshot,
|
|
4831
|
+
refreshChildResource,
|
|
4551
4832
|
get activePromptCount() {
|
|
4552
4833
|
return activePromptCounter;
|
|
4553
4834
|
},
|
|
@@ -5007,6 +5288,11 @@ function createAcpSessionBridge(opts) {
|
|
|
5007
5288
|
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
5008
5289
|
return entry.events.lastEventId;
|
|
5009
5290
|
},
|
|
5291
|
+
getSessionReplaySnapshot(sessionId) {
|
|
5292
|
+
const entry = byId.get(sessionId);
|
|
5293
|
+
if (!entry) throw new SessionNotFoundError(sessionId);
|
|
5294
|
+
return entry.events.snapshotReplay();
|
|
5295
|
+
},
|
|
5010
5296
|
respondToPermission(requestId, response, context) {
|
|
5011
5297
|
const sessionId = permissionMediator.peekSessionFor(requestId);
|
|
5012
5298
|
if (sessionId === void 0 || !byId.has(sessionId)) {
|
|
@@ -6558,6 +6844,7 @@ export {
|
|
|
6558
6844
|
SessionArtifactValidationError,
|
|
6559
6845
|
extractErrorMessage,
|
|
6560
6846
|
extractErrorCode,
|
|
6847
|
+
classifyTurnErrorKind,
|
|
6561
6848
|
createAcpSessionBridge,
|
|
6562
6849
|
createHttpAcpBridge
|
|
6563
6850
|
};
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
} from "./chunk-3GONHQOA.js";
|
|
6
6
|
import {
|
|
7
7
|
getErrorMessage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SJHAUELE.js";
|
|
9
9
|
import {
|
|
10
10
|
loadSettings
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QHT5USLK.js";
|
|
12
12
|
import {
|
|
13
13
|
getCurrentLanguage,
|
|
14
14
|
initializeI18n,
|
|
15
15
|
resolveLanguageSetting,
|
|
16
16
|
t
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TBLJNMI7.js";
|
|
18
18
|
import {
|
|
19
19
|
isWorkspaceTrusted
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MOQOAH7N.js";
|
|
21
21
|
import {
|
|
22
22
|
writeStderrLine,
|
|
23
23
|
writeStdoutLine
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
redactUrlCredentials,
|
|
30
30
|
require_prompts,
|
|
31
31
|
stripAnsi
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-E7HM76PR.js";
|
|
33
33
|
import {
|
|
34
34
|
init_esbuild_shims
|
|
35
35
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
functionResponsePartsToString
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KKWO4IX2.js";
|
|
6
6
|
import {
|
|
7
7
|
parseAndFormatApiError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-E7HM76PR.js";
|
|
9
9
|
import {
|
|
10
10
|
init_esbuild_shims
|
|
11
11
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -399,6 +399,14 @@ ${event.value}`, null);
|
|
|
399
399
|
this.appendText(state, errorText, null);
|
|
400
400
|
break;
|
|
401
401
|
}
|
|
402
|
+
case "model_fallback" /* ModelFallback */:
|
|
403
|
+
this.emitSystemMessage("model_fallback", {
|
|
404
|
+
fromModel: event.fromModel,
|
|
405
|
+
toModel: event.toModel,
|
|
406
|
+
statusCode: event.statusCode,
|
|
407
|
+
fallbackIndex: event.fallbackIndex
|
|
408
|
+
});
|
|
409
|
+
break;
|
|
402
410
|
default:
|
|
403
411
|
break;
|
|
404
412
|
}
|
|
@@ -60,7 +60,7 @@ async function runExitCleanup(options = {}) {
|
|
|
60
60
|
}
|
|
61
61
|
__name(runExitCleanup, "runExitCleanup");
|
|
62
62
|
async function cleanupCheckpoints() {
|
|
63
|
-
const { Storage } = await import("./src-
|
|
63
|
+
const { Storage } = await import("./src-NLEX4CUC.js");
|
|
64
64
|
const storage = new Storage(process.cwd());
|
|
65
65
|
const tempDir = storage.getProjectTempDir();
|
|
66
66
|
const checkpointsDir = join(tempDir, "checkpoints");
|