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
package/dist/monitor-BRMbIrFT.js
DELETED
|
@@ -1,3660 +0,0 @@
|
|
|
1
|
-
import { u as resolveAgentIdFromSessionKey } from "./session-key-Do__tq1E.js";
|
|
2
|
-
import { r as logVerbose$1 } from "./globals-CDtV0ht8.js";
|
|
3
|
-
import { c as normalizeResolvedSecretInputString, l as normalizeSecretInputString } from "./types.secrets-BpcqHPAv.js";
|
|
4
|
-
import { t as safeEqualSecret } from "./secret-equal-fMR1DjSl.js";
|
|
5
|
-
import { p as resolveRequestClientIp } from "./net-DjzoSxQo.js";
|
|
6
|
-
import { t as parseFiniteNumber } from "./parse-finite-number-BqmKghie.js";
|
|
7
|
-
import { r as getSessionBindingService } from "./session-binding-service-B1JT9Vbs.js";
|
|
8
|
-
import { u as isPluginOwnedSessionBindingRecord } from "./conversation-binding-C9dt9f8n.js";
|
|
9
|
-
import { t as resolveAckReaction } from "./identity-BuQIY7DT.js";
|
|
10
|
-
import { s as isBlockedHostnameOrIp } from "./ssrf-QGacif0_.js";
|
|
11
|
-
import { d as resolveOutboundMediaUrls, h as sendMediaWithLeadingCaption, m as resolveTextChunksWithFallback } from "./reply-payload-DPD7eb4b.js";
|
|
12
|
-
import { g as mapAllowFromEntries } from "./channel-config-helpers-CDrwTLrh.js";
|
|
13
|
-
import { i as resolveAgentRoute, n as deriveLastRoutePolicy } from "./resolve-route-BxAbY_hl.js";
|
|
14
|
-
import "./routing-BKQZI-Y4.js";
|
|
15
|
-
import { n as resolveControlCommandGate } from "./command-gating-HO-bVa6h.js";
|
|
16
|
-
import { t as resolveChannelMediaMaxBytes } from "./media-limits-DKs4csWd.js";
|
|
17
|
-
import { n as readStoreAllowFromForDmPolicy, o as resolveDmGroupAccessWithLists, t as DM_GROUP_ACCESS_REASON } from "./dm-policy-shared-CaDbQVNm.js";
|
|
18
|
-
import { c as evictOldHistoryKeys, u as recordPendingHistoryEntryIfEnabled } from "./history-UDByIZZ1.js";
|
|
19
|
-
import "./runtime-env-Gi8zIuHa.js";
|
|
20
|
-
import { t as resolveChannelContextVisibilityMode } from "./context-visibility-DzjNwztO.js";
|
|
21
|
-
import { t as createChannelReplyPipeline } from "./channel-reply-pipeline-Dyh1zCi9.js";
|
|
22
|
-
import "./ssrf-runtime-VREJ79aM.js";
|
|
23
|
-
import { i as resolveConfiguredBindingRoute } from "./conversation-runtime-BpJdJqei.js";
|
|
24
|
-
import { r as stripMarkdown } from "./text-runtime-UxAYZSfy.js";
|
|
25
|
-
import { t as evaluateSupplementalContextVisibility } from "./context-visibility-Ct0SprKG.js";
|
|
26
|
-
import { n as createChannelPairingController } from "./channel-pairing-mk5cf7oC.js";
|
|
27
|
-
import { n as logInboundDrop, r as logTypingFailure, t as logAckFailure } from "./logging-DIucOhk1.js";
|
|
28
|
-
import { t as resolveRequestUrl } from "./request-url-BRo2kgtI.js";
|
|
29
|
-
import { a as createFixedWindowRateLimiter, r as WEBHOOK_RATE_LIMIT_DEFAULTS } from "./webhook-memory-guards-BpJyxsWN.js";
|
|
30
|
-
import { a as createWebhookInFlightLimiter, c as readWebhookBodyOrReject } from "./webhook-request-guards-B8flzgTp.js";
|
|
31
|
-
import { t as normalizeWebhookPath } from "./webhook-path-CR3a6eWn.js";
|
|
32
|
-
import { c as withResolvedWebhookRequestPipeline, n as registerWebhookTargetWithPluginRoute, o as resolveWebhookTargetWithAuthOrRejectSync } from "./webhook-ingress-DElWn_px.js";
|
|
33
|
-
import "./browser-support-D8_Ei1HS.js";
|
|
34
|
-
import "./secret-input-5qSyCuiS.js";
|
|
35
|
-
import { _ as buildBlueBubblesApiUrl, f as parseBlueBubblesTarget, g as blueBubblesFetchWithTimeout, i as formatBlueBubblesChatTarget, l as normalizeBlueBubblesHandle, m as resolveBlueBubblesAccount, o as isAllowedBlueBubblesSender, r as extractHandleFromChatGuid, v as normalizeBlueBubblesServerUrl } from "./webhook-shared-DaT8NiFa.js";
|
|
36
|
-
import { a as fetchBlueBubblesServerInfo, c as isBlueBubblesPrivateApiStatusEnabled, i as resolveBlueBubblesInboundConversationId, o as getCachedBlueBubblesPrivateApiStatus, s as isBlueBubblesPrivateApiEnabled } from "./conversation-id-CIpyn-VD.js";
|
|
37
|
-
import { r as warnBlueBubbles, t as getBlueBubblesRuntime } from "./runtime-C9cn0HZX.js";
|
|
38
|
-
import { URL as URL$1, fileURLToPath } from "node:url";
|
|
39
|
-
import { constants } from "node:fs";
|
|
40
|
-
import path, { join } from "node:path";
|
|
41
|
-
import { execFile } from "node:child_process";
|
|
42
|
-
import os from "node:os";
|
|
43
|
-
import { promisify } from "node:util";
|
|
44
|
-
import fs, { access, readdir } from "node:fs/promises";
|
|
45
|
-
import crypto, { createHash } from "node:crypto";
|
|
46
|
-
//#region extensions/bluebubbles/src/account-resolve.ts
|
|
47
|
-
function resolveBlueBubblesServerAccount(params) {
|
|
48
|
-
const account = resolveBlueBubblesAccount({
|
|
49
|
-
cfg: params.cfg ?? {},
|
|
50
|
-
accountId: params.accountId
|
|
51
|
-
});
|
|
52
|
-
const baseUrl = normalizeResolvedSecretInputString({
|
|
53
|
-
value: params.serverUrl,
|
|
54
|
-
path: "channels.bluebubbles.serverUrl"
|
|
55
|
-
}) || normalizeResolvedSecretInputString({
|
|
56
|
-
value: account.config.serverUrl,
|
|
57
|
-
path: `channels.bluebubbles.accounts.${account.accountId}.serverUrl`
|
|
58
|
-
});
|
|
59
|
-
const password = normalizeResolvedSecretInputString({
|
|
60
|
-
value: params.password,
|
|
61
|
-
path: "channels.bluebubbles.password"
|
|
62
|
-
}) || normalizeResolvedSecretInputString({
|
|
63
|
-
value: account.config.password,
|
|
64
|
-
path: `channels.bluebubbles.accounts.${account.accountId}.password`
|
|
65
|
-
});
|
|
66
|
-
if (!baseUrl) throw new Error("BlueBubbles serverUrl is required");
|
|
67
|
-
if (!password) throw new Error("BlueBubbles password is required");
|
|
68
|
-
let autoAllowPrivateNetwork = false;
|
|
69
|
-
try {
|
|
70
|
-
const hostname = new URL(normalizeBlueBubblesServerUrl(baseUrl)).hostname.trim();
|
|
71
|
-
autoAllowPrivateNetwork = Boolean(hostname) && isBlockedHostnameOrIp(hostname);
|
|
72
|
-
} catch {
|
|
73
|
-
autoAllowPrivateNetwork = false;
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
baseUrl,
|
|
77
|
-
password,
|
|
78
|
-
accountId: account.accountId,
|
|
79
|
-
allowPrivateNetwork: account.config.allowPrivateNetwork === true || autoAllowPrivateNetwork
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region extensions/bluebubbles/src/multipart.ts
|
|
84
|
-
function concatUint8Arrays(parts) {
|
|
85
|
-
const totalLength = parts.reduce((acc, part) => acc + part.length, 0);
|
|
86
|
-
const body = new Uint8Array(totalLength);
|
|
87
|
-
let offset = 0;
|
|
88
|
-
for (const part of parts) {
|
|
89
|
-
body.set(part, offset);
|
|
90
|
-
offset += part.length;
|
|
91
|
-
}
|
|
92
|
-
return body;
|
|
93
|
-
}
|
|
94
|
-
async function postMultipartFormData(params) {
|
|
95
|
-
const body = Buffer.from(concatUint8Arrays(params.parts));
|
|
96
|
-
return await blueBubblesFetchWithTimeout(params.url, {
|
|
97
|
-
method: "POST",
|
|
98
|
-
headers: { "Content-Type": `multipart/form-data; boundary=${params.boundary}` },
|
|
99
|
-
body
|
|
100
|
-
}, params.timeoutMs, params.ssrfPolicy);
|
|
101
|
-
}
|
|
102
|
-
async function assertMultipartActionOk(response, action) {
|
|
103
|
-
if (response.ok) return;
|
|
104
|
-
const errorText = await response.text().catch(() => "");
|
|
105
|
-
throw new Error(`BlueBubbles ${action} failed (${response.status}): ${errorText || "unknown"}`);
|
|
106
|
-
}
|
|
107
|
-
//#endregion
|
|
108
|
-
//#region extensions/bluebubbles/src/send-helpers.ts
|
|
109
|
-
function resolveBlueBubblesSendTarget(raw) {
|
|
110
|
-
const parsed = parseBlueBubblesTarget(raw);
|
|
111
|
-
if (parsed.kind === "handle") return {
|
|
112
|
-
kind: "handle",
|
|
113
|
-
address: normalizeBlueBubblesHandle(parsed.to),
|
|
114
|
-
service: parsed.service
|
|
115
|
-
};
|
|
116
|
-
if (parsed.kind === "chat_id") return {
|
|
117
|
-
kind: "chat_id",
|
|
118
|
-
chatId: parsed.chatId
|
|
119
|
-
};
|
|
120
|
-
if (parsed.kind === "chat_guid") return {
|
|
121
|
-
kind: "chat_guid",
|
|
122
|
-
chatGuid: parsed.chatGuid
|
|
123
|
-
};
|
|
124
|
-
return {
|
|
125
|
-
kind: "chat_identifier",
|
|
126
|
-
chatIdentifier: parsed.chatIdentifier
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function extractBlueBubblesMessageId(payload) {
|
|
130
|
-
if (!payload || typeof payload !== "object") return "unknown";
|
|
131
|
-
const asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
132
|
-
const record = payload;
|
|
133
|
-
const roots = [
|
|
134
|
-
record,
|
|
135
|
-
asRecord(record.data),
|
|
136
|
-
asRecord(record.result),
|
|
137
|
-
asRecord(record.payload),
|
|
138
|
-
asRecord(record.message),
|
|
139
|
-
Array.isArray(record.data) ? asRecord(record.data[0]) : null
|
|
140
|
-
];
|
|
141
|
-
for (const root of roots) {
|
|
142
|
-
if (!root) continue;
|
|
143
|
-
const candidates = [
|
|
144
|
-
root.message_id,
|
|
145
|
-
root.messageId,
|
|
146
|
-
root.messageGuid,
|
|
147
|
-
root.message_guid,
|
|
148
|
-
root.guid,
|
|
149
|
-
root.id,
|
|
150
|
-
root.uuid
|
|
151
|
-
];
|
|
152
|
-
for (const candidate of candidates) {
|
|
153
|
-
if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
|
|
154
|
-
if (typeof candidate === "number" && Number.isFinite(candidate)) return String(candidate);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return "unknown";
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region extensions/bluebubbles/src/send.ts
|
|
161
|
-
function blueBubblesPolicy$3(allowPrivateNetwork) {
|
|
162
|
-
return allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
|
|
163
|
-
}
|
|
164
|
-
/** Maps short effect names to full Apple effect IDs */
|
|
165
|
-
const EFFECT_MAP = {
|
|
166
|
-
slam: "com.apple.MobileSMS.expressivesend.impact",
|
|
167
|
-
loud: "com.apple.MobileSMS.expressivesend.loud",
|
|
168
|
-
gentle: "com.apple.MobileSMS.expressivesend.gentle",
|
|
169
|
-
invisible: "com.apple.MobileSMS.expressivesend.invisibleink",
|
|
170
|
-
"invisible-ink": "com.apple.MobileSMS.expressivesend.invisibleink",
|
|
171
|
-
"invisible ink": "com.apple.MobileSMS.expressivesend.invisibleink",
|
|
172
|
-
invisibleink: "com.apple.MobileSMS.expressivesend.invisibleink",
|
|
173
|
-
echo: "com.apple.messages.effect.CKEchoEffect",
|
|
174
|
-
spotlight: "com.apple.messages.effect.CKSpotlightEffect",
|
|
175
|
-
balloons: "com.apple.messages.effect.CKHappyBirthdayEffect",
|
|
176
|
-
confetti: "com.apple.messages.effect.CKConfettiEffect",
|
|
177
|
-
love: "com.apple.messages.effect.CKHeartEffect",
|
|
178
|
-
heart: "com.apple.messages.effect.CKHeartEffect",
|
|
179
|
-
hearts: "com.apple.messages.effect.CKHeartEffect",
|
|
180
|
-
lasers: "com.apple.messages.effect.CKLasersEffect",
|
|
181
|
-
fireworks: "com.apple.messages.effect.CKFireworksEffect",
|
|
182
|
-
celebration: "com.apple.messages.effect.CKSparklesEffect"
|
|
183
|
-
};
|
|
184
|
-
function resolveEffectId(raw) {
|
|
185
|
-
if (!raw) return;
|
|
186
|
-
const trimmed = raw.trim().toLowerCase();
|
|
187
|
-
if (EFFECT_MAP[trimmed]) return EFFECT_MAP[trimmed];
|
|
188
|
-
const normalized = trimmed.replace(/[\s_]+/g, "-");
|
|
189
|
-
if (EFFECT_MAP[normalized]) return EFFECT_MAP[normalized];
|
|
190
|
-
const compact = trimmed.replace(/[\s_-]+/g, "");
|
|
191
|
-
if (EFFECT_MAP[compact]) return EFFECT_MAP[compact];
|
|
192
|
-
return raw;
|
|
193
|
-
}
|
|
194
|
-
function resolvePrivateApiDecision(params) {
|
|
195
|
-
const { privateApiStatus, wantsReplyThread, wantsEffect } = params;
|
|
196
|
-
const needsPrivateApi = wantsReplyThread || wantsEffect;
|
|
197
|
-
const canUsePrivateApi = needsPrivateApi && isBlueBubblesPrivateApiStatusEnabled(privateApiStatus);
|
|
198
|
-
const throwEffectDisabledError = wantsEffect && privateApiStatus === false;
|
|
199
|
-
if (!needsPrivateApi || privateApiStatus !== null) return {
|
|
200
|
-
canUsePrivateApi,
|
|
201
|
-
throwEffectDisabledError
|
|
202
|
-
};
|
|
203
|
-
return {
|
|
204
|
-
canUsePrivateApi,
|
|
205
|
-
throwEffectDisabledError,
|
|
206
|
-
warningMessage: `Private API status unknown; sending without ${[wantsReplyThread ? "reply threading" : null, wantsEffect ? "message effects" : null].filter(Boolean).join(" + ")}. Run a status probe to restore private-api features.`
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
async function parseBlueBubblesMessageResponse(res) {
|
|
210
|
-
const body = await res.text();
|
|
211
|
-
if (!body) return { messageId: "ok" };
|
|
212
|
-
try {
|
|
213
|
-
return { messageId: extractBlueBubblesMessageId(JSON.parse(body)) };
|
|
214
|
-
} catch {
|
|
215
|
-
return { messageId: "ok" };
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
function extractChatGuid(chat) {
|
|
219
|
-
const candidates = [
|
|
220
|
-
chat.chatGuid,
|
|
221
|
-
chat.guid,
|
|
222
|
-
chat.chat_guid,
|
|
223
|
-
chat.identifier,
|
|
224
|
-
chat.chatIdentifier,
|
|
225
|
-
chat.chat_identifier
|
|
226
|
-
];
|
|
227
|
-
for (const candidate of candidates) if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
|
|
228
|
-
return null;
|
|
229
|
-
}
|
|
230
|
-
function extractChatId(chat) {
|
|
231
|
-
const candidates = [
|
|
232
|
-
chat.chatId,
|
|
233
|
-
chat.id,
|
|
234
|
-
chat.chat_id
|
|
235
|
-
];
|
|
236
|
-
for (const candidate of candidates) if (typeof candidate === "number" && Number.isFinite(candidate)) return candidate;
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
|
-
function extractChatIdentifierFromChatGuid$2(chatGuid) {
|
|
240
|
-
const parts = chatGuid.split(";");
|
|
241
|
-
if (parts.length < 3) return null;
|
|
242
|
-
const identifier = parts[2]?.trim();
|
|
243
|
-
return identifier ? identifier : null;
|
|
244
|
-
}
|
|
245
|
-
function extractParticipantAddresses(chat) {
|
|
246
|
-
const raw = (Array.isArray(chat.participants) ? chat.participants : null) ?? (Array.isArray(chat.handles) ? chat.handles : null) ?? (Array.isArray(chat.participantHandles) ? chat.participantHandles : null);
|
|
247
|
-
if (!raw) return [];
|
|
248
|
-
const out = [];
|
|
249
|
-
for (const entry of raw) {
|
|
250
|
-
if (typeof entry === "string") {
|
|
251
|
-
out.push(entry);
|
|
252
|
-
continue;
|
|
253
|
-
}
|
|
254
|
-
if (entry && typeof entry === "object") {
|
|
255
|
-
const record = entry;
|
|
256
|
-
const candidate = typeof record.address === "string" && record.address || typeof record.handle === "string" && record.handle || typeof record.id === "string" && record.id || typeof record.identifier === "string" && record.identifier;
|
|
257
|
-
if (candidate) out.push(candidate);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
return out;
|
|
261
|
-
}
|
|
262
|
-
async function queryChats(params) {
|
|
263
|
-
const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
|
|
264
|
-
baseUrl: params.baseUrl,
|
|
265
|
-
path: "/api/v1/chat/query",
|
|
266
|
-
password: params.password
|
|
267
|
-
}), {
|
|
268
|
-
method: "POST",
|
|
269
|
-
headers: { "Content-Type": "application/json" },
|
|
270
|
-
body: JSON.stringify({
|
|
271
|
-
limit: params.limit,
|
|
272
|
-
offset: params.offset,
|
|
273
|
-
with: ["participants"]
|
|
274
|
-
})
|
|
275
|
-
}, params.timeoutMs, blueBubblesPolicy$3(params.allowPrivateNetwork));
|
|
276
|
-
if (!res.ok) return [];
|
|
277
|
-
const payload = await res.json().catch(() => null);
|
|
278
|
-
const data = payload && typeof payload.data !== "undefined" ? payload.data : null;
|
|
279
|
-
return Array.isArray(data) ? data : [];
|
|
280
|
-
}
|
|
281
|
-
async function resolveChatGuidForTarget(params) {
|
|
282
|
-
if (params.target.kind === "chat_guid") return params.target.chatGuid;
|
|
283
|
-
const normalizedHandle = params.target.kind === "handle" ? normalizeBlueBubblesHandle(params.target.address) : "";
|
|
284
|
-
const targetChatId = params.target.kind === "chat_id" ? params.target.chatId : null;
|
|
285
|
-
const targetChatIdentifier = params.target.kind === "chat_identifier" ? params.target.chatIdentifier : null;
|
|
286
|
-
const limit = 500;
|
|
287
|
-
let participantMatch = null;
|
|
288
|
-
for (let offset = 0; offset < 5e3; offset += limit) {
|
|
289
|
-
const chats = await queryChats({
|
|
290
|
-
baseUrl: params.baseUrl,
|
|
291
|
-
password: params.password,
|
|
292
|
-
timeoutMs: params.timeoutMs,
|
|
293
|
-
offset,
|
|
294
|
-
limit,
|
|
295
|
-
allowPrivateNetwork: params.allowPrivateNetwork
|
|
296
|
-
});
|
|
297
|
-
if (chats.length === 0) break;
|
|
298
|
-
for (const chat of chats) {
|
|
299
|
-
if (targetChatId != null) {
|
|
300
|
-
const chatId = extractChatId(chat);
|
|
301
|
-
if (chatId != null && chatId === targetChatId) return extractChatGuid(chat);
|
|
302
|
-
}
|
|
303
|
-
if (targetChatIdentifier) {
|
|
304
|
-
const guid = extractChatGuid(chat);
|
|
305
|
-
if (guid) {
|
|
306
|
-
if (guid === targetChatIdentifier) return guid;
|
|
307
|
-
const guidIdentifier = extractChatIdentifierFromChatGuid$2(guid);
|
|
308
|
-
if (guidIdentifier && guidIdentifier === targetChatIdentifier) return guid;
|
|
309
|
-
}
|
|
310
|
-
const identifier = typeof chat.identifier === "string" ? chat.identifier : typeof chat.chatIdentifier === "string" ? chat.chatIdentifier : typeof chat.chat_identifier === "string" ? chat.chat_identifier : "";
|
|
311
|
-
if (identifier && identifier === targetChatIdentifier) return guid ?? extractChatGuid(chat);
|
|
312
|
-
}
|
|
313
|
-
if (normalizedHandle) {
|
|
314
|
-
const guid = extractChatGuid(chat);
|
|
315
|
-
const directHandle = guid ? extractHandleFromChatGuid(guid) : null;
|
|
316
|
-
if (directHandle && directHandle === normalizedHandle) return guid;
|
|
317
|
-
if (!participantMatch && guid) {
|
|
318
|
-
if (guid.includes(";-;")) {
|
|
319
|
-
if (extractParticipantAddresses(chat).map((entry) => normalizeBlueBubblesHandle(entry)).includes(normalizedHandle)) participantMatch = guid;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return participantMatch;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Creates a new DM chat for the given address and returns the chat GUID.
|
|
329
|
-
* Requires Private API to be enabled in BlueBubbles.
|
|
330
|
-
*
|
|
331
|
-
* If a `message` is provided it is sent as the initial message in the new chat;
|
|
332
|
-
* otherwise an empty-string message body is used (BlueBubbles still creates the
|
|
333
|
-
* chat but will not deliver a visible bubble).
|
|
334
|
-
*/
|
|
335
|
-
async function createChatForHandle(params) {
|
|
336
|
-
const url = buildBlueBubblesApiUrl({
|
|
337
|
-
baseUrl: params.baseUrl,
|
|
338
|
-
path: "/api/v1/chat/new",
|
|
339
|
-
password: params.password
|
|
340
|
-
});
|
|
341
|
-
const payload = {
|
|
342
|
-
addresses: [params.address],
|
|
343
|
-
message: params.message ?? "",
|
|
344
|
-
tempGuid: `temp-${crypto.randomUUID()}`
|
|
345
|
-
};
|
|
346
|
-
const res = await blueBubblesFetchWithTimeout(url, {
|
|
347
|
-
method: "POST",
|
|
348
|
-
headers: { "Content-Type": "application/json" },
|
|
349
|
-
body: JSON.stringify(payload)
|
|
350
|
-
}, params.timeoutMs, blueBubblesPolicy$3(params.allowPrivateNetwork));
|
|
351
|
-
if (!res.ok) {
|
|
352
|
-
const errorText = await res.text();
|
|
353
|
-
if (res.status === 400 || res.status === 403 || errorText.toLowerCase().includes("private api")) throw new Error(`BlueBubbles send failed: Cannot create new chat - Private API must be enabled. Original error: ${errorText || res.status}`);
|
|
354
|
-
throw new Error(`BlueBubbles create chat failed (${res.status}): ${errorText || "unknown"}`);
|
|
355
|
-
}
|
|
356
|
-
const body = await res.text();
|
|
357
|
-
let messageId = "ok";
|
|
358
|
-
let chatGuid = null;
|
|
359
|
-
if (body) try {
|
|
360
|
-
const parsed = JSON.parse(body);
|
|
361
|
-
messageId = extractBlueBubblesMessageId(parsed);
|
|
362
|
-
const data = parsed.data;
|
|
363
|
-
if (data) {
|
|
364
|
-
chatGuid = typeof data.chatGuid === "string" && data.chatGuid || typeof data.guid === "string" && data.guid || null;
|
|
365
|
-
if (!chatGuid) {
|
|
366
|
-
const chats = data.chats ?? data.chat;
|
|
367
|
-
if (Array.isArray(chats) && chats.length > 0) {
|
|
368
|
-
const first = chats[0];
|
|
369
|
-
chatGuid = typeof first?.guid === "string" && first.guid || typeof first?.chatGuid === "string" && first.chatGuid || null;
|
|
370
|
-
} else if (chats && typeof chats === "object" && !Array.isArray(chats)) {
|
|
371
|
-
const chatObj = chats;
|
|
372
|
-
chatGuid = typeof chatObj.guid === "string" && chatObj.guid || typeof chatObj.chatGuid === "string" && chatObj.chatGuid || null;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
} catch {}
|
|
377
|
-
return {
|
|
378
|
-
chatGuid,
|
|
379
|
-
messageId
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Creates a new chat (DM) and sends an initial message.
|
|
384
|
-
* Requires Private API to be enabled in BlueBubbles.
|
|
385
|
-
*/
|
|
386
|
-
async function createNewChatWithMessage(params) {
|
|
387
|
-
return { messageId: (await createChatForHandle({
|
|
388
|
-
baseUrl: params.baseUrl,
|
|
389
|
-
password: params.password,
|
|
390
|
-
address: params.address,
|
|
391
|
-
message: params.message,
|
|
392
|
-
timeoutMs: params.timeoutMs,
|
|
393
|
-
allowPrivateNetwork: params.allowPrivateNetwork
|
|
394
|
-
})).messageId };
|
|
395
|
-
}
|
|
396
|
-
async function sendMessageBlueBubbles(to, text, opts = {}) {
|
|
397
|
-
const trimmedText = text ?? "";
|
|
398
|
-
if (!trimmedText.trim()) throw new Error("BlueBubbles send requires text");
|
|
399
|
-
const strippedText = stripMarkdown(trimmedText);
|
|
400
|
-
if (!strippedText.trim()) throw new Error("BlueBubbles send requires text (message was empty after markdown removal)");
|
|
401
|
-
const { baseUrl, password, accountId, allowPrivateNetwork } = resolveBlueBubblesServerAccount({
|
|
402
|
-
cfg: opts.cfg ?? {},
|
|
403
|
-
accountId: opts.accountId,
|
|
404
|
-
serverUrl: opts.serverUrl,
|
|
405
|
-
password: opts.password
|
|
406
|
-
});
|
|
407
|
-
const privateApiStatus = getCachedBlueBubblesPrivateApiStatus(accountId);
|
|
408
|
-
const target = resolveBlueBubblesSendTarget(to);
|
|
409
|
-
const chatGuid = await resolveChatGuidForTarget({
|
|
410
|
-
baseUrl,
|
|
411
|
-
password,
|
|
412
|
-
timeoutMs: opts.timeoutMs,
|
|
413
|
-
target,
|
|
414
|
-
allowPrivateNetwork
|
|
415
|
-
});
|
|
416
|
-
if (!chatGuid) {
|
|
417
|
-
if (target.kind === "handle") return createNewChatWithMessage({
|
|
418
|
-
baseUrl,
|
|
419
|
-
password,
|
|
420
|
-
address: target.address,
|
|
421
|
-
message: strippedText,
|
|
422
|
-
timeoutMs: opts.timeoutMs,
|
|
423
|
-
allowPrivateNetwork
|
|
424
|
-
});
|
|
425
|
-
throw new Error("BlueBubbles send failed: chatGuid not found for target. Use a chat_guid target or ensure the chat exists.");
|
|
426
|
-
}
|
|
427
|
-
const effectId = resolveEffectId(opts.effectId);
|
|
428
|
-
const wantsReplyThread = Boolean(opts.replyToMessageGuid?.trim());
|
|
429
|
-
const privateApiDecision = resolvePrivateApiDecision({
|
|
430
|
-
privateApiStatus,
|
|
431
|
-
wantsReplyThread,
|
|
432
|
-
wantsEffect: Boolean(effectId)
|
|
433
|
-
});
|
|
434
|
-
if (privateApiDecision.throwEffectDisabledError) throw new Error("BlueBubbles send failed: reply/effect requires Private API, but it is disabled on the BlueBubbles server.");
|
|
435
|
-
if (privateApiDecision.warningMessage) warnBlueBubbles(privateApiDecision.warningMessage);
|
|
436
|
-
const payload = {
|
|
437
|
-
chatGuid,
|
|
438
|
-
tempGuid: crypto.randomUUID(),
|
|
439
|
-
message: strippedText
|
|
440
|
-
};
|
|
441
|
-
if (privateApiDecision.canUsePrivateApi) payload.method = "private-api";
|
|
442
|
-
if (wantsReplyThread && privateApiDecision.canUsePrivateApi) {
|
|
443
|
-
payload.selectedMessageGuid = opts.replyToMessageGuid;
|
|
444
|
-
payload.partIndex = typeof opts.replyToPartIndex === "number" ? opts.replyToPartIndex : 0;
|
|
445
|
-
}
|
|
446
|
-
if (effectId && privateApiDecision.canUsePrivateApi) payload.effectId = effectId;
|
|
447
|
-
const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
|
|
448
|
-
baseUrl,
|
|
449
|
-
path: "/api/v1/message/text",
|
|
450
|
-
password
|
|
451
|
-
}), {
|
|
452
|
-
method: "POST",
|
|
453
|
-
headers: { "Content-Type": "application/json" },
|
|
454
|
-
body: JSON.stringify(payload)
|
|
455
|
-
}, opts.timeoutMs, blueBubblesPolicy$3(allowPrivateNetwork));
|
|
456
|
-
if (!res.ok) {
|
|
457
|
-
const errorText = await res.text();
|
|
458
|
-
throw new Error(`BlueBubbles send failed (${res.status}): ${errorText || "unknown"}`);
|
|
459
|
-
}
|
|
460
|
-
return parseBlueBubblesMessageResponse(res);
|
|
461
|
-
}
|
|
462
|
-
//#endregion
|
|
463
|
-
//#region extensions/bluebubbles/src/attachments.ts
|
|
464
|
-
function blueBubblesPolicy$2(allowPrivateNetwork) {
|
|
465
|
-
return allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
|
|
466
|
-
}
|
|
467
|
-
const DEFAULT_ATTACHMENT_MAX_BYTES = 8 * 1024 * 1024;
|
|
468
|
-
const AUDIO_MIME_MP3 = new Set(["audio/mpeg", "audio/mp3"]);
|
|
469
|
-
const AUDIO_MIME_CAF = new Set(["audio/x-caf", "audio/caf"]);
|
|
470
|
-
function sanitizeFilename(input, fallback) {
|
|
471
|
-
const trimmed = input?.trim() ?? "";
|
|
472
|
-
return ((trimmed ? path.basename(trimmed) : "") || fallback).replace(/[\r\n"\\]/g, "_");
|
|
473
|
-
}
|
|
474
|
-
function ensureExtension(filename, extension, fallbackBase) {
|
|
475
|
-
const currentExt = path.extname(filename);
|
|
476
|
-
if (currentExt.toLowerCase() === extension) return filename;
|
|
477
|
-
return `${(currentExt ? filename.slice(0, -currentExt.length) : filename) || fallbackBase}${extension}`;
|
|
478
|
-
}
|
|
479
|
-
function resolveVoiceInfo(filename, contentType) {
|
|
480
|
-
const normalizedType = contentType?.trim().toLowerCase();
|
|
481
|
-
const extension = path.extname(filename).toLowerCase();
|
|
482
|
-
const isMp3 = extension === ".mp3" || (normalizedType ? AUDIO_MIME_MP3.has(normalizedType) : false);
|
|
483
|
-
const isCaf = extension === ".caf" || (normalizedType ? AUDIO_MIME_CAF.has(normalizedType) : false);
|
|
484
|
-
return {
|
|
485
|
-
isAudio: isMp3 || isCaf || Boolean(normalizedType?.startsWith("audio/")),
|
|
486
|
-
isMp3,
|
|
487
|
-
isCaf
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
function resolveAccount$3(params) {
|
|
491
|
-
return resolveBlueBubblesServerAccount(params);
|
|
492
|
-
}
|
|
493
|
-
function safeExtractHostname(url) {
|
|
494
|
-
try {
|
|
495
|
-
return new URL(url).hostname.trim() || void 0;
|
|
496
|
-
} catch {
|
|
497
|
-
return;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
function readMediaFetchErrorCode(error) {
|
|
501
|
-
if (!error || typeof error !== "object") return;
|
|
502
|
-
const code = error.code;
|
|
503
|
-
return code === "max_bytes" || code === "http_error" || code === "fetch_failed" ? code : void 0;
|
|
504
|
-
}
|
|
505
|
-
async function downloadBlueBubblesAttachment(attachment, opts = {}) {
|
|
506
|
-
const guid = attachment.guid?.trim();
|
|
507
|
-
if (!guid) throw new Error("BlueBubbles attachment guid is required");
|
|
508
|
-
const { baseUrl, password, allowPrivateNetwork } = resolveAccount$3(opts);
|
|
509
|
-
const url = buildBlueBubblesApiUrl({
|
|
510
|
-
baseUrl,
|
|
511
|
-
path: `/api/v1/attachment/${encodeURIComponent(guid)}/download`,
|
|
512
|
-
password
|
|
513
|
-
});
|
|
514
|
-
const maxBytes = typeof opts.maxBytes === "number" ? opts.maxBytes : DEFAULT_ATTACHMENT_MAX_BYTES;
|
|
515
|
-
const trustedHostname = safeExtractHostname(baseUrl);
|
|
516
|
-
try {
|
|
517
|
-
const fetched = await getBlueBubblesRuntime().channel.media.fetchRemoteMedia({
|
|
518
|
-
url,
|
|
519
|
-
filePathHint: attachment.transferName ?? attachment.guid ?? "attachment",
|
|
520
|
-
maxBytes,
|
|
521
|
-
ssrfPolicy: allowPrivateNetwork ? { allowPrivateNetwork: true } : trustedHostname ? { allowedHostnames: [trustedHostname] } : void 0,
|
|
522
|
-
fetchImpl: async (input, init) => await blueBubblesFetchWithTimeout(resolveRequestUrl(input), {
|
|
523
|
-
...init,
|
|
524
|
-
method: init?.method ?? "GET"
|
|
525
|
-
}, opts.timeoutMs)
|
|
526
|
-
});
|
|
527
|
-
return {
|
|
528
|
-
buffer: new Uint8Array(fetched.buffer),
|
|
529
|
-
contentType: fetched.contentType ?? attachment.mimeType ?? void 0
|
|
530
|
-
};
|
|
531
|
-
} catch (error) {
|
|
532
|
-
if (readMediaFetchErrorCode(error) === "max_bytes") throw new Error(`BlueBubbles attachment too large (limit ${maxBytes} bytes)`);
|
|
533
|
-
const text = error instanceof Error ? error.message : String(error);
|
|
534
|
-
throw new Error(`BlueBubbles attachment download failed: ${text}`);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* Send an attachment via BlueBubbles API.
|
|
539
|
-
* Supports sending media files (images, videos, audio, documents) to a chat.
|
|
540
|
-
* When asVoice is true, expects MP3/CAF audio and marks it as an iMessage voice memo.
|
|
541
|
-
*/
|
|
542
|
-
async function sendBlueBubblesAttachment(params) {
|
|
543
|
-
const { to, caption, replyToMessageGuid, replyToPartIndex, asVoice, opts = {} } = params;
|
|
544
|
-
let { buffer, filename, contentType } = params;
|
|
545
|
-
const wantsVoice = asVoice === true;
|
|
546
|
-
const fallbackName = wantsVoice ? "Audio Message" : "attachment";
|
|
547
|
-
filename = sanitizeFilename(filename, fallbackName);
|
|
548
|
-
contentType = contentType?.trim() || void 0;
|
|
549
|
-
const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$3(opts);
|
|
550
|
-
const privateApiStatus = getCachedBlueBubblesPrivateApiStatus(accountId);
|
|
551
|
-
const privateApiEnabled = isBlueBubblesPrivateApiStatusEnabled(privateApiStatus);
|
|
552
|
-
const isAudioMessage = wantsVoice;
|
|
553
|
-
if (isAudioMessage) {
|
|
554
|
-
const voiceInfo = resolveVoiceInfo(filename, contentType);
|
|
555
|
-
if (!voiceInfo.isAudio) throw new Error("BlueBubbles voice messages require audio media (mp3 or caf).");
|
|
556
|
-
if (voiceInfo.isMp3) {
|
|
557
|
-
filename = ensureExtension(filename, ".mp3", fallbackName);
|
|
558
|
-
contentType = contentType ?? "audio/mpeg";
|
|
559
|
-
} else if (voiceInfo.isCaf) {
|
|
560
|
-
filename = ensureExtension(filename, ".caf", fallbackName);
|
|
561
|
-
contentType = contentType ?? "audio/x-caf";
|
|
562
|
-
} else throw new Error("BlueBubbles voice messages require mp3 or caf audio (convert before sending).");
|
|
563
|
-
}
|
|
564
|
-
const target = resolveBlueBubblesSendTarget(to);
|
|
565
|
-
let chatGuid = await resolveChatGuidForTarget({
|
|
566
|
-
baseUrl,
|
|
567
|
-
password,
|
|
568
|
-
timeoutMs: opts.timeoutMs,
|
|
569
|
-
target,
|
|
570
|
-
allowPrivateNetwork
|
|
571
|
-
});
|
|
572
|
-
if (!chatGuid) {
|
|
573
|
-
if (target.kind === "handle") {
|
|
574
|
-
chatGuid = (await createChatForHandle({
|
|
575
|
-
baseUrl,
|
|
576
|
-
password,
|
|
577
|
-
address: target.address,
|
|
578
|
-
timeoutMs: opts.timeoutMs,
|
|
579
|
-
allowPrivateNetwork
|
|
580
|
-
})).chatGuid;
|
|
581
|
-
if (!chatGuid) chatGuid = await resolveChatGuidForTarget({
|
|
582
|
-
baseUrl,
|
|
583
|
-
password,
|
|
584
|
-
timeoutMs: opts.timeoutMs,
|
|
585
|
-
target,
|
|
586
|
-
allowPrivateNetwork
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
if (!chatGuid) throw new Error("BlueBubbles attachment send failed: chatGuid not found for target. Use a chat_guid target or ensure the chat exists.");
|
|
590
|
-
}
|
|
591
|
-
const url = buildBlueBubblesApiUrl({
|
|
592
|
-
baseUrl,
|
|
593
|
-
path: "/api/v1/message/attachment",
|
|
594
|
-
password
|
|
595
|
-
});
|
|
596
|
-
const boundary = `----BlueBubblesFormBoundary${crypto.randomUUID().replace(/-/g, "")}`;
|
|
597
|
-
const parts = [];
|
|
598
|
-
const encoder = new TextEncoder();
|
|
599
|
-
const addField = (name, value) => {
|
|
600
|
-
parts.push(encoder.encode(`--${boundary}\r\n`));
|
|
601
|
-
parts.push(encoder.encode(`Content-Disposition: form-data; name="${name}"\r\n\r\n`));
|
|
602
|
-
parts.push(encoder.encode(`${value}\r\n`));
|
|
603
|
-
};
|
|
604
|
-
const addFile = (name, fileBuffer, fileName, mimeType) => {
|
|
605
|
-
parts.push(encoder.encode(`--${boundary}\r\n`));
|
|
606
|
-
parts.push(encoder.encode(`Content-Disposition: form-data; name="${name}"; filename="${fileName}"\r\n`));
|
|
607
|
-
parts.push(encoder.encode(`Content-Type: ${mimeType ?? "application/octet-stream"}\r\n\r\n`));
|
|
608
|
-
parts.push(fileBuffer);
|
|
609
|
-
parts.push(encoder.encode("\r\n"));
|
|
610
|
-
};
|
|
611
|
-
addFile("attachment", buffer, filename, contentType);
|
|
612
|
-
addField("chatGuid", chatGuid);
|
|
613
|
-
addField("name", filename);
|
|
614
|
-
addField("tempGuid", `temp-${Date.now()}-${crypto.randomUUID().slice(0, 8)}`);
|
|
615
|
-
if (privateApiEnabled) addField("method", "private-api");
|
|
616
|
-
if (isAudioMessage) addField("isAudioMessage", "true");
|
|
617
|
-
const trimmedReplyTo = replyToMessageGuid?.trim();
|
|
618
|
-
if (trimmedReplyTo && privateApiEnabled) {
|
|
619
|
-
addField("selectedMessageGuid", trimmedReplyTo);
|
|
620
|
-
addField("partIndex", typeof replyToPartIndex === "number" ? String(replyToPartIndex) : "0");
|
|
621
|
-
} else if (trimmedReplyTo && privateApiStatus === null) warnBlueBubbles("Private API status unknown; sending attachment without reply threading metadata. Run a status probe to restore private-api reply features.");
|
|
622
|
-
if (caption) {
|
|
623
|
-
addField("message", caption);
|
|
624
|
-
addField("text", caption);
|
|
625
|
-
addField("caption", caption);
|
|
626
|
-
}
|
|
627
|
-
parts.push(encoder.encode(`--${boundary}--\r\n`));
|
|
628
|
-
const res = await postMultipartFormData({
|
|
629
|
-
url,
|
|
630
|
-
boundary,
|
|
631
|
-
parts,
|
|
632
|
-
timeoutMs: opts.timeoutMs ?? 6e4,
|
|
633
|
-
ssrfPolicy: blueBubblesPolicy$2(allowPrivateNetwork)
|
|
634
|
-
});
|
|
635
|
-
await assertMultipartActionOk(res, "attachment send");
|
|
636
|
-
const responseBody = await res.text();
|
|
637
|
-
if (!responseBody) return { messageId: "ok" };
|
|
638
|
-
try {
|
|
639
|
-
return { messageId: extractBlueBubblesMessageId(JSON.parse(responseBody)) };
|
|
640
|
-
} catch {
|
|
641
|
-
return { messageId: "ok" };
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
//#endregion
|
|
645
|
-
//#region extensions/bluebubbles/src/chat.ts
|
|
646
|
-
function blueBubblesPolicy$1(allowPrivateNetwork) {
|
|
647
|
-
return allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
|
|
648
|
-
}
|
|
649
|
-
function resolveAccount$2(params) {
|
|
650
|
-
return resolveBlueBubblesServerAccount(params);
|
|
651
|
-
}
|
|
652
|
-
function assertPrivateApiEnabled(accountId, feature) {
|
|
653
|
-
if (getCachedBlueBubblesPrivateApiStatus(accountId) === false) throw new Error(`BlueBubbles ${feature} requires Private API, but it is disabled on the BlueBubbles server.`);
|
|
654
|
-
}
|
|
655
|
-
function resolvePartIndex(partIndex) {
|
|
656
|
-
return typeof partIndex === "number" ? partIndex : 0;
|
|
657
|
-
}
|
|
658
|
-
async function sendBlueBubblesChatEndpointRequest(params) {
|
|
659
|
-
const trimmed = params.chatGuid.trim();
|
|
660
|
-
if (!trimmed) return;
|
|
661
|
-
const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$2(params.opts);
|
|
662
|
-
if (getCachedBlueBubblesPrivateApiStatus(accountId) === false) return;
|
|
663
|
-
await assertMultipartActionOk(await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
|
|
664
|
-
baseUrl,
|
|
665
|
-
path: `/api/v1/chat/${encodeURIComponent(trimmed)}/${params.endpoint}`,
|
|
666
|
-
password
|
|
667
|
-
}), { method: params.method }, params.opts.timeoutMs, blueBubblesPolicy$1(allowPrivateNetwork)), params.action);
|
|
668
|
-
}
|
|
669
|
-
async function sendPrivateApiJsonRequest(params) {
|
|
670
|
-
const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$2(params.opts);
|
|
671
|
-
assertPrivateApiEnabled(accountId, params.feature);
|
|
672
|
-
const url = buildBlueBubblesApiUrl({
|
|
673
|
-
baseUrl,
|
|
674
|
-
path: params.path,
|
|
675
|
-
password
|
|
676
|
-
});
|
|
677
|
-
const request = { method: params.method };
|
|
678
|
-
if (params.payload !== void 0) {
|
|
679
|
-
request.headers = { "Content-Type": "application/json" };
|
|
680
|
-
request.body = JSON.stringify(params.payload);
|
|
681
|
-
}
|
|
682
|
-
await assertMultipartActionOk(await blueBubblesFetchWithTimeout(url, request, params.opts.timeoutMs, blueBubblesPolicy$1(allowPrivateNetwork)), params.action);
|
|
683
|
-
}
|
|
684
|
-
async function markBlueBubblesChatRead(chatGuid, opts = {}) {
|
|
685
|
-
await sendBlueBubblesChatEndpointRequest({
|
|
686
|
-
chatGuid,
|
|
687
|
-
opts,
|
|
688
|
-
endpoint: "read",
|
|
689
|
-
method: "POST",
|
|
690
|
-
action: "read"
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
async function sendBlueBubblesTyping(chatGuid, typing, opts = {}) {
|
|
694
|
-
await sendBlueBubblesChatEndpointRequest({
|
|
695
|
-
chatGuid,
|
|
696
|
-
opts,
|
|
697
|
-
endpoint: "typing",
|
|
698
|
-
method: typing ? "POST" : "DELETE",
|
|
699
|
-
action: "typing"
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
* Edit a message via BlueBubbles API.
|
|
704
|
-
* Requires macOS 13 (Ventura) or higher with Private API enabled.
|
|
705
|
-
*/
|
|
706
|
-
async function editBlueBubblesMessage(messageGuid, newText, opts = {}) {
|
|
707
|
-
const trimmedGuid = messageGuid.trim();
|
|
708
|
-
if (!trimmedGuid) throw new Error("BlueBubbles edit requires messageGuid");
|
|
709
|
-
const trimmedText = newText.trim();
|
|
710
|
-
if (!trimmedText) throw new Error("BlueBubbles edit requires newText");
|
|
711
|
-
await sendPrivateApiJsonRequest({
|
|
712
|
-
opts,
|
|
713
|
-
feature: "edit",
|
|
714
|
-
action: "edit",
|
|
715
|
-
method: "POST",
|
|
716
|
-
path: `/api/v1/message/${encodeURIComponent(trimmedGuid)}/edit`,
|
|
717
|
-
payload: {
|
|
718
|
-
editedMessage: trimmedText,
|
|
719
|
-
backwardsCompatibilityMessage: opts.backwardsCompatMessage ?? `Edited to: ${trimmedText}`,
|
|
720
|
-
partIndex: resolvePartIndex(opts.partIndex)
|
|
721
|
-
}
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Unsend (retract) a message via BlueBubbles API.
|
|
726
|
-
* Requires macOS 13 (Ventura) or higher with Private API enabled.
|
|
727
|
-
*/
|
|
728
|
-
async function unsendBlueBubblesMessage(messageGuid, opts = {}) {
|
|
729
|
-
const trimmedGuid = messageGuid.trim();
|
|
730
|
-
if (!trimmedGuid) throw new Error("BlueBubbles unsend requires messageGuid");
|
|
731
|
-
await sendPrivateApiJsonRequest({
|
|
732
|
-
opts,
|
|
733
|
-
feature: "unsend",
|
|
734
|
-
action: "unsend",
|
|
735
|
-
method: "POST",
|
|
736
|
-
path: `/api/v1/message/${encodeURIComponent(trimmedGuid)}/unsend`,
|
|
737
|
-
payload: { partIndex: resolvePartIndex(opts.partIndex) }
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Rename a group chat via BlueBubbles API.
|
|
742
|
-
*/
|
|
743
|
-
async function renameBlueBubblesChat(chatGuid, displayName, opts = {}) {
|
|
744
|
-
const trimmedGuid = chatGuid.trim();
|
|
745
|
-
if (!trimmedGuid) throw new Error("BlueBubbles rename requires chatGuid");
|
|
746
|
-
await sendPrivateApiJsonRequest({
|
|
747
|
-
opts,
|
|
748
|
-
feature: "renameGroup",
|
|
749
|
-
action: "rename",
|
|
750
|
-
method: "PUT",
|
|
751
|
-
path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}`,
|
|
752
|
-
payload: { displayName }
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
* Add a participant to a group chat via BlueBubbles API.
|
|
757
|
-
*/
|
|
758
|
-
async function addBlueBubblesParticipant(chatGuid, address, opts = {}) {
|
|
759
|
-
const trimmedGuid = chatGuid.trim();
|
|
760
|
-
if (!trimmedGuid) throw new Error("BlueBubbles addParticipant requires chatGuid");
|
|
761
|
-
const trimmedAddress = address.trim();
|
|
762
|
-
if (!trimmedAddress) throw new Error("BlueBubbles addParticipant requires address");
|
|
763
|
-
await sendPrivateApiJsonRequest({
|
|
764
|
-
opts,
|
|
765
|
-
feature: "addParticipant",
|
|
766
|
-
action: "addParticipant",
|
|
767
|
-
method: "POST",
|
|
768
|
-
path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/participant`,
|
|
769
|
-
payload: { address: trimmedAddress }
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
/**
|
|
773
|
-
* Remove a participant from a group chat via BlueBubbles API.
|
|
774
|
-
*/
|
|
775
|
-
async function removeBlueBubblesParticipant(chatGuid, address, opts = {}) {
|
|
776
|
-
const trimmedGuid = chatGuid.trim();
|
|
777
|
-
if (!trimmedGuid) throw new Error("BlueBubbles removeParticipant requires chatGuid");
|
|
778
|
-
const trimmedAddress = address.trim();
|
|
779
|
-
if (!trimmedAddress) throw new Error("BlueBubbles removeParticipant requires address");
|
|
780
|
-
await sendPrivateApiJsonRequest({
|
|
781
|
-
opts,
|
|
782
|
-
feature: "removeParticipant",
|
|
783
|
-
action: "removeParticipant",
|
|
784
|
-
method: "DELETE",
|
|
785
|
-
path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/participant`,
|
|
786
|
-
payload: { address: trimmedAddress }
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* Leave a group chat via BlueBubbles API.
|
|
791
|
-
*/
|
|
792
|
-
async function leaveBlueBubblesChat(chatGuid, opts = {}) {
|
|
793
|
-
const trimmedGuid = chatGuid.trim();
|
|
794
|
-
if (!trimmedGuid) throw new Error("BlueBubbles leaveChat requires chatGuid");
|
|
795
|
-
await sendPrivateApiJsonRequest({
|
|
796
|
-
opts,
|
|
797
|
-
feature: "leaveGroup",
|
|
798
|
-
action: "leaveChat",
|
|
799
|
-
method: "POST",
|
|
800
|
-
path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/leave`
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Set a group chat's icon/photo via BlueBubbles API.
|
|
805
|
-
* Requires Private API to be enabled.
|
|
806
|
-
*/
|
|
807
|
-
async function setGroupIconBlueBubbles(chatGuid, buffer, filename, opts = {}) {
|
|
808
|
-
const trimmedGuid = chatGuid.trim();
|
|
809
|
-
if (!trimmedGuid) throw new Error("BlueBubbles setGroupIcon requires chatGuid");
|
|
810
|
-
if (!buffer || buffer.length === 0) throw new Error("BlueBubbles setGroupIcon requires image buffer");
|
|
811
|
-
const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount$2(opts);
|
|
812
|
-
assertPrivateApiEnabled(accountId, "setGroupIcon");
|
|
813
|
-
const url = buildBlueBubblesApiUrl({
|
|
814
|
-
baseUrl,
|
|
815
|
-
path: `/api/v1/chat/${encodeURIComponent(trimmedGuid)}/icon`,
|
|
816
|
-
password
|
|
817
|
-
});
|
|
818
|
-
const boundary = `----BlueBubblesFormBoundary${crypto.randomUUID().replace(/-/g, "")}`;
|
|
819
|
-
const parts = [];
|
|
820
|
-
const encoder = new TextEncoder();
|
|
821
|
-
const safeFilename = path.basename(filename).replace(/[\r\n"\\]/g, "_") || "icon.png";
|
|
822
|
-
parts.push(encoder.encode(`--${boundary}\r\n`));
|
|
823
|
-
parts.push(encoder.encode(`Content-Disposition: form-data; name="icon"; filename="${safeFilename}"\r\n`));
|
|
824
|
-
parts.push(encoder.encode(`Content-Type: ${opts.contentType ?? "application/octet-stream"}\r\n\r\n`));
|
|
825
|
-
parts.push(buffer);
|
|
826
|
-
parts.push(encoder.encode("\r\n"));
|
|
827
|
-
parts.push(encoder.encode(`--${boundary}--\r\n`));
|
|
828
|
-
await assertMultipartActionOk(await postMultipartFormData({
|
|
829
|
-
url,
|
|
830
|
-
boundary,
|
|
831
|
-
parts,
|
|
832
|
-
timeoutMs: opts.timeoutMs ?? 6e4,
|
|
833
|
-
ssrfPolicy: blueBubblesPolicy$1(allowPrivateNetwork)
|
|
834
|
-
}), "setGroupIcon");
|
|
835
|
-
}
|
|
836
|
-
//#endregion
|
|
837
|
-
//#region extensions/bluebubbles/src/monitor-debounce.ts
|
|
838
|
-
function normalizeDebounceMessageText(text) {
|
|
839
|
-
return typeof text === "string" ? text : "";
|
|
840
|
-
}
|
|
841
|
-
function sanitizeDebounceEntry(entry) {
|
|
842
|
-
if (typeof entry.message.text === "string") return entry;
|
|
843
|
-
return {
|
|
844
|
-
...entry,
|
|
845
|
-
message: {
|
|
846
|
-
...entry.message,
|
|
847
|
-
text: ""
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
}
|
|
851
|
-
/**
|
|
852
|
-
* Default debounce window for inbound message coalescing (ms).
|
|
853
|
-
* This helps combine URL text + link preview balloon messages that BlueBubbles
|
|
854
|
-
* sends as separate webhook events when no explicit inbound debounce config exists.
|
|
855
|
-
*/
|
|
856
|
-
const DEFAULT_INBOUND_DEBOUNCE_MS = 500;
|
|
857
|
-
/**
|
|
858
|
-
* Combines multiple debounced messages into a single message for processing.
|
|
859
|
-
* Used when multiple webhook events arrive within the debounce window.
|
|
860
|
-
*/
|
|
861
|
-
function combineDebounceEntries(entries) {
|
|
862
|
-
if (entries.length === 0) throw new Error("Cannot combine empty entries");
|
|
863
|
-
if (entries.length === 1) return entries[0].message;
|
|
864
|
-
const first = entries[0].message;
|
|
865
|
-
const seenTexts = /* @__PURE__ */ new Set();
|
|
866
|
-
const textParts = [];
|
|
867
|
-
for (const entry of entries) {
|
|
868
|
-
const text = normalizeDebounceMessageText(entry.message.text).trim();
|
|
869
|
-
if (!text) continue;
|
|
870
|
-
const normalizedText = text.toLowerCase();
|
|
871
|
-
if (seenTexts.has(normalizedText)) continue;
|
|
872
|
-
seenTexts.add(normalizedText);
|
|
873
|
-
textParts.push(text);
|
|
874
|
-
}
|
|
875
|
-
const allAttachments = entries.flatMap((e) => e.message.attachments ?? []);
|
|
876
|
-
const timestamps = entries.map((e) => e.message.timestamp).filter((t) => typeof t === "number");
|
|
877
|
-
const latestTimestamp = timestamps.length > 0 ? Math.max(...timestamps) : first.timestamp;
|
|
878
|
-
const messageIds = entries.map((e) => e.message.messageId).filter((id) => Boolean(id));
|
|
879
|
-
const entryWithReply = entries.find((e) => e.message.replyToId);
|
|
880
|
-
return {
|
|
881
|
-
...first,
|
|
882
|
-
text: textParts.join(" "),
|
|
883
|
-
attachments: allAttachments.length > 0 ? allAttachments : first.attachments,
|
|
884
|
-
timestamp: latestTimestamp,
|
|
885
|
-
messageId: messageIds[0] ?? first.messageId,
|
|
886
|
-
replyToId: entryWithReply?.message.replyToId ?? first.replyToId,
|
|
887
|
-
replyToBody: entryWithReply?.message.replyToBody ?? first.replyToBody,
|
|
888
|
-
replyToSender: entryWithReply?.message.replyToSender ?? first.replyToSender,
|
|
889
|
-
balloonBundleId: void 0
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
function resolveBlueBubblesDebounceMs(config, core) {
|
|
893
|
-
const inbound = config.messages?.inbound;
|
|
894
|
-
if (!(typeof inbound?.debounceMs === "number" || typeof inbound?.byChannel?.bluebubbles === "number")) return DEFAULT_INBOUND_DEBOUNCE_MS;
|
|
895
|
-
return core.channel.debounce.resolveInboundDebounceMs({
|
|
896
|
-
cfg: config,
|
|
897
|
-
channel: "bluebubbles"
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
function createBlueBubblesDebounceRegistry(params) {
|
|
901
|
-
const targetDebouncers = /* @__PURE__ */ new Map();
|
|
902
|
-
return {
|
|
903
|
-
getOrCreateDebouncer: (target) => {
|
|
904
|
-
const existing = targetDebouncers.get(target);
|
|
905
|
-
if (existing) return existing;
|
|
906
|
-
const { account, config, runtime, core } = target;
|
|
907
|
-
const baseDebouncer = core.channel.debounce.createInboundDebouncer({
|
|
908
|
-
debounceMs: resolveBlueBubblesDebounceMs(config, core),
|
|
909
|
-
buildKey: (entry) => {
|
|
910
|
-
const msg = entry.message;
|
|
911
|
-
const balloonBundleId = msg.balloonBundleId?.trim();
|
|
912
|
-
const associatedMessageGuid = msg.associatedMessageGuid?.trim();
|
|
913
|
-
if (balloonBundleId && associatedMessageGuid) return `bluebubbles:${account.accountId}:msg:${associatedMessageGuid}`;
|
|
914
|
-
const messageId = msg.messageId?.trim();
|
|
915
|
-
if (messageId) return `bluebubbles:${account.accountId}:msg:${messageId}`;
|
|
916
|
-
const chatKey = msg.chatGuid?.trim() ?? msg.chatIdentifier?.trim() ?? (msg.chatId ? String(msg.chatId) : "dm");
|
|
917
|
-
return `bluebubbles:${account.accountId}:${chatKey}:${msg.senderId}`;
|
|
918
|
-
},
|
|
919
|
-
shouldDebounce: (entry) => {
|
|
920
|
-
const msg = entry.message;
|
|
921
|
-
if (msg.fromMe) return false;
|
|
922
|
-
if (core.channel.text.hasControlCommand(msg.text, config)) return false;
|
|
923
|
-
return true;
|
|
924
|
-
},
|
|
925
|
-
onFlush: async (entries) => {
|
|
926
|
-
if (entries.length === 0) return;
|
|
927
|
-
const flushTarget = entries[0].target;
|
|
928
|
-
if (entries.length === 1) {
|
|
929
|
-
await params.processMessage(entries[0].message, flushTarget);
|
|
930
|
-
return;
|
|
931
|
-
}
|
|
932
|
-
const combined = combineDebounceEntries(entries);
|
|
933
|
-
if (core.logging.shouldLogVerbose()) {
|
|
934
|
-
const count = entries.length;
|
|
935
|
-
const preview = combined.text.slice(0, 50);
|
|
936
|
-
runtime.log?.(`[bluebubbles] coalesced ${count} messages: "${preview}${combined.text.length > 50 ? "..." : ""}"`);
|
|
937
|
-
}
|
|
938
|
-
await params.processMessage(combined, flushTarget);
|
|
939
|
-
},
|
|
940
|
-
onError: (err) => {
|
|
941
|
-
runtime.error?.(`[${account.accountId}] [bluebubbles] debounce flush failed: ${String(err)}`);
|
|
942
|
-
}
|
|
943
|
-
});
|
|
944
|
-
const debouncer = {
|
|
945
|
-
enqueue: async (item) => {
|
|
946
|
-
await baseDebouncer.enqueue(sanitizeDebounceEntry(item));
|
|
947
|
-
},
|
|
948
|
-
flushKey: (key) => baseDebouncer.flushKey(key)
|
|
949
|
-
};
|
|
950
|
-
targetDebouncers.set(target, debouncer);
|
|
951
|
-
return debouncer;
|
|
952
|
-
},
|
|
953
|
-
removeDebouncer: (target) => {
|
|
954
|
-
targetDebouncers.delete(target);
|
|
955
|
-
}
|
|
956
|
-
};
|
|
957
|
-
}
|
|
958
|
-
//#endregion
|
|
959
|
-
//#region extensions/bluebubbles/src/monitor-normalize.ts
|
|
960
|
-
function asRecord$1(value) {
|
|
961
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
962
|
-
}
|
|
963
|
-
function readString(record, key) {
|
|
964
|
-
if (!record) return;
|
|
965
|
-
const value = record[key];
|
|
966
|
-
return typeof value === "string" ? value : void 0;
|
|
967
|
-
}
|
|
968
|
-
function readNumber(record, key) {
|
|
969
|
-
if (!record) return;
|
|
970
|
-
const value = record[key];
|
|
971
|
-
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
972
|
-
}
|
|
973
|
-
function readBoolean(record, key) {
|
|
974
|
-
if (!record) return;
|
|
975
|
-
const value = record[key];
|
|
976
|
-
return typeof value === "boolean" ? value : void 0;
|
|
977
|
-
}
|
|
978
|
-
function readNumberLike(record, key) {
|
|
979
|
-
if (!record) return;
|
|
980
|
-
return parseFiniteNumber(record[key]);
|
|
981
|
-
}
|
|
982
|
-
function extractAttachments(message) {
|
|
983
|
-
const raw = message["attachments"];
|
|
984
|
-
if (!Array.isArray(raw)) return [];
|
|
985
|
-
const out = [];
|
|
986
|
-
for (const entry of raw) {
|
|
987
|
-
const record = asRecord$1(entry);
|
|
988
|
-
if (!record) continue;
|
|
989
|
-
out.push({
|
|
990
|
-
guid: readString(record, "guid"),
|
|
991
|
-
uti: readString(record, "uti"),
|
|
992
|
-
mimeType: readString(record, "mimeType") ?? readString(record, "mime_type"),
|
|
993
|
-
transferName: readString(record, "transferName") ?? readString(record, "transfer_name"),
|
|
994
|
-
totalBytes: readNumberLike(record, "totalBytes") ?? readNumberLike(record, "total_bytes"),
|
|
995
|
-
height: readNumberLike(record, "height"),
|
|
996
|
-
width: readNumberLike(record, "width"),
|
|
997
|
-
originalROWID: readNumberLike(record, "originalROWID") ?? readNumberLike(record, "rowid")
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
return out;
|
|
1001
|
-
}
|
|
1002
|
-
function buildAttachmentPlaceholder(attachments) {
|
|
1003
|
-
if (attachments.length === 0) return "";
|
|
1004
|
-
const mimeTypes = attachments.map((entry) => entry.mimeType ?? "");
|
|
1005
|
-
const allImages = mimeTypes.every((entry) => entry.startsWith("image/"));
|
|
1006
|
-
const allVideos = mimeTypes.every((entry) => entry.startsWith("video/"));
|
|
1007
|
-
const allAudio = mimeTypes.every((entry) => entry.startsWith("audio/"));
|
|
1008
|
-
const tag = allImages ? "<media:image>" : allVideos ? "<media:video>" : allAudio ? "<media:audio>" : "<media:attachment>";
|
|
1009
|
-
const label = allImages ? "image" : allVideos ? "video" : allAudio ? "audio" : "file";
|
|
1010
|
-
const suffix = attachments.length === 1 ? label : `${label}s`;
|
|
1011
|
-
return `${tag} (${attachments.length} ${suffix})`;
|
|
1012
|
-
}
|
|
1013
|
-
function buildMessagePlaceholder(message) {
|
|
1014
|
-
const attachmentPlaceholder = buildAttachmentPlaceholder(message.attachments ?? []);
|
|
1015
|
-
if (attachmentPlaceholder) return attachmentPlaceholder;
|
|
1016
|
-
if (message.balloonBundleId) return "<media:sticker>";
|
|
1017
|
-
return "";
|
|
1018
|
-
}
|
|
1019
|
-
function formatReplyTag(message) {
|
|
1020
|
-
const rawId = message.replyToShortId || message.replyToId;
|
|
1021
|
-
if (!rawId) return null;
|
|
1022
|
-
return `[[reply_to:${rawId}]]`;
|
|
1023
|
-
}
|
|
1024
|
-
function extractReplyMetadata(message) {
|
|
1025
|
-
const replyRecord = asRecord$1(message["replyTo"] ?? message["reply_to"] ?? message["replyToMessage"] ?? message["reply_to_message"] ?? message["repliedMessage"] ?? message["quotedMessage"] ?? message["associatedMessage"] ?? message["reply"]);
|
|
1026
|
-
const replyHandle = asRecord$1(replyRecord?.["handle"]) ?? asRecord$1(replyRecord?.["sender"]) ?? null;
|
|
1027
|
-
const replySenderRaw = readString(replyHandle, "address") ?? readString(replyHandle, "handle") ?? readString(replyHandle, "id") ?? readString(replyRecord, "senderId") ?? readString(replyRecord, "sender") ?? readString(replyRecord, "from");
|
|
1028
|
-
const normalizedSender = replySenderRaw ? normalizeBlueBubblesHandle(replySenderRaw) || replySenderRaw.trim() : void 0;
|
|
1029
|
-
const replyToBody = readString(replyRecord, "text") ?? readString(replyRecord, "body") ?? readString(replyRecord, "message") ?? readString(replyRecord, "subject") ?? void 0;
|
|
1030
|
-
const directReplyId = readString(message, "replyToMessageGuid") ?? readString(message, "replyToGuid") ?? readString(message, "replyGuid") ?? readString(message, "selectedMessageGuid") ?? readString(message, "selectedMessageId") ?? readString(message, "replyToMessageId") ?? readString(message, "replyId") ?? readString(replyRecord, "guid") ?? readString(replyRecord, "id") ?? readString(replyRecord, "messageId");
|
|
1031
|
-
const associatedType = readNumberLike(message, "associatedMessageType") ?? readNumberLike(message, "associated_message_type");
|
|
1032
|
-
const associatedGuid = readString(message, "associatedMessageGuid") ?? readString(message, "associated_message_guid") ?? readString(message, "associatedMessageId");
|
|
1033
|
-
const isReactionAssociation = typeof associatedType === "number" && REACTION_TYPE_MAP.has(associatedType);
|
|
1034
|
-
const replyToId = directReplyId ?? (!isReactionAssociation ? associatedGuid : void 0);
|
|
1035
|
-
const threadOriginatorGuid = readString(message, "threadOriginatorGuid");
|
|
1036
|
-
const messageGuid = readString(message, "guid");
|
|
1037
|
-
return {
|
|
1038
|
-
replyToId: (replyToId ?? (!replyToId && threadOriginatorGuid && threadOriginatorGuid !== messageGuid ? threadOriginatorGuid : void 0))?.trim() || void 0,
|
|
1039
|
-
replyToBody: replyToBody?.trim() || void 0,
|
|
1040
|
-
replyToSender: normalizedSender || void 0
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
function readFirstChatRecord(message) {
|
|
1044
|
-
const chats = message["chats"];
|
|
1045
|
-
if (!Array.isArray(chats) || chats.length === 0) return null;
|
|
1046
|
-
const first = chats[0];
|
|
1047
|
-
return asRecord$1(first);
|
|
1048
|
-
}
|
|
1049
|
-
function readParticipantEntries(record) {
|
|
1050
|
-
if (!record) return;
|
|
1051
|
-
const participants = record["participants"];
|
|
1052
|
-
if (Array.isArray(participants)) return participants;
|
|
1053
|
-
const handles = record["handles"];
|
|
1054
|
-
if (Array.isArray(handles)) return handles;
|
|
1055
|
-
const participantHandles = record["participantHandles"];
|
|
1056
|
-
if (Array.isArray(participantHandles)) return participantHandles;
|
|
1057
|
-
}
|
|
1058
|
-
function extractSenderInfo(message) {
|
|
1059
|
-
const handleValue = message.handle ?? message.sender;
|
|
1060
|
-
const handle = asRecord$1(handleValue) ?? (typeof handleValue === "string" ? { address: handleValue } : null);
|
|
1061
|
-
const senderId = (readString(handle, "address") ?? readString(handle, "handle") ?? readString(handle, "id") ?? readString(message, "senderId") ?? readString(message, "sender") ?? readString(message, "from") ?? "").trim();
|
|
1062
|
-
const senderName = readString(handle, "displayName") ?? readString(handle, "name") ?? readString(message, "senderName") ?? void 0;
|
|
1063
|
-
return {
|
|
1064
|
-
senderId,
|
|
1065
|
-
senderIdExplicit: Boolean(senderId),
|
|
1066
|
-
senderName
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
function extractChatContext(message) {
|
|
1070
|
-
const chat = asRecord$1(message.chat) ?? asRecord$1(message.conversation) ?? null;
|
|
1071
|
-
const chatFromList = readFirstChatRecord(message);
|
|
1072
|
-
const chatGuid = readString(message, "chatGuid") ?? readString(message, "chat_guid") ?? readString(chat, "chatGuid") ?? readString(chat, "chat_guid") ?? readString(chat, "guid") ?? readString(chatFromList, "chatGuid") ?? readString(chatFromList, "chat_guid") ?? readString(chatFromList, "guid");
|
|
1073
|
-
const chatIdentifier = readString(message, "chatIdentifier") ?? readString(message, "chat_identifier") ?? readString(chat, "chatIdentifier") ?? readString(chat, "chat_identifier") ?? readString(chat, "identifier") ?? readString(chatFromList, "chatIdentifier") ?? readString(chatFromList, "chat_identifier") ?? readString(chatFromList, "identifier") ?? extractChatIdentifierFromChatGuid$1(chatGuid);
|
|
1074
|
-
const chatId = readNumberLike(message, "chatId") ?? readNumberLike(message, "chat_id") ?? readNumberLike(chat, "chatId") ?? readNumberLike(chat, "chat_id") ?? readNumberLike(chat, "id") ?? readNumberLike(chatFromList, "chatId") ?? readNumberLike(chatFromList, "chat_id") ?? readNumberLike(chatFromList, "id");
|
|
1075
|
-
const chatName = readString(message, "chatName") ?? readString(chat, "displayName") ?? readString(chat, "name") ?? readString(chatFromList, "displayName") ?? readString(chatFromList, "name") ?? void 0;
|
|
1076
|
-
const participants = readParticipantEntries(chat) ?? readParticipantEntries(message) ?? readParticipantEntries(chatFromList) ?? [];
|
|
1077
|
-
const participantsCount = participants.length;
|
|
1078
|
-
const groupFromChatGuid = resolveGroupFlagFromChatGuid(chatGuid);
|
|
1079
|
-
const explicitIsGroup = readBoolean(message, "isGroup") ?? readBoolean(message, "is_group") ?? readBoolean(chat, "isGroup") ?? readBoolean(message, "group");
|
|
1080
|
-
return {
|
|
1081
|
-
chatGuid,
|
|
1082
|
-
chatIdentifier,
|
|
1083
|
-
chatId,
|
|
1084
|
-
chatName,
|
|
1085
|
-
isGroup: typeof groupFromChatGuid === "boolean" ? groupFromChatGuid : explicitIsGroup ?? participantsCount > 2,
|
|
1086
|
-
participants
|
|
1087
|
-
};
|
|
1088
|
-
}
|
|
1089
|
-
function normalizeParticipantEntry(entry) {
|
|
1090
|
-
if (typeof entry === "string" || typeof entry === "number") {
|
|
1091
|
-
const raw = String(entry).trim();
|
|
1092
|
-
if (!raw) return null;
|
|
1093
|
-
const normalized = normalizeBlueBubblesHandle(raw) || raw;
|
|
1094
|
-
return normalized ? { id: normalized } : null;
|
|
1095
|
-
}
|
|
1096
|
-
const record = asRecord$1(entry);
|
|
1097
|
-
if (!record) return null;
|
|
1098
|
-
const nestedHandle = asRecord$1(record["handle"]) ?? asRecord$1(record["sender"]) ?? asRecord$1(record["contact"]) ?? null;
|
|
1099
|
-
const idRaw = readString(record, "address") ?? readString(record, "handle") ?? readString(record, "id") ?? readString(record, "phoneNumber") ?? readString(record, "phone_number") ?? readString(record, "email") ?? readString(nestedHandle, "address") ?? readString(nestedHandle, "handle") ?? readString(nestedHandle, "id");
|
|
1100
|
-
const nameRaw = readString(record, "displayName") ?? readString(record, "name") ?? readString(record, "title") ?? readString(nestedHandle, "displayName") ?? readString(nestedHandle, "name");
|
|
1101
|
-
const normalizedId = idRaw ? normalizeBlueBubblesHandle(idRaw) || idRaw.trim() : "";
|
|
1102
|
-
if (!normalizedId) return null;
|
|
1103
|
-
return {
|
|
1104
|
-
id: normalizedId,
|
|
1105
|
-
name: nameRaw?.trim() || void 0
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
function normalizeParticipantList(raw) {
|
|
1109
|
-
const entries = Array.isArray(raw) ? raw : readParticipantEntries(asRecord$1(raw)) ?? [];
|
|
1110
|
-
if (entries.length === 0) return [];
|
|
1111
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1112
|
-
const output = [];
|
|
1113
|
-
for (const entry of entries) {
|
|
1114
|
-
const normalized = normalizeParticipantEntry(entry);
|
|
1115
|
-
if (!normalized?.id) continue;
|
|
1116
|
-
const key = normalized.id.toLowerCase();
|
|
1117
|
-
if (seen.has(key)) continue;
|
|
1118
|
-
seen.add(key);
|
|
1119
|
-
output.push(normalized);
|
|
1120
|
-
}
|
|
1121
|
-
return output;
|
|
1122
|
-
}
|
|
1123
|
-
function formatGroupMembers(params) {
|
|
1124
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1125
|
-
const ordered = [];
|
|
1126
|
-
for (const entry of params.participants ?? []) {
|
|
1127
|
-
if (!entry?.id) continue;
|
|
1128
|
-
const key = entry.id.toLowerCase();
|
|
1129
|
-
if (seen.has(key)) continue;
|
|
1130
|
-
seen.add(key);
|
|
1131
|
-
ordered.push(entry);
|
|
1132
|
-
}
|
|
1133
|
-
if (ordered.length === 0 && params.fallback?.id) ordered.push(params.fallback);
|
|
1134
|
-
if (ordered.length === 0) return;
|
|
1135
|
-
return ordered.map((entry) => entry.name ? `${entry.name} (${entry.id})` : entry.id).join(", ");
|
|
1136
|
-
}
|
|
1137
|
-
function resolveGroupFlagFromChatGuid(chatGuid) {
|
|
1138
|
-
const guid = chatGuid?.trim();
|
|
1139
|
-
if (!guid) return;
|
|
1140
|
-
const parts = guid.split(";");
|
|
1141
|
-
if (parts.length >= 3) {
|
|
1142
|
-
if (parts[1] === "+") return true;
|
|
1143
|
-
if (parts[1] === "-") return false;
|
|
1144
|
-
}
|
|
1145
|
-
if (guid.includes(";+;")) return true;
|
|
1146
|
-
if (guid.includes(";-;")) return false;
|
|
1147
|
-
}
|
|
1148
|
-
function extractChatIdentifierFromChatGuid$1(chatGuid) {
|
|
1149
|
-
const guid = chatGuid?.trim();
|
|
1150
|
-
if (!guid) return;
|
|
1151
|
-
const parts = guid.split(";");
|
|
1152
|
-
if (parts.length < 3) return;
|
|
1153
|
-
return parts[2]?.trim() || void 0;
|
|
1154
|
-
}
|
|
1155
|
-
function formatGroupAllowlistEntry(params) {
|
|
1156
|
-
const guid = params.chatGuid?.trim();
|
|
1157
|
-
if (guid) return `chat_guid:${guid}`;
|
|
1158
|
-
const chatId = params.chatId;
|
|
1159
|
-
if (typeof chatId === "number" && Number.isFinite(chatId)) return `chat_id:${chatId}`;
|
|
1160
|
-
const identifier = params.chatIdentifier?.trim();
|
|
1161
|
-
if (identifier) return `chat_identifier:${identifier}`;
|
|
1162
|
-
return null;
|
|
1163
|
-
}
|
|
1164
|
-
const REACTION_TYPE_MAP = new Map([
|
|
1165
|
-
[2e3, {
|
|
1166
|
-
emoji: "❤️",
|
|
1167
|
-
action: "added"
|
|
1168
|
-
}],
|
|
1169
|
-
[2001, {
|
|
1170
|
-
emoji: "👍",
|
|
1171
|
-
action: "added"
|
|
1172
|
-
}],
|
|
1173
|
-
[2002, {
|
|
1174
|
-
emoji: "👎",
|
|
1175
|
-
action: "added"
|
|
1176
|
-
}],
|
|
1177
|
-
[2003, {
|
|
1178
|
-
emoji: "😂",
|
|
1179
|
-
action: "added"
|
|
1180
|
-
}],
|
|
1181
|
-
[2004, {
|
|
1182
|
-
emoji: "‼️",
|
|
1183
|
-
action: "added"
|
|
1184
|
-
}],
|
|
1185
|
-
[2005, {
|
|
1186
|
-
emoji: "❓",
|
|
1187
|
-
action: "added"
|
|
1188
|
-
}],
|
|
1189
|
-
[3e3, {
|
|
1190
|
-
emoji: "❤️",
|
|
1191
|
-
action: "removed"
|
|
1192
|
-
}],
|
|
1193
|
-
[3001, {
|
|
1194
|
-
emoji: "👍",
|
|
1195
|
-
action: "removed"
|
|
1196
|
-
}],
|
|
1197
|
-
[3002, {
|
|
1198
|
-
emoji: "👎",
|
|
1199
|
-
action: "removed"
|
|
1200
|
-
}],
|
|
1201
|
-
[3003, {
|
|
1202
|
-
emoji: "😂",
|
|
1203
|
-
action: "removed"
|
|
1204
|
-
}],
|
|
1205
|
-
[3004, {
|
|
1206
|
-
emoji: "‼️",
|
|
1207
|
-
action: "removed"
|
|
1208
|
-
}],
|
|
1209
|
-
[3005, {
|
|
1210
|
-
emoji: "❓",
|
|
1211
|
-
action: "removed"
|
|
1212
|
-
}]
|
|
1213
|
-
]);
|
|
1214
|
-
const TAPBACK_TEXT_MAP = new Map([
|
|
1215
|
-
["loved", {
|
|
1216
|
-
emoji: "❤️",
|
|
1217
|
-
action: "added"
|
|
1218
|
-
}],
|
|
1219
|
-
["liked", {
|
|
1220
|
-
emoji: "👍",
|
|
1221
|
-
action: "added"
|
|
1222
|
-
}],
|
|
1223
|
-
["disliked", {
|
|
1224
|
-
emoji: "👎",
|
|
1225
|
-
action: "added"
|
|
1226
|
-
}],
|
|
1227
|
-
["laughed at", {
|
|
1228
|
-
emoji: "😂",
|
|
1229
|
-
action: "added"
|
|
1230
|
-
}],
|
|
1231
|
-
["emphasized", {
|
|
1232
|
-
emoji: "‼️",
|
|
1233
|
-
action: "added"
|
|
1234
|
-
}],
|
|
1235
|
-
["questioned", {
|
|
1236
|
-
emoji: "❓",
|
|
1237
|
-
action: "added"
|
|
1238
|
-
}],
|
|
1239
|
-
["removed a heart from", {
|
|
1240
|
-
emoji: "❤️",
|
|
1241
|
-
action: "removed"
|
|
1242
|
-
}],
|
|
1243
|
-
["removed a like from", {
|
|
1244
|
-
emoji: "👍",
|
|
1245
|
-
action: "removed"
|
|
1246
|
-
}],
|
|
1247
|
-
["removed a dislike from", {
|
|
1248
|
-
emoji: "👎",
|
|
1249
|
-
action: "removed"
|
|
1250
|
-
}],
|
|
1251
|
-
["removed a laugh from", {
|
|
1252
|
-
emoji: "😂",
|
|
1253
|
-
action: "removed"
|
|
1254
|
-
}],
|
|
1255
|
-
["removed an emphasis from", {
|
|
1256
|
-
emoji: "‼️",
|
|
1257
|
-
action: "removed"
|
|
1258
|
-
}],
|
|
1259
|
-
["removed a question from", {
|
|
1260
|
-
emoji: "❓",
|
|
1261
|
-
action: "removed"
|
|
1262
|
-
}]
|
|
1263
|
-
]);
|
|
1264
|
-
const TAPBACK_EMOJI_REGEX = /(?:\p{Regional_Indicator}{2})|(?:[0-9#*]\uFE0F?\u20E3)|(?:\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\p{Emoji_Modifier})?(?:\u200D\p{Extended_Pictographic}(?:\uFE0F|\uFE0E)?(?:\p{Emoji_Modifier})?)*)/u;
|
|
1265
|
-
function extractFirstEmoji(text) {
|
|
1266
|
-
const match = text.match(TAPBACK_EMOJI_REGEX);
|
|
1267
|
-
return match ? match[0] : null;
|
|
1268
|
-
}
|
|
1269
|
-
function extractQuotedTapbackText(text) {
|
|
1270
|
-
const match = text.match(/[“"]([^”"]+)[”"]/s);
|
|
1271
|
-
return match ? match[1] : null;
|
|
1272
|
-
}
|
|
1273
|
-
function isTapbackAssociatedType(type) {
|
|
1274
|
-
return typeof type === "number" && Number.isFinite(type) && type >= 2e3 && type < 4e3;
|
|
1275
|
-
}
|
|
1276
|
-
function resolveTapbackActionHint(type) {
|
|
1277
|
-
if (typeof type !== "number" || !Number.isFinite(type)) return;
|
|
1278
|
-
if (type >= 3e3 && type < 4e3) return "removed";
|
|
1279
|
-
if (type >= 2e3 && type < 3e3) return "added";
|
|
1280
|
-
}
|
|
1281
|
-
function resolveTapbackContext(message) {
|
|
1282
|
-
const associatedType = message.associatedMessageType;
|
|
1283
|
-
const hasTapbackType = isTapbackAssociatedType(associatedType);
|
|
1284
|
-
const hasTapbackMarker = Boolean(message.associatedMessageEmoji) || Boolean(message.isTapback);
|
|
1285
|
-
if (!hasTapbackType && !hasTapbackMarker) return null;
|
|
1286
|
-
const replyToId = message.associatedMessageGuid?.trim() || message.replyToId?.trim() || void 0;
|
|
1287
|
-
const actionHint = resolveTapbackActionHint(associatedType);
|
|
1288
|
-
return {
|
|
1289
|
-
emojiHint: message.associatedMessageEmoji?.trim() || REACTION_TYPE_MAP.get(associatedType ?? -1)?.emoji,
|
|
1290
|
-
actionHint,
|
|
1291
|
-
replyToId
|
|
1292
|
-
};
|
|
1293
|
-
}
|
|
1294
|
-
function parseTapbackText(params) {
|
|
1295
|
-
const trimmed = params.text.trim();
|
|
1296
|
-
const lower = trimmed.toLowerCase();
|
|
1297
|
-
if (!trimmed) return null;
|
|
1298
|
-
const parseLeadingReactionAction = (prefix, defaultAction) => {
|
|
1299
|
-
if (!lower.startsWith(prefix)) return null;
|
|
1300
|
-
const emoji = extractFirstEmoji(trimmed) ?? params.emojiHint;
|
|
1301
|
-
if (!emoji) return null;
|
|
1302
|
-
const quotedText = extractQuotedTapbackText(trimmed);
|
|
1303
|
-
if (params.requireQuoted && !quotedText) return null;
|
|
1304
|
-
const fallback = trimmed.slice(prefix.length).trim();
|
|
1305
|
-
return {
|
|
1306
|
-
emoji,
|
|
1307
|
-
action: params.actionHint ?? defaultAction,
|
|
1308
|
-
quotedText: quotedText ?? fallback
|
|
1309
|
-
};
|
|
1310
|
-
};
|
|
1311
|
-
for (const [pattern, { emoji, action }] of TAPBACK_TEXT_MAP) if (lower.startsWith(pattern)) {
|
|
1312
|
-
const afterPattern = trimmed.slice(pattern.length).trim();
|
|
1313
|
-
if (params.requireQuoted) {
|
|
1314
|
-
const strictMatch = afterPattern.match(/^[“"](.+)[”"]$/s);
|
|
1315
|
-
if (!strictMatch) return null;
|
|
1316
|
-
return {
|
|
1317
|
-
emoji,
|
|
1318
|
-
action,
|
|
1319
|
-
quotedText: strictMatch[1]
|
|
1320
|
-
};
|
|
1321
|
-
}
|
|
1322
|
-
return {
|
|
1323
|
-
emoji,
|
|
1324
|
-
action,
|
|
1325
|
-
quotedText: extractQuotedTapbackText(afterPattern) ?? extractQuotedTapbackText(trimmed) ?? afterPattern
|
|
1326
|
-
};
|
|
1327
|
-
}
|
|
1328
|
-
const reacted = parseLeadingReactionAction("reacted", "added");
|
|
1329
|
-
if (reacted) return reacted;
|
|
1330
|
-
const removed = parseLeadingReactionAction("removed", "removed");
|
|
1331
|
-
if (removed) return removed;
|
|
1332
|
-
return null;
|
|
1333
|
-
}
|
|
1334
|
-
function extractMessagePayload(payload) {
|
|
1335
|
-
const parseRecord = (value) => {
|
|
1336
|
-
const record = asRecord$1(value);
|
|
1337
|
-
if (record) return record;
|
|
1338
|
-
if (Array.isArray(value)) {
|
|
1339
|
-
for (const entry of value) {
|
|
1340
|
-
const parsedEntry = parseRecord(entry);
|
|
1341
|
-
if (parsedEntry) return parsedEntry;
|
|
1342
|
-
}
|
|
1343
|
-
return null;
|
|
1344
|
-
}
|
|
1345
|
-
if (typeof value !== "string") return null;
|
|
1346
|
-
const trimmed = value.trim();
|
|
1347
|
-
if (!trimmed) return null;
|
|
1348
|
-
try {
|
|
1349
|
-
return parseRecord(JSON.parse(trimmed));
|
|
1350
|
-
} catch {
|
|
1351
|
-
return null;
|
|
1352
|
-
}
|
|
1353
|
-
};
|
|
1354
|
-
const data = parseRecord(payload.data ?? payload.payload ?? payload.event);
|
|
1355
|
-
const message = parseRecord(payload.message ?? data?.message ?? data);
|
|
1356
|
-
if (message) return message;
|
|
1357
|
-
return null;
|
|
1358
|
-
}
|
|
1359
|
-
function normalizeWebhookMessage(payload) {
|
|
1360
|
-
const message = extractMessagePayload(payload);
|
|
1361
|
-
if (!message) return null;
|
|
1362
|
-
const text = readString(message, "text") ?? readString(message, "body") ?? readString(message, "subject") ?? "";
|
|
1363
|
-
const { senderId, senderIdExplicit, senderName } = extractSenderInfo(message);
|
|
1364
|
-
const { chatGuid, chatIdentifier, chatId, chatName, isGroup, participants } = extractChatContext(message);
|
|
1365
|
-
const normalizedParticipants = normalizeParticipantList(participants);
|
|
1366
|
-
const fromMe = readBoolean(message, "isFromMe") ?? readBoolean(message, "is_from_me");
|
|
1367
|
-
const messageId = readString(message, "guid") ?? readString(message, "id") ?? readString(message, "messageId") ?? void 0;
|
|
1368
|
-
const balloonBundleId = readString(message, "balloonBundleId");
|
|
1369
|
-
const associatedMessageGuid = readString(message, "associatedMessageGuid") ?? readString(message, "associated_message_guid") ?? readString(message, "associatedMessageId") ?? void 0;
|
|
1370
|
-
const associatedMessageType = readNumberLike(message, "associatedMessageType") ?? readNumberLike(message, "associated_message_type");
|
|
1371
|
-
const associatedMessageEmoji = readString(message, "associatedMessageEmoji") ?? readString(message, "associated_message_emoji") ?? readString(message, "reactionEmoji") ?? readString(message, "reaction_emoji") ?? void 0;
|
|
1372
|
-
const isTapback = readBoolean(message, "isTapback") ?? readBoolean(message, "is_tapback") ?? readBoolean(message, "tapback") ?? void 0;
|
|
1373
|
-
const timestampRaw = readNumber(message, "date") ?? readNumber(message, "dateCreated") ?? readNumber(message, "timestamp");
|
|
1374
|
-
const timestamp = typeof timestampRaw === "number" ? timestampRaw > 0xe8d4a51000 ? timestampRaw : timestampRaw * 1e3 : void 0;
|
|
1375
|
-
const senderFallbackFromChatGuid = !senderIdExplicit && !isGroup && chatGuid ? extractHandleFromChatGuid(chatGuid) : null;
|
|
1376
|
-
const normalizedSender = normalizeBlueBubblesHandle(senderId || senderFallbackFromChatGuid || "");
|
|
1377
|
-
if (!normalizedSender) return null;
|
|
1378
|
-
const replyMetadata = extractReplyMetadata(message);
|
|
1379
|
-
return {
|
|
1380
|
-
text,
|
|
1381
|
-
senderId: normalizedSender,
|
|
1382
|
-
senderIdExplicit,
|
|
1383
|
-
senderName,
|
|
1384
|
-
messageId,
|
|
1385
|
-
timestamp,
|
|
1386
|
-
isGroup,
|
|
1387
|
-
chatId,
|
|
1388
|
-
chatGuid,
|
|
1389
|
-
chatIdentifier,
|
|
1390
|
-
chatName,
|
|
1391
|
-
fromMe,
|
|
1392
|
-
attachments: extractAttachments(message),
|
|
1393
|
-
balloonBundleId,
|
|
1394
|
-
associatedMessageGuid,
|
|
1395
|
-
associatedMessageType,
|
|
1396
|
-
associatedMessageEmoji,
|
|
1397
|
-
isTapback,
|
|
1398
|
-
participants: normalizedParticipants,
|
|
1399
|
-
replyToId: replyMetadata.replyToId,
|
|
1400
|
-
replyToBody: replyMetadata.replyToBody,
|
|
1401
|
-
replyToSender: replyMetadata.replyToSender
|
|
1402
|
-
};
|
|
1403
|
-
}
|
|
1404
|
-
function normalizeWebhookReaction(payload) {
|
|
1405
|
-
const message = extractMessagePayload(payload);
|
|
1406
|
-
if (!message) return null;
|
|
1407
|
-
const associatedGuid = readString(message, "associatedMessageGuid") ?? readString(message, "associated_message_guid") ?? readString(message, "associatedMessageId");
|
|
1408
|
-
const associatedType = readNumberLike(message, "associatedMessageType") ?? readNumberLike(message, "associated_message_type");
|
|
1409
|
-
if (!associatedGuid || associatedType === void 0) return null;
|
|
1410
|
-
const mapping = REACTION_TYPE_MAP.get(associatedType);
|
|
1411
|
-
const emoji = ((readString(message, "associatedMessageEmoji") ?? readString(message, "associated_message_emoji") ?? readString(message, "reactionEmoji") ?? readString(message, "reaction_emoji"))?.trim() || mapping?.emoji) ?? `reaction:${associatedType}`;
|
|
1412
|
-
const action = mapping?.action ?? resolveTapbackActionHint(associatedType) ?? "added";
|
|
1413
|
-
const { senderId, senderIdExplicit, senderName } = extractSenderInfo(message);
|
|
1414
|
-
const { chatGuid, chatIdentifier, chatId, chatName, isGroup } = extractChatContext(message);
|
|
1415
|
-
const fromMe = readBoolean(message, "isFromMe") ?? readBoolean(message, "is_from_me");
|
|
1416
|
-
const timestampRaw = readNumberLike(message, "date") ?? readNumberLike(message, "dateCreated") ?? readNumberLike(message, "timestamp");
|
|
1417
|
-
const timestamp = typeof timestampRaw === "number" ? timestampRaw > 0xe8d4a51000 ? timestampRaw : timestampRaw * 1e3 : void 0;
|
|
1418
|
-
const senderFallbackFromChatGuid = !senderIdExplicit && !isGroup && chatGuid ? extractHandleFromChatGuid(chatGuid) : null;
|
|
1419
|
-
const normalizedSender = normalizeBlueBubblesHandle(senderId || senderFallbackFromChatGuid || "");
|
|
1420
|
-
if (!normalizedSender) return null;
|
|
1421
|
-
return {
|
|
1422
|
-
action,
|
|
1423
|
-
emoji,
|
|
1424
|
-
senderId: normalizedSender,
|
|
1425
|
-
senderIdExplicit,
|
|
1426
|
-
senderName,
|
|
1427
|
-
messageId: associatedGuid,
|
|
1428
|
-
timestamp,
|
|
1429
|
-
isGroup,
|
|
1430
|
-
chatId,
|
|
1431
|
-
chatGuid,
|
|
1432
|
-
chatIdentifier,
|
|
1433
|
-
chatName,
|
|
1434
|
-
fromMe
|
|
1435
|
-
};
|
|
1436
|
-
}
|
|
1437
|
-
//#endregion
|
|
1438
|
-
//#region extensions/bluebubbles/src/conversation-route.ts
|
|
1439
|
-
function resolveBlueBubblesConversationRoute(params) {
|
|
1440
|
-
let route = resolveAgentRoute({
|
|
1441
|
-
cfg: params.cfg,
|
|
1442
|
-
channel: "bluebubbles",
|
|
1443
|
-
accountId: params.accountId,
|
|
1444
|
-
peer: {
|
|
1445
|
-
kind: params.isGroup ? "group" : "direct",
|
|
1446
|
-
id: params.peerId
|
|
1447
|
-
}
|
|
1448
|
-
});
|
|
1449
|
-
const conversationId = resolveBlueBubblesInboundConversationId({
|
|
1450
|
-
isGroup: params.isGroup,
|
|
1451
|
-
sender: params.sender,
|
|
1452
|
-
chatId: params.chatId,
|
|
1453
|
-
chatGuid: params.chatGuid,
|
|
1454
|
-
chatIdentifier: params.chatIdentifier
|
|
1455
|
-
});
|
|
1456
|
-
if (!conversationId) return route;
|
|
1457
|
-
route = resolveConfiguredBindingRoute({
|
|
1458
|
-
cfg: params.cfg,
|
|
1459
|
-
route,
|
|
1460
|
-
conversation: {
|
|
1461
|
-
channel: "bluebubbles",
|
|
1462
|
-
accountId: params.accountId,
|
|
1463
|
-
conversationId
|
|
1464
|
-
}
|
|
1465
|
-
}).route;
|
|
1466
|
-
const runtimeBinding = getSessionBindingService().resolveByConversation({
|
|
1467
|
-
channel: "bluebubbles",
|
|
1468
|
-
accountId: params.accountId,
|
|
1469
|
-
conversationId
|
|
1470
|
-
});
|
|
1471
|
-
const boundSessionKey = runtimeBinding?.targetSessionKey?.trim();
|
|
1472
|
-
if (!runtimeBinding || !boundSessionKey) return route;
|
|
1473
|
-
getSessionBindingService().touch(runtimeBinding.bindingId);
|
|
1474
|
-
if (isPluginOwnedSessionBindingRecord(runtimeBinding)) {
|
|
1475
|
-
logVerbose$1(`bluebubbles: plugin-bound conversation ${conversationId}`);
|
|
1476
|
-
return route;
|
|
1477
|
-
}
|
|
1478
|
-
logVerbose$1(`bluebubbles: routed via bound conversation ${conversationId} -> ${boundSessionKey}`);
|
|
1479
|
-
return {
|
|
1480
|
-
...route,
|
|
1481
|
-
sessionKey: boundSessionKey,
|
|
1482
|
-
agentId: resolveAgentIdFromSessionKey(boundSessionKey),
|
|
1483
|
-
lastRoutePolicy: deriveLastRoutePolicy({
|
|
1484
|
-
sessionKey: boundSessionKey,
|
|
1485
|
-
mainSessionKey: route.mainSessionKey
|
|
1486
|
-
}),
|
|
1487
|
-
matchedBy: "binding.channel"
|
|
1488
|
-
};
|
|
1489
|
-
}
|
|
1490
|
-
//#endregion
|
|
1491
|
-
//#region extensions/bluebubbles/src/history.ts
|
|
1492
|
-
function resolveAccount$1(params) {
|
|
1493
|
-
return resolveBlueBubblesServerAccount(params);
|
|
1494
|
-
}
|
|
1495
|
-
const MAX_HISTORY_FETCH_LIMIT = 100;
|
|
1496
|
-
const HISTORY_SCAN_MULTIPLIER = 8;
|
|
1497
|
-
const MAX_HISTORY_SCAN_MESSAGES = 500;
|
|
1498
|
-
const MAX_HISTORY_BODY_CHARS = 2e3;
|
|
1499
|
-
function clampHistoryLimit(limit) {
|
|
1500
|
-
if (!Number.isFinite(limit)) return 0;
|
|
1501
|
-
const normalized = Math.floor(limit);
|
|
1502
|
-
if (normalized <= 0) return 0;
|
|
1503
|
-
return Math.min(normalized, MAX_HISTORY_FETCH_LIMIT);
|
|
1504
|
-
}
|
|
1505
|
-
function truncateHistoryBody$1(text) {
|
|
1506
|
-
if (text.length <= MAX_HISTORY_BODY_CHARS) return text;
|
|
1507
|
-
return `${text.slice(0, MAX_HISTORY_BODY_CHARS).trimEnd()}...`;
|
|
1508
|
-
}
|
|
1509
|
-
/**
|
|
1510
|
-
* Fetch message history from BlueBubbles API for a specific chat.
|
|
1511
|
-
* This provides the initial backfill for both group chats and DMs.
|
|
1512
|
-
*/
|
|
1513
|
-
async function fetchBlueBubblesHistory(chatIdentifier, limit, opts = {}) {
|
|
1514
|
-
const effectiveLimit = clampHistoryLimit(limit);
|
|
1515
|
-
if (!chatIdentifier.trim() || effectiveLimit <= 0) return {
|
|
1516
|
-
entries: [],
|
|
1517
|
-
resolved: true
|
|
1518
|
-
};
|
|
1519
|
-
let baseUrl;
|
|
1520
|
-
let password;
|
|
1521
|
-
let allowPrivateNetwork = false;
|
|
1522
|
-
try {
|
|
1523
|
-
({baseUrl, password, allowPrivateNetwork} = resolveAccount$1(opts));
|
|
1524
|
-
} catch {
|
|
1525
|
-
return {
|
|
1526
|
-
entries: [],
|
|
1527
|
-
resolved: false
|
|
1528
|
-
};
|
|
1529
|
-
}
|
|
1530
|
-
const ssrfPolicy = allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
|
|
1531
|
-
const possiblePaths = [
|
|
1532
|
-
`/api/v1/chat/${encodeURIComponent(chatIdentifier)}/messages?limit=${effectiveLimit}&sort=DESC`,
|
|
1533
|
-
`/api/v1/messages?chatGuid=${encodeURIComponent(chatIdentifier)}&limit=${effectiveLimit}`,
|
|
1534
|
-
`/api/v1/chat/${encodeURIComponent(chatIdentifier)}/message?limit=${effectiveLimit}`
|
|
1535
|
-
];
|
|
1536
|
-
for (const path of possiblePaths) try {
|
|
1537
|
-
const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
|
|
1538
|
-
baseUrl,
|
|
1539
|
-
path,
|
|
1540
|
-
password
|
|
1541
|
-
}), { method: "GET" }, opts.timeoutMs ?? 1e4, ssrfPolicy);
|
|
1542
|
-
if (!res.ok) continue;
|
|
1543
|
-
const data = await res.json().catch(() => null);
|
|
1544
|
-
if (!data) continue;
|
|
1545
|
-
let messages = [];
|
|
1546
|
-
if (Array.isArray(data)) messages = data;
|
|
1547
|
-
else if (data.data && Array.isArray(data.data)) messages = data.data;
|
|
1548
|
-
else if (data.messages && Array.isArray(data.messages)) messages = data.messages;
|
|
1549
|
-
else continue;
|
|
1550
|
-
const historyEntries = [];
|
|
1551
|
-
const maxScannedMessages = Math.min(Math.max(effectiveLimit * HISTORY_SCAN_MULTIPLIER, effectiveLimit), MAX_HISTORY_SCAN_MESSAGES);
|
|
1552
|
-
for (let i = 0; i < messages.length && i < maxScannedMessages; i++) {
|
|
1553
|
-
const msg = messages[i];
|
|
1554
|
-
const text = msg.text?.trim();
|
|
1555
|
-
if (!text) continue;
|
|
1556
|
-
const sender = msg.is_from_me ? "me" : msg.sender?.display_name || msg.sender?.address || msg.handle_id || "Unknown";
|
|
1557
|
-
const timestamp = msg.date_created || msg.date_delivered;
|
|
1558
|
-
historyEntries.push({
|
|
1559
|
-
sender,
|
|
1560
|
-
body: truncateHistoryBody$1(text),
|
|
1561
|
-
timestamp,
|
|
1562
|
-
messageId: msg.guid
|
|
1563
|
-
});
|
|
1564
|
-
}
|
|
1565
|
-
historyEntries.sort((a, b) => {
|
|
1566
|
-
return (a.timestamp || 0) - (b.timestamp || 0);
|
|
1567
|
-
});
|
|
1568
|
-
return {
|
|
1569
|
-
entries: historyEntries.slice(0, effectiveLimit),
|
|
1570
|
-
resolved: true
|
|
1571
|
-
};
|
|
1572
|
-
} catch (error) {
|
|
1573
|
-
continue;
|
|
1574
|
-
}
|
|
1575
|
-
return {
|
|
1576
|
-
entries: [],
|
|
1577
|
-
resolved: false
|
|
1578
|
-
};
|
|
1579
|
-
}
|
|
1580
|
-
//#endregion
|
|
1581
|
-
//#region extensions/bluebubbles/src/local-file-access.ts
|
|
1582
|
-
function isLocalFileUrlHost(hostname) {
|
|
1583
|
-
return hostname === "" || hostname.toLowerCase() === "localhost";
|
|
1584
|
-
}
|
|
1585
|
-
function assertNoWindowsNetworkPath(filePath, label = "Path") {
|
|
1586
|
-
if (process.platform !== "win32") return;
|
|
1587
|
-
const normalized = filePath.replace(/\//g, "\\");
|
|
1588
|
-
if (normalized.startsWith("\\\\?\\UNC\\") || normalized.startsWith("\\\\")) throw new Error(`${label} cannot use Windows network paths: ${filePath}`);
|
|
1589
|
-
}
|
|
1590
|
-
function safeFileURLToPath(fileUrl) {
|
|
1591
|
-
let parsed;
|
|
1592
|
-
try {
|
|
1593
|
-
parsed = new URL$1(fileUrl);
|
|
1594
|
-
} catch {
|
|
1595
|
-
throw new Error(`Invalid file:// URL: ${fileUrl}`);
|
|
1596
|
-
}
|
|
1597
|
-
if (parsed.protocol !== "file:") throw new Error(`Invalid file:// URL: ${fileUrl}`);
|
|
1598
|
-
if (!isLocalFileUrlHost(parsed.hostname)) throw new Error(`file:// URLs with remote hosts are not allowed: ${fileUrl}`);
|
|
1599
|
-
const filePath = fileURLToPath(parsed);
|
|
1600
|
-
assertNoWindowsNetworkPath(filePath, "Local file URL");
|
|
1601
|
-
return filePath;
|
|
1602
|
-
}
|
|
1603
|
-
function trySafeFileURLToPath(fileUrl) {
|
|
1604
|
-
try {
|
|
1605
|
-
return safeFileURLToPath(fileUrl);
|
|
1606
|
-
} catch {
|
|
1607
|
-
return;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
function basenameFromMediaSource(source) {
|
|
1611
|
-
if (!source) return;
|
|
1612
|
-
if (source.startsWith("file://")) {
|
|
1613
|
-
const filePath = trySafeFileURLToPath(source);
|
|
1614
|
-
return filePath ? path.basename(filePath) || void 0 : void 0;
|
|
1615
|
-
}
|
|
1616
|
-
if (/^https?:\/\//i.test(source)) try {
|
|
1617
|
-
return path.basename(new URL$1(source).pathname) || void 0;
|
|
1618
|
-
} catch {
|
|
1619
|
-
return;
|
|
1620
|
-
}
|
|
1621
|
-
return path.basename(source) || void 0;
|
|
1622
|
-
}
|
|
1623
|
-
//#endregion
|
|
1624
|
-
//#region extensions/bluebubbles/src/media-send.ts
|
|
1625
|
-
const HTTP_URL_RE = /^https?:\/\//i;
|
|
1626
|
-
const MB = 1024 * 1024;
|
|
1627
|
-
function assertMediaWithinLimit(sizeBytes, maxBytes) {
|
|
1628
|
-
if (typeof maxBytes !== "number" || maxBytes <= 0) return;
|
|
1629
|
-
if (sizeBytes <= maxBytes) return;
|
|
1630
|
-
const maxLabel = (maxBytes / MB).toFixed(0);
|
|
1631
|
-
const sizeLabel = (sizeBytes / MB).toFixed(2);
|
|
1632
|
-
throw new Error(`Media exceeds ${maxLabel}MB limit (got ${sizeLabel}MB)`);
|
|
1633
|
-
}
|
|
1634
|
-
function resolveLocalMediaPath(source) {
|
|
1635
|
-
if (!source.startsWith("file://")) return source;
|
|
1636
|
-
try {
|
|
1637
|
-
return safeFileURLToPath(source);
|
|
1638
|
-
} catch {
|
|
1639
|
-
throw new Error(`Invalid file:// URL: ${source}`);
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
function expandHomePath(input) {
|
|
1643
|
-
if (input === "~") return os.homedir();
|
|
1644
|
-
if (input.startsWith("~/") || input.startsWith(`~${path.sep}`)) return path.join(os.homedir(), input.slice(2));
|
|
1645
|
-
return input;
|
|
1646
|
-
}
|
|
1647
|
-
function resolveConfiguredPath(input) {
|
|
1648
|
-
const trimmed = input.trim();
|
|
1649
|
-
if (!trimmed) throw new Error("Empty mediaLocalRoots entry is not allowed");
|
|
1650
|
-
if (trimmed.startsWith("file://")) try {
|
|
1651
|
-
return safeFileURLToPath(trimmed);
|
|
1652
|
-
} catch {
|
|
1653
|
-
throw new Error(`Invalid file:// URL in mediaLocalRoots: ${input}`);
|
|
1654
|
-
}
|
|
1655
|
-
const resolved = expandHomePath(trimmed);
|
|
1656
|
-
if (!path.isAbsolute(resolved)) throw new Error(`mediaLocalRoots entries must be absolute paths: ${input}`);
|
|
1657
|
-
return resolved;
|
|
1658
|
-
}
|
|
1659
|
-
function isPathInsideRoot(candidate, root) {
|
|
1660
|
-
const normalizedCandidate = path.normalize(candidate);
|
|
1661
|
-
const normalizedRoot = path.normalize(root);
|
|
1662
|
-
const rootWithSep = normalizedRoot.endsWith(path.sep) ? normalizedRoot : normalizedRoot + path.sep;
|
|
1663
|
-
if (process.platform === "win32") {
|
|
1664
|
-
const candidateLower = normalizedCandidate.toLowerCase();
|
|
1665
|
-
const rootLower = normalizedRoot.toLowerCase();
|
|
1666
|
-
const rootWithSepLower = rootWithSep.toLowerCase();
|
|
1667
|
-
return candidateLower === rootLower || candidateLower.startsWith(rootWithSepLower);
|
|
1668
|
-
}
|
|
1669
|
-
return normalizedCandidate === normalizedRoot || normalizedCandidate.startsWith(rootWithSep);
|
|
1670
|
-
}
|
|
1671
|
-
function resolveMediaLocalRoots(params) {
|
|
1672
|
-
return (resolveBlueBubblesAccount({
|
|
1673
|
-
cfg: params.cfg,
|
|
1674
|
-
accountId: params.accountId
|
|
1675
|
-
}).config.mediaLocalRoots ?? []).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
1676
|
-
}
|
|
1677
|
-
async function assertLocalMediaPathAllowed(params) {
|
|
1678
|
-
if (params.localRoots.length === 0) throw new Error(`Local BlueBubbles media paths are disabled by default. Set channels.bluebubbles.mediaLocalRoots${params.accountId ? ` or channels.bluebubbles.accounts.${params.accountId}.mediaLocalRoots` : ""} to explicitly allow local file directories.`);
|
|
1679
|
-
const resolvedLocalPath = path.resolve(params.localPath);
|
|
1680
|
-
const supportsNoFollow = process.platform !== "win32" && "O_NOFOLLOW" in constants;
|
|
1681
|
-
const openFlags = constants.O_RDONLY | (supportsNoFollow ? constants.O_NOFOLLOW : 0);
|
|
1682
|
-
for (const rootEntry of params.localRoots) {
|
|
1683
|
-
const resolvedRootInput = resolveConfiguredPath(rootEntry);
|
|
1684
|
-
const relativeToRoot = path.relative(resolvedRootInput, resolvedLocalPath);
|
|
1685
|
-
if (relativeToRoot.startsWith("..") || path.isAbsolute(relativeToRoot) || relativeToRoot === "") continue;
|
|
1686
|
-
let rootReal;
|
|
1687
|
-
try {
|
|
1688
|
-
rootReal = await fs.realpath(resolvedRootInput);
|
|
1689
|
-
} catch {
|
|
1690
|
-
rootReal = path.resolve(resolvedRootInput);
|
|
1691
|
-
}
|
|
1692
|
-
const candidatePath = path.resolve(rootReal, relativeToRoot);
|
|
1693
|
-
if (!isPathInsideRoot(candidatePath, rootReal)) continue;
|
|
1694
|
-
let handle = null;
|
|
1695
|
-
try {
|
|
1696
|
-
handle = await fs.open(candidatePath, openFlags);
|
|
1697
|
-
const realPath = await fs.realpath(candidatePath);
|
|
1698
|
-
if (!isPathInsideRoot(realPath, rootReal)) continue;
|
|
1699
|
-
const stat = await handle.stat();
|
|
1700
|
-
if (!stat.isFile()) continue;
|
|
1701
|
-
const realStat = await fs.stat(realPath);
|
|
1702
|
-
if (stat.ino !== realStat.ino || stat.dev !== realStat.dev) continue;
|
|
1703
|
-
return {
|
|
1704
|
-
data: await handle.readFile(),
|
|
1705
|
-
realPath,
|
|
1706
|
-
sizeBytes: stat.size
|
|
1707
|
-
};
|
|
1708
|
-
} catch {
|
|
1709
|
-
continue;
|
|
1710
|
-
} finally {
|
|
1711
|
-
if (handle) await handle.close().catch(() => {});
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
throw new Error(`Local media path is not under any configured mediaLocalRoots entry: ${params.localPath}`);
|
|
1715
|
-
}
|
|
1716
|
-
function resolveFilenameFromSource(source) {
|
|
1717
|
-
return basenameFromMediaSource(source);
|
|
1718
|
-
}
|
|
1719
|
-
async function sendBlueBubblesMedia(params) {
|
|
1720
|
-
const { cfg, to, mediaUrl, mediaPath, mediaBuffer, contentType, filename, caption, replyToId, accountId, asVoice } = params;
|
|
1721
|
-
const core = getBlueBubblesRuntime();
|
|
1722
|
-
const maxBytes = resolveChannelMediaMaxBytes({
|
|
1723
|
-
cfg,
|
|
1724
|
-
resolveChannelLimitMb: ({ cfg, accountId }) => cfg.channels?.bluebubbles?.accounts?.[accountId]?.mediaMaxMb ?? cfg.channels?.bluebubbles?.mediaMaxMb,
|
|
1725
|
-
accountId
|
|
1726
|
-
});
|
|
1727
|
-
const mediaLocalRoots = resolveMediaLocalRoots({
|
|
1728
|
-
cfg,
|
|
1729
|
-
accountId
|
|
1730
|
-
});
|
|
1731
|
-
let buffer;
|
|
1732
|
-
let resolvedContentType = contentType ?? void 0;
|
|
1733
|
-
let resolvedFilename = filename ?? void 0;
|
|
1734
|
-
if (mediaBuffer) {
|
|
1735
|
-
assertMediaWithinLimit(mediaBuffer.byteLength, maxBytes);
|
|
1736
|
-
buffer = mediaBuffer;
|
|
1737
|
-
if (!resolvedContentType) {
|
|
1738
|
-
const hint = mediaPath ?? mediaUrl;
|
|
1739
|
-
resolvedContentType = await core.media.detectMime({
|
|
1740
|
-
buffer: Buffer.isBuffer(mediaBuffer) ? mediaBuffer : Buffer.from(mediaBuffer),
|
|
1741
|
-
filePath: hint
|
|
1742
|
-
}) ?? void 0;
|
|
1743
|
-
}
|
|
1744
|
-
if (!resolvedFilename) resolvedFilename = resolveFilenameFromSource(mediaPath ?? mediaUrl);
|
|
1745
|
-
} else {
|
|
1746
|
-
const source = mediaPath ?? mediaUrl;
|
|
1747
|
-
if (!source) throw new Error("BlueBubbles media delivery requires mediaUrl, mediaPath, or mediaBuffer.");
|
|
1748
|
-
if (HTTP_URL_RE.test(source)) {
|
|
1749
|
-
const fetched = await core.channel.media.fetchRemoteMedia({
|
|
1750
|
-
url: source,
|
|
1751
|
-
maxBytes: typeof maxBytes === "number" && maxBytes > 0 ? maxBytes : void 0
|
|
1752
|
-
});
|
|
1753
|
-
buffer = fetched.buffer;
|
|
1754
|
-
resolvedContentType = resolvedContentType ?? fetched.contentType ?? void 0;
|
|
1755
|
-
resolvedFilename = resolvedFilename ?? fetched.fileName;
|
|
1756
|
-
} else {
|
|
1757
|
-
const localFile = await assertLocalMediaPathAllowed({
|
|
1758
|
-
localPath: expandHomePath(resolveLocalMediaPath(source)),
|
|
1759
|
-
localRoots: mediaLocalRoots,
|
|
1760
|
-
accountId
|
|
1761
|
-
});
|
|
1762
|
-
if (typeof maxBytes === "number" && maxBytes > 0) assertMediaWithinLimit(localFile.sizeBytes, maxBytes);
|
|
1763
|
-
const data = localFile.data;
|
|
1764
|
-
assertMediaWithinLimit(data.byteLength, maxBytes);
|
|
1765
|
-
buffer = new Uint8Array(data);
|
|
1766
|
-
if (!resolvedContentType) resolvedContentType = await core.media.detectMime({
|
|
1767
|
-
buffer: data,
|
|
1768
|
-
filePath: localFile.realPath
|
|
1769
|
-
}) ?? void 0;
|
|
1770
|
-
if (!resolvedFilename) resolvedFilename = resolveFilenameFromSource(localFile.realPath);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
const replyToMessageGuid = replyToId?.trim() ? resolveBlueBubblesMessageId(replyToId.trim(), { requireKnownShortId: true }) : void 0;
|
|
1774
|
-
const attachmentResult = await sendBlueBubblesAttachment({
|
|
1775
|
-
to,
|
|
1776
|
-
buffer,
|
|
1777
|
-
filename: resolvedFilename ?? "attachment",
|
|
1778
|
-
contentType: resolvedContentType ?? void 0,
|
|
1779
|
-
replyToMessageGuid,
|
|
1780
|
-
asVoice,
|
|
1781
|
-
opts: {
|
|
1782
|
-
cfg,
|
|
1783
|
-
accountId
|
|
1784
|
-
}
|
|
1785
|
-
});
|
|
1786
|
-
const trimmedCaption = caption?.trim();
|
|
1787
|
-
if (trimmedCaption) await sendMessageBlueBubbles(to, trimmedCaption, {
|
|
1788
|
-
cfg,
|
|
1789
|
-
accountId,
|
|
1790
|
-
replyToMessageGuid
|
|
1791
|
-
});
|
|
1792
|
-
return attachmentResult;
|
|
1793
|
-
}
|
|
1794
|
-
//#endregion
|
|
1795
|
-
//#region extensions/bluebubbles/src/monitor-reply-cache.ts
|
|
1796
|
-
const REPLY_CACHE_MAX = 2e3;
|
|
1797
|
-
const REPLY_CACHE_TTL_MS = 360 * 60 * 1e3;
|
|
1798
|
-
const blueBubblesReplyCacheByMessageId = /* @__PURE__ */ new Map();
|
|
1799
|
-
const blueBubblesShortIdToUuid = /* @__PURE__ */ new Map();
|
|
1800
|
-
const blueBubblesUuidToShortId = /* @__PURE__ */ new Map();
|
|
1801
|
-
let blueBubblesShortIdCounter = 0;
|
|
1802
|
-
function trimOrUndefined$2(value) {
|
|
1803
|
-
const trimmed = value?.trim();
|
|
1804
|
-
return trimmed ? trimmed : void 0;
|
|
1805
|
-
}
|
|
1806
|
-
function generateShortId() {
|
|
1807
|
-
blueBubblesShortIdCounter += 1;
|
|
1808
|
-
return String(blueBubblesShortIdCounter);
|
|
1809
|
-
}
|
|
1810
|
-
function rememberBlueBubblesReplyCache(entry) {
|
|
1811
|
-
const messageId = entry.messageId.trim();
|
|
1812
|
-
if (!messageId) return {
|
|
1813
|
-
...entry,
|
|
1814
|
-
shortId: ""
|
|
1815
|
-
};
|
|
1816
|
-
let shortId = blueBubblesUuidToShortId.get(messageId);
|
|
1817
|
-
if (!shortId) {
|
|
1818
|
-
shortId = generateShortId();
|
|
1819
|
-
blueBubblesShortIdToUuid.set(shortId, messageId);
|
|
1820
|
-
blueBubblesUuidToShortId.set(messageId, shortId);
|
|
1821
|
-
}
|
|
1822
|
-
const fullEntry = {
|
|
1823
|
-
...entry,
|
|
1824
|
-
messageId,
|
|
1825
|
-
shortId
|
|
1826
|
-
};
|
|
1827
|
-
blueBubblesReplyCacheByMessageId.delete(messageId);
|
|
1828
|
-
blueBubblesReplyCacheByMessageId.set(messageId, fullEntry);
|
|
1829
|
-
const cutoff = Date.now() - REPLY_CACHE_TTL_MS;
|
|
1830
|
-
for (const [key, value] of blueBubblesReplyCacheByMessageId) {
|
|
1831
|
-
if (value.timestamp < cutoff) {
|
|
1832
|
-
blueBubblesReplyCacheByMessageId.delete(key);
|
|
1833
|
-
if (value.shortId) {
|
|
1834
|
-
blueBubblesShortIdToUuid.delete(value.shortId);
|
|
1835
|
-
blueBubblesUuidToShortId.delete(key);
|
|
1836
|
-
}
|
|
1837
|
-
continue;
|
|
1838
|
-
}
|
|
1839
|
-
break;
|
|
1840
|
-
}
|
|
1841
|
-
while (blueBubblesReplyCacheByMessageId.size > REPLY_CACHE_MAX) {
|
|
1842
|
-
const oldest = blueBubblesReplyCacheByMessageId.keys().next().value;
|
|
1843
|
-
if (!oldest) break;
|
|
1844
|
-
const oldEntry = blueBubblesReplyCacheByMessageId.get(oldest);
|
|
1845
|
-
blueBubblesReplyCacheByMessageId.delete(oldest);
|
|
1846
|
-
if (oldEntry?.shortId) {
|
|
1847
|
-
blueBubblesShortIdToUuid.delete(oldEntry.shortId);
|
|
1848
|
-
blueBubblesUuidToShortId.delete(oldest);
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
return fullEntry;
|
|
1852
|
-
}
|
|
1853
|
-
/**
|
|
1854
|
-
* Resolves a short message ID (e.g., "1", "2") to a full BlueBubbles GUID.
|
|
1855
|
-
* Returns the input unchanged if it's already a GUID or not found in the mapping.
|
|
1856
|
-
*/
|
|
1857
|
-
function resolveBlueBubblesMessageId(shortOrUuid, opts) {
|
|
1858
|
-
const trimmed = shortOrUuid.trim();
|
|
1859
|
-
if (!trimmed) return trimmed;
|
|
1860
|
-
if (/^\d+$/.test(trimmed)) {
|
|
1861
|
-
const uuid = blueBubblesShortIdToUuid.get(trimmed);
|
|
1862
|
-
if (uuid) return uuid;
|
|
1863
|
-
if (opts?.requireKnownShortId) throw new Error(`BlueBubbles short message id "${trimmed}" is no longer available. Use MessageSidFull.`);
|
|
1864
|
-
}
|
|
1865
|
-
return trimmed;
|
|
1866
|
-
}
|
|
1867
|
-
/**
|
|
1868
|
-
* Gets the short ID for a message GUID, if one exists.
|
|
1869
|
-
*/
|
|
1870
|
-
function getShortIdForUuid(uuid) {
|
|
1871
|
-
return blueBubblesUuidToShortId.get(uuid.trim());
|
|
1872
|
-
}
|
|
1873
|
-
function resolveReplyContextFromCache(params) {
|
|
1874
|
-
const replyToId = params.replyToId.trim();
|
|
1875
|
-
if (!replyToId) return null;
|
|
1876
|
-
const cached = blueBubblesReplyCacheByMessageId.get(replyToId);
|
|
1877
|
-
if (!cached) return null;
|
|
1878
|
-
if (cached.accountId !== params.accountId) return null;
|
|
1879
|
-
const cutoff = Date.now() - REPLY_CACHE_TTL_MS;
|
|
1880
|
-
if (cached.timestamp < cutoff) {
|
|
1881
|
-
blueBubblesReplyCacheByMessageId.delete(replyToId);
|
|
1882
|
-
return null;
|
|
1883
|
-
}
|
|
1884
|
-
const chatGuid = trimOrUndefined$2(params.chatGuid);
|
|
1885
|
-
const chatIdentifier = trimOrUndefined$2(params.chatIdentifier);
|
|
1886
|
-
const cachedChatGuid = trimOrUndefined$2(cached.chatGuid);
|
|
1887
|
-
const cachedChatIdentifier = trimOrUndefined$2(cached.chatIdentifier);
|
|
1888
|
-
const chatId = typeof params.chatId === "number" ? params.chatId : void 0;
|
|
1889
|
-
const cachedChatId = typeof cached.chatId === "number" ? cached.chatId : void 0;
|
|
1890
|
-
if (chatGuid && cachedChatGuid && chatGuid !== cachedChatGuid) return null;
|
|
1891
|
-
if (!chatGuid && chatIdentifier && cachedChatIdentifier && chatIdentifier !== cachedChatIdentifier) return null;
|
|
1892
|
-
if (!chatGuid && !chatIdentifier && chatId && cachedChatId && chatId !== cachedChatId) return null;
|
|
1893
|
-
return cached;
|
|
1894
|
-
}
|
|
1895
|
-
//#endregion
|
|
1896
|
-
//#region extensions/bluebubbles/src/monitor-self-chat-cache.ts
|
|
1897
|
-
const SELF_CHAT_TTL_MS = 1e4;
|
|
1898
|
-
const MAX_SELF_CHAT_CACHE_ENTRIES = 512;
|
|
1899
|
-
const CLEANUP_MIN_INTERVAL_MS = 1e3;
|
|
1900
|
-
const MAX_SELF_CHAT_BODY_CHARS = 32768;
|
|
1901
|
-
const cache = /* @__PURE__ */ new Map();
|
|
1902
|
-
let lastCleanupAt = 0;
|
|
1903
|
-
function normalizeBody(body) {
|
|
1904
|
-
if (!body) return null;
|
|
1905
|
-
const normalized = (body.length > MAX_SELF_CHAT_BODY_CHARS ? body.slice(0, MAX_SELF_CHAT_BODY_CHARS) : body).replace(/\r\n?/g, "\n").trim();
|
|
1906
|
-
return normalized ? normalized : null;
|
|
1907
|
-
}
|
|
1908
|
-
function isUsableTimestamp(timestamp) {
|
|
1909
|
-
return typeof timestamp === "number" && Number.isFinite(timestamp);
|
|
1910
|
-
}
|
|
1911
|
-
function digestText(text) {
|
|
1912
|
-
return createHash("sha256").update(text).digest("base64url");
|
|
1913
|
-
}
|
|
1914
|
-
function trimOrUndefined$1(value) {
|
|
1915
|
-
const trimmed = value?.trim();
|
|
1916
|
-
return trimmed ? trimmed : void 0;
|
|
1917
|
-
}
|
|
1918
|
-
function resolveCanonicalChatTarget(parts) {
|
|
1919
|
-
const handleFromGuid = parts.chatGuid ? extractHandleFromChatGuid(parts.chatGuid) : null;
|
|
1920
|
-
if (handleFromGuid) return handleFromGuid;
|
|
1921
|
-
const normalizedIdentifier = normalizeBlueBubblesHandle(parts.chatIdentifier ?? "");
|
|
1922
|
-
if (normalizedIdentifier) return normalizedIdentifier;
|
|
1923
|
-
return trimOrUndefined$1(parts.chatGuid) ?? trimOrUndefined$1(parts.chatIdentifier) ?? (typeof parts.chatId === "number" ? String(parts.chatId) : null);
|
|
1924
|
-
}
|
|
1925
|
-
function buildScope(parts) {
|
|
1926
|
-
const target = resolveCanonicalChatTarget(parts) ?? parts.senderId;
|
|
1927
|
-
return `${parts.accountId}:${target}`;
|
|
1928
|
-
}
|
|
1929
|
-
function cleanupExpired(now = Date.now()) {
|
|
1930
|
-
if (lastCleanupAt !== 0 && now >= lastCleanupAt && now - lastCleanupAt < CLEANUP_MIN_INTERVAL_MS) return;
|
|
1931
|
-
lastCleanupAt = now;
|
|
1932
|
-
for (const [key, seenAt] of cache.entries()) if (now - seenAt > SELF_CHAT_TTL_MS) cache.delete(key);
|
|
1933
|
-
}
|
|
1934
|
-
function enforceSizeCap() {
|
|
1935
|
-
while (cache.size > MAX_SELF_CHAT_CACHE_ENTRIES) {
|
|
1936
|
-
const oldestKey = cache.keys().next().value;
|
|
1937
|
-
if (typeof oldestKey !== "string") break;
|
|
1938
|
-
cache.delete(oldestKey);
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
function buildKey(lookup) {
|
|
1942
|
-
const body = normalizeBody(lookup.body);
|
|
1943
|
-
if (!body || !isUsableTimestamp(lookup.timestamp)) return null;
|
|
1944
|
-
return `${buildScope(lookup)}:${lookup.timestamp}:${digestText(body)}`;
|
|
1945
|
-
}
|
|
1946
|
-
function rememberBlueBubblesSelfChatCopy(lookup) {
|
|
1947
|
-
cleanupExpired();
|
|
1948
|
-
const key = buildKey(lookup);
|
|
1949
|
-
if (!key) return;
|
|
1950
|
-
cache.set(key, Date.now());
|
|
1951
|
-
enforceSizeCap();
|
|
1952
|
-
}
|
|
1953
|
-
function hasBlueBubblesSelfChatCopy(lookup) {
|
|
1954
|
-
cleanupExpired();
|
|
1955
|
-
const key = buildKey(lookup);
|
|
1956
|
-
if (!key) return false;
|
|
1957
|
-
const seenAt = cache.get(key);
|
|
1958
|
-
return typeof seenAt === "number" && Date.now() - seenAt <= SELF_CHAT_TTL_MS;
|
|
1959
|
-
}
|
|
1960
|
-
//#endregion
|
|
1961
|
-
//#region extensions/bluebubbles/src/participant-contact-names.ts
|
|
1962
|
-
const execFileAsync = promisify(execFile);
|
|
1963
|
-
const CONTACT_NAME_CACHE_TTL_MS = 3600 * 1e3;
|
|
1964
|
-
const NEGATIVE_CONTACT_NAME_CACHE_TTL_MS = 300 * 1e3;
|
|
1965
|
-
const MAX_PARTICIPANT_CONTACT_NAME_CACHE_ENTRIES = 2048;
|
|
1966
|
-
const SQLITE_MAX_BUFFER = 8 * 1024 * 1024;
|
|
1967
|
-
const SQLITE_PHONE_DIGITS_SQL = "REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(COALESCE(p.ZFULLNUMBER, ''), ' ', ''), '(', ''), ')', ''), '-', ''), '+', ''), '.', ''), '\n', ''), '\r', '')";
|
|
1968
|
-
const participantContactNameCache = /* @__PURE__ */ new Map();
|
|
1969
|
-
function normalizePhoneLookupKey(value) {
|
|
1970
|
-
const digits = value.replace(/\D/g, "");
|
|
1971
|
-
if (!digits) return null;
|
|
1972
|
-
const normalized = digits.length === 11 && digits.startsWith("1") ? digits.slice(1) : digits;
|
|
1973
|
-
return normalized.length >= 7 ? normalized : null;
|
|
1974
|
-
}
|
|
1975
|
-
function uniqueNormalizedPhoneLookupKeys(phoneKeys) {
|
|
1976
|
-
const unique = /* @__PURE__ */ new Set();
|
|
1977
|
-
for (const phoneKey of phoneKeys) {
|
|
1978
|
-
const normalized = normalizePhoneLookupKey(phoneKey);
|
|
1979
|
-
if (normalized) unique.add(normalized);
|
|
1980
|
-
}
|
|
1981
|
-
return [...unique];
|
|
1982
|
-
}
|
|
1983
|
-
function resolveParticipantPhoneLookupKey(participant) {
|
|
1984
|
-
if (participant.id.includes("@")) return null;
|
|
1985
|
-
return normalizePhoneLookupKey(participant.id);
|
|
1986
|
-
}
|
|
1987
|
-
function trimParticipantContactNameCache(now) {
|
|
1988
|
-
for (const [phoneKey, entry] of participantContactNameCache) if (entry.expiresAt <= now) participantContactNameCache.delete(phoneKey);
|
|
1989
|
-
while (participantContactNameCache.size > MAX_PARTICIPANT_CONTACT_NAME_CACHE_ENTRIES) {
|
|
1990
|
-
const oldestPhoneKey = participantContactNameCache.keys().next().value;
|
|
1991
|
-
if (!oldestPhoneKey) return;
|
|
1992
|
-
participantContactNameCache.delete(oldestPhoneKey);
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
function readFreshCacheEntry(phoneKey, now) {
|
|
1996
|
-
const cached = participantContactNameCache.get(phoneKey);
|
|
1997
|
-
if (!cached) return null;
|
|
1998
|
-
if (cached.expiresAt <= now) {
|
|
1999
|
-
participantContactNameCache.delete(phoneKey);
|
|
2000
|
-
return null;
|
|
2001
|
-
}
|
|
2002
|
-
participantContactNameCache.delete(phoneKey);
|
|
2003
|
-
participantContactNameCache.set(phoneKey, cached);
|
|
2004
|
-
return cached;
|
|
2005
|
-
}
|
|
2006
|
-
function writeCacheEntry(phoneKey, name, now) {
|
|
2007
|
-
participantContactNameCache.delete(phoneKey);
|
|
2008
|
-
participantContactNameCache.set(phoneKey, {
|
|
2009
|
-
name,
|
|
2010
|
-
expiresAt: now + (name ? CONTACT_NAME_CACHE_TTL_MS : NEGATIVE_CONTACT_NAME_CACHE_TTL_MS)
|
|
2011
|
-
});
|
|
2012
|
-
trimParticipantContactNameCache(now);
|
|
2013
|
-
}
|
|
2014
|
-
function buildAddressBookSourcesDir(homeDir) {
|
|
2015
|
-
const trimmedHomeDir = homeDir?.trim();
|
|
2016
|
-
if (!trimmedHomeDir) return null;
|
|
2017
|
-
return join(trimmedHomeDir, "Library", "Application Support", "AddressBook", "Sources");
|
|
2018
|
-
}
|
|
2019
|
-
async function fileExists(path, deps) {
|
|
2020
|
-
try {
|
|
2021
|
-
await deps.access(path);
|
|
2022
|
-
return true;
|
|
2023
|
-
} catch {
|
|
2024
|
-
return false;
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
async function listContactsDatabases(deps) {
|
|
2028
|
-
const sourcesDir = buildAddressBookSourcesDir(deps.homeDir);
|
|
2029
|
-
if (!sourcesDir) return [];
|
|
2030
|
-
let entries = [];
|
|
2031
|
-
try {
|
|
2032
|
-
entries = await deps.readdir(sourcesDir);
|
|
2033
|
-
} catch {
|
|
2034
|
-
return [];
|
|
2035
|
-
}
|
|
2036
|
-
const databases = [];
|
|
2037
|
-
for (const entry of entries) {
|
|
2038
|
-
const dbPath = join(sourcesDir, entry, "AddressBook-v22.abcddb");
|
|
2039
|
-
if (await fileExists(dbPath, deps)) databases.push(dbPath);
|
|
2040
|
-
}
|
|
2041
|
-
return databases;
|
|
2042
|
-
}
|
|
2043
|
-
function buildSqlitePhoneKeyList(phoneKeys) {
|
|
2044
|
-
return uniqueNormalizedPhoneLookupKeys(phoneKeys).map((phoneKey) => `'${phoneKey}'`).join(", ");
|
|
2045
|
-
}
|
|
2046
|
-
async function queryContactsDatabase(dbPath, phoneKeys, deps) {
|
|
2047
|
-
const sqlitePhoneKeyList = buildSqlitePhoneKeyList(phoneKeys);
|
|
2048
|
-
if (!sqlitePhoneKeyList) return [];
|
|
2049
|
-
const sql = `
|
|
2050
|
-
SELECT digits, name
|
|
2051
|
-
FROM (
|
|
2052
|
-
SELECT
|
|
2053
|
-
${SQLITE_PHONE_DIGITS_SQL} AS digits,
|
|
2054
|
-
TRIM(
|
|
2055
|
-
CASE
|
|
2056
|
-
WHEN TRIM(COALESCE(r.ZFIRSTNAME, '') || ' ' || COALESCE(r.ZLASTNAME, '')) != ''
|
|
2057
|
-
THEN TRIM(COALESCE(r.ZFIRSTNAME, '') || ' ' || COALESCE(r.ZLASTNAME, ''))
|
|
2058
|
-
ELSE COALESCE(r.ZORGANIZATION, '')
|
|
2059
|
-
END
|
|
2060
|
-
) AS name
|
|
2061
|
-
FROM ZABCDRECORD r
|
|
2062
|
-
JOIN ZABCDPHONENUMBER p ON p.ZOWNER = r.Z_PK
|
|
2063
|
-
WHERE p.ZFULLNUMBER IS NOT NULL
|
|
2064
|
-
)
|
|
2065
|
-
WHERE digits IN (${sqlitePhoneKeyList})
|
|
2066
|
-
AND name != '';
|
|
2067
|
-
`;
|
|
2068
|
-
const options = {
|
|
2069
|
-
encoding: "utf8",
|
|
2070
|
-
maxBuffer: SQLITE_MAX_BUFFER
|
|
2071
|
-
};
|
|
2072
|
-
const { stdout } = await deps.execFileAsync("sqlite3", [
|
|
2073
|
-
"-separator",
|
|
2074
|
-
" ",
|
|
2075
|
-
dbPath,
|
|
2076
|
-
sql
|
|
2077
|
-
], options);
|
|
2078
|
-
const rows = [];
|
|
2079
|
-
for (const line of stdout.split(/\r?\n/)) {
|
|
2080
|
-
const trimmed = line.trim();
|
|
2081
|
-
if (!trimmed) continue;
|
|
2082
|
-
const [digitsRaw, ...nameParts] = trimmed.split(" ");
|
|
2083
|
-
const phoneKey = normalizePhoneLookupKey(digitsRaw ?? "");
|
|
2084
|
-
const name = nameParts.join(" ").trim();
|
|
2085
|
-
if (!phoneKey || !name) continue;
|
|
2086
|
-
rows.push({
|
|
2087
|
-
phoneKey,
|
|
2088
|
-
name
|
|
2089
|
-
});
|
|
2090
|
-
}
|
|
2091
|
-
return rows;
|
|
2092
|
-
}
|
|
2093
|
-
async function resolvePhoneNamesFromMacOsContacts(phoneKeys, deps) {
|
|
2094
|
-
const normalizedPhoneKeys = uniqueNormalizedPhoneLookupKeys(phoneKeys);
|
|
2095
|
-
if (normalizedPhoneKeys.length === 0) return /* @__PURE__ */ new Map();
|
|
2096
|
-
const databases = await listContactsDatabases(deps);
|
|
2097
|
-
if (databases.length === 0) return /* @__PURE__ */ new Map();
|
|
2098
|
-
const unresolved = new Set(normalizedPhoneKeys);
|
|
2099
|
-
const resolved = /* @__PURE__ */ new Map();
|
|
2100
|
-
for (const dbPath of databases) {
|
|
2101
|
-
let rows = [];
|
|
2102
|
-
try {
|
|
2103
|
-
rows = await queryContactsDatabase(dbPath, [...unresolved], deps);
|
|
2104
|
-
} catch {
|
|
2105
|
-
continue;
|
|
2106
|
-
}
|
|
2107
|
-
for (const row of rows) {
|
|
2108
|
-
if (!unresolved.has(row.phoneKey) || resolved.has(row.phoneKey)) continue;
|
|
2109
|
-
resolved.set(row.phoneKey, row.name);
|
|
2110
|
-
unresolved.delete(row.phoneKey);
|
|
2111
|
-
if (unresolved.size === 0) return resolved;
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
return resolved;
|
|
2115
|
-
}
|
|
2116
|
-
function resolveLookupDeps(deps) {
|
|
2117
|
-
const merged = { ...deps };
|
|
2118
|
-
return {
|
|
2119
|
-
platform: merged.platform ?? process.platform,
|
|
2120
|
-
now: merged.now ?? (() => Date.now()),
|
|
2121
|
-
resolvePhoneNames: merged.resolvePhoneNames,
|
|
2122
|
-
homeDir: merged.homeDir ?? process.env.HOME,
|
|
2123
|
-
readdir: merged.readdir ?? readdir,
|
|
2124
|
-
access: merged.access ?? access,
|
|
2125
|
-
execFileAsync: merged.execFileAsync ?? execFileAsync
|
|
2126
|
-
};
|
|
2127
|
-
}
|
|
2128
|
-
async function enrichBlueBubblesParticipantsWithContactNames(participants, deps) {
|
|
2129
|
-
if (!Array.isArray(participants) || participants.length === 0) return [];
|
|
2130
|
-
const resolvedDeps = resolveLookupDeps(deps);
|
|
2131
|
-
const lookup = resolvedDeps.resolvePhoneNames ?? ((phoneKeys) => resolvePhoneNamesFromMacOsContacts(phoneKeys, resolvedDeps));
|
|
2132
|
-
if (!(Boolean(resolvedDeps.resolvePhoneNames) || resolvedDeps.platform === "darwin")) return participants;
|
|
2133
|
-
const nowMs = resolvedDeps.now();
|
|
2134
|
-
trimParticipantContactNameCache(nowMs);
|
|
2135
|
-
const pendingPhoneKeys = /* @__PURE__ */ new Set();
|
|
2136
|
-
const cachedNames = /* @__PURE__ */ new Map();
|
|
2137
|
-
for (const participant of participants) {
|
|
2138
|
-
if (participant.name?.trim()) continue;
|
|
2139
|
-
const phoneKey = resolveParticipantPhoneLookupKey(participant);
|
|
2140
|
-
if (!phoneKey) continue;
|
|
2141
|
-
const cached = readFreshCacheEntry(phoneKey, nowMs);
|
|
2142
|
-
if (cached?.name) {
|
|
2143
|
-
cachedNames.set(phoneKey, cached.name);
|
|
2144
|
-
continue;
|
|
2145
|
-
}
|
|
2146
|
-
if (!cached) pendingPhoneKeys.add(phoneKey);
|
|
2147
|
-
}
|
|
2148
|
-
if (pendingPhoneKeys.size > 0) try {
|
|
2149
|
-
const resolved = await lookup([...pendingPhoneKeys]);
|
|
2150
|
-
for (const phoneKey of pendingPhoneKeys) {
|
|
2151
|
-
const name = resolved.get(phoneKey)?.trim() || void 0;
|
|
2152
|
-
writeCacheEntry(phoneKey, name, nowMs);
|
|
2153
|
-
if (name) cachedNames.set(phoneKey, name);
|
|
2154
|
-
}
|
|
2155
|
-
} catch {
|
|
2156
|
-
return participants;
|
|
2157
|
-
}
|
|
2158
|
-
let didChange = false;
|
|
2159
|
-
const enriched = participants.map((participant) => {
|
|
2160
|
-
if (participant.name?.trim()) return participant;
|
|
2161
|
-
const phoneKey = resolveParticipantPhoneLookupKey(participant);
|
|
2162
|
-
if (!phoneKey) return participant;
|
|
2163
|
-
const name = cachedNames.get(phoneKey)?.trim();
|
|
2164
|
-
if (!name) return participant;
|
|
2165
|
-
didChange = true;
|
|
2166
|
-
return {
|
|
2167
|
-
...participant,
|
|
2168
|
-
name
|
|
2169
|
-
};
|
|
2170
|
-
});
|
|
2171
|
-
return didChange ? enriched : participants;
|
|
2172
|
-
}
|
|
2173
|
-
//#endregion
|
|
2174
|
-
//#region extensions/bluebubbles/src/reactions.ts
|
|
2175
|
-
const REACTION_TYPES = new Set([
|
|
2176
|
-
"love",
|
|
2177
|
-
"like",
|
|
2178
|
-
"dislike",
|
|
2179
|
-
"laugh",
|
|
2180
|
-
"emphasize",
|
|
2181
|
-
"question"
|
|
2182
|
-
]);
|
|
2183
|
-
const REACTION_ALIASES = new Map([
|
|
2184
|
-
["heart", "love"],
|
|
2185
|
-
["love", "love"],
|
|
2186
|
-
["❤", "love"],
|
|
2187
|
-
["❤️", "love"],
|
|
2188
|
-
["red_heart", "love"],
|
|
2189
|
-
["thumbs_up", "like"],
|
|
2190
|
-
["thumbsup", "like"],
|
|
2191
|
-
["thumbs-up", "like"],
|
|
2192
|
-
["thumbsup", "like"],
|
|
2193
|
-
["like", "like"],
|
|
2194
|
-
["thumb", "like"],
|
|
2195
|
-
["ok", "like"],
|
|
2196
|
-
["thumbs_down", "dislike"],
|
|
2197
|
-
["thumbsdown", "dislike"],
|
|
2198
|
-
["thumbs-down", "dislike"],
|
|
2199
|
-
["dislike", "dislike"],
|
|
2200
|
-
["boo", "dislike"],
|
|
2201
|
-
["no", "dislike"],
|
|
2202
|
-
["haha", "laugh"],
|
|
2203
|
-
["lol", "laugh"],
|
|
2204
|
-
["lmao", "laugh"],
|
|
2205
|
-
["rofl", "laugh"],
|
|
2206
|
-
["😂", "laugh"],
|
|
2207
|
-
["🤣", "laugh"],
|
|
2208
|
-
["xd", "laugh"],
|
|
2209
|
-
["laugh", "laugh"],
|
|
2210
|
-
["emphasis", "emphasize"],
|
|
2211
|
-
["emphasize", "emphasize"],
|
|
2212
|
-
["exclaim", "emphasize"],
|
|
2213
|
-
["!!", "emphasize"],
|
|
2214
|
-
["‼", "emphasize"],
|
|
2215
|
-
["‼️", "emphasize"],
|
|
2216
|
-
["❗", "emphasize"],
|
|
2217
|
-
["important", "emphasize"],
|
|
2218
|
-
["bang", "emphasize"],
|
|
2219
|
-
["question", "question"],
|
|
2220
|
-
["?", "question"],
|
|
2221
|
-
["❓", "question"],
|
|
2222
|
-
["❔", "question"],
|
|
2223
|
-
["ask", "question"],
|
|
2224
|
-
["loved", "love"],
|
|
2225
|
-
["liked", "like"],
|
|
2226
|
-
["disliked", "dislike"],
|
|
2227
|
-
["laughed", "laugh"],
|
|
2228
|
-
["emphasized", "emphasize"],
|
|
2229
|
-
["questioned", "question"],
|
|
2230
|
-
["fire", "love"],
|
|
2231
|
-
["🔥", "love"],
|
|
2232
|
-
["wow", "emphasize"],
|
|
2233
|
-
["!", "emphasize"],
|
|
2234
|
-
["heart_eyes", "love"],
|
|
2235
|
-
["smile", "laugh"],
|
|
2236
|
-
["smiley", "laugh"],
|
|
2237
|
-
["happy", "laugh"],
|
|
2238
|
-
["joy", "laugh"]
|
|
2239
|
-
]);
|
|
2240
|
-
const REACTION_EMOJIS = new Map([
|
|
2241
|
-
["❤️", "love"],
|
|
2242
|
-
["❤", "love"],
|
|
2243
|
-
["♥️", "love"],
|
|
2244
|
-
["♥", "love"],
|
|
2245
|
-
["😍", "love"],
|
|
2246
|
-
["💕", "love"],
|
|
2247
|
-
["👍", "like"],
|
|
2248
|
-
["👌", "like"],
|
|
2249
|
-
["👎", "dislike"],
|
|
2250
|
-
["🙅", "dislike"],
|
|
2251
|
-
["😂", "laugh"],
|
|
2252
|
-
["🤣", "laugh"],
|
|
2253
|
-
["😆", "laugh"],
|
|
2254
|
-
["😁", "laugh"],
|
|
2255
|
-
["😹", "laugh"],
|
|
2256
|
-
["‼️", "emphasize"],
|
|
2257
|
-
["‼", "emphasize"],
|
|
2258
|
-
["!!", "emphasize"],
|
|
2259
|
-
["❗", "emphasize"],
|
|
2260
|
-
["❕", "emphasize"],
|
|
2261
|
-
["!", "emphasize"],
|
|
2262
|
-
["❓", "question"],
|
|
2263
|
-
["❔", "question"],
|
|
2264
|
-
["?", "question"]
|
|
2265
|
-
]);
|
|
2266
|
-
function resolveAccount(params) {
|
|
2267
|
-
return resolveBlueBubblesServerAccount(params);
|
|
2268
|
-
}
|
|
2269
|
-
function normalizeBlueBubblesReactionInput(emoji, remove) {
|
|
2270
|
-
const trimmed = emoji.trim();
|
|
2271
|
-
if (!trimmed) throw new Error("BlueBubbles reaction requires an emoji or name.");
|
|
2272
|
-
let raw = trimmed.toLowerCase();
|
|
2273
|
-
if (raw.startsWith("-")) raw = raw.slice(1);
|
|
2274
|
-
const aliased = REACTION_ALIASES.get(raw) ?? raw;
|
|
2275
|
-
const mapped = REACTION_EMOJIS.get(trimmed) ?? REACTION_EMOJIS.get(raw) ?? aliased;
|
|
2276
|
-
if (!REACTION_TYPES.has(mapped)) throw new Error(`Unsupported BlueBubbles reaction: ${trimmed}`);
|
|
2277
|
-
return remove ? `-${mapped}` : mapped;
|
|
2278
|
-
}
|
|
2279
|
-
async function sendBlueBubblesReaction(params) {
|
|
2280
|
-
const chatGuid = params.chatGuid.trim();
|
|
2281
|
-
const messageGuid = params.messageGuid.trim();
|
|
2282
|
-
if (!chatGuid) throw new Error("BlueBubbles reaction requires chatGuid.");
|
|
2283
|
-
if (!messageGuid) throw new Error("BlueBubbles reaction requires messageGuid.");
|
|
2284
|
-
const reaction = normalizeBlueBubblesReactionInput(params.emoji, params.remove);
|
|
2285
|
-
const { baseUrl, password, accountId, allowPrivateNetwork } = resolveAccount(params.opts ?? {});
|
|
2286
|
-
if (getCachedBlueBubblesPrivateApiStatus(accountId) === false) throw new Error("BlueBubbles reaction requires Private API, but it is disabled on the BlueBubbles server.");
|
|
2287
|
-
const url = buildBlueBubblesApiUrl({
|
|
2288
|
-
baseUrl,
|
|
2289
|
-
path: "/api/v1/message/react",
|
|
2290
|
-
password
|
|
2291
|
-
});
|
|
2292
|
-
const payload = {
|
|
2293
|
-
chatGuid,
|
|
2294
|
-
selectedMessageGuid: messageGuid,
|
|
2295
|
-
reaction,
|
|
2296
|
-
partIndex: typeof params.partIndex === "number" ? params.partIndex : 0
|
|
2297
|
-
};
|
|
2298
|
-
const ssrfPolicy = allowPrivateNetwork ? { allowPrivateNetwork: true } : {};
|
|
2299
|
-
const res = await blueBubblesFetchWithTimeout(url, {
|
|
2300
|
-
method: "POST",
|
|
2301
|
-
headers: { "Content-Type": "application/json" },
|
|
2302
|
-
body: JSON.stringify(payload)
|
|
2303
|
-
}, params.opts?.timeoutMs, ssrfPolicy);
|
|
2304
|
-
if (!res.ok) {
|
|
2305
|
-
const errorText = await res.text();
|
|
2306
|
-
throw new Error(`BlueBubbles reaction failed (${res.status}): ${errorText || "unknown"}`);
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
|
-
//#endregion
|
|
2310
|
-
//#region extensions/bluebubbles/src/monitor-processing.ts
|
|
2311
|
-
const DEFAULT_TEXT_LIMIT = 4e3;
|
|
2312
|
-
const invalidAckReactions = /* @__PURE__ */ new Set();
|
|
2313
|
-
const REPLY_DIRECTIVE_TAG_RE = /\[\[\s*(?:reply_to_current|reply_to\s*:\s*[^\]\n]+)\s*\]\]/gi;
|
|
2314
|
-
const PENDING_OUTBOUND_MESSAGE_ID_TTL_MS = 120 * 1e3;
|
|
2315
|
-
const pendingOutboundMessageIds = [];
|
|
2316
|
-
let pendingOutboundMessageIdCounter = 0;
|
|
2317
|
-
function trimOrUndefined(value) {
|
|
2318
|
-
const trimmed = value?.trim();
|
|
2319
|
-
return trimmed ? trimmed : void 0;
|
|
2320
|
-
}
|
|
2321
|
-
function normalizeSnippet(value) {
|
|
2322
|
-
return stripMarkdown(value).replace(/\s+/g, " ").trim().toLowerCase();
|
|
2323
|
-
}
|
|
2324
|
-
function blueBubblesPolicy(allowPrivateNetwork) {
|
|
2325
|
-
return allowPrivateNetwork ? { allowPrivateNetwork: true } : void 0;
|
|
2326
|
-
}
|
|
2327
|
-
function extractBlueBubblesChatGuid(chat) {
|
|
2328
|
-
const candidates = [
|
|
2329
|
-
chat.chatGuid,
|
|
2330
|
-
chat.guid,
|
|
2331
|
-
chat.chat_guid
|
|
2332
|
-
];
|
|
2333
|
-
for (const candidate of candidates) if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
|
|
2334
|
-
}
|
|
2335
|
-
function extractBlueBubblesChatId(chat) {
|
|
2336
|
-
const candidates = [
|
|
2337
|
-
chat.chatId,
|
|
2338
|
-
chat.id,
|
|
2339
|
-
chat.chat_id
|
|
2340
|
-
];
|
|
2341
|
-
for (const candidate of candidates) if (typeof candidate === "number" && Number.isFinite(candidate)) return candidate;
|
|
2342
|
-
}
|
|
2343
|
-
function extractChatIdentifierFromChatGuid(chatGuid) {
|
|
2344
|
-
const parts = chatGuid.split(";");
|
|
2345
|
-
if (parts.length < 3) return;
|
|
2346
|
-
return parts[2]?.trim() || void 0;
|
|
2347
|
-
}
|
|
2348
|
-
function extractBlueBubblesChatIdentifier(chat) {
|
|
2349
|
-
const candidates = [
|
|
2350
|
-
chat.chatIdentifier,
|
|
2351
|
-
chat.chat_identifier,
|
|
2352
|
-
chat.identifier
|
|
2353
|
-
];
|
|
2354
|
-
for (const candidate of candidates) if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
|
|
2355
|
-
const chatGuid = extractBlueBubblesChatGuid(chat);
|
|
2356
|
-
return chatGuid ? extractChatIdentifierFromChatGuid(chatGuid) : void 0;
|
|
2357
|
-
}
|
|
2358
|
-
async function queryBlueBubblesChats(params) {
|
|
2359
|
-
const res = await blueBubblesFetchWithTimeout(buildBlueBubblesApiUrl({
|
|
2360
|
-
baseUrl: params.baseUrl,
|
|
2361
|
-
path: "/api/v1/chat/query",
|
|
2362
|
-
password: params.password
|
|
2363
|
-
}), {
|
|
2364
|
-
method: "POST",
|
|
2365
|
-
headers: { "Content-Type": "application/json" },
|
|
2366
|
-
body: JSON.stringify({
|
|
2367
|
-
limit: params.limit,
|
|
2368
|
-
offset: params.offset,
|
|
2369
|
-
with: ["participants"]
|
|
2370
|
-
})
|
|
2371
|
-
}, params.timeoutMs, blueBubblesPolicy(params.allowPrivateNetwork));
|
|
2372
|
-
if (!res.ok) return [];
|
|
2373
|
-
const payload = await res.json().catch(() => null);
|
|
2374
|
-
const data = payload && typeof payload.data !== "undefined" ? payload.data : null;
|
|
2375
|
-
return Array.isArray(data) ? data : [];
|
|
2376
|
-
}
|
|
2377
|
-
async function fetchBlueBubblesParticipantsForInboundMessage(params) {
|
|
2378
|
-
if (!params.chatGuid && params.chatId == null && !params.chatIdentifier) return null;
|
|
2379
|
-
const limit = 500;
|
|
2380
|
-
for (let offset = 0; offset < 5e3; offset += limit) {
|
|
2381
|
-
const chats = await queryBlueBubblesChats({
|
|
2382
|
-
baseUrl: params.baseUrl,
|
|
2383
|
-
password: params.password,
|
|
2384
|
-
offset,
|
|
2385
|
-
limit,
|
|
2386
|
-
allowPrivateNetwork: params.allowPrivateNetwork
|
|
2387
|
-
});
|
|
2388
|
-
if (chats.length === 0) return null;
|
|
2389
|
-
for (const chat of chats) {
|
|
2390
|
-
const chatGuid = extractBlueBubblesChatGuid(chat);
|
|
2391
|
-
const chatId = extractBlueBubblesChatId(chat);
|
|
2392
|
-
const chatIdentifier = extractBlueBubblesChatIdentifier(chat);
|
|
2393
|
-
if (params.chatGuid && chatGuid === params.chatGuid || params.chatId != null && chatId === params.chatId || params.chatIdentifier && (chatIdentifier === params.chatIdentifier || chatGuid === params.chatIdentifier)) return normalizeParticipantList(chat);
|
|
2394
|
-
}
|
|
2395
|
-
if (chats.length < limit) return null;
|
|
2396
|
-
}
|
|
2397
|
-
return null;
|
|
2398
|
-
}
|
|
2399
|
-
function isBlueBubblesSelfChatMessage(message, isGroup) {
|
|
2400
|
-
if (isGroup || !message.senderIdExplicit) return false;
|
|
2401
|
-
const chatHandle = (message.chatGuid ? extractHandleFromChatGuid(message.chatGuid) : null) ?? normalizeBlueBubblesHandle(message.chatIdentifier ?? "");
|
|
2402
|
-
return Boolean(chatHandle) && chatHandle === message.senderId;
|
|
2403
|
-
}
|
|
2404
|
-
function prunePendingOutboundMessageIds(now = Date.now()) {
|
|
2405
|
-
const cutoff = now - PENDING_OUTBOUND_MESSAGE_ID_TTL_MS;
|
|
2406
|
-
for (let i = pendingOutboundMessageIds.length - 1; i >= 0; i--) if (pendingOutboundMessageIds[i].createdAt < cutoff) pendingOutboundMessageIds.splice(i, 1);
|
|
2407
|
-
}
|
|
2408
|
-
function rememberPendingOutboundMessageId(entry) {
|
|
2409
|
-
prunePendingOutboundMessageIds();
|
|
2410
|
-
pendingOutboundMessageIdCounter += 1;
|
|
2411
|
-
const snippetRaw = entry.snippet.trim();
|
|
2412
|
-
const snippetNorm = normalizeSnippet(snippetRaw);
|
|
2413
|
-
pendingOutboundMessageIds.push({
|
|
2414
|
-
id: pendingOutboundMessageIdCounter,
|
|
2415
|
-
accountId: entry.accountId,
|
|
2416
|
-
sessionKey: entry.sessionKey,
|
|
2417
|
-
outboundTarget: entry.outboundTarget,
|
|
2418
|
-
chatGuid: trimOrUndefined(entry.chatGuid),
|
|
2419
|
-
chatIdentifier: trimOrUndefined(entry.chatIdentifier),
|
|
2420
|
-
chatId: typeof entry.chatId === "number" ? entry.chatId : void 0,
|
|
2421
|
-
snippetRaw,
|
|
2422
|
-
snippetNorm,
|
|
2423
|
-
isMediaSnippet: snippetRaw.toLowerCase().startsWith("<media:"),
|
|
2424
|
-
createdAt: Date.now()
|
|
2425
|
-
});
|
|
2426
|
-
return pendingOutboundMessageIdCounter;
|
|
2427
|
-
}
|
|
2428
|
-
function forgetPendingOutboundMessageId(id) {
|
|
2429
|
-
const index = pendingOutboundMessageIds.findIndex((entry) => entry.id === id);
|
|
2430
|
-
if (index >= 0) pendingOutboundMessageIds.splice(index, 1);
|
|
2431
|
-
}
|
|
2432
|
-
function chatsMatch(left, right) {
|
|
2433
|
-
const leftGuid = trimOrUndefined(left.chatGuid);
|
|
2434
|
-
const rightGuid = trimOrUndefined(right.chatGuid);
|
|
2435
|
-
if (leftGuid && rightGuid) return leftGuid === rightGuid;
|
|
2436
|
-
const leftIdentifier = trimOrUndefined(left.chatIdentifier);
|
|
2437
|
-
const rightIdentifier = trimOrUndefined(right.chatIdentifier);
|
|
2438
|
-
if (leftIdentifier && rightIdentifier) return leftIdentifier === rightIdentifier;
|
|
2439
|
-
const leftChatId = typeof left.chatId === "number" ? left.chatId : void 0;
|
|
2440
|
-
const rightChatId = typeof right.chatId === "number" ? right.chatId : void 0;
|
|
2441
|
-
if (leftChatId !== void 0 && rightChatId !== void 0) return leftChatId === rightChatId;
|
|
2442
|
-
return false;
|
|
2443
|
-
}
|
|
2444
|
-
function consumePendingOutboundMessageId(params) {
|
|
2445
|
-
prunePendingOutboundMessageIds();
|
|
2446
|
-
const bodyNorm = normalizeSnippet(params.body);
|
|
2447
|
-
const isMediaBody = params.body.trim().toLowerCase().startsWith("<media:");
|
|
2448
|
-
for (let i = 0; i < pendingOutboundMessageIds.length; i++) {
|
|
2449
|
-
const entry = pendingOutboundMessageIds[i];
|
|
2450
|
-
if (entry.accountId !== params.accountId) continue;
|
|
2451
|
-
if (!chatsMatch(entry, params)) continue;
|
|
2452
|
-
if (entry.snippetNorm && entry.snippetNorm === bodyNorm) {
|
|
2453
|
-
pendingOutboundMessageIds.splice(i, 1);
|
|
2454
|
-
return entry;
|
|
2455
|
-
}
|
|
2456
|
-
if (entry.isMediaSnippet && isMediaBody) {
|
|
2457
|
-
pendingOutboundMessageIds.splice(i, 1);
|
|
2458
|
-
return entry;
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
return null;
|
|
2462
|
-
}
|
|
2463
|
-
function logVerbose(core, runtime, message) {
|
|
2464
|
-
if (core.logging.shouldLogVerbose()) runtime.log?.(`[bluebubbles] ${message}`);
|
|
2465
|
-
}
|
|
2466
|
-
function logGroupAllowlistHint(params) {
|
|
2467
|
-
const log = params.runtime.log ?? console.log;
|
|
2468
|
-
const nameHint = params.chatName ? ` (group name: ${params.chatName})` : "";
|
|
2469
|
-
const accountHint = params.accountId ? ` (or channels.bluebubbles.accounts.${params.accountId}.groupAllowFrom)` : "";
|
|
2470
|
-
if (params.entry) {
|
|
2471
|
-
log(`[bluebubbles] group message blocked (${params.reason}). Allow this group by adding "${params.entry}" to channels.bluebubbles.groupAllowFrom${nameHint}.`);
|
|
2472
|
-
log(`[bluebubbles] add to config: channels.bluebubbles.groupAllowFrom=["${params.entry}"]${accountHint}.`);
|
|
2473
|
-
return;
|
|
2474
|
-
}
|
|
2475
|
-
log(`[bluebubbles] group message blocked (${params.reason}). Allow groups by setting channels.bluebubbles.groupPolicy="open" or adding a group id to channels.bluebubbles.groupAllowFrom${accountHint}${nameHint}.`);
|
|
2476
|
-
}
|
|
2477
|
-
function resolveBlueBubblesAckReaction(params) {
|
|
2478
|
-
const raw = resolveAckReaction(params.cfg, params.agentId).trim();
|
|
2479
|
-
if (!raw) return null;
|
|
2480
|
-
try {
|
|
2481
|
-
normalizeBlueBubblesReactionInput(raw);
|
|
2482
|
-
return raw;
|
|
2483
|
-
} catch {
|
|
2484
|
-
const key = raw.toLowerCase();
|
|
2485
|
-
if (!invalidAckReactions.has(key)) {
|
|
2486
|
-
invalidAckReactions.add(key);
|
|
2487
|
-
logVerbose(params.core, params.runtime, `ack reaction skipped (unsupported for BlueBubbles): ${raw}`);
|
|
2488
|
-
}
|
|
2489
|
-
return null;
|
|
2490
|
-
}
|
|
2491
|
-
}
|
|
2492
|
-
/**
|
|
2493
|
-
* In-memory rolling history map keyed by account + chat identifier.
|
|
2494
|
-
* Populated from incoming messages during the session.
|
|
2495
|
-
* API backfill is attempted until one fetch resolves (or retries are exhausted).
|
|
2496
|
-
*/
|
|
2497
|
-
const chatHistories = /* @__PURE__ */ new Map();
|
|
2498
|
-
const historyBackfills = /* @__PURE__ */ new Map();
|
|
2499
|
-
const HISTORY_BACKFILL_BASE_DELAY_MS = 5e3;
|
|
2500
|
-
const HISTORY_BACKFILL_MAX_DELAY_MS = 120 * 1e3;
|
|
2501
|
-
const HISTORY_BACKFILL_MAX_ATTEMPTS = 6;
|
|
2502
|
-
const HISTORY_BACKFILL_RETRY_WINDOW_MS = 1800 * 1e3;
|
|
2503
|
-
const MAX_STORED_HISTORY_ENTRY_CHARS = 2e3;
|
|
2504
|
-
const MAX_INBOUND_HISTORY_ENTRY_CHARS = 1200;
|
|
2505
|
-
const MAX_INBOUND_HISTORY_TOTAL_CHARS = 12e3;
|
|
2506
|
-
function buildAccountScopedHistoryKey(accountId, historyIdentifier) {
|
|
2507
|
-
return `${accountId}\u0000${historyIdentifier}`;
|
|
2508
|
-
}
|
|
2509
|
-
function historyDedupKey(entry) {
|
|
2510
|
-
const messageId = entry.messageId?.trim();
|
|
2511
|
-
if (messageId) return `id:${messageId}`;
|
|
2512
|
-
return `fallback:${entry.sender}\u0000${entry.body}\u0000${entry.timestamp ?? ""}`;
|
|
2513
|
-
}
|
|
2514
|
-
function truncateHistoryBody(body, maxChars) {
|
|
2515
|
-
const trimmed = body.trim();
|
|
2516
|
-
if (!trimmed) return "";
|
|
2517
|
-
if (trimmed.length <= maxChars) return trimmed;
|
|
2518
|
-
return `${trimmed.slice(0, maxChars).trimEnd()}...`;
|
|
2519
|
-
}
|
|
2520
|
-
function mergeHistoryEntries(params) {
|
|
2521
|
-
if (params.limit <= 0) return [];
|
|
2522
|
-
const merged = [];
|
|
2523
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2524
|
-
const appendUnique = (entry) => {
|
|
2525
|
-
const key = historyDedupKey(entry);
|
|
2526
|
-
if (seen.has(key)) return;
|
|
2527
|
-
seen.add(key);
|
|
2528
|
-
merged.push(entry);
|
|
2529
|
-
};
|
|
2530
|
-
for (const entry of params.apiEntries) appendUnique(entry);
|
|
2531
|
-
for (const entry of params.currentEntries) appendUnique(entry);
|
|
2532
|
-
if (merged.length <= params.limit) return merged;
|
|
2533
|
-
return merged.slice(merged.length - params.limit);
|
|
2534
|
-
}
|
|
2535
|
-
function pruneHistoryBackfillState() {
|
|
2536
|
-
for (const key of historyBackfills.keys()) if (!chatHistories.has(key)) historyBackfills.delete(key);
|
|
2537
|
-
}
|
|
2538
|
-
function markHistoryBackfillResolved(historyKey) {
|
|
2539
|
-
const state = historyBackfills.get(historyKey);
|
|
2540
|
-
if (state) {
|
|
2541
|
-
state.resolved = true;
|
|
2542
|
-
historyBackfills.set(historyKey, state);
|
|
2543
|
-
return;
|
|
2544
|
-
}
|
|
2545
|
-
historyBackfills.set(historyKey, {
|
|
2546
|
-
attempts: 0,
|
|
2547
|
-
firstAttemptAt: Date.now(),
|
|
2548
|
-
nextAttemptAt: Number.POSITIVE_INFINITY,
|
|
2549
|
-
resolved: true
|
|
2550
|
-
});
|
|
2551
|
-
}
|
|
2552
|
-
function planHistoryBackfillAttempt(historyKey, now) {
|
|
2553
|
-
const existing = historyBackfills.get(historyKey);
|
|
2554
|
-
if (existing?.resolved) return null;
|
|
2555
|
-
if (existing && now - existing.firstAttemptAt > HISTORY_BACKFILL_RETRY_WINDOW_MS) {
|
|
2556
|
-
markHistoryBackfillResolved(historyKey);
|
|
2557
|
-
return null;
|
|
2558
|
-
}
|
|
2559
|
-
if (existing && existing.attempts >= HISTORY_BACKFILL_MAX_ATTEMPTS) {
|
|
2560
|
-
markHistoryBackfillResolved(historyKey);
|
|
2561
|
-
return null;
|
|
2562
|
-
}
|
|
2563
|
-
if (existing && now < existing.nextAttemptAt) return null;
|
|
2564
|
-
const attempts = (existing?.attempts ?? 0) + 1;
|
|
2565
|
-
const state = {
|
|
2566
|
-
attempts,
|
|
2567
|
-
firstAttemptAt: existing?.firstAttemptAt ?? now,
|
|
2568
|
-
nextAttemptAt: now + Math.min(HISTORY_BACKFILL_BASE_DELAY_MS * 2 ** (attempts - 1), HISTORY_BACKFILL_MAX_DELAY_MS),
|
|
2569
|
-
resolved: false
|
|
2570
|
-
};
|
|
2571
|
-
historyBackfills.set(historyKey, state);
|
|
2572
|
-
return state;
|
|
2573
|
-
}
|
|
2574
|
-
function buildInboundHistorySnapshot(params) {
|
|
2575
|
-
if (params.limit <= 0 || params.entries.length === 0) return;
|
|
2576
|
-
const recent = params.entries.slice(-params.limit);
|
|
2577
|
-
const selected = [];
|
|
2578
|
-
let remainingChars = MAX_INBOUND_HISTORY_TOTAL_CHARS;
|
|
2579
|
-
for (let i = recent.length - 1; i >= 0; i--) {
|
|
2580
|
-
const entry = recent[i];
|
|
2581
|
-
const body = truncateHistoryBody(entry.body, MAX_INBOUND_HISTORY_ENTRY_CHARS);
|
|
2582
|
-
if (!body) continue;
|
|
2583
|
-
if (selected.length > 0 && body.length > remainingChars) break;
|
|
2584
|
-
selected.push({
|
|
2585
|
-
sender: entry.sender,
|
|
2586
|
-
body,
|
|
2587
|
-
timestamp: entry.timestamp
|
|
2588
|
-
});
|
|
2589
|
-
remainingChars -= body.length;
|
|
2590
|
-
if (remainingChars <= 0) break;
|
|
2591
|
-
}
|
|
2592
|
-
if (selected.length === 0) return;
|
|
2593
|
-
selected.reverse();
|
|
2594
|
-
return selected;
|
|
2595
|
-
}
|
|
2596
|
-
async function processMessage(message, target) {
|
|
2597
|
-
const { account, config, runtime, core, statusSink } = target;
|
|
2598
|
-
const pairing = createChannelPairingController({
|
|
2599
|
-
core,
|
|
2600
|
-
channel: "bluebubbles",
|
|
2601
|
-
accountId: account.accountId
|
|
2602
|
-
});
|
|
2603
|
-
const privateApiEnabled = isBlueBubblesPrivateApiEnabled(account.accountId);
|
|
2604
|
-
const groupFlag = resolveGroupFlagFromChatGuid(message.chatGuid);
|
|
2605
|
-
const isGroup = typeof groupFlag === "boolean" ? groupFlag : message.isGroup;
|
|
2606
|
-
const text = message.text.trim();
|
|
2607
|
-
const attachments = message.attachments ?? [];
|
|
2608
|
-
const placeholder = buildMessagePlaceholder(message);
|
|
2609
|
-
const tapbackContext = resolveTapbackContext(message);
|
|
2610
|
-
const tapbackParsed = parseTapbackText({
|
|
2611
|
-
text,
|
|
2612
|
-
emojiHint: tapbackContext?.emojiHint,
|
|
2613
|
-
actionHint: tapbackContext?.actionHint,
|
|
2614
|
-
requireQuoted: !tapbackContext
|
|
2615
|
-
});
|
|
2616
|
-
const isTapbackMessage = Boolean(tapbackParsed);
|
|
2617
|
-
const rawBody = tapbackParsed ? tapbackParsed.action === "removed" ? `removed ${tapbackParsed.emoji} reaction` : `reacted with ${tapbackParsed.emoji}` : text || placeholder;
|
|
2618
|
-
const isSelfChatMessage = isBlueBubblesSelfChatMessage(message, isGroup);
|
|
2619
|
-
const selfChatLookup = {
|
|
2620
|
-
accountId: account.accountId,
|
|
2621
|
-
chatGuid: message.chatGuid,
|
|
2622
|
-
chatIdentifier: message.chatIdentifier,
|
|
2623
|
-
chatId: message.chatId,
|
|
2624
|
-
senderId: message.senderId,
|
|
2625
|
-
body: rawBody,
|
|
2626
|
-
timestamp: message.timestamp
|
|
2627
|
-
};
|
|
2628
|
-
const cacheMessageId = message.messageId?.trim();
|
|
2629
|
-
const confirmedOutboundCacheEntry = cacheMessageId ? resolveReplyContextFromCache({
|
|
2630
|
-
accountId: account.accountId,
|
|
2631
|
-
replyToId: cacheMessageId,
|
|
2632
|
-
chatGuid: message.chatGuid,
|
|
2633
|
-
chatIdentifier: message.chatIdentifier,
|
|
2634
|
-
chatId: message.chatId
|
|
2635
|
-
}) : null;
|
|
2636
|
-
let messageShortId;
|
|
2637
|
-
const cacheInboundMessage = () => {
|
|
2638
|
-
if (!cacheMessageId) return;
|
|
2639
|
-
messageShortId = rememberBlueBubblesReplyCache({
|
|
2640
|
-
accountId: account.accountId,
|
|
2641
|
-
messageId: cacheMessageId,
|
|
2642
|
-
chatGuid: message.chatGuid,
|
|
2643
|
-
chatIdentifier: message.chatIdentifier,
|
|
2644
|
-
chatId: message.chatId,
|
|
2645
|
-
senderLabel: message.fromMe ? "me" : message.senderId,
|
|
2646
|
-
body: rawBody,
|
|
2647
|
-
timestamp: message.timestamp ?? Date.now()
|
|
2648
|
-
}).shortId;
|
|
2649
|
-
};
|
|
2650
|
-
if (message.fromMe) {
|
|
2651
|
-
cacheInboundMessage();
|
|
2652
|
-
const confirmedAssistantOutbound = confirmedOutboundCacheEntry?.senderLabel === "me" && normalizeSnippet(confirmedOutboundCacheEntry.body ?? "") === normalizeSnippet(rawBody);
|
|
2653
|
-
if (isSelfChatMessage && confirmedAssistantOutbound) rememberBlueBubblesSelfChatCopy(selfChatLookup);
|
|
2654
|
-
if (cacheMessageId) {
|
|
2655
|
-
const pending = consumePendingOutboundMessageId({
|
|
2656
|
-
accountId: account.accountId,
|
|
2657
|
-
chatGuid: message.chatGuid,
|
|
2658
|
-
chatIdentifier: message.chatIdentifier,
|
|
2659
|
-
chatId: message.chatId,
|
|
2660
|
-
body: rawBody
|
|
2661
|
-
});
|
|
2662
|
-
if (pending) {
|
|
2663
|
-
const displayId = getShortIdForUuid(cacheMessageId) || cacheMessageId;
|
|
2664
|
-
const previewSource = pending.snippetRaw || rawBody;
|
|
2665
|
-
const preview = previewSource ? ` "${previewSource.slice(0, 12)}${previewSource.length > 12 ? "…" : ""}"` : "";
|
|
2666
|
-
core.system.enqueueSystemEvent(`Assistant sent${preview} [message_id:${displayId}]`, {
|
|
2667
|
-
sessionKey: pending.sessionKey,
|
|
2668
|
-
contextKey: `bluebubbles:outbound:${pending.outboundTarget}:${cacheMessageId}`
|
|
2669
|
-
});
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
return;
|
|
2673
|
-
}
|
|
2674
|
-
if (isSelfChatMessage && hasBlueBubblesSelfChatCopy(selfChatLookup)) {
|
|
2675
|
-
logVerbose(core, runtime, `drop: reflected self-chat duplicate sender=${message.senderId}`);
|
|
2676
|
-
return;
|
|
2677
|
-
}
|
|
2678
|
-
if (!rawBody) {
|
|
2679
|
-
logVerbose(core, runtime, `drop: empty text sender=${message.senderId}`);
|
|
2680
|
-
return;
|
|
2681
|
-
}
|
|
2682
|
-
logVerbose(core, runtime, `msg sender=${message.senderId} group=${isGroup} textLen=${text.length} attachments=${attachments.length} chatGuid=${message.chatGuid ?? ""} chatId=${message.chatId ?? ""}`);
|
|
2683
|
-
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
2684
|
-
const groupPolicy = account.config.groupPolicy ?? "allowlist";
|
|
2685
|
-
const configuredAllowFrom = mapAllowFromEntries(account.config.allowFrom);
|
|
2686
|
-
const storeAllowFrom = await readStoreAllowFromForDmPolicy({
|
|
2687
|
-
provider: "bluebubbles",
|
|
2688
|
-
accountId: account.accountId,
|
|
2689
|
-
dmPolicy,
|
|
2690
|
-
readStore: pairing.readStoreForDmPolicy
|
|
2691
|
-
});
|
|
2692
|
-
const accessDecision = resolveDmGroupAccessWithLists({
|
|
2693
|
-
isGroup,
|
|
2694
|
-
dmPolicy,
|
|
2695
|
-
groupPolicy,
|
|
2696
|
-
allowFrom: configuredAllowFrom,
|
|
2697
|
-
groupAllowFrom: account.config.groupAllowFrom,
|
|
2698
|
-
storeAllowFrom,
|
|
2699
|
-
isSenderAllowed: (allowFrom) => isAllowedBlueBubblesSender({
|
|
2700
|
-
allowFrom,
|
|
2701
|
-
sender: message.senderId,
|
|
2702
|
-
chatId: message.chatId ?? void 0,
|
|
2703
|
-
chatGuid: message.chatGuid ?? void 0,
|
|
2704
|
-
chatIdentifier: message.chatIdentifier ?? void 0
|
|
2705
|
-
})
|
|
2706
|
-
});
|
|
2707
|
-
const effectiveAllowFrom = accessDecision.effectiveAllowFrom;
|
|
2708
|
-
const effectiveGroupAllowFrom = accessDecision.effectiveGroupAllowFrom;
|
|
2709
|
-
const groupAllowEntry = formatGroupAllowlistEntry({
|
|
2710
|
-
chatGuid: message.chatGuid,
|
|
2711
|
-
chatId: message.chatId ?? void 0,
|
|
2712
|
-
chatIdentifier: message.chatIdentifier ?? void 0
|
|
2713
|
-
});
|
|
2714
|
-
const groupName = message.chatName?.trim() || void 0;
|
|
2715
|
-
if (accessDecision.decision !== "allow") {
|
|
2716
|
-
if (isGroup) {
|
|
2717
|
-
if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.GROUP_POLICY_DISABLED) {
|
|
2718
|
-
logVerbose(core, runtime, "Blocked BlueBubbles group message (groupPolicy=disabled)");
|
|
2719
|
-
logGroupAllowlistHint({
|
|
2720
|
-
runtime,
|
|
2721
|
-
reason: "groupPolicy=disabled",
|
|
2722
|
-
entry: groupAllowEntry,
|
|
2723
|
-
chatName: groupName,
|
|
2724
|
-
accountId: account.accountId
|
|
2725
|
-
});
|
|
2726
|
-
return;
|
|
2727
|
-
}
|
|
2728
|
-
if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.GROUP_POLICY_EMPTY_ALLOWLIST) {
|
|
2729
|
-
logVerbose(core, runtime, "Blocked BlueBubbles group message (no allowlist)");
|
|
2730
|
-
logGroupAllowlistHint({
|
|
2731
|
-
runtime,
|
|
2732
|
-
reason: "groupPolicy=allowlist (empty allowlist)",
|
|
2733
|
-
entry: groupAllowEntry,
|
|
2734
|
-
chatName: groupName,
|
|
2735
|
-
accountId: account.accountId
|
|
2736
|
-
});
|
|
2737
|
-
return;
|
|
2738
|
-
}
|
|
2739
|
-
if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.GROUP_POLICY_NOT_ALLOWLISTED) {
|
|
2740
|
-
logVerbose(core, runtime, `Blocked BlueBubbles sender ${message.senderId} (not in groupAllowFrom)`);
|
|
2741
|
-
logVerbose(core, runtime, `drop: group sender not allowed sender=${message.senderId} allowFrom=${effectiveGroupAllowFrom.join(",")}`);
|
|
2742
|
-
logGroupAllowlistHint({
|
|
2743
|
-
runtime,
|
|
2744
|
-
reason: "groupPolicy=allowlist (not allowlisted)",
|
|
2745
|
-
entry: groupAllowEntry,
|
|
2746
|
-
chatName: groupName,
|
|
2747
|
-
accountId: account.accountId
|
|
2748
|
-
});
|
|
2749
|
-
return;
|
|
2750
|
-
}
|
|
2751
|
-
return;
|
|
2752
|
-
}
|
|
2753
|
-
if (accessDecision.reasonCode === DM_GROUP_ACCESS_REASON.DM_POLICY_DISABLED) {
|
|
2754
|
-
logVerbose(core, runtime, `Blocked BlueBubbles DM from ${message.senderId}`);
|
|
2755
|
-
logVerbose(core, runtime, `drop: dmPolicy disabled sender=${message.senderId}`);
|
|
2756
|
-
return;
|
|
2757
|
-
}
|
|
2758
|
-
if (accessDecision.decision === "pairing") {
|
|
2759
|
-
await pairing.issueChallenge({
|
|
2760
|
-
senderId: message.senderId,
|
|
2761
|
-
senderIdLine: `Your BlueBubbles sender id: ${message.senderId}`,
|
|
2762
|
-
meta: { name: message.senderName },
|
|
2763
|
-
onCreated: () => {
|
|
2764
|
-
runtime.log?.(`[bluebubbles] pairing request sender=${message.senderId} created=true`);
|
|
2765
|
-
logVerbose(core, runtime, `bluebubbles pairing request sender=${message.senderId}`);
|
|
2766
|
-
},
|
|
2767
|
-
sendPairingReply: async (text) => {
|
|
2768
|
-
await sendMessageBlueBubbles(message.senderId, text, {
|
|
2769
|
-
cfg: config,
|
|
2770
|
-
accountId: account.accountId
|
|
2771
|
-
});
|
|
2772
|
-
statusSink?.({ lastOutboundAt: Date.now() });
|
|
2773
|
-
},
|
|
2774
|
-
onReplyError: (err) => {
|
|
2775
|
-
logVerbose(core, runtime, `bluebubbles pairing reply failed for ${message.senderId}: ${String(err)}`);
|
|
2776
|
-
runtime.error?.(`[bluebubbles] pairing reply failed sender=${message.senderId}: ${String(err)}`);
|
|
2777
|
-
}
|
|
2778
|
-
});
|
|
2779
|
-
return;
|
|
2780
|
-
}
|
|
2781
|
-
logVerbose(core, runtime, `Blocked unauthorized BlueBubbles sender ${message.senderId} (dmPolicy=${dmPolicy})`);
|
|
2782
|
-
logVerbose(core, runtime, `drop: dm sender not allowed sender=${message.senderId} allowFrom=${effectiveAllowFrom.join(",")}`);
|
|
2783
|
-
return;
|
|
2784
|
-
}
|
|
2785
|
-
const chatId = message.chatId ?? void 0;
|
|
2786
|
-
const chatGuid = message.chatGuid ?? void 0;
|
|
2787
|
-
const chatIdentifier = message.chatIdentifier ?? void 0;
|
|
2788
|
-
const peerId = isGroup ? chatGuid ?? chatIdentifier ?? (chatId ? String(chatId) : "group") : message.senderId;
|
|
2789
|
-
const route = resolveBlueBubblesConversationRoute({
|
|
2790
|
-
cfg: config,
|
|
2791
|
-
accountId: account.accountId,
|
|
2792
|
-
isGroup,
|
|
2793
|
-
peerId,
|
|
2794
|
-
sender: message.senderId,
|
|
2795
|
-
chatId,
|
|
2796
|
-
chatGuid,
|
|
2797
|
-
chatIdentifier
|
|
2798
|
-
});
|
|
2799
|
-
const contextVisibilityMode = resolveChannelContextVisibilityMode({
|
|
2800
|
-
cfg: config,
|
|
2801
|
-
channel: "bluebubbles",
|
|
2802
|
-
accountId: account.accountId
|
|
2803
|
-
});
|
|
2804
|
-
const messageText = text;
|
|
2805
|
-
const mentionRegexes = core.channel.mentions.buildMentionRegexes(config, route.agentId);
|
|
2806
|
-
const wasMentioned = isGroup ? core.channel.mentions.matchesMentionPatterns(messageText, mentionRegexes) : true;
|
|
2807
|
-
const canDetectMention = mentionRegexes.length > 0;
|
|
2808
|
-
const requireMention = core.channel.groups.resolveRequireMention({
|
|
2809
|
-
cfg: config,
|
|
2810
|
-
channel: "bluebubbles",
|
|
2811
|
-
groupId: peerId,
|
|
2812
|
-
accountId: account.accountId
|
|
2813
|
-
});
|
|
2814
|
-
const useAccessGroups = config.commands?.useAccessGroups !== false;
|
|
2815
|
-
const hasControlCmd = core.channel.text.hasControlCommand(messageText, config);
|
|
2816
|
-
const commandDmAllowFrom = isGroup ? configuredAllowFrom : effectiveAllowFrom;
|
|
2817
|
-
const ownerAllowedForCommands = commandDmAllowFrom.length > 0 ? isAllowedBlueBubblesSender({
|
|
2818
|
-
allowFrom: commandDmAllowFrom,
|
|
2819
|
-
sender: message.senderId,
|
|
2820
|
-
chatId: message.chatId ?? void 0,
|
|
2821
|
-
chatGuid: message.chatGuid ?? void 0,
|
|
2822
|
-
chatIdentifier: message.chatIdentifier ?? void 0
|
|
2823
|
-
}) : false;
|
|
2824
|
-
const groupAllowedForCommands = effectiveGroupAllowFrom.length > 0 ? isAllowedBlueBubblesSender({
|
|
2825
|
-
allowFrom: effectiveGroupAllowFrom,
|
|
2826
|
-
sender: message.senderId,
|
|
2827
|
-
chatId: message.chatId ?? void 0,
|
|
2828
|
-
chatGuid: message.chatGuid ?? void 0,
|
|
2829
|
-
chatIdentifier: message.chatIdentifier ?? void 0
|
|
2830
|
-
}) : false;
|
|
2831
|
-
const commandGate = resolveControlCommandGate({
|
|
2832
|
-
useAccessGroups,
|
|
2833
|
-
authorizers: [{
|
|
2834
|
-
configured: commandDmAllowFrom.length > 0,
|
|
2835
|
-
allowed: ownerAllowedForCommands
|
|
2836
|
-
}, {
|
|
2837
|
-
configured: effectiveGroupAllowFrom.length > 0,
|
|
2838
|
-
allowed: groupAllowedForCommands
|
|
2839
|
-
}],
|
|
2840
|
-
allowTextCommands: true,
|
|
2841
|
-
hasControlCommand: hasControlCmd
|
|
2842
|
-
});
|
|
2843
|
-
const commandAuthorized = commandGate.commandAuthorized;
|
|
2844
|
-
if (isGroup && commandGate.shouldBlock) {
|
|
2845
|
-
logInboundDrop({
|
|
2846
|
-
log: (msg) => logVerbose(core, runtime, msg),
|
|
2847
|
-
channel: "bluebubbles",
|
|
2848
|
-
reason: "control command (unauthorized)",
|
|
2849
|
-
target: message.senderId
|
|
2850
|
-
});
|
|
2851
|
-
return;
|
|
2852
|
-
}
|
|
2853
|
-
const shouldBypassMention = isGroup && requireMention && !wasMentioned && commandAuthorized && hasControlCmd;
|
|
2854
|
-
const effectiveWasMentioned = wasMentioned || shouldBypassMention;
|
|
2855
|
-
if (isGroup && requireMention && canDetectMention && !wasMentioned && !shouldBypassMention) {
|
|
2856
|
-
logVerbose(core, runtime, `bluebubbles: skipping group message (no mention)`);
|
|
2857
|
-
return;
|
|
2858
|
-
}
|
|
2859
|
-
const baseUrl = normalizeSecretInputString(account.config.serverUrl);
|
|
2860
|
-
const password = normalizeSecretInputString(account.config.password);
|
|
2861
|
-
if (isGroup && !message.participants?.length && baseUrl && password) try {
|
|
2862
|
-
const fetchedParticipants = await fetchBlueBubblesParticipantsForInboundMessage({
|
|
2863
|
-
baseUrl,
|
|
2864
|
-
password,
|
|
2865
|
-
chatGuid: message.chatGuid,
|
|
2866
|
-
chatId: message.chatId,
|
|
2867
|
-
chatIdentifier: message.chatIdentifier,
|
|
2868
|
-
allowPrivateNetwork: account.config.allowPrivateNetwork === true
|
|
2869
|
-
});
|
|
2870
|
-
if (fetchedParticipants?.length) message.participants = fetchedParticipants;
|
|
2871
|
-
} catch (err) {
|
|
2872
|
-
logVerbose(core, runtime, `bluebubbles: participant fallback lookup failed chat=${peerId}: ${String(err)}`);
|
|
2873
|
-
}
|
|
2874
|
-
if (isGroup && account.config.enrichGroupParticipantsFromContacts === true && message.participants?.length) message.participants = await enrichBlueBubblesParticipantsWithContactNames(message.participants);
|
|
2875
|
-
cacheInboundMessage();
|
|
2876
|
-
const maxBytes = account.config.mediaMaxMb && account.config.mediaMaxMb > 0 ? account.config.mediaMaxMb * 1024 * 1024 : 8 * 1024 * 1024;
|
|
2877
|
-
let mediaUrls = [];
|
|
2878
|
-
let mediaPaths = [];
|
|
2879
|
-
let mediaTypes = [];
|
|
2880
|
-
if (attachments.length > 0) if (!baseUrl || !password) logVerbose(core, runtime, "attachment download skipped (missing serverUrl/password)");
|
|
2881
|
-
else for (const attachment of attachments) {
|
|
2882
|
-
if (!attachment.guid) continue;
|
|
2883
|
-
if (attachment.totalBytes && attachment.totalBytes > maxBytes) {
|
|
2884
|
-
logVerbose(core, runtime, `attachment too large guid=${attachment.guid} bytes=${attachment.totalBytes}`);
|
|
2885
|
-
continue;
|
|
2886
|
-
}
|
|
2887
|
-
try {
|
|
2888
|
-
const downloaded = await downloadBlueBubblesAttachment(attachment, {
|
|
2889
|
-
cfg: config,
|
|
2890
|
-
accountId: account.accountId,
|
|
2891
|
-
maxBytes
|
|
2892
|
-
});
|
|
2893
|
-
const saved = await core.channel.media.saveMediaBuffer(Buffer.from(downloaded.buffer), downloaded.contentType, "inbound", maxBytes);
|
|
2894
|
-
mediaPaths.push(saved.path);
|
|
2895
|
-
mediaUrls.push(saved.path);
|
|
2896
|
-
if (saved.contentType) mediaTypes.push(saved.contentType);
|
|
2897
|
-
} catch (err) {
|
|
2898
|
-
logVerbose(core, runtime, `attachment download failed guid=${attachment.guid} err=${String(err)}`);
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
let replyToId = message.replyToId;
|
|
2902
|
-
let replyToBody = message.replyToBody;
|
|
2903
|
-
let replyToSender = message.replyToSender;
|
|
2904
|
-
let replyToShortId;
|
|
2905
|
-
if (isTapbackMessage && tapbackContext?.replyToId) replyToId = tapbackContext.replyToId;
|
|
2906
|
-
if (replyToId) {
|
|
2907
|
-
const cached = resolveReplyContextFromCache({
|
|
2908
|
-
accountId: account.accountId,
|
|
2909
|
-
replyToId,
|
|
2910
|
-
chatGuid: message.chatGuid,
|
|
2911
|
-
chatIdentifier: message.chatIdentifier,
|
|
2912
|
-
chatId: message.chatId
|
|
2913
|
-
});
|
|
2914
|
-
if (cached) {
|
|
2915
|
-
if (!replyToBody && cached.body) replyToBody = cached.body;
|
|
2916
|
-
if (!replyToSender && cached.senderLabel) replyToSender = cached.senderLabel;
|
|
2917
|
-
replyToShortId = cached.shortId;
|
|
2918
|
-
if (core.logging.shouldLogVerbose()) {
|
|
2919
|
-
const preview = (cached.body ?? "").replace(/\s+/g, " ").slice(0, 120);
|
|
2920
|
-
logVerbose(core, runtime, `reply-context cache hit replyToId=${replyToId} sender=${replyToSender ?? ""} body="${preview}"`);
|
|
2921
|
-
}
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
if (replyToId && !replyToShortId) replyToShortId = getShortIdForUuid(replyToId);
|
|
2925
|
-
const hasReplyContext = Boolean(replyToId || replyToBody || replyToSender);
|
|
2926
|
-
const replySenderAllowed = !isGroup || effectiveGroupAllowFrom.length === 0 ? true : replyToSender ? isAllowedBlueBubblesSender({
|
|
2927
|
-
allowFrom: effectiveGroupAllowFrom,
|
|
2928
|
-
sender: replyToSender,
|
|
2929
|
-
chatId: message.chatId ?? void 0,
|
|
2930
|
-
chatGuid: message.chatGuid ?? void 0,
|
|
2931
|
-
chatIdentifier: message.chatIdentifier ?? void 0
|
|
2932
|
-
}) : false;
|
|
2933
|
-
const includeReplyContext = !hasReplyContext || evaluateSupplementalContextVisibility({
|
|
2934
|
-
mode: contextVisibilityMode,
|
|
2935
|
-
kind: "quote",
|
|
2936
|
-
senderAllowed: replySenderAllowed
|
|
2937
|
-
}).include;
|
|
2938
|
-
if (hasReplyContext && !includeReplyContext && isGroup) logVerbose(core, runtime, `bluebubbles: drop reply context (mode=${contextVisibilityMode}, sender_allowed=${replySenderAllowed ? "yes" : "no"})`);
|
|
2939
|
-
const visibleReplyToId = includeReplyContext ? replyToId : void 0;
|
|
2940
|
-
const visibleReplyToShortId = includeReplyContext ? replyToShortId : void 0;
|
|
2941
|
-
const visibleReplyToBody = includeReplyContext ? replyToBody : void 0;
|
|
2942
|
-
const visibleReplyToSender = includeReplyContext ? replyToSender : void 0;
|
|
2943
|
-
const replyTag = formatReplyTag({
|
|
2944
|
-
replyToId: visibleReplyToId,
|
|
2945
|
-
replyToShortId: visibleReplyToShortId
|
|
2946
|
-
});
|
|
2947
|
-
const baseBody = replyTag ? isTapbackMessage ? `${rawBody} ${replyTag}` : `${replyTag} ${rawBody}` : rawBody;
|
|
2948
|
-
const senderLabel = message.senderName || `user:${message.senderId}`;
|
|
2949
|
-
const fromLabel = isGroup ? `${message.chatName?.trim() || "Group"} id:${peerId}` : senderLabel !== message.senderId ? `${senderLabel} id:${message.senderId}` : senderLabel;
|
|
2950
|
-
const groupSubject = isGroup ? message.chatName?.trim() || void 0 : void 0;
|
|
2951
|
-
const groupMembers = isGroup ? formatGroupMembers({
|
|
2952
|
-
participants: message.participants,
|
|
2953
|
-
fallback: message.senderId ? {
|
|
2954
|
-
id: message.senderId,
|
|
2955
|
-
name: message.senderName
|
|
2956
|
-
} : void 0
|
|
2957
|
-
}) : void 0;
|
|
2958
|
-
const storePath = core.channel.session.resolveStorePath(config.session?.store, { agentId: route.agentId });
|
|
2959
|
-
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(config);
|
|
2960
|
-
const previousTimestamp = core.channel.session.readSessionUpdatedAt({
|
|
2961
|
-
storePath,
|
|
2962
|
-
sessionKey: route.sessionKey
|
|
2963
|
-
});
|
|
2964
|
-
const body = core.channel.reply.formatInboundEnvelope({
|
|
2965
|
-
channel: "BlueBubbles",
|
|
2966
|
-
from: fromLabel,
|
|
2967
|
-
timestamp: message.timestamp,
|
|
2968
|
-
previousTimestamp,
|
|
2969
|
-
envelope: envelopeOptions,
|
|
2970
|
-
body: baseBody,
|
|
2971
|
-
chatType: isGroup ? "group" : "direct",
|
|
2972
|
-
sender: {
|
|
2973
|
-
name: message.senderName || void 0,
|
|
2974
|
-
id: message.senderId
|
|
2975
|
-
}
|
|
2976
|
-
});
|
|
2977
|
-
let chatGuidForActions = chatGuid;
|
|
2978
|
-
if (!chatGuidForActions && baseUrl && password) {
|
|
2979
|
-
const resolveTarget = isGroup && (chatId || chatIdentifier) ? chatId ? {
|
|
2980
|
-
kind: "chat_id",
|
|
2981
|
-
chatId
|
|
2982
|
-
} : {
|
|
2983
|
-
kind: "chat_identifier",
|
|
2984
|
-
chatIdentifier: chatIdentifier ?? ""
|
|
2985
|
-
} : {
|
|
2986
|
-
kind: "handle",
|
|
2987
|
-
address: message.senderId
|
|
2988
|
-
};
|
|
2989
|
-
if (resolveTarget.kind !== "chat_identifier" || resolveTarget.chatIdentifier) chatGuidForActions = await resolveChatGuidForTarget({
|
|
2990
|
-
baseUrl,
|
|
2991
|
-
password,
|
|
2992
|
-
target: resolveTarget,
|
|
2993
|
-
allowPrivateNetwork: account.config.allowPrivateNetwork === true
|
|
2994
|
-
}) ?? void 0;
|
|
2995
|
-
}
|
|
2996
|
-
const ackReactionScope = config.messages?.ackReactionScope ?? "group-mentions";
|
|
2997
|
-
const removeAckAfterReply = config.messages?.removeAckAfterReply ?? false;
|
|
2998
|
-
const ackReactionValue = resolveBlueBubblesAckReaction({
|
|
2999
|
-
cfg: config,
|
|
3000
|
-
agentId: route.agentId,
|
|
3001
|
-
core,
|
|
3002
|
-
runtime
|
|
3003
|
-
});
|
|
3004
|
-
const shouldAckReaction = () => Boolean(ackReactionValue && core.channel.reactions.shouldAckReaction({
|
|
3005
|
-
scope: ackReactionScope,
|
|
3006
|
-
isDirect: !isGroup,
|
|
3007
|
-
isGroup,
|
|
3008
|
-
isMentionableGroup: isGroup,
|
|
3009
|
-
requireMention: Boolean(requireMention),
|
|
3010
|
-
canDetectMention,
|
|
3011
|
-
effectiveWasMentioned,
|
|
3012
|
-
shouldBypassMention
|
|
3013
|
-
}));
|
|
3014
|
-
const ackMessageId = message.messageId?.trim() || "";
|
|
3015
|
-
const ackReactionPromise = shouldAckReaction() && ackMessageId && chatGuidForActions && ackReactionValue ? sendBlueBubblesReaction({
|
|
3016
|
-
chatGuid: chatGuidForActions,
|
|
3017
|
-
messageGuid: ackMessageId,
|
|
3018
|
-
emoji: ackReactionValue,
|
|
3019
|
-
opts: {
|
|
3020
|
-
cfg: config,
|
|
3021
|
-
accountId: account.accountId
|
|
3022
|
-
}
|
|
3023
|
-
}).then(() => true, (err) => {
|
|
3024
|
-
logVerbose(core, runtime, `ack reaction failed chatGuid=${chatGuidForActions} msg=${ackMessageId}: ${String(err)}`);
|
|
3025
|
-
return false;
|
|
3026
|
-
}) : null;
|
|
3027
|
-
const sendReadReceipts = account.config.sendReadReceipts !== false;
|
|
3028
|
-
if (chatGuidForActions && baseUrl && password && sendReadReceipts) try {
|
|
3029
|
-
await markBlueBubblesChatRead(chatGuidForActions, {
|
|
3030
|
-
cfg: config,
|
|
3031
|
-
accountId: account.accountId
|
|
3032
|
-
});
|
|
3033
|
-
logVerbose(core, runtime, `marked read chatGuid=${chatGuidForActions}`);
|
|
3034
|
-
} catch (err) {
|
|
3035
|
-
runtime.error?.(`[bluebubbles] mark read failed: ${String(err)}`);
|
|
3036
|
-
}
|
|
3037
|
-
else if (!sendReadReceipts) logVerbose(core, runtime, "mark read skipped (sendReadReceipts=false)");
|
|
3038
|
-
else logVerbose(core, runtime, "mark read skipped (missing chatGuid or credentials)");
|
|
3039
|
-
const outboundTarget = isGroup ? formatBlueBubblesChatTarget({
|
|
3040
|
-
chatId,
|
|
3041
|
-
chatGuid: chatGuidForActions ?? chatGuid,
|
|
3042
|
-
chatIdentifier
|
|
3043
|
-
}) || peerId : chatGuidForActions ? formatBlueBubblesChatTarget({ chatGuid: chatGuidForActions }) : message.senderId;
|
|
3044
|
-
const maybeEnqueueOutboundMessageId = (messageId, snippet) => {
|
|
3045
|
-
const trimmed = messageId?.trim();
|
|
3046
|
-
if (!trimmed || trimmed === "ok" || trimmed === "unknown") return false;
|
|
3047
|
-
const displayId = rememberBlueBubblesReplyCache({
|
|
3048
|
-
accountId: account.accountId,
|
|
3049
|
-
messageId: trimmed,
|
|
3050
|
-
chatGuid: chatGuidForActions ?? chatGuid,
|
|
3051
|
-
chatIdentifier,
|
|
3052
|
-
chatId,
|
|
3053
|
-
senderLabel: "me",
|
|
3054
|
-
body: snippet ?? "",
|
|
3055
|
-
timestamp: Date.now()
|
|
3056
|
-
}).shortId || trimmed;
|
|
3057
|
-
const preview = snippet ? ` "${snippet.slice(0, 12)}${snippet.length > 12 ? "…" : ""}"` : "";
|
|
3058
|
-
core.system.enqueueSystemEvent(`Assistant sent${preview} [message_id:${displayId}]`, {
|
|
3059
|
-
sessionKey: route.sessionKey,
|
|
3060
|
-
contextKey: `bluebubbles:outbound:${outboundTarget}:${trimmed}`
|
|
3061
|
-
});
|
|
3062
|
-
return true;
|
|
3063
|
-
};
|
|
3064
|
-
const sanitizeReplyDirectiveText = (value) => {
|
|
3065
|
-
if (privateApiEnabled) return value;
|
|
3066
|
-
return value.replace(REPLY_DIRECTIVE_TAG_RE, " ").replace(/[ \t]+/g, " ").trim();
|
|
3067
|
-
};
|
|
3068
|
-
const historyLimit = isGroup ? account.config.historyLimit ?? 0 : account.config.dmHistoryLimit ?? 0;
|
|
3069
|
-
const historyIdentifier = chatGuid || chatIdentifier || (chatId ? String(chatId) : null) || (isGroup ? null : message.senderId) || "";
|
|
3070
|
-
const historyKey = historyIdentifier ? buildAccountScopedHistoryKey(account.accountId, historyIdentifier) : "";
|
|
3071
|
-
if (historyKey && historyLimit > 0) {
|
|
3072
|
-
const nowMs = Date.now();
|
|
3073
|
-
const senderLabel = message.fromMe ? "me" : message.senderName || message.senderId;
|
|
3074
|
-
const normalizedHistoryBody = truncateHistoryBody(text, MAX_STORED_HISTORY_ENTRY_CHARS);
|
|
3075
|
-
const currentEntries = recordPendingHistoryEntryIfEnabled({
|
|
3076
|
-
historyMap: chatHistories,
|
|
3077
|
-
limit: historyLimit,
|
|
3078
|
-
historyKey,
|
|
3079
|
-
entry: normalizedHistoryBody ? {
|
|
3080
|
-
sender: senderLabel,
|
|
3081
|
-
body: normalizedHistoryBody,
|
|
3082
|
-
timestamp: message.timestamp ?? nowMs,
|
|
3083
|
-
messageId: message.messageId ?? void 0
|
|
3084
|
-
} : null
|
|
3085
|
-
});
|
|
3086
|
-
pruneHistoryBackfillState();
|
|
3087
|
-
const backfillAttempt = planHistoryBackfillAttempt(historyKey, nowMs);
|
|
3088
|
-
if (backfillAttempt) try {
|
|
3089
|
-
const backfillResult = await fetchBlueBubblesHistory(historyIdentifier, historyLimit, {
|
|
3090
|
-
cfg: config,
|
|
3091
|
-
accountId: account.accountId
|
|
3092
|
-
});
|
|
3093
|
-
if (backfillResult.resolved) markHistoryBackfillResolved(historyKey);
|
|
3094
|
-
if (backfillResult.entries.length > 0) {
|
|
3095
|
-
const apiEntries = [];
|
|
3096
|
-
for (const entry of backfillResult.entries) {
|
|
3097
|
-
const body = truncateHistoryBody(entry.body, MAX_STORED_HISTORY_ENTRY_CHARS);
|
|
3098
|
-
if (!body) continue;
|
|
3099
|
-
apiEntries.push({
|
|
3100
|
-
sender: entry.sender,
|
|
3101
|
-
body,
|
|
3102
|
-
timestamp: entry.timestamp,
|
|
3103
|
-
messageId: entry.messageId
|
|
3104
|
-
});
|
|
3105
|
-
}
|
|
3106
|
-
const merged = mergeHistoryEntries({
|
|
3107
|
-
apiEntries,
|
|
3108
|
-
currentEntries: currentEntries.length > 0 ? currentEntries : chatHistories.get(historyKey) ?? [],
|
|
3109
|
-
limit: historyLimit
|
|
3110
|
-
});
|
|
3111
|
-
if (chatHistories.has(historyKey)) chatHistories.delete(historyKey);
|
|
3112
|
-
chatHistories.set(historyKey, merged);
|
|
3113
|
-
evictOldHistoryKeys(chatHistories);
|
|
3114
|
-
logVerbose(core, runtime, `backfilled ${backfillResult.entries.length} history messages for ${isGroup ? "group" : "DM"}: ${historyIdentifier}`);
|
|
3115
|
-
} else if (!backfillResult.resolved) {
|
|
3116
|
-
const remainingAttempts = HISTORY_BACKFILL_MAX_ATTEMPTS - backfillAttempt.attempts;
|
|
3117
|
-
const nextBackoffMs = Math.max(backfillAttempt.nextAttemptAt - nowMs, 0);
|
|
3118
|
-
logVerbose(core, runtime, `history backfill unresolved for ${historyIdentifier}; retries left=${Math.max(remainingAttempts, 0)} next_in_ms=${nextBackoffMs}`);
|
|
3119
|
-
}
|
|
3120
|
-
} catch (err) {
|
|
3121
|
-
const remainingAttempts = HISTORY_BACKFILL_MAX_ATTEMPTS - backfillAttempt.attempts;
|
|
3122
|
-
const nextBackoffMs = Math.max(backfillAttempt.nextAttemptAt - nowMs, 0);
|
|
3123
|
-
logVerbose(core, runtime, `history backfill failed for ${historyIdentifier}: ${String(err)} (retries left=${Math.max(remainingAttempts, 0)} next_in_ms=${nextBackoffMs})`);
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
let inboundHistory;
|
|
3127
|
-
if (historyKey && historyLimit > 0) {
|
|
3128
|
-
const entries = chatHistories.get(historyKey);
|
|
3129
|
-
if (entries && entries.length > 0) inboundHistory = buildInboundHistorySnapshot({
|
|
3130
|
-
entries,
|
|
3131
|
-
limit: historyLimit
|
|
3132
|
-
});
|
|
3133
|
-
}
|
|
3134
|
-
const commandBody = messageText.trim();
|
|
3135
|
-
const ctxPayload = core.channel.reply.finalizeInboundContext({
|
|
3136
|
-
Body: body,
|
|
3137
|
-
BodyForAgent: rawBody,
|
|
3138
|
-
InboundHistory: inboundHistory,
|
|
3139
|
-
RawBody: rawBody,
|
|
3140
|
-
CommandBody: commandBody,
|
|
3141
|
-
BodyForCommands: commandBody,
|
|
3142
|
-
MediaUrl: mediaUrls[0],
|
|
3143
|
-
MediaUrls: mediaUrls.length > 0 ? mediaUrls : void 0,
|
|
3144
|
-
MediaPath: mediaPaths[0],
|
|
3145
|
-
MediaPaths: mediaPaths.length > 0 ? mediaPaths : void 0,
|
|
3146
|
-
MediaType: mediaTypes[0],
|
|
3147
|
-
MediaTypes: mediaTypes.length > 0 ? mediaTypes : void 0,
|
|
3148
|
-
From: isGroup ? `group:${peerId}` : `bluebubbles:${message.senderId}`,
|
|
3149
|
-
To: `bluebubbles:${outboundTarget}`,
|
|
3150
|
-
SessionKey: route.sessionKey,
|
|
3151
|
-
AccountId: route.accountId,
|
|
3152
|
-
ChatType: isGroup ? "group" : "direct",
|
|
3153
|
-
ConversationLabel: fromLabel,
|
|
3154
|
-
ReplyToId: visibleReplyToShortId || visibleReplyToId,
|
|
3155
|
-
ReplyToIdFull: visibleReplyToId,
|
|
3156
|
-
ReplyToBody: visibleReplyToBody,
|
|
3157
|
-
ReplyToSender: visibleReplyToSender,
|
|
3158
|
-
GroupSubject: groupSubject,
|
|
3159
|
-
GroupMembers: groupMembers,
|
|
3160
|
-
SenderName: message.senderName || void 0,
|
|
3161
|
-
SenderId: message.senderId,
|
|
3162
|
-
Provider: "bluebubbles",
|
|
3163
|
-
Surface: "bluebubbles",
|
|
3164
|
-
MessageSid: messageShortId || message.messageId,
|
|
3165
|
-
MessageSidFull: message.messageId,
|
|
3166
|
-
Timestamp: message.timestamp,
|
|
3167
|
-
OriginatingChannel: "bluebubbles",
|
|
3168
|
-
OriginatingTo: `bluebubbles:${outboundTarget}`,
|
|
3169
|
-
WasMentioned: effectiveWasMentioned,
|
|
3170
|
-
CommandAuthorized: commandAuthorized
|
|
3171
|
-
});
|
|
3172
|
-
let sentMessage = false;
|
|
3173
|
-
let streamingActive = false;
|
|
3174
|
-
let typingRestartTimer;
|
|
3175
|
-
const typingRestartDelayMs = 150;
|
|
3176
|
-
const clearTypingRestartTimer = () => {
|
|
3177
|
-
if (typingRestartTimer) {
|
|
3178
|
-
clearTimeout(typingRestartTimer);
|
|
3179
|
-
typingRestartTimer = void 0;
|
|
3180
|
-
}
|
|
3181
|
-
};
|
|
3182
|
-
const restartTypingSoon = () => {
|
|
3183
|
-
if (!streamingActive || !chatGuidForActions || !baseUrl || !password) return;
|
|
3184
|
-
clearTypingRestartTimer();
|
|
3185
|
-
typingRestartTimer = setTimeout(() => {
|
|
3186
|
-
typingRestartTimer = void 0;
|
|
3187
|
-
if (!streamingActive) return;
|
|
3188
|
-
sendBlueBubblesTyping(chatGuidForActions, true, {
|
|
3189
|
-
cfg: config,
|
|
3190
|
-
accountId: account.accountId
|
|
3191
|
-
}).catch((err) => {
|
|
3192
|
-
runtime.error?.(`[bluebubbles] typing restart failed: ${String(err)}`);
|
|
3193
|
-
});
|
|
3194
|
-
}, typingRestartDelayMs);
|
|
3195
|
-
};
|
|
3196
|
-
try {
|
|
3197
|
-
const { onModelSelected, typingCallbacks, ...replyPipeline } = createChannelReplyPipeline({
|
|
3198
|
-
cfg: config,
|
|
3199
|
-
agentId: route.agentId,
|
|
3200
|
-
channel: "bluebubbles",
|
|
3201
|
-
accountId: account.accountId,
|
|
3202
|
-
typingCallbacks: {
|
|
3203
|
-
onReplyStart: async () => {
|
|
3204
|
-
if (!chatGuidForActions) return;
|
|
3205
|
-
if (!baseUrl || !password) return;
|
|
3206
|
-
streamingActive = true;
|
|
3207
|
-
clearTypingRestartTimer();
|
|
3208
|
-
try {
|
|
3209
|
-
await sendBlueBubblesTyping(chatGuidForActions, true, {
|
|
3210
|
-
cfg: config,
|
|
3211
|
-
accountId: account.accountId
|
|
3212
|
-
});
|
|
3213
|
-
} catch (err) {
|
|
3214
|
-
runtime.error?.(`[bluebubbles] typing start failed: ${String(err)}`);
|
|
3215
|
-
}
|
|
3216
|
-
},
|
|
3217
|
-
onIdle: () => {
|
|
3218
|
-
if (!chatGuidForActions) return;
|
|
3219
|
-
if (!baseUrl || !password) return;
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
|
-
});
|
|
3223
|
-
await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
|
|
3224
|
-
ctx: ctxPayload,
|
|
3225
|
-
cfg: config,
|
|
3226
|
-
dispatcherOptions: {
|
|
3227
|
-
...replyPipeline,
|
|
3228
|
-
deliver: async (payload, info) => {
|
|
3229
|
-
const rawReplyToId = privateApiEnabled && typeof payload.replyToId === "string" ? payload.replyToId.trim() : "";
|
|
3230
|
-
const replyToMessageGuid = rawReplyToId ? resolveBlueBubblesMessageId(rawReplyToId, { requireKnownShortId: true }) : "";
|
|
3231
|
-
const mediaList = resolveOutboundMediaUrls(payload);
|
|
3232
|
-
if (mediaList.length > 0) {
|
|
3233
|
-
const tableMode = core.channel.text.resolveMarkdownTableMode({
|
|
3234
|
-
cfg: config,
|
|
3235
|
-
channel: "bluebubbles",
|
|
3236
|
-
accountId: account.accountId
|
|
3237
|
-
});
|
|
3238
|
-
await sendMediaWithLeadingCaption({
|
|
3239
|
-
mediaUrls: mediaList,
|
|
3240
|
-
caption: sanitizeReplyDirectiveText(core.channel.text.convertMarkdownTables(payload.text ?? "", tableMode)),
|
|
3241
|
-
send: async ({ mediaUrl, caption }) => {
|
|
3242
|
-
const cachedBody = (caption ?? "").trim() || "<media:attachment>";
|
|
3243
|
-
const pendingId = rememberPendingOutboundMessageId({
|
|
3244
|
-
accountId: account.accountId,
|
|
3245
|
-
sessionKey: route.sessionKey,
|
|
3246
|
-
outboundTarget,
|
|
3247
|
-
chatGuid: chatGuidForActions ?? chatGuid,
|
|
3248
|
-
chatIdentifier,
|
|
3249
|
-
chatId,
|
|
3250
|
-
snippet: cachedBody
|
|
3251
|
-
});
|
|
3252
|
-
let result;
|
|
3253
|
-
try {
|
|
3254
|
-
result = await sendBlueBubblesMedia({
|
|
3255
|
-
cfg: config,
|
|
3256
|
-
to: outboundTarget,
|
|
3257
|
-
mediaUrl,
|
|
3258
|
-
caption: caption ?? void 0,
|
|
3259
|
-
replyToId: replyToMessageGuid || null,
|
|
3260
|
-
accountId: account.accountId
|
|
3261
|
-
});
|
|
3262
|
-
} catch (err) {
|
|
3263
|
-
forgetPendingOutboundMessageId(pendingId);
|
|
3264
|
-
throw err;
|
|
3265
|
-
}
|
|
3266
|
-
if (maybeEnqueueOutboundMessageId(result.messageId, cachedBody)) forgetPendingOutboundMessageId(pendingId);
|
|
3267
|
-
sentMessage = true;
|
|
3268
|
-
statusSink?.({ lastOutboundAt: Date.now() });
|
|
3269
|
-
if (info.kind === "block") restartTypingSoon();
|
|
3270
|
-
}
|
|
3271
|
-
});
|
|
3272
|
-
return;
|
|
3273
|
-
}
|
|
3274
|
-
const textLimit = account.config.textChunkLimit && account.config.textChunkLimit > 0 ? account.config.textChunkLimit : DEFAULT_TEXT_LIMIT;
|
|
3275
|
-
const chunkMode = account.config.chunkMode ?? "length";
|
|
3276
|
-
const tableMode = core.channel.text.resolveMarkdownTableMode({
|
|
3277
|
-
cfg: config,
|
|
3278
|
-
channel: "bluebubbles",
|
|
3279
|
-
accountId: account.accountId
|
|
3280
|
-
});
|
|
3281
|
-
const text = sanitizeReplyDirectiveText(core.channel.text.convertMarkdownTables(payload.text ?? "", tableMode));
|
|
3282
|
-
const chunks = chunkMode === "newline" ? resolveTextChunksWithFallback(text, core.channel.text.chunkTextWithMode(text, textLimit, chunkMode)) : resolveTextChunksWithFallback(text, core.channel.text.chunkMarkdownText(text, textLimit));
|
|
3283
|
-
if (!chunks.length) return;
|
|
3284
|
-
for (const chunk of chunks) {
|
|
3285
|
-
const pendingId = rememberPendingOutboundMessageId({
|
|
3286
|
-
accountId: account.accountId,
|
|
3287
|
-
sessionKey: route.sessionKey,
|
|
3288
|
-
outboundTarget,
|
|
3289
|
-
chatGuid: chatGuidForActions ?? chatGuid,
|
|
3290
|
-
chatIdentifier,
|
|
3291
|
-
chatId,
|
|
3292
|
-
snippet: chunk
|
|
3293
|
-
});
|
|
3294
|
-
let result;
|
|
3295
|
-
try {
|
|
3296
|
-
result = await sendMessageBlueBubbles(outboundTarget, chunk, {
|
|
3297
|
-
cfg: config,
|
|
3298
|
-
accountId: account.accountId,
|
|
3299
|
-
replyToMessageGuid: replyToMessageGuid || void 0
|
|
3300
|
-
});
|
|
3301
|
-
} catch (err) {
|
|
3302
|
-
forgetPendingOutboundMessageId(pendingId);
|
|
3303
|
-
throw err;
|
|
3304
|
-
}
|
|
3305
|
-
if (maybeEnqueueOutboundMessageId(result.messageId, chunk)) forgetPendingOutboundMessageId(pendingId);
|
|
3306
|
-
sentMessage = true;
|
|
3307
|
-
statusSink?.({ lastOutboundAt: Date.now() });
|
|
3308
|
-
if (info.kind === "block") restartTypingSoon();
|
|
3309
|
-
}
|
|
3310
|
-
},
|
|
3311
|
-
onReplyStart: typingCallbacks?.onReplyStart,
|
|
3312
|
-
onIdle: typingCallbacks?.onIdle,
|
|
3313
|
-
onError: (err, info) => {
|
|
3314
|
-
runtime.error?.(`BlueBubbles ${info.kind} reply failed: ${String(err)}`);
|
|
3315
|
-
}
|
|
3316
|
-
},
|
|
3317
|
-
replyOptions: {
|
|
3318
|
-
onModelSelected,
|
|
3319
|
-
disableBlockStreaming: typeof account.config.blockStreaming === "boolean" ? !account.config.blockStreaming : void 0
|
|
3320
|
-
}
|
|
3321
|
-
});
|
|
3322
|
-
} finally {
|
|
3323
|
-
const shouldStopTyping = Boolean(chatGuidForActions && baseUrl && password) && (streamingActive || !sentMessage);
|
|
3324
|
-
streamingActive = false;
|
|
3325
|
-
clearTypingRestartTimer();
|
|
3326
|
-
if (sentMessage && chatGuidForActions && ackMessageId) core.channel.reactions.removeAckReactionAfterReply({
|
|
3327
|
-
removeAfterReply: removeAckAfterReply,
|
|
3328
|
-
ackReactionPromise,
|
|
3329
|
-
ackReactionValue: ackReactionValue ?? null,
|
|
3330
|
-
remove: () => sendBlueBubblesReaction({
|
|
3331
|
-
chatGuid: chatGuidForActions,
|
|
3332
|
-
messageGuid: ackMessageId,
|
|
3333
|
-
emoji: ackReactionValue ?? "",
|
|
3334
|
-
remove: true,
|
|
3335
|
-
opts: {
|
|
3336
|
-
cfg: config,
|
|
3337
|
-
accountId: account.accountId
|
|
3338
|
-
}
|
|
3339
|
-
}),
|
|
3340
|
-
onError: (err) => {
|
|
3341
|
-
logAckFailure({
|
|
3342
|
-
log: (msg) => logVerbose(core, runtime, msg),
|
|
3343
|
-
channel: "bluebubbles",
|
|
3344
|
-
target: `${chatGuidForActions}/${ackMessageId}`,
|
|
3345
|
-
error: err
|
|
3346
|
-
});
|
|
3347
|
-
}
|
|
3348
|
-
});
|
|
3349
|
-
if (shouldStopTyping && chatGuidForActions) sendBlueBubblesTyping(chatGuidForActions, false, {
|
|
3350
|
-
cfg: config,
|
|
3351
|
-
accountId: account.accountId
|
|
3352
|
-
}).catch((err) => {
|
|
3353
|
-
logTypingFailure({
|
|
3354
|
-
log: (msg) => logVerbose(core, runtime, msg),
|
|
3355
|
-
channel: "bluebubbles",
|
|
3356
|
-
action: "stop",
|
|
3357
|
-
target: chatGuidForActions,
|
|
3358
|
-
error: err
|
|
3359
|
-
});
|
|
3360
|
-
});
|
|
3361
|
-
}
|
|
3362
|
-
}
|
|
3363
|
-
async function processReaction(reaction, target) {
|
|
3364
|
-
const { account, config, runtime, core } = target;
|
|
3365
|
-
const pairing = createChannelPairingController({
|
|
3366
|
-
core,
|
|
3367
|
-
channel: "bluebubbles",
|
|
3368
|
-
accountId: account.accountId
|
|
3369
|
-
});
|
|
3370
|
-
if (reaction.fromMe) return;
|
|
3371
|
-
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
3372
|
-
const groupPolicy = account.config.groupPolicy ?? "allowlist";
|
|
3373
|
-
const storeAllowFrom = await readStoreAllowFromForDmPolicy({
|
|
3374
|
-
provider: "bluebubbles",
|
|
3375
|
-
accountId: account.accountId,
|
|
3376
|
-
dmPolicy,
|
|
3377
|
-
readStore: pairing.readStoreForDmPolicy
|
|
3378
|
-
});
|
|
3379
|
-
if (resolveDmGroupAccessWithLists({
|
|
3380
|
-
isGroup: reaction.isGroup,
|
|
3381
|
-
dmPolicy,
|
|
3382
|
-
groupPolicy,
|
|
3383
|
-
allowFrom: account.config.allowFrom,
|
|
3384
|
-
groupAllowFrom: account.config.groupAllowFrom,
|
|
3385
|
-
storeAllowFrom,
|
|
3386
|
-
isSenderAllowed: (allowFrom) => isAllowedBlueBubblesSender({
|
|
3387
|
-
allowFrom,
|
|
3388
|
-
sender: reaction.senderId,
|
|
3389
|
-
chatId: reaction.chatId ?? void 0,
|
|
3390
|
-
chatGuid: reaction.chatGuid ?? void 0,
|
|
3391
|
-
chatIdentifier: reaction.chatIdentifier ?? void 0
|
|
3392
|
-
})
|
|
3393
|
-
}).decision !== "allow") return;
|
|
3394
|
-
const chatId = reaction.chatId ?? void 0;
|
|
3395
|
-
const chatGuid = reaction.chatGuid ?? void 0;
|
|
3396
|
-
const chatIdentifier = reaction.chatIdentifier ?? void 0;
|
|
3397
|
-
const peerId = reaction.isGroup ? chatGuid ?? chatIdentifier ?? (chatId ? String(chatId) : "group") : reaction.senderId;
|
|
3398
|
-
if (reaction.isGroup && core.channel.groups.resolveRequireMention({
|
|
3399
|
-
cfg: config,
|
|
3400
|
-
channel: "bluebubbles",
|
|
3401
|
-
groupId: peerId,
|
|
3402
|
-
accountId: account.accountId
|
|
3403
|
-
})) {
|
|
3404
|
-
logVerbose(core, runtime, "bluebubbles: skipping group reaction (requireMention=true)");
|
|
3405
|
-
return;
|
|
3406
|
-
}
|
|
3407
|
-
const route = resolveBlueBubblesConversationRoute({
|
|
3408
|
-
cfg: config,
|
|
3409
|
-
accountId: account.accountId,
|
|
3410
|
-
isGroup: reaction.isGroup,
|
|
3411
|
-
peerId,
|
|
3412
|
-
sender: reaction.senderId,
|
|
3413
|
-
chatId,
|
|
3414
|
-
chatGuid,
|
|
3415
|
-
chatIdentifier
|
|
3416
|
-
});
|
|
3417
|
-
const senderLabel = reaction.senderName || reaction.senderId;
|
|
3418
|
-
const chatLabel = reaction.isGroup ? ` in group:${peerId}` : "";
|
|
3419
|
-
const messageDisplayId = getShortIdForUuid(reaction.messageId) || reaction.messageId;
|
|
3420
|
-
const text = reaction.action === "removed" ? `${senderLabel} removed ${reaction.emoji} reaction [[reply_to:${messageDisplayId}]]${chatLabel}` : `${senderLabel} reacted with ${reaction.emoji} [[reply_to:${messageDisplayId}]]${chatLabel}`;
|
|
3421
|
-
core.system.enqueueSystemEvent(text, {
|
|
3422
|
-
sessionKey: route.sessionKey,
|
|
3423
|
-
contextKey: `bluebubbles:reaction:${reaction.action}:${peerId}:${reaction.messageId}:${reaction.senderId}:${reaction.emoji}`
|
|
3424
|
-
});
|
|
3425
|
-
logVerbose(core, runtime, `reaction event enqueued: ${text}`);
|
|
3426
|
-
}
|
|
3427
|
-
//#endregion
|
|
3428
|
-
//#region extensions/bluebubbles/src/monitor.ts
|
|
3429
|
-
const webhookTargets = /* @__PURE__ */ new Map();
|
|
3430
|
-
const webhookRateLimiter = createFixedWindowRateLimiter({
|
|
3431
|
-
windowMs: WEBHOOK_RATE_LIMIT_DEFAULTS.windowMs,
|
|
3432
|
-
maxRequests: WEBHOOK_RATE_LIMIT_DEFAULTS.maxRequests,
|
|
3433
|
-
maxTrackedKeys: WEBHOOK_RATE_LIMIT_DEFAULTS.maxTrackedKeys
|
|
3434
|
-
});
|
|
3435
|
-
const webhookInFlightLimiter = createWebhookInFlightLimiter();
|
|
3436
|
-
const debounceRegistry = createBlueBubblesDebounceRegistry({ processMessage });
|
|
3437
|
-
function registerBlueBubblesWebhookTarget(target) {
|
|
3438
|
-
const registered = registerWebhookTargetWithPluginRoute({
|
|
3439
|
-
targetsByPath: webhookTargets,
|
|
3440
|
-
target,
|
|
3441
|
-
route: {
|
|
3442
|
-
auth: "plugin",
|
|
3443
|
-
match: "exact",
|
|
3444
|
-
pluginId: "bluebubbles",
|
|
3445
|
-
source: "bluebubbles-webhook",
|
|
3446
|
-
accountId: target.account.accountId,
|
|
3447
|
-
log: target.runtime.log,
|
|
3448
|
-
handler: async (req, res) => {
|
|
3449
|
-
if (!await handleBlueBubblesWebhookRequest(req, res) && !res.headersSent) {
|
|
3450
|
-
res.statusCode = 404;
|
|
3451
|
-
res.setHeader("Content-Type", "text/plain; charset=utf-8");
|
|
3452
|
-
res.end("Not Found");
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
}
|
|
3456
|
-
});
|
|
3457
|
-
return () => {
|
|
3458
|
-
registered.unregister();
|
|
3459
|
-
debounceRegistry.removeDebouncer(registered.target);
|
|
3460
|
-
};
|
|
3461
|
-
}
|
|
3462
|
-
function parseBlueBubblesWebhookPayload(rawBody) {
|
|
3463
|
-
const trimmed = rawBody.trim();
|
|
3464
|
-
if (!trimmed) return {
|
|
3465
|
-
ok: false,
|
|
3466
|
-
error: "empty payload"
|
|
3467
|
-
};
|
|
3468
|
-
try {
|
|
3469
|
-
return {
|
|
3470
|
-
ok: true,
|
|
3471
|
-
value: JSON.parse(trimmed)
|
|
3472
|
-
};
|
|
3473
|
-
} catch {
|
|
3474
|
-
const params = new URLSearchParams(rawBody);
|
|
3475
|
-
const payload = params.get("payload") ?? params.get("data") ?? params.get("message");
|
|
3476
|
-
if (!payload) return {
|
|
3477
|
-
ok: false,
|
|
3478
|
-
error: "invalid json"
|
|
3479
|
-
};
|
|
3480
|
-
try {
|
|
3481
|
-
return {
|
|
3482
|
-
ok: true,
|
|
3483
|
-
value: JSON.parse(payload)
|
|
3484
|
-
};
|
|
3485
|
-
} catch (error) {
|
|
3486
|
-
return {
|
|
3487
|
-
ok: false,
|
|
3488
|
-
error: error instanceof Error ? error.message : String(error)
|
|
3489
|
-
};
|
|
3490
|
-
}
|
|
3491
|
-
}
|
|
3492
|
-
}
|
|
3493
|
-
function asRecord(value) {
|
|
3494
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
3495
|
-
}
|
|
3496
|
-
function maskSecret(value) {
|
|
3497
|
-
if (value.length <= 6) return "***";
|
|
3498
|
-
return `${value.slice(0, 2)}***${value.slice(-2)}`;
|
|
3499
|
-
}
|
|
3500
|
-
function normalizeAuthToken(raw) {
|
|
3501
|
-
const value = raw.trim();
|
|
3502
|
-
if (!value) return "";
|
|
3503
|
-
if (value.toLowerCase().startsWith("bearer ")) return value.slice(7).trim();
|
|
3504
|
-
return value;
|
|
3505
|
-
}
|
|
3506
|
-
function safeEqualAuthToken(aRaw, bRaw) {
|
|
3507
|
-
const a = normalizeAuthToken(aRaw);
|
|
3508
|
-
const b = normalizeAuthToken(bRaw);
|
|
3509
|
-
if (!a || !b) return false;
|
|
3510
|
-
return safeEqualSecret(a, b);
|
|
3511
|
-
}
|
|
3512
|
-
function collectTrustedProxies(targets) {
|
|
3513
|
-
const proxies = /* @__PURE__ */ new Set();
|
|
3514
|
-
for (const target of targets) for (const proxy of target.config.gateway?.trustedProxies ?? []) {
|
|
3515
|
-
const normalized = proxy.trim();
|
|
3516
|
-
if (normalized) proxies.add(normalized);
|
|
3517
|
-
}
|
|
3518
|
-
return [...proxies];
|
|
3519
|
-
}
|
|
3520
|
-
function resolveWebhookAllowRealIpFallback(targets) {
|
|
3521
|
-
return targets.some((target) => target.config.gateway?.allowRealIpFallback === true);
|
|
3522
|
-
}
|
|
3523
|
-
function resolveWebhookClientIp(req, trustedProxies, allowRealIpFallback) {
|
|
3524
|
-
if (!req.headers["x-forwarded-for"] && !(allowRealIpFallback && req.headers["x-real-ip"])) return req.socket.remoteAddress ?? "unknown";
|
|
3525
|
-
return resolveRequestClientIp(req, [...trustedProxies], allowRealIpFallback) ?? req.socket.remoteAddress ?? "unknown";
|
|
3526
|
-
}
|
|
3527
|
-
async function handleBlueBubblesWebhookRequest(req, res) {
|
|
3528
|
-
const requestUrl = new URL(req.url ?? "/", "http://localhost");
|
|
3529
|
-
const normalizedPath = normalizeWebhookPath(requestUrl.pathname);
|
|
3530
|
-
const pathTargets = webhookTargets.get(normalizedPath) ?? [];
|
|
3531
|
-
const clientIp = resolveWebhookClientIp(req, collectTrustedProxies(pathTargets), resolveWebhookAllowRealIpFallback(pathTargets));
|
|
3532
|
-
return await withResolvedWebhookRequestPipeline({
|
|
3533
|
-
req,
|
|
3534
|
-
res,
|
|
3535
|
-
targetsByPath: webhookTargets,
|
|
3536
|
-
allowMethods: ["POST"],
|
|
3537
|
-
rateLimiter: webhookRateLimiter,
|
|
3538
|
-
rateLimitKey: `${normalizedPath}:${clientIp}`,
|
|
3539
|
-
inFlightLimiter: webhookInFlightLimiter,
|
|
3540
|
-
inFlightKey: `${normalizedPath}:${clientIp}`,
|
|
3541
|
-
handle: async ({ path, targets }) => {
|
|
3542
|
-
const url = requestUrl;
|
|
3543
|
-
const guidParam = url.searchParams.get("guid") ?? url.searchParams.get("password");
|
|
3544
|
-
const headerToken = req.headers["x-guid"] ?? req.headers["x-password"] ?? req.headers["x-bluebubbles-guid"] ?? req.headers["authorization"];
|
|
3545
|
-
const guid = (Array.isArray(headerToken) ? headerToken[0] : headerToken) ?? guidParam ?? "";
|
|
3546
|
-
const target = resolveWebhookTargetWithAuthOrRejectSync({
|
|
3547
|
-
targets,
|
|
3548
|
-
res,
|
|
3549
|
-
isMatch: (target) => {
|
|
3550
|
-
return safeEqualAuthToken(guid, target.account.config.password?.trim() ?? "");
|
|
3551
|
-
}
|
|
3552
|
-
});
|
|
3553
|
-
if (!target) {
|
|
3554
|
-
console.warn(`[bluebubbles] webhook rejected: status=${res.statusCode} path=${path} guid=${maskSecret(url.searchParams.get("guid") ?? url.searchParams.get("password") ?? "")}`);
|
|
3555
|
-
return true;
|
|
3556
|
-
}
|
|
3557
|
-
const body = await readWebhookBodyOrReject({
|
|
3558
|
-
req,
|
|
3559
|
-
res,
|
|
3560
|
-
profile: "post-auth",
|
|
3561
|
-
invalidBodyMessage: "invalid payload"
|
|
3562
|
-
});
|
|
3563
|
-
if (!body.ok) {
|
|
3564
|
-
console.warn(`[bluebubbles] webhook rejected: status=${res.statusCode}`);
|
|
3565
|
-
return true;
|
|
3566
|
-
}
|
|
3567
|
-
const parsed = parseBlueBubblesWebhookPayload(body.value);
|
|
3568
|
-
if (!parsed.ok) {
|
|
3569
|
-
res.statusCode = 400;
|
|
3570
|
-
res.end(parsed.error);
|
|
3571
|
-
console.warn(`[bluebubbles] webhook rejected: ${parsed.error}`);
|
|
3572
|
-
return true;
|
|
3573
|
-
}
|
|
3574
|
-
const payload = asRecord(parsed.value) ?? {};
|
|
3575
|
-
const firstTarget = targets[0];
|
|
3576
|
-
if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook received path=${path} keys=${Object.keys(payload).join(",") || "none"}`);
|
|
3577
|
-
const eventTypeRaw = payload.type;
|
|
3578
|
-
const eventType = typeof eventTypeRaw === "string" ? eventTypeRaw.trim() : "";
|
|
3579
|
-
if (eventType && !new Set([
|
|
3580
|
-
"new-message",
|
|
3581
|
-
"updated-message",
|
|
3582
|
-
"message-reaction",
|
|
3583
|
-
"reaction"
|
|
3584
|
-
]).has(eventType)) {
|
|
3585
|
-
res.statusCode = 200;
|
|
3586
|
-
res.end("ok");
|
|
3587
|
-
if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook ignored type=${eventType}`);
|
|
3588
|
-
return true;
|
|
3589
|
-
}
|
|
3590
|
-
const reaction = normalizeWebhookReaction(payload);
|
|
3591
|
-
if ((eventType === "updated-message" || eventType === "message-reaction" || eventType === "reaction") && !reaction) {
|
|
3592
|
-
res.statusCode = 200;
|
|
3593
|
-
res.end("ok");
|
|
3594
|
-
if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook ignored ${eventType || "event"} without reaction`);
|
|
3595
|
-
return true;
|
|
3596
|
-
}
|
|
3597
|
-
const message = reaction ? null : normalizeWebhookMessage(payload);
|
|
3598
|
-
if (!message && !reaction) {
|
|
3599
|
-
res.statusCode = 400;
|
|
3600
|
-
res.end("invalid payload");
|
|
3601
|
-
console.warn("[bluebubbles] webhook rejected: unable to parse message payload");
|
|
3602
|
-
return true;
|
|
3603
|
-
}
|
|
3604
|
-
target.statusSink?.({ lastInboundAt: Date.now() });
|
|
3605
|
-
if (reaction) processReaction(reaction, target).catch((err) => {
|
|
3606
|
-
target.runtime.error?.(`[${target.account.accountId}] BlueBubbles reaction failed: ${String(err)}`);
|
|
3607
|
-
});
|
|
3608
|
-
else if (message) debounceRegistry.getOrCreateDebouncer(target).enqueue({
|
|
3609
|
-
message,
|
|
3610
|
-
target
|
|
3611
|
-
}).catch((err) => {
|
|
3612
|
-
target.runtime.error?.(`[${target.account.accountId}] BlueBubbles webhook failed: ${String(err)}`);
|
|
3613
|
-
});
|
|
3614
|
-
res.statusCode = 200;
|
|
3615
|
-
res.end("ok");
|
|
3616
|
-
if (reaction) {
|
|
3617
|
-
if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook accepted reaction sender=${reaction.senderId} msg=${reaction.messageId} action=${reaction.action}`);
|
|
3618
|
-
} else if (message) {
|
|
3619
|
-
if (firstTarget) logVerbose(firstTarget.core, firstTarget.runtime, `webhook accepted sender=${message.senderId} group=${message.isGroup} chatGuid=${message.chatGuid ?? ""} chatId=${message.chatId ?? ""}`);
|
|
3620
|
-
}
|
|
3621
|
-
return true;
|
|
3622
|
-
}
|
|
3623
|
-
});
|
|
3624
|
-
}
|
|
3625
|
-
async function monitorBlueBubblesProvider(options) {
|
|
3626
|
-
const { account, config, runtime, abortSignal, statusSink } = options;
|
|
3627
|
-
const core = getBlueBubblesRuntime();
|
|
3628
|
-
const path = options.webhookPath?.trim() || "/bluebubbles-webhook";
|
|
3629
|
-
const serverInfo = await fetchBlueBubblesServerInfo({
|
|
3630
|
-
baseUrl: account.baseUrl,
|
|
3631
|
-
password: account.config.password,
|
|
3632
|
-
accountId: account.accountId,
|
|
3633
|
-
timeoutMs: 5e3,
|
|
3634
|
-
allowPrivateNetwork: account.config.allowPrivateNetwork === true
|
|
3635
|
-
}).catch(() => null);
|
|
3636
|
-
if (serverInfo?.os_version) runtime.log?.(`[${account.accountId}] BlueBubbles server macOS ${serverInfo.os_version}`);
|
|
3637
|
-
if (typeof serverInfo?.private_api === "boolean") runtime.log?.(`[${account.accountId}] BlueBubbles Private API ${serverInfo.private_api ? "enabled" : "disabled"}`);
|
|
3638
|
-
const unregister = registerBlueBubblesWebhookTarget({
|
|
3639
|
-
account,
|
|
3640
|
-
config,
|
|
3641
|
-
runtime,
|
|
3642
|
-
core,
|
|
3643
|
-
path,
|
|
3644
|
-
statusSink
|
|
3645
|
-
});
|
|
3646
|
-
return await new Promise((resolve) => {
|
|
3647
|
-
const stop = () => {
|
|
3648
|
-
unregister();
|
|
3649
|
-
resolve();
|
|
3650
|
-
};
|
|
3651
|
-
if (abortSignal?.aborted) {
|
|
3652
|
-
stop();
|
|
3653
|
-
return;
|
|
3654
|
-
}
|
|
3655
|
-
abortSignal?.addEventListener("abort", stop, { once: true });
|
|
3656
|
-
runtime.log?.(`[${account.accountId}] BlueBubbles webhook listening on ${normalizeWebhookPath(path)}`);
|
|
3657
|
-
});
|
|
3658
|
-
}
|
|
3659
|
-
//#endregion
|
|
3660
|
-
export { addBlueBubblesParticipant as a, removeBlueBubblesParticipant as c, unsendBlueBubblesMessage as d, sendBlueBubblesAttachment as f, sendBlueBubblesMedia as i, renameBlueBubblesChat as l, sendMessageBlueBubbles as m, sendBlueBubblesReaction as n, editBlueBubblesMessage as o, resolveChatGuidForTarget as p, resolveBlueBubblesMessageId as r, leaveBlueBubblesChat as s, monitorBlueBubblesProvider as t, setGroupIconBlueBubbles as u };
|