@qwen-code/qwen-code 0.21.4 → 0.21.5-nightly.20260805.32e274157
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 +8 -7
- package/bundled/qc-helper/docs/configuration/settings.md +16 -16
- package/bundled/qc-helper/docs/features/code-review.md +4 -0
- package/bundled/qc-helper/docs/features/headless.md +31 -0
- package/bundled/qc-helper/docs/features/mcp.md +11 -3
- package/bundled/qc-helper/docs/qwen-serve.md +75 -0
- package/bundled/review/SKILL.md +90 -52
- package/chunks/{MaxSizedBox-5XDFQHTQ.js → MaxSizedBox-H44SGRP7.js} +17 -16
- package/chunks/{StandaloneSessionPicker-DLADA54K.js → StandaloneSessionPicker-T5FQMYD3.js} +31 -30
- package/chunks/{acpAgent-MVEFZSBS.js → acpAgent-J474KXVM.js} +849 -313
- package/chunks/{agent-RB6LCRZX.js → agent-SC23IV5L.js} +17 -16
- package/chunks/{agent-headless-272ZACJV.js → agent-headless-2CHR5WJP.js} +17 -16
- package/chunks/{artifact-tool-TBOYEKTY.js → artifact-tool-RROCCJDA.js} +1 -1
- package/chunks/{askUserQuestion-23Y5WZFJ.js → askUserQuestion-2EPPBPUZ.js} +1 -1
- package/chunks/{bridge-GXUXFSHK.js → bridge-BLHYPCCR.js} +21 -19
- package/chunks/{channel-settings-store-5UA2SABE.js → channel-settings-store-CDOZ7GCP.js} +22 -21
- package/chunks/{channel-worker-group-NDG4WOOZ.js → channel-worker-group-SVGPDH2C.js} +3 -2
- package/chunks/{channel-worker-manager-ZCW6UW34.js → channel-worker-manager-72ZK2GTS.js} +3 -2
- package/chunks/{channel-worker-supervisor-ATGFTZRN.js → channel-worker-supervisor-NUEDVHX4.js} +2 -1
- package/chunks/{chunk-PWCQRLM5.js → chunk-2AGOQ7QO.js} +1 -1
- package/chunks/{chunk-AFJSRJTO.js → chunk-2B6FBVWE.js} +1 -1
- package/chunks/{chunk-XPAY4EMH.js → chunk-2OSE7Q5O.js} +3 -3
- package/chunks/{chunk-DHNFB7NC.js → chunk-2QOLRESU.js} +5 -5
- package/chunks/{chunk-UWSXFI6E.js → chunk-2U7GPHA6.js} +6 -2
- package/chunks/{chunk-CIUUYB23.js → chunk-3DTM3RPU.js} +1 -1
- package/chunks/{chunk-X6QNZOTC.js → chunk-3PRJYMXC.js} +2 -2
- package/chunks/{chunk-6KQUOXT5.js → chunk-3XDH6PZM.js} +7 -7
- package/chunks/{chunk-DJA7YBLJ.js → chunk-56MC5OM7.js} +2 -2
- package/chunks/{chunk-B3EBXISV.js → chunk-5DVP76WL.js} +90 -7
- package/chunks/{chunk-2T3RYG4L.js → chunk-5KDLX7ER.js} +919 -323
- package/chunks/{chunk-O2ZYHG33.js → chunk-5L6CQ4ZU.js} +131 -67
- package/chunks/{chunk-E2SYUEIA.js → chunk-5OAMVWFL.js} +874 -375
- package/chunks/{chunk-LPLMUGIM.js → chunk-5X76FZLI.js} +5 -5
- package/chunks/{chunk-M2L4TMH3.js → chunk-6HTEECQY.js} +3 -3
- package/chunks/{chunk-KHSJSMFS.js → chunk-6I6WUVYI.js} +1 -1
- package/chunks/{chunk-LLMGP5IC.js → chunk-6WBWIPBF.js} +2 -2
- package/chunks/{chunk-PQ5JFCNL.js → chunk-762UTZQZ.js} +3 -3
- package/chunks/{chunk-HBCKZF2A.js → chunk-7EW7CYLA.js} +1 -1
- package/chunks/{chunk-4PZ7SPD5.js → chunk-7FKLLD4X.js} +1 -1
- package/chunks/{chunk-XSOAW7FC.js → chunk-AE7AKP3E.js} +6 -6
- package/chunks/{chunk-UATJZOAJ.js → chunk-ASS3UQB5.js} +3 -3
- package/chunks/{chunk-XGA6XHH3.js → chunk-AXOFMDZC.js} +3 -3
- package/chunks/chunk-BKHCW2BI.js +41 -0
- package/chunks/{chunk-DZPOYHBT.js → chunk-D6FISK43.js} +1 -1
- package/chunks/{chunk-CFDR3GNL.js → chunk-D7D7RXIJ.js} +11 -0
- package/chunks/{chunk-FPPVCCAH.js → chunk-DNPP267F.js} +1 -1
- package/chunks/{chunk-I32URQI7.js → chunk-EA2CKB6L.js} +5 -5
- package/chunks/{chunk-C5YFS6VR.js → chunk-EL4W7MGQ.js} +4 -4
- package/chunks/{chunk-QXTGHZCX.js → chunk-FDLXWNCE.js} +3 -3
- package/chunks/{chunk-PCVMRBLN.js → chunk-FFCSRU3F.js} +1 -1
- package/chunks/{chunk-SV5X2EUV.js → chunk-FMU2QVA5.js} +1 -1
- package/chunks/{chunk-2ON2O4MD.js → chunk-FV2JYSWS.js} +28 -3
- package/chunks/{chunk-KB6VSG2U.js → chunk-GXP44JOS.js} +7 -7
- package/chunks/{chunk-BC4LTKEG.js → chunk-HP6MKLWU.js} +1 -1
- package/chunks/{chunk-YXEVDA66.js → chunk-HU5TUALO.js} +110 -22
- package/chunks/{chunk-2JN5V3I7.js → chunk-ITZK3L4S.js} +1 -1
- package/chunks/{chunk-5XGI4IPK.js → chunk-JEVHOCCA.js} +4 -4
- package/chunks/{chunk-6ME3PVMM.js → chunk-JNFWMBG6.js} +5 -5
- package/chunks/{chunk-3PHUGFPH.js → chunk-JXPOBM4B.js} +1 -1
- package/chunks/{chunk-TXZDRD36.js → chunk-LCCBAGRT.js} +5 -5
- package/chunks/{chunk-G7XXKQYS.js → chunk-LKRMNRSN.js} +27 -1
- package/chunks/{chunk-DOCBJIBL.js → chunk-MB3ILUB7.js} +1 -1
- package/chunks/{chunk-HFVW54NL.js → chunk-MBEMTXQT.js} +9 -2
- package/chunks/{chunk-RNKGMZEW.js → chunk-MFTOMYE2.js} +1 -1
- package/chunks/{chunk-RPYYTL7E.js → chunk-MGSSJT27.js} +2 -2
- package/chunks/{chunk-URVJ4AZC.js → chunk-MKMUBBEX.js} +1 -1
- package/chunks/{chunk-RL2NPV5E.js → chunk-N5QPOGRQ.js} +1 -1
- package/chunks/{chunk-2CCUHZP5.js → chunk-N7PF4KZR.js} +2 -2
- package/chunks/{chunk-JDJ7SC4E.js → chunk-NMBDPO63.js} +255 -197
- package/chunks/{chunk-M6RNMBUO.js → chunk-NQZ5IVLH.js} +4 -4
- package/chunks/{chunk-FV4TUUDE.js → chunk-O4WOWHMZ.js} +1 -1
- package/chunks/{chunk-GDREW3U5.js → chunk-OIVG6IHL.js} +2 -2
- package/chunks/{chunk-IMGNGOGC.js → chunk-PQ2J56BJ.js} +3 -3
- package/chunks/{chunk-EJXATV5R.js → chunk-PWFDZA5A.js} +2 -2
- package/chunks/{chunk-OOPFAIWP.js → chunk-Q7EXR3W2.js} +1 -1
- package/chunks/{chunk-4CTV3FZH.js → chunk-QJL2AQZI.js} +23 -19
- package/chunks/{chunk-SBBHZ3YT.js → chunk-QKWPXGW4.js} +1 -1
- package/chunks/{chunk-HI4YGRJD.js → chunk-RDICVTQC.js} +3 -3
- package/chunks/{chunk-ZRQY5BBS.js → chunk-REAWLQAU.js} +10 -10
- package/chunks/{chunk-BOWKLLWA.js → chunk-SOBA6GIW.js} +3 -3
- package/chunks/{chunk-WDLQGFWP.js → chunk-TYWI5NXY.js} +27 -27
- package/chunks/{chunk-A7PONO5G.js → chunk-URJHXOSO.js} +2 -2
- package/chunks/{chunk-C6FU76AA.js → chunk-V3BNVUFI.js} +1 -1
- package/chunks/{chunk-G6KI6B5L.js → chunk-VF6WPN4R.js} +1 -1
- package/chunks/{chunk-AWTLFUVN.js → chunk-VT27B2XS.js} +13 -13
- package/chunks/{chunk-O4IWFYUW.js → chunk-VY4TEQQ6.js} +4 -4
- package/chunks/{chunk-EIAPOG76.js → chunk-WECYW5EE.js} +4 -4
- package/chunks/{chunk-PDDYAXL2.js → chunk-WIRAPZ62.js} +7 -0
- package/chunks/chunk-WOJZWRAZ.js +123 -0
- package/chunks/{chunk-7UXI6P72.js → chunk-WVAESIM6.js} +2 -2
- package/chunks/{chunk-P5UJMCVS.js → chunk-XIDYVC4P.js} +4 -4
- package/chunks/{chunk-THLV7YGY.js → chunk-XIKKANF4.js} +2 -2
- package/chunks/{chunk-FHPKHXHT.js → chunk-XNZBXQCG.js} +4 -0
- package/chunks/{chunk-ZLJQIGCH.js → chunk-XZCMQUOF.js} +8 -0
- package/chunks/{chunk-PQEIKQXN.js → chunk-YJMFRTLV.js} +24 -6
- package/chunks/{chunk-QZQ72YF6.js → chunk-Z26UXKZE.js} +1 -1
- package/chunks/{chunk-VA5NLVPT.js → chunk-Z7JILXGX.js} +1 -1
- package/chunks/{chunk-UEJESCS7.js → chunk-ZPPP6VCL.js} +1 -1
- package/chunks/{computer-use-MDOMIVTL.js → computer-use-ENYMKQAI.js} +17 -16
- package/chunks/{config-utils-E3ZQTHGM.js → config-utils-LIRO7NSU.js} +2 -2
- package/chunks/{contextCommand-FCK3CB37.js → contextCommand-E7XMHU6M.js} +19 -18
- package/chunks/{core-runtime-UHRHHU2O.js → core-runtime-KDIRQ63A.js} +17 -16
- package/chunks/{create-sub-session-J32WC64U.js → create-sub-session-6EWLAZD5.js} +1 -1
- package/chunks/{create-sub-session-MIXUVLWW.js → create-sub-session-VVEL77UF.js} +17 -16
- package/chunks/{cron-create-HMFSHIAR.js → cron-create-CCRIULJE.js} +1 -1
- package/chunks/{cron-delete-ZJFHOX57.js → cron-delete-FCFW6BGP.js} +1 -1
- package/chunks/{cron-list-ZEX2NBMN.js → cron-list-QDBVCHRF.js} +1 -1
- package/chunks/{daemon-status-provider-6LC7LUNR.js → daemon-status-provider-4LMCSLZ4.js} +25 -23
- package/chunks/{daemon-trust-policy-Y36HGRAM.js → daemon-trust-policy-XLONWB2C.js} +22 -21
- package/chunks/{daemon-trust-policy-monitor-ROTBBDOH.js → daemon-trust-policy-monitor-FHFZ3NNG.js} +22 -21
- package/chunks/{deferred-core-runtime-ZQ4JIAJD.js → deferred-core-runtime-QNEBJ3DP.js} +17 -16
- package/chunks/{display-image-2WOG27DY.js → display-image-GUJA352B.js} +2 -2
- package/chunks/{earlyInputCapture-GPRUNXTP.js → earlyInputCapture-OG5IUF4R.js} +17 -16
- package/chunks/{edit-YK3UP6D2.js → edit-E2WNOITJ.js} +18 -17
- package/chunks/{enter-worktree-QMVQW7UG.js → enter-worktree-RMCBAAA2.js} +17 -16
- package/chunks/{enterPlanMode-TZAYQ5MP.js → enterPlanMode-GISFJA3O.js} +17 -16
- package/chunks/{environment-3UQURCZG.js → environment-JXTQGYDN.js} +19 -18
- package/chunks/{errors-VBIMTNNI.js → errors-2AYTYCQ3.js} +19 -18
- package/chunks/{exit-worktree-4EC7LBBC.js → exit-worktree-HORS3V7Z.js} +17 -16
- package/chunks/{exitPlanMode-K5Y3REU2.js → exitPlanMode-V75Y36HJ.js} +17 -16
- package/chunks/external-tool-guard-provider-5HTGOPGU.js +273 -0
- package/chunks/{fast-path-KS6IE7YR.js → fast-path-HURC6JUT.js} +5 -5
- package/chunks/{gemini-LTUCUOJH.js → gemini-WHMD4RGY.js} +70 -55
- package/chunks/{geminiContentGenerator-M3HJTHKR.js → geminiContentGenerator-DZB3GPNQ.js} +1 -1
- package/chunks/{glob-SKUYGTF2.js → glob-IGTV723M.js} +17 -16
- package/chunks/{goal-tools-SPQ5M6D3.js → goal-tools-3AZKX5WQ.js} +2 -18
- package/chunks/{grep-SQ7RD7SV.js → grep-SJ2NYUCD.js} +17 -16
- package/chunks/{handleAutoUpdate-OK7OX23A.js → handleAutoUpdate-NPBKROGA.js} +21 -20
- package/chunks/{i18n-P77YBKY4.js → i18n-CBSMJZ3Z.js} +18 -17
- package/chunks/{image-gen-2ZWPS42A.js → image-gen-KNKDTUEN.js} +2 -2
- package/chunks/{initializer-PIOYXVW7.js → initializer-JT5P3IQF.js} +22 -21
- package/chunks/{installationInfo-IWMM6DPV.js → installationInfo-CZVCKPPZ.js} +18 -17
- package/chunks/{list-3DCR4TRI.js → list-MT7T6JVH.js} +25 -24
- package/chunks/{list-agents-TWEGRJWO.js → list-agents-GC4BRET7.js} +1 -1
- package/chunks/{loadedSettingsAdapter-EJC6CU5N.js → loadedSettingsAdapter-D4JFGYYQ.js} +22 -21
- package/chunks/{loggingContentGenerator-2JEFU25T.js → loggingContentGenerator-SFT5CMPU.js} +9 -8
- package/chunks/{loop-wakeup-6LLEOQYV.js → loop-wakeup-SQQSBMEY.js} +2 -2
- package/chunks/{ls-H5WX22VK.js → ls-63CC3NNX.js} +1 -1
- package/chunks/{lsp-G6FXYEIS.js → lsp-P6NVJVNT.js} +1 -1
- package/chunks/{managed-npm-update-EGVQPSBR.js → managed-npm-update-YHJW6SGD.js} +18 -17
- package/chunks/{mcp-KFFH2MBV.js → mcp-53X2M7XL.js} +22 -21
- package/chunks/{monitor-6Y3NDMTI.js → monitor-I43P3MNV.js} +17 -16
- package/chunks/{nonInteractiveCli-426IQDPE.js → nonInteractiveCli-UADCDERF.js} +50 -48
- package/chunks/{notebook-edit-373IQQLE.js → notebook-edit-WKZUONWV.js} +18 -17
- package/chunks/{openaiContentGenerator-PGFSOMIQ.js → openaiContentGenerator-YHF3FIYI.js} +9 -8
- package/chunks/{pidfile-Y4INDMHG.js → pidfile-VU37FJS4.js} +17 -16
- package/chunks/{processUtils-6BCPCJZW.js → processUtils-VIQVTDWH.js} +2 -2
- package/chunks/{qwenContentGenerator-QC3KSHSX.js → qwenContentGenerator-46476NL4.js} +18 -17
- package/chunks/{qwenOAuth2-IOAXKJ3L.js → qwenOAuth2-D62OJZFU.js} +1 -1
- package/chunks/{read-file-2T54FYZV.js → read-file-6PSNROKB.js} +7 -6
- package/chunks/{read-mcp-resource-DRZSI3HE.js → read-mcp-resource-RTSSEER5.js} +1 -1
- package/chunks/{record-artifact-IPIRWMFY.js → record-artifact-E6AWQU2Z.js} +2 -2
- package/chunks/{resumeHistoryUtils-O62RDCZ3.js → resumeHistoryUtils-QFD6LB7N.js} +20 -19
- package/chunks/{ripGrep-3H72KY7S.js → ripGrep-4WZJEOGB.js} +17 -16
- package/chunks/{run-qwen-serve-3AIDNNHO.js → run-qwen-serve-SEL3TISE.js} +72 -36
- package/chunks/{runtime-AZ4EHHFV.js → runtime-T6JAS7GL.js} +25 -24
- package/chunks/{scheduler-L4UUCU4Z.js → scheduler-ZCTDMJJV.js} +17 -16
- package/chunks/{sdk-exporters-http-IKNWQJNV.js → sdk-exporters-http-IL2346MJ.js} +6 -2
- package/chunks/{sdk-impl-7CUUMQDB.js → sdk-impl-SYKGVWOZ.js} +2 -2
- package/chunks/{send-message-LHJLVWFD.js → send-message-TL6FIMMN.js} +3 -3
- package/chunks/{serve-CLXGSYOE.js → serve-A7B6VWK7.js} +23 -21
- package/chunks/{server-MEAE3WMM.js → server-6CCTTLO4.js} +170 -63
- package/chunks/{session-OSLD2LT5.js → session-3YYXW6MZ.js} +51 -49
- package/chunks/{settings-ILWAOKA4.js → settings-KWYWA3BS.js} +21 -20
- package/chunks/{shell-RT5DBH6B.js → shell-6SUYJURL.js} +17 -16
- package/chunks/{skill-LVGA3ATZ.js → skill-ZIQFS6YD.js} +8 -7
- package/chunks/{skill-settings-WTZE7EPE.js → skill-settings-23IFV7S3.js} +21 -20
- package/chunks/{spawnChannel-BOBS7DVM.js → spawnChannel-AI7QA35U.js} +20 -18
- package/chunks/{standalone-update-Y5JB4S2K.js → standalone-update-WNXRFLEA.js} +19 -18
- package/chunks/{startInteractiveUI-ZV25CD2S.js → startInteractiveUI-NPZU6YXV.js} +76 -71
- package/chunks/{syntheticOutput-EYL7DWO7.js → syntheticOutput-BN7E626U.js} +2 -2
- package/chunks/{task-create-4ALZMGP5.js → task-create-2X4UP4F3.js} +4 -4
- package/chunks/{task-list-6CVQPORX.js → task-list-WOLJPZ64.js} +1 -1
- package/chunks/{task-stop-Y5ZTFVRX.js → task-stop-TNXRNAL2.js} +1 -1
- package/chunks/{task-update-IKCEEWJ6.js → task-update-VDUSN36E.js} +4 -4
- package/chunks/{team-create-ZVPQIXCP.js → team-create-CMF2RRF2.js} +17 -16
- package/chunks/{team-delete-CE7DC53R.js → team-delete-D2VMSDOT.js} +1 -1
- package/chunks/{team-plan-approval-5UHUBY3W.js → team-plan-approval-5EET4S3I.js} +17 -16
- package/chunks/{terminal-image-renderer-NWC2RALG.js → terminal-image-renderer-TCEAHDFE.js} +18 -17
- package/chunks/{theme-manager-5KICSBOB.js → theme-manager-RPYRQJLX.js} +17 -16
- package/chunks/{todoWrite-FTZWQRZH.js → todoWrite-MHWHO5UO.js} +1 -1
- package/chunks/{tool-search-2AOU77H4.js → tool-search-HJN53LCN.js} +9 -8
- package/chunks/{total-session-admission-FR7RMHVL.js → total-session-admission-4FZK4PCR.js} +21 -19
- package/chunks/{trustedFolders-V7UUPQXO.js → trustedFolders-RIYUQQJC.js} +18 -17
- package/chunks/{update-relaunch-TBWRMQD6.js → update-relaunch-3HVSJU2T.js} +5 -5
- package/chunks/{updateCheck-42SPCLH7.js → updateCheck-EE2XXQNJ.js} +20 -19
- package/chunks/{useAutoAcceptIndicator-4C2KM345.js → useAutoAcceptIndicator-RRV7MW47.js} +23 -22
- package/chunks/{validateNonInterActiveAuth-UVFRXV3Z.js → validateNonInterActiveAuth-3QRII2BS.js} +47 -45
- package/chunks/{version-HKTV6TPN.js → version-4KUHPDAC.js} +1 -1
- package/chunks/{web-fetch-ZRXSV5AN.js → web-fetch-MXA6HQ42.js} +7 -6
- package/chunks/{web-search-WOLV3L6T.js → web-search-YENHOBMC.js} +5 -4
- package/chunks/{workflow-F63ES3OB.js → workflow-RYEVBM4L.js} +18 -17
- package/chunks/{workspace-providers-status-PJMGMYMC.js → workspace-providers-status-SBTU5TWO.js} +25 -24
- package/chunks/{workspace-registration-store-LNBOX5TJ.js → workspace-registration-store-VUMOTODR.js} +1 -1
- package/chunks/{workspace-registry-4PR7VDQ3.js → workspace-registry-OZ5ZUBJ6.js} +21 -19
- package/chunks/{workspace-service-PVI3VUNQ.js → workspace-service-Y3IGAN4K.js} +26 -25
- package/chunks/{workspace-skills-status-2Q5ZISO6.js → workspace-skills-status-FXOIDGOS.js} +23 -22
- package/chunks/{workspace-trust-reconciler-NOILUH3C.js → workspace-trust-reconciler-DQI7MYJS.js} +26 -24
- package/chunks/{write-file-MOM4JDHG.js → write-file-NK4C3GFC.js} +17 -16
- package/chunks/{zoom-image-E3VHRCFU.js → zoom-image-4Y6Y6DAX.js} +7 -6
- package/cli-entry.js +14 -0
- package/cli.js +16 -12
- package/package.json +3 -3
- package/web-shell/assets/{arc-GpdmhIxr.js → arc-DtI1rZcQ.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-C-LhCgH_.js → architectureDiagram-3BPJPVTR-BPZwSVct.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CzNdTCm-.js → blockDiagram-GPEHLZMM-BIQ03j4C.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Ce7hbrRM.js → c4Diagram-AAUBKEIU-CB0RyFGm.js} +1 -1
- package/web-shell/assets/channel-vfbVFuM1.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BBSEn1PK.js → chunk-2J33WTMH-B3WoS-4H.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-_llgjfe5.js → chunk-4BX2VUAB-C98xYZ1X.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-9fJZ_oZE.js → chunk-55IACEB6-CbTIWRwQ.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DgEzQWOu.js → chunk-727SXJPM-DWGnKTPu.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-B4RthUTc.js → chunk-AQP2D5EJ-4__QyCEX.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CDI-emMW.js → chunk-FMBD7UC4-DFtG1YCW.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-jM2-yOd8.js → chunk-ND2GUHAM-rvAhW51N.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-XGZHlKPF.js → chunk-QZHKN3VN-DfiU9pwZ.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cvr8atq3.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvr8atq3.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-90nbW1xQ.js → cose-bilkent-S5V4N54A-Cc4EIdxu.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BtzlyqZ9.js → dagre-BM42HDAG-CZNj4dGW.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DAaqGWaH.js → diagram-2AECGRRQ-D5tiqQCr.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CxlzSIFa.js → diagram-5GNKFQAL-pwzw0jVO.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-8kj-1H6u.js → diagram-KO2AKTUF-4CWiM00x.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-6NhjFwRF.js → diagram-LMA3HP47-Dd7rc7Qf.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Bn9kvInz.js → diagram-OG6HWLK6-_vzV52ml.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CaRoGsAt.js → erDiagram-TEJ5UH35-CqbE2bx_.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-TkLweHdf.js → flowDiagram-I6XJVG4X-CaxNr7w4.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-ruwhCKBl.js → ganttDiagram-6RSMTGT7-AGjrtfUA.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DNI_PxoU.js → gitGraphDiagram-PVQCEYII-ADG2zSkc.js} +1 -1
- package/web-shell/assets/{index-p1gz-sxE.js → index-BOryKCqt.js} +1 -1
- package/web-shell/assets/index-Cb1LjsCv.css +5 -0
- package/web-shell/assets/{index-T4KluHvu.js → index-CvJDaIy8.js} +329 -329
- package/web-shell/assets/{infoDiagram-5YYISTIA-DarXq1-A.js → infoDiagram-5YYISTIA-CE3B_IoZ.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-GxDaDlT0.js → ishikawaDiagram-YF4QCWOH-CN-Frhoi.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-mDEoGBzY.js → journeyDiagram-JHISSGLW-CGgezS93.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Ds0t-Mup.js → kanban-definition-UN3LZRKU-BqWijky5.js} +1 -1
- package/web-shell/assets/{linear-05nJ0xZ7.js → linear-D8sfpZf6.js} +1 -1
- package/web-shell/assets/{mermaid.core-Bua24ThM.js → mermaid.core-3PA4QrzM.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D_zRdvUS.js → mindmap-definition-RKZ34NQL-D9QxwiCY.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DZHr1x16.js → pieDiagram-4H26LBE5-Bioaf6uE.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-HA06Wf0h.js → quadrantDiagram-W4KKPZXB-DBb2AS73.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DH3urmJf.js → requirementDiagram-4Y6WPE33-DXOvZ3KB.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-C4xgz0TT.js → sankeyDiagram-5OEKKPKP-D9qg09Dm.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DAUoZWgv.js → sequenceDiagram-3UESZ5HK-DSAUIfpw.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-v7NzXy4l.js → stateDiagram-AJRCARHV-BPZkzfQ3.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DInOqnhZ.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-B3GTYR2W.js → timeline-definition-PNZ67QCA-UDaQp9sP.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BWHjSPAq.js → vennDiagram-CIIHVFJN-2ouhAnHO.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-m9r6IUBC.js → wardley-L42UT6IY-Cq_WEvTK.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-kT0FkVfK.js → wardleyDiagram-YWT4CUSO-Dt24aXOM.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-CYRm10z5.js → xychartDiagram-2RQKCTM6-A5Xk2WCH.js} +1 -1
- package/web-shell/index.html +2 -2
- package/bundled/review/DESIGN.md +0 -724
- package/web-shell/assets/channel-95y6Rcp3.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-pfzVkmjQ.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-pfzVkmjQ.js +0 -1
- package/web-shell/assets/index-WxSvj2tI.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CtdFexEf.js +0 -1
- package/chunks/{channel-management-service-UHX56NBO.js → channel-management-service-5XPPTWUQ.js} +3 -3
- package/chunks/{chunk-LEZFUYPM.js → chunk-7GYP5COR.js} +3 -3
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
defaultModalities
|
|
5
|
+
} from "./chunk-WOJZWRAZ.js";
|
|
3
6
|
import {
|
|
4
7
|
Mutex
|
|
5
8
|
} from "./chunk-VGC4I5JJ.js";
|
|
@@ -8,25 +11,23 @@ import {
|
|
|
8
11
|
} from "./chunk-E4WHKETF.js";
|
|
9
12
|
import {
|
|
10
13
|
STRUCTURED_OUTPUT_REDACTED_ARGS
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZPPP6VCL.js";
|
|
12
15
|
import {
|
|
13
16
|
BaseDeclarativeTool,
|
|
14
17
|
BaseToolInvocation,
|
|
15
18
|
SchemaValidator,
|
|
19
|
+
StructuredToolError,
|
|
16
20
|
ToolDisplayNames,
|
|
17
21
|
ToolNames
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D7D7RXIJ.js";
|
|
19
23
|
import {
|
|
20
24
|
DEFAULT_QWEN_MODEL
|
|
21
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LCCBAGRT.js";
|
|
22
26
|
import {
|
|
23
27
|
estimateTextTokens,
|
|
24
28
|
generateLegacyMcpToolName,
|
|
25
29
|
normalizeToolNameForProvider
|
|
26
30
|
} from "./chunk-46UV252V.js";
|
|
27
|
-
import {
|
|
28
|
-
normalize
|
|
29
|
-
} from "./chunk-ZBVS26BY.js";
|
|
30
31
|
import {
|
|
31
32
|
InstallationManager
|
|
32
33
|
} from "./chunk-TYERNYH4.js";
|
|
@@ -52,8 +53,9 @@ import {
|
|
|
52
53
|
recordModelSlashCommand,
|
|
53
54
|
recordSubagentExecutionMetrics,
|
|
54
55
|
recordTokenUsageMetrics,
|
|
55
|
-
recordToolCallMetrics
|
|
56
|
-
|
|
56
|
+
recordToolCallMetrics,
|
|
57
|
+
recordToolExecutionMetrics
|
|
58
|
+
} from "./chunk-5L6CQ4ZU.js";
|
|
57
59
|
import {
|
|
58
60
|
require_src,
|
|
59
61
|
safeJsonStringify
|
|
@@ -102,7 +104,7 @@ import {
|
|
|
102
104
|
EVENT_WORKFLOW_KEYWORD,
|
|
103
105
|
EVENT_WORKFLOW_RUN,
|
|
104
106
|
SERVICE_NAME
|
|
105
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-LKRMNRSN.js";
|
|
106
108
|
import {
|
|
107
109
|
Storage,
|
|
108
110
|
createDebugLogger,
|
|
@@ -8980,7 +8982,7 @@ async function readTextCursorWindowFromHandle(fileHandle, request2) {
|
|
|
8980
8982
|
let truncatedByBytes = false;
|
|
8981
8983
|
let stop = false;
|
|
8982
8984
|
let skipRestOfLine = false;
|
|
8983
|
-
let sawCrlf =
|
|
8985
|
+
let sawCrlf = await precededByCrlfTerminator(fileHandle, startOffset);
|
|
8984
8986
|
const emit = /* @__PURE__ */ __name((line, hadNewline) => {
|
|
8985
8987
|
const separator = lines.length > 0 ? 1 : 0;
|
|
8986
8988
|
const lineBytes = Buffer.byteLength(line, "utf8");
|
|
@@ -9067,6 +9069,9 @@ async function readTextCursorWindowFromHandle(fileHandle, request2) {
|
|
|
9067
9069
|
true
|
|
9068
9070
|
);
|
|
9069
9071
|
consumedBytes = resumeAt - startOffset;
|
|
9072
|
+
if (!sawCrlf) {
|
|
9073
|
+
sawCrlf = await precededByCrlfTerminator(fileHandle, resumeAt);
|
|
9074
|
+
}
|
|
9070
9075
|
}
|
|
9071
9076
|
const content = lines.join("\n");
|
|
9072
9077
|
const nextOffset = startOffset + consumedBytes;
|
|
@@ -9083,6 +9088,14 @@ async function readTextCursorWindowFromHandle(fileHandle, request2) {
|
|
|
9083
9088
|
__name(readTextCursorWindowFromHandle, "readTextCursorWindowFromHandle");
|
|
9084
9089
|
var UTF8_BOM_BYTES = 3;
|
|
9085
9090
|
var LINE_FEED = 10;
|
|
9091
|
+
var CARRIAGE_RETURN = 13;
|
|
9092
|
+
async function precededByCrlfTerminator(fileHandle, startOffset) {
|
|
9093
|
+
if (startOffset < 2) return false;
|
|
9094
|
+
const probe = Buffer.alloc(2);
|
|
9095
|
+
const { bytesRead } = await fileHandle.read(probe, 0, 2, startOffset - 2);
|
|
9096
|
+
return bytesRead === 2 && probe[0] === CARRIAGE_RETURN && probe[1] === LINE_FEED;
|
|
9097
|
+
}
|
|
9098
|
+
__name(precededByCrlfTerminator, "precededByCrlfTerminator");
|
|
9086
9099
|
async function hasUtf8Bom(fileHandle, fileSize) {
|
|
9087
9100
|
if (fileSize < UTF8_BOM_BYTES) return false;
|
|
9088
9101
|
const probe = Buffer.alloc(UTF8_BOM_BYTES);
|
|
@@ -11224,12 +11237,14 @@ var QwenLogger = class _QwenLogger {
|
|
|
11224
11237
|
`tool_call#${event.function_name}`,
|
|
11225
11238
|
{
|
|
11226
11239
|
properties: {
|
|
11240
|
+
call_id: event.call_id,
|
|
11227
11241
|
prompt_id: event.prompt_id,
|
|
11228
11242
|
response_id: event.response_id,
|
|
11229
11243
|
tool_name: event.function_name,
|
|
11230
|
-
permission: event.decision,
|
|
11231
11244
|
status: event.status,
|
|
11245
|
+
execution_status: event.execution_status,
|
|
11232
11246
|
tool_type: event.tool_type,
|
|
11247
|
+
permission: event.decision,
|
|
11233
11248
|
success: event.success ? 1 : 0,
|
|
11234
11249
|
duration_ms: event.duration_ms,
|
|
11235
11250
|
error_type: event.error_type,
|
|
@@ -12718,6 +12733,32 @@ function recordUiTelemetryEventToChat(config, uiEvent) {
|
|
|
12718
12733
|
config.getChatRecordingService()?.recordUiTelemetryEvent(uiEvent);
|
|
12719
12734
|
}
|
|
12720
12735
|
__name(recordUiTelemetryEventToChat, "recordUiTelemetryEventToChat");
|
|
12736
|
+
function normalizeToolCallEvent(event) {
|
|
12737
|
+
const functionName = event.function_name ?? "";
|
|
12738
|
+
const normalized = {
|
|
12739
|
+
...event,
|
|
12740
|
+
function_name: functionName.trim().length > 0 ? functionName : "unknown_tool",
|
|
12741
|
+
success: event.status === "success",
|
|
12742
|
+
execution_status: event.execution_status ?? "unknown"
|
|
12743
|
+
};
|
|
12744
|
+
if (event.status === "error") {
|
|
12745
|
+
normalized.error_type = event.error_type?.trim() || "unknown" /* UNKNOWN */;
|
|
12746
|
+
} else {
|
|
12747
|
+
delete normalized.error;
|
|
12748
|
+
delete normalized.error_type;
|
|
12749
|
+
}
|
|
12750
|
+
return normalized;
|
|
12751
|
+
}
|
|
12752
|
+
__name(normalizeToolCallEvent, "normalizeToolCallEvent");
|
|
12753
|
+
var debugLogger5 = createDebugLogger("TELEMETRY_SINK");
|
|
12754
|
+
function runToolTelemetrySink(sink) {
|
|
12755
|
+
try {
|
|
12756
|
+
sink();
|
|
12757
|
+
} catch (e) {
|
|
12758
|
+
debugLogger5.debug("Telemetry sink failed (best-effort):", e);
|
|
12759
|
+
}
|
|
12760
|
+
}
|
|
12761
|
+
__name(runToolTelemetrySink, "runToolTelemetrySink");
|
|
12721
12762
|
function logStartSession(config, event) {
|
|
12722
12763
|
QwenLogger.getInstance(config)?.logStartSessionEvent(event);
|
|
12723
12764
|
if (!isTelemetrySdkInitialized()) return;
|
|
@@ -12796,17 +12837,6 @@ function logUserRetry(config, event) {
|
|
|
12796
12837
|
logger.emit(logRecord);
|
|
12797
12838
|
}
|
|
12798
12839
|
__name(logUserRetry, "logUserRetry");
|
|
12799
|
-
function normalizeToolCallEvent(event) {
|
|
12800
|
-
const isError = event.status === "error";
|
|
12801
|
-
return {
|
|
12802
|
-
...event,
|
|
12803
|
-
function_name: event.function_name.trim().length > 0 ? event.function_name : "unknown_tool",
|
|
12804
|
-
success: event.status === "success",
|
|
12805
|
-
error: isError ? event.error : void 0,
|
|
12806
|
-
error_type: isError ? event.error_type?.trim() ? event.error_type : "unknown" /* UNKNOWN */ : void 0
|
|
12807
|
-
};
|
|
12808
|
-
}
|
|
12809
|
-
__name(normalizeToolCallEvent, "normalizeToolCallEvent");
|
|
12810
12840
|
function logToolCall(config, event) {
|
|
12811
12841
|
const normalizedEvent = normalizeToolCallEvent(event);
|
|
12812
12842
|
const uiEvent = {
|
|
@@ -12814,37 +12844,53 @@ function logToolCall(config, event) {
|
|
|
12814
12844
|
"event.name": EVENT_TOOL_CALL,
|
|
12815
12845
|
"event.timestamp": (/* @__PURE__ */ new Date()).toISOString()
|
|
12816
12846
|
};
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12847
|
+
runToolTelemetrySink(() => {
|
|
12848
|
+
uiTelemetryService.addEvent(uiEvent, config.getSessionId());
|
|
12849
|
+
});
|
|
12850
|
+
runToolTelemetrySink(() => {
|
|
12851
|
+
if (!isInternalPromptId(normalizedEvent.prompt_id)) {
|
|
12852
|
+
recordUiTelemetryEventToChat(config, uiEvent);
|
|
12853
|
+
}
|
|
12854
|
+
});
|
|
12855
|
+
runToolTelemetrySink(() => {
|
|
12856
|
+
QwenLogger.getInstance(config)?.logToolCallEvent(normalizedEvent);
|
|
12857
|
+
});
|
|
12822
12858
|
if (!isTelemetrySdkInitialized()) return;
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12859
|
+
runToolTelemetrySink(() => {
|
|
12860
|
+
const attributes = {
|
|
12861
|
+
...getCommonAttributes(config),
|
|
12862
|
+
...normalizedEvent,
|
|
12863
|
+
"event.name": EVENT_TOOL_CALL,
|
|
12864
|
+
"event.timestamp": (/* @__PURE__ */ new Date()).toISOString(),
|
|
12865
|
+
function_args: safeJsonStringify(normalizedEvent.function_args, 2)
|
|
12866
|
+
};
|
|
12867
|
+
if (normalizedEvent.error) {
|
|
12868
|
+
attributes["error.message"] = normalizedEvent.error;
|
|
12869
|
+
}
|
|
12870
|
+
if (normalizedEvent.error_type) {
|
|
12871
|
+
attributes["error.type"] = normalizedEvent.error_type;
|
|
12872
|
+
}
|
|
12873
|
+
const logger = import_api_logs.logs.getLogger(SERVICE_NAME);
|
|
12874
|
+
const logRecord = {
|
|
12875
|
+
body: `Tool call: ${normalizedEvent.function_name}${normalizedEvent.decision ? `. Decision: ${normalizedEvent.decision}` : ""}. Success: ${normalizedEvent.success}. Duration: ${normalizedEvent.duration_ms}ms.`,
|
|
12876
|
+
attributes
|
|
12877
|
+
};
|
|
12878
|
+
logger.emit(logRecord);
|
|
12879
|
+
});
|
|
12880
|
+
runToolTelemetrySink(() => {
|
|
12881
|
+
recordToolCallMetrics(config, normalizedEvent.duration_ms, {
|
|
12882
|
+
function_name: normalizedEvent.function_name,
|
|
12883
|
+
status: normalizedEvent.status,
|
|
12884
|
+
success: normalizedEvent.success,
|
|
12885
|
+
decision: normalizedEvent.decision,
|
|
12886
|
+
tool_type: normalizedEvent.tool_type
|
|
12887
|
+
});
|
|
12888
|
+
});
|
|
12889
|
+
runToolTelemetrySink(() => {
|
|
12890
|
+
recordToolExecutionMetrics(config, {
|
|
12891
|
+
execution_status: normalizedEvent.execution_status,
|
|
12892
|
+
tool_type: normalizedEvent.tool_type
|
|
12893
|
+
});
|
|
12848
12894
|
});
|
|
12849
12895
|
}
|
|
12850
12896
|
__name(logToolCall, "logToolCall");
|
|
@@ -13749,7 +13795,7 @@ init_esbuild_shims();
|
|
|
13749
13795
|
import * as fs6 from "node:fs/promises";
|
|
13750
13796
|
import * as path7 from "node:path";
|
|
13751
13797
|
import * as crypto from "node:crypto";
|
|
13752
|
-
var
|
|
13798
|
+
var debugLogger6 = createDebugLogger("TRUNCATION");
|
|
13753
13799
|
var PREVIEW_SIZE_CHARS = 2e3;
|
|
13754
13800
|
var MAX_FILE_SIZE_BYTES = 50 * 1024 * 1024;
|
|
13755
13801
|
var MAX_SESSION_BYTES = 500 * 1024 * 1024;
|
|
@@ -13836,7 +13882,7 @@ ${truncatedContent}`;
|
|
|
13836
13882
|
outputFile
|
|
13837
13883
|
};
|
|
13838
13884
|
} catch (error) {
|
|
13839
|
-
|
|
13885
|
+
debugLogger6.warn(
|
|
13840
13886
|
`Failed to save truncated output to ${outputFile}:`,
|
|
13841
13887
|
error
|
|
13842
13888
|
);
|
|
@@ -13947,7 +13993,7 @@ __name(normalizeToolResultCallId, "normalizeToolResultCallId");
|
|
|
13947
13993
|
async function persistAndTruncateToolResult(callId, toolName, content, config) {
|
|
13948
13994
|
const byteSize = Buffer.byteLength(content, "utf-8");
|
|
13949
13995
|
if (byteSize > MAX_FILE_SIZE_BYTES) {
|
|
13950
|
-
|
|
13996
|
+
debugLogger6.warn(
|
|
13951
13997
|
`Tool result for ${toolName} exceeds ${MAX_FILE_SIZE_BYTES} bytes (${byteSize}), skipping disk persistence`
|
|
13952
13998
|
);
|
|
13953
13999
|
return {
|
|
@@ -13957,7 +14003,7 @@ async function persistAndTruncateToolResult(callId, toolName, content, config) {
|
|
|
13957
14003
|
}
|
|
13958
14004
|
const budgetUsed = config.getToolResultBytesWritten();
|
|
13959
14005
|
if (budgetUsed + byteSize > MAX_SESSION_BYTES) {
|
|
13960
|
-
|
|
14006
|
+
debugLogger6.warn(
|
|
13961
14007
|
`Session tool result budget exhausted (${budgetUsed} + ${byteSize} > ${MAX_SESSION_BYTES}), skipping disk persistence`
|
|
13962
14008
|
);
|
|
13963
14009
|
return {
|
|
@@ -13968,7 +14014,7 @@ async function persistAndTruncateToolResult(callId, toolName, content, config) {
|
|
|
13968
14014
|
config.trackToolResultBytes(byteSize);
|
|
13969
14015
|
const safeCallId = normalizeToolResultCallId(callId);
|
|
13970
14016
|
if (!safeCallId) {
|
|
13971
|
-
|
|
14017
|
+
debugLogger6.warn(
|
|
13972
14018
|
`Invalid callId for disk persistence: ${JSON.stringify(callId)}`
|
|
13973
14019
|
);
|
|
13974
14020
|
config.trackToolResultBytes(-byteSize);
|
|
@@ -13993,7 +14039,7 @@ async function persistAndTruncateToolResult(callId, toolName, content, config) {
|
|
|
13993
14039
|
bytesWritten: byteSize
|
|
13994
14040
|
};
|
|
13995
14041
|
} catch (error) {
|
|
13996
|
-
|
|
14042
|
+
debugLogger6.warn("Failed to persist tool result:", error);
|
|
13997
14043
|
try {
|
|
13998
14044
|
const fallback = await truncateAndSaveToFile(
|
|
13999
14045
|
content,
|
|
@@ -14013,7 +14059,7 @@ async function persistAndTruncateToolResult(callId, toolName, content, config) {
|
|
|
14013
14059
|
return { content: fallback.content, bytesWritten: 0 };
|
|
14014
14060
|
} catch (fallbackError) {
|
|
14015
14061
|
config.trackToolResultBytes(-byteSize);
|
|
14016
|
-
|
|
14062
|
+
debugLogger6.warn("Fallback truncation also failed:", fallbackError);
|
|
14017
14063
|
return {
|
|
14018
14064
|
content: buildStub(content, byteSize, "(disk persistence unavailable)"),
|
|
14019
14065
|
bytesWritten: 0
|
|
@@ -14206,7 +14252,7 @@ function collectText(parts) {
|
|
|
14206
14252
|
__name(collectText, "collectText");
|
|
14207
14253
|
|
|
14208
14254
|
// packages/core/src/tools/mcp-tool.ts
|
|
14209
|
-
var
|
|
14255
|
+
var debugLogger7 = createDebugLogger("MCP_TOOL");
|
|
14210
14256
|
var MCP_CONNECTION_ERROR_PATTERNS = [
|
|
14211
14257
|
/ECONNREFUSED/i,
|
|
14212
14258
|
/ENOTFOUND/i,
|
|
@@ -14217,6 +14263,51 @@ var MCP_CONNECTION_ERROR_PATTERNS = [
|
|
|
14217
14263
|
/disconnected/i,
|
|
14218
14264
|
/transport closed/i
|
|
14219
14265
|
];
|
|
14266
|
+
var MCP_REQUEST_TIMEOUT_CODE = -32001;
|
|
14267
|
+
function isMcpRequestTimeout(error) {
|
|
14268
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === MCP_REQUEST_TIMEOUT_CODE;
|
|
14269
|
+
}
|
|
14270
|
+
__name(isMcpRequestTimeout, "isMcpRequestTimeout");
|
|
14271
|
+
function isExecutionTimeoutFailure(error, serverName, signal) {
|
|
14272
|
+
if (signal.aborted) return false;
|
|
14273
|
+
if (!isMcpRequestTimeout(error)) return false;
|
|
14274
|
+
const statuses = getAllMCPServerStatuses();
|
|
14275
|
+
return !(statuses.has(serverName) && statuses.get(serverName) === "disconnected" /* DISCONNECTED */);
|
|
14276
|
+
}
|
|
14277
|
+
__name(isExecutionTimeoutFailure, "isExecutionTimeoutFailure");
|
|
14278
|
+
var PARENT_ABORT_OUTCOME = Symbol("parent_abort_outcome");
|
|
14279
|
+
function createToolCallAbortError() {
|
|
14280
|
+
return Object.assign(new Error("Tool call aborted"), { name: "AbortError" });
|
|
14281
|
+
}
|
|
14282
|
+
__name(createToolCallAbortError, "createToolCallAbortError");
|
|
14283
|
+
function isParentAbortOutcome(value) {
|
|
14284
|
+
return typeof value === "object" && value !== null && PARENT_ABORT_OUTCOME in value;
|
|
14285
|
+
}
|
|
14286
|
+
__name(isParentAbortOutcome, "isParentAbortOutcome");
|
|
14287
|
+
function createParentAbortRace(signal, forwardAbort) {
|
|
14288
|
+
let onAbort;
|
|
14289
|
+
const promise = new Promise((resolve) => {
|
|
14290
|
+
onAbort = /* @__PURE__ */ __name(() => {
|
|
14291
|
+
const reason = createToolCallAbortError();
|
|
14292
|
+
resolve({ [PARENT_ABORT_OUTCOME]: true, reason });
|
|
14293
|
+
forwardAbort?.(reason);
|
|
14294
|
+
}, "onAbort");
|
|
14295
|
+
if (signal.aborted) {
|
|
14296
|
+
onAbort();
|
|
14297
|
+
} else {
|
|
14298
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
14299
|
+
}
|
|
14300
|
+
});
|
|
14301
|
+
return {
|
|
14302
|
+
promise,
|
|
14303
|
+
dispose: /* @__PURE__ */ __name(() => {
|
|
14304
|
+
if (onAbort) {
|
|
14305
|
+
signal.removeEventListener("abort", onAbort);
|
|
14306
|
+
}
|
|
14307
|
+
}, "dispose")
|
|
14308
|
+
};
|
|
14309
|
+
}
|
|
14310
|
+
__name(createParentAbortRace, "createParentAbortRace");
|
|
14220
14311
|
var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends BaseToolInvocation {
|
|
14221
14312
|
constructor(mcpTool, serverName, serverToolName, displayName, registeredToolName, permissionAliases, trust, params = {}, cliConfig, mcpClient, mcpTimeout, mcpToolIdleTimeoutMs, annotations, allowInvocationContext = false, retryCount = 0) {
|
|
14222
14313
|
super(params);
|
|
@@ -14239,6 +14330,7 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14239
14330
|
__name(this, "DiscoveredMCPToolInvocation");
|
|
14240
14331
|
}
|
|
14241
14332
|
static MAX_RECONNECT_RETRIES = 3;
|
|
14333
|
+
static UNSAFE_REPLAY_ERROR_MESSAGE = "MCP tool execution may have completed before the connection failed. Automatic replay was skipped because the call could not be verified as safe to replay. Do not retry automatically; verify the outcome before trying again.";
|
|
14242
14334
|
/**
|
|
14243
14335
|
* MCP tool default permission based on trust:
|
|
14244
14336
|
* - trust: true in a trusted folder → 'allow' (server explicitly trusted by user config)
|
|
@@ -14286,33 +14378,42 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14286
14378
|
return null;
|
|
14287
14379
|
}
|
|
14288
14380
|
try {
|
|
14289
|
-
|
|
14381
|
+
debugLogger7.info(
|
|
14290
14382
|
`Attempting to reconnect MCP server '${this.serverName}'...`
|
|
14291
14383
|
);
|
|
14292
14384
|
const toolRegistry = this.cliConfig.getToolRegistry();
|
|
14293
14385
|
await toolRegistry.discoverToolsForServer(this.serverName);
|
|
14294
14386
|
const newTool = await toolRegistry.ensureTool(this.registeredToolName);
|
|
14295
14387
|
if (newTool instanceof DiscoveredMCPTool) {
|
|
14296
|
-
|
|
14388
|
+
debugLogger7.info(
|
|
14297
14389
|
`Successfully reconnected to MCP server '${this.serverName}'`
|
|
14298
14390
|
);
|
|
14299
14391
|
return newTool;
|
|
14300
14392
|
}
|
|
14301
14393
|
return null;
|
|
14302
14394
|
} catch (error) {
|
|
14303
|
-
|
|
14395
|
+
debugLogger7.error(
|
|
14304
14396
|
`Failed to reconnect MCP server '${this.serverName}': ${error}`
|
|
14305
14397
|
);
|
|
14306
14398
|
return null;
|
|
14307
14399
|
}
|
|
14308
14400
|
}
|
|
14309
14401
|
async handleReconnectOnError(error, signal, updateOutput) {
|
|
14310
|
-
|
|
14402
|
+
debugLogger7.error(`MCP server error '${this.serverName}': ${error}`);
|
|
14403
|
+
if (signal.aborted) {
|
|
14404
|
+
throw error;
|
|
14405
|
+
}
|
|
14311
14406
|
if (!this.shouldAttemptReconnect(error)) {
|
|
14312
14407
|
throw error;
|
|
14313
14408
|
}
|
|
14409
|
+
if (!this.cliConfig) {
|
|
14410
|
+
throw error;
|
|
14411
|
+
}
|
|
14412
|
+
if (!this.canSafelyReplay()) {
|
|
14413
|
+
throw new Error(_DiscoveredMCPToolInvocation.UNSAFE_REPLAY_ERROR_MESSAGE);
|
|
14414
|
+
}
|
|
14314
14415
|
if (this.retryCount < _DiscoveredMCPToolInvocation.MAX_RECONNECT_RETRIES) {
|
|
14315
|
-
|
|
14416
|
+
debugLogger7.info(
|
|
14316
14417
|
`Reconnection attempt ${this.retryCount + 1}/${_DiscoveredMCPToolInvocation.MAX_RECONNECT_RETRIES} for MCP server '${this.serverName}'`
|
|
14317
14418
|
);
|
|
14318
14419
|
const newTool = await this.attemptReconnect();
|
|
@@ -14324,29 +14425,46 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14324
14425
|
this.displayName,
|
|
14325
14426
|
newTool.name,
|
|
14326
14427
|
newTool.permissionAliases,
|
|
14327
|
-
|
|
14428
|
+
newTool.trust,
|
|
14328
14429
|
this.params,
|
|
14329
14430
|
this.cliConfig,
|
|
14330
14431
|
newTool["mcpClient"],
|
|
14331
14432
|
this.mcpTimeout,
|
|
14332
14433
|
this.mcpToolIdleTimeoutMs,
|
|
14333
|
-
|
|
14434
|
+
newTool.annotations,
|
|
14334
14435
|
newTool["allowInvocationContext"] === true,
|
|
14335
14436
|
this.retryCount + 1
|
|
14336
14437
|
);
|
|
14438
|
+
if (!newInvocation.canSafelyReplay()) {
|
|
14439
|
+
throw new Error(
|
|
14440
|
+
_DiscoveredMCPToolInvocation.UNSAFE_REPLAY_ERROR_MESSAGE
|
|
14441
|
+
);
|
|
14442
|
+
}
|
|
14337
14443
|
return newInvocation.execute(signal, updateOutput);
|
|
14338
14444
|
}
|
|
14339
14445
|
} else if (this.retryCount >= _DiscoveredMCPToolInvocation.MAX_RECONNECT_RETRIES) {
|
|
14340
|
-
|
|
14446
|
+
debugLogger7.error(
|
|
14341
14447
|
`Max reconnection attempts (${_DiscoveredMCPToolInvocation.MAX_RECONNECT_RETRIES}) reached for MCP server '${this.serverName}'`
|
|
14342
14448
|
);
|
|
14343
14449
|
}
|
|
14344
14450
|
throw error;
|
|
14345
14451
|
}
|
|
14452
|
+
canSafelyReplay() {
|
|
14453
|
+
if (this.trust !== true || this.cliConfig?.isTrustedFolder() !== true || !this.annotations) {
|
|
14454
|
+
return false;
|
|
14455
|
+
}
|
|
14456
|
+
if (this.annotations.readOnlyHint === true && (this.annotations.destructiveHint === true || this.annotations.idempotentHint === false)) {
|
|
14457
|
+
return false;
|
|
14458
|
+
}
|
|
14459
|
+
return this.annotations.idempotentHint === true || this.annotations.readOnlyHint === true;
|
|
14460
|
+
}
|
|
14346
14461
|
shouldAttemptReconnect(error) {
|
|
14347
14462
|
if (isAbortError(error)) {
|
|
14348
14463
|
return false;
|
|
14349
14464
|
}
|
|
14465
|
+
if (this.cliConfig?.getToolInvocationGuard?.()) {
|
|
14466
|
+
return false;
|
|
14467
|
+
}
|
|
14350
14468
|
if (getMCPServerStatus(this.serverName) === "disconnected" /* DISCONNECTED */) {
|
|
14351
14469
|
return true;
|
|
14352
14470
|
}
|
|
@@ -14368,10 +14486,18 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14368
14486
|
* MCP tool calls (e.g., browser automation).
|
|
14369
14487
|
*/
|
|
14370
14488
|
async executeWithDirectClient(signal, updateOutput) {
|
|
14489
|
+
if (signal.aborted) {
|
|
14490
|
+
throw createToolCallAbortError();
|
|
14491
|
+
}
|
|
14371
14492
|
const idleTimeoutController = new AbortController();
|
|
14493
|
+
const parentAbortController = new AbortController();
|
|
14494
|
+
const parentAbortRace = createParentAbortRace(signal, (reason) => {
|
|
14495
|
+
parentAbortController.abort(reason);
|
|
14496
|
+
});
|
|
14372
14497
|
let idleTimeoutId;
|
|
14498
|
+
let idleTimeoutWon = false;
|
|
14373
14499
|
const combinedSignal = AbortSignal.any([
|
|
14374
|
-
signal,
|
|
14500
|
+
parentAbortController.signal,
|
|
14375
14501
|
idleTimeoutController.signal
|
|
14376
14502
|
]);
|
|
14377
14503
|
const resetIdleTimeout = /* @__PURE__ */ __name(() => {
|
|
@@ -14380,6 +14506,10 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14380
14506
|
}
|
|
14381
14507
|
if (this.mcpToolIdleTimeoutMs && this.mcpToolIdleTimeoutMs > 0) {
|
|
14382
14508
|
const timer = setTimeout(() => {
|
|
14509
|
+
if (signal.aborted) {
|
|
14510
|
+
return;
|
|
14511
|
+
}
|
|
14512
|
+
idleTimeoutWon = true;
|
|
14383
14513
|
const error = new Error(
|
|
14384
14514
|
`MCP tool '${this.serverToolName}' on server '${this.serverName}' did not respond within ${this.mcpToolIdleTimeoutMs}ms idle timeout`
|
|
14385
14515
|
);
|
|
@@ -14393,7 +14523,7 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14393
14523
|
try {
|
|
14394
14524
|
resetIdleTimeout();
|
|
14395
14525
|
const invocationContext = this.allowInvocationContext ? getInvocationContext() : void 0;
|
|
14396
|
-
const
|
|
14526
|
+
const callPromise = this.mcpClient.callTool(
|
|
14397
14527
|
{
|
|
14398
14528
|
name: this.serverToolName,
|
|
14399
14529
|
arguments: this.params,
|
|
@@ -14421,6 +14551,14 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14421
14551
|
signal: combinedSignal
|
|
14422
14552
|
}
|
|
14423
14553
|
);
|
|
14554
|
+
const outcome = await Promise.race([
|
|
14555
|
+
callPromise,
|
|
14556
|
+
parentAbortRace.promise
|
|
14557
|
+
]);
|
|
14558
|
+
if (isParentAbortOutcome(outcome)) {
|
|
14559
|
+
throw outcome.reason;
|
|
14560
|
+
}
|
|
14561
|
+
const callToolResult = outcome;
|
|
14424
14562
|
const rawResponseParts = wrapMcpCallToolResultAsParts(
|
|
14425
14563
|
this.serverToolName,
|
|
14426
14564
|
callToolResult
|
|
@@ -14442,11 +14580,18 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14442
14580
|
persistedOutputFiles: truncated.persistedOutputFiles
|
|
14443
14581
|
};
|
|
14444
14582
|
} catch (error) {
|
|
14583
|
+
if (idleTimeoutWon || isExecutionTimeoutFailure(error, this.serverName, signal)) {
|
|
14584
|
+
throw new StructuredToolError(
|
|
14585
|
+
getErrorMessage(error),
|
|
14586
|
+
"execution_timeout" /* EXECUTION_TIMEOUT */
|
|
14587
|
+
);
|
|
14588
|
+
}
|
|
14445
14589
|
return this.handleReconnectOnError(error, signal, updateOutput);
|
|
14446
14590
|
} finally {
|
|
14447
14591
|
if (idleTimeoutId) {
|
|
14448
14592
|
clearTimeout(idleTimeoutId);
|
|
14449
14593
|
}
|
|
14594
|
+
parentAbortRace.dispose();
|
|
14450
14595
|
}
|
|
14451
14596
|
}
|
|
14452
14597
|
/**
|
|
@@ -14454,38 +14599,26 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14454
14599
|
* This path does NOT support progress notifications.
|
|
14455
14600
|
*/
|
|
14456
14601
|
async executeWithCallableTool(signal) {
|
|
14602
|
+
if (signal.aborted) {
|
|
14603
|
+
throw createToolCallAbortError();
|
|
14604
|
+
}
|
|
14457
14605
|
const functionCalls = [
|
|
14458
14606
|
{
|
|
14459
14607
|
name: this.serverToolName,
|
|
14460
14608
|
args: this.params
|
|
14461
14609
|
}
|
|
14462
14610
|
];
|
|
14611
|
+
const parentAbortRace = createParentAbortRace(signal);
|
|
14463
14612
|
try {
|
|
14464
|
-
const
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
const error = new Error("Tool call aborted");
|
|
14474
|
-
error.name = "AbortError";
|
|
14475
|
-
reject(error);
|
|
14476
|
-
}, "onAbort");
|
|
14477
|
-
const cleanup = /* @__PURE__ */ __name(() => {
|
|
14478
|
-
signal.removeEventListener("abort", onAbort);
|
|
14479
|
-
}, "cleanup");
|
|
14480
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
14481
|
-
this.mcpTool.callTool(functionCalls).then((res) => {
|
|
14482
|
-
cleanup();
|
|
14483
|
-
resolve(res);
|
|
14484
|
-
}).catch((err) => {
|
|
14485
|
-
cleanup();
|
|
14486
|
-
reject(err);
|
|
14487
|
-
});
|
|
14488
|
-
});
|
|
14613
|
+
const callPromise = this.mcpTool.callTool(functionCalls);
|
|
14614
|
+
const outcome = await Promise.race([
|
|
14615
|
+
callPromise,
|
|
14616
|
+
parentAbortRace.promise
|
|
14617
|
+
]);
|
|
14618
|
+
if (isParentAbortOutcome(outcome)) {
|
|
14619
|
+
throw outcome.reason;
|
|
14620
|
+
}
|
|
14621
|
+
const rawResponseParts = outcome;
|
|
14489
14622
|
if (this.isMCPToolError(rawResponseParts)) {
|
|
14490
14623
|
return await this.buildMcpToolError(rawResponseParts, functionCalls[0]);
|
|
14491
14624
|
}
|
|
@@ -14500,7 +14633,15 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
14500
14633
|
persistedOutputFiles: truncated.persistedOutputFiles
|
|
14501
14634
|
};
|
|
14502
14635
|
} catch (error) {
|
|
14636
|
+
if (isExecutionTimeoutFailure(error, this.serverName, signal)) {
|
|
14637
|
+
throw new StructuredToolError(
|
|
14638
|
+
getErrorMessage(error),
|
|
14639
|
+
"execution_timeout" /* EXECUTION_TIMEOUT */
|
|
14640
|
+
);
|
|
14641
|
+
}
|
|
14503
14642
|
return this.handleReconnectOnError(error, signal);
|
|
14643
|
+
} finally {
|
|
14644
|
+
parentAbortRace.dispose();
|
|
14504
14645
|
}
|
|
14505
14646
|
}
|
|
14506
14647
|
async buildMcpToolError(rawResponseParts, functionCall) {
|
|
@@ -14931,10 +15072,12 @@ var ToolCallEvent = class {
|
|
|
14931
15072
|
}
|
|
14932
15073
|
"event.name";
|
|
14933
15074
|
"event.timestamp";
|
|
15075
|
+
call_id;
|
|
14934
15076
|
function_name;
|
|
14935
15077
|
function_args;
|
|
14936
15078
|
duration_ms;
|
|
14937
15079
|
status;
|
|
15080
|
+
execution_status;
|
|
14938
15081
|
success;
|
|
14939
15082
|
// Keep for backward compatibility
|
|
14940
15083
|
decision;
|
|
@@ -14950,10 +15093,12 @@ var ToolCallEvent = class {
|
|
|
14950
15093
|
constructor(call) {
|
|
14951
15094
|
this["event.name"] = "tool_call";
|
|
14952
15095
|
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
15096
|
+
this.call_id = call.request.callId;
|
|
14953
15097
|
this.function_name = call.request.name;
|
|
14954
15098
|
this.function_args = call.request.name === ToolNames.STRUCTURED_OUTPUT ? { ...STRUCTURED_OUTPUT_REDACTED_ARGS } : call.request.args;
|
|
14955
15099
|
this.duration_ms = call.durationMs ?? 0;
|
|
14956
15100
|
this.status = call.status;
|
|
15101
|
+
this.execution_status = call.response.executionStatus;
|
|
14957
15102
|
this.success = call.status === "success";
|
|
14958
15103
|
this.decision = call.outcome ? getDecisionFromOutcome(call.outcome) : void 0;
|
|
14959
15104
|
this.error = call.response.error?.message;
|
|
@@ -15955,92 +16100,6 @@ __name(getFileReadDefaultPermission, "getFileReadDefaultPermission");
|
|
|
15955
16100
|
// packages/core/src/services/visionBridge/vision-bridge-service.ts
|
|
15956
16101
|
init_esbuild_shims();
|
|
15957
16102
|
|
|
15958
|
-
// packages/core/src/core/modalityDefaults.ts
|
|
15959
|
-
init_esbuild_shims();
|
|
15960
|
-
var FULL_MULTIMODAL = {
|
|
15961
|
-
image: true,
|
|
15962
|
-
pdf: true,
|
|
15963
|
-
audio: true,
|
|
15964
|
-
video: true
|
|
15965
|
-
};
|
|
15966
|
-
var MODALITY_PATTERNS = [
|
|
15967
|
-
// -------------------
|
|
15968
|
-
// Google Gemini — full multimodal
|
|
15969
|
-
// -------------------
|
|
15970
|
-
[/^gemini-3/, FULL_MULTIMODAL],
|
|
15971
|
-
[/^gemini-/, FULL_MULTIMODAL],
|
|
15972
|
-
// -------------------
|
|
15973
|
-
// OpenAI — image by default for all gpt/o-series models
|
|
15974
|
-
// -------------------
|
|
15975
|
-
[/^gpt-5/, { image: true }],
|
|
15976
|
-
[/^gpt-/, { image: true }],
|
|
15977
|
-
[/^o\d/, { image: true }],
|
|
15978
|
-
// -------------------
|
|
15979
|
-
// Anthropic Claude — image + pdf
|
|
15980
|
-
// -------------------
|
|
15981
|
-
[/^claude-/, { image: true, pdf: true }],
|
|
15982
|
-
// -------------------
|
|
15983
|
-
// Alibaba / Qwen
|
|
15984
|
-
// -------------------
|
|
15985
|
-
// Qwen Plus models: image + video support
|
|
15986
|
-
[/^qwen3\.5-plus/, { image: true, video: true }],
|
|
15987
|
-
[/^qwen3\.6-plus/, { image: true, video: true }],
|
|
15988
|
-
[/^qwen3\.7-plus/, { image: true, video: true }],
|
|
15989
|
-
// Qwen Max models (3.8+): image support
|
|
15990
|
-
[/^qwen3\.8-max/, { image: true }],
|
|
15991
|
-
[/^coder-model$/, { image: true, video: true }],
|
|
15992
|
-
// Qwen VL (vision-language) models: image + video
|
|
15993
|
-
[/^qwen-vl-/, { image: true, video: true }],
|
|
15994
|
-
[/^qwen3-vl-/, { image: true, video: true }],
|
|
15995
|
-
// Qwen coder / text models: text-only
|
|
15996
|
-
[/^qwen3-coder-/, {}],
|
|
15997
|
-
// Qwen3.6-35B-A3B (local quant variants) — image + video
|
|
15998
|
-
[/^qwen3\.6-35b/, { image: true, video: true }],
|
|
15999
|
-
[/^qwen/, {}],
|
|
16000
|
-
// -------------------
|
|
16001
|
-
// DeepSeek — text-only
|
|
16002
|
-
// -------------------
|
|
16003
|
-
[/^deepseek/, {}],
|
|
16004
|
-
// -------------------
|
|
16005
|
-
// Zhipu GLM
|
|
16006
|
-
// -------------------
|
|
16007
|
-
[/^glm-4\.5v/, { image: true }],
|
|
16008
|
-
[/^glm-5(?:-|$)/, {}],
|
|
16009
|
-
[/^glm-/, {}],
|
|
16010
|
-
// -------------------
|
|
16011
|
-
// MiniMax — M3 supports image + video input; older models default to text-only
|
|
16012
|
-
// -------------------
|
|
16013
|
-
[/^minimax-m3/i, { image: true, video: true }],
|
|
16014
|
-
[/^minimax-/, {}],
|
|
16015
|
-
// -------------------
|
|
16016
|
-
// Moonshot / Kimi
|
|
16017
|
-
// -------------------
|
|
16018
|
-
[/^kimi-k3/, { image: true, video: true }],
|
|
16019
|
-
[/^kimi-k2\./, { image: true, video: true }],
|
|
16020
|
-
[/^kimi-/, {}],
|
|
16021
|
-
// -------------------
|
|
16022
|
-
// ByteDance Doubao — Seed-series and *-vision / *-vl models accept image
|
|
16023
|
-
// input; other Doubao models (pro / lite / text) are text-only.
|
|
16024
|
-
// (QwenLM/qwen-code#4876)
|
|
16025
|
-
// -------------------
|
|
16026
|
-
// seedance (text→video) and seedream (text→image) are generation models with
|
|
16027
|
-
// text-only input — exclude them before the multimodal Seed chat series.
|
|
16028
|
-
[/^doubao-seed(ance|ream)/, {}],
|
|
16029
|
-
[/^doubao-seed/, { image: true }],
|
|
16030
|
-
[/^doubao-.*(vision|vl)/, { image: true }],
|
|
16031
|
-
[/^doubao/, {}]
|
|
16032
|
-
];
|
|
16033
|
-
function defaultModalities(model) {
|
|
16034
|
-
const norm = normalize(model);
|
|
16035
|
-
for (const [regex, modalities] of MODALITY_PATTERNS) {
|
|
16036
|
-
if (regex.test(norm)) {
|
|
16037
|
-
return { ...modalities };
|
|
16038
|
-
}
|
|
16039
|
-
}
|
|
16040
|
-
return {};
|
|
16041
|
-
}
|
|
16042
|
-
__name(defaultModalities, "defaultModalities");
|
|
16043
|
-
|
|
16044
16103
|
// packages/core/src/utils/sideQuery.ts
|
|
16045
16104
|
init_esbuild_shims();
|
|
16046
16105
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
@@ -16154,7 +16213,7 @@ async function runSideQuery(config, options) {
|
|
|
16154
16213
|
__name(runSideQuery, "runSideQuery");
|
|
16155
16214
|
|
|
16156
16215
|
// packages/core/src/services/visionBridge/vision-bridge-service.ts
|
|
16157
|
-
var
|
|
16216
|
+
var debugLogger8 = createDebugLogger("VISION_BRIDGE");
|
|
16158
16217
|
var turnImageCounts = /* @__PURE__ */ new WeakMap();
|
|
16159
16218
|
var BRIDGE_MAX_OUTPUT_TOKENS = 2048;
|
|
16160
16219
|
var VISION_BRIDGE_TIMEOUT_MS = 3e4;
|
|
@@ -16424,7 +16483,7 @@ async function runVisionBridge(params) {
|
|
|
16424
16483
|
try {
|
|
16425
16484
|
timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
16426
16485
|
combinedSignal = AbortSignal.any([signal, timeoutSignal]);
|
|
16427
|
-
|
|
16486
|
+
debugLogger8.debug(`calling ${modelId} for ${toConvert.length} image(s)`);
|
|
16428
16487
|
const { text } = await runSideQuery(config, {
|
|
16429
16488
|
contents: requestContents,
|
|
16430
16489
|
abortSignal: combinedSignal,
|
|
@@ -16443,7 +16502,7 @@ async function runVisionBridge(params) {
|
|
|
16443
16502
|
});
|
|
16444
16503
|
const description = stripThinkTags(text ?? "");
|
|
16445
16504
|
if (description.length === 0) {
|
|
16446
|
-
|
|
16505
|
+
debugLogger8.warn(`${modelId} returned an empty description`);
|
|
16447
16506
|
return failure(
|
|
16448
16507
|
"the vision model returned no description",
|
|
16449
16508
|
parts,
|
|
@@ -16451,7 +16510,7 @@ async function runVisionBridge(params) {
|
|
|
16451
16510
|
{ modelId, ...egress }
|
|
16452
16511
|
);
|
|
16453
16512
|
}
|
|
16454
|
-
|
|
16513
|
+
debugLogger8.debug(
|
|
16455
16514
|
`vision bridge transcription via ${modelId} (${description.length} chars)`
|
|
16456
16515
|
);
|
|
16457
16516
|
return {
|
|
@@ -16477,7 +16536,7 @@ async function runVisionBridge(params) {
|
|
|
16477
16536
|
};
|
|
16478
16537
|
} catch (error) {
|
|
16479
16538
|
if (signal.aborted) {
|
|
16480
|
-
|
|
16539
|
+
debugLogger8.debug(`conversion cancelled via ${modelId}`);
|
|
16481
16540
|
return {
|
|
16482
16541
|
applied: false,
|
|
16483
16542
|
status: "skipped",
|
|
@@ -16489,13 +16548,13 @@ async function runVisionBridge(params) {
|
|
|
16489
16548
|
}
|
|
16490
16549
|
const timedOut = !!combinedSignal?.aborted && !!timeoutSignal?.aborted;
|
|
16491
16550
|
if (timedOut && attempt < VISION_BRIDGE_MAX_ATTEMPTS) {
|
|
16492
|
-
|
|
16551
|
+
debugLogger8.warn(
|
|
16493
16552
|
`conversion attempt ${attempt} via ${modelId} timed out after ${timeoutMs}ms; retrying`
|
|
16494
16553
|
);
|
|
16495
16554
|
continue;
|
|
16496
16555
|
}
|
|
16497
16556
|
const reason = timedOut ? `timed out after ${timeoutMs}ms (${VISION_BRIDGE_MAX_ATTEMPTS} attempts)` : error instanceof Error ? error.message : String(error);
|
|
16498
|
-
|
|
16557
|
+
debugLogger8.warn(`conversion failed via ${modelId}: ${reason}`);
|
|
16499
16558
|
return failure(reason, parts, omittedCount, {
|
|
16500
16559
|
modelId,
|
|
16501
16560
|
// The timeout message is safe to show; an arbitrary provider error is not
|
|
@@ -16510,7 +16569,7 @@ async function runVisionBridge(params) {
|
|
|
16510
16569
|
__name(runVisionBridge, "runVisionBridge");
|
|
16511
16570
|
|
|
16512
16571
|
// packages/core/src/tools/read-file.ts
|
|
16513
|
-
var
|
|
16572
|
+
var debugLogger9 = createDebugLogger("READ_FILE_CACHE");
|
|
16514
16573
|
var ReadFileToolInvocation = class extends BaseToolInvocation {
|
|
16515
16574
|
constructor(config, params) {
|
|
16516
16575
|
super(params);
|
|
@@ -16562,7 +16621,7 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
|
|
|
16562
16621
|
try {
|
|
16563
16622
|
stats = await fs7.stat(absPath);
|
|
16564
16623
|
} catch (err) {
|
|
16565
|
-
|
|
16624
|
+
debugLogger9.debug("stat-failed", {
|
|
16566
16625
|
path: absPath,
|
|
16567
16626
|
code: err.code
|
|
16568
16627
|
});
|
|
@@ -16572,10 +16631,10 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
|
|
|
16572
16631
|
if (status.state === "fresh" && status.entry.lastReadAt !== void 0 && status.entry.lastReadWasFull && status.entry.lastReadCacheable && // Only quote-back if that read is still in history (issue
|
|
16573
16632
|
// #4239: idle microcompaction flips this off when it blanks it).
|
|
16574
16633
|
status.entry.readResidentInHistory && (status.entry.lastWriteAt === void 0 || status.entry.lastReadAt > status.entry.lastWriteAt)) {
|
|
16575
|
-
|
|
16634
|
+
debugLogger9.debug("hit", { path: absPath });
|
|
16576
16635
|
return this.unchangedResult(absPath);
|
|
16577
16636
|
}
|
|
16578
|
-
|
|
16637
|
+
debugLogger9.debug("miss", { path: absPath, state: status.state });
|
|
16579
16638
|
}
|
|
16580
16639
|
const prepareForVisionBridge = shouldRunVisionBridge(this.config);
|
|
16581
16640
|
let result = await processSingleFileContent(
|
|
@@ -16660,7 +16719,7 @@ ${result.llmContent}`;
|
|
|
16660
16719
|
if (!candidate) return result;
|
|
16661
16720
|
const { imageParts } = splitImageParts(result.llmContent);
|
|
16662
16721
|
if (imageParts.length === 0 || !hasImageParts(imageParts)) {
|
|
16663
|
-
|
|
16722
|
+
debugLogger9.debug("pdf vision bridge candidate contained no images");
|
|
16664
16723
|
return this.restorePdfFallback(result, "Vision bridge could not run.");
|
|
16665
16724
|
}
|
|
16666
16725
|
const sourceContext = {
|
|
@@ -16681,7 +16740,7 @@ ${result.llmContent}`;
|
|
|
16681
16740
|
const notice = formatVisionBridgeNotice(bridgeResult);
|
|
16682
16741
|
if (bridgeResult.status === "ok" && bridgeResult.applied && bridgeResult.parts != null) {
|
|
16683
16742
|
if (bridgeResult.convertedCount !== imageParts.length || bridgeResult.omittedCount !== 0) {
|
|
16684
|
-
|
|
16743
|
+
debugLogger9.debug("pdf vision bridge omitted candidate pages");
|
|
16685
16744
|
return this.restorePdfFallback(
|
|
16686
16745
|
result,
|
|
16687
16746
|
`${notice} The transcription was discarded because the bridge did not transcribe every rendered PDF page.`
|
|
@@ -16691,7 +16750,7 @@ ${result.llmContent}`;
|
|
|
16691
16750
|
if (bridgedParts.some(
|
|
16692
16751
|
(part) => part.inlineData != null || part.fileData != null
|
|
16693
16752
|
)) {
|
|
16694
|
-
|
|
16753
|
+
debugLogger9.debug("pdf vision bridge returned media data");
|
|
16695
16754
|
return this.restorePdfFallback(
|
|
16696
16755
|
result,
|
|
16697
16756
|
`${notice} The transcription was discarded because the bridge returned an unsafe media payload.`
|
|
@@ -16725,7 +16784,7 @@ ${result.llmContent}`;
|
|
|
16725
16784
|
);
|
|
16726
16785
|
} catch (error) {
|
|
16727
16786
|
signal.throwIfAborted();
|
|
16728
|
-
|
|
16787
|
+
debugLogger9.debug(
|
|
16729
16788
|
`pdf vision bridge failed before replacement: ${String(error instanceof Error ? error.message : error)}`
|
|
16730
16789
|
);
|
|
16731
16790
|
return this.restorePdfFallback(
|
|
@@ -16894,7 +16953,6 @@ var ReadFileTool = class _ReadFileTool extends BaseDeclarativeTool {
|
|
|
16894
16953
|
};
|
|
16895
16954
|
|
|
16896
16955
|
export {
|
|
16897
|
-
defaultModalities,
|
|
16898
16956
|
runSideQuery,
|
|
16899
16957
|
VISION_BRIDGE_MAX_IMAGES,
|
|
16900
16958
|
VISION_BRIDGE_MAX_IMAGE_BASE64_BYTES,
|