@qwen-code/qwen-code 0.19.8 → 0.19.9-nightly.20260714.9dd8389eb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/SKILL.md +1 -0
- package/bundled/qc-helper/docs/configuration/auth.md +40 -55
- package/bundled/qc-helper/docs/configuration/model-providers.md +224 -218
- package/bundled/qc-helper/docs/configuration/settings.md +61 -51
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -2
- package/bundled/qc-helper/docs/features/channels/overview.md +82 -7
- package/bundled/qc-helper/docs/features/channels/wecom.md +6 -0
- package/bundled/qc-helper/docs/features/code-review.md +109 -41
- package/bundled/qc-helper/docs/features/commands.md +45 -44
- package/bundled/qc-helper/docs/features/computer-use.md +77 -0
- package/bundled/qc-helper/docs/features/hooks.md +29 -0
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +19 -23
- package/bundled/qc-helper/docs/integration-vscode.md +2 -2
- package/bundled/qc-helper/docs/qwen-serve.md +60 -22
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
- package/bundled/review/DESIGN.md +303 -46
- package/bundled/review/SKILL.md +658 -165
- package/chunks/MaxSizedBox-QAYHOC4F.js +71 -0
- package/chunks/{StandaloneSessionPicker-EYRGH6PJ.js → StandaloneSessionPicker-D3R6YYX3.js} +82 -79
- package/chunks/{acpAgent-GRFTTRHW.js → acpAgent-ENHBW72A.js} +1178 -421
- package/chunks/agent-57LX4KMG.js +69 -0
- package/chunks/agent-headless-AC6EVNAP.js +63 -0
- package/chunks/{anthropicContentGenerator-CPF22MA7.js → anthropicContentGenerator-56U3YCP2.js} +187 -31
- package/chunks/{artifact-tool-D233YJFH.js → artifact-tool-BWZZJ42H.js} +5 -5
- package/chunks/{askUserQuestion-MKL5ZTMC.js → askUserQuestion-WU3S5A5T.js} +6 -6
- package/chunks/bridge-4OZH44MK.js +79 -0
- package/chunks/{ca-MKD32FQL.js → ca-C2JTT2N5.js} +68 -6
- package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
- package/chunks/channel-worker-manager-5RWKSGEU.js +418 -0
- package/chunks/channel-worker-supervisor-PCDAZN4D.js +20 -0
- package/chunks/{chunk-CSOTA7KX.js → chunk-2FO5GFKZ.js} +2 -2
- package/chunks/{chunk-QQDPRDVW.js → chunk-2HRYPZT5.js} +1 -1
- package/chunks/{chunk-I6WGFJJ3.js → chunk-2MF6ICOL.js} +38 -12
- package/chunks/{chunk-X3YGAX7V.js → chunk-2UUAIFQO.js} +4 -2
- package/chunks/{chunk-2PSWA5ID.js → chunk-2X56YUSZ.js} +1 -1
- package/chunks/{chunk-NQKLOAVJ.js → chunk-2Z5UX4KI.js} +2 -2
- package/chunks/chunk-3MX7D6QN.js +516 -0
- package/chunks/{chunk-YDOXPLYL.js → chunk-4DYYRLIE.js} +3890 -975
- package/chunks/{chunk-OQXDAMKY.js → chunk-4FPUAYTT.js} +8 -8
- package/chunks/{chunk-55ZMG67I.js → chunk-4LD5APFL.js} +4 -4
- package/chunks/{chunk-YKZIAK7C.js → chunk-4LJNI7MU.js} +166 -37
- package/chunks/{chunk-BOBOCR5H.js → chunk-4QOPEEL2.js} +4 -4
- package/chunks/{chunk-UIDXQNMV.js → chunk-4WGODMVR.js} +1 -1
- package/chunks/{chunk-E6US47KI.js → chunk-4WKAA4KS.js} +1 -1
- package/chunks/{chunk-3GONHQOA.js → chunk-57OAHC2Y.js} +1 -1
- package/chunks/{chunk-JZSY4WP3.js → chunk-5DTTYNB7.js} +1 -1
- package/chunks/chunk-5HBA2Z7V.js +28 -0
- package/chunks/{chunk-SKAZWEV5.js → chunk-5M6IDOMF.js} +35 -98
- package/chunks/{chunk-A4BMJM77.js → chunk-5O2XNYP6.js} +1 -0
- package/chunks/{chunk-GO6LNQXT.js → chunk-6AM5D4ME.js} +1 -1
- package/chunks/{chunk-BJBWRCSK.js → chunk-6H67XLET.js} +1 -1
- package/chunks/{chunk-AYNCLGTW.js → chunk-6HHAADP2.js} +8 -51
- package/chunks/{chunk-VZ7HY3YU.js → chunk-6OATMEYN.js} +3 -3
- package/chunks/{chunk-3UP777ZS.js → chunk-6RLROE6G.js} +1 -1
- package/chunks/{chunk-ZERZSAZL.js → chunk-75DOP5OR.js} +2 -2
- package/chunks/{chunk-RMLZAUWH.js → chunk-7BIZARI2.js} +10 -12
- package/chunks/{chunk-GN3F6PIU.js → chunk-7NAWTFVY.js} +5 -5
- package/chunks/{chunk-22MNNNXE.js → chunk-7NFB7LBQ.js} +11 -3
- package/chunks/{chunk-ZL5HN75Q.js → chunk-7R4DPSRA.js} +37 -3
- package/chunks/{chunk-BVYU3ZTI.js → chunk-7U7UIO5W.js} +1005 -942
- package/chunks/{chunk-SAIILPQ3.js → chunk-7X7TEQNX.js} +5 -3
- package/chunks/{chunk-IRJWHZWU.js → chunk-A4UCTEB5.js} +2 -2
- package/chunks/{chunk-WF4FAXDL.js → chunk-AAS2Q2TV.js} +62 -62
- package/chunks/{chunk-O7FIRWJV.js → chunk-AAWKZ5R7.js} +3 -3
- package/chunks/{chunk-JCH35JB3.js → chunk-AGBFWLA5.js} +2 -2
- package/chunks/{chunk-QYUE6W3T.js → chunk-ALGGS7UH.js} +2 -39
- package/chunks/{chunk-WMPVYQ4P.js → chunk-ARKANCNX.js} +3 -2
- package/chunks/{chunk-HDOH3QYE.js → chunk-ASVORVFT.js} +2 -2
- package/chunks/{chunk-CHB5SLZZ.js → chunk-AUGSSJX3.js} +3 -3
- package/chunks/{chunk-PUVCVELY.js → chunk-B6ABUBYY.js} +4 -4
- package/chunks/{chunk-L4AMBVQG.js → chunk-B6KHOCU7.js} +49 -21
- package/chunks/{chunk-HW4N45EE.js → chunk-B7NUUEXC.js} +38 -11
- package/chunks/{chunk-CD6USWHZ.js → chunk-BBNVFRGD.js} +2 -2
- package/chunks/{chunk-ZN5T4BHI.js → chunk-BPZALHVR.js} +2 -2
- package/chunks/{chunk-VGGOPZUL.js → chunk-C4CXFRKY.js} +12 -5
- package/chunks/{chunk-OFEVLU4C.js → chunk-CARU2RR2.js} +1 -1
- package/chunks/{chunk-SQ2UATK7.js → chunk-CLTWL6HD.js} +11 -11
- package/chunks/{chunk-GLE2YUPU.js → chunk-COH43MRJ.js} +1 -1
- package/chunks/{chunk-E5A7LHNN.js → chunk-CPBF7KYF.js} +1 -1
- package/chunks/{chunk-UWCTAVOD.js → chunk-CR3C7WXL.js} +1 -1
- package/chunks/{chunk-DIWVZ3VM.js → chunk-CSACSGAW.js} +5 -5
- package/chunks/{chunk-5P5XGNYH.js → chunk-CU3L64TP.js} +1 -1
- package/chunks/{chunk-IWKSG2AR.js → chunk-CXAOG665.js} +1 -1
- package/chunks/{chunk-64WXLC72.js → chunk-DJ2GSRLV.js} +1 -1
- package/chunks/chunk-DKXW66XA.js +38 -0
- package/chunks/{chunk-QN5NZ3UQ.js → chunk-DMTGGOSA.js} +2 -2
- package/chunks/{chunk-JZHIQJOE.js → chunk-DMTQY5GY.js} +6 -6
- package/chunks/{chunk-GSHQYYIV.js → chunk-DNKX35GS.js} +6 -26
- package/chunks/{chunk-6IAWPIQ6.js → chunk-DPSWJWZI.js} +4 -3
- package/chunks/{chunk-X2XNQQJI.js → chunk-E2UVIFI2.js} +186 -399
- package/chunks/{chunk-KHDZHZMH.js → chunk-E5Z2AVNV.js} +1 -1
- package/chunks/{chunk-3B26UVCX.js → chunk-E67NFMF4.js} +39 -10
- package/chunks/{chunk-ON3JA3RU.js → chunk-EU3U7USF.js} +7 -9
- package/chunks/{chunk-L46XKEGM.js → chunk-EUNRLYJG.js} +5 -8
- package/chunks/{chunk-OACJLMLD.js → chunk-FBU7WRZI.js} +18 -2
- package/chunks/{chunk-5IFG2VC4.js → chunk-FCMNKVXT.js} +1 -1
- package/chunks/{chunk-A5JOJ77H.js → chunk-FDL4PB5H.js} +38 -15
- package/chunks/{chunk-E7KNELIZ.js → chunk-FSA7ERJ2.js} +2 -2
- package/chunks/{chunk-TI3BWD4D.js → chunk-G6QTKQN4.js} +39 -19
- package/chunks/{chunk-44NROQYV.js → chunk-GDQQRV43.js} +4 -4
- package/chunks/{chunk-O2YT7VB4.js → chunk-GOXKNSDZ.js} +2 -65
- package/chunks/{chunk-V35MD7KN.js → chunk-GRC5HGPI.js} +1 -1
- package/chunks/chunk-GYGGUR4Q.js +253 -0
- package/chunks/{chunk-S6RLAIUR.js → chunk-GYTKQYDB.js} +1 -1
- package/chunks/{chunk-A2X3KLC3.js → chunk-GZXCZHCT.js} +3 -3
- package/chunks/{chunk-K5PGHDBN.js → chunk-H6XPXXMH.js} +1 -1
- package/chunks/{chunk-E7EMCSUG.js → chunk-HE54PGVI.js} +64 -42
- package/chunks/{chunk-KYMBIKIW.js → chunk-HTHUX2T5.js} +1 -1
- package/chunks/{chunk-LQ7TMOCE.js → chunk-HTO4JFDZ.js} +1 -1
- package/chunks/chunk-HZYUNZDQ.js +296 -0
- package/chunks/chunk-IDS7MSUP.js +74 -0
- package/chunks/chunk-J2TDDOSM.js +493 -0
- package/chunks/{chunk-4CGOWHKM.js → chunk-J4MOFEOK.js} +2 -2
- package/chunks/{chunk-22IFUCVR.js → chunk-JESCGQM3.js} +1 -1
- package/chunks/chunk-JR63TOV4.js +91 -0
- package/chunks/chunk-K3PPUB46.js +445 -0
- package/chunks/{chunk-42XGFRJS.js → chunk-KKRTYONM.js} +8 -6
- package/chunks/{chunk-GGQQA4JW.js → chunk-KSO42X3Z.js} +15 -2
- package/chunks/{chunk-MRO43B25.js → chunk-KW7NOTN6.js} +1 -1
- package/chunks/{chunk-54YZOP7P.js → chunk-L573Z2QZ.js} +11894 -5190
- package/chunks/{chunk-TLWA7TPR.js → chunk-L5U3ELZX.js} +2 -2
- package/chunks/{chunk-WHJQ3JUS.js → chunk-LAM6CGP5.js} +10 -10
- package/chunks/{chunk-H6EMK6QK.js → chunk-LQIDP6K5.js} +11913 -5207
- package/chunks/{chunk-MZ7BABX3.js → chunk-LXLTBIDP.js} +44 -7
- package/chunks/{chunk-HLKG6CZN.js → chunk-M5GB774H.js} +1 -1
- package/chunks/{chunk-EEN2TKST.js → chunk-MBJ3D6SF.js} +2 -2
- package/chunks/{chunk-PMFULMLX.js → chunk-MBP3K324.js} +2234 -377
- package/chunks/chunk-MR3PXB6E.js +48 -0
- package/chunks/{chunk-ZE6E424U.js → chunk-N7FCSERB.js} +2 -2
- package/chunks/{chunk-332PWN27.js → chunk-NHDKSOEY.js} +1 -1
- package/chunks/chunk-OATTJGPJ.js +448 -0
- package/chunks/{chunk-UX6OTBVD.js → chunk-OCC3UTWA.js} +2 -2
- package/chunks/{chunk-P7M4GA57.js → chunk-OCPBI7J5.js} +1 -1
- package/chunks/chunk-OJAMDVF5.js +66 -0
- package/chunks/{chunk-IJRL2S3D.js → chunk-OKAIGAYW.js} +6 -6
- package/chunks/{chunk-WQTHLB5T.js → chunk-P3S67A5R.js} +7 -7
- package/chunks/{chunk-FBET5XZ2.js → chunk-PEJWA3QQ.js} +29 -10
- package/chunks/{chunk-J7RCB6N5.js → chunk-PHYCWSDG.js} +2 -2
- package/chunks/{chunk-LAXNEOBG.js → chunk-PMRH4YYW.js} +18 -3
- package/chunks/{chunk-AGHU5VRK.js → chunk-PZL23GTM.js} +1 -1
- package/chunks/{chunk-PC4ZXHU2.js → chunk-Q6TUALBE.js} +3 -3
- package/chunks/{chunk-FXGLL2HL.js → chunk-Q7YDKOGY.js} +1 -1
- package/chunks/{chunk-P3XEEI3X.js → chunk-QABSSDQH.js} +36 -7
- package/chunks/{chunk-XOHNA2S6.js → chunk-QAW7PIHT.js} +3 -3
- package/chunks/{chunk-LGFAYIKX.js → chunk-QHTIBUWB.js} +1 -1
- package/chunks/{chunk-P3MYAZBY.js → chunk-QMGX2KO2.js} +1 -1
- package/chunks/{chunk-Z3I3QJK3.js → chunk-QRUIS3DN.js} +1 -1
- package/chunks/{chunk-ITOGNELQ.js → chunk-QSWDGAIC.js} +2 -2
- package/chunks/{chunk-GHOTR7HL.js → chunk-QUPXZXLV.js} +1 -1
- package/chunks/{chunk-W7EEOR7D.js → chunk-RCEEXIOO.js} +8 -6
- package/chunks/{chunk-2EM7ECZD.js → chunk-RJL5T4WJ.js} +281 -65
- package/chunks/{chunk-TLRYABYP.js → chunk-RKUWKYED.js} +1 -1
- package/chunks/{chunk-RNBYOUGV.js → chunk-RXFQM6FQ.js} +1 -1
- package/chunks/{chunk-JRQ7EVGE.js → chunk-S2QXYLUB.js} +2 -2
- package/chunks/{chunk-QXPI7FEC.js → chunk-S3TWXGKA.js} +4 -4
- package/chunks/{chunk-O33TBKDC.js → chunk-SE74CIZD.js} +155 -19
- package/chunks/{chunk-FV7425LN.js → chunk-SPJQO2CE.js} +18 -5
- package/chunks/{chunk-3GNOQZDC.js → chunk-SSFDPGFN.js} +11866 -11542
- package/chunks/{chunk-DCZWC4PF.js → chunk-SUWGUGAD.js} +5 -5
- package/chunks/{chunk-IBY3Q3HG.js → chunk-SXU3KKNI.js} +963 -181
- package/chunks/{chunk-MLZQVCF3.js → chunk-SZRN75WQ.js} +1 -1
- package/chunks/{chunk-M7S4GK5Z.js → chunk-T2L6SGQY.js} +115 -29
- package/chunks/{chunk-7RYW5LQV.js → chunk-T2NCM2ET.js} +2 -2
- package/chunks/{chunk-JPALE3PA.js → chunk-T5C2OUCI.js} +6 -6
- package/chunks/{chunk-BUZ6HGL4.js → chunk-T7FSRWQ5.js} +248 -55
- package/chunks/{chunk-Z2Z3GUXZ.js → chunk-TB6UDU4T.js} +1 -1
- package/chunks/{chunk-EXPMGZZV.js → chunk-TEGEBB2I.js} +1 -1
- package/chunks/{chunk-MX2YXRER.js → chunk-TJTKSVIV.js} +1 -1
- package/chunks/{chunk-CCGOFQV3.js → chunk-TQBODCFD.js} +8 -7
- package/chunks/chunk-TV6K2FB4.js +224 -0
- package/chunks/{chunk-5MBO76SL.js → chunk-TXY2C3D2.js} +3 -3
- package/chunks/{chunk-H6BD2ELD.js → chunk-TYAMGABM.js} +2 -2
- package/chunks/{chunk-QYNNN7BK.js → chunk-TYLOFD2U.js} +2 -2
- package/chunks/{chunk-VRDMOSQS.js → chunk-UDXSXLER.js} +2 -2
- package/chunks/{chunk-UXEW557D.js → chunk-UI3W56WF.js} +3 -3
- package/chunks/{chunk-CJCKDMWO.js → chunk-URK542T4.js} +1 -1
- package/chunks/{channel-worker-supervisor-NZQUOEFJ.js → chunk-URU5UEK6.js} +190 -34
- package/chunks/{chunk-AHNXYU4O.js → chunk-V6WHFGST.js} +1 -1
- package/chunks/chunk-V75IOTWF.js +71 -0
- package/chunks/{chunk-ZTQ26VBE.js → chunk-VDDGDZMA.js} +1 -1
- package/chunks/{chunk-OMX7CUOE.js → chunk-VGC4I5JJ.js} +1 -1
- package/chunks/{chunk-43W4YSO6.js → chunk-VJNBRRZG.js} +2 -2
- package/chunks/{chunk-ER3BKOLB.js → chunk-W7FJ3N32.js} +1 -1
- package/chunks/{chunk-3HX5LZ6R.js → chunk-WBL3FJEU.js} +2 -2
- package/chunks/{chunk-7LTB54MK.js → chunk-WIEO4CWB.js} +2 -2
- package/chunks/{chunk-BMFMJINR.js → chunk-WL4L7EZH.js} +1 -1
- package/chunks/{chunk-6VK6FIMQ.js → chunk-WM5HY72H.js} +415 -379
- package/chunks/{chunk-BOBRZZKD.js → chunk-WN4D7YCI.js} +5 -5
- package/chunks/{chunk-DHOLNQLC.js → chunk-WWQ3QIJS.js} +60 -40
- package/chunks/{chunk-FEJ2FZ3U.js → chunk-WX6SD4IQ.js} +2 -2
- package/chunks/{chunk-DICGXFAI.js → chunk-X7EBAABW.js} +11 -9
- package/chunks/{chunk-3RW4AZJV.js → chunk-XFSFZCM5.js} +1 -1
- package/chunks/{chunk-YHKAK72D.js → chunk-XHW5VUIQ.js} +102 -16
- package/chunks/{chunk-2MPVVENX.js → chunk-XU457J4V.js} +2 -2
- package/chunks/{chunk-SIUQ3YYX.js → chunk-XVNQMZ2I.js} +1 -1
- package/chunks/{chunk-SYCJMSIJ.js → chunk-XWRJCPHC.js} +1 -1
- package/chunks/{chunk-SUAKHHK7.js → chunk-Y66VOBRP.js} +3 -3
- package/chunks/chunk-YAF2MQZ6.js +19 -0
- package/chunks/{chunk-FQNC62B2.js → chunk-YH4J5XI3.js} +11 -11
- package/chunks/chunk-YHN5SUIJ.js +219 -0
- package/chunks/{chunk-BR4QREVK.js → chunk-YQ3U5MUC.js} +1 -1
- package/chunks/{chunk-Y6Z2O3WR.js → chunk-YUZI3WAC.js} +1 -1
- package/chunks/{chunk-II73RK2S.js → chunk-YVEDCAUE.js} +1 -1
- package/chunks/{chunk-XYR5RUA5.js → chunk-YWUK7OS7.js} +10 -3
- package/chunks/{chunk-27BHARDE.js → chunk-Z56JO4JZ.js} +2124 -30
- package/chunks/{chunk-TSPB77TG.js → chunk-ZLM3KXBT.js} +1015 -2967
- package/chunks/{chunk-AHNJGLFV.js → chunk-ZPAHLFZU.js} +3 -3
- package/chunks/chunk-ZRKBI3DP.js +34 -0
- package/chunks/cli-entry-path-4VJ3Y6T2.js +10 -0
- package/chunks/{computer-use-WMY3UOBX.js → computer-use-DIP5BWXP.js} +51 -50
- package/chunks/config-utils-CFT33LTP.js +24 -0
- package/chunks/contextCommand-QU4GJWWD.js +69 -0
- package/chunks/create-sub-session-TCLIYVGR.js +376 -0
- package/chunks/create-sub-session-WNX2OQVX.js +207 -0
- package/chunks/{cron-create-JSXEIPVS.js → cron-create-36TIFKRT.js} +9 -9
- package/chunks/{cron-delete-OIFVEPGU.js → cron-delete-OQD3WULU.js} +7 -7
- package/chunks/{cron-list-D4ZX4IOE.js → cron-list-4533T2FH.js} +14 -10
- package/chunks/{daemon-WPAENEBW.js → daemon-CEZ27OH4.js} +734 -24
- package/chunks/daemon-status-provider-SIBFMLBQ.js +77 -0
- package/chunks/{de-ZFPPQVSF.js → de-2VCDRDGU.js} +68 -6
- package/chunks/{devtools-FM6GJPYG.js → devtools-4QFYJT6U.js} +3 -3
- package/chunks/{dist-E6UANPIM.js → dist-3V3ZV6ML.js} +1011 -197
- package/chunks/{dist-SCFLLYMK.js → dist-ERCPDVA6.js} +12 -11
- package/chunks/{dist-Z34QPAQW.js → dist-HNN7DR2L.js} +529 -79
- package/chunks/{dist-O2IRTRPP.js → dist-JZE7F6YR.js} +10 -10
- package/chunks/{dist-BEXOZXLQ.js → dist-MOEC47TR.js} +36 -15
- package/chunks/{dist-H2AEJCZ5.js → dist-PHEPJLXD.js} +5 -5
- package/chunks/{dist-63IS3ZMI.js → dist-PZV5RKM6.js} +4 -4
- package/chunks/earlyInputCapture-L66BEG2C.js +70 -0
- package/chunks/{edit-OTYWAXGP.js → edit-Y5LAJSST.js} +52 -51
- package/chunks/{en-N4EPZAQI.js → en-NJCA3TAA.js} +78 -6
- package/chunks/{enter-worktree-HNYBDVCX.js → enter-worktree-X5LML7T4.js} +51 -50
- package/chunks/{enterPlanMode-CJCNGT63.js → enterPlanMode-XWF32QOW.js} +67 -51
- package/chunks/environment-YVMA5F4I.js +90 -0
- package/chunks/errors-4Y5SUAOC.js +76 -0
- package/chunks/{exit-worktree-DUUKOE3X.js → exit-worktree-SFHU7XYC.js} +51 -50
- package/chunks/{exitPlanMode-AMMSXOAJ.js → exitPlanMode-FP3NAN6E.js} +52 -51
- package/chunks/{fast-path-OV6NIP3K.js → fast-path-ZJNFFCBM.js} +8 -8
- package/chunks/{fast-path-settings-7RIFI3PK.js → fast-path-settings-DAOVFADC.js} +8 -6
- package/chunks/{fileFromPath-IBEHA3CO.js → fileFromPath-UDALK7FM.js} +3 -3
- package/chunks/{fr-5WWMY53B.js → fr-5F3E7WKD.js} +68 -6
- package/chunks/{gemini-NQ3WWBKB.js → gemini-5CAB22BI.js} +122 -109
- package/chunks/{geminiContentGenerator-CDUNEJQE.js → geminiContentGenerator-GE3HPIFB.js} +9 -9
- package/chunks/{getMachineId-bsd-4CASPIU4.js → getMachineId-bsd-EXV7SWPA.js} +3 -3
- package/chunks/{getMachineId-darwin-HPQPEMZR.js → getMachineId-darwin-IUOMFXU3.js} +3 -3
- package/chunks/{getMachineId-linux-AUARKYHL.js → getMachineId-linux-K7XJYFHL.js} +2 -2
- package/chunks/{getMachineId-unsupported-S32ZDA2T.js → getMachineId-unsupported-EA5FDRJ6.js} +2 -2
- package/chunks/{getMachineId-win-4EFLHYIJ.js → getMachineId-win-KBA6RAI5.js} +3 -3
- package/chunks/{glob-ROV3YS4R.js → glob-YPACZAEL.js} +98 -75
- package/chunks/{grep-NRITKDCD.js → grep-IPR4XW37.js} +51 -50
- package/chunks/handleAutoUpdate-P2KEP56V.js +70 -0
- package/chunks/i18n-BRCT66AA.js +85 -0
- package/chunks/initializer-34HXSK3A.js +74 -0
- package/chunks/installationInfo-WOTDQMSC.js +66 -0
- package/chunks/{ja-CUHZOLEJ.js → ja-66J6B53L.js} +69 -7
- package/chunks/{keychain-token-storage-UJV5XP4Z.js → keychain-token-storage-AU22CQI6.js} +4 -4
- package/chunks/{kittyProtocolDetector-OJRCJLIU.js → kittyProtocolDetector-HCNNKJTI.js} +2 -2
- package/chunks/list-XOGP7UPP.js +77 -0
- package/chunks/loadedSettingsAdapter-L4YKGU6F.js +71 -0
- package/chunks/{loop-wakeup-OHWEMFP5.js → loop-wakeup-MVUKDVCP.js} +10 -10
- package/chunks/{lowlight-FYAAUU5J.js → lowlight-J2OZNPCA.js} +1 -1
- package/chunks/{ls-7MFU2QYW.js → ls-RXNIAQDE.js} +6 -6
- package/chunks/{lsp-XHDTPTGV.js → lsp-HB5LM5IL.js} +4 -4
- package/chunks/mcp-HH7DIP7Y.js +71 -0
- package/chunks/{monitor-FL2ZO33W.js → monitor-25DEBT6U.js} +51 -50
- package/chunks/{multipart-parser-AJ4WASWR.js → multipart-parser-AWZKXSQN.js} +3 -3
- package/chunks/nonInteractiveCli-CT3VSSLK.js +130 -0
- package/chunks/{notebook-edit-6PULTHL5.js → notebook-edit-TAVXSWQ6.js} +52 -51
- package/chunks/openaiContentGenerator-6I7DKUAN.js +56 -0
- package/chunks/pidfile-SIQGCFLZ.js +74 -0
- package/chunks/{pt-OLYN42DS.js → pt-TFZO5Y6T.js} +68 -6
- package/chunks/{qwenContentGenerator-NX2E7PB7.js → qwenContentGenerator-5DDIXI2N.js} +53 -52
- package/chunks/{qwenOAuth2-ZV7YLMND.js → qwenOAuth2-LEYOU7RU.js} +9 -9
- package/chunks/read-file-WDOAYRFU.js +30 -0
- package/chunks/{read-mcp-resource-CNQHBSJM.js → read-mcp-resource-6LRTZKXI.js} +5 -5
- package/chunks/{read-package-up-ER5OJUGP.js → read-package-up-TCM6I7S2.js} +2 -2
- package/chunks/{record-artifact-SQ2OKRJW.js → record-artifact-PMDTY4OS.js} +4 -4
- package/chunks/ripGrep-MI7PHN3Q.js +61 -0
- package/chunks/{ru-LDM3GWVQ.js → ru-4L4LFHIT.js} +68 -6
- package/chunks/{run-qwen-serve-JK2DL7PI.js → run-qwen-serve-PNTYF3RE.js} +1289 -256
- package/chunks/runtime-V3FBMUTG.js +100 -0
- package/chunks/{scheduler-O4IGVZKK.js → scheduler-4TAUIJBM.js} +52 -51
- package/chunks/{send-message-76GT3JMC.js → send-message-SR4WSXP2.js} +7 -7
- package/chunks/serve-WB2TR7XM.js +77 -0
- package/chunks/{server-SGNPKX2O.js → server-AF6LNFPK.js} +8094 -2800
- package/chunks/{session-5BNM25EZ.js → session-BIGK4NRW.js} +341 -135
- package/chunks/settings-IXF5FIQO.js +121 -0
- package/chunks/shell-5VWJ2PPG.js +69 -0
- package/chunks/{skill-I22QK5XS.js → skill-SI667Y3B.js} +24 -24
- package/chunks/spawnChannel-IKX6DD7J.js +71 -0
- package/chunks/{src-BBQSM46M.js → src-55DZWDAK.js} +151 -52
- package/chunks/{src-7XL4G4DC.js → src-VLI3TKEY.js} +4 -4
- package/chunks/standalone-update-MHLSFHE6.js +80 -0
- package/chunks/{startInteractiveUI-JII36UGN.js → startInteractiveUI-V2EDWLAX.js} +2239 -1846
- package/chunks/stdioHelpers-UMY72QRP.js +14 -0
- package/chunks/{syntheticOutput-F7LSDCAR.js → syntheticOutput-YKFNUQZD.js} +5 -5
- package/chunks/task-create-NUFOHU53.js +23 -0
- package/chunks/{task-list-TGGJX7EA.js → task-list-Z2IKQY3S.js} +11 -10
- package/chunks/{task-stop-W7NGTMYQ.js → task-stop-KQFIVQTJ.js} +4 -4
- package/chunks/{task-update-XYWMHJGJ.js → task-update-HKADXSTD.js} +13 -12
- package/chunks/{team-create-A7NUU5AQ.js → team-create-IZAMLBJS.js} +51 -50
- package/chunks/{team-delete-UHQQ2QQX.js → team-delete-SDNTGZLG.js} +11 -10
- package/chunks/{team-plan-approval-TOQRJ2KI.js → team-plan-approval-3R4RCKCP.js} +51 -50
- package/chunks/theme-manager-LCOXZ5DO.js +65 -0
- package/chunks/{todoWrite-C4ZAMSR3.js → todoWrite-YNXB27GB.js} +6 -6
- package/chunks/{tool-search-SZ4EFS2T.js → tool-search-NYNCD5LF.js} +24 -24
- package/chunks/total-session-admission-PJWGOMQE.js +73 -0
- package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
- package/chunks/trustedFolders-DOJDHNYP.js +81 -0
- package/chunks/{types-QX5C3CHJ.js → types-JNKGKUJT.js} +2 -2
- package/chunks/updateCheck-ZXL66KIG.js +70 -0
- package/chunks/updateEventEmitter-5MKC7BLQ.js +10 -0
- package/chunks/validateNonInterActiveAuth-JSNJZCYY.js +195 -0
- package/chunks/{version-NO2XSNNP.js → version-3NLBENG5.js} +3 -3
- package/chunks/{web-fetch-UYGMOHW4.js → web-fetch-ZSPR3PRR.js} +8 -8
- package/chunks/{workflow-WO2H6NRI.js → workflow-BQYLF7XP.js} +52 -51
- package/chunks/workspace-providers-status-FA2DGEZW.js +74 -0
- package/chunks/workspace-registration-store-TARTAGMI.js +27 -0
- package/chunks/workspace-registry-AGE7WAXX.js +77 -0
- package/chunks/workspace-service-ERC5VR2B.js +83 -0
- package/chunks/workspace-skills-status-FKYWGNCN.js +73 -0
- package/chunks/{write-file-PX2Z7IBE.js → write-file-S47KSK7Z.js} +52 -51
- package/chunks/{yargs-B64EYTCF.js → yargs-6H2AUULL.js} +2 -2
- package/chunks/{zh-J4F6QWQV.js → zh-FSAH32JB.js} +79 -7
- package/chunks/{zh-TW-XVDWOLSW.js → zh-TW-D2YIE2LO.js} +79 -7
- package/cli.js +18 -17
- package/locales/ca.js +91 -7
- package/locales/de.js +90 -7
- package/locales/en.js +109 -7
- package/locales/fr.js +91 -7
- package/locales/ja.js +93 -7
- package/locales/pt.js +90 -7
- package/locales/ru.js +90 -7
- package/locales/zh-TW.js +106 -7
- package/locales/zh.js +106 -7
- package/package.json +3 -6
- package/web-shell/assets/{arc-BWyoJpY2.js → arc-Zj4EkBUY.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BT0mGrz2.js → architectureDiagram-3BPJPVTR-DAk1Ua3Y.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BLgUWvyf.js → blockDiagram-GPEHLZMM-DBNqUthM.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DYx9M7oU.js → c4Diagram-AAUBKEIU-Dq5QGJ53.js} +1 -1
- package/web-shell/assets/channel-DWfYijFS.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CfMHWbuZ.js → chunk-2J33WTMH-DY0AeGru.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-B1URoqEV.js → chunk-4BX2VUAB-COX3OyIi.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DAIaM4QF.js → chunk-55IACEB6-Csoyddbh.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-B2X34knw.js → chunk-727SXJPM-BJPONdxX.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Cif-zLTQ.js → chunk-AQP2D5EJ-syLVH6fg.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-H18WCXdY.js → chunk-FMBD7UC4-Cfm59Nhw.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-YFtetHi0.js → chunk-ND2GUHAM-DZf6tAqS.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-By2hiH3r.js → chunk-QZHKN3VN-DKBp_v5q.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DDht-78J.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DDht-78J.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-VrcnnLZu.js → cose-bilkent-S5V4N54A-DUU3mMQ5.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CGo-IaVV.js → dagre-BM42HDAG-BUgNfbh-.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-Dl4QjzIB.js → diagram-2AECGRRQ-DT7MVfAg.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-qMLmsO0u.js → diagram-5GNKFQAL-Cv4YG-ec.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CHlmuxPI.js → diagram-KO2AKTUF-BAe9LLkn.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BUwU3GwT.js → diagram-LMA3HP47-DW8wqTIP.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-HEhwPDUM.js → diagram-OG6HWLK6-CmkuWbaK.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-1n0llBmM.js → erDiagram-TEJ5UH35-DwvdHjZ9.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BN74uMnt.js → flowDiagram-I6XJVG4X-CSsXrhW_.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BoOq78i3.js → ganttDiagram-6RSMTGT7-BtuznCdi.js} +3 -3
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CN8b00c8.js → gitGraphDiagram-PVQCEYII-DGmAm06g.js} +1 -1
- package/web-shell/assets/index-B9Xwf4OS.css +5 -0
- package/web-shell/assets/index-BEtz1cvN.js +3 -0
- package/web-shell/assets/index-BUkM4ZXX.js +1088 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CCurnIna.js → infoDiagram-5YYISTIA-OAiZ1q0K.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AwuRqdUP.js → ishikawaDiagram-YF4QCWOH-DyK0KTIT.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-B7IICk-E.js → journeyDiagram-JHISSGLW-DzYJlwfO.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-BYF0OKhx.js → kanban-definition-UN3LZRKU-CU_tcDwi.js} +1 -1
- package/web-shell/assets/{linear-GWWguGfD.js → linear-DvZXjF17.js} +1 -1
- package/web-shell/assets/{mermaid.core-JqtkxvCl.js → mermaid.core-_ZFEQlOl.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-B0MmHsZ6.js → mindmap-definition-RKZ34NQL-Or4p64HB.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DhImUZLQ.js → pieDiagram-4H26LBE5-lXE-zZ6b.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DGeSC3DT.js → quadrantDiagram-W4KKPZXB-DUXb9mUV.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DkspY6Re.js → requirementDiagram-4Y6WPE33-D_10uHfo.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CaOofS2x.js → sankeyDiagram-5OEKKPKP-E8c0fPqe.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DFQ_kFnN.js → sequenceDiagram-3UESZ5HK-CJMtFttK.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-D3snw0Tz.js → stateDiagram-AJRCARHV-DhbviRbB.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CntljfwW.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-l4zH8nLM.js → timeline-definition-PNZ67QCA-CM5yMkFK.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BnRlA98M.js → vennDiagram-CIIHVFJN-BCi-zWNN.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-BS0xUdmd.js → wardley-L42UT6IY-BJ_yJNjJ.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DKGBUWyQ.js → wardleyDiagram-YWT4CUSO-TjtLk-qN.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DVb2HuOB.js → xychartDiagram-2RQKCTM6-D1TjyoQ3.js} +1 -1
- package/web-shell/index.html +16 -4
- package/chunks/MaxSizedBox-5DT2SD7B.js +0 -71
- package/chunks/agent-H2DGKS77.js +0 -68
- package/chunks/agent-headless-KFMFIT6J.js +0 -62
- package/chunks/bridge-NA3ZQQKJ.js +0 -78
- package/chunks/chunk-6SHO7WFF.js +0 -79
- package/chunks/chunk-IFEWJXFS.js +0 -37
- package/chunks/chunk-XNXVCNAT.js +0 -88
- package/chunks/contextCommand-LXFZRP4L.js +0 -68
- package/chunks/daemon-status-provider-GJRXY5EN.js +0 -76
- package/chunks/earlyInputCapture-KNOYZ4MJ.js +0 -69
- package/chunks/environment-ATFTYMLZ.js +0 -88
- package/chunks/errors-A54HAADA.js +0 -75
- package/chunks/handleAutoUpdate-CEZJAARW.js +0 -65
- package/chunks/initializer-BRFJKRRX.js +0 -71
- package/chunks/list-KVHF7O4X.js +0 -73
- package/chunks/loadedSettingsAdapter-LL5PSFKX.js +0 -68
- package/chunks/mcp-3GCXRTOQ.js +0 -68
- package/chunks/nonInteractiveCli-PTQI3DV6.js +0 -119
- package/chunks/openaiContentGenerator-YE42PKCY.js +0 -56
- package/chunks/pidfile-NZYSCFRK.js +0 -73
- package/chunks/read-file-33XGP5HF.js +0 -30
- package/chunks/ripGrep-QWZLGTAN.js +0 -60
- package/chunks/serve-JTMIGANH.js +0 -74
- package/chunks/settings-3MI4XXP6.js +0 -118
- package/chunks/shell-YJKBE67T.js +0 -68
- package/chunks/spawnChannel-UNV6W4DU.js +0 -70
- package/chunks/task-create-WCHTB435.js +0 -22
- package/chunks/theme-manager-WZ4RRMMB.js +0 -64
- package/chunks/total-session-admission-ULXJWXFV.js +0 -72
- package/chunks/trustedFolders-LAZZPZ3D.js +0 -79
- package/chunks/updateCheck-KONLM73X.js +0 -65
- package/chunks/validateNonInterActiveAuth-MPKSRCXD.js +0 -184
- package/chunks/workspace-providers-status-3W7E7DFW.js +0 -71
- package/chunks/workspace-registry-SXJZNN3O.js +0 -74
- package/chunks/workspace-service-CZRQZ4Q4.js +0 -80
- package/chunks/workspace-skills-status-K7WFREPD.js +0 -70
- package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +0 -35
- package/node_modules/@qwen-code/audio-capture/dist/index.js +0 -48
- package/node_modules/@qwen-code/audio-capture/dist/index.js.map +0 -1
- package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +0 -7
- package/node_modules/@qwen-code/audio-capture/dist/platform.js +0 -18
- package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +0 -1
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +0 -21
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +0 -58
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +0 -5
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +0 -84
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +0 -19
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +0 -6
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +0 -207
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +0 -7
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +0 -43
- package/node_modules/@qwen-code/audio-capture/package.json +0 -30
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/web-shell/assets/channel-wmPUGHtg.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BA2ljEjW.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BA2ljEjW.js +0 -1
- package/web-shell/assets/index-CNwoO1Cn.js +0 -783
- package/web-shell/assets/index-CWQ0z6kZ.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BbSm_9d0.js +0 -1
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
require_follow_redirects,
|
|
5
5
|
require_form_data,
|
|
6
6
|
require_proxy_from_env
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-S3TWXGKA.js";
|
|
8
|
+
import "./chunk-T2NCM2ET.js";
|
|
9
9
|
import {
|
|
10
10
|
ChannelBase,
|
|
11
11
|
isTerminalTaskLifecycleType,
|
|
12
12
|
sanitizeLogText,
|
|
13
13
|
sanitizeSenderName
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-SXU3KKNI.js";
|
|
15
|
+
import "./chunk-UDXSXLER.js";
|
|
16
|
+
import "./chunk-H6XPXXMH.js";
|
|
17
|
+
import "./chunk-CR3C7WXL.js";
|
|
18
18
|
import {
|
|
19
19
|
wrapper_default
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-TYAMGABM.js";
|
|
21
|
+
import "./chunk-FCMNKVXT.js";
|
|
22
|
+
import "./chunk-DMTGGOSA.js";
|
|
23
|
+
import "./chunk-YQ3U5MUC.js";
|
|
24
24
|
import {
|
|
25
25
|
init_esbuild_shims
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5O2XNYP6.js";
|
|
27
27
|
import {
|
|
28
28
|
__export,
|
|
29
29
|
__name,
|
|
@@ -4305,57 +4305,6 @@ var DWClient = class extends EventEmitter2 {
|
|
|
4305
4305
|
// packages/channels/dingtalk/dist/markdown.js
|
|
4306
4306
|
init_esbuild_shims();
|
|
4307
4307
|
var CHUNK_LIMIT = 3800;
|
|
4308
|
-
function isTableSeparator(line) {
|
|
4309
|
-
const trimmed = line.trim();
|
|
4310
|
-
if (!trimmed.includes("-"))
|
|
4311
|
-
return false;
|
|
4312
|
-
const cells = trimmed.replace(/^\|/, "").replace(/\|$/, "").split("|").map((cell) => cell.trim());
|
|
4313
|
-
return cells.length > 0 && cells.every((cell) => /^:?-{3,}:?$/.test(cell));
|
|
4314
|
-
}
|
|
4315
|
-
__name(isTableSeparator, "isTableSeparator");
|
|
4316
|
-
function isTableRow(line) {
|
|
4317
|
-
const trimmed = line.trim();
|
|
4318
|
-
return trimmed.includes("|") && !trimmed.startsWith("```");
|
|
4319
|
-
}
|
|
4320
|
-
__name(isTableRow, "isTableRow");
|
|
4321
|
-
function parseTableRow(line) {
|
|
4322
|
-
return line.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((cell) => cell.trim());
|
|
4323
|
-
}
|
|
4324
|
-
__name(parseTableRow, "parseTableRow");
|
|
4325
|
-
function renderTable(lines) {
|
|
4326
|
-
const rows = lines.map(parseTableRow).filter((cells) => cells.length > 0);
|
|
4327
|
-
return rows.map((cells) => cells.join(" | ")).join(" \n");
|
|
4328
|
-
}
|
|
4329
|
-
__name(renderTable, "renderTable");
|
|
4330
|
-
function convertTables(text) {
|
|
4331
|
-
const lines = text.split("\n");
|
|
4332
|
-
const output = [];
|
|
4333
|
-
let i = 0;
|
|
4334
|
-
let inCode = false;
|
|
4335
|
-
while (i < lines.length) {
|
|
4336
|
-
const line = lines[i] || "";
|
|
4337
|
-
if (line.trim().startsWith("```")) {
|
|
4338
|
-
inCode = !inCode;
|
|
4339
|
-
output.push(line);
|
|
4340
|
-
i++;
|
|
4341
|
-
continue;
|
|
4342
|
-
}
|
|
4343
|
-
if (!inCode && i + 1 < lines.length && isTableRow(line) && isTableSeparator(lines[i + 1] || "")) {
|
|
4344
|
-
const tableLines = [line];
|
|
4345
|
-
i += 2;
|
|
4346
|
-
while (i < lines.length && isTableRow(lines[i] || "")) {
|
|
4347
|
-
tableLines.push(lines[i] || "");
|
|
4348
|
-
i++;
|
|
4349
|
-
}
|
|
4350
|
-
output.push(renderTable(tableLines));
|
|
4351
|
-
continue;
|
|
4352
|
-
}
|
|
4353
|
-
output.push(line);
|
|
4354
|
-
i++;
|
|
4355
|
-
}
|
|
4356
|
-
return output.join("\n");
|
|
4357
|
-
}
|
|
4358
|
-
__name(convertTables, "convertTables");
|
|
4359
4308
|
function splitChunks(text) {
|
|
4360
4309
|
if (!text || text.length <= CHUNK_LIMIT) {
|
|
4361
4310
|
return [text];
|
|
@@ -4432,7 +4381,7 @@ function extractTitle(text) {
|
|
|
4432
4381
|
}
|
|
4433
4382
|
__name(extractTitle, "extractTitle");
|
|
4434
4383
|
function normalizeDingTalkMarkdown(text) {
|
|
4435
|
-
return splitChunks(
|
|
4384
|
+
return splitChunks(text);
|
|
4436
4385
|
}
|
|
4437
4386
|
__name(normalizeDingTalkMarkdown, "normalizeDingTalkMarkdown");
|
|
4438
4387
|
|
|
@@ -4482,6 +4431,311 @@ async function downloadMedia(downloadCode, robotCode, accessToken) {
|
|
|
4482
4431
|
}
|
|
4483
4432
|
__name(downloadMedia, "downloadMedia");
|
|
4484
4433
|
|
|
4434
|
+
// packages/channels/dingtalk/dist/DingtalkConnectionManager.js
|
|
4435
|
+
init_esbuild_shims();
|
|
4436
|
+
var SOCKET_OPEN = 1;
|
|
4437
|
+
var CONNECT_TIMEOUT_MS = 1e4;
|
|
4438
|
+
var READY_POLL_MS = 100;
|
|
4439
|
+
var HEARTBEAT_INTERVAL_MS = 2e4;
|
|
4440
|
+
var MAX_HEARTBEAT_MISSES = 2;
|
|
4441
|
+
var HEALTH_INTERVAL_MS = 6e4;
|
|
4442
|
+
var MAX_HEALTH_FAILURES = 2;
|
|
4443
|
+
var INITIAL_RECONNECT_DELAY_MS = 1e3;
|
|
4444
|
+
var MAX_RECONNECT_DELAY_MS = 3e4;
|
|
4445
|
+
var DingtalkConnectionManager = class {
|
|
4446
|
+
static {
|
|
4447
|
+
__name(this, "DingtalkConnectionManager");
|
|
4448
|
+
}
|
|
4449
|
+
options;
|
|
4450
|
+
running = false;
|
|
4451
|
+
generation = 0;
|
|
4452
|
+
hasStarted = false;
|
|
4453
|
+
startingGeneration;
|
|
4454
|
+
activeClient;
|
|
4455
|
+
readyTimer;
|
|
4456
|
+
resolveReadyDelay;
|
|
4457
|
+
heartbeatTimer;
|
|
4458
|
+
heartbeatMisses = 0;
|
|
4459
|
+
activitySinceHeartbeat = false;
|
|
4460
|
+
healthTimer;
|
|
4461
|
+
healthFailures = 0;
|
|
4462
|
+
reconnectTask;
|
|
4463
|
+
reconnectGeneration;
|
|
4464
|
+
socketCleanup;
|
|
4465
|
+
retryTimer;
|
|
4466
|
+
resolveRetryDelay;
|
|
4467
|
+
cancelConnectionAttempts = /* @__PURE__ */ new Set();
|
|
4468
|
+
constructor(options) {
|
|
4469
|
+
this.options = options;
|
|
4470
|
+
this.activeClient = options.initialClient;
|
|
4471
|
+
}
|
|
4472
|
+
async start() {
|
|
4473
|
+
if (this.running) {
|
|
4474
|
+
return;
|
|
4475
|
+
}
|
|
4476
|
+
const client = this.hasStarted ? this.options.createClient() : this.activeClient;
|
|
4477
|
+
this.hasStarted = true;
|
|
4478
|
+
this.activeClient = client;
|
|
4479
|
+
this.running = true;
|
|
4480
|
+
const generation = ++this.generation;
|
|
4481
|
+
this.startingGeneration = generation;
|
|
4482
|
+
try {
|
|
4483
|
+
await this.connectClient(client, generation);
|
|
4484
|
+
this.options.onClientChanged(client);
|
|
4485
|
+
this.startMonitoring(client);
|
|
4486
|
+
} catch (error) {
|
|
4487
|
+
if (this.running && generation === this.generation) {
|
|
4488
|
+
this.safeDisconnect(client, "startup client");
|
|
4489
|
+
this.running = false;
|
|
4490
|
+
this.generation++;
|
|
4491
|
+
this.stopMonitoring();
|
|
4492
|
+
this.cancelReadyDelay();
|
|
4493
|
+
this.cancelRetryDelay();
|
|
4494
|
+
}
|
|
4495
|
+
throw error;
|
|
4496
|
+
} finally {
|
|
4497
|
+
if (this.startingGeneration === generation) {
|
|
4498
|
+
this.startingGeneration = void 0;
|
|
4499
|
+
}
|
|
4500
|
+
}
|
|
4501
|
+
}
|
|
4502
|
+
noteActivity(client) {
|
|
4503
|
+
if (!this.running || client !== this.activeClient) {
|
|
4504
|
+
return;
|
|
4505
|
+
}
|
|
4506
|
+
this.activitySinceHeartbeat = true;
|
|
4507
|
+
this.heartbeatMisses = 0;
|
|
4508
|
+
}
|
|
4509
|
+
requestReconnect(client, reason) {
|
|
4510
|
+
const generation = this.generation;
|
|
4511
|
+
if (!this.running || client !== this.activeClient || this.startingGeneration === generation || this.reconnectTask && this.reconnectGeneration === generation) {
|
|
4512
|
+
return;
|
|
4513
|
+
}
|
|
4514
|
+
const task = this.reconnect(reason, generation);
|
|
4515
|
+
this.reconnectTask = task;
|
|
4516
|
+
this.reconnectGeneration = generation;
|
|
4517
|
+
void task.catch((error) => {
|
|
4518
|
+
this.options.log(`reconnect failed: ${String(error)}`);
|
|
4519
|
+
}).finally(() => {
|
|
4520
|
+
if (this.reconnectTask === task) {
|
|
4521
|
+
this.reconnectTask = void 0;
|
|
4522
|
+
this.reconnectGeneration = void 0;
|
|
4523
|
+
}
|
|
4524
|
+
});
|
|
4525
|
+
}
|
|
4526
|
+
stop() {
|
|
4527
|
+
if (!this.running) {
|
|
4528
|
+
return;
|
|
4529
|
+
}
|
|
4530
|
+
this.running = false;
|
|
4531
|
+
this.generation++;
|
|
4532
|
+
this.startingGeneration = void 0;
|
|
4533
|
+
this.reconnectTask = void 0;
|
|
4534
|
+
this.reconnectGeneration = void 0;
|
|
4535
|
+
this.stopMonitoring();
|
|
4536
|
+
this.cancelReadyDelay();
|
|
4537
|
+
this.cancelRetryDelay();
|
|
4538
|
+
for (const cancel of this.cancelConnectionAttempts) {
|
|
4539
|
+
cancel();
|
|
4540
|
+
}
|
|
4541
|
+
this.cancelConnectionAttempts.clear();
|
|
4542
|
+
this.safeDisconnect(this.activeClient, "active client");
|
|
4543
|
+
}
|
|
4544
|
+
startMonitoring(client) {
|
|
4545
|
+
this.stopMonitoring();
|
|
4546
|
+
this.activitySinceHeartbeat = true;
|
|
4547
|
+
this.heartbeatMisses = 0;
|
|
4548
|
+
this.healthFailures = 0;
|
|
4549
|
+
const socket = this.options.getSocket(client);
|
|
4550
|
+
if (socket) {
|
|
4551
|
+
const onPong = /* @__PURE__ */ __name(() => this.noteActivity(client), "onPong");
|
|
4552
|
+
const onClose = /* @__PURE__ */ __name(() => this.requestReconnect(client, "socket closed"), "onClose");
|
|
4553
|
+
const onError = /* @__PURE__ */ __name(() => this.requestReconnect(client, "socket error"), "onError");
|
|
4554
|
+
socket.on("pong", onPong);
|
|
4555
|
+
socket.on("close", onClose);
|
|
4556
|
+
socket.on("error", onError);
|
|
4557
|
+
this.socketCleanup = () => {
|
|
4558
|
+
socket.off("pong", onPong);
|
|
4559
|
+
socket.off("close", onClose);
|
|
4560
|
+
socket.off("error", onError);
|
|
4561
|
+
};
|
|
4562
|
+
}
|
|
4563
|
+
this.heartbeatTimer = setInterval(() => {
|
|
4564
|
+
if (!this.running || client !== this.activeClient) {
|
|
4565
|
+
return;
|
|
4566
|
+
}
|
|
4567
|
+
if (this.activitySinceHeartbeat) {
|
|
4568
|
+
this.activitySinceHeartbeat = false;
|
|
4569
|
+
this.heartbeatMisses = 0;
|
|
4570
|
+
} else {
|
|
4571
|
+
this.heartbeatMisses++;
|
|
4572
|
+
}
|
|
4573
|
+
if (this.heartbeatMisses >= MAX_HEARTBEAT_MISSES) {
|
|
4574
|
+
this.requestReconnect(client, "heartbeat timeout");
|
|
4575
|
+
return;
|
|
4576
|
+
}
|
|
4577
|
+
const socket2 = this.options.getSocket(client);
|
|
4578
|
+
if (!socket2 || socket2.readyState !== SOCKET_OPEN) {
|
|
4579
|
+
this.requestReconnect(client, "socket is not open");
|
|
4580
|
+
return;
|
|
4581
|
+
}
|
|
4582
|
+
try {
|
|
4583
|
+
socket2.ping();
|
|
4584
|
+
} catch (error) {
|
|
4585
|
+
this.requestReconnect(client, `socket ping failed: ${String(error)}`);
|
|
4586
|
+
}
|
|
4587
|
+
}, HEARTBEAT_INTERVAL_MS);
|
|
4588
|
+
this.healthTimer = setInterval(() => {
|
|
4589
|
+
if (!this.running || client !== this.activeClient) {
|
|
4590
|
+
return;
|
|
4591
|
+
}
|
|
4592
|
+
if (client.connected && this.options.getSocket(client)?.readyState === SOCKET_OPEN) {
|
|
4593
|
+
this.healthFailures = 0;
|
|
4594
|
+
return;
|
|
4595
|
+
}
|
|
4596
|
+
this.healthFailures++;
|
|
4597
|
+
if (this.healthFailures >= MAX_HEALTH_FAILURES) {
|
|
4598
|
+
this.requestReconnect(client, "unhealthy connection state");
|
|
4599
|
+
}
|
|
4600
|
+
}, HEALTH_INTERVAL_MS);
|
|
4601
|
+
}
|
|
4602
|
+
stopMonitoring() {
|
|
4603
|
+
if (this.heartbeatTimer) {
|
|
4604
|
+
clearInterval(this.heartbeatTimer);
|
|
4605
|
+
this.heartbeatTimer = void 0;
|
|
4606
|
+
}
|
|
4607
|
+
if (this.healthTimer) {
|
|
4608
|
+
clearInterval(this.healthTimer);
|
|
4609
|
+
this.healthTimer = void 0;
|
|
4610
|
+
}
|
|
4611
|
+
this.socketCleanup?.();
|
|
4612
|
+
this.socketCleanup = void 0;
|
|
4613
|
+
}
|
|
4614
|
+
async reconnect(reason, generation) {
|
|
4615
|
+
const previousClient = this.activeClient;
|
|
4616
|
+
let retryDelay = INITIAL_RECONNECT_DELAY_MS;
|
|
4617
|
+
while (this.running && generation === this.generation) {
|
|
4618
|
+
let replacement;
|
|
4619
|
+
try {
|
|
4620
|
+
replacement = this.options.createClient();
|
|
4621
|
+
await this.connectClient(replacement, generation);
|
|
4622
|
+
if (!this.running || generation !== this.generation) {
|
|
4623
|
+
this.safeDisconnect(replacement, "stale replacement client");
|
|
4624
|
+
return;
|
|
4625
|
+
}
|
|
4626
|
+
this.activeClient = replacement;
|
|
4627
|
+
this.stopMonitoring();
|
|
4628
|
+
this.options.onClientChanged(replacement);
|
|
4629
|
+
this.startMonitoring(replacement);
|
|
4630
|
+
this.safeDisconnect(previousClient, "replaced client");
|
|
4631
|
+
return;
|
|
4632
|
+
} catch (error) {
|
|
4633
|
+
if (replacement) {
|
|
4634
|
+
this.safeDisconnect(replacement, "failed replacement client");
|
|
4635
|
+
}
|
|
4636
|
+
if (!this.running || generation !== this.generation) {
|
|
4637
|
+
return;
|
|
4638
|
+
}
|
|
4639
|
+
this.options.log(`${reason}: ${String(error)}`);
|
|
4640
|
+
await this.waitForRetry(retryDelay);
|
|
4641
|
+
retryDelay = Math.min(retryDelay * 2, MAX_RECONNECT_DELAY_MS);
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
}
|
|
4645
|
+
async connectClient(client, generation) {
|
|
4646
|
+
const deadline = Date.now() + CONNECT_TIMEOUT_MS;
|
|
4647
|
+
let abortAttempt = false;
|
|
4648
|
+
let timeout;
|
|
4649
|
+
let rejectAttempt;
|
|
4650
|
+
const attemptEnded = new Promise((_resolve, reject) => {
|
|
4651
|
+
rejectAttempt = reject;
|
|
4652
|
+
timeout = setTimeout(() => {
|
|
4653
|
+
abortAttempt = true;
|
|
4654
|
+
reject(new Error("Timed out connecting to DingTalk Stream."));
|
|
4655
|
+
}, CONNECT_TIMEOUT_MS);
|
|
4656
|
+
});
|
|
4657
|
+
const cancel = /* @__PURE__ */ __name(() => {
|
|
4658
|
+
abortAttempt = true;
|
|
4659
|
+
if (timeout) {
|
|
4660
|
+
clearTimeout(timeout);
|
|
4661
|
+
timeout = void 0;
|
|
4662
|
+
}
|
|
4663
|
+
rejectAttempt(new Error("DingTalk connection manager stopped."));
|
|
4664
|
+
}, "cancel");
|
|
4665
|
+
this.cancelConnectionAttempts.add(cancel);
|
|
4666
|
+
const connect = client.connect();
|
|
4667
|
+
try {
|
|
4668
|
+
await Promise.race([connect, attemptEnded]);
|
|
4669
|
+
} catch (error) {
|
|
4670
|
+
if (abortAttempt) {
|
|
4671
|
+
void connect.then(() => this.safeDisconnect(client, "late connection client"), () => void 0);
|
|
4672
|
+
}
|
|
4673
|
+
throw error;
|
|
4674
|
+
} finally {
|
|
4675
|
+
if (timeout) {
|
|
4676
|
+
clearTimeout(timeout);
|
|
4677
|
+
}
|
|
4678
|
+
this.cancelConnectionAttempts.delete(cancel);
|
|
4679
|
+
}
|
|
4680
|
+
await this.waitUntilReady(client, generation, deadline);
|
|
4681
|
+
}
|
|
4682
|
+
safeDisconnect(client, context) {
|
|
4683
|
+
try {
|
|
4684
|
+
client.disconnect();
|
|
4685
|
+
} catch (error) {
|
|
4686
|
+
this.options.log(`failed to disconnect ${context}: ${String(error)}`);
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
waitForRetry(delay) {
|
|
4690
|
+
return new Promise((resolve) => {
|
|
4691
|
+
this.resolveRetryDelay = resolve;
|
|
4692
|
+
this.retryTimer = setTimeout(() => {
|
|
4693
|
+
this.retryTimer = void 0;
|
|
4694
|
+
this.resolveRetryDelay = void 0;
|
|
4695
|
+
resolve();
|
|
4696
|
+
}, delay);
|
|
4697
|
+
});
|
|
4698
|
+
}
|
|
4699
|
+
async waitUntilReady(client, generation, deadline) {
|
|
4700
|
+
while (this.running && generation === this.generation) {
|
|
4701
|
+
if (client.connected && this.options.getSocket(client)?.readyState === SOCKET_OPEN) {
|
|
4702
|
+
return;
|
|
4703
|
+
}
|
|
4704
|
+
if (Date.now() >= deadline) {
|
|
4705
|
+
throw new Error("Timed out connecting to DingTalk Stream.");
|
|
4706
|
+
}
|
|
4707
|
+
await this.waitForReadyPoll();
|
|
4708
|
+
}
|
|
4709
|
+
throw new Error("DingTalk connection manager stopped.");
|
|
4710
|
+
}
|
|
4711
|
+
waitForReadyPoll() {
|
|
4712
|
+
return new Promise((resolve) => {
|
|
4713
|
+
this.resolveReadyDelay = resolve;
|
|
4714
|
+
this.readyTimer = setTimeout(() => {
|
|
4715
|
+
this.readyTimer = void 0;
|
|
4716
|
+
this.resolveReadyDelay = void 0;
|
|
4717
|
+
resolve();
|
|
4718
|
+
}, READY_POLL_MS);
|
|
4719
|
+
});
|
|
4720
|
+
}
|
|
4721
|
+
cancelReadyDelay() {
|
|
4722
|
+
if (this.readyTimer) {
|
|
4723
|
+
clearTimeout(this.readyTimer);
|
|
4724
|
+
this.readyTimer = void 0;
|
|
4725
|
+
}
|
|
4726
|
+
this.resolveReadyDelay?.();
|
|
4727
|
+
this.resolveReadyDelay = void 0;
|
|
4728
|
+
}
|
|
4729
|
+
cancelRetryDelay() {
|
|
4730
|
+
if (this.retryTimer) {
|
|
4731
|
+
clearTimeout(this.retryTimer);
|
|
4732
|
+
this.retryTimer = void 0;
|
|
4733
|
+
}
|
|
4734
|
+
this.resolveRetryDelay?.();
|
|
4735
|
+
this.resolveRetryDelay = void 0;
|
|
4736
|
+
}
|
|
4737
|
+
};
|
|
4738
|
+
|
|
4485
4739
|
// packages/channels/dingtalk/dist/DingtalkAdapter.js
|
|
4486
4740
|
var DEDUP_TTL_MS = 5 * 60 * 1e3;
|
|
4487
4741
|
var ACK_REACTION_NAME = "\u{1F440}";
|
|
@@ -4492,12 +4746,35 @@ var GROUP_MSG_API = "https://api.dingtalk.com/v1.0/robot/groupMessages/send";
|
|
|
4492
4746
|
var GROUP_MSG_KEY = "sampleMarkdown";
|
|
4493
4747
|
var TOKEN_API = "https://oapi.dingtalk.com/gettoken";
|
|
4494
4748
|
var PROACTIVE_FETCH_TIMEOUT_MS = 15e3;
|
|
4749
|
+
var TEXT_MESSAGE_LIMIT = 3800;
|
|
4750
|
+
var mentionTarget = Symbol("mentionTarget");
|
|
4751
|
+
function splitTextChunks(text, firstChunkLimit) {
|
|
4752
|
+
if (!text)
|
|
4753
|
+
return [text];
|
|
4754
|
+
const chunks = [];
|
|
4755
|
+
let offset = 0;
|
|
4756
|
+
let chunkLimit = firstChunkLimit;
|
|
4757
|
+
while (offset < text.length) {
|
|
4758
|
+
chunks.push(text.slice(offset, offset + chunkLimit));
|
|
4759
|
+
offset += chunkLimit;
|
|
4760
|
+
chunkLimit = TEXT_MESSAGE_LIMIT;
|
|
4761
|
+
}
|
|
4762
|
+
return chunks;
|
|
4763
|
+
}
|
|
4764
|
+
__name(splitTextChunks, "splitTextChunks");
|
|
4495
4765
|
var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
4496
4766
|
static {
|
|
4497
4767
|
__name(this, "DingtalkChannel");
|
|
4498
4768
|
}
|
|
4499
4769
|
client;
|
|
4770
|
+
atSender;
|
|
4771
|
+
connectionManager;
|
|
4500
4772
|
seenMessages = /* @__PURE__ */ new Map();
|
|
4773
|
+
mentionTargets = /* @__PURE__ */ new Map();
|
|
4774
|
+
sessionMentionTargets = /* @__PURE__ */ new Map();
|
|
4775
|
+
textReplySessions = /* @__PURE__ */ new Set();
|
|
4776
|
+
bufferedMentionTargets = /* @__PURE__ */ new Set();
|
|
4777
|
+
bufferedMentionTargetsBySession = /* @__PURE__ */ new Map();
|
|
4501
4778
|
dedupTimer;
|
|
4502
4779
|
/** Map conversationId → latest sessionWebhook URL for sending replies. */
|
|
4503
4780
|
webhooks = /* @__PURE__ */ new Map();
|
|
@@ -4517,23 +4794,60 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4517
4794
|
proactiveToken;
|
|
4518
4795
|
constructor(name, config, bridge, options) {
|
|
4519
4796
|
super(name, config, bridge, options);
|
|
4797
|
+
this.atSender = config["atSender"] === true;
|
|
4520
4798
|
if (!config.clientId || !config.clientSecret) {
|
|
4521
4799
|
throw new Error(`Channel "${name}" requires clientId and clientSecret for DingTalk.`);
|
|
4522
4800
|
}
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4801
|
+
const rawUseConnectionManager = config.useConnectionManager;
|
|
4802
|
+
if (rawUseConnectionManager !== void 0 && typeof rawUseConnectionManager !== "boolean") {
|
|
4803
|
+
throw new Error(`Channel "${name}" useConnectionManager must be a boolean.`);
|
|
4804
|
+
}
|
|
4805
|
+
const useConnectionManager = rawUseConnectionManager ?? true;
|
|
4806
|
+
this.client = this.createClient(useConnectionManager);
|
|
4807
|
+
if (useConnectionManager) {
|
|
4808
|
+
this.connectionManager = new DingtalkConnectionManager({
|
|
4809
|
+
initialClient: this.client,
|
|
4810
|
+
createClient: /* @__PURE__ */ __name(() => this.createClient(true), "createClient"),
|
|
4811
|
+
getSocket: /* @__PURE__ */ __name((client) => client.socket, "getSocket"),
|
|
4812
|
+
onClientChanged: /* @__PURE__ */ __name((client) => {
|
|
4813
|
+
this.client = client;
|
|
4814
|
+
}, "onClientChanged"),
|
|
4815
|
+
log: /* @__PURE__ */ __name((message) => {
|
|
4816
|
+
process.stderr.write(`[DingTalk:${this.name}] ${sanitizeLogText(message, 200)}
|
|
4817
|
+
`);
|
|
4818
|
+
}, "log")
|
|
4819
|
+
});
|
|
4820
|
+
}
|
|
4821
|
+
}
|
|
4822
|
+
createClient(useConnectionManager) {
|
|
4823
|
+
const client = new DWClient({
|
|
4824
|
+
clientId: this.config.clientId,
|
|
4825
|
+
clientSecret: this.config.clientSecret,
|
|
4826
|
+
keepAlive: !useConnectionManager
|
|
4526
4827
|
});
|
|
4527
|
-
|
|
4828
|
+
client.config.autoReconnect = !useConnectionManager;
|
|
4829
|
+
this.installStructuredDownstreamHandler(client);
|
|
4830
|
+
this.registerMessageHandler(client);
|
|
4831
|
+
return client;
|
|
4528
4832
|
}
|
|
4529
|
-
installStructuredDownstreamHandler() {
|
|
4530
|
-
const client =
|
|
4833
|
+
installStructuredDownstreamHandler(streamClient) {
|
|
4834
|
+
const client = streamClient;
|
|
4531
4835
|
client.debug = false;
|
|
4532
4836
|
client.onDownStream = (raw) => {
|
|
4533
4837
|
this.onDownStream(raw, client);
|
|
4534
4838
|
};
|
|
4535
4839
|
}
|
|
4840
|
+
registerMessageHandler(client) {
|
|
4841
|
+
client.registerCallbackListener(TOPIC_ROBOT, (msg) => {
|
|
4842
|
+
client.send(msg.headers.messageId, {
|
|
4843
|
+
status: EventAck.SUCCESS,
|
|
4844
|
+
message: "ok"
|
|
4845
|
+
});
|
|
4846
|
+
this.onMessage(msg);
|
|
4847
|
+
});
|
|
4848
|
+
}
|
|
4536
4849
|
onDownStream(raw, client) {
|
|
4850
|
+
this.connectionManager?.noteActivity(client);
|
|
4537
4851
|
const decoded = this.decodeDownStream(raw);
|
|
4538
4852
|
let msg;
|
|
4539
4853
|
try {
|
|
@@ -4567,6 +4881,9 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4567
4881
|
switch (type) {
|
|
4568
4882
|
case "SYSTEM":
|
|
4569
4883
|
this.callDownStreamHandler(client, "onSystem", normalizedMsg);
|
|
4884
|
+
if (topic === "disconnect") {
|
|
4885
|
+
this.connectionManager?.requestReconnect(client, "SYSTEM disconnect");
|
|
4886
|
+
}
|
|
4570
4887
|
break;
|
|
4571
4888
|
case "EVENT":
|
|
4572
4889
|
this.callDownStreamHandler(client, "onEvent", normalizedMsg);
|
|
@@ -4606,14 +4923,11 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4606
4923
|
return { text: String(raw), bytes: Buffer2.byteLength(String(raw)) };
|
|
4607
4924
|
}
|
|
4608
4925
|
async connect() {
|
|
4609
|
-
this.
|
|
4610
|
-
this.
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
this.onMessage(msg);
|
|
4615
|
-
});
|
|
4616
|
-
await this.client.connect();
|
|
4926
|
+
if (this.connectionManager) {
|
|
4927
|
+
await this.connectionManager.start();
|
|
4928
|
+
} else {
|
|
4929
|
+
await this.client.connect();
|
|
4930
|
+
}
|
|
4617
4931
|
this.dedupTimer = setInterval(() => {
|
|
4618
4932
|
const now = Date.now();
|
|
4619
4933
|
for (const [id, ts] of this.seenMessages) {
|
|
@@ -4633,7 +4947,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4633
4947
|
static isUnroutableGroupMessage(isGroup, conversationId) {
|
|
4634
4948
|
return isGroup && !conversationId;
|
|
4635
4949
|
}
|
|
4636
|
-
async
|
|
4950
|
+
async sendReply(chatId, text) {
|
|
4637
4951
|
const webhook = this.webhooks.get(chatId);
|
|
4638
4952
|
if (!webhook) {
|
|
4639
4953
|
process.stderr.write(`[DingTalk:${this.name}] No webhook for chatId ${chatId}, cannot send.
|
|
@@ -4663,6 +4977,45 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4663
4977
|
}
|
|
4664
4978
|
}
|
|
4665
4979
|
}
|
|
4980
|
+
async sendTextReply(chatId, text, atUserId) {
|
|
4981
|
+
const webhook = this.webhooks.get(chatId);
|
|
4982
|
+
if (!webhook)
|
|
4983
|
+
return;
|
|
4984
|
+
const mentionPrefix = atUserId ? `@${atUserId}
|
|
4985
|
+
|
|
4986
|
+
` : "";
|
|
4987
|
+
const chunks = splitTextChunks(text, TEXT_MESSAGE_LIMIT - mentionPrefix.length);
|
|
4988
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
4989
|
+
const isMention = i === 0 && atUserId !== void 0;
|
|
4990
|
+
const resp = await fetch(webhook, {
|
|
4991
|
+
method: "POST",
|
|
4992
|
+
headers: { "Content-Type": "application/json" },
|
|
4993
|
+
body: JSON.stringify({
|
|
4994
|
+
msgtype: "text",
|
|
4995
|
+
text: {
|
|
4996
|
+
content: isMention ? `${mentionPrefix}${chunks[i]}` : chunks[i]
|
|
4997
|
+
},
|
|
4998
|
+
...isMention ? { at: { atUserIds: [atUserId] } } : {}
|
|
4999
|
+
})
|
|
5000
|
+
});
|
|
5001
|
+
if (isMention && process.env["QWEN_CHANNEL_DEBUG_MENTIONS"] === "1") {
|
|
5002
|
+
const payload = await resp.clone().json().catch(() => void 0);
|
|
5003
|
+
const response = payload && typeof payload === "object" ? payload : {};
|
|
5004
|
+
const value = response["errcode"] ?? response["code"];
|
|
5005
|
+
const code = typeof value === "number" || typeof value === "string" ? String(value) : "unknown";
|
|
5006
|
+
process.stderr.write(`[DingTalk:${this.name}] mention delivery status=${resp.status} code=${code}
|
|
5007
|
+
`);
|
|
5008
|
+
}
|
|
5009
|
+
if (!resp.ok) {
|
|
5010
|
+
const detail = await resp.text().catch(() => "");
|
|
5011
|
+
process.stderr.write(`[DingTalk:${this.name}] sendTextReply failed: HTTP ${resp.status} ${detail}
|
|
5012
|
+
`);
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
async sendMessage(chatId, text) {
|
|
5017
|
+
await this.sendReply(chatId, text);
|
|
5018
|
+
}
|
|
4666
5019
|
supportsProactiveSend() {
|
|
4667
5020
|
return true;
|
|
4668
5021
|
}
|
|
@@ -4806,7 +5159,11 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4806
5159
|
}
|
|
4807
5160
|
this.activeReactionKeys.clear();
|
|
4808
5161
|
this.sessionReactionKeys.clear();
|
|
4809
|
-
this.
|
|
5162
|
+
if (this.connectionManager) {
|
|
5163
|
+
this.connectionManager.stop();
|
|
5164
|
+
} else {
|
|
5165
|
+
this.client.disconnect();
|
|
5166
|
+
}
|
|
4810
5167
|
process.stderr.write(`[DingTalk:${this.name}] Disconnected.
|
|
4811
5168
|
`);
|
|
4812
5169
|
}
|
|
@@ -4882,6 +5239,16 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4882
5239
|
}
|
|
4883
5240
|
/** Recall reactions left behind when a session dies without terminal lifecycle events. */
|
|
4884
5241
|
onSessionDied(sessionId) {
|
|
5242
|
+
const bufferedTargets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
5243
|
+
if (bufferedTargets) {
|
|
5244
|
+
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
5245
|
+
for (const messageId of bufferedTargets) {
|
|
5246
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5247
|
+
this.mentionTargets.delete(messageId);
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
this.sessionMentionTargets.delete(sessionId);
|
|
5251
|
+
this.textReplySessions.delete(sessionId);
|
|
4885
5252
|
const keys = this.sessionReactionKeys.get(sessionId);
|
|
4886
5253
|
if (keys) {
|
|
4887
5254
|
this.sessionReactionKeys.delete(sessionId);
|
|
@@ -4901,15 +5268,94 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4901
5268
|
return;
|
|
4902
5269
|
}
|
|
4903
5270
|
if (isTerminalTaskLifecycleType(event.type)) {
|
|
5271
|
+
if (event.messageId)
|
|
5272
|
+
this.mentionTargets.delete(event.messageId);
|
|
4904
5273
|
this.stopReaction(event.chatId, event.messageId, event.sessionId);
|
|
4905
5274
|
}
|
|
4906
5275
|
}
|
|
5276
|
+
onPromptBufferDropped(_chatId, sessionId, messageIds) {
|
|
5277
|
+
for (const messageId of messageIds) {
|
|
5278
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5279
|
+
this.mentionTargets.delete(messageId);
|
|
5280
|
+
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
5281
|
+
}
|
|
5282
|
+
}
|
|
5283
|
+
onPromptBufferDrained(_chatId, sessionId, messageIds) {
|
|
5284
|
+
for (const messageId of messageIds) {
|
|
5285
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5286
|
+
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
5287
|
+
}
|
|
5288
|
+
for (const messageId of messageIds.slice(0, -1)) {
|
|
5289
|
+
this.mentionTargets.delete(messageId);
|
|
5290
|
+
}
|
|
5291
|
+
}
|
|
5292
|
+
onPromptBuffered(_chatId, sessionId, messageId) {
|
|
5293
|
+
if (messageId && this.mentionTargets.has(messageId)) {
|
|
5294
|
+
this.bufferedMentionTargets.add(messageId);
|
|
5295
|
+
let targets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
5296
|
+
if (!targets) {
|
|
5297
|
+
targets = /* @__PURE__ */ new Set();
|
|
5298
|
+
this.bufferedMentionTargetsBySession.set(sessionId, targets);
|
|
5299
|
+
}
|
|
5300
|
+
targets.add(messageId);
|
|
5301
|
+
}
|
|
5302
|
+
}
|
|
4907
5303
|
onPromptStart(chatId, sessionId, messageId) {
|
|
5304
|
+
if (messageId) {
|
|
5305
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5306
|
+
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
5307
|
+
const atUserId = this.mentionTargets.get(messageId);
|
|
5308
|
+
this.mentionTargets.delete(messageId);
|
|
5309
|
+
if (this.atSender && atUserId) {
|
|
5310
|
+
this.sessionMentionTargets.set(sessionId, atUserId);
|
|
5311
|
+
this.textReplySessions.add(sessionId);
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
4908
5314
|
this.startReaction(chatId, messageId, sessionId);
|
|
4909
5315
|
}
|
|
5316
|
+
async handleInbound(envelope) {
|
|
5317
|
+
if (!await this.preflightInbound(envelope))
|
|
5318
|
+
return;
|
|
5319
|
+
const messageId = envelope.messageId;
|
|
5320
|
+
const atUserId = envelope[mentionTarget];
|
|
5321
|
+
if (this.atSender && messageId && atUserId) {
|
|
5322
|
+
this.mentionTargets.set(messageId, atUserId);
|
|
5323
|
+
}
|
|
5324
|
+
await this.processInbound(envelope);
|
|
5325
|
+
}
|
|
5326
|
+
async processInbound(envelope) {
|
|
5327
|
+
const messageId = envelope.messageId;
|
|
5328
|
+
try {
|
|
5329
|
+
await super.processInbound(envelope);
|
|
5330
|
+
} finally {
|
|
5331
|
+
if (messageId && !this.bufferedMentionTargets.has(messageId)) {
|
|
5332
|
+
this.mentionTargets.delete(messageId);
|
|
5333
|
+
}
|
|
5334
|
+
}
|
|
5335
|
+
}
|
|
5336
|
+
untrackBufferedMentionTarget(sessionId, messageId) {
|
|
5337
|
+
const targets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
5338
|
+
if (!targets)
|
|
5339
|
+
return;
|
|
5340
|
+
targets.delete(messageId);
|
|
5341
|
+
if (targets.size === 0)
|
|
5342
|
+
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
5343
|
+
}
|
|
4910
5344
|
onPromptEnd(chatId, sessionId, messageId) {
|
|
5345
|
+
this.sessionMentionTargets.delete(sessionId);
|
|
5346
|
+
this.textReplySessions.delete(sessionId);
|
|
4911
5347
|
this.stopReaction(chatId, messageId, sessionId);
|
|
4912
5348
|
}
|
|
5349
|
+
async sendResponseMessage(chatId, text, sessionId) {
|
|
5350
|
+
const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
|
|
5351
|
+
if (atUserId)
|
|
5352
|
+
this.sessionMentionTargets.delete(sessionId);
|
|
5353
|
+
if (this.textReplySessions.has(sessionId)) {
|
|
5354
|
+
await this.sendTextReply(chatId, text, atUserId);
|
|
5355
|
+
return;
|
|
5356
|
+
}
|
|
5357
|
+
await this.sendReply(chatId, text);
|
|
5358
|
+
}
|
|
4913
5359
|
/**
|
|
4914
5360
|
* Extract quoted/referenced message context from a reply.
|
|
4915
5361
|
* DingTalk provides this via text.repliedMsg (newer) or quoteMessage (legacy).
|
|
@@ -5081,6 +5527,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5081
5527
|
onMessage(downstream) {
|
|
5082
5528
|
try {
|
|
5083
5529
|
const data = typeof downstream.data === "string" ? JSON.parse(downstream.data) : downstream.data;
|
|
5530
|
+
this.logDebugPayload("DingTalk", data);
|
|
5084
5531
|
const dataMsgId = typeof data.msgId === "string" ? data.msgId : void 0;
|
|
5085
5532
|
const headerMsgId = typeof downstream.headers.messageId === "string" ? downstream.headers.messageId : void 0;
|
|
5086
5533
|
const msgId = dataMsgId || headerMsgId;
|
|
@@ -5135,6 +5582,9 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5135
5582
|
referencedText: quoted.referencedText
|
|
5136
5583
|
};
|
|
5137
5584
|
envelope.messageId = msgId;
|
|
5585
|
+
if (this.atSender && isGroup && senderStaffId) {
|
|
5586
|
+
envelope[mentionTarget] = senderStaffId;
|
|
5587
|
+
}
|
|
5138
5588
|
const processMessage = /* @__PURE__ */ __name(async () => {
|
|
5139
5589
|
if (content.downloadCodes.length > 0 && content.mediaType) {
|
|
5140
5590
|
await this.attachMedia(envelope, content.downloadCodes[0], content.mediaType, content.fileName);
|