@qwen-code/qwen-code 0.22.0 → 0.22.2-nightly.20260828.7357136dd1
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/computer-use/SKILL.md +229 -0
- package/bundled/computer-use/agents/openai.yaml +4 -0
- package/bundled/coordinate/SKILL.md +5 -5
- package/bundled/goal-draft/SKILL.md +109 -0
- package/bundled/qc-helper/docs/configuration/auth.md +7 -7
- package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
- package/bundled/qc-helper/docs/configuration/settings.md +48 -48
- package/bundled/qc-helper/docs/extension/introduction.md +3 -1
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
- package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +37 -6
- package/bundled/qc-helper/docs/features/code-review.md +27 -23
- package/bundled/qc-helper/docs/features/commands.md +4 -3
- package/bundled/qc-helper/docs/features/computer-use.md +57 -51
- package/bundled/qc-helper/docs/features/goals.md +58 -0
- package/bundled/qc-helper/docs/features/headless.md +13 -11
- package/bundled/qc-helper/docs/features/mcp.md +35 -12
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
- package/bundled/qc-helper/docs/features/worktree.md +1 -1
- package/bundled/qc-helper/docs/overview.md +1 -1
- package/bundled/qc-helper/docs/quickstart.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +29 -6
- package/bundled/review/SKILL.md +185 -435
- package/bundled/review/references/aone.md +18 -0
- package/bundled/review/references/persistence.md +109 -0
- package/bundled/review/references/posting.md +272 -0
- package/chunks/MaxSizedBox-LMWXCLDV.js +110 -0
- package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-W3F7U3JL.js} +87 -88
- package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
- package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-EYZ6EEHD.js} +3223 -2145
- package/chunks/agent-RBLGBY65.js +95 -0
- package/chunks/agent-headless-L5T4Y4OZ.js +85 -0
- package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-GMHML35Q.js} +128 -59
- package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XSMPHZBT.js} +11 -3
- package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-4SWJY65V.js} +2 -2
- package/chunks/bridge-5LR2F2ND.js +119 -0
- package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
- package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-KHR3N6CH.js} +6 -6
- package/chunks/channel-settings-store-4FOAZW72.js +120 -0
- package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-6NA6BBZV.js} +9 -7
- package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-NEZ2J6RK.js} +11 -8
- package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-FKU7DIHJ.js} +12 -6
- package/chunks/{chunk-HDKCKCYO.js → chunk-23RFD54N.js} +1 -1
- package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
- package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
- package/chunks/{chunk-GIWB5QLV.js → chunk-2SXSLSQE.js} +4 -4
- package/chunks/chunk-2TNL5KPM.js +49 -0
- package/chunks/chunk-335CJSNF.js +2320 -0
- package/chunks/chunk-36LGBEM6.js +130 -0
- package/chunks/{chunk-O5BDEWBC.js → chunk-3JXM2CVW.js} +3 -3
- package/chunks/{chunk-2E3V7G6Y.js → chunk-3K6TUZHS.js} +55 -50
- package/chunks/{chunk-WWUSHZ7M.js → chunk-3OOXT6CR.js} +5 -5
- package/chunks/{chunk-2UZJWSVD.js → chunk-3WK3QDNV.js} +2 -2
- package/chunks/{chunk-4J7OPYNS.js → chunk-3XOKEVII.js} +6 -6
- package/chunks/chunk-3Y34Q3JV.js +1584 -0
- package/chunks/{chunk-YMVFIYHV.js → chunk-42IDLQWS.js} +26 -20
- package/chunks/{chunk-7HFULI45.js → chunk-454XFGH4.js} +3 -3
- package/chunks/chunk-4CMJKUND.js +95 -0
- package/chunks/{chunk-XLDFW44M.js → chunk-4K7KNVWH.js} +3 -3
- package/chunks/{chunk-YDJRMQU4.js → chunk-4QHPPXK2.js} +16 -8
- package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
- package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
- package/chunks/{chunk-7NBVNAJJ.js → chunk-62GQFYID.js} +3 -3
- package/chunks/{chunk-JGUBDRBC.js → chunk-6DIGWMGT.js} +3 -3
- package/chunks/{chunk-X7V3N6YH.js → chunk-6JCGO55P.js} +885 -3380
- package/chunks/{chunk-HIK2OF33.js → chunk-6PJOTWAN.js} +1 -1
- package/chunks/{chunk-VUMLT7E5.js → chunk-6W2IK5KC.js} +956 -17
- package/chunks/{chunk-S4C4JJKE.js → chunk-6ZZBRRKQ.js} +5 -5
- package/chunks/{chunk-W4CRPSC5.js → chunk-7EQQR46F.js} +1 -1
- package/chunks/{chunk-PHJJ3RVO.js → chunk-7GWQW5ID.js} +7 -15
- package/chunks/chunk-7J6OTNGO.js +424 -0
- package/chunks/{chunk-URN2JIAQ.js → chunk-7TUBJBBJ.js} +5 -1
- package/chunks/{chunk-A5F63FEW.js → chunk-7VD6IPQM.js} +1 -1
- package/chunks/{chunk-36OF5PRW.js → chunk-ABS25QER.js} +7 -3
- package/chunks/{chunk-UU4WC7DK.js → chunk-AJGR6E6Z.js} +117 -30
- package/chunks/{chunk-MQP3MHWN.js → chunk-AU3MMVJF.js} +43 -20
- package/chunks/{chunk-ZS5BHEPD.js → chunk-AXC26UCQ.js} +1 -1
- package/chunks/{chunk-PDL6LKB5.js → chunk-AY3BNYEQ.js} +1 -1
- package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
- package/chunks/{chunk-WRT324N6.js → chunk-B466ZSHZ.js} +3 -3
- package/chunks/{chunk-5XHAOUWD.js → chunk-B5OUL5EL.js} +3 -3
- package/chunks/{chunk-GAHYKJPV.js → chunk-B5PHIJGI.js} +186 -60
- package/chunks/{chunk-IBJ5S45N.js → chunk-B7CDU2SL.js} +2 -2
- package/chunks/{chunk-UZPYR3EV.js → chunk-BFPESSTR.js} +1 -1
- package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
- package/chunks/{chunk-IWOWEENB.js → chunk-BKWNKLZB.js} +404 -44
- package/chunks/{chunk-3CLIDIVQ.js → chunk-BOWFGCEU.js} +3 -3
- package/chunks/{chunk-BB5IMQCV.js → chunk-BPAKYXQ3.js} +2 -2
- package/chunks/{chunk-ZRYQMWEP.js → chunk-BWORX6FA.js} +2 -2
- package/chunks/{chunk-AP3B7LKD.js → chunk-BXDAPVQU.js} +2 -2
- package/chunks/{chunk-NUGZAFR2.js → chunk-C2X7KY45.js} +147 -6
- package/chunks/{chunk-MZKWFWVG.js → chunk-C3KURPP7.js} +6 -6
- package/chunks/{chunk-WZDM44SB.js → chunk-CAJTKR6W.js} +7 -7
- package/chunks/{chunk-DB2OKNTU.js → chunk-CFJY4DGX.js} +2 -2
- package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
- package/chunks/{chunk-I432KXWD.js → chunk-CMHFCLBU.js} +1 -1
- package/chunks/{create-sub-session-XBCVGNFU.js → chunk-CQH5KTKC.js} +4 -6
- package/chunks/{chunk-5HJUPACR.js → chunk-CRKKHXTI.js} +185 -174
- package/chunks/{chunk-L4HVF7LM.js → chunk-CYAUBK46.js} +3 -3
- package/chunks/{chunk-AZF6SME3.js → chunk-D5LUXLUH.js} +3 -3
- package/chunks/{chunk-RPJQ3O4M.js → chunk-DFDWJE6Z.js} +60 -53
- package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
- package/chunks/chunk-DJBQCO2E.js +842 -0
- package/chunks/{chunk-OVH5Y7KS.js → chunk-DP4MWIM3.js} +19 -3
- package/chunks/{chunk-LI4YHTQK.js → chunk-DYXFD5RO.js} +182 -3
- package/chunks/{chunk-NW35NVFN.js → chunk-E3XVSVKK.js} +26 -4
- package/chunks/{chunk-VSNPOSDN.js → chunk-EB6QRGHM.js} +108 -13
- package/chunks/{chunk-FVBVJEBG.js → chunk-EKNBU2X7.js} +10 -8
- package/chunks/{chunk-DJEHYM4H.js → chunk-EKSCLBBF.js} +3 -3
- package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
- package/chunks/chunk-EW5VVLJT.js +3525 -0
- package/chunks/{chunk-T6XLJRQY.js → chunk-EWIQ3NAE.js} +38774 -6955
- package/chunks/{chunk-4XPSVIED.js → chunk-FALBWZF4.js} +6 -6
- package/chunks/chunk-FBX2SDQ4.js +48 -0
- package/chunks/{chunk-VMJL7RH6.js → chunk-FEHMA4RO.js} +539 -651
- package/chunks/{chunk-PXOJLJ5W.js → chunk-FMFBLTLY.js} +606 -223
- package/chunks/{chunk-ZLCT4C5A.js → chunk-FTF2YIZ5.js} +1 -1
- package/chunks/{chunk-IOSEW6KP.js → chunk-G6FECKTJ.js} +9 -6
- package/chunks/{chunk-RDG44S5I.js → chunk-GGNE3JAW.js} +2 -2
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-B6UBOIFE.js → chunk-H33EQVMG.js} +14 -11
- package/chunks/chunk-H72BQNM3.js +645 -0
- package/chunks/{chunk-YZBDKFRQ.js → chunk-HGIMWQVT.js} +995 -892
- package/chunks/chunk-HOCJDUFY.js +20 -0
- package/chunks/{chunk-6UQSU7CQ.js → chunk-HPXV655A.js} +60 -107
- package/chunks/{chunk-45NQKMYB.js → chunk-HVC3PNVC.js} +1 -1
- package/chunks/{chunk-QJHPWLZC.js → chunk-HYDJDQGJ.js} +1 -1
- package/chunks/{chunk-7DMTAQJ6.js → chunk-IB7FQJRY.js} +163 -57
- package/chunks/{chunk-AW27A43Y.js → chunk-ICURCKIU.js} +1428 -120
- package/chunks/{chunk-4F5WV4RF.js → chunk-ISKH4QX3.js} +288 -15
- package/chunks/{chunk-SE55HQGF.js → chunk-J6S24ZJE.js} +92 -70
- package/chunks/{chunk-7DYNJFES.js → chunk-JB4JIVTJ.js} +6 -1
- package/chunks/{chunk-OARZJFZX.js → chunk-JN4IWWMN.js} +4 -4
- package/chunks/{chunk-6PCOVQO2.js → chunk-JUUBLSZU.js} +8 -8
- package/chunks/{chunk-FEMQ6Y7W.js → chunk-JWALNCLT.js} +47 -126
- package/chunks/{chunk-TBVSALA3.js → chunk-K5KXUXWC.js} +3 -3
- package/chunks/{chunk-XYQHT3AW.js → chunk-KTJFDCX4.js} +2 -2
- package/chunks/{chunk-6FRJEE2S.js → chunk-LEFCFTEX.js} +6 -6
- package/chunks/{chunk-BUGYW6FB.js → chunk-LEGTMYAE.js} +1 -1
- package/chunks/{chunk-MPHLIJYL.js → chunk-LLZA2IK3.js} +20 -8
- package/chunks/{chunk-BEGIBJAZ.js → chunk-LNETQKBE.js} +4 -4
- package/chunks/{chunk-KVGR4MCF.js → chunk-LUEHOUHM.js} +3 -3
- package/chunks/{chunk-2A4C2MEG.js → chunk-LVPZO674.js} +35 -12
- package/chunks/{chunk-25NESM4G.js → chunk-M4ORUPYI.js} +29 -5
- package/chunks/{chunk-VFACN2CE.js → chunk-M6FOJXW3.js} +1 -1
- package/chunks/{chunk-FYZMB6DB.js → chunk-MAYHGRP4.js} +12 -12
- package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
- package/chunks/{chunk-ZRFUT5VV.js → chunk-MTJN7FOT.js} +7 -7
- package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
- package/chunks/{chunk-2TRNCJK4.js → chunk-NIFYWDYN.js} +1 -1
- package/chunks/{chunk-SQS55KR4.js → chunk-NU7RKEZR.js} +2 -2
- package/chunks/{chunk-U2UYQMM6.js → chunk-NXMBRVMQ.js} +3 -3
- package/chunks/chunk-OI4NY7RA.js +346 -0
- package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
- package/chunks/{chunk-K52PZNU4.js → chunk-PDQGMSZK.js} +2 -2
- package/chunks/{chunk-PZRUV52H.js → chunk-PPKZ7JOE.js} +20 -2
- package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
- package/chunks/{chunk-AO4M6NMD.js → chunk-PWIGAMA4.js} +146 -27
- package/chunks/{chunk-S3G6YFQC.js → chunk-QFCDF5PL.js} +1 -1
- package/chunks/chunk-QHMLYMMS.js +32 -0
- package/chunks/{chunk-5XUTPXQU.js → chunk-QPTRRPZU.js} +47 -13
- package/chunks/{chunk-UUQFJILB.js → chunk-RFI4YGMR.js} +34 -267
- package/chunks/{chunk-A6NRNRKE.js → chunk-RFIDDFAL.js} +1 -1
- package/chunks/chunk-RKFGE7JH.js +93 -0
- package/chunks/chunk-RNVFRIOO.js +275 -0
- package/chunks/{chunk-WU5E4HMO.js → chunk-RU7BK6B3.js} +1 -1
- package/chunks/{chunk-J5ZDDUKM.js → chunk-RVXDXY6I.js} +4 -4
- package/chunks/{chunk-OE52YHCZ.js → chunk-RWZB422L.js} +11 -11
- package/chunks/chunk-RXFQM6FQ.js +42 -0
- package/chunks/{chunk-MHG6NDS6.js → chunk-RYNZQGXN.js} +19 -2
- package/chunks/{chunk-4CWDWDL6.js → chunk-SJ5ERAW3.js} +1 -1
- package/chunks/{chunk-Q54XG7IX.js → chunk-SMPR7SPO.js} +1 -1
- package/chunks/{chunk-UIRLQ3N7.js → chunk-SRZZY4IY.js} +3 -3
- package/chunks/{chunk-ND7NOI4P.js → chunk-STUJ7IMZ.js} +0 -92
- package/chunks/{chunk-VYC7XFYV.js → chunk-SUX7HDNA.js} +5 -5
- package/chunks/{chunk-ZZUVC6RI.js → chunk-SVNO44PF.js} +3 -3
- package/chunks/{chunk-FDD2IUEL.js → chunk-SZLBBZH4.js} +370 -35
- package/chunks/{chunk-GHY5OIYP.js → chunk-T2NKRHZZ.js} +13 -13
- package/chunks/chunk-T4EFG2P5.js +113 -0
- package/chunks/{chunk-BMCSKS37.js → chunk-TLHUNMO7.js} +6 -6
- package/chunks/{chunk-JOLJTKIG.js → chunk-TPI7O7HR.js} +1 -1
- package/chunks/{chunk-6QSA4JHL.js → chunk-TQHGJYR3.js} +4492 -1121
- package/chunks/{chunk-ISJMN3ML.js → chunk-TTX2JUE6.js} +1 -1
- package/chunks/{chunk-EFB657PR.js → chunk-TW3E6YNO.js} +3 -3
- package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
- package/chunks/chunk-U54AYGEC.js +337 -0
- package/chunks/{chunk-A5F2YNO6.js → chunk-UHQFIS7N.js} +260 -10
- package/chunks/{chunk-6NFAEG54.js → chunk-UTLCH2FK.js} +24 -13
- package/chunks/{chunk-7JBHIQS2.js → chunk-UY3PBNY3.js} +19 -37
- package/chunks/{chunk-DWCKACFL.js → chunk-V2NDP3I4.js} +2 -2
- package/chunks/{chunk-2GXYDNXP.js → chunk-V2QDDC5J.js} +19 -9
- package/chunks/{chunk-VLRBJ24J.js → chunk-V5J4J5TP.js} +2 -2
- package/chunks/{chunk-X2UOOG5V.js → chunk-VQUGEVGR.js} +1 -1
- package/chunks/{chunk-RDQ7QB4Y.js → chunk-VTHREBQM.js} +2 -2
- package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
- package/chunks/{chunk-62JOGZL5.js → chunk-W6DUQ5GA.js} +11497 -10502
- package/chunks/{chunk-P47E4SJC.js → chunk-WALC5VJH.js} +4 -4
- package/chunks/{chunk-3ZFJUBTP.js → chunk-WAOIHTJS.js} +1 -1
- package/chunks/{chunk-KIVGVFMM.js → chunk-WBHKK3CU.js} +16 -4
- package/chunks/{chunk-XZJKSETB.js → chunk-WXEA74YB.js} +3 -3
- package/chunks/{chunk-VEND4KA4.js → chunk-X3ZRTCJD.js} +1 -1
- package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
- package/chunks/{chunk-XL5K4SVK.js → chunk-XF63PKEN.js} +1 -1
- package/chunks/{chunk-LDGWX737.js → chunk-XLLQJRAH.js} +323 -510
- package/chunks/{chunk-2Z6LSQMF.js → chunk-XQFT3QUF.js} +1 -1
- package/chunks/{chunk-P3QQPMQA.js → chunk-XZA32HII.js} +4 -4
- package/chunks/{chunk-C72BXMJ5.js → chunk-Y3QL45LS.js} +1 -1
- package/chunks/{chunk-QS4ENGVF.js → chunk-Y4TPOUEV.js} +17 -8
- package/chunks/{chunk-AVCCKIZ6.js → chunk-YRZX2PHA.js} +1 -1
- package/chunks/{chunk-Z3JMO2CH.js → chunk-YTDVNSUQ.js} +1 -1
- package/chunks/{chunk-WS7PAXXR.js → chunk-YWQ237GX.js} +15 -199
- package/chunks/chunk-ZELCTN6Y.js +29 -0
- package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
- package/chunks/{chunk-IIWGSX4L.js → chunk-ZTP35P4B.js} +1 -1
- package/chunks/{chunk-K623ENWT.js → chunk-ZU4UDIWX.js} +23 -1
- package/chunks/chunk-ZYNTSXWK.js +32 -0
- package/chunks/config-utils-JVGAP34H.js +113 -0
- package/chunks/contextCommand-XDB7OSO7.js +106 -0
- package/chunks/{core-runtime-CES6JSVV.js → core-runtime-XHYA2RH7.js} +66 -63
- package/chunks/create-sub-session-23ITIELI.js +17 -0
- package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-MHYCFNCM.js} +168 -87
- package/chunks/{cron-create-IKA56DAF.js → cron-create-KJ4IY6PP.js} +57 -10
- package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-MBLQCAYY.js} +4 -4
- package/chunks/{cron-list-QBFGAMP7.js → cron-list-DWH2PQ47.js} +4 -4
- package/chunks/{daemon-RZZUPGOJ.js → daemon-K5XS42ID.js} +567 -27
- package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-V3P5XLHB.js} +339 -95
- package/chunks/daemon-status-provider-KKU7ZTLM.js +117 -0
- package/chunks/daemon-trust-policy-TZGK34DW.js +112 -0
- package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-F23DD2M4.js} +69 -69
- package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
- package/chunks/deferred-core-runtime-LKLGBCGZ.js +114 -0
- package/chunks/{display-image-OEJMJV3S.js → display-image-BE7I6ZB6.js} +5 -5
- package/chunks/{dist-5EV2G6MC.js → dist-4WXLCBDR.js} +1 -1
- package/chunks/{dist-ES6HNUW2.js → dist-5VXFRTWU.js} +525 -64
- package/chunks/{dist-ESS34DHC.js → dist-6BPYWHVD.js} +89 -65
- package/chunks/{dist-2OG3PGKO.js → dist-GFN5DCBX.js} +76 -67
- package/chunks/{dist-K7IQB53U.js → dist-HZNT6GQS.js} +1 -1
- package/chunks/{dist-J6P3C52Z.js → dist-LVZCXVPF.js} +99 -26
- package/chunks/{dist-LZO24N3E.js → dist-N6W6E753.js} +71 -64
- package/chunks/dist-QDLFKWOL.js +2512 -0
- package/chunks/{dist-VVQBOKDH.js → dist-SWQMYP2Q.js} +18 -16
- package/chunks/earlyInputCapture-NERYFYTR.js +107 -0
- package/chunks/{edit-A2633SLR.js → edit-ACCATIXB.js} +49 -51
- package/chunks/{en-3RHLPITS.js → en-YLXBXM4Z.js} +5 -1
- package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-35QCAAFP.js} +7 -8
- package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-NEN6EPVM.js} +48 -50
- package/chunks/environment-CKWHBC5T.js +129 -0
- package/chunks/errors-XTZPNQ77.js +113 -0
- package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-XQD6D543.js} +7 -8
- package/chunks/exitPlanMode-CY344X5J.js +83 -0
- package/chunks/{fast-path-3AVP3G35.js → fast-path-YSOX4PAM.js} +31 -10
- package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
- package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
- package/chunks/{gemini-7PVQWHTH.js → gemini-VQY2YCPH.js} +137 -129
- package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-PAPXNIGU.js} +16 -13
- package/chunks/{glob-7YGXE6OV.js → glob-GVCUSBBF.js} +48 -50
- package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-5STK6OXW.js} +77 -31
- package/chunks/{grep-6DV6LTON.js → grep-5GPICQBU.js} +6 -6
- package/chunks/handleAutoUpdate-ZJPJN42W.js +109 -0
- package/chunks/i18n-BZYKOST7.js +124 -0
- package/chunks/{image-gen-7CSCJ73T.js → image-gen-J6FDGUZP.js} +8 -12
- package/chunks/initializer-GO2C5HE3.js +113 -0
- package/chunks/installationInfo-WM2GXQZ6.js +107 -0
- package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
- package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-37XPR34V.js} +2 -2
- package/chunks/list-ERDJB7PQ.js +116 -0
- package/chunks/{list-agents-43XUEXJV.js → list-agents-DI3YFTDT.js} +2 -2
- package/chunks/loadedSettingsAdapter-7JOCVOKV.js +110 -0
- package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-3ONLU3BS.js} +327 -39
- package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XJFONSQ7.js} +5 -5
- package/chunks/{ls-CGL2UC3H.js → ls-3VAT2J7A.js} +4 -4
- package/chunks/{lsp-5IKUO5DX.js → lsp-5W7IRUBH.js} +2 -2
- package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-TLRCC2GE.js} +62 -62
- package/chunks/mcp-2LH3QXR2.js +110 -0
- package/chunks/{monitor-PXYSGSUN.js → monitor-P7LDAL4W.js} +48 -50
- package/chunks/nonInteractiveCli-E5T7PZ27.js +184 -0
- package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-F7KSG4WQ.js} +49 -51
- package/chunks/open-with-auth-4UI3KHUR.js +55 -0
- package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-2EXCZUGN.js} +29 -32
- package/chunks/pidfile-P25DWA5Q.js +111 -0
- package/chunks/process-registry-OAEG6WGC.js +662 -0
- package/chunks/{processUtils-YK2TDTTU.js → processUtils-PVDKBL35.js} +2 -2
- package/chunks/prompt-terminal-ledger-AJ7T7OIV.js +105 -0
- package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
- package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-TBBRLWIT.js} +54 -62
- package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-OF5WRBQT.js} +7 -11
- package/chunks/read-file-6IIY4RLJ.js +32 -0
- package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-XD257PGJ.js} +2 -2
- package/chunks/read-package-up-6T6ICKR7.js +13 -0
- package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-VW23GS4F.js} +4 -5
- package/chunks/report-findings-XA3FJG3N.js +33 -0
- package/chunks/request-shutdown-BCLA3JV2.js +133 -0
- package/chunks/resumeHistoryUtils-44IETXDY.js +118 -0
- package/chunks/ripGrep-E7ESZ7SS.js +39 -0
- package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
- package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-DXBCYW7V.js} +924 -356
- package/chunks/runtime-RUSPD35D.js +148 -0
- package/chunks/scheduled-tasks-DVRJZO6I.js +127 -0
- package/chunks/scheduler-TDRB2NSY.js +122 -0
- package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-TTU2CHBU.js} +5 -5
- package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-UUMVYMAL.js} +12 -6
- package/chunks/{send-message-J4VT46OI.js → send-message-AJ4OCUBV.js} +24 -29
- package/chunks/serve-KITOM7OR.js +118 -0
- package/chunks/{server-74ONDK62.js → server-THCOMUC2.js} +5814 -4549
- package/chunks/{session-BO6VBWJP.js → session-XKR5MPXE.js} +152 -142
- package/chunks/session-pr-refresh-KRBH7KDA.js +278 -0
- package/chunks/{settings-35QZNFDG.js → settings-YXZ4XBKK.js} +72 -72
- package/chunks/shell-5FJ2DZ3W.js +93 -0
- package/chunks/{skill-DKEMQSNJ.js → skill-VMMJZ6CJ.js} +161 -33
- package/chunks/skill-settings-7SG4YA2W.js +118 -0
- package/chunks/spawnChannel-BPMIXRBI.js +112 -0
- package/chunks/standalone-update-QN5HFRIC.js +118 -0
- package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-5A7RQFRP.js} +3139 -2438
- package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-ML43GEFN.js} +3 -3
- package/chunks/{task-create-I2H322E4.js → task-create-QN4LYRSE.js} +11 -11
- package/chunks/{task-list-3OLIWFTQ.js → task-list-JPLGK45U.js} +5 -5
- package/chunks/{task-stop-JAUY6MSY.js → task-stop-CXEH5L2D.js} +2 -2
- package/chunks/{task-update-B3XO4CPI.js → task-update-IWEOJFV2.js} +11 -11
- package/chunks/{team-create-W534PMGX.js → team-create-HVGVUL2L.js} +49 -51
- package/chunks/{team-delete-Q7GE7RRI.js → team-delete-RZVVSGCY.js} +5 -5
- package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-S5A5FQWU.js} +48 -50
- package/chunks/terminal-image-renderer-SIVPPXDI.js +114 -0
- package/chunks/theme-manager-TA33UZZX.js +102 -0
- package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-WDJNQEMW.js} +43 -25
- package/chunks/{tool-search-Y4KL3LRE.js → tool-search-NX7IPDKP.js} +19 -20
- package/chunks/total-session-admission-PWXZBOVX.js +114 -0
- package/chunks/trustedFolders-V6Y4CU3F.js +122 -0
- package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-CGSX3R37.js} +6 -6
- package/chunks/updateCheck-T5O2WGIB.js +118 -0
- package/chunks/useAutoAcceptIndicator-ULBJJWPY.js +120 -0
- package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-E5S2JSRC.js} +114 -108
- package/chunks/{version-QMDRADXM.js → version-LS5JPU36.js} +2 -2
- package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-RLMFZTS3.js} +25 -244
- package/chunks/{web-search-JS3E76O6.js → web-search-LMCIC4N5.js} +11 -13
- package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
- package/chunks/webapi-Z5OM224P.js +4118 -0
- package/chunks/{workflow-2FCMBTBZ.js → workflow-JBXU3IGA.js} +713 -138
- package/chunks/workspace-providers-status-525ORQBH.js +114 -0
- package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-7Y44R4LV.js} +1 -1
- package/chunks/workspace-registry-HS4RWUSQ.js +123 -0
- package/chunks/workspace-service-7PXDM6EB.js +129 -0
- package/chunks/workspace-skills-status-FMJGC2XI.js +113 -0
- package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-3YTWSQBY.js} +78 -77
- package/chunks/write-file-BVQRYQQO.js +88 -0
- package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-RPTMRTHG.js} +5 -1
- package/chunks/{zh-3JQ75KFU.js → zh-UNY63FR3.js} +5 -1
- package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-FGCELNS4.js} +14 -15
- package/cli.js +13 -13
- package/locales/ca.js +3 -0
- package/locales/de.js +1 -0
- package/locales/en.js +5 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +5 -0
- package/locales/zh.js +5 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-2XZDeWYO.js} +1 -1
- package/web-shell/assets/{arc-CXKjm86V.js → arc-B6UgMh90.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-DZgNFeN1.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-DQ2wvBFN.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-DMmQMrc4.js} +1 -1
- package/web-shell/assets/channel-D_TyfiTx.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-C8Zh2e9y.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-C3LTenP8.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-CxABOc8n.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-CD_JxHDC.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-BdmZPmce.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-80bcHmfK.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-CNpLZyQF.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-CXlKgMv3.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-CivyYyvL.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-Bw_H3xMd.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-Bw_H3xMd.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-COAjRH3w.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DqU1JHO6.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-BCLI1Bvj.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DmAz8nqF.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-Ck-5QLT5.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-C0ljX0mW.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-DPgvT24v.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-D7hWr1LR.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-D59tlOta.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-CY2DDx00.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-AR4h8Q8k.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-DbF0HqBz.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-J52mrIhc.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-CcgMY5EV.js} +1 -1
- package/web-shell/assets/index-BjUg3vPr.css +5 -0
- package/web-shell/assets/index-CFwYYVFU.js +1873 -0
- package/web-shell/assets/{index-tYXRIPz4.js → index-MQs7l15A.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-Buu3ibp2.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CoKQxnF3.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CxK35mTC.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-tk2CHTQ1.js} +1 -1
- package/web-shell/assets/{layout-O2uHVkPd.js → layout-DEpMwb4u.js} +1 -1
- package/web-shell/assets/{linear-BVqYgjSc.js → linear-DSQsLh53.js} +1 -1
- package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-DIZuPBQT.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-CCAvk8r_.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-CpJ28jxz.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-ziJR2R32.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-B60zE3Mh.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-M3GqQ_g1.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-ntCtYqTk.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-AYLoItcZ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DEWk4Mlj.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-OOWvzPay.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-BcMmvxem.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DRLLqPWO.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-DuZTWWvh.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DOfLQQYt.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-CjqtZXEd.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-knVCVkQ4.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-yoWhw0a2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-ue14E_gL.js} +1 -1
- package/web-shell/index.html +20 -5
- package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
- package/chunks/agent-BFE3DQM3.js +0 -93
- package/chunks/agent-headless-LLVKZZ4P.js +0 -87
- package/chunks/bridge-EBYO4SYM.js +0 -118
- package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
- package/chunks/chunk-2J3OJGTL.js +0 -98
- package/chunks/chunk-7IV52LTO.js +0 -202
- package/chunks/chunk-AXMWHKXA.js +0 -42
- package/chunks/chunk-F6WFNA7U.js +0 -22
- package/chunks/chunk-IO257NUD.js +0 -623
- package/chunks/chunk-JS73NNWF.js +0 -30
- package/chunks/chunk-SJ4HB27T.js +0 -945
- package/chunks/chunk-VGHZT6JR.js +0 -51
- package/chunks/chunk-YHC2EYYG.js +0 -125
- package/chunks/computer-use-EGPWFEX6.js +0 -2142
- package/chunks/config-utils-WZ43VOBS.js +0 -25
- package/chunks/contextCommand-5DSEQI6S.js +0 -106
- package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
- package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
- package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
- package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
- package/chunks/environment-WUPHLPKZ.js +0 -127
- package/chunks/errors-WPMPVIAT.js +0 -113
- package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
- package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
- package/chunks/i18n-C562S6KN.js +0 -124
- package/chunks/initializer-7YPGOFP4.js +0 -113
- package/chunks/installationInfo-ARU5Q2H7.js +0 -107
- package/chunks/list-KTSK275C.js +0 -116
- package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
- package/chunks/mcp-6ONTVPAY.js +0 -110
- package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
- package/chunks/pidfile-IO7ALSZF.js +0 -111
- package/chunks/process-registry-PMJOA5CO.js +0 -172
- package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
- package/chunks/read-file-2HOD2ATO.js +0 -33
- package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
- package/chunks/ripGrep-E7P6K4QR.js +0 -40
- package/chunks/runtime-J4SPTJRQ.js +0 -148
- package/chunks/scheduler-VRAEZZ4E.js +0 -122
- package/chunks/serve-KEAWV4TI.js +0 -118
- package/chunks/shell-H6K63WG3.js +0 -95
- package/chunks/skill-settings-TCKLXIXM.js +0 -118
- package/chunks/spawnChannel-2K6NKWM5.js +0 -111
- package/chunks/standalone-update-LSCGOEFP.js +0 -118
- package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
- package/chunks/theme-manager-6B47ZPIF.js +0 -102
- package/chunks/total-session-admission-NSCFWGJH.js +0 -113
- package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
- package/chunks/updateCheck-EOVLHD4T.js +0 -118
- package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
- package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
- package/chunks/workspace-registry-BQISXT6Y.js +0 -122
- package/chunks/workspace-service-LLY6HCUC.js +0 -129
- package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
- package/chunks/write-file-EJHU2Z3E.js +0 -90
- package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
- package/web-shell/assets/index-BN_m_uHJ.css +0 -5
- package/web-shell/assets/index-DrlJu79f.js +0 -1792
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
|
@@ -11,8 +11,10 @@ import {
|
|
|
11
11
|
ChannelBase,
|
|
12
12
|
isTerminalTaskLifecycleType,
|
|
13
13
|
sanitizeLogText,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
sanitizePromptText,
|
|
15
|
+
sanitizeSenderName,
|
|
16
|
+
truncateUtf16Units
|
|
17
|
+
} from "./chunk-ICURCKIU.js";
|
|
16
18
|
import "./chunk-IW6RQPQB.js";
|
|
17
19
|
import "./chunk-CQ35AJ4Z.js";
|
|
18
20
|
import "./chunk-DMTGGOSA.js";
|
|
@@ -6152,6 +6154,109 @@ async function uploadDingTalkImage(image, accessToken) {
|
|
|
6152
6154
|
}
|
|
6153
6155
|
__name(uploadDingTalkImage, "uploadDingTalkImage");
|
|
6154
6156
|
|
|
6157
|
+
// packages/channels/dingtalk/dist/outbound-file.js
|
|
6158
|
+
init_esbuild_shims();
|
|
6159
|
+
var FILE_OPENING = "[FILE:";
|
|
6160
|
+
var MAX_FILE_PATH_CHARS = 4096;
|
|
6161
|
+
var MAX_FILES_PER_RESPONSE = 5;
|
|
6162
|
+
var FILE_UNAVAILABLE_NOTICE = "[File delivery unavailable]";
|
|
6163
|
+
var OutboundFileProjector = class {
|
|
6164
|
+
static {
|
|
6165
|
+
__name(this, "OutboundFileProjector");
|
|
6166
|
+
}
|
|
6167
|
+
candidate = "";
|
|
6168
|
+
reserved = "";
|
|
6169
|
+
reservedAtLineStart = false;
|
|
6170
|
+
reservedTooLong = false;
|
|
6171
|
+
atLineStart = true;
|
|
6172
|
+
paths = [];
|
|
6173
|
+
invalidMarkers = 0;
|
|
6174
|
+
excessMarkers = 0;
|
|
6175
|
+
markerCount = 0;
|
|
6176
|
+
append(chunk) {
|
|
6177
|
+
let safe = "";
|
|
6178
|
+
for (const char of chunk) {
|
|
6179
|
+
if (this.reserved) {
|
|
6180
|
+
if (char === "\n") {
|
|
6181
|
+
this.finishReservedLine();
|
|
6182
|
+
safe += "\n";
|
|
6183
|
+
this.atLineStart = true;
|
|
6184
|
+
} else if (this.reserved.length <= MAX_FILE_PATH_CHARS + 9) {
|
|
6185
|
+
this.reserved += char;
|
|
6186
|
+
} else {
|
|
6187
|
+
this.reservedTooLong = true;
|
|
6188
|
+
}
|
|
6189
|
+
continue;
|
|
6190
|
+
}
|
|
6191
|
+
if (char === "\n") {
|
|
6192
|
+
safe += `${this.candidate}
|
|
6193
|
+
`;
|
|
6194
|
+
this.candidate = "";
|
|
6195
|
+
this.atLineStart = true;
|
|
6196
|
+
continue;
|
|
6197
|
+
}
|
|
6198
|
+
this.candidate += char;
|
|
6199
|
+
while (this.candidate && !FILE_OPENING.startsWith(this.candidate)) {
|
|
6200
|
+
safe += this.candidate[0];
|
|
6201
|
+
this.candidate = this.candidate.slice(1);
|
|
6202
|
+
this.atLineStart = false;
|
|
6203
|
+
}
|
|
6204
|
+
if (this.candidate === FILE_OPENING) {
|
|
6205
|
+
this.reserved = this.candidate;
|
|
6206
|
+
this.reservedAtLineStart = this.atLineStart;
|
|
6207
|
+
this.candidate = "";
|
|
6208
|
+
this.markerCount++;
|
|
6209
|
+
}
|
|
6210
|
+
}
|
|
6211
|
+
return safe;
|
|
6212
|
+
}
|
|
6213
|
+
complete() {
|
|
6214
|
+
if (!this.reserved) {
|
|
6215
|
+
const safe = this.candidate;
|
|
6216
|
+
this.candidate = "";
|
|
6217
|
+
return safe;
|
|
6218
|
+
}
|
|
6219
|
+
this.finishReservedLine();
|
|
6220
|
+
return "";
|
|
6221
|
+
}
|
|
6222
|
+
result(text) {
|
|
6223
|
+
return {
|
|
6224
|
+
text,
|
|
6225
|
+
paths: [...this.paths],
|
|
6226
|
+
invalidMarkers: this.invalidMarkers,
|
|
6227
|
+
excessMarkers: this.excessMarkers,
|
|
6228
|
+
markerCount: this.markerCount
|
|
6229
|
+
};
|
|
6230
|
+
}
|
|
6231
|
+
finishReservedLine() {
|
|
6232
|
+
const match = /^\[FILE: ([^\]\r\n]+)\]\r?$/u.exec(this.reserved);
|
|
6233
|
+
const path = match?.[1];
|
|
6234
|
+
if (!this.reservedTooLong && this.reservedAtLineStart && path && path.length <= MAX_FILE_PATH_CHARS && path === path.trim()) {
|
|
6235
|
+
if (this.paths.length < MAX_FILES_PER_RESPONSE) {
|
|
6236
|
+
this.paths.push(path);
|
|
6237
|
+
} else {
|
|
6238
|
+
this.excessMarkers++;
|
|
6239
|
+
}
|
|
6240
|
+
} else {
|
|
6241
|
+
this.invalidMarkers++;
|
|
6242
|
+
}
|
|
6243
|
+
this.reserved = "";
|
|
6244
|
+
this.reservedAtLineStart = false;
|
|
6245
|
+
this.reservedTooLong = false;
|
|
6246
|
+
}
|
|
6247
|
+
};
|
|
6248
|
+
function projectFileText(text) {
|
|
6249
|
+
const projector = new OutboundFileProjector();
|
|
6250
|
+
const safe = projector.append(text) + projector.complete();
|
|
6251
|
+
return projector.result(safe);
|
|
6252
|
+
}
|
|
6253
|
+
__name(projectFileText, "projectFileText");
|
|
6254
|
+
function withFileUnavailableNotice(text) {
|
|
6255
|
+
const safe = text.trimEnd();
|
|
6256
|
+
return `${safe}${safe ? "\n" : ""}${FILE_UNAVAILABLE_NOTICE}`;
|
|
6257
|
+
}
|
|
6258
|
+
__name(withFileUnavailableNotice, "withFileUnavailableNotice");
|
|
6259
|
+
|
|
6155
6260
|
// packages/channels/dingtalk/dist/DingtalkConnectionManager.js
|
|
6156
6261
|
init_esbuild_shims();
|
|
6157
6262
|
var SOCKET_OPEN = 1;
|
|
@@ -7670,6 +7775,201 @@ var DingtalkInteractionPresenter = class {
|
|
|
7670
7775
|
};
|
|
7671
7776
|
|
|
7672
7777
|
// packages/channels/dingtalk/dist/DingtalkAdapter.js
|
|
7778
|
+
function nonEmptyString(value) {
|
|
7779
|
+
if (typeof value !== "string")
|
|
7780
|
+
return void 0;
|
|
7781
|
+
const trimmed = value.trim();
|
|
7782
|
+
return trimmed || void 0;
|
|
7783
|
+
}
|
|
7784
|
+
__name(nonEmptyString, "nonEmptyString");
|
|
7785
|
+
function parseJsonArray(value) {
|
|
7786
|
+
if (Array.isArray(value))
|
|
7787
|
+
return value;
|
|
7788
|
+
if (typeof value !== "string")
|
|
7789
|
+
return void 0;
|
|
7790
|
+
try {
|
|
7791
|
+
const parsed = JSON.parse(value);
|
|
7792
|
+
return Array.isArray(parsed) ? parsed : void 0;
|
|
7793
|
+
} catch {
|
|
7794
|
+
return void 0;
|
|
7795
|
+
}
|
|
7796
|
+
}
|
|
7797
|
+
__name(parseJsonArray, "parseJsonArray");
|
|
7798
|
+
function sanitizeChatRecordField(value) {
|
|
7799
|
+
return sanitizePromptText(value).trim();
|
|
7800
|
+
}
|
|
7801
|
+
__name(sanitizeChatRecordField, "sanitizeChatRecordField");
|
|
7802
|
+
function bracketSafeChatRecordField(value) {
|
|
7803
|
+
return sanitizeChatRecordField(value).replace(/[[\]]/g, " ").trim();
|
|
7804
|
+
}
|
|
7805
|
+
__name(bracketSafeChatRecordField, "bracketSafeChatRecordField");
|
|
7806
|
+
function startOfLineSafeChatRecordField(value) {
|
|
7807
|
+
const sanitized = sanitizeChatRecordField(value);
|
|
7808
|
+
if (!sanitized.startsWith("["))
|
|
7809
|
+
return sanitized;
|
|
7810
|
+
const deleted = new Uint8Array(sanitized.length);
|
|
7811
|
+
let open = 0;
|
|
7812
|
+
let close = 0;
|
|
7813
|
+
for (; ; ) {
|
|
7814
|
+
while (open < sanitized.length && (deleted[open] === 1 || /\s/.test(sanitized[open]))) {
|
|
7815
|
+
open += 1;
|
|
7816
|
+
}
|
|
7817
|
+
if (sanitized[open] !== "[")
|
|
7818
|
+
break;
|
|
7819
|
+
let next = Math.max(close, open + 1);
|
|
7820
|
+
while (next < sanitized.length && (deleted[next] === 1 || sanitized[next] !== "]")) {
|
|
7821
|
+
next += 1;
|
|
7822
|
+
}
|
|
7823
|
+
if (next >= sanitized.length) {
|
|
7824
|
+
deleted[open] = 1;
|
|
7825
|
+
open += 1;
|
|
7826
|
+
close = next;
|
|
7827
|
+
continue;
|
|
7828
|
+
}
|
|
7829
|
+
deleted[open] = 1;
|
|
7830
|
+
deleted[next] = 1;
|
|
7831
|
+
open += 1;
|
|
7832
|
+
close = next + 1;
|
|
7833
|
+
}
|
|
7834
|
+
const parts = [];
|
|
7835
|
+
let cut = 0;
|
|
7836
|
+
for (let i = 0; i < sanitized.length; i++) {
|
|
7837
|
+
if (deleted[i] === 0)
|
|
7838
|
+
continue;
|
|
7839
|
+
if (i > cut)
|
|
7840
|
+
parts.push(sanitized.slice(cut, i));
|
|
7841
|
+
cut = i + 1;
|
|
7842
|
+
}
|
|
7843
|
+
parts.push(sanitized.slice(cut));
|
|
7844
|
+
return parts.join("").trim();
|
|
7845
|
+
}
|
|
7846
|
+
__name(startOfLineSafeChatRecordField, "startOfLineSafeChatRecordField");
|
|
7847
|
+
var MAX_CHAT_RECORD_ENTRIES = 50;
|
|
7848
|
+
var MAX_CHAT_RECORD_CHARS = 4e3;
|
|
7849
|
+
var MAX_CHAT_RECORD_LINE_CHARS = 500;
|
|
7850
|
+
var MAX_QUOTED_CHAT_RECORD_CHARS = 500;
|
|
7851
|
+
var CHAT_RECORD_ENTRIES_LABEL = "[Chat record messages]";
|
|
7852
|
+
var CHAT_RECORD_HEADER_LEAD = /* @__PURE__ */ __name((title) => `[Chat record: ${title}] `, "CHAT_RECORD_HEADER_LEAD");
|
|
7853
|
+
var CHAT_RECORD_PART_GAP = 2;
|
|
7854
|
+
function announcedDrop(count) {
|
|
7855
|
+
return `[${count} more message(s) not shown]`;
|
|
7856
|
+
}
|
|
7857
|
+
__name(announcedDrop, "announcedDrop");
|
|
7858
|
+
function chatRecordAnnouncementCost(lines) {
|
|
7859
|
+
return lines.length > 0 ? announcedDrop(lines.length).length + 1 : 0;
|
|
7860
|
+
}
|
|
7861
|
+
__name(chatRecordAnnouncementCost, "chatRecordAnnouncementCost");
|
|
7862
|
+
function capChatRecordLines(lines, budget) {
|
|
7863
|
+
const kept = [];
|
|
7864
|
+
let dropped = 0;
|
|
7865
|
+
let total = 0;
|
|
7866
|
+
const spendable = budget - chatRecordAnnouncementCost(lines);
|
|
7867
|
+
if (spendable < 0)
|
|
7868
|
+
return [];
|
|
7869
|
+
for (const [index, line] of lines.entries()) {
|
|
7870
|
+
if (kept.length >= MAX_CHAT_RECORD_ENTRIES) {
|
|
7871
|
+
dropped = lines.length - index;
|
|
7872
|
+
break;
|
|
7873
|
+
}
|
|
7874
|
+
const boundedRaw = truncateUtf16Units(line, MAX_CHAT_RECORD_LINE_CHARS);
|
|
7875
|
+
const bounded = boundedRaw === line ? line : `${boundedRaw} [truncated]`;
|
|
7876
|
+
if (total + bounded.length > spendable) {
|
|
7877
|
+
dropped = lines.length - index;
|
|
7878
|
+
break;
|
|
7879
|
+
}
|
|
7880
|
+
kept.push(bounded);
|
|
7881
|
+
total += bounded.length + 1;
|
|
7882
|
+
}
|
|
7883
|
+
if (dropped > 0)
|
|
7884
|
+
kept.push(announcedDrop(dropped));
|
|
7885
|
+
return kept;
|
|
7886
|
+
}
|
|
7887
|
+
__name(capChatRecordLines, "capChatRecordLines");
|
|
7888
|
+
function mediaTypePlaceholder(msgType, fileName) {
|
|
7889
|
+
switch (msgType) {
|
|
7890
|
+
case "picture":
|
|
7891
|
+
return "[image]";
|
|
7892
|
+
case "file": {
|
|
7893
|
+
const name = bracketSafeChatRecordField(nonEmptyString(fileName) || "");
|
|
7894
|
+
return `[file: ${name || "file"}]`;
|
|
7895
|
+
}
|
|
7896
|
+
case "audio":
|
|
7897
|
+
return "[audio]";
|
|
7898
|
+
case "video":
|
|
7899
|
+
return "[video]";
|
|
7900
|
+
default:
|
|
7901
|
+
return void 0;
|
|
7902
|
+
}
|
|
7903
|
+
}
|
|
7904
|
+
__name(mediaTypePlaceholder, "mediaTypePlaceholder");
|
|
7905
|
+
function formatChatRecordEntryBody(record) {
|
|
7906
|
+
const rawContent = record["content"];
|
|
7907
|
+
const content = rawContent && typeof rawContent === "object" ? rawContent : void 0;
|
|
7908
|
+
const body = nonEmptyString(record["text"]) || nonEmptyString(rawContent) || nonEmptyString(content?.["text"]) || nonEmptyString(record["message"]) || nonEmptyString(record["body"]);
|
|
7909
|
+
if (body)
|
|
7910
|
+
return sanitizeChatRecordField(body) || "[message]";
|
|
7911
|
+
const msgType = nonEmptyString(record["msgType"]) || nonEmptyString(record["msgtype"]);
|
|
7912
|
+
const safeMsgType = msgType ? bracketSafeChatRecordField(msgType) : "";
|
|
7913
|
+
return mediaTypePlaceholder(msgType, content?.["fileName"]) ?? // Record-specific fallback: name the type when DingTalk sends one we do
|
|
7914
|
+
// not model, so the model sees *something* arrived rather than a gap.
|
|
7915
|
+
// The name is record content like every other field here, so it is
|
|
7916
|
+
// neutralized before it goes inside the brackets.
|
|
7917
|
+
(safeMsgType ? `[${safeMsgType}]` : "[message]");
|
|
7918
|
+
}
|
|
7919
|
+
__name(formatChatRecordEntryBody, "formatChatRecordEntryBody");
|
|
7920
|
+
function describeChatRecordKeys(content) {
|
|
7921
|
+
if (!content || typeof content !== "object")
|
|
7922
|
+
return "none";
|
|
7923
|
+
const keys = Object.keys(content);
|
|
7924
|
+
return keys.length > 0 ? keys.join(",") : "none";
|
|
7925
|
+
}
|
|
7926
|
+
__name(describeChatRecordKeys, "describeChatRecordKeys");
|
|
7927
|
+
function formatChatRecord(content, budget = MAX_CHAT_RECORD_CHARS) {
|
|
7928
|
+
const title = nonEmptyString(content?.title);
|
|
7929
|
+
const rawSummary = nonEmptyString(content?.summary);
|
|
7930
|
+
const parsedSummary = parseJsonArray(rawSummary);
|
|
7931
|
+
const summaryLines = parsedSummary ? parsedSummary.map((item) => startOfLineSafeChatRecordField(nonEmptyString(item) || "") || "") : rawSummary?.split("\n").map((line) => startOfLineSafeChatRecordField(nonEmptyString(line) || "")) || [];
|
|
7932
|
+
const rawEntries = content?.chatRecord ?? content?.records ?? content?.messages;
|
|
7933
|
+
const entries = parseJsonArray(rawEntries);
|
|
7934
|
+
const recordLines = Array.isArray(entries) ? entries.flatMap((entry, index) => {
|
|
7935
|
+
if (typeof entry === "string") {
|
|
7936
|
+
const body = nonEmptyString(entry);
|
|
7937
|
+
if (!body)
|
|
7938
|
+
return [];
|
|
7939
|
+
return [`Unknown: ${formatChatRecordEntryBody({ text: body })}`];
|
|
7940
|
+
}
|
|
7941
|
+
if (!entry || typeof entry !== "object")
|
|
7942
|
+
return [];
|
|
7943
|
+
const record = entry;
|
|
7944
|
+
const summarySender = summaryLines.length === entries.length ? nonEmptyString(summaryLines[index]?.match(/^([^::]+)[::]/)?.[1]) : void 0;
|
|
7945
|
+
const rawSender = nonEmptyString(record["senderName"]) || nonEmptyString(record["senderNick"]) || nonEmptyString(record["sender"]) || summarySender || nonEmptyString(record["senderId"]);
|
|
7946
|
+
const sender = rawSender && bracketSafeChatRecordField(rawSender) || "Unknown";
|
|
7947
|
+
return [`${sender}: ${formatChatRecordEntryBody(record)}`];
|
|
7948
|
+
}) : [];
|
|
7949
|
+
const entriesFloor = recordLines.length > 0 ? CHAT_RECORD_ENTRIES_LABEL.length + 1 + chatRecordAnnouncementCost(recordLines) : 0;
|
|
7950
|
+
const headerBudget = Math.max(budget - CHAT_RECORD_PART_GAP - entriesFloor, 0);
|
|
7951
|
+
const summaryDisplayLines = summaryLines.filter(Boolean);
|
|
7952
|
+
const safeTitle = title ? truncateUtf16Units(bracketSafeChatRecordField(title), Math.max(Math.min(MAX_CHAT_RECORD_LINE_CHARS, headerBudget - CHAT_RECORD_HEADER_LEAD("").length - chatRecordAnnouncementCost(summaryDisplayLines)), 0)) || void 0 : void 0;
|
|
7953
|
+
const headerLead = CHAT_RECORD_HEADER_LEAD(safeTitle || "untitled");
|
|
7954
|
+
const summary = capChatRecordLines(summaryDisplayLines, Math.max(headerBudget - headerLead.length, 0)).join("\n");
|
|
7955
|
+
const parts = [];
|
|
7956
|
+
if (summary) {
|
|
7957
|
+
parts.push(`${headerLead}${summary}`);
|
|
7958
|
+
} else if (safeTitle) {
|
|
7959
|
+
parts.push(`[Chat record: ${safeTitle}]`);
|
|
7960
|
+
}
|
|
7961
|
+
const spent = parts.reduce((used, part) => used + part.length + CHAT_RECORD_PART_GAP, 0);
|
|
7962
|
+
const boundedLines = capChatRecordLines(recordLines, Math.max(budget - spent - CHAT_RECORD_ENTRIES_LABEL.length - 1, 0));
|
|
7963
|
+
if (boundedLines.length > 0) {
|
|
7964
|
+
parts.push(`${CHAT_RECORD_ENTRIES_LABEL}
|
|
7965
|
+
${boundedLines.join("\n")}`);
|
|
7966
|
+
}
|
|
7967
|
+
return {
|
|
7968
|
+
text: parts.join("\n\n"),
|
|
7969
|
+
entriesDropped: rawEntries !== void 0 && recordLines.length === 0
|
|
7970
|
+
};
|
|
7971
|
+
}
|
|
7972
|
+
__name(formatChatRecord, "formatChatRecord");
|
|
7673
7973
|
var DEDUP_TTL_MS = 5 * 60 * 1e3;
|
|
7674
7974
|
var ACK_REACTION_NAME = "\u{1F440}";
|
|
7675
7975
|
var ACK_EMOTION_ID = "2659900";
|
|
@@ -7682,6 +7982,7 @@ var DIRECT_MSG_API = "https://api.dingtalk.com/v1.0/robot/oToMessages/batchSend"
|
|
|
7682
7982
|
var PROACTIVE_MSG_KEY = "sampleMarkdown";
|
|
7683
7983
|
var TOKEN_API = "https://oapi.dingtalk.com/gettoken";
|
|
7684
7984
|
var PROACTIVE_FETCH_TIMEOUT_MS = 15e3;
|
|
7985
|
+
var REPLY_FETCH_TIMEOUT_MS = 15e3;
|
|
7685
7986
|
var GENERATED_MEDIA_EXT = {
|
|
7686
7987
|
"image/jpeg": "jpg",
|
|
7687
7988
|
"image/png": "png",
|
|
@@ -7757,6 +8058,18 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
7757
8058
|
inboundCardOwners = /* @__PURE__ */ new Map();
|
|
7758
8059
|
cardRunBySession = /* @__PURE__ */ new Map();
|
|
7759
8060
|
cardRuns = /* @__PURE__ */ new Map();
|
|
8061
|
+
// Keyed by runId, not segmentId: a mid-turn segment reset (response
|
|
8062
|
+
// boundary, input requested) mints a fresh segment UUID but the projection
|
|
8063
|
+
// state must survive it, or a marker split across the reset leaks.
|
|
8064
|
+
fileProjectors = /* @__PURE__ */ new Map();
|
|
8065
|
+
blockFileProjectors = /* @__PURE__ */ new Map();
|
|
8066
|
+
// Sessions armed for block projection by onPromptStart and disarmed when
|
|
8067
|
+
// the turn settles (or the session dies). A block send that finds NO
|
|
8068
|
+
// projector state is only legitimate as a turn's FIRST block, which always
|
|
8069
|
+
// lands while armed: late sends from an evicted (/clear) or dead session
|
|
8070
|
+
// must be dropped, because recreating state would post the tail of a
|
|
8071
|
+
// force-split [FILE: ...] marker verbatim.
|
|
8072
|
+
blockProjectionArmed = /* @__PURE__ */ new Set();
|
|
7760
8073
|
constructor(name, config, bridge, options) {
|
|
7761
8074
|
super(name, config, bridge, options);
|
|
7762
8075
|
this.atSender = config["atSender"] === true;
|
|
@@ -8002,10 +8315,21 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8002
8315
|
static isUnroutableGroupMessage(isGroup, conversationId) {
|
|
8003
8316
|
return isGroup && !conversationId;
|
|
8004
8317
|
}
|
|
8005
|
-
|
|
8006
|
-
const
|
|
8318
|
+
projectOutgoingFileText(text, streamed) {
|
|
8319
|
+
const projection = projectFileText(text);
|
|
8320
|
+
const streamedMarkers = streamed ? streamed.result("").markerCount : 0;
|
|
8321
|
+
if (projection.markerCount === 0 && streamedMarkers === 0) {
|
|
8322
|
+
return projection.text;
|
|
8323
|
+
}
|
|
8324
|
+
process.stderr.write(`[DingTalk:${this.name}] file markers redacted (final=${projection.markerCount}, streamed=${streamedMarkers})
|
|
8325
|
+
`);
|
|
8326
|
+
return withFileUnavailableNotice(projection.text);
|
|
8327
|
+
}
|
|
8328
|
+
async prepareOutgoingText(text, streamed) {
|
|
8329
|
+
const fileSafeText = this.projectOutgoingFileText(text, streamed);
|
|
8330
|
+
const markers = findImageMarkers(fileSafeText);
|
|
8007
8331
|
if (markers.length === 0)
|
|
8008
|
-
return
|
|
8332
|
+
return fileSafeText;
|
|
8009
8333
|
const replacements = [];
|
|
8010
8334
|
for (const marker of markers) {
|
|
8011
8335
|
const fileName = basename2(marker.path).replace(/[\r\n[\]]+/g, "_").slice(0, 100) || "image";
|
|
@@ -8037,7 +8361,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8037
8361
|
replacements.push(`[Image delivery failed: ${fileName}]`);
|
|
8038
8362
|
}
|
|
8039
8363
|
}
|
|
8040
|
-
return replaceImageMarkers(
|
|
8364
|
+
return replaceImageMarkers(fileSafeText, markers, replacements);
|
|
8041
8365
|
}
|
|
8042
8366
|
async sendReply(chatId, text, atUserId) {
|
|
8043
8367
|
const webhook = this.webhooks.get(chatId);
|
|
@@ -8063,11 +8387,19 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8063
8387
|
},
|
|
8064
8388
|
...isMention ? { at: { atUserIds: [atUserId] } } : {}
|
|
8065
8389
|
};
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8390
|
+
let resp;
|
|
8391
|
+
try {
|
|
8392
|
+
resp = await fetch(webhook, {
|
|
8393
|
+
method: "POST",
|
|
8394
|
+
headers: { "Content-Type": "application/json" },
|
|
8395
|
+
body: JSON.stringify(body),
|
|
8396
|
+
signal: AbortSignal.timeout(REPLY_FETCH_TIMEOUT_MS)
|
|
8397
|
+
});
|
|
8398
|
+
} catch (err) {
|
|
8399
|
+
process.stderr.write(`[DingTalk:${this.name}] sendMessage failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 300)}
|
|
8400
|
+
`);
|
|
8401
|
+
throw err;
|
|
8402
|
+
}
|
|
8071
8403
|
if (isMention && process.env["QWEN_CHANNEL_DEBUG_MENTIONS"] === "1") {
|
|
8072
8404
|
const payload = await resp.clone().json().catch(() => void 0);
|
|
8073
8405
|
const response = payload && typeof payload === "object" ? payload : {};
|
|
@@ -8358,6 +8690,12 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8358
8690
|
}
|
|
8359
8691
|
/** Recall reactions left behind when a session dies without terminal lifecycle events. */
|
|
8360
8692
|
onSessionDied(sessionId) {
|
|
8693
|
+
this.blockProjectionArmed.delete(sessionId);
|
|
8694
|
+
this.blockFileProjectors.delete(sessionId);
|
|
8695
|
+
for (const [runId, state] of this.fileProjectors) {
|
|
8696
|
+
if (state.sessionId === sessionId)
|
|
8697
|
+
this.fileProjectors.delete(runId);
|
|
8698
|
+
}
|
|
8361
8699
|
const bufferedTargets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
8362
8700
|
if (bufferedTargets) {
|
|
8363
8701
|
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
@@ -8405,6 +8743,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8405
8743
|
this.mentionTargets.delete(event.messageId);
|
|
8406
8744
|
this.stopReaction(event.chatId, event.messageId, event.sessionId);
|
|
8407
8745
|
if (event.runId) {
|
|
8746
|
+
this.deleteFileProjectorsForRun(event.runId);
|
|
8408
8747
|
if (event.type === "failed") {
|
|
8409
8748
|
this.interactionPresenter?.terminalizeRun(event.runId, "failed", event.error);
|
|
8410
8749
|
} else if (event.type === "cancelled") {
|
|
@@ -8447,6 +8786,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8447
8786
|
}
|
|
8448
8787
|
}
|
|
8449
8788
|
onPromptStart(chatId, sessionId, messageId) {
|
|
8789
|
+
this.blockProjectionArmed.add(sessionId);
|
|
8450
8790
|
if (messageId) {
|
|
8451
8791
|
this.bufferedMentionTargets.delete(messageId);
|
|
8452
8792
|
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
@@ -8461,32 +8801,34 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8461
8801
|
async handleInbound(envelope) {
|
|
8462
8802
|
if (!await this.preflightInbound(envelope))
|
|
8463
8803
|
return;
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8804
|
+
await this.processPreflightedInbound(envelope, async () => {
|
|
8805
|
+
const messageId = envelope.messageId;
|
|
8806
|
+
if (messageId && envelope.senderId) {
|
|
8807
|
+
this.inboundCardOwners.delete(messageId);
|
|
8808
|
+
this.inboundCardOwners.set(messageId, {
|
|
8809
|
+
ownerId: envelope.senderId,
|
|
8810
|
+
target: {
|
|
8811
|
+
chatId: envelope.chatId,
|
|
8812
|
+
isGroup: envelope.isGroup
|
|
8813
|
+
},
|
|
8814
|
+
...this.atSender && envelope.isGroup ? {
|
|
8815
|
+
sender: {
|
|
8816
|
+
senderName: envelope.senderName
|
|
8817
|
+
}
|
|
8818
|
+
} : {}
|
|
8819
|
+
});
|
|
8820
|
+
if (this.inboundCardOwners.size > 1e3) {
|
|
8821
|
+
const oldest = this.inboundCardOwners.keys().next().value;
|
|
8822
|
+
if (oldest !== void 0)
|
|
8823
|
+
this.inboundCardOwners.delete(oldest);
|
|
8824
|
+
}
|
|
8483
8825
|
}
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8826
|
+
const atUserId = envelope[mentionTarget];
|
|
8827
|
+
if (this.atSender && messageId && atUserId) {
|
|
8828
|
+
this.mentionTargets.set(messageId, atUserId);
|
|
8829
|
+
}
|
|
8830
|
+
await this.processInbound(envelope);
|
|
8831
|
+
});
|
|
8490
8832
|
}
|
|
8491
8833
|
async processInbound(envelope) {
|
|
8492
8834
|
const messageId = envelope.messageId;
|
|
@@ -8507,36 +8849,123 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8507
8849
|
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
8508
8850
|
}
|
|
8509
8851
|
onPromptEnd(chatId, sessionId, messageId) {
|
|
8852
|
+
this.settleBlockFileProjector(chatId, sessionId);
|
|
8510
8853
|
this.sessionMentionTargets.delete(sessionId);
|
|
8511
8854
|
this.stopReaction(chatId, messageId, sessionId);
|
|
8512
8855
|
}
|
|
8856
|
+
/**
|
|
8857
|
+
* Turn end is the only point where the block projector's held state can be
|
|
8858
|
+
* settled: ChannelBase drains the turn's queued block sends before calling
|
|
8859
|
+
* onPromptEnd, so everything already appended belongs to this turn. Flush
|
|
8860
|
+
* the held candidate bytes (a trailing `[FILE:` prefix the stream never
|
|
8861
|
+
* completed) before deleting the entry — a later delete-without-settle
|
|
8862
|
+
* would silently drop them from the delivered answer. Also disarm the
|
|
8863
|
+
* session: /clear eviction and session death settle WITHOUT draining the
|
|
8864
|
+
* turn's send chain, and any block that lands afterwards must be dropped
|
|
8865
|
+
* rather than recreating projector state.
|
|
8866
|
+
*/
|
|
8867
|
+
settleBlockFileProjector(chatId, sessionId) {
|
|
8868
|
+
this.blockProjectionArmed.delete(sessionId);
|
|
8869
|
+
const state = this.blockFileProjectors.get(sessionId);
|
|
8870
|
+
if (!state)
|
|
8871
|
+
return;
|
|
8872
|
+
this.blockFileProjectors.delete(sessionId);
|
|
8873
|
+
const tail = state.projector.complete();
|
|
8874
|
+
if (!tail.trim())
|
|
8875
|
+
return;
|
|
8876
|
+
void this.sendReply(chatId, tail).catch((err) => {
|
|
8877
|
+
process.stderr.write(`[DingTalk:${this.name}] projector tail delivery failed for session ${sessionId}: ${err instanceof Error ? err.message : String(err)}
|
|
8878
|
+
`);
|
|
8879
|
+
});
|
|
8880
|
+
}
|
|
8881
|
+
/**
|
|
8882
|
+
* Out-of-turn one-shot sends (background responses) must not flow through
|
|
8883
|
+
* the session's block-streaming projector: a second sender interleaving with
|
|
8884
|
+
* mid-projection state can swallow the send or split a held marker.
|
|
8885
|
+
*/
|
|
8886
|
+
async deliverBackgroundReply(chatId, text, sessionId) {
|
|
8887
|
+
if (this.config.blockStreaming !== "on") {
|
|
8888
|
+
return super.deliverBackgroundReply(chatId, text, sessionId);
|
|
8889
|
+
}
|
|
8890
|
+
await this.sendReply(chatId, text);
|
|
8891
|
+
}
|
|
8513
8892
|
async sendResponseMessage(chatId, text, sessionId) {
|
|
8514
|
-
|
|
8893
|
+
let outgoingText = text;
|
|
8894
|
+
let consumesMention = true;
|
|
8895
|
+
if (this.config.blockStreaming === "on") {
|
|
8896
|
+
const projected = this.projectBlockStreamChunk(text, sessionId);
|
|
8897
|
+
if (!projected.text.trim())
|
|
8898
|
+
return;
|
|
8899
|
+
outgoingText = projected.text;
|
|
8900
|
+
consumesMention = projected.hasContent;
|
|
8901
|
+
}
|
|
8902
|
+
const atUserId = consumesMention && this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
|
|
8515
8903
|
if (atUserId)
|
|
8516
8904
|
this.sessionMentionTargets.delete(sessionId);
|
|
8517
|
-
await this.sendReply(chatId,
|
|
8905
|
+
await this.sendReply(chatId, outgoingText, atUserId);
|
|
8906
|
+
}
|
|
8907
|
+
projectBlockStreamChunk(text, sessionId) {
|
|
8908
|
+
let state = this.blockFileProjectors.get(sessionId);
|
|
8909
|
+
if (!state) {
|
|
8910
|
+
if (!this.blockProjectionArmed.has(sessionId)) {
|
|
8911
|
+
return { text: "", hasContent: false };
|
|
8912
|
+
}
|
|
8913
|
+
state = { projector: new OutboundFileProjector(), reportedMarkers: 0 };
|
|
8914
|
+
this.blockFileProjectors.set(sessionId, state);
|
|
8915
|
+
}
|
|
8916
|
+
const safe = state.projector.append(text);
|
|
8917
|
+
const hasContent = safe.trim().length > 0;
|
|
8918
|
+
const result = state.projector.result(safe);
|
|
8919
|
+
let outgoingText = safe;
|
|
8920
|
+
if (result.markerCount > state.reportedMarkers) {
|
|
8921
|
+
outgoingText = withFileUnavailableNotice(safe);
|
|
8922
|
+
state.reportedMarkers = result.markerCount;
|
|
8923
|
+
process.stderr.write(`[DingTalk:${this.name}] file markers redacted in block stream (session ${sessionId}, markers=${result.markerCount})
|
|
8924
|
+
`);
|
|
8925
|
+
}
|
|
8926
|
+
return { text: outgoingText, hasContent };
|
|
8518
8927
|
}
|
|
8519
8928
|
async sendFallbackReply(chatId, text, sessionId) {
|
|
8520
8929
|
const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
|
|
8521
8930
|
await this.sendReply(chatId, text, atUserId);
|
|
8522
8931
|
}
|
|
8523
8932
|
async onResponseComplete(chatId, text, sessionId, segment) {
|
|
8933
|
+
const streamed = segment ? this.fileProjectors.get(segment.runId)?.projector : void 0;
|
|
8934
|
+
if (segment)
|
|
8935
|
+
this.fileProjectors.delete(segment.runId);
|
|
8936
|
+
const outgoingText = await this.prepareOutgoingText(text, streamed);
|
|
8524
8937
|
if (segment && this.interactionPresenter) {
|
|
8525
|
-
const outgoingText = await this.prepareOutgoingText(text);
|
|
8526
8938
|
if (await this.interactionPresenter.closeOutput(segment.segmentId, outgoingText, "completed", segment)) {
|
|
8527
8939
|
return;
|
|
8528
8940
|
}
|
|
8529
8941
|
}
|
|
8530
|
-
await this.sendResponseMessage(chatId,
|
|
8942
|
+
await this.sendResponseMessage(chatId, outgoingText, sessionId);
|
|
8531
8943
|
}
|
|
8532
8944
|
onOutputSegmentEnd(_chatId, _sessionId, segment, reason) {
|
|
8945
|
+
if (reason === "completed" || reason === "failed" || reason === "cancelled") {
|
|
8946
|
+
this.fileProjectors.delete(segment.runId);
|
|
8947
|
+
}
|
|
8533
8948
|
if (!this.interactionPresenter)
|
|
8534
8949
|
return;
|
|
8535
8950
|
return this.interactionPresenter.closeOutput(segment.segmentId, "", reason, segment).then(() => void 0);
|
|
8536
8951
|
}
|
|
8537
8952
|
onResponseChunk(_chatId, chunk, _sessionId, segment) {
|
|
8538
|
-
if (segment)
|
|
8539
|
-
|
|
8953
|
+
if (!segment)
|
|
8954
|
+
return;
|
|
8955
|
+
let state = this.fileProjectors.get(segment.runId);
|
|
8956
|
+
if (!state) {
|
|
8957
|
+
state = {
|
|
8958
|
+
sessionId: segment.sessionId,
|
|
8959
|
+
projector: new OutboundFileProjector()
|
|
8960
|
+
};
|
|
8961
|
+
this.fileProjectors.set(segment.runId, state);
|
|
8962
|
+
}
|
|
8963
|
+
const safe = state.projector.append(chunk);
|
|
8964
|
+
if (safe)
|
|
8965
|
+
this.interactionPresenter?.appendOutput(segment, safe);
|
|
8966
|
+
}
|
|
8967
|
+
deleteFileProjectorsForRun(runId) {
|
|
8968
|
+
this.fileProjectors.delete(runId);
|
|
8540
8969
|
}
|
|
8541
8970
|
async presentUserInputRequest(context) {
|
|
8542
8971
|
const run = this.cardRuns.get(context.runId);
|
|
@@ -8580,8 +9009,32 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8580
9009
|
return { isReplyToBot: false };
|
|
8581
9010
|
}
|
|
8582
9011
|
/**
|
|
8583
|
-
*
|
|
8584
|
-
*
|
|
9012
|
+
* Warn once when a chat-record payload yields nothing to show the model.
|
|
9013
|
+
* Both chat-record paths degrade silently otherwise — `parseJsonArray`
|
|
9014
|
+
* swallows JSON errors, the top-level path falls back to `(chat record)`
|
|
9015
|
+
* and the replied path to an empty quote — matching this file's convention
|
|
9016
|
+
* of logging degraded paths (`onDownStream`, `onMessage`).
|
|
9017
|
+
*/
|
|
9018
|
+
warnEmptyChatRecord(content) {
|
|
9019
|
+
process.stderr.write(`[DingTalk:${this.name}] chat record had no readable content (content keys: ${sanitizeLogText(describeChatRecordKeys(content), 200)})
|
|
9020
|
+
`);
|
|
9021
|
+
}
|
|
9022
|
+
/**
|
|
9023
|
+
* The partial degradation the empty-record warning cannot see: a title or
|
|
9024
|
+
* summary rendered, so the result is non-empty, but the entries key that
|
|
9025
|
+
* arrived produced no lines at all (an object encoding such as
|
|
9026
|
+
* `{"list":[...]}`, a non-array, or a present-but-unusable first alias).
|
|
9027
|
+
* Every forwarded message is dropped and the user reports only that "the bot
|
|
9028
|
+
* cannot see forwarded messages"; without this line nothing in the log
|
|
9029
|
+
* distinguishes that from model behaviour.
|
|
9030
|
+
*/
|
|
9031
|
+
warnUnreadableChatRecordEntries(content) {
|
|
9032
|
+
process.stderr.write(`[DingTalk:${this.name}] chat record summary rendered but no readable entries (content keys: ${sanitizeLogText(describeChatRecordKeys(content), 200)})
|
|
9033
|
+
`);
|
|
9034
|
+
}
|
|
9035
|
+
/**
|
|
9036
|
+
* Build a text summary from a repliedMsg, handling text, richText, chat
|
|
9037
|
+
* records, and media message types with placeholders.
|
|
8585
9038
|
*/
|
|
8586
9039
|
summarizeRepliedContent(replied) {
|
|
8587
9040
|
const msgType = replied.msgType;
|
|
@@ -8605,19 +9058,15 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8605
9058
|
if (summary)
|
|
8606
9059
|
return summary;
|
|
8607
9060
|
}
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
case "video":
|
|
8616
|
-
return "[video]";
|
|
8617
|
-
default:
|
|
8618
|
-
break;
|
|
9061
|
+
if (msgType === "chatRecord") {
|
|
9062
|
+
const { text, entriesDropped } = formatChatRecord(content, MAX_QUOTED_CHAT_RECORD_CHARS);
|
|
9063
|
+
if (!text)
|
|
9064
|
+
this.warnEmptyChatRecord(content);
|
|
9065
|
+
else if (entriesDropped)
|
|
9066
|
+
this.warnUnreadableChatRecordEntries(content);
|
|
9067
|
+
return text;
|
|
8619
9068
|
}
|
|
8620
|
-
return "";
|
|
9069
|
+
return mediaTypePlaceholder(msgType, content?.fileName) ?? "";
|
|
8621
9070
|
}
|
|
8622
9071
|
/**
|
|
8623
9072
|
* Map a DingTalk message type to the media type used for downloads. Shared
|
|
@@ -8634,7 +9083,8 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8634
9083
|
}
|
|
8635
9084
|
/**
|
|
8636
9085
|
* Extract text and media download codes from an incoming DingTalk message.
|
|
8637
|
-
* Handles text, richText, picture, file, audio, and video
|
|
9086
|
+
* Handles text, richText, chat records, picture, file, audio, and video
|
|
9087
|
+
* message types.
|
|
8638
9088
|
*/
|
|
8639
9089
|
extractContent(data) {
|
|
8640
9090
|
const msgtype = data.msgtype || "text";
|
|
@@ -8698,6 +9148,17 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8698
9148
|
placeholder: "(video)"
|
|
8699
9149
|
};
|
|
8700
9150
|
}
|
|
9151
|
+
if (msgtype === "chatRecord") {
|
|
9152
|
+
const { text, entriesDropped } = formatChatRecord(data.content);
|
|
9153
|
+
if (!text)
|
|
9154
|
+
this.warnEmptyChatRecord(data.content);
|
|
9155
|
+
else if (entriesDropped)
|
|
9156
|
+
this.warnUnreadableChatRecordEntries(data.content);
|
|
9157
|
+
return {
|
|
9158
|
+
text: text || "(chat record)",
|
|
9159
|
+
downloadCodes: []
|
|
9160
|
+
};
|
|
9161
|
+
}
|
|
8701
9162
|
return { text: data.text?.content?.trim() || "", downloadCodes: [] };
|
|
8702
9163
|
}
|
|
8703
9164
|
/**
|
|
@@ -8729,8 +9190,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8729
9190
|
const media = await downloadMedia(downloadCode, robotCode, token);
|
|
8730
9191
|
if (!media)
|
|
8731
9192
|
return;
|
|
8732
|
-
|
|
8733
|
-
if (mediaType === "image" && inlineImageSlotFree) {
|
|
9193
|
+
if (mediaType === "image") {
|
|
8734
9194
|
const mimeType = media.mimeType.startsWith("image/") ? media.mimeType : "image/jpeg";
|
|
8735
9195
|
envelope.attachments = [
|
|
8736
9196
|
...envelope.attachments || [],
|
|
@@ -8840,16 +9300,17 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8840
9300
|
if (this.atSender && isGroup && senderStaffId) {
|
|
8841
9301
|
envelope[mentionTarget] = senderStaffId;
|
|
8842
9302
|
}
|
|
8843
|
-
const processMessage =
|
|
9303
|
+
const processMessage = content.downloadCodes.length > 0 || quoted.media ? this.prepareThenHandleInbound(envelope, async () => {
|
|
8844
9304
|
if (content.downloadCodes.length > 0 && content.mediaType) {
|
|
8845
|
-
|
|
9305
|
+
for (const downloadCode of content.downloadCodes) {
|
|
9306
|
+
await this.attachMedia(envelope, downloadCode, content.mediaType, content.fileName, content.placeholder);
|
|
9307
|
+
}
|
|
8846
9308
|
}
|
|
8847
9309
|
if (quoted.media) {
|
|
8848
9310
|
await this.attachMedia(envelope, quoted.media.downloadCode, quoted.media.mediaType, quoted.media.fileName);
|
|
8849
9311
|
}
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
processMessage().catch((err) => {
|
|
9312
|
+
}) : this.handleInbound(envelope);
|
|
9313
|
+
processMessage.catch((err) => {
|
|
8853
9314
|
process.stderr.write(`[DingTalk:${this.name}] Error handling message: ${err}
|
|
8854
9315
|
`);
|
|
8855
9316
|
this.sendMessage(chatId, "Sorry, something went wrong processing your message.").catch(() => {
|