@qwen-code/qwen-code 0.24.4 → 0.24.5-nightly.20260924.ffea2d024e
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/agent-delegation/SKILL.md +56 -0
- package/bundled/browser-use/SKILL.md +11 -10
- package/bundled/browser-use/runtime/index.js +70 -31
- package/bundled/browser-use/runtime/native-host.js +1 -0
- package/bundled/browser-use/runtime/scripts/native-host-setup.js +1 -0
- package/bundled/computer-use/SKILL.md +182 -224
- package/bundled/qc-helper/docs/configuration/model-providers.md +13 -2
- package/bundled/qc-helper/docs/conversations-recovery.md +10 -0
- package/bundled/qc-helper/docs/features/browser-use.md +22 -12
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +2 -2
- package/bundled/qc-helper/docs/features/channels/dws.md +7 -7
- package/bundled/qc-helper/docs/features/channels/feishu.md +1 -1
- package/bundled/qc-helper/docs/features/channels/github.md +13 -9
- package/bundled/qc-helper/docs/features/channels/gitlab.md +12 -5
- package/bundled/qc-helper/docs/features/channels/overview.md +121 -46
- package/bundled/qc-helper/docs/features/channels/plugins.md +12 -12
- package/bundled/qc-helper/docs/features/channels/qqbot.md +5 -5
- package/bundled/qc-helper/docs/features/channels/telegram.md +5 -5
- package/bundled/qc-helper/docs/features/channels/wecom.md +5 -4
- package/bundled/qc-helper/docs/features/channels/weixin.md +3 -3
- package/bundled/qc-helper/docs/features/code-review.md +4 -0
- package/bundled/qc-helper/docs/features/computer-use.md +1 -1
- package/bundled/qc-helper/docs/features/context-cost.md +7 -5
- package/bundled/qc-helper/docs/quickstart.md +14 -14
- package/bundled/qc-helper/docs/qwen-serve.md +10 -4
- package/bundled/review/SKILL.md +44 -9
- package/bundled/review/references/persistence.md +3 -4
- package/chunks/{MaxSizedBox-YRUOD55W.js → MaxSizedBox-P2GHN5YV.js} +33 -31
- package/chunks/{StandaloneSessionPicker-IIVDYLNQ.js → StandaloneSessionPicker-PEMEEZ3Z.js} +50 -48
- package/chunks/{acp-subagent-executor-5U2LT2ZS.js → acp-subagent-executor-OGMA6OLJ.js} +35 -33
- package/chunks/{acpAgent-GQCJ4KZY.js → acpAgent-A53IIIQE.js} +123 -97
- package/chunks/{agent-ZD5N6BSU.js → agent-JMMW45UJ.js} +18 -16
- package/chunks/{agent-headless-ZYDEB4YW.js → agent-headless-KPCHNPFD.js} +18 -16
- package/chunks/{anthropicContentGenerator-JOZNOMSX.js → anthropicContentGenerator-RDVBAABV.js} +3 -3
- package/chunks/{askUserQuestion-2NU6CXK2.js → askUserQuestion-V4OFZD5D.js} +1 -1
- package/chunks/{bridge-6BVTQBUK.js → bridge-TQHMDUPJ.js} +35 -33
- package/chunks/{channel-management-service-YN4A3BJ6.js → channel-management-service-Q2B7WUPL.js} +27 -10
- package/chunks/{channel-settings-store-GKXGAWDF.js → channel-settings-store-FKBBCMS2.js} +42 -40
- package/chunks/{channel-worker-group-AKPVHRUO.js → channel-worker-group-QNX4OIMZ.js} +5 -5
- package/chunks/{channel-worker-manager-TDAQSKWX.js → channel-worker-manager-IJCPV4WY.js} +24 -5
- package/chunks/{channel-worker-supervisor-PUMSN4J2.js → channel-worker-supervisor-ENJ2AE2N.js} +4 -4
- package/chunks/{chunk-GHJRFVPF.js → chunk-22JENOQB.js} +5 -4
- package/chunks/{chunk-4EQCVDVE.js → chunk-2FS4T477.js} +8 -8
- package/chunks/{chunk-CN6WQ2RW.js → chunk-2J2ZQVLC.js} +64 -2
- package/chunks/{chunk-ADPNUPK3.js → chunk-2JY2LCUU.js} +1 -1
- package/chunks/{chunk-CDPBJGOO.js → chunk-2SUKF4JL.js} +6 -6
- package/chunks/{chunk-KYFJLESB.js → chunk-3KDV7ZQJ.js} +38 -38
- package/chunks/{chunk-TOKDUK22.js → chunk-3S7UTGDX.js} +4 -4
- package/chunks/{chunk-2B2U26TT.js → chunk-3VJVCB2E.js} +4 -4
- package/chunks/{chunk-N4VKU36J.js → chunk-465XOJLQ.js} +1 -1
- package/chunks/{chunk-U2BS2NNZ.js → chunk-4UGMA2PY.js} +11 -89
- package/chunks/{chunk-MVC4XLNM.js → chunk-53IRNMPU.js} +118 -5
- package/chunks/{chunk-VGLXXHTF.js → chunk-5BLOZPTW.js} +1 -1
- package/chunks/{chunk-32MV4KJS.js → chunk-5Q7BILXI.js} +32 -9
- package/chunks/{chunk-DPEB6S2R.js → chunk-5QEJKW7V.js} +3522 -3070
- package/chunks/{chunk-NBWGGZY2.js → chunk-6MYJD4ZS.js} +13 -19
- package/chunks/{chunk-TBJBJDC3.js → chunk-75AREKQ5.js} +1 -1
- package/chunks/{chunk-P5OXAI4R.js → chunk-7ELTXG6G.js} +6 -6
- package/chunks/{chunk-GGUOO2XC.js → chunk-7RCAMBLN.js} +1 -1
- package/chunks/{chunk-72PBMHN5.js → chunk-ACUMQNP3.js} +35 -18
- package/chunks/{chunk-I46MJUYS.js → chunk-AT4FRIF6.js} +1 -1
- package/chunks/{chunk-CK5HUN74.js → chunk-BAV7Z5KE.js} +527 -135
- package/chunks/{chunk-LYEINKJD.js → chunk-BCW42UYG.js} +16 -12
- package/chunks/{chunk-N3HID7XO.js → chunk-BN3JSE4B.js} +7 -7
- package/chunks/{chunk-6VYKKLTW.js → chunk-BUMI6PRL.js} +5 -5
- package/chunks/{chunk-DKXSLDQN.js → chunk-C6TGSAYO.js} +4 -4
- package/chunks/{chunk-42HJVUP3.js → chunk-CD7AASGR.js} +1 -1
- package/chunks/{chunk-TS4Y2MHO.js → chunk-CGREZDGO.js} +1 -1
- package/chunks/chunk-CLNDQINM.js +523 -0
- package/chunks/{chunk-LNUQA3OE.js → chunk-CVRZNFXO.js} +1 -1
- package/chunks/{chunk-YWZOEHBT.js → chunk-DE2WI7RU.js} +192 -62
- package/chunks/{chunk-OD6ZS4US.js → chunk-DN7TVNHS.js} +1 -1
- package/chunks/{chunk-SAP35BR2.js → chunk-DNUSU3MC.js} +1 -1
- package/chunks/{chunk-WXCSKU3W.js → chunk-DV3DHBN6.js} +3 -3
- package/chunks/{chunk-RIQQLEYE.js → chunk-DVQCM4OJ.js} +1 -1
- package/chunks/{chunk-UNN4M5Z7.js → chunk-DY44AVOC.js} +1 -1
- package/chunks/{chunk-QZGPSTNK.js → chunk-EB3IUZV4.js} +3 -3
- package/chunks/{chunk-TZOI5TKT.js → chunk-EEXUIATI.js} +2 -2
- package/chunks/chunk-EMGHODF7.js +56 -0
- package/chunks/{chunk-3KD5I3G5.js → chunk-EMMJKUYQ.js} +3 -3
- package/chunks/{chunk-LW7WW3Z5.js → chunk-ERGQUKZ2.js} +1 -1
- package/chunks/{chunk-N25B6FZN.js → chunk-EYCDA5MN.js} +2 -0
- package/chunks/{chunk-H5I6FURC.js → chunk-F3ADPR3A.js} +20 -20
- package/chunks/{chunk-GNTHJTS2.js → chunk-F4WSLDSL.js} +1 -1
- package/chunks/{chunk-TX5DMDUG.js → chunk-FAXPWBVN.js} +1 -1
- package/chunks/{chunk-X2R47SFR.js → chunk-FLVPNMCS.js} +1 -1
- package/chunks/{chunk-2WXS6WNU.js → chunk-FQT6ZHKU.js} +17 -11
- package/chunks/{chunk-DXXCNZW4.js → chunk-GDOTFZKX.js} +7 -7
- package/chunks/{chunk-GZKSQ222.js → chunk-GI3G24M2.js} +6 -6
- package/chunks/{chunk-KY4HZXLV.js → chunk-GLPNIOEV.js} +33 -2
- package/chunks/{chunk-UBBHH6V4.js → chunk-GOIJGGKX.js} +7 -7
- package/chunks/{chunk-6PRSQUPJ.js → chunk-GQZZGEMS.js} +1 -1
- package/chunks/{chunk-5SLIP7KC.js → chunk-GSR2VAE6.js} +10 -10
- package/chunks/{chunk-4QYFUIEV.js → chunk-GT3ISCLZ.js} +45 -31
- package/chunks/{chunk-HH7R6RLK.js → chunk-GTQ35GRO.js} +1 -1
- package/chunks/{chunk-6IGW6HIV.js → chunk-GXLCL2SC.js} +1 -1
- package/chunks/{chunk-5OEY6RVW.js → chunk-HIX5TSC5.js} +4 -4
- package/chunks/{chunk-QROZDIMB.js → chunk-HJUAP436.js} +2 -2
- package/chunks/{chunk-K22NDLL4.js → chunk-HQTMH3GI.js} +3 -3
- package/chunks/{chunk-62DRQAZM.js → chunk-HXNXTDZQ.js} +1 -1
- package/chunks/{chunk-5A5VS7QC.js → chunk-I2TYEHKM.js} +2 -2
- package/chunks/{chunk-4VSTV4C2.js → chunk-IH22ZGZI.js} +53 -2
- package/chunks/{chunk-F7ZEBIEN.js → chunk-IJYQAXUO.js} +4 -4
- package/chunks/{chunk-2QLTKHIH.js → chunk-IS43JHQK.js} +1 -1
- package/chunks/{chunk-HS5OZTQF.js → chunk-J2FLXQJM.js} +1 -1
- package/chunks/{chunk-L4N5IWLI.js → chunk-J4DEZKGQ.js} +1 -1
- package/chunks/{chunk-TYMHGPN6.js → chunk-JIT2CBTI.js} +1 -1
- package/chunks/{chunk-D2H63VR2.js → chunk-JYOYZTGR.js} +4 -4
- package/chunks/{chunk-DBEN5QEB.js → chunk-K3NURH33.js} +3 -3
- package/chunks/{chunk-VTNSZQOF.js → chunk-K7WPYXOF.js} +2 -2
- package/chunks/{chunk-JE3J5HFM.js → chunk-KAOHUUM7.js} +62 -251
- package/chunks/{chunk-5NZED4YR.js → chunk-KC7DLSY7.js} +1 -1
- package/chunks/{chunk-U6BUJ2ZJ.js → chunk-KMBELEHL.js} +1 -1
- package/chunks/{chunk-BNPJT34T.js → chunk-KXKRYU57.js} +4 -4
- package/chunks/{chunk-MAY3R2RG.js → chunk-KZD6ZVFD.js} +1 -1
- package/chunks/{chunk-QKXZOHHQ.js → chunk-LDURD6EP.js} +15 -62
- package/chunks/{chunk-4JCRSCRO.js → chunk-LJ6YZBD6.js} +1 -1
- package/chunks/{chunk-VOHPPFJI.js → chunk-MHAVM3RF.js} +1 -1
- package/chunks/{chunk-MVLIEY6W.js → chunk-NFRX3HKQ.js} +3 -3
- package/chunks/{chunk-47C3HPMW.js → chunk-O5YL6KSX.js} +47 -18
- package/chunks/{chunk-K5NFICAO.js → chunk-ONIJYCSH.js} +3 -3
- package/chunks/{chunk-CIS4SY3R.js → chunk-PPBZHGEQ.js} +3 -3
- package/chunks/{chunk-PB7JBAHF.js → chunk-PVBIEIVZ.js} +0 -1
- package/chunks/{chunk-6N2PJAZG.js → chunk-PX2ZOOGQ.js} +1 -1
- package/chunks/{chunk-NNN2PKPV.js → chunk-PYYPSK6Q.js} +36 -495
- package/chunks/chunk-Q4FJVWI4.js +78 -0
- package/chunks/{chunk-PA4HU5IQ.js → chunk-QATPE3SN.js} +13 -7
- package/chunks/{chunk-HS2VQRHZ.js → chunk-QOBSJV7J.js} +3 -3
- package/chunks/{chunk-6NA357SF.js → chunk-QTNSMJKU.js} +1 -1
- package/chunks/{chunk-H4ET3HHT.js → chunk-QXCBFLYD.js} +1 -1
- package/chunks/{chunk-ZLGYH2QW.js → chunk-QZG34NFD.js} +3 -3
- package/chunks/{chunk-ZX6EZ7EH.js → chunk-RBE3WRSN.js} +3 -3
- package/chunks/{chunk-H4W6TJFJ.js → chunk-RONRTFAQ.js} +1 -1
- package/chunks/{chunk-STUJ7IMZ.js → chunk-SI7XKACY.js} +56 -56
- package/chunks/{chunk-WH7PDTZL.js → chunk-SJ2JVXQY.js} +8830 -7908
- package/chunks/{chunk-RFD37KE2.js → chunk-SMEUKYCR.js} +1 -1
- package/chunks/{chunk-OQMLQJEX.js → chunk-TENLV7C6.js} +5 -5
- package/chunks/{chunk-SNMYJZZG.js → chunk-TKEDWZ44.js} +5 -5
- package/chunks/{chunk-NXZD3VNX.js → chunk-TL7DSR47.js} +1 -1
- package/chunks/{chunk-J5C5SQQJ.js → chunk-TTHRVIPY.js} +62 -7
- package/chunks/{chunk-YIHOHHJL.js → chunk-TZHXHWEW.js} +1 -1
- package/chunks/{chunk-BTEPFM7T.js → chunk-UBL3PRRZ.js} +3 -3
- package/chunks/{chunk-XWCLIEJ2.js → chunk-UDXFQTUI.js} +2 -2
- package/chunks/{chunk-Z4RLAAF3.js → chunk-UO7RMX3D.js} +3 -3
- package/chunks/{chunk-A5QPMBRL.js → chunk-USEHQ5O2.js} +1 -1
- package/chunks/{chunk-NIB5MPTB.js → chunk-UYCJVDPK.js} +1 -1
- package/chunks/{chunk-52YR7XBE.js → chunk-VFE7QIOE.js} +20 -20
- package/chunks/{chunk-7WVZQVYU.js → chunk-VFYAQLSV.js} +2 -2
- package/chunks/{chunk-VPALWDQL.js → chunk-VUIH3BQL.js} +31 -12
- package/chunks/{chunk-LCTSR5TZ.js → chunk-W7TLK2JE.js} +2 -2
- package/chunks/{chunk-2VS5EEXU.js → chunk-WFHS3WCK.js} +136 -9
- package/chunks/{chunk-REFGAEP6.js → chunk-WNBI4ZWD.js} +2 -2
- package/chunks/{chunk-5NFAKADR.js → chunk-WZCVB2ER.js} +1 -36
- package/chunks/{chunk-B3BOQ562.js → chunk-XBIOF5ZN.js} +5 -5
- package/chunks/{chunk-E2FFBBLC.js → chunk-XQ4ALB6S.js} +2 -2
- package/chunks/{chunk-7I63HEBQ.js → chunk-YCWU2MD3.js} +3 -3
- package/chunks/{chunk-ODAWVZRE.js → chunk-YHGIEYIF.js} +25 -23
- package/chunks/{chunk-DYLGEL4Y.js → chunk-YID5BOAE.js} +6 -1
- package/chunks/{chunk-ILXHAHOV.js → chunk-YPY4FZDT.js} +5 -5
- package/chunks/{chunk-JVKG7KDB.js → chunk-YQYJ2SGK.js} +3 -3
- package/chunks/{chunk-73BAOEMB.js → chunk-ZG7MLW6R.js} +1 -1
- package/chunks/{chunk-IFWXQC7B.js → chunk-ZKZTUR7U.js} +1 -1
- package/chunks/{codex-subagent-executor-VSB4XPDB.js → codex-subagent-executor-3DP5XYNE.js} +35 -33
- package/chunks/{config-utils-DDUKVYVI.js → config-utils-GLX7SJ6O.js} +38 -34
- package/chunks/{contextCommand-GOW5PPVJ.js → contextCommand-DGFYOWR5.js} +33 -31
- package/chunks/{core-runtime-RP5WAAAJ.js → core-runtime-2LYDGU5V.js} +32 -30
- package/chunks/{create-sub-session-JTEIPMTJ.js → create-sub-session-35UOGHD7.js} +33 -31
- package/chunks/{daemon-Y6AOK7LF.js → daemon-D4OAVQKB.js} +1 -1
- package/chunks/{daemon-git-worktree-guard-W5I6GKLX.js → daemon-git-worktree-guard-3ITNVX66.js} +32 -30
- package/chunks/{daemon-status-provider-PJDKC6U5.js → daemon-status-provider-LBY4YRSJ.js} +40 -38
- package/chunks/{daemon-trust-policy-VXNR5PJS.js → daemon-trust-policy-ZNFE2I42.js} +38 -36
- package/chunks/{daemon-trust-policy-monitor-VKUSL32L.js → daemon-trust-policy-monitor-IUMXEDZO.js} +38 -36
- package/chunks/{deferred-core-runtime-PCWM2NAR.js → deferred-core-runtime-DJBM4M2A.js} +32 -30
- package/chunks/{dist-54LGNLWW.js → dist-3M75XY4G.js} +1 -1
- package/chunks/{dist-YZBMQPNS.js → dist-6U5NQYA7.js} +5 -5
- package/chunks/{dist-FVMLRUVM.js → dist-AS2RPYOB.js} +1 -1
- package/chunks/{dist-HANHY2MK.js → dist-GFT4GU72.js} +2 -2
- package/chunks/{dist-Y5GP7SWL.js → dist-J7JK3GPY.js} +10 -9
- package/chunks/{dist-O723VE2K.js → dist-JTPRKF5H.js} +30 -27
- package/chunks/{dist-MGZKUISU.js → dist-MOO5VOC5.js} +7 -20
- package/chunks/{dist-IZ66D5A3.js → dist-NJ2L5QKL.js} +1 -1
- package/chunks/{dist-EI2XAB4W.js → dist-YC6LDCKH.js} +22 -28
- package/chunks/{edit-NZLWHALE.js → edit-XOPO64IC.js} +20 -18
- package/chunks/{enter-worktree-J46XVFRS.js → enter-worktree-55OWD4LT.js} +4 -3
- package/chunks/{enterPlanMode-I4IZ27WH.js → enterPlanMode-T3GKYG47.js} +18 -16
- package/chunks/{environment-RF7WL5VP.js → environment-DLKZ42JH.js} +36 -32
- package/chunks/{errors-5F35O3KE.js → errors-UBNSHKPT.js} +34 -32
- package/chunks/{execution-sandbox-settings-HIYVUBII.js → execution-sandbox-settings-3WJ67GX3.js} +3 -1
- package/chunks/{execution-tool-EWS25O7E.js → execution-tool-J6W5JVU2.js} +21 -19
- package/chunks/{execution-worker-UAASM5HN.js → execution-worker-NB7VOXHE.js} +24 -22
- package/chunks/{exit-worktree-BC4SDZCC.js → exit-worktree-MI6N4OUP.js} +4 -3
- package/chunks/{exitPlanMode-HEBWGYVF.js → exitPlanMode-5SU4CL6O.js} +18 -16
- package/chunks/{fast-path-O2LJG7DE.js → fast-path-PMBHIP4A.js} +4 -4
- package/chunks/{fast-path-settings-TQAYWLXR.js → fast-path-settings-VIYSH3SD.js} +2 -2
- package/chunks/{glob-YKXRLC3S.js → glob-PFM2ZX2Q.js} +18 -16
- package/chunks/{goal-tools-QSX7V2QH.js → goal-tools-BFXHBNL3.js} +18 -16
- package/chunks/{handleAutoUpdate-JVVDCWPS.js → handleAutoUpdate-NS4L5IPQ.js} +34 -32
- package/chunks/{i18n-TA4BNBF7.js → i18n-MG7AUI3C.js} +32 -30
- package/chunks/{initializer-ZHOONLTG.js → initializer-2EHWDIL7.js} +38 -36
- package/chunks/{installationInfo-22Q7JVZC.js → installationInfo-IUK6GWUL.js} +32 -30
- package/chunks/{list-5DY27M3G.js → list-FVYHW6UK.js} +41 -39
- package/chunks/{llm-T6YVOAHI.js → llm-CIEL5EA7.js} +85 -74
- package/chunks/{llm-content-generator-7ZKU73HA.js → llm-content-generator-QWJIQRUP.js} +3 -3
- package/chunks/{loadedSettingsAdapter-JFIYHT25.js → loadedSettingsAdapter-GDD23BZ4.js} +38 -36
- package/chunks/{local-execution-environment-6VWOEJYW.js → local-execution-environment-7M6SPJXO.js} +24 -22
- package/chunks/{loggingContentGenerator-DIC5SOXG.js → loggingContentGenerator-MGVME2MV.js} +20 -18
- package/chunks/{managed-npm-update-5TDNQ2XJ.js → managed-npm-update-F3EMYFJE.js} +32 -30
- package/chunks/managed-runtime-attestation-worker-G23AEEMF.js +367 -0
- package/chunks/{mcp-7ZE6BR36.js → mcp-2LXAQFBW.js} +38 -36
- package/chunks/{model-call-collection-W2WDYVH7.js → model-call-collection-JLUMVNCT.js} +1 -1
- package/chunks/{model-configuration-WUA7G4GY.js → model-configuration-GUR32M76.js} +38 -36
- package/chunks/{modelConfigUtils-CSAC36WP.js → modelConfigUtils-Y3UZ7DR5.js} +33 -31
- package/chunks/{monitor-XCEGKLFN.js → monitor-DOSUZV4I.js} +18 -16
- package/chunks/{nonInteractiveCli-L7ON6MBN.js → nonInteractiveCli-F7YPIV3H.js} +74 -73
- package/chunks/{nonInteractiveToolExecutor-KLKO6IKA.js → nonInteractiveToolExecutor-WO2RE5HY.js} +19 -17
- package/chunks/{notebook-edit-QCYO2MGD.js → notebook-edit-CUHNYHP5.js} +19 -17
- package/chunks/{omni-QWKKNBSE.js → omni-PYA4ZCID.js} +10 -7
- package/chunks/{openaiContentGenerator-PFU4NAXB.js → openaiContentGenerator-GS2ORQMQ.js} +12 -10
- package/chunks/{openaiResponsesContentGenerator-MBZKLYFV.js → openaiResponsesContentGenerator-62YOYDIA.js} +5 -5
- package/chunks/{pidfile-Y6JFLZSG.js → pidfile-DEYAILAH.js} +32 -30
- package/chunks/{processUtils-WGMBDDAF.js → processUtils-E3CERUVZ.js} +2 -2
- package/chunks/{prompt-terminal-ledger-DKFZL5ZJ.js → prompt-terminal-ledger-YRZHHREO.js} +33 -31
- package/chunks/{qwenContentGenerator-Q6QY4LGK.js → qwenContentGenerator-2C3J7HYV.js} +21 -19
- package/chunks/{reactive-degrade-V2VC7H7O.js → reactive-degrade-GDNBQBBY.js} +6 -6
- package/chunks/{read-file-NFZY7N2C.js → read-file-ITAQTQHJ.js} +6 -3
- package/chunks/{record-artifact-K4XSMW4X.js → record-artifact-XP3X7RE5.js} +3 -2
- package/chunks/{record-source-XZCI3IGU.js → record-source-2VBLKVIE.js} +2 -2
- package/chunks/{report-findings-MCGXBQFX.js → report-findings-D2QUYUOG.js} +4 -3
- package/chunks/{request-shutdown-TT62PREA.js → request-shutdown-R5SA5GE3.js} +1 -1
- package/chunks/{resumeHistoryUtils-HPFUAULU.js → resumeHistoryUtils-L2UNUBSP.js} +35 -33
- package/chunks/{ripGrep-PNFY7H5A.js → ripGrep-EAASDYG3.js} +8 -5
- package/chunks/{run-qwen-serve-LHARMZ7C.js → run-qwen-serve-LN76E4VH.js} +278 -79
- package/chunks/{runtime-R3ECTRPN.js → runtime-UL6DZYHW.js} +43 -41
- package/chunks/{sandboxConfig-LQ2JAICC.js → sandboxConfig-2N3BXDJA.js} +34 -32
- package/chunks/{scheduled-tasks-SHRO5IGN.js → scheduled-tasks-DGIGRBYW.js} +38 -36
- package/chunks/{scheduler-SDVHFPG4.js → scheduler-BCHAOQWV.js} +34 -32
- package/chunks/{send-message-3UM7XRTB.js → send-message-FBU6WDID.js} +1 -1
- package/chunks/{serve-ZIDUQEXD.js → serve-CZZHMYCY.js} +38 -36
- package/chunks/{server-5R5R5J4B.js → server-DV6PIMPW.js} +1789 -375
- package/chunks/{session-JP4CDING.js → session-PFPIIM3N.js} +75 -74
- package/chunks/{session-attachments-root-UMG3UM6R.js → session-attachments-root-ALF36B7T.js} +32 -30
- package/chunks/{session-pr-refresh-VCZDCDQF.js → session-pr-refresh-E4DAPHGT.js} +37 -35
- package/chunks/{settings-ARQIF4FZ.js → settings-YRMNIP6J.js} +37 -35
- package/chunks/{shell-EM2EW5GF.js → shell-UMZ5J6UJ.js} +18 -16
- package/chunks/{skill-ARBE3YO6.js → skill-WQBDICQA.js} +52 -13
- package/chunks/{skill-settings-XUKYH6QL.js → skill-settings-W4OLDKUA.js} +38 -36
- package/chunks/{spawnChannel-OUG6AG5B.js → spawnChannel-EAFCNPOA.js} +34 -32
- package/chunks/{standalone-update-ITTOS33Q.js → standalone-update-D7JQ27GQ.js} +33 -31
- package/chunks/{start-opentui-ui-HPBFC62Q.js → start-opentui-ui-43ATEBO2.js} +87 -86
- package/chunks/{startInteractiveUI-PJDI6SSE.js → startInteractiveUI-HJLPYP6N.js} +1040 -969
- package/chunks/{task-create-PEI7AJLE.js → task-create-PVF66J3R.js} +2 -2
- package/chunks/{task-update-MQZRWBGK.js → task-update-RSIITTOK.js} +2 -2
- package/chunks/{team-create-TBFNDDRY.js → team-create-QKZREJRV.js} +18 -16
- package/chunks/{team-plan-approval-57CJ2K3A.js → team-plan-approval-BU4HTFUI.js} +18 -16
- package/chunks/{terminal-image-renderer-QQ4343Q3.js → terminal-image-renderer-7KWVCSJU.js} +32 -30
- package/chunks/{theme-manager-CNGZ6T4K.js → theme-manager-I4S4TGZV.js} +32 -30
- package/chunks/{tool-call-PLSQ34VE.js → tool-call-DUHP6UXC.js} +2 -2
- package/chunks/{tool-result-media-R2EWIHTZ.js → tool-result-media-R2JNWHDG.js} +10 -7
- package/chunks/{tool-search-WPQALMLE.js → tool-search-4LU3SWMU.js} +7 -4
- package/chunks/{total-session-admission-MXIAY76R.js → total-session-admission-AIC2VP5H.js} +35 -33
- package/chunks/{trustedFolders-ZQQ2ETMA.js → trustedFolders-WVBPJOAW.js} +33 -31
- package/chunks/{update-relaunch-XVIHEJCH.js → update-relaunch-SON2QA6T.js} +5 -5
- package/chunks/{updateCheck-YQBGCMNZ.js → updateCheck-THHMK6IX.js} +32 -30
- package/chunks/{upload-config-UW6QN3CL.js → upload-config-VPUAXWRX.js} +4 -4
- package/chunks/{useAutoAcceptIndicator-GKQRK7OB.js → useAutoAcceptIndicator-LTUZXFZC.js} +41 -39
- package/chunks/{validateNonInterActiveAuth-JJTHAV5P.js → validateNonInterActiveAuth-KUNH2FOL.js} +72 -71
- package/chunks/{version-MZOCP6O7.js → version-GMDVWXUG.js} +1 -1
- package/chunks/{web-fetch-NX5NKVE3.js → web-fetch-MM4TA6NJ.js} +13 -9
- package/chunks/{web-search-VLFIKS3K.js → web-search-IAWACMBT.js} +4 -4
- package/chunks/{web-shell-static-GI6FVIMI.js → web-shell-static-E3O6NW7Y.js} +4 -3
- package/chunks/{workflow-EGMC2K5T.js → workflow-5MTBNIH6.js} +22 -20
- package/chunks/{workspace-providers-status-KPBNO6UE.js → workspace-providers-status-5M3UOWCJ.js} +43 -41
- package/chunks/{workspace-registration-store-WWCOY7D7.js → workspace-registration-store-MXY4VBW4.js} +1 -1
- package/chunks/{workspace-registry-LAS7KJOK.js → workspace-registry-KTTGYUOC.js} +35 -33
- package/chunks/{workspace-runtime-coordinator-7VEYHXEU.js → workspace-runtime-coordinator-V6MBZQVT.js} +36 -34
- package/chunks/{workspace-service-OUE5MDOT.js → workspace-service-UMQUHB32.js} +40 -38
- package/chunks/{workspace-skills-status-OHGY3ENO.js → workspace-skills-status-F7IWMYNU.js} +41 -39
- package/chunks/{workspace-trust-reconciler-E766QSRS.js → workspace-trust-reconciler-MDLI73QF.js} +41 -39
- package/chunks/{write-file-ZLRRA4ZT.js → write-file-LHOV3BL3.js} +21 -19
- package/chunks/{zoom-image-EX3C2PMJ.js → zoom-image-VTPGT3GB.js} +10 -6
- package/cli-entry.js +13 -0
- package/cli.js +24 -12
- package/execution-worker.js +1 -1
- package/export-transcript-document.css +1 -1
- package/export-transcript-document.js +104 -104
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-Dbkc1x4g.js → abnfDiagram-VCTEODGH-BIzY5prP.js} +1 -1
- package/web-shell/assets/{arc-BCuaHw2a.js → arc-DTPoYgqM.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-CYnlVHx4.js → architectureDiagram-5GKGNRK7-DMRFm81i.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-fvsmUmR-.js → blockDiagram-NRAW4CY4-TcNGiiEi.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BAjnpe2_.js → c4Diagram-UCG6FXSJ-CsSMrmkn.js} +1 -1
- package/web-shell/assets/channel-CX6nRLY5.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-B92_XH72.js → chunk-2Q5K7J3B-DLUS2OKz.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-nFcltF2f.js → chunk-5VM5RSS4-Dj3neojq.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-DuQ75APu.js → chunk-F27PBJKO-DKTGRC_7.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-CmXIQ06U.js → chunk-G27WJ6UU-Bhhhl7xI.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-pplos71B.js → chunk-JWPE2WC7-7AfyvpFL.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-BHK6p5jT.js → chunk-LCL6LL3I-C50Eay3L.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Bw6egCVb.js → chunk-POPQ4Y6H-CRBPbOWe.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-BKSUyFl-.js → chunk-SVP7TREG-Ctr7vVt3.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-DBK4vu_O.js → chunk-XXDRQBXY-B4ExJpUK.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DvX73GRE.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DvX73GRE.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-D8AjDuhC.js → cose-bilkent-JH36ORCC-Cllr81g5.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-F6ziGG13.js → cynefin-OW5HDTMX-dbFc7Jqn.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-1GrUeu9I.js → cynefinDiagram-5FMLGOSQ-CHqViWsG.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-CUMduMoA.js → dagre-3AP2YEHR-DVHuD-Ma.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-B0LbPx0Y.js → diagram-S7CK7UJ4-B6P5dSD8.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-Vl7zFXEJ.js → diagram-UQ7AKVKN-BPdvjv7b.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-C4khzWQM.js → diagram-VSXAHHWV-Cf3wqtZb.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-PqprIzeP.js → diagram-VX7I27RA-iT7vh4BN.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-CbGTxGOI.js → diagram-Z3DM3KII-CBq-pKMo.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-CigwMsaO.js → ebnfDiagram-PWID7BFC-CWo8D0_l.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-L4s33GGv.js → erDiagram-SSCWMZ5O-BdcX9VXM.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-D7mgIH88.js → flowDiagram-A5DVABFB-D2uR47D0.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-D0YhclTy.js → ganttDiagram-EL5Y4UJY-Du1Q-imH.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Bwf59IHb.js → gitGraphDiagram-WWUBYQGX-ZytI2J6R.js} +1 -1
- package/web-shell/assets/{index-CJ63h8ay.js → index-B5zIMd3G.js} +1 -1
- package/web-shell/assets/index-DuwfO01z.css +36 -0
- package/web-shell/assets/index-t2okSTsk.js +2407 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-T0Ewe5gl.js → infoDiagram-RXCK75RN-DeZwQFlp.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-BIdQGz1A.js → ishikawaDiagram-5VMMS53U-pDgu1jeK.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-BNxIYRys.js → journeyDiagram-EYS64GPL-ZCvpl8hA.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-DCSrG78S.js → kanban-definition-3QL26DDD-C9qY0GRv.js} +1 -1
- package/web-shell/assets/{layout-Br6mhJlI.js → layout-BixptjLn.js} +1 -1
- package/web-shell/assets/{linear-DCb_qQM9.js → linear-DjkqGiAW.js} +1 -1
- package/web-shell/assets/{mermaid.core-U7MUxrwT.js → mermaid.core-BSX0Vr31.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-B-E16G7A.js → mindmap-definition-FBJOCRG2-CBrjZekm.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DprVaT2C.js → pegDiagram-XKGWAZYB-DQIDACM3.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BpWhdw8B.js → pieDiagram-E7YTZNPT-CjeBecJ1.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-B_rgquel.js → quadrantDiagram-AXDQQJYC-s_fyH42A.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-tn5q9Df1.js → railroadDiagram-O6MQD6OU-CruAGcMa.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-DcXXYQ7a.js → requirementDiagram-EFPCY7ZU-CTBv3FSX.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-XFCBKj8s.js → sankeyDiagram-P5KCCOFB-CjFlz0KT.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-C9HOvsOz.js → sequenceDiagram-WJ2MYXX4-DRNDmQQw.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-BF4RFDcQ.js → sizeCapture-X5ZJPWSS-BvBdgQsw.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-CFvvXZXi.js → stateDiagram-HBIQ2CUA-D1dJtfN0.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DXVOtEux.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-BeHFLDui.js → swimlanes-XN3QIQJK-QylCxvYC.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BqCkfjdF.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-D563SQiU.js → timeline-definition-24CTP7MA-Cw56FtZw.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BmVC7Jer.js → vennDiagram-4TSXK5OY-DyA0dekR.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-Dlzz2LC2.js → wardleyDiagram-VM6X3IG4-CoAgxg4O.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-CiOybQQL.js → xychartDiagram-S5SC5T6Z-kH3Md0xm.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/sw.js +1 -1
- package/bundled/computer-use/references/macos.md +0 -208
- package/bundled/computer-use/references/windows-linux.md +0 -247
- package/web-shell/assets/channel-BzQAUXQG.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-D8E4B_In.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-D8E4B_In.js +0 -1
- package/web-shell/assets/index-C0YFCwlu.js +0 -2337
- package/web-shell/assets/index-mr0Sw0G-.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-1C9qvD3x.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-H_KJGVAj.js +0 -8
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
init_esbuild_shims
|
|
5
|
+
} from "./chunk-5O2XNYP6.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
9
|
+
|
|
10
|
+
// packages/core/src/utils/binary-content.ts
|
|
11
|
+
init_esbuild_shims();
|
|
12
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
13
|
+
import * as path from "node:path";
|
|
14
|
+
var BINARY_APPLICATION_TYPES = /* @__PURE__ */ new Set([
|
|
15
|
+
"application/pdf",
|
|
16
|
+
"application/zip",
|
|
17
|
+
"application/gzip",
|
|
18
|
+
"application/x-gzip",
|
|
19
|
+
"application/octet-stream",
|
|
20
|
+
"application/msword",
|
|
21
|
+
"application/vnd.ms-excel",
|
|
22
|
+
"application/vnd.ms-powerpoint",
|
|
23
|
+
"application/x-tar",
|
|
24
|
+
"application/x-7z-compressed",
|
|
25
|
+
"application/x-rar-compressed",
|
|
26
|
+
"application/vnd.rar",
|
|
27
|
+
"application/wasm",
|
|
28
|
+
"application/java-archive"
|
|
29
|
+
]);
|
|
30
|
+
function isBinaryContentType(contentType) {
|
|
31
|
+
if (!contentType) return false;
|
|
32
|
+
const mt = (contentType.split(";")[0] ?? "").trim().toLowerCase();
|
|
33
|
+
if (mt.startsWith("text/")) return false;
|
|
34
|
+
if (mt.endsWith("+json") || mt.endsWith("+xml")) return false;
|
|
35
|
+
if (mt.startsWith("image/") || mt.startsWith("audio/") || mt.startsWith("video/") || mt.startsWith("font/")) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (BINARY_APPLICATION_TYPES.has(mt)) return true;
|
|
39
|
+
if (mt.startsWith("application/vnd.openxmlformats")) return true;
|
|
40
|
+
if (mt.startsWith("application/vnd.oasis.opendocument")) return true;
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
__name(isBinaryContentType, "isBinaryContentType");
|
|
44
|
+
var MIME_EXTENSIONS = /* @__PURE__ */ new Map([
|
|
45
|
+
["application/pdf", "pdf"],
|
|
46
|
+
["application/zip", "zip"],
|
|
47
|
+
[
|
|
48
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
49
|
+
"docx"
|
|
50
|
+
],
|
|
51
|
+
["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"],
|
|
52
|
+
[
|
|
53
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
54
|
+
"pptx"
|
|
55
|
+
],
|
|
56
|
+
["application/msword", "doc"],
|
|
57
|
+
["application/vnd.ms-excel", "xls"],
|
|
58
|
+
["application/vnd.ms-powerpoint", "ppt"],
|
|
59
|
+
["application/gzip", "gz"],
|
|
60
|
+
["application/x-gzip", "gz"],
|
|
61
|
+
["application/x-tar", "tar"],
|
|
62
|
+
["application/x-7z-compressed", "7z"],
|
|
63
|
+
["application/x-rar-compressed", "rar"],
|
|
64
|
+
["application/vnd.rar", "rar"],
|
|
65
|
+
["application/wasm", "wasm"],
|
|
66
|
+
["application/java-archive", "jar"],
|
|
67
|
+
["audio/mpeg", "mp3"],
|
|
68
|
+
["audio/wav", "wav"],
|
|
69
|
+
["audio/ogg", "ogg"],
|
|
70
|
+
["video/mp4", "mp4"],
|
|
71
|
+
["video/webm", "webm"],
|
|
72
|
+
["image/png", "png"],
|
|
73
|
+
["image/jpeg", "jpg"],
|
|
74
|
+
["image/gif", "gif"],
|
|
75
|
+
["image/webp", "webp"],
|
|
76
|
+
["image/svg+xml", "svg"]
|
|
77
|
+
]);
|
|
78
|
+
function extensionForMimeType(mimeType) {
|
|
79
|
+
if (!mimeType) return "bin";
|
|
80
|
+
const mt = (mimeType.split(";")[0] ?? "").trim().toLowerCase();
|
|
81
|
+
return MIME_EXTENSIONS.get(mt) ?? "bin";
|
|
82
|
+
}
|
|
83
|
+
__name(extensionForMimeType, "extensionForMimeType");
|
|
84
|
+
var KNOWN_EXTENSIONS = /* @__PURE__ */ new Set([...MIME_EXTENSIONS.values(), "jpeg", "bin"]);
|
|
85
|
+
function extensionFromFilename(name) {
|
|
86
|
+
if (!name) return void 0;
|
|
87
|
+
const ext = name.split(".").pop()?.trim().toLowerCase();
|
|
88
|
+
return ext && ext !== name && KNOWN_EXTENSIONS.has(ext) ? ext : void 0;
|
|
89
|
+
}
|
|
90
|
+
__name(extensionFromFilename, "extensionFromFilename");
|
|
91
|
+
function filenameFromContentDisposition(contentDisposition) {
|
|
92
|
+
const star = /filename\*\s*=\s*[^']*'[^']*'([^;]+)/i.exec(contentDisposition);
|
|
93
|
+
if (star?.[1]) {
|
|
94
|
+
try {
|
|
95
|
+
return decodeURIComponent(star[1].trim());
|
|
96
|
+
} catch {
|
|
97
|
+
return star[1].trim();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const plain = /filename\s*=\s*"?([^";]+)"?/i.exec(contentDisposition);
|
|
101
|
+
return plain?.[1]?.trim();
|
|
102
|
+
}
|
|
103
|
+
__name(filenameFromContentDisposition, "filenameFromContentDisposition");
|
|
104
|
+
function sniffFileKind(bytes, contentType, contentDisposition, url) {
|
|
105
|
+
const dispositionExt = extensionFromFilename(
|
|
106
|
+
filenameFromContentDisposition(contentDisposition)
|
|
107
|
+
);
|
|
108
|
+
let urlExt;
|
|
109
|
+
try {
|
|
110
|
+
urlExt = extensionFromFilename(new URL(url).pathname.split("/").pop());
|
|
111
|
+
} catch {
|
|
112
|
+
urlExt = void 0;
|
|
113
|
+
}
|
|
114
|
+
if (bytes.length >= 5 && bytes.subarray(0, 5).toString("latin1") === "%PDF-") {
|
|
115
|
+
return {
|
|
116
|
+
extension: "pdf",
|
|
117
|
+
mimeType: "application/pdf",
|
|
118
|
+
magicMatched: true,
|
|
119
|
+
extensionSource: "magic"
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (bytes.length >= 4 && bytes[0] === 80 && bytes[1] === 75 && bytes[2] === 3 && bytes[3] === 4) {
|
|
123
|
+
const zipHint = dispositionExt ?? urlExt ?? extensionForMimeType(contentType);
|
|
124
|
+
const refined = zipHint && ["docx", "xlsx", "pptx", "jar"].includes(zipHint) ? zipHint : "zip";
|
|
125
|
+
return {
|
|
126
|
+
extension: refined,
|
|
127
|
+
mimeType: contentType || "application/zip",
|
|
128
|
+
magicMatched: true,
|
|
129
|
+
extensionSource: "magic"
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
if (bytes.length >= 2 && bytes[0] === 31 && bytes[1] === 139) {
|
|
133
|
+
return {
|
|
134
|
+
extension: "gz",
|
|
135
|
+
mimeType: "application/gzip",
|
|
136
|
+
magicMatched: true,
|
|
137
|
+
extensionSource: "magic"
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (bytes.length >= 7 && bytes.subarray(0, 4).toString("latin1") === "Rar!" && bytes[4] === 26 && bytes[5] === 7) {
|
|
141
|
+
return {
|
|
142
|
+
extension: "rar",
|
|
143
|
+
mimeType: "application/vnd.rar",
|
|
144
|
+
magicMatched: true,
|
|
145
|
+
extensionSource: "magic"
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (bytes.length >= 8 && bytes[0] === 137 && bytes.subarray(1, 4).toString("latin1") === "PNG") {
|
|
149
|
+
return {
|
|
150
|
+
extension: "png",
|
|
151
|
+
mimeType: "image/png",
|
|
152
|
+
magicMatched: true,
|
|
153
|
+
extensionSource: "magic"
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (bytes.length >= 3 && bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255) {
|
|
157
|
+
return {
|
|
158
|
+
extension: "jpg",
|
|
159
|
+
mimeType: "image/jpeg",
|
|
160
|
+
magicMatched: true,
|
|
161
|
+
extensionSource: "magic"
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
if (bytes.length >= 4 && bytes.subarray(0, 4).toString("latin1") === "GIF8") {
|
|
165
|
+
return {
|
|
166
|
+
extension: "gif",
|
|
167
|
+
mimeType: "image/gif",
|
|
168
|
+
magicMatched: true,
|
|
169
|
+
extensionSource: "magic"
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (bytes.length >= 12 && bytes.subarray(0, 4).toString("latin1") === "RIFF" && bytes.subarray(8, 12).toString("latin1") === "WEBP") {
|
|
173
|
+
return {
|
|
174
|
+
extension: "webp",
|
|
175
|
+
mimeType: "image/webp",
|
|
176
|
+
magicMatched: true,
|
|
177
|
+
extensionSource: "magic"
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const nameExt = dispositionExt ?? urlExt;
|
|
181
|
+
if (nameExt) {
|
|
182
|
+
return {
|
|
183
|
+
extension: nameExt,
|
|
184
|
+
mimeType: contentType,
|
|
185
|
+
magicMatched: false,
|
|
186
|
+
extensionSource: "name"
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
const mimeExt = extensionForMimeType(contentType);
|
|
190
|
+
return {
|
|
191
|
+
extension: mimeExt,
|
|
192
|
+
mimeType: contentType,
|
|
193
|
+
magicMatched: false,
|
|
194
|
+
extensionSource: mimeExt !== "bin" ? "mime" : "fallback"
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
__name(sniffFileKind, "sniffFileKind");
|
|
198
|
+
function looksLikeText(bytes) {
|
|
199
|
+
const window = bytes.subarray(0, 8192);
|
|
200
|
+
if (window.includes(0)) return false;
|
|
201
|
+
const decoded = new TextDecoder("utf-8").decode(window);
|
|
202
|
+
let bad = 0;
|
|
203
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
204
|
+
if (decoded[i] === "\uFFFD" && ++bad > 2) return false;
|
|
205
|
+
}
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
__name(looksLikeText, "looksLikeText");
|
|
209
|
+
async function persistBinaryContent(bytes, ext, dir, persistId) {
|
|
210
|
+
const filepath = path.join(dir, `${persistId}.${ext}`);
|
|
211
|
+
try {
|
|
212
|
+
await mkdir(dir, { recursive: true, mode: 448 });
|
|
213
|
+
await writeFile(filepath, bytes, { mode: 384 });
|
|
214
|
+
} catch (error) {
|
|
215
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
216
|
+
}
|
|
217
|
+
return { filepath, size: bytes.length, ext };
|
|
218
|
+
}
|
|
219
|
+
__name(persistBinaryContent, "persistBinaryContent");
|
|
220
|
+
function formatByteSize(sizeInBytes) {
|
|
221
|
+
const kb = sizeInBytes / 1024;
|
|
222
|
+
if (kb < 1) return `${sizeInBytes} bytes`;
|
|
223
|
+
const fmt = /* @__PURE__ */ __name((n) => n.toFixed(1).replace(/\.0$/, ""), "fmt");
|
|
224
|
+
if (kb < 1024) return `${fmt(kb)}KB`;
|
|
225
|
+
const mb = kb / 1024;
|
|
226
|
+
if (mb < 1024) return `${fmt(mb)}MB`;
|
|
227
|
+
return `${fmt(mb / 1024)}GB`;
|
|
228
|
+
}
|
|
229
|
+
__name(formatByteSize, "formatByteSize");
|
|
230
|
+
|
|
231
|
+
// packages/core/src/utils/image-view.ts
|
|
232
|
+
init_esbuild_shims();
|
|
233
|
+
import fs from "node:fs/promises";
|
|
234
|
+
var IMAGE_VIEW_MAX_EDGE = 1568;
|
|
235
|
+
var IMAGE_VIEW_MAX_PATCHES = 1568;
|
|
236
|
+
var IMAGE_PATCH_SIZE = 28;
|
|
237
|
+
var IMAGE_MAX_UPSCALE = 8;
|
|
238
|
+
var IMAGE_JPEG_QUALITY = 92;
|
|
239
|
+
var IMAGE_MAX_SOURCE_BYTES = 100 * 1024 * 1024;
|
|
240
|
+
var IMAGE_MAX_OUTPUT_BYTES = 9 * 1024 * 1024;
|
|
241
|
+
var SUPPORTED_IMAGE_FORMATS = /* @__PURE__ */ new Set(["jpeg", "png", "webp"]);
|
|
242
|
+
var SUPPORTED_IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
243
|
+
"image/jpeg",
|
|
244
|
+
"image/png",
|
|
245
|
+
"image/webp"
|
|
246
|
+
]);
|
|
247
|
+
var ImageViewError = class extends Error {
|
|
248
|
+
constructor(code, message) {
|
|
249
|
+
super(message);
|
|
250
|
+
this.code = code;
|
|
251
|
+
}
|
|
252
|
+
static {
|
|
253
|
+
__name(this, "ImageViewError");
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
function orientedSize(metadata) {
|
|
257
|
+
const autoOrient = metadata.autoOrient;
|
|
258
|
+
if (autoOrient) {
|
|
259
|
+
return { width: autoOrient.width, height: autoOrient.height };
|
|
260
|
+
}
|
|
261
|
+
const width = metadata.width ?? 0;
|
|
262
|
+
const height = metadata.height ?? 0;
|
|
263
|
+
const orientation = metadata.orientation ?? 0;
|
|
264
|
+
return orientation >= 5 && orientation <= 8 ? { width: height, height: width } : { width, height };
|
|
265
|
+
}
|
|
266
|
+
__name(orientedSize, "orientedSize");
|
|
267
|
+
function fitsVisualBudget({ width, height }) {
|
|
268
|
+
return width <= IMAGE_VIEW_MAX_EDGE && height <= IMAGE_VIEW_MAX_EDGE && Math.ceil(width / IMAGE_PATCH_SIZE) * Math.ceil(height / IMAGE_PATCH_SIZE) <= IMAGE_VIEW_MAX_PATCHES;
|
|
269
|
+
}
|
|
270
|
+
__name(fitsVisualBudget, "fitsVisualBudget");
|
|
271
|
+
function boundedSize(width, height, maxUpscale) {
|
|
272
|
+
const widthIsLongEdge = width >= height;
|
|
273
|
+
const maxLongEdge = Math.min(
|
|
274
|
+
IMAGE_VIEW_MAX_EDGE,
|
|
275
|
+
Math.max(width, height) * maxUpscale
|
|
276
|
+
);
|
|
277
|
+
let low = 1;
|
|
278
|
+
let high = maxLongEdge;
|
|
279
|
+
let best = { width: 1, height: 1 };
|
|
280
|
+
while (low <= high) {
|
|
281
|
+
const longEdge = Math.floor((low + high) / 2);
|
|
282
|
+
const candidate = widthIsLongEdge ? {
|
|
283
|
+
width: longEdge,
|
|
284
|
+
height: Math.max(1, Math.round(height / width * longEdge))
|
|
285
|
+
} : {
|
|
286
|
+
width: Math.max(1, Math.round(width / height * longEdge)),
|
|
287
|
+
height: longEdge
|
|
288
|
+
};
|
|
289
|
+
if (fitsVisualBudget(candidate)) {
|
|
290
|
+
best = candidate;
|
|
291
|
+
low = longEdge + 1;
|
|
292
|
+
} else {
|
|
293
|
+
high = longEdge - 1;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return best;
|
|
297
|
+
}
|
|
298
|
+
__name(boundedSize, "boundedSize");
|
|
299
|
+
async function loadSharp() {
|
|
300
|
+
let sharp;
|
|
301
|
+
try {
|
|
302
|
+
sharp = (await import("sharp")).default;
|
|
303
|
+
} catch {
|
|
304
|
+
throw new ImageViewError(
|
|
305
|
+
"renderer_unavailable",
|
|
306
|
+
'Image rendering is unavailable because the "sharp" image module could not be loaded.'
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
return sharp;
|
|
310
|
+
}
|
|
311
|
+
__name(loadSharp, "loadSharp");
|
|
312
|
+
async function prepareImage(filePath, signal) {
|
|
313
|
+
signal.throwIfAborted();
|
|
314
|
+
await loadSharp();
|
|
315
|
+
let stats;
|
|
316
|
+
try {
|
|
317
|
+
stats = await fs.stat(filePath);
|
|
318
|
+
} catch (error) {
|
|
319
|
+
if (error.code === "ENOENT") {
|
|
320
|
+
throw new ImageViewError(
|
|
321
|
+
"file_not_found",
|
|
322
|
+
`Image file not found: ${filePath}`
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
throw error;
|
|
326
|
+
}
|
|
327
|
+
if (stats.isDirectory()) {
|
|
328
|
+
throw new ImageViewError(
|
|
329
|
+
"target_is_directory",
|
|
330
|
+
`Image path is a directory: ${filePath}`
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
if (!stats.isFile()) {
|
|
334
|
+
throw new ImageViewError(
|
|
335
|
+
"target_not_regular_file",
|
|
336
|
+
`Image path is not a regular file: ${filePath}`
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
if (stats.size > IMAGE_MAX_SOURCE_BYTES) {
|
|
340
|
+
throw new ImageViewError(
|
|
341
|
+
"source_too_large",
|
|
342
|
+
`Image file exceeds the 100 MB source limit: ${filePath}`
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
return prepareImageBuffer(
|
|
346
|
+
await fs.readFile(filePath, { signal }),
|
|
347
|
+
filePath,
|
|
348
|
+
signal
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
__name(prepareImage, "prepareImage");
|
|
352
|
+
async function prepareImageBuffer(bytes, label, signal) {
|
|
353
|
+
signal.throwIfAborted();
|
|
354
|
+
const sharp = await loadSharp();
|
|
355
|
+
if (bytes.length > IMAGE_MAX_SOURCE_BYTES) {
|
|
356
|
+
throw new ImageViewError(
|
|
357
|
+
"source_too_large",
|
|
358
|
+
`Image exceeds the 100 MB source limit: ${label}`
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
let metadata;
|
|
362
|
+
try {
|
|
363
|
+
metadata = await sharp(bytes, {
|
|
364
|
+
failOn: "error",
|
|
365
|
+
limitInputPixels: true
|
|
366
|
+
}).metadata();
|
|
367
|
+
} catch {
|
|
368
|
+
signal.throwIfAborted();
|
|
369
|
+
throw new ImageViewError(
|
|
370
|
+
"decode_failed",
|
|
371
|
+
`Failed to decode image (may be corrupt or not a static PNG, JPEG, or WebP): ${label}`
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
signal.throwIfAborted();
|
|
375
|
+
if (!SUPPORTED_IMAGE_FORMATS.has(metadata.format)) {
|
|
376
|
+
throw new ImageViewError(
|
|
377
|
+
"unsupported_image",
|
|
378
|
+
`Unsupported image. Expected a static PNG, JPEG, or WebP image: ${label}`
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
if ((metadata.pages ?? 1) > 1) {
|
|
382
|
+
throw new ImageViewError(
|
|
383
|
+
"animated_image",
|
|
384
|
+
`Only static images are supported: ${label}`
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
return { bytes, metadata, sharp };
|
|
388
|
+
}
|
|
389
|
+
__name(prepareImageBuffer, "prepareImageBuffer");
|
|
390
|
+
async function renderImageView(label, prepared, selection, outputSize, signal) {
|
|
391
|
+
const { bytes, metadata, sharp } = prepared;
|
|
392
|
+
const sourceSize = orientedSize(metadata);
|
|
393
|
+
let output;
|
|
394
|
+
try {
|
|
395
|
+
output = await sharp(bytes, {
|
|
396
|
+
failOn: "error",
|
|
397
|
+
limitInputPixels: true
|
|
398
|
+
}).rotate().extract(selection).resize(outputSize.width, outputSize.height, {
|
|
399
|
+
fit: "fill",
|
|
400
|
+
kernel: sharp.kernel.lanczos3
|
|
401
|
+
}).flatten({ background: "#ffffff" }).jpeg({
|
|
402
|
+
quality: IMAGE_JPEG_QUALITY,
|
|
403
|
+
chromaSubsampling: "4:4:4"
|
|
404
|
+
}).toBuffer();
|
|
405
|
+
} catch {
|
|
406
|
+
signal.throwIfAborted();
|
|
407
|
+
throw new ImageViewError(
|
|
408
|
+
"decode_failed",
|
|
409
|
+
`Failed to render image overview: ${label}`
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
signal.throwIfAborted();
|
|
413
|
+
if (output.length > IMAGE_MAX_OUTPUT_BYTES) {
|
|
414
|
+
throw new ImageViewError(
|
|
415
|
+
"output_too_large",
|
|
416
|
+
`Rendered image exceeds the 9 MB output limit: ${label}`
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
bytes: output,
|
|
421
|
+
mimeType: "image/jpeg",
|
|
422
|
+
sourceWidth: sourceSize.width,
|
|
423
|
+
sourceHeight: sourceSize.height,
|
|
424
|
+
selectedWidth: selection.width,
|
|
425
|
+
selectedHeight: selection.height,
|
|
426
|
+
outputWidth: outputSize.width,
|
|
427
|
+
outputHeight: outputSize.height
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
__name(renderImageView, "renderImageView");
|
|
431
|
+
async function renderFullFrameView(label, prepared, signal) {
|
|
432
|
+
const { width: sourceWidth, height: sourceHeight } = orientedSize(
|
|
433
|
+
prepared.metadata
|
|
434
|
+
);
|
|
435
|
+
return renderImageView(
|
|
436
|
+
label,
|
|
437
|
+
prepared,
|
|
438
|
+
{ left: 0, top: 0, width: sourceWidth, height: sourceHeight },
|
|
439
|
+
boundedSize(sourceWidth, sourceHeight, 1),
|
|
440
|
+
signal
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
__name(renderFullFrameView, "renderFullFrameView");
|
|
444
|
+
function sniffBoundableImageMime(header) {
|
|
445
|
+
const kind = sniffFileKind(header, "", "", "");
|
|
446
|
+
return kind.magicMatched && SUPPORTED_IMAGE_MIME_TYPES.has(kind.mimeType) ? kind.mimeType : null;
|
|
447
|
+
}
|
|
448
|
+
__name(sniffBoundableImageMime, "sniffBoundableImageMime");
|
|
449
|
+
async function boundImageBuffer(bytes, label, signal, maxBytes) {
|
|
450
|
+
const prepared = await prepareImageBuffer(bytes, label, signal);
|
|
451
|
+
if (fitsVisualBudget(orientedSize(prepared.metadata)) && (maxBytes === void 0 || prepared.bytes.length <= maxBytes)) {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
return renderFullFrameView(label, prepared, signal);
|
|
455
|
+
}
|
|
456
|
+
__name(boundImageBuffer, "boundImageBuffer");
|
|
457
|
+
async function renderImageOverview(filePath, signal) {
|
|
458
|
+
const prepared = await prepareImage(filePath, signal);
|
|
459
|
+
return renderFullFrameView(filePath, prepared, signal);
|
|
460
|
+
}
|
|
461
|
+
__name(renderImageOverview, "renderImageOverview");
|
|
462
|
+
async function renderNormalizedImageCrop(filePath, region, signal) {
|
|
463
|
+
const prepared = await prepareImage(filePath, signal);
|
|
464
|
+
const { width: sourceWidth, height: sourceHeight } = orientedSize(
|
|
465
|
+
prepared.metadata
|
|
466
|
+
);
|
|
467
|
+
const left = Math.min(
|
|
468
|
+
sourceWidth - 1,
|
|
469
|
+
Math.max(0, Math.floor(region.x1 / 1e3 * sourceWidth))
|
|
470
|
+
);
|
|
471
|
+
const top = Math.min(
|
|
472
|
+
sourceHeight - 1,
|
|
473
|
+
Math.max(0, Math.floor(region.y1 / 1e3 * sourceHeight))
|
|
474
|
+
);
|
|
475
|
+
const right = Math.min(
|
|
476
|
+
sourceWidth,
|
|
477
|
+
Math.max(left + 1, Math.ceil(region.x2 / 1e3 * sourceWidth))
|
|
478
|
+
);
|
|
479
|
+
const bottom = Math.min(
|
|
480
|
+
sourceHeight,
|
|
481
|
+
Math.max(top + 1, Math.ceil(region.y2 / 1e3 * sourceHeight))
|
|
482
|
+
);
|
|
483
|
+
const selectedWidth = right - left;
|
|
484
|
+
const selectedHeight = bottom - top;
|
|
485
|
+
const outputSize = boundedSize(
|
|
486
|
+
selectedWidth,
|
|
487
|
+
selectedHeight,
|
|
488
|
+
IMAGE_MAX_UPSCALE
|
|
489
|
+
);
|
|
490
|
+
return renderImageView(
|
|
491
|
+
filePath,
|
|
492
|
+
prepared,
|
|
493
|
+
{ left, top, width: selectedWidth, height: selectedHeight },
|
|
494
|
+
outputSize,
|
|
495
|
+
signal
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
__name(renderNormalizedImageCrop, "renderNormalizedImageCrop");
|
|
499
|
+
|
|
500
|
+
export {
|
|
501
|
+
isBinaryContentType,
|
|
502
|
+
extensionForMimeType,
|
|
503
|
+
sniffFileKind,
|
|
504
|
+
looksLikeText,
|
|
505
|
+
persistBinaryContent,
|
|
506
|
+
formatByteSize,
|
|
507
|
+
IMAGE_MAX_SOURCE_BYTES,
|
|
508
|
+
ImageViewError,
|
|
509
|
+
sniffBoundableImageMime,
|
|
510
|
+
boundImageBuffer,
|
|
511
|
+
renderImageOverview,
|
|
512
|
+
renderNormalizedImageCrop
|
|
513
|
+
};
|
|
514
|
+
/**
|
|
515
|
+
* @license
|
|
516
|
+
* Copyright 2025 Google LLC
|
|
517
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
518
|
+
*/
|
|
519
|
+
/**
|
|
520
|
+
* @license
|
|
521
|
+
* Copyright 2026 Qwen
|
|
522
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
523
|
+
*/
|