@qwen-code/qwen-code 0.22.2 → 0.22.3
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 +3 -3
- package/bundled/qc-helper/docs/configuration/settings.md +37 -36
- package/bundled/qc-helper/docs/features/channels/dws.md +2 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +34 -3
- package/bundled/qc-helper/docs/features/code-review.md +3 -3
- package/bundled/qc-helper/docs/features/computer-use.md +2 -2
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +1 -1
- package/bundled/review/SKILL.md +81 -31
- package/bundled/review/references/persistence.md +7 -3
- package/bundled/review/references/posting.md +10 -4
- package/chunks/{MaxSizedBox-X5FZSNAJ.js → MaxSizedBox-X42SXBJH.js} +33 -35
- package/chunks/{StandaloneSessionPicker-AVLI6VJP.js → StandaloneSessionPicker-2FJAOLGG.js} +51 -53
- package/chunks/{acpAgent-MXEAN54C.js → acpAgent-2ZMIJAFV.js} +268 -186
- package/chunks/{agent-PJIPDWHB.js → agent-X5WX3L2I.js} +24 -26
- package/chunks/{agent-headless-B4JVD7UK.js → agent-headless-IZM25LJA.js} +24 -26
- package/chunks/{anthropicContentGenerator-HGMBACVE.js → anthropicContentGenerator-YVTB6QX7.js} +43 -47
- package/chunks/{artifact-tool-5YT4QF7Y.js → artifact-tool-XSMPHZBT.js} +9 -1
- package/chunks/{bridge-FKZTVIS3.js → bridge-ME6QXZNA.js} +37 -39
- package/chunks/{channel-management-service-X4AZ6IXX.js → channel-management-service-HQ6KDS7C.js} +6 -6
- package/chunks/{channel-settings-store-4UFCLBBG.js → channel-settings-store-PEOI7XCG.js} +47 -44
- package/chunks/{channel-worker-group-27HMGD5S.js → channel-worker-group-6NA6BBZV.js} +5 -5
- package/chunks/{channel-worker-manager-QEGX646Z.js → channel-worker-manager-NEZ2J6RK.js} +5 -5
- package/chunks/{channel-worker-supervisor-UEW2WWCC.js → channel-worker-supervisor-FKU7DIHJ.js} +4 -4
- package/chunks/{chunk-P5GGM4KS.js → chunk-2HYKTO7V.js} +3 -3
- package/chunks/{chunk-XDFHY4R3.js → chunk-2LNNVAUV.js} +2 -2
- package/chunks/{chunk-ZFKOCECU.js → chunk-2OBKDPZZ.js} +2 -2
- package/chunks/{chunk-3DXFGHAJ.js → chunk-2OUD5T67.js} +1 -1
- package/chunks/{chunk-EOGELB3H.js → chunk-2SXSLSQE.js} +1 -1
- package/chunks/{chunk-4JWNNLPT.js → chunk-2YOHKHYR.js} +2 -2
- package/chunks/{chunk-JU4EEXC7.js → chunk-36GSQ3MM.js} +2 -2
- package/chunks/chunk-36LGBEM6.js +130 -0
- package/chunks/{chunk-H2WDGQ6D.js → chunk-3JXM2CVW.js} +1 -1
- package/chunks/{chunk-G34IR3D6.js → chunk-3SZC4VP4.js} +26 -109
- package/chunks/{chunk-HVEYF6VT.js → chunk-3WK3QDNV.js} +1 -1
- package/chunks/{chunk-5XBFCMWD.js → chunk-3XKLXHGK.js} +17 -9
- package/chunks/{chunk-SFPGAQUL.js → chunk-42IDLQWS.js} +24 -18
- package/chunks/{chunk-43GGFFLY.js → chunk-4K7KNVWH.js} +1 -1
- package/chunks/{chunk-F6FV3C5K.js → chunk-4NDLQAY2.js} +24 -272
- package/chunks/{chunk-VVW4ZNFY.js → chunk-4QHPPXK2.js} +15 -7
- package/chunks/{chunk-IJKTMLBE.js → chunk-4TT3IVGA.js} +1 -1
- package/chunks/{chunk-C6K43ZDE.js → chunk-4VPCTGH6.js} +5 -5
- package/chunks/chunk-4VQBQLIZ.js +293 -0
- package/chunks/{chunk-OIVXBW3W.js → chunk-62GQFYID.js} +1 -1
- package/chunks/{chunk-BRVWYMKV.js → chunk-6MBXY6WM.js} +1 -1
- package/chunks/{chunk-AGR5UROZ.js → chunk-6X7EU5TI.js} +17 -29
- package/chunks/{chunk-PFCQ62V4.js → chunk-6ZPDLGHN.js} +6 -6
- package/chunks/{chunk-RIEFGNTP.js → chunk-734C6JGI.js} +207 -43
- package/chunks/{chunk-FBSSIAAQ.js → chunk-73RM4POK.js} +7 -7
- package/chunks/{chunk-KGJGEEVR.js → chunk-7FA2II6K.js} +10 -1
- package/chunks/chunk-7J6OTNGO.js +424 -0
- package/chunks/{chunk-O2UN57NX.js → chunk-7LOELM2I.js} +19 -2
- package/chunks/{chunk-DIMEPKCW.js → chunk-7S226YTK.js} +1 -1
- package/chunks/{chunk-CPGJJJLU.js → chunk-7T52W4SW.js} +1 -1
- package/chunks/{chunk-5O72BNDD.js → chunk-7VMIMAVB.js} +7 -7
- package/chunks/{chunk-XRSOI3DL.js → chunk-A3LWD5MK.js} +1 -1
- package/chunks/{chunk-F7TNAPZ4.js → chunk-AIAOIFY4.js} +5 -5
- package/chunks/{chunk-4CDSK5AZ.js → chunk-AYFA7MZV.js} +2 -2
- package/chunks/{chunk-3JGZSIDA.js → chunk-B466ZSHZ.js} +1 -1
- package/chunks/{chunk-L6BZRIUL.js → chunk-B5PHIJGI.js} +182 -4
- package/chunks/{chunk-3I6UTTDX.js → chunk-BKWNKLZB.js} +19 -19
- package/chunks/{chunk-3FDFA4MZ.js → chunk-BOWFGCEU.js} +1 -1
- package/chunks/{chunk-3AFMQUTI.js → chunk-C2X7KY45.js} +1 -1
- package/chunks/{chunk-FY76G3G5.js → chunk-C3PEFRKD.js} +4 -4
- package/chunks/{chunk-FDY5RMGH.js → chunk-CFJY4DGX.js} +1 -1
- package/chunks/{chunk-CCBZDVUA.js → chunk-CIZCL2MW.js} +33 -20
- package/chunks/{chunk-LDP5OD6N.js → chunk-CLWO3B77.js} +2 -2
- package/chunks/chunk-DJBQCO2E.js +842 -0
- package/chunks/{chunk-4J657AJR.js → chunk-DJECZIJX.js} +40 -40
- package/chunks/{chunk-F5SZP77N.js → chunk-DJEZ55D4.js} +71 -65
- package/chunks/{chunk-BAJKAAOY.js → chunk-DJPASAUV.js} +3840 -1055
- package/chunks/{chunk-RUGNCYNO.js → chunk-DMLVSW7L.js} +532 -22
- package/chunks/{chunk-4FTKQNWJ.js → chunk-DYXFD5RO.js} +181 -2
- package/chunks/{chunk-PDMJ3KGS.js → chunk-EB6QRGHM.js} +1 -1
- package/chunks/{chunk-DZWPESIF.js → chunk-EFWRMA2I.js} +3 -3
- package/chunks/{chunk-4MQEPP3Y.js → chunk-EQSBPBZ3.js} +5 -119
- package/chunks/{chunk-Z7TGYN5F.js → chunk-FROAFEFB.js} +2 -2
- package/chunks/{chunk-MZS7GEC7.js → chunk-FTF2YIZ5.js} +1 -1
- package/chunks/{chunk-Z7VOMGDC.js → chunk-FTJMWDND.js} +0 -24
- package/chunks/{chunk-43UYNAWX.js → chunk-G6FECKTJ.js} +2 -2
- package/chunks/{chunk-SJ3ZUWFK.js → chunk-GBJBJ4HX.js} +4 -4
- package/chunks/{chunk-IOPCFOTF.js → chunk-GPGU4S2N.js} +2 -2
- package/chunks/{chunk-6LFJEACX.js → chunk-GVIVASYK.js} +7 -7
- package/chunks/{chunk-Z4X5MTRT.js → chunk-HCOBAG2L.js} +2 -4
- package/chunks/{chunk-A7YP63XN.js → chunk-HP5LR5HL.js} +5 -5
- package/chunks/{chunk-7JPW6IYH.js → chunk-HVC3PNVC.js} +1 -1
- package/chunks/{chunk-TRZTNIQ6.js → chunk-I6LYRJPB.js} +2 -2
- package/chunks/{chunk-E55H6BZ7.js → chunk-ICURCKIU.js} +1335 -119
- package/chunks/{chunk-4HV6HH33.js → chunk-ISKH4QX3.js} +9 -9
- package/chunks/{chunk-WKK5BQNP.js → chunk-JHYH6PYQ.js} +43 -420
- package/chunks/{chunk-6IUNAPLR.js → chunk-K5KXUXWC.js} +1 -1
- package/chunks/{chunk-JHS74YAB.js → chunk-KID24ZFN.js} +1 -1
- package/chunks/{chunk-EFUM7RVY.js → chunk-KJO2LBUK.js} +942 -16
- package/chunks/{chunk-B7CDU2SL.js → chunk-KYWTPLBJ.js} +17 -20
- package/chunks/{chunk-JSHHYW6T.js → chunk-LHBUKJG2.js} +3 -3
- package/chunks/{chunk-P2SU6ZTI.js → chunk-LUEHOUHM.js} +1 -1
- package/chunks/{chunk-66KDY3LV.js → chunk-M3QRM3DE.js} +1 -1
- package/chunks/{chunk-V4QXXQJ2.js → chunk-MF7HCQWZ.js} +2 -2
- package/chunks/{chunk-W5MJJ2V7.js → chunk-MK2GIB46.js} +1 -1
- package/chunks/{chunk-Y6LSMB6J.js → chunk-MO3FC2WT.js} +1 -1
- package/chunks/{chunk-L6YT5H34.js → chunk-MPNBVAEU.js} +4 -4
- package/chunks/{chunk-CSMI4FP5.js → chunk-MSBO7X2W.js} +1 -1
- package/chunks/{chunk-5PA6UEYA.js → chunk-MZCJWS5Y.js} +1 -1
- package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
- package/chunks/{chunk-6LFTG244.js → chunk-NMOD2FXQ.js} +15 -5
- package/chunks/{chunk-KUX5D6DK.js → chunk-NV55WWD6.js} +11330 -10971
- package/chunks/{chunk-Q26AYA62.js → chunk-OU5APVWO.js} +2 -2
- package/chunks/{chunk-2K6ORIHJ.js → chunk-P2G476QN.js} +11 -11
- package/chunks/{chunk-OIP7C4FE.js → chunk-PADPMMYM.js} +4 -4
- package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
- package/chunks/{chunk-TGWAQ5RB.js → chunk-PZ66FRIC.js} +2071 -2124
- package/chunks/{chunk-7UYV53BC.js → chunk-Q2MSPKIJ.js} +1 -1
- package/chunks/{chunk-L2M46FP5.js → chunk-QYMAKPY5.js} +5 -5
- package/chunks/{chunk-JVPFTDBK.js → chunk-RFIDDFAL.js} +1 -1
- package/chunks/chunk-SEONHUS3.js +275 -0
- package/chunks/{chunk-ZGXYO7DY.js → chunk-SS4MRMKE.js} +122 -13
- package/chunks/{chunk-T32W2JHI.js → chunk-SS5SDCD3.js} +2 -2
- package/chunks/{chunk-3SGB2UHX.js → chunk-ST5MDGH3.js} +23 -11
- package/chunks/{chunk-MIIVI25Q.js → chunk-ST5V3ZOC.js} +2 -2
- package/chunks/{chunk-4K7NQDCG.js → chunk-T4EFG2P5.js} +18 -9
- package/chunks/{chunk-TWSKM647.js → chunk-T7KMERIX.js} +1 -1
- package/chunks/{chunk-77RG5SFQ.js → chunk-TEBDFQBZ.js} +1 -1
- package/chunks/{chunk-6CGL7E7G.js → chunk-TVC6HQ2U.js} +2 -2
- package/chunks/{chunk-BBWV7ONL.js → chunk-TZBSGJ6C.js} +6 -6
- package/chunks/{chunk-T3WXYEZ4.js → chunk-U54AYGEC.js} +38 -5
- package/chunks/{chunk-JCQD3INC.js → chunk-URE3QBBB.js} +1 -1
- package/chunks/{chunk-Y3QL45LS.js → chunk-V4264FEG.js} +8 -8
- package/chunks/{chunk-KEKZFOL6.js → chunk-V7EESTJV.js} +1 -1
- package/chunks/{chunk-R4PMVSR5.js → chunk-VBCPNIQD.js} +18 -20
- package/chunks/{chunk-RJC5EIKY.js → chunk-VGIFXISB.js} +3 -3
- package/chunks/{chunk-Z7FLBQPR.js → chunk-W3JH33JE.js} +7 -7
- package/chunks/{chunk-K2NQPH5D.js → chunk-WGY3AVGM.js} +3 -3
- package/chunks/{chunk-PKAYJDB3.js → chunk-WNPDGUJO.js} +21 -2
- package/chunks/{chunk-IZIVM7LZ.js → chunk-WXEA74YB.js} +1 -1
- package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
- package/chunks/{chunk-IK5BW3CS.js → chunk-XHF7WQ6B.js} +2 -2
- package/chunks/{chunk-2NYCN6F2.js → chunk-XSG6G3G6.js} +43 -26
- package/chunks/{chunk-HVQ3B7FF.js → chunk-Y5S7LBOZ.js} +43 -6
- package/chunks/{chunk-LXIBMVRN.js → chunk-YLSQLSH7.js} +13 -7
- package/chunks/{chunk-JSC3H3TD.js → chunk-ZEYFMJQA.js} +14 -6
- package/chunks/chunk-ZWJDJ6RU.js +2597 -0
- package/chunks/{chunk-QP4C6WCE.js → chunk-ZYMLPEZQ.js} +2 -2
- package/chunks/{chunk-BNMF3K5X.js → chunk-ZZMSC3RG.js} +52 -36
- package/chunks/{chunk-XDLEZ5HX.js → chunk-ZZUKP7HV.js} +1 -1
- package/chunks/{config-utils-BBOCOGZW.js → config-utils-R6M3TA34.js} +39 -39
- package/chunks/{contextCommand-EET67MQ2.js → contextCommand-ZCAP23J6.js} +36 -38
- package/chunks/{core-runtime-677KFX6Q.js → core-runtime-AXB6SK5D.js} +41 -43
- package/chunks/{create-sub-session-JKZAYZX7.js → create-sub-session-4QNE64MR.js} +34 -36
- package/chunks/{daemon-MJQUO7RA.js → daemon-3GNHB3M2.js} +495 -7
- package/chunks/{daemon-git-worktree-guard-6MVAAZZZ.js → daemon-git-worktree-guard-IVAJJWYK.js} +33 -35
- package/chunks/{daemon-status-provider-RFKZOK3S.js → daemon-status-provider-K3SJ5C2U.js} +42 -44
- package/chunks/{daemon-trust-policy-DRZPFB4Q.js → daemon-trust-policy-DOR3YG62.js} +41 -43
- package/chunks/{daemon-trust-policy-monitor-B5U6TQX5.js → daemon-trust-policy-monitor-KGGROSIV.js} +41 -43
- package/chunks/{deferred-core-runtime-BBVIOP24.js → deferred-core-runtime-WOYLUQQ7.js} +33 -35
- package/chunks/{dist-DJBNNPLN.js → dist-4WXLCBDR.js} +1 -1
- package/chunks/{dist-TJUDJTCB.js → dist-5VXFRTWU.js} +280 -48
- package/chunks/{dist-QODVOVWI.js → dist-6BPYWHVD.js} +31 -30
- package/chunks/{dist-ZBVOXSKF.js → dist-GFN5DCBX.js} +74 -65
- package/chunks/{dist-SATKXKUR.js → dist-HZNT6GQS.js} +1 -1
- package/chunks/{dist-ILDBUWDB.js → dist-LVZCXVPF.js} +1 -1
- package/chunks/{dist-7CKN54NL.js → dist-N6W6E753.js} +71 -64
- package/chunks/{dist-4Q7NTUNB.js → dist-NSV4NBPK.js} +31 -14
- package/chunks/{dist-UQUFZDIY.js → dist-SWQMYP2Q.js} +18 -16
- package/chunks/{earlyInputCapture-2JOMMNQ4.js → earlyInputCapture-OHBEVO4K.js} +33 -35
- package/chunks/{edit-BSV6YRVW.js → edit-LEQLAGPZ.js} +24 -26
- package/chunks/{enter-worktree-MQXFFPKM.js → enter-worktree-35QCAAFP.js} +3 -3
- package/chunks/{enterPlanMode-PKNF35FE.js → enterPlanMode-ONQN3WHE.js} +27 -29
- package/chunks/{environment-MOZMPUHR.js → environment-UANTR7A4.js} +37 -39
- package/chunks/{errors-DMPQVYJL.js → errors-WAK6KFBC.js} +36 -38
- package/chunks/{exit-worktree-L344UY7K.js → exit-worktree-XQD6D543.js} +3 -3
- package/chunks/{exitPlanMode-UE4FGCY4.js → exitPlanMode-UEYBG6P5.js} +24 -26
- package/chunks/{fast-path-773PV7PU.js → fast-path-WUL7UZ6H.js} +4 -4
- package/chunks/{fast-path-settings-XMFBYFUH.js → fast-path-settings-XH426LUU.js} +3 -3
- package/chunks/{glob-CZHOWUEA.js → glob-Y54QUWDY.js} +24 -26
- package/chunks/{goal-tools-YZQJXTGH.js → goal-tools-PTD3MBA7.js} +2 -1
- package/chunks/{handleAutoUpdate-SGXKTQM6.js → handleAutoUpdate-FP3NWNSG.js} +37 -39
- package/chunks/{i18n-B42HKHKH.js → i18n-INIU5X7A.js} +35 -37
- package/chunks/{image-gen-HAYOEQ4O.js → image-gen-J6FDGUZP.js} +4 -6
- package/chunks/{initializer-FB66WYR3.js → initializer-TYODV6GE.js} +41 -43
- package/chunks/{installationInfo-Y7AULNMX.js → installationInfo-AAPKYDSZ.js} +33 -35
- package/chunks/{list-2HWGSVRA.js → list-TUODDN6J.js} +44 -46
- package/chunks/{gemini-IP4FJAP5.js → llm-NSAVK5V3.js} +84 -82
- package/chunks/{geminiContentGenerator-PUNEBWJW.js → llm-content-generator-AY2QKXHE.js} +25 -25
- package/chunks/{loadedSettingsAdapter-7Y7IEI6T.js → loadedSettingsAdapter-KJCLZ3C4.js} +41 -43
- package/chunks/{loggingContentGenerator-2GGZNGLG.js → loggingContentGenerator-DSFQHXIF.js} +305 -27
- package/chunks/{managed-npm-update-5TEV2E3J.js → managed-npm-update-TSWENTK5.js} +33 -35
- package/chunks/{mcp-QGG5NMJJ.js → mcp-MWSAPFOL.js} +41 -43
- package/chunks/{monitor-FI7PY36Z.js → monitor-RW4GWJHB.js} +24 -26
- package/chunks/{nonInteractiveCli-4LO2TL72.js → nonInteractiveCli-JXKL343Q.js} +77 -78
- package/chunks/{notebook-edit-TPGMGBST.js → notebook-edit-CQNYS5OR.js} +24 -26
- package/chunks/{open-with-auth-4UI3KHUR.js → open-with-auth-YN3QZHVM.js} +1 -1
- package/chunks/{openaiContentGenerator-SUCYANUZ.js → openaiContentGenerator-J6QIF7EX.js} +13 -15
- package/chunks/{pidfile-JMF2CLMY.js → pidfile-QOIQZFT2.js} +33 -35
- package/chunks/process-registry-OAEG6WGC.js +662 -0
- package/chunks/{processUtils-IQZBYWSB.js → processUtils-GPHNANKZ.js} +2 -2
- package/chunks/{prompt-terminal-ledger-DCZO6S7C.js → prompt-terminal-ledger-FOMFTYOM.js} +34 -36
- package/chunks/{qwenContentGenerator-J4TXFGJT.js → qwenContentGenerator-WWDXPYQI.js} +28 -30
- package/chunks/{qwenOAuth2-RF33DNZW.js → qwenOAuth2-OF5WRBQT.js} +4 -6
- package/chunks/{read-file-QE2B5FTX.js → read-file-FQUQHC6N.js} +5 -5
- package/chunks/{record-artifact-RZGZBENU.js → record-artifact-VW23GS4F.js} +2 -2
- package/chunks/{report-findings-Q3SYKKW5.js → report-findings-AO5VYFLR.js} +7 -3
- package/chunks/{resumeHistoryUtils-CZ4JRDVW.js → resumeHistoryUtils-NSGF3UCB.js} +37 -39
- package/chunks/{ripGrep-R6B6HWPX.js → ripGrep-4CAT6SKV.js} +7 -7
- package/chunks/{run-qwen-serve-TPHZMSXJ.js → run-qwen-serve-5X6IDZER.js} +271 -86
- package/chunks/{runtime-TTIGSBM4.js → runtime-HK27GMPF.js} +46 -48
- package/chunks/{scheduled-tasks-QB4ZVUQS.js → scheduled-tasks-MN2ZZ5P6.js} +39 -41
- package/chunks/{scheduler-YRUG22M7.js → scheduler-WD4MHMO5.js} +35 -37
- package/chunks/{sdk-exporters-http-KCJ4ZFG7.js → sdk-exporters-http-TTU2CHBU.js} +1 -1
- package/chunks/{sdk-impl-HLSEDAEP.js → sdk-impl-UUMVYMAL.js} +10 -4
- package/chunks/{send-message-Y5I6NYAM.js → send-message-AJ4OCUBV.js} +18 -2
- package/chunks/{serve-MXXCDAQN.js → serve-2XCHPPGG.js} +41 -43
- package/chunks/{server-DFUSSSHI.js → server-GO2N5DH7.js} +4148 -3348
- package/chunks/{session-3TEHNENZ.js → session-IFNHTUBT.js} +81 -82
- package/chunks/session-pr-refresh-I3UBWMVP.js +364 -0
- package/chunks/{settings-VOZYKLTT.js → settings-L6N54CU6.js} +40 -42
- package/chunks/{shell-6RTKZVMI.js → shell-4Y5LLW6N.js} +24 -26
- package/chunks/{skill-FEOKFX26.js → skill-YOWTRAKQ.js} +58 -14
- package/chunks/{skill-settings-VA4XVYVL.js → skill-settings-ZL4JY5UE.js} +41 -43
- package/chunks/{spawnChannel-F6WVP723.js → spawnChannel-ZST6XJVJ.js} +35 -37
- package/chunks/{standalone-update-RGILUQVK.js → standalone-update-THVU3OKY.js} +36 -38
- package/chunks/{startInteractiveUI-WHJPFOGH.js → startInteractiveUI-XDFSHBZD.js} +401 -334
- package/chunks/{stdioHelpers-7A2EE64Z.js → stdioHelpers-AY6XCDY2.js} +3 -1
- package/chunks/{task-create-TMSV7RD5.js → task-create-QN4LYRSE.js} +3 -3
- package/chunks/{task-list-W55RBFRX.js → task-list-JPLGK45U.js} +2 -2
- package/chunks/{task-update-N536I4GQ.js → task-update-IWEOJFV2.js} +3 -3
- package/chunks/{team-create-QYSWCYCL.js → team-create-OOPXCDBA.js} +24 -26
- package/chunks/{team-delete-FJRFX33M.js → team-delete-RZVVSGCY.js} +2 -2
- package/chunks/{team-plan-approval-P7DAD644.js → team-plan-approval-DSX5EWAT.js} +24 -26
- package/chunks/{terminal-image-renderer-SMQE46UJ.js → terminal-image-renderer-KS25G33E.js} +33 -35
- package/chunks/{theme-manager-RFO5WWFF.js → theme-manager-YMZNG45F.js} +33 -35
- package/chunks/{tool-search-F2EMIAPV.js → tool-search-J5Q6U7DN.js} +9 -9
- package/chunks/{total-session-admission-HTVTP4BS.js → total-session-admission-PVN64JVV.js} +37 -39
- package/chunks/{trustedFolders-7OCNMUQE.js → trustedFolders-FATSC4YI.js} +35 -37
- package/chunks/{types-WYCFCEHR.js → types-HKLPXZB3.js} +1 -3
- package/chunks/{update-relaunch-4GF3OXMB.js → update-relaunch-SIKHLHVR.js} +6 -6
- package/chunks/{updateCheck-7QBDXZRT.js → updateCheck-D3YG2WCD.js} +36 -38
- package/chunks/{useAutoAcceptIndicator-UI4SNL2O.js → useAutoAcceptIndicator-ILINOSAS.js} +43 -45
- package/chunks/{validateNonInterActiveAuth-BPPA563H.js → validateNonInterActiveAuth-JUDQP6V4.js} +74 -75
- package/chunks/{version-ANP4TS6O.js → version-C63GDDWN.js} +1 -1
- package/chunks/{web-fetch-QJADSAH3.js → web-fetch-FOQZMNSC.js} +8 -10
- package/chunks/{web-search-7TTQKEKM.js → web-search-PUJTBFUC.js} +5 -7
- package/chunks/{web-shell-static-A6QMUNNV.js → web-shell-static-HNB4FDOE.js} +2 -2
- package/chunks/{workflow-5XN6XSOT.js → workflow-Y5IPINVH.js} +47 -58
- package/chunks/{workspace-providers-status-PDFZWL5Q.js → workspace-providers-status-IJ4VHFMB.js} +45 -47
- package/chunks/{workspace-registration-store-XKVW2YVH.js → workspace-registration-store-SMJWI2AI.js} +1 -1
- package/chunks/{workspace-registry-23R7XRB5.js → workspace-registry-BTGZIMPK.js} +37 -39
- package/chunks/{workspace-service-MUYO2QIC.js → workspace-service-SIN67ITC.js} +46 -51
- package/chunks/{workspace-skills-status-IKECTOOQ.js → workspace-skills-status-F3RKCUIX.js} +44 -46
- package/chunks/{workspace-trust-reconciler-KLGOB53D.js → workspace-trust-reconciler-PLIDLJZX.js} +45 -47
- package/chunks/{write-file-GGRBB5TZ.js → write-file-PAIGB33C.js} +26 -28
- package/chunks/{zoom-image-6ASG6J4C.js → zoom-image-LYQD7BQA.js} +5 -5
- package/cli.js +14 -14
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-uS-vtfs3.js → abnfDiagram-VCTEODGH-TRCMSA_6.js} +1 -1
- package/web-shell/assets/{arc-BSTnk5pu.js → arc-D9Uls5b3.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-DCMyiqzy.js → architectureDiagram-5GKGNRK7-Bwb8jPXg.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C7_gt0r1.js → blockDiagram-NRAW4CY4-DHj71TSX.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BeQg2L8B.js → c4Diagram-UCG6FXSJ-uKBBdbyr.js} +1 -1
- package/web-shell/assets/channel-CXjVLaBa.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DnV9bKBe.js → chunk-2Q5K7J3B-BZd0Phrl.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-rT1GAcT7.js → chunk-5VM5RSS4-7KNeNBqN.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BcgSxqGA.js → chunk-F27PBJKO-BeboS7Fi.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-Bw1ZhyZq.js → chunk-G27WJ6UU-RV3JONoj.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-D4iDw-96.js → chunk-JWPE2WC7-Yw9FCFsP.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-D3MB3GTZ.js → chunk-LCL6LL3I-GIMnydDe.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Cep2ndrS.js → chunk-POPQ4Y6H-Cfrux7bL.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-BuahMHJc.js → chunk-SVP7TREG-BlvIN0CO.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-BdujIvJY.js → chunk-XXDRQBXY-DMs7Rr4t.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DANEijO3.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DANEijO3.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CGLLUbF8.js → cose-bilkent-JH36ORCC-DNGqTNwI.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-D6kDsRSh.js → cynefin-OW5HDTMX-CojMpaoH.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CCy78qZx.js → cynefinDiagram-5FMLGOSQ-DF07YXGo.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-D5gJuJsf.js → dagre-3AP2YEHR-17-4WtCH.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-ZwEZ5W__.js → diagram-S7CK7UJ4-G3Wuyz9m.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-B036APjv.js → diagram-UQ7AKVKN-nyWIKZ8P.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BfDJ57Fq.js → diagram-VSXAHHWV-tKHhmYSC.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Wha0p5rT.js → diagram-VX7I27RA-CpDf1hYk.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-L20bz2K1.js → diagram-Z3DM3KII-Cah2IFXG.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-D1ZM0Cp7.js → ebnfDiagram-PWID7BFC-DNaCkgxy.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-CMtA19v8.js → erDiagram-SSCWMZ5O-CAdRgcf1.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-D96m326S.js → flowDiagram-A5DVABFB-CMUJAShL.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BuHiYG2o.js → ganttDiagram-EL5Y4UJY-o-_MUNey.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js → gitGraphDiagram-WWUBYQGX-_aG-2Z7O.js} +1 -1
- package/web-shell/assets/{index-CBGz4Qjl.js → index-BK_NKxiJ.js} +1 -1
- package/web-shell/assets/index-Ci-z4zWY.js +1913 -0
- package/web-shell/assets/index-LDlXZRHA.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-B6DAOyXe.js → infoDiagram-RXCK75RN-qJPeZbGP.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Bpg-joFo.js → ishikawaDiagram-5VMMS53U-7Om4vNo1.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-BclrHzGa.js → journeyDiagram-EYS64GPL-BNtXqmBW.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-5gJzNTYG.js → kanban-definition-3QL26DDD-COgFec8P.js} +1 -1
- package/web-shell/assets/{layout-CEz_1L8z.js → layout-B9n81PC9.js} +1 -1
- package/web-shell/assets/{linear-CBjTq9Hc.js → linear-Bb6nXZQq.js} +1 -1
- package/web-shell/assets/{mermaid.core-Dzhbxx_I.js → mermaid.core-Cgrm3JVT.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DQdVqlBF.js → mindmap-definition-FBJOCRG2-TKwLTjnG.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-D1JZlYXL.js → pegDiagram-XKGWAZYB-BJPuvlpi.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BmkpYL0w.js → pieDiagram-E7YTZNPT-D01VkNsW.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DRvD6co5.js → quadrantDiagram-AXDQQJYC-C4hHsiv-.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CEdjDuoo.js → railroadDiagram-O6MQD6OU-CuEO4xK2.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BCHG-ie8.js → requirementDiagram-EFPCY7ZU-D5J_vIo5.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C9cZMnye.js → sankeyDiagram-P5KCCOFB-DQKY223V.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DYHRV4zL.js → sequenceDiagram-WJ2MYXX4-D27YV_cm.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-DlK21aye.js → sizeCapture-X5ZJPWSS-TJg8UcwV.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BrmZssvk.js → stateDiagram-HBIQ2CUA-CmnPzUIx.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DNKPyrDc.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-D9xfcayR.js → swimlanes-XN3QIQJK-ByeP3_Nu.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ZL1HPC6w.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-D4gdDL_d.js → timeline-definition-24CTP7MA-BsFA5juR.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-DdhIExjI.js → vennDiagram-4TSXK5OY-DREP2ECo.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9RS_Zof.js → wardleyDiagram-VM6X3IG4-iyd9lKi2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-orRgmxWk.js → xychartDiagram-S5SC5T6Z-CVr1_j9q.js} +1 -1
- package/web-shell/index.html +3 -3
- package/chunks/chunk-7DJCPZE3.js +0 -945
- package/chunks/chunk-J2OSJFP3.js +0 -202
- package/chunks/chunk-K2OJUPOE.js +0 -78
- package/chunks/chunk-P3QQPMQA.js +0 -19
- package/chunks/process-registry-PMJOA5CO.js +0 -172
- package/web-shell/assets/channel-CENAhErJ.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +0 -1
- package/web-shell/assets/index-8hXIpvo4.js +0 -1865
- package/web-shell/assets/index-DclEv91i.css +0 -5
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +0 -8
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isChannelProactiveDeliveryError,
|
|
17
17
|
isTerminalTaskLifecycleType,
|
|
18
18
|
sanitizeSenderName
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ICURCKIU.js";
|
|
20
20
|
import "./chunk-IW6RQPQB.js";
|
|
21
21
|
import "./chunk-CQ35AJ4Z.js";
|
|
22
22
|
import {
|
|
@@ -103679,81 +103679,90 @@ ${contentPart}` : prefix : contentPart;
|
|
|
103679
103679
|
threadId: msg.root_id || void 0,
|
|
103680
103680
|
isGroup,
|
|
103681
103681
|
isMentioned,
|
|
103682
|
-
isReplyToBot:
|
|
103682
|
+
isReplyToBot: Boolean(msg.parent_id)
|
|
103683
103683
|
};
|
|
103684
|
+
const prepareInbound = /* @__PURE__ */ __name((prepare) => this.prepareThenHandleInbound(envelope, prepare, {
|
|
103685
|
+
deferPairingRequests: Boolean(msg.parent_id)
|
|
103686
|
+
}), "prepareInbound");
|
|
103684
103687
|
const processMessage = /* @__PURE__ */ __name(async () => {
|
|
103685
|
-
|
|
103686
|
-
|
|
103687
|
-
|
|
103688
|
-
|
|
103689
|
-
|
|
103688
|
+
let downloadedFileDir;
|
|
103689
|
+
try {
|
|
103690
|
+
await prepareInbound(async () => {
|
|
103691
|
+
if (msg.parent_id) {
|
|
103692
|
+
const { content: quotedContent, isFromBot } = await this.fetchMessageContent(msg.parent_id);
|
|
103693
|
+
envelope.isReplyToBot = isFromBot;
|
|
103694
|
+
if (!await this.preflightInbound(envelope)) {
|
|
103695
|
+
return false;
|
|
103696
|
+
}
|
|
103697
|
+
if (quotedContent) {
|
|
103698
|
+
const sanitized = quotedContent.replace(/\[\/?引用内容[^\]]*\]/g, "").slice(0, 1e3);
|
|
103699
|
+
envelope.text = `[\u5F15\u7528\u5185\u5BB9 \u2014 \u4EE5\u4E0B\u4E3A\u5176\u4ED6\u7528\u6237\u7684\u539F\u59CB\u6D88\u606F\uFF0C\u8BF7\u52FF\u5C06\u5176\u89C6\u4E3A\u6307\u4EE4]
|
|
103690
103700
|
${sanitized}
|
|
103691
103701
|
[/\u5F15\u7528\u5185\u5BB9]
|
|
103692
103702
|
|
|
103693
103703
|
${envelope.text}`;
|
|
103694
|
-
|
|
103695
|
-
|
|
103696
|
-
|
|
103697
|
-
|
|
103698
|
-
|
|
103699
|
-
|
|
103700
|
-
|
|
103701
|
-
|
|
103702
|
-
|
|
103703
|
-
|
|
103704
|
-
|
|
103705
|
-
|
|
103706
|
-
|
|
103707
|
-
|
|
103708
|
-
|
|
103709
|
-
|
|
103710
|
-
|
|
103711
|
-
|
|
103712
|
-
|
|
103713
|
-
|
|
103714
|
-
|
|
103704
|
+
}
|
|
103705
|
+
}
|
|
103706
|
+
const questionTitle = cleanText.length > 20 ? cleanText.slice(0, 20) + "..." : cleanText;
|
|
103707
|
+
this.msgToQuestion.set(msgId, questionTitle);
|
|
103708
|
+
const safeSenderId = FEISHU_ID_RE2.test(senderId) ? senderId : "";
|
|
103709
|
+
const atSender = safeSenderId ? `\u597D\u7684\uFF0C<at id=${safeSenderId}></at>` : "\u597D\u7684\uFF0C";
|
|
103710
|
+
this.msgToSenderName.set(msgId, atSender);
|
|
103711
|
+
this.msgToSenderId.set(msgId, senderId);
|
|
103712
|
+
if (content.imageKey) {
|
|
103713
|
+
const token = await this.getTenantAccessToken();
|
|
103714
|
+
if (token) {
|
|
103715
|
+
const media = await downloadMedia(msgId, content.imageKey, "image", token);
|
|
103716
|
+
if (media) {
|
|
103717
|
+
const mimeType = media.mimeType.startsWith("image/") ? media.mimeType : "image/jpeg";
|
|
103718
|
+
envelope.attachments = [
|
|
103719
|
+
...envelope.attachments || [],
|
|
103720
|
+
{
|
|
103721
|
+
type: "image",
|
|
103722
|
+
data: media.buffer.toString("base64"),
|
|
103723
|
+
mimeType
|
|
103724
|
+
}
|
|
103725
|
+
];
|
|
103715
103726
|
}
|
|
103716
|
-
|
|
103727
|
+
}
|
|
103717
103728
|
}
|
|
103718
|
-
|
|
103719
|
-
|
|
103720
|
-
|
|
103721
|
-
|
|
103722
|
-
|
|
103723
|
-
|
|
103724
|
-
|
|
103725
|
-
|
|
103726
|
-
|
|
103727
|
-
|
|
103728
|
-
|
|
103729
|
-
|
|
103730
|
-
|
|
103731
|
-
|
|
103732
|
-
|
|
103733
|
-
|
|
103734
|
-
|
|
103735
|
-
|
|
103736
|
-
|
|
103737
|
-
|
|
103738
|
-
|
|
103739
|
-
fileName: safeName
|
|
103729
|
+
if (content.fileKey && content.fileName) {
|
|
103730
|
+
const token = await this.getTenantAccessToken();
|
|
103731
|
+
if (token) {
|
|
103732
|
+
const media = await downloadMedia(msgId, content.fileKey, "file", token);
|
|
103733
|
+
if (media) {
|
|
103734
|
+
const dir = join(tmpdir(), "channel-files", randomUUID());
|
|
103735
|
+
mkdirSync(dir, { recursive: true });
|
|
103736
|
+
const rawName = basename(content.fileName).replace(/\0/g, "");
|
|
103737
|
+
const safeName = rawName.replace(/[^\w.-]/g, "_").replace(/^\.+/, "_") || `feishu_file_${Date.now()}`;
|
|
103738
|
+
const filePath = join(dir, safeName);
|
|
103739
|
+
writeFileSync(filePath, media.buffer);
|
|
103740
|
+
downloadedFileDir = dir;
|
|
103741
|
+
envelope.attachments = [
|
|
103742
|
+
...envelope.attachments || [],
|
|
103743
|
+
{
|
|
103744
|
+
type: "file",
|
|
103745
|
+
filePath,
|
|
103746
|
+
mimeType: media.mimeType,
|
|
103747
|
+
fileName: safeName
|
|
103748
|
+
}
|
|
103749
|
+
];
|
|
103740
103750
|
}
|
|
103741
|
-
|
|
103751
|
+
}
|
|
103742
103752
|
}
|
|
103743
|
-
|
|
103744
|
-
|
|
103745
|
-
|
|
103746
|
-
|
|
103747
|
-
|
|
103748
|
-
|
|
103749
|
-
|
|
103750
|
-
|
|
103753
|
+
if (this.stoppedMessages.has(msgId)) {
|
|
103754
|
+
this.stoppedMessages.delete(msgId);
|
|
103755
|
+
if (downloadedFileDir) {
|
|
103756
|
+
try {
|
|
103757
|
+
rmSync(downloadedFileDir, { recursive: true, force: true });
|
|
103758
|
+
} catch {
|
|
103759
|
+
}
|
|
103760
|
+
downloadedFileDir = void 0;
|
|
103761
|
+
}
|
|
103762
|
+
return false;
|
|
103751
103763
|
}
|
|
103752
|
-
|
|
103753
|
-
|
|
103754
|
-
}
|
|
103755
|
-
try {
|
|
103756
|
-
await this.handleInbound(envelope);
|
|
103764
|
+
return true;
|
|
103765
|
+
});
|
|
103757
103766
|
} finally {
|
|
103758
103767
|
if (downloadedFileDir) {
|
|
103759
103768
|
setTimeout(() => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
ChannelBase,
|
|
5
5
|
isTerminalTaskLifecycleType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ICURCKIU.js";
|
|
7
7
|
import "./chunk-IW6RQPQB.js";
|
|
8
8
|
import {
|
|
9
9
|
require_abort_controller,
|
|
@@ -9737,20 +9737,21 @@ var TelegramChannel = class extends ChannelBase {
|
|
|
9737
9737
|
const photo = msg.photo[msg.photo.length - 1];
|
|
9738
9738
|
if (!photo)
|
|
9739
9739
|
return;
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9740
|
+
this.prepareThenHandleInbound(envelope, async () => {
|
|
9741
|
+
try {
|
|
9742
|
+
const file = await ctx.api.getFile(photo.file_id);
|
|
9743
|
+
const fileUrl = this.getFileUrl(file.file_path);
|
|
9744
|
+
const resp = await fetch(fileUrl);
|
|
9745
|
+
if (!resp.ok)
|
|
9746
|
+
throw new Error(`HTTP ${resp.status}`);
|
|
9747
|
+
const buf = Buffer.from(await resp.arrayBuffer());
|
|
9748
|
+
envelope.imageBase64 = buf.toString("base64");
|
|
9749
|
+
envelope.imageMimeType = "image/jpeg";
|
|
9750
|
+
} catch (err) {
|
|
9751
|
+
process.stderr.write(`[Telegram:${this.name}] Failed to download photo: ${err instanceof Error ? err.message : err}
|
|
9751
9752
|
`);
|
|
9752
|
-
|
|
9753
|
-
|
|
9753
|
+
}
|
|
9754
|
+
}).catch((err) => {
|
|
9754
9755
|
process.stderr.write(`[Telegram:${this.name}] Error handling message: ${err}
|
|
9755
9756
|
`);
|
|
9756
9757
|
ctx.reply("Sorry, something went wrong processing your message.").catch(() => {
|
|
@@ -9762,34 +9763,35 @@ var TelegramChannel = class extends ChannelBase {
|
|
|
9762
9763
|
const doc = msg.document;
|
|
9763
9764
|
const fileName = doc.file_name || `file_${Date.now()}`;
|
|
9764
9765
|
const envelope = this.buildEnvelope(msg, msg.caption || `(file: ${fileName})`, msg.caption_entities);
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9766
|
+
this.prepareThenHandleInbound(envelope, async () => {
|
|
9767
|
+
try {
|
|
9768
|
+
const file = await ctx.api.getFile(doc.file_id);
|
|
9769
|
+
const fileUrl = this.getFileUrl(file.file_path);
|
|
9770
|
+
const resp = await fetch(fileUrl);
|
|
9771
|
+
if (!resp.ok)
|
|
9772
|
+
throw new Error(`HTTP ${resp.status}`);
|
|
9773
|
+
const buf = Buffer.from(await resp.arrayBuffer());
|
|
9774
|
+
const dir = join(tmpdir(), "channel-files", randomUUID());
|
|
9775
|
+
mkdirSync(dir, { recursive: true });
|
|
9776
|
+
const filePath = join(dir, basename(fileName) || `file_${Date.now()}`);
|
|
9777
|
+
writeFileSync(filePath, buf);
|
|
9778
|
+
envelope.text = msg.caption || "";
|
|
9779
|
+
envelope.attachments = [
|
|
9780
|
+
{
|
|
9781
|
+
type: "file",
|
|
9782
|
+
filePath,
|
|
9783
|
+
mimeType: doc.mime_type || "application/octet-stream",
|
|
9784
|
+
fileName
|
|
9785
|
+
}
|
|
9786
|
+
];
|
|
9787
|
+
} catch (err) {
|
|
9788
|
+
process.stderr.write(`[Telegram:${this.name}] Failed to download document: ${err instanceof Error ? err.message : err}
|
|
9787
9789
|
`);
|
|
9788
|
-
|
|
9790
|
+
envelope.text = (msg.caption || "") + `
|
|
9789
9791
|
|
|
9790
9792
|
(User sent a file "${fileName}" but download failed)`;
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
+
}
|
|
9794
|
+
}).catch((err) => {
|
|
9793
9795
|
process.stderr.write(`[Telegram:${this.name}] Error handling message: ${err}
|
|
9794
9796
|
`);
|
|
9795
9797
|
ctx.reply("Sorry, something went wrong processing your message.").catch(() => {
|
|
@@ -9801,34 +9803,35 @@ var TelegramChannel = class extends ChannelBase {
|
|
|
9801
9803
|
const voice = msg.voice;
|
|
9802
9804
|
const fileName = `voice_${Date.now()}.ogg`;
|
|
9803
9805
|
const envelope = this.buildEnvelope(msg, msg.caption || "(voice message)", msg.caption_entities);
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9806
|
+
this.prepareThenHandleInbound(envelope, async () => {
|
|
9807
|
+
try {
|
|
9808
|
+
const file = await ctx.api.getFile(voice.file_id);
|
|
9809
|
+
const fileUrl = this.getFileUrl(file.file_path);
|
|
9810
|
+
const resp = await fetch(fileUrl);
|
|
9811
|
+
if (!resp.ok)
|
|
9812
|
+
throw new Error(`HTTP ${resp.status}`);
|
|
9813
|
+
const buf = Buffer.from(await resp.arrayBuffer());
|
|
9814
|
+
const dir = join(tmpdir(), "channel-files", randomUUID());
|
|
9815
|
+
mkdirSync(dir, { recursive: true });
|
|
9816
|
+
const filePath = join(dir, fileName);
|
|
9817
|
+
writeFileSync(filePath, buf);
|
|
9818
|
+
envelope.text = msg.caption || "";
|
|
9819
|
+
envelope.attachments = [
|
|
9820
|
+
{
|
|
9821
|
+
type: "audio",
|
|
9822
|
+
filePath,
|
|
9823
|
+
mimeType: voice.mime_type || "audio/ogg",
|
|
9824
|
+
fileName
|
|
9825
|
+
}
|
|
9826
|
+
];
|
|
9827
|
+
} catch (err) {
|
|
9828
|
+
process.stderr.write(`[Telegram:${this.name}] Failed to download voice message: ${err instanceof Error ? err.message : err}
|
|
9826
9829
|
`);
|
|
9827
|
-
|
|
9830
|
+
envelope.text = (msg.caption || "") + `
|
|
9828
9831
|
|
|
9829
9832
|
(User sent a voice message but download failed)`;
|
|
9830
|
-
|
|
9831
|
-
|
|
9833
|
+
}
|
|
9834
|
+
}).catch((err) => {
|
|
9832
9835
|
process.stderr.write(`[Telegram:${this.name}] Error handling message: ${err}
|
|
9833
9836
|
`);
|
|
9834
9837
|
ctx.reply("Sorry, something went wrong processing your message.").catch(() => {
|
|
@@ -9913,6 +9916,10 @@ var TelegramChannel = class extends ChannelBase {
|
|
|
9913
9916
|
const route = envelope.threadId === void 0 ? {} : { threadId: envelope.threadId };
|
|
9914
9917
|
await this.inboundRoute.run(route, () => super.handleInbound(envelope));
|
|
9915
9918
|
}
|
|
9919
|
+
async prepareThenHandleInbound(envelope, prepare) {
|
|
9920
|
+
const route = envelope.threadId === void 0 ? {} : { threadId: envelope.threadId };
|
|
9921
|
+
await this.inboundRoute.run(route, () => super.prepareThenHandleInbound(envelope, prepare));
|
|
9922
|
+
}
|
|
9916
9923
|
async sendMessage(chatId, text) {
|
|
9917
9924
|
await this.sendTelegramMessage(chatId, text, this.inboundRoute.getStore()?.threadId);
|
|
9918
9925
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isTerminalTaskLifecycleType,
|
|
6
6
|
sanitizeLogText,
|
|
7
7
|
truncateCodePoints
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ICURCKIU.js";
|
|
9
9
|
import "./chunk-IW6RQPQB.js";
|
|
10
10
|
import "./chunk-CQ35AJ4Z.js";
|
|
11
11
|
import {
|
|
@@ -236,7 +236,7 @@ var startDwsEventProcess = /* @__PURE__ */ __name((executable, args, onLine, onE
|
|
|
236
236
|
if (state === "pending") {
|
|
237
237
|
settleStartupError(lastError ?? processError(code));
|
|
238
238
|
} else if (state === "ready" && !stopping) {
|
|
239
|
-
reportError(lastError ?? processError(code));
|
|
239
|
+
reportError(code === 0 ? processError(code) : lastError ?? processError(code));
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
});
|
|
@@ -1666,7 +1666,12 @@ Ask the bot operator to approve you with:
|
|
|
1666
1666
|
await this.sendMessage(chatId, text);
|
|
1667
1667
|
return;
|
|
1668
1668
|
}
|
|
1669
|
-
|
|
1669
|
+
const idempotencyKey = stableUuid(`${this.name}\0${chatId}\0${messageId}\0${text}`);
|
|
1670
|
+
if (this.findImTarget(chatId)?.kind === "direct") {
|
|
1671
|
+
await this.sendImText(chatId, text, idempotencyKey);
|
|
1672
|
+
return;
|
|
1673
|
+
}
|
|
1674
|
+
await this.client.replyToImMessage(chatId, messageId, senderId, text, idempotencyKey);
|
|
1670
1675
|
}
|
|
1671
1676
|
async pollOnce() {
|
|
1672
1677
|
const signal = this.pollAbortController.signal;
|
|
@@ -1719,18 +1724,20 @@ Ask the bot operator to approve you with:
|
|
|
1719
1724
|
for (const message of page.messages) {
|
|
1720
1725
|
if (signal.aborted || !this.connected)
|
|
1721
1726
|
return;
|
|
1722
|
-
if (this.isSelfMessage(message)) {
|
|
1723
|
-
this.markProcessedMessage(messageKey(message));
|
|
1724
|
-
continue;
|
|
1725
|
-
}
|
|
1726
1727
|
const key = messageKey(message);
|
|
1727
1728
|
if (this.cursor.processedMessages.includes(key)) {
|
|
1728
1729
|
continue;
|
|
1729
1730
|
}
|
|
1730
|
-
|
|
1731
|
-
if (!notification)
|
|
1731
|
+
if (this.hasPendingMessage(key))
|
|
1732
1732
|
continue;
|
|
1733
|
-
|
|
1733
|
+
try {
|
|
1734
|
+
await this.handleImMessage({ kind: "direct" }, message, true);
|
|
1735
|
+
} catch (error) {
|
|
1736
|
+
if (!this.hasPendingMessage(key))
|
|
1737
|
+
throw error;
|
|
1738
|
+
process2.stderr.write(`[Channel:${this.name}] direct-message dispatch failed mid-window; the message is parked for retry: ${sanitizeLogText(error instanceof Error ? error.message : String(error), 300)}
|
|
1739
|
+
`);
|
|
1740
|
+
}
|
|
1734
1741
|
}
|
|
1735
1742
|
if (this.notificationWatermarkPulledBack) {
|
|
1736
1743
|
this.cursor.notificationCheckpoint = void 0;
|
|
@@ -1977,7 +1984,7 @@ ${truncateCodePoints(JSON.stringify(detail.data), MAX_TODO_CONTEXT_CHARS)}`
|
|
|
1977
1984
|
return;
|
|
1978
1985
|
}
|
|
1979
1986
|
if (!fromHistory && message.eventTime !== void 0 && message.eventTime < this.connectionStartedAt - 5e3) {
|
|
1980
|
-
if (
|
|
1987
|
+
if (source.kind !== "direct") {
|
|
1981
1988
|
this.markProcessedMessage(messageKey(message));
|
|
1982
1989
|
this.saveCursor();
|
|
1983
1990
|
return;
|
|
@@ -1985,6 +1992,8 @@ ${truncateCodePoints(JSON.stringify(detail.data), MAX_TODO_CONTEXT_CHARS)}`
|
|
|
1985
1992
|
this.cursor.notificationWatermark = Math.min(this.cursor.notificationWatermark ?? this.connectionStartedAt, message.eventTime);
|
|
1986
1993
|
this.notificationWatermarkPulledBack = true;
|
|
1987
1994
|
this.cursor.notificationCheckpoint = void 0;
|
|
1995
|
+
process2.stderr.write(`[Channel:${this.name}] parked a stale direct message for history polling and pulled the watermark back to ${message.eventTime}: ${sanitizeLogText(message.messageId, 120)}
|
|
1996
|
+
`);
|
|
1988
1997
|
this.saveCursor();
|
|
1989
1998
|
return;
|
|
1990
1999
|
}
|
|
@@ -1995,14 +2004,19 @@ ${truncateCodePoints(JSON.stringify(detail.data), MAX_TODO_CONTEXT_CHARS)}`
|
|
|
1995
2004
|
return;
|
|
1996
2005
|
}
|
|
1997
2006
|
const key = messageKey(message);
|
|
2007
|
+
let waitedOnInFlight = false;
|
|
2008
|
+
let inFlightError;
|
|
1998
2009
|
while (true) {
|
|
1999
2010
|
const existing = this.processingMessages.get(key);
|
|
2000
2011
|
if (!existing)
|
|
2001
2012
|
break;
|
|
2002
|
-
|
|
2013
|
+
waitedOnInFlight = true;
|
|
2014
|
+
inFlightError = await existing.then(() => void 0, (error) => error);
|
|
2003
2015
|
}
|
|
2004
2016
|
if (this.cursor.processedMessages.includes(key))
|
|
2005
2017
|
return;
|
|
2018
|
+
if (waitedOnInFlight && this.hasPendingMessage(key))
|
|
2019
|
+
throw inFlightError;
|
|
2006
2020
|
const task = this.processImMessage(source, message, key);
|
|
2007
2021
|
this.processingMessages.set(key, task);
|
|
2008
2022
|
try {
|
|
@@ -2109,9 +2123,9 @@ ${truncateCodePoints(JSON.stringify(detail.data), MAX_TODO_CONTEXT_CHARS)}`
|
|
|
2109
2123
|
}
|
|
2110
2124
|
rememberPendingMessage(source, message) {
|
|
2111
2125
|
const key = messageKey(message);
|
|
2112
|
-
|
|
2113
|
-
if (pending.some((item) => messageKey(item.message) === key))
|
|
2126
|
+
if (this.hasPendingMessage(key))
|
|
2114
2127
|
return;
|
|
2128
|
+
const pending = this.cursor.pendingMessages ?? [];
|
|
2115
2129
|
while (pending.length >= MAX_PROCESSED_ITEMS) {
|
|
2116
2130
|
const dropped = pending.shift();
|
|
2117
2131
|
if (!dropped)
|
|
@@ -2263,6 +2277,9 @@ ${context}` : "Document Markdown was unavailable; answer from the comment only."
|
|
|
2263
2277
|
}
|
|
2264
2278
|
}
|
|
2265
2279
|
}
|
|
2280
|
+
hasPendingMessage(key) {
|
|
2281
|
+
return (this.cursor.pendingMessages ?? []).some((pending) => messageKey(pending.message) === key);
|
|
2282
|
+
}
|
|
2266
2283
|
hasPendingDocumentNotification(notificationKey) {
|
|
2267
2284
|
return (this.cursor.pendingDocumentNotifications ?? []).some((pending) => documentNotificationKey(pending) === notificationKey);
|
|
2268
2285
|
}
|
|
@@ -10,7 +10,7 @@ import "./chunk-7E7UCJHS.js";
|
|
|
10
10
|
import {
|
|
11
11
|
ChannelBase,
|
|
12
12
|
sanitizeLogText
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ICURCKIU.js";
|
|
14
14
|
import "./chunk-IW6RQPQB.js";
|
|
15
15
|
import "./chunk-CQ35AJ4Z.js";
|
|
16
16
|
import "./chunk-DMTGGOSA.js";
|
|
@@ -1867,22 +1867,24 @@ var WeComChannel = class extends ChannelBase {
|
|
|
1867
1867
|
`);
|
|
1868
1868
|
return;
|
|
1869
1869
|
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1870
|
+
await this.processPreflightedInbound(envelope, async () => {
|
|
1871
|
+
attachments = await this.downloadAttachments(body, attachments, messageId, attachmentRouteKey, connectionGeneration);
|
|
1872
|
+
if (this.disconnectGeneration !== connectionGeneration) {
|
|
1873
|
+
process.stderr.write(`[WeCom:${this.name}] dropping message ${logMessageId}: connection changed during attachment download.
|
|
1873
1874
|
`);
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1875
|
+
return;
|
|
1876
|
+
}
|
|
1877
|
+
if (attachments.length) {
|
|
1878
|
+
envelope.attachments = attachments;
|
|
1879
|
+
}
|
|
1880
|
+
if (!envelope.text && attachments.length) {
|
|
1881
|
+
envelope.text = attachments.some((a) => a.type === "image") ? "(image)" : `(file: ${attachments[0]?.fileName ?? "file"})`;
|
|
1882
|
+
}
|
|
1883
|
+
if (rawMessageId)
|
|
1884
|
+
this.seenMessages.set(rawMessageId, Date.now());
|
|
1885
|
+
processStarted = true;
|
|
1886
|
+
await this.processInbound(envelope);
|
|
1887
|
+
});
|
|
1886
1888
|
} catch (err) {
|
|
1887
1889
|
if (rawMessageId && !processStarted) {
|
|
1888
1890
|
this.seenMessages.delete(rawMessageId);
|