stableclaw 2026.5.0 → 2026.5.2
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/dist/.buildstamp +1 -1
- package/dist/abort-DbOWfk1R.js +192 -0
- package/dist/abort-cutoff.runtime-ZDeu_mNv.js +20 -0
- package/dist/abort-cutoff.runtime.js +1 -1
- package/dist/abort.runtime-DzSEcqwd.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/access-control-ChkJvEGP.js +152 -0
- package/dist/account-inspect-DCKRZRny.js +158 -0
- package/dist/accounts-BGTN7cr-.js +102 -0
- package/dist/accounts-CinolZTU.js +107 -0
- package/dist/accounts-CkhyYlS6.js +137 -0
- package/dist/accounts-D219ghr6.js +57 -0
- package/dist/accounts-DrggbKcd.js +2 -0
- package/dist/acp-runtime-_pYPcJEH.js +8 -0
- package/dist/acp-stateful-target-driver-BEIUsg83.js +60 -0
- package/dist/action-runtime-CJhBKfDC.js +318 -0
- package/dist/action-runtime-NLKQbAQA.js +72 -0
- package/dist/action-runtime-api-YzbQ4Qy6.js +1028 -0
- package/dist/actions-BrAcUNm-.js +531 -0
- package/dist/actions.runtime-BwB4CvxW.js +2 -0
- package/dist/actions.runtime-CiYUOMp1.js +18 -0
- package/dist/actions.runtime-SFl3LXbz.js +5 -0
- package/dist/actions.runtime.js +1 -1
- package/dist/agent-CdYMZ9fr.js +2 -0
- package/dist/agent-command-wY0aEiLZ.js +1457 -0
- package/dist/agent-runner.runtime-BJYxz_AG.js +2241 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-Cm6WYH1X.js +142 -0
- package/dist/agent-tools-login-Bd1V75kh.js +57 -0
- package/dist/agents-IbQmK8Yn.js +888 -0
- package/dist/agents-MrSC-Up6.js +5 -0
- package/dist/api-BQHk-t06.js +5 -0
- package/dist/api-Bmx0BK0F.js +5 -0
- package/dist/api-CJIpnZrc.js +10 -0
- package/dist/api-CRhMGxLB.js +6 -0
- package/dist/api-CdYIiak82.js +322 -0
- package/dist/api-DOdPShPk.js +2 -0
- package/dist/api-jI3BtiNB.js +2 -0
- package/dist/apply-Cbt003x7.js +485 -0
- package/dist/apply.runtime-CY47EbzA.js +2 -0
- package/dist/apply.runtime.js +1 -1
- package/dist/approval-native-B4HJRa55.js +79 -0
- package/dist/approval-runtime-B6PXavdQ.js +262 -0
- package/dist/assistant-identity-CeKI09AJ.js +74 -0
- package/dist/attachment-normalize-BZdNI2So.js +921 -0
- package/dist/audit-BLq9P3oA.js +86 -0
- package/dist/audit-DtlsDuaM.js +892 -0
- package/dist/audit-channel.allow-from.runtime.js +1 -1
- package/dist/audit-channel.collect.runtime-CTutyCbl.js +528 -0
- package/dist/audit-channel.collect.runtime.js +1 -1
- package/dist/audit-channel.discord.runtime.js +1 -1
- package/dist/audit-channel.telegram.runtime-DgjqHj_y.js +8 -0
- package/dist/audit-channel.telegram.runtime.js +1 -1
- package/dist/audit-channel.zalouser.runtime.js +1 -1
- package/dist/audit-extra.async-azTwi9Ii.js +820 -0
- package/dist/audit.deep.runtime-DczMVmZl.js +2 -0
- package/dist/audit.deep.runtime.js +1 -1
- package/dist/audit.nondeep.runtime-C0-gevdg.js +831 -0
- package/dist/audit.nondeep.runtime.js +1 -1
- package/dist/audit.runtime-CjmP-IVf.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-D9R9vTdP.js +181 -0
- package/dist/auth-choice-ASVf3uqH.js +3 -0
- package/dist/auth-choice-CUGc7jRT.js +341 -0
- package/dist/auth-choice-TdFpgqf8.js +69 -0
- package/dist/binding-targets-BB736PNg.js +99 -0
- package/dist/bot-i7rkFnoU.js +4268 -0
- package/dist/bot-message-context-NjuZxwNf.js +2 -0
- package/dist/bot-message-context-SFoFcMU0.js +1175 -0
- package/dist/bot-message-context.runtime-BuHjCi1s.js +7 -0
- package/dist/bot-message-context.runtime.js +1 -1
- package/dist/bot-message-context.session.runtime-BOjKvTjg.js +12 -0
- package/dist/bot-message-context.session.runtime.js +1 -1
- package/dist/bot-native-commands.delivery.runtime-CMVcyVfr.js +3 -0
- package/dist/bot-native-commands.delivery.runtime.js +1 -1
- package/dist/bot-native-commands.runtime-DPXiZ-g-.js +11 -0
- package/dist/bot-native-commands.runtime.js +1 -1
- package/dist/bundled/boot-md/handler.js +3 -3
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/channel-6JSPqz3S.js +599 -0
- package/dist/channel-8fxnaoxA.js +1135 -0
- package/dist/channel-BGr4lB_p.js +208 -0
- package/dist/channel-BRZOhpO-.js +1217 -0
- package/dist/channel-BTaI9Vsm.js +454 -0
- package/dist/channel-BuvbHCUl.js +800 -0
- package/dist/channel-C0kxZQ7E.js +883 -0
- package/dist/channel-CJgXhuIs.js +698 -0
- package/dist/channel-DQWDH71E.js +337 -0
- package/dist/channel-DqywfjHt.js +361 -0
- package/dist/channel-inbound-BbIwjinv.js +30 -0
- package/dist/channel-o7dERoVP.js +1129 -0
- package/dist/channel-ouAyZmKb.js +788 -0
- package/dist/channel-pGQXHihG.js +783 -0
- package/dist/channel-plugin-resolution-E1W_efdm.js +144 -0
- package/dist/channel-qw2GU-78.js +1661 -0
- package/dist/channel-shared-DsqgfMVz.js +58 -0
- package/dist/channel-x8EJXY-p.js +4976 -0
- package/dist/channel.runtime-9U-FzlTX.js +22252 -0
- package/dist/channel.runtime-CDRgtalS.js +309 -0
- package/dist/channel.runtime-CrTb-acp.js +373 -0
- package/dist/channel.runtime-CvUJhEWE.js +14 -0
- package/dist/channel.runtime-D86obE0J.js +108 -0
- package/dist/channel.runtime-DR14R1qn.js +125 -0
- package/dist/channel.runtime-DY-t80Mq.js +335 -0
- package/dist/channel.runtime-Db6-JgiT.js +80 -0
- package/dist/channel.setup-5ccX1E-a.js +279 -0
- package/dist/channels-CU1r9oWn.js +1134 -0
- package/dist/channels-cli-H6kLKRCJ.js +246 -0
- package/dist/clawhub-CicQAK3Q.js +163 -0
- package/dist/cli/daemon-cli.js +3 -9
- package/dist/cli-BeJobAfz.js +695 -0
- package/dist/cli-Bw_QTHCD.js +152 -0
- package/dist/cli-migration-DBUl9wOM.js +100 -0
- package/dist/cli-runner-CNdeXILj.js +1014 -0
- package/dist/client-C7KrfnR_.js +5 -0
- package/dist/client-D1IMuN2R.js +7 -0
- package/dist/client-bootstrap-BRL3IJbX.js +2 -0
- package/dist/client-bootstrap-BnU_fgOa.js +121 -0
- package/dist/code-execution-Dy3oNAvz.js +142 -0
- package/dist/command-auth-BoH1IkmW.js +64 -0
- package/dist/command-registry-CFUnlk3Y.js +199 -0
- package/dist/command-registry-Dy7lErHE.js +3 -0
- package/dist/commands-P7L4abaE.js +4 -0
- package/dist/commands-acp-CRBC84-r.js +990 -0
- package/dist/commands-core-DfVd-xq7.js +241 -0
- package/dist/commands-core.runtime-CCF1BiL7.js +2 -0
- package/dist/commands-core.runtime.js +1 -1
- package/dist/commands-handlers.runtime-BWoNwBZE.js +3708 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-info-CSt3aoRZ.js +651 -0
- package/dist/commands-models-FgUB1hGv.js +395 -0
- package/dist/commands-status.runtime-jcqPwtM3.js +2 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands.runtime-CIbt20JL.js +4 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/compact.runtime-DKdAjeMZ.js +7 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-7xXpXxID.js +2 -0
- package/dist/completion-cli-Csbpl09N.js +466 -0
- package/dist/config-BGW2qyLw.js +475 -0
- package/dist/config-cli--4OexF6J.js +945 -0
- package/dist/config-guard-V5IAh_mF.js +113 -0
- package/dist/config-runtime-D208l2BL.js +13 -0
- package/dist/config-secret-input.runtime-BF9IBBeM.js +3 -0
- package/dist/config-secret-input.runtime.js +1 -1
- package/dist/config-update-BBzrkxal.js +127 -0
- package/dist/config-update-DrtP_s0Y.js +3 -0
- package/dist/configure-B5cJf26V.js +2 -0
- package/dist/configure-Ts01pF4g.js +1140 -0
- package/dist/context-DeDQINVq.js +227 -0
- package/dist/control-ui-C9vPgc9L.js +388 -0
- package/dist/conversation-bindings-CwHBn1fl.js +210 -0
- package/dist/conversation-id-BOk-dTsl.js +168 -0
- package/dist/conversation-runtime-DvoDx5Lp.js +85 -0
- package/dist/core-_nKe7lGV.js +195 -0
- package/dist/create-client-BenzpBNt.js +2 -0
- package/dist/create-client-CGt4-gcv.js +58 -0
- package/dist/credentials-7IVnN_TF.js +22 -0
- package/dist/credentials-write.runtime-D1VXZncp.js +9 -0
- package/dist/credentials-write.runtime.js +1 -1
- package/dist/crypto-runtime-Y20cyTTx.js +3495 -0
- package/dist/daemon-cli-DvP7I-Uu.js +383 -0
- package/dist/daemon-install-CVIbxBN5.js +63 -0
- package/dist/delegate-VctUvdru.js +43 -0
- package/dist/deliver-DTfKSC4Q.js +954 -0
- package/dist/deliver-LbQQnhR5.js +3 -0
- package/dist/deliver-reply-18sWD8M4.js +238 -0
- package/dist/deliver-runtime-Qg81IeZu.js +2 -0
- package/dist/delivery-D8E92dmQ.js +834 -0
- package/dist/delivery-info-Cls9iWRl.js +40 -0
- package/dist/direct-dm-Dg-rhCG0.js +139 -0
- package/dist/direct-management-CaI85_dA.js +2 -0
- package/dist/direct-management-DjdwL-F4.js +300 -0
- package/dist/directive-handling.fast-lane-3sGyxlH_.js +64 -0
- package/dist/directive-handling.fast-lane-CKe_S3fo.js +2 -0
- package/dist/directive-handling.impl-C1D-MGbp.js +2 -0
- package/dist/directive-handling.impl-Dk6oRN3H.js +672 -0
- package/dist/directive-handling.parse-ni5LIlSW.js +375 -0
- package/dist/directive-handling.persist-DSyJG2Kq.js +133 -0
- package/dist/directive-handling.persist.runtime-WEeAbhJ8.js +2 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/directive-handling.shared-DPXk9T6l.js +158 -0
- package/dist/directory-cli-CL6UudXS.js +238 -0
- package/dist/directory.static-BX7RI4Aq.js +45 -0
- package/dist/discovery-DhEDepjw.js +171 -0
- package/dist/dispatch-acp.runtime-DHUc4MMQ.js +884 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/dispatch-au2t5HsH.js +858 -0
- package/dist/doctor-completion-fD570xvd.js +90 -0
- package/dist/doctor-config-preflight-B0C_HTWN.js +2 -0
- package/dist/doctor-config-preflight-OMEufm7U.js +148 -0
- package/dist/doctor-state-migrations-BJ5M0r8a.js +2 -0
- package/dist/doctor-state-migrations-CPG_ii-i.js +3 -0
- package/dist/embedding-provider-vb6JoF5D.js +129 -0
- package/dist/encryption-guidance-BRY-GWVy.js +33 -0
- package/dist/entry.js +2 -2
- package/dist/error-text-CM5bR2qT.js +24 -0
- package/dist/exec-approval-session-target-Ci45mXNL.js +159 -0
- package/dist/exec-approvals-D9wFcLn9.js +121 -0
- package/dist/extensionAPI.js +3 -3
- package/dist/extensions/acpx/index.js +3 -3
- package/dist/extensions/acpx/runtime-api.js +2 -2
- package/dist/extensions/amazon-bedrock/api.js +2 -2
- package/dist/extensions/amazon-bedrock/discovery.js +1 -1
- package/dist/extensions/amazon-bedrock/index.js +2 -2
- package/dist/extensions/anthropic/cli-migration.js +1 -1
- package/dist/extensions/anthropic/index.js +5 -5
- package/dist/extensions/anthropic/media-understanding-provider.js +1 -1
- package/dist/extensions/bluebubbles/api.js +2 -2
- package/dist/extensions/bluebubbles/index.js +2 -2
- package/dist/extensions/bluebubbles/setup-entry.js +1 -1
- package/dist/extensions/browser/test-support.js +1 -1
- package/dist/extensions/byteplus/index.js +2 -2
- package/dist/extensions/chutes/index.js +4 -4
- package/dist/extensions/cloudflare-ai-gateway/index.js +1 -1
- package/dist/extensions/deepseek/index.js +1 -1
- package/dist/extensions/device-pair/api.js +2 -2
- package/dist/extensions/device-pair/index.js +3 -3
- package/dist/extensions/device-pair/notify.js +1 -1
- package/dist/extensions/device-pair/qr-image.js +2 -2
- package/dist/extensions/diffs/index.js +1 -1
- package/dist/extensions/discord/action-runtime-api.js +1 -1
- package/dist/extensions/discord/api.js +4 -4
- package/dist/extensions/discord/index.js +9 -9
- package/dist/extensions/discord/runtime-api.js +10 -10
- package/dist/extensions/discord/setup-entry.js +2 -2
- package/dist/extensions/discord/test-api.js +3 -3
- package/dist/extensions/fal/index.js +2 -2
- package/dist/extensions/feishu/api.js +2 -2
- package/dist/extensions/feishu/index.js +7 -7
- package/dist/extensions/feishu/setup-api.js +1 -1
- package/dist/extensions/feishu/setup-entry.js +2 -2
- package/dist/extensions/github-copilot/api.js +1 -1
- package/dist/extensions/github-copilot/index.js +2 -2
- package/dist/extensions/github-copilot/login.js +1 -1
- package/dist/extensions/google/index.js +2 -2
- package/dist/extensions/google/media-understanding-provider.js +2 -2
- package/dist/extensions/googlechat/api.js +1 -1
- package/dist/extensions/googlechat/index.js +2 -2
- package/dist/extensions/googlechat/setup-entry.js +2 -2
- package/dist/extensions/googlechat/test-api.js +1 -1
- package/dist/extensions/groq/index.js +1 -1
- package/dist/extensions/groq/media-understanding-provider.js +1 -1
- package/dist/extensions/huggingface/index.js +2 -2
- package/dist/extensions/imessage/api.js +2 -2
- package/dist/extensions/imessage/index.js +7 -7
- package/dist/extensions/imessage/runtime-api.js +2 -2
- package/dist/extensions/imessage/setup-entry.js +3 -3
- package/dist/extensions/irc/api.js +1 -1
- package/dist/extensions/irc/index.js +2 -2
- package/dist/extensions/irc/setup-entry.js +2 -2
- package/dist/extensions/kilocode/index.js +1 -1
- package/dist/extensions/kimi-coding/index.js +2 -2
- package/dist/extensions/line/api.js +4 -4
- package/dist/extensions/line/index.js +5 -5
- package/dist/extensions/line/runtime-api.js +2 -2
- package/dist/extensions/line/setup-api.js +2 -2
- package/dist/extensions/line/setup-entry.js +3 -3
- package/dist/extensions/litellm/index.js +1 -1
- package/dist/extensions/lobster/index.js +1 -1
- package/dist/extensions/lobster/runtime-api.js +1 -1
- package/dist/extensions/matrix/api.js +3 -3
- package/dist/extensions/matrix/index.js +3 -3
- package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +3 -3
- package/dist/extensions/matrix/setup-entry.js +2 -2
- package/dist/extensions/matrix/test-api.js +1 -1
- package/dist/extensions/mattermost/api.js +1 -1
- package/dist/extensions/mattermost/index.js +2 -2
- package/dist/extensions/mattermost/runtime-api.js +4 -4
- package/dist/extensions/mattermost/setup-entry.js +2 -2
- package/dist/extensions/media-understanding-core/runtime-api.js +2 -2
- package/dist/extensions/microsoft/index.js +1 -1
- package/dist/extensions/microsoft/speech-provider.js +1 -1
- package/dist/extensions/microsoft/test-api.js +1 -1
- package/dist/extensions/microsoft-foundry/auth.js +1 -1
- package/dist/extensions/microsoft-foundry/cli.js +1 -1
- package/dist/extensions/microsoft-foundry/index.js +1 -1
- package/dist/extensions/microsoft-foundry/onboard.js +2 -2
- package/dist/extensions/microsoft-foundry/provider.js +1 -1
- package/dist/extensions/microsoft-foundry/runtime.js +1 -1
- package/dist/extensions/microsoft-foundry/shared-runtime.js +2 -2
- package/dist/extensions/microsoft-foundry/shared.js +1 -1
- package/dist/extensions/minimax/index.js +4 -4
- package/dist/extensions/minimax/media-understanding-provider.js +1 -1
- package/dist/extensions/minimax/oauth.js +1 -1
- package/dist/extensions/minimax/oauth.runtime.js +1 -1
- package/dist/extensions/mistral/index.js +2 -2
- package/dist/extensions/mistral/media-understanding-provider.js +1 -1
- package/dist/extensions/modelstudio/index.js +1 -1
- package/dist/extensions/moonshot/index.js +2 -2
- package/dist/extensions/moonshot/media-understanding-provider.js +1 -1
- package/dist/extensions/msteams/api.js +1 -1
- package/dist/extensions/msteams/index.js +3 -3
- package/dist/extensions/msteams/runtime-api.js +4 -4
- package/dist/extensions/msteams/setup-entry.js +2 -2
- package/dist/extensions/msteams/test-api.js +1 -1
- package/dist/extensions/nextcloud-talk/api.js +1 -1
- package/dist/extensions/nextcloud-talk/index.js +2 -2
- package/dist/extensions/nextcloud-talk/runtime-api.js +2 -2
- package/dist/extensions/nextcloud-talk/setup-entry.js +2 -2
- package/dist/extensions/nostr/api.js +3 -3
- package/dist/extensions/nostr/index.js +4 -4
- package/dist/extensions/nostr/runtime-api.js +3 -3
- package/dist/extensions/nostr/setup-api.js +1 -1
- package/dist/extensions/nostr/setup-entry.js +2 -2
- package/dist/extensions/nostr/test-api.js +1 -1
- package/dist/extensions/nvidia/index.js +1 -1
- package/dist/extensions/ollama/api.js +2 -2
- package/dist/extensions/ollama/index.js +3 -3
- package/dist/extensions/ollama/runtime-api.js +2 -2
- package/dist/extensions/openai/api.js +1 -1
- package/dist/extensions/openai/index.js +3 -3
- package/dist/extensions/openai/media-understanding-provider.js +1 -1
- package/dist/extensions/openai/openai-codex-provider.js +1 -1
- package/dist/extensions/openai/openai-provider.js +1 -1
- package/dist/extensions/openai/test-api.js +1 -1
- package/dist/extensions/opencode/index.js +2 -2
- package/dist/extensions/opencode-go/index.js +2 -2
- package/dist/extensions/openrouter/index.js +3 -3
- package/dist/extensions/openrouter/media-understanding-provider.js +1 -1
- package/dist/extensions/openshell/index.js +1 -1
- package/dist/extensions/qianfan/index.js +1 -1
- package/dist/extensions/qqbot/index.js +2 -2
- package/dist/extensions/qqbot/setup-entry.js +2 -2
- package/dist/extensions/signal/api.js +4 -4
- package/dist/extensions/signal/index.js +9 -9
- package/dist/extensions/signal/reaction-runtime-api.js +1 -1
- package/dist/extensions/signal/runtime-api.js +4 -4
- package/dist/extensions/signal/setup-entry.js +2 -2
- package/dist/extensions/signal/test-api.js +4 -4
- package/dist/extensions/slack/api.js +6 -6
- package/dist/extensions/slack/index.js +2 -2
- package/dist/extensions/slack/runtime-api.js +6 -6
- package/dist/extensions/slack/setup-entry.js +2 -2
- package/dist/extensions/slack/test-api.js +4 -4
- package/dist/extensions/stepfun/index.js +2 -2
- package/dist/extensions/synology-chat/index.js +2 -2
- package/dist/extensions/synology-chat/setup-api.js +1 -1
- package/dist/extensions/synology-chat/setup-entry.js +2 -2
- package/dist/extensions/synthetic/index.js +1 -1
- package/dist/extensions/talk-voice/index.js +1 -1
- package/dist/extensions/telegram/api.js +8 -8
- package/dist/extensions/telegram/index.js +2 -2
- package/dist/extensions/telegram/runtime-api.js +8 -8
- package/dist/extensions/telegram/setup-entry.js +3 -3
- package/dist/extensions/telegram/test-api.js +7 -7
- package/dist/extensions/telegram/test-support.js +4 -4
- package/dist/extensions/tlon/index.js +2 -2
- package/dist/extensions/tlon/setup-entry.js +2 -2
- package/dist/extensions/tlon/test-api.js +1 -1
- package/dist/extensions/together/index.js +1 -1
- package/dist/extensions/twitch/index.js +1 -1
- package/dist/extensions/venice/index.js +1 -1
- package/dist/extensions/vercel-ai-gateway/index.js +1 -1
- package/dist/extensions/volcengine/index.js +2 -2
- package/dist/extensions/whatsapp/action-runtime-api.js +1 -1
- package/dist/extensions/whatsapp/action-runtime.runtime.js +1 -1
- package/dist/extensions/whatsapp/api.js +2 -2
- package/dist/extensions/whatsapp/index.js +2 -2
- package/dist/extensions/whatsapp/light-runtime-api.js +1 -1
- package/dist/extensions/whatsapp/login-qr-api.js +1 -1
- package/dist/extensions/whatsapp/runtime-api.js +13 -13
- package/dist/extensions/whatsapp/setup-entry.js +3 -3
- package/dist/extensions/whatsapp/test-api.js +6 -6
- package/dist/extensions/xai/code-execution.js +1 -1
- package/dist/extensions/xai/index.js +4 -4
- package/dist/extensions/xai/x-search.js +1 -1
- package/dist/extensions/xiaomi/index.js +1 -1
- package/dist/extensions/zai/index.js +2 -2
- package/dist/extensions/zai/media-understanding-provider.js +1 -1
- package/dist/extensions/zalo/api.js +2 -2
- package/dist/extensions/zalo/index.js +2 -2
- package/dist/extensions/zalo/runtime-api.js +2 -2
- package/dist/extensions/zalo/setup-entry.js +2 -2
- package/dist/extensions/zalo/test-api.js +1 -1
- package/dist/extensions/zalouser/api.js +1 -1
- package/dist/extensions/zalouser/index.js +10 -10
- package/dist/extensions/zalouser/runtime-api.js +3 -3
- package/dist/extensions/zalouser/setup-entry.js +3 -3
- package/dist/extensions/zalouser/test-api.js +4 -4
- package/dist/format-BN8tV56q.js +817 -0
- package/dist/gateway-CK0mVyJH.js +2575 -0
- package/dist/gateway-cli-BIGurgdT.js +1596 -0
- package/dist/gateway-install-token-CnLiX_Zd.js +230 -0
- package/dist/get-reply-from-config.runtime-DHVxBB-O.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/gmail-watcher-lifecycle-BOSlI4iv.js +2 -0
- package/dist/graph-users-CceVBSPZ.js +918 -0
- package/dist/group-access-Cwl8gW8B.js +32 -0
- package/dist/group-access-DHoGAQFt.js +119 -0
- package/dist/handle-action-BmBnXGdV.js +500 -0
- package/dist/health-CkL8pqV8.js +2 -0
- package/dist/health-DhHzqohg.js +577 -0
- package/dist/heartbeat-runner-N3rkIDfo.js +995 -0
- package/dist/hooks-cli-LfG_KZSu.js +353 -0
- package/dist/http-client-lTUwUVkV.js +294 -0
- package/dist/image-BZJoriob.js +152 -0
- package/dist/image-runtime-V0FuCGlj.js +7 -0
- package/dist/inbound-reply-dispatch-C8za1uEq.js +73 -0
- package/dist/inbound.runtime-BYJ118rE.js +3 -0
- package/dist/inbound.runtime.js +1 -1
- package/dist/index.js +2 -2
- package/dist/infra-runtime-C9fJenAY.js +22 -0
- package/dist/install-BKR6ckWd.js +590 -0
- package/dist/install-security-scan-BWWG9NEd.js +22 -0
- package/dist/install-security-scan.runtime-CNFIn93M.js +299 -0
- package/dist/install-security-scan.runtime.js +1 -1
- package/dist/install.runtime-BKwzESsg.js +11 -0
- package/dist/install.runtime-DrieSb_M.js +27 -0
- package/dist/install.runtime.js +1 -1
- package/dist/irc-DRWT3CQf.js +14 -0
- package/dist/legacy-crypto-restore-CZycrxha.js +85 -0
- package/dist/library-CVZUhyOq.js +44 -0
- package/dist/llm-slug-generator-B79ECeWZ.js +68 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/loader-BJO8z2ig.js +2 -0
- package/dist/login-Cs2tMFcs.js +2332 -0
- package/dist/login-GAWpWfxh.js +108 -0
- package/dist/login-qr-CUosF6JZ.js +211 -0
- package/dist/login-qr-api-W1NF3gA_.js +16 -0
- package/dist/manager.runtime-Dmq8R0mb.js +670 -0
- package/dist/manager.runtime.js +1 -1
- package/dist/matrix-DrH1M_Sr.js +351 -0
- package/dist/matrix-runtime-heavy-C6fkT2VX.js +4 -0
- package/dist/mattermost-B9327zl5.js +18 -0
- package/dist/media-CIdwV3Lu.js +1691 -0
- package/dist/media-runtime-QMgMQ3WZ.js +295 -0
- package/dist/media-understanding-C66pUC4U.js +51 -0
- package/dist/media-understanding-provider-BRzfmJfY.js +86 -0
- package/dist/media-understanding-provider-Bd8aZtsH.js +11 -0
- package/dist/media-understanding-provider-By1hanjB.js +16 -0
- package/dist/media-understanding-provider-C6SiAxyT.js +11 -0
- package/dist/media-understanding-provider-DGKwGu0P.js +16 -0
- package/dist/media-understanding-provider-Jlh0zs2Z.js +17 -0
- package/dist/media-understanding-provider-SRUeyQqG.js +28 -0
- package/dist/media-understanding-provider-wimL3kdC.js +11 -0
- package/dist/media-understanding.runtime-BPtAeqrg.js +7 -0
- package/dist/media-understanding.runtime.js +1 -1
- package/dist/message-CzGnK5F3.js +206 -0
- package/dist/message-action-runner-BZ8x9K7O.js +1330 -0
- package/dist/message-handler-gpYZEW_K.js +1771 -0
- package/dist/messages-Xy50Pa2j.js +270 -0
- package/dist/migration-snapshot.runtime-jCZaBq39.js +3 -0
- package/dist/migration-snapshot.runtime.js +1 -1
- package/dist/model-catalog-sx4GaLTc.js +216 -0
- package/dist/model-catalog.runtime-DDSdoGE4.js +2 -0
- package/dist/model-catalog.runtime.js +1 -1
- package/dist/model-picker-CDs8bq1G.js +3 -0
- package/dist/model-picker-bY3x3ppH.js +439 -0
- package/dist/model-runtime-BiWDK2-B.js +1772 -0
- package/dist/model-selection-rJYfkbE0.js +407 -0
- package/dist/models-D5u4cqP1.js +3 -0
- package/dist/models-Xs8Qafsh.js +2550 -0
- package/dist/models-cli-6McdkNo9.js +197 -0
- package/dist/models-config-CAPHcyO2.js +1106 -0
- package/dist/models-config-DABSjBBO.js +2 -0
- package/dist/models-config.runtime-B4-0SSTG.js +2 -0
- package/dist/models-config.runtime.js +1 -1
- package/dist/models-provider-runtime-C0oxGm-e.js +2 -0
- package/dist/monitor-B1P5ei52.js +3622 -0
- package/dist/monitor-B8Q7rxtC.js +666 -0
- package/dist/monitor-B9o5AegX.js +3660 -0
- package/dist/monitor-BSMPXJ97.js +676 -0
- package/dist/monitor-BgD5Jrad.js +4067 -0
- package/dist/monitor-Bzvaap7m.js +1525 -0
- package/dist/monitor-DOHgeQjB.js +687 -0
- package/dist/monitor-auth-3ZkW5CEr.js +192 -0
- package/dist/monitor-polling.runtime-Bs9-PKyv.js +307 -0
- package/dist/monitor-polling.runtime.js +1 -1
- package/dist/monitor-provider-BhVxiO1J.js +1782 -0
- package/dist/monitor-webhook.runtime-DtF-7o03.js +297 -0
- package/dist/monitor-webhook.runtime.js +1 -1
- package/dist/msteams-BIcHfY4o.js +33 -0
- package/dist/nextcloud-talk-Csx58yBv.js +18 -0
- package/dist/nostr-CMrgscuJ.js +19 -0
- package/dist/notify-DSCFVe6i.js +298 -0
- package/dist/oauth-CthjG7hQ.js +152 -0
- package/dist/onboard-C-jsaHwd.js +307 -0
- package/dist/onboard-channels-I98y7NZ8.js +2 -0
- package/dist/onboard-channels-NS1vMCQr.js +705 -0
- package/dist/onboard-custom-BMQ33xqX.js +2 -0
- package/dist/onboard-custom-Dz1DOCJM.js +646 -0
- package/dist/onboard-helpers-BnxgMgMT.js +228 -0
- package/dist/onboard-helpers-DEn4dg5k.js +4 -0
- package/dist/onboard-oYw6GJEA.js +591 -0
- package/dist/onboard-remote-CMmcPmsN.js +2 -0
- package/dist/onboard-remote-uiiE3QnY.js +193 -0
- package/dist/onboard-skills-CttSUeZa.js +2 -0
- package/dist/onboard-skills-DbUk33Ct.js +134 -0
- package/dist/openai-codex-provider-DZN_1A31.js +254 -0
- package/dist/openai-provider-CxBasM1Z.js +272 -0
- package/dist/openclaw-tools.runtime-nwmrOrNY.js +2 -0
- package/dist/openclaw-tools.runtime.js +1 -1
- package/dist/outbound-adapter-DfYvjhM_.js +183 -0
- package/dist/outbound-session-BTLOycg4.js +41 -0
- package/dist/persistent-bindings.lifecycle-CR9WhqMq.js +159 -0
- package/dist/pi-embedded-T_JLa73v.js +40738 -0
- package/dist/pi-embedded.runtime-Bn2DltTS.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/plugin-install-BQ6Yfbir.js +230 -0
- package/dist/plugin-install-config-policy-Dr_wjNho.js +93 -0
- package/dist/plugin-install-lmnNJcpj.js +2 -0
- package/dist/plugin-install-plan-BysT2Zgt.js +50 -0
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-runtime.js +4 -4
- package/dist/plugin-sdk/approval-runtime.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +3 -3
- package/dist/plugin-sdk/command-auth.js +6 -6
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/config-runtime.js +4 -4
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +2 -2
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/infra-runtime.js +2 -2
- package/dist/plugin-sdk/irc.js +2 -2
- package/dist/plugin-sdk/matrix-runtime-heavy.js +3 -3
- package/dist/plugin-sdk/mattermost.js +4 -4
- package/dist/plugin-sdk/media-runtime.js +3 -3
- package/dist/plugin-sdk/media-understanding.js +2 -2
- package/dist/plugin-sdk/models-provider-runtime.js +2 -2
- package/dist/plugin-sdk/msteams.js +3 -3
- package/dist/plugin-sdk/nextcloud-talk.js +2 -2
- package/dist/plugin-sdk/nostr.js +2 -2
- package/dist/plugin-sdk/provider-auth-api-key.js +2 -2
- package/dist/plugin-sdk/provider-auth-login.js +1 -1
- package/dist/plugin-sdk/provider-auth.js +2 -2
- package/dist/plugin-sdk/provider-entry.js +1 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.js +2 -2
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/session-store-runtime.js +2 -2
- package/dist/plugin-sdk/testing.js +3 -3
- package/dist/plugin-sdk/webhook-path.js +2 -29
- package/dist/plugin-sdk/zalo.js +2 -2
- package/dist/plugin-sdk/zalouser.js +2 -2
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins-cli-QKhcgiO8.js +561 -0
- package/dist/plugins-command-helpers-DhvJn5jI.js +116 -0
- package/dist/plugins-install-persist-Qeas2eSh.js +121 -0
- package/dist/plugins-update-command-BKJEivnf.js +974 -0
- package/dist/policy-Oilx4qmu.js +147 -0
- package/dist/preflight-audio-BmL4gGyL.js +48 -0
- package/dist/preflight-audio.runtime-CAepz41v.js +7 -0
- package/dist/preflight-audio.runtime.js +1 -1
- package/dist/prepare-8M63vDxs.js +1301 -0
- package/dist/probe-Btp49F9p.js +170 -0
- package/dist/probe-CAA_bibg.js +349 -0
- package/dist/probe-CcT1Zjlx.js +431 -0
- package/dist/probe-zQeRFb2K.js +1868 -0
- package/dist/profile-update-P49WNZII.js +67 -0
- package/dist/program-Kb8jcb5x.js +158 -0
- package/dist/prompt-select-styled-G8WwN-L7.js +6434 -0
- package/dist/provider-B2yqefja.js +3685 -0
- package/dist/provider-CzbklD1X.js +70 -0
- package/dist/provider-DIIdFC34.js +18901 -0
- package/dist/provider-api-key-auth-BliP73d_.js +109 -0
- package/dist/provider-api-key-auth.runtime.js +1 -1
- package/dist/provider-auth-DxViiapc.js +43 -0
- package/dist/provider-auth-api-key-BlF9OozZ.js +5 -0
- package/dist/provider-auth-login-DAhr6tMx.js +8 -0
- package/dist/provider-auth-login.runtime.js +1 -1
- package/dist/provider-discovery.runtime.js +1 -1
- package/dist/provider-dispatcher-BEZOvNvI.js +22 -0
- package/dist/provider-entry-CSq-QYSf.js +86 -0
- package/dist/provider-session.runtime-D3rfVYR5.js +7 -0
- package/dist/provider-session.runtime.js +1 -1
- package/dist/provider.runtime-Bbi0dGrm.js +2 -0
- package/dist/provider.runtime.js +1 -1
- package/dist/qr-image-IXoz2Bw3.js +2 -0
- package/dist/queue-Ca31F-8a.js +663 -0
- package/dist/reaction-runtime-api-CZLmJ_WX.js +114 -0
- package/dist/reactions-D-WSon-m.js +258 -0
- package/dist/read-only-account-inspect.telegram-MmNQAAZr.js +202 -0
- package/dist/register.agent-B7D4sSrd.js +240 -0
- package/dist/register.configure-BgQOxerG.js +15 -0
- package/dist/register.maintenance-CiTThGcR.js +449 -0
- package/dist/register.message-CReL6dlw.js +644 -0
- package/dist/register.onboard-DHhhEg9U.js +79 -0
- package/dist/register.setup-COczC1It.js +183 -0
- package/dist/register.status-health-sessions-DRX2aQSL.js +1206 -0
- package/dist/register.subclis-DXBjIEu_.js +3 -0
- package/dist/register.subclis-DokJMw3i.js +295 -0
- package/dist/replies-DuTJPPK4.js +118 -0
- package/dist/reply-CU8qGvKT.js +3192 -0
- package/dist/reply-blocks-BpVJG1en.js +103 -0
- package/dist/reply-dispatch-runtime-DxUm7xv8.js +3 -0
- package/dist/reply-runtime-CvaF7P6-.js +123 -0
- package/dist/reply.runtime-BfN6C1_l.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/resolve-allowlist-C_Y8enFH.js +147 -0
- package/dist/resolve-targets-gk4hti4C.js +280 -0
- package/dist/rooms-Can12aFd.js +325 -0
- package/dist/route-reply-BxhqzhSe.js +133 -0
- package/dist/route-reply.runtime-BuSWcdvc.js +2 -0
- package/dist/route-reply.runtime.js +1 -1
- package/dist/route-resolution-DSj60ZbR.js +461 -0
- package/dist/rpc-context-a4f1uaqq.js +155 -0
- package/dist/run-main-CvRWW8mV.js +425 -0
- package/dist/runner-D_uJ9v3f.js +1479 -0
- package/dist/runtime-8Mw5wFou.js +68 -0
- package/dist/runtime-DQ8O9TLG.js +1175 -0
- package/dist/runtime-api-2l7jjGPw.js +3 -0
- package/dist/runtime-api-3_TNQnpI.js +81 -0
- package/dist/runtime-api-B6vjGOFJ.js +2 -0
- package/dist/runtime-api-BVjd5QC5.js +2 -0
- package/dist/runtime-api-BcMW34og.js +14 -0
- package/dist/runtime-api-Bih0haVa.js +2 -0
- package/dist/runtime-api-CZBqKHRi.js +2 -0
- package/dist/runtime-api-CnP_Jrha.js +2 -0
- package/dist/runtime-api-CnS87iaj.js +2 -0
- package/dist/runtime-api-DOLRVoZD.js +29 -0
- package/dist/runtime-api-R7oPeDFN.js +3676 -0
- package/dist/runtime-api-SP4kFvYZ.js +2 -0
- package/dist/runtime-api-y4jBsmod.js +2 -0
- package/dist/runtime-discord-ops.runtime.js +1 -1
- package/dist/runtime-embedded-pi.runtime-eHP2DunP.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-media-understanding.runtime.js +1 -1
- package/dist/runtime-model-auth.runtime.js +1 -1
- package/dist/runtime-slack-ops.runtime.js +1 -1
- package/dist/runtime-tts.runtime.js +1 -1
- package/dist/sandbox-cli-DT2znKIY.js +443 -0
- package/dist/sdk-V8yEikk_.js +1108 -0
- package/dist/security-cli-DYR5zC6Y.js +477 -0
- package/dist/send-B-Z8V4Cq.js +532 -0
- package/dist/send-Bqywq3tg.js +3 -0
- package/dist/send-BxvA6SmF.js +100 -0
- package/dist/send-ChbtrSVp.js +2 -0
- package/dist/send-CzWEW9Zb.js +856 -0
- package/dist/send-DIfvOzDT.js +318 -0
- package/dist/send-DLHztqfo.js +442 -0
- package/dist/send-DYtTIT9n.js +178 -0
- package/dist/send-DiOk2E98.js +1076 -0
- package/dist/send.components-6LOUmhSy.js +2 -0
- package/dist/send.components-D75OT62r.js +942 -0
- package/dist/server-BNNkiKsj.js +9741 -0
- package/dist/server-cron-DuTAwT4O.js +4173 -0
- package/dist/server-cron-dsNWt3Xk.js +2 -0
- package/dist/server-lite-COJ3scXX.js +830 -0
- package/dist/server-maintenance-B1miba9h.js +542 -0
- package/dist/server-maintenance-Bc6xlNTK.js +2 -0
- package/dist/server-node-events-C8B10rlc.js +454 -0
- package/dist/server-node-subscriptions-BbcfGfam.js +2 -0
- package/dist/server-plugins-40fdRywj.js +10354 -0
- package/dist/server-plugins-D2LGejil.js +2 -0
- package/dist/server-startup-memory-BSth6DJB.js +2 -0
- package/dist/server-tailscale-Bwmz6UuQ.js +2 -0
- package/dist/services-CdVUH8cK.js +2 -0
- package/dist/session-DifMNh_t.js +50 -0
- package/dist/session-archive.runtime-EJGWbu-k.js +2 -0
- package/dist/session-archive.runtime.js +1 -1
- package/dist/session-envelope-Cc5bPuvN.js +18 -0
- package/dist/session-file-C6zGg-sn.js +120 -0
- package/dist/session-key-DPKf0dWL.js +52 -0
- package/dist/session-override-Cd7zBl0i.js +100 -0
- package/dist/session-reset-model.runtime-D_iAW4sx.js +119 -0
- package/dist/session-reset-model.runtime.js +1 -1
- package/dist/session-route-USlsJP9v.js +91 -0
- package/dist/session-store-runtime-Bac-IfWa.js +2 -0
- package/dist/session-subagent-reactivation.runtime-BrSBT1dK.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-transcript-files.fs-D2Mq9mp7.js +149 -0
- package/dist/session-updates-RRq3LS7F.js +222 -0
- package/dist/session-updates.runtime-DlCqhR2y.js +2 -0
- package/dist/session-updates.runtime.js +1 -1
- package/dist/session-utils-B6yctVT6.js +1743 -0
- package/dist/sessions-BDZF0KSB.js +224 -0
- package/dist/sessions-Di_GACQe.js +2 -0
- package/dist/sessions-xeX9HpAZ.js +443 -0
- package/dist/setup-Du8OSH3g.js +427 -0
- package/dist/setup-api-ALaLEpZD.js +2 -0
- package/dist/setup-bootstrap-Dzdz67yA.js +54 -0
- package/dist/setup-core-CljP-9Aw.js +256 -0
- package/dist/setup-core-mlfG8i3t.js +146 -0
- package/dist/setup-surface-8NjprfQ4.js +261 -0
- package/dist/setup-surface-BBhpO_bO.js +304 -0
- package/dist/setup-surface-BpJACnBD.js +450 -0
- package/dist/setup-surface-C3-Jx6vF.js +272 -0
- package/dist/setup-surface-CzMh5yAL.js +656 -0
- package/dist/setup-surface-CzzVm3hE.js +353 -0
- package/dist/setup-surface-D6yTgwHY.js +346 -0
- package/dist/setup-surface-DjJE20Ud.js +484 -0
- package/dist/setup-surface-DpqfELkE.js +261 -0
- package/dist/setup-surface-VdCxFOLw.js +237 -0
- package/dist/setup-surface-fuNIOdUY.js +8848 -0
- package/dist/setup-surface-v155bftZ.js +333 -0
- package/dist/setup.finalize-iyzp5VAT.js +458 -0
- package/dist/setup.gateway-config-CU0y8lbT.js +247 -0
- package/dist/shared-Blh_fJTo.js +64 -0
- package/dist/shared-CBnUPRHA.js +180 -0
- package/dist/shared-CM5Gt0l4.js +198 -0
- package/dist/shared-CaqlRGF3.js +160 -0
- package/dist/shared-Cf75swpz.js +144 -0
- package/dist/shared-DL7by7Wd.js +2 -0
- package/dist/shared-DSx0wubR.js +72 -0
- package/dist/shared-DykGaEWS.js +94 -0
- package/dist/shared-azg27y31.js +78 -0
- package/dist/shared-runtime-Bt4waeX3.js +7 -0
- package/dist/skills-install-ByDR1-M6.js +819 -0
- package/dist/slash-commands-DG50c1a2.js +672 -0
- package/dist/slash-commands.runtime-CVcxhZ8u.js +20 -0
- package/dist/slash-commands.runtime.js +1 -1
- package/dist/slash-dispatch.runtime-C_YtFTUx.js +38 -0
- package/dist/slash-dispatch.runtime.js +1 -1
- package/dist/slash-skill-commands.runtime-Bj_cUvfb.js +8 -0
- package/dist/slash-skill-commands.runtime.js +1 -1
- package/dist/speech-provider-CC-UZuqH.js +190 -0
- package/dist/src-CAL53FNb.js +2739 -0
- package/dist/startup-verification-BpSIv6hV.js +131 -0
- package/dist/state-migrations-BZk1lezo.js +845 -0
- package/dist/status-8IelSped.js +650 -0
- package/dist/status-BVcZIA1F.js +3 -0
- package/dist/status-Bf-qPLzv.js +608 -0
- package/dist/status-BviySeE3.js +2 -0
- package/dist/status-all-Cmj7Gw5o.js +798 -0
- package/dist/status-issues--arI8w_g.js +187 -0
- package/dist/status-issues-byw_R8T_.js +336 -0
- package/dist/status-json-CKuOdeh3.js +86 -0
- package/dist/status.command.text-runtime-B3Z2fUDH.js +18 -0
- package/dist/status.scan-boBZeJmL.js +264 -0
- package/dist/status.scan.fast-json-AJppC2D5.js +97 -0
- package/dist/status.scan.fast-json-shj4aBtI.js +2 -0
- package/dist/status.scan.json-core-BpHhaewp.js +254 -0
- package/dist/status.summary-C4itGbbW.js +210 -0
- package/dist/status.summary-zSPMfFai.js +2 -0
- package/dist/sticker-cache-BN_g5-an.js +1573 -0
- package/dist/sticker-vision.runtime-DC2hIjcl.js +16 -0
- package/dist/sticker-vision.runtime.js +1 -1
- package/dist/storage-YrOCuZuJ.js +234 -0
- package/dist/store-DJaTq2_f.js +1343 -0
- package/dist/store.runtime-B05zX98d.js +2 -0
- package/dist/store.runtime.js +1 -1
- package/dist/stream-D5aKuhrW.js +633 -0
- package/dist/subagent-orphan-recovery-vUbckcfb.js +206 -0
- package/dist/subagent-registry-runtime-BE_luJ3B.js +2 -0
- package/dist/supervisor-log.runtime.js +1 -1
- package/dist/targets-BG8dKyny.js +748 -0
- package/dist/task-registry-delivery-runtime-B-oO-IGC.js +2 -0
- package/dist/task-registry.audit-BCghpxrn.js +320 -0
- package/dist/task-registry.maintenance-B55J7Hf8.js +2 -0
- package/dist/telegram/token.js +1 -1
- package/dist/test-api-BBW7IReU.js +47 -0
- package/dist/testing-fkQ9XFkv.js +677 -0
- package/dist/thread-bindings-B0ugWuKq.js +534 -0
- package/dist/thread-bindings-Dx2arldI.js +778 -0
- package/dist/thread-bindings-iFF5pMFx.js +219 -0
- package/dist/thread-bindings-lTuhY3On.js +352 -0
- package/dist/thread-bindings.discord-api-iGyDtjBI.js +487 -0
- package/dist/threading-7EMTgTsu.js +832 -0
- package/dist/threading-BkydE-cL.js +2 -0
- package/dist/threading-tool-context-C3JbrV_5.js +157 -0
- package/dist/token-wT6DwKaB.js +82 -0
- package/dist/tool-actions.runtime-B5mERIej.js +532 -0
- package/dist/tool-actions.runtime.js +1 -1
- package/dist/tools-effective-inventory-DWXkEygO.js +148 -0
- package/dist/tts.runtime.js +1 -1
- package/dist/ui-CC9JMpg4.js +212 -0
- package/dist/update-BjW3w9eI.js +1253 -0
- package/dist/update-cli-B27tZquO.js +1447 -0
- package/dist/update-runner-BMiyTW62.js +1195 -0
- package/dist/verification-C_ZgAv5v.js +130 -0
- package/dist/verification-DCQ1M0pg.js +2 -0
- package/dist/x-search-Btj7UfUg.js +166 -0
- package/dist/zalo-CnU0tzBl.js +13 -0
- package/dist/zalo-js-InpiWFuE.js +1156 -0
- package/dist/zalouser-CuRMbL4r.js +22 -0
- package/package.json +4 -1
- package/dist/abort-CuFxEr2t.js +0 -192
- package/dist/abort-cutoff.runtime-CU97Q3Ef.js +0 -20
- package/dist/abort.runtime-CZflOJv6.js +0 -2
- package/dist/access-control-CLswIHY1.js +0 -152
- package/dist/account-inspect-DiDpXY0-.js +0 -158
- package/dist/accounts-BwSkt2tm.js +0 -57
- package/dist/accounts-C8c90Uek.js +0 -2
- package/dist/accounts-CiFhbmdr.js +0 -107
- package/dist/accounts-D9Qnnbfl.js +0 -102
- package/dist/accounts-DKwfzzAC.js +0 -137
- package/dist/acp-runtime-CwGef6ZP.js +0 -8
- package/dist/acp-stateful-target-driver-p0EDW10u.js +0 -60
- package/dist/action-runtime-BWY3HXxf.js +0 -318
- package/dist/action-runtime-DNi9yizU.js +0 -72
- package/dist/action-runtime-api-BSPlMrO-.js +0 -1028
- package/dist/actions-MNvlds_S.js +0 -531
- package/dist/actions.runtime--mEwSSNe.js +0 -18
- package/dist/actions.runtime-B1HzEE8Z.js +0 -5
- package/dist/actions.runtime-BG6xvov3.js +0 -2
- package/dist/agent-CGwFOztX.js +0 -2
- package/dist/agent-command-IPMBbUVI.js +0 -1457
- package/dist/agent-runner.runtime-Bzf0jJA9.js +0 -2241
- package/dist/agent-runtime-oVxaAl9G.js +0 -142
- package/dist/agent-tools-login-BIEsXGSl.js +0 -57
- package/dist/agents-CYexVjSC.js +0 -888
- package/dist/agents-DpXXlVMm.js +0 -5
- package/dist/api-B5hYfONF2.js +0 -322
- package/dist/api-CWf7SD_r.js +0 -2
- package/dist/api-CoVu8JQC.js +0 -6
- package/dist/api-D1zC-04H.js +0 -2
- package/dist/api-DAJXC6Eh.js +0 -5
- package/dist/api-DIBiOiU5.js +0 -5
- package/dist/api-DNiO8MKu.js +0 -10
- package/dist/apply-T4gGjbIw.js +0 -485
- package/dist/apply.runtime-BIKyTMdb.js +0 -2
- package/dist/approval-native-PdTPYbWz.js +0 -79
- package/dist/approval-runtime-DQds_bzO.js +0 -262
- package/dist/attachment-normalize-KVBm83XJ.js +0 -921
- package/dist/audit-ClUk-eTw.js +0 -892
- package/dist/audit-NQngcqbL.js +0 -86
- package/dist/audit-channel.collect.runtime-BJlZ1Tqv.js +0 -528
- package/dist/audit-channel.telegram.runtime-CoLwvFcv.js +0 -8
- package/dist/audit-extra.async-B3ODYISl.js +0 -820
- package/dist/audit.deep.runtime-BaiMFfPv.js +0 -2
- package/dist/audit.nondeep.runtime-Cvt1jVHR.js +0 -831
- package/dist/audit.runtime-BOuTTKD4.js +0 -7
- package/dist/auth-BuSqMfLL.js +0 -181
- package/dist/auth-choice-B69NsSNK.js +0 -69
- package/dist/auth-choice-C7dAbZYQ.js +0 -3
- package/dist/auth-choice-ChlvsxHZ.js +0 -341
- package/dist/binding-targets-i1Phu9Ml.js +0 -99
- package/dist/bot-DA6nZ125.js +0 -4268
- package/dist/bot-message-context-4RzAPTiL.js +0 -2
- package/dist/bot-message-context-Bd0CyeDw.js +0 -1175
- package/dist/bot-message-context.runtime-CwPXKJUK.js +0 -7
- package/dist/bot-message-context.session.runtime-C9Qk9RJ2.js +0 -12
- package/dist/bot-native-commands.delivery.runtime-DP3bmRQI.js +0 -3
- package/dist/bot-native-commands.runtime-CIprmHSX.js +0 -11
- package/dist/build-info.json +0 -5
- package/dist/bundled/boot-md/HOOK.md +0 -20
- package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
- package/dist/bundled/command-logger/HOOK.md +0 -122
- package/dist/bundled/session-memory/HOOK.md +0 -108
- package/dist/bundled/workflow-summary/HOOK.md +0 -123
- 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/channel-5dQinNdH.js +0 -783
- package/dist/channel-7CzQF9TT.js +0 -1135
- package/dist/channel-B4fvHRK-.js +0 -698
- package/dist/channel-B_TyijiN.js +0 -454
- package/dist/channel-Bcj7dCz-.js +0 -208
- package/dist/channel-CAPp1zv2.js +0 -599
- package/dist/channel-CSFDlAzr.js +0 -337
- package/dist/channel-CYMfBONo.js +0 -4976
- package/dist/channel-CkvHjmWG.js +0 -883
- package/dist/channel-CoWCft7t.js +0 -1217
- package/dist/channel-DNTrg5rc.js +0 -1661
- package/dist/channel-Dw5L6ZCL.js +0 -1129
- package/dist/channel-DzPVCd5F.js +0 -361
- package/dist/channel-GiLFmQxZ.js +0 -800
- package/dist/channel-XFvR7Dxh.js +0 -788
- package/dist/channel-inbound-bfoCnYI3.js +0 -30
- package/dist/channel-plugin-resolution-BMT07Y4B.js +0 -144
- package/dist/channel-shared-BNnyz1wC.js +0 -58
- package/dist/channel.runtime-B_dMxh1q.js +0 -125
- package/dist/channel.runtime-B_fR3JCp.js +0 -335
- package/dist/channel.runtime-BhQ_73jj.js +0 -14
- package/dist/channel.runtime-CDgrnVP6.js +0 -108
- package/dist/channel.runtime-DPFtjm6K.js +0 -309
- package/dist/channel.runtime-DigoZ45U.js +0 -80
- package/dist/channel.runtime-IHt2hi0h.js +0 -22252
- package/dist/channel.runtime-M3E3w35V.js +0 -373
- package/dist/channel.setup-CQIfV874.js +0 -279
- package/dist/channels-PlRayWHp.js +0 -1134
- package/dist/channels-cli-B4MObWHe.js +0 -246
- package/dist/clawhub-UfARocx9.js +0 -163
- package/dist/cli-B7qV90_y.js +0 -152
- package/dist/cli-DoYOPf2E.js +0 -695
- package/dist/cli-migration-7qu0VuUR.js +0 -100
- package/dist/cli-runner-C1qdQ4P5.js +0 -1014
- package/dist/cli-startup-metadata.json +0 -14
- package/dist/client-bootstrap-Bf-VJF8o.js +0 -2
- package/dist/client-bootstrap-BtDC_ghW.js +0 -121
- package/dist/client-c8NPFdV6.js +0 -7
- package/dist/client-xBBbf9T_.js +0 -5
- package/dist/code-execution-IwkUcM9K.js +0 -142
- package/dist/command-auth-CDvEQqI-.js +0 -64
- package/dist/command-registry-1pRI9W0V.js +0 -3
- package/dist/command-registry-Dr8xswzu.js +0 -199
- package/dist/commands-B7zoPsaq.js +0 -4
- package/dist/commands-acp-_0Jt7bpI.js +0 -990
- package/dist/commands-core-B2PxYebU.js +0 -241
- package/dist/commands-core.runtime-Bk-kMe8I.js +0 -2
- package/dist/commands-handlers.runtime-Dp-fdvyC.js +0 -3708
- package/dist/commands-info-CM-kPvq5.js +0 -651
- package/dist/commands-models-B_KkCnYQ.js +0 -395
- package/dist/commands-status.runtime-B7xG5l06.js +0 -2
- package/dist/commands.runtime-DTcg2ygT.js +0 -4
- package/dist/compact.runtime-C-TOc6On.js +0 -7
- package/dist/completion-cli-DYyVmY2G.js +0 -466
- package/dist/completion-cli-IsVueMzq.js +0 -2
- package/dist/config-DgES7wDO.js +0 -475
- package/dist/config-cli-B-FLvmji.js +0 -945
- package/dist/config-guard-DolG9Hb3.js +0 -113
- package/dist/config-runtime-DOU6nuit.js +0 -13
- package/dist/config-secret-input.runtime-D8uisXyK.js +0 -3
- package/dist/config-update-6NzLhzi0.js +0 -3
- package/dist/config-update-DvNp6OTj.js +0 -127
- package/dist/configure-BMLNn-t4.js +0 -1140
- package/dist/configure-Ce061vUB.js +0 -2
- package/dist/context-B_IskqEg.js +0 -227
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/agents-CouEImnJ.js +0 -813
- package/dist/control-ui/assets/anthropic-D2gWjM8y.js +0 -37
- package/dist/control-ui/assets/azure-openai-responses-rSA0t6IS.js +0 -2
- package/dist/control-ui/assets/channel-config-extras-DNCeHtEf.js +0 -2
- package/dist/control-ui/assets/channels-BgJBIl8z.js +0 -349
- package/dist/control-ui/assets/cron-CESIxOYW.js +0 -928
- package/dist/control-ui/assets/de-DU-XmSEb.js +0 -2
- package/dist/control-ui/assets/debug-BAZT8Cur.js +0 -94
- package/dist/control-ui/assets/directive-C6NBp6xJ.js +0 -2
- package/dist/control-ui/assets/dist-D8DZLmCF.js +0 -18
- package/dist/control-ui/assets/es-Be891ZDf.js +0 -2
- package/dist/control-ui/assets/event-stream-B8X6sYaV.js +0 -2
- package/dist/control-ui/assets/format-nUIQxx1z.js +0 -2
- package/dist/control-ui/assets/github-copilot-headers-CrI0CIJ7.js +0 -2
- package/dist/control-ui/assets/google-B2pGWEiN.js +0 -2
- package/dist/control-ui/assets/google-gemini-cli-BpxbH95Q.js +0 -3
- package/dist/control-ui/assets/google-shared-CbPHVnPr.js +0 -12
- package/dist/control-ui/assets/google-vertex-lQwbjEII.js +0 -2
- package/dist/control-ui/assets/hash-Bt1aVMQ3.js +0 -2
- package/dist/control-ui/assets/index-C0UxQzEn.js +0 -4813
- package/dist/control-ui/assets/index-DOMg2RvO.css +0 -1
- package/dist/control-ui/assets/instances-ClbVvaQy.js +0 -57
- package/dist/control-ui/assets/lit-zdTgzAJI.js +0 -3
- package/dist/control-ui/assets/logs-vVeVJ0CI.js +0 -74
- package/dist/control-ui/assets/mistral-imHzDZ_7.js +0 -8
- package/dist/control-ui/assets/nodes-CeaJKODa.js +0 -430
- package/dist/control-ui/assets/openai-Cn7eGqwa.js +0 -17
- package/dist/control-ui/assets/openai-codex-responses-DRaOkrRO.js +0 -8
- package/dist/control-ui/assets/openai-completions-0yOZERna.js +0 -6
- package/dist/control-ui/assets/openai-responses-8vqADgIw.js +0 -2
- package/dist/control-ui/assets/openai-responses-shared-Q7jopnLp.js +0 -11
- package/dist/control-ui/assets/preload-helper-xBbMyY7u.js +0 -1
- package/dist/control-ui/assets/pt-BR-RqwUvKTB.js +0 -2
- package/dist/control-ui/assets/sessions-CiBN6LBg.js +0 -236
- package/dist/control-ui/assets/skills-shared-DJsJP4-4.js +0 -11
- package/dist/control-ui/assets/skills-yhlO3Ote.js +0 -216
- package/dist/control-ui/assets/transform-messages-XKqwKV3D.js +0 -2
- package/dist/control-ui/assets/zh-CN-CUzhgfRs.js +0 -2
- package/dist/control-ui/assets/zh-TW-CCgwa2eS.js +0 -2
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +0 -66
- package/dist/control-ui/index.html +0 -75
- package/dist/conversation-bindings-BWn8Eq0t.js +0 -210
- package/dist/conversation-id-CIpyn-VD.js +0 -168
- package/dist/conversation-runtime-BpJdJqei.js +0 -85
- package/dist/core-BsdZRsb0.js +0 -195
- package/dist/create-client-HZBJ7-Fl.js +0 -2
- package/dist/create-client-WqOz1ro_.js +0 -58
- package/dist/credentials-5vTiF-oK.js +0 -22
- package/dist/credentials-write.runtime-3bouyp8U.js +0 -9
- package/dist/crypto-runtime-DirRLBDM.js +0 -3495
- package/dist/daemon-cli-AJpZY4sn.js +0 -383
- package/dist/daemon-install-FZTHcBaU.js +0 -63
- package/dist/delegate-BaC3I_I2.js +0 -43
- package/dist/deliver-BaDjGKa4.js +0 -3
- package/dist/deliver-CWBM3uFK.js +0 -954
- package/dist/deliver-reply-B1lULS4T.js +0 -238
- package/dist/deliver-runtime-C9wPhPVo.js +0 -2
- package/dist/delivery-info-UablM7m8.js +0 -40
- package/dist/delivery-jNAx1UXj.js +0 -834
- package/dist/direct-dm-BOWirToy.js +0 -139
- package/dist/direct-management-D7iGx6GI.js +0 -300
- package/dist/direct-management-DmQUf3My.js +0 -2
- package/dist/directive-handling.fast-lane-BgUe6rBZ.js +0 -64
- package/dist/directive-handling.fast-lane-C__EV2OZ.js +0 -2
- package/dist/directive-handling.impl-D466FFH9.js +0 -672
- package/dist/directive-handling.impl-tl3nNkjQ.js +0 -2
- package/dist/directive-handling.parse-H-NqZbGQ.js +0 -375
- package/dist/directive-handling.persist-D-TH7X00.js +0 -133
- package/dist/directive-handling.persist.runtime-CKzh0FFl.js +0 -2
- package/dist/directive-handling.shared-CMdDhj2s.js +0 -158
- package/dist/directory-cli-BkFOqvau.js +0 -238
- package/dist/directory.static-CWHw_6bd.js +0 -45
- package/dist/discovery-CmDmBzyt.js +0 -171
- package/dist/dispatch-5P8XNY-z.js +0 -858
- package/dist/dispatch-acp.runtime-BXLlUo6a.js +0 -884
- package/dist/doctor-completion-C-PtqnX4.js +0 -90
- package/dist/doctor-config-preflight--G_zFI_P.js +0 -148
- package/dist/doctor-config-preflight-Cgmj0J2d.js +0 -2
- package/dist/doctor-state-migrations-B4vgkpe8.js +0 -3
- package/dist/doctor-state-migrations-R3EnGfXE.js +0 -2
- package/dist/embedding-provider-DllEP1OZ.js +0 -129
- package/dist/encryption-guidance-DDwXFxqS.js +0 -33
- package/dist/error-text-C4BdRT0b.js +0 -24
- package/dist/exec-approval-session-target-BpHDdAt6.js +0 -159
- package/dist/exec-approvals-Lpud2QXU.js +0 -121
- 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/format-CerBTToC.js +0 -817
- package/dist/gateway-BuNsK2ll.js +0 -2575
- package/dist/gateway-cli-WL9O_amN.js +0 -1596
- package/dist/gateway-install-token-DBjV7vuQ.js +0 -230
- package/dist/get-reply-from-config.runtime-Ci2UvY3-.js +0 -2
- package/dist/gmail-watcher-lifecycle-BE_4dMST.js +0 -2
- package/dist/graph-users-CGePGfzI.js +0 -918
- package/dist/group-access-D9zxJ9Eg.js +0 -119
- package/dist/group-access-qaCYNF5W.js +0 -32
- package/dist/handle-action-CqjxOWwH.js +0 -500
- package/dist/health-Ckh-98zt.js +0 -577
- package/dist/health-Dte2hwwy.js +0 -2
- package/dist/heartbeat-runner-BSkqJHkl.js +0 -995
- package/dist/hooks-cli-5qH5guhQ.js +0 -353
- package/dist/http-client-E-AK0hBj.js +0 -294
- package/dist/image-Dflgshq4.js +0 -152
- package/dist/image-runtime-C8N4pHiL.js +0 -7
- package/dist/inbound-reply-dispatch-DnSGPONh.js +0 -73
- package/dist/inbound.runtime-CSV1NzQc.js +0 -3
- package/dist/infra-runtime-B0CHuzrJ.js +0 -22
- package/dist/install-security-scan-pEC-BNIh.js +0 -22
- package/dist/install-security-scan.runtime-KtCBz8Ms.js +0 -299
- package/dist/install-slQpgebI.js +0 -590
- package/dist/install.runtime-BDKuVJIa.js +0 -27
- package/dist/install.runtime-Cdb5F3uW.js +0 -11
- package/dist/irc-CWidrqqa.js +0 -14
- package/dist/legacy-crypto-restore-DrVtd4-4.js +0 -85
- package/dist/library-CmpBsnzV.js +0 -44
- package/dist/llm-slug-generator-5ztca3GP.js +0 -68
- package/dist/loader-BOVnpEv5.js +0 -2
- package/dist/login-I8HWXek2.js +0 -108
- package/dist/login-Xx8YN-Ut.js +0 -2332
- package/dist/login-qr-AEmAM7Qe.js +0 -211
- package/dist/login-qr-api-BSW8Ta-A.js +0 -16
- package/dist/manager.runtime-DpPqh8fu.js +0 -670
- package/dist/matrix-CVj94cvn.js +0 -351
- package/dist/matrix-runtime-heavy-n2o8hviY.js +0 -4
- package/dist/mattermost-D0PPzHDR.js +0 -18
- package/dist/media-CS8BGM6_.js +0 -1691
- package/dist/media-runtime-CzcnSxHP.js +0 -295
- package/dist/media-understanding-6pmWMadX.js +0 -51
- package/dist/media-understanding-provider--2czf2Xl.js +0 -16
- package/dist/media-understanding-provider-1v3aAmph.js +0 -17
- package/dist/media-understanding-provider-Bo02B0WG.js +0 -16
- package/dist/media-understanding-provider-C1e568I5.js +0 -86
- package/dist/media-understanding-provider-DftOn7qM.js +0 -28
- package/dist/media-understanding-provider-JfEcvB6a.js +0 -11
- package/dist/media-understanding-provider-Zvb9Fi0L.js +0 -11
- package/dist/media-understanding-provider-fpeKUYrh.js +0 -11
- package/dist/media-understanding.runtime-CBg9Myvx.js +0 -7
- package/dist/message-DTcLbUjJ.js +0 -206
- package/dist/message-action-runner-Nkrb1psP.js +0 -1330
- package/dist/message-handler-ozmV6rws.js +0 -1771
- package/dist/messages-W3Tl9C55.js +0 -270
- package/dist/migration-snapshot.runtime-CBx6_nXj.js +0 -3
- package/dist/model-catalog-BdRYqKL1.js +0 -216
- package/dist/model-catalog.runtime--yFOIYWV.js +0 -2
- package/dist/model-picker-Cgjw3ytp.js +0 -3
- package/dist/model-picker-jZueDrUL.js +0 -439
- package/dist/model-runtime-51DWArDE.js +0 -1772
- package/dist/model-selection-BohZPMIS.js +0 -407
- package/dist/models-By72Z6_k.js +0 -2550
- package/dist/models-Dgkh71VB.js +0 -3
- package/dist/models-cli-6ZWkpdCu.js +0 -197
- package/dist/models-config-C4DcwiKp.js +0 -2
- package/dist/models-config-CMbP7C_L.js +0 -1106
- package/dist/models-config.runtime-Chha_CyE.js +0 -2
- package/dist/models-provider-runtime-Bu0Agcak.js +0 -2
- package/dist/monitor-B7gDwViK.js +0 -3622
- package/dist/monitor-BE6u7xIu.js +0 -1525
- package/dist/monitor-BRMbIrFT.js +0 -3660
- package/dist/monitor-COLTfgXl.js +0 -676
- package/dist/monitor-CvHGVZmI.js +0 -4067
- package/dist/monitor-DB9RduAn.js +0 -687
- package/dist/monitor-DL7WkrAh.js +0 -666
- package/dist/monitor-auth-EM0izKiw.js +0 -192
- package/dist/monitor-polling.runtime-DFWDyq0r.js +0 -307
- package/dist/monitor-provider-BCduxzuC.js +0 -1782
- package/dist/monitor-webhook.runtime-66MaZoy1.js +0 -297
- package/dist/msteams-DfVsNAAv.js +0 -33
- package/dist/nextcloud-talk-DzdSPp33.js +0 -18
- package/dist/nostr-CA9Nyz3w.js +0 -19
- package/dist/notify-C6g-CT-E.js +0 -298
- package/dist/oauth-0jEycYdH.js +0 -152
- package/dist/onboard-BBY0wtI-.js +0 -591
- package/dist/onboard-BJZUne8W.js +0 -307
- package/dist/onboard-channels-2M_l-yYq.js +0 -705
- package/dist/onboard-channels-B8fOn_J8.js +0 -2
- package/dist/onboard-custom-BQxH-LlD.js +0 -646
- package/dist/onboard-custom-BXJFm5tv.js +0 -2
- package/dist/onboard-helpers-DAmUY5cA.js +0 -228
- package/dist/onboard-helpers-DalDwXjg.js +0 -4
- package/dist/onboard-remote-CAS2F09D.js +0 -2
- package/dist/onboard-remote-nfFOhKzl.js +0 -193
- package/dist/onboard-skills-CH4ZsJr7.js +0 -2
- package/dist/onboard-skills-DSYZC5D0.js +0 -134
- package/dist/openai-codex-provider-B_8TNnmh.js +0 -254
- package/dist/openai-provider-CwnYhA5Q.js +0 -272
- package/dist/openclaw-tools.runtime-1mX4RgUb.js +0 -2
- package/dist/outbound-adapter-DDaf1Qmt.js +0 -183
- package/dist/outbound-session-XCEG44pM.js +0 -41
- package/dist/persistent-bindings.lifecycle-CC1LNlZw.js +0 -159
- package/dist/pi-embedded-B2zIKehU.js +0 -40738
- package/dist/pi-embedded.runtime-tIoF88cE.js +0 -4
- package/dist/plugin-install-CqzqZMog.js +0 -230
- package/dist/plugin-install-P8ACZKV4.js +0 -2
- package/dist/plugin-install-config-policy-CWxlz2Uf.js +0 -93
- package/dist/plugin-install-plan-D2X3sbgg.js +0 -50
- package/dist/plugin-sdk/account-core.d.ts +0 -1
- package/dist/plugin-sdk/account-helpers.d.ts +0 -1
- package/dist/plugin-sdk/account-id.d.ts +0 -1
- package/dist/plugin-sdk/account-resolution.d.ts +0 -1
- package/dist/plugin-sdk/acp-runtime.d.ts +0 -1
- package/dist/plugin-sdk/agent-config-primitives.d.ts +0 -1
- package/dist/plugin-sdk/agent-runtime.d.ts +0 -1
- package/dist/plugin-sdk/allow-from.d.ts +0 -1
- package/dist/plugin-sdk/allowlist-config-edit.d.ts +0 -1
- package/dist/plugin-sdk/amazon-bedrock.d.ts +0 -1
- package/dist/plugin-sdk/anthropic-vertex.d.ts +0 -1
- package/dist/plugin-sdk/approval-runtime.d.ts +0 -1
- package/dist/plugin-sdk/bluebubbles-policy.d.ts +0 -1
- package/dist/plugin-sdk/bluebubbles.d.ts +0 -1
- package/dist/plugin-sdk/boolean-param.d.ts +0 -1
- package/dist/plugin-sdk/browser-runtime.d.ts +0 -1
- package/dist/plugin-sdk/browser-support.d.ts +0 -1
- package/dist/plugin-sdk/browser.d.ts +0 -1
- package/dist/plugin-sdk/byteplus.d.ts +0 -1
- package/dist/plugin-sdk/channel-actions.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-helpers.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-primitives.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-schema.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-writes.d.ts +0 -1
- package/dist/plugin-sdk/channel-contract.d.ts +0 -1
- package/dist/plugin-sdk/channel-feedback.d.ts +0 -1
- package/dist/plugin-sdk/channel-inbound.d.ts +0 -1
- package/dist/plugin-sdk/channel-lifecycle.d.ts +0 -1
- package/dist/plugin-sdk/channel-pairing.d.ts +0 -1
- package/dist/plugin-sdk/channel-policy.d.ts +0 -1
- package/dist/plugin-sdk/channel-reply-pipeline.d.ts +0 -1
- package/dist/plugin-sdk/channel-runtime.d.ts +0 -1
- package/dist/plugin-sdk/channel-send-result.d.ts +0 -1
- package/dist/plugin-sdk/channel-setup.d.ts +0 -1
- package/dist/plugin-sdk/channel-status.d.ts +0 -1
- package/dist/plugin-sdk/channel-targets.d.ts +0 -1
- package/dist/plugin-sdk/chutes.d.ts +0 -1
- package/dist/plugin-sdk/cli-backend.d.ts +0 -1
- package/dist/plugin-sdk/cli-runtime.d.ts +0 -1
- package/dist/plugin-sdk/cloudflare-ai-gateway.d.ts +0 -1
- package/dist/plugin-sdk/collection-runtime.d.ts +0 -1
- package/dist/plugin-sdk/command-auth-native.d.ts +0 -1
- package/dist/plugin-sdk/command-auth.d.ts +0 -1
- package/dist/plugin-sdk/command-detection.d.ts +0 -1
- package/dist/plugin-sdk/command-surface.d.ts +0 -1
- package/dist/plugin-sdk/compat.d.ts +0 -1
- package/dist/plugin-sdk/config-runtime.d.ts +0 -1
- package/dist/plugin-sdk/conversation-runtime.d.ts +0 -1
- package/dist/plugin-sdk/core.d.ts +0 -1
- package/dist/plugin-sdk/dangerous-name-runtime.d.ts +0 -1
- package/dist/plugin-sdk/deepseek.d.ts +0 -1
- package/dist/plugin-sdk/device-bootstrap.d.ts +0 -1
- package/dist/plugin-sdk/diagnostic-runtime.d.ts +0 -1
- package/dist/plugin-sdk/diagnostics-otel.d.ts +0 -1
- package/dist/plugin-sdk/diffs.d.ts +0 -1
- package/dist/plugin-sdk/direct-dm.d.ts +0 -1
- package/dist/plugin-sdk/directory-runtime.d.ts +0 -1
- package/dist/plugin-sdk/discord-account.d.ts +0 -1
- package/dist/plugin-sdk/discord-core.d.ts +0 -1
- package/dist/plugin-sdk/discord-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/discord-session-key.d.ts +0 -1
- package/dist/plugin-sdk/discord-surface.d.ts +0 -1
- package/dist/plugin-sdk/discord-thread-bindings.d.ts +0 -1
- package/dist/plugin-sdk/discord-timeouts.d.ts +0 -1
- package/dist/plugin-sdk/discord.d.ts +0 -1
- package/dist/plugin-sdk/error-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extension-shared.d.ts +0 -1
- package/dist/plugin-sdk/extensions/anthropic/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/anthropic/cli-shared.d.ts +0 -8
- package/dist/plugin-sdk/extensions/anthropic/stream-wrappers.d.ts +0 -12
- package/dist/plugin-sdk/extensions/bluebubbles/api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/bluebubbles/src/account-resolve.d.ts +0 -13
- package/dist/plugin-sdk/extensions/bluebubbles/src/accounts.d.ts +0 -17
- package/dist/plugin-sdk/extensions/bluebubbles/src/actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/actions.runtime.d.ts +0 -19
- package/dist/plugin-sdk/extensions/bluebubbles/src/attachments.d.ts +0 -34
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel-shared.d.ts +0 -49
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel.runtime.d.ts +0 -13
- package/dist/plugin-sdk/extensions/bluebubbles/src/chat.d.ts +0 -48
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-apply.d.ts +0 -15
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-schema.d.ts +0 -76
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-ui-hints.d.ts +0 -10
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-bindings.d.ts +0 -37
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-id.d.ts +0 -18
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-route.d.ts +0 -12
- package/dist/plugin-sdk/extensions/bluebubbles/src/group-policy.d.ts +0 -14
- package/dist/plugin-sdk/extensions/bluebubbles/src/history.d.ts +0 -40
- package/dist/plugin-sdk/extensions/bluebubbles/src/local-file-access.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/media-send.d.ts +0 -14
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-debounce.d.ts +0 -22
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-normalize.d.ts +0 -77
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-processing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-reply-cache.d.ts +0 -36
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-self-chat-cache.d.ts +0 -15
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-shared.d.ts +0 -31
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor.d.ts +0 -8
- package/dist/plugin-sdk/extensions/bluebubbles/src/multipart.d.ts +0 -10
- package/dist/plugin-sdk/extensions/bluebubbles/src/participant-contact-names.d.ts +0 -28
- package/dist/plugin-sdk/extensions/bluebubbles/src/probe.d.ts +0 -53
- package/dist/plugin-sdk/extensions/bluebubbles/src/reactions.d.ts +0 -17
- package/dist/plugin-sdk/extensions/bluebubbles/src/request-url.d.ts +0 -1
- package/dist/plugin-sdk/extensions/bluebubbles/src/runtime-api.d.ts +0 -28
- package/dist/plugin-sdk/extensions/bluebubbles/src/runtime.d.ts +0 -6
- package/dist/plugin-sdk/extensions/bluebubbles/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/bluebubbles/src/send-helpers.d.ts +0 -3
- package/dist/plugin-sdk/extensions/bluebubbles/src/send.d.ts +0 -45
- package/dist/plugin-sdk/extensions/bluebubbles/src/session-route.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/setup-core.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/setup-surface.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/targets.d.ts +0 -45
- package/dist/plugin-sdk/extensions/bluebubbles/src/types.d.ts +0 -121
- package/dist/plugin-sdk/extensions/bluebubbles/src/webhook-shared.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/runtime-api.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/bridge-auth-registry.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/bridge-server.d.ts +0 -24
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp-proxy-bypass.d.ts +0 -31
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp-timeouts.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp.d.ts +0 -125
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp.helpers.d.ts +0 -29
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome-mcp.d.ts +0 -127
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome-mcp.snapshot.d.ts +0 -26
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.d.ts +0 -26
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.executables.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.profile-decoration.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-core.d.ts +0 -159
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-observe.d.ts +0 -68
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-state.d.ts +0 -93
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-types.d.ts +0 -18
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-url.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/browser/client-fetch.d.ts +0 -21
- package/dist/plugin-sdk/extensions/browser/src/browser/client.d.ts +0 -157
- package/dist/plugin-sdk/extensions/browser/src/browser/config-refresh-source.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/config.d.ts +0 -46
- package/dist/plugin-sdk/extensions/browser/src/browser/constants.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/control-auth.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/control-service.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/csrf.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/errors.d.ts +0 -35
- package/dist/plugin-sdk/extensions/browser/src/browser/form-fields.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/http-auth.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/browser/navigation-guard.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/output-atomic.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/browser/paths.d.ts +0 -61
- package/dist/plugin-sdk/extensions/browser/src/browser/profile-capabilities.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/profiles-service.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser/profiles.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/proxy-files.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai-module.d.ts +0 -6
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai-state.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-role-snapshot.d.ts +0 -35
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-session.d.ts +0 -182
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-session.page-cdp.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.activity.d.ts +0 -21
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.downloads.d.ts +0 -34
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.interactions.d.ts +0 -135
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.responses.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.shared.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.snapshot.d.ts +0 -66
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.state.d.ts +0 -46
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.storage.d.ts +0 -47
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.trace.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/request-policy.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/resolved-config-refresh.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.download.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.hooks.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.shared.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.debug.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.shared.d.ts +0 -37
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.snapshot.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.snapshot.plan.d.ts +0 -22
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.storage.d.ts +0 -14
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/basic.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/dispatcher.d.ts +0 -16
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/index.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/output-paths.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/path-output.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/tabs.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/types.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/utils.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/runtime-lifecycle.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/safe-filename.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/screenshot.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.availability.d.ts +0 -19
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.constants.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.reset.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.selection.d.ts +0 -16
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.tab-ops.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.types.d.ts +0 -74
- package/dist/plugin-sdk/extensions/browser/src/browser/server-lifecycle.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/server-middleware.d.ts +0 -6
- package/dist/plugin-sdk/extensions/browser/src/browser/session-tab-registry.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/snapshot-roles.d.ts +0 -11
- package/dist/plugin-sdk/extensions/browser/src/browser/target-id.d.ts +0 -11
- package/dist/plugin-sdk/extensions/browser/src/browser/trash.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/url-pattern.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser-runtime.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.actions.d.ts +0 -44
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.schema.d.ts +0 -75
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.element.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.files-downloads.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.form-wait-eval.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.navigation.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/shared.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-observe.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-debug.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-examples.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-inspect.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-manage.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-resize.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-shared.d.ts +0 -24
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-state.cookies-storage.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-state.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/cli/command-format.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/cli/core-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/config.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/paths.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/port-defaults.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/control-service.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/core-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/gateway/auth.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/gateway/browser-request.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/gateway/net.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/gateway/startup-auth.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/errors.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/fs-safe.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/net/proxy-env.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/net/ssrf.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/path-guards.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/ports.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/secure-random.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/tmp-openclaw-dir.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/ws.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/logging/redact.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/logging/subsystem.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/media/image-ops.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/media/store.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/node-host/invoke-browser.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/plugin-enabled.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/plugin-service.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/process/exec.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/security/secret-equal.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/server.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/utils/boolean.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/utils.d.ts +0 -1
- package/dist/plugin-sdk/extensions/byteplus/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/byteplus/models.d.ts +0 -73
- package/dist/plugin-sdk/extensions/byteplus/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/chutes/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/chutes/models.d.ts +0 -7
- package/dist/plugin-sdk/extensions/chutes/onboard.d.ts +0 -13
- package/dist/plugin-sdk/extensions/chutes/provider-catalog.d.ts +0 -7
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/models.d.ts +0 -14
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/onboard.d.ts +0 -32
- package/dist/plugin-sdk/extensions/deepseek/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/deepseek/models.d.ts +0 -4
- package/dist/plugin-sdk/extensions/deepseek/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/action-runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/api.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/runtime-api.d.ts +0 -18
- package/dist/plugin-sdk/extensions/discord/session-key-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.guild-admin.d.ts +0 -9
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.guild.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.messaging.d.ts +0 -33
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation-shared.d.ts +0 -13
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation.d.ts +0 -10
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.presence.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.shared.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/approval-native.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/audit.d.ts +0 -29
- package/dist/plugin-sdk/extensions/discord/src/channel-actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/chunk.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/client.d.ts +0 -23
- package/dist/plugin-sdk/extensions/discord/src/component-custom-id.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/components-registry.d.ts +0 -16
- package/dist/plugin-sdk/extensions/discord/src/components.d.ts +0 -195
- package/dist/plugin-sdk/extensions/discord/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/draft-chunking.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/draft-stream.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/exec-approvals.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/gateway-logging.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/group-policy.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/guilds.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/mentions.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/message-tool-schema.d.ts +0 -96
- package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components-helpers.d.ts +0 -160
- package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/auto-presence.d.ts +0 -59
- package/dist/plugin-sdk/extensions/discord/src/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-auth.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-decision.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/exec-approvals.d.ts +0 -54
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-handle.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-plugin.d.ts +0 -22
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-registry.d.ts +0 -9
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-supervisor.d.ts +0 -25
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-context.d.ts +0 -36
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-job.d.ts +0 -13
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-worker.d.ts +0 -22
- package/dist/plugin-sdk/extensions/discord/src/monitor/listeners.d.ts +0 -67
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.types.d.ts +0 -88
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.process.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-utils.d.ts +0 -53
- package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker-preferences.d.ts +0 -18
- package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker.d.ts +0 -117
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-context.d.ts +0 -68
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-route.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-ui.d.ts +0 -106
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/monitor/presence.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider-session.runtime.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.allowlist.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.d.ts +0 -61
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.lifecycle.d.ts +0 -27
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.startup.d.ts +0 -82
- package/dist/plugin-sdk/extensions/discord/src/monitor/reply-context.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/reply-delivery.d.ts +0 -40
- package/dist/plugin-sdk/extensions/discord/src/monitor/rest-fetch.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/route-resolution.d.ts +0 -40
- package/dist/plugin-sdk/extensions/discord/src/monitor/sender-identity.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/monitor/startup-status.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/monitor/status.d.ts +0 -17
- package/dist/plugin-sdk/extensions/discord/src/monitor/system-events.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.config.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.discord-api.d.ts +0 -41
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.lifecycle.d.ts +0 -60
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.manager.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.messages.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.persona.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.state.d.ts +0 -79
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.types.d.ts +0 -79
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-session-close.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-title.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/threading.d.ts +0 -108
- package/dist/plugin-sdk/extensions/discord/src/monitor/timeouts.d.ts +0 -16
- package/dist/plugin-sdk/extensions/discord/src/monitor/typing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/monitor.d.ts +0 -10
- package/dist/plugin-sdk/extensions/discord/src/monitor.gateway.d.ts +0 -12
- package/dist/plugin-sdk/extensions/discord/src/normalize.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/outbound-adapter.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/pluralkit.d.ts +0 -26
- package/dist/plugin-sdk/extensions/discord/src/probe.d.ts +0 -37
- package/dist/plugin-sdk/extensions/discord/src/resolve-allowlist-common.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/resolve-channels.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/resolve-users.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/retry.d.ts +0 -12
- package/dist/plugin-sdk/extensions/discord/src/send.channels.d.ts +0 -17
- package/dist/plugin-sdk/extensions/discord/src/send.components.d.ts +0 -29
- package/dist/plugin-sdk/extensions/discord/src/send.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/send.emojis-stickers.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/send.guild.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/send.messages.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/send.outbound.d.ts +0 -67
- package/dist/plugin-sdk/extensions/discord/src/send.permissions.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/send.reactions.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/send.shared.d.ts +0 -86
- package/dist/plugin-sdk/extensions/discord/src/send.types.d.ts +0 -148
- package/dist/plugin-sdk/extensions/discord/src/send.typing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/session-key-normalization.d.ts +0 -7
- package/dist/plugin-sdk/extensions/discord/src/shared-interactive.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/status-issues.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/ui.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/src/voice/access.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/voice/command.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/voice/manager.d.ts +0 -59
- package/dist/plugin-sdk/extensions/discord/src/voice/manager.runtime.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/voice/sdk-runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/voice-message.d.ts +0 -50
- package/dist/plugin-sdk/extensions/discord/timeouts.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/feishu/runtime-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/feishu/src/accounts.d.ts +0 -72
- package/dist/plugin-sdk/extensions/feishu/src/async.d.ts +0 -13
- package/dist/plugin-sdk/extensions/feishu/src/bot-content.d.ts +0 -85
- package/dist/plugin-sdk/extensions/feishu/src/bot-sender-name.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/bot.d.ts +0 -70
- package/dist/plugin-sdk/extensions/feishu/src/client.d.ts +0 -47
- package/dist/plugin-sdk/extensions/feishu/src/config-schema.d.ts +0 -550
- package/dist/plugin-sdk/extensions/feishu/src/conversation-id.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/dedup.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/dynamic-agent.d.ts +0 -18
- package/dist/plugin-sdk/extensions/feishu/src/external-keys.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/src/media.d.ts +0 -118
- package/dist/plugin-sdk/extensions/feishu/src/mention.d.ts +0 -52
- package/dist/plugin-sdk/extensions/feishu/src/policy.d.ts +0 -36
- package/dist/plugin-sdk/extensions/feishu/src/post.d.ts +0 -11
- package/dist/plugin-sdk/extensions/feishu/src/probe.d.ts +0 -10
- package/dist/plugin-sdk/extensions/feishu/src/reply-dispatcher.d.ts +0 -35
- package/dist/plugin-sdk/extensions/feishu/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/src/send-result.d.ts +0 -12
- package/dist/plugin-sdk/extensions/feishu/src/send-target.d.ts +0 -10
- package/dist/plugin-sdk/extensions/feishu/src/send.d.ts +0 -131
- package/dist/plugin-sdk/extensions/feishu/src/setup-core.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/setup-surface.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/streaming-card.d.ts +0 -55
- package/dist/plugin-sdk/extensions/feishu/src/targets.d.ts +0 -6
- package/dist/plugin-sdk/extensions/feishu/src/thread-bindings.d.ts +0 -42
- package/dist/plugin-sdk/extensions/feishu/src/types.d.ts +0 -84
- package/dist/plugin-sdk/extensions/feishu/src/typing.d.ts +0 -57
- package/dist/plugin-sdk/extensions/github-copilot/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/github-copilot/login.d.ts +0 -5
- package/dist/plugin-sdk/extensions/google/api.d.ts +0 -33
- package/dist/plugin-sdk/extensions/google/model-id.d.ts +0 -2
- package/dist/plugin-sdk/extensions/huggingface/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/huggingface/models.d.ts +0 -7
- package/dist/plugin-sdk/extensions/huggingface/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/huggingface/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/image-generation-core/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/image-generation-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/image-generation-core/src/runtime.d.ts +0 -24
- package/dist/plugin-sdk/extensions/irc/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/irc/src/accounts.d.ts +0 -23
- package/dist/plugin-sdk/extensions/irc/src/control-chars.d.ts +0 -3
- package/dist/plugin-sdk/extensions/irc/src/normalize.d.ts +0 -18
- package/dist/plugin-sdk/extensions/irc/src/runtime-api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/irc/src/setup-core.d.ts +0 -10
- package/dist/plugin-sdk/extensions/irc/src/setup-surface.d.ts +0 -4
- package/dist/plugin-sdk/extensions/irc/src/types.d.ts +0 -83
- package/dist/plugin-sdk/extensions/kilocode/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/kilocode/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/kilocode/provider-models.d.ts +0 -18
- package/dist/plugin-sdk/extensions/kimi-coding/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/kimi-coding/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/kimi-coding/provider-catalog.d.ts +0 -10
- package/dist/plugin-sdk/extensions/line/runtime-api.d.ts +0 -36
- package/dist/plugin-sdk/extensions/line/src/accounts.d.ts +0 -10
- package/dist/plugin-sdk/extensions/line/src/actions.d.ts +0 -22
- package/dist/plugin-sdk/extensions/line/src/auto-reply-delivery.d.ts +0 -38
- package/dist/plugin-sdk/extensions/line/src/bot-access.d.ts +0 -17
- package/dist/plugin-sdk/extensions/line/src/bot-handlers.d.ts +0 -23
- package/dist/plugin-sdk/extensions/line/src/bot-message-context.d.ts +0 -129
- package/dist/plugin-sdk/extensions/line/src/bot.d.ts +0 -24
- package/dist/plugin-sdk/extensions/line/src/channel-access-token.d.ts +0 -4
- package/dist/plugin-sdk/extensions/line/src/config-schema.d.ts +0 -80
- package/dist/plugin-sdk/extensions/line/src/download.d.ts +0 -7
- package/dist/plugin-sdk/extensions/line/src/flex-templates/basic-cards.d.ts +0 -46
- package/dist/plugin-sdk/extensions/line/src/flex-templates/common.d.ts +0 -2
- package/dist/plugin-sdk/extensions/line/src/flex-templates/media-control-cards.d.ts +0 -73
- package/dist/plugin-sdk/extensions/line/src/flex-templates/message.d.ts +0 -6
- package/dist/plugin-sdk/extensions/line/src/flex-templates/schedule-cards.d.ts +0 -55
- package/dist/plugin-sdk/extensions/line/src/flex-templates/types.d.ts +0 -19
- package/dist/plugin-sdk/extensions/line/src/flex-templates.d.ts +0 -5
- package/dist/plugin-sdk/extensions/line/src/group-keys.d.ts +0 -17
- package/dist/plugin-sdk/extensions/line/src/markdown-to-line.d.ts +0 -67
- package/dist/plugin-sdk/extensions/line/src/monitor.d.ts +0 -28
- package/dist/plugin-sdk/extensions/line/src/probe.d.ts +0 -2
- package/dist/plugin-sdk/extensions/line/src/reply-chunks.d.ts +0 -24
- package/dist/plugin-sdk/extensions/line/src/rich-menu.d.ts +0 -50
- package/dist/plugin-sdk/extensions/line/src/send.d.ts +0 -73
- package/dist/plugin-sdk/extensions/line/src/signature.d.ts +0 -1
- package/dist/plugin-sdk/extensions/line/src/template-messages.d.ts +0 -100
- package/dist/plugin-sdk/extensions/line/src/types.d.ts +0 -120
- package/dist/plugin-sdk/extensions/line/src/webhook-node.d.ts +0 -16
- package/dist/plugin-sdk/extensions/line/src/webhook-utils.d.ts +0 -3
- package/dist/plugin-sdk/extensions/line/src/webhook.d.ts +0 -19
- package/dist/plugin-sdk/extensions/litellm/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/litellm/onboard.d.ts +0 -7
- package/dist/plugin-sdk/extensions/matrix/api.d.ts +0 -9
- package/dist/plugin-sdk/extensions/matrix/runtime-api.d.ts +0 -12
- package/dist/plugin-sdk/extensions/matrix/src/account-selection.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/auth-precedence.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/directory-live.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/env-vars.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/account-config.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/accounts.d.ts +0 -23
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/client.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/types.d.ts +0 -68
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/verification.d.ts +0 -78
- package/dist/plugin-sdk/extensions/matrix/src/matrix/active-client.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/async-lock.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/matrix/backup-health.d.ts +0 -19
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config-runtime-api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config-secret-input.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config.d.ts +0 -55
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/create-client.d.ts +0 -18
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/env-auth.d.ts +0 -23
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/file-sync-store.d.ts +0 -29
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/logging.d.ts +0 -13
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/migration-snapshot.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/private-network-host.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/shared.d.ts +0 -24
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/storage.d.ts +0 -30
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/types.d.ts +0 -47
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client-bootstrap.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/matrix/config-paths.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/config-update.d.ts +0 -24
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials-read.d.ts +0 -17
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials-write.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials.d.ts +0 -5
- package/dist/plugin-sdk/extensions/matrix/src/matrix/deps.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/direct-management.d.ts +0 -53
- package/dist/plugin-sdk/extensions/matrix/src/matrix/direct-room.d.ts +0 -27
- package/dist/plugin-sdk/extensions/matrix/src/matrix/encryption-guidance.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/errors.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/format.d.ts +0 -17
- package/dist/plugin-sdk/extensions/matrix/src/matrix/outbound-media-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/poll-types.d.ts +0 -114
- package/dist/plugin-sdk/extensions/matrix/src/matrix/reaction-common.d.ts +0 -32
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-bootstrap.d.ts +0 -34
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-facade.d.ts +0 -67
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-node.runtime.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-runtime.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/decrypt-bridge.d.ts +0 -45
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/event-helpers.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/http-client.d.ts +0 -34
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/idb-persistence-lock.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/idb-persistence.d.ts +0 -5
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/logger.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/read-response-with-limit.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/recovery-key-store.d.ts +0 -48
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/transport.d.ts +0 -29
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/types.d.ts +0 -186
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/verification-manager.d.ts +0 -127
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/verification-status.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk.d.ts +0 -212
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/client.d.ts +0 -15
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/formatting.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/media.d.ts +0 -42
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/targets.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/types.d.ts +0 -80
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send.d.ts +0 -54
- package/dist/plugin-sdk/extensions/matrix/src/matrix/target-ids.d.ts +0 -19
- package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings-shared.d.ts +0 -77
- package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings.d.ts +0 -15
- package/dist/plugin-sdk/extensions/matrix/src/onboarding.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/resolve-targets.d.ts +0 -8
- package/dist/plugin-sdk/extensions/matrix/src/runtime-api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/setup-bootstrap.d.ts +0 -20
- package/dist/plugin-sdk/extensions/matrix/src/setup-config.d.ts +0 -12
- package/dist/plugin-sdk/extensions/matrix/src/setup-core.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/setup-surface.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/storage-paths.d.ts +0 -26
- package/dist/plugin-sdk/extensions/matrix/src/types.d.ts +0 -202
- package/dist/plugin-sdk/extensions/mattermost/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/accounts.d.ts +0 -33
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/client.d.ts +0 -103
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/monitor-auth.d.ts +0 -51
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/secret-input.d.ts +0 -2
- package/dist/plugin-sdk/extensions/mattermost/src/types.d.ts +0 -105
- package/dist/plugin-sdk/extensions/media-understanding-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/media-understanding-core/src/runtime.d.ts +0 -54
- package/dist/plugin-sdk/extensions/memory-core/runtime-api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/memory-core/src/memory/embeddings.d.ts +0 -21
- package/dist/plugin-sdk/extensions/memory-core/src/memory/hybrid.d.ts +0 -45
- package/dist/plugin-sdk/extensions/memory-core/src/memory/index.d.ts +0 -3
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-embedding-ops.d.ts +0 -47
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-search.d.ts +0 -61
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-sync-ops.d.ts +0 -142
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager.d.ts +0 -155
- package/dist/plugin-sdk/extensions/memory-core/src/memory/mmr.d.ts +0 -67
- package/dist/plugin-sdk/extensions/memory-core/src/memory/provider-adapters.d.ts +0 -19
- package/dist/plugin-sdk/extensions/memory-core/src/memory/qmd-manager.d.ts +0 -191
- package/dist/plugin-sdk/extensions/memory-core/src/memory/search-manager.d.ts +0 -12
- package/dist/plugin-sdk/extensions/memory-core/src/memory/temporal-decay.d.ts +0 -25
- package/dist/plugin-sdk/extensions/minimax/api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/minimax/model-definitions.d.ts +0 -35
- package/dist/plugin-sdk/extensions/minimax/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/minimax/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/minimax/provider-models.d.ts +0 -15
- package/dist/plugin-sdk/extensions/mistral/api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/mistral/model-definitions.d.ts +0 -14
- package/dist/plugin-sdk/extensions/mistral/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/mistral/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/modelstudio/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/modelstudio/models.d.ts +0 -27
- package/dist/plugin-sdk/extensions/modelstudio/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/moonshot/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/moonshot/onboard.d.ts +0 -6
- package/dist/plugin-sdk/extensions/moonshot/provider-catalog.d.ts +0 -7
- package/dist/plugin-sdk/extensions/nvidia/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/nvidia/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/ollama/api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/ollama/runtime-api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/ollama/src/defaults.d.ts +0 -11
- package/dist/plugin-sdk/extensions/ollama/src/embedding-provider.d.ts +0 -37
- package/dist/plugin-sdk/extensions/ollama/src/provider-models.d.ts +0 -31
- package/dist/plugin-sdk/extensions/ollama/src/setup.d.ts +0 -36
- package/dist/plugin-sdk/extensions/ollama/src/stream.d.ts +0 -104
- package/dist/plugin-sdk/extensions/openai/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/openai/default-models.d.ts +0 -10
- package/dist/plugin-sdk/extensions/openai/openai-codex-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/openai/openai-provider.d.ts +0 -2
- package/dist/plugin-sdk/extensions/openai/shared.d.ts +0 -5
- package/dist/plugin-sdk/extensions/opencode/api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/opencode/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/opencode-go/api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/opencode-go/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/openrouter/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/openrouter/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/openrouter/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/qianfan/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/qianfan/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/qianfan/provider-catalog.d.ts +0 -4
- package/dist/plugin-sdk/extensions/sglang/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/sglang/defaults.d.ts +0 -4
- package/dist/plugin-sdk/extensions/sglang/models.d.ts +0 -8
- package/dist/plugin-sdk/extensions/signal/api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/signal/reaction-runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/signal/src/accounts.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/client.d.ts +0 -32
- package/dist/plugin-sdk/extensions/signal/src/daemon.d.ts +0 -26
- package/dist/plugin-sdk/extensions/signal/src/format.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/identity.d.ts +0 -25
- package/dist/plugin-sdk/extensions/signal/src/message-actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/monitor/access-policy.d.ts +0 -40
- package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.d.ts +0 -5
- package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.types.d.ts +0 -128
- package/dist/plugin-sdk/extensions/signal/src/monitor/inbound-context.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/monitor/mentions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/monitor.d.ts +0 -26
- package/dist/plugin-sdk/extensions/signal/src/normalize.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/outbound-session.d.ts +0 -8
- package/dist/plugin-sdk/extensions/signal/src/probe.d.ts +0 -7
- package/dist/plugin-sdk/extensions/signal/src/reaction-level.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/rpc-context.d.ts +0 -9
- package/dist/plugin-sdk/extensions/signal/src/runtime-api.d.ts +0 -25
- package/dist/plugin-sdk/extensions/signal/src/send-reactions.d.ts +0 -34
- package/dist/plugin-sdk/extensions/signal/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/signal/src/setup-core.d.ts +0 -20
- package/dist/plugin-sdk/extensions/signal/src/sse-reconnect.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/api.d.ts +0 -19
- package/dist/plugin-sdk/extensions/slack/runtime-api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/account-inspect.d.ts +0 -32
- package/dist/plugin-sdk/extensions/slack/src/account-surface-fields.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/accounts.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/accounts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/action-runtime.d.ts +0 -38
- package/dist/plugin-sdk/extensions/slack/src/action-threading.d.ts +0 -11
- package/dist/plugin-sdk/extensions/slack/src/actions.d.ts +0 -81
- package/dist/plugin-sdk/extensions/slack/src/actions.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/approval-auth.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/approval-native.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/blocks-fallback.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/blocks-input.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/blocks-render.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/channel-actions.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/channel-migration.d.ts +0 -20
- package/dist/plugin-sdk/extensions/slack/src/channel-type.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/channel.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/client.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/config-schema.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/config-ui-hints.d.ts +0 -98
- package/dist/plugin-sdk/extensions/slack/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/directory-live.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/draft-stream.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/exec-approvals.d.ts +0 -43
- package/dist/plugin-sdk/extensions/slack/src/format.d.ts +0 -8
- package/dist/plugin-sdk/extensions/slack/src/group-policy.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/http/index.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/http/registry.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/index.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/interactive-replies.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/limits.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/message-action-dispatch.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/message-actions.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/message-tool-schema.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/modal-metadata.d.ts +0 -8
- package/dist/plugin-sdk/extensions/slack/src/monitor/allow-list.d.ts +0 -24
- package/dist/plugin-sdk/extensions/slack/src/monitor/auth.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/monitor/channel-config.d.ts +0 -45
- package/dist/plugin-sdk/extensions/slack/src/monitor/channel-type.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/monitor/commands.d.ts +0 -9
- package/dist/plugin-sdk/extensions/slack/src/monitor/context.d.ts +0 -107
- package/dist/plugin-sdk/extensions/slack/src/monitor/dm-auth.d.ts +0 -17
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/channels.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.block-actions.d.ts +0 -49
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.modal.d.ts +0 -68
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/members.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/message-subtype-handlers.d.ts +0 -13
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/messages.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/pins.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/reactions.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/system-event-context.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/events.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/monitor/exec-approvals.d.ts +0 -26
- package/dist/plugin-sdk/extensions/slack/src/monitor/external-arg-menu-store.d.ts +0 -18
- package/dist/plugin-sdk/extensions/slack/src/monitor/media.d.ts +0 -67
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/dispatch.d.ts +0 -21
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-content.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-thread-context.d.ts +0 -28
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.d.ts +0 -13
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.test-helpers.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/preview-finalize.d.ts +0 -44
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/types.d.ts +0 -23
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler.d.ts +0 -22
- package/dist/plugin-sdk/extensions/slack/src/monitor/mrkdwn.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/monitor/policy.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/provider.d.ts +0 -33
- package/dist/plugin-sdk/extensions/slack/src/monitor/reconnect-policy.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/monitor/replies.d.ts +0 -56
- package/dist/plugin-sdk/extensions/slack/src/monitor/room-context.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-commands.runtime.d.ts +0 -11
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-dispatch.runtime.d.ts +0 -17
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-skill-commands.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/monitor/thread-resolution.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/types.d.ts +0 -113
- package/dist/plugin-sdk/extensions/slack/src/monitor.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/outbound-adapter.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/probe.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/reply-blocks.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/resolve-allowlist-common.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/resolve-channels.d.ts +0 -19
- package/dist/plugin-sdk/extensions/slack/src/resolve-users.d.ts +0 -26
- package/dist/plugin-sdk/extensions/slack/src/runtime-api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/scopes.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/slack/src/sent-thread-cache.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/setup-core.d.ts +0 -80
- package/dist/plugin-sdk/extensions/slack/src/setup-surface.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/shared.d.ts +0 -39
- package/dist/plugin-sdk/extensions/slack/src/stream-mode.d.ts +0 -23
- package/dist/plugin-sdk/extensions/slack/src/streaming.d.ts +0 -72
- package/dist/plugin-sdk/extensions/slack/src/targets.d.ts +0 -9
- package/dist/plugin-sdk/extensions/slack/src/threading-tool-context.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/threading.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/token.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/truncate.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/types.d.ts +0 -58
- package/dist/plugin-sdk/extensions/slack/test-api.d.ts +0 -9
- package/dist/plugin-sdk/extensions/speech-core/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/speech-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/speech-core/src/tts.d.ts +0 -145
- package/dist/plugin-sdk/extensions/synthetic/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/synthetic/models.d.ts +0 -160
- package/dist/plugin-sdk/extensions/synthetic/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/synthetic/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/together/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/together/models.d.ts +0 -4
- package/dist/plugin-sdk/extensions/together/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/together/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/venice/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/venice/models.d.ts +0 -345
- package/dist/plugin-sdk/extensions/venice/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/models.d.ts +0 -15
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vllm/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vllm/defaults.d.ts +0 -4
- package/dist/plugin-sdk/extensions/vllm/models.d.ts +0 -8
- package/dist/plugin-sdk/extensions/volcengine/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/volcengine/models.d.ts +0 -94
- package/dist/plugin-sdk/extensions/volcengine/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/api.d.ts +0 -10
- package/dist/plugin-sdk/extensions/whatsapp/constants.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/light-runtime-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/login-qr-api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/whatsapp/runtime-api.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/account-config.d.ts +0 -8
- package/dist/plugin-sdk/extensions/whatsapp/src/accounts.d.ts +0 -43
- package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime-target-auth.d.ts +0 -10
- package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/agent-tools-login.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auth-store.d.ts +0 -31
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/constants.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/deliver-reply.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/heartbeat-runner.d.ts +0 -20
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/loggers.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/mentions.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.d.ts +0 -13
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/broadcast.d.ts +0 -16
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/echo.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-activation.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-gating.d.ts +0 -33
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-members.d.ts +0 -6
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/inbound-context.d.ts +0 -28
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.d.ts +0 -140
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/last-route.d.ts +0 -15
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/message-line.d.ts +0 -11
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/on-message.d.ts +0 -24
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/peer.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/process-message.d.ts +0 -31
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/runtime-api.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor-state.d.ts +0 -18
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor.d.ts +0 -5
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/session-snapshot.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/types.d.ts +0 -33
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/util.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.impl.d.ts +0 -6
- package/dist/plugin-sdk/extensions/whatsapp/src/channel.runtime.d.ts +0 -23
- package/dist/plugin-sdk/extensions/whatsapp/src/creds-files.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/group-policy.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/identity.d.ts +0 -52
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/access-control.d.ts +0 -36
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/dedupe.d.ts +0 -12
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/extract.d.ts +0 -8
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/lifecycle.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/media.d.ts +0 -7
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/monitor.d.ts +0 -32
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/send-api.d.ts +0 -22
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/types.d.ts +0 -48
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/src/login-qr.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/login.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/media.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/normalize-target.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/normalize.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/qr-image.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/reaction-level.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/reconnect.d.ts +0 -11
- package/dist/plugin-sdk/extensions/whatsapp/src/resolve-outbound-target.d.ts +0 -12
- package/dist/plugin-sdk/extensions/whatsapp/src/runtime-api.d.ts +0 -16
- package/dist/plugin-sdk/extensions/whatsapp/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/whatsapp/src/session-errors.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/session.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/setup-core.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/setup-surface.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/vcard.d.ts +0 -6
- package/dist/plugin-sdk/extensions/xai/api.d.ts +0 -27
- package/dist/plugin-sdk/extensions/xai/model-definitions.d.ts +0 -13
- package/dist/plugin-sdk/extensions/xai/model-id.d.ts +0 -1
- package/dist/plugin-sdk/extensions/xai/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/xai/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/xai/provider-models.d.ts +0 -6
- package/dist/plugin-sdk/extensions/xiaomi/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/xiaomi/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/xiaomi/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zai/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/zai/model-definitions.d.ts +0 -23
- package/dist/plugin-sdk/extensions/zai/onboard.d.ts +0 -10
- package/dist/plugin-sdk/extensions/zalo/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zalo/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/accounts.d.ts +0 -11
- package/dist/plugin-sdk/extensions/zalo/src/group-access.d.ts +0 -17
- package/dist/plugin-sdk/extensions/zalo/src/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/setup-core.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/setup-surface.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zalo/src/token.d.ts +0 -8
- package/dist/plugin-sdk/extensions/zalo/src/types.d.ts +0 -46
- package/dist/plugin-sdk/feishu-conversation.d.ts +0 -1
- package/dist/plugin-sdk/feishu-setup.d.ts +0 -1
- package/dist/plugin-sdk/feishu.d.ts +0 -1
- package/dist/plugin-sdk/fetch-runtime.d.ts +0 -1
- package/dist/plugin-sdk/file-lock.d.ts +0 -1
- package/dist/plugin-sdk/gateway-runtime.d.ts +0 -1
- package/dist/plugin-sdk/github-copilot-login.d.ts +0 -1
- package/dist/plugin-sdk/github-copilot-token.d.ts +0 -1
- package/dist/plugin-sdk/global-singleton.d.ts +0 -1
- package/dist/plugin-sdk/google.d.ts +0 -1
- package/dist/plugin-sdk/googlechat.d.ts +0 -1
- package/dist/plugin-sdk/group-access.d.ts +0 -1
- package/dist/plugin-sdk/hook-runtime.d.ts +0 -1
- package/dist/plugin-sdk/host-runtime.d.ts +0 -1
- package/dist/plugin-sdk/huggingface.d.ts +0 -1
- package/dist/plugin-sdk/image-generation-core.d.ts +0 -1
- package/dist/plugin-sdk/image-generation.d.ts +0 -1
- package/dist/plugin-sdk/index.d.ts +0 -1
- package/dist/plugin-sdk/infra-runtime.d.ts +0 -1
- package/dist/plugin-sdk/interactive-runtime.d.ts +0 -1
- package/dist/plugin-sdk/irc-surface.d.ts +0 -1
- package/dist/plugin-sdk/irc.d.ts +0 -1
- package/dist/plugin-sdk/json-store.d.ts +0 -1
- package/dist/plugin-sdk/keyed-async-queue.d.ts +0 -1
- package/dist/plugin-sdk/kilocode.d.ts +0 -1
- package/dist/plugin-sdk/kimi-coding.d.ts +0 -1
- package/dist/plugin-sdk/lazy-runtime.d.ts +0 -1
- package/dist/plugin-sdk/line-core.d.ts +0 -1
- package/dist/plugin-sdk/line-runtime.d.ts +0 -1
- package/dist/plugin-sdk/line-surface.d.ts +0 -1
- package/dist/plugin-sdk/line.d.ts +0 -1
- package/dist/plugin-sdk/llm-task.d.ts +0 -1
- package/dist/plugin-sdk/logging-core.d.ts +0 -1
- package/dist/plugin-sdk/markdown-table-runtime.d.ts +0 -1
- package/dist/plugin-sdk/matrix-helper.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-heavy.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-shared.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/matrix-surface.d.ts +0 -1
- package/dist/plugin-sdk/matrix-thread-bindings.d.ts +0 -1
- package/dist/plugin-sdk/matrix.d.ts +0 -1
- package/dist/plugin-sdk/mattermost-policy.d.ts +0 -1
- package/dist/plugin-sdk/mattermost.d.ts +0 -1
- package/dist/plugin-sdk/media-runtime.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding-runtime.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-engine-runtime.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-foundation.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-qmd.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-storage.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-multimodal.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-query.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-cli.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-core.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-files.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-secret.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-status.d.ts +0 -1
- package/dist/plugin-sdk/memory-core.d.ts +0 -1
- package/dist/plugin-sdk/memory-lancedb.d.ts +0 -1
- package/dist/plugin-sdk/minimax.d.ts +0 -1
- package/dist/plugin-sdk/mistral.d.ts +0 -1
- package/dist/plugin-sdk/models-provider-runtime.d.ts +0 -1
- package/dist/plugin-sdk/modelstudio-definitions.d.ts +0 -1
- package/dist/plugin-sdk/modelstudio.d.ts +0 -1
- package/dist/plugin-sdk/moonshot.d.ts +0 -1
- package/dist/plugin-sdk/msteams.d.ts +0 -1
- package/dist/plugin-sdk/native-command-registry.d.ts +0 -1
- package/dist/plugin-sdk/nextcloud-talk.d.ts +0 -1
- package/dist/plugin-sdk/nostr.d.ts +0 -1
- package/dist/plugin-sdk/nvidia.d.ts +0 -1
- package/dist/plugin-sdk/ollama-surface.d.ts +0 -1
- package/dist/plugin-sdk/ollama.d.ts +0 -1
- package/dist/plugin-sdk/openai.d.ts +0 -1
- package/dist/plugin-sdk/opencode-go.d.ts +0 -1
- package/dist/plugin-sdk/opencode.d.ts +0 -1
- package/dist/plugin-sdk/outbound-runtime.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-embeddings.d.ts +0 -16
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-foundation.d.ts +0 -20
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-qmd.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-embedding-common.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-error-utils.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-gemini.d.ts +0 -46
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-http.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-openai.d.ts +0 -19
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-output.d.ts +0 -23
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-provider-common.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-runner.d.ts +0 -38
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-status.d.ts +0 -27
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-upload.d.ts +0 -6
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-utils.d.ts +0 -11
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-voyage.d.ts +0 -29
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-chunk-limits.d.ts +0 -3
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-model-limits.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-vectors.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-debug.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-gemini.d.ts +0 -63
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-mistral.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-model-normalize.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-ollama.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-openai.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-client.d.ts +0 -12
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-fetch.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-provider.d.ts +0 -21
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-voyage.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings.d.ts +0 -59
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/node-llama.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/post-json.d.ts +0 -10
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-process.d.ts +0 -34
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-query-parser.d.ts +0 -11
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-scope.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/remote-http.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/secret-input.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/session-files.d.ts +0 -14
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/status-format.d.ts +0 -28
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/test-helpers/ssrf.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-cli.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-core.d.ts +0 -17
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-files.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/packages/memory-host-sdk/src/secret.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/status.d.ts +0 -1
- package/dist/plugin-sdk/param-readers.d.ts +0 -1
- package/dist/plugin-sdk/plugin-entry.d.ts +0 -1
- package/dist/plugin-sdk/plugin-runtime.d.ts +0 -1
- package/dist/plugin-sdk/process-runtime.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-api-key.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-login.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-result.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-runtime.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth.d.ts +0 -1
- package/dist/plugin-sdk/provider-catalog-shared.d.ts +0 -1
- package/dist/plugin-sdk/provider-entry.d.ts +0 -1
- package/dist/plugin-sdk/provider-env-vars.d.ts +0 -1
- package/dist/plugin-sdk/provider-http.d.ts +0 -1
- package/dist/plugin-sdk/provider-model-shared.d.ts +0 -1
- package/dist/plugin-sdk/provider-moonshot.d.ts +0 -1
- package/dist/plugin-sdk/provider-onboard.d.ts +0 -1
- package/dist/plugin-sdk/provider-setup.d.ts +0 -1
- package/dist/plugin-sdk/provider-stream.d.ts +0 -1
- package/dist/plugin-sdk/provider-tools.d.ts +0 -1
- package/dist/plugin-sdk/provider-usage.d.ts +0 -1
- package/dist/plugin-sdk/provider-web-fetch.d.ts +0 -1
- package/dist/plugin-sdk/provider-web-search.d.ts +0 -1
- package/dist/plugin-sdk/provider-zai-endpoint.d.ts +0 -1
- package/dist/plugin-sdk/qianfan.d.ts +0 -1
- package/dist/plugin-sdk/reply-chunking.d.ts +0 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.d.ts +0 -1
- package/dist/plugin-sdk/reply-history.d.ts +0 -1
- package/dist/plugin-sdk/reply-payload.d.ts +0 -1
- package/dist/plugin-sdk/reply-runtime.d.ts +0 -1
- package/dist/plugin-sdk/request-url.d.ts +0 -1
- package/dist/plugin-sdk/retry-runtime.d.ts +0 -1
- package/dist/plugin-sdk/routing.d.ts +0 -1
- package/dist/plugin-sdk/runtime-config-snapshot.d.ts +0 -1
- package/dist/plugin-sdk/runtime-env.d.ts +0 -1
- package/dist/plugin-sdk/runtime-group-policy.d.ts +0 -1
- package/dist/plugin-sdk/runtime-store.d.ts +0 -1
- package/dist/plugin-sdk/runtime.d.ts +0 -1
- package/dist/plugin-sdk/sandbox.d.ts +0 -1
- package/dist/plugin-sdk/scripts/lib/plugin-sdk-doc-metadata.d.ts +0 -64
- package/dist/plugin-sdk/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/security-runtime.d.ts +0 -1
- package/dist/plugin-sdk/self-hosted-provider-setup.d.ts +0 -1
- package/dist/plugin-sdk/session-store-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-adapter-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-tools.d.ts +0 -1
- package/dist/plugin-sdk/setup.d.ts +0 -1
- package/dist/plugin-sdk/sglang.d.ts +0 -1
- package/dist/plugin-sdk/signal-account.d.ts +0 -1
- package/dist/plugin-sdk/signal-surface.d.ts +0 -1
- package/dist/plugin-sdk/signal.d.ts +0 -1
- package/dist/plugin-sdk/skill-commands-runtime.d.ts +0 -1
- package/dist/plugin-sdk/slack-account.d.ts +0 -1
- package/dist/plugin-sdk/slack-core.d.ts +0 -1
- package/dist/plugin-sdk/slack-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/slack-surface.d.ts +0 -1
- package/dist/plugin-sdk/slack-target-parser.d.ts +0 -1
- package/dist/plugin-sdk/slack-targets.d.ts +0 -1
- package/dist/plugin-sdk/slack.d.ts +0 -1
- package/dist/plugin-sdk/speech-core.d.ts +0 -1
- package/dist/plugin-sdk/speech-runtime.d.ts +0 -1
- package/dist/plugin-sdk/speech.d.ts +0 -1
- package/dist/plugin-sdk/src/acp/runtime/adapter-contract.testkit.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/auth-profiles/upsert-with-lock.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/live-test-helpers.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/model-allowlist-ref.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/model-catalog.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/model-suppression.runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/openclaw-tools.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/openrouter-model-capabilities.d.ts +0 -53
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/proxy-stream-wrappers.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/zai-stream-wrappers.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-embedded.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/sandbox/test-fixtures.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/self-hosted-provider-defaults.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/simple-completion-transport.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/skills.e2e-test-helpers.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/chunk.d.ts +0 -45
- package/dist/plugin-sdk/src/auto-reply/dispatch.d.ts +0 -32
- package/dist/plugin-sdk/src/auto-reply/heartbeat-reply-payload.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/media-note.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/abort-cutoff.runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/abort.d.ts +0 -40
- package/dist/plugin-sdk/src/auto-reply/reply/abort.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/acp-projector.d.ts +0 -21
- package/dist/plugin-sdk/src/auto-reply/reply/acp-stream-settings.d.ts +0 -24
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-helpers.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-memory.d.ts +0 -42
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-payloads.d.ts +0 -29
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-reminder-guard.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-usage-line.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.d.ts +0 -39
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label-config.d.ts +0 -14
- package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/body.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/commands-handlers.runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-abort.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-store.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/commands-spawn.test-harness.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-agents.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-focus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-help.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-info.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-kill.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-list.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-log.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-send.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-spawn.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-unfocus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tasks.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tts.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/commands.test-harness.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp-delivery.d.ts +0 -35
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.d.ts +0 -34
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-from-config.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/reply/exec.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/followup-runner.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-from-config.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-inline-actions.d.ts +0 -62
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-run.d.ts +0 -69
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/history.d.ts +0 -72
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-meta.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/matrix-context.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/memory-flush.d.ts +0 -48
- package/dist/plugin-sdk/src/auto-reply/reply/message-preprocess-hooks.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/queue-policy.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/reply-payloads-dedupe.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/reply-reference.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/session-delivery.d.ts +0 -30
- package/dist/plugin-sdk/src/auto-reply/reply/session-fork.d.ts +0 -11
- package/dist/plugin-sdk/src/auto-reply/reply/session-fork.runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-prompt.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/session-run-accounting.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/session-updates.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-usage.d.ts +0 -25
- package/dist/plugin-sdk/src/auto-reply/reply/session.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/untrusted-context.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/send-policy.d.ts +0 -6
- package/dist/plugin-sdk/src/channel-web.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/draft-stream-controls.d.ts +0 -54
- package/dist/plugin-sdk/src/channels/draft-stream-loop.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/native-command-session-targets.d.ts +0 -12
- package/dist/plugin-sdk/src/channels/plugins/actions/reaction-message-id.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/actions/shared.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/bluebubbles-actions.d.ts +0 -48
- package/dist/plugin-sdk/src/channels/plugins/bundled.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/contracts/inbound-testkit.d.ts +0 -70
- package/dist/plugin-sdk/src/channels/plugins/contracts/suites.d.ts +0 -129
- package/dist/plugin-sdk/src/channels/plugins/pairing-adapters.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/plugins/setup-registry.d.ts +0 -3
- package/dist/plugin-sdk/src/channels/plugins/status-issues/bluebubbles.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/types.adapters.d.ts +0 -694
- package/dist/plugin-sdk/src/channels/plugins/types.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/whatsapp-shared.d.ts +0 -44
- package/dist/plugin-sdk/src/channels/registry.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/run-state-machine.d.ts +0 -19
- package/dist/plugin-sdk/src/channels/sender-identity.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/status-reactions.d.ts +0 -66
- package/dist/plugin-sdk/src/channels/transport/stall-watchdog.d.ts +0 -20
- package/dist/plugin-sdk/src/cli/cli-utils.d.ts +0 -19
- package/dist/plugin-sdk/src/cli/command-options.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/deps.d.ts +0 -10
- package/dist/plugin-sdk/src/cli/gateway-rpc.d.ts +0 -13
- package/dist/plugin-sdk/src/cli/help-format.d.ts +0 -5
- package/dist/plugin-sdk/src/cli/progress.d.ts +0 -24
- package/dist/plugin-sdk/src/cli/send-runtime/discord.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/imessage.d.ts +0 -12
- package/dist/plugin-sdk/src/cli/send-runtime/signal.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/slack.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/telegram.d.ts +0 -16
- package/dist/plugin-sdk/src/cli/send-runtime/whatsapp.d.ts +0 -4
- package/dist/plugin-sdk/src/cli/test-runtime-capture.d.ts +0 -31
- package/dist/plugin-sdk/src/commands/backup-shared.d.ts +0 -32
- package/dist/plugin-sdk/src/commands/channel-setup/registry.d.ts +0 -6
- package/dist/plugin-sdk/src/commands/channel-setup/types.d.ts +0 -1
- package/dist/plugin-sdk/src/commands/channel-test-helpers.d.ts +0 -7
- package/dist/plugin-sdk/src/commands/chutes-oauth.d.ts +0 -21
- package/dist/plugin-sdk/src/commands/cleanup-utils.d.ts +0 -36
- package/dist/plugin-sdk/src/commands/daemon-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/commands/health.d.ts +0 -63
- package/dist/plugin-sdk/src/commands/onboard-types.d.ts +0 -95
- package/dist/plugin-sdk/src/config/backup-rotation.d.ts +0 -58
- package/dist/plugin-sdk/src/config/config.d.ts +0 -8
- package/dist/plugin-sdk/src/config/env-preserve.d.ts +0 -10
- package/dist/plugin-sdk/src/config/includes.d.ts +0 -43
- package/dist/plugin-sdk/src/config/io.d.ts +0 -93
- package/dist/plugin-sdk/src/config/paths.d.ts +0 -58
- package/dist/plugin-sdk/src/config/types.agent-defaults.d.ts +0 -377
- package/dist/plugin-sdk/src/config/types.channel-messaging-common.d.ts +0 -53
- package/dist/plugin-sdk/src/config/types.d.ts +0 -34
- package/dist/plugin-sdk/src/config/types.googlechat.d.ts +0 -120
- package/dist/plugin-sdk/src/config/types.imessage.d.ts +0 -88
- package/dist/plugin-sdk/src/config/types.irc.d.ts +0 -61
- package/dist/plugin-sdk/src/config/types.msteams.d.ts +0 -132
- package/dist/plugin-sdk/src/config/types.signal.d.ts +0 -65
- package/dist/plugin-sdk/src/context-engine/registry.d.ts +0 -47
- package/dist/plugin-sdk/src/cron/delivery.d.ts +0 -33
- package/dist/plugin-sdk/src/cron/isolated-agent/delivery-target.d.ts +0 -27
- package/dist/plugin-sdk/src/cron/isolated-agent/session.d.ts +0 -15
- package/dist/plugin-sdk/src/cron/schedule.d.ts +0 -6
- package/dist/plugin-sdk/src/cron/service/initial-delivery.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/jobs.d.ts +0 -33
- package/dist/plugin-sdk/src/cron/service/locked.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/ops.d.ts +0 -84
- package/dist/plugin-sdk/src/cron/service/state.d.ts +0 -158
- package/dist/plugin-sdk/src/cron/service/store.d.ts +0 -11
- package/dist/plugin-sdk/src/cron/service/timeout-policy.d.ts +0 -13
- package/dist/plugin-sdk/src/cron/service/timer.d.ts +0 -46
- package/dist/plugin-sdk/src/cron/service.d.ts +0 -69
- package/dist/plugin-sdk/src/cron/session-reaper.d.ts +0 -35
- package/dist/plugin-sdk/src/gateway/auth-mode-policy.d.ts +0 -4
- package/dist/plugin-sdk/src/gateway/channel-status-patches.d.ts +0 -6
- package/dist/plugin-sdk/src/gateway/chat-abort.d.ts +0 -47
- package/dist/plugin-sdk/src/gateway/exec-approval-manager.d.ts +0 -47
- package/dist/plugin-sdk/src/gateway/node-command-policy.d.ts +0 -18
- package/dist/plugin-sdk/src/gateway/security-path.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-broadcast.d.ts +0 -17
- package/dist/plugin-sdk/src/gateway/server-channels.d.ts +0 -78
- package/dist/plugin-sdk/src/gateway/server-constants.d.ts +0 -9
- package/dist/plugin-sdk/src/gateway/server-methods/nodes.helpers.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-methods/types.d.ts +0 -108
- package/dist/plugin-sdk/src/gateway/server-shared.d.ts +0 -7
- package/dist/plugin-sdk/src/gateway/startup-auth.d.ts +0 -21
- package/dist/plugin-sdk/src/gateway/ws-log.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/ws-logging.d.ts +0 -4
- package/dist/plugin-sdk/src/generated/plugin-sdk-facade-type-map.generated.d.ts +0 -769
- package/dist/plugin-sdk/src/hooks/types.d.ts +0 -62
- package/dist/plugin-sdk/src/image-generation/provider-registry.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/backup-create.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/device-bootstrap.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/device-pairing.d.ts +0 -122
- package/dist/plugin-sdk/src/infra/dotenv.d.ts +0 -9
- package/dist/plugin-sdk/src/infra/gemini-auth.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/google-api-base-url.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/heartbeat-active-hours.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/heartbeat-events-filter.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/heartbeat-runner.d.ts +0 -35
- package/dist/plugin-sdk/src/infra/heartbeat-summary.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/http-body.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/matrix-legacy-crypto.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/matrix-legacy-state.d.ts +0 -30
- package/dist/plugin-sdk/src/infra/matrix-migration-config.d.ts +0 -48
- package/dist/plugin-sdk/src/infra/matrix-migration-snapshot.d.ts +0 -25
- package/dist/plugin-sdk/src/infra/matrix-plugin-helper.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/outbound/deliver.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue-recovery.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue-storage.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/outbound/sanitize-text.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/session-maintenance-warning.d.ts +0 -15
- package/dist/plugin-sdk/src/link-understanding/apply.d.ts +0 -10
- package/dist/plugin-sdk/src/link-understanding/apply.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/link-understanding/defaults.d.ts +0 -2
- package/dist/plugin-sdk/src/link-understanding/detect.d.ts +0 -3
- package/dist/plugin-sdk/src/link-understanding/format.d.ts +0 -4
- package/dist/plugin-sdk/src/link-understanding/runner.d.ts +0 -11
- package/dist/plugin-sdk/src/media/file-context.d.ts +0 -7
- package/dist/plugin-sdk/src/media/input-files.d.ts +0 -99
- package/dist/plugin-sdk/src/media-understanding/apply.d.ts +0 -19
- package/dist/plugin-sdk/src/media-understanding/apply.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/audio.test-helpers.d.ts +0 -27
- package/dist/plugin-sdk/src/media-understanding/concurrency.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/echo-transcript.d.ts +0 -13
- package/dist/plugin-sdk/src/media-understanding/format.d.ts +0 -7
- package/dist/plugin-sdk/src/media-understanding/runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/transcribe-audio.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/account-core.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/account-resolution.d.ts +0 -24
- package/dist/plugin-sdk/src/plugin-sdk/acp-runtime.d.ts +0 -16
- package/dist/plugin-sdk/src/plugin-sdk/acpx.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/agent-config-primitives.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/allowlist-config-edit.d.ts +0 -99
- package/dist/plugin-sdk/src/plugin-sdk/amazon-bedrock.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/api-baseline.d.ts +0 -43
- package/dist/plugin-sdk/src/plugin-sdk/bluebubbles-policy.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/bluebubbles.d.ts +0 -62
- package/dist/plugin-sdk/src/plugin-sdk/browser-support.d.ts +0 -54
- package/dist/plugin-sdk/src/plugin-sdk/browser.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/byteplus.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/channel-actions.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-primitives.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-schema.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-writes.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/channel-feedback.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/channel-lifecycle.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/channel-pairing.d.ts +0 -24
- package/dist/plugin-sdk/src/plugin-sdk/channel-plugin-common.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/channel-setup.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/chutes.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/cli-backend.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/cloudflare-ai-gateway.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/collection-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/command-auth-native.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/command-auth.d.ts +0 -65
- package/dist/plugin-sdk/src/plugin-sdk/command-detection.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/command-surface.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/compat.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/config-paths.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/copilot-proxy.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/dangerous-name-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/deepseek.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/device-bootstrap.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/diagnostics-otel.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/diffs.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/discord-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/discord-runtime-surface.d.ts +0 -61
- package/dist/plugin-sdk/src/plugin-sdk/discord-send.d.ts +0 -36
- package/dist/plugin-sdk/src/plugin-sdk/entrypoints.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/extension-shared.d.ts +0 -67
- package/dist/plugin-sdk/src/plugin-sdk/feishu-conversation.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/feishu-setup.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/feishu.d.ts +0 -45
- package/dist/plugin-sdk/src/plugin-sdk/fetch-auth.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/gateway-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/github-copilot-login.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/github-copilot-token.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/global-singleton.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/google.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/googlechat.d.ts +0 -49
- package/dist/plugin-sdk/src/plugin-sdk/hook-runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/host-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/huggingface.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/image-generation-core.d.ts +0 -15
- package/dist/plugin-sdk/src/plugin-sdk/image-generation.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/index.d.ts +0 -28
- package/dist/plugin-sdk/src/plugin-sdk/infra-runtime.d.ts +0 -47
- package/dist/plugin-sdk/src/plugin-sdk/irc-surface.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/irc.d.ts +0 -38
- package/dist/plugin-sdk/src/plugin-sdk/kilocode.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/kimi-coding.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/lazy-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/line-core.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/line-runtime.d.ts +0 -75
- package/dist/plugin-sdk/src/plugin-sdk/litellm.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/llm-task.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/lobster.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/logging-core.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/markdown-table-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/matrix-helper.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-heavy.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-shared.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-surface.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix-surface.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/matrix-thread-bindings.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix.d.ts +0 -72
- package/dist/plugin-sdk/src/plugin-sdk/mattermost-policy.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/mattermost.d.ts +0 -50
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-engine-runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-embeddings.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-foundation.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-qmd.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-cli.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-core.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-files.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-secret.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-status.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/memory-lancedb.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/minimax.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/mistral.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/models-provider-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/modelstudio-definitions.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/modelstudio.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/moonshot.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/msteams.d.ts +0 -60
- package/dist/plugin-sdk/src/plugin-sdk/native-command-registry.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/nextcloud-talk.d.ts +0 -45
- package/dist/plugin-sdk/src/plugin-sdk/nostr.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/nvidia.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/ollama-surface.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/open-prose.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/openai.d.ts +0 -15
- package/dist/plugin-sdk/src/plugin-sdk/opencode-go.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/opencode.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/openrouter.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/optional-channel-setup.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/pairing-access.d.ts +0 -19
- package/dist/plugin-sdk/src/plugin-sdk/param-readers.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/persistent-dedupe.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/phone-control.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/plugin-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/process-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-api-key.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.d.ts +0 -27
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/provider-catalog-shared.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/provider-entry.d.ts +0 -38
- package/dist/plugin-sdk/src/plugin-sdk/provider-env-vars.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-moonshot.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-onboard.d.ts +0 -85
- package/dist/plugin-sdk/src/plugin-sdk/provider-reasoning.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/provider-setup.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/provider-stream.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/provider-usage.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/provider-web-fetch.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/provider-zai-endpoint.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/qianfan.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/reply-chunking.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/reply-dispatch-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/reply-history.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/reply-runtime.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/request-url.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/resolution-notes.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/run-command.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/runtime-config-snapshot.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/runtime-group-policy.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/runtime-store.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/runtime.d.ts +0 -39
- package/dist/plugin-sdk/src/plugin-sdk/sandbox.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/secret-input-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/security-runtime.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/self-hosted-provider-setup.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/session-store-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/setup-adapter-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/setup-runtime.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/setup-tools.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/setup.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/sglang.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/signal-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/signal-core.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/skill-commands-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/slack-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/slack-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/speech-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/speech.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/string-normalization-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/synthetic.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/talk-voice.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/telegram-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/telegram-allow-from.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/telegram-command-config.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/telegram-surface.d.ts +0 -44
- package/dist/plugin-sdk/src/plugin-sdk/test-utils.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/testing.d.ts +0 -53
- package/dist/plugin-sdk/src/plugin-sdk/text-chunking.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/thread-bindings-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/thread-ownership.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/tlon.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/together.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/tool-send.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/twitch.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/venice.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/vercel-ai-gateway.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/vllm.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/voice-call.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/volcengine.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/webhook-ingress.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/webhook-memory-guards.d.ts +0 -52
- package/dist/plugin-sdk/src/plugin-sdk/webhook-path.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/webhook-request-guards.d.ts +0 -89
- package/dist/plugin-sdk/src/plugin-sdk/webhook-targets.d.ts +0 -97
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-action-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-core.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-login-qr.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-shared.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-surface.d.ts +0 -19
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp.d.ts +0 -32
- package/dist/plugin-sdk/src/plugin-sdk/xai.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/xiaomi.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/zai.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/zalo-setup.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/zalo.d.ts +0 -47
- package/dist/plugin-sdk/src/plugin-sdk/zalouser.d.ts +0 -39
- package/dist/plugin-sdk/src/plugin-sdk/zod.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/bundled-compat.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/http-path.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/http-registry.d.ts +0 -16
- package/dist/plugin-sdk/src/plugins/http-route-overlap.d.ts +0 -11
- package/dist/plugin-sdk/src/plugins/interactive-dispatch-adapters.d.ts +0 -44
- package/dist/plugin-sdk/src/plugins/interactive.d.ts +0 -60
- package/dist/plugin-sdk/src/plugins/lazy-service-module.d.ts +0 -13
- package/dist/plugin-sdk/src/plugins/loader.d.ts +0 -74
- package/dist/plugin-sdk/src/plugins/plugin-error-handler.d.ts +0 -130
- package/dist/plugin-sdk/src/plugins/provider-auth-choice.runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/provider-catalog.d.ts +0 -24
- package/dist/plugin-sdk/src/plugins/provider-model-allowlist.d.ts +0 -6
- package/dist/plugin-sdk/src/plugins/provider-model-defaults.d.ts +0 -26
- package/dist/plugin-sdk/src/plugins/provider-oauth-flow.d.ts +0 -20
- package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth-tls.d.ts +0 -22
- package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/provider-runtime.d.ts +0 -271
- package/dist/plugin-sdk/src/plugins/provider-runtime.runtime.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/provider-self-hosted-setup.d.ts +0 -60
- package/dist/plugin-sdk/src/plugins/provider-validation.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/provider-wizard.d.ts +0 -45
- package/dist/plugin-sdk/src/plugins/provider-zai-endpoint.d.ts +0 -16
- package/dist/plugin-sdk/src/plugins/providers.d.ts +0 -39
- package/dist/plugin-sdk/src/plugins/registry-empty.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/registry.d.ts +0 -217
- package/dist/plugin-sdk/src/plugins/runtime/gateway-request-scope.d.ts +0 -19
- package/dist/plugin-sdk/src/plugins/runtime/index.d.ts +0 -19
- package/dist/plugin-sdk/src/plugins/runtime/native-deps.d.ts +0 -8
- package/dist/plugin-sdk/src/plugins/runtime/runtime-channel.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-config.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-events.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-logging.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-media-understanding.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/runtime/runtime-media.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-slack-ops.runtime.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/runtime/runtime-slack.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-system.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-tts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/runtime/runtime-whatsapp-boundary.d.ts +0 -35
- package/dist/plugin-sdk/src/plugins/runtime/types-channel.d.ts +0 -200
- package/dist/plugin-sdk/src/plugins/runtime/types-core.d.ts +0 -123
- package/dist/plugin-sdk/src/plugins/runtime/types.d.ts +0 -51
- package/dist/plugin-sdk/src/plugins/runtime.d.ts +0 -39
- package/dist/plugin-sdk/src/plugins/slots.d.ts +0 -36
- package/dist/plugin-sdk/src/plugins/types.d.ts +0 -2287
- package/dist/plugin-sdk/src/security/channel-metadata.d.ts +0 -6
- package/dist/plugin-sdk/src/security/context-visibility.d.ts +0 -26
- package/dist/plugin-sdk/src/shared/device-bootstrap-profile.d.ts +0 -10
- package/dist/plugin-sdk/src/terminal/health-style.d.ts +0 -1
- package/dist/plugin-sdk/src/terminal/note.d.ts +0 -5
- package/dist/plugin-sdk/src/test-helpers/http.d.ts +0 -3
- package/dist/plugin-sdk/src/test-helpers/ssrf.d.ts +0 -2
- package/dist/plugin-sdk/src/test-helpers/state-dir-env.d.ts +0 -9
- package/dist/plugin-sdk/src/test-helpers/whatsapp-outbound.d.ts +0 -22
- package/dist/plugin-sdk/src/test-utils/bundled-plugin-public-surface.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/channel-plugins.d.ts +0 -40
- package/dist/plugin-sdk/src/test-utils/env.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/fetch-mock.d.ts +0 -13
- package/dist/plugin-sdk/src/test-utils/session-state-cleanup.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/vitest-mock-fn.d.ts +0 -1
- package/dist/plugin-sdk/src/tts/directives.d.ts +0 -10
- package/dist/plugin-sdk/src/tts/provider-error-utils.d.ts +0 -4
- package/dist/plugin-sdk/src/tts/provider-registry.d.ts +0 -7
- package/dist/plugin-sdk/src/tts/provider-types.d.ts +0 -100
- package/dist/plugin-sdk/src/tts/tts-core.d.ts +0 -32
- package/dist/plugin-sdk/src/tts/tts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/message-channel.d.ts +0 -29
- package/dist/plugin-sdk/src/utils.d.ts +0 -58
- package/dist/plugin-sdk/src/wizard/session.d.ts +0 -42
- package/dist/plugin-sdk/ssrf-runtime.d.ts +0 -1
- package/dist/plugin-sdk/state-paths.d.ts +0 -1
- package/dist/plugin-sdk/status-helpers.d.ts +0 -1
- package/dist/plugin-sdk/string-normalization-runtime.d.ts +0 -1
- package/dist/plugin-sdk/synthetic.d.ts +0 -1
- package/dist/plugin-sdk/telegram-account.d.ts +0 -1
- package/dist/plugin-sdk/telegram-allow-from.d.ts +0 -1
- package/dist/plugin-sdk/telegram-command-config.d.ts +0 -1
- package/dist/plugin-sdk/telegram-core.d.ts +0 -1
- package/dist/plugin-sdk/telegram-surface.d.ts +0 -1
- package/dist/plugin-sdk/temp-path.d.ts +0 -1
- package/dist/plugin-sdk/testing.d.ts +0 -1
- package/dist/plugin-sdk/text-runtime.d.ts +0 -1
- package/dist/plugin-sdk/thread-bindings-runtime.d.ts +0 -1
- package/dist/plugin-sdk/thread-ownership.d.ts +0 -1
- package/dist/plugin-sdk/tlon.d.ts +0 -1
- package/dist/plugin-sdk/together.d.ts +0 -1
- package/dist/plugin-sdk/tool-send.d.ts +0 -1
- package/dist/plugin-sdk/twitch.d.ts +0 -1
- package/dist/plugin-sdk/venice.d.ts +0 -1
- package/dist/plugin-sdk/vllm.d.ts +0 -1
- package/dist/plugin-sdk/voice-call.d.ts +0 -1
- package/dist/plugin-sdk/volcengine.d.ts +0 -1
- package/dist/plugin-sdk/web-media.d.ts +0 -1
- package/dist/plugin-sdk/webhook-ingress.d.ts +0 -1
- package/dist/plugin-sdk/webhook-path.d.ts +0 -1
- package/dist/plugin-sdk/webhook-request-guards.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-auth-presence.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-core.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-shared.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-surface.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-targets.d.ts +0 -1
- package/dist/plugin-sdk/windows-spawn.d.ts +0 -1
- package/dist/plugin-sdk/xai.d.ts +0 -1
- package/dist/plugin-sdk/zalo-setup.d.ts +0 -1
- package/dist/plugin-sdk/zalo.d.ts +0 -1
- package/dist/plugin-sdk/zalouser.d.ts +0 -1
- package/dist/plugin-sdk/zod.d.ts +0 -1
- package/dist/plugins-cli-BuRzZElZ.js +0 -561
- package/dist/plugins-command-helpers-2uhVdnBb.js +0 -116
- package/dist/plugins-install-persist-BVZkrB2-.js +0 -121
- package/dist/plugins-update-command-CWl-U7Wy.js +0 -974
- package/dist/policy-CBLebx7K.js +0 -147
- package/dist/preflight-audio-RQNk7yfw.js +0 -48
- package/dist/preflight-audio.runtime-BKLaDdXh.js +0 -7
- package/dist/prepare-BdWIhg02.js +0 -1301
- package/dist/probe-7PmWRQdg.js +0 -1868
- package/dist/probe-DBGVRz02.js +0 -170
- package/dist/probe-DtN67E1D.js +0 -349
- package/dist/probe-F0974SeN.js +0 -431
- package/dist/profile-update-B98rJ-pB.js +0 -67
- package/dist/program-CCSYcbNv.js +0 -158
- package/dist/prompt-select-styled-QezSJIFt.js +0 -6434
- package/dist/provider-CvWQLyt5.js +0 -18901
- package/dist/provider-Cvp1QQuM.js +0 -70
- package/dist/provider-IEIXFsBr.js +0 -3685
- package/dist/provider-api-key-auth-BjgG22Cp.js +0 -109
- package/dist/provider-auth-Dlfypk2e.js +0 -43
- package/dist/provider-auth-api-key-DPeAD4Wh.js +0 -5
- package/dist/provider-auth-login-eRYV4NRi.js +0 -8
- package/dist/provider-dispatcher-D2OJ5CNa.js +0 -22
- package/dist/provider-entry-D8rVAPy0.js +0 -86
- package/dist/provider-session.runtime-GQeUwL4B.js +0 -7
- package/dist/provider.runtime-BokN-cp6.js +0 -2
- package/dist/qr-image-CNXmqHBd.js +0 -2
- package/dist/queue-eLL6EbrW.js +0 -663
- package/dist/reaction-runtime-api-DwLFcfeo.js +0 -114
- package/dist/reactions-K9RuCuhE.js +0 -258
- package/dist/read-only-account-inspect.telegram-BoATG5TP.js +0 -202
- package/dist/register.agent-DdFsdgdX.js +0 -240
- package/dist/register.configure-BTVikzNj.js +0 -15
- package/dist/register.maintenance-CDt8_LBs.js +0 -449
- package/dist/register.message-C_Wf261e.js +0 -644
- package/dist/register.onboard-FL6Mny10.js +0 -79
- package/dist/register.setup-BeW8HY0P.js +0 -183
- package/dist/register.status-health-sessions-Bl0-x2Ok.js +0 -1206
- package/dist/register.subclis-DUBZB3bR.js +0 -295
- package/dist/register.subclis-Db9Qegv7.js +0 -3
- package/dist/replies-CWZyv0g5.js +0 -118
- package/dist/reply-DMsC03Iw.js +0 -3192
- package/dist/reply-blocks-DuXsQojy.js +0 -103
- package/dist/reply-dispatch-runtime-D_8J_oEP.js +0 -3
- package/dist/reply-runtime-TZcIYAGQ.js +0 -123
- package/dist/reply.runtime-Bht7FBbJ.js +0 -2
- package/dist/resolve-allowlist-Bnvzjka0.js +0 -147
- package/dist/resolve-targets-D3K5Z5gf.js +0 -280
- package/dist/rooms-mp7F7lsA.js +0 -325
- package/dist/route-reply-DKoNoGml.js +0 -133
- package/dist/route-reply.runtime-ByCsyDjS.js +0 -2
- package/dist/route-resolution-CshIQw9s.js +0 -461
- package/dist/rpc-context-DQ0FBc41.js +0 -155
- package/dist/run-main-BzIbww9g.js +0 -425
- package/dist/runner-IAThb076.js +0 -1479
- package/dist/runtime-C4nQKohR.js +0 -68
- package/dist/runtime-DpQadrfd.js +0 -1175
- package/dist/runtime-api-B-n73E_A.js +0 -2
- package/dist/runtime-api-B0TzzMRA.js +0 -2
- package/dist/runtime-api-B2g4aFI0.js +0 -2
- package/dist/runtime-api-Bjn-vYvi.js +0 -3676
- package/dist/runtime-api-Ckw6TKHu.js +0 -2
- package/dist/runtime-api-CqpkXWTZ.js +0 -14
- package/dist/runtime-api-DLcWBYBn.js +0 -2
- package/dist/runtime-api-DTkksxUA.js +0 -2
- package/dist/runtime-api-Dqjul0s_.js +0 -3
- package/dist/runtime-api-Dt4a5hxH.js +0 -81
- package/dist/runtime-api-exjXBw5x.js +0 -2
- package/dist/runtime-api-iiaetepr.js +0 -29
- package/dist/runtime-api-uq8PFObQ.js +0 -2
- package/dist/runtime-embedded-pi.runtime-C_VTO5Hb.js +0 -2
- package/dist/sandbox-cli-DCBzqdRP.js +0 -443
- package/dist/sdk-xNF3YVy5.js +0 -1108
- package/dist/security-cli-BRQ9l5SH.js +0 -477
- package/dist/send-BR9WsDjK.js +0 -532
- package/dist/send-BYZ6LXaA.js +0 -856
- package/dist/send-C9XFbxrx.js +0 -2
- package/dist/send-CP6xLBgu.js +0 -100
- package/dist/send-CevSHBU3.js +0 -442
- package/dist/send-CiU0wWHJ.js +0 -178
- package/dist/send-CzZHXvb0.js +0 -318
- package/dist/send-D8Q38WQW.js +0 -1076
- package/dist/send-DSrMDTx6.js +0 -3
- package/dist/send.components-CSiMYa_k.js +0 -2
- package/dist/send.components-DuCC5xXW.js +0 -942
- package/dist/server-cron-CnWsiroT.js +0 -2
- package/dist/server-cron-pXTPca6M.js +0 -4173
- package/dist/server-hfFKzOMa.js +0 -10120
- package/dist/server-lite-CpD0TAwt.js +0 -831
- package/dist/server-maintenance-CSzGshfI.js +0 -542
- package/dist/server-maintenance-m-ekNAYN.js +0 -2
- package/dist/server-node-events-o25FUhFi.js +0 -454
- package/dist/server-node-subscriptions-D1cnZtZz.js +0 -2
- package/dist/server-plugins-BYGRllKK.js +0 -10423
- package/dist/server-plugins-D-GLUOyL.js +0 -2
- package/dist/server-startup-memory-CwdtRW65.js +0 -2
- package/dist/server-tailscale-BurW9eR4.js +0 -2
- package/dist/services-B4WpjjQk.js +0 -2
- package/dist/session-BZC_ExXj.js +0 -50
- package/dist/session-archive.runtime-CpJ_-vMn.js +0 -2
- package/dist/session-envelope-D53bqIsw.js +0 -18
- package/dist/session-file-L8H_0oIY.js +0 -120
- package/dist/session-key-DlGku_2P.js +0 -52
- package/dist/session-override-BwLTMvlR.js +0 -100
- package/dist/session-reset-model.runtime-B-f6UyAY.js +0 -119
- package/dist/session-route-CWWuYCWY.js +0 -91
- package/dist/session-store-runtime-DbJ_acdU.js +0 -2
- package/dist/session-subagent-reactivation.runtime-DQP-UkdA.js +0 -2
- package/dist/session-transcript-files.fs-BRLPQRBN.js +0 -149
- package/dist/session-updates-BiofcJQ9.js +0 -222
- package/dist/session-updates.runtime-B5YxiezL.js +0 -2
- package/dist/session-utils-BsLMe4R0.js +0 -1743
- package/dist/sessions-BGky6-U4.js +0 -224
- package/dist/sessions-CizZS4Rb.js +0 -2
- package/dist/sessions-CnolLDg0.js +0 -443
- package/dist/setup-BPkdGC8C.js +0 -427
- package/dist/setup-api-Bd-qaaRg.js +0 -2
- package/dist/setup-bootstrap-BUPymwJl.js +0 -54
- package/dist/setup-core-CE5GuYaV.js +0 -256
- package/dist/setup-core-tvt7DN1q.js +0 -146
- package/dist/setup-surface-BbOvAxU6.js +0 -484
- package/dist/setup-surface-BlIvCltJ.js +0 -450
- package/dist/setup-surface-BoJI-ftG.js +0 -237
- package/dist/setup-surface-C6yPqLIS.js +0 -261
- package/dist/setup-surface-CNFczxjl.js +0 -656
- package/dist/setup-surface-D5hZFXlx.js +0 -8848
- package/dist/setup-surface-DMOex3oo.js +0 -346
- package/dist/setup-surface-DRmn71vw.js +0 -333
- package/dist/setup-surface-DUodX6wM.js +0 -353
- package/dist/setup-surface-DVnka34A.js +0 -272
- package/dist/setup-surface-DrFSCD5A.js +0 -304
- package/dist/setup-surface-WtMan1x2.js +0 -261
- package/dist/setup.finalize-BcpxSMo5.js +0 -458
- package/dist/setup.gateway-config-BHvGYGOD.js +0 -247
- package/dist/shared-1r1qYN6z.js +0 -198
- package/dist/shared-BXz6HKLm.js +0 -180
- package/dist/shared-Bg7yDHOE.js +0 -94
- package/dist/shared-DBX8qPP6.js +0 -144
- package/dist/shared-DHFHItFt.js +0 -160
- package/dist/shared-DJV3Mmv8.js +0 -72
- package/dist/shared-ZeWcr3rG.js +0 -2
- package/dist/shared-nCJ3kgXi.js +0 -78
- package/dist/shared-rKEs-OIg.js +0 -64
- package/dist/shared-runtime-CTD5ywGR.js +0 -7
- package/dist/skills-install-CoUJk9aZ.js +0 -819
- package/dist/slash-commands-CKUKTwMa.js +0 -672
- package/dist/slash-commands.runtime-BrfELsEA.js +0 -20
- package/dist/slash-dispatch.runtime-CfjHhQmx.js +0 -38
- package/dist/slash-skill-commands.runtime-Bxm-652_.js +0 -8
- package/dist/speech-provider-BjDZhOzO.js +0 -190
- package/dist/src-BscJ0OyQ.js +0 -2739
- package/dist/startup-verification-Bwer6SPQ.js +0 -131
- package/dist/state-migrations-Dh5gaxn0.js +0 -845
- package/dist/status-CxiD9-L2.js +0 -2
- package/dist/status-all-CteZuvg_.js +0 -798
- package/dist/status-hLuTMJgT.js +0 -650
- package/dist/status-issues-CZdlgUVQ.js +0 -187
- package/dist/status-issues-Dx4xsUU6.js +0 -336
- package/dist/status-json-CU_sqXwN.js +0 -86
- package/dist/status-l8LyDb-X.js +0 -608
- package/dist/status-mpmZALQx.js +0 -3
- package/dist/status.command.text-runtime-Ck9abrv4.js +0 -18
- package/dist/status.scan-N2AgYo5y.js +0 -264
- package/dist/status.scan.fast-json-B8TmllqQ.js +0 -97
- package/dist/status.scan.fast-json-CiJfPteF.js +0 -2
- package/dist/status.scan.json-core-Bqw5Ethf.js +0 -254
- package/dist/status.summary-CN0kS8iw.js +0 -2
- package/dist/status.summary-joaOukPU.js +0 -210
- package/dist/sticker-cache-DXLBnGCi.js +0 -1573
- package/dist/sticker-vision.runtime-DP1NsaCZ.js +0 -16
- package/dist/storage-BRnLX4P7.js +0 -234
- package/dist/store-BvP1FWCI.js +0 -1343
- package/dist/store.runtime-NoYeZeac.js +0 -2
- package/dist/stream-BJ4HYVwA.js +0 -633
- package/dist/subagent-orphan-recovery-hTBxfwY4.js +0 -206
- package/dist/subagent-registry-runtime-3PIBzuDd.js +0 -2
- package/dist/targets-BAsektUE.js +0 -748
- package/dist/task-registry-delivery-runtime-CkJ71rwb.js +0 -2
- package/dist/task-registry.audit-gdULOiFp.js +0 -320
- package/dist/task-registry.maintenance-DhI_cx5O.js +0 -2
- package/dist/test-api-B4g2UUbw.js +0 -47
- package/dist/testing-DFnq00vr.js +0 -677
- package/dist/thread-bindings-CEuvQ0a5.js +0 -219
- package/dist/thread-bindings-CzFRpuy7.js +0 -534
- package/dist/thread-bindings-D-QA8SBh.js +0 -352
- package/dist/thread-bindings-EP9pAodb.js +0 -778
- package/dist/thread-bindings.discord-api-DKSgmJf_.js +0 -487
- package/dist/threading-CLq9AwSD.js +0 -832
- package/dist/threading-CQM3vrch.js +0 -2
- package/dist/threading-tool-context-DN0TQ-o6.js +0 -157
- package/dist/token-Bs7YIYbI.js +0 -82
- package/dist/tool-actions.runtime-mxezUV4D.js +0 -532
- package/dist/tools-effective-inventory-Dz6tWQxy.js +0 -148
- package/dist/ui-Cmeq4ZXg.js +0 -212
- package/dist/update-CADy3L5e.js +0 -1253
- package/dist/update-cli-B61EQsEl.js +0 -1447
- package/dist/update-runner--BEMGokU.js +0 -1195
- package/dist/verification-C5PYFyB0.js +0 -130
- package/dist/verification-CzP234iv.js +0 -2
- package/dist/x-search-ToCIaz7t.js +0 -166
- package/dist/zalo-BCF4thCG.js +0 -13
- package/dist/zalo-js-C4A7Gxjy.js +0 -1156
- package/dist/zalouser-CO0W9KZf.js +0 -22
- /package/dist/{apply.runtime-DBsSkbq5.js → apply.runtime-eSa-O_F2.js} +0 -0
- /package/dist/{audit-channel.allow-from.runtime-BE3PpHCg.js → audit-channel.allow-from.runtime-DNte8cmH.js} +0 -0
- /package/dist/{audit-channel.discord.runtime-CKQwUTue.js → audit-channel.discord.runtime-BWLuLCE0.js} +0 -0
- /package/dist/{audit-channel.zalouser.runtime-DvOclP53.js → audit-channel.zalouser.runtime-D_nIX7hv.js} +0 -0
- /package/dist/{gaxios-fetch-compat-DSrL7y2X.js → gaxios-fetch-compat-Dsb6Dess.js} +0 -0
- /package/dist/{gmail-watcher-lifecycle-CnbN1EfN.js → gmail-watcher-lifecycle-D6jhzjD2.js} +0 -0
- /package/dist/{hooks-policy-BjyPwwpQ.js → hooks-policy-BS7eSxPm.js} +0 -0
- /package/dist/{install-target-BXHZSfie.js → install-target-DunBxcXd.js} +0 -0
- /package/dist/{loader-_QerU742.js → loader-DrwewZGF.js} +0 -0
- /package/dist/{plugin-error-boundary-Ze95TniC.js → plugin-error-boundary-BkeWnWCG.js} +0 -0
- /package/dist/{plugin-health-checker-BdL9iBvs.js → plugin-health-checker--ObpW5TZ.js} +0 -0
- /package/dist/{plugin-hot-reload-t-fD3k4-.js → plugin-hot-reload-uBgB89Et.js} +0 -0
- /package/dist/{provider-api-key-auth.runtime-PWOshlD_.js → provider-api-key-auth.runtime-s-qWJDKg.js} +0 -0
- /package/dist/{provider-auth-login.runtime-B8ZroIz0.js → provider-auth-login.runtime-BJ3_RYVu.js} +0 -0
- /package/dist/{provider-discovery.runtime-C9i7ZYfW.js → provider-discovery.runtime-hzNrePTv.js} +0 -0
- /package/dist/{runtime-discord-ops.runtime-DD-5fh_t.js → runtime-discord-ops.runtime-DXnkkrxh.js} +0 -0
- /package/dist/{runtime-media-understanding.runtime-BnpKjL7w.js → runtime-media-understanding.runtime-CqkE-xQD.js} +0 -0
- /package/dist/{runtime-model-auth.runtime-BJVutp59.js → runtime-model-auth.runtime-Eceghr0K.js} +0 -0
- /package/dist/{runtime-slack-ops.runtime-BHlRr1Yr.js → runtime-slack-ops.runtime-BiNFnBIK.js} +0 -0
- /package/dist/{runtime-tts.runtime-CraALy-I.js → runtime-tts.runtime-DucSlAZ7.js} +0 -0
- /package/dist/{server-constants-DYaJmd0J.js → server-constants-DygisMJm.js} +0 -0
- /package/dist/{server-node-subscriptions-B0IJt_Ut.js → server-node-subscriptions-k9pzvFjc.js} +0 -0
- /package/dist/{server-startup-memory-DVUV59tb.js → server-startup-memory-BF7b6hV-.js} +0 -0
- /package/dist/{server-tailscale-YNZLPwK0.js → server-tailscale-C4_57iBM.js} +0 -0
- /package/dist/{services-D-LPmYY2.js → services-DGh2Nlk1.js} +0 -0
- /package/dist/{skill-scanner-CiGO-i2b.js → skill-scanner-CQOOKx41.js} +0 -0
- /package/dist/{ssh-config-BeNW3BFI.js → ssh-config-C0OJnSro.js} +0 -0
- /package/dist/{supervisor-log.runtime-C5wGw6pn.js → supervisor-log.runtime-C7jNH-kn.js} +0 -0
- /package/dist/{system-presence-Dllq5OiL.js → system-presence-Ctj0G23x.js} +0 -0
- /package/dist/{tts.runtime-DmgJozN5.js → tts.runtime-BmZyMwz6.js} +0 -0
|
@@ -0,0 +1,2575 @@
|
|
|
1
|
+
import { C as textToSpeech } from "./speech-runtime-B7Gb4Hk4.js";
|
|
2
|
+
import { $ as getQQBotMediaDir, A as getAccessToken, B as sendChannelMessage, C as formatDuration, D as textToSilk, E as resolveTTSConfig, F as sendC2CImageMessage, G as sendGroupVideoMessage, H as sendGroupFileMessage, I as sendC2CInputNotify, K as sendGroupVoiceMessage, L as sendC2CMessage, M as initApiConfig, N as onMessageSent, O as PLUGIN_USER_AGENT, P as sendC2CFileMessage, Q as getQQBotDataDir, R as sendC2CVideoMessage, S as convertSilkToWav, T as isVoiceAttachment, U as sendGroupImageMessage, V as sendDmMessage, W as sendGroupMessage, X as stopBackgroundTokenRefresh, Y as startBackgroundTokenRefresh, _ as normalizeMediaTags, at as sanitizeFileName, b as formatFileSize, c as sendPhoto, d as sendVideoMsg, et as isLocalPath, f as sendVoice, g as parseQQBotPayload, h as isMediaPayload, it as runDiagnostics, j as getGatewayUrl, k as clearTokenCache, m as isCronReminderPayload, nt as normalizePath, o as sendDocument, ot as debugError, p as encodePayloadForCron, rt as resolveQQBotPayloadLocalFilePath, s as sendMedia, st as debugLog, v as MAX_UPLOAD_SIZE, w as isGlobalTTSAvailable, x as audioFileToSilkBase64, y as downloadFile, z as sendC2CVoiceMessage } from "./outbound-ww7VSFCp.js";
|
|
3
|
+
import { t as getQQBotRuntime } from "./runtime-DWJ5M8Gc.js";
|
|
4
|
+
import { a as chunkText, i as TEXT_CHUNK_LIMIT, n as matchSlashCommand, r as qqbotPlugin } from "./slash-commands-DG50c1a2.js";
|
|
5
|
+
import { a as recordKnownUser, n as flushKnownUsers } from "./known-users-CQIjeohD.js";
|
|
6
|
+
import * as fs from "node:fs";
|
|
7
|
+
import fsSync from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import crypto from "node:crypto";
|
|
10
|
+
import WebSocket$1 from "ws";
|
|
11
|
+
import { Buffer as Buffer$1 } from "buffer";
|
|
12
|
+
//#region extensions/qqbot/src/stt.ts
|
|
13
|
+
/**
|
|
14
|
+
* OpenAI-compatible STT used at the plugin layer.
|
|
15
|
+
*
|
|
16
|
+
* This avoids pushing raw WAV PCM into the framework media-understanding pipeline.
|
|
17
|
+
*/
|
|
18
|
+
function resolveSTTConfig(cfg) {
|
|
19
|
+
const c = cfg;
|
|
20
|
+
const channelStt = c?.channels?.qqbot?.stt;
|
|
21
|
+
if (channelStt && channelStt.enabled !== false) {
|
|
22
|
+
const providerId = channelStt?.provider || "openai";
|
|
23
|
+
const providerCfg = c?.models?.providers?.[providerId];
|
|
24
|
+
const baseUrl = channelStt?.baseUrl || providerCfg?.baseUrl;
|
|
25
|
+
const apiKey = channelStt?.apiKey || providerCfg?.apiKey;
|
|
26
|
+
const model = channelStt?.model || "whisper-1";
|
|
27
|
+
if (baseUrl && apiKey) return {
|
|
28
|
+
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
29
|
+
apiKey,
|
|
30
|
+
model
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const audioModelEntry = c?.tools?.media?.audio?.models?.[0];
|
|
34
|
+
if (audioModelEntry) {
|
|
35
|
+
const providerId = audioModelEntry?.provider || "openai";
|
|
36
|
+
const providerCfg = c?.models?.providers?.[providerId];
|
|
37
|
+
const baseUrl = audioModelEntry?.baseUrl || providerCfg?.baseUrl;
|
|
38
|
+
const apiKey = audioModelEntry?.apiKey || providerCfg?.apiKey;
|
|
39
|
+
const model = audioModelEntry?.model || "whisper-1";
|
|
40
|
+
if (baseUrl && apiKey) return {
|
|
41
|
+
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
42
|
+
apiKey,
|
|
43
|
+
model
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
async function transcribeAudio(audioPath, cfg) {
|
|
49
|
+
const sttCfg = resolveSTTConfig(cfg);
|
|
50
|
+
if (!sttCfg) return null;
|
|
51
|
+
const fileBuffer = fs.readFileSync(audioPath);
|
|
52
|
+
const fileName = sanitizeFileName(path.basename(audioPath));
|
|
53
|
+
const mime = fileName.endsWith(".wav") ? "audio/wav" : fileName.endsWith(".mp3") ? "audio/mpeg" : fileName.endsWith(".ogg") ? "audio/ogg" : "application/octet-stream";
|
|
54
|
+
const form = new FormData();
|
|
55
|
+
form.append("file", new Blob([fileBuffer], { type: mime }), fileName);
|
|
56
|
+
form.append("model", sttCfg.model);
|
|
57
|
+
const resp = await fetch(`${sttCfg.baseUrl}/audio/transcriptions`, {
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: { Authorization: `Bearer ${sttCfg.apiKey}` },
|
|
60
|
+
body: form
|
|
61
|
+
});
|
|
62
|
+
if (!resp.ok) {
|
|
63
|
+
const detail = await resp.text().catch(() => "");
|
|
64
|
+
throw new Error(`STT failed (HTTP ${resp.status}): ${detail.slice(0, 300)}`);
|
|
65
|
+
}
|
|
66
|
+
return (await resp.json()).text?.trim() || null;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region extensions/qqbot/src/inbound-attachments.ts
|
|
70
|
+
const EMPTY_RESULT = {
|
|
71
|
+
attachmentInfo: "",
|
|
72
|
+
imageUrls: [],
|
|
73
|
+
imageMediaTypes: [],
|
|
74
|
+
voiceAttachmentPaths: [],
|
|
75
|
+
voiceAttachmentUrls: [],
|
|
76
|
+
voiceAsrReferTexts: [],
|
|
77
|
+
voiceTranscripts: [],
|
|
78
|
+
voiceTranscriptSources: [],
|
|
79
|
+
attachmentLocalPaths: []
|
|
80
|
+
};
|
|
81
|
+
/** Download, convert, transcribe, and classify inbound attachments. */
|
|
82
|
+
async function processAttachments(attachments, ctx) {
|
|
83
|
+
if (!attachments?.length) return EMPTY_RESULT;
|
|
84
|
+
const { accountId, cfg, log } = ctx;
|
|
85
|
+
const downloadDir = getQQBotMediaDir("downloads");
|
|
86
|
+
const prefix = `[qqbot:${accountId}]`;
|
|
87
|
+
const imageUrls = [];
|
|
88
|
+
const imageMediaTypes = [];
|
|
89
|
+
const voiceAttachmentPaths = [];
|
|
90
|
+
const voiceAttachmentUrls = [];
|
|
91
|
+
const voiceAsrReferTexts = [];
|
|
92
|
+
const voiceTranscripts = [];
|
|
93
|
+
const voiceTranscriptSources = [];
|
|
94
|
+
const attachmentLocalPaths = [];
|
|
95
|
+
const otherAttachments = [];
|
|
96
|
+
const downloadTasks = attachments.map(async (att) => {
|
|
97
|
+
const attUrl = att.url?.startsWith("//") ? `https:${att.url}` : att.url;
|
|
98
|
+
const isVoice = isVoiceAttachment(att);
|
|
99
|
+
const wavUrl = isVoice && att.voice_wav_url ? att.voice_wav_url.startsWith("//") ? `https:${att.voice_wav_url}` : att.voice_wav_url : "";
|
|
100
|
+
let localPath = null;
|
|
101
|
+
let audioPath = null;
|
|
102
|
+
if (isVoice && wavUrl) {
|
|
103
|
+
const wavLocalPath = await downloadFile(wavUrl, downloadDir);
|
|
104
|
+
if (wavLocalPath) {
|
|
105
|
+
localPath = wavLocalPath;
|
|
106
|
+
audioPath = wavLocalPath;
|
|
107
|
+
log?.info(`${prefix} Voice attachment: ${att.filename}, downloaded WAV directly (skip SILK→WAV)`);
|
|
108
|
+
} else log?.error(`${prefix} Failed to download voice_wav_url, falling back to original URL`);
|
|
109
|
+
}
|
|
110
|
+
if (!localPath) localPath = await downloadFile(attUrl, downloadDir, att.filename);
|
|
111
|
+
return {
|
|
112
|
+
att,
|
|
113
|
+
attUrl,
|
|
114
|
+
isVoice,
|
|
115
|
+
localPath,
|
|
116
|
+
audioPath
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
const processTasks = (await Promise.all(downloadTasks)).map(async ({ att, attUrl, isVoice, localPath, audioPath }) => {
|
|
120
|
+
const asrReferText = typeof att.asr_refer_text === "string" ? att.asr_refer_text.trim() : "";
|
|
121
|
+
const voiceSourceUrl = (isVoice && att.voice_wav_url ? att.voice_wav_url.startsWith("//") ? `https:${att.voice_wav_url}` : att.voice_wav_url : "") || attUrl;
|
|
122
|
+
const meta = {
|
|
123
|
+
voiceUrl: isVoice && voiceSourceUrl ? voiceSourceUrl : void 0,
|
|
124
|
+
asrReferText: isVoice && asrReferText ? asrReferText : void 0
|
|
125
|
+
};
|
|
126
|
+
if (localPath) if (att.content_type?.startsWith("image/")) {
|
|
127
|
+
log?.info(`${prefix} Downloaded attachment to: ${localPath}`);
|
|
128
|
+
return {
|
|
129
|
+
localPath,
|
|
130
|
+
type: "image",
|
|
131
|
+
contentType: att.content_type,
|
|
132
|
+
meta
|
|
133
|
+
};
|
|
134
|
+
} else if (isVoice) {
|
|
135
|
+
log?.info(`${prefix} Downloaded attachment to: ${localPath}`);
|
|
136
|
+
return processVoiceAttachment(localPath, audioPath, att, asrReferText, cfg, downloadDir, log, prefix);
|
|
137
|
+
} else {
|
|
138
|
+
log?.info(`${prefix} Downloaded attachment to: ${localPath}`);
|
|
139
|
+
return {
|
|
140
|
+
localPath,
|
|
141
|
+
type: "other",
|
|
142
|
+
filename: att.filename,
|
|
143
|
+
meta
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
log?.error(`${prefix} Failed to download: ${attUrl}`);
|
|
148
|
+
if (att.content_type?.startsWith("image/")) return {
|
|
149
|
+
localPath: null,
|
|
150
|
+
type: "image-fallback",
|
|
151
|
+
attUrl,
|
|
152
|
+
contentType: att.content_type,
|
|
153
|
+
meta
|
|
154
|
+
};
|
|
155
|
+
else if (isVoice && asrReferText) {
|
|
156
|
+
log?.info(`${prefix} Voice attachment download failed, using asr_refer_text fallback`);
|
|
157
|
+
return {
|
|
158
|
+
localPath: null,
|
|
159
|
+
type: "voice-fallback",
|
|
160
|
+
transcript: asrReferText,
|
|
161
|
+
meta
|
|
162
|
+
};
|
|
163
|
+
} else return {
|
|
164
|
+
localPath: null,
|
|
165
|
+
type: "other-fallback",
|
|
166
|
+
filename: att.filename ?? att.content_type,
|
|
167
|
+
meta
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
const processResults = await Promise.all(processTasks);
|
|
172
|
+
for (const result of processResults) {
|
|
173
|
+
if (result.meta.voiceUrl) voiceAttachmentUrls.push(result.meta.voiceUrl);
|
|
174
|
+
if (result.meta.asrReferText) voiceAsrReferTexts.push(result.meta.asrReferText);
|
|
175
|
+
if (result.type === "image" && result.localPath) {
|
|
176
|
+
imageUrls.push(result.localPath);
|
|
177
|
+
imageMediaTypes.push(result.contentType);
|
|
178
|
+
attachmentLocalPaths.push(result.localPath);
|
|
179
|
+
} else if (result.type === "voice" && result.localPath) {
|
|
180
|
+
voiceAttachmentPaths.push(result.localPath);
|
|
181
|
+
voiceTranscripts.push(result.transcript);
|
|
182
|
+
voiceTranscriptSources.push(result.transcriptSource);
|
|
183
|
+
attachmentLocalPaths.push(result.localPath);
|
|
184
|
+
} else if (result.type === "other" && result.localPath) {
|
|
185
|
+
otherAttachments.push(`[Attachment: ${result.localPath}]`);
|
|
186
|
+
attachmentLocalPaths.push(result.localPath);
|
|
187
|
+
} else if (result.type === "image-fallback") {
|
|
188
|
+
imageUrls.push(result.attUrl);
|
|
189
|
+
imageMediaTypes.push(result.contentType);
|
|
190
|
+
attachmentLocalPaths.push(null);
|
|
191
|
+
} else if (result.type === "voice-fallback") {
|
|
192
|
+
voiceTranscripts.push(result.transcript);
|
|
193
|
+
voiceTranscriptSources.push("asr");
|
|
194
|
+
attachmentLocalPaths.push(null);
|
|
195
|
+
} else if (result.type === "other-fallback") {
|
|
196
|
+
otherAttachments.push(`[Attachment: ${result.filename}] (download failed)`);
|
|
197
|
+
attachmentLocalPaths.push(null);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
attachmentInfo: otherAttachments.length > 0 ? "\n" + otherAttachments.join("\n") : "",
|
|
202
|
+
imageUrls,
|
|
203
|
+
imageMediaTypes,
|
|
204
|
+
voiceAttachmentPaths,
|
|
205
|
+
voiceAttachmentUrls,
|
|
206
|
+
voiceAsrReferTexts,
|
|
207
|
+
voiceTranscripts,
|
|
208
|
+
voiceTranscriptSources,
|
|
209
|
+
attachmentLocalPaths
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
/** Format voice transcripts into user-visible text. */
|
|
213
|
+
function formatVoiceText(transcripts) {
|
|
214
|
+
if (transcripts.length === 0) return "";
|
|
215
|
+
return transcripts.length === 1 ? `[Voice message] ${transcripts[0]}` : transcripts.map((t, i) => `[Voice ${i + 1}] ${t}`).join("\n");
|
|
216
|
+
}
|
|
217
|
+
async function processVoiceAttachment(localPath, audioPath, att, asrReferText, cfg, downloadDir, log, prefix) {
|
|
218
|
+
const wavUrl = att.voice_wav_url ? att.voice_wav_url.startsWith("//") ? `https:${att.voice_wav_url}` : att.voice_wav_url : "";
|
|
219
|
+
const attUrl = att.url?.startsWith("//") ? `https:${att.url}` : att.url;
|
|
220
|
+
const meta = {
|
|
221
|
+
voiceUrl: wavUrl || attUrl || void 0,
|
|
222
|
+
asrReferText: asrReferText || void 0
|
|
223
|
+
};
|
|
224
|
+
if (!resolveSTTConfig(cfg)) {
|
|
225
|
+
if (asrReferText) {
|
|
226
|
+
log?.info(`${prefix} Voice attachment: ${att.filename} (STT not configured, using asr_refer_text fallback)`);
|
|
227
|
+
return {
|
|
228
|
+
localPath,
|
|
229
|
+
type: "voice",
|
|
230
|
+
transcript: asrReferText,
|
|
231
|
+
transcriptSource: "asr",
|
|
232
|
+
meta
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
log?.info(`${prefix} Voice attachment: ${att.filename} (STT not configured, skipping transcription)`);
|
|
236
|
+
return {
|
|
237
|
+
localPath,
|
|
238
|
+
type: "voice",
|
|
239
|
+
transcript: "[Voice message - transcription unavailable because STT is not configured]",
|
|
240
|
+
transcriptSource: "fallback",
|
|
241
|
+
meta
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
if (!audioPath) {
|
|
245
|
+
log?.info(`${prefix} Voice attachment: ${att.filename}, converting SILK→WAV...`);
|
|
246
|
+
try {
|
|
247
|
+
const wavResult = await convertSilkToWav(localPath, downloadDir);
|
|
248
|
+
if (wavResult) {
|
|
249
|
+
audioPath = wavResult.wavPath;
|
|
250
|
+
log?.info(`${prefix} Voice converted: ${wavResult.wavPath} (${formatDuration(wavResult.duration)})`);
|
|
251
|
+
} else audioPath = localPath;
|
|
252
|
+
} catch (convertErr) {
|
|
253
|
+
log?.error(`${prefix} Voice conversion failed: ${convertErr}`);
|
|
254
|
+
if (asrReferText) return {
|
|
255
|
+
localPath,
|
|
256
|
+
type: "voice",
|
|
257
|
+
transcript: asrReferText,
|
|
258
|
+
transcriptSource: "asr",
|
|
259
|
+
meta
|
|
260
|
+
};
|
|
261
|
+
return {
|
|
262
|
+
localPath,
|
|
263
|
+
type: "voice",
|
|
264
|
+
transcript: "[Voice message - format conversion failed]",
|
|
265
|
+
transcriptSource: "fallback",
|
|
266
|
+
meta
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
try {
|
|
271
|
+
const transcript = await transcribeAudio(audioPath, cfg);
|
|
272
|
+
if (transcript) {
|
|
273
|
+
log?.info(`${prefix} STT transcript: ${transcript.slice(0, 100)}...`);
|
|
274
|
+
return {
|
|
275
|
+
localPath,
|
|
276
|
+
type: "voice",
|
|
277
|
+
transcript,
|
|
278
|
+
transcriptSource: "stt",
|
|
279
|
+
meta
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
if (asrReferText) {
|
|
283
|
+
log?.info(`${prefix} STT returned empty result, using asr_refer_text fallback`);
|
|
284
|
+
return {
|
|
285
|
+
localPath,
|
|
286
|
+
type: "voice",
|
|
287
|
+
transcript: asrReferText,
|
|
288
|
+
transcriptSource: "asr",
|
|
289
|
+
meta
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
log?.info(`${prefix} STT returned empty result`);
|
|
293
|
+
return {
|
|
294
|
+
localPath,
|
|
295
|
+
type: "voice",
|
|
296
|
+
transcript: "[Voice message - transcription returned an empty result]",
|
|
297
|
+
transcriptSource: "fallback",
|
|
298
|
+
meta
|
|
299
|
+
};
|
|
300
|
+
} catch (sttErr) {
|
|
301
|
+
log?.error(`${prefix} STT failed: ${sttErr}`);
|
|
302
|
+
if (asrReferText) return {
|
|
303
|
+
localPath,
|
|
304
|
+
type: "voice",
|
|
305
|
+
transcript: asrReferText,
|
|
306
|
+
transcriptSource: "asr",
|
|
307
|
+
meta
|
|
308
|
+
};
|
|
309
|
+
return {
|
|
310
|
+
localPath,
|
|
311
|
+
type: "voice",
|
|
312
|
+
transcript: "[Voice message - transcription failed]",
|
|
313
|
+
transcriptSource: "fallback",
|
|
314
|
+
meta
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region extensions/qqbot/src/message-queue.ts
|
|
320
|
+
const MESSAGE_QUEUE_SIZE = 1e3;
|
|
321
|
+
const PER_USER_QUEUE_SIZE = 20;
|
|
322
|
+
const MAX_CONCURRENT_USERS = 10;
|
|
323
|
+
/**
|
|
324
|
+
* Create a per-user concurrent queue.
|
|
325
|
+
* Messages are serialized per user and processed in parallel across users.
|
|
326
|
+
*/
|
|
327
|
+
function createMessageQueue(ctx) {
|
|
328
|
+
const { accountId, log } = ctx;
|
|
329
|
+
const userQueues = /* @__PURE__ */ new Map();
|
|
330
|
+
const activeUsers = /* @__PURE__ */ new Set();
|
|
331
|
+
let messagesProcessed = 0;
|
|
332
|
+
let handleMessageFnRef = null;
|
|
333
|
+
let totalEnqueued = 0;
|
|
334
|
+
const getMessagePeerId = (msg) => {
|
|
335
|
+
if (msg.type === "guild") return `guild:${msg.channelId ?? "unknown"}`;
|
|
336
|
+
if (msg.type === "group") return `group:${msg.groupOpenid ?? "unknown"}`;
|
|
337
|
+
return `dm:${msg.senderId}`;
|
|
338
|
+
};
|
|
339
|
+
const drainUserQueue = async (peerId) => {
|
|
340
|
+
if (activeUsers.has(peerId)) return;
|
|
341
|
+
if (activeUsers.size >= MAX_CONCURRENT_USERS) {
|
|
342
|
+
log?.info(`[qqbot:${accountId}] Max concurrent users (${MAX_CONCURRENT_USERS}) reached, ${peerId} will wait`);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const queue = userQueues.get(peerId);
|
|
346
|
+
if (!queue || queue.length === 0) {
|
|
347
|
+
userQueues.delete(peerId);
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
activeUsers.add(peerId);
|
|
351
|
+
try {
|
|
352
|
+
while (queue.length > 0 && !ctx.isAborted()) {
|
|
353
|
+
const msg = queue.shift();
|
|
354
|
+
totalEnqueued = Math.max(0, totalEnqueued - 1);
|
|
355
|
+
try {
|
|
356
|
+
if (handleMessageFnRef) {
|
|
357
|
+
await handleMessageFnRef(msg);
|
|
358
|
+
messagesProcessed++;
|
|
359
|
+
}
|
|
360
|
+
} catch (err) {
|
|
361
|
+
log?.error(`[qqbot:${accountId}] Message processor error for ${peerId}: ${err}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
} finally {
|
|
365
|
+
activeUsers.delete(peerId);
|
|
366
|
+
userQueues.delete(peerId);
|
|
367
|
+
for (const [waitingPeerId, waitingQueue] of userQueues) {
|
|
368
|
+
if (activeUsers.size >= MAX_CONCURRENT_USERS) break;
|
|
369
|
+
if (waitingQueue.length > 0 && !activeUsers.has(waitingPeerId)) drainUserQueue(waitingPeerId);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
const enqueue = (msg) => {
|
|
374
|
+
const peerId = getMessagePeerId(msg);
|
|
375
|
+
let queue = userQueues.get(peerId);
|
|
376
|
+
if (!queue) {
|
|
377
|
+
queue = [];
|
|
378
|
+
userQueues.set(peerId, queue);
|
|
379
|
+
}
|
|
380
|
+
if (queue.length >= PER_USER_QUEUE_SIZE) {
|
|
381
|
+
const dropped = queue.shift();
|
|
382
|
+
log?.error(`[qqbot:${accountId}] Per-user queue full for ${peerId}, dropping oldest message ${dropped?.messageId}`);
|
|
383
|
+
}
|
|
384
|
+
totalEnqueued++;
|
|
385
|
+
if (totalEnqueued > MESSAGE_QUEUE_SIZE) log?.error(`[qqbot:${accountId}] Global queue limit reached (${totalEnqueued}), message from ${peerId} may be delayed`);
|
|
386
|
+
queue.push(msg);
|
|
387
|
+
log?.debug?.(`[qqbot:${accountId}] Message enqueued for ${peerId}, user queue: ${queue.length}, active users: ${activeUsers.size}`);
|
|
388
|
+
drainUserQueue(peerId);
|
|
389
|
+
};
|
|
390
|
+
const startProcessor = (handleMessageFn) => {
|
|
391
|
+
handleMessageFnRef = handleMessageFn;
|
|
392
|
+
log?.info(`[qqbot:${accountId}] Message processor started (per-user concurrency, max ${MAX_CONCURRENT_USERS} users)`);
|
|
393
|
+
};
|
|
394
|
+
const getSnapshot = (senderPeerId) => {
|
|
395
|
+
let totalPending = 0;
|
|
396
|
+
for (const [, q] of userQueues) totalPending += q.length;
|
|
397
|
+
const senderQueue = userQueues.get(senderPeerId);
|
|
398
|
+
return {
|
|
399
|
+
totalPending,
|
|
400
|
+
activeUsers: activeUsers.size,
|
|
401
|
+
maxConcurrentUsers: MAX_CONCURRENT_USERS,
|
|
402
|
+
senderPending: senderQueue ? senderQueue.length : 0
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
const clearUserQueue = (peerId) => {
|
|
406
|
+
const queue = userQueues.get(peerId);
|
|
407
|
+
if (!queue || queue.length === 0) return 0;
|
|
408
|
+
const droppedCount = queue.length;
|
|
409
|
+
queue.length = 0;
|
|
410
|
+
totalEnqueued = Math.max(0, totalEnqueued - droppedCount);
|
|
411
|
+
return droppedCount;
|
|
412
|
+
};
|
|
413
|
+
const executeImmediate = (msg) => {
|
|
414
|
+
if (handleMessageFnRef) handleMessageFnRef(msg).catch((err) => {
|
|
415
|
+
log?.error(`[qqbot:${accountId}] Immediate execution error: ${err}`);
|
|
416
|
+
});
|
|
417
|
+
};
|
|
418
|
+
return {
|
|
419
|
+
enqueue,
|
|
420
|
+
startProcessor,
|
|
421
|
+
getSnapshot,
|
|
422
|
+
getMessagePeerId,
|
|
423
|
+
clearUserQueue,
|
|
424
|
+
executeImmediate
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region extensions/qqbot/src/utils/image-size.ts
|
|
429
|
+
/**
|
|
430
|
+
* Image dimension helpers for QQ Bot markdown image syntax.
|
|
431
|
+
*
|
|
432
|
+
* QQ Bot markdown images use ``.
|
|
433
|
+
*/
|
|
434
|
+
/** Default dimensions used when probing fails. */
|
|
435
|
+
const DEFAULT_IMAGE_SIZE = {
|
|
436
|
+
width: 512,
|
|
437
|
+
height: 512
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Parse image dimensions from the PNG header.
|
|
441
|
+
*/
|
|
442
|
+
function parsePngSize(buffer) {
|
|
443
|
+
if (buffer.length < 24) return null;
|
|
444
|
+
if (buffer[0] !== 137 || buffer[1] !== 80 || buffer[2] !== 78 || buffer[3] !== 71) return null;
|
|
445
|
+
return {
|
|
446
|
+
width: buffer.readUInt32BE(16),
|
|
447
|
+
height: buffer.readUInt32BE(20)
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
/** Parse image dimensions from JPEG SOF0/SOF2 markers. */
|
|
451
|
+
function parseJpegSize(buffer) {
|
|
452
|
+
if (buffer.length < 4) return null;
|
|
453
|
+
if (buffer[0] !== 255 || buffer[1] !== 216) return null;
|
|
454
|
+
let offset = 2;
|
|
455
|
+
while (offset < buffer.length - 9) {
|
|
456
|
+
if (buffer[offset] !== 255) {
|
|
457
|
+
offset++;
|
|
458
|
+
continue;
|
|
459
|
+
}
|
|
460
|
+
const marker = buffer[offset + 1];
|
|
461
|
+
if (marker === 192 || marker === 194) {
|
|
462
|
+
if (offset + 9 <= buffer.length) {
|
|
463
|
+
const height = buffer.readUInt16BE(offset + 5);
|
|
464
|
+
return {
|
|
465
|
+
width: buffer.readUInt16BE(offset + 7),
|
|
466
|
+
height
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (offset + 3 < buffer.length) {
|
|
471
|
+
const blockLength = buffer.readUInt16BE(offset + 2);
|
|
472
|
+
offset += 2 + blockLength;
|
|
473
|
+
} else break;
|
|
474
|
+
}
|
|
475
|
+
return null;
|
|
476
|
+
}
|
|
477
|
+
/** Parse image dimensions from the GIF header. */
|
|
478
|
+
function parseGifSize(buffer) {
|
|
479
|
+
if (buffer.length < 10) return null;
|
|
480
|
+
const signature = buffer.toString("ascii", 0, 6);
|
|
481
|
+
if (signature !== "GIF87a" && signature !== "GIF89a") return null;
|
|
482
|
+
return {
|
|
483
|
+
width: buffer.readUInt16LE(6),
|
|
484
|
+
height: buffer.readUInt16LE(8)
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
/** Parse image dimensions from WebP headers. */
|
|
488
|
+
function parseWebpSize(buffer) {
|
|
489
|
+
if (buffer.length < 30) return null;
|
|
490
|
+
const riff = buffer.toString("ascii", 0, 4);
|
|
491
|
+
const webp = buffer.toString("ascii", 8, 12);
|
|
492
|
+
if (riff !== "RIFF" || webp !== "WEBP") return null;
|
|
493
|
+
const chunkType = buffer.toString("ascii", 12, 16);
|
|
494
|
+
if (chunkType === "VP8 ") {
|
|
495
|
+
if (buffer.length >= 30 && buffer[23] === 157 && buffer[24] === 1 && buffer[25] === 42) return {
|
|
496
|
+
width: buffer.readUInt16LE(26) & 16383,
|
|
497
|
+
height: buffer.readUInt16LE(28) & 16383
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
if (chunkType === "VP8L") {
|
|
501
|
+
if (buffer.length >= 25 && buffer[20] === 47) {
|
|
502
|
+
const bits = buffer.readUInt32LE(21);
|
|
503
|
+
return {
|
|
504
|
+
width: (bits & 16383) + 1,
|
|
505
|
+
height: (bits >> 14 & 16383) + 1
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
if (chunkType === "VP8X") {
|
|
510
|
+
if (buffer.length >= 30) return {
|
|
511
|
+
width: (buffer[24] | buffer[25] << 8 | buffer[26] << 16) + 1,
|
|
512
|
+
height: (buffer[27] | buffer[28] << 8 | buffer[29] << 16) + 1
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
/** Parse image dimensions from raw image bytes. */
|
|
518
|
+
function parseImageSize(buffer) {
|
|
519
|
+
return parsePngSize(buffer) ?? parseJpegSize(buffer) ?? parseGifSize(buffer) ?? parseWebpSize(buffer);
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Fetch image dimensions from a public URL using only the first 64 KB.
|
|
523
|
+
*/
|
|
524
|
+
async function getImageSizeFromUrl(url, timeoutMs = 5e3) {
|
|
525
|
+
try {
|
|
526
|
+
const controller = new AbortController();
|
|
527
|
+
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
528
|
+
const response = await fetch(url, {
|
|
529
|
+
signal: controller.signal,
|
|
530
|
+
headers: {
|
|
531
|
+
Range: "bytes=0-65535",
|
|
532
|
+
"User-Agent": "QQBot-Image-Size-Detector/1.0"
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
clearTimeout(timeoutId);
|
|
536
|
+
if (!response.ok && response.status !== 206) {
|
|
537
|
+
debugLog(`[image-size] Failed to fetch ${url}: ${response.status}`);
|
|
538
|
+
return null;
|
|
539
|
+
}
|
|
540
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
541
|
+
const size = parseImageSize(Buffer$1.from(arrayBuffer));
|
|
542
|
+
if (size) debugLog(`[image-size] Got size from URL: ${size.width}x${size.height} - ${url.slice(0, 60)}...`);
|
|
543
|
+
return size;
|
|
544
|
+
} catch (err) {
|
|
545
|
+
debugLog(`[image-size] Error fetching ${url.slice(0, 60)}...: ${err}`);
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
/** Parse image dimensions from a Base64 data URL. */
|
|
550
|
+
function getImageSizeFromDataUrl(dataUrl) {
|
|
551
|
+
try {
|
|
552
|
+
const matches = dataUrl.match(/^data:image\/[^;]+;base64,(.+)$/);
|
|
553
|
+
if (!matches) return null;
|
|
554
|
+
const base64Data = matches[1];
|
|
555
|
+
const size = parseImageSize(Buffer$1.from(base64Data, "base64"));
|
|
556
|
+
if (size) debugLog(`[image-size] Got size from Base64: ${size.width}x${size.height}`);
|
|
557
|
+
return size;
|
|
558
|
+
} catch (err) {
|
|
559
|
+
debugLog(`[image-size] Error parsing Base64: ${err}`);
|
|
560
|
+
return null;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Resolve image dimensions from either an HTTP URL or a Base64 data URL.
|
|
565
|
+
*/
|
|
566
|
+
async function getImageSize(source) {
|
|
567
|
+
if (source.startsWith("data:")) return getImageSizeFromDataUrl(source);
|
|
568
|
+
if (source.startsWith("http://") || source.startsWith("https://")) return getImageSizeFromUrl(source);
|
|
569
|
+
return null;
|
|
570
|
+
}
|
|
571
|
+
/** Format a markdown image with QQ Bot width/height annotations. */
|
|
572
|
+
function formatQQBotMarkdownImage(url, size) {
|
|
573
|
+
const { width, height } = size ?? DEFAULT_IMAGE_SIZE;
|
|
574
|
+
return ``;
|
|
575
|
+
}
|
|
576
|
+
/** Return true when markdown already contains QQ Bot size annotations. */
|
|
577
|
+
function hasQQBotImageSize(markdownImage) {
|
|
578
|
+
return /!\[#\d+px\s+#\d+px\]/.test(markdownImage);
|
|
579
|
+
}
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region extensions/qqbot/src/utils/text-parsing.ts
|
|
582
|
+
/** Replace QQ face tags with readable text labels. */
|
|
583
|
+
function parseFaceTags(text) {
|
|
584
|
+
if (!text) return text;
|
|
585
|
+
return text.replace(/<faceType=\d+,faceId="[^"]*",ext="([^"]*)">/g, (_match, ext) => {
|
|
586
|
+
try {
|
|
587
|
+
const decoded = Buffer.from(ext, "base64").toString("utf-8");
|
|
588
|
+
return `[Emoji: ${JSON.parse(decoded).text || "unknown emoji"}]`;
|
|
589
|
+
} catch {
|
|
590
|
+
return _match;
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
/** Remove internal framework markers before sending text outward. */
|
|
595
|
+
function filterInternalMarkers(text) {
|
|
596
|
+
if (!text) return text;
|
|
597
|
+
let result = text.replace(/\[\[[a-z_]+:\s*[^\]]*\]\]/gi, "");
|
|
598
|
+
result = result.replace(/@(?:image|voice|video|file):[a-zA-Z0-9_.-]+/g, "");
|
|
599
|
+
result = result.replace(/\n{3,}/g, "\n\n").trim();
|
|
600
|
+
return result;
|
|
601
|
+
}
|
|
602
|
+
/** Parse quote-related ref indices from `message_scene.ext`. */
|
|
603
|
+
function parseRefIndices(ext) {
|
|
604
|
+
if (!ext || ext.length === 0) return {};
|
|
605
|
+
let refMsgIdx;
|
|
606
|
+
let msgIdx;
|
|
607
|
+
for (const item of ext) if (item.startsWith("ref_msg_idx=")) refMsgIdx = item.slice(12);
|
|
608
|
+
else if (item.startsWith("msg_idx=")) msgIdx = item.slice(8);
|
|
609
|
+
return {
|
|
610
|
+
refMsgIdx,
|
|
611
|
+
msgIdx
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
/** Build attachment summaries for ref-index caching. */
|
|
615
|
+
function buildAttachmentSummaries(attachments, localPaths) {
|
|
616
|
+
if (!attachments || attachments.length === 0) return void 0;
|
|
617
|
+
return attachments.map((att, idx) => {
|
|
618
|
+
const ct = att.content_type?.toLowerCase() ?? "";
|
|
619
|
+
let type = "unknown";
|
|
620
|
+
if (ct.startsWith("image/")) type = "image";
|
|
621
|
+
else if (ct === "voice" || ct.startsWith("audio/") || ct.includes("silk") || ct.includes("amr")) type = "voice";
|
|
622
|
+
else if (ct.startsWith("video/")) type = "video";
|
|
623
|
+
else if (ct.startsWith("application/") || ct.startsWith("text/")) type = "file";
|
|
624
|
+
return {
|
|
625
|
+
type,
|
|
626
|
+
filename: att.filename,
|
|
627
|
+
contentType: att.content_type,
|
|
628
|
+
localPath: localPaths?.[idx] ?? void 0
|
|
629
|
+
};
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region extensions/qqbot/src/outbound-deliver.ts
|
|
634
|
+
/**
|
|
635
|
+
* Outbound delivery helpers.
|
|
636
|
+
*
|
|
637
|
+
* The gateway deliver callback uses two pipelines:
|
|
638
|
+
* 1. `parseAndSendMediaTags` handles `<qqimg/qqvoice/qqvideo/qqfile/qqmedia>` tags in order.
|
|
639
|
+
* 2. `sendPlainReply` handles plain replies, including markdown images and mixed text/media.
|
|
640
|
+
*/
|
|
641
|
+
/**
|
|
642
|
+
* Parse media tags from the reply text and send them in order.
|
|
643
|
+
*
|
|
644
|
+
* @returns `true` when media tags were found and handled; `false` when the caller
|
|
645
|
+
* should continue through the plain-text pipeline.
|
|
646
|
+
*/
|
|
647
|
+
async function parseAndSendMediaTags(replyText, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
648
|
+
const { account, log } = actx;
|
|
649
|
+
const prefix = `[qqbot:${account.accountId}]`;
|
|
650
|
+
const text = normalizeMediaTags(replyText);
|
|
651
|
+
const mediaTagMatches = [...text.matchAll(/<(qqimg|qqvoice|qqvideo|qqfile|qqmedia)>([^<>]+)<\/(?:qqimg|qqvoice|qqvideo|qqfile|qqmedia|img)>/gi)];
|
|
652
|
+
if (mediaTagMatches.length === 0) return {
|
|
653
|
+
handled: false,
|
|
654
|
+
normalizedText: text
|
|
655
|
+
};
|
|
656
|
+
const tagCounts = mediaTagMatches.reduce((acc, m) => {
|
|
657
|
+
const t = m[1].toLowerCase();
|
|
658
|
+
acc[t] = (acc[t] ?? 0) + 1;
|
|
659
|
+
return acc;
|
|
660
|
+
}, {});
|
|
661
|
+
log?.info(`${prefix} Detected media tags: ${Object.entries(tagCounts).map(([k, v]) => `${v} <${k}>`).join(", ")}`);
|
|
662
|
+
const sendQueue = [];
|
|
663
|
+
let lastIndex = 0;
|
|
664
|
+
const regex2 = /<(qqimg|qqvoice|qqvideo|qqfile|qqmedia)>([^<>]+)<\/(?:qqimg|qqvoice|qqvideo|qqfile|qqmedia|img)>/gi;
|
|
665
|
+
let match;
|
|
666
|
+
while ((match = regex2.exec(text)) !== null) {
|
|
667
|
+
const textBefore = text.slice(lastIndex, match.index).replace(/\n{3,}/g, "\n\n").trim();
|
|
668
|
+
if (textBefore) sendQueue.push({
|
|
669
|
+
type: "text",
|
|
670
|
+
content: filterInternalMarkers(textBefore)
|
|
671
|
+
});
|
|
672
|
+
const tagName = match[1].toLowerCase();
|
|
673
|
+
let mediaPath = decodeMediaPath(match[2]?.trim() ?? "", log, prefix);
|
|
674
|
+
if (mediaPath) {
|
|
675
|
+
const itemType = {
|
|
676
|
+
qqmedia: "media",
|
|
677
|
+
qqvoice: "voice",
|
|
678
|
+
qqvideo: "video",
|
|
679
|
+
qqfile: "file"
|
|
680
|
+
}[tagName] ?? "image";
|
|
681
|
+
sendQueue.push({
|
|
682
|
+
type: itemType,
|
|
683
|
+
content: mediaPath
|
|
684
|
+
});
|
|
685
|
+
log?.info(`${prefix} Found ${itemType} in <${tagName}>: ${mediaPath}`);
|
|
686
|
+
}
|
|
687
|
+
lastIndex = match.index + match[0].length;
|
|
688
|
+
}
|
|
689
|
+
const textAfter = text.slice(lastIndex).replace(/\n{3,}/g, "\n\n").trim();
|
|
690
|
+
if (textAfter) sendQueue.push({
|
|
691
|
+
type: "text",
|
|
692
|
+
content: filterInternalMarkers(textAfter)
|
|
693
|
+
});
|
|
694
|
+
log?.info(`${prefix} Send queue: ${sendQueue.map((item) => item.type).join(" -> ")}`);
|
|
695
|
+
const mediaTarget = {
|
|
696
|
+
targetType: event.type === "c2c" ? "c2c" : event.type === "group" ? "group" : event.type === "dm" ? "dm" : "channel",
|
|
697
|
+
targetId: event.type === "c2c" ? event.senderId : event.type === "group" ? event.groupOpenid : event.type === "dm" ? event.guildId : event.channelId,
|
|
698
|
+
account,
|
|
699
|
+
replyToId: event.messageId,
|
|
700
|
+
logPrefix: prefix
|
|
701
|
+
};
|
|
702
|
+
for (const item of sendQueue) if (item.type === "text") await sendTextChunks(item.content, event, actx, sendWithRetry, consumeQuoteRef);
|
|
703
|
+
else if (item.type === "image") {
|
|
704
|
+
const result = await sendPhoto(mediaTarget, item.content);
|
|
705
|
+
if (result.error) log?.error(`${prefix} sendPhoto error: ${result.error}`);
|
|
706
|
+
} else if (item.type === "voice") await sendVoiceWithTimeout(mediaTarget, item.content, account, log, prefix);
|
|
707
|
+
else if (item.type === "video") {
|
|
708
|
+
const result = await sendVideoMsg(mediaTarget, item.content);
|
|
709
|
+
if (result.error) log?.error(`${prefix} sendVideoMsg error: ${result.error}`);
|
|
710
|
+
} else if (item.type === "file") {
|
|
711
|
+
const result = await sendDocument(mediaTarget, item.content);
|
|
712
|
+
if (result.error) log?.error(`${prefix} sendDocument error: ${result.error}`);
|
|
713
|
+
} else if (item.type === "media") {
|
|
714
|
+
const result = await sendMedia({
|
|
715
|
+
to: actx.qualifiedTarget,
|
|
716
|
+
text: "",
|
|
717
|
+
mediaUrl: item.content,
|
|
718
|
+
accountId: account.accountId,
|
|
719
|
+
replyToId: event.messageId,
|
|
720
|
+
account
|
|
721
|
+
});
|
|
722
|
+
if (result.error) log?.error(`${prefix} sendMedia(auto) error: ${result.error}`);
|
|
723
|
+
}
|
|
724
|
+
return {
|
|
725
|
+
handled: true,
|
|
726
|
+
normalizedText: text
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Send a reply that does not contain structured media tags.
|
|
731
|
+
* Handles markdown image embeds, Base64 media, plain-text chunking, and local media routing.
|
|
732
|
+
*/
|
|
733
|
+
async function sendPlainReply(payload, replyText, event, actx, sendWithRetry, consumeQuoteRef, toolMediaUrls) {
|
|
734
|
+
const { account, qualifiedTarget, log } = actx;
|
|
735
|
+
const prefix = `[qqbot:${account.accountId}]`;
|
|
736
|
+
const collectedImageUrls = [];
|
|
737
|
+
const localMediaToSend = [];
|
|
738
|
+
const collectImageUrl = (url) => {
|
|
739
|
+
if (!url) return false;
|
|
740
|
+
const isHttpUrl = url.startsWith("http://") || url.startsWith("https://");
|
|
741
|
+
const isDataUrl = url.startsWith("data:image/");
|
|
742
|
+
if (isHttpUrl || isDataUrl) {
|
|
743
|
+
if (!collectedImageUrls.includes(url)) {
|
|
744
|
+
collectedImageUrls.push(url);
|
|
745
|
+
log?.info(`${prefix} Collected ${isDataUrl ? "Base64" : "media URL"}: ${isDataUrl ? `(length: ${url.length})` : url.slice(0, 80) + "..."}`);
|
|
746
|
+
}
|
|
747
|
+
return true;
|
|
748
|
+
}
|
|
749
|
+
if (isLocalPath(url)) {
|
|
750
|
+
if (!localMediaToSend.includes(url)) {
|
|
751
|
+
localMediaToSend.push(url);
|
|
752
|
+
log?.info(`${prefix} Collected local media for auto-routing: ${url}`);
|
|
753
|
+
}
|
|
754
|
+
return true;
|
|
755
|
+
}
|
|
756
|
+
return false;
|
|
757
|
+
};
|
|
758
|
+
if (payload.mediaUrls?.length) for (const url of payload.mediaUrls) collectImageUrl(url);
|
|
759
|
+
if (payload.mediaUrl) collectImageUrl(payload.mediaUrl);
|
|
760
|
+
const mdMatches = [...replyText.matchAll(/!\[([^\]]*)\]\(([^)]+)\)/gi)];
|
|
761
|
+
for (const m of mdMatches) {
|
|
762
|
+
const url = m[2]?.trim();
|
|
763
|
+
if (url && !collectedImageUrls.includes(url)) {
|
|
764
|
+
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
765
|
+
collectedImageUrls.push(url);
|
|
766
|
+
log?.info(`${prefix} Extracted HTTP image from markdown: ${url.slice(0, 80)}...`);
|
|
767
|
+
} else if (isLocalPath(url)) {
|
|
768
|
+
if (!localMediaToSend.includes(url)) {
|
|
769
|
+
localMediaToSend.push(url);
|
|
770
|
+
log?.info(`${prefix} Collected local media from markdown for auto-routing: ${url}`);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
const bareUrlMatches = [...replyText.matchAll(/(?<![(\["'])(https?:\/\/[^\s)"'<>]+\.(?:png|jpg|jpeg|gif|webp)(?:\?[^\s"'<>]*)?)/gi)];
|
|
776
|
+
for (const m of bareUrlMatches) {
|
|
777
|
+
const url = m[1];
|
|
778
|
+
if (url && !collectedImageUrls.includes(url)) {
|
|
779
|
+
collectedImageUrls.push(url);
|
|
780
|
+
log?.info(`${prefix} Extracted bare image URL: ${url.slice(0, 80)}...`);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
const useMarkdown = account.markdownSupport === true;
|
|
784
|
+
log?.info(`${prefix} Markdown mode: ${useMarkdown}, images: ${collectedImageUrls.length}`);
|
|
785
|
+
let textWithoutImages = filterInternalMarkers(replyText);
|
|
786
|
+
for (const m of mdMatches) {
|
|
787
|
+
const url = m[2]?.trim();
|
|
788
|
+
if (url && !url.startsWith("http://") && !url.startsWith("https://") && !isLocalPath(url)) textWithoutImages = textWithoutImages.replace(m[0], "").trim();
|
|
789
|
+
}
|
|
790
|
+
if (useMarkdown) await sendMarkdownReply(textWithoutImages, collectedImageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef);
|
|
791
|
+
else await sendPlainTextReply(textWithoutImages, collectedImageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef);
|
|
792
|
+
if (localMediaToSend.length > 0) {
|
|
793
|
+
log?.info(`${prefix} Sending ${localMediaToSend.length} local media via sendMedia auto-routing`);
|
|
794
|
+
for (const mediaPath of localMediaToSend) try {
|
|
795
|
+
const result = await sendMedia({
|
|
796
|
+
to: qualifiedTarget,
|
|
797
|
+
text: "",
|
|
798
|
+
mediaUrl: mediaPath,
|
|
799
|
+
accountId: account.accountId,
|
|
800
|
+
replyToId: event.messageId,
|
|
801
|
+
account
|
|
802
|
+
});
|
|
803
|
+
if (result.error) log?.error(`${prefix} sendMedia(auto) error for ${mediaPath}: ${result.error}`);
|
|
804
|
+
else log?.info(`${prefix} Sent local media: ${mediaPath}`);
|
|
805
|
+
} catch (err) {
|
|
806
|
+
log?.error(`${prefix} sendMedia(auto) failed for ${mediaPath}: ${err}`);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
if (toolMediaUrls.length > 0) {
|
|
810
|
+
log?.info(`${prefix} Forwarding ${toolMediaUrls.length} tool-collected media URL(s) after block deliver`);
|
|
811
|
+
for (const mediaUrl of toolMediaUrls) try {
|
|
812
|
+
const result = await sendMedia({
|
|
813
|
+
to: qualifiedTarget,
|
|
814
|
+
text: "",
|
|
815
|
+
mediaUrl,
|
|
816
|
+
accountId: account.accountId,
|
|
817
|
+
replyToId: event.messageId,
|
|
818
|
+
account
|
|
819
|
+
});
|
|
820
|
+
if (result.error) log?.error(`${prefix} Tool media forward error: ${result.error}`);
|
|
821
|
+
else log?.info(`${prefix} Forwarded tool media: ${mediaUrl.slice(0, 80)}...`);
|
|
822
|
+
} catch (err) {
|
|
823
|
+
log?.error(`${prefix} Tool media forward failed: ${err}`);
|
|
824
|
+
}
|
|
825
|
+
toolMediaUrls.length = 0;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
/** Decode a media path by stripping `MEDIA:`, expanding `~`, and unescaping. */
|
|
829
|
+
function decodeMediaPath(raw, log, prefix) {
|
|
830
|
+
let mediaPath = raw;
|
|
831
|
+
if (mediaPath.startsWith("MEDIA:")) mediaPath = mediaPath.slice(6);
|
|
832
|
+
mediaPath = normalizePath(mediaPath);
|
|
833
|
+
mediaPath = mediaPath.replace(/\\\\/g, "\\");
|
|
834
|
+
const isWinLocal = /^[a-zA-Z]:[\\/]/.test(mediaPath) || mediaPath.startsWith("\\\\");
|
|
835
|
+
try {
|
|
836
|
+
const hasOctal = /\\[0-7]{1,3}/.test(mediaPath);
|
|
837
|
+
const hasNonASCII = /[\u0080-\u00FF]/.test(mediaPath);
|
|
838
|
+
if (!isWinLocal && (hasOctal || hasNonASCII)) {
|
|
839
|
+
log?.debug?.(`${prefix} Decoding path with mixed encoding: ${mediaPath}`);
|
|
840
|
+
let decoded = mediaPath.replace(/\\([0-7]{1,3})/g, (_, octal) => {
|
|
841
|
+
return String.fromCharCode(parseInt(octal, 8));
|
|
842
|
+
});
|
|
843
|
+
const bytes = [];
|
|
844
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
845
|
+
const code = decoded.charCodeAt(i);
|
|
846
|
+
if (code <= 255) bytes.push(code);
|
|
847
|
+
else {
|
|
848
|
+
const charBytes = Buffer.from(decoded[i], "utf8");
|
|
849
|
+
bytes.push(...charBytes);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
const utf8Decoded = Buffer.from(bytes).toString("utf8");
|
|
853
|
+
if (!utf8Decoded.includes("�") || utf8Decoded.length < decoded.length) {
|
|
854
|
+
mediaPath = utf8Decoded;
|
|
855
|
+
log?.debug?.(`${prefix} Successfully decoded path: ${mediaPath}`);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
} catch (decodeErr) {
|
|
859
|
+
log?.error(`${prefix} Path decode error: ${decodeErr}`);
|
|
860
|
+
}
|
|
861
|
+
return mediaPath;
|
|
862
|
+
}
|
|
863
|
+
/** Shared helper for sending chunked text replies. */
|
|
864
|
+
async function sendTextChunks(text, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
865
|
+
const { account, log } = actx;
|
|
866
|
+
const prefix = `[qqbot:${account.accountId}]`;
|
|
867
|
+
const chunks = getQQBotRuntime().channel.text.chunkMarkdownText(text, TEXT_CHUNK_LIMIT);
|
|
868
|
+
for (const chunk of chunks) try {
|
|
869
|
+
await sendWithRetry(async (token) => {
|
|
870
|
+
const ref = consumeQuoteRef();
|
|
871
|
+
if (event.type === "c2c") return await sendC2CMessage(account.appId, token, event.senderId, chunk, event.messageId, ref);
|
|
872
|
+
else if (event.type === "group" && event.groupOpenid) return await sendGroupMessage(account.appId, token, event.groupOpenid, chunk, event.messageId);
|
|
873
|
+
else if (event.type === "dm" && event.guildId) return await sendDmMessage(token, event.guildId, chunk, event.messageId);
|
|
874
|
+
else if (event.channelId) return await sendChannelMessage(token, event.channelId, chunk, event.messageId);
|
|
875
|
+
});
|
|
876
|
+
log?.info(`${prefix} Sent text chunk (${chunk.length}/${text.length} chars): ${chunk.slice(0, 50)}...`);
|
|
877
|
+
} catch (err) {
|
|
878
|
+
log?.error(`${prefix} Failed to send text chunk: ${err}`);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
/** Send voice with a 45s timeout guard. */
|
|
882
|
+
async function sendVoiceWithTimeout(target, voicePath, account, log, prefix) {
|
|
883
|
+
const uploadFormats = account.config?.audioFormatPolicy?.uploadDirectFormats ?? account.config?.voiceDirectUploadFormats;
|
|
884
|
+
const transcodeEnabled = account.config?.audioFormatPolicy?.transcodeEnabled !== false;
|
|
885
|
+
const voiceTimeout = 45e3;
|
|
886
|
+
const ac = new AbortController();
|
|
887
|
+
try {
|
|
888
|
+
const result = await Promise.race([sendVoice(target, voicePath, uploadFormats, transcodeEnabled).then((r) => {
|
|
889
|
+
if (ac.signal.aborted) {
|
|
890
|
+
log?.info(`${prefix} sendVoice completed after timeout, suppressing late delivery`);
|
|
891
|
+
return {
|
|
892
|
+
channel: "qqbot",
|
|
893
|
+
error: "Voice send completed after timeout (suppressed)"
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
return r;
|
|
897
|
+
}), new Promise((resolve) => setTimeout(() => {
|
|
898
|
+
ac.abort();
|
|
899
|
+
resolve({
|
|
900
|
+
channel: "qqbot",
|
|
901
|
+
error: "Voice send timed out and was skipped"
|
|
902
|
+
});
|
|
903
|
+
}, voiceTimeout))]);
|
|
904
|
+
if (result.error) log?.error(`${prefix} sendVoice error: ${result.error}`);
|
|
905
|
+
} catch (err) {
|
|
906
|
+
log?.error(`${prefix} sendVoice unexpected error: ${err}`);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
/** Send in markdown mode. */
|
|
910
|
+
async function sendMarkdownReply(textWithoutImages, imageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
911
|
+
const { account, log } = actx;
|
|
912
|
+
const prefix = `[qqbot:${account.accountId}]`;
|
|
913
|
+
const httpImageUrls = [];
|
|
914
|
+
const base64ImageUrls = [];
|
|
915
|
+
for (const url of imageUrls) if (url.startsWith("data:image/")) base64ImageUrls.push(url);
|
|
916
|
+
else if (url.startsWith("http://") || url.startsWith("https://")) httpImageUrls.push(url);
|
|
917
|
+
log?.info(`${prefix} Image classification: httpUrls=${httpImageUrls.length}, base64=${base64ImageUrls.length}`);
|
|
918
|
+
if (base64ImageUrls.length > 0) {
|
|
919
|
+
log?.info(`${prefix} Sending ${base64ImageUrls.length} image(s) via Rich Media API...`);
|
|
920
|
+
for (const imageUrl of base64ImageUrls) try {
|
|
921
|
+
await sendWithRetry(async (token) => {
|
|
922
|
+
if (event.type === "c2c") await sendC2CImageMessage(account.appId, token, event.senderId, imageUrl, event.messageId);
|
|
923
|
+
else if (event.type === "group" && event.groupOpenid) await sendGroupImageMessage(account.appId, token, event.groupOpenid, imageUrl, event.messageId);
|
|
924
|
+
else if (event.type === "dm" && event.guildId) log?.info(`${prefix} DM does not support rich media image, skipping Base64 image`);
|
|
925
|
+
else if (event.channelId) log?.info(`${prefix} Channel does not support rich media, skipping Base64 image`);
|
|
926
|
+
});
|
|
927
|
+
log?.info(`${prefix} Sent Base64 image via Rich Media API (size: ${imageUrl.length} chars)`);
|
|
928
|
+
} catch (imgErr) {
|
|
929
|
+
log?.error(`${prefix} Failed to send Base64 image via Rich Media API: ${imgErr}`);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
const existingMdUrls = new Set(mdMatches.map((m) => m[2]));
|
|
933
|
+
const imagesToAppend = [];
|
|
934
|
+
for (const url of httpImageUrls) if (!existingMdUrls.has(url)) try {
|
|
935
|
+
const size = await getImageSize(url);
|
|
936
|
+
imagesToAppend.push(formatQQBotMarkdownImage(url, size));
|
|
937
|
+
log?.info(`${prefix} Formatted HTTP image: ${size ? `${size.width}x${size.height}` : "default size"} - ${url.slice(0, 60)}...`);
|
|
938
|
+
} catch (err) {
|
|
939
|
+
log?.info(`${prefix} Failed to get image size, using default: ${err}`);
|
|
940
|
+
imagesToAppend.push(formatQQBotMarkdownImage(url, null));
|
|
941
|
+
}
|
|
942
|
+
let result = textWithoutImages;
|
|
943
|
+
for (const m of mdMatches) {
|
|
944
|
+
const fullMatch = m[0];
|
|
945
|
+
const imgUrl = m[2];
|
|
946
|
+
if ((imgUrl.startsWith("http://") || imgUrl.startsWith("https://")) && !hasQQBotImageSize(fullMatch)) try {
|
|
947
|
+
const size = await getImageSize(imgUrl);
|
|
948
|
+
result = result.replace(fullMatch, formatQQBotMarkdownImage(imgUrl, size));
|
|
949
|
+
log?.info(`${prefix} Updated image with size: ${size ? `${size.width}x${size.height}` : "default"} - ${imgUrl.slice(0, 60)}...`);
|
|
950
|
+
} catch (err) {
|
|
951
|
+
log?.info(`${prefix} Failed to get image size for existing md, using default: ${err}`);
|
|
952
|
+
result = result.replace(fullMatch, formatQQBotMarkdownImage(imgUrl, null));
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
for (const m of bareUrlMatches) result = result.replace(m[0], "").trim();
|
|
956
|
+
if (imagesToAppend.length > 0) {
|
|
957
|
+
result = result.trim();
|
|
958
|
+
result = result ? result + "\n\n" + imagesToAppend.join("\n") : imagesToAppend.join("\n");
|
|
959
|
+
}
|
|
960
|
+
if (result.trim()) {
|
|
961
|
+
const mdChunks = chunkText(result, TEXT_CHUNK_LIMIT);
|
|
962
|
+
for (const chunk of mdChunks) try {
|
|
963
|
+
await sendWithRetry(async (token) => {
|
|
964
|
+
const ref = consumeQuoteRef();
|
|
965
|
+
if (event.type === "c2c") return await sendC2CMessage(account.appId, token, event.senderId, chunk, event.messageId, ref);
|
|
966
|
+
else if (event.type === "group" && event.groupOpenid) return await sendGroupMessage(account.appId, token, event.groupOpenid, chunk, event.messageId);
|
|
967
|
+
else if (event.type === "dm" && event.guildId) return await sendDmMessage(token, event.guildId, chunk, event.messageId);
|
|
968
|
+
else if (event.channelId) return await sendChannelMessage(token, event.channelId, chunk, event.messageId);
|
|
969
|
+
});
|
|
970
|
+
log?.info(`${prefix} Sent markdown chunk (${chunk.length}/${result.length} chars) with ${httpImageUrls.length} HTTP images (${event.type})`);
|
|
971
|
+
} catch (err) {
|
|
972
|
+
log?.error(`${prefix} Failed to send markdown message chunk: ${err}`);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
/** Send in plain-text mode. */
|
|
977
|
+
async function sendPlainTextReply(textWithoutImages, imageUrls, mdMatches, bareUrlMatches, event, actx, sendWithRetry, consumeQuoteRef) {
|
|
978
|
+
const { account, log } = actx;
|
|
979
|
+
const prefix = `[qqbot:${account.accountId}]`;
|
|
980
|
+
const imgMediaTarget = {
|
|
981
|
+
targetType: event.type === "c2c" ? "c2c" : event.type === "group" ? "group" : event.type === "dm" ? "dm" : "channel",
|
|
982
|
+
targetId: event.type === "c2c" ? event.senderId : event.type === "group" ? event.groupOpenid : event.type === "dm" ? event.guildId : event.channelId,
|
|
983
|
+
account,
|
|
984
|
+
replyToId: event.messageId,
|
|
985
|
+
logPrefix: prefix
|
|
986
|
+
};
|
|
987
|
+
let result = textWithoutImages;
|
|
988
|
+
for (const m of mdMatches) result = result.replace(m[0], "").trim();
|
|
989
|
+
for (const m of bareUrlMatches) result = result.replace(m[0], "").trim();
|
|
990
|
+
if (result && event.type !== "c2c") result = result.replace(/([a-zA-Z0-9])\.([a-zA-Z0-9])/g, "$1_$2");
|
|
991
|
+
try {
|
|
992
|
+
for (const imageUrl of imageUrls) try {
|
|
993
|
+
const imgResult = await sendPhoto(imgMediaTarget, imageUrl);
|
|
994
|
+
if (imgResult.error) log?.error(`${prefix} Failed to send image: ${imgResult.error}`);
|
|
995
|
+
else log?.info(`${prefix} Sent image via sendPhoto: ${imageUrl.slice(0, 80)}...`);
|
|
996
|
+
} catch (imgErr) {
|
|
997
|
+
log?.error(`${prefix} Failed to send image: ${imgErr}`);
|
|
998
|
+
}
|
|
999
|
+
if (result.trim()) {
|
|
1000
|
+
const plainChunks = chunkText(result, TEXT_CHUNK_LIMIT);
|
|
1001
|
+
for (const chunk of plainChunks) {
|
|
1002
|
+
await sendWithRetry(async (token) => {
|
|
1003
|
+
const ref = consumeQuoteRef();
|
|
1004
|
+
if (event.type === "c2c") return await sendC2CMessage(account.appId, token, event.senderId, chunk, event.messageId, ref);
|
|
1005
|
+
else if (event.type === "group" && event.groupOpenid) return await sendGroupMessage(account.appId, token, event.groupOpenid, chunk, event.messageId);
|
|
1006
|
+
else if (event.channelId) return await sendChannelMessage(token, event.channelId, chunk, event.messageId);
|
|
1007
|
+
});
|
|
1008
|
+
log?.info(`${prefix} Sent text chunk (${chunk.length}/${result.length} chars) (${event.type})`);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
} catch (err) {
|
|
1012
|
+
log?.error(`${prefix} Send failed: ${err}`);
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region extensions/qqbot/src/ref-index-store.ts
|
|
1017
|
+
const STORAGE_DIR = getQQBotDataDir("data");
|
|
1018
|
+
const REF_INDEX_FILE = path.join(STORAGE_DIR, "ref-index.jsonl");
|
|
1019
|
+
const MAX_ENTRIES = 5e4;
|
|
1020
|
+
const TTL_MS = 10080 * 60 * 1e3;
|
|
1021
|
+
const COMPACT_THRESHOLD_RATIO = 2;
|
|
1022
|
+
let cache = null;
|
|
1023
|
+
let totalLinesOnDisk = 0;
|
|
1024
|
+
/** Lazily load the JSONL store into memory. */
|
|
1025
|
+
function loadFromFile() {
|
|
1026
|
+
if (cache !== null) return cache;
|
|
1027
|
+
cache = /* @__PURE__ */ new Map();
|
|
1028
|
+
totalLinesOnDisk = 0;
|
|
1029
|
+
try {
|
|
1030
|
+
if (!fsSync.existsSync(REF_INDEX_FILE)) return cache;
|
|
1031
|
+
const lines = fsSync.readFileSync(REF_INDEX_FILE, "utf-8").split("\n");
|
|
1032
|
+
const now = Date.now();
|
|
1033
|
+
let expired = 0;
|
|
1034
|
+
for (const line of lines) {
|
|
1035
|
+
const trimmed = line.trim();
|
|
1036
|
+
if (!trimmed) continue;
|
|
1037
|
+
totalLinesOnDisk++;
|
|
1038
|
+
try {
|
|
1039
|
+
const entry = JSON.parse(trimmed);
|
|
1040
|
+
if (!entry.k || !entry.v || !entry.t) continue;
|
|
1041
|
+
if (now - entry.t > TTL_MS) {
|
|
1042
|
+
expired++;
|
|
1043
|
+
continue;
|
|
1044
|
+
}
|
|
1045
|
+
cache.set(entry.k, {
|
|
1046
|
+
...entry.v,
|
|
1047
|
+
_createdAt: entry.t
|
|
1048
|
+
});
|
|
1049
|
+
} catch {}
|
|
1050
|
+
}
|
|
1051
|
+
debugLog(`[ref-index-store] Loaded ${cache.size} entries from ${totalLinesOnDisk} lines (${expired} expired)`);
|
|
1052
|
+
if (shouldCompact()) compactFile();
|
|
1053
|
+
} catch (err) {
|
|
1054
|
+
debugError(`[ref-index-store] Failed to load: ${err}`);
|
|
1055
|
+
cache = /* @__PURE__ */ new Map();
|
|
1056
|
+
}
|
|
1057
|
+
return cache;
|
|
1058
|
+
}
|
|
1059
|
+
/** Append one record to the JSONL file. */
|
|
1060
|
+
function appendLine(line) {
|
|
1061
|
+
try {
|
|
1062
|
+
ensureDir$1();
|
|
1063
|
+
fsSync.appendFileSync(REF_INDEX_FILE, JSON.stringify(line) + "\n", "utf-8");
|
|
1064
|
+
totalLinesOnDisk++;
|
|
1065
|
+
} catch (err) {
|
|
1066
|
+
debugError(`[ref-index-store] Failed to append: ${err}`);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
function ensureDir$1() {
|
|
1070
|
+
if (!fsSync.existsSync(STORAGE_DIR)) fsSync.mkdirSync(STORAGE_DIR, { recursive: true });
|
|
1071
|
+
}
|
|
1072
|
+
function shouldCompact() {
|
|
1073
|
+
if (!cache) return false;
|
|
1074
|
+
return totalLinesOnDisk > cache.size * COMPACT_THRESHOLD_RATIO && totalLinesOnDisk > 1e3;
|
|
1075
|
+
}
|
|
1076
|
+
function compactFile() {
|
|
1077
|
+
if (!cache) return;
|
|
1078
|
+
const before = totalLinesOnDisk;
|
|
1079
|
+
try {
|
|
1080
|
+
ensureDir$1();
|
|
1081
|
+
const tmpPath = REF_INDEX_FILE + ".tmp";
|
|
1082
|
+
const lines = [];
|
|
1083
|
+
for (const [key, entry] of cache) {
|
|
1084
|
+
const line = {
|
|
1085
|
+
k: key,
|
|
1086
|
+
v: {
|
|
1087
|
+
content: entry.content,
|
|
1088
|
+
senderId: entry.senderId,
|
|
1089
|
+
senderName: entry.senderName,
|
|
1090
|
+
timestamp: entry.timestamp,
|
|
1091
|
+
isBot: entry.isBot,
|
|
1092
|
+
attachments: entry.attachments
|
|
1093
|
+
},
|
|
1094
|
+
t: entry._createdAt
|
|
1095
|
+
};
|
|
1096
|
+
lines.push(JSON.stringify(line));
|
|
1097
|
+
}
|
|
1098
|
+
fsSync.writeFileSync(tmpPath, lines.join("\n") + "\n", "utf-8");
|
|
1099
|
+
fsSync.renameSync(tmpPath, REF_INDEX_FILE);
|
|
1100
|
+
totalLinesOnDisk = cache.size;
|
|
1101
|
+
debugLog(`[ref-index-store] Compacted: ${before} lines → ${totalLinesOnDisk} lines`);
|
|
1102
|
+
} catch (err) {
|
|
1103
|
+
debugError(`[ref-index-store] Compact failed: ${err}`);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
function evictIfNeeded() {
|
|
1107
|
+
if (!cache || cache.size < MAX_ENTRIES) return;
|
|
1108
|
+
const now = Date.now();
|
|
1109
|
+
for (const [key, entry] of cache) if (now - entry._createdAt > TTL_MS) cache.delete(key);
|
|
1110
|
+
if (cache.size >= MAX_ENTRIES) {
|
|
1111
|
+
const toRemove = [...cache.entries()].sort((a, b) => a[1]._createdAt - b[1]._createdAt).slice(0, cache.size - MAX_ENTRIES + 1e3);
|
|
1112
|
+
for (const [key] of toRemove) cache.delete(key);
|
|
1113
|
+
debugLog(`[ref-index-store] Evicted ${toRemove.length} oldest entries`);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
/** Persist a refIdx mapping for one message. */
|
|
1117
|
+
function setRefIndex(refIdx, entry) {
|
|
1118
|
+
const store = loadFromFile();
|
|
1119
|
+
evictIfNeeded();
|
|
1120
|
+
const now = Date.now();
|
|
1121
|
+
store.set(refIdx, {
|
|
1122
|
+
content: entry.content,
|
|
1123
|
+
senderId: entry.senderId,
|
|
1124
|
+
senderName: entry.senderName,
|
|
1125
|
+
timestamp: entry.timestamp,
|
|
1126
|
+
isBot: entry.isBot,
|
|
1127
|
+
attachments: entry.attachments,
|
|
1128
|
+
_createdAt: now
|
|
1129
|
+
});
|
|
1130
|
+
appendLine({
|
|
1131
|
+
k: refIdx,
|
|
1132
|
+
v: {
|
|
1133
|
+
content: entry.content,
|
|
1134
|
+
senderId: entry.senderId,
|
|
1135
|
+
senderName: entry.senderName,
|
|
1136
|
+
timestamp: entry.timestamp,
|
|
1137
|
+
isBot: entry.isBot,
|
|
1138
|
+
attachments: entry.attachments
|
|
1139
|
+
},
|
|
1140
|
+
t: now
|
|
1141
|
+
});
|
|
1142
|
+
if (shouldCompact()) compactFile();
|
|
1143
|
+
}
|
|
1144
|
+
/** Look up one quoted message by refIdx. */
|
|
1145
|
+
function getRefIndex(refIdx) {
|
|
1146
|
+
const store = loadFromFile();
|
|
1147
|
+
const entry = store.get(refIdx);
|
|
1148
|
+
if (!entry) return null;
|
|
1149
|
+
if (Date.now() - entry._createdAt > TTL_MS) {
|
|
1150
|
+
store.delete(refIdx);
|
|
1151
|
+
return null;
|
|
1152
|
+
}
|
|
1153
|
+
return {
|
|
1154
|
+
content: entry.content,
|
|
1155
|
+
senderId: entry.senderId,
|
|
1156
|
+
senderName: entry.senderName,
|
|
1157
|
+
timestamp: entry.timestamp,
|
|
1158
|
+
isBot: entry.isBot,
|
|
1159
|
+
attachments: entry.attachments
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
/** Format a ref-index entry into text suitable for model context. */
|
|
1163
|
+
function formatRefEntryForAgent(entry) {
|
|
1164
|
+
const parts = [];
|
|
1165
|
+
if (entry.content.trim()) parts.push(entry.content);
|
|
1166
|
+
if (entry.attachments?.length) for (const att of entry.attachments) {
|
|
1167
|
+
const sourceHint = att.localPath ? ` (${att.localPath})` : att.url ? ` (${att.url})` : "";
|
|
1168
|
+
switch (att.type) {
|
|
1169
|
+
case "image":
|
|
1170
|
+
parts.push(`[image${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1171
|
+
break;
|
|
1172
|
+
case "voice":
|
|
1173
|
+
if (att.transcript) {
|
|
1174
|
+
const sourceTag = att.transcriptSource ? ` - ${{
|
|
1175
|
+
stt: "local STT",
|
|
1176
|
+
asr: "platform ASR",
|
|
1177
|
+
tts: "TTS source",
|
|
1178
|
+
fallback: "fallback text"
|
|
1179
|
+
}[att.transcriptSource] || att.transcriptSource}` : "";
|
|
1180
|
+
parts.push(`[voice message (content: "${att.transcript}"${sourceTag})${sourceHint}]`);
|
|
1181
|
+
} else parts.push(`[voice message${sourceHint}]`);
|
|
1182
|
+
break;
|
|
1183
|
+
case "video":
|
|
1184
|
+
parts.push(`[video${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1185
|
+
break;
|
|
1186
|
+
case "file":
|
|
1187
|
+
parts.push(`[file${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1188
|
+
break;
|
|
1189
|
+
default: parts.push(`[attachment${att.filename ? `: ${att.filename}` : ""}${sourceHint}]`);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
return parts.join(" ") || "[empty message]";
|
|
1193
|
+
}
|
|
1194
|
+
/** Compact the store before process exit when needed. */
|
|
1195
|
+
function flushRefIndex() {
|
|
1196
|
+
if (cache && shouldCompact()) compactFile();
|
|
1197
|
+
}
|
|
1198
|
+
//#endregion
|
|
1199
|
+
//#region extensions/qqbot/src/reply-dispatcher.ts
|
|
1200
|
+
/** Send a message and retry once if the token appears to have expired. */
|
|
1201
|
+
async function sendWithTokenRetry(appId, clientSecret, sendFn, log, accountId) {
|
|
1202
|
+
try {
|
|
1203
|
+
return await sendFn(await getAccessToken(appId, clientSecret));
|
|
1204
|
+
} catch (err) {
|
|
1205
|
+
const errMsg = String(err);
|
|
1206
|
+
if (errMsg.includes("401") || errMsg.includes("token") || errMsg.includes("access_token")) {
|
|
1207
|
+
log?.info(`[qqbot:${accountId}] Token may be expired, refreshing...`);
|
|
1208
|
+
clearTokenCache(appId);
|
|
1209
|
+
return await sendFn(await getAccessToken(appId, clientSecret));
|
|
1210
|
+
} else throw err;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
/** Route a text message to the correct QQ target type. */
|
|
1214
|
+
async function sendTextToTarget(ctx, text, refIdx) {
|
|
1215
|
+
const { target, account } = ctx;
|
|
1216
|
+
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1217
|
+
if (target.type === "c2c") await sendC2CMessage(account.appId, token, target.senderId, text, target.messageId, refIdx);
|
|
1218
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupMessage(account.appId, token, target.groupOpenid, text, target.messageId);
|
|
1219
|
+
else if (target.channelId) await sendChannelMessage(token, target.channelId, text, target.messageId);
|
|
1220
|
+
else if (target.type === "dm" && target.guildId) await sendDmMessage(token, target.guildId, text, target.messageId);
|
|
1221
|
+
}, ctx.log, account.accountId);
|
|
1222
|
+
}
|
|
1223
|
+
/** Best-effort delivery for error text back to the user. */
|
|
1224
|
+
async function sendErrorToTarget(ctx, errorText) {
|
|
1225
|
+
try {
|
|
1226
|
+
await sendTextToTarget(ctx, errorText);
|
|
1227
|
+
} catch (sendErr) {
|
|
1228
|
+
ctx.log?.error(`[qqbot:${ctx.account.accountId}] Failed to send error message: ${sendErr}`);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Handle a structured payload prefixed with `QQBOT_PAYLOAD:`.
|
|
1233
|
+
* Returns true when the reply was handled here, otherwise false.
|
|
1234
|
+
*/
|
|
1235
|
+
async function handleStructuredPayload(ctx, replyText, recordActivity) {
|
|
1236
|
+
const { target, account, cfg, log } = ctx;
|
|
1237
|
+
const payloadResult = parseQQBotPayload(replyText);
|
|
1238
|
+
if (!payloadResult.isPayload) return false;
|
|
1239
|
+
if (payloadResult.error) {
|
|
1240
|
+
log?.error(`[qqbot:${account.accountId}] Payload parse error: ${payloadResult.error}`);
|
|
1241
|
+
return true;
|
|
1242
|
+
}
|
|
1243
|
+
if (!payloadResult.payload) return true;
|
|
1244
|
+
const parsedPayload = payloadResult.payload;
|
|
1245
|
+
log?.info(`[qqbot:${account.accountId}] Detected structured payload, type: ${parsedPayload.type}`);
|
|
1246
|
+
if (isCronReminderPayload(parsedPayload)) {
|
|
1247
|
+
log?.info(`[qqbot:${account.accountId}] Processing cron_reminder payload`);
|
|
1248
|
+
const cronMessage = encodePayloadForCron(parsedPayload);
|
|
1249
|
+
const confirmText = `⏰ Reminder scheduled. It will be sent at the configured time: "${parsedPayload.content}"`;
|
|
1250
|
+
try {
|
|
1251
|
+
await sendTextToTarget(ctx, confirmText);
|
|
1252
|
+
log?.info(`[qqbot:${account.accountId}] Cron reminder confirmation sent, cronMessage: ${cronMessage}`);
|
|
1253
|
+
} catch (err) {
|
|
1254
|
+
log?.error(`[qqbot:${account.accountId}] Failed to send cron confirmation: ${err}`);
|
|
1255
|
+
}
|
|
1256
|
+
recordActivity();
|
|
1257
|
+
return true;
|
|
1258
|
+
}
|
|
1259
|
+
if (isMediaPayload(parsedPayload)) {
|
|
1260
|
+
log?.info(`[qqbot:${account.accountId}] Processing media payload, mediaType: ${parsedPayload.mediaType}`);
|
|
1261
|
+
if (parsedPayload.mediaType === "image") await handleImagePayload(ctx, parsedPayload);
|
|
1262
|
+
else if (parsedPayload.mediaType === "audio") await handleAudioPayload(ctx, parsedPayload);
|
|
1263
|
+
else if (parsedPayload.mediaType === "video") await handleVideoPayload(ctx, parsedPayload);
|
|
1264
|
+
else if (parsedPayload.mediaType === "file") await handleFilePayload(ctx, parsedPayload);
|
|
1265
|
+
else log?.error(`[qqbot:${account.accountId}] Unknown media type: ${parsedPayload.mediaType}`);
|
|
1266
|
+
recordActivity();
|
|
1267
|
+
return true;
|
|
1268
|
+
}
|
|
1269
|
+
log?.error(`[qqbot:${account.accountId}] Unknown payload type: ${parsedPayload.type}`);
|
|
1270
|
+
return true;
|
|
1271
|
+
}
|
|
1272
|
+
function validateStructuredPayloadLocalPath(ctx, payloadPath, mediaType) {
|
|
1273
|
+
const allowedPath = resolveQQBotPayloadLocalFilePath(payloadPath);
|
|
1274
|
+
if (allowedPath) return allowedPath;
|
|
1275
|
+
ctx.log?.error(`[qqbot:${ctx.account.accountId}] Blocked ${mediaType} payload local path outside QQ Bot media storage`);
|
|
1276
|
+
return null;
|
|
1277
|
+
}
|
|
1278
|
+
function isRemoteHttpUrl(p) {
|
|
1279
|
+
return p.startsWith("http://") || p.startsWith("https://");
|
|
1280
|
+
}
|
|
1281
|
+
function isInlineImageDataUrl(p) {
|
|
1282
|
+
return /^data:image\/[^;]+;base64,/i.test(p);
|
|
1283
|
+
}
|
|
1284
|
+
function sanitizeForLog(value, maxLen = 200) {
|
|
1285
|
+
return value.replace(/[\r\n\t\0]/g, " ").slice(0, maxLen);
|
|
1286
|
+
}
|
|
1287
|
+
function describeMediaTargetForLog(pathValue, isHttpUrl) {
|
|
1288
|
+
if (!isHttpUrl) return "<local-file>";
|
|
1289
|
+
try {
|
|
1290
|
+
const url = new URL(pathValue);
|
|
1291
|
+
url.username = "";
|
|
1292
|
+
url.password = "";
|
|
1293
|
+
const urlId = crypto.createHash("sha256").update(url.toString()).digest("hex").slice(0, 12);
|
|
1294
|
+
return sanitizeForLog(`${url.protocol}//${url.host}#${urlId}`);
|
|
1295
|
+
} catch {
|
|
1296
|
+
return "<invalid-url>";
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
async function readStructuredPayloadLocalFile(filePath) {
|
|
1300
|
+
const openFlags = fsSync.constants.O_RDONLY | ("O_NOFOLLOW" in fsSync.constants ? fsSync.constants.O_NOFOLLOW : 0);
|
|
1301
|
+
const handle = await fsSync.promises.open(filePath, openFlags);
|
|
1302
|
+
try {
|
|
1303
|
+
const stat = await handle.stat();
|
|
1304
|
+
if (!stat.isFile()) throw new Error("Path is not a regular file");
|
|
1305
|
+
if (stat.size > 20971520) throw new Error(`File is too large (${formatFileSize(stat.size)}); QQ Bot API limit is ${formatFileSize(MAX_UPLOAD_SIZE)}`);
|
|
1306
|
+
return handle.readFile();
|
|
1307
|
+
} finally {
|
|
1308
|
+
await handle.close();
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
async function handleImagePayload(ctx, payload) {
|
|
1312
|
+
const { target, account, log } = ctx;
|
|
1313
|
+
const normalizedPath = normalizePath(payload.path);
|
|
1314
|
+
let imageUrl;
|
|
1315
|
+
if (payload.source === "file") imageUrl = validateStructuredPayloadLocalPath(ctx, normalizedPath, "image");
|
|
1316
|
+
else if (isRemoteHttpUrl(normalizedPath) || isInlineImageDataUrl(normalizedPath)) imageUrl = normalizedPath;
|
|
1317
|
+
else {
|
|
1318
|
+
log?.error(`[qqbot:${account.accountId}] Image payload URL must use http(s) or data:image/: ${sanitizeForLog(payload.path)}`);
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
if (!imageUrl) return;
|
|
1322
|
+
const originalImagePath = payload.source === "file" ? imageUrl : void 0;
|
|
1323
|
+
if (payload.source === "file") try {
|
|
1324
|
+
const fileBuffer = await readStructuredPayloadLocalFile(imageUrl);
|
|
1325
|
+
const base64Data = fileBuffer.toString("base64");
|
|
1326
|
+
const ext = path.extname(imageUrl).toLowerCase();
|
|
1327
|
+
const mimeType = {
|
|
1328
|
+
".jpg": "image/jpeg",
|
|
1329
|
+
".jpeg": "image/jpeg",
|
|
1330
|
+
".png": "image/png",
|
|
1331
|
+
".gif": "image/gif",
|
|
1332
|
+
".webp": "image/webp",
|
|
1333
|
+
".bmp": "image/bmp"
|
|
1334
|
+
}[ext];
|
|
1335
|
+
if (!mimeType) {
|
|
1336
|
+
log?.error(`[qqbot:${account.accountId}] Unsupported image format: ${ext}`);
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
imageUrl = `data:${mimeType};base64,${base64Data}`;
|
|
1340
|
+
log?.info(`[qqbot:${account.accountId}] Converted local image to Base64 (size: ${formatFileSize(fileBuffer.length)})`);
|
|
1341
|
+
} catch (readErr) {
|
|
1342
|
+
log?.error(`[qqbot:${account.accountId}] Failed to read local image: ${readErr}`);
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
try {
|
|
1346
|
+
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1347
|
+
if (target.type === "c2c") await sendC2CImageMessage(account.appId, token, target.senderId, imageUrl, target.messageId, void 0, originalImagePath);
|
|
1348
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupImageMessage(account.appId, token, target.groupOpenid, imageUrl, target.messageId);
|
|
1349
|
+
else if (target.type === "dm" && target.guildId) await sendDmMessage(token, target.guildId, ``, target.messageId);
|
|
1350
|
+
else if (target.channelId) await sendChannelMessage(token, target.channelId, ``, target.messageId);
|
|
1351
|
+
}, log, account.accountId);
|
|
1352
|
+
log?.info(`[qqbot:${account.accountId}] Sent image via media payload`);
|
|
1353
|
+
if (payload.caption) await sendTextToTarget(ctx, payload.caption);
|
|
1354
|
+
} catch (err) {
|
|
1355
|
+
log?.error(`[qqbot:${account.accountId}] Failed to send image: ${err}`);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
async function handleAudioPayload(ctx, payload) {
|
|
1359
|
+
const { target, account, cfg, log } = ctx;
|
|
1360
|
+
try {
|
|
1361
|
+
const ttsText = payload.caption || payload.path;
|
|
1362
|
+
if (!ttsText?.trim()) {
|
|
1363
|
+
log?.error(`[qqbot:${account.accountId}] Voice missing text`);
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
let silkBase64;
|
|
1367
|
+
let silkPath;
|
|
1368
|
+
let duration;
|
|
1369
|
+
let providerLabel;
|
|
1370
|
+
const ttsCfg = resolveTTSConfig(cfg);
|
|
1371
|
+
if (ttsCfg) {
|
|
1372
|
+
log?.info(`[qqbot:${account.accountId}] TTS (plugin): "${ttsText.slice(0, 50)}..." via ${ttsCfg.model}`);
|
|
1373
|
+
const result = await textToSilk(ttsText, ttsCfg, getQQBotDataDir("tts"));
|
|
1374
|
+
silkBase64 = result.silkBase64;
|
|
1375
|
+
silkPath = result.silkPath;
|
|
1376
|
+
duration = result.duration;
|
|
1377
|
+
providerLabel = ttsCfg.model;
|
|
1378
|
+
} else {
|
|
1379
|
+
if (!isGlobalTTSAvailable(cfg)) {
|
|
1380
|
+
log?.error(`[qqbot:${account.accountId}] TTS not configured (neither plugin channels.qqbot.tts nor global messages.tts)`);
|
|
1381
|
+
return;
|
|
1382
|
+
}
|
|
1383
|
+
log?.info(`[qqbot:${account.accountId}] TTS (global fallback): "${ttsText.slice(0, 50)}..."`);
|
|
1384
|
+
const globalResult = await textToSpeech({
|
|
1385
|
+
text: ttsText,
|
|
1386
|
+
cfg,
|
|
1387
|
+
channel: "qqbot"
|
|
1388
|
+
});
|
|
1389
|
+
if (!globalResult.success || !globalResult.audioPath) {
|
|
1390
|
+
log?.error(`[qqbot:${account.accountId}] Global TTS failed: ${globalResult.error ?? "unknown"}`);
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
log?.info(`[qqbot:${account.accountId}] Global TTS returned: provider=${globalResult.provider}, format=${globalResult.outputFormat}, path=${globalResult.audioPath}`);
|
|
1394
|
+
providerLabel = globalResult.provider ?? "global";
|
|
1395
|
+
const base64 = await audioFileToSilkBase64(globalResult.audioPath);
|
|
1396
|
+
if (!base64) {
|
|
1397
|
+
log?.error(`[qqbot:${account.accountId}] Failed to convert global TTS audio to SILK`);
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
silkBase64 = base64;
|
|
1401
|
+
silkPath = globalResult.audioPath;
|
|
1402
|
+
duration = 0;
|
|
1403
|
+
}
|
|
1404
|
+
if (!silkBase64) {
|
|
1405
|
+
log?.error(`[qqbot:${account.accountId}] TTS produced no audio output`);
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
log?.info(`[qqbot:${account.accountId}] TTS done (${providerLabel}): ${duration ? formatDuration(duration) : "N/A"}, file: ${silkPath ?? "N/A"}`);
|
|
1409
|
+
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1410
|
+
if (target.type === "c2c") await sendC2CVoiceMessage(account.appId, token, target.senderId, silkBase64, void 0, target.messageId, ttsText, silkPath);
|
|
1411
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupVoiceMessage(account.appId, token, target.groupOpenid, silkBase64, void 0, target.messageId);
|
|
1412
|
+
else if (target.type === "dm" && target.guildId) {
|
|
1413
|
+
log?.error(`[qqbot:${account.accountId}] Voice not supported in DM, sending text fallback`);
|
|
1414
|
+
await sendDmMessage(token, target.guildId, ttsText, target.messageId);
|
|
1415
|
+
} else if (target.channelId) {
|
|
1416
|
+
log?.error(`[qqbot:${account.accountId}] Voice not supported in channel, sending text fallback`);
|
|
1417
|
+
await sendChannelMessage(token, target.channelId, ttsText, target.messageId);
|
|
1418
|
+
}
|
|
1419
|
+
}, log, account.accountId);
|
|
1420
|
+
log?.info(`[qqbot:${account.accountId}] Voice message sent`);
|
|
1421
|
+
} catch (err) {
|
|
1422
|
+
log?.error(`[qqbot:${account.accountId}] TTS/voice send failed: ${err}`);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
async function handleVideoPayload(ctx, payload) {
|
|
1426
|
+
const { target, account, log } = ctx;
|
|
1427
|
+
try {
|
|
1428
|
+
const originalPath = payload.path ?? "";
|
|
1429
|
+
const normalizedPath = normalizePath(originalPath);
|
|
1430
|
+
const isHttpUrl = isRemoteHttpUrl(normalizedPath);
|
|
1431
|
+
const videoPath = isHttpUrl ? normalizedPath : validateStructuredPayloadLocalPath(ctx, originalPath, "video");
|
|
1432
|
+
if (!videoPath) return;
|
|
1433
|
+
if (!videoPath.trim()) {
|
|
1434
|
+
log?.error(`[qqbot:${account.accountId}] Video missing path`);
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1437
|
+
log?.info(`[qqbot:${account.accountId}] Video send: ${describeMediaTargetForLog(videoPath, isHttpUrl)}`);
|
|
1438
|
+
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1439
|
+
if (isHttpUrl) {
|
|
1440
|
+
if (target.type === "c2c") await sendC2CVideoMessage(account.appId, token, target.senderId, videoPath, void 0, target.messageId);
|
|
1441
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupVideoMessage(account.appId, token, target.groupOpenid, videoPath, void 0, target.messageId);
|
|
1442
|
+
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] Video not supported in DM`);
|
|
1443
|
+
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] Video not supported in channel`);
|
|
1444
|
+
} else {
|
|
1445
|
+
const fileBuffer = await readStructuredPayloadLocalFile(videoPath);
|
|
1446
|
+
const videoBase64 = fileBuffer.toString("base64");
|
|
1447
|
+
log?.info(`[qqbot:${account.accountId}] Read local video (${formatFileSize(fileBuffer.length)}): ${describeMediaTargetForLog(videoPath, false)}`);
|
|
1448
|
+
if (target.type === "c2c") await sendC2CVideoMessage(account.appId, token, target.senderId, void 0, videoBase64, target.messageId, void 0, videoPath);
|
|
1449
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupVideoMessage(account.appId, token, target.groupOpenid, void 0, videoBase64, target.messageId);
|
|
1450
|
+
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] Video not supported in DM`);
|
|
1451
|
+
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] Video not supported in channel`);
|
|
1452
|
+
}
|
|
1453
|
+
}, log, account.accountId);
|
|
1454
|
+
log?.info(`[qqbot:${account.accountId}] Video message sent`);
|
|
1455
|
+
if (payload.caption) await sendTextToTarget(ctx, payload.caption);
|
|
1456
|
+
} catch (err) {
|
|
1457
|
+
log?.error(`[qqbot:${account.accountId}] Video send failed: ${err}`);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
async function handleFilePayload(ctx, payload) {
|
|
1461
|
+
const { target, account, log } = ctx;
|
|
1462
|
+
try {
|
|
1463
|
+
const originalPath = payload.path ?? "";
|
|
1464
|
+
const normalizedPath = normalizePath(originalPath);
|
|
1465
|
+
const isHttpUrl = isRemoteHttpUrl(normalizedPath);
|
|
1466
|
+
const filePath = isHttpUrl ? normalizedPath : validateStructuredPayloadLocalPath(ctx, originalPath, "file");
|
|
1467
|
+
if (!filePath) return;
|
|
1468
|
+
if (!filePath.trim()) {
|
|
1469
|
+
log?.error(`[qqbot:${account.accountId}] File missing path`);
|
|
1470
|
+
return;
|
|
1471
|
+
}
|
|
1472
|
+
const fileName = sanitizeFileName(path.basename(filePath));
|
|
1473
|
+
log?.info(`[qqbot:${account.accountId}] File send: ${describeMediaTargetForLog(filePath, isHttpUrl)} (${isHttpUrl ? "URL" : "local"})`);
|
|
1474
|
+
await sendWithTokenRetry(account.appId, account.clientSecret, async (token) => {
|
|
1475
|
+
if (isHttpUrl) {
|
|
1476
|
+
if (target.type === "c2c") await sendC2CFileMessage(account.appId, token, target.senderId, void 0, filePath, target.messageId, fileName);
|
|
1477
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupFileMessage(account.appId, token, target.groupOpenid, void 0, filePath, target.messageId, fileName);
|
|
1478
|
+
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] File not supported in DM`);
|
|
1479
|
+
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] File not supported in channel`);
|
|
1480
|
+
} else {
|
|
1481
|
+
const fileBase64 = (await readStructuredPayloadLocalFile(filePath)).toString("base64");
|
|
1482
|
+
if (target.type === "c2c") await sendC2CFileMessage(account.appId, token, target.senderId, fileBase64, void 0, target.messageId, fileName, filePath);
|
|
1483
|
+
else if (target.type === "group" && target.groupOpenid) await sendGroupFileMessage(account.appId, token, target.groupOpenid, fileBase64, void 0, target.messageId, fileName);
|
|
1484
|
+
else if (target.type === "dm") log?.error(`[qqbot:${account.accountId}] File not supported in DM`);
|
|
1485
|
+
else if (target.channelId) log?.error(`[qqbot:${account.accountId}] File not supported in channel`);
|
|
1486
|
+
}
|
|
1487
|
+
}, log, account.accountId);
|
|
1488
|
+
log?.info(`[qqbot:${account.accountId}] File message sent`);
|
|
1489
|
+
} catch (err) {
|
|
1490
|
+
log?.error(`[qqbot:${account.accountId}] File send failed: ${err}`);
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
//#endregion
|
|
1494
|
+
//#region extensions/qqbot/src/session-store.ts
|
|
1495
|
+
const SESSION_DIR = getQQBotDataDir("sessions");
|
|
1496
|
+
const SESSION_EXPIRE_TIME = 300 * 1e3;
|
|
1497
|
+
const SAVE_THROTTLE_MS = 1e3;
|
|
1498
|
+
const throttleState = /* @__PURE__ */ new Map();
|
|
1499
|
+
/** Ensure the session directory exists. */
|
|
1500
|
+
function ensureDir() {
|
|
1501
|
+
if (!fsSync.existsSync(SESSION_DIR)) fsSync.mkdirSync(SESSION_DIR, { recursive: true });
|
|
1502
|
+
}
|
|
1503
|
+
/** Return the session file path for one account. */
|
|
1504
|
+
function getSessionPath(accountId) {
|
|
1505
|
+
const safeId = accountId.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
1506
|
+
return path.join(SESSION_DIR, `session-${safeId}.json`);
|
|
1507
|
+
}
|
|
1508
|
+
/** Load a saved session, rejecting expired or mismatched appId entries. */
|
|
1509
|
+
function loadSession(accountId, expectedAppId) {
|
|
1510
|
+
const filePath = getSessionPath(accountId);
|
|
1511
|
+
try {
|
|
1512
|
+
if (!fsSync.existsSync(filePath)) return null;
|
|
1513
|
+
const data = fsSync.readFileSync(filePath, "utf-8");
|
|
1514
|
+
const state = JSON.parse(data);
|
|
1515
|
+
const now = Date.now();
|
|
1516
|
+
if (now - state.savedAt > SESSION_EXPIRE_TIME) {
|
|
1517
|
+
debugLog(`[session-store] Session expired for ${accountId}, age: ${Math.round((now - state.savedAt) / 1e3)}s`);
|
|
1518
|
+
try {
|
|
1519
|
+
fsSync.unlinkSync(filePath);
|
|
1520
|
+
} catch {}
|
|
1521
|
+
return null;
|
|
1522
|
+
}
|
|
1523
|
+
if (expectedAppId && state.appId && state.appId !== expectedAppId) {
|
|
1524
|
+
debugLog(`[session-store] appId mismatch for ${accountId}: saved=${state.appId}, current=${expectedAppId}. Discarding stale session.`);
|
|
1525
|
+
try {
|
|
1526
|
+
fsSync.unlinkSync(filePath);
|
|
1527
|
+
} catch {}
|
|
1528
|
+
return null;
|
|
1529
|
+
}
|
|
1530
|
+
if (!state.sessionId || state.lastSeq === null || state.lastSeq === void 0) {
|
|
1531
|
+
debugLog(`[session-store] Invalid session data for ${accountId}`);
|
|
1532
|
+
return null;
|
|
1533
|
+
}
|
|
1534
|
+
debugLog(`[session-store] Loaded session for ${accountId}: sessionId=${state.sessionId}, lastSeq=${state.lastSeq}, appId=${state.appId ?? "unknown"}, age=${Math.round((now - state.savedAt) / 1e3)}s`);
|
|
1535
|
+
return state;
|
|
1536
|
+
} catch (err) {
|
|
1537
|
+
debugError(`[session-store] Failed to load session for ${accountId}: ${err}`);
|
|
1538
|
+
return null;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
/** Save session state with throttling. */
|
|
1542
|
+
function saveSession(state) {
|
|
1543
|
+
const { accountId } = state;
|
|
1544
|
+
let throttle = throttleState.get(accountId);
|
|
1545
|
+
if (!throttle) {
|
|
1546
|
+
throttle = {
|
|
1547
|
+
pendingState: null,
|
|
1548
|
+
lastSaveTime: 0,
|
|
1549
|
+
throttleTimer: null
|
|
1550
|
+
};
|
|
1551
|
+
throttleState.set(accountId, throttle);
|
|
1552
|
+
}
|
|
1553
|
+
const now = Date.now();
|
|
1554
|
+
const timeSinceLastSave = now - throttle.lastSaveTime;
|
|
1555
|
+
if (timeSinceLastSave >= SAVE_THROTTLE_MS) {
|
|
1556
|
+
doSaveSession(state);
|
|
1557
|
+
throttle.lastSaveTime = now;
|
|
1558
|
+
throttle.pendingState = null;
|
|
1559
|
+
if (throttle.throttleTimer) {
|
|
1560
|
+
clearTimeout(throttle.throttleTimer);
|
|
1561
|
+
throttle.throttleTimer = null;
|
|
1562
|
+
}
|
|
1563
|
+
} else {
|
|
1564
|
+
throttle.pendingState = state;
|
|
1565
|
+
if (!throttle.throttleTimer) {
|
|
1566
|
+
const delay = SAVE_THROTTLE_MS - timeSinceLastSave;
|
|
1567
|
+
throttle.throttleTimer = setTimeout(() => {
|
|
1568
|
+
const t = throttleState.get(accountId);
|
|
1569
|
+
if (t && t.pendingState) {
|
|
1570
|
+
doSaveSession(t.pendingState);
|
|
1571
|
+
t.lastSaveTime = Date.now();
|
|
1572
|
+
t.pendingState = null;
|
|
1573
|
+
}
|
|
1574
|
+
if (t) t.throttleTimer = null;
|
|
1575
|
+
}, delay);
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
/** Write one session file to disk immediately. */
|
|
1580
|
+
function doSaveSession(state) {
|
|
1581
|
+
const filePath = getSessionPath(state.accountId);
|
|
1582
|
+
try {
|
|
1583
|
+
ensureDir();
|
|
1584
|
+
const stateToSave = {
|
|
1585
|
+
...state,
|
|
1586
|
+
savedAt: Date.now()
|
|
1587
|
+
};
|
|
1588
|
+
fsSync.writeFileSync(filePath, JSON.stringify(stateToSave, null, 2), "utf-8");
|
|
1589
|
+
debugLog(`[session-store] Saved session for ${state.accountId}: sessionId=${state.sessionId}, lastSeq=${state.lastSeq}`);
|
|
1590
|
+
} catch (err) {
|
|
1591
|
+
debugError(`[session-store] Failed to save session for ${state.accountId}: ${err}`);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
/** Clear a saved session and any pending throttle state. */
|
|
1595
|
+
function clearSession(accountId) {
|
|
1596
|
+
const filePath = getSessionPath(accountId);
|
|
1597
|
+
const throttle = throttleState.get(accountId);
|
|
1598
|
+
if (throttle) {
|
|
1599
|
+
if (throttle.throttleTimer) clearTimeout(throttle.throttleTimer);
|
|
1600
|
+
throttleState.delete(accountId);
|
|
1601
|
+
}
|
|
1602
|
+
try {
|
|
1603
|
+
if (fsSync.existsSync(filePath)) {
|
|
1604
|
+
fsSync.unlinkSync(filePath);
|
|
1605
|
+
debugLog(`[session-store] Cleared session for ${accountId}`);
|
|
1606
|
+
}
|
|
1607
|
+
} catch (err) {
|
|
1608
|
+
debugError(`[session-store] Failed to clear session for ${accountId}: ${err}`);
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
//#endregion
|
|
1612
|
+
//#region extensions/qqbot/src/typing-keepalive.ts
|
|
1613
|
+
/** Periodically refresh C2C typing state while a response is still in progress. */
|
|
1614
|
+
const TYPING_INTERVAL_MS = 5e4;
|
|
1615
|
+
var TypingKeepAlive = class {
|
|
1616
|
+
constructor(getToken, clearCache, openid, msgId, log, logPrefix = "[qqbot]") {
|
|
1617
|
+
this.getToken = getToken;
|
|
1618
|
+
this.clearCache = clearCache;
|
|
1619
|
+
this.openid = openid;
|
|
1620
|
+
this.msgId = msgId;
|
|
1621
|
+
this.log = log;
|
|
1622
|
+
this.logPrefix = logPrefix;
|
|
1623
|
+
this.timer = null;
|
|
1624
|
+
this.stopped = false;
|
|
1625
|
+
}
|
|
1626
|
+
/** Start periodic keep-alive sends. */
|
|
1627
|
+
start() {
|
|
1628
|
+
if (this.stopped) return;
|
|
1629
|
+
this.timer = setInterval(() => {
|
|
1630
|
+
if (this.stopped) {
|
|
1631
|
+
this.stop();
|
|
1632
|
+
return;
|
|
1633
|
+
}
|
|
1634
|
+
this.send().catch(() => {});
|
|
1635
|
+
}, TYPING_INTERVAL_MS);
|
|
1636
|
+
}
|
|
1637
|
+
/** Stop periodic keep-alive sends. */
|
|
1638
|
+
stop() {
|
|
1639
|
+
this.stopped = true;
|
|
1640
|
+
if (this.timer) {
|
|
1641
|
+
clearInterval(this.timer);
|
|
1642
|
+
this.timer = null;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
async send() {
|
|
1646
|
+
try {
|
|
1647
|
+
await sendC2CInputNotify(await this.getToken(), this.openid, this.msgId, 60);
|
|
1648
|
+
this.log?.debug?.(`${this.logPrefix} Typing keep-alive sent to ${this.openid}`);
|
|
1649
|
+
} catch (err) {
|
|
1650
|
+
try {
|
|
1651
|
+
this.clearCache();
|
|
1652
|
+
await sendC2CInputNotify(await this.getToken(), this.openid, this.msgId, 60);
|
|
1653
|
+
} catch {
|
|
1654
|
+
this.log?.debug?.(`${this.logPrefix} Typing keep-alive failed for ${this.openid}: ${err}`);
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
};
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region extensions/qqbot/src/gateway.ts
|
|
1661
|
+
const INTENTS = {
|
|
1662
|
+
GUILDS: 1,
|
|
1663
|
+
GUILD_MEMBERS: 2,
|
|
1664
|
+
PUBLIC_GUILD_MESSAGES: 1 << 30,
|
|
1665
|
+
DIRECT_MESSAGE: 4096,
|
|
1666
|
+
GROUP_AND_C2C: 1 << 25
|
|
1667
|
+
};
|
|
1668
|
+
const FULL_INTENTS = INTENTS.PUBLIC_GUILD_MESSAGES | INTENTS.DIRECT_MESSAGE | INTENTS.GROUP_AND_C2C;
|
|
1669
|
+
const FULL_INTENTS_DESC = "groups + DMs + channels";
|
|
1670
|
+
const RECONNECT_DELAYS = [
|
|
1671
|
+
1e3,
|
|
1672
|
+
2e3,
|
|
1673
|
+
5e3,
|
|
1674
|
+
1e4,
|
|
1675
|
+
3e4,
|
|
1676
|
+
6e4
|
|
1677
|
+
];
|
|
1678
|
+
const RATE_LIMIT_DELAY = 6e4;
|
|
1679
|
+
const MAX_RECONNECT_ATTEMPTS = 100;
|
|
1680
|
+
const MAX_QUICK_DISCONNECT_COUNT = 3;
|
|
1681
|
+
const QUICK_DISCONNECT_THRESHOLD = 5e3;
|
|
1682
|
+
/**
|
|
1683
|
+
* Start the Gateway WebSocket connection with automatic reconnect support.
|
|
1684
|
+
*/
|
|
1685
|
+
async function startGateway(ctx) {
|
|
1686
|
+
const { account, abortSignal, cfg, onReady, onError, log } = ctx;
|
|
1687
|
+
if (!account.appId || !account.clientSecret) throw new Error("QQBot not configured (missing appId or clientSecret)");
|
|
1688
|
+
const diag = await runDiagnostics();
|
|
1689
|
+
if (diag.warnings.length > 0) for (const w of diag.warnings) log?.info(`[qqbot:${account.accountId}] ${w}`);
|
|
1690
|
+
initApiConfig(account.appId, { markdownSupport: account.markdownSupport });
|
|
1691
|
+
log?.info(`[qqbot:${account.accountId}] API config: markdownSupport=${account.markdownSupport === true}`);
|
|
1692
|
+
onMessageSent(account.appId, (refIdx, meta) => {
|
|
1693
|
+
log?.info(`[qqbot:${account.accountId}] onMessageSent called: refIdx=${refIdx}, mediaType=${meta.mediaType}, ttsText=${meta.ttsText?.slice(0, 30)}`);
|
|
1694
|
+
const attachments = [];
|
|
1695
|
+
if (meta.mediaType) {
|
|
1696
|
+
const localPath = meta.mediaLocalPath;
|
|
1697
|
+
const filename = localPath ? path.basename(localPath) : void 0;
|
|
1698
|
+
const attachment = {
|
|
1699
|
+
type: meta.mediaType,
|
|
1700
|
+
...localPath ? { localPath } : {},
|
|
1701
|
+
...filename ? { filename } : {},
|
|
1702
|
+
...meta.mediaUrl ? { url: meta.mediaUrl } : {}
|
|
1703
|
+
};
|
|
1704
|
+
if (meta.mediaType === "voice" && meta.ttsText) {
|
|
1705
|
+
attachment.transcript = meta.ttsText;
|
|
1706
|
+
attachment.transcriptSource = "tts";
|
|
1707
|
+
log?.info(`[qqbot:${account.accountId}] Saving voice transcript (TTS): ${meta.ttsText.slice(0, 50)}`);
|
|
1708
|
+
}
|
|
1709
|
+
attachments.push(attachment);
|
|
1710
|
+
}
|
|
1711
|
+
setRefIndex(refIdx, {
|
|
1712
|
+
content: meta.text ?? "",
|
|
1713
|
+
senderId: account.accountId,
|
|
1714
|
+
senderName: account.accountId,
|
|
1715
|
+
timestamp: Date.now(),
|
|
1716
|
+
isBot: true,
|
|
1717
|
+
...attachments.length > 0 ? { attachments } : {}
|
|
1718
|
+
});
|
|
1719
|
+
log?.info(`[qqbot:${account.accountId}] Cached outbound refIdx: ${refIdx}, attachments=${JSON.stringify(attachments)}`);
|
|
1720
|
+
});
|
|
1721
|
+
const ttsCfg = resolveTTSConfig(cfg);
|
|
1722
|
+
if (ttsCfg) {
|
|
1723
|
+
const maskedKey = ttsCfg.apiKey.length > 8 ? `${ttsCfg.apiKey.slice(0, 4)}****${ttsCfg.apiKey.slice(-4)}` : "****";
|
|
1724
|
+
log?.info(`[qqbot:${account.accountId}] TTS configured (plugin): model=${ttsCfg.model}, voice=${ttsCfg.voice}, authStyle=${ttsCfg.authStyle ?? "bearer"}, baseUrl=${ttsCfg.baseUrl}`);
|
|
1725
|
+
log?.info(`[qqbot:${account.accountId}] TTS apiKey: ${maskedKey}${ttsCfg.queryParams ? `, queryParams=${JSON.stringify(ttsCfg.queryParams)}` : ""}${ttsCfg.speed !== void 0 ? `, speed=${ttsCfg.speed}` : ""}`);
|
|
1726
|
+
} else if (isGlobalTTSAvailable(cfg)) {
|
|
1727
|
+
const globalProvider = cfg.messages?.tts?.provider ?? "auto";
|
|
1728
|
+
log?.info(`[qqbot:${account.accountId}] TTS configured (global fallback): provider=${globalProvider}`);
|
|
1729
|
+
} else log?.info(`[qqbot:${account.accountId}] TTS not configured (voice messages will be unavailable)`);
|
|
1730
|
+
let reconnectAttempts = 0;
|
|
1731
|
+
let isAborted = false;
|
|
1732
|
+
let currentWs = null;
|
|
1733
|
+
let heartbeatInterval = null;
|
|
1734
|
+
let sessionId = null;
|
|
1735
|
+
let lastSeq = null;
|
|
1736
|
+
let lastConnectTime = 0;
|
|
1737
|
+
let quickDisconnectCount = 0;
|
|
1738
|
+
let isConnecting = false;
|
|
1739
|
+
let reconnectTimer = null;
|
|
1740
|
+
let shouldRefreshToken = false;
|
|
1741
|
+
const savedSession = loadSession(account.accountId, account.appId);
|
|
1742
|
+
if (savedSession) {
|
|
1743
|
+
sessionId = savedSession.sessionId;
|
|
1744
|
+
lastSeq = savedSession.lastSeq;
|
|
1745
|
+
log?.info(`[qqbot:${account.accountId}] Restored session from storage: sessionId=${sessionId}, lastSeq=${lastSeq}`);
|
|
1746
|
+
}
|
|
1747
|
+
const msgQueue = createMessageQueue({
|
|
1748
|
+
accountId: account.accountId,
|
|
1749
|
+
log,
|
|
1750
|
+
isAborted: () => isAborted
|
|
1751
|
+
});
|
|
1752
|
+
const URGENT_COMMANDS = ["/stop"];
|
|
1753
|
+
const trySlashCommandOrEnqueue = async (msg) => {
|
|
1754
|
+
const content = (msg.content ?? "").trim();
|
|
1755
|
+
if (!content.startsWith("/")) {
|
|
1756
|
+
msgQueue.enqueue(msg);
|
|
1757
|
+
return;
|
|
1758
|
+
}
|
|
1759
|
+
const contentLower = content.toLowerCase();
|
|
1760
|
+
if (URGENT_COMMANDS.some((cmd) => contentLower === cmd.toLowerCase() || contentLower.startsWith(cmd.toLowerCase() + " "))) {
|
|
1761
|
+
log?.info(`[qqbot:${account.accountId}] Urgent command detected: ${content.slice(0, 20)}, executing immediately`);
|
|
1762
|
+
const peerId = msgQueue.getMessagePeerId(msg);
|
|
1763
|
+
const droppedCount = msgQueue.clearUserQueue(peerId);
|
|
1764
|
+
if (droppedCount > 0) log?.info(`[qqbot:${account.accountId}] Dropped ${droppedCount} queued messages for ${peerId} due to urgent command`);
|
|
1765
|
+
msgQueue.executeImmediate(msg);
|
|
1766
|
+
return;
|
|
1767
|
+
}
|
|
1768
|
+
const receivedAt = Date.now();
|
|
1769
|
+
const peerId = msgQueue.getMessagePeerId(msg);
|
|
1770
|
+
const cmdCtx = {
|
|
1771
|
+
type: msg.type,
|
|
1772
|
+
senderId: msg.senderId,
|
|
1773
|
+
senderName: msg.senderName,
|
|
1774
|
+
messageId: msg.messageId,
|
|
1775
|
+
eventTimestamp: msg.timestamp,
|
|
1776
|
+
receivedAt,
|
|
1777
|
+
rawContent: content,
|
|
1778
|
+
args: "",
|
|
1779
|
+
channelId: msg.channelId,
|
|
1780
|
+
groupOpenid: msg.groupOpenid,
|
|
1781
|
+
accountId: account.accountId,
|
|
1782
|
+
appId: account.appId,
|
|
1783
|
+
accountConfig: account.config,
|
|
1784
|
+
commandAuthorized: true,
|
|
1785
|
+
queueSnapshot: msgQueue.getSnapshot(peerId)
|
|
1786
|
+
};
|
|
1787
|
+
try {
|
|
1788
|
+
const reply = await matchSlashCommand(cmdCtx);
|
|
1789
|
+
if (reply === null) {
|
|
1790
|
+
msgQueue.enqueue(msg);
|
|
1791
|
+
return;
|
|
1792
|
+
}
|
|
1793
|
+
log?.info(`[qqbot:${account.accountId}] Slash command matched: ${content}, replying directly`);
|
|
1794
|
+
const token = await getAccessToken(account.appId, account.clientSecret);
|
|
1795
|
+
const isFileResult = typeof reply === "object" && reply !== null && "filePath" in reply;
|
|
1796
|
+
const replyText = isFileResult ? reply.text : reply;
|
|
1797
|
+
const replyFile = isFileResult ? reply.filePath : null;
|
|
1798
|
+
if (msg.type === "c2c") await sendC2CMessage(account.appId, token, msg.senderId, replyText, msg.messageId);
|
|
1799
|
+
else if (msg.type === "group" && msg.groupOpenid) await sendGroupMessage(account.appId, token, msg.groupOpenid, replyText, msg.messageId);
|
|
1800
|
+
else if (msg.channelId) await sendChannelMessage(token, msg.channelId, replyText, msg.messageId);
|
|
1801
|
+
else if (msg.type === "dm" && msg.guildId) await sendDmMessage(token, msg.guildId, replyText, msg.messageId);
|
|
1802
|
+
if (replyFile) try {
|
|
1803
|
+
await sendDocument({
|
|
1804
|
+
targetType: msg.type === "group" ? "group" : msg.type === "dm" ? "dm" : msg.type === "c2c" ? "c2c" : "channel",
|
|
1805
|
+
targetId: msg.type === "group" ? msg.groupOpenid || msg.senderId : msg.type === "dm" ? msg.guildId || msg.senderId : msg.type === "c2c" ? msg.senderId : msg.channelId || msg.senderId,
|
|
1806
|
+
account,
|
|
1807
|
+
replyToId: msg.messageId,
|
|
1808
|
+
logPrefix: `[qqbot:${account.accountId}]`
|
|
1809
|
+
}, replyFile);
|
|
1810
|
+
log?.info(`[qqbot:${account.accountId}] Slash command file sent: ${replyFile}`);
|
|
1811
|
+
} catch (fileErr) {
|
|
1812
|
+
log?.error(`[qqbot:${account.accountId}] Failed to send slash command file: ${fileErr}`);
|
|
1813
|
+
}
|
|
1814
|
+
} catch (err) {
|
|
1815
|
+
log?.error(`[qqbot:${account.accountId}] Slash command error: ${err}`);
|
|
1816
|
+
msgQueue.enqueue(msg);
|
|
1817
|
+
}
|
|
1818
|
+
};
|
|
1819
|
+
abortSignal.addEventListener("abort", () => {
|
|
1820
|
+
isAborted = true;
|
|
1821
|
+
if (reconnectTimer) {
|
|
1822
|
+
clearTimeout(reconnectTimer);
|
|
1823
|
+
reconnectTimer = null;
|
|
1824
|
+
}
|
|
1825
|
+
cleanup();
|
|
1826
|
+
stopBackgroundTokenRefresh(account.appId);
|
|
1827
|
+
flushKnownUsers();
|
|
1828
|
+
flushRefIndex();
|
|
1829
|
+
});
|
|
1830
|
+
const cleanup = () => {
|
|
1831
|
+
if (heartbeatInterval) {
|
|
1832
|
+
clearInterval(heartbeatInterval);
|
|
1833
|
+
heartbeatInterval = null;
|
|
1834
|
+
}
|
|
1835
|
+
if (currentWs && (currentWs.readyState === WebSocket$1.OPEN || currentWs.readyState === WebSocket$1.CONNECTING)) currentWs.close();
|
|
1836
|
+
currentWs = null;
|
|
1837
|
+
};
|
|
1838
|
+
const getReconnectDelay = () => {
|
|
1839
|
+
return RECONNECT_DELAYS[Math.min(reconnectAttempts, RECONNECT_DELAYS.length - 1)];
|
|
1840
|
+
};
|
|
1841
|
+
const scheduleReconnect = (customDelay) => {
|
|
1842
|
+
if (isAborted || reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) {
|
|
1843
|
+
log?.error(`[qqbot:${account.accountId}] Max reconnect attempts reached or aborted`);
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
if (reconnectTimer) {
|
|
1847
|
+
clearTimeout(reconnectTimer);
|
|
1848
|
+
reconnectTimer = null;
|
|
1849
|
+
}
|
|
1850
|
+
const delay = customDelay ?? getReconnectDelay();
|
|
1851
|
+
reconnectAttempts++;
|
|
1852
|
+
log?.info(`[qqbot:${account.accountId}] Reconnecting in ${delay}ms (attempt ${reconnectAttempts})`);
|
|
1853
|
+
reconnectTimer = setTimeout(() => {
|
|
1854
|
+
reconnectTimer = null;
|
|
1855
|
+
if (!isAborted) connect();
|
|
1856
|
+
}, delay);
|
|
1857
|
+
};
|
|
1858
|
+
const connect = async () => {
|
|
1859
|
+
if (isConnecting) {
|
|
1860
|
+
log?.debug?.(`[qqbot:${account.accountId}] Already connecting, skip`);
|
|
1861
|
+
return;
|
|
1862
|
+
}
|
|
1863
|
+
isConnecting = true;
|
|
1864
|
+
try {
|
|
1865
|
+
cleanup();
|
|
1866
|
+
if (shouldRefreshToken) {
|
|
1867
|
+
log?.info(`[qqbot:${account.accountId}] Refreshing token...`);
|
|
1868
|
+
clearTokenCache(account.appId);
|
|
1869
|
+
shouldRefreshToken = false;
|
|
1870
|
+
}
|
|
1871
|
+
const accessToken = await getAccessToken(account.appId, account.clientSecret);
|
|
1872
|
+
log?.info(`[qqbot:${account.accountId}] ✅ Access token obtained successfully`);
|
|
1873
|
+
const gatewayUrl = await getGatewayUrl(accessToken);
|
|
1874
|
+
log?.info(`[qqbot:${account.accountId}] Connecting to ${gatewayUrl}`);
|
|
1875
|
+
const ws = new WebSocket$1(gatewayUrl, { headers: { "User-Agent": PLUGIN_USER_AGENT } });
|
|
1876
|
+
currentWs = ws;
|
|
1877
|
+
const pluginRuntime = getQQBotRuntime();
|
|
1878
|
+
const handleMessage = async (event) => {
|
|
1879
|
+
log?.debug?.(`[qqbot:${account.accountId}] Received message: ${JSON.stringify(event)}`);
|
|
1880
|
+
log?.info(`[qqbot:${account.accountId}] Processing message from ${event.senderId}: ${event.content}`);
|
|
1881
|
+
if (event.attachments?.length) log?.info(`[qqbot:${account.accountId}] Attachments: ${event.attachments.length}`);
|
|
1882
|
+
pluginRuntime.channel.activity.record({
|
|
1883
|
+
channel: "qqbot",
|
|
1884
|
+
accountId: account.accountId,
|
|
1885
|
+
direction: "inbound"
|
|
1886
|
+
});
|
|
1887
|
+
const isC2C = event.type === "c2c" || event.type === "dm";
|
|
1888
|
+
const typing = { keepAlive: null };
|
|
1889
|
+
const inputNotifyPromise = (async () => {
|
|
1890
|
+
if (!isC2C) return void 0;
|
|
1891
|
+
try {
|
|
1892
|
+
let token = await getAccessToken(account.appId, account.clientSecret);
|
|
1893
|
+
try {
|
|
1894
|
+
const notifyResponse = await sendC2CInputNotify(token, event.senderId, event.messageId, 60);
|
|
1895
|
+
log?.info(`[qqbot:${account.accountId}] Sent input notify to ${event.senderId}${notifyResponse.refIdx ? `, got refIdx=${notifyResponse.refIdx}` : ""}`);
|
|
1896
|
+
typing.keepAlive = new TypingKeepAlive(() => getAccessToken(account.appId, account.clientSecret), () => clearTokenCache(account.appId), event.senderId, event.messageId, log, `[qqbot:${account.accountId}]`);
|
|
1897
|
+
typing.keepAlive.start();
|
|
1898
|
+
return notifyResponse.refIdx;
|
|
1899
|
+
} catch (notifyErr) {
|
|
1900
|
+
const errMsg = String(notifyErr);
|
|
1901
|
+
if (errMsg.includes("token") || errMsg.includes("401") || errMsg.includes("11244")) {
|
|
1902
|
+
log?.info(`[qqbot:${account.accountId}] InputNotify token expired, refreshing...`);
|
|
1903
|
+
clearTokenCache(account.appId);
|
|
1904
|
+
token = await getAccessToken(account.appId, account.clientSecret);
|
|
1905
|
+
const notifyResponse = await sendC2CInputNotify(token, event.senderId, event.messageId, 60);
|
|
1906
|
+
typing.keepAlive = new TypingKeepAlive(() => getAccessToken(account.appId, account.clientSecret), () => clearTokenCache(account.appId), event.senderId, event.messageId, log, `[qqbot:${account.accountId}]`);
|
|
1907
|
+
typing.keepAlive.start();
|
|
1908
|
+
return notifyResponse.refIdx;
|
|
1909
|
+
} else throw notifyErr;
|
|
1910
|
+
}
|
|
1911
|
+
} catch (err) {
|
|
1912
|
+
log?.error(`[qqbot:${account.accountId}] sendC2CInputNotify error: ${err}`);
|
|
1913
|
+
return;
|
|
1914
|
+
}
|
|
1915
|
+
})();
|
|
1916
|
+
const isGroupChat = event.type === "guild" || event.type === "group";
|
|
1917
|
+
const peerId = event.type === "guild" ? event.channelId ?? "unknown" : event.type === "group" ? event.groupOpenid ?? "unknown" : event.senderId;
|
|
1918
|
+
const route = pluginRuntime.channel.routing.resolveAgentRoute({
|
|
1919
|
+
cfg,
|
|
1920
|
+
channel: "qqbot",
|
|
1921
|
+
accountId: account.accountId,
|
|
1922
|
+
peer: {
|
|
1923
|
+
kind: isGroupChat ? "group" : "direct",
|
|
1924
|
+
id: peerId
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
const envelopeOptions = pluginRuntime.channel.reply.resolveEnvelopeFormatOptions(cfg);
|
|
1928
|
+
const systemPrompts = [];
|
|
1929
|
+
if (account.systemPrompt) systemPrompts.push(account.systemPrompt);
|
|
1930
|
+
const { attachmentInfo, imageUrls, imageMediaTypes, voiceAttachmentPaths, voiceAttachmentUrls, voiceAsrReferTexts, voiceTranscripts, voiceTranscriptSources, attachmentLocalPaths } = await processAttachments(event.attachments, {
|
|
1931
|
+
accountId: account.accountId,
|
|
1932
|
+
cfg,
|
|
1933
|
+
log
|
|
1934
|
+
});
|
|
1935
|
+
const voiceText = formatVoiceText(voiceTranscripts);
|
|
1936
|
+
const hasAsrReferFallback = voiceTranscriptSources.includes("asr");
|
|
1937
|
+
const parsedContent = parseFaceTags(event.content);
|
|
1938
|
+
const userContent = voiceText ? (parsedContent.trim() ? `${parsedContent}\n${voiceText}` : voiceText) + attachmentInfo : parsedContent + attachmentInfo;
|
|
1939
|
+
let replyToId;
|
|
1940
|
+
let replyToBody;
|
|
1941
|
+
let replyToSender;
|
|
1942
|
+
let replyToIsQuote = false;
|
|
1943
|
+
if (event.refMsgIdx) {
|
|
1944
|
+
const refEntry = getRefIndex(event.refMsgIdx);
|
|
1945
|
+
if (refEntry) {
|
|
1946
|
+
replyToId = event.refMsgIdx;
|
|
1947
|
+
replyToBody = formatRefEntryForAgent(refEntry);
|
|
1948
|
+
replyToSender = refEntry.senderName ?? refEntry.senderId;
|
|
1949
|
+
replyToIsQuote = true;
|
|
1950
|
+
log?.info(`[qqbot:${account.accountId}] Quote detected: refMsgIdx=${event.refMsgIdx}, sender=${replyToSender}, content="${replyToBody.slice(0, 80)}..."`);
|
|
1951
|
+
} else {
|
|
1952
|
+
log?.info(`[qqbot:${account.accountId}] Quote detected but refMsgIdx not in cache: ${event.refMsgIdx}`);
|
|
1953
|
+
replyToId = event.refMsgIdx;
|
|
1954
|
+
replyToIsQuote = true;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
const inputNotifyRefIdx = await inputNotifyPromise;
|
|
1958
|
+
const currentMsgIdx = event.msgIdx ?? inputNotifyRefIdx;
|
|
1959
|
+
if (currentMsgIdx) {
|
|
1960
|
+
const attSummaries = buildAttachmentSummaries(event.attachments, attachmentLocalPaths);
|
|
1961
|
+
if (attSummaries && voiceTranscripts.length > 0) {
|
|
1962
|
+
let voiceIdx = 0;
|
|
1963
|
+
for (const att of attSummaries) if (att.type === "voice" && voiceIdx < voiceTranscripts.length) {
|
|
1964
|
+
att.transcript = voiceTranscripts[voiceIdx];
|
|
1965
|
+
if (voiceIdx < voiceTranscriptSources.length) att.transcriptSource = voiceTranscriptSources[voiceIdx];
|
|
1966
|
+
voiceIdx++;
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
setRefIndex(currentMsgIdx, {
|
|
1970
|
+
content: parsedContent,
|
|
1971
|
+
senderId: event.senderId,
|
|
1972
|
+
senderName: event.senderName,
|
|
1973
|
+
timestamp: new Date(event.timestamp).getTime(),
|
|
1974
|
+
attachments: attSummaries
|
|
1975
|
+
});
|
|
1976
|
+
log?.info(`[qqbot:${account.accountId}] Cached msgIdx=${currentMsgIdx} for future reference (source: ${event.msgIdx ? "message_scene.ext" : "InputNotify"})`);
|
|
1977
|
+
}
|
|
1978
|
+
const body = pluginRuntime.channel.reply.formatInboundEnvelope({
|
|
1979
|
+
channel: "qqbot",
|
|
1980
|
+
from: event.senderName ?? event.senderId,
|
|
1981
|
+
timestamp: new Date(event.timestamp).getTime(),
|
|
1982
|
+
body: userContent,
|
|
1983
|
+
chatType: isGroupChat ? "group" : "direct",
|
|
1984
|
+
sender: {
|
|
1985
|
+
id: event.senderId,
|
|
1986
|
+
name: event.senderName
|
|
1987
|
+
},
|
|
1988
|
+
envelope: envelopeOptions,
|
|
1989
|
+
...imageUrls.length > 0 ? { imageUrls } : {}
|
|
1990
|
+
});
|
|
1991
|
+
const uniqueVoicePaths = [...new Set(voiceAttachmentPaths)];
|
|
1992
|
+
const uniqueVoiceUrls = [...new Set(voiceAttachmentUrls)];
|
|
1993
|
+
const uniqueVoiceAsrReferTexts = [...new Set(voiceAsrReferTexts)].filter(Boolean);
|
|
1994
|
+
const sttTranscriptCount = voiceTranscriptSources.filter((s) => s === "stt").length;
|
|
1995
|
+
const asrFallbackCount = voiceTranscriptSources.filter((s) => s === "asr").length;
|
|
1996
|
+
const fallbackCount = voiceTranscriptSources.filter((s) => s === "fallback").length;
|
|
1997
|
+
if (voiceAttachmentPaths.length > 0 || voiceAttachmentUrls.length > 0 || uniqueVoiceAsrReferTexts.length > 0) {
|
|
1998
|
+
const asrPreview = uniqueVoiceAsrReferTexts.length > 0 ? uniqueVoiceAsrReferTexts[0].slice(0, 50) : "";
|
|
1999
|
+
log?.info(`[qqbot:${account.accountId}] Voice input summary: local=${uniqueVoicePaths.length}, remote=${uniqueVoiceUrls.length}, asrReferTexts=${uniqueVoiceAsrReferTexts.length}, transcripts=${voiceTranscripts.length}, source(stt/asr/fallback)=${sttTranscriptCount}/${asrFallbackCount}/${fallbackCount}` + (asrPreview ? `, asr_preview="${asrPreview}${uniqueVoiceAsrReferTexts[0].length > 50 ? "..." : ""}"` : ""));
|
|
2000
|
+
}
|
|
2001
|
+
const qualifiedTarget = isGroupChat ? event.type === "guild" ? `qqbot:channel:${event.channelId}` : `qqbot:group:${event.groupOpenid}` : event.type === "dm" ? `qqbot:dm:${event.guildId}` : `qqbot:c2c:${event.senderId}`;
|
|
2002
|
+
const hasTTS = !!resolveTTSConfig(cfg) || isGlobalTTSAvailable(cfg);
|
|
2003
|
+
let quotePart = "";
|
|
2004
|
+
if (replyToIsQuote) if (replyToBody) quotePart = `[Quoted message begins]\n${replyToBody}\n[Quoted message ends]\n`;
|
|
2005
|
+
else quotePart = `[Quoted message begins]\nOriginal content unavailable\n[Quoted message ends]\n`;
|
|
2006
|
+
const staticParts = [`[QQBot] to=${qualifiedTarget}`];
|
|
2007
|
+
if (hasTTS) staticParts.push("voice synthesis enabled");
|
|
2008
|
+
const staticInstruction = staticParts.join(" | ");
|
|
2009
|
+
systemPrompts.unshift(staticInstruction);
|
|
2010
|
+
const dynLines = [];
|
|
2011
|
+
if (imageUrls.length > 0) dynLines.push(`- Images: ${imageUrls.join(", ")}`);
|
|
2012
|
+
if (uniqueVoicePaths.length > 0 || uniqueVoiceUrls.length > 0) dynLines.push(`- Voice: ${[...uniqueVoicePaths, ...uniqueVoiceUrls].join(", ")}`);
|
|
2013
|
+
if (uniqueVoiceAsrReferTexts.length > 0) dynLines.push(`- ASR: ${uniqueVoiceAsrReferTexts.join(" | ")}`);
|
|
2014
|
+
const dynamicCtx = dynLines.length > 0 ? dynLines.join("\n") + "\n" : "";
|
|
2015
|
+
const userMessage = `${quotePart}${userContent}`;
|
|
2016
|
+
const agentBody = userContent.startsWith("/") ? userContent : `${systemPrompts.join("\n")}\n\n${dynamicCtx}${userMessage}`;
|
|
2017
|
+
log?.info(`[qqbot:${account.accountId}] agentBody length: ${agentBody.length}`);
|
|
2018
|
+
const fromAddress = event.type === "guild" ? `qqbot:channel:${event.channelId}` : event.type === "group" ? `qqbot:group:${event.groupOpenid}` : `qqbot:c2c:${event.senderId}`;
|
|
2019
|
+
const toAddress = fromAddress;
|
|
2020
|
+
const rawAllowFrom = account.config?.allowFrom ?? [];
|
|
2021
|
+
const normalizedAllowFrom = qqbotPlugin.config?.formatAllowFrom ? qqbotPlugin.config.formatAllowFrom({
|
|
2022
|
+
cfg,
|
|
2023
|
+
accountId: account.accountId,
|
|
2024
|
+
allowFrom: rawAllowFrom
|
|
2025
|
+
}) : rawAllowFrom.map((e) => e.replace(/^qqbot:/i, "").toUpperCase());
|
|
2026
|
+
const normalizedSenderId = event.senderId.replace(/^qqbot:/i, "").toUpperCase();
|
|
2027
|
+
const commandAuthorized = normalizedAllowFrom.length === 0 || normalizedAllowFrom.some((e) => e === "*") || normalizedAllowFrom.includes(normalizedSenderId);
|
|
2028
|
+
const localMediaPaths = [];
|
|
2029
|
+
const localMediaTypes = [];
|
|
2030
|
+
const remoteMediaUrls = [];
|
|
2031
|
+
const remoteMediaTypes = [];
|
|
2032
|
+
for (let i = 0; i < imageUrls.length; i++) {
|
|
2033
|
+
const u = imageUrls[i];
|
|
2034
|
+
const t = imageMediaTypes[i] ?? "image/png";
|
|
2035
|
+
if (u.startsWith("http://") || u.startsWith("https://")) {
|
|
2036
|
+
remoteMediaUrls.push(u);
|
|
2037
|
+
remoteMediaTypes.push(t);
|
|
2038
|
+
} else {
|
|
2039
|
+
localMediaPaths.push(u);
|
|
2040
|
+
localMediaTypes.push(t);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
const ctxPayload = pluginRuntime.channel.reply.finalizeInboundContext({
|
|
2044
|
+
Body: body,
|
|
2045
|
+
BodyForAgent: agentBody,
|
|
2046
|
+
RawBody: event.content,
|
|
2047
|
+
CommandBody: event.content,
|
|
2048
|
+
From: fromAddress,
|
|
2049
|
+
To: toAddress,
|
|
2050
|
+
SessionKey: route.sessionKey,
|
|
2051
|
+
AccountId: route.accountId,
|
|
2052
|
+
ChatType: isGroupChat ? "group" : "direct",
|
|
2053
|
+
SenderId: event.senderId,
|
|
2054
|
+
SenderName: event.senderName,
|
|
2055
|
+
Provider: "qqbot",
|
|
2056
|
+
Surface: "qqbot",
|
|
2057
|
+
MessageSid: event.messageId,
|
|
2058
|
+
Timestamp: new Date(event.timestamp).getTime(),
|
|
2059
|
+
OriginatingChannel: "qqbot",
|
|
2060
|
+
OriginatingTo: toAddress,
|
|
2061
|
+
QQChannelId: event.channelId,
|
|
2062
|
+
QQGuildId: event.guildId,
|
|
2063
|
+
QQGroupOpenid: event.groupOpenid,
|
|
2064
|
+
QQVoiceAsrReferAvailable: hasAsrReferFallback,
|
|
2065
|
+
QQVoiceTranscriptSources: voiceTranscriptSources,
|
|
2066
|
+
QQVoiceAttachmentPaths: uniqueVoicePaths,
|
|
2067
|
+
QQVoiceAttachmentUrls: uniqueVoiceUrls,
|
|
2068
|
+
QQVoiceAsrReferTexts: uniqueVoiceAsrReferTexts,
|
|
2069
|
+
QQVoiceInputStrategy: "prefer_audio_stt_then_asr_fallback",
|
|
2070
|
+
CommandAuthorized: commandAuthorized,
|
|
2071
|
+
...localMediaPaths.length > 0 ? {
|
|
2072
|
+
MediaPaths: localMediaPaths,
|
|
2073
|
+
MediaPath: localMediaPaths[0],
|
|
2074
|
+
MediaTypes: localMediaTypes,
|
|
2075
|
+
MediaType: localMediaTypes[0]
|
|
2076
|
+
} : {},
|
|
2077
|
+
...remoteMediaUrls.length > 0 ? {
|
|
2078
|
+
MediaUrls: remoteMediaUrls,
|
|
2079
|
+
MediaUrl: remoteMediaUrls[0]
|
|
2080
|
+
} : {},
|
|
2081
|
+
...replyToId ? {
|
|
2082
|
+
ReplyToId: replyToId,
|
|
2083
|
+
ReplyToBody: replyToBody,
|
|
2084
|
+
ReplyToSender: replyToSender,
|
|
2085
|
+
ReplyToIsQuote: replyToIsQuote
|
|
2086
|
+
} : {}
|
|
2087
|
+
});
|
|
2088
|
+
const replyCtx = {
|
|
2089
|
+
target: {
|
|
2090
|
+
type: event.type,
|
|
2091
|
+
senderId: event.senderId,
|
|
2092
|
+
messageId: event.messageId,
|
|
2093
|
+
channelId: event.channelId,
|
|
2094
|
+
guildId: event.guildId,
|
|
2095
|
+
groupOpenid: event.groupOpenid
|
|
2096
|
+
},
|
|
2097
|
+
account,
|
|
2098
|
+
cfg,
|
|
2099
|
+
log
|
|
2100
|
+
};
|
|
2101
|
+
const sendWithRetry = (sendFn) => sendWithTokenRetry(account.appId, account.clientSecret, sendFn, log, account.accountId);
|
|
2102
|
+
const sendErrorMessage = (errorText) => sendErrorToTarget(replyCtx, errorText);
|
|
2103
|
+
try {
|
|
2104
|
+
const messagesConfig = pluginRuntime.channel.reply.resolveEffectiveMessagesConfig(cfg, route.agentId);
|
|
2105
|
+
let hasResponse = false;
|
|
2106
|
+
let hasBlockResponse = false;
|
|
2107
|
+
let toolDeliverCount = 0;
|
|
2108
|
+
const toolTexts = [];
|
|
2109
|
+
const toolMediaUrls = [];
|
|
2110
|
+
let toolFallbackSent = false;
|
|
2111
|
+
const responseTimeout = 12e4;
|
|
2112
|
+
const toolOnlyTimeout = 6e4;
|
|
2113
|
+
const maxToolRenewals = 3;
|
|
2114
|
+
let toolRenewalCount = 0;
|
|
2115
|
+
let timeoutId = null;
|
|
2116
|
+
let toolOnlyTimeoutId = null;
|
|
2117
|
+
const sendToolFallback = async () => {
|
|
2118
|
+
if (toolMediaUrls.length > 0) {
|
|
2119
|
+
log?.info(`[qqbot:${account.accountId}] Tool fallback: forwarding ${toolMediaUrls.length} media URL(s) from tool deliver(s)`);
|
|
2120
|
+
const mediaTimeout = 45e3;
|
|
2121
|
+
for (const mediaUrl of toolMediaUrls) {
|
|
2122
|
+
const ac = new AbortController();
|
|
2123
|
+
try {
|
|
2124
|
+
const result = await Promise.race([sendMedia({
|
|
2125
|
+
to: qualifiedTarget,
|
|
2126
|
+
text: "",
|
|
2127
|
+
mediaUrl,
|
|
2128
|
+
accountId: account.accountId,
|
|
2129
|
+
replyToId: event.messageId,
|
|
2130
|
+
account
|
|
2131
|
+
}).then((r) => {
|
|
2132
|
+
if (ac.signal.aborted) {
|
|
2133
|
+
log?.info(`[qqbot:${account.accountId}] Tool fallback sendMedia completed after timeout, suppressing late delivery`);
|
|
2134
|
+
return {
|
|
2135
|
+
channel: "qqbot",
|
|
2136
|
+
error: "Media send completed after timeout (suppressed)"
|
|
2137
|
+
};
|
|
2138
|
+
}
|
|
2139
|
+
return r;
|
|
2140
|
+
}), new Promise((resolve) => setTimeout(() => {
|
|
2141
|
+
ac.abort();
|
|
2142
|
+
resolve({
|
|
2143
|
+
channel: "qqbot",
|
|
2144
|
+
error: `Tool fallback media send timeout (${mediaTimeout / 1e3}s)`
|
|
2145
|
+
});
|
|
2146
|
+
}, mediaTimeout))]);
|
|
2147
|
+
if (result.error) log?.error(`[qqbot:${account.accountId}] Tool fallback sendMedia error: ${result.error}`);
|
|
2148
|
+
} catch (err) {
|
|
2149
|
+
log?.error(`[qqbot:${account.accountId}] Tool fallback sendMedia failed: ${err}`);
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
return;
|
|
2153
|
+
}
|
|
2154
|
+
if (toolTexts.length > 0) {
|
|
2155
|
+
const text = toolTexts.slice(-3).join("\n---\n").slice(0, 2e3);
|
|
2156
|
+
log?.info(`[qqbot:${account.accountId}] Tool fallback: forwarding tool text (${text.length} chars)`);
|
|
2157
|
+
await sendErrorMessage(text);
|
|
2158
|
+
return;
|
|
2159
|
+
}
|
|
2160
|
+
log?.info(`[qqbot:${account.accountId}] Tool fallback: no media or text collected from ${toolDeliverCount} tool deliver(s), silently dropping`);
|
|
2161
|
+
};
|
|
2162
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
2163
|
+
timeoutId = setTimeout(() => {
|
|
2164
|
+
if (!hasResponse) reject(/* @__PURE__ */ new Error("Response timeout"));
|
|
2165
|
+
}, responseTimeout);
|
|
2166
|
+
});
|
|
2167
|
+
const dispatchPromise = pluginRuntime.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
2168
|
+
ctx: ctxPayload,
|
|
2169
|
+
cfg,
|
|
2170
|
+
dispatcherOptions: {
|
|
2171
|
+
responsePrefix: messagesConfig.responsePrefix,
|
|
2172
|
+
deliver: async (payload, info) => {
|
|
2173
|
+
hasResponse = true;
|
|
2174
|
+
log?.info(`[qqbot:${account.accountId}] deliver called, kind: ${info.kind}, payload keys: ${Object.keys(payload).join(", ")}`);
|
|
2175
|
+
if (info.kind === "tool") {
|
|
2176
|
+
toolDeliverCount++;
|
|
2177
|
+
const toolText = (payload.text ?? "").trim();
|
|
2178
|
+
if (toolText) toolTexts.push(toolText);
|
|
2179
|
+
if (payload.mediaUrls?.length) toolMediaUrls.push(...payload.mediaUrls);
|
|
2180
|
+
if (payload.mediaUrl && !toolMediaUrls.includes(payload.mediaUrl)) toolMediaUrls.push(payload.mediaUrl);
|
|
2181
|
+
log?.info(`[qqbot:${account.accountId}] Collected tool deliver #${toolDeliverCount}: text=${toolText.length} chars, media=${toolMediaUrls.length} URLs`);
|
|
2182
|
+
if (hasBlockResponse && toolMediaUrls.length > 0) {
|
|
2183
|
+
log?.info(`[qqbot:${account.accountId}] Block already sent, immediately forwarding ${toolMediaUrls.length} tool media URL(s)`);
|
|
2184
|
+
const urlsToSend = [...toolMediaUrls];
|
|
2185
|
+
toolMediaUrls.length = 0;
|
|
2186
|
+
for (const mediaUrl of urlsToSend) try {
|
|
2187
|
+
const result = await sendMedia({
|
|
2188
|
+
to: qualifiedTarget,
|
|
2189
|
+
text: "",
|
|
2190
|
+
mediaUrl,
|
|
2191
|
+
accountId: account.accountId,
|
|
2192
|
+
replyToId: event.messageId,
|
|
2193
|
+
account
|
|
2194
|
+
});
|
|
2195
|
+
if (result.error) log?.error(`[qqbot:${account.accountId}] Tool media immediate forward error: ${result.error}`);
|
|
2196
|
+
else log?.info(`[qqbot:${account.accountId}] Forwarded tool media (post-block): ${mediaUrl.slice(0, 80)}...`);
|
|
2197
|
+
} catch (err) {
|
|
2198
|
+
log?.error(`[qqbot:${account.accountId}] Tool media immediate forward failed: ${err}`);
|
|
2199
|
+
}
|
|
2200
|
+
return;
|
|
2201
|
+
}
|
|
2202
|
+
if (toolFallbackSent) return;
|
|
2203
|
+
if (toolOnlyTimeoutId) if (toolRenewalCount < maxToolRenewals) {
|
|
2204
|
+
clearTimeout(toolOnlyTimeoutId);
|
|
2205
|
+
toolRenewalCount++;
|
|
2206
|
+
log?.info(`[qqbot:${account.accountId}] Tool-only timer renewed (${toolRenewalCount}/${maxToolRenewals})`);
|
|
2207
|
+
} else {
|
|
2208
|
+
log?.info(`[qqbot:${account.accountId}] Tool-only timer renewal limit reached (${maxToolRenewals}), waiting for timeout`);
|
|
2209
|
+
return;
|
|
2210
|
+
}
|
|
2211
|
+
toolOnlyTimeoutId = setTimeout(async () => {
|
|
2212
|
+
if (!hasBlockResponse && !toolFallbackSent) {
|
|
2213
|
+
toolFallbackSent = true;
|
|
2214
|
+
log?.error(`[qqbot:${account.accountId}] Tool-only timeout: ${toolDeliverCount} tool deliver(s) but no block within ${toolOnlyTimeout / 1e3}s, sending fallback`);
|
|
2215
|
+
try {
|
|
2216
|
+
await sendToolFallback();
|
|
2217
|
+
} catch (sendErr) {
|
|
2218
|
+
log?.error(`[qqbot:${account.accountId}] Failed to send tool-only fallback: ${sendErr}`);
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
}, toolOnlyTimeout);
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
hasBlockResponse = true;
|
|
2225
|
+
typing.keepAlive?.stop();
|
|
2226
|
+
if (timeoutId) {
|
|
2227
|
+
clearTimeout(timeoutId);
|
|
2228
|
+
timeoutId = null;
|
|
2229
|
+
}
|
|
2230
|
+
if (toolOnlyTimeoutId) {
|
|
2231
|
+
clearTimeout(toolOnlyTimeoutId);
|
|
2232
|
+
toolOnlyTimeoutId = null;
|
|
2233
|
+
}
|
|
2234
|
+
if (toolDeliverCount > 0) log?.info(`[qqbot:${account.accountId}] Block deliver after ${toolDeliverCount} tool deliver(s)`);
|
|
2235
|
+
const quoteRef = event.msgIdx;
|
|
2236
|
+
let quoteRefUsed = false;
|
|
2237
|
+
const consumeQuoteRef = () => {
|
|
2238
|
+
if (quoteRef && !quoteRefUsed) {
|
|
2239
|
+
quoteRefUsed = true;
|
|
2240
|
+
return quoteRef;
|
|
2241
|
+
}
|
|
2242
|
+
};
|
|
2243
|
+
let replyText = payload.text ?? "";
|
|
2244
|
+
const deliverEvent = {
|
|
2245
|
+
type: event.type,
|
|
2246
|
+
senderId: event.senderId,
|
|
2247
|
+
messageId: event.messageId,
|
|
2248
|
+
channelId: event.channelId,
|
|
2249
|
+
groupOpenid: event.groupOpenid,
|
|
2250
|
+
msgIdx: event.msgIdx
|
|
2251
|
+
};
|
|
2252
|
+
const deliverActx = {
|
|
2253
|
+
account,
|
|
2254
|
+
qualifiedTarget,
|
|
2255
|
+
log
|
|
2256
|
+
};
|
|
2257
|
+
const mediaResult = await parseAndSendMediaTags(replyText, deliverEvent, deliverActx, sendWithRetry, consumeQuoteRef);
|
|
2258
|
+
if (mediaResult.handled) {
|
|
2259
|
+
pluginRuntime.channel.activity.record({
|
|
2260
|
+
channel: "qqbot",
|
|
2261
|
+
accountId: account.accountId,
|
|
2262
|
+
direction: "outbound"
|
|
2263
|
+
});
|
|
2264
|
+
return;
|
|
2265
|
+
}
|
|
2266
|
+
replyText = mediaResult.normalizedText;
|
|
2267
|
+
const recordOutboundActivity = () => pluginRuntime.channel.activity.record({
|
|
2268
|
+
channel: "qqbot",
|
|
2269
|
+
accountId: account.accountId,
|
|
2270
|
+
direction: "outbound"
|
|
2271
|
+
});
|
|
2272
|
+
if (await handleStructuredPayload(replyCtx, replyText, recordOutboundActivity)) return;
|
|
2273
|
+
await sendPlainReply(payload, replyText, deliverEvent, deliverActx, sendWithRetry, consumeQuoteRef, toolMediaUrls);
|
|
2274
|
+
pluginRuntime.channel.activity.record({
|
|
2275
|
+
channel: "qqbot",
|
|
2276
|
+
accountId: account.accountId,
|
|
2277
|
+
direction: "outbound"
|
|
2278
|
+
});
|
|
2279
|
+
},
|
|
2280
|
+
onError: async (err) => {
|
|
2281
|
+
log?.error(`[qqbot:${account.accountId}] Dispatch error: ${err}`);
|
|
2282
|
+
hasResponse = true;
|
|
2283
|
+
if (timeoutId) {
|
|
2284
|
+
clearTimeout(timeoutId);
|
|
2285
|
+
timeoutId = null;
|
|
2286
|
+
}
|
|
2287
|
+
const errMsg = String(err);
|
|
2288
|
+
if (errMsg.includes("401") || errMsg.includes("key") || errMsg.includes("auth")) log?.error(`[qqbot:${account.accountId}] AI auth error: ${errMsg}`);
|
|
2289
|
+
else log?.error(`[qqbot:${account.accountId}] AI process error: ${errMsg}`);
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
replyOptions: { disableBlockStreaming: true }
|
|
2293
|
+
});
|
|
2294
|
+
try {
|
|
2295
|
+
await Promise.race([dispatchPromise, timeoutPromise]);
|
|
2296
|
+
} catch (err) {
|
|
2297
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
2298
|
+
if (!hasResponse) log?.error(`[qqbot:${account.accountId}] No response within timeout`);
|
|
2299
|
+
} finally {
|
|
2300
|
+
if (toolOnlyTimeoutId) {
|
|
2301
|
+
clearTimeout(toolOnlyTimeoutId);
|
|
2302
|
+
toolOnlyTimeoutId = null;
|
|
2303
|
+
}
|
|
2304
|
+
if (toolDeliverCount > 0 && !hasBlockResponse && !toolFallbackSent) {
|
|
2305
|
+
toolFallbackSent = true;
|
|
2306
|
+
log?.error(`[qqbot:${account.accountId}] Dispatch completed with ${toolDeliverCount} tool deliver(s) but no block deliver, sending fallback`);
|
|
2307
|
+
await sendToolFallback();
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
} catch (err) {
|
|
2311
|
+
log?.error(`[qqbot:${account.accountId}] Message processing failed: ${err}`);
|
|
2312
|
+
} finally {
|
|
2313
|
+
typing.keepAlive?.stop();
|
|
2314
|
+
}
|
|
2315
|
+
};
|
|
2316
|
+
ws.on("open", () => {
|
|
2317
|
+
log?.info(`[qqbot:${account.accountId}] WebSocket connected`);
|
|
2318
|
+
isConnecting = false;
|
|
2319
|
+
reconnectAttempts = 0;
|
|
2320
|
+
lastConnectTime = Date.now();
|
|
2321
|
+
msgQueue.startProcessor(handleMessage);
|
|
2322
|
+
startBackgroundTokenRefresh(account.appId, account.clientSecret, { log });
|
|
2323
|
+
});
|
|
2324
|
+
ws.on("message", async (data) => {
|
|
2325
|
+
try {
|
|
2326
|
+
const rawData = data.toString();
|
|
2327
|
+
const { op, d, s, t } = JSON.parse(rawData);
|
|
2328
|
+
if (s) {
|
|
2329
|
+
lastSeq = s;
|
|
2330
|
+
if (sessionId) saveSession({
|
|
2331
|
+
sessionId,
|
|
2332
|
+
lastSeq,
|
|
2333
|
+
lastConnectedAt: lastConnectTime,
|
|
2334
|
+
intentLevelIndex: 0,
|
|
2335
|
+
accountId: account.accountId,
|
|
2336
|
+
savedAt: Date.now(),
|
|
2337
|
+
appId: account.appId
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
log?.debug?.(`[qqbot:${account.accountId}] Received op=${op} t=${t}`);
|
|
2341
|
+
switch (op) {
|
|
2342
|
+
case 10:
|
|
2343
|
+
log?.info(`[qqbot:${account.accountId}] Hello received`);
|
|
2344
|
+
if (sessionId && lastSeq !== null) {
|
|
2345
|
+
log?.info(`[qqbot:${account.accountId}] Attempting to resume session ${sessionId}`);
|
|
2346
|
+
ws.send(JSON.stringify({
|
|
2347
|
+
op: 6,
|
|
2348
|
+
d: {
|
|
2349
|
+
token: `QQBot ${accessToken}`,
|
|
2350
|
+
session_id: sessionId,
|
|
2351
|
+
seq: lastSeq
|
|
2352
|
+
}
|
|
2353
|
+
}));
|
|
2354
|
+
} else {
|
|
2355
|
+
log?.info(`[qqbot:${account.accountId}] Sending identify with intents: ${FULL_INTENTS} (${FULL_INTENTS_DESC})`);
|
|
2356
|
+
ws.send(JSON.stringify({
|
|
2357
|
+
op: 2,
|
|
2358
|
+
d: {
|
|
2359
|
+
token: `QQBot ${accessToken}`,
|
|
2360
|
+
intents: FULL_INTENTS,
|
|
2361
|
+
shard: [0, 1]
|
|
2362
|
+
}
|
|
2363
|
+
}));
|
|
2364
|
+
}
|
|
2365
|
+
const interval = d.heartbeat_interval;
|
|
2366
|
+
if (heartbeatInterval) clearInterval(heartbeatInterval);
|
|
2367
|
+
heartbeatInterval = setInterval(() => {
|
|
2368
|
+
if (ws.readyState === WebSocket$1.OPEN) {
|
|
2369
|
+
ws.send(JSON.stringify({
|
|
2370
|
+
op: 1,
|
|
2371
|
+
d: lastSeq
|
|
2372
|
+
}));
|
|
2373
|
+
log?.debug?.(`[qqbot:${account.accountId}] Heartbeat sent`);
|
|
2374
|
+
}
|
|
2375
|
+
}, interval);
|
|
2376
|
+
break;
|
|
2377
|
+
case 0:
|
|
2378
|
+
log?.info(`[qqbot:${account.accountId}] 📩 Dispatch event: t=${t}, d=${JSON.stringify(d)}`);
|
|
2379
|
+
if (t === "READY") {
|
|
2380
|
+
sessionId = d.session_id;
|
|
2381
|
+
log?.info(`[qqbot:${account.accountId}] Ready with ${FULL_INTENTS_DESC}, session: ${sessionId}`);
|
|
2382
|
+
saveSession({
|
|
2383
|
+
sessionId,
|
|
2384
|
+
lastSeq,
|
|
2385
|
+
lastConnectedAt: Date.now(),
|
|
2386
|
+
intentLevelIndex: 0,
|
|
2387
|
+
accountId: account.accountId,
|
|
2388
|
+
savedAt: Date.now(),
|
|
2389
|
+
appId: account.appId
|
|
2390
|
+
});
|
|
2391
|
+
onReady?.(d);
|
|
2392
|
+
} else if (t === "RESUMED") {
|
|
2393
|
+
log?.info(`[qqbot:${account.accountId}] Session resumed`);
|
|
2394
|
+
onReady?.(d);
|
|
2395
|
+
if (sessionId) saveSession({
|
|
2396
|
+
sessionId,
|
|
2397
|
+
lastSeq,
|
|
2398
|
+
lastConnectedAt: Date.now(),
|
|
2399
|
+
intentLevelIndex: 0,
|
|
2400
|
+
accountId: account.accountId,
|
|
2401
|
+
savedAt: Date.now(),
|
|
2402
|
+
appId: account.appId
|
|
2403
|
+
});
|
|
2404
|
+
} else if (t === "C2C_MESSAGE_CREATE") {
|
|
2405
|
+
const event = d;
|
|
2406
|
+
recordKnownUser({
|
|
2407
|
+
openid: event.author.user_openid,
|
|
2408
|
+
type: "c2c",
|
|
2409
|
+
accountId: account.accountId
|
|
2410
|
+
});
|
|
2411
|
+
const c2cRefs = parseRefIndices(event.message_scene?.ext);
|
|
2412
|
+
trySlashCommandOrEnqueue({
|
|
2413
|
+
type: "c2c",
|
|
2414
|
+
senderId: event.author.user_openid,
|
|
2415
|
+
content: event.content,
|
|
2416
|
+
messageId: event.id,
|
|
2417
|
+
timestamp: event.timestamp,
|
|
2418
|
+
attachments: event.attachments,
|
|
2419
|
+
refMsgIdx: c2cRefs.refMsgIdx,
|
|
2420
|
+
msgIdx: c2cRefs.msgIdx
|
|
2421
|
+
});
|
|
2422
|
+
} else if (t === "AT_MESSAGE_CREATE") {
|
|
2423
|
+
const event = d;
|
|
2424
|
+
const guildRefs = parseRefIndices(event.message_scene?.ext);
|
|
2425
|
+
trySlashCommandOrEnqueue({
|
|
2426
|
+
type: "guild",
|
|
2427
|
+
senderId: event.author.id,
|
|
2428
|
+
senderName: event.author.username,
|
|
2429
|
+
content: event.content,
|
|
2430
|
+
messageId: event.id,
|
|
2431
|
+
timestamp: event.timestamp,
|
|
2432
|
+
channelId: event.channel_id,
|
|
2433
|
+
guildId: event.guild_id,
|
|
2434
|
+
attachments: event.attachments,
|
|
2435
|
+
refMsgIdx: guildRefs.refMsgIdx,
|
|
2436
|
+
msgIdx: guildRefs.msgIdx
|
|
2437
|
+
});
|
|
2438
|
+
} else if (t === "DIRECT_MESSAGE_CREATE") {
|
|
2439
|
+
const event = d;
|
|
2440
|
+
const dmRefs = parseRefIndices(event.message_scene?.ext);
|
|
2441
|
+
trySlashCommandOrEnqueue({
|
|
2442
|
+
type: "dm",
|
|
2443
|
+
senderId: event.author.id,
|
|
2444
|
+
senderName: event.author.username,
|
|
2445
|
+
content: event.content,
|
|
2446
|
+
messageId: event.id,
|
|
2447
|
+
timestamp: event.timestamp,
|
|
2448
|
+
guildId: event.guild_id,
|
|
2449
|
+
attachments: event.attachments,
|
|
2450
|
+
refMsgIdx: dmRefs.refMsgIdx,
|
|
2451
|
+
msgIdx: dmRefs.msgIdx
|
|
2452
|
+
});
|
|
2453
|
+
} else if (t === "GROUP_AT_MESSAGE_CREATE") {
|
|
2454
|
+
const event = d;
|
|
2455
|
+
recordKnownUser({
|
|
2456
|
+
openid: event.author.member_openid,
|
|
2457
|
+
type: "group",
|
|
2458
|
+
groupOpenid: event.group_openid,
|
|
2459
|
+
accountId: account.accountId
|
|
2460
|
+
});
|
|
2461
|
+
const groupRefs = parseRefIndices(event.message_scene?.ext);
|
|
2462
|
+
trySlashCommandOrEnqueue({
|
|
2463
|
+
type: "group",
|
|
2464
|
+
senderId: event.author.member_openid,
|
|
2465
|
+
content: event.content,
|
|
2466
|
+
messageId: event.id,
|
|
2467
|
+
timestamp: event.timestamp,
|
|
2468
|
+
groupOpenid: event.group_openid,
|
|
2469
|
+
attachments: event.attachments,
|
|
2470
|
+
refMsgIdx: groupRefs.refMsgIdx,
|
|
2471
|
+
msgIdx: groupRefs.msgIdx
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
break;
|
|
2475
|
+
case 11:
|
|
2476
|
+
log?.debug?.(`[qqbot:${account.accountId}] Heartbeat ACK`);
|
|
2477
|
+
break;
|
|
2478
|
+
case 7:
|
|
2479
|
+
log?.info(`[qqbot:${account.accountId}] Server requested reconnect`);
|
|
2480
|
+
cleanup();
|
|
2481
|
+
scheduleReconnect();
|
|
2482
|
+
break;
|
|
2483
|
+
case 9:
|
|
2484
|
+
const canResume = d;
|
|
2485
|
+
log?.error(`[qqbot:${account.accountId}] Invalid session (${FULL_INTENTS_DESC}), can resume: ${canResume}, raw: ${rawData}`);
|
|
2486
|
+
if (!canResume) {
|
|
2487
|
+
sessionId = null;
|
|
2488
|
+
lastSeq = null;
|
|
2489
|
+
clearSession(account.accountId);
|
|
2490
|
+
shouldRefreshToken = true;
|
|
2491
|
+
log?.info(`[qqbot:${account.accountId}] Will refresh token and retry with full intents (${FULL_INTENTS_DESC})`);
|
|
2492
|
+
}
|
|
2493
|
+
cleanup();
|
|
2494
|
+
scheduleReconnect(3e3);
|
|
2495
|
+
break;
|
|
2496
|
+
}
|
|
2497
|
+
} catch (err) {
|
|
2498
|
+
log?.error(`[qqbot:${account.accountId}] Message parse error: ${err}`);
|
|
2499
|
+
}
|
|
2500
|
+
});
|
|
2501
|
+
ws.on("close", (code, reason) => {
|
|
2502
|
+
log?.info(`[qqbot:${account.accountId}] WebSocket closed: ${code} ${reason.toString()}`);
|
|
2503
|
+
isConnecting = false;
|
|
2504
|
+
if (code === 4914 || code === 4915) {
|
|
2505
|
+
log?.error(`[qqbot:${account.accountId}] Bot is ${code === 4914 ? "offline/sandbox-only" : "banned"}. Please contact QQ platform.`);
|
|
2506
|
+
cleanup();
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
if (code === 4004) {
|
|
2510
|
+
log?.info(`[qqbot:${account.accountId}] Invalid token (4004), will refresh token and reconnect`);
|
|
2511
|
+
shouldRefreshToken = true;
|
|
2512
|
+
cleanup();
|
|
2513
|
+
if (!isAborted) scheduleReconnect();
|
|
2514
|
+
return;
|
|
2515
|
+
}
|
|
2516
|
+
if (code === 4008) {
|
|
2517
|
+
log?.info(`[qqbot:${account.accountId}] Rate limited (4008), waiting ${RATE_LIMIT_DELAY}ms before reconnect`);
|
|
2518
|
+
cleanup();
|
|
2519
|
+
if (!isAborted) scheduleReconnect(RATE_LIMIT_DELAY);
|
|
2520
|
+
return;
|
|
2521
|
+
}
|
|
2522
|
+
if (code === 4006 || code === 4007 || code === 4009) {
|
|
2523
|
+
log?.info(`[qqbot:${account.accountId}] Error ${code} (${{
|
|
2524
|
+
4006: "session no longer valid",
|
|
2525
|
+
4007: "invalid seq on resume",
|
|
2526
|
+
4009: "session timed out"
|
|
2527
|
+
}[code]}), will re-identify`);
|
|
2528
|
+
sessionId = null;
|
|
2529
|
+
lastSeq = null;
|
|
2530
|
+
clearSession(account.accountId);
|
|
2531
|
+
shouldRefreshToken = true;
|
|
2532
|
+
} else if (code >= 4900 && code <= 4913) {
|
|
2533
|
+
log?.info(`[qqbot:${account.accountId}] Internal error (${code}), will re-identify`);
|
|
2534
|
+
sessionId = null;
|
|
2535
|
+
lastSeq = null;
|
|
2536
|
+
clearSession(account.accountId);
|
|
2537
|
+
shouldRefreshToken = true;
|
|
2538
|
+
}
|
|
2539
|
+
const connectionDuration = Date.now() - lastConnectTime;
|
|
2540
|
+
if (connectionDuration < QUICK_DISCONNECT_THRESHOLD && lastConnectTime > 0) {
|
|
2541
|
+
quickDisconnectCount++;
|
|
2542
|
+
log?.info(`[qqbot:${account.accountId}] Quick disconnect detected (${connectionDuration}ms), count: ${quickDisconnectCount}`);
|
|
2543
|
+
if (quickDisconnectCount >= MAX_QUICK_DISCONNECT_COUNT) {
|
|
2544
|
+
log?.error(`[qqbot:${account.accountId}] Too many quick disconnects. This may indicate a permission issue.`);
|
|
2545
|
+
log?.error(`[qqbot:${account.accountId}] Please check: 1) AppID/Secret correct 2) Bot permissions on QQ Open Platform`);
|
|
2546
|
+
quickDisconnectCount = 0;
|
|
2547
|
+
cleanup();
|
|
2548
|
+
if (!isAborted && code !== 1e3) scheduleReconnect(RATE_LIMIT_DELAY);
|
|
2549
|
+
return;
|
|
2550
|
+
}
|
|
2551
|
+
} else quickDisconnectCount = 0;
|
|
2552
|
+
cleanup();
|
|
2553
|
+
if (!isAborted && code !== 1e3) scheduleReconnect();
|
|
2554
|
+
});
|
|
2555
|
+
ws.on("error", (err) => {
|
|
2556
|
+
log?.error(`[qqbot:${account.accountId}] WebSocket error: ${err.message}`);
|
|
2557
|
+
onError?.(err);
|
|
2558
|
+
});
|
|
2559
|
+
} catch (err) {
|
|
2560
|
+
isConnecting = false;
|
|
2561
|
+
const errMsg = String(err);
|
|
2562
|
+
log?.error(`[qqbot:${account.accountId}] Connection failed: ${err}`);
|
|
2563
|
+
if (errMsg.includes("Too many requests") || errMsg.includes("100001")) {
|
|
2564
|
+
log?.info(`[qqbot:${account.accountId}] Rate limited, waiting ${RATE_LIMIT_DELAY}ms before retry`);
|
|
2565
|
+
scheduleReconnect(RATE_LIMIT_DELAY);
|
|
2566
|
+
} else scheduleReconnect();
|
|
2567
|
+
}
|
|
2568
|
+
};
|
|
2569
|
+
await connect();
|
|
2570
|
+
return new Promise((resolve) => {
|
|
2571
|
+
abortSignal.addEventListener("abort", () => resolve());
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
//#endregion
|
|
2575
|
+
export { startGateway };
|