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
|
@@ -1,2739 +0,0 @@
|
|
|
1
|
-
import { i as __require } from "./chunk-CrysgU_F.js";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import * as fs from "node:fs";
|
|
4
|
-
import * as path$3 from "node:path";
|
|
5
|
-
import { execFile } from "node:child_process";
|
|
6
|
-
import * as os$1 from "node:os";
|
|
7
|
-
import os from "node:os";
|
|
8
|
-
import * as crypto$1 from "node:crypto";
|
|
9
|
-
import crypto from "node:crypto";
|
|
10
|
-
import * as path$2 from "path";
|
|
11
|
-
//#region extensions/qqbot/src/utils/debug-log.ts
|
|
12
|
-
/**
|
|
13
|
-
* Debug logging utility for QQBot plugin.
|
|
14
|
-
*
|
|
15
|
-
* Only outputs when QQBOT_DEBUG environment variable is set.
|
|
16
|
-
* Prevents leaking user message content in production logs.
|
|
17
|
-
*/
|
|
18
|
-
const isDebug = () => !!process.env.QQBOT_DEBUG;
|
|
19
|
-
function debugLog(...args) {
|
|
20
|
-
if (isDebug()) console.log(...args);
|
|
21
|
-
}
|
|
22
|
-
function debugWarn(...args) {
|
|
23
|
-
if (isDebug()) console.warn(...args);
|
|
24
|
-
}
|
|
25
|
-
function debugError(...args) {
|
|
26
|
-
if (isDebug()) console.error(...args);
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region extensions/qqbot/src/utils/platform.ts
|
|
30
|
-
/**
|
|
31
|
-
* Cross-platform compatibility helpers.
|
|
32
|
-
*
|
|
33
|
-
* This module centralizes home/temp directory discovery, local-path checks,
|
|
34
|
-
* ffmpeg/ffprobe lookup, native-module compatibility checks, and startup diagnostics.
|
|
35
|
-
*/
|
|
36
|
-
function getPlatform() {
|
|
37
|
-
const p = process.platform;
|
|
38
|
-
if (p === "darwin" || p === "linux" || p === "win32") return p;
|
|
39
|
-
return "other";
|
|
40
|
-
}
|
|
41
|
-
function isWindows() {
|
|
42
|
-
return process.platform === "win32";
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Resolve the current user's home directory safely across platforms.
|
|
46
|
-
*
|
|
47
|
-
* Priority:
|
|
48
|
-
* 1. `os.homedir()`
|
|
49
|
-
* 2. `$HOME` or `%USERPROFILE%`
|
|
50
|
-
* 3. `os.tmpdir()` as a last resort
|
|
51
|
-
*/
|
|
52
|
-
function getHomeDir() {
|
|
53
|
-
try {
|
|
54
|
-
const home = os$1.homedir();
|
|
55
|
-
if (home && fs.existsSync(home)) return home;
|
|
56
|
-
} catch {}
|
|
57
|
-
const envHome = process.env.HOME || process.env.USERPROFILE;
|
|
58
|
-
if (envHome && fs.existsSync(envHome)) return envHome;
|
|
59
|
-
return os$1.tmpdir();
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Return a path under `~/.openclaw/qqbot`, creating it on demand.
|
|
63
|
-
*/
|
|
64
|
-
function getQQBotDataDir(...subPaths) {
|
|
65
|
-
const dir = path$3.join(getHomeDir(), ".openclaw", "qqbot", ...subPaths);
|
|
66
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
67
|
-
return dir;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Return a path under `~/.openclaw/media/qqbot`, creating it on demand.
|
|
71
|
-
*
|
|
72
|
-
* Unlike `getQQBotDataDir`, this lives under OpenClaw's core media allowlist so
|
|
73
|
-
* downloaded images and audio can be accessed by framework media tooling.
|
|
74
|
-
*/
|
|
75
|
-
function getQQBotMediaDir(...subPaths) {
|
|
76
|
-
const dir = path$3.join(getHomeDir(), ".openclaw", "media", "qqbot", ...subPaths);
|
|
77
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
78
|
-
return dir;
|
|
79
|
-
}
|
|
80
|
-
/** Return the OS temp directory. */
|
|
81
|
-
function getTempDir() {
|
|
82
|
-
return os$1.tmpdir();
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Expand `~` to the current user's home directory.
|
|
86
|
-
*
|
|
87
|
-
* Supports `~` and `~/...`. Other forms are returned unchanged.
|
|
88
|
-
*/
|
|
89
|
-
function expandTilde(p) {
|
|
90
|
-
if (!p) return p;
|
|
91
|
-
if (p === "~") return getHomeDir();
|
|
92
|
-
if (p.startsWith("~/") || p.startsWith("~\\")) return path$3.join(getHomeDir(), p.slice(2));
|
|
93
|
-
return p;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Normalize a user-provided path by trimming, stripping `file://`, and expanding `~`.
|
|
97
|
-
*/
|
|
98
|
-
function normalizePath(p) {
|
|
99
|
-
let result = p.trim();
|
|
100
|
-
if (result.startsWith("file://")) {
|
|
101
|
-
result = result.slice(7);
|
|
102
|
-
try {
|
|
103
|
-
result = decodeURIComponent(result);
|
|
104
|
-
} catch {}
|
|
105
|
-
}
|
|
106
|
-
return expandTilde(result);
|
|
107
|
-
}
|
|
108
|
-
function isPathWithinRoot(candidate, root) {
|
|
109
|
-
const relative = path$3.relative(root, candidate);
|
|
110
|
-
return relative === "" || !relative.startsWith("..") && !path$3.isAbsolute(relative);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Remap legacy or hallucinated QQ Bot local media paths to real files when possible.
|
|
114
|
-
*/
|
|
115
|
-
function resolveQQBotLocalMediaPath(p) {
|
|
116
|
-
const normalized = normalizePath(p);
|
|
117
|
-
if (!isLocalPath(normalized) || fs.existsSync(normalized)) return normalized;
|
|
118
|
-
const homeDir = getHomeDir();
|
|
119
|
-
const mediaRoot = getQQBotMediaDir();
|
|
120
|
-
const dataRoot = getQQBotDataDir();
|
|
121
|
-
const candidateRoots = [
|
|
122
|
-
{
|
|
123
|
-
from: path$3.join(homeDir, ".openclaw", "workspace", "qqbot"),
|
|
124
|
-
to: mediaRoot
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
from: dataRoot,
|
|
128
|
-
to: mediaRoot
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
from: mediaRoot,
|
|
132
|
-
to: dataRoot
|
|
133
|
-
}
|
|
134
|
-
];
|
|
135
|
-
for (const { from, to } of candidateRoots) {
|
|
136
|
-
if (!isPathWithinRoot(normalized, from)) continue;
|
|
137
|
-
const relative = path$3.relative(from, normalized);
|
|
138
|
-
const candidate = path$3.join(to, relative);
|
|
139
|
-
if (fs.existsSync(candidate)) {
|
|
140
|
-
debugWarn(`[platform] Remapped missing QQBot media path ${normalized} -> ${candidate}`);
|
|
141
|
-
return candidate;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return normalized;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Resolve a structured-payload local file path and enforce that it stays within
|
|
148
|
-
* QQ Bot-owned storage roots.
|
|
149
|
-
*/
|
|
150
|
-
function resolveQQBotPayloadLocalFilePath(p) {
|
|
151
|
-
const candidate = resolveQQBotLocalMediaPath(p);
|
|
152
|
-
if (!candidate.trim()) return null;
|
|
153
|
-
const resolvedCandidate = path$3.resolve(candidate);
|
|
154
|
-
if (!fs.existsSync(resolvedCandidate)) return null;
|
|
155
|
-
const canonicalCandidate = fs.realpathSync(resolvedCandidate);
|
|
156
|
-
const allowedRoots = [getQQBotMediaDir()];
|
|
157
|
-
for (const root of allowedRoots) {
|
|
158
|
-
const resolvedRoot = path$3.resolve(root);
|
|
159
|
-
if (isPathWithinRoot(canonicalCandidate, fs.existsSync(resolvedRoot) ? fs.realpathSync(resolvedRoot) : resolvedRoot)) return canonicalCandidate;
|
|
160
|
-
}
|
|
161
|
-
return null;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Normalize filenames into a UTF-8 form that the QQ Bot API accepts reliably.
|
|
165
|
-
*
|
|
166
|
-
* This decodes percent-escaped names, converts Unicode to NFC, and strips ASCII
|
|
167
|
-
* control characters.
|
|
168
|
-
*/
|
|
169
|
-
function sanitizeFileName(name) {
|
|
170
|
-
if (!name) return name;
|
|
171
|
-
let result = name.trim();
|
|
172
|
-
if (result.includes("%")) try {
|
|
173
|
-
result = decodeURIComponent(result);
|
|
174
|
-
} catch {}
|
|
175
|
-
result = result.normalize("NFC");
|
|
176
|
-
result = result.replace(/[\x00-\x1F\x7F]/g, "");
|
|
177
|
-
return result;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Return true when the string looks like a local filesystem path rather than a URL.
|
|
181
|
-
*/
|
|
182
|
-
function isLocalPath(p) {
|
|
183
|
-
if (!p) return false;
|
|
184
|
-
if (p.startsWith("file://")) return true;
|
|
185
|
-
if (p === "~" || p.startsWith("~/") || p.startsWith("~\\")) return true;
|
|
186
|
-
if (p.startsWith("/")) return true;
|
|
187
|
-
if (/^[a-zA-Z]:[\\/]/.test(p)) return true;
|
|
188
|
-
if (p.startsWith("\\\\")) return true;
|
|
189
|
-
if (p.startsWith("./") || p.startsWith("../")) return true;
|
|
190
|
-
if (p.startsWith(".\\") || p.startsWith("..\\")) return true;
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
let _ffmpegPath;
|
|
194
|
-
let _ffmpegCheckPromise = null;
|
|
195
|
-
/** Detect ffmpeg and return an executable path when available. */
|
|
196
|
-
function detectFfmpeg() {
|
|
197
|
-
if (_ffmpegPath !== void 0) return Promise.resolve(_ffmpegPath);
|
|
198
|
-
if (_ffmpegCheckPromise) return _ffmpegCheckPromise;
|
|
199
|
-
_ffmpegCheckPromise = (async () => {
|
|
200
|
-
const envPath = process.env.FFMPEG_PATH;
|
|
201
|
-
if (envPath) {
|
|
202
|
-
if (await testExecutable(envPath, ["-version"])) {
|
|
203
|
-
_ffmpegPath = envPath;
|
|
204
|
-
debugLog(`[platform] ffmpeg found via FFMPEG_PATH: ${envPath}`);
|
|
205
|
-
return _ffmpegPath;
|
|
206
|
-
}
|
|
207
|
-
debugWarn(`[platform] FFMPEG_PATH set but not working: ${envPath}`);
|
|
208
|
-
}
|
|
209
|
-
const cmd = isWindows() ? "ffmpeg.exe" : "ffmpeg";
|
|
210
|
-
if (await testExecutable(cmd, ["-version"])) {
|
|
211
|
-
_ffmpegPath = cmd;
|
|
212
|
-
debugLog(`[platform] ffmpeg detected in PATH`);
|
|
213
|
-
return _ffmpegPath;
|
|
214
|
-
}
|
|
215
|
-
const commonPaths = isWindows() ? [
|
|
216
|
-
"C:\\ffmpeg\\bin\\ffmpeg.exe",
|
|
217
|
-
path$3.join(process.env.LOCALAPPDATA || "", "Programs", "ffmpeg", "bin", "ffmpeg.exe"),
|
|
218
|
-
path$3.join(process.env.ProgramFiles || "", "ffmpeg", "bin", "ffmpeg.exe")
|
|
219
|
-
] : [
|
|
220
|
-
"/usr/local/bin/ffmpeg",
|
|
221
|
-
"/opt/homebrew/bin/ffmpeg",
|
|
222
|
-
"/usr/bin/ffmpeg",
|
|
223
|
-
"/snap/bin/ffmpeg"
|
|
224
|
-
];
|
|
225
|
-
for (const p of commonPaths) if (p && fs.existsSync(p)) {
|
|
226
|
-
if (await testExecutable(p, ["-version"])) {
|
|
227
|
-
_ffmpegPath = p;
|
|
228
|
-
debugLog(`[platform] ffmpeg found at: ${p}`);
|
|
229
|
-
return _ffmpegPath;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
_ffmpegPath = null;
|
|
233
|
-
return null;
|
|
234
|
-
})().finally(() => {
|
|
235
|
-
_ffmpegCheckPromise = null;
|
|
236
|
-
});
|
|
237
|
-
return _ffmpegCheckPromise;
|
|
238
|
-
}
|
|
239
|
-
/** Return true when an executable responds successfully to the given args. */
|
|
240
|
-
function testExecutable(cmd, args) {
|
|
241
|
-
return new Promise((resolve) => {
|
|
242
|
-
execFile(cmd, args, { timeout: 5e3 }, (err) => {
|
|
243
|
-
resolve(!err);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
let _silkWasmAvailable = null;
|
|
248
|
-
/** Check whether silk-wasm can run in the current environment. */
|
|
249
|
-
async function checkSilkWasmAvailable() {
|
|
250
|
-
if (_silkWasmAvailable !== null) return _silkWasmAvailable;
|
|
251
|
-
try {
|
|
252
|
-
const { isSilk } = await import("silk-wasm");
|
|
253
|
-
isSilk(new Uint8Array(0));
|
|
254
|
-
_silkWasmAvailable = true;
|
|
255
|
-
debugLog("[platform] silk-wasm: available");
|
|
256
|
-
} catch (err) {
|
|
257
|
-
_silkWasmAvailable = false;
|
|
258
|
-
debugWarn(`[platform] silk-wasm: NOT available (${err instanceof Error ? err.message : String(err)})`);
|
|
259
|
-
}
|
|
260
|
-
return _silkWasmAvailable;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Run startup diagnostics and return an environment report.
|
|
264
|
-
* Called during gateway startup to log environment details and warnings.
|
|
265
|
-
*/
|
|
266
|
-
async function runDiagnostics() {
|
|
267
|
-
const warnings = [];
|
|
268
|
-
const platform = `${process.platform} (${os$1.release()})`;
|
|
269
|
-
const arch = process.arch;
|
|
270
|
-
const nodeVersion = process.version;
|
|
271
|
-
const homeDir = getHomeDir();
|
|
272
|
-
const tempDir = getTempDir();
|
|
273
|
-
const dataDir = getQQBotDataDir();
|
|
274
|
-
const ffmpegPath = await detectFfmpeg();
|
|
275
|
-
if (!ffmpegPath) warnings.push(isWindows() ? "⚠️ ffmpeg is not installed. Audio/video conversion will be limited. Install it with choco install ffmpeg, scoop install ffmpeg, or from https://ffmpeg.org." : getPlatform() === "darwin" ? "⚠️ ffmpeg is not installed. Audio/video conversion will be limited. Install it with brew install ffmpeg." : "⚠️ ffmpeg is not installed. Audio/video conversion will be limited. Install it with sudo apt install ffmpeg or sudo yum install ffmpeg.");
|
|
276
|
-
const silkWasm = await checkSilkWasmAvailable();
|
|
277
|
-
if (!silkWasm) warnings.push("⚠️ silk-wasm is unavailable. QQ voice send/receive will not work. Ensure Node.js >= 16 and WASM support are available.");
|
|
278
|
-
try {
|
|
279
|
-
const testFile = path$3.join(dataDir, ".write-test");
|
|
280
|
-
fs.writeFileSync(testFile, "test");
|
|
281
|
-
fs.unlinkSync(testFile);
|
|
282
|
-
} catch {
|
|
283
|
-
warnings.push(`⚠️ Data directory is not writable: ${dataDir}. Check filesystem permissions.`);
|
|
284
|
-
}
|
|
285
|
-
if (isWindows()) {
|
|
286
|
-
if (/[\u4e00-\u9fa5]/.test(homeDir) || homeDir.includes(" ")) warnings.push(`⚠️ Home directory contains Chinese characters or spaces: ${homeDir}. Some tools may fail. Consider setting QQBOT_DATA_DIR to an ASCII-only path.`);
|
|
287
|
-
}
|
|
288
|
-
const report = {
|
|
289
|
-
platform,
|
|
290
|
-
arch,
|
|
291
|
-
nodeVersion,
|
|
292
|
-
homeDir,
|
|
293
|
-
tempDir,
|
|
294
|
-
dataDir,
|
|
295
|
-
ffmpeg: ffmpegPath,
|
|
296
|
-
silkWasm,
|
|
297
|
-
warnings
|
|
298
|
-
};
|
|
299
|
-
debugLog("=== QQBot Environment Diagnostics ===");
|
|
300
|
-
debugLog(` Platform: ${platform} (${arch})`);
|
|
301
|
-
debugLog(` Node: ${nodeVersion}`);
|
|
302
|
-
debugLog(` Home: ${homeDir}`);
|
|
303
|
-
debugLog(` Data dir: ${dataDir}`);
|
|
304
|
-
debugLog(` ffmpeg: ${ffmpegPath ?? "not installed"}`);
|
|
305
|
-
debugLog(` silk-wasm: ${silkWasm ? "available" : "unavailable"}`);
|
|
306
|
-
if (warnings.length > 0) {
|
|
307
|
-
debugLog(" --- Warnings ---");
|
|
308
|
-
for (const w of warnings) debugLog(` ${w}`);
|
|
309
|
-
}
|
|
310
|
-
debugLog("======================");
|
|
311
|
-
return report;
|
|
312
|
-
}
|
|
313
|
-
//#endregion
|
|
314
|
-
//#region extensions/qqbot/src/utils/upload-cache.ts
|
|
315
|
-
/**
|
|
316
|
-
* Cache `file_info` values returned by the QQ Bot API so identical uploads can be reused
|
|
317
|
-
* before the server-side TTL expires.
|
|
318
|
-
*/
|
|
319
|
-
const cache = /* @__PURE__ */ new Map();
|
|
320
|
-
const MAX_CACHE_SIZE = 500;
|
|
321
|
-
/** Compute an MD5 hash used as part of the cache key. */
|
|
322
|
-
function computeFileHash(data) {
|
|
323
|
-
const content = typeof data === "string" ? data : data;
|
|
324
|
-
return crypto$1.createHash("md5").update(content).digest("hex");
|
|
325
|
-
}
|
|
326
|
-
/** Build the in-memory cache key. */
|
|
327
|
-
function buildCacheKey(contentHash, scope, targetId, fileType) {
|
|
328
|
-
return `${contentHash}:${scope}:${targetId}:${fileType}`;
|
|
329
|
-
}
|
|
330
|
-
/** Look up a cached `file_info` value. */
|
|
331
|
-
function getCachedFileInfo(contentHash, scope, targetId, fileType) {
|
|
332
|
-
const key = buildCacheKey(contentHash, scope, targetId, fileType);
|
|
333
|
-
const entry = cache.get(key);
|
|
334
|
-
if (!entry) return null;
|
|
335
|
-
if (Date.now() >= entry.expiresAt) {
|
|
336
|
-
cache.delete(key);
|
|
337
|
-
return null;
|
|
338
|
-
}
|
|
339
|
-
debugLog(`[upload-cache] Cache HIT: key=${key.slice(0, 40)}..., fileUuid=${entry.fileUuid}`);
|
|
340
|
-
return entry.fileInfo;
|
|
341
|
-
}
|
|
342
|
-
/** Store an upload result in the cache. */
|
|
343
|
-
function setCachedFileInfo(contentHash, scope, targetId, fileType, fileInfo, fileUuid, ttl) {
|
|
344
|
-
if (cache.size >= MAX_CACHE_SIZE) {
|
|
345
|
-
const now = Date.now();
|
|
346
|
-
for (const [k, v] of cache) if (now >= v.expiresAt) cache.delete(k);
|
|
347
|
-
if (cache.size >= MAX_CACHE_SIZE) {
|
|
348
|
-
const keys = Array.from(cache.keys());
|
|
349
|
-
for (let i = 0; i < keys.length / 2; i++) cache.delete(keys[i]);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
const key = buildCacheKey(contentHash, scope, targetId, fileType);
|
|
353
|
-
const effectiveTtl = Math.max(ttl - 60, 10);
|
|
354
|
-
cache.set(key, {
|
|
355
|
-
fileInfo,
|
|
356
|
-
fileUuid,
|
|
357
|
-
expiresAt: Date.now() + effectiveTtl * 1e3
|
|
358
|
-
});
|
|
359
|
-
debugLog(`[upload-cache] Cache SET: key=${key.slice(0, 40)}..., ttl=${effectiveTtl}s, uuid=${fileUuid}`);
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region extensions/qqbot/src/api.ts
|
|
363
|
-
const API_BASE = "https://api.sgroup.qq.com";
|
|
364
|
-
const TOKEN_URL = "https://bots.qq.com/app/getAppAccessToken";
|
|
365
|
-
const _require = createRequire(import.meta.url);
|
|
366
|
-
let _pluginVersion = "unknown";
|
|
367
|
-
try {
|
|
368
|
-
_pluginVersion = _require("../package.json").version ?? "unknown";
|
|
369
|
-
} catch {}
|
|
370
|
-
const PLUGIN_USER_AGENT = `QQBotPlugin/${_pluginVersion} (Node/${process.versions.node}; ${os.platform()})`;
|
|
371
|
-
const markdownSupportMap = /* @__PURE__ */ new Map();
|
|
372
|
-
const onMessageSentHookMap = /* @__PURE__ */ new Map();
|
|
373
|
-
/** Register an outbound-message hook scoped to one appId. */
|
|
374
|
-
function onMessageSent(appId, callback) {
|
|
375
|
-
onMessageSentHookMap.set(String(appId).trim(), callback);
|
|
376
|
-
}
|
|
377
|
-
/** Initialize per-app API behavior such as markdown support. */
|
|
378
|
-
function initApiConfig(appId, options) {
|
|
379
|
-
markdownSupportMap.set(String(appId).trim(), options.markdownSupport === true);
|
|
380
|
-
}
|
|
381
|
-
/** Return whether markdown is enabled for the given appId. */
|
|
382
|
-
function isMarkdownSupport(appId) {
|
|
383
|
-
return markdownSupportMap.get(String(appId).trim()) ?? false;
|
|
384
|
-
}
|
|
385
|
-
const tokenCacheMap = /* @__PURE__ */ new Map();
|
|
386
|
-
const tokenFetchPromises = /* @__PURE__ */ new Map();
|
|
387
|
-
/**
|
|
388
|
-
* Resolve an access token with caching and singleflight semantics.
|
|
389
|
-
*/
|
|
390
|
-
async function getAccessToken(appId, clientSecret) {
|
|
391
|
-
const normalizedAppId = String(appId).trim();
|
|
392
|
-
const cachedToken = tokenCacheMap.get(normalizedAppId);
|
|
393
|
-
const REFRESH_AHEAD_MS = cachedToken ? Math.min(300 * 1e3, (cachedToken.expiresAt - Date.now()) / 3) : 0;
|
|
394
|
-
if (cachedToken && Date.now() < cachedToken.expiresAt - REFRESH_AHEAD_MS) return cachedToken.token;
|
|
395
|
-
let fetchPromise = tokenFetchPromises.get(normalizedAppId);
|
|
396
|
-
if (fetchPromise) {
|
|
397
|
-
debugLog(`[qqbot-api:${normalizedAppId}] Token fetch in progress, waiting for existing request...`);
|
|
398
|
-
return fetchPromise;
|
|
399
|
-
}
|
|
400
|
-
fetchPromise = (async () => {
|
|
401
|
-
try {
|
|
402
|
-
return await doFetchToken(normalizedAppId, clientSecret);
|
|
403
|
-
} finally {
|
|
404
|
-
tokenFetchPromises.delete(normalizedAppId);
|
|
405
|
-
}
|
|
406
|
-
})();
|
|
407
|
-
tokenFetchPromises.set(normalizedAppId, fetchPromise);
|
|
408
|
-
return fetchPromise;
|
|
409
|
-
}
|
|
410
|
-
/** Perform the token fetch request. */
|
|
411
|
-
async function doFetchToken(appId, clientSecret) {
|
|
412
|
-
const requestBody = {
|
|
413
|
-
appId,
|
|
414
|
-
clientSecret
|
|
415
|
-
};
|
|
416
|
-
const requestHeaders = {
|
|
417
|
-
"Content-Type": "application/json",
|
|
418
|
-
"User-Agent": PLUGIN_USER_AGENT
|
|
419
|
-
};
|
|
420
|
-
debugLog(`[qqbot-api:${appId}] >>> POST ${TOKEN_URL}`);
|
|
421
|
-
let response;
|
|
422
|
-
try {
|
|
423
|
-
response = await fetch(TOKEN_URL, {
|
|
424
|
-
method: "POST",
|
|
425
|
-
headers: requestHeaders,
|
|
426
|
-
body: JSON.stringify(requestBody)
|
|
427
|
-
});
|
|
428
|
-
} catch (err) {
|
|
429
|
-
debugError(`[qqbot-api:${appId}] <<< Network error:`, err);
|
|
430
|
-
throw new Error(`Network error getting access_token: ${err instanceof Error ? err.message : String(err)}`);
|
|
431
|
-
}
|
|
432
|
-
const responseHeaders = {};
|
|
433
|
-
response.headers.forEach((value, key) => {
|
|
434
|
-
responseHeaders[key] = value;
|
|
435
|
-
});
|
|
436
|
-
const tokenTraceId = response.headers.get("x-tps-trace-id") ?? "";
|
|
437
|
-
debugLog(`[qqbot-api:${appId}] <<< Status: ${response.status} ${response.statusText}${tokenTraceId ? ` | TraceId: ${tokenTraceId}` : ""}`);
|
|
438
|
-
let data;
|
|
439
|
-
let rawBody;
|
|
440
|
-
try {
|
|
441
|
-
rawBody = await response.text();
|
|
442
|
-
const logBody = rawBody.replace(/"access_token"\s*:\s*"[^"]+"/g, "\"access_token\": \"***\"");
|
|
443
|
-
debugLog(`[qqbot-api:${appId}] <<< Body:`, logBody);
|
|
444
|
-
data = JSON.parse(rawBody);
|
|
445
|
-
} catch (err) {
|
|
446
|
-
debugError(`[qqbot-api:${appId}] <<< Parse error:`, err);
|
|
447
|
-
throw new Error(`Failed to parse access_token response: ${err instanceof Error ? err.message : String(err)}`);
|
|
448
|
-
}
|
|
449
|
-
if (!data.access_token) throw new Error(`Failed to get access_token: ${JSON.stringify(data)}`);
|
|
450
|
-
const expiresAt = Date.now() + (data.expires_in ?? 7200) * 1e3;
|
|
451
|
-
tokenCacheMap.set(appId, {
|
|
452
|
-
token: data.access_token,
|
|
453
|
-
expiresAt,
|
|
454
|
-
appId
|
|
455
|
-
});
|
|
456
|
-
debugLog(`[qqbot-api:${appId}] Token cached, expires at: ${new Date(expiresAt).toISOString()}`);
|
|
457
|
-
return data.access_token;
|
|
458
|
-
}
|
|
459
|
-
/** Clear one token cache or all token caches. */
|
|
460
|
-
function clearTokenCache(appId) {
|
|
461
|
-
if (appId) {
|
|
462
|
-
const normalizedAppId = String(appId).trim();
|
|
463
|
-
tokenCacheMap.delete(normalizedAppId);
|
|
464
|
-
debugLog(`[qqbot-api:${normalizedAppId}] Token cache cleared manually.`);
|
|
465
|
-
} else {
|
|
466
|
-
tokenCacheMap.clear();
|
|
467
|
-
debugLog(`[qqbot-api] All token caches cleared.`);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
/** Generate a message sequence in the 0..65535 range. */
|
|
471
|
-
function getNextMsgSeq(_msgId) {
|
|
472
|
-
return (Date.now() % 1e8 ^ Math.floor(Math.random() * 65536)) % 65536;
|
|
473
|
-
}
|
|
474
|
-
const DEFAULT_API_TIMEOUT = 3e4;
|
|
475
|
-
const FILE_UPLOAD_TIMEOUT = 12e4;
|
|
476
|
-
/** Shared API request wrapper. */
|
|
477
|
-
async function apiRequest(accessToken, method, path, body, timeoutMs) {
|
|
478
|
-
const url = `${API_BASE}${path}`;
|
|
479
|
-
const headers = {
|
|
480
|
-
Authorization: `QQBot ${accessToken}`,
|
|
481
|
-
"Content-Type": "application/json",
|
|
482
|
-
"User-Agent": PLUGIN_USER_AGENT
|
|
483
|
-
};
|
|
484
|
-
const isFileUpload = path.includes("/files");
|
|
485
|
-
const timeout = timeoutMs ?? (isFileUpload ? FILE_UPLOAD_TIMEOUT : DEFAULT_API_TIMEOUT);
|
|
486
|
-
const controller = new AbortController();
|
|
487
|
-
const timeoutId = setTimeout(() => {
|
|
488
|
-
controller.abort();
|
|
489
|
-
}, timeout);
|
|
490
|
-
const options = {
|
|
491
|
-
method,
|
|
492
|
-
headers,
|
|
493
|
-
signal: controller.signal
|
|
494
|
-
};
|
|
495
|
-
if (body) options.body = JSON.stringify(body);
|
|
496
|
-
debugLog(`[qqbot-api] >>> ${method} ${url} (timeout: ${timeout}ms)`);
|
|
497
|
-
if (body) {
|
|
498
|
-
const logBody = { ...body };
|
|
499
|
-
if (typeof logBody.file_data === "string") logBody.file_data = `<base64 ${logBody.file_data.length} chars>`;
|
|
500
|
-
debugLog(`[qqbot-api] >>> Body:`, JSON.stringify(logBody));
|
|
501
|
-
}
|
|
502
|
-
let res;
|
|
503
|
-
try {
|
|
504
|
-
res = await fetch(url, options);
|
|
505
|
-
} catch (err) {
|
|
506
|
-
clearTimeout(timeoutId);
|
|
507
|
-
if (err instanceof Error && err.name === "AbortError") {
|
|
508
|
-
debugError(`[qqbot-api] <<< Request timeout after ${timeout}ms`);
|
|
509
|
-
throw new Error(`Request timeout[${path}]: exceeded ${timeout}ms`);
|
|
510
|
-
}
|
|
511
|
-
debugError(`[qqbot-api] <<< Network error:`, err);
|
|
512
|
-
throw new Error(`Network error [${path}]: ${err instanceof Error ? err.message : String(err)}`);
|
|
513
|
-
} finally {
|
|
514
|
-
clearTimeout(timeoutId);
|
|
515
|
-
}
|
|
516
|
-
const responseHeaders = {};
|
|
517
|
-
res.headers.forEach((value, key) => {
|
|
518
|
-
responseHeaders[key] = value;
|
|
519
|
-
});
|
|
520
|
-
const traceId = res.headers.get("x-tps-trace-id") ?? "";
|
|
521
|
-
debugLog(`[qqbot-api] <<< Status: ${res.status} ${res.statusText}${traceId ? ` | TraceId: ${traceId}` : ""}`);
|
|
522
|
-
let data;
|
|
523
|
-
let rawBody;
|
|
524
|
-
try {
|
|
525
|
-
rawBody = await res.text();
|
|
526
|
-
debugLog(`[qqbot-api] <<< Body:`, rawBody);
|
|
527
|
-
data = JSON.parse(rawBody);
|
|
528
|
-
} catch (err) {
|
|
529
|
-
throw new Error(`Failed to parse response[${path}]: ${err instanceof Error ? err.message : String(err)}`);
|
|
530
|
-
}
|
|
531
|
-
if (!res.ok) throw new Error(`API Error [${path}]: ${data.message ?? JSON.stringify(data)}`);
|
|
532
|
-
return data;
|
|
533
|
-
}
|
|
534
|
-
const UPLOAD_MAX_RETRIES = 2;
|
|
535
|
-
const UPLOAD_BASE_DELAY_MS = 1e3;
|
|
536
|
-
async function apiRequestWithRetry(accessToken, method, path, body, maxRetries = UPLOAD_MAX_RETRIES) {
|
|
537
|
-
let lastError = null;
|
|
538
|
-
for (let attempt = 0; attempt <= maxRetries; attempt++) try {
|
|
539
|
-
return await apiRequest(accessToken, method, path, body);
|
|
540
|
-
} catch (err) {
|
|
541
|
-
lastError = err instanceof Error ? err : new Error(String(err));
|
|
542
|
-
const errMsg = lastError.message;
|
|
543
|
-
if (errMsg.includes("400") || errMsg.includes("401") || errMsg.includes("Invalid") || errMsg.includes("upload timeout") || errMsg.includes("timeout") || errMsg.includes("Timeout")) throw lastError;
|
|
544
|
-
if (attempt < maxRetries) {
|
|
545
|
-
const delay = UPLOAD_BASE_DELAY_MS * Math.pow(2, attempt);
|
|
546
|
-
debugLog(`[qqbot-api] Upload attempt ${attempt + 1} failed, retrying in ${delay}ms: ${errMsg.slice(0, 100)}`);
|
|
547
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
throw lastError;
|
|
551
|
-
}
|
|
552
|
-
async function getGatewayUrl(accessToken) {
|
|
553
|
-
return (await apiRequest(accessToken, "GET", "/gateway")).url;
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Send a message and invoke the refIdx hook when QQ returns one.
|
|
557
|
-
*/
|
|
558
|
-
async function sendAndNotify(appId, accessToken, method, path, body, meta) {
|
|
559
|
-
const result = await apiRequest(accessToken, method, path, body);
|
|
560
|
-
const hook = onMessageSentHookMap.get(String(appId).trim());
|
|
561
|
-
if (result.ext_info?.ref_idx && hook) try {
|
|
562
|
-
hook(result.ext_info.ref_idx, meta);
|
|
563
|
-
} catch (err) {
|
|
564
|
-
debugError(`[qqbot-api:${appId}] onMessageSent hook error: ${err}`);
|
|
565
|
-
}
|
|
566
|
-
return result;
|
|
567
|
-
}
|
|
568
|
-
function buildMessageBody(appId, content, msgId, msgSeq, messageReference) {
|
|
569
|
-
const md = isMarkdownSupport(appId);
|
|
570
|
-
const body = md ? {
|
|
571
|
-
markdown: { content },
|
|
572
|
-
msg_type: 2,
|
|
573
|
-
msg_seq: msgSeq
|
|
574
|
-
} : {
|
|
575
|
-
content,
|
|
576
|
-
msg_type: 0,
|
|
577
|
-
msg_seq: msgSeq
|
|
578
|
-
};
|
|
579
|
-
if (msgId) body.msg_id = msgId;
|
|
580
|
-
if (messageReference && !md) body.message_reference = { message_id: messageReference };
|
|
581
|
-
return body;
|
|
582
|
-
}
|
|
583
|
-
async function sendC2CMessage(appId, accessToken, openid, content, msgId, messageReference) {
|
|
584
|
-
const body = buildMessageBody(appId, content, msgId, msgId ? getNextMsgSeq(msgId) : 1, messageReference);
|
|
585
|
-
return sendAndNotify(appId, accessToken, "POST", `/v2/users/${openid}/messages`, body, { text: content });
|
|
586
|
-
}
|
|
587
|
-
async function sendC2CInputNotify(accessToken, openid, msgId, inputSecond = 60) {
|
|
588
|
-
const msgSeq = msgId ? getNextMsgSeq(msgId) : 1;
|
|
589
|
-
const body = {
|
|
590
|
-
msg_type: 6,
|
|
591
|
-
input_notify: {
|
|
592
|
-
input_type: 1,
|
|
593
|
-
input_second: inputSecond
|
|
594
|
-
},
|
|
595
|
-
msg_seq: msgSeq,
|
|
596
|
-
...msgId ? { msg_id: msgId } : {}
|
|
597
|
-
};
|
|
598
|
-
return { refIdx: (await apiRequest(accessToken, "POST", `/v2/users/${openid}/messages`, body)).ext_info?.ref_idx };
|
|
599
|
-
}
|
|
600
|
-
async function sendChannelMessage(accessToken, channelId, content, msgId) {
|
|
601
|
-
return apiRequest(accessToken, "POST", `/channels/${channelId}/messages`, {
|
|
602
|
-
content,
|
|
603
|
-
...msgId ? { msg_id: msgId } : {}
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
/** Send a direct-message payload inside a guild DM session. */
|
|
607
|
-
async function sendDmMessage(accessToken, guildId, content, msgId) {
|
|
608
|
-
return apiRequest(accessToken, "POST", `/dms/${guildId}/messages`, {
|
|
609
|
-
content,
|
|
610
|
-
...msgId ? { msg_id: msgId } : {}
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
async function sendGroupMessage(appId, accessToken, groupOpenid, content, msgId) {
|
|
614
|
-
const body = buildMessageBody(appId, content, msgId, msgId ? getNextMsgSeq(msgId) : 1);
|
|
615
|
-
return sendAndNotify(appId, accessToken, "POST", `/v2/groups/${groupOpenid}/messages`, body, { text: content });
|
|
616
|
-
}
|
|
617
|
-
function buildProactiveMessageBody(appId, content) {
|
|
618
|
-
if (!content || content.trim().length === 0) throw new Error("Proactive message content must not be empty (markdown.content is empty)");
|
|
619
|
-
if (isMarkdownSupport(appId)) return {
|
|
620
|
-
markdown: { content },
|
|
621
|
-
msg_type: 2
|
|
622
|
-
};
|
|
623
|
-
else return {
|
|
624
|
-
content,
|
|
625
|
-
msg_type: 0
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
async function sendProactiveC2CMessage(appId, accessToken, openid, content) {
|
|
629
|
-
const body = buildProactiveMessageBody(appId, content);
|
|
630
|
-
return sendAndNotify(appId, accessToken, "POST", `/v2/users/${openid}/messages`, body, { text: content });
|
|
631
|
-
}
|
|
632
|
-
async function sendProactiveGroupMessage(appId, accessToken, groupOpenid, content) {
|
|
633
|
-
const body = buildProactiveMessageBody(appId, content);
|
|
634
|
-
return apiRequest(accessToken, "POST", `/v2/groups/${groupOpenid}/messages`, body);
|
|
635
|
-
}
|
|
636
|
-
let MediaFileType = /* @__PURE__ */ function(MediaFileType) {
|
|
637
|
-
MediaFileType[MediaFileType["IMAGE"] = 1] = "IMAGE";
|
|
638
|
-
MediaFileType[MediaFileType["VIDEO"] = 2] = "VIDEO";
|
|
639
|
-
MediaFileType[MediaFileType["VOICE"] = 3] = "VOICE";
|
|
640
|
-
MediaFileType[MediaFileType["FILE"] = 4] = "FILE";
|
|
641
|
-
return MediaFileType;
|
|
642
|
-
}({});
|
|
643
|
-
async function uploadC2CMedia(accessToken, openid, fileType, url, fileData, srvSendMsg = false, fileName) {
|
|
644
|
-
if (!url && !fileData) throw new Error("uploadC2CMedia: url or fileData is required");
|
|
645
|
-
if (fileData) {
|
|
646
|
-
const cachedInfo = getCachedFileInfo(computeFileHash(fileData), "c2c", openid, fileType);
|
|
647
|
-
if (cachedInfo) return {
|
|
648
|
-
file_uuid: "",
|
|
649
|
-
file_info: cachedInfo,
|
|
650
|
-
ttl: 0
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
const body = {
|
|
654
|
-
file_type: fileType,
|
|
655
|
-
srv_send_msg: srvSendMsg
|
|
656
|
-
};
|
|
657
|
-
if (url) body.url = url;
|
|
658
|
-
else if (fileData) body.file_data = fileData;
|
|
659
|
-
if (fileType === MediaFileType.FILE && fileName) body.file_name = sanitizeFileName(fileName);
|
|
660
|
-
const result = await apiRequestWithRetry(accessToken, "POST", `/v2/users/${openid}/files`, body);
|
|
661
|
-
if (fileData && result.file_info && result.ttl > 0) setCachedFileInfo(computeFileHash(fileData), "c2c", openid, fileType, result.file_info, result.file_uuid, result.ttl);
|
|
662
|
-
return result;
|
|
663
|
-
}
|
|
664
|
-
async function uploadGroupMedia(accessToken, groupOpenid, fileType, url, fileData, srvSendMsg = false, fileName) {
|
|
665
|
-
if (!url && !fileData) throw new Error("uploadGroupMedia: url or fileData is required");
|
|
666
|
-
if (fileData) {
|
|
667
|
-
const cachedInfo = getCachedFileInfo(computeFileHash(fileData), "group", groupOpenid, fileType);
|
|
668
|
-
if (cachedInfo) return {
|
|
669
|
-
file_uuid: "",
|
|
670
|
-
file_info: cachedInfo,
|
|
671
|
-
ttl: 0
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
const body = {
|
|
675
|
-
file_type: fileType,
|
|
676
|
-
srv_send_msg: srvSendMsg
|
|
677
|
-
};
|
|
678
|
-
if (url) body.url = url;
|
|
679
|
-
else if (fileData) body.file_data = fileData;
|
|
680
|
-
if (fileType === MediaFileType.FILE && fileName) body.file_name = sanitizeFileName(fileName);
|
|
681
|
-
const result = await apiRequestWithRetry(accessToken, "POST", `/v2/groups/${groupOpenid}/files`, body);
|
|
682
|
-
if (fileData && result.file_info && result.ttl > 0) setCachedFileInfo(computeFileHash(fileData), "group", groupOpenid, fileType, result.file_info, result.file_uuid, result.ttl);
|
|
683
|
-
return result;
|
|
684
|
-
}
|
|
685
|
-
async function sendC2CMediaMessage(appId, accessToken, openid, fileInfo, msgId, content, meta) {
|
|
686
|
-
const msgSeq = msgId ? getNextMsgSeq(msgId) : 1;
|
|
687
|
-
return sendAndNotify(appId, accessToken, "POST", `/v2/users/${openid}/messages`, {
|
|
688
|
-
msg_type: 7,
|
|
689
|
-
media: { file_info: fileInfo },
|
|
690
|
-
msg_seq: msgSeq,
|
|
691
|
-
...content ? { content } : {},
|
|
692
|
-
...msgId ? { msg_id: msgId } : {}
|
|
693
|
-
}, meta ?? { text: content });
|
|
694
|
-
}
|
|
695
|
-
async function sendGroupMediaMessage(accessToken, groupOpenid, fileInfo, msgId, content) {
|
|
696
|
-
const msgSeq = msgId ? getNextMsgSeq(msgId) : 1;
|
|
697
|
-
return apiRequest(accessToken, "POST", `/v2/groups/${groupOpenid}/messages`, {
|
|
698
|
-
msg_type: 7,
|
|
699
|
-
media: { file_info: fileInfo },
|
|
700
|
-
msg_seq: msgSeq,
|
|
701
|
-
...content ? { content } : {},
|
|
702
|
-
...msgId ? { msg_id: msgId } : {}
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
async function sendC2CImageMessage(appId, accessToken, openid, imageUrl, msgId, content, localPath) {
|
|
706
|
-
let uploadResult;
|
|
707
|
-
const isBase64 = imageUrl.startsWith("data:");
|
|
708
|
-
if (isBase64) {
|
|
709
|
-
const matches = imageUrl.match(/^data:([^;]+);base64,(.+)$/);
|
|
710
|
-
if (!matches) throw new Error("Invalid Base64 Data URL format");
|
|
711
|
-
uploadResult = await uploadC2CMedia(accessToken, openid, MediaFileType.IMAGE, void 0, matches[2], false);
|
|
712
|
-
} else uploadResult = await uploadC2CMedia(accessToken, openid, MediaFileType.IMAGE, imageUrl, void 0, false);
|
|
713
|
-
const meta = {
|
|
714
|
-
text: content,
|
|
715
|
-
mediaType: "image",
|
|
716
|
-
...!isBase64 ? { mediaUrl: imageUrl } : {},
|
|
717
|
-
...localPath ? { mediaLocalPath: localPath } : {}
|
|
718
|
-
};
|
|
719
|
-
return sendC2CMediaMessage(appId, accessToken, openid, uploadResult.file_info, msgId, content, meta);
|
|
720
|
-
}
|
|
721
|
-
async function sendGroupImageMessage(appId, accessToken, groupOpenid, imageUrl, msgId, content) {
|
|
722
|
-
let uploadResult;
|
|
723
|
-
if (imageUrl.startsWith("data:")) {
|
|
724
|
-
const matches = imageUrl.match(/^data:([^;]+);base64,(.+)$/);
|
|
725
|
-
if (!matches) throw new Error("Invalid Base64 Data URL format");
|
|
726
|
-
uploadResult = await uploadGroupMedia(accessToken, groupOpenid, MediaFileType.IMAGE, void 0, matches[2], false);
|
|
727
|
-
} else uploadResult = await uploadGroupMedia(accessToken, groupOpenid, MediaFileType.IMAGE, imageUrl, void 0, false);
|
|
728
|
-
return sendGroupMediaMessage(accessToken, groupOpenid, uploadResult.file_info, msgId, content);
|
|
729
|
-
}
|
|
730
|
-
async function sendC2CVoiceMessage(appId, accessToken, openid, voiceBase64, voiceUrl, msgId, ttsText, filePath) {
|
|
731
|
-
return sendC2CMediaMessage(appId, accessToken, openid, (await uploadC2CMedia(accessToken, openid, MediaFileType.VOICE, voiceUrl, voiceBase64, false)).file_info, msgId, void 0, {
|
|
732
|
-
mediaType: "voice",
|
|
733
|
-
...ttsText ? { ttsText } : {},
|
|
734
|
-
...filePath ? { mediaLocalPath: filePath } : {}
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
async function sendGroupVoiceMessage(appId, accessToken, groupOpenid, voiceBase64, voiceUrl, msgId) {
|
|
738
|
-
return sendGroupMediaMessage(accessToken, groupOpenid, (await uploadGroupMedia(accessToken, groupOpenid, MediaFileType.VOICE, voiceUrl, voiceBase64, false)).file_info, msgId);
|
|
739
|
-
}
|
|
740
|
-
async function sendC2CFileMessage(appId, accessToken, openid, fileBase64, fileUrl, msgId, fileName, localFilePath) {
|
|
741
|
-
return sendC2CMediaMessage(appId, accessToken, openid, (await uploadC2CMedia(accessToken, openid, MediaFileType.FILE, fileUrl, fileBase64, false, fileName)).file_info, msgId, void 0, {
|
|
742
|
-
mediaType: "file",
|
|
743
|
-
mediaUrl: fileUrl,
|
|
744
|
-
mediaLocalPath: localFilePath ?? fileName
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
async function sendGroupFileMessage(appId, accessToken, groupOpenid, fileBase64, fileUrl, msgId, fileName) {
|
|
748
|
-
return sendGroupMediaMessage(accessToken, groupOpenid, (await uploadGroupMedia(accessToken, groupOpenid, MediaFileType.FILE, fileUrl, fileBase64, false, fileName)).file_info, msgId);
|
|
749
|
-
}
|
|
750
|
-
async function sendC2CVideoMessage(appId, accessToken, openid, videoUrl, videoBase64, msgId, content, localPath) {
|
|
751
|
-
return sendC2CMediaMessage(appId, accessToken, openid, (await uploadC2CMedia(accessToken, openid, MediaFileType.VIDEO, videoUrl, videoBase64, false)).file_info, msgId, content, {
|
|
752
|
-
text: content,
|
|
753
|
-
mediaType: "video",
|
|
754
|
-
...videoUrl ? { mediaUrl: videoUrl } : {},
|
|
755
|
-
...localPath ? { mediaLocalPath: localPath } : {}
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
async function sendGroupVideoMessage(appId, accessToken, groupOpenid, videoUrl, videoBase64, msgId, content) {
|
|
759
|
-
return sendGroupMediaMessage(accessToken, groupOpenid, (await uploadGroupMedia(accessToken, groupOpenid, MediaFileType.VIDEO, videoUrl, videoBase64, false)).file_info, msgId, content);
|
|
760
|
-
}
|
|
761
|
-
const backgroundRefreshControllers = /* @__PURE__ */ new Map();
|
|
762
|
-
function startBackgroundTokenRefresh(appId, clientSecret, options) {
|
|
763
|
-
if (backgroundRefreshControllers.has(appId)) {
|
|
764
|
-
debugLog(`[qqbot-api:${appId}] Background token refresh already running`);
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
|
-
const { refreshAheadMs = 300 * 1e3, randomOffsetMs = 30 * 1e3, minRefreshIntervalMs = 60 * 1e3, retryDelayMs = 5 * 1e3, log } = options ?? {};
|
|
768
|
-
const controller = new AbortController();
|
|
769
|
-
backgroundRefreshControllers.set(appId, controller);
|
|
770
|
-
const signal = controller.signal;
|
|
771
|
-
const refreshLoop = async () => {
|
|
772
|
-
log?.info?.(`[qqbot-api:${appId}] Background token refresh started`);
|
|
773
|
-
while (!signal.aborted) try {
|
|
774
|
-
await getAccessToken(appId, clientSecret);
|
|
775
|
-
const cached = tokenCacheMap.get(appId);
|
|
776
|
-
if (cached) {
|
|
777
|
-
const expiresIn = cached.expiresAt - Date.now();
|
|
778
|
-
const randomOffset = Math.random() * randomOffsetMs;
|
|
779
|
-
const refreshIn = Math.max(expiresIn - refreshAheadMs - randomOffset, minRefreshIntervalMs);
|
|
780
|
-
log?.debug?.(`[qqbot-api:${appId}] Token valid, next refresh in ${Math.round(refreshIn / 1e3)}s`);
|
|
781
|
-
await sleep(refreshIn, signal);
|
|
782
|
-
} else {
|
|
783
|
-
log?.debug?.(`[qqbot-api:${appId}] No cached token, retrying soon`);
|
|
784
|
-
await sleep(minRefreshIntervalMs, signal);
|
|
785
|
-
}
|
|
786
|
-
} catch (err) {
|
|
787
|
-
if (signal.aborted) break;
|
|
788
|
-
log?.error?.(`[qqbot-api:${appId}] Background token refresh failed: ${err}`);
|
|
789
|
-
await sleep(retryDelayMs, signal);
|
|
790
|
-
}
|
|
791
|
-
backgroundRefreshControllers.delete(appId);
|
|
792
|
-
log?.info?.(`[qqbot-api:${appId}] Background token refresh stopped`);
|
|
793
|
-
};
|
|
794
|
-
refreshLoop().catch((err) => {
|
|
795
|
-
backgroundRefreshControllers.delete(appId);
|
|
796
|
-
log?.error?.(`[qqbot-api:${appId}] Background token refresh crashed: ${err}`);
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Stop background token refresh.
|
|
801
|
-
* @param appId Optional appId to stop a single account instead of all refresh loops.
|
|
802
|
-
*/
|
|
803
|
-
function stopBackgroundTokenRefresh(appId) {
|
|
804
|
-
if (appId) {
|
|
805
|
-
const controller = backgroundRefreshControllers.get(appId);
|
|
806
|
-
if (controller) {
|
|
807
|
-
controller.abort();
|
|
808
|
-
backgroundRefreshControllers.delete(appId);
|
|
809
|
-
}
|
|
810
|
-
} else {
|
|
811
|
-
for (const controller of backgroundRefreshControllers.values()) controller.abort();
|
|
812
|
-
backgroundRefreshControllers.clear();
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
async function sleep(ms, signal) {
|
|
816
|
-
return new Promise((resolve, reject) => {
|
|
817
|
-
const timer = setTimeout(resolve, ms);
|
|
818
|
-
if (signal) {
|
|
819
|
-
if (signal.aborted) {
|
|
820
|
-
clearTimeout(timer);
|
|
821
|
-
reject(/* @__PURE__ */ new Error("Aborted"));
|
|
822
|
-
return;
|
|
823
|
-
}
|
|
824
|
-
const onAbort = () => {
|
|
825
|
-
clearTimeout(timer);
|
|
826
|
-
reject(/* @__PURE__ */ new Error("Aborted"));
|
|
827
|
-
};
|
|
828
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
//#endregion
|
|
833
|
-
//#region extensions/qqbot/src/utils/audio-convert.ts
|
|
834
|
-
let _silkWasmPromise = null;
|
|
835
|
-
function loadSilkWasm() {
|
|
836
|
-
if (_silkWasmPromise) return _silkWasmPromise;
|
|
837
|
-
_silkWasmPromise = import("silk-wasm").catch((err) => {
|
|
838
|
-
debugWarn(`[audio-convert] silk-wasm not available; SILK encode/decode disabled (${err instanceof Error ? err.message : String(err)})`);
|
|
839
|
-
return null;
|
|
840
|
-
});
|
|
841
|
-
return _silkWasmPromise;
|
|
842
|
-
}
|
|
843
|
-
/** Wrap PCM s16le bytes in a WAV container. */
|
|
844
|
-
function pcmToWav(pcmData, sampleRate, channels = 1, bitsPerSample = 16) {
|
|
845
|
-
const byteRate = sampleRate * channels * (bitsPerSample / 8);
|
|
846
|
-
const blockAlign = channels * (bitsPerSample / 8);
|
|
847
|
-
const dataSize = pcmData.length;
|
|
848
|
-
const headerSize = 44;
|
|
849
|
-
const fileSize = headerSize + dataSize;
|
|
850
|
-
const buffer = Buffer.alloc(fileSize);
|
|
851
|
-
buffer.write("RIFF", 0);
|
|
852
|
-
buffer.writeUInt32LE(fileSize - 8, 4);
|
|
853
|
-
buffer.write("WAVE", 8);
|
|
854
|
-
buffer.write("fmt ", 12);
|
|
855
|
-
buffer.writeUInt32LE(16, 16);
|
|
856
|
-
buffer.writeUInt16LE(1, 20);
|
|
857
|
-
buffer.writeUInt16LE(channels, 22);
|
|
858
|
-
buffer.writeUInt32LE(sampleRate, 24);
|
|
859
|
-
buffer.writeUInt32LE(byteRate, 28);
|
|
860
|
-
buffer.writeUInt16LE(blockAlign, 32);
|
|
861
|
-
buffer.writeUInt16LE(bitsPerSample, 34);
|
|
862
|
-
buffer.write("data", 36);
|
|
863
|
-
buffer.writeUInt32LE(dataSize, 40);
|
|
864
|
-
Buffer.from(pcmData.buffer, pcmData.byteOffset, pcmData.byteLength).copy(buffer, headerSize);
|
|
865
|
-
return buffer;
|
|
866
|
-
}
|
|
867
|
-
/** Strip a leading AMR header from QQ voice payloads when present. */
|
|
868
|
-
function stripAmrHeader(buf) {
|
|
869
|
-
const AMR_HEADER = Buffer.from("#!AMR\n");
|
|
870
|
-
if (buf.length > 6 && buf.subarray(0, 6).equals(AMR_HEADER)) return buf.subarray(6);
|
|
871
|
-
return buf;
|
|
872
|
-
}
|
|
873
|
-
/** Convert SILK or AMR voice files into WAV. */
|
|
874
|
-
async function convertSilkToWav(inputPath, outputDir) {
|
|
875
|
-
if (!fs.existsSync(inputPath)) return null;
|
|
876
|
-
const strippedBuf = stripAmrHeader(fs.readFileSync(inputPath));
|
|
877
|
-
const rawData = new Uint8Array(strippedBuf.buffer, strippedBuf.byteOffset, strippedBuf.byteLength);
|
|
878
|
-
const silk = await loadSilkWasm();
|
|
879
|
-
if (!silk || !silk.isSilk(rawData)) return null;
|
|
880
|
-
const sampleRate = 24e3;
|
|
881
|
-
const result = await silk.decode(rawData, sampleRate);
|
|
882
|
-
const wavBuffer = pcmToWav(result.data, sampleRate);
|
|
883
|
-
const dir = outputDir || path$3.dirname(inputPath);
|
|
884
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
885
|
-
const baseName = path$3.basename(inputPath, path$3.extname(inputPath));
|
|
886
|
-
const wavPath = path$3.join(dir, `${baseName}.wav`);
|
|
887
|
-
fs.writeFileSync(wavPath, wavBuffer);
|
|
888
|
-
return {
|
|
889
|
-
wavPath,
|
|
890
|
-
duration: result.duration
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
/** Return true when an attachment looks like a voice file. */
|
|
894
|
-
function isVoiceAttachment(att) {
|
|
895
|
-
if (att.content_type === "voice" || att.content_type?.startsWith("audio/")) return true;
|
|
896
|
-
const ext = att.filename ? path$3.extname(att.filename).toLowerCase() : "";
|
|
897
|
-
return [
|
|
898
|
-
".amr",
|
|
899
|
-
".silk",
|
|
900
|
-
".slk",
|
|
901
|
-
".slac"
|
|
902
|
-
].includes(ext);
|
|
903
|
-
}
|
|
904
|
-
/** Format a duration as a user-readable string. */
|
|
905
|
-
function formatDuration(durationMs) {
|
|
906
|
-
const seconds = Math.round(durationMs / 1e3);
|
|
907
|
-
if (seconds < 60) return `${seconds}s`;
|
|
908
|
-
const minutes = Math.floor(seconds / 60);
|
|
909
|
-
const remainSeconds = seconds % 60;
|
|
910
|
-
return remainSeconds > 0 ? `${minutes}m ${remainSeconds}s` : `${minutes}m`;
|
|
911
|
-
}
|
|
912
|
-
function isAudioFile(filePath, mimeType) {
|
|
913
|
-
if (mimeType) {
|
|
914
|
-
if (mimeType === "voice" || mimeType.startsWith("audio/")) return true;
|
|
915
|
-
}
|
|
916
|
-
const ext = path$3.extname(filePath).toLowerCase();
|
|
917
|
-
return [
|
|
918
|
-
".silk",
|
|
919
|
-
".slk",
|
|
920
|
-
".amr",
|
|
921
|
-
".wav",
|
|
922
|
-
".mp3",
|
|
923
|
-
".ogg",
|
|
924
|
-
".opus",
|
|
925
|
-
".aac",
|
|
926
|
-
".flac",
|
|
927
|
-
".m4a",
|
|
928
|
-
".wma",
|
|
929
|
-
".pcm"
|
|
930
|
-
].includes(ext);
|
|
931
|
-
}
|
|
932
|
-
/** Voice MIME types the QQ platform accepts without transcoding. */
|
|
933
|
-
const QQ_NATIVE_VOICE_MIMES = new Set([
|
|
934
|
-
"audio/silk",
|
|
935
|
-
"audio/amr",
|
|
936
|
-
"audio/wav",
|
|
937
|
-
"audio/wave",
|
|
938
|
-
"audio/x-wav",
|
|
939
|
-
"audio/mpeg",
|
|
940
|
-
"audio/mp3"
|
|
941
|
-
]);
|
|
942
|
-
/** Voice extensions the QQ platform accepts without transcoding. */
|
|
943
|
-
const QQ_NATIVE_VOICE_EXTS = new Set([
|
|
944
|
-
".silk",
|
|
945
|
-
".slk",
|
|
946
|
-
".amr",
|
|
947
|
-
".wav",
|
|
948
|
-
".mp3"
|
|
949
|
-
]);
|
|
950
|
-
/**
|
|
951
|
-
* Return true when voice input must be transcoded before upload.
|
|
952
|
-
*/
|
|
953
|
-
function shouldTranscodeVoice(filePath, mimeType) {
|
|
954
|
-
if (mimeType && QQ_NATIVE_VOICE_MIMES.has(mimeType.toLowerCase())) return false;
|
|
955
|
-
const ext = path$3.extname(filePath).toLowerCase();
|
|
956
|
-
if (QQ_NATIVE_VOICE_EXTS.has(ext)) return false;
|
|
957
|
-
return isAudioFile(filePath, mimeType);
|
|
958
|
-
}
|
|
959
|
-
function resolveTTSFromBlock(block, providerCfg) {
|
|
960
|
-
const baseUrl = block?.baseUrl || providerCfg?.baseUrl;
|
|
961
|
-
const apiKey = block?.apiKey || providerCfg?.apiKey;
|
|
962
|
-
const model = block?.model || "tts-1";
|
|
963
|
-
const voice = block?.voice || "alloy";
|
|
964
|
-
if (!baseUrl || !apiKey) return null;
|
|
965
|
-
const authStyle = (block?.authStyle || providerCfg?.authStyle) === "api-key" ? "api-key" : "bearer";
|
|
966
|
-
const queryParams = {
|
|
967
|
-
...providerCfg?.queryParams ?? {},
|
|
968
|
-
...block?.queryParams ?? {}
|
|
969
|
-
};
|
|
970
|
-
const speed = block?.speed;
|
|
971
|
-
return {
|
|
972
|
-
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
973
|
-
apiKey,
|
|
974
|
-
model,
|
|
975
|
-
voice,
|
|
976
|
-
authStyle,
|
|
977
|
-
...Object.keys(queryParams).length > 0 ? { queryParams } : {},
|
|
978
|
-
...speed !== void 0 ? { speed } : {}
|
|
979
|
-
};
|
|
980
|
-
}
|
|
981
|
-
function resolveTTSConfig(cfg) {
|
|
982
|
-
const c = cfg;
|
|
983
|
-
const channelTts = c?.channels?.qqbot?.tts;
|
|
984
|
-
if (channelTts && channelTts.enabled !== false) {
|
|
985
|
-
const providerId = channelTts?.provider || "openai";
|
|
986
|
-
const providerCfg = c?.models?.providers?.[providerId];
|
|
987
|
-
const result = resolveTTSFromBlock(channelTts, providerCfg);
|
|
988
|
-
if (result) return result;
|
|
989
|
-
}
|
|
990
|
-
const msgTts = c?.messages?.tts;
|
|
991
|
-
if (msgTts && msgTts.auto !== "off" && msgTts.auto !== "disabled") {
|
|
992
|
-
const providerId = msgTts?.provider || "openai";
|
|
993
|
-
const providerBlock = msgTts?.[providerId];
|
|
994
|
-
const providerCfg = c?.models?.providers?.[providerId];
|
|
995
|
-
const result = resolveTTSFromBlock(providerBlock ?? {}, providerCfg);
|
|
996
|
-
if (result) return result;
|
|
997
|
-
}
|
|
998
|
-
return null;
|
|
999
|
-
}
|
|
1000
|
-
/**
|
|
1001
|
-
* Check whether global TTS is potentially available by inspecting the
|
|
1002
|
-
* framework-level `messages.tts` config. This mirrors the resolution logic
|
|
1003
|
-
* in the core `resolveTtsConfig`: when `auto` is set it must not be `"off"`;
|
|
1004
|
-
* when only the legacy `enabled` boolean is present it must be truthy;
|
|
1005
|
-
* when neither is set TTS defaults to off.
|
|
1006
|
-
*
|
|
1007
|
-
* This does NOT guarantee a specific provider is registered/configured – it
|
|
1008
|
-
* only checks that TTS is not explicitly (or implicitly) disabled.
|
|
1009
|
-
*/
|
|
1010
|
-
function isGlobalTTSAvailable(cfg) {
|
|
1011
|
-
const msgTts = cfg.messages?.tts;
|
|
1012
|
-
if (!msgTts) return false;
|
|
1013
|
-
if (msgTts.auto) return msgTts.auto !== "off";
|
|
1014
|
-
return msgTts.enabled === true;
|
|
1015
|
-
}
|
|
1016
|
-
/** Build the TTS endpoint URL and auth headers. */
|
|
1017
|
-
function buildTTSRequest(ttsCfg) {
|
|
1018
|
-
let url = `${ttsCfg.baseUrl}/audio/speech`;
|
|
1019
|
-
if (ttsCfg.queryParams && Object.keys(ttsCfg.queryParams).length > 0) {
|
|
1020
|
-
const qs = new URLSearchParams(ttsCfg.queryParams).toString();
|
|
1021
|
-
url += `?${qs}`;
|
|
1022
|
-
}
|
|
1023
|
-
const headers = { "Content-Type": "application/json" };
|
|
1024
|
-
if (ttsCfg.authStyle === "api-key") headers["api-key"] = ttsCfg.apiKey;
|
|
1025
|
-
else headers["Authorization"] = `Bearer ${ttsCfg.apiKey}`;
|
|
1026
|
-
return {
|
|
1027
|
-
url,
|
|
1028
|
-
headers
|
|
1029
|
-
};
|
|
1030
|
-
}
|
|
1031
|
-
async function textToSpeechPCM(text, ttsCfg) {
|
|
1032
|
-
const sampleRate = 24e3;
|
|
1033
|
-
const { url, headers } = buildTTSRequest(ttsCfg);
|
|
1034
|
-
debugLog(`[tts] Request: model=${ttsCfg.model}, voice=${ttsCfg.voice}, authStyle=${ttsCfg.authStyle ?? "bearer"}, url=${url}`);
|
|
1035
|
-
debugLog(`[tts] Input text (${text.length} chars): "${text.slice(0, 80)}${text.length > 80 ? "..." : ""}"`);
|
|
1036
|
-
const formats = [{
|
|
1037
|
-
format: "pcm",
|
|
1038
|
-
needsDecode: false
|
|
1039
|
-
}, {
|
|
1040
|
-
format: "mp3",
|
|
1041
|
-
needsDecode: true
|
|
1042
|
-
}];
|
|
1043
|
-
let lastError = null;
|
|
1044
|
-
const startTime = Date.now();
|
|
1045
|
-
for (const { format, needsDecode } of formats) {
|
|
1046
|
-
const controller = new AbortController();
|
|
1047
|
-
const ttsTimeout = setTimeout(() => controller.abort(), 12e4);
|
|
1048
|
-
try {
|
|
1049
|
-
const body = {
|
|
1050
|
-
model: ttsCfg.model,
|
|
1051
|
-
input: text,
|
|
1052
|
-
voice: ttsCfg.voice,
|
|
1053
|
-
response_format: format,
|
|
1054
|
-
...format === "pcm" ? { sample_rate: sampleRate } : {},
|
|
1055
|
-
...ttsCfg.speed !== void 0 ? { speed: ttsCfg.speed } : {}
|
|
1056
|
-
};
|
|
1057
|
-
debugLog(`[tts] Trying format=${format}...`);
|
|
1058
|
-
const fetchStart = Date.now();
|
|
1059
|
-
const resp = await fetch(url, {
|
|
1060
|
-
method: "POST",
|
|
1061
|
-
headers,
|
|
1062
|
-
body: JSON.stringify(body),
|
|
1063
|
-
signal: controller.signal
|
|
1064
|
-
}).finally(() => clearTimeout(ttsTimeout));
|
|
1065
|
-
const fetchMs = Date.now() - fetchStart;
|
|
1066
|
-
if (!resp.ok) {
|
|
1067
|
-
const detail = await resp.text().catch(() => "");
|
|
1068
|
-
debugLog(`[tts] HTTP ${resp.status} for format=${format} (${fetchMs}ms): ${detail.slice(0, 200)}`);
|
|
1069
|
-
if (format === "pcm" && (resp.status === 400 || resp.status === 422)) {
|
|
1070
|
-
debugLog(`[tts] PCM format not supported, falling back to mp3`);
|
|
1071
|
-
lastError = /* @__PURE__ */ new Error(`TTS PCM not supported: ${detail.slice(0, 200)}`);
|
|
1072
|
-
continue;
|
|
1073
|
-
}
|
|
1074
|
-
throw new Error(`TTS failed (HTTP ${resp.status}): ${detail.slice(0, 300)}`);
|
|
1075
|
-
}
|
|
1076
|
-
const arrayBuffer = await resp.arrayBuffer();
|
|
1077
|
-
const rawBuffer = Buffer.from(arrayBuffer);
|
|
1078
|
-
debugLog(`[tts] Response OK: format=${format}, size=${rawBuffer.length} bytes, latency=${fetchMs}ms`);
|
|
1079
|
-
if (!needsDecode) {
|
|
1080
|
-
debugLog(`[tts] Done: PCM direct, ${rawBuffer.length} bytes, total=${Date.now() - startTime}ms`);
|
|
1081
|
-
return {
|
|
1082
|
-
pcmBuffer: rawBuffer,
|
|
1083
|
-
sampleRate
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
debugLog(`[tts] Decoding mp3 response (${rawBuffer.length} bytes) to PCM...`);
|
|
1087
|
-
const tmpDir = path$3.join(fs.mkdtempSync(path$3.join(__require("node:os").tmpdir(), "tts-")));
|
|
1088
|
-
const tmpMp3 = path$3.join(tmpDir, "tts.mp3");
|
|
1089
|
-
fs.writeFileSync(tmpMp3, rawBuffer);
|
|
1090
|
-
try {
|
|
1091
|
-
const ffmpegCmd = await checkFfmpeg();
|
|
1092
|
-
if (ffmpegCmd) {
|
|
1093
|
-
const pcmBuf = await ffmpegToPCM(ffmpegCmd, tmpMp3, sampleRate);
|
|
1094
|
-
debugLog(`[tts] Done: mp3→PCM (ffmpeg), ${pcmBuf.length} bytes, total=${Date.now() - startTime}ms`);
|
|
1095
|
-
return {
|
|
1096
|
-
pcmBuffer: pcmBuf,
|
|
1097
|
-
sampleRate
|
|
1098
|
-
};
|
|
1099
|
-
}
|
|
1100
|
-
const pcmBuf = await wasmDecodeMp3ToPCM(rawBuffer, sampleRate);
|
|
1101
|
-
if (pcmBuf) {
|
|
1102
|
-
debugLog(`[tts] Done: mp3→PCM (wasm), ${pcmBuf.length} bytes, total=${Date.now() - startTime}ms`);
|
|
1103
|
-
return {
|
|
1104
|
-
pcmBuffer: pcmBuf,
|
|
1105
|
-
sampleRate
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
throw new Error("No decoder available for mp3 (install ffmpeg for best compatibility)");
|
|
1109
|
-
} finally {
|
|
1110
|
-
try {
|
|
1111
|
-
fs.unlinkSync(tmpMp3);
|
|
1112
|
-
fs.rmdirSync(tmpDir);
|
|
1113
|
-
} catch {}
|
|
1114
|
-
}
|
|
1115
|
-
} catch (err) {
|
|
1116
|
-
clearTimeout(ttsTimeout);
|
|
1117
|
-
lastError = err instanceof Error ? err : new Error(String(err));
|
|
1118
|
-
debugLog(`[tts] Error for format=${format}: ${lastError.message.slice(0, 200)}`);
|
|
1119
|
-
if (format === "pcm") continue;
|
|
1120
|
-
throw lastError;
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
debugLog(`[tts] All formats exhausted after ${Date.now() - startTime}ms`);
|
|
1124
|
-
throw lastError ?? /* @__PURE__ */ new Error("TTS failed: all formats exhausted");
|
|
1125
|
-
}
|
|
1126
|
-
async function pcmToSilk(pcmBuffer, sampleRate) {
|
|
1127
|
-
const silk = await loadSilkWasm();
|
|
1128
|
-
if (!silk) throw new Error("silk-wasm is not available; cannot encode PCM to SILK");
|
|
1129
|
-
const pcmData = new Uint8Array(pcmBuffer.buffer, pcmBuffer.byteOffset, pcmBuffer.byteLength);
|
|
1130
|
-
const result = await silk.encode(pcmData, sampleRate);
|
|
1131
|
-
return {
|
|
1132
|
-
silkBuffer: Buffer.from(result.data.buffer, result.data.byteOffset, result.data.byteLength),
|
|
1133
|
-
duration: result.duration
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
async function textToSilk(text, ttsCfg, outputDir) {
|
|
1137
|
-
const { pcmBuffer, sampleRate } = await textToSpeechPCM(text, ttsCfg);
|
|
1138
|
-
const { silkBuffer, duration } = await pcmToSilk(pcmBuffer, sampleRate);
|
|
1139
|
-
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
|
1140
|
-
const silkPath = path$3.join(outputDir, `tts-${Date.now()}.silk`);
|
|
1141
|
-
fs.writeFileSync(silkPath, silkBuffer);
|
|
1142
|
-
return {
|
|
1143
|
-
silkPath,
|
|
1144
|
-
silkBase64: silkBuffer.toString("base64"),
|
|
1145
|
-
duration
|
|
1146
|
-
};
|
|
1147
|
-
}
|
|
1148
|
-
/** Upload formats accepted directly by the QQ Bot API. */
|
|
1149
|
-
const QQ_NATIVE_UPLOAD_FORMATS = [
|
|
1150
|
-
".wav",
|
|
1151
|
-
".mp3",
|
|
1152
|
-
".silk"
|
|
1153
|
-
];
|
|
1154
|
-
/**
|
|
1155
|
-
* Convert a local audio file into an uploadable Base64 payload.
|
|
1156
|
-
*/
|
|
1157
|
-
async function audioFileToSilkBase64(filePath, directUploadFormats) {
|
|
1158
|
-
if (!fs.existsSync(filePath)) return null;
|
|
1159
|
-
const buf = fs.readFileSync(filePath);
|
|
1160
|
-
if (buf.length === 0) {
|
|
1161
|
-
debugError(`[audio-convert] file is empty: ${filePath}`);
|
|
1162
|
-
return null;
|
|
1163
|
-
}
|
|
1164
|
-
const ext = path$3.extname(filePath).toLowerCase();
|
|
1165
|
-
if ((directUploadFormats ? normalizeFormats(directUploadFormats) : QQ_NATIVE_UPLOAD_FORMATS).includes(ext)) {
|
|
1166
|
-
debugLog(`[audio-convert] direct upload (QQ native format): ${ext} (${buf.length} bytes)`);
|
|
1167
|
-
return buf.toString("base64");
|
|
1168
|
-
}
|
|
1169
|
-
if ([".slk", ".slac"].includes(ext)) {
|
|
1170
|
-
const stripped = stripAmrHeader(buf);
|
|
1171
|
-
const raw = new Uint8Array(stripped.buffer, stripped.byteOffset, stripped.byteLength);
|
|
1172
|
-
if ((await loadSilkWasm())?.isSilk(raw)) {
|
|
1173
|
-
debugLog(`[audio-convert] SILK file, direct use: ${filePath} (${buf.length} bytes)`);
|
|
1174
|
-
return buf.toString("base64");
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
const rawCheck = new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
1178
|
-
const strippedCheck = stripAmrHeader(buf);
|
|
1179
|
-
const strippedRaw = new Uint8Array(strippedCheck.buffer, strippedCheck.byteOffset, strippedCheck.byteLength);
|
|
1180
|
-
const silkForCheck = await loadSilkWasm();
|
|
1181
|
-
if (silkForCheck?.isSilk(rawCheck) || silkForCheck?.isSilk(strippedRaw)) {
|
|
1182
|
-
debugLog(`[audio-convert] SILK detected by header: ${filePath} (${buf.length} bytes)`);
|
|
1183
|
-
return buf.toString("base64");
|
|
1184
|
-
}
|
|
1185
|
-
const targetRate = 24e3;
|
|
1186
|
-
const ffmpegCmd = await checkFfmpeg();
|
|
1187
|
-
if (ffmpegCmd) try {
|
|
1188
|
-
debugLog(`[audio-convert] ffmpeg (${ffmpegCmd}): converting ${ext} (${buf.length} bytes) → PCM s16le ${targetRate}Hz`);
|
|
1189
|
-
const pcmBuf = await ffmpegToPCM(ffmpegCmd, filePath, targetRate);
|
|
1190
|
-
if (pcmBuf.length === 0) {
|
|
1191
|
-
debugError(`[audio-convert] ffmpeg produced empty PCM output`);
|
|
1192
|
-
return null;
|
|
1193
|
-
}
|
|
1194
|
-
const { silkBuffer } = await pcmToSilk(pcmBuf, targetRate);
|
|
1195
|
-
debugLog(`[audio-convert] ffmpeg: ${ext} → SILK done (${silkBuffer.length} bytes)`);
|
|
1196
|
-
return silkBuffer.toString("base64");
|
|
1197
|
-
} catch (err) {
|
|
1198
|
-
debugError(`[audio-convert] ffmpeg conversion failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1199
|
-
}
|
|
1200
|
-
debugLog(`[audio-convert] fallback: trying WASM decoders for ${ext}`);
|
|
1201
|
-
if (ext === ".pcm") {
|
|
1202
|
-
const { silkBuffer } = await pcmToSilk(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength), targetRate);
|
|
1203
|
-
return silkBuffer.toString("base64");
|
|
1204
|
-
}
|
|
1205
|
-
if (ext === ".wav" || buf.length >= 4 && buf.toString("ascii", 0, 4) === "RIFF") {
|
|
1206
|
-
const wavInfo = parseWavFallback(buf);
|
|
1207
|
-
if (wavInfo) {
|
|
1208
|
-
const { silkBuffer } = await pcmToSilk(wavInfo, targetRate);
|
|
1209
|
-
return silkBuffer.toString("base64");
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
if (ext === ".mp3" || ext === ".mpeg") {
|
|
1213
|
-
const pcmBuf = await wasmDecodeMp3ToPCM(buf, targetRate);
|
|
1214
|
-
if (pcmBuf) {
|
|
1215
|
-
const { silkBuffer } = await pcmToSilk(pcmBuf, targetRate);
|
|
1216
|
-
debugLog(`[audio-convert] WASM: MP3 → SILK done (${silkBuffer.length} bytes)`);
|
|
1217
|
-
return silkBuffer.toString("base64");
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
debugError(`[audio-convert] unsupported format: ${ext} (no ffmpeg available). ${isWindows() ? "Install ffmpeg with choco install ffmpeg, scoop install ffmpeg, or from https://ffmpeg.org" : process.platform === "darwin" ? "Install ffmpeg with brew install ffmpeg" : "Install ffmpeg with sudo apt install ffmpeg or sudo yum install ffmpeg"}`);
|
|
1221
|
-
return null;
|
|
1222
|
-
}
|
|
1223
|
-
/**
|
|
1224
|
-
* Wait until a file exists and its size has stabilized.
|
|
1225
|
-
*/
|
|
1226
|
-
async function waitForFile(filePath, timeoutMs = 3e4, pollMs = 500) {
|
|
1227
|
-
const start = Date.now();
|
|
1228
|
-
let lastSize = -1;
|
|
1229
|
-
let stableCount = 0;
|
|
1230
|
-
let fileExists = false;
|
|
1231
|
-
let fileAppearedAt = 0;
|
|
1232
|
-
let pollCount = 0;
|
|
1233
|
-
const emptyGiveUpMs = 1e4;
|
|
1234
|
-
const noFileGiveUpMs = 15e3;
|
|
1235
|
-
while (Date.now() - start < timeoutMs) {
|
|
1236
|
-
pollCount++;
|
|
1237
|
-
try {
|
|
1238
|
-
const stat = fs.statSync(filePath);
|
|
1239
|
-
if (!fileExists) {
|
|
1240
|
-
fileExists = true;
|
|
1241
|
-
fileAppearedAt = Date.now();
|
|
1242
|
-
debugLog(`[audio-convert] waitForFile: file appeared (${stat.size} bytes, after ${Date.now() - start}ms): ${path$3.basename(filePath)}`);
|
|
1243
|
-
}
|
|
1244
|
-
if (stat.size > 0) {
|
|
1245
|
-
if (stat.size === lastSize) {
|
|
1246
|
-
stableCount++;
|
|
1247
|
-
if (stableCount >= 2) {
|
|
1248
|
-
debugLog(`[audio-convert] waitForFile: ready (${stat.size} bytes, waited ${Date.now() - start}ms, polls=${pollCount})`);
|
|
1249
|
-
return stat.size;
|
|
1250
|
-
}
|
|
1251
|
-
} else stableCount = 0;
|
|
1252
|
-
lastSize = stat.size;
|
|
1253
|
-
} else if (Date.now() - fileAppearedAt > emptyGiveUpMs) {
|
|
1254
|
-
debugError(`[audio-convert] waitForFile: file still empty after ${emptyGiveUpMs}ms, giving up: ${path$3.basename(filePath)}`);
|
|
1255
|
-
return 0;
|
|
1256
|
-
}
|
|
1257
|
-
} catch {
|
|
1258
|
-
if (!fileExists && Date.now() - start > noFileGiveUpMs) {
|
|
1259
|
-
debugError(`[audio-convert] waitForFile: file never appeared after ${noFileGiveUpMs}ms, giving up: ${path$3.basename(filePath)}`);
|
|
1260
|
-
return 0;
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
await new Promise((r) => setTimeout(r, pollMs));
|
|
1264
|
-
}
|
|
1265
|
-
try {
|
|
1266
|
-
const finalStat = fs.statSync(filePath);
|
|
1267
|
-
if (finalStat.size > 0) {
|
|
1268
|
-
debugWarn(`[audio-convert] waitForFile: timeout but file has data (${finalStat.size} bytes), using it`);
|
|
1269
|
-
return finalStat.size;
|
|
1270
|
-
}
|
|
1271
|
-
debugError(`[audio-convert] waitForFile: timeout after ${timeoutMs}ms, file exists but empty (0 bytes): ${path$3.basename(filePath)}`);
|
|
1272
|
-
} catch {
|
|
1273
|
-
debugError(`[audio-convert] waitForFile: timeout after ${timeoutMs}ms, file never appeared: ${path$3.basename(filePath)}`);
|
|
1274
|
-
}
|
|
1275
|
-
return 0;
|
|
1276
|
-
}
|
|
1277
|
-
/** Delegate ffmpeg detection to the platform helper. */
|
|
1278
|
-
async function checkFfmpeg() {
|
|
1279
|
-
return detectFfmpeg();
|
|
1280
|
-
}
|
|
1281
|
-
/** Convert arbitrary audio into mono 24 kHz PCM s16le with ffmpeg. */
|
|
1282
|
-
function ffmpegToPCM(ffmpegCmd, inputPath, sampleRate = 24e3) {
|
|
1283
|
-
return new Promise((resolve, reject) => {
|
|
1284
|
-
execFile(ffmpegCmd, [
|
|
1285
|
-
"-i",
|
|
1286
|
-
inputPath,
|
|
1287
|
-
"-f",
|
|
1288
|
-
"s16le",
|
|
1289
|
-
"-ar",
|
|
1290
|
-
String(sampleRate),
|
|
1291
|
-
"-ac",
|
|
1292
|
-
"1",
|
|
1293
|
-
"-acodec",
|
|
1294
|
-
"pcm_s16le",
|
|
1295
|
-
"-v",
|
|
1296
|
-
"error",
|
|
1297
|
-
"pipe:1"
|
|
1298
|
-
], {
|
|
1299
|
-
maxBuffer: 50 * 1024 * 1024,
|
|
1300
|
-
encoding: "buffer",
|
|
1301
|
-
...isWindows() ? { windowsHide: true } : {}
|
|
1302
|
-
}, (err, stdout) => {
|
|
1303
|
-
if (err) {
|
|
1304
|
-
reject(/* @__PURE__ */ new Error(`ffmpeg failed: ${err.message}`));
|
|
1305
|
-
return;
|
|
1306
|
-
}
|
|
1307
|
-
resolve(stdout);
|
|
1308
|
-
});
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
/** Decode MP3 into PCM through mpg123-decoder when ffmpeg is unavailable. */
|
|
1312
|
-
async function wasmDecodeMp3ToPCM(buf, targetRate) {
|
|
1313
|
-
try {
|
|
1314
|
-
const { MPEGDecoder } = await import("mpg123-decoder");
|
|
1315
|
-
debugLog(`[audio-convert] WASM MP3 decode: size=${buf.length} bytes`);
|
|
1316
|
-
const decoder = new MPEGDecoder();
|
|
1317
|
-
await decoder.ready;
|
|
1318
|
-
const decoded = decoder.decode(new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength));
|
|
1319
|
-
decoder.free();
|
|
1320
|
-
if (decoded.samplesDecoded === 0 || decoded.channelData.length === 0) {
|
|
1321
|
-
debugError(`[audio-convert] WASM MP3 decode: no samples (samplesDecoded=${decoded.samplesDecoded})`);
|
|
1322
|
-
return null;
|
|
1323
|
-
}
|
|
1324
|
-
debugLog(`[audio-convert] WASM MP3 decode: samples=${decoded.samplesDecoded}, sampleRate=${decoded.sampleRate}, channels=${decoded.channelData.length}`);
|
|
1325
|
-
let floatMono;
|
|
1326
|
-
if (decoded.channelData.length === 1) floatMono = decoded.channelData[0];
|
|
1327
|
-
else {
|
|
1328
|
-
floatMono = new Float32Array(decoded.samplesDecoded);
|
|
1329
|
-
const channels = decoded.channelData.length;
|
|
1330
|
-
for (let i = 0; i < decoded.samplesDecoded; i++) {
|
|
1331
|
-
let sum = 0;
|
|
1332
|
-
for (let ch = 0; ch < channels; ch++) sum += decoded.channelData[ch][i];
|
|
1333
|
-
floatMono[i] = sum / channels;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
const s16 = new Uint8Array(floatMono.length * 2);
|
|
1337
|
-
const view = new DataView(s16.buffer);
|
|
1338
|
-
for (let i = 0; i < floatMono.length; i++) {
|
|
1339
|
-
const clamped = Math.max(-1, Math.min(1, floatMono[i]));
|
|
1340
|
-
const val = clamped < 0 ? clamped * 32768 : clamped * 32767;
|
|
1341
|
-
view.setInt16(i * 2, Math.round(val), true);
|
|
1342
|
-
}
|
|
1343
|
-
let pcm = s16;
|
|
1344
|
-
if (decoded.sampleRate !== targetRate) {
|
|
1345
|
-
const inputSamples = s16.length / 2;
|
|
1346
|
-
const outputSamples = Math.round(inputSamples * targetRate / decoded.sampleRate);
|
|
1347
|
-
const output = new Uint8Array(outputSamples * 2);
|
|
1348
|
-
const inView = new DataView(s16.buffer, s16.byteOffset, s16.byteLength);
|
|
1349
|
-
const outView = new DataView(output.buffer, output.byteOffset, output.byteLength);
|
|
1350
|
-
for (let i = 0; i < outputSamples; i++) {
|
|
1351
|
-
const srcIdx = i * decoded.sampleRate / targetRate;
|
|
1352
|
-
const idx0 = Math.floor(srcIdx);
|
|
1353
|
-
const idx1 = Math.min(idx0 + 1, inputSamples - 1);
|
|
1354
|
-
const frac = srcIdx - idx0;
|
|
1355
|
-
const s0 = inView.getInt16(idx0 * 2, true);
|
|
1356
|
-
const s1 = inView.getInt16(idx1 * 2, true);
|
|
1357
|
-
const sample = Math.round(s0 + (s1 - s0) * frac);
|
|
1358
|
-
outView.setInt16(i * 2, Math.max(-32768, Math.min(32767, sample)), true);
|
|
1359
|
-
}
|
|
1360
|
-
pcm = output;
|
|
1361
|
-
}
|
|
1362
|
-
return Buffer.from(pcm.buffer, pcm.byteOffset, pcm.byteLength);
|
|
1363
|
-
} catch (err) {
|
|
1364
|
-
debugError(`[audio-convert] WASM MP3 decode failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1365
|
-
if (err instanceof Error && err.stack) debugError(`[audio-convert] stack: ${err.stack}`);
|
|
1366
|
-
return null;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
/** Normalize file extensions to lowercased dotted form. */
|
|
1370
|
-
function normalizeFormats(formats) {
|
|
1371
|
-
return formats.map((f) => {
|
|
1372
|
-
const lower = f.toLowerCase().trim();
|
|
1373
|
-
return lower.startsWith(".") ? lower : `.${lower}`;
|
|
1374
|
-
});
|
|
1375
|
-
}
|
|
1376
|
-
/** Parse standard PCM WAV as a no-ffmpeg fallback. */
|
|
1377
|
-
function parseWavFallback(buf) {
|
|
1378
|
-
if (buf.length < 44) return null;
|
|
1379
|
-
if (buf.toString("ascii", 0, 4) !== "RIFF") return null;
|
|
1380
|
-
if (buf.toString("ascii", 8, 12) !== "WAVE") return null;
|
|
1381
|
-
if (buf.toString("ascii", 12, 16) !== "fmt ") return null;
|
|
1382
|
-
if (buf.readUInt16LE(20) !== 1) return null;
|
|
1383
|
-
const channels = buf.readUInt16LE(22);
|
|
1384
|
-
const sampleRate = buf.readUInt32LE(24);
|
|
1385
|
-
if (buf.readUInt16LE(34) !== 16) return null;
|
|
1386
|
-
let offset = 36;
|
|
1387
|
-
while (offset < buf.length - 8) {
|
|
1388
|
-
const chunkId = buf.toString("ascii", offset, offset + 4);
|
|
1389
|
-
const chunkSize = buf.readUInt32LE(offset + 4);
|
|
1390
|
-
if (chunkId === "data") {
|
|
1391
|
-
const dataStart = offset + 8;
|
|
1392
|
-
const dataEnd = Math.min(dataStart + chunkSize, buf.length);
|
|
1393
|
-
let pcm = new Uint8Array(buf.buffer, buf.byteOffset + dataStart, dataEnd - dataStart);
|
|
1394
|
-
if (channels > 1) {
|
|
1395
|
-
const samplesPerCh = pcm.length / (2 * channels);
|
|
1396
|
-
const mono = new Uint8Array(samplesPerCh * 2);
|
|
1397
|
-
const inV = new DataView(pcm.buffer, pcm.byteOffset, pcm.byteLength);
|
|
1398
|
-
const outV = new DataView(mono.buffer, mono.byteOffset, mono.byteLength);
|
|
1399
|
-
for (let i = 0; i < samplesPerCh; i++) {
|
|
1400
|
-
let sum = 0;
|
|
1401
|
-
for (let ch = 0; ch < channels; ch++) sum += inV.getInt16((i * channels + ch) * 2, true);
|
|
1402
|
-
outV.setInt16(i * 2, Math.max(-32768, Math.min(32767, Math.round(sum / channels))), true);
|
|
1403
|
-
}
|
|
1404
|
-
pcm = mono;
|
|
1405
|
-
}
|
|
1406
|
-
const targetRate = 24e3;
|
|
1407
|
-
if (sampleRate !== targetRate) {
|
|
1408
|
-
const inSamples = pcm.length / 2;
|
|
1409
|
-
const outSamples = Math.round(inSamples * targetRate / sampleRate);
|
|
1410
|
-
const out = new Uint8Array(outSamples * 2);
|
|
1411
|
-
const inV = new DataView(pcm.buffer, pcm.byteOffset, pcm.byteLength);
|
|
1412
|
-
const outV = new DataView(out.buffer, out.byteOffset, out.byteLength);
|
|
1413
|
-
for (let i = 0; i < outSamples; i++) {
|
|
1414
|
-
const src = i * sampleRate / targetRate;
|
|
1415
|
-
const i0 = Math.floor(src);
|
|
1416
|
-
const i1 = Math.min(i0 + 1, inSamples - 1);
|
|
1417
|
-
const f = src - i0;
|
|
1418
|
-
const s0 = inV.getInt16(i0 * 2, true);
|
|
1419
|
-
const s1 = inV.getInt16(i1 * 2, true);
|
|
1420
|
-
outV.setInt16(i * 2, Math.max(-32768, Math.min(32767, Math.round(s0 + (s1 - s0) * f))), true);
|
|
1421
|
-
}
|
|
1422
|
-
pcm = out;
|
|
1423
|
-
}
|
|
1424
|
-
return Buffer.from(pcm.buffer, pcm.byteOffset, pcm.byteLength);
|
|
1425
|
-
}
|
|
1426
|
-
offset += 8 + chunkSize;
|
|
1427
|
-
}
|
|
1428
|
-
return null;
|
|
1429
|
-
}
|
|
1430
|
-
//#endregion
|
|
1431
|
-
//#region extensions/qqbot/src/utils/file-utils.ts
|
|
1432
|
-
/** Maximum file size accepted by the QQ Bot API. */
|
|
1433
|
-
const MAX_UPLOAD_SIZE = 20 * 1024 * 1024;
|
|
1434
|
-
/** Validate that a file is within the allowed upload size. */
|
|
1435
|
-
function checkFileSize(filePath, maxSize = MAX_UPLOAD_SIZE) {
|
|
1436
|
-
try {
|
|
1437
|
-
const stat = fs.statSync(filePath);
|
|
1438
|
-
if (stat.size > maxSize) {
|
|
1439
|
-
const sizeMB = (stat.size / (1024 * 1024)).toFixed(1);
|
|
1440
|
-
const limitMB = (maxSize / (1024 * 1024)).toFixed(0);
|
|
1441
|
-
return {
|
|
1442
|
-
ok: false,
|
|
1443
|
-
size: stat.size,
|
|
1444
|
-
error: `File is too large (${sizeMB}MB); QQ Bot API limit is ${limitMB}MB`
|
|
1445
|
-
};
|
|
1446
|
-
}
|
|
1447
|
-
return {
|
|
1448
|
-
ok: true,
|
|
1449
|
-
size: stat.size
|
|
1450
|
-
};
|
|
1451
|
-
} catch (err) {
|
|
1452
|
-
return {
|
|
1453
|
-
ok: false,
|
|
1454
|
-
size: 0,
|
|
1455
|
-
error: `Failed to read file metadata: ${err instanceof Error ? err.message : String(err)}`
|
|
1456
|
-
};
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
/** Read file contents asynchronously. */
|
|
1460
|
-
async function readFileAsync(filePath) {
|
|
1461
|
-
return fs.promises.readFile(filePath);
|
|
1462
|
-
}
|
|
1463
|
-
/** Check file readability asynchronously. */
|
|
1464
|
-
async function fileExistsAsync(filePath) {
|
|
1465
|
-
try {
|
|
1466
|
-
await fs.promises.access(filePath, fs.constants.R_OK);
|
|
1467
|
-
return true;
|
|
1468
|
-
} catch {
|
|
1469
|
-
return false;
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
/** Format a byte count into a human-readable size string. */
|
|
1473
|
-
function formatFileSize(bytes) {
|
|
1474
|
-
if (bytes < 1024) return `${bytes}B`;
|
|
1475
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}KB`;
|
|
1476
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
|
|
1477
|
-
}
|
|
1478
|
-
/** Download a remote file into a local directory. */
|
|
1479
|
-
async function downloadFile(url, destDir, originalFilename) {
|
|
1480
|
-
try {
|
|
1481
|
-
if (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });
|
|
1482
|
-
const resp = await fetch(url, { redirect: "follow" });
|
|
1483
|
-
if (!resp.ok || !resp.body) return null;
|
|
1484
|
-
let filename = originalFilename?.trim() || "";
|
|
1485
|
-
if (!filename) try {
|
|
1486
|
-
const urlPath = new URL(url).pathname;
|
|
1487
|
-
filename = path$3.basename(urlPath) || "download";
|
|
1488
|
-
} catch {
|
|
1489
|
-
filename = "download";
|
|
1490
|
-
}
|
|
1491
|
-
const ts = Date.now();
|
|
1492
|
-
const ext = path$3.extname(filename);
|
|
1493
|
-
const safeFilename = `${path$3.basename(filename, ext) || "file"}_${ts}_${crypto.randomBytes(3).toString("hex")}${ext}`;
|
|
1494
|
-
const destPath = path$3.join(destDir, safeFilename);
|
|
1495
|
-
const buffer = Buffer.from(await resp.arrayBuffer());
|
|
1496
|
-
await fs.promises.writeFile(destPath, buffer);
|
|
1497
|
-
return destPath;
|
|
1498
|
-
} catch {
|
|
1499
|
-
return null;
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
//#endregion
|
|
1503
|
-
//#region extensions/qqbot/src/utils/media-tags.ts
|
|
1504
|
-
const VALID_TAGS = [
|
|
1505
|
-
"qqimg",
|
|
1506
|
-
"qqvoice",
|
|
1507
|
-
"qqvideo",
|
|
1508
|
-
"qqfile",
|
|
1509
|
-
"qqmedia"
|
|
1510
|
-
];
|
|
1511
|
-
const TAG_ALIASES = {
|
|
1512
|
-
qq_img: "qqimg",
|
|
1513
|
-
qqimage: "qqimg",
|
|
1514
|
-
qq_image: "qqimg",
|
|
1515
|
-
qqpic: "qqimg",
|
|
1516
|
-
qq_pic: "qqimg",
|
|
1517
|
-
qqpicture: "qqimg",
|
|
1518
|
-
qq_picture: "qqimg",
|
|
1519
|
-
qqphoto: "qqimg",
|
|
1520
|
-
qq_photo: "qqimg",
|
|
1521
|
-
img: "qqimg",
|
|
1522
|
-
image: "qqimg",
|
|
1523
|
-
pic: "qqimg",
|
|
1524
|
-
picture: "qqimg",
|
|
1525
|
-
photo: "qqimg",
|
|
1526
|
-
qq_voice: "qqvoice",
|
|
1527
|
-
qqaudio: "qqvoice",
|
|
1528
|
-
qq_audio: "qqvoice",
|
|
1529
|
-
voice: "qqvoice",
|
|
1530
|
-
audio: "qqvoice",
|
|
1531
|
-
qq_video: "qqvideo",
|
|
1532
|
-
video: "qqvideo",
|
|
1533
|
-
qq_file: "qqfile",
|
|
1534
|
-
qqdoc: "qqfile",
|
|
1535
|
-
qq_doc: "qqfile",
|
|
1536
|
-
file: "qqfile",
|
|
1537
|
-
doc: "qqfile",
|
|
1538
|
-
document: "qqfile",
|
|
1539
|
-
qq_media: "qqmedia",
|
|
1540
|
-
media: "qqmedia",
|
|
1541
|
-
attachment: "qqmedia",
|
|
1542
|
-
attach: "qqmedia",
|
|
1543
|
-
qqattachment: "qqmedia",
|
|
1544
|
-
qq_attachment: "qqmedia",
|
|
1545
|
-
qqsend: "qqmedia",
|
|
1546
|
-
qq_send: "qqmedia",
|
|
1547
|
-
send: "qqmedia"
|
|
1548
|
-
};
|
|
1549
|
-
const ALL_TAG_NAMES = [...VALID_TAGS, ...Object.keys(TAG_ALIASES)];
|
|
1550
|
-
ALL_TAG_NAMES.sort((a, b) => b.length - a.length);
|
|
1551
|
-
const TAG_NAME_PATTERN = ALL_TAG_NAMES.join("|");
|
|
1552
|
-
/** Match self-closing media-tag syntax with file/src/path/url attributes. */
|
|
1553
|
-
const SELF_CLOSING_TAG_REGEX = new RegExp("`?[<<<]\\s*(" + TAG_NAME_PATTERN + ")(?:\\s+(?!file|src|path|url)[a-z_-]+\\s*=\\s*[\"']?[^\"'/>>>]*?[\"']?)*\\s+(?:file|src|path|url)\\s*=\\s*[\"']?([^\"'/>>>]+?)[\"']?(?:\\s+[a-z_-]+\\s*=\\s*[\"']?[^\"'/>>>]*?[\"']?)*\\s*/?\\s*[>>>]`?", "gi");
|
|
1554
|
-
/** Match malformed wrapped media tags that should be normalized. */
|
|
1555
|
-
const FUZZY_MEDIA_TAG_REGEX = new RegExp("`?[<<<]\\s*(" + TAG_NAME_PATTERN + ")\\s*[>>>][\"']?\\s*([^<<<>>\"'`]+?)\\s*[\"']?[<<<]\\s*/?\\s*(?:" + TAG_NAME_PATTERN + ")\\s*[>>>]`?", "gi");
|
|
1556
|
-
/** Normalize a raw tag name into the canonical tag set. */
|
|
1557
|
-
function resolveTagName(raw) {
|
|
1558
|
-
const lower = raw.toLowerCase();
|
|
1559
|
-
if (VALID_TAGS.includes(lower)) return lower;
|
|
1560
|
-
return TAG_ALIASES[lower] ?? "qqimg";
|
|
1561
|
-
}
|
|
1562
|
-
/** Match wrapped tags whose bodies need newline and tab cleanup. */
|
|
1563
|
-
const MULTILINE_TAG_CLEANUP = new RegExp("([<<<]\\s*(?:" + TAG_NAME_PATTERN + ")\\s*[>>>])([\\s\\S]*?)([<<<]\\s*/?\\s*(?:" + TAG_NAME_PATTERN + ")\\s*[>>>])", "gi");
|
|
1564
|
-
/** Normalize malformed media-tag output into canonical wrapped tags. */
|
|
1565
|
-
function normalizeMediaTags(text) {
|
|
1566
|
-
let cleaned = text.replace(SELF_CLOSING_TAG_REGEX, (_match, rawTag, content) => {
|
|
1567
|
-
const tag = resolveTagName(rawTag);
|
|
1568
|
-
const trimmed = content.trim();
|
|
1569
|
-
if (!trimmed) return _match;
|
|
1570
|
-
return `<${tag}>${expandTilde(trimmed)}</${tag}>`;
|
|
1571
|
-
});
|
|
1572
|
-
cleaned = cleaned.replace(MULTILINE_TAG_CLEANUP, (_m, open, body, close) => {
|
|
1573
|
-
return open + body.replace(/[\r\n\t]+/g, " ").replace(/ {2,}/g, " ") + close;
|
|
1574
|
-
});
|
|
1575
|
-
return cleaned.replace(FUZZY_MEDIA_TAG_REGEX, (_match, rawTag, content) => {
|
|
1576
|
-
const tag = resolveTagName(rawTag);
|
|
1577
|
-
const trimmed = content.trim();
|
|
1578
|
-
if (!trimmed) return _match;
|
|
1579
|
-
return `<${tag}>${expandTilde(trimmed)}</${tag}>`;
|
|
1580
|
-
});
|
|
1581
|
-
}
|
|
1582
|
-
//#endregion
|
|
1583
|
-
//#region extensions/qqbot/src/utils/payload.ts
|
|
1584
|
-
const PAYLOAD_PREFIX = "QQBOT_PAYLOAD:";
|
|
1585
|
-
const CRON_PREFIX = "QQBOT_CRON:";
|
|
1586
|
-
/** Parse model output that may start with the QQ Bot structured payload prefix. */
|
|
1587
|
-
function parseQQBotPayload(text) {
|
|
1588
|
-
const trimmedText = text.trim();
|
|
1589
|
-
if (!trimmedText.startsWith(PAYLOAD_PREFIX)) return {
|
|
1590
|
-
isPayload: false,
|
|
1591
|
-
text
|
|
1592
|
-
};
|
|
1593
|
-
const jsonContent = trimmedText.slice(14).trim();
|
|
1594
|
-
if (!jsonContent) return {
|
|
1595
|
-
isPayload: true,
|
|
1596
|
-
error: "Payload body is empty"
|
|
1597
|
-
};
|
|
1598
|
-
try {
|
|
1599
|
-
const payload = JSON.parse(jsonContent);
|
|
1600
|
-
if (!payload.type) return {
|
|
1601
|
-
isPayload: true,
|
|
1602
|
-
error: "Payload is missing the type field"
|
|
1603
|
-
};
|
|
1604
|
-
if (payload.type === "cron_reminder") {
|
|
1605
|
-
if (!payload.content || !payload.targetType || !payload.targetAddress) return {
|
|
1606
|
-
isPayload: true,
|
|
1607
|
-
error: "cron_reminder payload is missing required fields (content, targetType, targetAddress)"
|
|
1608
|
-
};
|
|
1609
|
-
} else if (payload.type === "media") {
|
|
1610
|
-
if (!payload.mediaType || !payload.source || !payload.path) return {
|
|
1611
|
-
isPayload: true,
|
|
1612
|
-
error: "media payload is missing required fields (mediaType, source, path)"
|
|
1613
|
-
};
|
|
1614
|
-
}
|
|
1615
|
-
return {
|
|
1616
|
-
isPayload: true,
|
|
1617
|
-
payload
|
|
1618
|
-
};
|
|
1619
|
-
} catch (e) {
|
|
1620
|
-
return {
|
|
1621
|
-
isPayload: true,
|
|
1622
|
-
error: `Failed to parse JSON: ${e instanceof Error ? e.message : String(e)}`
|
|
1623
|
-
};
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
/** Encode a cron reminder payload into the stored cron-message format. */
|
|
1627
|
-
function encodePayloadForCron(payload) {
|
|
1628
|
-
const jsonString = JSON.stringify(payload);
|
|
1629
|
-
return `${CRON_PREFIX}${Buffer.from(jsonString, "utf-8").toString("base64")}`;
|
|
1630
|
-
}
|
|
1631
|
-
/** Decode a stored cron payload. */
|
|
1632
|
-
function decodeCronPayload(message) {
|
|
1633
|
-
const trimmedMessage = message.trim();
|
|
1634
|
-
if (!trimmedMessage.startsWith(CRON_PREFIX)) return { isCronPayload: false };
|
|
1635
|
-
const base64Content = trimmedMessage.slice(11);
|
|
1636
|
-
if (!base64Content) return {
|
|
1637
|
-
isCronPayload: true,
|
|
1638
|
-
error: "Cron payload body is empty"
|
|
1639
|
-
};
|
|
1640
|
-
try {
|
|
1641
|
-
const jsonString = Buffer.from(base64Content, "base64").toString("utf-8");
|
|
1642
|
-
const payload = JSON.parse(jsonString);
|
|
1643
|
-
if (payload.type !== "cron_reminder") return {
|
|
1644
|
-
isCronPayload: true,
|
|
1645
|
-
error: `Expected type cron_reminder but got ${payload.type}`
|
|
1646
|
-
};
|
|
1647
|
-
if (!payload.content || !payload.targetType || !payload.targetAddress) return {
|
|
1648
|
-
isCronPayload: true,
|
|
1649
|
-
error: "Cron payload is missing required fields"
|
|
1650
|
-
};
|
|
1651
|
-
return {
|
|
1652
|
-
isCronPayload: true,
|
|
1653
|
-
payload
|
|
1654
|
-
};
|
|
1655
|
-
} catch (e) {
|
|
1656
|
-
return {
|
|
1657
|
-
isCronPayload: true,
|
|
1658
|
-
error: `Failed to decode cron payload: ${e instanceof Error ? e.message : String(e)}`
|
|
1659
|
-
};
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
/** Type guard for cron reminder payloads. */
|
|
1663
|
-
function isCronReminderPayload(payload) {
|
|
1664
|
-
return payload.type === "cron_reminder";
|
|
1665
|
-
}
|
|
1666
|
-
/** Type guard for media payloads. */
|
|
1667
|
-
function isMediaPayload(payload) {
|
|
1668
|
-
return payload.type === "media";
|
|
1669
|
-
}
|
|
1670
|
-
//#endregion
|
|
1671
|
-
//#region extensions/qqbot/src/outbound.ts
|
|
1672
|
-
const MESSAGE_REPLY_LIMIT = 4;
|
|
1673
|
-
const MESSAGE_REPLY_TTL = 3600 * 1e3;
|
|
1674
|
-
const messageReplyTracker = /* @__PURE__ */ new Map();
|
|
1675
|
-
/** Check whether a message can still receive a passive reply. */
|
|
1676
|
-
function checkMessageReplyLimit(messageId) {
|
|
1677
|
-
const now = Date.now();
|
|
1678
|
-
const record = messageReplyTracker.get(messageId);
|
|
1679
|
-
if (messageReplyTracker.size > 1e4) {
|
|
1680
|
-
for (const [id, rec] of messageReplyTracker) if (now - rec.firstReplyAt > MESSAGE_REPLY_TTL) messageReplyTracker.delete(id);
|
|
1681
|
-
}
|
|
1682
|
-
if (!record) return {
|
|
1683
|
-
allowed: true,
|
|
1684
|
-
remaining: MESSAGE_REPLY_LIMIT,
|
|
1685
|
-
shouldFallbackToProactive: false
|
|
1686
|
-
};
|
|
1687
|
-
if (now - record.firstReplyAt > MESSAGE_REPLY_TTL) return {
|
|
1688
|
-
allowed: false,
|
|
1689
|
-
remaining: 0,
|
|
1690
|
-
shouldFallbackToProactive: true,
|
|
1691
|
-
fallbackReason: "expired",
|
|
1692
|
-
message: "Message is older than 1 hour; sending as a proactive message instead"
|
|
1693
|
-
};
|
|
1694
|
-
const remaining = MESSAGE_REPLY_LIMIT - record.count;
|
|
1695
|
-
if (remaining <= 0) return {
|
|
1696
|
-
allowed: false,
|
|
1697
|
-
remaining: 0,
|
|
1698
|
-
shouldFallbackToProactive: true,
|
|
1699
|
-
fallbackReason: "limit_exceeded",
|
|
1700
|
-
message: `Passive reply limit reached (${MESSAGE_REPLY_LIMIT} per hour); sending proactively instead`
|
|
1701
|
-
};
|
|
1702
|
-
return {
|
|
1703
|
-
allowed: true,
|
|
1704
|
-
remaining,
|
|
1705
|
-
shouldFallbackToProactive: false
|
|
1706
|
-
};
|
|
1707
|
-
}
|
|
1708
|
-
/** Record one passive reply against a message. */
|
|
1709
|
-
function recordMessageReply(messageId) {
|
|
1710
|
-
const now = Date.now();
|
|
1711
|
-
const record = messageReplyTracker.get(messageId);
|
|
1712
|
-
if (!record) messageReplyTracker.set(messageId, {
|
|
1713
|
-
count: 1,
|
|
1714
|
-
firstReplyAt: now
|
|
1715
|
-
});
|
|
1716
|
-
else if (now - record.firstReplyAt > MESSAGE_REPLY_TTL) messageReplyTracker.set(messageId, {
|
|
1717
|
-
count: 1,
|
|
1718
|
-
firstReplyAt: now
|
|
1719
|
-
});
|
|
1720
|
-
else record.count++;
|
|
1721
|
-
debugLog(`[qqbot] recordMessageReply: ${messageId}, count=${messageReplyTracker.get(messageId)?.count}`);
|
|
1722
|
-
}
|
|
1723
|
-
/** Return reply-tracker stats for diagnostics. */
|
|
1724
|
-
function getMessageReplyStats() {
|
|
1725
|
-
let totalReplies = 0;
|
|
1726
|
-
for (const record of messageReplyTracker.values()) totalReplies += record.count;
|
|
1727
|
-
return {
|
|
1728
|
-
trackedMessages: messageReplyTracker.size,
|
|
1729
|
-
totalReplies
|
|
1730
|
-
};
|
|
1731
|
-
}
|
|
1732
|
-
/** Return the passive-reply configuration. */
|
|
1733
|
-
function getMessageReplyConfig() {
|
|
1734
|
-
return {
|
|
1735
|
-
limit: MESSAGE_REPLY_LIMIT,
|
|
1736
|
-
ttlMs: MESSAGE_REPLY_TTL,
|
|
1737
|
-
ttlHours: MESSAGE_REPLY_TTL / (3600 * 1e3)
|
|
1738
|
-
};
|
|
1739
|
-
}
|
|
1740
|
-
/** Parse a qqbot target into a structured delivery target. */
|
|
1741
|
-
function parseTarget(to) {
|
|
1742
|
-
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
1743
|
-
debugLog(`[${timestamp}] [qqbot] parseTarget: input=${to}`);
|
|
1744
|
-
let id = to.replace(/^qqbot:/i, "");
|
|
1745
|
-
if (id.startsWith("c2c:")) {
|
|
1746
|
-
const userId = id.slice(4);
|
|
1747
|
-
if (!userId || userId.length === 0) {
|
|
1748
|
-
const error = `Invalid c2c target format: ${to} - missing user ID`;
|
|
1749
|
-
debugError(`[${timestamp}] [qqbot] parseTarget: ${error}`);
|
|
1750
|
-
throw new Error(error);
|
|
1751
|
-
}
|
|
1752
|
-
debugLog(`[${timestamp}] [qqbot] parseTarget: c2c target, user ID=${userId}`);
|
|
1753
|
-
return {
|
|
1754
|
-
type: "c2c",
|
|
1755
|
-
id: userId
|
|
1756
|
-
};
|
|
1757
|
-
}
|
|
1758
|
-
if (id.startsWith("group:")) {
|
|
1759
|
-
const groupId = id.slice(6);
|
|
1760
|
-
if (!groupId || groupId.length === 0) {
|
|
1761
|
-
const error = `Invalid group target format: ${to} - missing group ID`;
|
|
1762
|
-
debugError(`[${timestamp}] [qqbot] parseTarget: ${error}`);
|
|
1763
|
-
throw new Error(error);
|
|
1764
|
-
}
|
|
1765
|
-
debugLog(`[${timestamp}] [qqbot] parseTarget: group target, group ID=${groupId}`);
|
|
1766
|
-
return {
|
|
1767
|
-
type: "group",
|
|
1768
|
-
id: groupId
|
|
1769
|
-
};
|
|
1770
|
-
}
|
|
1771
|
-
if (id.startsWith("channel:")) {
|
|
1772
|
-
const channelId = id.slice(8);
|
|
1773
|
-
if (!channelId || channelId.length === 0) {
|
|
1774
|
-
const error = `Invalid channel target format: ${to} - missing channel ID`;
|
|
1775
|
-
debugError(`[${timestamp}] [qqbot] parseTarget: ${error}`);
|
|
1776
|
-
throw new Error(error);
|
|
1777
|
-
}
|
|
1778
|
-
debugLog(`[${timestamp}] [qqbot] parseTarget: channel target, channel ID=${channelId}`);
|
|
1779
|
-
return {
|
|
1780
|
-
type: "channel",
|
|
1781
|
-
id: channelId
|
|
1782
|
-
};
|
|
1783
|
-
}
|
|
1784
|
-
if (!id || id.length === 0) {
|
|
1785
|
-
const error = `Invalid target format: ${to} - empty ID after removing qqbot: prefix`;
|
|
1786
|
-
debugError(`[${timestamp}] [qqbot] parseTarget: ${error}`);
|
|
1787
|
-
throw new Error(error);
|
|
1788
|
-
}
|
|
1789
|
-
debugLog(`[${timestamp}] [qqbot] parseTarget: default c2c target, ID=${id}`);
|
|
1790
|
-
return {
|
|
1791
|
-
type: "c2c",
|
|
1792
|
-
id
|
|
1793
|
-
};
|
|
1794
|
-
}
|
|
1795
|
-
/** Build a media target from a normal outbound context. */
|
|
1796
|
-
function buildMediaTarget(ctx, logPrefix) {
|
|
1797
|
-
const target = parseTarget(ctx.to);
|
|
1798
|
-
return {
|
|
1799
|
-
targetType: target.type,
|
|
1800
|
-
targetId: target.id,
|
|
1801
|
-
account: ctx.account,
|
|
1802
|
-
replyToId: ctx.replyToId ?? void 0,
|
|
1803
|
-
logPrefix
|
|
1804
|
-
};
|
|
1805
|
-
}
|
|
1806
|
-
/** Resolve an authenticated access token for the account. */
|
|
1807
|
-
async function getToken(account) {
|
|
1808
|
-
if (!account.appId || !account.clientSecret) throw new Error("QQBot not configured (missing appId or clientSecret)");
|
|
1809
|
-
return getAccessToken(account.appId, account.clientSecret);
|
|
1810
|
-
}
|
|
1811
|
-
/** Return true when public URLs should be passed through directly. */
|
|
1812
|
-
function shouldDirectUploadUrl(account) {
|
|
1813
|
-
return account.config?.urlDirectUpload !== false;
|
|
1814
|
-
}
|
|
1815
|
-
/**
|
|
1816
|
-
* Send a photo from a local file, public URL, or Base64 data URL.
|
|
1817
|
-
*/
|
|
1818
|
-
async function sendPhoto(ctx, imagePath) {
|
|
1819
|
-
const prefix = ctx.logPrefix ?? "[qqbot]";
|
|
1820
|
-
const mediaPath = resolveQQBotLocalMediaPath(normalizePath(imagePath));
|
|
1821
|
-
const isLocal = isLocalPath(mediaPath);
|
|
1822
|
-
const isHttp = mediaPath.startsWith("http://") || mediaPath.startsWith("https://");
|
|
1823
|
-
const isData = mediaPath.startsWith("data:");
|
|
1824
|
-
if (isHttp && !shouldDirectUploadUrl(ctx.account)) {
|
|
1825
|
-
debugLog(`${prefix} sendPhoto: urlDirectUpload=false, downloading URL first...`);
|
|
1826
|
-
const localFile = await downloadToFallbackDir(mediaPath, prefix, "sendPhoto");
|
|
1827
|
-
if (localFile) return await sendPhoto(ctx, localFile);
|
|
1828
|
-
return {
|
|
1829
|
-
channel: "qqbot",
|
|
1830
|
-
error: `Failed to download image: ${mediaPath.slice(0, 80)}`
|
|
1831
|
-
};
|
|
1832
|
-
}
|
|
1833
|
-
let imageUrl = mediaPath;
|
|
1834
|
-
if (isLocal) {
|
|
1835
|
-
if (!await fileExistsAsync(mediaPath)) return {
|
|
1836
|
-
channel: "qqbot",
|
|
1837
|
-
error: "Image not found"
|
|
1838
|
-
};
|
|
1839
|
-
const sizeCheck = checkFileSize(mediaPath);
|
|
1840
|
-
if (!sizeCheck.ok) return {
|
|
1841
|
-
channel: "qqbot",
|
|
1842
|
-
error: sizeCheck.error
|
|
1843
|
-
};
|
|
1844
|
-
const fileBuffer = await readFileAsync(mediaPath);
|
|
1845
|
-
const ext = path$2.extname(mediaPath).toLowerCase();
|
|
1846
|
-
const mimeType = {
|
|
1847
|
-
".jpg": "image/jpeg",
|
|
1848
|
-
".jpeg": "image/jpeg",
|
|
1849
|
-
".png": "image/png",
|
|
1850
|
-
".gif": "image/gif",
|
|
1851
|
-
".webp": "image/webp",
|
|
1852
|
-
".bmp": "image/bmp"
|
|
1853
|
-
}[ext];
|
|
1854
|
-
if (!mimeType) return {
|
|
1855
|
-
channel: "qqbot",
|
|
1856
|
-
error: `Unsupported image format: ${ext}`
|
|
1857
|
-
};
|
|
1858
|
-
imageUrl = `data:${mimeType};base64,${fileBuffer.toString("base64")}`;
|
|
1859
|
-
debugLog(`${prefix} sendPhoto: local → Base64 (${formatFileSize(fileBuffer.length)})`);
|
|
1860
|
-
} else if (!isHttp && !isData) return {
|
|
1861
|
-
channel: "qqbot",
|
|
1862
|
-
error: `Unsupported image source: ${mediaPath.slice(0, 50)}`
|
|
1863
|
-
};
|
|
1864
|
-
try {
|
|
1865
|
-
const token = await getToken(ctx.account);
|
|
1866
|
-
const localPath = isLocal ? mediaPath : void 0;
|
|
1867
|
-
if (ctx.targetType === "c2c") {
|
|
1868
|
-
const r = await sendC2CImageMessage(ctx.account.appId, token, ctx.targetId, imageUrl, ctx.replyToId, void 0, localPath);
|
|
1869
|
-
return {
|
|
1870
|
-
channel: "qqbot",
|
|
1871
|
-
messageId: r.id,
|
|
1872
|
-
timestamp: r.timestamp
|
|
1873
|
-
};
|
|
1874
|
-
} else if (ctx.targetType === "group") {
|
|
1875
|
-
const r = await sendGroupImageMessage(ctx.account.appId, token, ctx.targetId, imageUrl, ctx.replyToId);
|
|
1876
|
-
return {
|
|
1877
|
-
channel: "qqbot",
|
|
1878
|
-
messageId: r.id,
|
|
1879
|
-
timestamp: r.timestamp
|
|
1880
|
-
};
|
|
1881
|
-
} else {
|
|
1882
|
-
if (isHttp) {
|
|
1883
|
-
const r = await sendChannelMessage(token, ctx.targetId, ``, ctx.replyToId);
|
|
1884
|
-
return {
|
|
1885
|
-
channel: "qqbot",
|
|
1886
|
-
messageId: r.id,
|
|
1887
|
-
timestamp: r.timestamp
|
|
1888
|
-
};
|
|
1889
|
-
}
|
|
1890
|
-
debugLog(`${prefix} sendPhoto: channel does not support local/Base64 images`);
|
|
1891
|
-
return {
|
|
1892
|
-
channel: "qqbot",
|
|
1893
|
-
error: "Channel does not support local/Base64 images"
|
|
1894
|
-
};
|
|
1895
|
-
}
|
|
1896
|
-
} catch (err) {
|
|
1897
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1898
|
-
if (isHttp && !isData) {
|
|
1899
|
-
debugWarn(`${prefix} sendPhoto: URL direct upload failed (${msg}), downloading locally and retrying as Base64...`);
|
|
1900
|
-
const retryResult = await downloadAndRetrySendPhoto(ctx, mediaPath, prefix);
|
|
1901
|
-
if (retryResult) return retryResult;
|
|
1902
|
-
}
|
|
1903
|
-
debugError(`${prefix} sendPhoto failed: ${msg}`);
|
|
1904
|
-
return {
|
|
1905
|
-
channel: "qqbot",
|
|
1906
|
-
error: msg
|
|
1907
|
-
};
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
/** Download a remote image locally and retry `sendPhoto` through the local-file path. */
|
|
1911
|
-
async function downloadAndRetrySendPhoto(ctx, httpUrl, prefix) {
|
|
1912
|
-
try {
|
|
1913
|
-
const localFile = await downloadFile(httpUrl, getQQBotMediaDir("downloads", "url-fallback"));
|
|
1914
|
-
if (!localFile) {
|
|
1915
|
-
debugError(`${prefix} sendPhoto fallback: download also failed for ${httpUrl.slice(0, 80)}`);
|
|
1916
|
-
return null;
|
|
1917
|
-
}
|
|
1918
|
-
debugLog(`${prefix} sendPhoto fallback: downloaded → ${localFile}, retrying as Base64`);
|
|
1919
|
-
return await sendPhoto(ctx, localFile);
|
|
1920
|
-
} catch (err) {
|
|
1921
|
-
debugError(`${prefix} sendPhoto fallback error:`, err);
|
|
1922
|
-
return null;
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
/**
|
|
1926
|
-
* Send voice from either a local file or a public URL.
|
|
1927
|
-
*
|
|
1928
|
-
* URL handling respects `urlDirectUpload`, and local files are transcoded when needed.
|
|
1929
|
-
*/
|
|
1930
|
-
async function sendVoice(ctx, voicePath, directUploadFormats, transcodeEnabled = true) {
|
|
1931
|
-
const prefix = ctx.logPrefix ?? "[qqbot]";
|
|
1932
|
-
const mediaPath = resolveQQBotLocalMediaPath(normalizePath(voicePath));
|
|
1933
|
-
if (mediaPath.startsWith("http://") || mediaPath.startsWith("https://")) {
|
|
1934
|
-
if (shouldDirectUploadUrl(ctx.account)) try {
|
|
1935
|
-
const token = await getToken(ctx.account);
|
|
1936
|
-
if (ctx.targetType === "c2c") {
|
|
1937
|
-
const r = await sendC2CVoiceMessage(ctx.account.appId, token, ctx.targetId, void 0, mediaPath, ctx.replyToId);
|
|
1938
|
-
return {
|
|
1939
|
-
channel: "qqbot",
|
|
1940
|
-
messageId: r.id,
|
|
1941
|
-
timestamp: r.timestamp
|
|
1942
|
-
};
|
|
1943
|
-
} else if (ctx.targetType === "group") {
|
|
1944
|
-
const r = await sendGroupVoiceMessage(ctx.account.appId, token, ctx.targetId, void 0, mediaPath, ctx.replyToId);
|
|
1945
|
-
return {
|
|
1946
|
-
channel: "qqbot",
|
|
1947
|
-
messageId: r.id,
|
|
1948
|
-
timestamp: r.timestamp
|
|
1949
|
-
};
|
|
1950
|
-
} else {
|
|
1951
|
-
debugLog(`${prefix} sendVoice: voice not supported in channel`);
|
|
1952
|
-
return {
|
|
1953
|
-
channel: "qqbot",
|
|
1954
|
-
error: "Voice not supported in channel"
|
|
1955
|
-
};
|
|
1956
|
-
}
|
|
1957
|
-
} catch (err) {
|
|
1958
|
-
debugWarn(`${prefix} sendVoice: URL direct upload failed (${err instanceof Error ? err.message : String(err)}), downloading locally and retrying...`);
|
|
1959
|
-
}
|
|
1960
|
-
else debugLog(`${prefix} sendVoice: urlDirectUpload=false, downloading URL first...`);
|
|
1961
|
-
const localFile = await downloadToFallbackDir(mediaPath, prefix, "sendVoice");
|
|
1962
|
-
if (localFile) return await sendVoiceFromLocal(ctx, localFile, directUploadFormats, transcodeEnabled, prefix);
|
|
1963
|
-
return {
|
|
1964
|
-
channel: "qqbot",
|
|
1965
|
-
error: `Failed to download audio: ${mediaPath.slice(0, 80)}`
|
|
1966
|
-
};
|
|
1967
|
-
}
|
|
1968
|
-
return await sendVoiceFromLocal(ctx, mediaPath, directUploadFormats, transcodeEnabled, prefix);
|
|
1969
|
-
}
|
|
1970
|
-
/** Send voice from a local file. */
|
|
1971
|
-
async function sendVoiceFromLocal(ctx, mediaPath, directUploadFormats, transcodeEnabled, prefix) {
|
|
1972
|
-
const fileSize = await waitForFile(mediaPath);
|
|
1973
|
-
if (fileSize === 0) return {
|
|
1974
|
-
channel: "qqbot",
|
|
1975
|
-
error: "Voice generate failed"
|
|
1976
|
-
};
|
|
1977
|
-
if (shouldTranscodeVoice(mediaPath) && !transcodeEnabled) {
|
|
1978
|
-
const ext = path$2.extname(mediaPath).toLowerCase();
|
|
1979
|
-
debugLog(`${prefix} sendVoice: transcode disabled, format ${ext} needs transcode, returning error for fallback`);
|
|
1980
|
-
return {
|
|
1981
|
-
channel: "qqbot",
|
|
1982
|
-
error: `Voice transcoding is disabled and format ${ext} cannot be uploaded directly`
|
|
1983
|
-
};
|
|
1984
|
-
}
|
|
1985
|
-
try {
|
|
1986
|
-
let uploadBase64 = await audioFileToSilkBase64(mediaPath, directUploadFormats);
|
|
1987
|
-
if (!uploadBase64) {
|
|
1988
|
-
const buf = await readFileAsync(mediaPath);
|
|
1989
|
-
uploadBase64 = buf.toString("base64");
|
|
1990
|
-
debugLog(`${prefix} sendVoice: SILK conversion failed, uploading raw (${formatFileSize(buf.length)})`);
|
|
1991
|
-
} else debugLog(`${prefix} sendVoice: SILK ready (${fileSize} bytes)`);
|
|
1992
|
-
const token = await getToken(ctx.account);
|
|
1993
|
-
if (ctx.targetType === "c2c") {
|
|
1994
|
-
const r = await sendC2CVoiceMessage(ctx.account.appId, token, ctx.targetId, uploadBase64, void 0, ctx.replyToId, void 0, mediaPath);
|
|
1995
|
-
return {
|
|
1996
|
-
channel: "qqbot",
|
|
1997
|
-
messageId: r.id,
|
|
1998
|
-
timestamp: r.timestamp
|
|
1999
|
-
};
|
|
2000
|
-
} else if (ctx.targetType === "group") {
|
|
2001
|
-
const r = await sendGroupVoiceMessage(ctx.account.appId, token, ctx.targetId, uploadBase64, void 0, ctx.replyToId);
|
|
2002
|
-
return {
|
|
2003
|
-
channel: "qqbot",
|
|
2004
|
-
messageId: r.id,
|
|
2005
|
-
timestamp: r.timestamp
|
|
2006
|
-
};
|
|
2007
|
-
} else {
|
|
2008
|
-
debugLog(`${prefix} sendVoice: voice not supported in channel`);
|
|
2009
|
-
return {
|
|
2010
|
-
channel: "qqbot",
|
|
2011
|
-
error: "Voice not supported in channel"
|
|
2012
|
-
};
|
|
2013
|
-
}
|
|
2014
|
-
} catch (err) {
|
|
2015
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2016
|
-
debugError(`${prefix} sendVoice (local) failed: ${msg}`);
|
|
2017
|
-
return {
|
|
2018
|
-
channel: "qqbot",
|
|
2019
|
-
error: msg
|
|
2020
|
-
};
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
/** Send video from either a public URL or a local file. */
|
|
2024
|
-
async function sendVideoMsg(ctx, videoPath) {
|
|
2025
|
-
const prefix = ctx.logPrefix ?? "[qqbot]";
|
|
2026
|
-
const mediaPath = resolveQQBotLocalMediaPath(normalizePath(videoPath));
|
|
2027
|
-
const isHttp = mediaPath.startsWith("http://") || mediaPath.startsWith("https://");
|
|
2028
|
-
if (isHttp && !shouldDirectUploadUrl(ctx.account)) {
|
|
2029
|
-
debugLog(`${prefix} sendVideoMsg: urlDirectUpload=false, downloading URL first...`);
|
|
2030
|
-
const localFile = await downloadToFallbackDir(mediaPath, prefix, "sendVideoMsg");
|
|
2031
|
-
if (localFile) return await sendVideoFromLocal(ctx, localFile, prefix);
|
|
2032
|
-
return {
|
|
2033
|
-
channel: "qqbot",
|
|
2034
|
-
error: `Failed to download video: ${mediaPath.slice(0, 80)}`
|
|
2035
|
-
};
|
|
2036
|
-
}
|
|
2037
|
-
try {
|
|
2038
|
-
const token = await getToken(ctx.account);
|
|
2039
|
-
if (isHttp) if (ctx.targetType === "c2c") {
|
|
2040
|
-
const r = await sendC2CVideoMessage(ctx.account.appId, token, ctx.targetId, mediaPath, void 0, ctx.replyToId);
|
|
2041
|
-
return {
|
|
2042
|
-
channel: "qqbot",
|
|
2043
|
-
messageId: r.id,
|
|
2044
|
-
timestamp: r.timestamp
|
|
2045
|
-
};
|
|
2046
|
-
} else if (ctx.targetType === "group") {
|
|
2047
|
-
const r = await sendGroupVideoMessage(ctx.account.appId, token, ctx.targetId, mediaPath, void 0, ctx.replyToId);
|
|
2048
|
-
return {
|
|
2049
|
-
channel: "qqbot",
|
|
2050
|
-
messageId: r.id,
|
|
2051
|
-
timestamp: r.timestamp
|
|
2052
|
-
};
|
|
2053
|
-
} else {
|
|
2054
|
-
debugLog(`${prefix} sendVideoMsg: video not supported in channel`);
|
|
2055
|
-
return {
|
|
2056
|
-
channel: "qqbot",
|
|
2057
|
-
error: "Video not supported in channel"
|
|
2058
|
-
};
|
|
2059
|
-
}
|
|
2060
|
-
return await sendVideoFromLocal(ctx, mediaPath, prefix);
|
|
2061
|
-
} catch (err) {
|
|
2062
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2063
|
-
if (isHttp) {
|
|
2064
|
-
debugWarn(`${prefix} sendVideoMsg: URL direct upload failed (${msg}), downloading locally and retrying as Base64...`);
|
|
2065
|
-
const localFile = await downloadToFallbackDir(mediaPath, prefix, "sendVideoMsg");
|
|
2066
|
-
if (localFile) return await sendVideoFromLocal(ctx, localFile, prefix);
|
|
2067
|
-
}
|
|
2068
|
-
debugError(`${prefix} sendVideoMsg failed: ${msg}`);
|
|
2069
|
-
return {
|
|
2070
|
-
channel: "qqbot",
|
|
2071
|
-
error: msg
|
|
2072
|
-
};
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
/** Send video from a local file. */
|
|
2076
|
-
async function sendVideoFromLocal(ctx, mediaPath, prefix) {
|
|
2077
|
-
if (!await fileExistsAsync(mediaPath)) return {
|
|
2078
|
-
channel: "qqbot",
|
|
2079
|
-
error: "Video not found"
|
|
2080
|
-
};
|
|
2081
|
-
const sizeCheck = checkFileSize(mediaPath);
|
|
2082
|
-
if (!sizeCheck.ok) return {
|
|
2083
|
-
channel: "qqbot",
|
|
2084
|
-
error: sizeCheck.error
|
|
2085
|
-
};
|
|
2086
|
-
const fileBuffer = await readFileAsync(mediaPath);
|
|
2087
|
-
const videoBase64 = fileBuffer.toString("base64");
|
|
2088
|
-
debugLog(`${prefix} sendVideoMsg: local video (${formatFileSize(fileBuffer.length)})`);
|
|
2089
|
-
try {
|
|
2090
|
-
const token = await getToken(ctx.account);
|
|
2091
|
-
if (ctx.targetType === "c2c") {
|
|
2092
|
-
const r = await sendC2CVideoMessage(ctx.account.appId, token, ctx.targetId, void 0, videoBase64, ctx.replyToId, void 0, mediaPath);
|
|
2093
|
-
return {
|
|
2094
|
-
channel: "qqbot",
|
|
2095
|
-
messageId: r.id,
|
|
2096
|
-
timestamp: r.timestamp
|
|
2097
|
-
};
|
|
2098
|
-
} else if (ctx.targetType === "group") {
|
|
2099
|
-
const r = await sendGroupVideoMessage(ctx.account.appId, token, ctx.targetId, void 0, videoBase64, ctx.replyToId);
|
|
2100
|
-
return {
|
|
2101
|
-
channel: "qqbot",
|
|
2102
|
-
messageId: r.id,
|
|
2103
|
-
timestamp: r.timestamp
|
|
2104
|
-
};
|
|
2105
|
-
} else {
|
|
2106
|
-
debugLog(`${prefix} sendVideoMsg: video not supported in channel`);
|
|
2107
|
-
return {
|
|
2108
|
-
channel: "qqbot",
|
|
2109
|
-
error: "Video not supported in channel"
|
|
2110
|
-
};
|
|
2111
|
-
}
|
|
2112
|
-
} catch (err) {
|
|
2113
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2114
|
-
debugError(`${prefix} sendVideoMsg (local) failed: ${msg}`);
|
|
2115
|
-
return {
|
|
2116
|
-
channel: "qqbot",
|
|
2117
|
-
error: msg
|
|
2118
|
-
};
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
/** Send a file from a local path or public URL. */
|
|
2122
|
-
async function sendDocument(ctx, filePath) {
|
|
2123
|
-
const prefix = ctx.logPrefix ?? "[qqbot]";
|
|
2124
|
-
const mediaPath = resolveQQBotLocalMediaPath(normalizePath(filePath));
|
|
2125
|
-
const isHttp = mediaPath.startsWith("http://") || mediaPath.startsWith("https://");
|
|
2126
|
-
const fileName = sanitizeFileName(path$2.basename(mediaPath));
|
|
2127
|
-
if (isHttp && !shouldDirectUploadUrl(ctx.account)) {
|
|
2128
|
-
debugLog(`${prefix} sendDocument: urlDirectUpload=false, downloading URL first...`);
|
|
2129
|
-
const localFile = await downloadToFallbackDir(mediaPath, prefix, "sendDocument");
|
|
2130
|
-
if (localFile) return await sendDocumentFromLocal(ctx, localFile, prefix);
|
|
2131
|
-
return {
|
|
2132
|
-
channel: "qqbot",
|
|
2133
|
-
error: `Failed to download file: ${mediaPath.slice(0, 80)}`
|
|
2134
|
-
};
|
|
2135
|
-
}
|
|
2136
|
-
try {
|
|
2137
|
-
const token = await getToken(ctx.account);
|
|
2138
|
-
if (isHttp) if (ctx.targetType === "c2c") {
|
|
2139
|
-
const r = await sendC2CFileMessage(ctx.account.appId, token, ctx.targetId, void 0, mediaPath, ctx.replyToId, fileName);
|
|
2140
|
-
return {
|
|
2141
|
-
channel: "qqbot",
|
|
2142
|
-
messageId: r.id,
|
|
2143
|
-
timestamp: r.timestamp
|
|
2144
|
-
};
|
|
2145
|
-
} else if (ctx.targetType === "group") {
|
|
2146
|
-
const r = await sendGroupFileMessage(ctx.account.appId, token, ctx.targetId, void 0, mediaPath, ctx.replyToId, fileName);
|
|
2147
|
-
return {
|
|
2148
|
-
channel: "qqbot",
|
|
2149
|
-
messageId: r.id,
|
|
2150
|
-
timestamp: r.timestamp
|
|
2151
|
-
};
|
|
2152
|
-
} else {
|
|
2153
|
-
debugLog(`${prefix} sendDocument: file not supported in channel`);
|
|
2154
|
-
return {
|
|
2155
|
-
channel: "qqbot",
|
|
2156
|
-
error: "File not supported in channel"
|
|
2157
|
-
};
|
|
2158
|
-
}
|
|
2159
|
-
return await sendDocumentFromLocal(ctx, mediaPath, prefix);
|
|
2160
|
-
} catch (err) {
|
|
2161
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2162
|
-
if (isHttp) {
|
|
2163
|
-
debugWarn(`${prefix} sendDocument: URL direct upload failed (${msg}), downloading locally and retrying as Base64...`);
|
|
2164
|
-
const localFile = await downloadToFallbackDir(mediaPath, prefix, "sendDocument");
|
|
2165
|
-
if (localFile) return await sendDocumentFromLocal(ctx, localFile, prefix);
|
|
2166
|
-
}
|
|
2167
|
-
debugError(`${prefix} sendDocument failed: ${msg}`);
|
|
2168
|
-
return {
|
|
2169
|
-
channel: "qqbot",
|
|
2170
|
-
error: msg
|
|
2171
|
-
};
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
/** Send a file from local storage. */
|
|
2175
|
-
async function sendDocumentFromLocal(ctx, mediaPath, prefix) {
|
|
2176
|
-
const fileName = sanitizeFileName(path$2.basename(mediaPath));
|
|
2177
|
-
if (!await fileExistsAsync(mediaPath)) return {
|
|
2178
|
-
channel: "qqbot",
|
|
2179
|
-
error: "File not found"
|
|
2180
|
-
};
|
|
2181
|
-
const sizeCheck = checkFileSize(mediaPath);
|
|
2182
|
-
if (!sizeCheck.ok) return {
|
|
2183
|
-
channel: "qqbot",
|
|
2184
|
-
error: sizeCheck.error
|
|
2185
|
-
};
|
|
2186
|
-
const fileBuffer = await readFileAsync(mediaPath);
|
|
2187
|
-
if (fileBuffer.length === 0) return {
|
|
2188
|
-
channel: "qqbot",
|
|
2189
|
-
error: `File is empty: ${mediaPath}`
|
|
2190
|
-
};
|
|
2191
|
-
const fileBase64 = fileBuffer.toString("base64");
|
|
2192
|
-
debugLog(`${prefix} sendDocument: local file (${formatFileSize(fileBuffer.length)})`);
|
|
2193
|
-
try {
|
|
2194
|
-
const token = await getToken(ctx.account);
|
|
2195
|
-
if (ctx.targetType === "c2c") {
|
|
2196
|
-
const r = await sendC2CFileMessage(ctx.account.appId, token, ctx.targetId, fileBase64, void 0, ctx.replyToId, fileName, mediaPath);
|
|
2197
|
-
return {
|
|
2198
|
-
channel: "qqbot",
|
|
2199
|
-
messageId: r.id,
|
|
2200
|
-
timestamp: r.timestamp
|
|
2201
|
-
};
|
|
2202
|
-
} else if (ctx.targetType === "group") {
|
|
2203
|
-
const r = await sendGroupFileMessage(ctx.account.appId, token, ctx.targetId, fileBase64, void 0, ctx.replyToId, fileName);
|
|
2204
|
-
return {
|
|
2205
|
-
channel: "qqbot",
|
|
2206
|
-
messageId: r.id,
|
|
2207
|
-
timestamp: r.timestamp
|
|
2208
|
-
};
|
|
2209
|
-
} else {
|
|
2210
|
-
debugLog(`${prefix} sendDocument: file not supported in channel`);
|
|
2211
|
-
return {
|
|
2212
|
-
channel: "qqbot",
|
|
2213
|
-
error: "File not supported in channel"
|
|
2214
|
-
};
|
|
2215
|
-
}
|
|
2216
|
-
} catch (err) {
|
|
2217
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2218
|
-
debugError(`${prefix} sendDocument (local) failed: ${msg}`);
|
|
2219
|
-
return {
|
|
2220
|
-
channel: "qqbot",
|
|
2221
|
-
error: msg
|
|
2222
|
-
};
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
/** Download a remote file into the fallback media directory. */
|
|
2226
|
-
async function downloadToFallbackDir(httpUrl, prefix, caller) {
|
|
2227
|
-
try {
|
|
2228
|
-
const localFile = await downloadFile(httpUrl, getQQBotMediaDir("downloads", "url-fallback"));
|
|
2229
|
-
if (!localFile) {
|
|
2230
|
-
debugError(`${prefix} ${caller} fallback: download also failed for ${httpUrl.slice(0, 80)}`);
|
|
2231
|
-
return null;
|
|
2232
|
-
}
|
|
2233
|
-
debugLog(`${prefix} ${caller} fallback: downloaded → ${localFile}`);
|
|
2234
|
-
return localFile;
|
|
2235
|
-
} catch (err) {
|
|
2236
|
-
debugError(`${prefix} ${caller} fallback download error:`, err);
|
|
2237
|
-
return null;
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
/**
|
|
2241
|
-
* Send text, optionally falling back from passive reply mode to proactive mode.
|
|
2242
|
-
*
|
|
2243
|
-
* Also supports inline media tags such as `<qqimg>...</qqimg>`.
|
|
2244
|
-
*/
|
|
2245
|
-
async function sendText(ctx) {
|
|
2246
|
-
const { to, account } = ctx;
|
|
2247
|
-
let { text, replyToId } = ctx;
|
|
2248
|
-
let fallbackToProactive = false;
|
|
2249
|
-
debugLog("[qqbot] sendText ctx:", JSON.stringify({
|
|
2250
|
-
to,
|
|
2251
|
-
text: text?.slice(0, 50),
|
|
2252
|
-
replyToId,
|
|
2253
|
-
accountId: account.accountId
|
|
2254
|
-
}, null, 2));
|
|
2255
|
-
if (replyToId) {
|
|
2256
|
-
const limitCheck = checkMessageReplyLimit(replyToId);
|
|
2257
|
-
if (!limitCheck.allowed) if (limitCheck.shouldFallbackToProactive) {
|
|
2258
|
-
debugWarn(`[qqbot] sendText: passive reply unavailable, falling back to proactive send - ${limitCheck.message}`);
|
|
2259
|
-
fallbackToProactive = true;
|
|
2260
|
-
replyToId = null;
|
|
2261
|
-
} else {
|
|
2262
|
-
debugError(`[qqbot] sendText: passive reply was blocked without a fallback path - ${limitCheck.message}`);
|
|
2263
|
-
return {
|
|
2264
|
-
channel: "qqbot",
|
|
2265
|
-
error: limitCheck.message
|
|
2266
|
-
};
|
|
2267
|
-
}
|
|
2268
|
-
else debugLog(`[qqbot] sendText: remaining passive replies for ${replyToId}: ${limitCheck.remaining}/${MESSAGE_REPLY_LIMIT}`);
|
|
2269
|
-
}
|
|
2270
|
-
text = normalizeMediaTags(text);
|
|
2271
|
-
const mediaTagMatches = text.match(/<(qqimg|qqvoice|qqvideo|qqfile|qqmedia)>([^<>]+)<\/(?:qqimg|qqvoice|qqvideo|qqfile|qqmedia|img)>/gi);
|
|
2272
|
-
if (mediaTagMatches && mediaTagMatches.length > 0) {
|
|
2273
|
-
debugLog(`[qqbot] sendText: Detected ${mediaTagMatches.length} media tag(s), processing...`);
|
|
2274
|
-
const sendQueue = [];
|
|
2275
|
-
let lastIndex = 0;
|
|
2276
|
-
const mediaTagRegexWithIndex = /<(qqimg|qqvoice|qqvideo|qqfile|qqmedia)>([^<>]+)<\/(?:qqimg|qqvoice|qqvideo|qqfile|qqmedia|img)>/gi;
|
|
2277
|
-
let match;
|
|
2278
|
-
while ((match = mediaTagRegexWithIndex.exec(text)) !== null) {
|
|
2279
|
-
const textBefore = text.slice(lastIndex, match.index).replace(/\n{3,}/g, "\n\n").trim();
|
|
2280
|
-
if (textBefore) sendQueue.push({
|
|
2281
|
-
type: "text",
|
|
2282
|
-
content: textBefore
|
|
2283
|
-
});
|
|
2284
|
-
const tagName = match[1].toLowerCase();
|
|
2285
|
-
let mediaPath = match[2]?.trim() ?? "";
|
|
2286
|
-
if (mediaPath.startsWith("MEDIA:")) mediaPath = mediaPath.slice(6);
|
|
2287
|
-
mediaPath = normalizePath(mediaPath);
|
|
2288
|
-
mediaPath = mediaPath.replace(/\\\\/g, "\\");
|
|
2289
|
-
const isWinLocal = /^[a-zA-Z]:[\\/]/.test(mediaPath) || mediaPath.startsWith("\\\\");
|
|
2290
|
-
try {
|
|
2291
|
-
const hasOctal = /\\[0-7]{1,3}/.test(mediaPath);
|
|
2292
|
-
const hasNonASCII = /[\u0080-\u00FF]/.test(mediaPath);
|
|
2293
|
-
if (!isWinLocal && (hasOctal || hasNonASCII)) {
|
|
2294
|
-
debugLog(`[qqbot] sendText: Decoding path with mixed encoding: ${mediaPath}`);
|
|
2295
|
-
let decoded = mediaPath.replace(/\\([0-7]{1,3})/g, (_, octal) => {
|
|
2296
|
-
return String.fromCharCode(parseInt(octal, 8));
|
|
2297
|
-
});
|
|
2298
|
-
const bytes = [];
|
|
2299
|
-
for (let i = 0; i < decoded.length; i++) {
|
|
2300
|
-
const code = decoded.charCodeAt(i);
|
|
2301
|
-
if (code <= 255) bytes.push(code);
|
|
2302
|
-
else {
|
|
2303
|
-
const charBytes = Buffer.from(decoded[i], "utf8");
|
|
2304
|
-
bytes.push(...charBytes);
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
const utf8Decoded = Buffer.from(bytes).toString("utf8");
|
|
2308
|
-
if (!utf8Decoded.includes("�") || utf8Decoded.length < decoded.length) {
|
|
2309
|
-
mediaPath = utf8Decoded;
|
|
2310
|
-
debugLog(`[qqbot] sendText: Successfully decoded path: ${mediaPath}`);
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
} catch (decodeErr) {
|
|
2314
|
-
debugError(`[qqbot] sendText: Path decode error: ${decodeErr}`);
|
|
2315
|
-
}
|
|
2316
|
-
if (mediaPath) if (tagName === "qqmedia") {
|
|
2317
|
-
sendQueue.push({
|
|
2318
|
-
type: "media",
|
|
2319
|
-
content: mediaPath
|
|
2320
|
-
});
|
|
2321
|
-
debugLog(`[qqbot] sendText: Found auto-detect media in <qqmedia>: ${mediaPath}`);
|
|
2322
|
-
} else if (tagName === "qqvoice") {
|
|
2323
|
-
sendQueue.push({
|
|
2324
|
-
type: "voice",
|
|
2325
|
-
content: mediaPath
|
|
2326
|
-
});
|
|
2327
|
-
debugLog(`[qqbot] sendText: Found voice path in <qqvoice>: ${mediaPath}`);
|
|
2328
|
-
} else if (tagName === "qqvideo") {
|
|
2329
|
-
sendQueue.push({
|
|
2330
|
-
type: "video",
|
|
2331
|
-
content: mediaPath
|
|
2332
|
-
});
|
|
2333
|
-
debugLog(`[qqbot] sendText: Found video URL in <qqvideo>: ${mediaPath}`);
|
|
2334
|
-
} else if (tagName === "qqfile") {
|
|
2335
|
-
sendQueue.push({
|
|
2336
|
-
type: "file",
|
|
2337
|
-
content: mediaPath
|
|
2338
|
-
});
|
|
2339
|
-
debugLog(`[qqbot] sendText: Found file path in <qqfile>: ${mediaPath}`);
|
|
2340
|
-
} else {
|
|
2341
|
-
sendQueue.push({
|
|
2342
|
-
type: "image",
|
|
2343
|
-
content: mediaPath
|
|
2344
|
-
});
|
|
2345
|
-
debugLog(`[qqbot] sendText: Found image path in <qqimg>: ${mediaPath}`);
|
|
2346
|
-
}
|
|
2347
|
-
lastIndex = match.index + match[0].length;
|
|
2348
|
-
}
|
|
2349
|
-
const textAfter = text.slice(lastIndex).replace(/\n{3,}/g, "\n\n").trim();
|
|
2350
|
-
if (textAfter) sendQueue.push({
|
|
2351
|
-
type: "text",
|
|
2352
|
-
content: textAfter
|
|
2353
|
-
});
|
|
2354
|
-
debugLog(`[qqbot] sendText: Send queue: ${sendQueue.map((item) => item.type).join(" -> ")}`);
|
|
2355
|
-
const mediaTarget = buildMediaTarget({
|
|
2356
|
-
to,
|
|
2357
|
-
account,
|
|
2358
|
-
replyToId
|
|
2359
|
-
}, "[qqbot:sendText]");
|
|
2360
|
-
let lastResult = { channel: "qqbot" };
|
|
2361
|
-
for (const item of sendQueue) try {
|
|
2362
|
-
if (item.type === "text") {
|
|
2363
|
-
if (replyToId) {
|
|
2364
|
-
const accessToken = await getToken(account);
|
|
2365
|
-
const target = parseTarget(to);
|
|
2366
|
-
if (target.type === "c2c") {
|
|
2367
|
-
const result = await sendC2CMessage(account.appId, accessToken, target.id, item.content, replyToId);
|
|
2368
|
-
recordMessageReply(replyToId);
|
|
2369
|
-
lastResult = {
|
|
2370
|
-
channel: "qqbot",
|
|
2371
|
-
messageId: result.id,
|
|
2372
|
-
timestamp: result.timestamp,
|
|
2373
|
-
refIdx: result.ext_info?.ref_idx
|
|
2374
|
-
};
|
|
2375
|
-
} else if (target.type === "group") {
|
|
2376
|
-
const result = await sendGroupMessage(account.appId, accessToken, target.id, item.content, replyToId);
|
|
2377
|
-
recordMessageReply(replyToId);
|
|
2378
|
-
lastResult = {
|
|
2379
|
-
channel: "qqbot",
|
|
2380
|
-
messageId: result.id,
|
|
2381
|
-
timestamp: result.timestamp,
|
|
2382
|
-
refIdx: result.ext_info?.ref_idx
|
|
2383
|
-
};
|
|
2384
|
-
} else {
|
|
2385
|
-
const result = await sendChannelMessage(accessToken, target.id, item.content, replyToId);
|
|
2386
|
-
recordMessageReply(replyToId);
|
|
2387
|
-
lastResult = {
|
|
2388
|
-
channel: "qqbot",
|
|
2389
|
-
messageId: result.id,
|
|
2390
|
-
timestamp: result.timestamp,
|
|
2391
|
-
refIdx: result.ext_info?.ref_idx
|
|
2392
|
-
};
|
|
2393
|
-
}
|
|
2394
|
-
} else {
|
|
2395
|
-
const accessToken = await getToken(account);
|
|
2396
|
-
const target = parseTarget(to);
|
|
2397
|
-
if (target.type === "c2c") {
|
|
2398
|
-
const result = await sendProactiveC2CMessage(account.appId, accessToken, target.id, item.content);
|
|
2399
|
-
lastResult = {
|
|
2400
|
-
channel: "qqbot",
|
|
2401
|
-
messageId: result.id,
|
|
2402
|
-
timestamp: result.timestamp,
|
|
2403
|
-
refIdx: result.ext_info?.ref_idx
|
|
2404
|
-
};
|
|
2405
|
-
} else if (target.type === "group") {
|
|
2406
|
-
const result = await sendProactiveGroupMessage(account.appId, accessToken, target.id, item.content);
|
|
2407
|
-
lastResult = {
|
|
2408
|
-
channel: "qqbot",
|
|
2409
|
-
messageId: result.id,
|
|
2410
|
-
timestamp: result.timestamp,
|
|
2411
|
-
refIdx: result.ext_info?.ref_idx
|
|
2412
|
-
};
|
|
2413
|
-
} else {
|
|
2414
|
-
const result = await sendChannelMessage(accessToken, target.id, item.content);
|
|
2415
|
-
lastResult = {
|
|
2416
|
-
channel: "qqbot",
|
|
2417
|
-
messageId: result.id,
|
|
2418
|
-
timestamp: result.timestamp,
|
|
2419
|
-
refIdx: result.ext_info?.ref_idx
|
|
2420
|
-
};
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
debugLog(`[qqbot] sendText: Sent text part: ${item.content.slice(0, 30)}...`);
|
|
2424
|
-
} else if (item.type === "image") lastResult = await sendPhoto(mediaTarget, item.content);
|
|
2425
|
-
else if (item.type === "voice") lastResult = await sendVoice(mediaTarget, item.content, void 0, account.config?.audioFormatPolicy?.transcodeEnabled !== false);
|
|
2426
|
-
else if (item.type === "video") lastResult = await sendVideoMsg(mediaTarget, item.content);
|
|
2427
|
-
else if (item.type === "file") lastResult = await sendDocument(mediaTarget, item.content);
|
|
2428
|
-
else if (item.type === "media") lastResult = await sendMedia({
|
|
2429
|
-
to,
|
|
2430
|
-
text: "",
|
|
2431
|
-
mediaUrl: item.content,
|
|
2432
|
-
accountId: account.accountId,
|
|
2433
|
-
replyToId,
|
|
2434
|
-
account
|
|
2435
|
-
});
|
|
2436
|
-
} catch (err) {
|
|
2437
|
-
const errMsg = err instanceof Error ? err.message : String(err);
|
|
2438
|
-
debugError(`[qqbot] sendText: Failed to send ${item.type}: ${errMsg}`);
|
|
2439
|
-
lastResult = {
|
|
2440
|
-
channel: "qqbot",
|
|
2441
|
-
error: errMsg
|
|
2442
|
-
};
|
|
2443
|
-
}
|
|
2444
|
-
return lastResult;
|
|
2445
|
-
}
|
|
2446
|
-
if (!replyToId) {
|
|
2447
|
-
if (!text || text.trim().length === 0) {
|
|
2448
|
-
debugError("[qqbot] sendText error: proactive message content cannot be empty");
|
|
2449
|
-
return {
|
|
2450
|
-
channel: "qqbot",
|
|
2451
|
-
error: "Proactive messages require non-empty content (--message cannot be empty)"
|
|
2452
|
-
};
|
|
2453
|
-
}
|
|
2454
|
-
if (fallbackToProactive) debugLog(`[qqbot] sendText: [fallback] sending proactive message to ${to}, length=${text.length}`);
|
|
2455
|
-
else debugLog(`[qqbot] sendText: sending proactive message to ${to}, length=${text.length}`);
|
|
2456
|
-
}
|
|
2457
|
-
if (!account.appId || !account.clientSecret) return {
|
|
2458
|
-
channel: "qqbot",
|
|
2459
|
-
error: "QQBot not configured (missing appId or clientSecret)"
|
|
2460
|
-
};
|
|
2461
|
-
try {
|
|
2462
|
-
const accessToken = await getAccessToken(account.appId, account.clientSecret);
|
|
2463
|
-
const target = parseTarget(to);
|
|
2464
|
-
debugLog("[qqbot] sendText target:", JSON.stringify(target));
|
|
2465
|
-
if (!replyToId) {
|
|
2466
|
-
let outResult;
|
|
2467
|
-
if (target.type === "c2c") {
|
|
2468
|
-
const result = await sendProactiveC2CMessage(account.appId, accessToken, target.id, text);
|
|
2469
|
-
outResult = {
|
|
2470
|
-
channel: "qqbot",
|
|
2471
|
-
messageId: result.id,
|
|
2472
|
-
timestamp: result.timestamp,
|
|
2473
|
-
refIdx: result.ext_info?.ref_idx
|
|
2474
|
-
};
|
|
2475
|
-
} else if (target.type === "group") {
|
|
2476
|
-
const result = await sendProactiveGroupMessage(account.appId, accessToken, target.id, text);
|
|
2477
|
-
outResult = {
|
|
2478
|
-
channel: "qqbot",
|
|
2479
|
-
messageId: result.id,
|
|
2480
|
-
timestamp: result.timestamp,
|
|
2481
|
-
refIdx: result.ext_info?.ref_idx
|
|
2482
|
-
};
|
|
2483
|
-
} else {
|
|
2484
|
-
const result = await sendChannelMessage(accessToken, target.id, text);
|
|
2485
|
-
outResult = {
|
|
2486
|
-
channel: "qqbot",
|
|
2487
|
-
messageId: result.id,
|
|
2488
|
-
timestamp: result.timestamp,
|
|
2489
|
-
refIdx: result.ext_info?.ref_idx
|
|
2490
|
-
};
|
|
2491
|
-
}
|
|
2492
|
-
return outResult;
|
|
2493
|
-
}
|
|
2494
|
-
if (target.type === "c2c") {
|
|
2495
|
-
const result = await sendC2CMessage(account.appId, accessToken, target.id, text, replyToId);
|
|
2496
|
-
recordMessageReply(replyToId);
|
|
2497
|
-
return {
|
|
2498
|
-
channel: "qqbot",
|
|
2499
|
-
messageId: result.id,
|
|
2500
|
-
timestamp: result.timestamp,
|
|
2501
|
-
refIdx: result.ext_info?.ref_idx
|
|
2502
|
-
};
|
|
2503
|
-
} else if (target.type === "group") {
|
|
2504
|
-
const result = await sendGroupMessage(account.appId, accessToken, target.id, text, replyToId);
|
|
2505
|
-
recordMessageReply(replyToId);
|
|
2506
|
-
return {
|
|
2507
|
-
channel: "qqbot",
|
|
2508
|
-
messageId: result.id,
|
|
2509
|
-
timestamp: result.timestamp,
|
|
2510
|
-
refIdx: result.ext_info?.ref_idx
|
|
2511
|
-
};
|
|
2512
|
-
} else {
|
|
2513
|
-
const result = await sendChannelMessage(accessToken, target.id, text, replyToId);
|
|
2514
|
-
recordMessageReply(replyToId);
|
|
2515
|
-
return {
|
|
2516
|
-
channel: "qqbot",
|
|
2517
|
-
messageId: result.id,
|
|
2518
|
-
timestamp: result.timestamp,
|
|
2519
|
-
refIdx: result.ext_info?.ref_idx
|
|
2520
|
-
};
|
|
2521
|
-
}
|
|
2522
|
-
} catch (err) {
|
|
2523
|
-
return {
|
|
2524
|
-
channel: "qqbot",
|
|
2525
|
-
error: err instanceof Error ? err.message : String(err)
|
|
2526
|
-
};
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
/** Send a proactive message without a replyToId. */
|
|
2530
|
-
async function sendProactiveMessage(account, to, text) {
|
|
2531
|
-
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
2532
|
-
if (!account.appId || !account.clientSecret) {
|
|
2533
|
-
const errorMsg = "QQBot not configured (missing appId or clientSecret)";
|
|
2534
|
-
debugError(`[${timestamp}] [qqbot] sendProactiveMessage: ${errorMsg}`);
|
|
2535
|
-
return {
|
|
2536
|
-
channel: "qqbot",
|
|
2537
|
-
error: errorMsg
|
|
2538
|
-
};
|
|
2539
|
-
}
|
|
2540
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: starting, to=${to}, text length=${text.length}, accountId=${account.accountId}`);
|
|
2541
|
-
try {
|
|
2542
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: getting access token for appId=${account.appId}`);
|
|
2543
|
-
const accessToken = await getAccessToken(account.appId, account.clientSecret);
|
|
2544
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: parsing target=${to}`);
|
|
2545
|
-
const target = parseTarget(to);
|
|
2546
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: target parsed, type=${target.type}, id=${target.id}`);
|
|
2547
|
-
let outResult;
|
|
2548
|
-
if (target.type === "c2c") {
|
|
2549
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: sending proactive C2C message to user=${target.id}`);
|
|
2550
|
-
const result = await sendProactiveC2CMessage(account.appId, accessToken, target.id, text);
|
|
2551
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: proactive C2C message sent successfully, messageId=${result.id}`);
|
|
2552
|
-
outResult = {
|
|
2553
|
-
channel: "qqbot",
|
|
2554
|
-
messageId: result.id,
|
|
2555
|
-
timestamp: result.timestamp,
|
|
2556
|
-
refIdx: result.ext_info?.ref_idx
|
|
2557
|
-
};
|
|
2558
|
-
} else if (target.type === "group") {
|
|
2559
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: sending proactive group message to group=${target.id}`);
|
|
2560
|
-
const result = await sendProactiveGroupMessage(account.appId, accessToken, target.id, text);
|
|
2561
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: proactive group message sent successfully, messageId=${result.id}`);
|
|
2562
|
-
outResult = {
|
|
2563
|
-
channel: "qqbot",
|
|
2564
|
-
messageId: result.id,
|
|
2565
|
-
timestamp: result.timestamp,
|
|
2566
|
-
refIdx: result.ext_info?.ref_idx
|
|
2567
|
-
};
|
|
2568
|
-
} else {
|
|
2569
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: sending channel message to channel=${target.id}`);
|
|
2570
|
-
const result = await sendChannelMessage(accessToken, target.id, text);
|
|
2571
|
-
debugLog(`[${timestamp}] [qqbot] sendProactiveMessage: channel message sent successfully, messageId=${result.id}`);
|
|
2572
|
-
outResult = {
|
|
2573
|
-
channel: "qqbot",
|
|
2574
|
-
messageId: result.id,
|
|
2575
|
-
timestamp: result.timestamp,
|
|
2576
|
-
refIdx: result.ext_info?.ref_idx
|
|
2577
|
-
};
|
|
2578
|
-
}
|
|
2579
|
-
return outResult;
|
|
2580
|
-
} catch (err) {
|
|
2581
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
2582
|
-
debugError(`[${timestamp}] [qqbot] sendProactiveMessage: error: ${errorMessage}`);
|
|
2583
|
-
debugError(`[${timestamp}] [qqbot] sendProactiveMessage: error stack: ${err instanceof Error ? err.stack : "No stack trace"}`);
|
|
2584
|
-
return {
|
|
2585
|
-
channel: "qqbot",
|
|
2586
|
-
error: errorMessage
|
|
2587
|
-
};
|
|
2588
|
-
}
|
|
2589
|
-
}
|
|
2590
|
-
/** Send rich media, auto-routing by media type and source. */
|
|
2591
|
-
async function sendMedia(ctx) {
|
|
2592
|
-
const { to, text, replyToId, account, mimeType } = ctx;
|
|
2593
|
-
const mediaUrl = resolveQQBotLocalMediaPath(normalizePath(ctx.mediaUrl));
|
|
2594
|
-
if (!account.appId || !account.clientSecret) return {
|
|
2595
|
-
channel: "qqbot",
|
|
2596
|
-
error: "QQBot not configured (missing appId or clientSecret)"
|
|
2597
|
-
};
|
|
2598
|
-
if (!mediaUrl) return {
|
|
2599
|
-
channel: "qqbot",
|
|
2600
|
-
error: "mediaUrl is required for sendMedia"
|
|
2601
|
-
};
|
|
2602
|
-
const target = buildMediaTarget({
|
|
2603
|
-
to,
|
|
2604
|
-
account,
|
|
2605
|
-
replyToId
|
|
2606
|
-
}, "[qqbot:sendMedia]");
|
|
2607
|
-
if (isAudioFile(mediaUrl, mimeType)) {
|
|
2608
|
-
const result = await sendVoice(target, mediaUrl, account.config?.audioFormatPolicy?.uploadDirectFormats ?? account.config?.voiceDirectUploadFormats, account.config?.audioFormatPolicy?.transcodeEnabled !== false);
|
|
2609
|
-
if (!result.error) {
|
|
2610
|
-
if (text?.trim()) await sendTextAfterMedia(target, text);
|
|
2611
|
-
return result;
|
|
2612
|
-
}
|
|
2613
|
-
const voiceError = result.error;
|
|
2614
|
-
debugWarn(`[qqbot] sendMedia: sendVoice failed (${voiceError}), falling back to sendDocument`);
|
|
2615
|
-
const fallback = await sendDocument(target, mediaUrl);
|
|
2616
|
-
if (!fallback.error) {
|
|
2617
|
-
if (text?.trim()) await sendTextAfterMedia(target, text);
|
|
2618
|
-
return fallback;
|
|
2619
|
-
}
|
|
2620
|
-
return {
|
|
2621
|
-
channel: "qqbot",
|
|
2622
|
-
error: `voice: ${voiceError} | fallback file: ${fallback.error}`
|
|
2623
|
-
};
|
|
2624
|
-
}
|
|
2625
|
-
if (isVideoFile(mediaUrl, mimeType)) {
|
|
2626
|
-
const result = await sendVideoMsg(target, mediaUrl);
|
|
2627
|
-
if (!result.error && text?.trim()) await sendTextAfterMedia(target, text);
|
|
2628
|
-
return result;
|
|
2629
|
-
}
|
|
2630
|
-
if (!isImageFile(mediaUrl, mimeType) && !isAudioFile(mediaUrl, mimeType) && !isVideoFile(mediaUrl, mimeType)) {
|
|
2631
|
-
const result = await sendDocument(target, mediaUrl);
|
|
2632
|
-
if (!result.error && text?.trim()) await sendTextAfterMedia(target, text);
|
|
2633
|
-
return result;
|
|
2634
|
-
}
|
|
2635
|
-
const result = await sendPhoto(target, mediaUrl);
|
|
2636
|
-
if (!result.error && text?.trim()) await sendTextAfterMedia(target, text);
|
|
2637
|
-
return result;
|
|
2638
|
-
}
|
|
2639
|
-
/** Send text after media when the transport supports a follow-up text message. */
|
|
2640
|
-
async function sendTextAfterMedia(ctx, text) {
|
|
2641
|
-
try {
|
|
2642
|
-
const token = await getToken(ctx.account);
|
|
2643
|
-
if (ctx.targetType === "c2c") await sendC2CMessage(ctx.account.appId, token, ctx.targetId, text, ctx.replyToId);
|
|
2644
|
-
else if (ctx.targetType === "group") await sendGroupMessage(ctx.account.appId, token, ctx.targetId, text, ctx.replyToId);
|
|
2645
|
-
else if (ctx.targetType === "channel") await sendChannelMessage(token, ctx.targetId, text, ctx.replyToId);
|
|
2646
|
-
else if (ctx.targetType === "dm") await sendDmMessage(token, ctx.targetId, text, ctx.replyToId);
|
|
2647
|
-
} catch (err) {
|
|
2648
|
-
debugError(`[qqbot] sendTextAfterMedia failed: ${err}`);
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
/** Extract a lowercase extension from a path or URL, ignoring query and hash segments. */
|
|
2652
|
-
function getCleanExt(filePath) {
|
|
2653
|
-
const cleanPath = filePath.split("?")[0].split("#")[0];
|
|
2654
|
-
return path$2.extname(cleanPath).toLowerCase();
|
|
2655
|
-
}
|
|
2656
|
-
/** Check whether a file is an image using MIME first and extension as fallback. */
|
|
2657
|
-
function isImageFile(filePath, mimeType) {
|
|
2658
|
-
if (mimeType) {
|
|
2659
|
-
if (mimeType.startsWith("image/")) return true;
|
|
2660
|
-
}
|
|
2661
|
-
const ext = getCleanExt(filePath);
|
|
2662
|
-
return [
|
|
2663
|
-
".jpg",
|
|
2664
|
-
".jpeg",
|
|
2665
|
-
".png",
|
|
2666
|
-
".gif",
|
|
2667
|
-
".webp",
|
|
2668
|
-
".bmp"
|
|
2669
|
-
].includes(ext);
|
|
2670
|
-
}
|
|
2671
|
-
/** Check whether a file or URL is a video using MIME first and extension as fallback. */
|
|
2672
|
-
function isVideoFile(filePath, mimeType) {
|
|
2673
|
-
if (mimeType) {
|
|
2674
|
-
if (mimeType.startsWith("video/")) return true;
|
|
2675
|
-
}
|
|
2676
|
-
const ext = getCleanExt(filePath);
|
|
2677
|
-
return [
|
|
2678
|
-
".mp4",
|
|
2679
|
-
".mov",
|
|
2680
|
-
".avi",
|
|
2681
|
-
".mkv",
|
|
2682
|
-
".webm",
|
|
2683
|
-
".flv",
|
|
2684
|
-
".wmv"
|
|
2685
|
-
].includes(ext);
|
|
2686
|
-
}
|
|
2687
|
-
/**
|
|
2688
|
-
* Send a message emitted by an OpenClaw cron task.
|
|
2689
|
-
*
|
|
2690
|
-
* Cron output may be either:
|
|
2691
|
-
* 1. A `QQBOT_CRON:{base64}` structured payload that includes target metadata.
|
|
2692
|
-
* 2. Plain text that should be sent directly to the provided fallback target.
|
|
2693
|
-
*
|
|
2694
|
-
* @param account Resolved account configuration.
|
|
2695
|
-
* @param to Fallback target address when the payload does not include one.
|
|
2696
|
-
* @param message Message content, either `QQBOT_CRON:` payload or plain text.
|
|
2697
|
-
* @returns Send result.
|
|
2698
|
-
*
|
|
2699
|
-
* @example
|
|
2700
|
-
* ```typescript
|
|
2701
|
-
* // Structured payload
|
|
2702
|
-
* const result = await sendCronMessage(
|
|
2703
|
-
* account,
|
|
2704
|
-
* "user_openid",
|
|
2705
|
-
* "QQBOT_CRON:eyJ0eXBlIjoiY3Jvbl9yZW1pbmRlciIs..."
|
|
2706
|
-
* );
|
|
2707
|
-
*
|
|
2708
|
-
* // Plain text
|
|
2709
|
-
* const result = await sendCronMessage(account, "user_openid", "This is a plain reminder message.");
|
|
2710
|
-
* ```
|
|
2711
|
-
*/
|
|
2712
|
-
async function sendCronMessage(account, to, message) {
|
|
2713
|
-
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
2714
|
-
debugLog(`[${timestamp}] [qqbot] sendCronMessage: to=${to}, message length=${message.length}`);
|
|
2715
|
-
const cronResult = decodeCronPayload(message);
|
|
2716
|
-
if (cronResult.isCronPayload) {
|
|
2717
|
-
if (cronResult.error) {
|
|
2718
|
-
debugError(`[${timestamp}] [qqbot] sendCronMessage: cron payload decode error: ${cronResult.error}`);
|
|
2719
|
-
return {
|
|
2720
|
-
channel: "qqbot",
|
|
2721
|
-
error: `Failed to decode cron payload: ${cronResult.error}`
|
|
2722
|
-
};
|
|
2723
|
-
}
|
|
2724
|
-
if (cronResult.payload) {
|
|
2725
|
-
const payload = cronResult.payload;
|
|
2726
|
-
debugLog(`[${timestamp}] [qqbot] sendCronMessage: decoded cron payload, targetType=${payload.targetType}, targetAddress=${payload.targetAddress}, content length=${payload.content.length}`);
|
|
2727
|
-
const targetTo = payload.targetType === "group" ? `group:${payload.targetAddress}` : payload.targetAddress;
|
|
2728
|
-
debugLog(`[${timestamp}] [qqbot] sendCronMessage: sending proactive message to targetTo=${targetTo}`);
|
|
2729
|
-
const result = await sendProactiveMessage(account, targetTo, payload.content);
|
|
2730
|
-
if (result.error) debugError(`[${timestamp}] [qqbot] sendCronMessage: proactive message failed, error=${result.error}`);
|
|
2731
|
-
else debugLog(`[${timestamp}] [qqbot] sendCronMessage: proactive message sent successfully`);
|
|
2732
|
-
return result;
|
|
2733
|
-
}
|
|
2734
|
-
}
|
|
2735
|
-
debugLog(`[${timestamp}] [qqbot] sendCronMessage: plain text message, sending to ${to}`);
|
|
2736
|
-
return await sendProactiveMessage(account, to, message);
|
|
2737
|
-
}
|
|
2738
|
-
//#endregion
|
|
2739
|
-
export { getQQBotMediaDir as $, getAccessToken as A, sendChannelMessage as B, formatDuration as C, textToSilk as D, resolveTTSConfig as E, sendC2CImageMessage as F, sendGroupVideoMessage as G, sendGroupFileMessage as H, sendC2CInputNotify as I, sendProactiveGroupMessage as J, sendGroupVoiceMessage as K, sendC2CMessage as L, initApiConfig as M, onMessageSent as N, PLUGIN_USER_AGENT as O, sendC2CFileMessage as P, getQQBotDataDir as Q, sendC2CVideoMessage as R, convertSilkToWav as S, isVoiceAttachment as T, sendGroupImageMessage as U, sendDmMessage as V, sendGroupMessage as W, stopBackgroundTokenRefresh as X, startBackgroundTokenRefresh as Y, getHomeDir as Z, normalizeMediaTags as _, sendCronMessage as a, sanitizeFileName as at, formatFileSize as b, sendPhoto as c, sendVideoMsg as d, isLocalPath as et, sendVoice as f, parseQQBotPayload as g, isMediaPayload as h, recordMessageReply as i, runDiagnostics as it, getGatewayUrl as j, clearTokenCache as k, sendProactiveMessage as l, isCronReminderPayload as m, getMessageReplyConfig as n, normalizePath as nt, sendDocument as o, debugError as ot, encodePayloadForCron as p, sendProactiveC2CMessage as q, getMessageReplyStats as r, resolveQQBotPayloadLocalFilePath as rt, sendMedia as s, debugLog as st, checkMessageReplyLimit as t, isWindows as tt, sendText as u, MAX_UPLOAD_SIZE as v, isGlobalTTSAvailable as w, audioFileToSilkBase64 as x, downloadFile as y, sendC2CVoiceMessage as z };
|