@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
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
} from "./chunk-OMX7CUOE.js";
|
|
6
6
|
import {
|
|
7
7
|
atomicWriteJSON
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7LTB54MK.js";
|
|
9
9
|
import {
|
|
10
10
|
Storage,
|
|
11
11
|
getProjectHash
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-22MNNNXE.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esbuild_shims
|
|
15
15
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -21,6 +21,22 @@ import {
|
|
|
21
21
|
init_esbuild_shims();
|
|
22
22
|
import * as fs from "node:fs/promises";
|
|
23
23
|
import * as path from "node:path";
|
|
24
|
+
var MAX_TASK_RUNS = 20;
|
|
25
|
+
function appendCronRun(runs, entry) {
|
|
26
|
+
const base = Array.isArray(runs) ? runs : [];
|
|
27
|
+
const next = [...base, entry];
|
|
28
|
+
return next.length > MAX_TASK_RUNS ? next.slice(next.length - MAX_TASK_RUNS) : next;
|
|
29
|
+
}
|
|
30
|
+
__name(appendCronRun, "appendCronRun");
|
|
31
|
+
function generateCronTaskId() {
|
|
32
|
+
const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
33
|
+
let id = "";
|
|
34
|
+
for (let i = 0; i < 8; i++) {
|
|
35
|
+
id += chars[Math.floor(Math.random() * chars.length)];
|
|
36
|
+
}
|
|
37
|
+
return id;
|
|
38
|
+
}
|
|
39
|
+
__name(generateCronTaskId, "generateCronTaskId");
|
|
24
40
|
var TASKS_FILENAME = "scheduled_tasks.json";
|
|
25
41
|
var CRON_TASKS_DISPLAY_PATH = `~/.qwen/tmp/<project-hash>/${TASKS_FILENAME}`;
|
|
26
42
|
var UPDATE_LOCK_RETRY_MS = 15;
|
|
@@ -164,14 +180,33 @@ function isFiniteTimestamp(value) {
|
|
|
164
180
|
return typeof value === "number" && Number.isFinite(value);
|
|
165
181
|
}
|
|
166
182
|
__name(isFiniteTimestamp, "isFiniteTimestamp");
|
|
183
|
+
function isValidRuns(value) {
|
|
184
|
+
if (!Array.isArray(value)) return false;
|
|
185
|
+
return value.every((entry) => {
|
|
186
|
+
if (typeof entry !== "object" || entry === null) return false;
|
|
187
|
+
const run = entry;
|
|
188
|
+
return isFiniteTimestamp(run["at"]) && (run["kind"] === void 0 || typeof run["kind"] === "string") && (run["sessionId"] === void 0 || typeof run["sessionId"] === "string");
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
__name(isValidRuns, "isValidRuns");
|
|
167
192
|
function isValidTask(value) {
|
|
168
193
|
if (typeof value !== "object" || value === null) return false;
|
|
169
194
|
const obj = value;
|
|
170
|
-
return typeof obj["id"] === "string" && typeof obj["cron"] === "string" && typeof obj["prompt"] === "string" && typeof obj["recurring"] === "boolean" && isFiniteTimestamp(obj["createdAt"]) && (obj["lastFiredAt"] === null || isFiniteTimestamp(obj["lastFiredAt"]))
|
|
195
|
+
return typeof obj["id"] === "string" && typeof obj["cron"] === "string" && typeof obj["prompt"] === "string" && typeof obj["recurring"] === "boolean" && isFiniteTimestamp(obj["createdAt"]) && (obj["lastFiredAt"] === null || isFiniteTimestamp(obj["lastFiredAt"])) && // Optional fields (added for the management UI): absent is valid and
|
|
196
|
+
// means "unnamed" / "enabled". Present-but-wrong-type routes through
|
|
197
|
+
// the same fix-or-delete contract as any other corrupt field rather
|
|
198
|
+
// than being silently coerced or dropped.
|
|
199
|
+
(obj["name"] === void 0 || typeof obj["name"] === "string") && (obj["enabled"] === void 0 || typeof obj["enabled"] === "boolean") && (obj["disabledByArchive"] === void 0 || typeof obj["disabledByArchive"] === "boolean") && // A bound sessionId must be a NON-EMPTY string: an empty string would pass
|
|
200
|
+
// a bare `typeof` check but the scheduler's truthy `task.sessionId` guard
|
|
201
|
+
// would treat it as unbound, so a "bound" task would silently run unbound.
|
|
202
|
+
(obj["sessionId"] === void 0 || typeof obj["sessionId"] === "string" && obj["sessionId"].length > 0) && (obj["runs"] === void 0 || isValidRuns(obj["runs"]));
|
|
171
203
|
}
|
|
172
204
|
__name(isValidTask, "isValidTask");
|
|
173
205
|
|
|
174
206
|
export {
|
|
207
|
+
MAX_TASK_RUNS,
|
|
208
|
+
appendCronRun,
|
|
209
|
+
generateCronTaskId,
|
|
175
210
|
CRON_TASKS_DISPLAY_PATH,
|
|
176
211
|
getCronFilePath,
|
|
177
212
|
readCronTasks,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
init_esbuild_shims();
|
|
12
12
|
var EVENT_SCHEMA_VERSION = 1;
|
|
13
13
|
var DEFAULT_MAX_QUEUED = 256;
|
|
14
|
+
var DEFAULT_MAX_QUEUED_BYTES = 2 * 1024 * 1024;
|
|
14
15
|
var DEFAULT_RING_SIZE = 8e3;
|
|
15
16
|
var WARN_THRESHOLD_RATIO = 0.75;
|
|
16
17
|
var WARN_RESET_RATIO = 0.375;
|
|
@@ -20,6 +21,55 @@ function getServerTimestamp(meta) {
|
|
|
20
21
|
return typeof existing === "number" && Number.isFinite(existing) ? existing : Date.now();
|
|
21
22
|
}
|
|
22
23
|
__name(getServerTimestamp, "getServerTimestamp");
|
|
24
|
+
function normalizeMaxQueuedBytes(value) {
|
|
25
|
+
if (value === void 0) return DEFAULT_MAX_QUEUED_BYTES;
|
|
26
|
+
if (!Number.isSafeInteger(value) || value < 1) {
|
|
27
|
+
throw new TypeError("maxQueuedBytes must be a positive safe integer");
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
__name(normalizeMaxQueuedBytes, "normalizeMaxQueuedBytes");
|
|
32
|
+
function serializedByteLength(event) {
|
|
33
|
+
try {
|
|
34
|
+
const serialized = JSON.stringify(event);
|
|
35
|
+
if (serialized === void 0) return 0;
|
|
36
|
+
return Buffer.byteLength(serialized, "utf8");
|
|
37
|
+
} catch {
|
|
38
|
+
logEventSizingFailed(event.type);
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
__name(serializedByteLength, "serializedByteLength");
|
|
43
|
+
function logEventSizingFailed(type) {
|
|
44
|
+
try {
|
|
45
|
+
process.stderr.write(
|
|
46
|
+
`qwen serve: EventBus event sizing failed ${JSON.stringify({ type })}
|
|
47
|
+
`
|
|
48
|
+
);
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
__name(logEventSizingFailed, "logEventSizingFailed");
|
|
53
|
+
function logSubscriberEvicted(data) {
|
|
54
|
+
try {
|
|
55
|
+
process.stderr.write(
|
|
56
|
+
`qwen serve: EventBus subscriber evicted ${JSON.stringify(data)}
|
|
57
|
+
`
|
|
58
|
+
);
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
__name(logSubscriberEvicted, "logSubscriberEvicted");
|
|
63
|
+
function logSlowClientWarning(data) {
|
|
64
|
+
try {
|
|
65
|
+
process.stderr.write(
|
|
66
|
+
`qwen serve: EventBus slow_client_warning ${JSON.stringify(data)}
|
|
67
|
+
`
|
|
68
|
+
);
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
__name(logSlowClientWarning, "logSlowClientWarning");
|
|
23
73
|
var SubscriberLimitExceededError = class extends Error {
|
|
24
74
|
static {
|
|
25
75
|
__name(this, "SubscriberLimitExceededError");
|
|
@@ -32,10 +82,11 @@ var SubscriberLimitExceededError = class extends Error {
|
|
|
32
82
|
}
|
|
33
83
|
};
|
|
34
84
|
var EventBus = class {
|
|
35
|
-
constructor(ringSize = DEFAULT_RING_SIZE, maxSubscribers = DEFAULT_MAX_SUBSCRIBERS, compactionEngine) {
|
|
85
|
+
constructor(ringSize = DEFAULT_RING_SIZE, maxSubscribers = DEFAULT_MAX_SUBSCRIBERS, compactionEngine, opts = {}) {
|
|
36
86
|
this.ringSize = ringSize;
|
|
37
87
|
this.maxSubscribers = maxSubscribers;
|
|
38
88
|
this.compactionEngine = compactionEngine;
|
|
89
|
+
this.maxQueuedBytes = normalizeMaxQueuedBytes(opts.maxQueuedBytes);
|
|
39
90
|
}
|
|
40
91
|
static {
|
|
41
92
|
__name(this, "EventBus");
|
|
@@ -43,6 +94,7 @@ var EventBus = class {
|
|
|
43
94
|
nextId = 1;
|
|
44
95
|
ring = [];
|
|
45
96
|
subs = /* @__PURE__ */ new Set();
|
|
97
|
+
maxQueuedBytes;
|
|
46
98
|
closed = false;
|
|
47
99
|
snapshotReplay() {
|
|
48
100
|
return this.compactionEngine?.snapshot();
|
|
@@ -55,6 +107,30 @@ var EventBus = class {
|
|
|
55
107
|
get subscriberCount() {
|
|
56
108
|
return this.subs.size;
|
|
57
109
|
}
|
|
110
|
+
seedReplayEvents(inputs) {
|
|
111
|
+
if (this.closed) return [];
|
|
112
|
+
if (inputs.length === 0) return [];
|
|
113
|
+
const events = [];
|
|
114
|
+
for (const input of inputs) {
|
|
115
|
+
const existingMeta = input._meta;
|
|
116
|
+
const event = {
|
|
117
|
+
id: this.nextId++,
|
|
118
|
+
v: EVENT_SCHEMA_VERSION,
|
|
119
|
+
...input,
|
|
120
|
+
_meta: {
|
|
121
|
+
...existingMeta ?? {},
|
|
122
|
+
serverTimestamp: getServerTimestamp(existingMeta)
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
events.push(event);
|
|
126
|
+
try {
|
|
127
|
+
this.compactionEngine?.ingest(event);
|
|
128
|
+
} catch {
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
this.ring.length = 0;
|
|
132
|
+
return events;
|
|
133
|
+
}
|
|
58
134
|
/**
|
|
59
135
|
* Publish an event to the bus. Returns the constructed `BridgeEvent`
|
|
60
136
|
* (with `id` + `v` assigned) on success, or `undefined` when the
|
|
@@ -87,38 +163,64 @@ var EventBus = class {
|
|
|
87
163
|
} catch {
|
|
88
164
|
}
|
|
89
165
|
if (this.ring.length > this.ringSize) this.ring.shift();
|
|
166
|
+
let eventBytes;
|
|
167
|
+
const getEventBytes = /* @__PURE__ */ __name(() => {
|
|
168
|
+
eventBytes ??= serializedByteLength(event);
|
|
169
|
+
return eventBytes;
|
|
170
|
+
}, "getEventBytes");
|
|
90
171
|
for (const sub of Array.from(this.subs)) {
|
|
91
172
|
if (sub.evicted) continue;
|
|
92
|
-
|
|
173
|
+
const pushResult = sub.queue.push(event, getEventBytes);
|
|
174
|
+
if (!pushResult.ok) {
|
|
93
175
|
sub.evicted = true;
|
|
176
|
+
const evictionData = {
|
|
177
|
+
reason: pushResult.reason,
|
|
178
|
+
droppedAfter: event.id,
|
|
179
|
+
queueSize: pushResult.liveSize,
|
|
180
|
+
maxQueued: sub.maxQueued,
|
|
181
|
+
queuedBytes: pushResult.liveBytes,
|
|
182
|
+
maxQueuedBytes: sub.maxQueuedBytes,
|
|
183
|
+
...pushResult.reason === "queue_bytes_overflow" ? { eventBytes: pushResult.eventBytes } : {}
|
|
184
|
+
};
|
|
185
|
+
logSubscriberEvicted(evictionData);
|
|
94
186
|
const evictionFrame = {
|
|
95
187
|
v: EVENT_SCHEMA_VERSION,
|
|
96
188
|
type: "client_evicted",
|
|
97
|
-
data:
|
|
189
|
+
data: evictionData
|
|
98
190
|
};
|
|
99
191
|
sub.queue.forcePush(evictionFrame);
|
|
100
192
|
sub.queue.close();
|
|
101
193
|
sub.dispose();
|
|
102
194
|
continue;
|
|
103
195
|
}
|
|
104
|
-
const liveSize =
|
|
105
|
-
|
|
196
|
+
const liveSize = pushResult.liveSize;
|
|
197
|
+
const liveBytes = pushResult.liveBytes;
|
|
198
|
+
if (sub.warned && liveSize <= sub.warnResetThreshold && liveBytes <= sub.warnBytesResetThreshold) {
|
|
199
|
+
sub.warned = false;
|
|
200
|
+
}
|
|
201
|
+
const frameThresholdReached = liveSize >= sub.warnThreshold;
|
|
202
|
+
const byteThresholdReached = liveBytes >= sub.warnBytesThreshold;
|
|
203
|
+
if (!sub.warned && (frameThresholdReached || byteThresholdReached)) {
|
|
106
204
|
sub.warned = true;
|
|
205
|
+
const threshold = frameThresholdReached && byteThresholdReached ? "frames_and_bytes" : byteThresholdReached ? "bytes" : "frames";
|
|
206
|
+
const warningData = {
|
|
207
|
+
queueSize: liveSize,
|
|
208
|
+
maxQueued: sub.maxQueued,
|
|
209
|
+
// `event.id` is always defined here — the just-published
|
|
210
|
+
// `event` is constructed at the top of `publish()` with
|
|
211
|
+
// `id: this.nextId++`. No `??` fallback needed.
|
|
212
|
+
lastEventId: event.id,
|
|
213
|
+
queuedBytes: liveBytes,
|
|
214
|
+
maxQueuedBytes: sub.maxQueuedBytes,
|
|
215
|
+
threshold
|
|
216
|
+
};
|
|
217
|
+
logSlowClientWarning(warningData);
|
|
107
218
|
const warningFrame = {
|
|
108
219
|
v: EVENT_SCHEMA_VERSION,
|
|
109
220
|
type: "slow_client_warning",
|
|
110
|
-
data:
|
|
111
|
-
queueSize: liveSize,
|
|
112
|
-
maxQueued: sub.maxQueued,
|
|
113
|
-
// `event.id` is always defined here — the just-published
|
|
114
|
-
// `event` is constructed at the top of `publish()` with
|
|
115
|
-
// `id: this.nextId++`. No `??` fallback needed.
|
|
116
|
-
lastEventId: event.id
|
|
117
|
-
}
|
|
221
|
+
data: warningData
|
|
118
222
|
};
|
|
119
223
|
sub.queue.forcePush(warningFrame);
|
|
120
|
-
} else if (sub.warned && liveSize <= sub.warnResetThreshold) {
|
|
121
|
-
sub.warned = false;
|
|
122
224
|
}
|
|
123
225
|
}
|
|
124
226
|
return event;
|
|
@@ -145,13 +247,19 @@ var EventBus = class {
|
|
|
145
247
|
throw new SubscriberLimitExceededError(this.maxSubscribers);
|
|
146
248
|
}
|
|
147
249
|
const maxQueued = opts.maxQueued ?? DEFAULT_MAX_QUEUED;
|
|
148
|
-
const queue = new BoundedAsyncQueue(
|
|
250
|
+
const queue = new BoundedAsyncQueue(
|
|
251
|
+
maxQueued,
|
|
252
|
+
this.maxQueuedBytes
|
|
253
|
+
);
|
|
149
254
|
const sub = {
|
|
150
255
|
queue,
|
|
151
256
|
evicted: false,
|
|
152
257
|
maxQueued,
|
|
153
258
|
warnThreshold: WARN_THRESHOLD_RATIO * maxQueued,
|
|
154
259
|
warnResetThreshold: WARN_RESET_RATIO * maxQueued,
|
|
260
|
+
maxQueuedBytes: this.maxQueuedBytes,
|
|
261
|
+
warnBytesThreshold: WARN_THRESHOLD_RATIO * this.maxQueuedBytes,
|
|
262
|
+
warnBytesResetThreshold: WARN_RESET_RATIO * this.maxQueuedBytes,
|
|
155
263
|
warned: false,
|
|
156
264
|
dispose: /* @__PURE__ */ __name(() => {
|
|
157
265
|
}, "dispose")
|
|
@@ -174,7 +282,17 @@ var EventBus = class {
|
|
|
174
282
|
});
|
|
175
283
|
} else {
|
|
176
284
|
const earliestInRing = this.ring[0]?.id;
|
|
177
|
-
if (earliestInRing
|
|
285
|
+
if (earliestInRing === void 0 && opts.lastEventId < this.nextId - 1) {
|
|
286
|
+
queue.forcePush({
|
|
287
|
+
v: EVENT_SCHEMA_VERSION,
|
|
288
|
+
type: "state_resync_required",
|
|
289
|
+
data: {
|
|
290
|
+
reason: "seeded_replay_not_in_ring",
|
|
291
|
+
lastDeliveredId: opts.lastEventId,
|
|
292
|
+
earliestAvailableId: this.nextId
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
} else if (earliestInRing !== void 0 && earliestInRing > opts.lastEventId + 1) {
|
|
178
296
|
queue.forcePush({
|
|
179
297
|
v: EVENT_SCHEMA_VERSION,
|
|
180
298
|
type: "state_resync_required",
|
|
@@ -268,8 +386,9 @@ function emptyAsyncIterable() {
|
|
|
268
386
|
}
|
|
269
387
|
__name(emptyAsyncIterable, "emptyAsyncIterable");
|
|
270
388
|
var BoundedAsyncQueue = class {
|
|
271
|
-
constructor(maxSize) {
|
|
389
|
+
constructor(maxSize, maxBytes) {
|
|
272
390
|
this.maxSize = maxSize;
|
|
391
|
+
this.maxBytes = maxBytes;
|
|
273
392
|
}
|
|
274
393
|
static {
|
|
275
394
|
__name(this, "BoundedAsyncQueue");
|
|
@@ -286,6 +405,7 @@ var BoundedAsyncQueue = class {
|
|
|
286
405
|
* no matter where in the queue the forced entries are.
|
|
287
406
|
*/
|
|
288
407
|
liveCount = 0;
|
|
408
|
+
liveBytes = 0;
|
|
289
409
|
/**
|
|
290
410
|
* Number of LIVE (non-force-pushed) items currently waiting in the
|
|
291
411
|
* buffer. Backpressure decisions in `EventBus.publish()` (the
|
|
@@ -294,18 +414,53 @@ var BoundedAsyncQueue = class {
|
|
|
294
414
|
get size() {
|
|
295
415
|
return this.liveCount;
|
|
296
416
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
417
|
+
get bytes() {
|
|
418
|
+
return this.liveBytes;
|
|
419
|
+
}
|
|
420
|
+
push(value, getBytes) {
|
|
421
|
+
if (this.closed) {
|
|
422
|
+
return {
|
|
423
|
+
ok: false,
|
|
424
|
+
reason: "queue_overflow",
|
|
425
|
+
liveSize: this.liveCount,
|
|
426
|
+
liveBytes: this.liveBytes
|
|
427
|
+
};
|
|
428
|
+
}
|
|
300
429
|
const r = this.resolvers.shift();
|
|
301
430
|
if (r) {
|
|
302
431
|
r({ value, done: false });
|
|
303
|
-
return
|
|
432
|
+
return {
|
|
433
|
+
ok: true,
|
|
434
|
+
liveSize: this.liveCount,
|
|
435
|
+
liveBytes: this.liveBytes
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
if (this.liveCount >= this.maxSize) {
|
|
439
|
+
return {
|
|
440
|
+
ok: false,
|
|
441
|
+
reason: "queue_overflow",
|
|
442
|
+
liveSize: this.liveCount,
|
|
443
|
+
liveBytes: this.liveBytes
|
|
444
|
+
};
|
|
304
445
|
}
|
|
305
|
-
|
|
306
|
-
this.
|
|
446
|
+
const bytes = getBytes();
|
|
447
|
+
if (this.liveCount > 0 && this.liveBytes + bytes > this.maxBytes) {
|
|
448
|
+
return {
|
|
449
|
+
ok: false,
|
|
450
|
+
reason: "queue_bytes_overflow",
|
|
451
|
+
liveSize: this.liveCount,
|
|
452
|
+
liveBytes: this.liveBytes,
|
|
453
|
+
eventBytes: bytes
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
this.buf.push({ value, forced: false, bytes });
|
|
307
457
|
this.liveCount += 1;
|
|
308
|
-
|
|
458
|
+
this.liveBytes += bytes;
|
|
459
|
+
return {
|
|
460
|
+
ok: true,
|
|
461
|
+
liveSize: this.liveCount,
|
|
462
|
+
liveBytes: this.liveBytes
|
|
463
|
+
};
|
|
309
464
|
}
|
|
310
465
|
/** Bypasses the size cap. Used for replay frames, eviction terminal,
|
|
311
466
|
* and slow-client warnings. */
|
|
@@ -316,7 +471,7 @@ var BoundedAsyncQueue = class {
|
|
|
316
471
|
r({ value, done: false });
|
|
317
472
|
return;
|
|
318
473
|
}
|
|
319
|
-
this.buf.push({ value, forced: true });
|
|
474
|
+
this.buf.push({ value, forced: true, bytes: 0 });
|
|
320
475
|
}
|
|
321
476
|
/**
|
|
322
477
|
* Mark the queue closed. By default `next()` continues to drain
|
|
@@ -338,6 +493,7 @@ var BoundedAsyncQueue = class {
|
|
|
338
493
|
if (opts.drain === false) {
|
|
339
494
|
this.buf.length = 0;
|
|
340
495
|
this.liveCount = 0;
|
|
496
|
+
this.liveBytes = 0;
|
|
341
497
|
}
|
|
342
498
|
while (this.resolvers.length > 0) {
|
|
343
499
|
this.resolvers.shift()({
|
|
@@ -349,7 +505,10 @@ var BoundedAsyncQueue = class {
|
|
|
349
505
|
next() {
|
|
350
506
|
if (this.buf.length > 0) {
|
|
351
507
|
const entry = this.buf.shift();
|
|
352
|
-
if (!entry.forced)
|
|
508
|
+
if (!entry.forced) {
|
|
509
|
+
this.liveCount -= 1;
|
|
510
|
+
this.liveBytes -= entry.bytes;
|
|
511
|
+
}
|
|
353
512
|
return Promise.resolve({ value: entry.value, done: false });
|
|
354
513
|
}
|
|
355
514
|
if (this.closed) {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
loadSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QHT5USLK.js";
|
|
6
6
|
import {
|
|
7
7
|
getCurrentLanguage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TBLJNMI7.js";
|
|
9
9
|
import {
|
|
10
10
|
isWorkspaceTrusted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MOQOAH7N.js";
|
|
12
12
|
import {
|
|
13
13
|
writeStderrLine,
|
|
14
14
|
writeStdoutLine
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
hashMcpServerConfig,
|
|
27
27
|
isGatedMcpScope,
|
|
28
28
|
normalizeClaudeMcpServer
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-E7HM76PR.js";
|
|
30
30
|
import {
|
|
31
31
|
atomicWriteFile
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7LTB54MK.js";
|
|
33
33
|
import {
|
|
34
34
|
Storage,
|
|
35
35
|
getErrorMessage
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-22MNNNXE.js";
|
|
37
37
|
import {
|
|
38
38
|
init_esbuild_shims
|
|
39
39
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// packages/core/src/core/tokenLimits.ts
|
|
11
11
|
init_esbuild_shims();
|
|
12
|
-
var DEFAULT_TOKEN_LIMIT =
|
|
12
|
+
var DEFAULT_TOKEN_LIMIT = 2e5;
|
|
13
13
|
var DEFAULT_OUTPUT_TOKEN_LIMIT = 32e3;
|
|
14
14
|
var ESCALATED_MAX_TOKENS = 64e3;
|
|
15
15
|
function parsePositiveIntegerEnvValue(raw) {
|
|
@@ -190,6 +190,12 @@ function hasExplicitOutputLimit(model) {
|
|
|
190
190
|
return OUTPUT_PATTERNS.some(([regex]) => regex.test(norm));
|
|
191
191
|
}
|
|
192
192
|
__name(hasExplicitOutputLimit, "hasExplicitOutputLimit");
|
|
193
|
+
function escalatedOutputTokenLimit(model, contextWindowSize) {
|
|
194
|
+
const escalated = Math.max(ESCALATED_MAX_TOKENS, tokenLimit(model, "output"));
|
|
195
|
+
const window = contextWindowSize !== void 0 && contextWindowSize > 0 ? contextWindowSize : DEFAULT_TOKEN_LIMIT;
|
|
196
|
+
return Math.min(escalated, Math.floor(window / 2));
|
|
197
|
+
}
|
|
198
|
+
__name(escalatedOutputTokenLimit, "escalatedOutputTokenLimit");
|
|
193
199
|
function knownTokenLimit(model, type = "input") {
|
|
194
200
|
return findTokenLimit(model, type);
|
|
195
201
|
}
|
|
@@ -202,6 +208,14 @@ __name(tokenLimit, "tokenLimit");
|
|
|
202
208
|
// packages/core/src/core/openaiContentGenerator/constants.ts
|
|
203
209
|
init_esbuild_shims();
|
|
204
210
|
var DEFAULT_TIMEOUT = 12e4;
|
|
211
|
+
var DISABLED_REQUEST_TIMEOUT_MS = 2147483647;
|
|
212
|
+
function resolveRequestTimeout(timeout) {
|
|
213
|
+
if (timeout === void 0 || timeout === null) {
|
|
214
|
+
return DEFAULT_TIMEOUT;
|
|
215
|
+
}
|
|
216
|
+
return timeout <= 0 ? DISABLED_REQUEST_TIMEOUT_MS : timeout;
|
|
217
|
+
}
|
|
218
|
+
__name(resolveRequestTimeout, "resolveRequestTimeout");
|
|
205
219
|
var DEFAULT_STREAM_IDLE_TIMEOUT_MS = 24e4;
|
|
206
220
|
var QWEN_STREAM_IDLE_TIMEOUT_MS_ENV = "QWEN_STREAM_IDLE_TIMEOUT_MS";
|
|
207
221
|
var MAX_STREAM_IDLE_TIMEOUT_MS = 2147483647;
|
|
@@ -210,49 +224,6 @@ var DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";
|
|
|
210
224
|
var DEFAULT_DASHSCOPE_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1";
|
|
211
225
|
var DASHSCOPE_PROXY_BASE_URL = process.env["DASHSCOPE_PROXY_BASE_URL"];
|
|
212
226
|
|
|
213
|
-
// packages/core/src/utils/request-tokenizer/textTokenizer.ts
|
|
214
|
-
init_esbuild_shims();
|
|
215
|
-
var TextTokenizer = class {
|
|
216
|
-
static {
|
|
217
|
-
__name(this, "TextTokenizer");
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Calculate tokens for text content
|
|
221
|
-
*
|
|
222
|
-
* @param text - The text to estimate tokens for
|
|
223
|
-
* @returns The estimated token count
|
|
224
|
-
*/
|
|
225
|
-
async calculateTokens(text) {
|
|
226
|
-
return this.calculateTokensSync(text);
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Calculate tokens for multiple text strings
|
|
230
|
-
*
|
|
231
|
-
* @param texts - Array of text strings to estimate tokens for
|
|
232
|
-
* @returns Array of token counts corresponding to each input text
|
|
233
|
-
*/
|
|
234
|
-
async calculateTokensBatch(texts) {
|
|
235
|
-
return texts.map((text) => this.calculateTokensSync(text));
|
|
236
|
-
}
|
|
237
|
-
calculateTokensSync(text) {
|
|
238
|
-
if (!text || text.length === 0) {
|
|
239
|
-
return 0;
|
|
240
|
-
}
|
|
241
|
-
let asciiChars = 0;
|
|
242
|
-
let nonAsciiChars = 0;
|
|
243
|
-
for (let i = 0; i < text.length; i++) {
|
|
244
|
-
const charCode = text.charCodeAt(i);
|
|
245
|
-
if (charCode < 128) {
|
|
246
|
-
asciiChars++;
|
|
247
|
-
} else {
|
|
248
|
-
nonAsciiChars++;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
const tokens = asciiChars / 4 + nonAsciiChars * 1.1;
|
|
252
|
-
return Math.ceil(tokens);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
227
|
// packages/core/src/utils/request-tokenizer/supportedImageFormats.ts
|
|
257
228
|
init_esbuild_shims();
|
|
258
229
|
var SUPPORTED_IMAGE_MIME_TYPES = [
|
|
@@ -290,9 +261,10 @@ export {
|
|
|
290
261
|
parsePositiveIntegerEnvValue,
|
|
291
262
|
normalize,
|
|
292
263
|
hasExplicitOutputLimit,
|
|
264
|
+
escalatedOutputTokenLimit,
|
|
293
265
|
knownTokenLimit,
|
|
294
266
|
tokenLimit,
|
|
295
|
-
|
|
267
|
+
resolveRequestTimeout,
|
|
296
268
|
DEFAULT_STREAM_IDLE_TIMEOUT_MS,
|
|
297
269
|
QWEN_STREAM_IDLE_TIMEOUT_MS_ENV,
|
|
298
270
|
MAX_STREAM_IDLE_TIMEOUT_MS,
|
|
@@ -300,7 +272,6 @@ export {
|
|
|
300
272
|
DEFAULT_OPENAI_BASE_URL,
|
|
301
273
|
DEFAULT_DASHSCOPE_BASE_URL,
|
|
302
274
|
DASHSCOPE_PROXY_BASE_URL,
|
|
303
|
-
TextTokenizer,
|
|
304
275
|
SUPPORTED_IMAGE_MIME_TYPES,
|
|
305
276
|
isSupportedImageMimeType,
|
|
306
277
|
getSupportedImageFormatsString,
|