stableclaw 2026.4.6 → 2026.4.8
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/README.md +22 -290
- package/package.json +1 -73
- package/dist/.buildstamp +0 -1
- package/dist/abort-C9luPDzM.js +0 -192
- package/dist/abort-cutoff-B1ws4nOb.js +0 -56
- package/dist/abort-cutoff.runtime-DyRUNN6p.js +0 -20
- package/dist/abort-cutoff.runtime.js +0 -1
- package/dist/abort-primitives-CGyFwJ93.js +0 -92
- package/dist/abort-signal-CrrraMAi.js +0 -13
- package/dist/abort.runtime-oBiooAFx.js +0 -2
- package/dist/abort.runtime.js +0 -1
- package/dist/access-DIqrGWVo.js +0 -81
- package/dist/access-control-DfV6HWO9.js +0 -152
- package/dist/account-action-gate-eHi2MB4J.js +0 -12
- package/dist/account-core-DOelA7Wl.js +0 -26
- package/dist/account-helpers-CafpxP7V.js +0 -1
- package/dist/account-helpers-jJOgsae3.js +0 -102
- package/dist/account-id-DXal1kRJ.js +0 -1
- package/dist/account-inspect-CfagweUE.js +0 -158
- package/dist/account-inspect-DOt4IDX6.js +0 -92
- package/dist/account-inspect-pnXre-7b.js +0 -81
- package/dist/account-lookup-CLJxpfHr.js +0 -17
- package/dist/account-resolution-CbKUJkzG.js +0 -30
- package/dist/account-selection-B8a_DqXo.js +0 -222
- package/dist/account-snapshot-fields-mr-1u321.js +0 -130
- package/dist/account-summary-DA6ds0Hk.js +0 -36
- package/dist/accounts-CO-lK8jJ.js +0 -150
- package/dist/accounts-D419O6Gq.js +0 -2
- package/dist/accounts-DKMLcV4g.js +0 -132
- package/dist/accounts-DdiZwn14.js +0 -57
- package/dist/accounts-SWhOQhoA.js +0 -58
- package/dist/accounts-iR2U_Vs4.js +0 -41
- package/dist/accounts-jsSym1md.js +0 -102
- package/dist/accounts-p4Eir-wB.js +0 -107
- package/dist/accounts-uAWNlC7q.js +0 -94
- package/dist/accounts-x23pAGjm.js +0 -137
- package/dist/accounts.runtime-PJOhs60R.js +0 -2
- package/dist/accounts.runtime.js +0 -1
- package/dist/ack-reactions-fcKs7CQ_.js +0 -43
- package/dist/acp-cli-ByWTIhFx.js +0 -2207
- package/dist/acp-runtime-D7wrReOP.js +0 -8
- package/dist/acp-stateful-target-driver-DY2EfkQt.js +0 -60
- package/dist/action-runtime-BdRtmydq.js +0 -318
- package/dist/action-runtime-DvNB5A61.js +0 -72
- package/dist/action-runtime-api-BnVs42oX.js +0 -1028
- package/dist/actions-CUYHtUqe.js +0 -531
- package/dist/actions.runtime-BBrSlYkH.js +0 -18
- package/dist/actions.runtime-DB4aKmBO.js +0 -5
- package/dist/actions.runtime-bdKprwSE.js +0 -2
- package/dist/actions.runtime.js +0 -1
- package/dist/active-listener-SB9ihcaC.js +0 -46
- package/dist/agent-command-C_MGil8o.js +0 -1457
- package/dist/agent-list-MRXQwyo0.js +0 -52
- package/dist/agent-media-payload-DDTSvr-n.js +0 -17
- package/dist/agent-paths-D711oayD.js +0 -12
- package/dist/agent-runner-utils-DEYzwZHa.js +0 -182
- package/dist/agent-runner.runtime-v2uIsAVy.js +0 -2218
- package/dist/agent-runner.runtime.js +0 -1
- package/dist/agent-runtime-Cz19IsmJ.js +0 -142
- package/dist/agent-s4m0Xp6V.js +0 -2
- package/dist/agent-scope-rWWUivuC.js +0 -215
- package/dist/agent-tools-login-DU1gQC9-.js +0 -57
- package/dist/agents/auth-profiles.runtime.js +0 -7
- package/dist/agents/pi-model-discovery-runtime.js +0 -2
- package/dist/agents-B2W3IoEe.js +0 -888
- package/dist/agents-DmE3LRim.js +0 -5
- package/dist/agents.config-D6XoJFQ-.js +0 -3
- package/dist/agents.config-Ui_tQc3C.js +0 -121
- package/dist/allow-from-Bj0HDNYh.js +0 -20
- package/dist/allow-from-CJwSUt_K.js +0 -9
- package/dist/allow-from-xOap1t02.js +0 -62
- package/dist/allow-list-DeRUbyj4.js +0 -319
- package/dist/allowed-updates-aOgPxM0g.js +0 -31
- package/dist/allowlist-config-edit-Ch2EvAYo.js +0 -279
- package/dist/allowlist-match-Dm6AqFEs.js +0 -63
- package/dist/ansi-B_0KjIJj.js +0 -54
- package/dist/anthropic-vertex-Stff_3_3.js +0 -21
- package/dist/anthropic-vertex-stream-DgR8-m-G.js +0 -653
- package/dist/api-7Pf2fGBp.js +0 -11
- package/dist/api-B80kCRiV.js +0 -11
- package/dist/api-B8_Wwelx.js +0 -2
- package/dist/api-BLI24uxW.js +0 -2
- package/dist/api-BLSg8PM8.js +0 -2
- package/dist/api-BRy2h4ZA.js +0 -2
- package/dist/api-BU_YBaOK.js +0 -3
- package/dist/api-BXQjqvPC.js +0 -2
- package/dist/api-BY9iT-AK.js +0 -106
- package/dist/api-BipiQQoS.js +0 -2
- package/dist/api-Bk5mFOju.js +0 -10
- package/dist/api-BrsLZRXn.js +0 -3
- package/dist/api-C16j1Xno.js +0 -2
- package/dist/api-CGtiPyfv.js +0 -8358
- package/dist/api-CHIsf5Wl.js +0 -21
- package/dist/api-CP9q4gi6.js +0 -19
- package/dist/api-CWPDpJCM.js +0 -2
- package/dist/api-CaMdAP9T.js +0 -2
- package/dist/api-CftMlodx.js +0 -5
- package/dist/api-Cpj_QQAF.js +0 -5
- package/dist/api-D13mhDzE.js +0 -33
- package/dist/api-DGcbqpSh.js +0 -2
- package/dist/api-DIGFhGqm.js +0 -30
- package/dist/api-DNxTJAiA.js +0 -5
- package/dist/api-DasNTWRo.js +0 -2
- package/dist/api-Dn7n2sWC.js +0 -74
- package/dist/api-Drq06O1M2.js +0 -6
- package/dist/api-OOJHubHS.js +0 -77
- package/dist/api-XH46JouJ.js +0 -2
- package/dist/api-builder-uuKvRs_O.js +0 -66
- package/dist/api-e3cIcFaV.js +0 -1
- package/dist/api-fetch-CvBBI8q8.js +0 -35
- package/dist/api-key-rotation-BCssmYGp.js +0 -150
- package/dist/api-rPpH8518.js +0 -322
- package/dist/api-w-46PN0B.js +0 -2
- package/dist/apply-DfjUTAkv.js +0 -485
- package/dist/apply.runtime-B-srtEUl.js +0 -2
- package/dist/apply.runtime-DOG87kW8.js +0 -166
- package/dist/apply.runtime.js +0 -1
- package/dist/approval-native-CI9-iVJa.js +0 -79
- package/dist/approval-native-runtime-2AVlvrdL.js +0 -399
- package/dist/approval-renderers-BTKeDNRo.js +0 -87
- package/dist/approval-runtime-DIA8ohXa.js +0 -262
- package/dist/archive-BaCqqQP1.js +0 -537
- package/dist/arg-split-get0R_Yr.js +0 -38
- package/dist/artifacts-DXKlQp1z.js +0 -52
- package/dist/assistant-error-format-CFSPB8qt.js +0 -109
- package/dist/async-lock-QqhPYwhW.js +0 -19
- package/dist/attachment-normalize-CMMyswNa.js +0 -921
- package/dist/audio-BxqNDSFq.js +0 -53
- package/dist/audio-DZWA6M9B.js +0 -41
- package/dist/audit-86J-sIQq.js +0 -54
- package/dist/audit-D9O3O-41.js +0 -86
- package/dist/audit-DwAT-Kzg.js +0 -892
- package/dist/audit-channel.allow-from.runtime-DmuUvr2f.js +0 -5
- package/dist/audit-channel.allow-from.runtime.js +0 -1
- package/dist/audit-channel.collect.runtime-B76LAkrF.js +0 -528
- package/dist/audit-channel.collect.runtime.js +0 -1
- package/dist/audit-channel.discord.runtime-qM5u1Hnl.js +0 -5
- package/dist/audit-channel.discord.runtime.js +0 -1
- package/dist/audit-channel.telegram.runtime-DpwmRUPy.js +0 -8
- package/dist/audit-channel.telegram.runtime.js +0 -1
- package/dist/audit-channel.zalouser.runtime-CzlFZYsv.js +0 -5
- package/dist/audit-channel.zalouser.runtime.js +0 -1
- package/dist/audit-extra.async-BupKW2BB.js +0 -820
- package/dist/audit-fs-B3GdTjId.js +0 -375
- package/dist/audit-membership-runtime-n195y1jy.js +0 -55
- package/dist/audit.deep.runtime-2gZPpwj8.js +0 -2
- package/dist/audit.deep.runtime.js +0 -1
- package/dist/audit.nondeep.runtime-6MT8p_25.js +0 -831
- package/dist/audit.nondeep.runtime.js +0 -1
- package/dist/audit.runtime-jdG0-1Bq.js +0 -7
- package/dist/audit.runtime.js +0 -1
- package/dist/auth-CmL8nlqP.js +0 -371
- package/dist/auth-Zya_1BCc.js +0 -181
- package/dist/auth-choice-CSSk-2VN.js +0 -69
- package/dist/auth-choice-Uyll2O8p.js +0 -341
- package/dist/auth-choice-legacy-5XgU4yCZ.js +0 -44
- package/dist/auth-choice-options-DTRb6fq4.js +0 -98
- package/dist/auth-choice-prompt-BAQTSD2R.js +0 -36
- package/dist/auth-choice-prompt-D6qkTw8h.js +0 -2
- package/dist/auth-choice-x5Cm9EXp.js +0 -3
- package/dist/auth-choice.apply-helpers-CtKCiOT4.js +0 -2
- package/dist/auth-choice.plugin-providers.runtime-BVH7Kq_W.js +0 -11
- package/dist/auth-choice.plugin-providers.runtime.js +0 -1
- package/dist/auth-health-BBleirOY.js +0 -165
- package/dist/auth-mode-policy-BD7_M2AG.js +0 -18
- package/dist/auth-profiles-B0SpzBJv.js +0 -440
- package/dist/auth-rate-limit-OkMcM1wH.js +0 -119
- package/dist/auth-store-Bro-SY1-.js +0 -242
- package/dist/avatar-policy-pho6U35i.js +0 -67
- package/dist/backend-config-CNAjcjho.js +0 -311
- package/dist/backoff-nvVV-tHk.js +0 -18
- package/dist/backup-create-CkkM1HNg.js +0 -462
- package/dist/backup-health-BWSliymu.js +0 -59
- package/dist/banner-DPWatUan.js +0 -370
- package/dist/banner-lDKgB6uE.js +0 -2
- package/dist/base-session-key-CRSigEPk.js +0 -14
- package/dist/binaries-CWBYavgU.js +0 -2
- package/dist/binaries-sPf-9aLM.js +0 -11
- package/dist/binding-registry-BkSvI4jO.js +0 -520
- package/dist/binding-targets-CdIq3brX.js +0 -99
- package/dist/bindings-AuReyzvX.js +0 -21
- package/dist/bindings-CYhLRcr8.js +0 -69
- package/dist/block-reply-pipeline-GSCCinHx.js +0 -266
- package/dist/block-streaming-4outFa6R.js +0 -107
- package/dist/bluebubbles-CorTCHc9.js +0 -64
- package/dist/bluebubbles-D2WymlOg.js +0 -235
- package/dist/bluebubbles-policy-C3d8eqhQ.js +0 -13
- package/dist/bonjour-cache-cleanup-BZJ-GrdX.js +0 -126
- package/dist/boolean-BEhDlAk_.js +0 -29
- package/dist/boolean-param-B807dWHx.js +0 -13
- package/dist/bot-BM1bybV7.js +0 -4268
- package/dist/bot-message-context-CdedyAq_.js +0 -2
- package/dist/bot-message-context-DKGx6N8p.js +0 -1175
- package/dist/bot-message-context.runtime-ClW1x1V5.js +0 -7
- package/dist/bot-message-context.runtime.js +0 -1
- package/dist/bot-message-context.session.runtime-BWjdkRuf.js +0 -12
- package/dist/bot-message-context.session.runtime.js +0 -1
- package/dist/bot-native-commands.delivery.runtime-CgfbR-Nj.js +0 -3
- package/dist/bot-native-commands.delivery.runtime.js +0 -1
- package/dist/bot-native-commands.runtime-DCz7w0aK.js +0 -11
- package/dist/bot-native-commands.runtime.js +0 -1
- package/dist/boundary-file-read-DB4ibbUg.js +0 -192
- package/dist/brave-web-search-provider-B7m_Mprt.js +0 -441
- package/dist/brew-B9JEV5Jj.js +0 -44
- package/dist/browser-config-D_OlwMzh.js +0 -226
- package/dist/browser-open-C9FOO4U_.js +0 -94
- package/dist/browser-runtime-CnWZ_eLQ.js +0 -185
- package/dist/browser-support-Cdp2Gr_6.js +0 -34
- package/dist/btw-command-CPUGSdlD.js +0 -16
- package/dist/build-info.json +0 -5
- package/dist/bundle-lsp-CCIAK1od.js +0 -93
- package/dist/bundled/boot-md/HOOK.md +0 -20
- package/dist/bundled/boot-md/handler.js +0 -180
- package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +0 -42
- package/dist/bundled/command-logger/HOOK.md +0 -122
- package/dist/bundled/command-logger/handler.js +0 -56
- package/dist/bundled/session-memory/HOOK.md +0 -108
- package/dist/bundled/session-memory/handler.js +0 -196
- package/dist/bundled/workflow-summary/HOOK.md +0 -123
- package/dist/bundled/workflow-summary/handler.js +0 -115
- package/dist/bundled-capability-metadata-BpPgIy_5.js +0 -40
- package/dist/bundled-compat-BLlVmkDi.js +0 -64
- package/dist/bundled-sources-BQTCt2mJ.js +0 -53
- package/dist/button-types-B3_mzf8P.js +0 -54
- package/dist/cache-controls-DBdT4I-H.js +0 -40
- package/dist/call-dy-GwrXS.js +0 -649
- package/dist/call-ti-nPnzT.js +0 -2
- package/dist/canvas-host/a2ui/.bundle.hash +0 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +0 -14896
- package/dist/canvas-host/a2ui/index.html +0 -307
- package/dist/capability-provider-runtime-CFUC5NbJ.js +0 -40
- package/dist/catalog-5PPtilI5.js +0 -274
- package/dist/channel-2EW4xzvV.js +0 -788
- package/dist/channel-BiRtGLF8.js +0 -1135
- package/dist/channel-C3AVw0Nl.js +0 -883
- package/dist/channel-CPe2XmyD.js +0 -1217
- package/dist/channel-CVFWRvjf.js +0 -337
- package/dist/channel-Cs0onQ6d.js +0 -4976
- package/dist/channel-D18v9r53.js +0 -1661
- package/dist/channel-D2n2s8Le.js +0 -208
- package/dist/channel-DWKApPW2.js +0 -454
- package/dist/channel-Depm5C-f.js +0 -800
- package/dist/channel-DwTcZxFU.js +0 -1129
- package/dist/channel-LT5vI3EK.js +0 -361
- package/dist/channel-XgThIGmf.js +0 -698
- package/dist/channel-account-context-CWd3uN_m.js +0 -104
- package/dist/channel-actions-DSvaYD1T.js +0 -39
- package/dist/channel-bQKtZIt6.js +0 -599
- package/dist/channel-catalog.json +0 -3
- package/dist/channel-config-D0eO5f5m.js +0 -115
- package/dist/channel-config-helpers-CLFL8FLU.js +0 -482
- package/dist/channel-config-primitives-DwsP66Ak.js +0 -3
- package/dist/channel-config-schema-DsguzRfd.js +0 -6
- package/dist/channel-config-writes-DQZOOZZ8.js +0 -1
- package/dist/channel-configured-B6WgvouH.js +0 -108
- package/dist/channel-feedback-DiLm9hqS.js +0 -257
- package/dist/channel-inbound-CXD3aSAK.js +0 -30
- package/dist/channel-issues-C-49e607.js +0 -13
- package/dist/channel-lifecycle-BnjeZxB6.js +0 -286
- package/dist/channel-lifecycle.core-Cn3zeU0h.js +0 -69
- package/dist/channel-options-DXJ7b7Ye.js +0 -39
- package/dist/channel-pairing-Byr3MFbN.js +0 -68
- package/dist/channel-plugin-common-D2EFcTg8.js +0 -4
- package/dist/channel-plugin-ids-DiOSWlnO.js +0 -56
- package/dist/channel-plugin-resolution-SMHmHx5v.js +0 -144
- package/dist/channel-policy-B-XKjrjK.js +0 -32
- package/dist/channel-reply-pipeline-BtBcBCNu.js +0 -16
- package/dist/channel-resolution-Du3EtWh1.js +0 -60
- package/dist/channel-runtime-F8_51GPp.js +0 -9
- package/dist/channel-selection-Bz3pl14y.js +0 -125
- package/dist/channel-send-result-CyfDCXJG.js +0 -40
- package/dist/channel-setup-yWpuHwhm.js +0 -51
- package/dist/channel-shared-gHcJ8n-f.js +0 -58
- package/dist/channel-status-CyoeLEnj.js +0 -2
- package/dist/channel-summary-5zHt-z1E.js +0 -139
- package/dist/channel-summary-B_fbXZ3l.js +0 -2
- package/dist/channel-target-DHO43h-I.js +0 -157
- package/dist/channel-targets-C8ZPfJmV.js +0 -18
- package/dist/channel-y-bXwYi3.js +0 -783
- package/dist/channel.runtime-B2SEUCf0.js +0 -14
- package/dist/channel.runtime-BF5qdBeA.js +0 -5
- package/dist/channel.runtime-BPaq6EO_.js +0 -108
- package/dist/channel.runtime-BV8FGxyb.js +0 -373
- package/dist/channel.runtime-CGnamSTC.js +0 -125
- package/dist/channel.runtime-CRNf20Ct.js +0 -80
- package/dist/channel.runtime-CRSWVexY.js +0 -335
- package/dist/channel.runtime-Cg6DmoTp.js +0 -783
- package/dist/channel.runtime-CpHTHeFR.js +0 -309
- package/dist/channel.runtime-ZdhCn8XI.js +0 -3315
- package/dist/channel.runtime-cXufT2kW.js +0 -61
- package/dist/channel.runtime.js +0 -1
- package/dist/channel.setup-Bq1vgxXZ.js +0 -279
- package/dist/channels-BZC2kp_G.js +0 -409
- package/dist/channels-CMeYB3bY.js +0 -1134
- package/dist/channels-cli-BIzqRmuu.js +0 -246
- package/dist/channels-status-issues-DqTdy1lq.js +0 -17
- package/dist/chat-envelope-DlGbh8k2.js +0 -158
- package/dist/chat-meta-wVbKo1sw.js +0 -700
- package/dist/chat-target-prefixes-DCF8a_Lp.js +0 -156
- package/dist/chat-type-DXjGtE-S.js +0 -10
- package/dist/chunk-CW-a7Cfh.js +0 -334
- package/dist/chunk-CrysgU_F.js +0 -36
- package/dist/chutes-oauth-Bh3BTMMG.js +0 -127
- package/dist/cjk-chars-Dl_Ko7yI.js +0 -50
- package/dist/clack-prompter-C5PtKpUH.js +0 -112
- package/dist/clawbot-cli-CgHyabtp.js +0 -9
- package/dist/clawhub-CDs2LE11.js +0 -263
- package/dist/clawhub-CO6YnoQZ.js +0 -163
- package/dist/cli/daemon-cli.js +0 -9
- package/dist/cli-CoOwN-V4.js +0 -164
- package/dist/cli-CpOL_jWZ.js +0 -152
- package/dist/cli-DCp06hI2.js +0 -2
- package/dist/cli-DVSDSUQm.js +0 -695
- package/dist/cli-backend-B20k67rv.js +0 -44
- package/dist/cli-backend-CcuyEMrq.js +0 -1
- package/dist/cli-backend-DMTxL8mq.js +0 -40
- package/dist/cli-backend-M4CTb3mq.js +0 -49
- package/dist/cli-migration-BwqQvUer.js +0 -100
- package/dist/cli-name-C3PA6Rhs.js +0 -21
- package/dist/cli-runner-8SNo1pKS.js +0 -1014
- package/dist/cli-runtime-ChUqI2f-.js +0 -3
- package/dist/cli-shared-01J1LZRE.js +0 -72
- package/dist/cli-startup-metadata.json +0 -14
- package/dist/cli-utils-eYXt_xAg.js +0 -40
- package/dist/cli-watchdog-defaults-Dff-MFUz.js +0 -14
- package/dist/cli.runtime-WWGaX6X6.js +0 -547
- package/dist/cli.runtime.js +0 -1
- package/dist/client-BFxjGELJ.js +0 -5
- package/dist/client-C8_DsF-r.js +0 -7
- package/dist/client-bootstrap-BiVps8T6.js +0 -2
- package/dist/client-bootstrap-CFGCltAu.js +0 -121
- package/dist/client-lEilgam1.js +0 -87
- package/dist/cmd-argv-BbyQhzAC.js +0 -68
- package/dist/code-execution-CPcuE0sX.js +0 -142
- package/dist/codex-native-web-search-CyrsDBZ2.js +0 -155
- package/dist/codex-native-web-search-PFJu8fcM.js +0 -2
- package/dist/collection-runtime-DJjFReXJ.js +0 -1
- package/dist/command-auth-BAkZv3cP.js +0 -356
- package/dist/command-auth-native-Bsp5Doyd.js +0 -3
- package/dist/command-auth-tqFmaIaJ.js +0 -64
- package/dist/command-detection-BV7Ipg_0.js +0 -49
- package/dist/command-detection-DyqWl5Nq.js +0 -2
- package/dist/command-format-CX1xXtgB.js +0 -22
- package/dist/command-format-DwYoemR9.js +0 -2
- package/dist/command-gating-NyDk7t84.js +0 -40
- package/dist/command-options-BUoAEXAi.js +0 -25
- package/dist/command-poll-backoff-B7RiSvcV.js +0 -56
- package/dist/command-poll-backoff.runtime-DX9gobB0.js +0 -7
- package/dist/command-poll-backoff.runtime.js +0 -1
- package/dist/command-queue-CxEmvSGT.js +0 -253
- package/dist/command-registry-CaJXKNoO.js +0 -3
- package/dist/command-registry-Ct0qor9d.js +0 -199
- package/dist/command-secret-gateway-43O-1Hnf.js +0 -2
- package/dist/command-secret-gateway-C39SFGHd.js +0 -442
- package/dist/command-secret-targets-Bns-l1xV.js +0 -2
- package/dist/command-secret-targets-CTrFghcj.js +0 -87
- package/dist/command-surface-CfP1vask.js +0 -2
- package/dist/commands/status.summary.runtime.js +0 -146
- package/dist/commands-BxWe27p0.js +0 -42
- package/dist/commands-CiyPyNRY.js +0 -194
- package/dist/commands-acp-BeCm2Wnq.js +0 -990
- package/dist/commands-context-DbfMrVv4.js +0 -33
- package/dist/commands-core-CEmQydIV.js +0 -241
- package/dist/commands-core.runtime-BYooAQbc.js +0 -2
- package/dist/commands-core.runtime.js +0 -1
- package/dist/commands-handlers.runtime-CEAP4Yv2.js +0 -3707
- package/dist/commands-handlers.runtime.js +0 -1
- package/dist/commands-info-COwAtIWb.js +0 -651
- package/dist/commands-models-B4EJh5Fy.js +0 -395
- package/dist/commands-o21Y9Xck.js +0 -4
- package/dist/commands-registry-DgMc5_jk.js +0 -295
- package/dist/commands-registry.data-5O2FOeZl.js +0 -935
- package/dist/commands-registry.runtime-CT_YXpwM.js +0 -2
- package/dist/commands-registry.runtime.js +0 -1
- package/dist/commands-status.runtime-D4F4iVUh.js +0 -2
- package/dist/commands-status.runtime.js +0 -1
- package/dist/commands.runtime-_ALsMFcS.js +0 -4
- package/dist/commands.runtime.js +0 -1
- package/dist/common-Dbmo0I1E.js +0 -206
- package/dist/compact.runtime-CBfyBJbR.js +0 -7
- package/dist/compact.runtime.js +0 -1
- package/dist/completion-cli-COhEd9CF.js +0 -2
- package/dist/completion-cli-DHe4Rit5.js +0 -466
- package/dist/components-CamLdbbq.js +0 -797
- package/dist/components-DPbtLC3x.js +0 -2
- package/dist/config-CKJA2kAO.js +0 -53
- package/dist/config-D7-9dK3i.js +0 -138
- package/dist/config-DJ29sg5U.js +0 -475
- package/dist/config-DJNI2tTK.js +0 -136
- package/dist/config-Dr2GRT3y.js +0 -135
- package/dist/config-DsqKYjeo.js +0 -421
- package/dist/config-Q9kc32gz.js +0 -41
- package/dist/config-RUefx-_1.js +0 -8
- package/dist/config-cli-BqlYHmPA.js +0 -945
- package/dist/config-error-handler-BKRR0_j_.js +0 -197
- package/dist/config-error-handler-CT1igiX6.js +0 -2
- package/dist/config-eval-hTWq4IVy.js +0 -100
- package/dist/config-guard-Bk3_wSTH.js +0 -113
- package/dist/config-helpers-DLVbtn1B.js +0 -117
- package/dist/config-paths-BKYh__Ga.js +0 -8
- package/dist/config-paths-DP5yXXo2.js +0 -102
- package/dist/config-presence-omlqvhAQ.js +0 -79
- package/dist/config-regex-CvZFnWkO.js +0 -39
- package/dist/config-runtime-ngoccXmP.js +0 -13
- package/dist/config-schema-B3sQY5B_.js +0 -133
- package/dist/config-schema-B_2MhEQY.js +0 -71
- package/dist/config-schema-BpIXBNbc.js +0 -202
- package/dist/config-schema-BtfQOmdV.js +0 -115
- package/dist/config-schema-Bw-Xbo_T.js +0 -85
- package/dist/config-schema-Cqj-Mugi.js +0 -105
- package/dist/config-schema-DQSj_ZL_.js +0 -29
- package/dist/config-schema-Pe1Vn9kb.js +0 -17
- package/dist/config-schema-f7nntJMh.js +0 -25
- package/dist/config-schema-lBqODOnr.js +0 -25
- package/dist/config-schema-mfJ91WLf.js +0 -65
- package/dist/config-secret-input.runtime-B_HyRtgE.js +0 -3
- package/dist/config-secret-input.runtime.js +0 -1
- package/dist/config-state-DfIk9ME6.js +0 -289
- package/dist/config-status-Bnobp1-p.js +0 -2
- package/dist/config-status-Db93sFQB.js +0 -109
- package/dist/config-update-B_S0YQ_Y.js +0 -3
- package/dist/config-update-CK4EDDeD.js +0 -127
- package/dist/config-validation-Bh_sg7RW.js +0 -276
- package/dist/config-value-CMTdBw5q.js +0 -25
- package/dist/configure-CGDY1YR7.js +0 -1140
- package/dist/configure-V8jejRHr.js +0 -2
- package/dist/configured-provider-fallback-DWYDg0L7.js +0 -15
- package/dist/connection-auth-CKM60o55.js +0 -30
- package/dist/connection-details-DyVOoGG6.js +0 -56
- package/dist/constants-Bq55qi82.js +0 -71
- package/dist/constants-CimYBSye.js +0 -4
- package/dist/content-blocks-DuKJNUtm.js +0 -785
- package/dist/context-D-9a98Zk.js +0 -227
- package/dist/context-visibility-DTMZdcAH.js +0 -14
- package/dist/context-visibility-vOvLMUrZ.js +0 -35
- package/dist/context-window-guard-WE0ENAeQ.js +0 -46
- package/dist/control-ui-assets-DVYAF-2p.js +0 -240
- package/dist/control-ui-shared-BKXkFsA7.js +0 -29
- package/dist/conversation-binding-C2nuZ3Eg.js +0 -520
- package/dist/conversation-binding-input-CBwdWDC4.js +0 -250
- package/dist/conversation-bindings-Cq4z4vhr.js +0 -210
- package/dist/conversation-id-4JeHag0a.js +0 -168
- package/dist/conversation-id-CXuzm-Ub.js +0 -116
- package/dist/conversation-id-DCTwJCZF.js +0 -43
- package/dist/conversation-label-C2xTELop.js +0 -32
- package/dist/conversation-runtime-bArk0IjJ.js +0 -85
- package/dist/core-DaMVvavf.js +0 -195
- package/dist/core-api-D0U2iGRK.js +0 -670
- package/dist/core-command-descriptors-DxRm2H1p.js +0 -91
- package/dist/create-client-BOKOxyiu.js +0 -58
- package/dist/create-client-Bzn467Jo.js +0 -2
- package/dist/credentials-BGPs1gIX.js +0 -242
- package/dist/credentials-DUoYFiLk.js +0 -22
- package/dist/credentials-read-CDYtvkBt.js +0 -74
- package/dist/credentials-read-KB395CbD.js +0 -2
- package/dist/credentials-write.runtime-Bx7mKj4E.js +0 -9
- package/dist/credentials-write.runtime.js +0 -1
- package/dist/creds-files-CTtTs6zG.js +0 -19
- package/dist/cron-cli-Di3TakVa.js +0 -644
- package/dist/crypto-node.runtime-DI0fQ6wI.js +0 -5
- package/dist/crypto-node.runtime.js +0 -1
- package/dist/crypto-runtime-Bc-jKPlv.js +0 -1036
- package/dist/current-time--aIDbABZ.js +0 -20
- package/dist/daemon-cli-Cnry1ft1.js +0 -370
- package/dist/daemon-install-de_bWPuS.js +0 -63
- package/dist/daemon-install-plan.shared-u00bwv47.js +0 -222
- package/dist/daemon-runtime-DPejcJWG.js +0 -12
- package/dist/dangerous-name-matching-DnCDaXzP.js +0 -48
- package/dist/dangerous-name-runtime-Dinw00TZ.js +0 -1
- package/dist/dangerous-tools-C3RlQe7u.js +0 -38
- package/dist/date-time-DRQ0-oaw.js +0 -118
- package/dist/ddg-search-provider-B0zLjcDN.js +0 -182
- package/dist/dedupe-DZbQYOSD.js +0 -59
- package/dist/default-account-warnings-BCrmijcz.js +0 -15
- package/dist/default-models-Br0v8QOH.js +0 -35
- package/dist/defaults-DAt--D9n.js +0 -6
- package/dist/defaults-D_Y_lvUP.js +0 -7
- package/dist/defaults-MkMfnGzi.js +0 -7
- package/dist/delegate-CLP7zDS_.js +0 -43
- package/dist/deliver-CIUEKe4q.js +0 -954
- package/dist/deliver-LN-Yg8wS.js +0 -3
- package/dist/deliver-reply-DL-CSF43.js +0 -238
- package/dist/deliver-runtime-CoqXhxlS.js +0 -2
- package/dist/delivery-CL_3vFSl.js +0 -834
- package/dist/delivery-context-CoAL-jTI.js +0 -106
- package/dist/delivery-info-DTAUApso.js +0 -40
- package/dist/delivery-queue-DBW69jH4.js +0 -2
- package/dist/delivery-queue-DMubgaLa.js +0 -289
- package/dist/deps-34N0Nmbl.js +0 -67
- package/dist/deps-BVogrCia.js +0 -2
- package/dist/deps-DZJpA4XG.js +0 -153
- package/dist/detect-Zrcrs8SP.js +0 -12
- package/dist/detect-binary-CEX186X6.js +0 -30
- package/dist/device-auth-D_0GUMYY.js +0 -19
- package/dist/device-bootstrap-Bnn4K3fQ.js +0 -3
- package/dist/device-bootstrap-bwpHYQhY.js +0 -176
- package/dist/device-health-B3q7Cmqn.js +0 -2
- package/dist/device-health-DhmPD0gq.js +0 -16
- package/dist/device-identity-Cak311si.js +0 -2
- package/dist/device-identity-Doxo0HJx.js +0 -140
- package/dist/device-metadata-normalization-B5_zplC_.js +0 -21
- package/dist/device-pairing-BCpR-Vtb.js +0 -520
- package/dist/devices-cli-DYPkfzsG.js +0 -328
- package/dist/diagnostic-DfKz60Xk.js +0 -311
- package/dist/diagnostic-events-CUSmY-rn.js +0 -48
- package/dist/diagnostic-flags-DLDDycUv.js +0 -64
- package/dist/diagnostic-runtime-ZQC4AswI.js +0 -1
- package/dist/diagnostics-Cxl1bFGj.js +0 -33
- package/dist/diagnostics-GjF7wpY9.js +0 -2
- package/dist/diagnostics-otel-C2RQUlQT.js +0 -3
- package/dist/diffs-DsHt689X.js +0 -2
- package/dist/direct-dm-ByuWacLn.js +0 -139
- package/dist/direct-management-DEtuCcDL.js +0 -2
- package/dist/direct-management-DMp7MOnt.js +0 -300
- package/dist/direct-room-ARYWsCbX.js +0 -2
- package/dist/direct-room-DYlSJOU_.js +0 -67
- package/dist/directive-handling.defaults-BMh2DXTA.js +0 -19
- package/dist/directive-handling.fast-lane-CBX4jbax.js +0 -2
- package/dist/directive-handling.fast-lane-DRvycpgg.js +0 -64
- package/dist/directive-handling.impl-BKJf5Ltu.js +0 -672
- package/dist/directive-handling.impl-BkdGnm-T.js +0 -2
- package/dist/directive-handling.levels-BHOBnnn8.js +0 -2
- package/dist/directive-handling.levels-CecoBNlK.js +0 -12
- package/dist/directive-handling.parse-BuTiWmrT.js +0 -375
- package/dist/directive-handling.persist-D9RYevoA.js +0 -133
- package/dist/directive-handling.persist.runtime-Cb_unTVH.js +0 -2
- package/dist/directive-handling.persist.runtime.js +0 -1
- package/dist/directive-handling.shared-_Zvt3-ej.js +0 -158
- package/dist/directive-tags-Cm0H6Dn_.js +0 -109
- package/dist/directives-f-UxcP8D.js +0 -209
- package/dist/directory-cache-CM_EUchr.js +0 -62
- package/dist/directory-cli-D6N59tzr.js +0 -238
- package/dist/directory-config-helpers-BCrssKbI.js +0 -141
- package/dist/directory-runtime-CAabZ_XW.js +0 -20
- package/dist/directory.static-TKo2MeNR.js +0 -45
- package/dist/discord-BOpl5w4U.js +0 -5
- package/dist/discord-account-wyFuLDq_.js +0 -11
- package/dist/discord-core-BpzKxDZ7.js +0 -5
- package/dist/discord-lOPvIxp4.js +0 -11
- package/dist/discord-runtime-surface-Dm5WUtCV.js +0 -67
- package/dist/discord-session-key-DaPto1yr.js +0 -11
- package/dist/discord-surface-Cg_Mu9MI.js +0 -30
- package/dist/discord-thread-bindings-zIOp1Tj4.js +0 -29
- package/dist/discord-timeouts-Di5n5LAU.js +0 -12
- package/dist/discovery-DLbFJLD_.js +0 -171
- package/dist/dispatch-C4gGGYZt.js +0 -858
- package/dist/dispatch-acp.runtime-DUHj6bP-.js +0 -884
- package/dist/dispatch-acp.runtime.js +0 -1
- package/dist/dist-7JNqoGV7.js +0 -3
- package/dist/dist-BqJPEiV8.js +0 -14245
- package/dist/dist-DdE56Pmi.js +0 -503
- package/dist/dist-shQCTuJB.js +0 -1239
- package/dist/dm-policy-shared-C99GNVxp.js +0 -188
- package/dist/dns-cli-vQBAzTmg.js +0 -192
- package/dist/docker-BN7sQKCb.js +0 -789
- package/dist/docs-cli-Br6cfKoS.js +0 -156
- package/dist/doctor-completion-Cf0GcTXR.js +0 -90
- package/dist/doctor-config-preflight-C2cKYiKe.js +0 -2
- package/dist/doctor-config-preflight-DNbO-_N8.js +0 -148
- package/dist/doctor-state-migrations-BXkbeSFy.js +0 -2
- package/dist/doctor-state-migrations-G3shZ-W_.js +0 -3
- package/dist/dotenv-CelghjA4.js +0 -11
- package/dist/dotenv-Csg1Xj8n.js +0 -113
- package/dist/embedding-provider-Aey9VsDb.js +0 -129
- package/dist/enable-BgSxsKp_.js +0 -57
- package/dist/encryption-guidance-62xAQFP4.js +0 -33
- package/dist/entry-status-3ymZYX2l.js +0 -172
- package/dist/entry.js +0 -209
- package/dist/env-CK3eZNIX.js +0 -40
- package/dist/env-overrides-CcDOWo0Y.js +0 -346
- package/dist/env-overrides.runtime-CKb7-Q72.js +0 -7
- package/dist/env-overrides.runtime.js +0 -1
- package/dist/env-substitution-UhJwb0ys.js +0 -136
- package/dist/envelope-CrC9AdBL.js +0 -137
- package/dist/error-runtime-D-gKufd_.js +0 -2
- package/dist/error-text-BC9WfvfX.js +0 -24
- package/dist/errors-Bs2h5H8p.js +0 -71
- package/dist/errors-CjFsF-QY.js +0 -9
- package/dist/exa-web-search-provider-DUUlmDcV.js +0 -355
- package/dist/exec-BO6vYjRf.js +0 -368
- package/dist/exec-CD7C9g-b.js +0 -2
- package/dist/exec-approval-reply-CFOEcmIv.js +0 -189
- package/dist/exec-approval-session-target-BbsAlD1Q.js +0 -159
- package/dist/exec-approvals-3UDrE7Q9.js +0 -1565
- package/dist/exec-approvals-CW5axvaY.js +0 -121
- package/dist/exec-approvals-cli-BPYvtJv-.js +0 -483
- package/dist/exec-approvals-effective-DbLJfkpe.js +0 -140
- package/dist/exec-safe-bin-runtime-policy-218hHVyc.js +0 -90
- package/dist/exec-safety-XzKkUSvE.js +0 -24
- package/dist/export-html/template.css +0 -1060
- package/dist/export-html/template.html +0 -88
- package/dist/export-html/template.js +0 -1875
- package/dist/export-html/vendor/highlight.min.js +0 -1213
- package/dist/export-html/vendor/marked.min.js +0 -6
- package/dist/extension-shared-V_4IXpRU.js +0 -74
- package/dist/extensionAPI.js +0 -17
- package/dist/extensions/acpx/index.js +0 -1855
- package/dist/extensions/acpx/mcp-proxy.mjs +0 -151
- package/dist/extensions/acpx/openclaw.plugin.json +0 -132
- package/dist/extensions/acpx/package.json +0 -14
- package/dist/extensions/acpx/runtime-api.js +0 -5
- package/dist/extensions/acpx/skills/acp-router/SKILL.md +0 -245
- package/dist/extensions/aicq-chat/index.js +0 -284
- package/dist/extensions/aicq-chat/openclaw.plugin.json +0 -30
- package/dist/extensions/amazon-bedrock/api.js +0 -3
- package/dist/extensions/amazon-bedrock/discovery.js +0 -2
- package/dist/extensions/amazon-bedrock/index.js +0 -65
- package/dist/extensions/amazon-bedrock/openclaw.plugin.json +0 -44
- package/dist/extensions/amazon-bedrock/package.json +0 -23
- package/dist/extensions/anthropic/api.js +0 -3
- package/dist/extensions/anthropic/cli-backend.js +0 -2
- package/dist/extensions/anthropic/cli-migration.js +0 -2
- package/dist/extensions/anthropic/cli-shared.js +0 -2
- package/dist/extensions/anthropic/index.js +0 -357
- package/dist/extensions/anthropic/media-understanding-provider.js +0 -2
- package/dist/extensions/anthropic/openclaw.plugin.json +0 -64
- package/dist/extensions/anthropic/package.json +0 -12
- package/dist/extensions/anthropic/stream-wrappers.js +0 -2
- package/dist/extensions/anthropic/test-api.js +0 -2
- package/dist/extensions/anthropic-vertex/api.js +0 -4
- package/dist/extensions/anthropic-vertex/index.js +0 -36
- package/dist/extensions/anthropic-vertex/openclaw.plugin.json +0 -12
- package/dist/extensions/anthropic-vertex/package.json +0 -12
- package/dist/extensions/anthropic-vertex/provider-catalog.js +0 -2
- package/dist/extensions/anthropic-vertex/region.js +0 -2
- package/dist/extensions/bluebubbles/api.js +0 -5
- package/dist/extensions/bluebubbles/channel-config-api.js +0 -2
- package/dist/extensions/bluebubbles/index.js +0 -13
- package/dist/extensions/bluebubbles/openclaw.plugin.json +0 -11
- package/dist/extensions/bluebubbles/package.json +0 -48
- package/dist/extensions/bluebubbles/runtime-api.js +0 -2
- package/dist/extensions/bluebubbles/setup-entry.js +0 -26
- package/dist/extensions/brave/index.js +0 -13
- package/dist/extensions/brave/openclaw.plugin.json +0 -50
- package/dist/extensions/brave/package.json +0 -12
- package/dist/extensions/brave/test-api.js +0 -2
- package/dist/extensions/brave/web-search-provider.js +0 -2
- package/dist/extensions/browser/browser-runtime-api.js +0 -4
- package/dist/extensions/browser/index.js +0 -20
- package/dist/extensions/browser/openclaw.plugin.json +0 -9
- package/dist/extensions/browser/package.json +0 -12
- package/dist/extensions/browser/runtime-api.js +0 -6
- package/dist/extensions/browser/test-support.js +0 -50
- package/dist/extensions/byteplus/api.js +0 -3
- package/dist/extensions/byteplus/index.js +0 -63
- package/dist/extensions/byteplus/models.js +0 -2
- package/dist/extensions/byteplus/openclaw.plugin.json +0 -33
- package/dist/extensions/byteplus/package.json +0 -12
- package/dist/extensions/byteplus/provider-catalog.js +0 -2
- package/dist/extensions/chutes/api.js +0 -3
- package/dist/extensions/chutes/index.js +0 -143
- package/dist/extensions/chutes/models.js +0 -2
- package/dist/extensions/chutes/onboard.js +0 -3
- package/dist/extensions/chutes/openclaw.plugin.json +0 -44
- package/dist/extensions/chutes/package.json +0 -12
- package/dist/extensions/chutes/provider-catalog.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/api.js +0 -3
- package/dist/extensions/cloudflare-ai-gateway/index.js +0 -188
- package/dist/extensions/cloudflare-ai-gateway/models.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/onboard.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/openclaw.plugin.json +0 -33
- package/dist/extensions/cloudflare-ai-gateway/package.json +0 -12
- package/dist/extensions/copilot-proxy/index.js +0 -125
- package/dist/extensions/copilot-proxy/openclaw.plugin.json +0 -27
- package/dist/extensions/copilot-proxy/package.json +0 -12
- package/dist/extensions/copilot-proxy/runtime-api.js +0 -3
- package/dist/extensions/deepgram/audio.js +0 -2
- package/dist/extensions/deepgram/index.js +0 -13
- package/dist/extensions/deepgram/media-understanding-provider.js +0 -2
- package/dist/extensions/deepgram/openclaw.plugin.json +0 -13
- package/dist/extensions/deepgram/package.json +0 -12
- package/dist/extensions/deepseek/api.js +0 -3
- package/dist/extensions/deepseek/index.js +0 -33
- package/dist/extensions/deepseek/models.js +0 -2
- package/dist/extensions/deepseek/onboard.js +0 -2
- package/dist/extensions/deepseek/openclaw.plugin.json +0 -32
- package/dist/extensions/deepseek/package.json +0 -12
- package/dist/extensions/deepseek/provider-catalog.js +0 -2
- package/dist/extensions/device-pair/api.js +0 -10
- package/dist/extensions/device-pair/index.js +0 -483
- package/dist/extensions/device-pair/notify.js +0 -2
- package/dist/extensions/device-pair/openclaw.plugin.json +0 -21
- package/dist/extensions/device-pair/qr-image.js +0 -3
- package/dist/extensions/diagnostics-otel/api.js +0 -6
- package/dist/extensions/diagnostics-otel/index.js +0 -485
- package/dist/extensions/diagnostics-otel/openclaw.plugin.json +0 -8
- package/dist/extensions/diagnostics-otel/package.json +0 -27
- package/dist/extensions/diffs/api.js +0 -4
- package/dist/extensions/diffs/assets/viewer-runtime.js +0 -1888
- package/dist/extensions/diffs/index.js +0 -2058
- package/dist/extensions/diffs/openclaw.plugin.json +0 -226
- package/dist/extensions/diffs/package.json +0 -24
- package/dist/extensions/diffs/runtime-api.js +0 -3
- package/dist/extensions/diffs/skills/diffs/SKILL.md +0 -23
- package/dist/extensions/discord/action-runtime-api.js +0 -2
- package/dist/extensions/discord/api.js +0 -14
- package/dist/extensions/discord/channel-config-api.js +0 -2
- package/dist/extensions/discord/index.js +0 -612
- package/dist/extensions/discord/openclaw.plugin.json +0 -11
- package/dist/extensions/discord/package.json +0 -52
- package/dist/extensions/discord/runtime-api.js +0 -230
- package/dist/extensions/discord/session-key-api.js +0 -2
- package/dist/extensions/discord/setup-entry.js +0 -10
- package/dist/extensions/discord/test-api.js +0 -45
- package/dist/extensions/discord/timeouts.js +0 -2
- package/dist/extensions/duckduckgo/index.js +0 -13
- package/dist/extensions/duckduckgo/openclaw.plugin.json +0 -41
- package/dist/extensions/duckduckgo/package.json +0 -12
- package/dist/extensions/duckduckgo/web-search-provider.js +0 -2
- package/dist/extensions/elevenlabs/index.js +0 -13
- package/dist/extensions/elevenlabs/openclaw.plugin.json +0 -13
- package/dist/extensions/elevenlabs/package.json +0 -12
- package/dist/extensions/elevenlabs/speech-provider.js +0 -2
- package/dist/extensions/elevenlabs/test-api.js +0 -2
- package/dist/extensions/elevenlabs/tts.js +0 -2
- package/dist/extensions/exa/index.js +0 -13
- package/dist/extensions/exa/openclaw.plugin.json +0 -39
- package/dist/extensions/exa/package.json +0 -12
- package/dist/extensions/exa/web-search-provider.js +0 -2
- package/dist/extensions/fal/image-generation-provider.js +0 -2
- package/dist/extensions/fal/index.js +0 -45
- package/dist/extensions/fal/onboard.js +0 -2
- package/dist/extensions/fal/openclaw.plugin.json +0 -40
- package/dist/extensions/fal/package.json +0 -12
- package/dist/extensions/feishu/api.js +0 -7
- package/dist/extensions/feishu/index.js +0 -2531
- package/dist/extensions/feishu/openclaw.plugin.json +0 -14
- package/dist/extensions/feishu/package.json +0 -52
- package/dist/extensions/feishu/runtime-api.js +0 -34
- package/dist/extensions/feishu/session-key-api.js +0 -2
- package/dist/extensions/feishu/setup-api.js +0 -2
- package/dist/extensions/feishu/setup-entry.js +0 -6
- package/dist/extensions/feishu/skills/feishu-doc/SKILL.md +0 -211
- package/dist/extensions/feishu/skills/feishu-doc/references/block-types.md +0 -103
- package/dist/extensions/feishu/skills/feishu-drive/SKILL.md +0 -97
- package/dist/extensions/feishu/skills/feishu-perm/SKILL.md +0 -119
- package/dist/extensions/feishu/skills/feishu-wiki/SKILL.md +0 -111
- package/dist/extensions/firecrawl/api.js +0 -33
- package/dist/extensions/firecrawl/index.js +0 -184
- package/dist/extensions/firecrawl/openclaw.plugin.json +0 -87
- package/dist/extensions/firecrawl/package.json +0 -12
- package/dist/extensions/firecrawl/web-search-provider.js +0 -2
- package/dist/extensions/github-copilot/api.js +0 -2
- package/dist/extensions/github-copilot/index.js +0 -138
- package/dist/extensions/github-copilot/login.js +0 -2
- package/dist/extensions/github-copilot/models-defaults.js +0 -38
- package/dist/extensions/github-copilot/models.js +0 -2
- package/dist/extensions/github-copilot/openclaw.plugin.json +0 -31
- package/dist/extensions/github-copilot/package.json +0 -12
- package/dist/extensions/github-copilot/token.js +0 -3
- package/dist/extensions/github-copilot/usage.js +0 -2
- package/dist/extensions/google/api.js +0 -3
- package/dist/extensions/google/cli-backend.js +0 -2
- package/dist/extensions/google/gemini-cli-provider.js +0 -110
- package/dist/extensions/google/google-shared.test-helpers.js +0 -92
- package/dist/extensions/google/image-generation-provider.js +0 -162
- package/dist/extensions/google/index.js +0 -213
- package/dist/extensions/google/media-understanding-provider.js +0 -104
- package/dist/extensions/google/model-id.js +0 -2
- package/dist/extensions/google/oauth.credentials.js +0 -2
- package/dist/extensions/google/oauth.flow.js +0 -2
- package/dist/extensions/google/oauth.http.js +0 -2
- package/dist/extensions/google/oauth.js +0 -3
- package/dist/extensions/google/oauth.project.js +0 -2
- package/dist/extensions/google/oauth.runtime.js +0 -2
- package/dist/extensions/google/oauth.shared.js +0 -2
- package/dist/extensions/google/oauth.token.js +0 -2
- package/dist/extensions/google/openclaw.plugin.json +0 -89
- package/dist/extensions/google/package.json +0 -12
- package/dist/extensions/google/provider-models.js +0 -2
- package/dist/extensions/google/runtime-api.js +0 -4
- package/dist/extensions/google/test-api.js +0 -2
- package/dist/extensions/google/web-search-provider.js +0 -2
- package/dist/extensions/googlechat/api.js +0 -2
- package/dist/extensions/googlechat/channel-config-api.js +0 -7
- package/dist/extensions/googlechat/index.js +0 -13
- package/dist/extensions/googlechat/openclaw.plugin.json +0 -11
- package/dist/extensions/googlechat/package.json +0 -48
- package/dist/extensions/googlechat/runtime-api.js +0 -39
- package/dist/extensions/googlechat/setup-entry.js +0 -6
- package/dist/extensions/googlechat/test-api.js +0 -3
- package/dist/extensions/groq/index.js +0 -13
- package/dist/extensions/groq/media-understanding-provider.js +0 -2
- package/dist/extensions/groq/openclaw.plugin.json +0 -13
- package/dist/extensions/groq/package.json +0 -12
- package/dist/extensions/huggingface/api.js +0 -4
- package/dist/extensions/huggingface/index.js +0 -54
- package/dist/extensions/huggingface/models.js +0 -2
- package/dist/extensions/huggingface/onboard.js +0 -2
- package/dist/extensions/huggingface/openclaw.plugin.json +0 -34
- package/dist/extensions/huggingface/package.json +0 -12
- package/dist/extensions/huggingface/provider-catalog.js +0 -3
- package/dist/extensions/imessage/api.js +0 -4
- package/dist/extensions/imessage/channel-config-api.js +0 -2
- package/dist/extensions/imessage/index.js +0 -211
- package/dist/extensions/imessage/openclaw.plugin.json +0 -11
- package/dist/extensions/imessage/package.json +0 -26
- package/dist/extensions/imessage/runtime-api.js +0 -11
- package/dist/extensions/imessage/setup-entry.js +0 -13
- package/dist/extensions/irc/api.js +0 -2
- package/dist/extensions/irc/channel-config-api.js +0 -2
- package/dist/extensions/irc/index.js +0 -12
- package/dist/extensions/irc/openclaw.plugin.json +0 -11
- package/dist/extensions/irc/package.json +0 -28
- package/dist/extensions/irc/setup-entry.js +0 -6
- package/dist/extensions/kilocode/api.js +0 -3
- package/dist/extensions/kilocode/index.js +0 -37
- package/dist/extensions/kilocode/onboard.js +0 -3
- package/dist/extensions/kilocode/openclaw.plugin.json +0 -33
- package/dist/extensions/kilocode/package.json +0 -12
- package/dist/extensions/kilocode/provider-catalog.js +0 -2
- package/dist/extensions/kilocode/provider-models.js +0 -2
- package/dist/extensions/kilocode/shared.js +0 -2
- package/dist/extensions/kimi-coding/api.js +0 -3
- package/dist/extensions/kimi-coding/index.js +0 -81
- package/dist/extensions/kimi-coding/onboard.js +0 -2
- package/dist/extensions/kimi-coding/openclaw.plugin.json +0 -38
- package/dist/extensions/kimi-coding/package.json +0 -12
- package/dist/extensions/kimi-coding/provider-catalog.js +0 -2
- package/dist/extensions/kimi-coding/stream.js +0 -2
- package/dist/extensions/line/api.js +0 -13
- package/dist/extensions/line/index.js +0 -815
- package/dist/extensions/line/openclaw.plugin.json +0 -11
- package/dist/extensions/line/package.json +0 -41
- package/dist/extensions/line/runtime-api.js +0 -11
- package/dist/extensions/line/setup-api.js +0 -3
- package/dist/extensions/line/setup-entry.js +0 -15
- package/dist/extensions/litellm/api.js +0 -2
- package/dist/extensions/litellm/index.js +0 -36
- package/dist/extensions/litellm/onboard.js +0 -2
- package/dist/extensions/litellm/openclaw.plugin.json +0 -33
- package/dist/extensions/litellm/package.json +0 -12
- package/dist/extensions/litellm/provider-catalog.js +0 -2
- package/dist/extensions/llm-task/api.js +0 -6
- package/dist/extensions/llm-task/index.js +0 -156
- package/dist/extensions/llm-task/openclaw.plugin.json +0 -33
- package/dist/extensions/llm-task/package.json +0 -16
- package/dist/extensions/lobster/index.js +0 -232
- package/dist/extensions/lobster/openclaw.plugin.json +0 -10
- package/dist/extensions/lobster/package.json +0 -17
- package/dist/extensions/lobster/runtime-api.js +0 -4
- package/dist/extensions/matrix/api.js +0 -10
- package/dist/extensions/matrix/helper-api.js +0 -3
- package/dist/extensions/matrix/index.js +0 -44
- package/dist/extensions/matrix/legacy-crypto-inspector.js +0 -41
- package/dist/extensions/matrix/openclaw.plugin.json +0 -11
- package/dist/extensions/matrix/package.json +0 -53
- package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +0 -48
- package/dist/extensions/matrix/runtime-api.js +0 -25
- package/dist/extensions/matrix/setup-entry.js +0 -6
- package/dist/extensions/matrix/test-api.js +0 -3
- package/dist/extensions/matrix/thread-bindings-runtime.js +0 -2
- package/dist/extensions/mattermost/api.js +0 -2
- package/dist/extensions/mattermost/index.js +0 -15
- package/dist/extensions/mattermost/openclaw.plugin.json +0 -11
- package/dist/extensions/mattermost/package.json +0 -41
- package/dist/extensions/mattermost/runtime-api.js +0 -41
- package/dist/extensions/mattermost/setup-entry.js +0 -6
- package/dist/extensions/memory-core/api.js +0 -1
- package/dist/extensions/memory-core/index.js +0 -440
- package/dist/extensions/memory-core/openclaw.plugin.json +0 -9
- package/dist/extensions/memory-core/package.json +0 -23
- package/dist/extensions/memory-core/runtime-api.js +0 -3
- package/dist/extensions/memory-lancedb/api.js +0 -4
- package/dist/extensions/memory-lancedb/config.js +0 -2
- package/dist/extensions/memory-lancedb/index.js +0 -7037
- package/dist/extensions/memory-lancedb/lancedb-runtime.js +0 -2
- package/dist/extensions/memory-lancedb/openclaw.plugin.json +0 -92
- package/dist/extensions/memory-lancedb/package.json +0 -24
- package/dist/extensions/microsoft/index.js +0 -13
- package/dist/extensions/microsoft/openclaw.plugin.json +0 -13
- package/dist/extensions/microsoft/package.json +0 -15
- package/dist/extensions/microsoft/speech-provider.js +0 -2
- package/dist/extensions/microsoft/test-api.js +0 -2
- package/dist/extensions/microsoft/tts.js +0 -2
- package/dist/extensions/microsoft-foundry/auth.js +0 -2
- package/dist/extensions/microsoft-foundry/cli.js +0 -2
- package/dist/extensions/microsoft-foundry/index.js +0 -13
- package/dist/extensions/microsoft-foundry/onboard.js +0 -3
- package/dist/extensions/microsoft-foundry/openclaw.plugin.json +0 -39
- package/dist/extensions/microsoft-foundry/package.json +0 -12
- package/dist/extensions/microsoft-foundry/provider.js +0 -2
- package/dist/extensions/microsoft-foundry/runtime.js +0 -2
- package/dist/extensions/microsoft-foundry/shared-runtime.js +0 -3
- package/dist/extensions/microsoft-foundry/shared.js +0 -2
- package/dist/extensions/minimax/api.js +0 -6
- package/dist/extensions/minimax/image-generation-provider.js +0 -2
- package/dist/extensions/minimax/index.js +0 -219
- package/dist/extensions/minimax/media-understanding-provider.js +0 -2
- package/dist/extensions/minimax/model-definitions.js +0 -2
- package/dist/extensions/minimax/oauth.js +0 -2
- package/dist/extensions/minimax/oauth.runtime.js +0 -2
- package/dist/extensions/minimax/onboard.js +0 -2
- package/dist/extensions/minimax/openclaw.plugin.json +0 -98
- package/dist/extensions/minimax/package.json +0 -12
- package/dist/extensions/minimax/provider-catalog.js +0 -2
- package/dist/extensions/minimax/provider-models.js +0 -2
- package/dist/extensions/mistral/api.js +0 -5
- package/dist/extensions/mistral/index.js +0 -79
- package/dist/extensions/mistral/media-understanding-provider.js +0 -2
- package/dist/extensions/mistral/model-definitions.js +0 -2
- package/dist/extensions/mistral/onboard.js +0 -2
- package/dist/extensions/mistral/openclaw.plugin.json +0 -37
- package/dist/extensions/mistral/package.json +0 -12
- package/dist/extensions/mistral/provider-catalog.js +0 -2
- package/dist/extensions/modelstudio/api.js +0 -4
- package/dist/extensions/modelstudio/index.js +0 -111
- package/dist/extensions/modelstudio/model-definitions.js +0 -2
- package/dist/extensions/modelstudio/models.js +0 -2
- package/dist/extensions/modelstudio/onboard.js +0 -3
- package/dist/extensions/modelstudio/openclaw.plugin.json +0 -75
- package/dist/extensions/modelstudio/package.json +0 -12
- package/dist/extensions/modelstudio/provider-catalog.js +0 -2
- package/dist/extensions/moonshot/api.js +0 -4
- package/dist/extensions/moonshot/index.js +0 -58
- package/dist/extensions/moonshot/media-understanding-provider.js +0 -2
- package/dist/extensions/moonshot/onboard.js +0 -2
- package/dist/extensions/moonshot/openclaw.plugin.json +0 -87
- package/dist/extensions/moonshot/package.json +0 -12
- package/dist/extensions/moonshot/provider-catalog.js +0 -2
- package/dist/extensions/moonshot/test-api.js +0 -2
- package/dist/extensions/moonshot/web-search-provider.js +0 -2
- package/dist/extensions/msteams/api.js +0 -2
- package/dist/extensions/msteams/channel-config-api.js +0 -2
- package/dist/extensions/msteams/index.js +0 -13
- package/dist/extensions/msteams/openclaw.plugin.json +0 -11
- package/dist/extensions/msteams/package.json +0 -48
- package/dist/extensions/msteams/runtime-api.js +0 -47
- package/dist/extensions/msteams/setup-entry.js +0 -6
- package/dist/extensions/msteams/test-api.js +0 -2
- package/dist/extensions/nextcloud-talk/api.js +0 -2
- package/dist/extensions/nextcloud-talk/index.js +0 -12
- package/dist/extensions/nextcloud-talk/openclaw.plugin.json +0 -11
- package/dist/extensions/nextcloud-talk/package.json +0 -45
- package/dist/extensions/nextcloud-talk/runtime-api.js +0 -35
- package/dist/extensions/nextcloud-talk/setup-entry.js +0 -6
- package/dist/extensions/nostr/api.js +0 -15
- package/dist/extensions/nostr/index.js +0 -559
- package/dist/extensions/nostr/openclaw.plugin.json +0 -11
- package/dist/extensions/nostr/package.json +0 -44
- package/dist/extensions/nostr/runtime-api.js +0 -15
- package/dist/extensions/nostr/setup-api.js +0 -2
- package/dist/extensions/nostr/setup-entry.js +0 -6
- package/dist/extensions/nostr/test-api.js +0 -2
- package/dist/extensions/nvidia/api.js +0 -2
- package/dist/extensions/nvidia/index.js +0 -16
- package/dist/extensions/nvidia/openclaw.plugin.json +0 -17
- package/dist/extensions/nvidia/package.json +0 -12
- package/dist/extensions/nvidia/provider-catalog.js +0 -2
- package/dist/extensions/ollama/api.js +0 -3
- package/dist/extensions/ollama/index.js +0 -139
- package/dist/extensions/ollama/openclaw.plugin.json +0 -29
- package/dist/extensions/ollama/package.json +0 -12
- package/dist/extensions/ollama/runtime-api.js +0 -3
- package/dist/extensions/open-prose/index.js +0 -10
- package/dist/extensions/open-prose/openclaw.plugin.json +0 -13
- package/dist/extensions/open-prose/package.json +0 -12
- package/dist/extensions/open-prose/runtime-api.js +0 -3
- package/dist/extensions/open-prose/skills/prose/LICENSE +0 -21
- package/dist/extensions/open-prose/skills/prose/SKILL.md +0 -323
- package/dist/extensions/open-prose/skills/prose/alt-borges.md +0 -141
- package/dist/extensions/open-prose/skills/prose/alts/arabian-nights.md +0 -229
- package/dist/extensions/open-prose/skills/prose/alts/borges.md +0 -360
- package/dist/extensions/open-prose/skills/prose/alts/folk.md +0 -322
- package/dist/extensions/open-prose/skills/prose/alts/homer.md +0 -217
- package/dist/extensions/open-prose/skills/prose/alts/kafka.md +0 -373
- package/dist/extensions/open-prose/skills/prose/alts/shared-appendix.md +0 -35
- package/dist/extensions/open-prose/skills/prose/compiler.md +0 -2971
- package/dist/extensions/open-prose/skills/prose/examples/01-hello-world.prose +0 -4
- package/dist/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +0 -6
- package/dist/extensions/open-prose/skills/prose/examples/03-code-review.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +0 -14
- package/dist/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/07-refactor.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/08-blog-post.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +0 -25
- package/dist/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +0 -32
- package/dist/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +0 -27
- package/dist/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +0 -43
- package/dist/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +0 -51
- package/dist/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +0 -48
- package/dist/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +0 -23
- package/dist/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +0 -19
- package/dist/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +0 -19
- package/dist/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +0 -36
- package/dist/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +0 -71
- package/dist/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +0 -35
- package/dist/extensions/open-prose/skills/prose/examples/22-error-handling.prose +0 -51
- package/dist/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +0 -63
- package/dist/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +0 -86
- package/dist/extensions/open-prose/skills/prose/examples/25-conditionals.prose +0 -114
- package/dist/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +0 -100
- package/dist/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +0 -105
- package/dist/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +0 -37
- package/dist/extensions/open-prose/skills/prose/examples/28-gas-town.prose +0 -1572
- package/dist/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +0 -218
- package/dist/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +0 -42
- package/dist/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +0 -145
- package/dist/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +0 -168
- package/dist/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +0 -204
- package/dist/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +0 -296
- package/dist/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +0 -237
- package/dist/extensions/open-prose/skills/prose/examples/37-the-forge.prose +0 -1474
- package/dist/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +0 -455
- package/dist/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +0 -277
- package/dist/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +0 -32
- package/dist/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +0 -38
- package/dist/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +0 -46
- package/dist/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +0 -50
- package/dist/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +0 -261
- package/dist/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +0 -159
- package/dist/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +0 -637
- package/dist/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +0 -148
- package/dist/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +0 -225
- package/dist/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +0 -356
- package/dist/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +0 -445
- package/dist/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +0 -210
- package/dist/extensions/open-prose/skills/prose/examples/README.md +0 -391
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/README.md +0 -22
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +0 -18
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +0 -223
- package/dist/extensions/open-prose/skills/prose/guidance/antipatterns.md +0 -951
- package/dist/extensions/open-prose/skills/prose/guidance/patterns.md +0 -700
- package/dist/extensions/open-prose/skills/prose/guidance/system-prompt.md +0 -180
- package/dist/extensions/open-prose/skills/prose/help.md +0 -144
- package/dist/extensions/open-prose/skills/prose/lib/README.md +0 -108
- package/dist/extensions/open-prose/skills/prose/lib/calibrator.prose +0 -215
- package/dist/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +0 -174
- package/dist/extensions/open-prose/skills/prose/lib/error-forensics.prose +0 -250
- package/dist/extensions/open-prose/skills/prose/lib/inspector.prose +0 -196
- package/dist/extensions/open-prose/skills/prose/lib/profiler.prose +0 -460
- package/dist/extensions/open-prose/skills/prose/lib/program-improver.prose +0 -275
- package/dist/extensions/open-prose/skills/prose/lib/project-memory.prose +0 -118
- package/dist/extensions/open-prose/skills/prose/lib/user-memory.prose +0 -93
- package/dist/extensions/open-prose/skills/prose/lib/vm-improver.prose +0 -243
- package/dist/extensions/open-prose/skills/prose/primitives/session.md +0 -593
- package/dist/extensions/open-prose/skills/prose/prose.md +0 -1237
- package/dist/extensions/open-prose/skills/prose/state/filesystem.md +0 -498
- package/dist/extensions/open-prose/skills/prose/state/in-context.md +0 -384
- package/dist/extensions/open-prose/skills/prose/state/postgres.md +0 -880
- package/dist/extensions/open-prose/skills/prose/state/sqlite.md +0 -531
- package/dist/extensions/openai/api.js +0 -4
- package/dist/extensions/openai/cli-backend.js +0 -2
- package/dist/extensions/openai/default-models.js +0 -2
- package/dist/extensions/openai/image-generation-provider.js +0 -2
- package/dist/extensions/openai/index.js +0 -24
- package/dist/extensions/openai/media-understanding-provider.js +0 -2
- package/dist/extensions/openai/openai-codex-auth-identity.js +0 -2
- package/dist/extensions/openai/openai-codex-catalog.js +0 -2
- package/dist/extensions/openai/openai-codex-provider.js +0 -2
- package/dist/extensions/openai/openai-codex-provider.runtime.js +0 -14
- package/dist/extensions/openai/openai-provider.js +0 -2
- package/dist/extensions/openai/openclaw.plugin.json +0 -61
- package/dist/extensions/openai/package.json +0 -12
- package/dist/extensions/openai/shared.js +0 -4
- package/dist/extensions/openai/speech-provider.js +0 -2
- package/dist/extensions/openai/test-api.js +0 -5
- package/dist/extensions/openai/tts.js +0 -2
- package/dist/extensions/opencode/api.js +0 -3
- package/dist/extensions/opencode/index.js +0 -63
- package/dist/extensions/opencode/onboard.js +0 -2
- package/dist/extensions/opencode/openclaw.plugin.json +0 -33
- package/dist/extensions/opencode/package.json +0 -12
- package/dist/extensions/opencode-go/api.js +0 -3
- package/dist/extensions/opencode-go/index.js +0 -54
- package/dist/extensions/opencode-go/onboard.js +0 -2
- package/dist/extensions/opencode-go/openclaw.plugin.json +0 -33
- package/dist/extensions/opencode-go/package.json +0 -12
- package/dist/extensions/openrouter/api.js +0 -3
- package/dist/extensions/openrouter/index.js +0 -121
- package/dist/extensions/openrouter/media-understanding-provider.js +0 -2
- package/dist/extensions/openrouter/onboard.js +0 -2
- package/dist/extensions/openrouter/openclaw.plugin.json +0 -37
- package/dist/extensions/openrouter/package.json +0 -12
- package/dist/extensions/openrouter/provider-catalog.js +0 -2
- package/dist/extensions/openshell/index.js +0 -919
- package/dist/extensions/openshell/openclaw.plugin.json +0 -118
- package/dist/extensions/openshell/package.json +0 -12
- package/dist/extensions/perplexity/index.js +0 -13
- package/dist/extensions/perplexity/openclaw.plugin.json +0 -54
- package/dist/extensions/perplexity/package.json +0 -12
- package/dist/extensions/perplexity/test-api.js +0 -2
- package/dist/extensions/perplexity/web-search-provider.js +0 -2
- package/dist/extensions/phone-control/index.js +0 -283
- package/dist/extensions/phone-control/openclaw.plugin.json +0 -11
- package/dist/extensions/phone-control/runtime-api.js +0 -3
- package/dist/extensions/qianfan/api.js +0 -3
- package/dist/extensions/qianfan/index.js +0 -26
- package/dist/extensions/qianfan/onboard.js +0 -2
- package/dist/extensions/qianfan/openclaw.plugin.json +0 -32
- package/dist/extensions/qianfan/package.json +0 -12
- package/dist/extensions/qianfan/provider-catalog.js +0 -2
- package/dist/extensions/qqbot/api.js +0 -173
- package/dist/extensions/qqbot/index.js +0 -445
- package/dist/extensions/qqbot/openclaw.plugin.json +0 -257
- package/dist/extensions/qqbot/package.json +0 -52
- package/dist/extensions/qqbot/runtime-api.js +0 -2
- package/dist/extensions/qqbot/setup-entry.js +0 -6
- package/dist/extensions/qqbot/skills/qqbot-channel/SKILL.md +0 -262
- package/dist/extensions/qqbot/skills/qqbot-channel/references/api_references.md +0 -521
- package/dist/extensions/qqbot/skills/qqbot-media/SKILL.md +0 -36
- package/dist/extensions/qqbot/skills/qqbot-remind/SKILL.md +0 -149
- package/dist/extensions/searxng/index.js +0 -13
- package/dist/extensions/searxng/openclaw.plugin.json +0 -46
- package/dist/extensions/searxng/package.json +0 -12
- package/dist/extensions/searxng/web-search-provider.js +0 -2
- package/dist/extensions/sglang/api.js +0 -4
- package/dist/extensions/sglang/defaults.js +0 -2
- package/dist/extensions/sglang/index.js +0 -77
- package/dist/extensions/sglang/models.js +0 -2
- package/dist/extensions/sglang/openclaw.plugin.json +0 -29
- package/dist/extensions/sglang/package.json +0 -12
- package/dist/extensions/signal/api.js +0 -7
- package/dist/extensions/signal/channel-config-api.js +0 -2
- package/dist/extensions/signal/index.js +0 -319
- package/dist/extensions/signal/openclaw.plugin.json +0 -11
- package/dist/extensions/signal/package.json +0 -24
- package/dist/extensions/signal/reaction-runtime-api.js +0 -2
- package/dist/extensions/signal/runtime-api.js +0 -24
- package/dist/extensions/signal/setup-entry.js +0 -13
- package/dist/extensions/signal/test-api.js +0 -111
- package/dist/extensions/slack/api.js +0 -10
- package/dist/extensions/slack/channel-config-api.js +0 -2
- package/dist/extensions/slack/index.js +0 -12
- package/dist/extensions/slack/openclaw.plugin.json +0 -11
- package/dist/extensions/slack/package.json +0 -31
- package/dist/extensions/slack/runtime-api.js +0 -110
- package/dist/extensions/slack/setup-entry.js +0 -12
- package/dist/extensions/slack/test-api.js +0 -47
- package/dist/extensions/stepfun/index.js +0 -163
- package/dist/extensions/stepfun/onboard.js +0 -3
- package/dist/extensions/stepfun/openclaw.plugin.json +0 -83
- package/dist/extensions/stepfun/package.json +0 -12
- package/dist/extensions/stepfun/provider-catalog.js +0 -2
- package/dist/extensions/synology-chat/index.js +0 -12
- package/dist/extensions/synology-chat/openclaw.plugin.json +0 -11
- package/dist/extensions/synology-chat/package.json +0 -26
- package/dist/extensions/synology-chat/setup-api.js +0 -2
- package/dist/extensions/synology-chat/setup-entry.js +0 -6
- package/dist/extensions/synthetic/api.js +0 -4
- package/dist/extensions/synthetic/index.js +0 -27
- package/dist/extensions/synthetic/models.js +0 -2
- package/dist/extensions/synthetic/onboard.js +0 -3
- package/dist/extensions/synthetic/openclaw.plugin.json +0 -32
- package/dist/extensions/synthetic/package.json +0 -12
- package/dist/extensions/synthetic/provider-catalog.js +0 -2
- package/dist/extensions/talk-voice/api.js +0 -3
- package/dist/extensions/talk-voice/index.js +0 -160
- package/dist/extensions/talk-voice/openclaw.plugin.json +0 -11
- package/dist/extensions/tavily/index.js +0 -128
- package/dist/extensions/tavily/openclaw.plugin.json +0 -53
- package/dist/extensions/tavily/package.json +0 -12
- package/dist/extensions/tavily/skills/tavily/SKILL.md +0 -94
- package/dist/extensions/tavily/web-search-provider.js +0 -2
- package/dist/extensions/telegram/allow-from.js +0 -2
- package/dist/extensions/telegram/api.js +0 -14
- package/dist/extensions/telegram/channel-config-api.js +0 -2
- package/dist/extensions/telegram/index.js +0 -12
- package/dist/extensions/telegram/openclaw.plugin.json +0 -11
- package/dist/extensions/telegram/package.json +0 -37
- package/dist/extensions/telegram/runtime-api.js +0 -25
- package/dist/extensions/telegram/session-key-api.js +0 -2
- package/dist/extensions/telegram/setup-entry.js +0 -13
- package/dist/extensions/telegram/test-api.js +0 -88
- package/dist/extensions/telegram/test-support.js +0 -46
- package/dist/extensions/telegram/update-offset-runtime-api.js +0 -2
- package/dist/extensions/thread-ownership/api.js +0 -5
- package/dist/extensions/thread-ownership/index.js +0 -82
- package/dist/extensions/thread-ownership/openclaw.plugin.json +0 -30
- package/dist/extensions/tlon/api.js +0 -14
- package/dist/extensions/tlon/index.js +0 -150
- package/dist/extensions/tlon/openclaw.plugin.json +0 -12
- package/dist/extensions/tlon/package.json +0 -44
- package/dist/extensions/tlon/runtime-api.js +0 -14
- package/dist/extensions/tlon/setup-api.js +0 -3
- package/dist/extensions/tlon/setup-entry.js +0 -6
- package/dist/extensions/tlon/test-api.js +0 -2
- package/dist/extensions/together/api.js +0 -3
- package/dist/extensions/together/index.js +0 -26
- package/dist/extensions/together/models.js +0 -2
- package/dist/extensions/together/onboard.js +0 -2
- package/dist/extensions/together/openclaw.plugin.json +0 -32
- package/dist/extensions/together/package.json +0 -12
- package/dist/extensions/together/provider-catalog.js +0 -2
- package/dist/extensions/twitch/api.js +0 -9
- package/dist/extensions/twitch/index.js +0 -1090
- package/dist/extensions/twitch/openclaw.plugin.json +0 -11
- package/dist/extensions/twitch/package.json +0 -29
- package/dist/extensions/twitch/runtime-api.js +0 -9
- package/dist/extensions/venice/api.js +0 -3
- package/dist/extensions/venice/index.js +0 -55
- package/dist/extensions/venice/models.js +0 -2
- package/dist/extensions/venice/onboard.js +0 -3
- package/dist/extensions/venice/openclaw.plugin.json +0 -32
- package/dist/extensions/venice/package.json +0 -12
- package/dist/extensions/venice/provider-catalog.js +0 -2
- package/dist/extensions/vercel-ai-gateway/api.js +0 -4
- package/dist/extensions/vercel-ai-gateway/index.js +0 -30
- package/dist/extensions/vercel-ai-gateway/models.js +0 -2
- package/dist/extensions/vercel-ai-gateway/onboard.js +0 -2
- package/dist/extensions/vercel-ai-gateway/openclaw.plugin.json +0 -32
- package/dist/extensions/vercel-ai-gateway/package.json +0 -12
- package/dist/extensions/vercel-ai-gateway/provider-catalog.js +0 -2
- package/dist/extensions/vllm/api.js +0 -4
- package/dist/extensions/vllm/defaults.js +0 -2
- package/dist/extensions/vllm/index.js +0 -78
- package/dist/extensions/vllm/models.js +0 -2
- package/dist/extensions/vllm/openclaw.plugin.json +0 -29
- package/dist/extensions/vllm/package.json +0 -12
- package/dist/extensions/voice-call/api.js +0 -7
- package/dist/extensions/voice-call/index.js +0 -698
- package/dist/extensions/voice-call/openclaw.plugin.json +0 -700
- package/dist/extensions/voice-call/package.json +0 -33
- package/dist/extensions/voice-call/runtime-api.js +0 -7
- package/dist/extensions/voice-call/runtime-entry.js +0 -2
- package/dist/extensions/volcengine/api.js +0 -3
- package/dist/extensions/volcengine/index.js +0 -63
- package/dist/extensions/volcengine/models.js +0 -2
- package/dist/extensions/volcengine/openclaw.plugin.json +0 -33
- package/dist/extensions/volcengine/package.json +0 -12
- package/dist/extensions/volcengine/provider-catalog.js +0 -2
- package/dist/extensions/whatsapp/action-runtime-api.js +0 -2
- package/dist/extensions/whatsapp/action-runtime.runtime.js +0 -2
- package/dist/extensions/whatsapp/api.js +0 -8
- package/dist/extensions/whatsapp/auth-presence.js +0 -2
- package/dist/extensions/whatsapp/channel-config-api.js +0 -2
- package/dist/extensions/whatsapp/constants.js +0 -2
- package/dist/extensions/whatsapp/index.js +0 -12
- package/dist/extensions/whatsapp/light-runtime-api.js +0 -5
- package/dist/extensions/whatsapp/login-qr-api.js +0 -2
- package/dist/extensions/whatsapp/openclaw.plugin.json +0 -11
- package/dist/extensions/whatsapp/package.json +0 -45
- package/dist/extensions/whatsapp/runtime-api.js +0 -334
- package/dist/extensions/whatsapp/setup-entry.js +0 -23
- package/dist/extensions/whatsapp/test-api.js +0 -76
- package/dist/extensions/xai/api.js +0 -6
- package/dist/extensions/xai/code-execution.js +0 -2
- package/dist/extensions/xai/index.js +0 -122
- package/dist/extensions/xai/model-definitions.js +0 -2
- package/dist/extensions/xai/model-id.js +0 -2
- package/dist/extensions/xai/onboard.js +0 -2
- package/dist/extensions/xai/openclaw.plugin.json +0 -157
- package/dist/extensions/xai/package.json +0 -12
- package/dist/extensions/xai/provider-catalog.js +0 -2
- package/dist/extensions/xai/provider-models.js +0 -2
- package/dist/extensions/xai/stream.js +0 -2
- package/dist/extensions/xai/web-search.js +0 -2
- package/dist/extensions/xai/x-search.js +0 -2
- package/dist/extensions/xiaomi/api.js +0 -3
- package/dist/extensions/xiaomi/index.js +0 -37
- package/dist/extensions/xiaomi/onboard.js +0 -2
- package/dist/extensions/xiaomi/openclaw.plugin.json +0 -32
- package/dist/extensions/xiaomi/package.json +0 -12
- package/dist/extensions/xiaomi/provider-catalog.js +0 -2
- package/dist/extensions/zai/api.js +0 -3
- package/dist/extensions/zai/detect.js +0 -2
- package/dist/extensions/zai/index.js +0 -239
- package/dist/extensions/zai/media-understanding-provider.js +0 -2
- package/dist/extensions/zai/model-definitions.js +0 -2
- package/dist/extensions/zai/onboard.js +0 -2
- package/dist/extensions/zai/openclaw.plugin.json +0 -94
- package/dist/extensions/zai/package.json +0 -12
- package/dist/extensions/zai/runtime-api.js +0 -3
- package/dist/extensions/zalo/api.js +0 -3
- package/dist/extensions/zalo/index.js +0 -13
- package/dist/extensions/zalo/openclaw.plugin.json +0 -11
- package/dist/extensions/zalo/package.json +0 -47
- package/dist/extensions/zalo/runtime-api.js +0 -38
- package/dist/extensions/zalo/setup-entry.js +0 -6
- package/dist/extensions/zalo/test-api.js +0 -2
- package/dist/extensions/zalouser/api.js +0 -2
- package/dist/extensions/zalouser/index.js +0 -599
- package/dist/extensions/zalouser/openclaw.plugin.json +0 -11
- package/dist/extensions/zalouser/package.json +0 -48
- package/dist/extensions/zalouser/runtime-api.js +0 -30
- package/dist/extensions/zalouser/setup-entry.js +0 -13
- package/dist/extensions/zalouser/test-api.js +0 -5
- package/dist/external-content-DtoRY-d1.js +0 -242
- package/dist/facade-runtime-Bpi4Gy-u.js +0 -263
- package/dist/failover-error-BrdBIFg2.js +0 -180
- package/dist/feishu-81Iv8tqF.js +0 -18
- package/dist/feishu-conversation-NmEqAxSA.js +0 -17
- package/dist/feishu-setup-DXAK6GqE.js +0 -12
- package/dist/fetch-7dbKQPT5.js +0 -256
- package/dist/fetch-BjiGl865.js +0 -418
- package/dist/fetch-Bp23aO5S.js +0 -65
- package/dist/fetch-guard-BnhVFBtf.js +0 -150
- package/dist/fetch-mock-WghRRNpK.js +0 -6
- package/dist/fetch-runtime-DfFmkkZH.js +0 -4
- package/dist/fetch-timeout-BKMGkHu9.js +0 -58
- package/dist/file-identity-DPm-6kp0.js +0 -567
- package/dist/file-lock-CH0V9dhL.js +0 -141
- package/dist/file-lock-D292sbfa.js +0 -2
- package/dist/firecrawl-client-GOGPuEeg.js +0 -338
- package/dist/firecrawl-search-provider-ptp7GNAt.js +0 -47
- package/dist/format-BwzSM9vY.js +0 -24
- package/dist/format-D38w0aKT.js +0 -817
- package/dist/format-DCFsK8oa.js +0 -19
- package/dist/format-datetime-Bl6-b7G1.js +0 -73
- package/dist/format-duration-DqcpDYkZ.js +0 -57
- package/dist/format-relative-CYrRyrT7.js +0 -54
- package/dist/frontmatter-Ba2Hn11b.js +0 -45
- package/dist/frontmatter-Cjxy4vX8.js +0 -210
- package/dist/fs-safe-BQ59ttjX.js +0 -999
- package/dist/gateway-CWPyH-P7.js +0 -2575
- package/dist/gateway-cli-BmPBPCcJ.js +0 -1572
- package/dist/gateway-discovery-targets--oNzWOVw.js +0 -430
- package/dist/gateway-install-token-tyQyR2ED.js +0 -230
- package/dist/gateway-lock-BbUQuUet.js +0 -292
- package/dist/gateway-presence-BVCIm1hy.js +0 -15
- package/dist/gateway-registry-tQcIThkV.js +0 -74
- package/dist/gateway-rpc-BXdoSPN7.js +0 -26
- package/dist/gateway-runtime-C7EhkU_c.js +0 -12
- package/dist/gaxios-fetch-compat-D4gl5582.js +0 -180
- package/dist/gemini-auth-Dlpcd9MB.js +0 -29
- package/dist/gemini-web-search-provider-CkNEl2du.js +0 -162
- package/dist/get-reply-from-config.runtime-vBmBttxw.js +0 -2
- package/dist/get-reply-from-config.runtime.js +0 -1
- package/dist/git-commit-BS28SZVT.js +0 -2
- package/dist/git-commit-ChiOoWyK.js +0 -177
- package/dist/github-copilot-login-B8s4OVQ4.js +0 -11
- package/dist/github-copilot-token-BwXtH-ZJ.js +0 -2
- package/dist/github-copilot-token-D81Wvm8b.js +0 -2
- package/dist/github-copilot-token-beHjQGOp.js +0 -91
- package/dist/global-singleton-54zT3rCn.js +0 -13
- package/dist/global-singleton-iOq2_-p8.js +0 -1
- package/dist/global-state-DUuMGgts.js +0 -17
- package/dist/globals-CDtV0ht8.js +0 -25
- package/dist/gmail-setup-utils-CxXfU7cy.js +0 -421
- package/dist/google-Cx1_z3Q3.js +0 -24
- package/dist/googlechat-CoiMNDC2.js +0 -37
- package/dist/graph-users-BmZWavVH.js +0 -917
- package/dist/group-access-BZZ3FNmb.js +0 -32
- package/dist/group-access-BjveEAjz.js +0 -113
- package/dist/group-access-owHLoCWX.js +0 -119
- package/dist/group-activation-ClEb7qwj.js +0 -22
- package/dist/group-id-CcsUNOct.js +0 -11
- package/dist/group-policy-Bb8dxOpM.js +0 -25
- package/dist/group-policy-G9GcSyph.js +0 -201
- package/dist/group-policy-wS9F8Y_i.js +0 -51
- package/dist/group-policy-warnings-CL2gHsXM.js +0 -196
- package/dist/groups.runtime-K758xQFV.js +0 -6
- package/dist/groups.runtime.js +0 -1
- package/dist/handle-action-CE4vpa7G.js +0 -500
- package/dist/health-D_KQbqQY.js +0 -577
- package/dist/health-a1VPtSyV.js +0 -2
- package/dist/health-format-COR93f8W.js +0 -26
- package/dist/heartbeat-C_TrErgd.js +0 -122
- package/dist/heartbeat-reply-payload-C7Ac3fOZ.js +0 -13
- package/dist/heartbeat-summary-v5gPj5bd.js +0 -57
- package/dist/heartbeat-visibility-CHMO4pmJ.js +0 -102
- package/dist/help-CyR1Oo4X.js +0 -81
- package/dist/help-format-l1phKNA8.js +0 -15
- package/dist/helpers-COHnQbWX.js +0 -32
- package/dist/helpers-DNpD7VMo.js +0 -24
- package/dist/history-B4mW8GfY.js +0 -102
- package/dist/home-dir-n9onX5PG.js +0 -83
- package/dist/hook-runner-global-C9GhdBtf.js +0 -632
- package/dist/hook-runner-global-Cr_Pthp4.js +0 -2
- package/dist/hook-runtime-DK8QF-2x.js +0 -3
- package/dist/hooks-cli-XCo-7nz9.js +0 -353
- package/dist/hooks-policy-BmULXBcp.js +0 -20
- package/dist/hooks-status-D_ZxRD0H.js +0 -86
- package/dist/host-env-security-SlXI58bc.js +0 -290
- package/dist/host-runtime-BGHb06HN.js +0 -1
- package/dist/hostname-BRYLr_mh.js +0 -8
- package/dist/http-body-CfdQSEp0.js +0 -238
- package/dist/http-client-_3i4-nw5.js +0 -294
- package/dist/http-registry-ZGSBfYSe.js +0 -54
- package/dist/http-route-overlap-C8lbolN5.js +0 -101
- package/dist/identity-BoQQh6Y8.js +0 -26
- package/dist/identity-D64Wfv_s.js +0 -29
- package/dist/identity-DvwF6Yix.js +0 -84
- package/dist/identity-avatar-DPBgVwpU.js +0 -86
- package/dist/identity-file-BtIJI4dn.js +0 -60
- package/dist/image-C4V19x9x.js +0 -152
- package/dist/image-generation-BbOnazXi.js +0 -1
- package/dist/image-generation-provider-CQK8HA0O.js +0 -136
- package/dist/image-generation-provider-CWUvRxmv.js +0 -131
- package/dist/image-generation-provider-F2sfNjcr.js +0 -281
- package/dist/image-ops-BJKjhMAu.js +0 -476
- package/dist/image-runtime-DodXcK2e.js +0 -7
- package/dist/imessage-2ukkzufG.js +0 -19
- package/dist/inbound-context-Cxvd3JHZ.js +0 -59
- package/dist/inbound-context-Czd3FdNb.js +0 -52
- package/dist/inbound-debounce-CI7l3R36.js +0 -159
- package/dist/inbound-envelope-LyHTUTue.js +0 -61
- package/dist/inbound-reply-dispatch-BdeY6N-k.js +0 -73
- package/dist/inbound-text-CacimZtw.js +0 -14
- package/dist/inbound.runtime-CqX3n132.js +0 -3
- package/dist/inbound.runtime.js +0 -1
- package/dist/includes-Ccr-Q5DB.js +0 -188
- package/dist/includes-scan-DVvYLj4S.js +0 -55
- package/dist/index.js +0 -56
- package/dist/infra/warning-filter.js +0 -2
- package/dist/infra-runtime-Cl0iZpRS.js +0 -22
- package/dist/input-files-PZC6ZR4W.js +0 -251
- package/dist/input-provenance-8GBFuk0Q.js +0 -44
- package/dist/inspect-B8dw6NVJ.js +0 -286
- package/dist/install-Bk7XyvtC.js +0 -590
- package/dist/install-package-dir-C2ba2toB.js +0 -284
- package/dist/install-safe-path-CkCd0rWS.js +0 -69
- package/dist/install-security-scan-C02VaEU9.js +0 -22
- package/dist/install-security-scan.runtime-CDUuS6Dl.js +0 -299
- package/dist/install-security-scan.runtime.js +0 -1
- package/dist/install-source-utils-2tdWQmwI.js +0 -167
- package/dist/install-target-CBNysuiP.js +0 -175
- package/dist/install.runtime-D_zKCpnB.js +0 -11
- package/dist/install.runtime-DjQozvMe.js +0 -27
- package/dist/install.runtime.js +0 -1
- package/dist/installs-BnAbQ70v.js +0 -28
- package/dist/interactive-CEnsu1RT.js +0 -8
- package/dist/interactive-runtime-Bxq5ztle.js +0 -1
- package/dist/internal-Lk0wFTNq.js +0 -411
- package/dist/internal-hooks-C3ziA7w_.js +0 -155
- package/dist/io-BUxKr33U.js +0 -2236
- package/dist/io-BuMkfjp3.js +0 -4
- package/dist/ip-BZP18dDl.js +0 -208
- package/dist/ipv4-Xiyu1rvD.js +0 -82
- package/dist/irc-DXfYh-Sd.js +0 -14
- package/dist/irc-surface-Di-joPuc.js +0 -15
- package/dist/is-main-Bv5ej4lF.js +0 -27
- package/dist/issue-format-8Eylt-2O.js +0 -2
- package/dist/issue-format-DLZczJ0U.js +0 -31
- package/dist/json-file-5xJqyXrK.js +0 -23
- package/dist/json-files-C4lsZ_HR.js +0 -72
- package/dist/json-mode-4O1xL2fT.js +0 -34
- package/dist/json-pointer-C30cknnZ.js +0 -43
- package/dist/json-store-FUgu1pyj.js +0 -37
- package/dist/keyed-async-queue-BTOTBE8n.js +0 -32
- package/dist/kill-tree-CIfAbzdN.js +0 -2
- package/dist/kill-tree-CUPpLbeq.js +0 -82
- package/dist/kimi-web-search-provider-Cb3F9_Da.js +0 -224
- package/dist/known-users-DjerpGCB.js +0 -167
- package/dist/lancedb-runtime-DTb_mDUG.js +0 -201
- package/dist/launchd-cp98MUhz.js +0 -517
- package/dist/lazy-runtime-C6LCAM-L.js +0 -29
- package/dist/lazy-runtime-yh_WT4on.js +0 -1
- package/dist/lazy-service-module-CeifO9oo.js +0 -24
- package/dist/legacy-crypto-restore-CsHmLVjY.js +0 -85
- package/dist/legacy-names-CFo8Oe-2.js +0 -9
- package/dist/legacy-web-search-Bn8F2jrN.js +0 -140
- package/dist/legacy.shared-oZM32end.js +0 -45
- package/dist/level-overrides-gqc8xfh2.js +0 -36
- package/dist/library-ChjjeniJ.js +0 -44
- package/dist/lifecycle-core-Ce_ZEvjl.js +0 -402
- package/dist/line-Be0jY3CU.js +0 -4
- package/dist/line-runtime-B0ZGTK81.js +0 -60
- package/dist/line-surface-BTopinac.js +0 -27
- package/dist/links-D7o22Ygt.js +0 -17
- package/dist/listeners-_47QWN8-.js +0 -14
- package/dist/llm-slug-generator-Dv-sLOW9.js +0 -68
- package/dist/llm-slug-generator.js +0 -2
- package/dist/llm-task-BDA3i86A.js +0 -3
- package/dist/load-BXSzQ8YA.js +0 -28
- package/dist/load-options-BqszWkkN.js +0 -36
- package/dist/loader-DsZDoLQ6.js +0 -2519
- package/dist/local-file-access-PajXzDdK.js +0 -49
- package/dist/local-roots-DrpNBv4b.js +0 -46
- package/dist/location-CtMHXE-d.js +0 -42
- package/dist/logger-Bc2lC3X3.js +0 -79
- package/dist/logger-CIV9WBoa.js +0 -11
- package/dist/logger-DdGvppaE.js +0 -75
- package/dist/logger-MWEZrHUL.js +0 -582
- package/dist/logging-B1QD0DRq.js +0 -2
- package/dist/logging-CAfgK7sj.js +0 -3
- package/dist/logging-ColPHIDT.js +0 -16
- package/dist/logging-D4xyCEzZ.js +0 -85
- package/dist/logging-Dt_aiHur.js +0 -13
- package/dist/logging-Dywye6yZ.js +0 -2
- package/dist/logging-core-hw7Df6Hl.js +0 -3
- package/dist/login-BrqdQcNh.js +0 -108
- package/dist/login-DSqrZNW-.js +0 -2333
- package/dist/login-qr-Dm3iC25_.js +0 -212
- package/dist/login-qr-api-BxRDJKkp.js +0 -16
- package/dist/logs-cli-CxjV80As.js +0 -221
- package/dist/magic-string.es-CVHNyqW1.js +0 -1011
- package/dist/main-session-BbO0A-No.js +0 -38
- package/dist/manager-c_fEco8X.js +0 -2773
- package/dist/manager-runtime-Vy_F8ORR.js +0 -2
- package/dist/manager.runtime-Bm1Knq-3.js +0 -670
- package/dist/manager.runtime.js +0 -1
- package/dist/manifest-f_gihArl.js +0 -237
- package/dist/manifest-registry-Kx5Z2lJL.js +0 -1069
- package/dist/map-size-BBQq2RPq.js +0 -15
- package/dist/markdown-table-runtime-Dx12DQTq.js +0 -2
- package/dist/markdown-tables-CSlyhQVP.js +0 -31
- package/dist/mask-api-key-BYVFDQdo.js +0 -10
- package/dist/matrix-NDa-FoaE.js +0 -351
- package/dist/matrix-config-helpers-D0D-oL7I.js +0 -153
- package/dist/matrix-helper-DioFIiaO.js +0 -20
- package/dist/matrix-migration-snapshot-DAOFFSgM.js +0 -714
- package/dist/matrix-ouiFsVI1.js +0 -39
- package/dist/matrix-runtime-heavy-KUEg_MfD.js +0 -4
- package/dist/matrix-runtime-shared-B6aE5Uu6.js +0 -1
- package/dist/matrix-runtime-surface-R78Hde6Q.js +0 -12
- package/dist/matrix-surface-B-nU-e0B.js +0 -13
- package/dist/matrix-thread-bindings-B77Krs8r.js +0 -12
- package/dist/mattermost-Cg2PI71s.js +0 -18
- package/dist/mcp/plugin-tools-serve.js +0 -105
- package/dist/mcp-cli-BMNT4RIm.js +0 -768
- package/dist/mcp-config-3y1z3N2x.js +0 -118
- package/dist/media-CUdiVhEt.js +0 -1691
- package/dist/media-limits-DmcT5KnO.js +0 -14
- package/dist/media-runtime-8QR_uTs0.js +0 -295
- package/dist/media-understanding-CpMkSmKj.js +0 -51
- package/dist/media-understanding-provider-C0xVBaas.js +0 -11
- package/dist/media-understanding-provider-C8RSrdEy.js +0 -16
- package/dist/media-understanding-provider-CCB6_bwc2.js +0 -9
- package/dist/media-understanding-provider-CZ83ep6L.js +0 -16
- package/dist/media-understanding-provider-Cmcg82YY.js +0 -28
- package/dist/media-understanding-provider-D1_z5Kwx.js +0 -11
- package/dist/media-understanding-provider-DC9bhcFj.js +0 -11
- package/dist/media-understanding-provider-DbMV-bHu.js +0 -17
- package/dist/media-understanding-provider-Drg3Vyoe.js +0 -86
- package/dist/media-understanding-runtime-JIhXSD7e.js +0 -15
- package/dist/media-understanding.runtime-2Muvvak4.js +0 -7
- package/dist/media-understanding.runtime.js +0 -1
- package/dist/memory-DPYsR3Cn.js +0 -228
- package/dist/memory-core-engine-runtime-DP_nzKMm.js +0 -14
- package/dist/memory-core-host-engine-embeddings-BhsmnP-6.js +0 -1370
- package/dist/memory-core-host-engine-foundation-CtFD8jpc.js +0 -10
- package/dist/memory-core-host-engine-qmd-DCvmid82.js +0 -375
- package/dist/memory-core-host-engine-storage-N3YflxjF.js +0 -109
- package/dist/memory-core-host-multimodal-BVd6eEE3.js +0 -1
- package/dist/memory-core-host-query-Bxzu0mAD.js +0 -2
- package/dist/memory-core-host-runtime-cli-nz5fxbbn.js +0 -10
- package/dist/memory-core-host-runtime-core-BcGQFQUw.js +0 -8
- package/dist/memory-core-host-runtime-files-DO5A0pY5.js +0 -3
- package/dist/memory-core-host-secret-CQAiTACg.js +0 -1
- package/dist/memory-core-host-status-0g2XexDn.js +0 -44
- package/dist/memory-embedding-providers-BOMS0u3X.js +0 -34
- package/dist/memory-lancedb-kZBcB07O.js +0 -2
- package/dist/memory-runtime-BIGGpmaC.js +0 -2
- package/dist/memory-runtime-XyiDon5w.js +0 -34
- package/dist/memory-search-CQFSugEg.js +0 -2
- package/dist/memory-search-DpAYXyjc.js +0 -202
- package/dist/memory-state-DDJh6L4-.js +0 -41
- package/dist/mention-gating-_kzByrvM.js +0 -25
- package/dist/mentions-BCBF5Klg.js +0 -65
- package/dist/mentions-BKYgZd-C.js +0 -155
- package/dist/merge-patch-CtvE2OP0.js +0 -65
- package/dist/message-Dna6Vsdg.js +0 -205
- package/dist/message-action-discovery-CPTCAl8K.js +0 -133
- package/dist/message-action-runner-Byldnjex.js +0 -1703
- package/dist/message-channel-bEWdw4ul.js +0 -105
- package/dist/message-handler-C9TRy9hy.js +0 -1771
- package/dist/message-hook-mappers-CzwFvq_c.js +0 -255
- package/dist/messages-CQT2FDZ3.js +0 -270
- package/dist/method-scopes-B6e_KuRU.js +0 -2663
- package/dist/migrate-cli-C_iDle77.js +0 -500
- package/dist/migration-snapshot.runtime-DAzTUgU-.js +0 -3
- package/dist/migration-snapshot.runtime.js +0 -1
- package/dist/mime-DkaKoCVP.js +0 -156
- package/dist/min-host-version-CIhgRq0c.js +0 -349
- package/dist/minimax-vlm-Dh6g-MLh.js +0 -512
- package/dist/model-auth-DcCyGs_6.js +0 -377
- package/dist/model-auth-env-OT6ucjoP.js +0 -63
- package/dist/model-auth-label-fGtOs2u-.js +0 -45
- package/dist/model-auth-markers-D2z_AIuC.js +0 -70
- package/dist/model-auth-runtime-shared-DnhseQ_3.js +0 -18
- package/dist/model-buttons-zQ-cRhqo.js +0 -187
- package/dist/model-catalog-f9zO4b6C.js +0 -208
- package/dist/model-catalog.runtime-iRu_OMJS.js +0 -2
- package/dist/model-catalog.runtime.js +0 -1
- package/dist/model-definitions-BGWurJeM.js +0 -49
- package/dist/model-definitions-C-e07VgA.js +0 -255
- package/dist/model-definitions-DUANiLUG.js +0 -126
- package/dist/model-definitions-DrxdjAkB.js +0 -202
- package/dist/model-id-9W_sHLHy.js +0 -12
- package/dist/model-id-DEv7HEyl.js +0 -20
- package/dist/model-input-DwbpFRYm.js +0 -20
- package/dist/model-overrides-BaecXmMv.js +0 -84
- package/dist/model-overrides-UUODi1G1.js +0 -91
- package/dist/model-param-b-BHlbSl5R.js +0 -15
- package/dist/model-picker-BgVMnja3.js +0 -439
- package/dist/model-picker-D8elZqN_.js +0 -3
- package/dist/model-picker.runtime-BUfgRpvT.js +0 -15
- package/dist/model-picker.runtime.js +0 -1
- package/dist/model-runtime-CkjgxQmB.js +0 -1772
- package/dist/model-selection-DXY5nwui.js +0 -407
- package/dist/model-selection-Dx6Ag-ZE.js +0 -505
- package/dist/model-suppression-C8XSEnsv.js +0 -24
- package/dist/model-suppression.runtime-Dqra9AAF.js +0 -7
- package/dist/model-suppression.runtime.js +0 -1
- package/dist/models--Ze_o5z6.js +0 -193
- package/dist/models-7_w_ynp7.js +0 -35
- package/dist/models-BMmB_oQc.js +0 -130
- package/dist/models-B_TKM4gG.js +0 -18
- package/dist/models-B_UROL5b.js +0 -3
- package/dist/models-BmDGSZCK.js +0 -31
- package/dist/models-BywIyTzh.js +0 -126
- package/dist/models-C5GB-E7D.js +0 -154
- package/dist/models-DU3Lv10g.js +0 -754
- package/dist/models-VgpjMiqM.js +0 -138
- package/dist/models-_DZVZ2Na.js +0 -18
- package/dist/models-bBe0FFJe.js +0 -2550
- package/dist/models-cli-kZR11PgM.js +0 -197
- package/dist/models-config-D6j7jkCN.js +0 -2
- package/dist/models-config-lYKxSxLo.js +0 -1106
- package/dist/models-config.runtime-D2tdVUsi.js +0 -2
- package/dist/models-config.runtime.js +0 -1
- package/dist/models-emJUoDsF.js +0 -40
- package/dist/models-gPCm0Fco.js +0 -122
- package/dist/models-mi7nu17U.js +0 -99
- package/dist/models-nUP9ZPV8.js +0 -552
- package/dist/models-provider-runtime-DfIZ0cvV.js +0 -2
- package/dist/monitor-BEjwRY59.js +0 -3622
- package/dist/monitor-BiwufaF7.js +0 -718
- package/dist/monitor-BqwlHm94.js +0 -3660
- package/dist/monitor-Cj6Atk8I.js +0 -676
- package/dist/monitor-D2qBnOYz.js +0 -666
- package/dist/monitor-DZmBV1Nj2.js +0 -2
- package/dist/monitor-RMoB6sGQ.js +0 -4067
- package/dist/monitor-auth-EvlH1zbN.js +0 -192
- package/dist/monitor-lbUydC5_.js +0 -1525
- package/dist/monitor-polling.runtime-O6ZG6yYv.js +0 -307
- package/dist/monitor-polling.runtime.js +0 -1
- package/dist/monitor-provider-x4TUmYNN.js +0 -1782
- package/dist/monitor-vE0skDM1.js +0 -687
- package/dist/monitor-webhook.runtime-DoTv_oZv.js +0 -297
- package/dist/monitor-webhook.runtime.js +0 -1
- package/dist/moonshot-stream-wrappers-Csssd6kW.js +0 -24
- package/dist/moonshot-thinking-stream-wrappers-D3j6Q9Yk.js +0 -69
- package/dist/msteams-DsFLaFEV.js +0 -33
- package/dist/multimodal-DoXQtvBl.js +0 -66
- package/dist/mutable-allowlist-detectors-CbFK2eTK.js +0 -62
- package/dist/native-command-registry-B4BAqmAW.js +0 -2
- package/dist/native-command-session-targets-DfUCBY63.js +0 -10
- package/dist/net-DjzoSxQo.js +0 -265
- package/dist/network-discovery-display-h8MqTMCI.js +0 -48
- package/dist/network-mode-QjJNOXMa.js +0 -17
- package/dist/nextcloud-talk-COZ5YrPY.js +0 -18
- package/dist/node-cli-z8LHYl1w.js +0 -2323
- package/dist/node-command-policy-DoeXKD1V.js +0 -205
- package/dist/node-commands-ycnRypMq.js +0 -11
- package/dist/node-require-BgDD9bTi.js +0 -14
- package/dist/node-resolve-Drr1RIcN.js +0 -110
- package/dist/node-service-Nyf8eLc4.js +0 -68
- package/dist/node-startup-env-CVMjxAUF.js +0 -50
- package/dist/nodes-cli-BMyafV_R.js +0 -1044
- package/dist/nodes-screen-oyGHNlY5.js +0 -219
- package/dist/nodes.helpers-DKBA9twS.js +0 -203
- package/dist/normalize-C46CugdT.js +0 -35
- package/dist/normalize-reply-VrMa_PA2.js +0 -500
- package/dist/normalize-secret-input-CC9iFcnK.js +0 -32
- package/dist/nostr-DGfd-Skj.js +0 -19
- package/dist/note-B5R9zt2K.js +0 -109
- package/dist/notify-CKEt6MKY.js +0 -298
- package/dist/npm-registry-spec-dWUFCqDk.js +0 -100
- package/dist/oauth-BBIy_OBl.js +0 -152
- package/dist/oauth-DzMUt9ZO.js +0 -56
- package/dist/oauth.credentials-CKrXIXPf.js +0 -119
- package/dist/oauth.flow-Dd6MZcHS.js +0 -122
- package/dist/oauth.http-CZlbXoZD.js +0 -23
- package/dist/oauth.project-DAVNbct7.js +0 -125
- package/dist/oauth.shared-D1_wwlyt.js +0 -26
- package/dist/oauth.token-CnB-w_v2.js +0 -42
- package/dist/ollama-EE_SvO8P.js +0 -26
- package/dist/onboard-2otvb4-n.js +0 -307
- package/dist/onboard-72nGEzpd.js +0 -25
- package/dist/onboard-B14oDS4M.js +0 -23
- package/dist/onboard-BH5hcOyK.js +0 -39
- package/dist/onboard-BRkQIFt_.js +0 -25
- package/dist/onboard-BSArlkkq.js +0 -73
- package/dist/onboard-Bau_HSmO.js +0 -36
- package/dist/onboard-BsqpQhXj.js +0 -591
- package/dist/onboard-CBa7u1iZ.js +0 -25
- package/dist/onboard-CLKZrJow.js +0 -29
- package/dist/onboard-COaMJ5wS.js +0 -28
- package/dist/onboard-CbTQZti9.js +0 -48
- package/dist/onboard-Ce3rcBNR.js +0 -29
- package/dist/onboard-CiMzgSvO.js +0 -67
- package/dist/onboard-DNuWjUOg.js +0 -17
- package/dist/onboard-DY3JtOcX.js +0 -47
- package/dist/onboard-Dd_eFJ7g.js +0 -25
- package/dist/onboard-DgMI-C3P.js +0 -24
- package/dist/onboard-Dj3Kkl9C.js +0 -49
- package/dist/onboard-Djne8OY8.js +0 -34
- package/dist/onboard-DnNU28xK.js +0 -48
- package/dist/onboard-MFS79j1I.js +0 -23
- package/dist/onboard-REHqRyQm.js +0 -26
- package/dist/onboard-VVnzyvuh.js +0 -46
- package/dist/onboard-channels-B8UocRdo.js +0 -705
- package/dist/onboard-channels-Ci5QQyQ0.js +0 -2
- package/dist/onboard-config-7edS4yYd.js +0 -2
- package/dist/onboard-config-C-6p2HNL.js +0 -29
- package/dist/onboard-custom-BREC7K0s.js +0 -2
- package/dist/onboard-custom-D7oXiV6u.js +0 -646
- package/dist/onboard-helpers-BCIfy96O.js +0 -4
- package/dist/onboard-helpers-CLedS83g.js +0 -227
- package/dist/onboard-hooks-DW0gav3i.js +0 -52
- package/dist/onboard-lh38uUOa.js +0 -25
- package/dist/onboard-rH_HA9v-.js +0 -34
- package/dist/onboard-remote-DG5Rb2y7.js +0 -2
- package/dist/onboard-remote-DgDwHLCW.js +0 -193
- package/dist/onboard-search-Bz78SAON.js +0 -339
- package/dist/onboard-skills-BK1iF6NI.js +0 -2
- package/dist/onboard-skills-Cfs4Gz-d.js +0 -134
- package/dist/openai-B3atWWiZ.js +0 -21
- package/dist/openai-codex-auth-identity-blYgqX5I.js +0 -40
- package/dist/openai-codex-catalog-DQoW5ntP.js +0 -11
- package/dist/openai-codex-provider-BeX3_fQL.js +0 -254
- package/dist/openai-provider-DfSRc815.js +0 -272
- package/dist/openai-stream-wrappers-Cmn9nSYj.js +0 -338
- package/dist/openclaw-exec-env-DnTrPIdx.js +0 -17
- package/dist/openclaw-root-F1SOdmJ0.js +0 -88
- package/dist/openclaw-tools.runtime-Dx73yE1V.js +0 -2
- package/dist/openclaw-tools.runtime.js +0 -1
- package/dist/operator-approvals-client-NQtGN5k_.js +0 -33
- package/dist/order-DNBhjW6F.js +0 -744
- package/dist/origin-routing-BC2EzQqM.js +0 -15
- package/dist/origin-routing-BVUTLJGu.js +0 -2
- package/dist/os-summary-CdlXkpL1.js +0 -26
- package/dist/outbound-adapter-D6WGzS7P.js +0 -183
- package/dist/outbound-ek4CqhT2.js +0 -2
- package/dist/outbound-hgMEZIU9.js +0 -2739
- package/dist/outbound-media-B2ZrkOxl.js +0 -15
- package/dist/outbound-runtime-CtDmQy3z.js +0 -2
- package/dist/outbound-send-deps-COPf3lwV.js +0 -7
- package/dist/outbound-session-DHKvttsz.js +0 -41
- package/dist/pairing-challenge-O7jo1Q5R.js +0 -33
- package/dist/pairing-cli-BEUxC5EH.js +0 -116
- package/dist/pairing-labels-Cj1fFxG9.js +0 -7
- package/dist/pairing-message-FaqHPEFk.js +0 -4
- package/dist/pairing-messages-DxLpe0GE.js +0 -23
- package/dist/pairing-pending-DGyUpmjC.js +0 -14
- package/dist/pairing-store-B171dUVa.js +0 -617
- package/dist/pairing-token-CnyXOU__.js +0 -88
- package/dist/param-readers-CqAoT2n2.js +0 -2
- package/dist/parse-duration-D9q1V0xx.js +0 -41
- package/dist/parse-finite-number-CzdLC_gQ.js +0 -30
- package/dist/parse-json-compat-DfjRYtKX.js +0 -11
- package/dist/parse-log-line-Cd0JHPGg.js +0 -43
- package/dist/parse-port-BFmNhrtE.js +0 -8
- package/dist/parse-timeout-bktz0495.js +0 -27
- package/dist/path-alias-guards-BeOn9PZR.js +0 -40
- package/dist/path-env-C2F1kvna.js +0 -87
- package/dist/path-safety-2mfHCe0n.js +0 -12
- package/dist/paths-Bw8Ci57u.js +0 -2
- package/dist/paths-GWMNxnBn.js +0 -201
- package/dist/paths-xpks599B.js +0 -180
- package/dist/payload-S8niBCaz.js +0 -90
- package/dist/pdf-extract-Cm83kt2M.js +0 -73
- package/dist/perplexity-web-search-provider-Cgr2BYVk.js +0 -423
- package/dist/persistent-bindings.lifecycle-CAOm8v8I.js +0 -159
- package/dist/persistent-dedupe-DoNHVMWs.js +0 -116
- package/dist/pi-embedded-DEAtCIdT.js +0 -40616
- package/dist/pi-embedded-helpers-BVjvCsor.js +0 -1733
- package/dist/pi-embedded.runtime-Ctj3QFs-.js +0 -4
- package/dist/pi-embedded.runtime.js +0 -1
- package/dist/pi-model-discovery-KjI5xf8m.js +0 -188
- package/dist/pi-settings-BJzoHYF9.js +0 -57
- package/dist/pi-tools.before-tool-call.runtime-DJ6s0GDV.js +0 -354
- package/dist/pi-tools.before-tool-call.runtime.js +0 -1
- package/dist/plugin-auto-enable-BZvicayR.js +0 -400
- package/dist/plugin-entry-D0vhddM4.js +0 -25
- package/dist/plugin-entry.runtime-Xd644UDA.js +0 -112
- package/dist/plugin-entry.runtime.js +0 -1
- package/dist/plugin-error-boundary-RI4ByQoA.js +0 -55
- package/dist/plugin-error-handler-DWUTf_UF.js +0 -109
- package/dist/plugin-health-checker-2c6LyJwr.js +0 -125
- package/dist/plugin-hot-reload-CA3__dZN.js +0 -215
- package/dist/plugin-install-BjVLwj7-.js +0 -230
- package/dist/plugin-install-CjwMt13j.js +0 -2
- package/dist/plugin-install-config-policy-MApev-w-.js +0 -93
- package/dist/plugin-install-path-warnings-BkBH-k4n.js +0 -40
- package/dist/plugin-install-plan-0fWhyVBN.js +0 -50
- package/dist/plugin-registry-CORVyKHv.js +0 -74
- package/dist/plugin-registry-Dl1iIh7W.js +0 -2
- package/dist/plugin-runtime-Dd1YN95W.js +0 -6
- package/dist/plugin-sdk/account-core.js +0 -8
- package/dist/plugin-sdk/account-helpers.js +0 -4
- package/dist/plugin-sdk/account-id.js +0 -3
- package/dist/plugin-sdk/account-resolution.js +0 -12
- package/dist/plugin-sdk/acp-runtime.js +0 -3
- package/dist/plugin-sdk/agent-config-primitives.js +0 -3
- package/dist/plugin-sdk/agent-runtime.js +0 -29
- package/dist/plugin-sdk/allow-from.js +0 -5
- package/dist/plugin-sdk/allowlist-config-edit.js +0 -2
- package/dist/plugin-sdk/amazon-bedrock.js +0 -15
- package/dist/plugin-sdk/anthropic-vertex.js +0 -2
- package/dist/plugin-sdk/approval-runtime.js +0 -8
- package/dist/plugin-sdk/bluebubbles-policy.js +0 -2
- package/dist/plugin-sdk/bluebubbles.js +0 -39
- package/dist/plugin-sdk/boolean-param.js +0 -2
- package/dist/plugin-sdk/browser-runtime.js +0 -3
- package/dist/plugin-sdk/browser-support.js +0 -44
- package/dist/plugin-sdk/browser.js +0 -15
- package/dist/plugin-sdk/byteplus.js +0 -17
- package/dist/plugin-sdk/channel-actions.js +0 -3
- package/dist/plugin-sdk/channel-config-helpers.js +0 -2
- package/dist/plugin-sdk/channel-config-primitives.js +0 -4
- package/dist/plugin-sdk/channel-config-schema.js +0 -7
- package/dist/plugin-sdk/channel-config-writes.js +0 -3
- package/dist/plugin-sdk/channel-contract.js +0 -1
- package/dist/plugin-sdk/channel-feedback.js +0 -5
- package/dist/plugin-sdk/channel-inbound.js +0 -10
- package/dist/plugin-sdk/channel-lifecycle.js +0 -3
- package/dist/plugin-sdk/channel-pairing.js +0 -2
- package/dist/plugin-sdk/channel-policy.js +0 -6
- package/dist/plugin-sdk/channel-reply-pipeline.js +0 -2
- package/dist/plugin-sdk/channel-runtime.js +0 -16
- package/dist/plugin-sdk/channel-send-result.js +0 -2
- package/dist/plugin-sdk/channel-setup.js +0 -5
- package/dist/plugin-sdk/channel-status.js +0 -5
- package/dist/plugin-sdk/channel-targets.js +0 -5
- package/dist/plugin-sdk/chutes.js +0 -20
- package/dist/plugin-sdk/cli-backend.js +0 -3
- package/dist/plugin-sdk/cli-runtime.js +0 -7
- package/dist/plugin-sdk/cloudflare-ai-gateway.js +0 -18
- package/dist/plugin-sdk/collection-runtime.js +0 -3
- package/dist/plugin-sdk/command-auth-native.js +0 -6
- package/dist/plugin-sdk/command-auth.js +0 -14
- package/dist/plugin-sdk/command-detection.js +0 -3
- package/dist/plugin-sdk/command-surface.js +0 -3
- package/dist/plugin-sdk/compat.js +0 -35
- package/dist/plugin-sdk/config-runtime.js +0 -25
- package/dist/plugin-sdk/conversation-runtime.js +0 -15
- package/dist/plugin-sdk/core.js +0 -22
- package/dist/plugin-sdk/dangerous-name-runtime.js +0 -3
- package/dist/plugin-sdk/deepseek.js +0 -14
- package/dist/plugin-sdk/device-bootstrap.js +0 -4
- package/dist/plugin-sdk/diagnostic-runtime.js +0 -4
- package/dist/plugin-sdk/diagnostics-otel.js +0 -6
- package/dist/plugin-sdk/diffs.js +0 -4
- package/dist/plugin-sdk/direct-dm.js +0 -2
- package/dist/plugin-sdk/directory-runtime.js +0 -5
- package/dist/plugin-sdk/discord-account.js +0 -2
- package/dist/plugin-sdk/discord-core.js +0 -9
- package/dist/plugin-sdk/discord-runtime-surface.js +0 -2
- package/dist/plugin-sdk/discord-session-key.js +0 -2
- package/dist/plugin-sdk/discord-surface.js +0 -2
- package/dist/plugin-sdk/discord-thread-bindings.js +0 -2
- package/dist/plugin-sdk/discord-timeouts.js +0 -2
- package/dist/plugin-sdk/discord.js +0 -21
- package/dist/plugin-sdk/error-runtime.js +0 -3
- package/dist/plugin-sdk/extension-shared.js +0 -3
- package/dist/plugin-sdk/feishu-conversation.js +0 -2
- package/dist/plugin-sdk/feishu-setup.js +0 -2
- package/dist/plugin-sdk/feishu.js +0 -34
- package/dist/plugin-sdk/fetch-runtime.js +0 -7
- package/dist/plugin-sdk/file-lock.js +0 -2
- package/dist/plugin-sdk/gateway-runtime.js +0 -4
- package/dist/plugin-sdk/github-copilot-login.js +0 -2
- package/dist/plugin-sdk/github-copilot-token.js +0 -3
- package/dist/plugin-sdk/global-singleton.js +0 -4
- package/dist/plugin-sdk/google.js +0 -2
- package/dist/plugin-sdk/googlechat.js +0 -38
- package/dist/plugin-sdk/group-access.js +0 -2
- package/dist/plugin-sdk/hook-runtime.js +0 -4
- package/dist/plugin-sdk/host-runtime.js +0 -4
- package/dist/plugin-sdk/huggingface.js +0 -18
- package/dist/plugin-sdk/image-generation-core.js +0 -63
- package/dist/plugin-sdk/image-generation.js +0 -2
- package/dist/plugin-sdk/index.js +0 -5
- package/dist/plugin-sdk/infra-runtime.js +0 -45
- package/dist/plugin-sdk/interactive-runtime.js +0 -4
- package/dist/plugin-sdk/irc-surface.js +0 -2
- package/dist/plugin-sdk/irc.js +0 -30
- package/dist/plugin-sdk/json-store.js +0 -3
- package/dist/plugin-sdk/keyed-async-queue.js +0 -2
- package/dist/plugin-sdk/kilocode.js +0 -23
- package/dist/plugin-sdk/kimi-coding.js +0 -11
- package/dist/plugin-sdk/lazy-runtime.js +0 -3
- package/dist/plugin-sdk/line-core.js +0 -6
- package/dist/plugin-sdk/line-runtime.js +0 -2
- package/dist/plugin-sdk/line-surface.js +0 -2
- package/dist/plugin-sdk/line.js +0 -9
- package/dist/plugin-sdk/llm-task.js +0 -6
- package/dist/plugin-sdk/logging-core.js +0 -5
- package/dist/plugin-sdk/markdown-table-runtime.js +0 -3
- package/dist/plugin-sdk/matrix-helper.js +0 -2
- package/dist/plugin-sdk/matrix-runtime-heavy.js +0 -5
- package/dist/plugin-sdk/matrix-runtime-shared.js +0 -3
- package/dist/plugin-sdk/matrix-runtime-surface.js +0 -2
- package/dist/plugin-sdk/matrix-surface.js +0 -2
- package/dist/plugin-sdk/matrix-thread-bindings.js +0 -2
- package/dist/plugin-sdk/matrix.js +0 -53
- package/dist/plugin-sdk/mattermost-policy.js +0 -11
- package/dist/plugin-sdk/mattermost.js +0 -41
- package/dist/plugin-sdk/media-runtime.js +0 -17
- package/dist/plugin-sdk/media-understanding-runtime.js +0 -2
- package/dist/plugin-sdk/media-understanding.js +0 -3
- package/dist/plugin-sdk/memory-core-engine-runtime.js +0 -2
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.js +0 -6
- package/dist/plugin-sdk/memory-core-host-engine-foundation.js +0 -17
- package/dist/plugin-sdk/memory-core-host-engine-qmd.js +0 -3
- package/dist/plugin-sdk/memory-core-host-engine-storage.js +0 -4
- package/dist/plugin-sdk/memory-core-host-multimodal.js +0 -3
- package/dist/plugin-sdk/memory-core-host-query.js +0 -3
- package/dist/plugin-sdk/memory-core-host-runtime-cli.js +0 -12
- package/dist/plugin-sdk/memory-core-host-runtime-core.js +0 -14
- package/dist/plugin-sdk/memory-core-host-runtime-files.js +0 -4
- package/dist/plugin-sdk/memory-core-host-secret.js +0 -3
- package/dist/plugin-sdk/memory-core-host-status.js +0 -2
- package/dist/plugin-sdk/memory-core.js +0 -29
- package/dist/plugin-sdk/memory-lancedb.js +0 -4
- package/dist/plugin-sdk/minimax.js +0 -24
- package/dist/plugin-sdk/mistral.js +0 -17
- package/dist/plugin-sdk/models-provider-runtime.js +0 -3
- package/dist/plugin-sdk/modelstudio-definitions.js +0 -19
- package/dist/plugin-sdk/modelstudio.js +0 -24
- package/dist/plugin-sdk/moonshot.js +0 -17
- package/dist/plugin-sdk/msteams.js +0 -46
- package/dist/plugin-sdk/native-command-registry.js +0 -3
- package/dist/plugin-sdk/nextcloud-talk.js +0 -35
- package/dist/plugin-sdk/nostr.js +0 -14
- package/dist/plugin-sdk/nvidia.js +0 -11
- package/dist/plugin-sdk/ollama-surface.js +0 -24
- package/dist/plugin-sdk/ollama.js +0 -2
- package/dist/plugin-sdk/openai.js +0 -2
- package/dist/plugin-sdk/opencode-go.js +0 -14
- package/dist/plugin-sdk/opencode.js +0 -15
- package/dist/plugin-sdk/outbound-runtime.js +0 -5
- package/dist/plugin-sdk/param-readers.js +0 -3
- package/dist/plugin-sdk/plugin-entry.js +0 -3
- package/dist/plugin-sdk/plugin-runtime.js +0 -8
- package/dist/plugin-sdk/process-runtime.js +0 -3
- package/dist/plugin-sdk/provider-auth-api-key.js +0 -9
- package/dist/plugin-sdk/provider-auth-login.js +0 -2
- package/dist/plugin-sdk/provider-auth-result.js +0 -2
- package/dist/plugin-sdk/provider-auth-runtime.js +0 -5
- package/dist/plugin-sdk/provider-auth.js +0 -17
- package/dist/plugin-sdk/provider-catalog-shared.js +0 -2
- package/dist/plugin-sdk/provider-entry.js +0 -2
- package/dist/plugin-sdk/provider-env-vars.js +0 -3
- package/dist/plugin-sdk/provider-http.js +0 -6
- package/dist/plugin-sdk/provider-model-shared.js +0 -5
- package/dist/plugin-sdk/provider-moonshot.js +0 -3
- package/dist/plugin-sdk/provider-onboard.js +0 -3
- package/dist/plugin-sdk/provider-setup.js +0 -3
- package/dist/plugin-sdk/provider-stream.js +0 -4
- package/dist/plugin-sdk/provider-tools.js +0 -2
- package/dist/plugin-sdk/provider-usage.js +0 -3
- package/dist/plugin-sdk/provider-web-fetch.js +0 -6
- package/dist/plugin-sdk/provider-web-search.js +0 -7
- package/dist/plugin-sdk/provider-zai-endpoint.js +0 -2
- package/dist/plugin-sdk/qianfan.js +0 -13
- package/dist/plugin-sdk/reply-chunking.js +0 -4
- package/dist/plugin-sdk/reply-dispatch-runtime.js +0 -5
- package/dist/plugin-sdk/reply-history.js +0 -3
- package/dist/plugin-sdk/reply-payload.js +0 -2
- package/dist/plugin-sdk/reply-runtime.js +0 -14
- package/dist/plugin-sdk/request-url.js +0 -2
- package/dist/plugin-sdk/retry-runtime.js +0 -4
- package/dist/plugin-sdk/root-alias.cjs +0 -347
- package/dist/plugin-sdk/routing.js +0 -9
- package/dist/plugin-sdk/runtime-config-snapshot.js +0 -3
- package/dist/plugin-sdk/runtime-env.js +0 -17
- package/dist/plugin-sdk/runtime-group-policy.js +0 -3
- package/dist/plugin-sdk/runtime-store.js +0 -2
- package/dist/plugin-sdk/runtime.js +0 -9
- package/dist/plugin-sdk/sandbox.js +0 -6
- package/dist/plugin-sdk/secret-input.js +0 -4
- package/dist/plugin-sdk/security-runtime.js +0 -6
- package/dist/plugin-sdk/self-hosted-provider-setup.js +0 -2
- package/dist/plugin-sdk/session-store-runtime.js +0 -4
- package/dist/plugin-sdk/setup-adapter-runtime.js +0 -3
- package/dist/plugin-sdk/setup-runtime.js +0 -6
- package/dist/plugin-sdk/setup-tools.js +0 -6
- package/dist/plugin-sdk/setup.js +0 -13
- package/dist/plugin-sdk/sglang.js +0 -15
- package/dist/plugin-sdk/signal-account.js +0 -2
- package/dist/plugin-sdk/signal-surface.js +0 -2
- package/dist/plugin-sdk/signal.js +0 -24
- package/dist/plugin-sdk/skill-commands-runtime.js +0 -3
- package/dist/plugin-sdk/slack-account.js +0 -2
- package/dist/plugin-sdk/slack-core.js +0 -7
- package/dist/plugin-sdk/slack-runtime-surface.js +0 -2
- package/dist/plugin-sdk/slack-surface.js +0 -2
- package/dist/plugin-sdk/slack-target-parser.js +0 -2
- package/dist/plugin-sdk/slack-targets.js +0 -3
- package/dist/plugin-sdk/slack.js +0 -20
- package/dist/plugin-sdk/speech-core.js +0 -4
- package/dist/plugin-sdk/speech-runtime.js +0 -2
- package/dist/plugin-sdk/speech.js +0 -5
- package/dist/plugin-sdk/ssrf-runtime.js +0 -6
- package/dist/plugin-sdk/state-paths.js +0 -3
- package/dist/plugin-sdk/status-helpers.js +0 -4
- package/dist/plugin-sdk/string-normalization-runtime.js +0 -3
- package/dist/plugin-sdk/synthetic.js +0 -17
- package/dist/plugin-sdk/telegram-account.js +0 -2
- package/dist/plugin-sdk/telegram-allow-from.js +0 -12
- package/dist/plugin-sdk/telegram-command-config.js +0 -3
- package/dist/plugin-sdk/telegram-core.js +0 -18
- package/dist/plugin-sdk/telegram-surface.js +0 -42
- package/dist/plugin-sdk/temp-path.js +0 -4
- package/dist/plugin-sdk/testing.js +0 -11
- package/dist/plugin-sdk/text-runtime.js +0 -19
- package/dist/plugin-sdk/thread-bindings-runtime.js +0 -4
- package/dist/plugin-sdk/thread-ownership.js +0 -5
- package/dist/plugin-sdk/tlon.js +0 -13
- package/dist/plugin-sdk/together.js +0 -16
- package/dist/plugin-sdk/tool-send.js +0 -2
- package/dist/plugin-sdk/twitch.js +0 -8
- package/dist/plugin-sdk/venice.js +0 -16
- package/dist/plugin-sdk/vllm.js +0 -15
- package/dist/plugin-sdk/voice-call.js +0 -7
- package/dist/plugin-sdk/volcengine.js +0 -17
- package/dist/plugin-sdk/web-media.js +0 -4
- package/dist/plugin-sdk/webhook-ingress.js +0 -9
- package/dist/plugin-sdk/webhook-path.js +0 -2
- package/dist/plugin-sdk/webhook-request-guards.js +0 -3
- package/dist/plugin-sdk/whatsapp-auth-presence.js +0 -2
- package/dist/plugin-sdk/whatsapp-core.js +0 -11
- package/dist/plugin-sdk/whatsapp-shared.js +0 -5
- package/dist/plugin-sdk/whatsapp-surface.js +0 -2
- package/dist/plugin-sdk/whatsapp-targets.js +0 -2
- package/dist/plugin-sdk/windows-spawn.js +0 -2
- package/dist/plugin-sdk/xai.js +0 -27
- package/dist/plugin-sdk/zalo-setup.js +0 -2
- package/dist/plugin-sdk/zalo.js +0 -38
- package/dist/plugin-sdk/zalouser.js +0 -29
- package/dist/plugin-sdk/zod.js +0 -3
- package/dist/plugins/build-smoke-entry.js +0 -4
- package/dist/plugins/provider-runtime.runtime.js +0 -2
- package/dist/plugins/runtime/index.js +0 -2
- package/dist/plugins/runtime/runtime-line.contract.js +0 -23
- package/dist/plugins-DcjzAZWt.js +0 -5
- package/dist/plugins-allowlist-DoZlIC4p.js +0 -14
- package/dist/plugins-cli-G6GhHHD0.js +0 -561
- package/dist/plugins-command-helpers-CIYzoC65.js +0 -116
- package/dist/plugins-install-persist-C5-bJdRb.js +0 -121
- package/dist/plugins-update-command-CsT_saJm.js +0 -974
- package/dist/plugins-w6xUzHby.js +0 -40
- package/dist/pluralkit-B_DWQnc5.js +0 -21
- package/dist/pluralkit-Bez5QVFC.js +0 -2
- package/dist/policy-D6OQdw73.js +0 -173
- package/dist/policy-DXeeH8B2.js +0 -147
- package/dist/poll-params-DTVSSuok.js +0 -52
- package/dist/polls-CMmT0F_y.js +0 -35
- package/dist/port-defaults-Dajs4Obu.js +0 -30
- package/dist/ports-DuU-A86K.js +0 -262
- package/dist/ports-ZA1n2It7.js +0 -432
- package/dist/ports-lsof-Cw_6T7ru.js +0 -25
- package/dist/ports-probe-DeuK48Pq.js +0 -14
- package/dist/preflight-audio-DTSBExi8.js +0 -48
- package/dist/preflight-audio.runtime-BJRLyBvf.js +0 -7
- package/dist/preflight-audio.runtime.js +0 -1
- package/dist/prepare-BQBndJUC.js +0 -1301
- package/dist/probe-BO4hbHvs.js +0 -435
- package/dist/probe-DPv2pfj5.js +0 -1868
- package/dist/probe-DlO2Q9rN.js +0 -170
- package/dist/probe-RbbTQOHx.js +0 -178
- package/dist/probe-auth-Bl9MHtlP.js +0 -2
- package/dist/probe-auth-CUfEH7di.js +0 -63
- package/dist/probe-eYLpFww_.js +0 -137
- package/dist/probe-kfBMuOWF.js +0 -2
- package/dist/probe-wktb4WTP.js +0 -349
- package/dist/probe.runtime-BhbUesak.js +0 -2
- package/dist/probe.runtime.js +0 -1
- package/dist/process-runtime-CBFMzhIk.js +0 -2
- package/dist/process-scoped-map-C7IoOrV-.js +0 -61
- package/dist/profile-B5n9yLlB.js +0 -2
- package/dist/profile-CmsqnPsu.js +0 -107
- package/dist/profile-update-D6f10CZk.js +0 -67
- package/dist/profile-utils-C7uzTwgJ.js +0 -15
- package/dist/profiles-BoNergZo.js +0 -79
- package/dist/program-BuKG0Ntx.js +0 -158
- package/dist/program-context-DDmlbmbl.js +0 -2
- package/dist/program-context-DQOnR5c_.js +0 -10
- package/dist/progress-DQvXYKne.js +0 -132
- package/dist/prompt-COzf5LIJ.js +0 -2
- package/dist/prompt-OSmU-o7R.js +0 -20
- package/dist/prompt-select-styled-yYL3el77.js +0 -6432
- package/dist/prompt-style-DekFM6h7.js +0 -7
- package/dist/prompts-MtRTsZpw.js +0 -9
- package/dist/prototype-keys-DrjhYNcz.js +0 -11
- package/dist/provider-BWTXmDq3.js +0 -3685
- package/dist/provider-BrmcrkEe.js +0 -70
- package/dist/provider-ByBRbhW5.js +0 -7216
- package/dist/provider-api-key-auth-BcyipSdy.js +0 -109
- package/dist/provider-api-key-auth.runtime-BRu_8L4m.js +0 -14
- package/dist/provider-api-key-auth.runtime.js +0 -1
- package/dist/provider-attribution-DMVujx9B.js +0 -285
- package/dist/provider-auth-DK2UmYsZ.js +0 -43
- package/dist/provider-auth-api-key-99KxscjW.js +0 -5
- package/dist/provider-auth-choice-GbHta8Bp.js +0 -134
- package/dist/provider-auth-choice-helpers-CO2MnSGR.js +0 -58
- package/dist/provider-auth-choice-preference-DvAqSMGK.js +0 -44
- package/dist/provider-auth-choice.runtime-B8R63sLq.js +0 -14
- package/dist/provider-auth-choice.runtime-DypTKgMQ.js +0 -2
- package/dist/provider-auth-choice.runtime.js +0 -1
- package/dist/provider-auth-choices-n-JV1XgU.js +0 -65
- package/dist/provider-auth-guidance-DAB9sGGR.js +0 -35
- package/dist/provider-auth-helpers-gmTAji1W.js +0 -92
- package/dist/provider-auth-input-GgY_tjJh.js +0 -116
- package/dist/provider-auth-login-BYbccnB1.js +0 -8
- package/dist/provider-auth-login.runtime-DnSxCwqU.js +0 -196
- package/dist/provider-auth-login.runtime.js +0 -1
- package/dist/provider-auth-mode-Dbja5LLX.js +0 -20
- package/dist/provider-auth-ref-BErMfwCd.js +0 -171
- package/dist/provider-auth-ref-DEF_hE2R.js +0 -2
- package/dist/provider-auth-result-DiUxDF1G.js +0 -31
- package/dist/provider-auth-runtime-BwMq9oMD.js +0 -32
- package/dist/provider-catalog--Qc0q0I-.js +0 -26
- package/dist/provider-catalog-A_s8JQaq.js +0 -18
- package/dist/provider-catalog-B-EcLvBI.js +0 -11
- package/dist/provider-catalog-Bte-HucL.js +0 -44
- package/dist/provider-catalog-C63Rfat7.js +0 -11
- package/dist/provider-catalog-C7q0Vb3S.js +0 -95
- package/dist/provider-catalog-CCnuf8d3.js +0 -49
- package/dist/provider-catalog-CYQ7k_Db.js +0 -48
- package/dist/provider-catalog-CnlB2mMZ.js +0 -11
- package/dist/provider-catalog-CoyAbDZX.js +0 -56
- package/dist/provider-catalog-CtqhFopw.js +0 -48
- package/dist/provider-catalog-CyGxB_aR.js +0 -18
- package/dist/provider-catalog-D1pmWiDQ.js +0 -48
- package/dist/provider-catalog-DGgsalJv.js +0 -12
- package/dist/provider-catalog-DLdTTMmW.js +0 -11
- package/dist/provider-catalog-DZzX7Vwk.js +0 -54
- package/dist/provider-catalog-J2dZciKS.js +0 -11
- package/dist/provider-catalog-LVrcrz-W.js +0 -36
- package/dist/provider-catalog-aIN0QojF.js +0 -11
- package/dist/provider-catalog-shared-Db9nbr1B.js +0 -28
- package/dist/provider-discovery.runtime-BCUAsMMz.js +0 -10
- package/dist/provider-discovery.runtime.js +0 -1
- package/dist/provider-dispatcher-COxXbow_.js +0 -22
- package/dist/provider-entry-CT_YeII_.js +0 -86
- package/dist/provider-env-vars-4Bon7Y2X.js +0 -121
- package/dist/provider-env-vars-Np7qkDjC.js +0 -2
- package/dist/provider-flow-Dlg1GcXQ.js +0 -93
- package/dist/provider-http-DQQ317hc.js +0 -3
- package/dist/provider-id-CHzLB538.js +0 -30
- package/dist/provider-model-defaults-dSPzPas0.js +0 -5
- package/dist/provider-model-primary-D8SgLcOd.js +0 -26
- package/dist/provider-model-shared-GO1WT2fY.js +0 -104
- package/dist/provider-models-BG8YwJaY.js +0 -117
- package/dist/provider-models-BVVCdM8F.js +0 -22
- package/dist/provider-models-D2UZvTo3.js +0 -46
- package/dist/provider-moonshot-Cl8urWHL.js +0 -2
- package/dist/provider-oauth-flow-Bu2gIeX6.js +0 -33
- package/dist/provider-onboard-CTEHTjfw.js +0 -264
- package/dist/provider-openai-codex-oauth-tls-DdLUDuIM.js +0 -101
- package/dist/provider-registry-Ljtt6CKE.js +0 -49
- package/dist/provider-request-config-CIrbwAnR.js +0 -209
- package/dist/provider-runtime-BBFXlsU0.js +0 -2
- package/dist/provider-runtime-D_itmv9t.js +0 -291
- package/dist/provider-runtime.runtime-B_oC992d.js +0 -26
- package/dist/provider-runtime.runtime.js +0 -1
- package/dist/provider-self-hosted-setup-BlNrSREL.js +0 -272
- package/dist/provider-session.runtime-DQyRV-t3.js +0 -7
- package/dist/provider-session.runtime.js +0 -1
- package/dist/provider-setup-CSrOyU04.js +0 -2
- package/dist/provider-stream-m5D8QZPz.js +0 -289
- package/dist/provider-tools-NuJzTqa1.js +0 -37
- package/dist/provider-usage-BB5mQ8Fg.js +0 -3
- package/dist/provider-usage-CbPs3eFQ.js +0 -2
- package/dist/provider-usage-DG1gff_M.js +0 -375
- package/dist/provider-usage.fetch-DHWQ4YZu.js +0 -633
- package/dist/provider-web-fetch-QzED2vth.js +0 -5
- package/dist/provider-web-search-CVMEZcl8.js +0 -306
- package/dist/provider-wizard-B0ocsg3q.js +0 -209
- package/dist/provider-zai-endpoint-DoIy5HQf.js +0 -116
- package/dist/provider.runtime-jHt6447e.js +0 -2
- package/dist/provider.runtime.js +0 -1
- package/dist/providers-DUy2TaM-.js +0 -59
- package/dist/providers.runtime-Bz0X8DZ2.js +0 -60
- package/dist/providers.runtime.js +0 -1
- package/dist/proxy-env-D4H9qI5l.js +0 -40
- package/dist/proxy-fetch-DiyTLcAR.js +0 -55
- package/dist/proxy-hcRRmsDd.js +0 -121
- package/dist/pw-ai-Cp64-UGh.js +0 -2037
- package/dist/qmd-manager-D2rMomsU.js +0 -1740
- package/dist/qr-cli-DuANCi-n.js +0 -2
- package/dist/qr-cli-lr5CcLr8.js +0 -367
- package/dist/qr-image-DOcoqAUw.js +0 -2
- package/dist/query-expansion-85HlYbKD.js +0 -633
- package/dist/queue-CtO0M_P1.js +0 -663
- package/dist/reaction-runtime-api-B4KmfKtJ.js +0 -114
- package/dist/reactions-5N2KSGJ2.js +0 -258
- package/dist/read-only-account-inspect-Y_ijOKJ3.js +0 -9
- package/dist/read-only-account-inspect.telegram-BSjjDWnM.js +0 -202
- package/dist/reasoning-tags-CAmbBXLr.js +0 -77
- package/dist/recovery-key-store-DqgdfMc7.js +0 -283
- package/dist/redact-BDinS1q9.js +0 -102
- package/dist/redact-identifier-S69DDJn1.js +0 -13
- package/dist/redact-sensitive-url-CAJSZ_7g.js +0 -50
- package/dist/redirect-headers-CGxONG_L.js +0 -25
- package/dist/ref-contract-CC5BLDoS.js +0 -53
- package/dist/region-BFGEM88n.js +0 -62
- package/dist/register-lazy-command-D6EEI-zz.js +0 -43
- package/dist/register.agent-D1eKwVU7.js +0 -239
- package/dist/register.backup-S8hwHpZL.js +0 -236
- package/dist/register.configure-CJrQ3u9y.js +0 -15
- package/dist/register.maintenance-BrKWl7_D.js +0 -449
- package/dist/register.message-BCWJfH2h.js +0 -642
- package/dist/register.onboard-zzNq0pJS.js +0 -79
- package/dist/register.setup-BLQwDKzc.js +0 -104
- package/dist/register.status-health-sessions-B4TUEudf.js +0 -1206
- package/dist/register.subclis-B0pG22H2.js +0 -295
- package/dist/register.subclis-BEM0mzJb.js +0 -3
- package/dist/registry-ByjnKj3u.js +0 -219
- package/dist/registry-CuFNdbH5.js +0 -60
- package/dist/registry-DvqOrcbF.js +0 -675
- package/dist/registry-mVzzlPf7.js +0 -50
- package/dist/repair-IMBZnz-L.js +0 -112
- package/dist/replies-BCoZ2HxY.js +0 -118
- package/dist/reply-D8bUQd-Q.js +0 -3176
- package/dist/reply-blocks-CjCUTZru.js +0 -103
- package/dist/reply-chunking-CxFd5izq.js +0 -3
- package/dist/reply-dispatch-runtime-Bk9RDzB9.js +0 -3
- package/dist/reply-history-DtTaPEgt.js +0 -2
- package/dist/reply-payload-CRYI4jIB.js +0 -232
- package/dist/reply-payloads-CQXH7ury.js +0 -116
- package/dist/reply-payloads-dedupe-BKObDjVe.js +0 -135
- package/dist/reply-payloads-dedupe.runtime-SbVNMvEs.js +0 -2
- package/dist/reply-payloads-dedupe.runtime.js +0 -1
- package/dist/reply-prefix-Eema_xXG.js +0 -39
- package/dist/reply-runtime-DUrpJTzu.js +0 -123
- package/dist/reply.runtime-Cdb_6NI1.js +0 -2
- package/dist/reply.runtime.js +0 -1
- package/dist/request-url-B8k-YRRH.js +0 -10
- package/dist/resolve-C3pJ2gj_.js +0 -174
- package/dist/resolve-C_pCWwC0.js +0 -619
- package/dist/resolve-allowlist-HrJ_3icS.js +0 -147
- package/dist/resolve-cbCi7mbs.js +0 -2
- package/dist/resolve-channels-BTyErRev.js +0 -226
- package/dist/resolve-channels-DvV-fUQv.js +0 -263
- package/dist/resolve-configured-secret-input-string-BasQGOd9.js +0 -112
- package/dist/resolve-route-EE8E7OAF.js +0 -486
- package/dist/resolve-system-bin-TC907QYo.js +0 -120
- package/dist/resolve-targets-B1MvBWpT.js +0 -280
- package/dist/resolve-users-BfVoBZG_.js +0 -145
- package/dist/resolve-utils-ClmKSkEQ.js +0 -102
- package/dist/response-generator-ACP21F1j.js +0 -153
- package/dist/response-prefix-template-Cp4tg6Qw.js +0 -50
- package/dist/restart-sentinel-B3EigRIb.js +0 -70
- package/dist/restart-stale-pids-dsB3eE6_.js +0 -187
- package/dist/retry-CIAqcw7C.js +0 -76
- package/dist/retry-policy-BJ5Q68It.js +0 -58
- package/dist/retry-runtime-Cbu5zDnX.js +0 -3
- package/dist/rooms-B1IyUfuR.js +0 -325
- package/dist/root-help-Bwa-vlhy.js +0 -53
- package/dist/route-reply-bC07YRDb.js +0 -133
- package/dist/route-reply.runtime-dS2XMwkv.js +0 -2
- package/dist/route-reply.runtime.js +0 -1
- package/dist/route-resolution-DQHmIfWN.js +0 -461
- package/dist/routes-CWXihJFR.js +0 -6884
- package/dist/routing-BVt9nMN-.js +0 -16
- package/dist/rpc-5eaI-FsF.js +0 -67
- package/dist/rpc-context-Dimdo4io.js +0 -155
- package/dist/run-command-2jxKF1a6.js +0 -32
- package/dist/run-main-BKeNUaXq.js +0 -425
- package/dist/run-with-concurrency-DGLkItan.js +0 -41
- package/dist/runner-COmi-bB0.js +0 -1479
- package/dist/runs-CX-70k4f.js +0 -616
- package/dist/runtime-1phb9iVo.js +0 -6
- package/dist/runtime-B8hqEtu6.js +0 -181
- package/dist/runtime-BpHrcXgA.js +0 -5
- package/dist/runtime-BscSIjIL.js +0 -126
- package/dist/runtime-C8qvwPYG.js +0 -286
- package/dist/runtime-CBX_rq4O.js +0 -18
- package/dist/runtime-CC1YDOst.js +0 -5
- package/dist/runtime-CIE7xJwu.js +0 -5
- package/dist/runtime-CNZi_czi.js +0 -42
- package/dist/runtime-CPw-0dWW.js +0 -5
- package/dist/runtime-DXdxDbJm.js +0 -102
- package/dist/runtime-DofOSZ5U.js +0 -2153
- package/dist/runtime-api-B4Zb5p1_.js +0 -2
- package/dist/runtime-api-BB2RZPnq.js +0 -2
- package/dist/runtime-api-BJnw1_pK.js +0 -2
- package/dist/runtime-api-BTf2rLCn.js +0 -2
- package/dist/runtime-api-BTgAUySz.js +0 -2
- package/dist/runtime-api-BVftCkYc.js +0 -2484
- package/dist/runtime-api-BWaVsvsK.js +0 -14
- package/dist/runtime-api-BXlE282E.js +0 -2
- package/dist/runtime-api-Ba7wWBWO.js +0 -1
- package/dist/runtime-api-BfZqvwkY.js +0 -2
- package/dist/runtime-api-Bja3afzd.js +0 -3676
- package/dist/runtime-api-C7cX3f2r.js +0 -2
- package/dist/runtime-api-CCKblcQO.js +0 -81
- package/dist/runtime-api-CEmQSooZ.js +0 -2
- package/dist/runtime-api-CWQMIahu.js +0 -241
- package/dist/runtime-api-Ch1E1gvT.js +0 -2
- package/dist/runtime-api-CjgyJEjn.js +0 -2
- package/dist/runtime-api-CuqnElJG.js +0 -3
- package/dist/runtime-api-DOyNJNHi.js +0 -2
- package/dist/runtime-api-DUbp7oPz.js +0 -2
- package/dist/runtime-api-DZDDizAj.js +0 -1
- package/dist/runtime-api-DZcQIyI0.js +0 -1
- package/dist/runtime-api-Di-XE7J4.js +0 -3
- package/dist/runtime-api-Dq7rdsm6.js +0 -2
- package/dist/runtime-api-DxO7sIvA.js +0 -120
- package/dist/runtime-api-Dzz1aWyq.js +0 -29
- package/dist/runtime-api-_dg5Me1l.js +0 -2
- package/dist/runtime-config-snapshot-DqWNFIej.js +0 -2
- package/dist/runtime-d8L2hZ57.js +0 -5
- package/dist/runtime-discord-ops.runtime-C2o0995d.js +0 -25
- package/dist/runtime-discord-ops.runtime.js +0 -1
- package/dist/runtime-embedded-pi.runtime-Bk8vHdbc.js +0 -2
- package/dist/runtime-embedded-pi.runtime.js +0 -1
- package/dist/runtime-entry-BypP0hpR.js +0 -4925
- package/dist/runtime-env-SHKgcATc.js +0 -9
- package/dist/runtime-forwarders-ev8FdVyV.js +0 -44
- package/dist/runtime-group-policy-DXJJCWpk.js +0 -1
- package/dist/runtime-group-policy-zTp8fKRK.js +0 -59
- package/dist/runtime-guard-78ESz4Qy.js +0 -70
- package/dist/runtime-kS8e4c6-.js +0 -125
- package/dist/runtime-media-understanding.runtime-CpPWzWdQ.js +0 -2
- package/dist/runtime-media-understanding.runtime.js +0 -1
- package/dist/runtime-model-auth.runtime-1Gsp1j1n.js +0 -2
- package/dist/runtime-model-auth.runtime.js +0 -1
- package/dist/runtime-parse-vvG9x7Ps.js +0 -83
- package/dist/runtime-paths-NiQSNveu.js +0 -305
- package/dist/runtime-plugin-boundary-CzRNh2jW.js +0 -65
- package/dist/runtime-schema-uKXWjWrD.js +0 -14440
- package/dist/runtime-slack-ops.runtime-MQwSRdp3.js +0 -15
- package/dist/runtime-slack-ops.runtime.js +0 -1
- package/dist/runtime-status-2omGgKaM.js +0 -109
- package/dist/runtime-status-Cc383GkB.js +0 -15
- package/dist/runtime-store-CT3yRBe_.js +0 -22
- package/dist/runtime-tts.runtime-DTfPYn3H.js +0 -2
- package/dist/runtime-tts.runtime.js +0 -1
- package/dist/runtime-uvckmk15.js +0 -68
- package/dist/runtime-web-tools-Cf6BXnCm.js +0 -2042
- package/dist/runtime-whatsapp-boundary-Bs8RrKxP.js +0 -139
- package/dist/runtime-whatsapp-boundary-C5mx67ac.js +0 -2
- package/dist/safe-regex-tLlDZYfM.js +0 -244
- package/dist/safe-text-DhIQbZid.js +0 -16
- package/dist/sandbox-DkZ4-LBj.js +0 -4
- package/dist/sandbox-cli-Cho_k3dA.js +0 -443
- package/dist/sandbox-f4-hZNCj.js +0 -2710
- package/dist/sandbox-paths-Br54mtAJ.js +0 -146
- package/dist/sanitize-env-vars-BpNLWkzd.js +0 -82
- package/dist/scan-paths-Bln7l19-.js +0 -28
- package/dist/schema-validator-DofqBvJi.js +0 -176
- package/dist/scoped-expiring-id-cache-C8wyKEV-.js +0 -35
- package/dist/scp-host-B9NPcVwn.js +0 -62
- package/dist/sdk-Ba91_ru8.js +0 -1108
- package/dist/searxng-search-provider-CUEJoeaQ.js +0 -220
- package/dist/secret-equal-fMR1DjSl.js +0 -9
- package/dist/secret-file-BNKBIds0.js +0 -11
- package/dist/secret-file-DwDmPLSX.js +0 -92
- package/dist/secret-input-4MqmO__N.js +0 -13
- package/dist/secret-input-Bqf5ho4v.js +0 -38
- package/dist/secret-input-DyzcNLLY.js +0 -2
- package/dist/secrets-cli-DAP4hi4r.js +0 -2112
- package/dist/secure-random-Diy9rj1m.js +0 -20
- package/dist/security-cli-2WQVKZ3w.js +0 -477
- package/dist/security-runtime-BSQDlFPi.js +0 -55
- package/dist/semver-compare-DkYCMcwG.js +0 -53
- package/dist/send--GwzHbbI.js +0 -100
- package/dist/send-4ZItW1GB.js +0 -3
- package/dist/send-B1YVZR_q.js +0 -1076
- package/dist/send-B6AgLKhw.js +0 -178
- package/dist/send-CAosrV3E.js +0 -2
- package/dist/send-CTHiX-WN.js +0 -442
- package/dist/send-CywIIzow.js +0 -318
- package/dist/send-DZ2VaVTD.js +0 -856
- package/dist/send-deps-Cuc-dTy5.js +0 -19
- package/dist/send-policy-Dz5lteoO.js +0 -60
- package/dist/send-q09VUMe3.js +0 -532
- package/dist/send.components-Cbi5ixnJ.js +0 -844
- package/dist/send.components-dLe6ppiS.js +0 -2
- package/dist/server-BRW1HQ2M.js +0 -67
- package/dist/server-Clq20rV8.js +0 -27990
- package/dist/server-middleware-Ubw3OFd1.js +0 -108
- package/dist/server-node-events-kgWhdE2I.js +0 -454
- package/dist/server-startup-matrix-migration-DJZgJiUa.js +0 -1348
- package/dist/service-2O78fADl.js +0 -867
- package/dist/service-BCUDr0mF.js +0 -2
- package/dist/session-BIwHn1FL.js +0 -137
- package/dist/session-BJudz6Rb.js +0 -50
- package/dist/session-archive.runtime-8FrIp7MP.js +0 -2
- package/dist/session-archive.runtime.js +0 -1
- package/dist/session-binding-service-D7bUc7mS.js +0 -421
- package/dist/session-context-DbS6R7x0.js +0 -23
- package/dist/session-conversation-5Z-WApq_.js +0 -15
- package/dist/session-conversation-BC-SPGma.js +0 -135
- package/dist/session-conversation-D-Olnomz.js +0 -27
- package/dist/session-cost-usage-5iS5N1Rs.js +0 -651
- package/dist/session-cost-usage-ibiGeH7Z.js +0 -2
- package/dist/session-envelope-RE_1D3fZ.js +0 -18
- package/dist/session-errors-CoC2qhLC.js +0 -63
- package/dist/session-file-CnTnoAyl.js +0 -120
- package/dist/session-fork.runtime-Bb9nNLwX.js +0 -50
- package/dist/session-fork.runtime.js +0 -1
- package/dist/session-hooks-D4zcaOKV.js +0 -109
- package/dist/session-key-CQMUjsSp.js +0 -52
- package/dist/session-key-Do__tq1E.js +0 -279
- package/dist/session-key-normalization-BamCBtxj.js +0 -22
- package/dist/session-override-CHm5auQy.js +0 -100
- package/dist/session-reset-model.runtime-DD5SooaH.js +0 -119
- package/dist/session-reset-model.runtime.js +0 -1
- package/dist/session-route-O1Pb7Oid.js +0 -91
- package/dist/session-store-runtime-ePmbOWO1.js +0 -2
- package/dist/session-subagent-reactivation.runtime-BwUDVflj.js +0 -2
- package/dist/session-subagent-reactivation.runtime.js +0 -1
- package/dist/session-transcript-files.fs-CyBs2u56.js +0 -149
- package/dist/session-updates-C33bkLCm.js +0 -222
- package/dist/session-updates.runtime-BHLQJ71D.js +0 -2
- package/dist/session-updates.runtime.js +0 -1
- package/dist/session-utils-C0HJP9m_.js +0 -1743
- package/dist/session-write-lock-C7svKLqX.js +0 -343
- package/dist/sessions-CkaONOVi.js +0 -224
- package/dist/sessions-Dqj9fL_x.js +0 -2
- package/dist/sessions-j2hbBGOS.js +0 -443
- package/dist/setup-0GrDtpRN.js +0 -427
- package/dist/setup-BrOJEPVN.js +0 -15
- package/dist/setup-adapter-runtime-CyIIvoms.js +0 -2
- package/dist/setup-api-1P88M5pV.js +0 -2
- package/dist/setup-binary-CXmsVXWb.js +0 -2
- package/dist/setup-bootstrap-QdrIAyis.js +0 -54
- package/dist/setup-core-BqPbreVF.js +0 -256
- package/dist/setup-core-CFzSqpD7.js +0 -256
- package/dist/setup-core-DJHWTJKX.js +0 -383
- package/dist/setup-core-DT1fK9yD.js +0 -146
- package/dist/setup-core-kjYyNYvv.js +0 -48
- package/dist/setup-core-t03VZdcn.js +0 -160
- package/dist/setup-group-access-BQbnTk8B.js +0 -70
- package/dist/setup-helpers-0yWIq2cW.js +0 -390
- package/dist/setup-runtime-BChXvJOO.js +0 -4
- package/dist/setup-surface-B8loJ-nJ.js +0 -272
- package/dist/setup-surface-BKizDP2g.js +0 -237
- package/dist/setup-surface-BOd4V0w5.js +0 -261
- package/dist/setup-surface-BaLQtvFW.js +0 -353
- package/dist/setup-surface-Bha7U86Z.js +0 -72
- package/dist/setup-surface-BkHkduRm.js +0 -450
- package/dist/setup-surface-CDfudYpT2.js +0 -261
- package/dist/setup-surface-CT-Erp53.js +0 -346
- package/dist/setup-surface-Co1jSLDk.js +0 -656
- package/dist/setup-surface-D0joW4q1.js +0 -333
- package/dist/setup-surface-D9rWJb4Z.js +0 -1447
- package/dist/setup-surface-D_CJfyJ1.js +0 -381
- package/dist/setup-surface-DbVJ8CAj.js +0 -484
- package/dist/setup-surface-Di1q12ha.js +0 -97
- package/dist/setup-surface-LWupQ_eL.js +0 -304
- package/dist/setup-tools-Cb6PLN3L.js +0 -4
- package/dist/setup-wizard-helpers-CA5yiprq.js +0 -841
- package/dist/setup-wizard-proxy-bmMo6OPA.js +0 -127
- package/dist/setup.finalize-DvGlwfbU.js +0 -443
- package/dist/setup.gateway-config-D_eSo_Jz.js +0 -246
- package/dist/setup.secret-input-BAQnay16.js +0 -25
- package/dist/shared-1nXP7RAM.js +0 -78
- package/dist/shared-6u4-kP5J.js +0 -221
- package/dist/shared-BnSR7joQ.js +0 -144
- package/dist/shared-BsLpgVLV.js +0 -37
- package/dist/shared-C-PSF7Rv.js +0 -64
- package/dist/shared-C1MrVu4M.js +0 -180
- package/dist/shared-CA8QQ_O5.js +0 -94
- package/dist/shared-CCV62W5K.js +0 -2
- package/dist/shared-CHJjz6Zz.js +0 -72
- package/dist/shared-CK49TKED.js +0 -50
- package/dist/shared-CL7I4ij0.js +0 -160
- package/dist/shared-Cr7ijuS4.js +0 -198
- package/dist/shared-D61IX915.js +0 -10
- package/dist/shared-Dr9OQu4c.js +0 -64
- package/dist/shared-DwxV-O-g.js +0 -136
- package/dist/shared-dWHdeoyy.js +0 -126
- package/dist/shared-runtime-yV5uP0IO.js +0 -7
- package/dist/shell-argv-B9p91CMW.js +0 -72
- package/dist/shell-env-BTztt4a1.js +0 -181
- package/dist/signal-B1kD3iF3.js +0 -46
- package/dist/signal-DP8FUJOa.js +0 -6
- package/dist/signal-Dvmeol77.js +0 -13
- package/dist/signal-account-CYKnyxZK.js +0 -11
- package/dist/signal-cli-install-DcmsRDbB.js +0 -188
- package/dist/signal-surface-AbofIH7s.js +0 -21
- package/dist/simple-completion-transport-Dl5DzRWP.js +0 -24
- package/dist/skill-commands-CH4lfyW8.js +0 -77
- package/dist/skill-commands-base-CvVjZByy.js +0 -60
- package/dist/skill-commands-runtime-zpWkVBay.js +0 -2
- package/dist/skill-commands.runtime-BKa5oyH-.js +0 -2
- package/dist/skill-commands.runtime.js +0 -1
- package/dist/skill-scanner-bqroDZTs.js +0 -354
- package/dist/skills-D0K7gu2V.js +0 -972
- package/dist/skills-DFTLIGCd.js +0 -4
- package/dist/skills-clawhub-KJGw0uGT.js +0 -274
- package/dist/skills-cli-DziAPxba.js +0 -369
- package/dist/skills-install-CQeO3Sll.js +0 -819
- package/dist/skills-remote-BojLLDxp.js +0 -584
- package/dist/skills-status-BINZ_svK.js +0 -2
- package/dist/skills-status-CdQUttuP.js +0 -170
- package/dist/slack-BuMSbx3k.js +0 -6
- package/dist/slack-DMg3O5YT.js +0 -9
- package/dist/slack-account-LEbfbXys.js +0 -11
- package/dist/slack-core-oqCiyGw8.js +0 -4
- package/dist/slack-runtime-surface-CyaeT7yk.js +0 -18
- package/dist/slack-surface-1yTIS5Q8.js +0 -44
- package/dist/slack-target-parser-CruIJ5w5.js +0 -12
- package/dist/slack-targets-ukxuKR1I.js +0 -45
- package/dist/slash-commands-CRuXC74L.js +0 -672
- package/dist/slash-commands.runtime-F6b9KUnh.js +0 -20
- package/dist/slash-commands.runtime.js +0 -1
- package/dist/slash-dispatch.runtime-CItGyoBF.js +0 -38
- package/dist/slash-dispatch.runtime.js +0 -1
- package/dist/slash-skill-commands.runtime-Caw0oNvV.js +0 -8
- package/dist/slash-skill-commands.runtime.js +0 -1
- package/dist/slots-Dq-2eIRb.js +0 -93
- package/dist/speech-Ceb4ISD4.js +0 -46
- package/dist/speech-provider-BHjDbut-.js +0 -190
- package/dist/speech-provider-D45m9grJ.js +0 -154
- package/dist/speech-provider-DM1ZXsz2.js +0 -385
- package/dist/speech-runtime-CNvOkPw4.js +0 -34
- package/dist/src-Dn1TYXp6.js +0 -2739
- package/dist/ssh-config-C1ipLHgq.js +0 -77
- package/dist/ssh-tunnel-BwMCLc2e.js +0 -159
- package/dist/ssh-tunnel-D5YdH2SQ.js +0 -2
- package/dist/ssrf-Duye12M_.js +0 -246
- package/dist/ssrf-policy-5L7qS2kK.js +0 -69
- package/dist/ssrf-runtime-bpDM5Bgo.js +0 -5
- package/dist/stable-node-path-n7TARbHZ.js +0 -32
- package/dist/stage-sandbox-media.runtime-Tlgx4F6M.js +0 -229
- package/dist/stage-sandbox-media.runtime.js +0 -1
- package/dist/stagger-Cs-6sySM.js +0 -54
- package/dist/startup-verification-DS8Rlwfj.js +0 -131
- package/dist/state-migrations-ssGF0Trg.js +0 -845
- package/dist/state-paths-LoYjHd5L.js +0 -2
- package/dist/status-B7yRr4OV.js +0 -3
- package/dist/status-BM1Lyqo6.js +0 -261
- package/dist/status-BekOC_tW.js +0 -650
- package/dist/status-CxodlqzZ.js +0 -2
- package/dist/status-DHbl5eIj.js +0 -608
- package/dist/status-PsQV2sfU.js +0 -44
- package/dist/status-all-C53a3881.js +0 -798
- package/dist/status-helpers-CCJSSrVJ.js +0 -170
- package/dist/status-issues-M-RUxHvm.js +0 -336
- package/dist/status-issues-qWKbW6r2.js +0 -187
- package/dist/status-json-B66tF12J.js +0 -86
- package/dist/status.agent-local-B8Sw_p6M.js +0 -59
- package/dist/status.command.text-runtime-csZS5yHm.js +0 -18
- package/dist/status.daemon-D0GzvHft.js +0 -25
- package/dist/status.format-C1VNrTBi.js +0 -44
- package/dist/status.gateway-probe-4INUEsUo.js +0 -15
- package/dist/status.link-channel-CJtR5UX6.js +0 -35
- package/dist/status.node-mode-Bva3wbBI.js +0 -2
- package/dist/status.node-mode-CneoXHPW.js +0 -32
- package/dist/status.scan-t1kfm4e0.js +0 -264
- package/dist/status.scan.deps.runtime-CCaTJlzV.js +0 -18
- package/dist/status.scan.deps.runtime.js +0 -1
- package/dist/status.scan.fast-json-DmzN3HuU.js +0 -97
- package/dist/status.scan.fast-json-gu6uL_BR.js +0 -2
- package/dist/status.scan.json-core-JjMIy9YZ.js +0 -254
- package/dist/status.scan.runtime-r_5mTC8f.js +0 -9
- package/dist/status.scan.runtime.js +0 -1
- package/dist/status.service-summary-DnbDBXMs.js +0 -32
- package/dist/status.summary-CbEhZE0h.js +0 -210
- package/dist/status.summary-SLm6uT22.js +0 -2
- package/dist/status.update-Bw9CvcCc.js +0 -2
- package/dist/status.update-CLnevxJb.js +0 -79
- package/dist/sticker-cache-C_FrWgaA.js +0 -1573
- package/dist/sticker-vision.runtime-DR7e08nD.js +0 -16
- package/dist/sticker-vision.runtime.js +0 -1
- package/dist/storage-CPQLpmgN.js +0 -234
- package/dist/storage-paths-DvC4vQo1.js +0 -51
- package/dist/store-8ONMiMTI.js +0 -365
- package/dist/store-DQJZr0Yf.js +0 -767
- package/dist/store-Dxcm2vsw.js +0 -140
- package/dist/store-_OZh8RrM.js +0 -1343
- package/dist/store-read-JHUhrL0Z.js +0 -16
- package/dist/store.runtime-Dmqv-8M7.js +0 -2
- package/dist/store.runtime.js +0 -1
- package/dist/stream-CGrFe0j0.js +0 -123
- package/dist/stream-D9HOuZmn.js +0 -633
- package/dist/stream-Di_JOWoE.js +0 -180
- package/dist/stream-wrappers-D-DlMIYG.js +0 -136
- package/dist/string-normalization-Ddc4JXRe.js +0 -19
- package/dist/string-normalization-runtime-CCsvs1ds.js +0 -1
- package/dist/string-sample-BIWt11jp.js +0 -11
- package/dist/strip-inbound-meta-DvHTlpJG.js +0 -155
- package/dist/subagent-orphan-recovery-Do8Az2RD.js +0 -206
- package/dist/subagent-registry-runtime-D5PNyCsh.js +0 -2
- package/dist/subcli-descriptors-Dasenv4J.js +0 -151
- package/dist/subsystem-C9VSlEcV.js +0 -582
- package/dist/supervisor-log.runtime-CZe76kAj.js +0 -8
- package/dist/supervisor-log.runtime.js +0 -1
- package/dist/system-cli-2-HDh_Ev.js +0 -58
- package/dist/system-events-5SDw3lix.js +0 -93
- package/dist/system-events-BuGmSpuG.js +0 -34
- package/dist/system-message-0oem5MWV.js +0 -16
- package/dist/system-run-command-BmlO5dn2.js +0 -301
- package/dist/systemd-B2HBHMpF.js +0 -588
- package/dist/systemd-hints-DkRlAuPR.js +0 -325
- package/dist/systemd-linger-BBPBJSm0.js +0 -68
- package/dist/systemd-linger-DiWO9n2E.js +0 -2
- package/dist/table-CY2XIg3l.js +0 -305
- package/dist/tables-D6qL6k4d.js +0 -832
- package/dist/tailnet-CZMxMuGK.js +0 -76
- package/dist/tailscale-mpS_cTve.js +0 -238
- package/dist/tailscale-status-Dg2Iov5f.js +0 -71
- package/dist/target-errors-ThNFqo8X.js +0 -26
- package/dist/target-ids-O3O6piTN.js +0 -76
- package/dist/target-parsing-Boyj_2v0.js +0 -41
- package/dist/target-registry-BHJcVSo1.js +0 -1269
- package/dist/targets-C7I_wjs2.js +0 -283
- package/dist/targets-CZA632lq.js +0 -39
- package/dist/targets-Dz1dx4G8.js +0 -78
- package/dist/targets-Zd0-pJu7.js +0 -748
- package/dist/targets-krmeAAxz.js +0 -70
- package/dist/task-registry-delivery-runtime-BnkUa6Mp.js +0 -2
- package/dist/task-registry.audit-DbCRt5MR.js +0 -320
- package/dist/task-registry.audit.shared-SH4MOLKM.js +0 -18
- package/dist/task-registry.maintenance-DfZmDWog.js +0 -2
- package/dist/task-registry.summary-SoFiECCc.js +0 -44
- package/dist/tavily-search-provider-BCY1kfQB.js +0 -227
- package/dist/telegram/audit.js +0 -2
- package/dist/telegram/token.js +0 -2
- package/dist/telegram-Cq20PSxw.js +0 -23
- package/dist/telegram-account-vRRwyfuA.js +0 -11
- package/dist/telegram-command-config-BiHhXScJ.js +0 -1
- package/dist/telegram-core-DTJayyAj.js +0 -6
- package/dist/telegram-custom-commands-C-nv8yoB.js +0 -75
- package/dist/temp-download-Ccatr7zI.js +0 -62
- package/dist/temp-path-JU2kkd64.js +0 -2
- package/dist/templating-Bu436Euy.js +0 -24
- package/dist/testing-BrrgubIp.js +0 -690
- package/dist/text-chunking-BTs2yTSd.js +0 -12
- package/dist/text-chunking-ByXwyFNP.js +0 -20
- package/dist/text-format-lEYRGxj5.js +0 -8
- package/dist/text-runtime-D9ApM_8O.js +0 -398
- package/dist/theme-Bb-qluq6.js +0 -2
- package/dist/theme-wBMZmJzz.js +0 -34
- package/dist/thinking-Dga2zdtd.js +0 -68
- package/dist/thinking.shared-D6IkoLJU.js +0 -243
- package/dist/thread-bindings-BMnz7w-V.js +0 -219
- package/dist/thread-bindings-BbQWOcMr.js +0 -352
- package/dist/thread-bindings-Bv0I9sBY.js +0 -534
- package/dist/thread-bindings-C3jMrVvp.js +0 -778
- package/dist/thread-bindings-policy-Br8s4hQ6.js +0 -172
- package/dist/thread-bindings-runtime-CbG63N4N.js +0 -2
- package/dist/thread-bindings-shared-DjSYaoHi.js +0 -95
- package/dist/thread-bindings.discord-api-NFR5qsWt.js +0 -487
- package/dist/thread-ownership-DG810AQi.js +0 -3
- package/dist/threading-1Z_3y_Dp.js +0 -2
- package/dist/threading-Hl8nWez6.js +0 -832
- package/dist/threading-helpers-BpqyeyAU.js +0 -14
- package/dist/threading-tool-context-DxV30qIW.js +0 -157
- package/dist/timeouts-B1NiHSGi.js +0 -74
- package/dist/tlon-C54Qojl0.js +0 -20
- package/dist/tmp-openclaw-dir-B44_vmJv.js +0 -102
- package/dist/token-BlUJQi_X.js +0 -2
- package/dist/token-CDYFJvj8.js +0 -82
- package/dist/token-kCjtGElJ.js +0 -45
- package/dist/tokens-C2f9Klbt.js +0 -66
- package/dist/tool-actions.runtime-aB0DgLk7.js +0 -532
- package/dist/tool-actions.runtime.js +0 -1
- package/dist/tool-display-C7h9IZa_.js +0 -1607
- package/dist/tool-images-BDUvc_pd.js +0 -270
- package/dist/tool-mutation-DIBpIegg.js +0 -140
- package/dist/tool-policy-FUm_F19C.js +0 -515
- package/dist/tool-policy-match-CCFHTsu9.js +0 -49
- package/dist/tool-send-DClM4vsZ.js +0 -16
- package/dist/tools-54j1hYBv.js +0 -123
- package/dist/tools-effective-inventory-C09suj6-.js +0 -148
- package/dist/tools.runtime-VBFxIXC8.js +0 -4
- package/dist/tools.runtime.js +0 -1
- package/dist/transcript-events-Dc7U5QmQ.js +0 -29
- package/dist/transport-ready-Cje3USX4.js +0 -36
- package/dist/tts-CTM9C09A.js +0 -2
- package/dist/tts-Ck_K3tIi.js +0 -84
- package/dist/tts-auto-mode-bD-u2biE.js +0 -14
- package/dist/tts-bTuorllO.js +0 -102
- package/dist/tts-eOLiJF6d.js +0 -29
- package/dist/tts.runtime-ChTwy0yH.js +0 -3
- package/dist/tts.runtime.js +0 -1
- package/dist/tui-CrM-Bz3i.js +0 -3899
- package/dist/tui-cli-aVL5aPGw.js +0 -31
- package/dist/twitch-CFFlkhYG.js +0 -15
- package/dist/typebox-DmerPHaM.js +0 -22
- package/dist/types-BzNSmNk3.js +0 -12
- package/dist/types-DAzqpvqD.js +0 -83
- package/dist/types-DVJVELY7.js +0 -471
- package/dist/types-DqNppUoh.js +0 -15
- package/dist/types.secrets-BpcqHPAv.js +0 -80
- package/dist/types.tools-BTQL6INB.js +0 -22
- package/dist/typing-BnCchGtL.js +0 -8
- package/dist/typing-Bugg5LPP.js +0 -68
- package/dist/typing-J_ktpWeA.js +0 -2
- package/dist/typing-mode-DDYL_0TG.js +0 -75
- package/dist/typing-policy-CaZhrM-F.js +0 -11
- package/dist/typing-start-guard-Cgjgzy5e.js +0 -73
- package/dist/ui-BLDY9-7R.js +0 -212
- package/dist/undici-global-dispatcher-CcNdQ7Dt.js +0 -99
- package/dist/unhandled-rejections-CA_e1R-O.js +0 -2
- package/dist/unhandled-rejections-V7U9keRG.js +0 -241
- package/dist/update-CcALvtl_.js +0 -1253
- package/dist/update-channels-Dn1F57Kf.js +0 -78
- package/dist/update-check-CoDVxy35.js +0 -354
- package/dist/update-cli-BWOYy_Mp.js +0 -1447
- package/dist/update-offset-store-BLZmshZE.js +0 -75
- package/dist/usage-CC7-wLUi.js +0 -39
- package/dist/usage-format-C7nMV1jc.js +0 -513
- package/dist/utils-CN_F_3Qg.js +0 -243
- package/dist/utils-Cgw9Y0-Q.js +0 -2
- package/dist/validation-BNNAUmDO.js +0 -18521
- package/dist/verification-B4ogZ29M.js +0 -130
- package/dist/verification-B99uVIxo.js +0 -2
- package/dist/version-BNzJ37Re.js +0 -79
- package/dist/version-Dw0eJ-1F.js +0 -2
- package/dist/voice-call-Dt6m6oA3.js +0 -4
- package/dist/wait-YXJvtMmp.js +0 -7
- package/dist/warning-filter-GX8LpGKz.js +0 -57
- package/dist/web-fetch-utils-CoVia2ez.js +0 -413
- package/dist/web-media-D9opLz21.js +0 -2
- package/dist/web-media-DHlguFej.js +0 -339
- package/dist/web-search-BcSDWJK9.js +0 -169
- package/dist/web-search-providers-CqY6CVp3.js +0 -21
- package/dist/web-search-providers.runtime-BHjzPQW-.js +0 -113
- package/dist/web-search-providers.runtime.js +0 -1
- package/dist/web-search-providers.shared-CMeQec8y.js +0 -421
- package/dist/web-search-shared-B5mHm7QD.js +0 -87
- package/dist/webhook-ingress-CTl81NUR.js +0 -164
- package/dist/webhook-memory-guards-B6k3g-po.js +0 -129
- package/dist/webhook-path-CklCw5kp.js +0 -22
- package/dist/webhook-request-guards-CxDPmU9e.js +0 -178
- package/dist/webhook-shared-Bw9wLe6L.js +0 -370
- package/dist/webhooks-cli-DPRITERU.js +0 -326
- package/dist/whatsapp-CSzf1Nu0.js +0 -5
- package/dist/whatsapp-D18Otn45.js +0 -30
- package/dist/whatsapp-auth-presence-B5GZUgTA.js +0 -41
- package/dist/whatsapp-core-Be0P_p4R.js +0 -7
- package/dist/whatsapp-heartbeat-a2-OB01n.js +0 -85
- package/dist/whatsapp-shared-ChjLiMDw.js +0 -56
- package/dist/whatsapp-shared-FR_Jw-NH.js +0 -4
- package/dist/whatsapp-surface-Dwrfi_SD.js +0 -26
- package/dist/whatsapp-targets-59A3BDBi.js +0 -13
- package/dist/widearea-dns-CfQt6b3q.js +0 -125
- package/dist/windows-argv-DDAf3waz.js +0 -345
- package/dist/windows-install-roots-XI3CvO9O.js +0 -149
- package/dist/windows-spawn-DKvkg_66.js +0 -154
- package/dist/with-timeout-B2smrGj0.js +0 -214
- package/dist/with-timeout-BmJKiOMd.js +0 -13
- package/dist/workflow-summary-BMvffn8D.js +0 -2
- package/dist/workflow-summary-NvN5lUvK.js +0 -167
- package/dist/workspace-D5P9nuJd.js +0 -479
- package/dist/workspace-D5UiPYKk.js +0 -306
- package/dist/workspace-dirs-CRv8Jwfz.js +0 -13
- package/dist/ws-97FEIc7w.js +0 -11
- package/dist/ws-log-BaAOgG9m.js +0 -281
- package/dist/ws-logging-M92fgmyp.js +0 -10
- package/dist/wsl-ytdRZp54.js +0 -57
- package/dist/x-search-FsMNZ7d0.js +0 -166
- package/dist/x-search-shared-D0tVMJk9.js +0 -124
- package/dist/zalo-CNoa7XH7.js +0 -13
- package/dist/zalo-js-HktBGDbg.js +0 -1156
- package/dist/zalo-setup-BT-xGElf.js +0 -14
- package/dist/zalouser-TwyfhIYz.js +0 -22
- package/dist/zod-1Wegy5nx.js +0 -7
- package/dist/zod-parse-HlGwTZP3.js +0 -14
- package/dist/zod-schema.agent-runtime-DFC7a3eV.js +0 -602
- package/dist/zod-schema.core-C1Ewlj9j.js +0 -520
- package/dist/zod-schema.providers-core-Bmbs-R4l.js +0 -1541
- package/dist/zod-schema.providers-whatsapp-CanJPkvb.js +0 -132
- package/dist/zod-schema.sensitive-DEzKzMxI.js +0 -5
package/dist/gateway-CWPyH-P7.js
DELETED
|
@@ -1,2575 +0,0 @@
|
|
|
1
|
-
import { C as textToSpeech } from "./speech-runtime-CNvOkPw4.js";
|
|
2
|
-
import { $ as getQQBotMediaDir, A as getAccessToken, B as sendChannelMessage, C as formatDuration, D as textToSilk, E as resolveTTSConfig, F as sendC2CImageMessage, G as sendGroupVideoMessage, H as sendGroupFileMessage, I as sendC2CInputNotify, K as sendGroupVoiceMessage, L as sendC2CMessage, M as initApiConfig, N as onMessageSent, O as PLUGIN_USER_AGENT, P as sendC2CFileMessage, Q as getQQBotDataDir, R as sendC2CVideoMessage, S as convertSilkToWav, T as isVoiceAttachment, U as sendGroupImageMessage, V as sendDmMessage, W as sendGroupMessage, X as stopBackgroundTokenRefresh, Y as startBackgroundTokenRefresh, _ as normalizeMediaTags, at as sanitizeFileName, b as formatFileSize, c as sendPhoto, d as sendVideoMsg, et as isLocalPath, f as sendVoice, g as parseQQBotPayload, h as isMediaPayload, it as runDiagnostics, j as getGatewayUrl, k as clearTokenCache, m as isCronReminderPayload, nt as normalizePath, o as sendDocument, ot as debugError, p as encodePayloadForCron, rt as resolveQQBotPayloadLocalFilePath, s as sendMedia, st as debugLog, v as MAX_UPLOAD_SIZE, w as isGlobalTTSAvailable, x as audioFileToSilkBase64, y as downloadFile, z as sendC2CVoiceMessage } from "./outbound-hgMEZIU9.js";
|
|
3
|
-
import { t as getQQBotRuntime } from "./runtime-BpHrcXgA.js";
|
|
4
|
-
import { a as chunkText, i as TEXT_CHUNK_LIMIT, n as matchSlashCommand, r as qqbotPlugin } from "./slash-commands-CRuXC74L.js";
|
|
5
|
-
import { a as recordKnownUser, n as flushKnownUsers } from "./known-users-DjerpGCB.js";
|
|
6
|
-
import * as fs from "node:fs";
|
|
7
|
-
import fsSync from "node:fs";
|
|
8
|
-
import path from "node:path";
|
|
9
|
-
import crypto from "node:crypto";
|
|
10
|
-
import WebSocket$1 from "ws";
|
|
11
|
-
import { Buffer as Buffer$1 } from "buffer";
|
|
12
|
-
//#region extensions/qqbot/src/stt.ts
|
|
13
|
-
/**
|
|
14
|
-
* OpenAI-compatible STT used at the plugin layer.
|
|
15
|
-
*
|
|
16
|
-
* This avoids pushing raw WAV PCM into the framework media-understanding pipeline.
|
|
17
|
-
*/
|
|
18
|
-
function resolveSTTConfig(cfg) {
|
|
19
|
-
const c = cfg;
|
|
20
|
-
const channelStt = c?.channels?.qqbot?.stt;
|
|
21
|
-
if (channelStt && channelStt.enabled !== false) {
|
|
22
|
-
const providerId = channelStt?.provider || "openai";
|
|
23
|
-
const providerCfg = c?.models?.providers?.[providerId];
|
|
24
|
-
const baseUrl = channelStt?.baseUrl || providerCfg?.baseUrl;
|
|
25
|
-
const apiKey = channelStt?.apiKey || providerCfg?.apiKey;
|
|
26
|
-
const model = channelStt?.model || "whisper-1";
|
|
27
|
-
if (baseUrl && apiKey) return {
|
|
28
|
-
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
29
|
-
apiKey,
|
|
30
|
-
model
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
const audioModelEntry = c?.tools?.media?.audio?.models?.[0];
|
|
34
|
-
if (audioModelEntry) {
|
|
35
|
-
const providerId = audioModelEntry?.provider || "openai";
|
|
36
|
-
const providerCfg = c?.models?.providers?.[providerId];
|
|
37
|
-
const baseUrl = audioModelEntry?.baseUrl || providerCfg?.baseUrl;
|
|
38
|
-
const apiKey = audioModelEntry?.apiKey || providerCfg?.apiKey;
|
|
39
|
-
const model = audioModelEntry?.model || "whisper-1";
|
|
40
|
-
if (baseUrl && apiKey) return {
|
|
41
|
-
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
42
|
-
apiKey,
|
|
43
|
-
model
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
async function transcribeAudio(audioPath, cfg) {
|
|
49
|
-
const sttCfg = resolveSTTConfig(cfg);
|
|
50
|
-
if (!sttCfg) return null;
|
|
51
|
-
const fileBuffer = fs.readFileSync(audioPath);
|
|
52
|
-
const fileName = sanitizeFileName(path.basename(audioPath));
|
|
53
|
-
const mime = fileName.endsWith(".wav") ? "audio/wav" : fileName.endsWith(".mp3") ? "audio/mpeg" : fileName.endsWith(".ogg") ? "audio/ogg" : "application/octet-stream";
|
|
54
|
-
const form = new FormData();
|
|
55
|
-
form.append("file", new Blob([fileBuffer], { type: mime }), fileName);
|
|
56
|
-
form.append("model", sttCfg.model);
|
|
57
|
-
const resp = await fetch(`${sttCfg.baseUrl}/audio/transcriptions`, {
|
|
58
|
-
method: "POST",
|
|
59
|
-
headers: { Authorization: `Bearer ${sttCfg.apiKey}` },
|
|
60
|
-
body: form
|
|
61
|
-
});
|
|
62
|
-
if (!resp.ok) {
|
|
63
|
-
const detail = await resp.text().catch(() => "");
|
|
64
|
-
throw new Error(`STT failed (HTTP ${resp.status}): ${detail.slice(0, 300)}`);
|
|
65
|
-
}
|
|
66
|
-
return (await resp.json()).text?.trim() || null;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region extensions/qqbot/src/inbound-attachments.ts
|
|
70
|
-
const EMPTY_RESULT = {
|
|
71
|
-
attachmentInfo: "",
|
|
72
|
-
imageUrls: [],
|
|
73
|
-
imageMediaTypes: [],
|
|
74
|
-
voiceAttachmentPaths: [],
|
|
75
|
-
voiceAttachmentUrls: [],
|
|
76
|
-
voiceAsrReferTexts: [],
|
|
77
|
-
voiceTranscripts: [],
|
|
78
|
-
voiceTranscriptSources: [],
|
|
79
|
-
attachmentLocalPaths: []
|
|
80
|
-
};
|
|
81
|
-
/** Download, convert, transcribe, and classify inbound attachments. */
|
|
82
|
-
async function processAttachments(attachments, ctx) {
|
|
83
|
-
if (!attachments?.length) return EMPTY_RESULT;
|
|
84
|
-
const { accountId, cfg, log } = ctx;
|
|
85
|
-
const downloadDir = getQQBotMediaDir("downloads");
|
|
86
|
-
const prefix = `[qqbot:${accountId}]`;
|
|
87
|
-
const imageUrls = [];
|
|
88
|
-
const imageMediaTypes = [];
|
|
89
|
-
const voiceAttachmentPaths = [];
|
|
90
|
-
const voiceAttachmentUrls = [];
|
|
91
|
-
const voiceAsrReferTexts = [];
|
|
92
|
-
const voiceTranscripts = [];
|
|
93
|
-
const voiceTranscriptSources = [];
|
|
94
|
-
const attachmentLocalPaths = [];
|
|
95
|
-
const otherAttachments = [];
|
|
96
|
-
const downloadTasks = attachments.map(async (att) => {
|
|
97
|
-
const attUrl = att.url?.startsWith("//") ? `https:${att.url}` : att.url;
|
|
98
|
-
const isVoice = isVoiceAttachment(att);
|
|
99
|
-
const wavUrl = isVoice && att.voice_wav_url ? att.voice_wav_url.startsWith("//") ? `https:${att.voice_wav_url}` : att.voice_wav_url : "";
|
|
100
|
-
let localPath = null;
|
|
101
|
-
let audioPath = null;
|
|
102
|
-
if (isVoice && wavUrl) {
|
|
103
|
-
const wavLocalPath = await downloadFile(wavUrl, downloadDir);
|
|
104
|
-
if (wavLocalPath) {
|
|
105
|
-
localPath = wavLocalPath;
|
|
106
|
-
audioPath = wavLocalPath;
|
|
107
|
-
log?.info(`${prefix} Voice attachment: ${att.filename}, downloaded WAV directly (skip SILK→WAV)`);
|
|
108
|
-
} else log?.error(`${prefix} Failed to download voice_wav_url, falling back to original URL`);
|
|
109
|
-
}
|
|
110
|
-
if (!localPath) localPath = await downloadFile(attUrl, downloadDir, att.filename);
|
|
111
|
-
return {
|
|
112
|
-
att,
|
|
113
|
-
attUrl,
|
|
114
|
-
isVoice,
|
|
115
|
-
localPath,
|
|
116
|
-
audioPath
|
|
117
|
-
};
|
|
118
|
-
});
|
|
119
|
-
const processTasks = (await Promise.all(downloadTasks)).map(async ({ att, attUrl, isVoice, localPath, audioPath }) => {
|
|
120
|
-
const asrReferText = typeof att.asr_refer_text === "string" ? att.asr_refer_text.trim() : "";
|
|
121
|
-
const voiceSourceUrl = (isVoice && att.voice_wav_url ? att.voice_wav_url.startsWith("//") ? `https:${att.voice_wav_url}` : att.voice_wav_url : "") || attUrl;
|
|
122
|
-
const meta = {
|
|
123
|
-
voiceUrl: isVoice && voiceSourceUrl ? voiceSourceUrl : void 0,
|
|
124
|
-
asrReferText: isVoice && asrReferText ? asrReferText : void 0
|
|
125
|
-
};
|
|
126
|
-
if (localPath) if (att.content_type?.startsWith("image/")) {
|
|
127
|
-
log?.info(`${prefix} Downloaded attachment to: ${localPath}`);
|
|
128
|
-
return {
|
|
129
|
-
localPath,
|
|
130
|
-
type: "image",
|
|
131
|
-
contentType: att.content_type,
|
|
132
|
-
meta
|
|
133
|
-
};
|
|
134
|
-
} else if (isVoice) {
|
|
135
|
-
log?.info(`${prefix} Downloaded attachment to: ${localPath}`);
|
|
136
|
-
return processVoiceAttachment(localPath, audioPath, att, asrReferText, cfg, downloadDir, log, prefix);
|
|
137
|
-
} else {
|
|
138
|
-
log?.info(`${prefix} Downloaded attachment to: ${localPath}`);
|
|
139
|
-
return {
|
|
140
|
-
localPath,
|
|
141
|
-
type: "other",
|
|
142
|
-
filename: att.filename,
|
|
143
|
-
meta
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
log?.error(`${prefix} Failed to download: ${attUrl}`);
|
|
148
|
-
if (att.content_type?.startsWith("image/")) return {
|
|
149
|
-
localPath: null,
|
|
150
|
-
type: "image-fallback",
|
|
151
|
-
attUrl,
|
|
152
|
-
contentType: att.content_type,
|
|
153
|
-
meta
|
|
154
|
-
};
|
|
155
|
-
else if (isVoice && asrReferText) {
|
|
156
|
-
log?.info(`${prefix} Voice attachment download failed, using asr_refer_text fallback`);
|
|
157
|
-
return {
|
|
158
|
-
localPath: null,
|
|
159
|
-
type: "voice-fallback",
|
|
160
|
-
transcript: asrReferText,
|
|
161
|
-
meta
|
|
162
|
-
};
|
|
163
|
-
} else return {
|
|
164
|
-
localPath: null,
|
|
165
|
-
type: "other-fallback",
|
|
166
|
-
filename: att.filename ?? att.content_type,
|
|
167
|
-
meta
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
const processResults = await Promise.all(processTasks);
|
|
172
|
-
for (const result of processResults) {
|
|
173
|
-
if (result.meta.voiceUrl) voiceAttachmentUrls.push(result.meta.voiceUrl);
|
|
174
|
-
if (result.meta.asrReferText) voiceAsrReferTexts.push(result.meta.asrReferText);
|
|
175
|
-
if (result.type === "image" && result.localPath) {
|
|
176
|
-
imageUrls.push(result.localPath);
|
|
177
|
-
imageMediaTypes.push(result.contentType);
|
|
178
|
-
attachmentLocalPaths.push(result.localPath);
|
|
179
|
-
} else if (result.type === "voice" && result.localPath) {
|
|
180
|
-
voiceAttachmentPaths.push(result.localPath);
|
|
181
|
-
voiceTranscripts.push(result.transcript);
|
|
182
|
-
voiceTranscriptSources.push(result.transcriptSource);
|
|
183
|
-
attachmentLocalPaths.push(result.localPath);
|
|
184
|
-
} else if (result.type === "other" && result.localPath) {
|
|
185
|
-
otherAttachments.push(`[Attachment: ${result.localPath}]`);
|
|
186
|
-
attachmentLocalPaths.push(result.localPath);
|
|
187
|
-
} else if (result.type === "image-fallback") {
|
|
188
|
-
imageUrls.push(result.attUrl);
|
|
189
|
-
imageMediaTypes.push(result.contentType);
|
|
190
|
-
attachmentLocalPaths.push(null);
|
|
191
|
-
} else if (result.type === "voice-fallback") {
|
|
192
|
-
voiceTranscripts.push(result.transcript);
|
|
193
|
-
voiceTranscriptSources.push("asr");
|
|
194
|
-
attachmentLocalPaths.push(null);
|
|
195
|
-
} else if (result.type === "other-fallback") {
|
|
196
|
-
otherAttachments.push(`[Attachment: ${result.filename}] (download failed)`);
|
|
197
|
-
attachmentLocalPaths.push(null);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return {
|
|
201
|
-
attachmentInfo: otherAttachments.length > 0 ? "\n" + otherAttachments.join("\n") : "",
|
|
202
|
-
imageUrls,
|
|
203
|
-
imageMediaTypes,
|
|
204
|
-
voiceAttachmentPaths,
|
|
205
|
-
voiceAttachmentUrls,
|
|
206
|
-
voiceAsrReferTexts,
|
|
207
|
-
voiceTranscripts,
|
|
208
|
-
voiceTranscriptSources,
|
|
209
|
-
attachmentLocalPaths
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
/** Format voice transcripts into user-visible text. */
|
|
213
|
-
function formatVoiceText(transcripts) {
|
|
214
|
-
if (transcripts.length === 0) return "";
|
|
215
|
-
return transcripts.length === 1 ? `[Voice message] ${transcripts[0]}` : transcripts.map((t, i) => `[Voice ${i + 1}] ${t}`).join("\n");
|
|
216
|
-
}
|
|
217
|
-
async function processVoiceAttachment(localPath, audioPath, att, asrReferText, cfg, downloadDir, log, prefix) {
|
|
218
|
-
const wavUrl = att.voice_wav_url ? att.voice_wav_url.startsWith("//") ? `https:${att.voice_wav_url}` : att.voice_wav_url : "";
|
|
219
|
-
const attUrl = att.url?.startsWith("//") ? `https:${att.url}` : att.url;
|
|
220
|
-
const meta = {
|
|
221
|
-
voiceUrl: wavUrl || attUrl || void 0,
|
|
222
|
-
asrReferText: asrReferText || void 0
|
|
223
|
-
};
|
|
224
|
-
if (!resolveSTTConfig(cfg)) {
|
|
225
|
-
if (asrReferText) {
|
|
226
|
-
log?.info(`${prefix} Voice attachment: ${att.filename} (STT not configured, using asr_refer_text fallback)`);
|
|
227
|
-
return {
|
|
228
|
-
localPath,
|
|
229
|
-
type: "voice",
|
|
230
|
-
transcript: asrReferText,
|
|
231
|
-
transcriptSource: "asr",
|
|
232
|
-
meta
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
log?.info(`${prefix} Voice attachment: ${att.filename} (STT not configured, skipping transcription)`);
|
|
236
|
-
return {
|
|
237
|
-
localPath,
|
|
238
|
-
type: "voice",
|
|
239
|
-
transcript: "[Voice message - transcription unavailable because STT is not configured]",
|
|
240
|
-
transcriptSource: "fallback",
|
|
241
|
-
meta
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
if (!audioPath) {
|
|
245
|
-
log?.info(`${prefix} Voice attachment: ${att.filename}, converting SILK→WAV...`);
|
|
246
|
-
try {
|
|
247
|
-
const wavResult = await convertSilkToWav(localPath, downloadDir);
|
|
248
|
-
if (wavResult) {
|
|
249
|
-
audioPath = wavResult.wavPath;
|
|
250
|
-
log?.info(`${prefix} Voice converted: ${wavResult.wavPath} (${formatDuration(wavResult.duration)})`);
|
|
251
|
-
} else audioPath = localPath;
|
|
252
|
-
} catch (convertErr) {
|
|
253
|
-
log?.error(`${prefix} Voice conversion failed: ${convertErr}`);
|
|
254
|
-
if (asrReferText) return {
|
|
255
|
-
localPath,
|
|
256
|
-
type: "voice",
|
|
257
|
-
transcript: asrReferText,
|
|
258
|
-
transcriptSource: "asr",
|
|
259
|
-
meta
|
|
260
|
-
};
|
|
261
|
-
return {
|
|
262
|
-
localPath,
|
|
263
|
-
type: "voice",
|
|
264
|
-
transcript: "[Voice message - format conversion failed]",
|
|
265
|
-
transcriptSource: "fallback",
|
|
266
|
-
meta
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
try {
|
|
271
|
-
const transcript = await transcribeAudio(audioPath, cfg);
|
|
272
|
-
if (transcript) {
|
|
273
|
-
log?.info(`${prefix} STT transcript: ${transcript.slice(0, 100)}...`);
|
|
274
|
-
return {
|
|
275
|
-
localPath,
|
|
276
|
-
type: "voice",
|
|
277
|
-
transcript,
|
|
278
|
-
transcriptSource: "stt",
|
|
279
|
-
meta
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
if (asrReferText) {
|
|
283
|
-
log?.info(`${prefix} STT returned empty result, using asr_refer_text fallback`);
|
|
284
|
-
return {
|
|
285
|
-
localPath,
|
|
286
|
-
type: "voice",
|
|
287
|
-
transcript: asrReferText,
|
|
288
|
-
transcriptSource: "asr",
|
|
289
|
-
meta
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
log?.info(`${prefix} STT returned empty result`);
|
|
293
|
-
return {
|
|
294
|
-
localPath,
|
|
295
|
-
type: "voice",
|
|
296
|
-
transcript: "[Voice message - transcription returned an empty result]",
|
|
297
|
-
transcriptSource: "fallback",
|
|
298
|
-
meta
|
|
299
|
-
};
|
|
300
|
-
} catch (sttErr) {
|
|
301
|
-
log?.error(`${prefix} STT failed: ${sttErr}`);
|
|
302
|
-
if (asrReferText) return {
|
|
303
|
-
localPath,
|
|
304
|
-
type: "voice",
|
|
305
|
-
transcript: asrReferText,
|
|
306
|
-
transcriptSource: "asr",
|
|
307
|
-
meta
|
|
308
|
-
};
|
|
309
|
-
return {
|
|
310
|
-
localPath,
|
|
311
|
-
type: "voice",
|
|
312
|
-
transcript: "[Voice message - transcription failed]",
|
|
313
|
-
transcriptSource: "fallback",
|
|
314
|
-
meta
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region extensions/qqbot/src/message-queue.ts
|
|
320
|
-
const MESSAGE_QUEUE_SIZE = 1e3;
|
|
321
|
-
const PER_USER_QUEUE_SIZE = 20;
|
|
322
|
-
const MAX_CONCURRENT_USERS = 10;
|
|
323
|
-
/**
|
|
324
|
-
* Create a per-user concurrent queue.
|
|
325
|
-
* Messages are serialized per user and processed in parallel across users.
|
|
326
|
-
*/
|
|
327
|
-
function createMessageQueue(ctx) {
|
|
328
|
-
const { accountId, log } = ctx;
|
|
329
|
-
const userQueues = /* @__PURE__ */ new Map();
|
|
330
|
-
const activeUsers = /* @__PURE__ */ new Set();
|
|
331
|
-
let messagesProcessed = 0;
|
|
332
|
-
let handleMessageFnRef = null;
|
|
333
|
-
let totalEnqueued = 0;
|
|
334
|
-
const getMessagePeerId = (msg) => {
|
|
335
|
-
if (msg.type === "guild") return `guild:${msg.channelId ?? "unknown"}`;
|
|
336
|
-
if (msg.type === "group") return `group:${msg.groupOpenid ?? "unknown"}`;
|
|
337
|
-
return `dm:${msg.senderId}`;
|
|
338
|
-
};
|
|
339
|
-
const drainUserQueue = async (peerId) => {
|
|
340
|
-
if (activeUsers.has(peerId)) return;
|
|
341
|
-
if (activeUsers.size >= MAX_CONCURRENT_USERS) {
|
|
342
|
-
log?.info(`[qqbot:${accountId}] Max concurrent users (${MAX_CONCURRENT_USERS}) reached, ${peerId} will wait`);
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
const queue = userQueues.get(peerId);
|
|
346
|
-
if (!queue || queue.length === 0) {
|
|
347
|
-
userQueues.delete(peerId);
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
activeUsers.add(peerId);
|
|
351
|
-
try {
|
|
352
|
-
while (queue.length > 0 && !ctx.isAborted()) {
|
|
353
|
-
const msg = queue.shift();
|
|
354
|
-
totalEnqueued = Math.max(0, totalEnqueued - 1);
|
|
355
|
-
try {
|
|
356
|
-
if (handleMessageFnRef) {
|
|
357
|
-
await handleMessageFnRef(msg);
|
|
358
|
-
messagesProcessed++;
|
|
359
|
-
}
|
|
360
|
-
} catch (err) {
|
|
361
|
-
log?.error(`[qqbot:${accountId}] Message processor error for ${peerId}: ${err}`);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
} finally {
|
|
365
|
-
activeUsers.delete(peerId);
|
|
366
|
-
userQueues.delete(peerId);
|
|
367
|
-
for (const [waitingPeerId, waitingQueue] of userQueues) {
|
|
368
|
-
if (activeUsers.size >= MAX_CONCURRENT_USERS) break;
|
|
369
|
-
if (waitingQueue.length > 0 && !activeUsers.has(waitingPeerId)) drainUserQueue(waitingPeerId);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
const enqueue = (msg) => {
|
|
374
|
-
const peerId = getMessagePeerId(msg);
|
|
375
|
-
let queue = userQueues.get(peerId);
|
|
376
|
-
if (!queue) {
|
|
377
|
-
queue = [];
|
|
378
|
-
userQueues.set(peerId, queue);
|
|
379
|
-
}
|
|
380
|
-
if (queue.length >= PER_USER_QUEUE_SIZE) {
|
|
381
|
-
const dropped = queue.shift();
|
|
382
|
-
log?.error(`[qqbot:${accountId}] Per-user queue full for ${peerId}, dropping oldest message ${dropped?.messageId}`);
|
|
383
|
-
}
|
|
384
|
-
totalEnqueued++;
|
|
385
|
-
if (totalEnqueued > MESSAGE_QUEUE_SIZE) log?.error(`[qqbot:${accountId}] Global queue limit reached (${totalEnqueued}), message from ${peerId} may be delayed`);
|
|
386
|
-
queue.push(msg);
|
|
387
|
-
log?.debug?.(`[qqbot:${accountId}] Message enqueued for ${peerId}, user queue: ${queue.length}, active users: ${activeUsers.size}`);
|
|
388
|
-
drainUserQueue(peerId);
|
|
389
|
-
};
|
|
390
|
-
const startProcessor = (handleMessageFn) => {
|
|
391
|
-
handleMessageFnRef = handleMessageFn;
|
|
392
|
-
log?.info(`[qqbot:${accountId}] Message processor started (per-user concurrency, max ${MAX_CONCURRENT_USERS} users)`);
|
|
393
|
-
};
|
|
394
|
-
const getSnapshot = (senderPeerId) => {
|
|
395
|
-
let totalPending = 0;
|
|
396
|
-
for (const [, q] of userQueues) totalPending += q.length;
|
|
397
|
-
const senderQueue = userQueues.get(senderPeerId);
|
|
398
|
-
return {
|
|
399
|
-
totalPending,
|
|
400
|
-
activeUsers: activeUsers.size,
|
|
401
|
-
maxConcurrentUsers: MAX_CONCURRENT_USERS,
|
|
402
|
-
senderPending: senderQueue ? senderQueue.length : 0
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
const clearUserQueue = (peerId) => {
|
|
406
|
-
const queue = userQueues.get(peerId);
|
|
407
|
-
if (!queue || queue.length === 0) return 0;
|
|
408
|
-
const droppedCount = queue.length;
|
|
409
|
-
queue.length = 0;
|
|
410
|
-
totalEnqueued = Math.max(0, totalEnqueued - droppedCount);
|
|
411
|
-
return droppedCount;
|
|
412
|
-
};
|
|
413
|
-
const executeImmediate = (msg) => {
|
|
414
|
-
if (handleMessageFnRef) handleMessageFnRef(msg).catch((err) => {
|
|
415
|
-
log?.error(`[qqbot:${accountId}] Immediate execution error: ${err}`);
|
|
416
|
-
});
|
|
417
|
-
};
|
|
418
|
-
return {
|
|
419
|
-
enqueue,
|
|
420
|
-
startProcessor,
|
|
421
|
-
getSnapshot,
|
|
422
|
-
getMessagePeerId,
|
|
423
|
-
clearUserQueue,
|
|
424
|
-
executeImmediate
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
//#endregion
|
|
428
|
-
//#region extensions/qqbot/src/utils/image-size.ts
|
|
429
|
-
/**
|
|
430
|
-
* Image dimension helpers for QQ Bot markdown image syntax.
|
|
431
|
-
*
|
|
432
|
-
* QQ Bot markdown images use ``.
|
|
433
|
-
*/
|
|
434
|
-
/** Default dimensions used when probing fails. */
|
|
435
|
-
const DEFAULT_IMAGE_SIZE = {
|
|
436
|
-
width: 512,
|
|
437
|
-
height: 512
|
|
438
|
-
};
|
|
439
|
-
/**
|
|
440
|
-
* Parse image dimensions from the PNG header.
|
|
441
|
-
*/
|
|
442
|
-
function parsePngSize(buffer) {
|
|
443
|
-
if (buffer.length < 24) return null;
|
|
444
|
-
if (buffer[0] !== 137 || buffer[1] !== 80 || buffer[2] !== 78 || buffer[3] !== 71) return null;
|
|
445
|
-
return {
|
|
446
|
-
width: buffer.readUInt32BE(16),
|
|
447
|
-
height: buffer.readUInt32BE(20)
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
/** Parse image dimensions from JPEG SOF0/SOF2 markers. */
|
|
451
|
-
function parseJpegSize(buffer) {
|
|
452
|
-
if (buffer.length < 4) return null;
|
|
453
|
-
if (buffer[0] !== 255 || buffer[1] !== 216) return null;
|
|
454
|
-
let offset = 2;
|
|
455
|
-
while (offset < buffer.length - 9) {
|
|
456
|
-
if (buffer[offset] !== 255) {
|
|
457
|
-
offset++;
|
|
458
|
-
continue;
|
|
459
|
-
}
|
|
460
|
-
const marker = buffer[offset + 1];
|
|
461
|
-
if (marker === 192 || marker === 194) {
|
|
462
|
-
if (offset + 9 <= buffer.length) {
|
|
463
|
-
const height = buffer.readUInt16BE(offset + 5);
|
|
464
|
-
return {
|
|
465
|
-
width: buffer.readUInt16BE(offset + 7),
|
|
466
|
-
height
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
if (offset + 3 < buffer.length) {
|
|
471
|
-
const blockLength = buffer.readUInt16BE(offset + 2);
|
|
472
|
-
offset += 2 + blockLength;
|
|
473
|
-
} else break;
|
|
474
|
-
}
|
|
475
|
-
return null;
|
|
476
|
-
}
|
|
477
|
-
/** Parse image dimensions from the GIF header. */
|
|
478
|
-
function parseGifSize(buffer) {
|
|
479
|
-
if (buffer.length < 10) return null;
|
|
480
|
-
const signature = buffer.toString("ascii", 0, 6);
|
|
481
|
-
if (signature !== "GIF87a" && signature !== "GIF89a") return null;
|
|
482
|
-
return {
|
|
483
|
-
width: buffer.readUInt16LE(6),
|
|
484
|
-
height: buffer.readUInt16LE(8)
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
/** Parse image dimensions from WebP headers. */
|
|
488
|
-
function parseWebpSize(buffer) {
|
|
489
|
-
if (buffer.length < 30) return null;
|
|
490
|
-
const riff = buffer.toString("ascii", 0, 4);
|
|
491
|
-
const webp = buffer.toString("ascii", 8, 12);
|
|
492
|
-
if (riff !== "RIFF" || webp !== "WEBP") return null;
|
|
493
|
-
const chunkType = buffer.toString("ascii", 12, 16);
|
|
494
|
-
if (chunkType === "VP8 ") {
|
|
495
|
-
if (buffer.length >= 30 && buffer[23] === 157 && buffer[24] === 1 && buffer[25] === 42) return {
|
|
496
|
-
width: buffer.readUInt16LE(26) & 16383,
|
|
497
|
-
height: buffer.readUInt16LE(28) & 16383
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
if (chunkType === "VP8L") {
|
|
501
|
-
if (buffer.length >= 25 && buffer[20] === 47) {
|
|
502
|
-
const bits = buffer.readUInt32LE(21);
|
|
503
|
-
return {
|
|
504
|
-
width: (bits & 16383) + 1,
|
|
505
|
-
height: (bits >> 14 & 16383) + 1
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
if (chunkType === "VP8X") {
|
|
510
|
-
if (buffer.length >= 30) return {
|
|
511
|
-
width: (buffer[24] | buffer[25] << 8 | buffer[26] << 16) + 1,
|
|
512
|
-
height: (buffer[27] | buffer[28] << 8 | buffer[29] << 16) + 1
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
return null;
|
|
516
|
-
}
|
|
517
|
-
/** Parse image dimensions from raw image bytes. */
|
|
518
|
-
function parseImageSize(buffer) {
|
|
519
|
-
return parsePngSize(buffer) ?? parseJpegSize(buffer) ?? parseGifSize(buffer) ?? parseWebpSize(buffer);
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* Fetch image dimensions from a public URL using only the first 64 KB.
|
|
523
|
-
*/
|
|
524
|
-
async function getImageSizeFromUrl(url, timeoutMs = 5e3) {
|
|
525
|
-
try {
|
|
526
|
-
const controller = new AbortController();
|
|
527
|
-
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
528
|
-
const response = await fetch(url, {
|
|
529
|
-
signal: controller.signal,
|
|
530
|
-
headers: {
|
|
531
|
-
Range: "bytes=0-65535",
|
|
532
|
-
"User-Agent": "QQBot-Image-Size-Detector/1.0"
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
clearTimeout(timeoutId);
|
|
536
|
-
if (!response.ok && response.status !== 206) {
|
|
537
|
-
debugLog(`[image-size] Failed to fetch ${url}: ${response.status}`);
|
|
538
|
-
return null;
|
|
539
|
-
}
|
|
540
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
541
|
-
const size = parseImageSize(Buffer$1.from(arrayBuffer));
|
|
542
|
-
if (size) debugLog(`[image-size] Got size from URL: ${size.width}x${size.height} - ${url.slice(0, 60)}...`);
|
|
543
|
-
return size;
|
|
544
|
-
} catch (err) {
|
|
545
|
-
debugLog(`[image-size] Error fetching ${url.slice(0, 60)}...: ${err}`);
|
|
546
|
-
return null;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
/** Parse image dimensions from a Base64 data URL. */
|
|
550
|
-
function getImageSizeFromDataUrl(dataUrl) {
|
|
551
|
-
try {
|
|
552
|
-
const matches = dataUrl.match(/^data:image\/[^;]+;base64,(.+)$/);
|
|
553
|
-
if (!matches) return null;
|
|
554
|
-
const base64Data = matches[1];
|
|
555
|
-
const size = parseImageSize(Buffer$1.from(base64Data, "base64"));
|
|
556
|
-
if (size) debugLog(`[image-size] Got size from Base64: ${size.width}x${size.height}`);
|
|
557
|
-
return size;
|
|
558
|
-
} catch (err) {
|
|
559
|
-
debugLog(`[image-size] Error parsing Base64: ${err}`);
|
|
560
|
-
return null;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Resolve image dimensions from either an HTTP URL or a Base64 data URL.
|
|
565
|
-
*/
|
|
566
|
-
async function getImageSize(source) {
|
|
567
|
-
if (source.startsWith("data:")) return getImageSizeFromDataUrl(source);
|
|
568
|
-
if (source.startsWith("http://") || source.startsWith("https://")) return getImageSizeFromUrl(source);
|
|
569
|
-
return null;
|
|
570
|
-
}
|
|
571
|
-
/** Format a markdown image with QQ Bot width/height annotations. */
|
|
572
|
-
function formatQQBotMarkdownImage(url, size) {
|
|
573
|
-
const { width, height } = size ?? DEFAULT_IMAGE_SIZE;
|
|
574
|
-
return ``;
|
|
575
|
-
}
|
|
576
|
-
/** Return true when markdown already contains QQ Bot size annotations. */
|
|
577
|
-
function hasQQBotImageSize(markdownImage) {
|
|
578
|
-
return /!\[#\d+px\s+#\d+px\]/.test(markdownImage);
|
|
579
|
-
}
|
|
580
|
-
//#endregion
|
|
581
|
-
//#region extensions/qqbot/src/utils/text-parsing.ts
|
|
582
|
-
/** Replace QQ face tags with readable text labels. */
|
|
583
|
-
function parseFaceTags(text) {
|
|
584
|
-
if (!text) return text;
|
|
585
|
-
return text.replace(/<faceType=\d+,faceId="[^"]*",ext="([^"]*)">/g, (_match, ext) => {
|
|
586
|
-
try {
|
|
587
|
-
const decoded = Buffer.from(ext, "base64").toString("utf-8");
|
|
588
|
-
return `[Emoji: ${JSON.parse(decoded).text || "unknown emoji"}]`;
|
|
589
|
-
} catch {
|
|
590
|
-
return _match;
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
/** Remove internal framework markers before sending text outward. */
|
|
595
|
-
function filterInternalMarkers(text) {
|
|
596
|
-
if (!text) return text;
|
|
597
|
-
let result = text.replace(/\[\[[a-z_]+:\s*[^\]]*\]\]/gi, "");
|
|
598
|
-
result = result.replace(/@(?:image|voice|video|file):[a-zA-Z0-9_.-]+/g, "");
|
|
599
|
-
result = result.replace(/\n{3,}/g, "\n\n").trim();
|
|
600
|
-
return result;
|
|
601
|
-
}
|
|
602
|
-
/** Parse quote-related ref indices from `message_scene.ext`. */
|
|
603
|
-
function parseRefIndices(ext) {
|
|
604
|
-
if (!ext || ext.length === 0) return {};
|
|
605
|
-
let refMsgIdx;
|
|
606
|
-
let msgIdx;
|
|
607
|
-
for (const item of ext) if (item.startsWith("ref_msg_idx=")) refMsgIdx = item.slice(12);
|
|
608
|
-
else if (item.startsWith("msg_idx=")) msgIdx = item.slice(8);
|
|
609
|
-
return {
|
|
610
|
-
refMsgIdx,
|
|
611
|
-
msgIdx
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
/** Build attachment summaries for ref-index caching. */
|
|
615
|
-
function buildAttachmentSummaries(attachments, localPaths) {
|
|
616
|
-
if (!attachments || attachments.length === 0) return void 0;
|
|
617
|
-
return attachments.map((att, idx) => {
|
|
618
|
-
const ct = att.content_type?.toLowerCase() ?? "";
|
|
619
|
-
let type = "unknown";
|
|
620
|
-
if (ct.startsWith("image/")) type = "image";
|
|
621
|
-
else if (ct === "voice" || ct.startsWith("audio/") || ct.includes("silk") || ct.includes("amr")) type = "voice";
|
|
622
|
-
else if (ct.startsWith("video/")) type = "video";
|
|
623
|
-
else if (ct.startsWith("application/") || ct.startsWith("text/")) type = "file";
|
|
624
|
-
return {
|
|
625
|
-
type,
|
|
626
|
-
filename: att.filename,
|
|
627
|
-
contentType: att.content_type,
|
|
628
|
-
localPath: localPaths?.[idx] ?? void 0
|
|
629
|
-
};
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
//#endregion
|
|
633
|
-
//#region extensions/qqbot/src/outbound-deliver.ts
|
|
634
|
-
/**
|
|
635
|
-
* Outbound delivery helpers.
|
|
636
|
-
*
|
|
637
|
-
* The gateway deliver callback uses two pipelines:
|
|
638
|
-
* 1. `parseAndSendMediaTags` handles `<qqimg/qqvoice/qqvideo/qqfile/qqmedia>` tags in order.
|
|
639
|
-
* 2. `sendPlainReply` handles plain replies, including markdown images and mixed text/media.
|
|
640
|
-
*/
|
|
641
|
-
/**
|
|
642
|
-
* Parse media tags from the reply text and send them in order.
|
|
643
|
-
*
|
|
644
|
-
* @returns `true` when media tags were found and handled; `false` when the caller
|
|
645
|
-
* should continue through the plain-text pipeline.
|
|
646
|
-
*/
|
|
647
|
-
async function parseAndSendMediaTags(replyText, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
648
|
-
const { account, log } = actx;
|
|
649
|
-
const prefix = `[qqbot:${account.accountId}]`;
|
|
650
|
-
const text = normalizeMediaTags(replyText);
|
|
651
|
-
const mediaTagMatches = [...text.matchAll(/<(qqimg|qqvoice|qqvideo|qqfile|qqmedia)>([^<>]+)<\/(?:qqimg|qqvoice|qqvideo|qqfile|qqmedia|img)>/gi)];
|
|
652
|
-
if (mediaTagMatches.length === 0) return {
|
|
653
|
-
handled: false,
|
|
654
|
-
normalizedText: text
|
|
655
|
-
};
|
|
656
|
-
const tagCounts = mediaTagMatches.reduce((acc, m) => {
|
|
657
|
-
const t = m[1].toLowerCase();
|
|
658
|
-
acc[t] = (acc[t] ?? 0) + 1;
|
|
659
|
-
return acc;
|
|
660
|
-
}, {});
|
|
661
|
-
log?.info(`${prefix} Detected media tags: ${Object.entries(tagCounts).map(([k, v]) => `${v} <${k}>`).join(", ")}`);
|
|
662
|
-
const sendQueue = [];
|
|
663
|
-
let lastIndex = 0;
|
|
664
|
-
const regex2 = /<(qqimg|qqvoice|qqvideo|qqfile|qqmedia)>([^<>]+)<\/(?:qqimg|qqvoice|qqvideo|qqfile|qqmedia|img)>/gi;
|
|
665
|
-
let match;
|
|
666
|
-
while ((match = regex2.exec(text)) !== null) {
|
|
667
|
-
const textBefore = text.slice(lastIndex, match.index).replace(/\n{3,}/g, "\n\n").trim();
|
|
668
|
-
if (textBefore) sendQueue.push({
|
|
669
|
-
type: "text",
|
|
670
|
-
content: filterInternalMarkers(textBefore)
|
|
671
|
-
});
|
|
672
|
-
const tagName = match[1].toLowerCase();
|
|
673
|
-
let mediaPath = decodeMediaPath(match[2]?.trim() ?? "", log, prefix);
|
|
674
|
-
if (mediaPath) {
|
|
675
|
-
const itemType = {
|
|
676
|
-
qqmedia: "media",
|
|
677
|
-
qqvoice: "voice",
|
|
678
|
-
qqvideo: "video",
|
|
679
|
-
qqfile: "file"
|
|
680
|
-
}[tagName] ?? "image";
|
|
681
|
-
sendQueue.push({
|
|
682
|
-
type: itemType,
|
|
683
|
-
content: mediaPath
|
|
684
|
-
});
|
|
685
|
-
log?.info(`${prefix} Found ${itemType} in <${tagName}>: ${mediaPath}`);
|
|
686
|
-
}
|
|
687
|
-
lastIndex = match.index + match[0].length;
|
|
688
|
-
}
|
|
689
|
-
const textAfter = text.slice(lastIndex).replace(/\n{3,}/g, "\n\n").trim();
|
|
690
|
-
if (textAfter) sendQueue.push({
|
|
691
|
-
type: "text",
|
|
692
|
-
content: filterInternalMarkers(textAfter)
|
|
693
|
-
});
|
|
694
|
-
log?.info(`${prefix} Send queue: ${sendQueue.map((item) => item.type).join(" -> ")}`);
|
|
695
|
-
const mediaTarget = {
|
|
696
|
-
targetType: event.type === "c2c" ? "c2c" : event.type === "group" ? "group" : event.type === "dm" ? "dm" : "channel",
|
|
697
|
-
targetId: event.type === "c2c" ? event.senderId : event.type === "group" ? event.groupOpenid : event.type === "dm" ? event.guildId : event.channelId,
|
|
698
|
-
account,
|
|
699
|
-
replyToId: event.messageId,
|
|
700
|
-
logPrefix: prefix
|
|
701
|
-
};
|
|
702
|
-
for (const item of sendQueue) if (item.type === "text") await sendTextChunks(item.content, event, actx, sendWithRetry, consumeQuoteRef);
|
|
703
|
-
else if (item.type === "image") {
|
|
704
|
-
const result = await sendPhoto(mediaTarget, item.content);
|
|
705
|
-
if (result.error) log?.error(`${prefix} sendPhoto error: ${result.error}`);
|
|
706
|
-
} else if (item.type === "voice") await sendVoiceWithTimeout(mediaTarget, item.content, account, log, prefix);
|
|
707
|
-
else if (item.type === "video") {
|
|
708
|
-
const result = await sendVideoMsg(mediaTarget, item.content);
|
|
709
|
-
if (result.error) log?.error(`${prefix} sendVideoMsg error: ${result.error}`);
|
|
710
|
-
} else if (item.type === "file") {
|
|
711
|
-
const result = await sendDocument(mediaTarget, item.content);
|
|
712
|
-
if (result.error) log?.error(`${prefix} sendDocument error: ${result.error}`);
|
|
713
|
-
} else if (item.type === "media") {
|
|
714
|
-
const result = await sendMedia({
|
|
715
|
-
to: actx.qualifiedTarget,
|
|
716
|
-
text: "",
|
|
717
|
-
mediaUrl: item.content,
|
|
718
|
-
accountId: account.accountId,
|
|
719
|
-
replyToId: event.messageId,
|
|
720
|
-
account
|
|
721
|
-
});
|
|
722
|
-
if (result.error) log?.error(`${prefix} sendMedia(auto) error: ${result.error}`);
|
|
723
|
-
}
|
|
724
|
-
return {
|
|
725
|
-
handled: true,
|
|
726
|
-
normalizedText: text
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
/**
|
|
730
|
-
* Send a reply that does not contain structured media tags.
|
|
731
|
-
* Handles markdown image embeds, Base64 media, plain-text chunking, and local media routing.
|
|
732
|
-
*/
|
|
733
|
-
async function sendPlainReply(payload, replyText, event, actx, sendWithRetry, consumeQuoteRef, toolMediaUrls) {
|
|
734
|
-
const { account, qualifiedTarget, log } = actx;
|
|
735
|
-
const prefix = `[qqbot:${account.accountId}]`;
|
|
736
|
-
const collectedImageUrls = [];
|
|
737
|
-
const localMediaToSend = [];
|
|
738
|
-
const collectImageUrl = (url) => {
|
|
739
|
-
if (!url) return false;
|
|
740
|
-
const isHttpUrl = url.startsWith("http://") || url.startsWith("https://");
|
|
741
|
-
const isDataUrl = url.startsWith("data:image/");
|
|
742
|
-
if (isHttpUrl || isDataUrl) {
|
|
743
|
-
if (!collectedImageUrls.includes(url)) {
|
|
744
|
-
collectedImageUrls.push(url);
|
|
745
|
-
log?.info(`${prefix} Collected ${isDataUrl ? "Base64" : "media URL"}: ${isDataUrl ? `(length: ${url.length})` : url.slice(0, 80) + "..."}`);
|
|
746
|
-
}
|
|
747
|
-
return true;
|
|
748
|
-
}
|
|
749
|
-
if (isLocalPath(url)) {
|
|
750
|
-
if (!localMediaToSend.includes(url)) {
|
|
751
|
-
localMediaToSend.push(url);
|
|
752
|
-
log?.info(`${prefix} Collected local media for auto-routing: ${url}`);
|
|
753
|
-
}
|
|
754
|
-
return true;
|
|
755
|
-
}
|
|
756
|
-
return false;
|
|
757
|
-
};
|
|
758
|
-
if (payload.mediaUrls?.length) for (const url of payload.mediaUrls) collectImageUrl(url);
|
|
759
|
-
if (payload.mediaUrl) collectImageUrl(payload.mediaUrl);
|
|
760
|
-
const mdMatches = [...replyText.matchAll(/!\[([^\]]*)\]\(([^)]+)\)/gi)];
|
|
761
|
-
for (const m of mdMatches) {
|
|
762
|
-
const url = m[2]?.trim();
|
|
763
|
-
if (url && !collectedImageUrls.includes(url)) {
|
|
764
|
-
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
765
|
-
collectedImageUrls.push(url);
|
|
766
|
-
log?.info(`${prefix} Extracted HTTP image from markdown: ${url.slice(0, 80)}...`);
|
|
767
|
-
} else if (isLocalPath(url)) {
|
|
768
|
-
if (!localMediaToSend.includes(url)) {
|
|
769
|
-
localMediaToSend.push(url);
|
|
770
|
-
log?.info(`${prefix} Collected local media from markdown for auto-routing: ${url}`);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
const bareUrlMatches = [...replyText.matchAll(/(?<![(\["'])(https?:\/\/[^\s)"'<>]+\.(?:png|jpg|jpeg|gif|webp)(?:\?[^\s"'<>]*)?)/gi)];
|
|
776
|
-
for (const m of bareUrlMatches) {
|
|
777
|
-
const url = m[1];
|
|
778
|
-
if (url && !collectedImageUrls.includes(url)) {
|
|
779
|
-
collectedImageUrls.push(url);
|
|
780
|
-
log?.info(`${prefix} Extracted bare image URL: ${url.slice(0, 80)}...`);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
const useMarkdown = account.markdownSupport === true;
|
|
784
|
-
log?.info(`${prefix} Markdown mode: ${useMarkdown}, images: ${collectedImageUrls.length}`);
|
|
785
|
-
let textWithoutImages = filterInternalMarkers(replyText);
|
|
786
|
-
for (const m of mdMatches) {
|
|
787
|
-
const url = m[2]?.trim();
|
|
788
|
-
if (url && !url.startsWith("http://") && !url.startsWith("https://") && !isLocalPath(url)) textWithoutImages = textWithoutImages.replace(m[0], "").trim();
|
|
789
|
-
}
|
|
790
|
-
if (useMarkdown) await sendMarkdownReply(textWithoutImages, collectedImageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef);
|
|
791
|
-
else await sendPlainTextReply(textWithoutImages, collectedImageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef);
|
|
792
|
-
if (localMediaToSend.length > 0) {
|
|
793
|
-
log?.info(`${prefix} Sending ${localMediaToSend.length} local media via sendMedia auto-routing`);
|
|
794
|
-
for (const mediaPath of localMediaToSend) try {
|
|
795
|
-
const result = await sendMedia({
|
|
796
|
-
to: qualifiedTarget,
|
|
797
|
-
text: "",
|
|
798
|
-
mediaUrl: mediaPath,
|
|
799
|
-
accountId: account.accountId,
|
|
800
|
-
replyToId: event.messageId,
|
|
801
|
-
account
|
|
802
|
-
});
|
|
803
|
-
if (result.error) log?.error(`${prefix} sendMedia(auto) error for ${mediaPath}: ${result.error}`);
|
|
804
|
-
else log?.info(`${prefix} Sent local media: ${mediaPath}`);
|
|
805
|
-
} catch (err) {
|
|
806
|
-
log?.error(`${prefix} sendMedia(auto) failed for ${mediaPath}: ${err}`);
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
if (toolMediaUrls.length > 0) {
|
|
810
|
-
log?.info(`${prefix} Forwarding ${toolMediaUrls.length} tool-collected media URL(s) after block deliver`);
|
|
811
|
-
for (const mediaUrl of toolMediaUrls) try {
|
|
812
|
-
const result = await sendMedia({
|
|
813
|
-
to: qualifiedTarget,
|
|
814
|
-
text: "",
|
|
815
|
-
mediaUrl,
|
|
816
|
-
accountId: account.accountId,
|
|
817
|
-
replyToId: event.messageId,
|
|
818
|
-
account
|
|
819
|
-
});
|
|
820
|
-
if (result.error) log?.error(`${prefix} Tool media forward error: ${result.error}`);
|
|
821
|
-
else log?.info(`${prefix} Forwarded tool media: ${mediaUrl.slice(0, 80)}...`);
|
|
822
|
-
} catch (err) {
|
|
823
|
-
log?.error(`${prefix} Tool media forward failed: ${err}`);
|
|
824
|
-
}
|
|
825
|
-
toolMediaUrls.length = 0;
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
/** Decode a media path by stripping `MEDIA:`, expanding `~`, and unescaping. */
|
|
829
|
-
function decodeMediaPath(raw, log, prefix) {
|
|
830
|
-
let mediaPath = raw;
|
|
831
|
-
if (mediaPath.startsWith("MEDIA:")) mediaPath = mediaPath.slice(6);
|
|
832
|
-
mediaPath = normalizePath(mediaPath);
|
|
833
|
-
mediaPath = mediaPath.replace(/\\\\/g, "\\");
|
|
834
|
-
const isWinLocal = /^[a-zA-Z]:[\\/]/.test(mediaPath) || mediaPath.startsWith("\\\\");
|
|
835
|
-
try {
|
|
836
|
-
const hasOctal = /\\[0-7]{1,3}/.test(mediaPath);
|
|
837
|
-
const hasNonASCII = /[\u0080-\u00FF]/.test(mediaPath);
|
|
838
|
-
if (!isWinLocal && (hasOctal || hasNonASCII)) {
|
|
839
|
-
log?.debug?.(`${prefix} Decoding path with mixed encoding: ${mediaPath}`);
|
|
840
|
-
let decoded = mediaPath.replace(/\\([0-7]{1,3})/g, (_, octal) => {
|
|
841
|
-
return String.fromCharCode(parseInt(octal, 8));
|
|
842
|
-
});
|
|
843
|
-
const bytes = [];
|
|
844
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
845
|
-
const code = decoded.charCodeAt(i);
|
|
846
|
-
if (code <= 255) bytes.push(code);
|
|
847
|
-
else {
|
|
848
|
-
const charBytes = Buffer.from(decoded[i], "utf8");
|
|
849
|
-
bytes.push(...charBytes);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
const utf8Decoded = Buffer.from(bytes).toString("utf8");
|
|
853
|
-
if (!utf8Decoded.includes("�") || utf8Decoded.length < decoded.length) {
|
|
854
|
-
mediaPath = utf8Decoded;
|
|
855
|
-
log?.debug?.(`${prefix} Successfully decoded path: ${mediaPath}`);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
} catch (decodeErr) {
|
|
859
|
-
log?.error(`${prefix} Path decode error: ${decodeErr}`);
|
|
860
|
-
}
|
|
861
|
-
return mediaPath;
|
|
862
|
-
}
|
|
863
|
-
/** Shared helper for sending chunked text replies. */
|
|
864
|
-
async function sendTextChunks(text, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
865
|
-
const { account, log } = actx;
|
|
866
|
-
const prefix = `[qqbot:${account.accountId}]`;
|
|
867
|
-
const chunks = getQQBotRuntime().channel.text.chunkMarkdownText(text, TEXT_CHUNK_LIMIT);
|
|
868
|
-
for (const chunk of chunks) try {
|
|
869
|
-
await sendWithRetry(async (token) => {
|
|
870
|
-
const ref = consumeQuoteRef();
|
|
871
|
-
if (event.type === "c2c") return await sendC2CMessage(account.appId, token, event.senderId, chunk, event.messageId, ref);
|
|
872
|
-
else if (event.type === "group" && event.groupOpenid) return await sendGroupMessage(account.appId, token, event.groupOpenid, chunk, event.messageId);
|
|
873
|
-
else if (event.type === "dm" && event.guildId) return await sendDmMessage(token, event.guildId, chunk, event.messageId);
|
|
874
|
-
else if (event.channelId) return await sendChannelMessage(token, event.channelId, chunk, event.messageId);
|
|
875
|
-
});
|
|
876
|
-
log?.info(`${prefix} Sent text chunk (${chunk.length}/${text.length} chars): ${chunk.slice(0, 50)}...`);
|
|
877
|
-
} catch (err) {
|
|
878
|
-
log?.error(`${prefix} Failed to send text chunk: ${err}`);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
/** Send voice with a 45s timeout guard. */
|
|
882
|
-
async function sendVoiceWithTimeout(target, voicePath, account, log, prefix) {
|
|
883
|
-
const uploadFormats = account.config?.audioFormatPolicy?.uploadDirectFormats ?? account.config?.voiceDirectUploadFormats;
|
|
884
|
-
const transcodeEnabled = account.config?.audioFormatPolicy?.transcodeEnabled !== false;
|
|
885
|
-
const voiceTimeout = 45e3;
|
|
886
|
-
const ac = new AbortController();
|
|
887
|
-
try {
|
|
888
|
-
const result = await Promise.race([sendVoice(target, voicePath, uploadFormats, transcodeEnabled).then((r) => {
|
|
889
|
-
if (ac.signal.aborted) {
|
|
890
|
-
log?.info(`${prefix} sendVoice completed after timeout, suppressing late delivery`);
|
|
891
|
-
return {
|
|
892
|
-
channel: "qqbot",
|
|
893
|
-
error: "Voice send completed after timeout (suppressed)"
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
return r;
|
|
897
|
-
}), new Promise((resolve) => setTimeout(() => {
|
|
898
|
-
ac.abort();
|
|
899
|
-
resolve({
|
|
900
|
-
channel: "qqbot",
|
|
901
|
-
error: "Voice send timed out and was skipped"
|
|
902
|
-
});
|
|
903
|
-
}, voiceTimeout))]);
|
|
904
|
-
if (result.error) log?.error(`${prefix} sendVoice error: ${result.error}`);
|
|
905
|
-
} catch (err) {
|
|
906
|
-
log?.error(`${prefix} sendVoice unexpected error: ${err}`);
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
/** Send in markdown mode. */
|
|
910
|
-
async function sendMarkdownReply(textWithoutImages, imageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
911
|
-
const { account, log } = actx;
|
|
912
|
-
const prefix = `[qqbot:${account.accountId}]`;
|
|
913
|
-
const httpImageUrls = [];
|
|
914
|
-
const base64ImageUrls = [];
|
|
915
|
-
for (const url of imageUrls) if (url.startsWith("data:image/")) base64ImageUrls.push(url);
|
|
916
|
-
else if (url.startsWith("http://") || url.startsWith("https://")) httpImageUrls.push(url);
|
|
917
|
-
log?.info(`${prefix} Image classification: httpUrls=${httpImageUrls.length}, base64=${base64ImageUrls.length}`);
|
|
918
|
-
if (base64ImageUrls.length > 0) {
|
|
919
|
-
log?.info(`${prefix} Sending ${base64ImageUrls.length} image(s) via Rich Media API...`);
|
|
920
|
-
for (const imageUrl of base64ImageUrls) try {
|
|
921
|
-
await sendWithRetry(async (token) => {
|
|
922
|
-
if (event.type === "c2c") await sendC2CImageMessage(account.appId, token, event.senderId, imageUrl, event.messageId);
|
|
923
|
-
else if (event.type === "group" && event.groupOpenid) await sendGroupImageMessage(account.appId, token, event.groupOpenid, imageUrl, event.messageId);
|
|
924
|
-
else if (event.type === "dm" && event.guildId) log?.info(`${prefix} DM does not support rich media image, skipping Base64 image`);
|
|
925
|
-
else if (event.channelId) log?.info(`${prefix} Channel does not support rich media, skipping Base64 image`);
|
|
926
|
-
});
|
|
927
|
-
log?.info(`${prefix} Sent Base64 image via Rich Media API (size: ${imageUrl.length} chars)`);
|
|
928
|
-
} catch (imgErr) {
|
|
929
|
-
log?.error(`${prefix} Failed to send Base64 image via Rich Media API: ${imgErr}`);
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
const existingMdUrls = new Set(mdMatches.map((m) => m[2]));
|
|
933
|
-
const imagesToAppend = [];
|
|
934
|
-
for (const url of httpImageUrls) if (!existingMdUrls.has(url)) try {
|
|
935
|
-
const size = await getImageSize(url);
|
|
936
|
-
imagesToAppend.push(formatQQBotMarkdownImage(url, size));
|
|
937
|
-
log?.info(`${prefix} Formatted HTTP image: ${size ? `${size.width}x${size.height}` : "default size"} - ${url.slice(0, 60)}...`);
|
|
938
|
-
} catch (err) {
|
|
939
|
-
log?.info(`${prefix} Failed to get image size, using default: ${err}`);
|
|
940
|
-
imagesToAppend.push(formatQQBotMarkdownImage(url, null));
|
|
941
|
-
}
|
|
942
|
-
let result = textWithoutImages;
|
|
943
|
-
for (const m of mdMatches) {
|
|
944
|
-
const fullMatch = m[0];
|
|
945
|
-
const imgUrl = m[2];
|
|
946
|
-
if ((imgUrl.startsWith("http://") || imgUrl.startsWith("https://")) && !hasQQBotImageSize(fullMatch)) try {
|
|
947
|
-
const size = await getImageSize(imgUrl);
|
|
948
|
-
result = result.replace(fullMatch, formatQQBotMarkdownImage(imgUrl, size));
|
|
949
|
-
log?.info(`${prefix} Updated image with size: ${size ? `${size.width}x${size.height}` : "default"} - ${imgUrl.slice(0, 60)}...`);
|
|
950
|
-
} catch (err) {
|
|
951
|
-
log?.info(`${prefix} Failed to get image size for existing md, using default: ${err}`);
|
|
952
|
-
result = result.replace(fullMatch, formatQQBotMarkdownImage(imgUrl, null));
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
for (const m of bareUrlMatches) result = result.replace(m[0], "").trim();
|
|
956
|
-
if (imagesToAppend.length > 0) {
|
|
957
|
-
result = result.trim();
|
|
958
|
-
result = result ? result + "\n\n" + imagesToAppend.join("\n") : imagesToAppend.join("\n");
|
|
959
|
-
}
|
|
960
|
-
if (result.trim()) {
|
|
961
|
-
const mdChunks = chunkText(result, TEXT_CHUNK_LIMIT);
|
|
962
|
-
for (const chunk of mdChunks) try {
|
|
963
|
-
await sendWithRetry(async (token) => {
|
|
964
|
-
const ref = consumeQuoteRef();
|
|
965
|
-
if (event.type === "c2c") return await sendC2CMessage(account.appId, token, event.senderId, chunk, event.messageId, ref);
|
|
966
|
-
else if (event.type === "group" && event.groupOpenid) return await sendGroupMessage(account.appId, token, event.groupOpenid, chunk, event.messageId);
|
|
967
|
-
else if (event.type === "dm" && event.guildId) return await sendDmMessage(token, event.guildId, chunk, event.messageId);
|
|
968
|
-
else if (event.channelId) return await sendChannelMessage(token, event.channelId, chunk, event.messageId);
|
|
969
|
-
});
|
|
970
|
-
log?.info(`${prefix} Sent markdown chunk (${chunk.length}/${result.length} chars) with ${httpImageUrls.length} HTTP images (${event.type})`);
|
|
971
|
-
} catch (err) {
|
|
972
|
-
log?.error(`${prefix} Failed to send markdown message chunk: ${err}`);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
/** Send in plain-text mode. */
|
|
977
|
-
async function sendPlainTextReply(textWithoutImages, imageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
978
|
-
const { account, log } = actx;
|
|
979
|
-
const prefix = `[qqbot:${account.accountId}]`;
|
|
980
|
-
const imgMediaTarget = {
|
|
981
|
-
targetType: event.type === "c2c" ? "c2c" : event.type === "group" ? "group" : event.type === "dm" ? "dm" : "channel",
|
|
982
|
-
targetId: event.type === "c2c" ? event.senderId : event.type === "group" ? event.groupOpenid : event.type === "dm" ? event.guildId : event.channelId,
|
|
983
|
-
account,
|
|
984
|
-
replyToId: event.messageId,
|
|
985
|
-
logPrefix: prefix
|
|
986
|
-
};
|
|
987
|
-
let result = textWithoutImages;
|
|
988
|
-
for (const m of mdMatches) result = result.replace(m[0], "").trim();
|
|
989
|
-
for (const m of bareUrlMatches) result = result.replace(m[0], "").trim();
|
|
990
|
-
if (result && event.type !== "c2c") result = result.replace(/([a-zA-Z0-9])\.([a-zA-Z0-9])/g, "$1_$2");
|
|
991
|
-
try {
|
|
992
|
-
for (const imageUrl of imageUrls) try {
|
|
993
|
-
const imgResult = await sendPhoto(imgMediaTarget, imageUrl);
|
|
994
|
-
if (imgResult.error) log?.error(`${prefix} Failed to send image: ${imgResult.error}`);
|
|
995
|
-
else log?.info(`${prefix} Sent image via sendPhoto: ${imageUrl.slice(0, 80)}...`);
|
|
996
|
-
} catch (imgErr) {
|
|
997
|
-
log?.error(`${prefix} Failed to send image: ${imgErr}`);
|
|
998
|
-
}
|
|
999
|
-
if (result.trim()) {
|
|
1000
|
-
const plainChunks = chunkText(result, TEXT_CHUNK_LIMIT);
|
|
1001
|
-
for (const chunk of plainChunks) {
|
|
1002
|
-
await sendWithRetry(async (token) => {
|
|
1003
|
-
const ref = consumeQuoteRef();
|
|
1004
|
-
if (event.type === "c2c") return await sendC2CMessage(account.appId, token, event.senderId, chunk, event.messageId, ref);
|
|
1005
|
-
else if (event.type === "group" && event.groupOpenid) return await sendGroupMessage(account.appId, token, event.groupOpenid, chunk, event.messageId);
|
|
1006
|
-
else if (event.channelId) return await sendChannelMessage(token, event.channelId, chunk, event.messageId);
|
|
1007
|
-
});
|
|
1008
|
-
log?.info(`${prefix} Sent text chunk (${chunk.length}/${result.length} chars) (${event.type})`);
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
} catch (err) {
|
|
1012
|
-
log?.error(`${prefix} Send failed: ${err}`);
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
//#endregion
|
|
1016
|
-
//#region extensions/qqbot/src/ref-index-store.ts
|
|
1017
|
-
const STORAGE_DIR = getQQBotDataDir("data");
|
|
1018
|
-
const REF_INDEX_FILE = path.join(STORAGE_DIR, "ref-index.jsonl");
|
|
1019
|
-
const MAX_ENTRIES = 5e4;
|
|
1020
|
-
const TTL_MS = 10080 * 60 * 1e3;
|
|
1021
|
-
const COMPACT_THRESHOLD_RATIO = 2;
|
|
1022
|
-
let cache = null;
|
|
1023
|
-
let totalLinesOnDisk = 0;
|
|
1024
|
-
/** Lazily load the JSONL store into memory. */
|
|
1025
|
-
function loadFromFile() {
|
|
1026
|
-
if (cache !== null) return cache;
|
|
1027
|
-
cache = /* @__PURE__ */ new Map();
|
|
1028
|
-
totalLinesOnDisk = 0;
|
|
1029
|
-
try {
|
|
1030
|
-
if (!fsSync.existsSync(REF_INDEX_FILE)) return cache;
|
|
1031
|
-
const lines = fsSync.readFileSync(REF_INDEX_FILE, "utf-8").split("\n");
|
|
1032
|
-
const now = Date.now();
|
|
1033
|
-
let expired = 0;
|
|
1034
|
-
for (const line of lines) {
|
|
1035
|
-
const trimmed = line.trim();
|
|
1036
|
-
if (!trimmed) continue;
|
|
1037
|
-
totalLinesOnDisk++;
|
|
1038
|
-
try {
|
|
1039
|
-
const entry = JSON.parse(trimmed);
|
|
1040
|
-
if (!entry.k || !entry.v || !entry.t) continue;
|
|
1041
|
-
if (now - entry.t > TTL_MS) {
|
|
1042
|
-
expired++;
|
|
1043
|
-
continue;
|
|
1044
|
-
}
|
|
1045
|
-
cache.set(entry.k, {
|
|
1046
|
-
...entry.v,
|
|
1047
|
-
_createdAt: entry.t
|
|
1048
|
-
});
|
|
1049
|
-
} catch {}
|
|
1050
|
-
}
|
|
1051
|
-
debugLog(`[ref-index-store] Loaded ${cache.size} entries from ${totalLinesOnDisk} lines (${expired} expired)`);
|
|
1052
|
-
if (shouldCompact()) compactFile();
|
|
1053
|
-
} catch (err) {
|
|
1054
|
-
debugError(`[ref-index-store] Failed to load: ${err}`);
|
|
1055
|
-
cache = /* @__PURE__ */ new Map();
|
|
1056
|
-
}
|
|
1057
|
-
return cache;
|
|
1058
|
-
}
|
|
1059
|
-
/** Append one record to the JSONL file. */
|
|
1060
|
-
function appendLine(line) {
|
|
1061
|
-
try {
|
|
1062
|
-
ensureDir$1();
|
|
1063
|
-
fsSync.appendFileSync(REF_INDEX_FILE, JSON.stringify(line) + "\n", "utf-8");
|
|
1064
|
-
totalLinesOnDisk++;
|
|
1065
|
-
} catch (err) {
|
|
1066
|
-
debugError(`[ref-index-store] Failed to append: ${err}`);
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
function ensureDir$1() {
|
|
1070
|
-
if (!fsSync.existsSync(STORAGE_DIR)) fsSync.mkdirSync(STORAGE_DIR, { recursive: true });
|
|
1071
|
-
}
|
|
1072
|
-
function shouldCompact() {
|
|
1073
|
-
if (!cache) return false;
|
|
1074
|
-
return totalLinesOnDisk > cache.size * COMPACT_THRESHOLD_RATIO && totalLinesOnDisk > 1e3;
|
|
1075
|
-
}
|
|
1076
|
-
function compactFile() {
|
|
1077
|
-
if (!cache) return;
|
|
1078
|
-
const before = totalLinesOnDisk;
|
|
1079
|
-
try {
|
|
1080
|
-
ensureDir$1();
|
|
1081
|
-
const tmpPath = REF_INDEX_FILE + ".tmp";
|
|
1082
|
-
const lines = [];
|
|
1083
|
-
for (const [key, entry] of cache) {
|
|
1084
|
-
const line = {
|
|
1085
|
-
k: key,
|
|
1086
|
-
v: {
|
|
1087
|
-
content: entry.content,
|
|
1088
|
-
senderId: entry.senderId,
|
|
1089
|
-
senderName: entry.senderName,
|
|
1090
|
-
timestamp: entry.timestamp,
|
|
1091
|
-
isBot: entry.isBot,
|
|
1092
|
-
attachments: entry.attachments
|
|
1093
|
-
},
|
|
1094
|
-
t: entry._createdAt
|
|
1095
|
-
};
|
|
1096
|
-
lines.push(JSON.stringify(line));
|
|
1097
|
-
}
|
|
1098
|
-
fsSync.writeFileSync(tmpPath, lines.join("\n") + "\n", "utf-8");
|
|
1099
|
-
fsSync.renameSync(tmpPath, REF_INDEX_FILE);
|
|
1100
|
-
totalLinesOnDisk = cache.size;
|
|
1101
|
-
debugLog(`[ref-index-store] Compacted: ${before} lines → ${totalLinesOnDisk} lines`);
|
|
1102
|
-
} catch (err) {
|
|
1103
|
-
debugError(`[ref-index-store] Compact failed: ${err}`);
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
function evictIfNeeded() {
|
|
1107
|
-
if (!cache || cache.size < MAX_ENTRIES) return;
|
|
1108
|
-
const now = Date.now();
|
|
1109
|
-
for (const [key, entry] of cache) if (now - entry._createdAt > TTL_MS) cache.delete(key);
|
|
1110
|
-
if (cache.size >= MAX_ENTRIES) {
|
|
1111
|
-
const toRemove = [...cache.entries()].sort((a, b) => a[1]._createdAt - b[1]._createdAt).slice(0, cache.size - MAX_ENTRIES + 1e3);
|
|
1112
|
-
for (const [key] of toRemove) cache.delete(key);
|
|
1113
|
-
debugLog(`[ref-index-store] Evicted ${toRemove.length} oldest entries`);
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
/** Persist a refIdx mapping for one message. */
|
|
1117
|
-
function setRefIndex(refIdx, entry) {
|
|
1118
|
-
const store = loadFromFile();
|
|
1119
|
-
evictIfNeeded();
|
|
1120
|
-
const now = Date.now();
|
|
1121
|
-
store.set(refIdx, {
|
|
1122
|
-
content: entry.content,
|
|
1123
|
-
senderId: entry.senderId,
|
|
1124
|
-
senderName: entry.senderName,
|
|
1125
|
-
timestamp: entry.timestamp,
|
|
1126
|
-
isBot: entry.isBot,
|
|
1127
|
-
attachments: entry.attachments,
|
|
1128
|
-
_createdAt: now
|
|
1129
|
-
});
|
|
1130
|
-
appendLine({
|
|
1131
|
-
k: refIdx,
|
|
1132
|
-
v: {
|
|
1133
|
-
content: entry.content,
|
|
1134
|
-
senderId: entry.senderId,
|
|
1135
|
-
senderName: entry.senderName,
|
|
1136
|
-
timestamp: entry.timestamp,
|
|
1137
|
-
isBot: entry.isBot,
|
|
1138
|
-
attachments: entry.attachments
|
|
1139
|
-
},
|
|
1140
|
-
t: now
|
|
1141
|
-
});
|
|
1142
|
-
if (shouldCompact()) compactFile();
|
|
1143
|
-
}
|
|
1144
|
-
/** Look up one quoted message by refIdx. */
|
|
1145
|
-
function getRefIndex(refIdx) {
|
|
1146
|
-
const store = loadFromFile();
|
|
1147
|
-
const entry = store.get(refIdx);
|
|
1148
|
-
if (!entry) return null;
|
|
1149
|
-
if (Date.now() - entry._createdAt > TTL_MS) {
|
|
1150
|
-
store.delete(refIdx);
|
|
1151
|
-
return null;
|
|
1152
|
-
}
|
|
1153
|
-
return {
|
|
1154
|
-
content: entry.content,
|
|
1155
|
-
senderId: entry.senderId,
|
|
1156
|
-
senderName: entry.senderName,
|
|
1157
|
-
timestamp: entry.timestamp,
|
|
1158
|
-
isBot: entry.isBot,
|
|
1159
|
-
attachments: entry.attachments
|
|
1160
|
-
};
|
|
1161
|
-
}
|
|
1162
|
-
/** Format a ref-index entry into text suitable for model context. */
|
|
1163
|
-
function formatRefEntryForAgent(entry) {
|
|
1164
|
-
const parts = [];
|
|
1165
|
-
if (entry.content.trim()) parts.push(entry.content);
|
|
1166
|
-
if (entry.attachments?.length) for (const att of entry.attachments) {
|
|
1167
|
-
const sourceHint = att.localPath ? ` (${att.localPath})` : att.url ? ` (${att.url})` : "";
|
|
1168
|
-
switch (att.type) {
|
|
1169
|
-
case "image":
|
|
1170
|
-
parts.push(`[image${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1171
|
-
break;
|
|
1172
|
-
case "voice":
|
|
1173
|
-
if (att.transcript) {
|
|
1174
|
-
const sourceTag = att.transcriptSource ? ` - ${{
|
|
1175
|
-
stt: "local STT",
|
|
1176
|
-
asr: "platform ASR",
|
|
1177
|
-
tts: "TTS source",
|
|
1178
|
-
fallback: "fallback text"
|
|
1179
|
-
}[att.transcriptSource] || att.transcriptSource}` : "";
|
|
1180
|
-
parts.push(`[voice message (content: "${att.transcript}"${sourceTag})${sourceHint}]`);
|
|
1181
|
-
} else parts.push(`[voice message${sourceHint}]`);
|
|
1182
|
-
break;
|
|
1183
|
-
case "video":
|
|
1184
|
-
parts.push(`[video${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1185
|
-
break;
|
|
1186
|
-
case "file":
|
|
1187
|
-
parts.push(`[file${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1188
|
-
break;
|
|
1189
|
-
default: parts.push(`[attachment${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return parts.join(" ") || "[empty message]";
|
|
1193
|
-
}
|
|
1194
|
-
/** Compact the store before process exit when needed. */
|
|
1195
|
-
function flushRefIndex() {
|
|
1196
|
-
if (cache && shouldCompact()) compactFile();
|
|
1197
|
-
}
|
|
1198
|
-
//#endregion
|
|
1199
|
-
//#region extensions/qqbot/src/reply-dispatcher.ts
|
|
1200
|
-
/** Send a message and retry once if the token appears to have expired. */
|
|
1201
|
-
async function sendWithTokenRetry(appId, clientSecret, sendFn, log, accountId) {
|
|
1202
|
-
try {
|
|
1203
|
-
return await sendFn(await getAccessToken(appId, clientSecret));
|
|
1204
|
-
} catch (err) {
|
|
1205
|
-
const errMsg = String(err);
|
|
1206
|
-
if (errMsg.includes("401") || errMsg.includes("token") || errMsg.includes("access_token")) {
|
|
1207
|
-
log?.info(`[qqbot:${accountId}] Token may be expired, refreshing...`);
|
|
1208
|
-
clearTokenCache(appId);
|
|
1209
|
-
return await sendFn(await getAccessToken(appId, clientSecret));
|
|
1210
|
-
} else throw err;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
/** Route a text message to the correct QQ target type. */
|
|
1214
|
-
async function sendTextToTarget(ctx, text, refIdx) {
|
|
1215
|
-
const { target, account } = ctx;
|
|
1216
|
-
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1217
|
-
if (target.type === "c2c") await sendC2CMessage(account.appId, token, target.senderId, text, target.messageId, refIdx);
|
|
1218
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupMessage(account.appId, token, target.groupOpenid, text, target.messageId);
|
|
1219
|
-
else if (target.channelId) await sendChannelMessage(token, target.channelId, text, target.messageId);
|
|
1220
|
-
else if (target.type === "dm" && target.guildId) await sendDmMessage(token, target.guildId, text, target.messageId);
|
|
1221
|
-
}, ctx.log, account.accountId);
|
|
1222
|
-
}
|
|
1223
|
-
/** Best-effort delivery for error text back to the user. */
|
|
1224
|
-
async function sendErrorToTarget(ctx, errorText) {
|
|
1225
|
-
try {
|
|
1226
|
-
await sendTextToTarget(ctx, errorText);
|
|
1227
|
-
} catch (sendErr) {
|
|
1228
|
-
ctx.log?.error(`[qqbot:${ctx.account.accountId}] Failed to send error message: ${sendErr}`);
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
/**
|
|
1232
|
-
* Handle a structured payload prefixed with `QQBOT_PAYLOAD:`.
|
|
1233
|
-
* Returns true when the reply was handled here, otherwise false.
|
|
1234
|
-
*/
|
|
1235
|
-
async function handleStructuredPayload(ctx, replyText, recordActivity) {
|
|
1236
|
-
const { target, account, cfg, log } = ctx;
|
|
1237
|
-
const payloadResult = parseQQBotPayload(replyText);
|
|
1238
|
-
if (!payloadResult.isPayload) return false;
|
|
1239
|
-
if (payloadResult.error) {
|
|
1240
|
-
log?.error(`[qqbot:${account.accountId}] Payload parse error: ${payloadResult.error}`);
|
|
1241
|
-
return true;
|
|
1242
|
-
}
|
|
1243
|
-
if (!payloadResult.payload) return true;
|
|
1244
|
-
const parsedPayload = payloadResult.payload;
|
|
1245
|
-
log?.info(`[qqbot:${account.accountId}] Detected structured payload, type: ${parsedPayload.type}`);
|
|
1246
|
-
if (isCronReminderPayload(parsedPayload)) {
|
|
1247
|
-
log?.info(`[qqbot:${account.accountId}] Processing cron_reminder payload`);
|
|
1248
|
-
const cronMessage = encodePayloadForCron(parsedPayload);
|
|
1249
|
-
const confirmText = `⏰ Reminder scheduled. It will be sent at the configured time: "${parsedPayload.content}"`;
|
|
1250
|
-
try {
|
|
1251
|
-
await sendTextToTarget(ctx, confirmText);
|
|
1252
|
-
log?.info(`[qqbot:${account.accountId}] Cron reminder confirmation sent, cronMessage: ${cronMessage}`);
|
|
1253
|
-
} catch (err) {
|
|
1254
|
-
log?.error(`[qqbot:${account.accountId}] Failed to send cron confirmation: ${err}`);
|
|
1255
|
-
}
|
|
1256
|
-
recordActivity();
|
|
1257
|
-
return true;
|
|
1258
|
-
}
|
|
1259
|
-
if (isMediaPayload(parsedPayload)) {
|
|
1260
|
-
log?.info(`[qqbot:${account.accountId}] Processing media payload, mediaType: ${parsedPayload.mediaType}`);
|
|
1261
|
-
if (parsedPayload.mediaType === "image") await handleImagePayload(ctx, parsedPayload);
|
|
1262
|
-
else if (parsedPayload.mediaType === "audio") await handleAudioPayload(ctx, parsedPayload);
|
|
1263
|
-
else if (parsedPayload.mediaType === "video") await handleVideoPayload(ctx, parsedPayload);
|
|
1264
|
-
else if (parsedPayload.mediaType === "file") await handleFilePayload(ctx, parsedPayload);
|
|
1265
|
-
else log?.error(`[qqbot:${account.accountId}] Unknown media type: ${parsedPayload.mediaType}`);
|
|
1266
|
-
recordActivity();
|
|
1267
|
-
return true;
|
|
1268
|
-
}
|
|
1269
|
-
log?.error(`[qqbot:${account.accountId}] Unknown payload type: ${parsedPayload.type}`);
|
|
1270
|
-
return true;
|
|
1271
|
-
}
|
|
1272
|
-
function validateStructuredPayloadLocalPath(ctx, payloadPath, mediaType) {
|
|
1273
|
-
const allowedPath = resolveQQBotPayloadLocalFilePath(payloadPath);
|
|
1274
|
-
if (allowedPath) return allowedPath;
|
|
1275
|
-
ctx.log?.error(`[qqbot:${ctx.account.accountId}] Blocked ${mediaType} payload local path outside QQ Bot media storage`);
|
|
1276
|
-
return null;
|
|
1277
|
-
}
|
|
1278
|
-
function isRemoteHttpUrl(p) {
|
|
1279
|
-
return p.startsWith("http://") || p.startsWith("https://");
|
|
1280
|
-
}
|
|
1281
|
-
function isInlineImageDataUrl(p) {
|
|
1282
|
-
return /^data:image\/[^;]+;base64,/i.test(p);
|
|
1283
|
-
}
|
|
1284
|
-
function sanitizeForLog(value, maxLen = 200) {
|
|
1285
|
-
return value.replace(/[\r\n\t\0]/g, " ").slice(0, maxLen);
|
|
1286
|
-
}
|
|
1287
|
-
function describeMediaTargetForLog(pathValue, isHttpUrl) {
|
|
1288
|
-
if (!isHttpUrl) return "<local-file>";
|
|
1289
|
-
try {
|
|
1290
|
-
const url = new URL(pathValue);
|
|
1291
|
-
url.username = "";
|
|
1292
|
-
url.password = "";
|
|
1293
|
-
const urlId = crypto.createHash("sha256").update(url.toString()).digest("hex").slice(0, 12);
|
|
1294
|
-
return sanitizeForLog(`${url.protocol}//${url.host}#${urlId}`);
|
|
1295
|
-
} catch {
|
|
1296
|
-
return "<invalid-url>";
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
async function readStructuredPayloadLocalFile(filePath) {
|
|
1300
|
-
const openFlags = fsSync.constants.O_RDONLY | ("O_NOFOLLOW" in fsSync.constants ? fsSync.constants.O_NOFOLLOW : 0);
|
|
1301
|
-
const handle = await fsSync.promises.open(filePath, openFlags);
|
|
1302
|
-
try {
|
|
1303
|
-
const stat = await handle.stat();
|
|
1304
|
-
if (!stat.isFile()) throw new Error("Path is not a regular file");
|
|
1305
|
-
if (stat.size > 20971520) throw new Error(`File is too large (${formatFileSize(stat.size)}); QQ Bot API limit is ${formatFileSize(MAX_UPLOAD_SIZE)}`);
|
|
1306
|
-
return handle.readFile();
|
|
1307
|
-
} finally {
|
|
1308
|
-
await handle.close();
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
async function handleImagePayload(ctx, payload) {
|
|
1312
|
-
const { target, account, log } = ctx;
|
|
1313
|
-
const normalizedPath = normalizePath(payload.path);
|
|
1314
|
-
let imageUrl;
|
|
1315
|
-
if (payload.source === "file") imageUrl = validateStructuredPayloadLocalPath(ctx, normalizedPath, "image");
|
|
1316
|
-
else if (isRemoteHttpUrl(normalizedPath) || isInlineImageDataUrl(normalizedPath)) imageUrl = normalizedPath;
|
|
1317
|
-
else {
|
|
1318
|
-
log?.error(`[qqbot:${account.accountId}] Image payload URL must use http(s) or data:image/: ${sanitizeForLog(payload.path)}`);
|
|
1319
|
-
return;
|
|
1320
|
-
}
|
|
1321
|
-
if (!imageUrl) return;
|
|
1322
|
-
const originalImagePath = payload.source === "file" ? imageUrl : void 0;
|
|
1323
|
-
if (payload.source === "file") try {
|
|
1324
|
-
const fileBuffer = await readStructuredPayloadLocalFile(imageUrl);
|
|
1325
|
-
const base64Data = fileBuffer.toString("base64");
|
|
1326
|
-
const ext = path.extname(imageUrl).toLowerCase();
|
|
1327
|
-
const mimeType = {
|
|
1328
|
-
".jpg": "image/jpeg",
|
|
1329
|
-
".jpeg": "image/jpeg",
|
|
1330
|
-
".png": "image/png",
|
|
1331
|
-
".gif": "image/gif",
|
|
1332
|
-
".webp": "image/webp",
|
|
1333
|
-
".bmp": "image/bmp"
|
|
1334
|
-
}[ext];
|
|
1335
|
-
if (!mimeType) {
|
|
1336
|
-
log?.error(`[qqbot:${account.accountId}] Unsupported image format: ${ext}`);
|
|
1337
|
-
return;
|
|
1338
|
-
}
|
|
1339
|
-
imageUrl = `data:${mimeType};base64,${base64Data}`;
|
|
1340
|
-
log?.info(`[qqbot:${account.accountId}] Converted local image to Base64 (size: ${formatFileSize(fileBuffer.length)})`);
|
|
1341
|
-
} catch (readErr) {
|
|
1342
|
-
log?.error(`[qqbot:${account.accountId}] Failed to read local image: ${readErr}`);
|
|
1343
|
-
return;
|
|
1344
|
-
}
|
|
1345
|
-
try {
|
|
1346
|
-
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1347
|
-
if (target.type === "c2c") await sendC2CImageMessage(account.appId, token, target.senderId, imageUrl, target.messageId, void 0, originalImagePath);
|
|
1348
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupImageMessage(account.appId, token, target.groupOpenid, imageUrl, target.messageId);
|
|
1349
|
-
else if (target.type === "dm" && target.guildId) await sendDmMessage(token, target.guildId, ``, target.messageId);
|
|
1350
|
-
else if (target.channelId) await sendChannelMessage(token, target.channelId, ``, target.messageId);
|
|
1351
|
-
}, log, account.accountId);
|
|
1352
|
-
log?.info(`[qqbot:${account.accountId}] Sent image via media payload`);
|
|
1353
|
-
if (payload.caption) await sendTextToTarget(ctx, payload.caption);
|
|
1354
|
-
} catch (err) {
|
|
1355
|
-
log?.error(`[qqbot:${account.accountId}] Failed to send image: ${err}`);
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
async function handleAudioPayload(ctx, payload) {
|
|
1359
|
-
const { target, account, cfg, log } = ctx;
|
|
1360
|
-
try {
|
|
1361
|
-
const ttsText = payload.caption || payload.path;
|
|
1362
|
-
if (!ttsText?.trim()) {
|
|
1363
|
-
log?.error(`[qqbot:${account.accountId}] Voice missing text`);
|
|
1364
|
-
return;
|
|
1365
|
-
}
|
|
1366
|
-
let silkBase64;
|
|
1367
|
-
let silkPath;
|
|
1368
|
-
let duration;
|
|
1369
|
-
let providerLabel;
|
|
1370
|
-
const ttsCfg = resolveTTSConfig(cfg);
|
|
1371
|
-
if (ttsCfg) {
|
|
1372
|
-
log?.info(`[qqbot:${account.accountId}] TTS (plugin): "${ttsText.slice(0, 50)}..." via ${ttsCfg.model}`);
|
|
1373
|
-
const result = await textToSilk(ttsText, ttsCfg, getQQBotDataDir("tts"));
|
|
1374
|
-
silkBase64 = result.silkBase64;
|
|
1375
|
-
silkPath = result.silkPath;
|
|
1376
|
-
duration = result.duration;
|
|
1377
|
-
providerLabel = ttsCfg.model;
|
|
1378
|
-
} else {
|
|
1379
|
-
if (!isGlobalTTSAvailable(cfg)) {
|
|
1380
|
-
log?.error(`[qqbot:${account.accountId}] TTS not configured (neither plugin channels.qqbot.tts nor global messages.tts)`);
|
|
1381
|
-
return;
|
|
1382
|
-
}
|
|
1383
|
-
log?.info(`[qqbot:${account.accountId}] TTS (global fallback): "${ttsText.slice(0, 50)}..."`);
|
|
1384
|
-
const globalResult = await textToSpeech({
|
|
1385
|
-
text: ttsText,
|
|
1386
|
-
cfg,
|
|
1387
|
-
channel: "qqbot"
|
|
1388
|
-
});
|
|
1389
|
-
if (!globalResult.success || !globalResult.audioPath) {
|
|
1390
|
-
log?.error(`[qqbot:${account.accountId}] Global TTS failed: ${globalResult.error ?? "unknown"}`);
|
|
1391
|
-
return;
|
|
1392
|
-
}
|
|
1393
|
-
log?.info(`[qqbot:${account.accountId}] Global TTS returned: provider=${globalResult.provider}, format=${globalResult.outputFormat}, path=${globalResult.audioPath}`);
|
|
1394
|
-
providerLabel = globalResult.provider ?? "global";
|
|
1395
|
-
const base64 = await audioFileToSilkBase64(globalResult.audioPath);
|
|
1396
|
-
if (!base64) {
|
|
1397
|
-
log?.error(`[qqbot:${account.accountId}] Failed to convert global TTS audio to SILK`);
|
|
1398
|
-
return;
|
|
1399
|
-
}
|
|
1400
|
-
silkBase64 = base64;
|
|
1401
|
-
silkPath = globalResult.audioPath;
|
|
1402
|
-
duration = 0;
|
|
1403
|
-
}
|
|
1404
|
-
if (!silkBase64) {
|
|
1405
|
-
log?.error(`[qqbot:${account.accountId}] TTS produced no audio output`);
|
|
1406
|
-
return;
|
|
1407
|
-
}
|
|
1408
|
-
log?.info(`[qqbot:${account.accountId}] TTS done (${providerLabel}): ${duration ? formatDuration(duration) : "N/A"}, file: ${silkPath ?? "N/A"}`);
|
|
1409
|
-
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1410
|
-
if (target.type === "c2c") await sendC2CVoiceMessage(account.appId, token, target.senderId, silkBase64, void 0, target.messageId, ttsText, silkPath);
|
|
1411
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupVoiceMessage(account.appId, token, target.groupOpenid, silkBase64, void 0, target.messageId);
|
|
1412
|
-
else if (target.type === "dm" && target.guildId) {
|
|
1413
|
-
log?.error(`[qqbot:${account.accountId}] Voice not supported in DM, sending text fallback`);
|
|
1414
|
-
await sendDmMessage(token, target.guildId, ttsText, target.messageId);
|
|
1415
|
-
} else if (target.channelId) {
|
|
1416
|
-
log?.error(`[qqbot:${account.accountId}] Voice not supported in channel, sending text fallback`);
|
|
1417
|
-
await sendChannelMessage(token, target.channelId, ttsText, target.messageId);
|
|
1418
|
-
}
|
|
1419
|
-
}, log, account.accountId);
|
|
1420
|
-
log?.info(`[qqbot:${account.accountId}] Voice message sent`);
|
|
1421
|
-
} catch (err) {
|
|
1422
|
-
log?.error(`[qqbot:${account.accountId}] TTS/voice send failed: ${err}`);
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
async function handleVideoPayload(ctx, payload) {
|
|
1426
|
-
const { target, account, log } = ctx;
|
|
1427
|
-
try {
|
|
1428
|
-
const originalPath = payload.path ?? "";
|
|
1429
|
-
const normalizedPath = normalizePath(originalPath);
|
|
1430
|
-
const isHttpUrl = isRemoteHttpUrl(normalizedPath);
|
|
1431
|
-
const videoPath = isHttpUrl ? normalizedPath : validateStructuredPayloadLocalPath(ctx, originalPath, "video");
|
|
1432
|
-
if (!videoPath) return;
|
|
1433
|
-
if (!videoPath.trim()) {
|
|
1434
|
-
log?.error(`[qqbot:${account.accountId}] Video missing path`);
|
|
1435
|
-
return;
|
|
1436
|
-
}
|
|
1437
|
-
log?.info(`[qqbot:${account.accountId}] Video send: ${describeMediaTargetForLog(videoPath, isHttpUrl)}`);
|
|
1438
|
-
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1439
|
-
if (isHttpUrl) {
|
|
1440
|
-
if (target.type === "c2c") await sendC2CVideoMessage(account.appId, token, target.senderId, videoPath, void 0, target.messageId);
|
|
1441
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupVideoMessage(account.appId, token, target.groupOpenid, videoPath, void 0, target.messageId);
|
|
1442
|
-
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] Video not supported in DM`);
|
|
1443
|
-
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] Video not supported in channel`);
|
|
1444
|
-
} else {
|
|
1445
|
-
const fileBuffer = await readStructuredPayloadLocalFile(videoPath);
|
|
1446
|
-
const videoBase64 = fileBuffer.toString("base64");
|
|
1447
|
-
log?.info(`[qqbot:${account.accountId}] Read local video (${formatFileSize(fileBuffer.length)}): ${describeMediaTargetForLog(videoPath, false)}`);
|
|
1448
|
-
if (target.type === "c2c") await sendC2CVideoMessage(account.appId, token, target.senderId, void 0, videoBase64, target.messageId, void 0, videoPath);
|
|
1449
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupVideoMessage(account.appId, token, target.groupOpenid, void 0, videoBase64, target.messageId);
|
|
1450
|
-
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] Video not supported in DM`);
|
|
1451
|
-
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] Video not supported in channel`);
|
|
1452
|
-
}
|
|
1453
|
-
}, log, account.accountId);
|
|
1454
|
-
log?.info(`[qqbot:${account.accountId}] Video message sent`);
|
|
1455
|
-
if (payload.caption) await sendTextToTarget(ctx, payload.caption);
|
|
1456
|
-
} catch (err) {
|
|
1457
|
-
log?.error(`[qqbot:${account.accountId}] Video send failed: ${err}`);
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
async function handleFilePayload(ctx, payload) {
|
|
1461
|
-
const { target, account, log } = ctx;
|
|
1462
|
-
try {
|
|
1463
|
-
const originalPath = payload.path ?? "";
|
|
1464
|
-
const normalizedPath = normalizePath(originalPath);
|
|
1465
|
-
const isHttpUrl = isRemoteHttpUrl(normalizedPath);
|
|
1466
|
-
const filePath = isHttpUrl ? normalizedPath : validateStructuredPayloadLocalPath(ctx, originalPath, "file");
|
|
1467
|
-
if (!filePath) return;
|
|
1468
|
-
if (!filePath.trim()) {
|
|
1469
|
-
log?.error(`[qqbot:${account.accountId}] File missing path`);
|
|
1470
|
-
return;
|
|
1471
|
-
}
|
|
1472
|
-
const fileName = sanitizeFileName(path.basename(filePath));
|
|
1473
|
-
log?.info(`[qqbot:${account.accountId}] File send: ${describeMediaTargetForLog(filePath, isHttpUrl)} (${isHttpUrl ? "URL" : "local"})`);
|
|
1474
|
-
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1475
|
-
if (isHttpUrl) {
|
|
1476
|
-
if (target.type === "c2c") await sendC2CFileMessage(account.appId, token, target.senderId, void 0, filePath, target.messageId, fileName);
|
|
1477
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupFileMessage(account.appId, token, target.groupOpenid, void 0, filePath, target.messageId, fileName);
|
|
1478
|
-
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] File not supported in DM`);
|
|
1479
|
-
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] File not supported in channel`);
|
|
1480
|
-
} else {
|
|
1481
|
-
const fileBase64 = (await readStructuredPayloadLocalFile(filePath)).toString("base64");
|
|
1482
|
-
if (target.type === "c2c") await sendC2CFileMessage(account.appId, token, target.senderId, fileBase64, void 0, target.messageId, fileName, filePath);
|
|
1483
|
-
else if (target.type === "group" && target.groupOpenid) await sendGroupFileMessage(account.appId, token, target.groupOpenid, fileBase64, void 0, target.messageId, fileName);
|
|
1484
|
-
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] File not supported in DM`);
|
|
1485
|
-
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] File not supported in channel`);
|
|
1486
|
-
}
|
|
1487
|
-
}, log, account.accountId);
|
|
1488
|
-
log?.info(`[qqbot:${account.accountId}] File message sent`);
|
|
1489
|
-
} catch (err) {
|
|
1490
|
-
log?.error(`[qqbot:${account.accountId}] File send failed: ${err}`);
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
//#endregion
|
|
1494
|
-
//#region extensions/qqbot/src/session-store.ts
|
|
1495
|
-
const SESSION_DIR = getQQBotDataDir("sessions");
|
|
1496
|
-
const SESSION_EXPIRE_TIME = 300 * 1e3;
|
|
1497
|
-
const SAVE_THROTTLE_MS = 1e3;
|
|
1498
|
-
const throttleState = /* @__PURE__ */ new Map();
|
|
1499
|
-
/** Ensure the session directory exists. */
|
|
1500
|
-
function ensureDir() {
|
|
1501
|
-
if (!fsSync.existsSync(SESSION_DIR)) fsSync.mkdirSync(SESSION_DIR, { recursive: true });
|
|
1502
|
-
}
|
|
1503
|
-
/** Return the session file path for one account. */
|
|
1504
|
-
function getSessionPath(accountId) {
|
|
1505
|
-
const safeId = accountId.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
1506
|
-
return path.join(SESSION_DIR, `session-${safeId}.json`);
|
|
1507
|
-
}
|
|
1508
|
-
/** Load a saved session, rejecting expired or mismatched appId entries. */
|
|
1509
|
-
function loadSession(accountId, expectedAppId) {
|
|
1510
|
-
const filePath = getSessionPath(accountId);
|
|
1511
|
-
try {
|
|
1512
|
-
if (!fsSync.existsSync(filePath)) return null;
|
|
1513
|
-
const data = fsSync.readFileSync(filePath, "utf-8");
|
|
1514
|
-
const state = JSON.parse(data);
|
|
1515
|
-
const now = Date.now();
|
|
1516
|
-
if (now - state.savedAt > SESSION_EXPIRE_TIME) {
|
|
1517
|
-
debugLog(`[session-store] Session expired for ${accountId}, age: ${Math.round((now - state.savedAt) / 1e3)}s`);
|
|
1518
|
-
try {
|
|
1519
|
-
fsSync.unlinkSync(filePath);
|
|
1520
|
-
} catch {}
|
|
1521
|
-
return null;
|
|
1522
|
-
}
|
|
1523
|
-
if (expectedAppId && state.appId && state.appId !== expectedAppId) {
|
|
1524
|
-
debugLog(`[session-store] appId mismatch for ${accountId}: saved=${state.appId}, current=${expectedAppId}. Discarding stale session.`);
|
|
1525
|
-
try {
|
|
1526
|
-
fsSync.unlinkSync(filePath);
|
|
1527
|
-
} catch {}
|
|
1528
|
-
return null;
|
|
1529
|
-
}
|
|
1530
|
-
if (!state.sessionId || state.lastSeq === null || state.lastSeq === void 0) {
|
|
1531
|
-
debugLog(`[session-store] Invalid session data for ${accountId}`);
|
|
1532
|
-
return null;
|
|
1533
|
-
}
|
|
1534
|
-
debugLog(`[session-store] Loaded session for ${accountId}: sessionId=${state.sessionId}, lastSeq=${state.lastSeq}, appId=${state.appId ?? "unknown"}, age=${Math.round((now - state.savedAt) / 1e3)}s`);
|
|
1535
|
-
return state;
|
|
1536
|
-
} catch (err) {
|
|
1537
|
-
debugError(`[session-store] Failed to load session for ${accountId}: ${err}`);
|
|
1538
|
-
return null;
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
/** Save session state with throttling. */
|
|
1542
|
-
function saveSession(state) {
|
|
1543
|
-
const { accountId } = state;
|
|
1544
|
-
let throttle = throttleState.get(accountId);
|
|
1545
|
-
if (!throttle) {
|
|
1546
|
-
throttle = {
|
|
1547
|
-
pendingState: null,
|
|
1548
|
-
lastSaveTime: 0,
|
|
1549
|
-
throttleTimer: null
|
|
1550
|
-
};
|
|
1551
|
-
throttleState.set(accountId, throttle);
|
|
1552
|
-
}
|
|
1553
|
-
const now = Date.now();
|
|
1554
|
-
const timeSinceLastSave = now - throttle.lastSaveTime;
|
|
1555
|
-
if (timeSinceLastSave >= SAVE_THROTTLE_MS) {
|
|
1556
|
-
doSaveSession(state);
|
|
1557
|
-
throttle.lastSaveTime = now;
|
|
1558
|
-
throttle.pendingState = null;
|
|
1559
|
-
if (throttle.throttleTimer) {
|
|
1560
|
-
clearTimeout(throttle.throttleTimer);
|
|
1561
|
-
throttle.throttleTimer = null;
|
|
1562
|
-
}
|
|
1563
|
-
} else {
|
|
1564
|
-
throttle.pendingState = state;
|
|
1565
|
-
if (!throttle.throttleTimer) {
|
|
1566
|
-
const delay = SAVE_THROTTLE_MS - timeSinceLastSave;
|
|
1567
|
-
throttle.throttleTimer = setTimeout(() => {
|
|
1568
|
-
const t = throttleState.get(accountId);
|
|
1569
|
-
if (t && t.pendingState) {
|
|
1570
|
-
doSaveSession(t.pendingState);
|
|
1571
|
-
t.lastSaveTime = Date.now();
|
|
1572
|
-
t.pendingState = null;
|
|
1573
|
-
}
|
|
1574
|
-
if (t) t.throttleTimer = null;
|
|
1575
|
-
}, delay);
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
/** Write one session file to disk immediately. */
|
|
1580
|
-
function doSaveSession(state) {
|
|
1581
|
-
const filePath = getSessionPath(state.accountId);
|
|
1582
|
-
try {
|
|
1583
|
-
ensureDir();
|
|
1584
|
-
const stateToSave = {
|
|
1585
|
-
...state,
|
|
1586
|
-
savedAt: Date.now()
|
|
1587
|
-
};
|
|
1588
|
-
fsSync.writeFileSync(filePath, JSON.stringify(stateToSave, null, 2), "utf-8");
|
|
1589
|
-
debugLog(`[session-store] Saved session for ${state.accountId}: sessionId=${state.sessionId}, lastSeq=${state.lastSeq}`);
|
|
1590
|
-
} catch (err) {
|
|
1591
|
-
debugError(`[session-store] Failed to save session for ${state.accountId}: ${err}`);
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
/** Clear a saved session and any pending throttle state. */
|
|
1595
|
-
function clearSession(accountId) {
|
|
1596
|
-
const filePath = getSessionPath(accountId);
|
|
1597
|
-
const throttle = throttleState.get(accountId);
|
|
1598
|
-
if (throttle) {
|
|
1599
|
-
if (throttle.throttleTimer) clearTimeout(throttle.throttleTimer);
|
|
1600
|
-
throttleState.delete(accountId);
|
|
1601
|
-
}
|
|
1602
|
-
try {
|
|
1603
|
-
if (fsSync.existsSync(filePath)) {
|
|
1604
|
-
fsSync.unlinkSync(filePath);
|
|
1605
|
-
debugLog(`[session-store] Cleared session for ${accountId}`);
|
|
1606
|
-
}
|
|
1607
|
-
} catch (err) {
|
|
1608
|
-
debugError(`[session-store] Failed to clear session for ${accountId}: ${err}`);
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
//#endregion
|
|
1612
|
-
//#region extensions/qqbot/src/typing-keepalive.ts
|
|
1613
|
-
/** Periodically refresh C2C typing state while a response is still in progress. */
|
|
1614
|
-
const TYPING_INTERVAL_MS = 5e4;
|
|
1615
|
-
var TypingKeepAlive = class {
|
|
1616
|
-
constructor(getToken, clearCache, openid, msgId, log, logPrefix = "[qqbot]") {
|
|
1617
|
-
this.getToken = getToken;
|
|
1618
|
-
this.clearCache = clearCache;
|
|
1619
|
-
this.openid = openid;
|
|
1620
|
-
this.msgId = msgId;
|
|
1621
|
-
this.log = log;
|
|
1622
|
-
this.logPrefix = logPrefix;
|
|
1623
|
-
this.timer = null;
|
|
1624
|
-
this.stopped = false;
|
|
1625
|
-
}
|
|
1626
|
-
/** Start periodic keep-alive sends. */
|
|
1627
|
-
start() {
|
|
1628
|
-
if (this.stopped) return;
|
|
1629
|
-
this.timer = setInterval(() => {
|
|
1630
|
-
if (this.stopped) {
|
|
1631
|
-
this.stop();
|
|
1632
|
-
return;
|
|
1633
|
-
}
|
|
1634
|
-
this.send().catch(() => {});
|
|
1635
|
-
}, TYPING_INTERVAL_MS);
|
|
1636
|
-
}
|
|
1637
|
-
/** Stop periodic keep-alive sends. */
|
|
1638
|
-
stop() {
|
|
1639
|
-
this.stopped = true;
|
|
1640
|
-
if (this.timer) {
|
|
1641
|
-
clearInterval(this.timer);
|
|
1642
|
-
this.timer = null;
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
async send() {
|
|
1646
|
-
try {
|
|
1647
|
-
await sendC2CInputNotify(await this.getToken(), this.openid, this.msgId, 60);
|
|
1648
|
-
this.log?.debug?.(`${this.logPrefix} Typing keep-alive sent to ${this.openid}`);
|
|
1649
|
-
} catch (err) {
|
|
1650
|
-
try {
|
|
1651
|
-
this.clearCache();
|
|
1652
|
-
await sendC2CInputNotify(await this.getToken(), this.openid, this.msgId, 60);
|
|
1653
|
-
} catch {
|
|
1654
|
-
this.log?.debug?.(`${this.logPrefix} Typing keep-alive failed for ${this.openid}: ${err}`);
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
};
|
|
1659
|
-
//#endregion
|
|
1660
|
-
//#region extensions/qqbot/src/gateway.ts
|
|
1661
|
-
const INTENTS = {
|
|
1662
|
-
GUILDS: 1,
|
|
1663
|
-
GUILD_MEMBERS: 2,
|
|
1664
|
-
PUBLIC_GUILD_MESSAGES: 1 << 30,
|
|
1665
|
-
DIRECT_MESSAGE: 4096,
|
|
1666
|
-
GROUP_AND_C2C: 1 << 25
|
|
1667
|
-
};
|
|
1668
|
-
const FULL_INTENTS = INTENTS.PUBLIC_GUILD_MESSAGES | INTENTS.DIRECT_MESSAGE | INTENTS.GROUP_AND_C2C;
|
|
1669
|
-
const FULL_INTENTS_DESC = "groups + DMs + channels";
|
|
1670
|
-
const RECONNECT_DELAYS = [
|
|
1671
|
-
1e3,
|
|
1672
|
-
2e3,
|
|
1673
|
-
5e3,
|
|
1674
|
-
1e4,
|
|
1675
|
-
3e4,
|
|
1676
|
-
6e4
|
|
1677
|
-
];
|
|
1678
|
-
const RATE_LIMIT_DELAY = 6e4;
|
|
1679
|
-
const MAX_RECONNECT_ATTEMPTS = 100;
|
|
1680
|
-
const MAX_QUICK_DISCONNECT_COUNT = 3;
|
|
1681
|
-
const QUICK_DISCONNECT_THRESHOLD = 5e3;
|
|
1682
|
-
/**
|
|
1683
|
-
* Start the Gateway WebSocket connection with automatic reconnect support.
|
|
1684
|
-
*/
|
|
1685
|
-
async function startGateway(ctx) {
|
|
1686
|
-
const { account, abortSignal, cfg, onReady, onError, log } = ctx;
|
|
1687
|
-
if (!account.appId || !account.clientSecret) throw new Error("QQBot not configured (missing appId or clientSecret)");
|
|
1688
|
-
const diag = await runDiagnostics();
|
|
1689
|
-
if (diag.warnings.length > 0) for (const w of diag.warnings) log?.info(`[qqbot:${account.accountId}] ${w}`);
|
|
1690
|
-
initApiConfig(account.appId, { markdownSupport: account.markdownSupport });
|
|
1691
|
-
log?.info(`[qqbot:${account.accountId}] API config: markdownSupport=${account.markdownSupport === true}`);
|
|
1692
|
-
onMessageSent(account.appId, (refIdx, meta) => {
|
|
1693
|
-
log?.info(`[qqbot:${account.accountId}] onMessageSent called: refIdx=${refIdx}, mediaType=${meta.mediaType}, ttsText=${meta.ttsText?.slice(0, 30)}`);
|
|
1694
|
-
const attachments = [];
|
|
1695
|
-
if (meta.mediaType) {
|
|
1696
|
-
const localPath = meta.mediaLocalPath;
|
|
1697
|
-
const filename = localPath ? path.basename(localPath) : void 0;
|
|
1698
|
-
const attachment = {
|
|
1699
|
-
type: meta.mediaType,
|
|
1700
|
-
...localPath ? { localPath } : {},
|
|
1701
|
-
...filename ? { filename } : {},
|
|
1702
|
-
...meta.mediaUrl ? { url: meta.mediaUrl } : {}
|
|
1703
|
-
};
|
|
1704
|
-
if (meta.mediaType === "voice" && meta.ttsText) {
|
|
1705
|
-
attachment.transcript = meta.ttsText;
|
|
1706
|
-
attachment.transcriptSource = "tts";
|
|
1707
|
-
log?.info(`[qqbot:${account.accountId}] Saving voice transcript (TTS): ${meta.ttsText.slice(0, 50)}`);
|
|
1708
|
-
}
|
|
1709
|
-
attachments.push(attachment);
|
|
1710
|
-
}
|
|
1711
|
-
setRefIndex(refIdx, {
|
|
1712
|
-
content: meta.text ?? "",
|
|
1713
|
-
senderId: account.accountId,
|
|
1714
|
-
senderName: account.accountId,
|
|
1715
|
-
timestamp: Date.now(),
|
|
1716
|
-
isBot: true,
|
|
1717
|
-
...attachments.length > 0 ? { attachments } : {}
|
|
1718
|
-
});
|
|
1719
|
-
log?.info(`[qqbot:${account.accountId}] Cached outbound refIdx: ${refIdx}, attachments=${JSON.stringify(attachments)}`);
|
|
1720
|
-
});
|
|
1721
|
-
const ttsCfg = resolveTTSConfig(cfg);
|
|
1722
|
-
if (ttsCfg) {
|
|
1723
|
-
const maskedKey = ttsCfg.apiKey.length > 8 ? `${ttsCfg.apiKey.slice(0, 4)}****${ttsCfg.apiKey.slice(-4)}` : "****";
|
|
1724
|
-
log?.info(`[qqbot:${account.accountId}] TTS configured (plugin): model=${ttsCfg.model}, voice=${ttsCfg.voice}, authStyle=${ttsCfg.authStyle ?? "bearer"}, baseUrl=${ttsCfg.baseUrl}`);
|
|
1725
|
-
log?.info(`[qqbot:${account.accountId}] TTS apiKey: ${maskedKey}${ttsCfg.queryParams ? `, queryParams=${JSON.stringify(ttsCfg.queryParams)}` : ""}${ttsCfg.speed !== void 0 ? `, speed=${ttsCfg.speed}` : ""}`);
|
|
1726
|
-
} else if (isGlobalTTSAvailable(cfg)) {
|
|
1727
|
-
const globalProvider = cfg.messages?.tts?.provider ?? "auto";
|
|
1728
|
-
log?.info(`[qqbot:${account.accountId}] TTS configured (global fallback): provider=${globalProvider}`);
|
|
1729
|
-
} else log?.info(`[qqbot:${account.accountId}] TTS not configured (voice messages will be unavailable)`);
|
|
1730
|
-
let reconnectAttempts = 0;
|
|
1731
|
-
let isAborted = false;
|
|
1732
|
-
let currentWs = null;
|
|
1733
|
-
let heartbeatInterval = null;
|
|
1734
|
-
let sessionId = null;
|
|
1735
|
-
let lastSeq = null;
|
|
1736
|
-
let lastConnectTime = 0;
|
|
1737
|
-
let quickDisconnectCount = 0;
|
|
1738
|
-
let isConnecting = false;
|
|
1739
|
-
let reconnectTimer = null;
|
|
1740
|
-
let shouldRefreshToken = false;
|
|
1741
|
-
const savedSession = loadSession(account.accountId, account.appId);
|
|
1742
|
-
if (savedSession) {
|
|
1743
|
-
sessionId = savedSession.sessionId;
|
|
1744
|
-
lastSeq = savedSession.lastSeq;
|
|
1745
|
-
log?.info(`[qqbot:${account.accountId}] Restored session from storage: sessionId=${sessionId}, lastSeq=${lastSeq}`);
|
|
1746
|
-
}
|
|
1747
|
-
const msgQueue = createMessageQueue({
|
|
1748
|
-
accountId: account.accountId,
|
|
1749
|
-
log,
|
|
1750
|
-
isAborted: () => isAborted
|
|
1751
|
-
});
|
|
1752
|
-
const URGENT_COMMANDS = ["/stop"];
|
|
1753
|
-
const trySlashCommandOrEnqueue = async (msg) => {
|
|
1754
|
-
const content = (msg.content ?? "").trim();
|
|
1755
|
-
if (!content.startsWith("/")) {
|
|
1756
|
-
msgQueue.enqueue(msg);
|
|
1757
|
-
return;
|
|
1758
|
-
}
|
|
1759
|
-
const contentLower = content.toLowerCase();
|
|
1760
|
-
if (URGENT_COMMANDS.some((cmd) => contentLower === cmd.toLowerCase() || contentLower.startsWith(cmd.toLowerCase() + " "))) {
|
|
1761
|
-
log?.info(`[qqbot:${account.accountId}] Urgent command detected: ${content.slice(0, 20)}, executing immediately`);
|
|
1762
|
-
const peerId = msgQueue.getMessagePeerId(msg);
|
|
1763
|
-
const droppedCount = msgQueue.clearUserQueue(peerId);
|
|
1764
|
-
if (droppedCount > 0) log?.info(`[qqbot:${account.accountId}] Dropped ${droppedCount} queued messages for ${peerId} due to urgent command`);
|
|
1765
|
-
msgQueue.executeImmediate(msg);
|
|
1766
|
-
return;
|
|
1767
|
-
}
|
|
1768
|
-
const receivedAt = Date.now();
|
|
1769
|
-
const peerId = msgQueue.getMessagePeerId(msg);
|
|
1770
|
-
const cmdCtx = {
|
|
1771
|
-
type: msg.type,
|
|
1772
|
-
senderId: msg.senderId,
|
|
1773
|
-
senderName: msg.senderName,
|
|
1774
|
-
messageId: msg.messageId,
|
|
1775
|
-
eventTimestamp: msg.timestamp,
|
|
1776
|
-
receivedAt,
|
|
1777
|
-
rawContent: content,
|
|
1778
|
-
args: "",
|
|
1779
|
-
channelId: msg.channelId,
|
|
1780
|
-
groupOpenid: msg.groupOpenid,
|
|
1781
|
-
accountId: account.accountId,
|
|
1782
|
-
appId: account.appId,
|
|
1783
|
-
accountConfig: account.config,
|
|
1784
|
-
commandAuthorized: true,
|
|
1785
|
-
queueSnapshot: msgQueue.getSnapshot(peerId)
|
|
1786
|
-
};
|
|
1787
|
-
try {
|
|
1788
|
-
const reply = await matchSlashCommand(cmdCtx);
|
|
1789
|
-
if (reply === null) {
|
|
1790
|
-
msgQueue.enqueue(msg);
|
|
1791
|
-
return;
|
|
1792
|
-
}
|
|
1793
|
-
log?.info(`[qqbot:${account.accountId}] Slash command matched: ${content}, replying directly`);
|
|
1794
|
-
const token = await getAccessToken(account.appId, account.clientSecret);
|
|
1795
|
-
const isFileResult = typeof reply === "object" && reply !== null && "filePath" in reply;
|
|
1796
|
-
const replyText = isFileResult ? reply.text : reply;
|
|
1797
|
-
const replyFile = isFileResult ? reply.filePath : null;
|
|
1798
|
-
if (msg.type === "c2c") await sendC2CMessage(account.appId, token, msg.senderId, replyText, msg.messageId);
|
|
1799
|
-
else if (msg.type === "group" && msg.groupOpenid) await sendGroupMessage(account.appId, token, msg.groupOpenid, replyText, msg.messageId);
|
|
1800
|
-
else if (msg.channelId) await sendChannelMessage(token, msg.channelId, replyText, msg.messageId);
|
|
1801
|
-
else if (msg.type === "dm" && msg.guildId) await sendDmMessage(token, msg.guildId, replyText, msg.messageId);
|
|
1802
|
-
if (replyFile) try {
|
|
1803
|
-
await sendDocument({
|
|
1804
|
-
targetType: msg.type === "group" ? "group" : msg.type === "dm" ? "dm" : msg.type === "c2c" ? "c2c" : "channel",
|
|
1805
|
-
targetId: msg.type === "group" ? msg.groupOpenid || msg.senderId : msg.type === "dm" ? msg.guildId || msg.senderId : msg.type === "c2c" ? msg.senderId : msg.channelId || msg.senderId,
|
|
1806
|
-
account,
|
|
1807
|
-
replyToId: msg.messageId,
|
|
1808
|
-
logPrefix: `[qqbot:${account.accountId}]`
|
|
1809
|
-
}, replyFile);
|
|
1810
|
-
log?.info(`[qqbot:${account.accountId}] Slash command file sent: ${replyFile}`);
|
|
1811
|
-
} catch (fileErr) {
|
|
1812
|
-
log?.error(`[qqbot:${account.accountId}] Failed to send slash command file: ${fileErr}`);
|
|
1813
|
-
}
|
|
1814
|
-
} catch (err) {
|
|
1815
|
-
log?.error(`[qqbot:${account.accountId}] Slash command error: ${err}`);
|
|
1816
|
-
msgQueue.enqueue(msg);
|
|
1817
|
-
}
|
|
1818
|
-
};
|
|
1819
|
-
abortSignal.addEventListener("abort", () => {
|
|
1820
|
-
isAborted = true;
|
|
1821
|
-
if (reconnectTimer) {
|
|
1822
|
-
clearTimeout(reconnectTimer);
|
|
1823
|
-
reconnectTimer = null;
|
|
1824
|
-
}
|
|
1825
|
-
cleanup();
|
|
1826
|
-
stopBackgroundTokenRefresh(account.appId);
|
|
1827
|
-
flushKnownUsers();
|
|
1828
|
-
flushRefIndex();
|
|
1829
|
-
});
|
|
1830
|
-
const cleanup = () => {
|
|
1831
|
-
if (heartbeatInterval) {
|
|
1832
|
-
clearInterval(heartbeatInterval);
|
|
1833
|
-
heartbeatInterval = null;
|
|
1834
|
-
}
|
|
1835
|
-
if (currentWs && (currentWs.readyState === WebSocket$1.OPEN || currentWs.readyState === WebSocket$1.CONNECTING)) currentWs.close();
|
|
1836
|
-
currentWs = null;
|
|
1837
|
-
};
|
|
1838
|
-
const getReconnectDelay = () => {
|
|
1839
|
-
return RECONNECT_DELAYS[Math.min(reconnectAttempts, RECONNECT_DELAYS.length - 1)];
|
|
1840
|
-
};
|
|
1841
|
-
const scheduleReconnect = (customDelay) => {
|
|
1842
|
-
if (isAborted || reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) {
|
|
1843
|
-
log?.error(`[qqbot:${account.accountId}] Max reconnect attempts reached or aborted`);
|
|
1844
|
-
return;
|
|
1845
|
-
}
|
|
1846
|
-
if (reconnectTimer) {
|
|
1847
|
-
clearTimeout(reconnectTimer);
|
|
1848
|
-
reconnectTimer = null;
|
|
1849
|
-
}
|
|
1850
|
-
const delay = customDelay ?? getReconnectDelay();
|
|
1851
|
-
reconnectAttempts++;
|
|
1852
|
-
log?.info(`[qqbot:${account.accountId}] Reconnecting in ${delay}ms (attempt ${reconnectAttempts})`);
|
|
1853
|
-
reconnectTimer = setTimeout(() => {
|
|
1854
|
-
reconnectTimer = null;
|
|
1855
|
-
if (!isAborted) connect();
|
|
1856
|
-
}, delay);
|
|
1857
|
-
};
|
|
1858
|
-
const connect = async () => {
|
|
1859
|
-
if (isConnecting) {
|
|
1860
|
-
log?.debug?.(`[qqbot:${account.accountId}] Already connecting, skip`);
|
|
1861
|
-
return;
|
|
1862
|
-
}
|
|
1863
|
-
isConnecting = true;
|
|
1864
|
-
try {
|
|
1865
|
-
cleanup();
|
|
1866
|
-
if (shouldRefreshToken) {
|
|
1867
|
-
log?.info(`[qqbot:${account.accountId}] Refreshing token...`);
|
|
1868
|
-
clearTokenCache(account.appId);
|
|
1869
|
-
shouldRefreshToken = false;
|
|
1870
|
-
}
|
|
1871
|
-
const accessToken = await getAccessToken(account.appId, account.clientSecret);
|
|
1872
|
-
log?.info(`[qqbot:${account.accountId}] ✅ Access token obtained successfully`);
|
|
1873
|
-
const gatewayUrl = await getGatewayUrl(accessToken);
|
|
1874
|
-
log?.info(`[qqbot:${account.accountId}] Connecting to ${gatewayUrl}`);
|
|
1875
|
-
const ws = new WebSocket$1(gatewayUrl, { headers: { "User-Agent": PLUGIN_USER_AGENT } });
|
|
1876
|
-
currentWs = ws;
|
|
1877
|
-
const pluginRuntime = getQQBotRuntime();
|
|
1878
|
-
const handleMessage = async (event) => {
|
|
1879
|
-
log?.debug?.(`[qqbot:${account.accountId}] Received message: ${JSON.stringify(event)}`);
|
|
1880
|
-
log?.info(`[qqbot:${account.accountId}] Processing message from ${event.senderId}: ${event.content}`);
|
|
1881
|
-
if (event.attachments?.length) log?.info(`[qqbot:${account.accountId}] Attachments: ${event.attachments.length}`);
|
|
1882
|
-
pluginRuntime.channel.activity.record({
|
|
1883
|
-
channel: "qqbot",
|
|
1884
|
-
accountId: account.accountId,
|
|
1885
|
-
direction: "inbound"
|
|
1886
|
-
});
|
|
1887
|
-
const isC2C = event.type === "c2c" || event.type === "dm";
|
|
1888
|
-
const typing = { keepAlive: null };
|
|
1889
|
-
const inputNotifyPromise = (async () => {
|
|
1890
|
-
if (!isC2C) return void 0;
|
|
1891
|
-
try {
|
|
1892
|
-
let token = await getAccessToken(account.appId, account.clientSecret);
|
|
1893
|
-
try {
|
|
1894
|
-
const notifyResponse = await sendC2CInputNotify(token, event.senderId, event.messageId, 60);
|
|
1895
|
-
log?.info(`[qqbot:${account.accountId}] Sent input notify to ${event.senderId}${notifyResponse.refIdx ? `, got refIdx=${notifyResponse.refIdx}` : ""}`);
|
|
1896
|
-
typing.keepAlive = new TypingKeepAlive(() => getAccessToken(account.appId, account.clientSecret), () => clearTokenCache(account.appId), event.senderId, event.messageId, log, `[qqbot:${account.accountId}]`);
|
|
1897
|
-
typing.keepAlive.start();
|
|
1898
|
-
return notifyResponse.refIdx;
|
|
1899
|
-
} catch (notifyErr) {
|
|
1900
|
-
const errMsg = String(notifyErr);
|
|
1901
|
-
if (errMsg.includes("token") || errMsg.includes("401") || errMsg.includes("11244")) {
|
|
1902
|
-
log?.info(`[qqbot:${account.accountId}] InputNotify token expired, refreshing...`);
|
|
1903
|
-
clearTokenCache(account.appId);
|
|
1904
|
-
token = await getAccessToken(account.appId, account.clientSecret);
|
|
1905
|
-
const notifyResponse = await sendC2CInputNotify(token, event.senderId, event.messageId, 60);
|
|
1906
|
-
typing.keepAlive = new TypingKeepAlive(() => getAccessToken(account.appId, account.clientSecret), () => clearTokenCache(account.appId), event.senderId, event.messageId, log, `[qqbot:${account.accountId}]`);
|
|
1907
|
-
typing.keepAlive.start();
|
|
1908
|
-
return notifyResponse.refIdx;
|
|
1909
|
-
} else throw notifyErr;
|
|
1910
|
-
}
|
|
1911
|
-
} catch (err) {
|
|
1912
|
-
log?.error(`[qqbot:${account.accountId}] sendC2CInputNotify error: ${err}`);
|
|
1913
|
-
return;
|
|
1914
|
-
}
|
|
1915
|
-
})();
|
|
1916
|
-
const isGroupChat = event.type === "guild" || event.type === "group";
|
|
1917
|
-
const peerId = event.type === "guild" ? event.channelId ?? "unknown" : event.type === "group" ? event.groupOpenid ?? "unknown" : event.senderId;
|
|
1918
|
-
const route = pluginRuntime.channel.routing.resolveAgentRoute({
|
|
1919
|
-
cfg,
|
|
1920
|
-
channel: "qqbot",
|
|
1921
|
-
accountId: account.accountId,
|
|
1922
|
-
peer: {
|
|
1923
|
-
kind: isGroupChat ? "group" : "direct",
|
|
1924
|
-
id: peerId
|
|
1925
|
-
}
|
|
1926
|
-
});
|
|
1927
|
-
const envelopeOptions = pluginRuntime.channel.reply.resolveEnvelopeFormatOptions(cfg);
|
|
1928
|
-
const systemPrompts = [];
|
|
1929
|
-
if (account.systemPrompt) systemPrompts.push(account.systemPrompt);
|
|
1930
|
-
const { attachmentInfo, imageUrls, imageMediaTypes, voiceAttachmentPaths, voiceAttachmentUrls, voiceAsrReferTexts, voiceTranscripts, voiceTranscriptSources, attachmentLocalPaths } = await processAttachments(event.attachments, {
|
|
1931
|
-
accountId: account.accountId,
|
|
1932
|
-
cfg,
|
|
1933
|
-
log
|
|
1934
|
-
});
|
|
1935
|
-
const voiceText = formatVoiceText(voiceTranscripts);
|
|
1936
|
-
const hasAsrReferFallback = voiceTranscriptSources.includes("asr");
|
|
1937
|
-
const parsedContent = parseFaceTags(event.content);
|
|
1938
|
-
const userContent = voiceText ? (parsedContent.trim() ? `${parsedContent}\n${voiceText}` : voiceText) + attachmentInfo : parsedContent + attachmentInfo;
|
|
1939
|
-
let replyToId;
|
|
1940
|
-
let replyToBody;
|
|
1941
|
-
let replyToSender;
|
|
1942
|
-
let replyToIsQuote = false;
|
|
1943
|
-
if (event.refMsgIdx) {
|
|
1944
|
-
const refEntry = getRefIndex(event.refMsgIdx);
|
|
1945
|
-
if (refEntry) {
|
|
1946
|
-
replyToId = event.refMsgIdx;
|
|
1947
|
-
replyToBody = formatRefEntryForAgent(refEntry);
|
|
1948
|
-
replyToSender = refEntry.senderName ?? refEntry.senderId;
|
|
1949
|
-
replyToIsQuote = true;
|
|
1950
|
-
log?.info(`[qqbot:${account.accountId}] Quote detected: refMsgIdx=${event.refMsgIdx}, sender=${replyToSender}, content="${replyToBody.slice(0, 80)}..."`);
|
|
1951
|
-
} else {
|
|
1952
|
-
log?.info(`[qqbot:${account.accountId}] Quote detected but refMsgIdx not in cache: ${event.refMsgIdx}`);
|
|
1953
|
-
replyToId = event.refMsgIdx;
|
|
1954
|
-
replyToIsQuote = true;
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
const inputNotifyRefIdx = await inputNotifyPromise;
|
|
1958
|
-
const currentMsgIdx = event.msgIdx ?? inputNotifyRefIdx;
|
|
1959
|
-
if (currentMsgIdx) {
|
|
1960
|
-
const attSummaries = buildAttachmentSummaries(event.attachments, attachmentLocalPaths);
|
|
1961
|
-
if (attSummaries && voiceTranscripts.length > 0) {
|
|
1962
|
-
let voiceIdx = 0;
|
|
1963
|
-
for (const att of attSummaries) if (att.type === "voice" && voiceIdx < voiceTranscripts.length) {
|
|
1964
|
-
att.transcript = voiceTranscripts[voiceIdx];
|
|
1965
|
-
if (voiceIdx < voiceTranscriptSources.length) att.transcriptSource = voiceTranscriptSources[voiceIdx];
|
|
1966
|
-
voiceIdx++;
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
setRefIndex(currentMsgIdx, {
|
|
1970
|
-
content: parsedContent,
|
|
1971
|
-
senderId: event.senderId,
|
|
1972
|
-
senderName: event.senderName,
|
|
1973
|
-
timestamp: new Date(event.timestamp).getTime(),
|
|
1974
|
-
attachments: attSummaries
|
|
1975
|
-
});
|
|
1976
|
-
log?.info(`[qqbot:${account.accountId}] Cached msgIdx=${currentMsgIdx} for future reference (source: ${event.msgIdx ? "message_scene.ext" : "InputNotify"})`);
|
|
1977
|
-
}
|
|
1978
|
-
const body = pluginRuntime.channel.reply.formatInboundEnvelope({
|
|
1979
|
-
channel: "qqbot",
|
|
1980
|
-
from: event.senderName ?? event.senderId,
|
|
1981
|
-
timestamp: new Date(event.timestamp).getTime(),
|
|
1982
|
-
body: userContent,
|
|
1983
|
-
chatType: isGroupChat ? "group" : "direct",
|
|
1984
|
-
sender: {
|
|
1985
|
-
id: event.senderId,
|
|
1986
|
-
name: event.senderName
|
|
1987
|
-
},
|
|
1988
|
-
envelope: envelopeOptions,
|
|
1989
|
-
...imageUrls.length > 0 ? { imageUrls } : {}
|
|
1990
|
-
});
|
|
1991
|
-
const uniqueVoicePaths = [...new Set(voiceAttachmentPaths)];
|
|
1992
|
-
const uniqueVoiceUrls = [...new Set(voiceAttachmentUrls)];
|
|
1993
|
-
const uniqueVoiceAsrReferTexts = [...new Set(voiceAsrReferTexts)].filter(Boolean);
|
|
1994
|
-
const sttTranscriptCount = voiceTranscriptSources.filter((s) => s === "stt").length;
|
|
1995
|
-
const asrFallbackCount = voiceTranscriptSources.filter((s) => s === "asr").length;
|
|
1996
|
-
const fallbackCount = voiceTranscriptSources.filter((s) => s === "fallback").length;
|
|
1997
|
-
if (voiceAttachmentPaths.length > 0 || voiceAttachmentUrls.length > 0 || uniqueVoiceAsrReferTexts.length > 0) {
|
|
1998
|
-
const asrPreview = uniqueVoiceAsrReferTexts.length > 0 ? uniqueVoiceAsrReferTexts[0].slice(0, 50) : "";
|
|
1999
|
-
log?.info(`[qqbot:${account.accountId}] Voice input summary: local=${uniqueVoicePaths.length}, remote=${uniqueVoiceUrls.length}, asrReferTexts=${uniqueVoiceAsrReferTexts.length}, transcripts=${voiceTranscripts.length}, source(stt/asr/fallback)=${sttTranscriptCount}/${asrFallbackCount}/${fallbackCount}` + (asrPreview ? `, asr_preview="${asrPreview}${uniqueVoiceAsrReferTexts[0].length > 50 ? "..." : ""}"` : ""));
|
|
2000
|
-
}
|
|
2001
|
-
const qualifiedTarget = isGroupChat ? event.type === "guild" ? `qqbot:channel:${event.channelId}` : `qqbot:group:${event.groupOpenid}` : event.type === "dm" ? `qqbot:dm:${event.guildId}` : `qqbot:c2c:${event.senderId}`;
|
|
2002
|
-
const hasTTS = !!resolveTTSConfig(cfg) || isGlobalTTSAvailable(cfg);
|
|
2003
|
-
let quotePart = "";
|
|
2004
|
-
if (replyToIsQuote) if (replyToBody) quotePart = `[Quoted message begins]\n${replyToBody}\n[Quoted message ends]\n`;
|
|
2005
|
-
else quotePart = `[Quoted message begins]\nOriginal content unavailable\n[Quoted message ends]\n`;
|
|
2006
|
-
const staticParts = [`[QQBot] to=${qualifiedTarget}`];
|
|
2007
|
-
if (hasTTS) staticParts.push("voice synthesis enabled");
|
|
2008
|
-
const staticInstruction = staticParts.join(" | ");
|
|
2009
|
-
systemPrompts.unshift(staticInstruction);
|
|
2010
|
-
const dynLines = [];
|
|
2011
|
-
if (imageUrls.length > 0) dynLines.push(`- Images: ${imageUrls.join(", ")}`);
|
|
2012
|
-
if (uniqueVoicePaths.length > 0 || uniqueVoiceUrls.length > 0) dynLines.push(`- Voice: ${[...uniqueVoicePaths, ...uniqueVoiceUrls].join(", ")}`);
|
|
2013
|
-
if (uniqueVoiceAsrReferTexts.length > 0) dynLines.push(`- ASR: ${uniqueVoiceAsrReferTexts.join(" | ")}`);
|
|
2014
|
-
const dynamicCtx = dynLines.length > 0 ? dynLines.join("\n") + "\n" : "";
|
|
2015
|
-
const userMessage = `${quotePart}${userContent}`;
|
|
2016
|
-
const agentBody = userContent.startsWith("/") ? userContent : `${systemPrompts.join("\n")}\n\n${dynamicCtx}${userMessage}`;
|
|
2017
|
-
log?.info(`[qqbot:${account.accountId}] agentBody length: ${agentBody.length}`);
|
|
2018
|
-
const fromAddress = event.type === "guild" ? `qqbot:channel:${event.channelId}` : event.type === "group" ? `qqbot:group:${event.groupOpenid}` : `qqbot:c2c:${event.senderId}`;
|
|
2019
|
-
const toAddress = fromAddress;
|
|
2020
|
-
const rawAllowFrom = account.config?.allowFrom ?? [];
|
|
2021
|
-
const normalizedAllowFrom = qqbotPlugin.config?.formatAllowFrom ? qqbotPlugin.config.formatAllowFrom({
|
|
2022
|
-
cfg,
|
|
2023
|
-
accountId: account.accountId,
|
|
2024
|
-
allowFrom: rawAllowFrom
|
|
2025
|
-
}) : rawAllowFrom.map((e) => e.replace(/^qqbot:/i, "").toUpperCase());
|
|
2026
|
-
const normalizedSenderId = event.senderId.replace(/^qqbot:/i, "").toUpperCase();
|
|
2027
|
-
const commandAuthorized = normalizedAllowFrom.length === 0 || normalizedAllowFrom.some((e) => e === "*") || normalizedAllowFrom.includes(normalizedSenderId);
|
|
2028
|
-
const localMediaPaths = [];
|
|
2029
|
-
const localMediaTypes = [];
|
|
2030
|
-
const remoteMediaUrls = [];
|
|
2031
|
-
const remoteMediaTypes = [];
|
|
2032
|
-
for (let i = 0; i < imageUrls.length; i++) {
|
|
2033
|
-
const u = imageUrls[i];
|
|
2034
|
-
const t = imageMediaTypes[i] ?? "image/png";
|
|
2035
|
-
if (u.startsWith("http://") || u.startsWith("https://")) {
|
|
2036
|
-
remoteMediaUrls.push(u);
|
|
2037
|
-
remoteMediaTypes.push(t);
|
|
2038
|
-
} else {
|
|
2039
|
-
localMediaPaths.push(u);
|
|
2040
|
-
localMediaTypes.push(t);
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
const ctxPayload = pluginRuntime.channel.reply.finalizeInboundContext({
|
|
2044
|
-
Body: body,
|
|
2045
|
-
BodyForAgent: agentBody,
|
|
2046
|
-
RawBody: event.content,
|
|
2047
|
-
CommandBody: event.content,
|
|
2048
|
-
From: fromAddress,
|
|
2049
|
-
To: toAddress,
|
|
2050
|
-
SessionKey: route.sessionKey,
|
|
2051
|
-
AccountId: route.accountId,
|
|
2052
|
-
ChatType: isGroupChat ? "group" : "direct",
|
|
2053
|
-
SenderId: event.senderId,
|
|
2054
|
-
SenderName: event.senderName,
|
|
2055
|
-
Provider: "qqbot",
|
|
2056
|
-
Surface: "qqbot",
|
|
2057
|
-
MessageSid: event.messageId,
|
|
2058
|
-
Timestamp: new Date(event.timestamp).getTime(),
|
|
2059
|
-
OriginatingChannel: "qqbot",
|
|
2060
|
-
OriginatingTo: toAddress,
|
|
2061
|
-
QQChannelId: event.channelId,
|
|
2062
|
-
QQGuildId: event.guildId,
|
|
2063
|
-
QQGroupOpenid: event.groupOpenid,
|
|
2064
|
-
QQVoiceAsrReferAvailable: hasAsrReferFallback,
|
|
2065
|
-
QQVoiceTranscriptSources: voiceTranscriptSources,
|
|
2066
|
-
QQVoiceAttachmentPaths: uniqueVoicePaths,
|
|
2067
|
-
QQVoiceAttachmentUrls: uniqueVoiceUrls,
|
|
2068
|
-
QQVoiceAsrReferTexts: uniqueVoiceAsrReferTexts,
|
|
2069
|
-
QQVoiceInputStrategy: "prefer_audio_stt_then_asr_fallback",
|
|
2070
|
-
CommandAuthorized: commandAuthorized,
|
|
2071
|
-
...localMediaPaths.length > 0 ? {
|
|
2072
|
-
MediaPaths: localMediaPaths,
|
|
2073
|
-
MediaPath: localMediaPaths[0],
|
|
2074
|
-
MediaTypes: localMediaTypes,
|
|
2075
|
-
MediaType: localMediaTypes[0]
|
|
2076
|
-
} : {},
|
|
2077
|
-
...remoteMediaUrls.length > 0 ? {
|
|
2078
|
-
MediaUrls: remoteMediaUrls,
|
|
2079
|
-
MediaUrl: remoteMediaUrls[0]
|
|
2080
|
-
} : {},
|
|
2081
|
-
...replyToId ? {
|
|
2082
|
-
ReplyToId: replyToId,
|
|
2083
|
-
ReplyToBody: replyToBody,
|
|
2084
|
-
ReplyToSender: replyToSender,
|
|
2085
|
-
ReplyToIsQuote: replyToIsQuote
|
|
2086
|
-
} : {}
|
|
2087
|
-
});
|
|
2088
|
-
const replyCtx = {
|
|
2089
|
-
target: {
|
|
2090
|
-
type: event.type,
|
|
2091
|
-
senderId: event.senderId,
|
|
2092
|
-
messageId: event.messageId,
|
|
2093
|
-
channelId: event.channelId,
|
|
2094
|
-
guildId: event.guildId,
|
|
2095
|
-
groupOpenid: event.groupOpenid
|
|
2096
|
-
},
|
|
2097
|
-
account,
|
|
2098
|
-
cfg,
|
|
2099
|
-
log
|
|
2100
|
-
};
|
|
2101
|
-
const sendWithRetry = (sendFn) => sendWithTokenRetry(account.appId, account.clientSecret, sendFn, log, account.accountId);
|
|
2102
|
-
const sendErrorMessage = (errorText) => sendErrorToTarget(replyCtx, errorText);
|
|
2103
|
-
try {
|
|
2104
|
-
const messagesConfig = pluginRuntime.channel.reply.resolveEffectiveMessagesConfig(cfg, route.agentId);
|
|
2105
|
-
let hasResponse = false;
|
|
2106
|
-
let hasBlockResponse = false;
|
|
2107
|
-
let toolDeliverCount = 0;
|
|
2108
|
-
const toolTexts = [];
|
|
2109
|
-
const toolMediaUrls = [];
|
|
2110
|
-
let toolFallbackSent = false;
|
|
2111
|
-
const responseTimeout = 12e4;
|
|
2112
|
-
const toolOnlyTimeout = 6e4;
|
|
2113
|
-
const maxToolRenewals = 3;
|
|
2114
|
-
let toolRenewalCount = 0;
|
|
2115
|
-
let timeoutId = null;
|
|
2116
|
-
let toolOnlyTimeoutId = null;
|
|
2117
|
-
const sendToolFallback = async () => {
|
|
2118
|
-
if (toolMediaUrls.length > 0) {
|
|
2119
|
-
log?.info(`[qqbot:${account.accountId}] Tool fallback: forwarding ${toolMediaUrls.length} media URL(s) from tool deliver(s)`);
|
|
2120
|
-
const mediaTimeout = 45e3;
|
|
2121
|
-
for (const mediaUrl of toolMediaUrls) {
|
|
2122
|
-
const ac = new AbortController();
|
|
2123
|
-
try {
|
|
2124
|
-
const result = await Promise.race([sendMedia({
|
|
2125
|
-
to: qualifiedTarget,
|
|
2126
|
-
text: "",
|
|
2127
|
-
mediaUrl,
|
|
2128
|
-
accountId: account.accountId,
|
|
2129
|
-
replyToId: event.messageId,
|
|
2130
|
-
account
|
|
2131
|
-
}).then((r) => {
|
|
2132
|
-
if (ac.signal.aborted) {
|
|
2133
|
-
log?.info(`[qqbot:${account.accountId}] Tool fallback sendMedia completed after timeout, suppressing late delivery`);
|
|
2134
|
-
return {
|
|
2135
|
-
channel: "qqbot",
|
|
2136
|
-
error: "Media send completed after timeout (suppressed)"
|
|
2137
|
-
};
|
|
2138
|
-
}
|
|
2139
|
-
return r;
|
|
2140
|
-
}), new Promise((resolve) => setTimeout(() => {
|
|
2141
|
-
ac.abort();
|
|
2142
|
-
resolve({
|
|
2143
|
-
channel: "qqbot",
|
|
2144
|
-
error: `Tool fallback media send timeout (${mediaTimeout / 1e3}s)`
|
|
2145
|
-
});
|
|
2146
|
-
}, mediaTimeout))]);
|
|
2147
|
-
if (result.error) log?.error(`[qqbot:${account.accountId}] Tool fallback sendMedia error: ${result.error}`);
|
|
2148
|
-
} catch (err) {
|
|
2149
|
-
log?.error(`[qqbot:${account.accountId}] Tool fallback sendMedia failed: ${err}`);
|
|
2150
|
-
}
|
|
2151
|
-
}
|
|
2152
|
-
return;
|
|
2153
|
-
}
|
|
2154
|
-
if (toolTexts.length > 0) {
|
|
2155
|
-
const text = toolTexts.slice(-3).join("\n---\n").slice(0, 2e3);
|
|
2156
|
-
log?.info(`[qqbot:${account.accountId}] Tool fallback: forwarding tool text (${text.length} chars)`);
|
|
2157
|
-
await sendErrorMessage(text);
|
|
2158
|
-
return;
|
|
2159
|
-
}
|
|
2160
|
-
log?.info(`[qqbot:${account.accountId}] Tool fallback: no media or text collected from ${toolDeliverCount} tool deliver(s), silently dropping`);
|
|
2161
|
-
};
|
|
2162
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
2163
|
-
timeoutId = setTimeout(() => {
|
|
2164
|
-
if (!hasResponse) reject(/* @__PURE__ */ new Error("Response timeout"));
|
|
2165
|
-
}, responseTimeout);
|
|
2166
|
-
});
|
|
2167
|
-
const dispatchPromise = pluginRuntime.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
2168
|
-
ctx: ctxPayload,
|
|
2169
|
-
cfg,
|
|
2170
|
-
dispatcherOptions: {
|
|
2171
|
-
responsePrefix: messagesConfig.responsePrefix,
|
|
2172
|
-
deliver: async (payload, info) => {
|
|
2173
|
-
hasResponse = true;
|
|
2174
|
-
log?.info(`[qqbot:${account.accountId}] deliver called, kind: ${info.kind}, payload keys: ${Object.keys(payload).join(", ")}`);
|
|
2175
|
-
if (info.kind === "tool") {
|
|
2176
|
-
toolDeliverCount++;
|
|
2177
|
-
const toolText = (payload.text ?? "").trim();
|
|
2178
|
-
if (toolText) toolTexts.push(toolText);
|
|
2179
|
-
if (payload.mediaUrls?.length) toolMediaUrls.push(...payload.mediaUrls);
|
|
2180
|
-
if (payload.mediaUrl && !toolMediaUrls.includes(payload.mediaUrl)) toolMediaUrls.push(payload.mediaUrl);
|
|
2181
|
-
log?.info(`[qqbot:${account.accountId}] Collected tool deliver #${toolDeliverCount}: text=${toolText.length} chars, media=${toolMediaUrls.length} URLs`);
|
|
2182
|
-
if (hasBlockResponse && toolMediaUrls.length > 0) {
|
|
2183
|
-
log?.info(`[qqbot:${account.accountId}] Block already sent, immediately forwarding ${toolMediaUrls.length} tool media URL(s)`);
|
|
2184
|
-
const urlsToSend = [...toolMediaUrls];
|
|
2185
|
-
toolMediaUrls.length = 0;
|
|
2186
|
-
for (const mediaUrl of urlsToSend) try {
|
|
2187
|
-
const result = await sendMedia({
|
|
2188
|
-
to: qualifiedTarget,
|
|
2189
|
-
text: "",
|
|
2190
|
-
mediaUrl,
|
|
2191
|
-
accountId: account.accountId,
|
|
2192
|
-
replyToId: event.messageId,
|
|
2193
|
-
account
|
|
2194
|
-
});
|
|
2195
|
-
if (result.error) log?.error(`[qqbot:${account.accountId}] Tool media immediate forward error: ${result.error}`);
|
|
2196
|
-
else log?.info(`[qqbot:${account.accountId}] Forwarded tool media (post-block): ${mediaUrl.slice(0, 80)}...`);
|
|
2197
|
-
} catch (err) {
|
|
2198
|
-
log?.error(`[qqbot:${account.accountId}] Tool media immediate forward failed: ${err}`);
|
|
2199
|
-
}
|
|
2200
|
-
return;
|
|
2201
|
-
}
|
|
2202
|
-
if (toolFallbackSent) return;
|
|
2203
|
-
if (toolOnlyTimeoutId) if (toolRenewalCount < maxToolRenewals) {
|
|
2204
|
-
clearTimeout(toolOnlyTimeoutId);
|
|
2205
|
-
toolRenewalCount++;
|
|
2206
|
-
log?.info(`[qqbot:${account.accountId}] Tool-only timer renewed (${toolRenewalCount}/${maxToolRenewals})`);
|
|
2207
|
-
} else {
|
|
2208
|
-
log?.info(`[qqbot:${account.accountId}] Tool-only timer renewal limit reached (${maxToolRenewals}), waiting for timeout`);
|
|
2209
|
-
return;
|
|
2210
|
-
}
|
|
2211
|
-
toolOnlyTimeoutId = setTimeout(async () => {
|
|
2212
|
-
if (!hasBlockResponse && !toolFallbackSent) {
|
|
2213
|
-
toolFallbackSent = true;
|
|
2214
|
-
log?.error(`[qqbot:${account.accountId}] Tool-only timeout: ${toolDeliverCount} tool deliver(s) but no block within ${toolOnlyTimeout / 1e3}s, sending fallback`);
|
|
2215
|
-
try {
|
|
2216
|
-
await sendToolFallback();
|
|
2217
|
-
} catch (sendErr) {
|
|
2218
|
-
log?.error(`[qqbot:${account.accountId}] Failed to send tool-only fallback: ${sendErr}`);
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
}, toolOnlyTimeout);
|
|
2222
|
-
return;
|
|
2223
|
-
}
|
|
2224
|
-
hasBlockResponse = true;
|
|
2225
|
-
typing.keepAlive?.stop();
|
|
2226
|
-
if (timeoutId) {
|
|
2227
|
-
clearTimeout(timeoutId);
|
|
2228
|
-
timeoutId = null;
|
|
2229
|
-
}
|
|
2230
|
-
if (toolOnlyTimeoutId) {
|
|
2231
|
-
clearTimeout(toolOnlyTimeoutId);
|
|
2232
|
-
toolOnlyTimeoutId = null;
|
|
2233
|
-
}
|
|
2234
|
-
if (toolDeliverCount > 0) log?.info(`[qqbot:${account.accountId}] Block deliver after ${toolDeliverCount} tool deliver(s)`);
|
|
2235
|
-
const quoteRef = event.msgIdx;
|
|
2236
|
-
let quoteRefUsed = false;
|
|
2237
|
-
const consumeQuoteRef = () => {
|
|
2238
|
-
if (quoteRef && !quoteRefUsed) {
|
|
2239
|
-
quoteRefUsed = true;
|
|
2240
|
-
return quoteRef;
|
|
2241
|
-
}
|
|
2242
|
-
};
|
|
2243
|
-
let replyText = payload.text ?? "";
|
|
2244
|
-
const deliverEvent = {
|
|
2245
|
-
type: event.type,
|
|
2246
|
-
senderId: event.senderId,
|
|
2247
|
-
messageId: event.messageId,
|
|
2248
|
-
channelId: event.channelId,
|
|
2249
|
-
groupOpenid: event.groupOpenid,
|
|
2250
|
-
msgIdx: event.msgIdx
|
|
2251
|
-
};
|
|
2252
|
-
const deliverActx = {
|
|
2253
|
-
account,
|
|
2254
|
-
qualifiedTarget,
|
|
2255
|
-
log
|
|
2256
|
-
};
|
|
2257
|
-
const mediaResult = await parseAndSendMediaTags(replyText, deliverEvent, deliverActx, sendWithRetry, consumeQuoteRef);
|
|
2258
|
-
if (mediaResult.handled) {
|
|
2259
|
-
pluginRuntime.channel.activity.record({
|
|
2260
|
-
channel: "qqbot",
|
|
2261
|
-
accountId: account.accountId,
|
|
2262
|
-
direction: "outbound"
|
|
2263
|
-
});
|
|
2264
|
-
return;
|
|
2265
|
-
}
|
|
2266
|
-
replyText = mediaResult.normalizedText;
|
|
2267
|
-
const recordOutboundActivity = () => pluginRuntime.channel.activity.record({
|
|
2268
|
-
channel: "qqbot",
|
|
2269
|
-
accountId: account.accountId,
|
|
2270
|
-
direction: "outbound"
|
|
2271
|
-
});
|
|
2272
|
-
if (await handleStructuredPayload(replyCtx, replyText, recordOutboundActivity)) return;
|
|
2273
|
-
await sendPlainReply(payload, replyText, deliverEvent, deliverActx, sendWithRetry, consumeQuoteRef, toolMediaUrls);
|
|
2274
|
-
pluginRuntime.channel.activity.record({
|
|
2275
|
-
channel: "qqbot",
|
|
2276
|
-
accountId: account.accountId,
|
|
2277
|
-
direction: "outbound"
|
|
2278
|
-
});
|
|
2279
|
-
},
|
|
2280
|
-
onError: async (err) => {
|
|
2281
|
-
log?.error(`[qqbot:${account.accountId}] Dispatch error: ${err}`);
|
|
2282
|
-
hasResponse = true;
|
|
2283
|
-
if (timeoutId) {
|
|
2284
|
-
clearTimeout(timeoutId);
|
|
2285
|
-
timeoutId = null;
|
|
2286
|
-
}
|
|
2287
|
-
const errMsg = String(err);
|
|
2288
|
-
if (errMsg.includes("401") || errMsg.includes("key") || errMsg.includes("auth")) log?.error(`[qqbot:${account.accountId}] AI auth error: ${errMsg}`);
|
|
2289
|
-
else log?.error(`[qqbot:${account.accountId}] AI process error: ${errMsg}`);
|
|
2290
|
-
}
|
|
2291
|
-
},
|
|
2292
|
-
replyOptions: { disableBlockStreaming: true }
|
|
2293
|
-
});
|
|
2294
|
-
try {
|
|
2295
|
-
await Promise.race([dispatchPromise, timeoutPromise]);
|
|
2296
|
-
} catch (err) {
|
|
2297
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
2298
|
-
if (!hasResponse) log?.error(`[qqbot:${account.accountId}] No response within timeout`);
|
|
2299
|
-
} finally {
|
|
2300
|
-
if (toolOnlyTimeoutId) {
|
|
2301
|
-
clearTimeout(toolOnlyTimeoutId);
|
|
2302
|
-
toolOnlyTimeoutId = null;
|
|
2303
|
-
}
|
|
2304
|
-
if (toolDeliverCount > 0 && !hasBlockResponse && !toolFallbackSent) {
|
|
2305
|
-
toolFallbackSent = true;
|
|
2306
|
-
log?.error(`[qqbot:${account.accountId}] Dispatch completed with ${toolDeliverCount} tool deliver(s) but no block deliver, sending fallback`);
|
|
2307
|
-
await sendToolFallback();
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
} catch (err) {
|
|
2311
|
-
log?.error(`[qqbot:${account.accountId}] Message processing failed: ${err}`);
|
|
2312
|
-
} finally {
|
|
2313
|
-
typing.keepAlive?.stop();
|
|
2314
|
-
}
|
|
2315
|
-
};
|
|
2316
|
-
ws.on("open", () => {
|
|
2317
|
-
log?.info(`[qqbot:${account.accountId}] WebSocket connected`);
|
|
2318
|
-
isConnecting = false;
|
|
2319
|
-
reconnectAttempts = 0;
|
|
2320
|
-
lastConnectTime = Date.now();
|
|
2321
|
-
msgQueue.startProcessor(handleMessage);
|
|
2322
|
-
startBackgroundTokenRefresh(account.appId, account.clientSecret, { log });
|
|
2323
|
-
});
|
|
2324
|
-
ws.on("message", async (data) => {
|
|
2325
|
-
try {
|
|
2326
|
-
const rawData = data.toString();
|
|
2327
|
-
const { op, d, s, t } = JSON.parse(rawData);
|
|
2328
|
-
if (s) {
|
|
2329
|
-
lastSeq = s;
|
|
2330
|
-
if (sessionId) saveSession({
|
|
2331
|
-
sessionId,
|
|
2332
|
-
lastSeq,
|
|
2333
|
-
lastConnectedAt: lastConnectTime,
|
|
2334
|
-
intentLevelIndex: 0,
|
|
2335
|
-
accountId: account.accountId,
|
|
2336
|
-
savedAt: Date.now(),
|
|
2337
|
-
appId: account.appId
|
|
2338
|
-
});
|
|
2339
|
-
}
|
|
2340
|
-
log?.debug?.(`[qqbot:${account.accountId}] Received op=${op} t=${t}`);
|
|
2341
|
-
switch (op) {
|
|
2342
|
-
case 10:
|
|
2343
|
-
log?.info(`[qqbot:${account.accountId}] Hello received`);
|
|
2344
|
-
if (sessionId && lastSeq !== null) {
|
|
2345
|
-
log?.info(`[qqbot:${account.accountId}] Attempting to resume session ${sessionId}`);
|
|
2346
|
-
ws.send(JSON.stringify({
|
|
2347
|
-
op: 6,
|
|
2348
|
-
d: {
|
|
2349
|
-
token: `QQBot ${accessToken}`,
|
|
2350
|
-
session_id: sessionId,
|
|
2351
|
-
seq: lastSeq
|
|
2352
|
-
}
|
|
2353
|
-
}));
|
|
2354
|
-
} else {
|
|
2355
|
-
log?.info(`[qqbot:${account.accountId}] Sending identify with intents: ${FULL_INTENTS} (${FULL_INTENTS_DESC})`);
|
|
2356
|
-
ws.send(JSON.stringify({
|
|
2357
|
-
op: 2,
|
|
2358
|
-
d: {
|
|
2359
|
-
token: `QQBot ${accessToken}`,
|
|
2360
|
-
intents: FULL_INTENTS,
|
|
2361
|
-
shard: [0, 1]
|
|
2362
|
-
}
|
|
2363
|
-
}));
|
|
2364
|
-
}
|
|
2365
|
-
const interval = d.heartbeat_interval;
|
|
2366
|
-
if (heartbeatInterval) clearInterval(heartbeatInterval);
|
|
2367
|
-
heartbeatInterval = setInterval(() => {
|
|
2368
|
-
if (ws.readyState === WebSocket$1.OPEN) {
|
|
2369
|
-
ws.send(JSON.stringify({
|
|
2370
|
-
op: 1,
|
|
2371
|
-
d: lastSeq
|
|
2372
|
-
}));
|
|
2373
|
-
log?.debug?.(`[qqbot:${account.accountId}] Heartbeat sent`);
|
|
2374
|
-
}
|
|
2375
|
-
}, interval);
|
|
2376
|
-
break;
|
|
2377
|
-
case 0:
|
|
2378
|
-
log?.info(`[qqbot:${account.accountId}] 📩 Dispatch event: t=${t}, d=${JSON.stringify(d)}`);
|
|
2379
|
-
if (t === "READY") {
|
|
2380
|
-
sessionId = d.session_id;
|
|
2381
|
-
log?.info(`[qqbot:${account.accountId}] Ready with ${FULL_INTENTS_DESC}, session: ${sessionId}`);
|
|
2382
|
-
saveSession({
|
|
2383
|
-
sessionId,
|
|
2384
|
-
lastSeq,
|
|
2385
|
-
lastConnectedAt: Date.now(),
|
|
2386
|
-
intentLevelIndex: 0,
|
|
2387
|
-
accountId: account.accountId,
|
|
2388
|
-
savedAt: Date.now(),
|
|
2389
|
-
appId: account.appId
|
|
2390
|
-
});
|
|
2391
|
-
onReady?.(d);
|
|
2392
|
-
} else if (t === "RESUMED") {
|
|
2393
|
-
log?.info(`[qqbot:${account.accountId}] Session resumed`);
|
|
2394
|
-
onReady?.(d);
|
|
2395
|
-
if (sessionId) saveSession({
|
|
2396
|
-
sessionId,
|
|
2397
|
-
lastSeq,
|
|
2398
|
-
lastConnectedAt: Date.now(),
|
|
2399
|
-
intentLevelIndex: 0,
|
|
2400
|
-
accountId: account.accountId,
|
|
2401
|
-
savedAt: Date.now(),
|
|
2402
|
-
appId: account.appId
|
|
2403
|
-
});
|
|
2404
|
-
} else if (t === "C2C_MESSAGE_CREATE") {
|
|
2405
|
-
const event = d;
|
|
2406
|
-
recordKnownUser({
|
|
2407
|
-
openid: event.author.user_openid,
|
|
2408
|
-
type: "c2c",
|
|
2409
|
-
accountId: account.accountId
|
|
2410
|
-
});
|
|
2411
|
-
const c2cRefs = parseRefIndices(event.message_scene?.ext);
|
|
2412
|
-
trySlashCommandOrEnqueue({
|
|
2413
|
-
type: "c2c",
|
|
2414
|
-
senderId: event.author.user_openid,
|
|
2415
|
-
content: event.content,
|
|
2416
|
-
messageId: event.id,
|
|
2417
|
-
timestamp: event.timestamp,
|
|
2418
|
-
attachments: event.attachments,
|
|
2419
|
-
refMsgIdx: c2cRefs.refMsgIdx,
|
|
2420
|
-
msgIdx: c2cRefs.msgIdx
|
|
2421
|
-
});
|
|
2422
|
-
} else if (t === "AT_MESSAGE_CREATE") {
|
|
2423
|
-
const event = d;
|
|
2424
|
-
const guildRefs = parseRefIndices(event.message_scene?.ext);
|
|
2425
|
-
trySlashCommandOrEnqueue({
|
|
2426
|
-
type: "guild",
|
|
2427
|
-
senderId: event.author.id,
|
|
2428
|
-
senderName: event.author.username,
|
|
2429
|
-
content: event.content,
|
|
2430
|
-
messageId: event.id,
|
|
2431
|
-
timestamp: event.timestamp,
|
|
2432
|
-
channelId: event.channel_id,
|
|
2433
|
-
guildId: event.guild_id,
|
|
2434
|
-
attachments: event.attachments,
|
|
2435
|
-
refMsgIdx: guildRefs.refMsgIdx,
|
|
2436
|
-
msgIdx: guildRefs.msgIdx
|
|
2437
|
-
});
|
|
2438
|
-
} else if (t === "DIRECT_MESSAGE_CREATE") {
|
|
2439
|
-
const event = d;
|
|
2440
|
-
const dmRefs = parseRefIndices(event.message_scene?.ext);
|
|
2441
|
-
trySlashCommandOrEnqueue({
|
|
2442
|
-
type: "dm",
|
|
2443
|
-
senderId: event.author.id,
|
|
2444
|
-
senderName: event.author.username,
|
|
2445
|
-
content: event.content,
|
|
2446
|
-
messageId: event.id,
|
|
2447
|
-
timestamp: event.timestamp,
|
|
2448
|
-
guildId: event.guild_id,
|
|
2449
|
-
attachments: event.attachments,
|
|
2450
|
-
refMsgIdx: dmRefs.refMsgIdx,
|
|
2451
|
-
msgIdx: dmRefs.msgIdx
|
|
2452
|
-
});
|
|
2453
|
-
} else if (t === "GROUP_AT_MESSAGE_CREATE") {
|
|
2454
|
-
const event = d;
|
|
2455
|
-
recordKnownUser({
|
|
2456
|
-
openid: event.author.member_openid,
|
|
2457
|
-
type: "group",
|
|
2458
|
-
groupOpenid: event.group_openid,
|
|
2459
|
-
accountId: account.accountId
|
|
2460
|
-
});
|
|
2461
|
-
const groupRefs = parseRefIndices(event.message_scene?.ext);
|
|
2462
|
-
trySlashCommandOrEnqueue({
|
|
2463
|
-
type: "group",
|
|
2464
|
-
senderId: event.author.member_openid,
|
|
2465
|
-
content: event.content,
|
|
2466
|
-
messageId: event.id,
|
|
2467
|
-
timestamp: event.timestamp,
|
|
2468
|
-
groupOpenid: event.group_openid,
|
|
2469
|
-
attachments: event.attachments,
|
|
2470
|
-
refMsgIdx: groupRefs.refMsgIdx,
|
|
2471
|
-
msgIdx: groupRefs.msgIdx
|
|
2472
|
-
});
|
|
2473
|
-
}
|
|
2474
|
-
break;
|
|
2475
|
-
case 11:
|
|
2476
|
-
log?.debug?.(`[qqbot:${account.accountId}] Heartbeat ACK`);
|
|
2477
|
-
break;
|
|
2478
|
-
case 7:
|
|
2479
|
-
log?.info(`[qqbot:${account.accountId}] Server requested reconnect`);
|
|
2480
|
-
cleanup();
|
|
2481
|
-
scheduleReconnect();
|
|
2482
|
-
break;
|
|
2483
|
-
case 9:
|
|
2484
|
-
const canResume = d;
|
|
2485
|
-
log?.error(`[qqbot:${account.accountId}] Invalid session (${FULL_INTENTS_DESC}), can resume: ${canResume}, raw: ${rawData}`);
|
|
2486
|
-
if (!canResume) {
|
|
2487
|
-
sessionId = null;
|
|
2488
|
-
lastSeq = null;
|
|
2489
|
-
clearSession(account.accountId);
|
|
2490
|
-
shouldRefreshToken = true;
|
|
2491
|
-
log?.info(`[qqbot:${account.accountId}] Will refresh token and retry with full intents (${FULL_INTENTS_DESC})`);
|
|
2492
|
-
}
|
|
2493
|
-
cleanup();
|
|
2494
|
-
scheduleReconnect(3e3);
|
|
2495
|
-
break;
|
|
2496
|
-
}
|
|
2497
|
-
} catch (err) {
|
|
2498
|
-
log?.error(`[qqbot:${account.accountId}] Message parse error: ${err}`);
|
|
2499
|
-
}
|
|
2500
|
-
});
|
|
2501
|
-
ws.on("close", (code, reason) => {
|
|
2502
|
-
log?.info(`[qqbot:${account.accountId}] WebSocket closed: ${code} ${reason.toString()}`);
|
|
2503
|
-
isConnecting = false;
|
|
2504
|
-
if (code === 4914 || code === 4915) {
|
|
2505
|
-
log?.error(`[qqbot:${account.accountId}] Bot is ${code === 4914 ? "offline/sandbox-only" : "banned"}. Please contact QQ platform.`);
|
|
2506
|
-
cleanup();
|
|
2507
|
-
return;
|
|
2508
|
-
}
|
|
2509
|
-
if (code === 4004) {
|
|
2510
|
-
log?.info(`[qqbot:${account.accountId}] Invalid token (4004), will refresh token and reconnect`);
|
|
2511
|
-
shouldRefreshToken = true;
|
|
2512
|
-
cleanup();
|
|
2513
|
-
if (!isAborted) scheduleReconnect();
|
|
2514
|
-
return;
|
|
2515
|
-
}
|
|
2516
|
-
if (code === 4008) {
|
|
2517
|
-
log?.info(`[qqbot:${account.accountId}] Rate limited (4008), waiting ${RATE_LIMIT_DELAY}ms before reconnect`);
|
|
2518
|
-
cleanup();
|
|
2519
|
-
if (!isAborted) scheduleReconnect(RATE_LIMIT_DELAY);
|
|
2520
|
-
return;
|
|
2521
|
-
}
|
|
2522
|
-
if (code === 4006 || code === 4007 || code === 4009) {
|
|
2523
|
-
log?.info(`[qqbot:${account.accountId}] Error ${code} (${{
|
|
2524
|
-
4006: "session no longer valid",
|
|
2525
|
-
4007: "invalid seq on resume",
|
|
2526
|
-
4009: "session timed out"
|
|
2527
|
-
}[code]}), will re-identify`);
|
|
2528
|
-
sessionId = null;
|
|
2529
|
-
lastSeq = null;
|
|
2530
|
-
clearSession(account.accountId);
|
|
2531
|
-
shouldRefreshToken = true;
|
|
2532
|
-
} else if (code >= 4900 && code <= 4913) {
|
|
2533
|
-
log?.info(`[qqbot:${account.accountId}] Internal error (${code}), will re-identify`);
|
|
2534
|
-
sessionId = null;
|
|
2535
|
-
lastSeq = null;
|
|
2536
|
-
clearSession(account.accountId);
|
|
2537
|
-
shouldRefreshToken = true;
|
|
2538
|
-
}
|
|
2539
|
-
const connectionDuration = Date.now() - lastConnectTime;
|
|
2540
|
-
if (connectionDuration < QUICK_DISCONNECT_THRESHOLD && lastConnectTime > 0) {
|
|
2541
|
-
quickDisconnectCount++;
|
|
2542
|
-
log?.info(`[qqbot:${account.accountId}] Quick disconnect detected (${connectionDuration}ms), count: ${quickDisconnectCount}`);
|
|
2543
|
-
if (quickDisconnectCount >= MAX_QUICK_DISCONNECT_COUNT) {
|
|
2544
|
-
log?.error(`[qqbot:${account.accountId}] Too many quick disconnects. This may indicate a permission issue.`);
|
|
2545
|
-
log?.error(`[qqbot:${account.accountId}] Please check: 1) AppID/Secret correct 2) Bot permissions on QQ Open Platform`);
|
|
2546
|
-
quickDisconnectCount = 0;
|
|
2547
|
-
cleanup();
|
|
2548
|
-
if (!isAborted && code !== 1e3) scheduleReconnect(RATE_LIMIT_DELAY);
|
|
2549
|
-
return;
|
|
2550
|
-
}
|
|
2551
|
-
} else quickDisconnectCount = 0;
|
|
2552
|
-
cleanup();
|
|
2553
|
-
if (!isAborted && code !== 1e3) scheduleReconnect();
|
|
2554
|
-
});
|
|
2555
|
-
ws.on("error", (err) => {
|
|
2556
|
-
log?.error(`[qqbot:${account.accountId}] WebSocket error: ${err.message}`);
|
|
2557
|
-
onError?.(err);
|
|
2558
|
-
});
|
|
2559
|
-
} catch (err) {
|
|
2560
|
-
isConnecting = false;
|
|
2561
|
-
const errMsg = String(err);
|
|
2562
|
-
log?.error(`[qqbot:${account.accountId}] Connection failed: ${err}`);
|
|
2563
|
-
if (errMsg.includes("Too many requests") || errMsg.includes("100001")) {
|
|
2564
|
-
log?.info(`[qqbot:${account.accountId}] Rate limited, waiting ${RATE_LIMIT_DELAY}ms before retry`);
|
|
2565
|
-
scheduleReconnect(RATE_LIMIT_DELAY);
|
|
2566
|
-
} else scheduleReconnect();
|
|
2567
|
-
}
|
|
2568
|
-
};
|
|
2569
|
-
await connect();
|
|
2570
|
-
return new Promise((resolve) => {
|
|
2571
|
-
abortSignal.addEventListener("abort", () => resolve());
|
|
2572
|
-
});
|
|
2573
|
-
}
|
|
2574
|
-
//#endregion
|
|
2575
|
-
export { startGateway };
|