stableclaw 2026.5.0 → 2026.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.buildstamp +1 -1
- package/dist/abort-DbOWfk1R.js +192 -0
- package/dist/abort-cutoff.runtime-ZDeu_mNv.js +20 -0
- package/dist/abort-cutoff.runtime.js +1 -1
- package/dist/abort.runtime-DzSEcqwd.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/access-control-ChkJvEGP.js +152 -0
- package/dist/account-inspect-DCKRZRny.js +158 -0
- package/dist/accounts-BGTN7cr-.js +102 -0
- package/dist/accounts-CinolZTU.js +107 -0
- package/dist/accounts-CkhyYlS6.js +137 -0
- package/dist/accounts-D219ghr6.js +57 -0
- package/dist/accounts-DrggbKcd.js +2 -0
- package/dist/acp-runtime-_pYPcJEH.js +8 -0
- package/dist/acp-stateful-target-driver-BEIUsg83.js +60 -0
- package/dist/action-runtime-CJhBKfDC.js +318 -0
- package/dist/action-runtime-NLKQbAQA.js +72 -0
- package/dist/action-runtime-api-YzbQ4Qy6.js +1028 -0
- package/dist/actions-BrAcUNm-.js +531 -0
- package/dist/actions.runtime-BwB4CvxW.js +2 -0
- package/dist/actions.runtime-CiYUOMp1.js +18 -0
- package/dist/actions.runtime-SFl3LXbz.js +5 -0
- package/dist/actions.runtime.js +1 -1
- package/dist/agent-CdYMZ9fr.js +2 -0
- package/dist/agent-command-wY0aEiLZ.js +1457 -0
- package/dist/agent-runner.runtime-BJYxz_AG.js +2241 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-Cm6WYH1X.js +142 -0
- package/dist/agent-tools-login-Bd1V75kh.js +57 -0
- package/dist/agents-IbQmK8Yn.js +888 -0
- package/dist/agents-MrSC-Up6.js +5 -0
- package/dist/api-BQHk-t06.js +5 -0
- package/dist/api-Bmx0BK0F.js +5 -0
- package/dist/api-CJIpnZrc.js +10 -0
- package/dist/api-CRhMGxLB.js +6 -0
- package/dist/api-CdYIiak82.js +322 -0
- package/dist/api-DOdPShPk.js +2 -0
- package/dist/api-jI3BtiNB.js +2 -0
- package/dist/apply-Cbt003x7.js +485 -0
- package/dist/apply.runtime-CY47EbzA.js +2 -0
- package/dist/apply.runtime.js +1 -1
- package/dist/approval-native-B4HJRa55.js +79 -0
- package/dist/approval-runtime-B6PXavdQ.js +262 -0
- package/dist/assistant-identity-CeKI09AJ.js +74 -0
- package/dist/attachment-normalize-BZdNI2So.js +921 -0
- package/dist/audit-BLq9P3oA.js +86 -0
- package/dist/audit-DtlsDuaM.js +892 -0
- package/dist/audit-channel.allow-from.runtime.js +1 -1
- package/dist/audit-channel.collect.runtime-CTutyCbl.js +528 -0
- package/dist/audit-channel.collect.runtime.js +1 -1
- package/dist/audit-channel.discord.runtime.js +1 -1
- package/dist/audit-channel.telegram.runtime-DgjqHj_y.js +8 -0
- package/dist/audit-channel.telegram.runtime.js +1 -1
- package/dist/audit-channel.zalouser.runtime.js +1 -1
- package/dist/audit-extra.async-azTwi9Ii.js +820 -0
- package/dist/audit.deep.runtime-DczMVmZl.js +2 -0
- package/dist/audit.deep.runtime.js +1 -1
- package/dist/audit.nondeep.runtime-C0-gevdg.js +831 -0
- package/dist/audit.nondeep.runtime.js +1 -1
- package/dist/audit.runtime-CjmP-IVf.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-D9R9vTdP.js +181 -0
- package/dist/auth-choice-ASVf3uqH.js +3 -0
- package/dist/auth-choice-CUGc7jRT.js +341 -0
- package/dist/auth-choice-TdFpgqf8.js +69 -0
- package/dist/binding-targets-BB736PNg.js +99 -0
- package/dist/bot-i7rkFnoU.js +4268 -0
- package/dist/bot-message-context-NjuZxwNf.js +2 -0
- package/dist/bot-message-context-SFoFcMU0.js +1175 -0
- package/dist/bot-message-context.runtime-BuHjCi1s.js +7 -0
- package/dist/bot-message-context.runtime.js +1 -1
- package/dist/bot-message-context.session.runtime-BOjKvTjg.js +12 -0
- package/dist/bot-message-context.session.runtime.js +1 -1
- package/dist/bot-native-commands.delivery.runtime-CMVcyVfr.js +3 -0
- package/dist/bot-native-commands.delivery.runtime.js +1 -1
- package/dist/bot-native-commands.runtime-DPXiZ-g-.js +11 -0
- package/dist/bot-native-commands.runtime.js +1 -1
- package/dist/bundled/boot-md/handler.js +3 -3
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/channel-6JSPqz3S.js +599 -0
- package/dist/channel-8fxnaoxA.js +1135 -0
- package/dist/channel-BGr4lB_p.js +208 -0
- package/dist/channel-BRZOhpO-.js +1217 -0
- package/dist/channel-BTaI9Vsm.js +454 -0
- package/dist/channel-BuvbHCUl.js +800 -0
- package/dist/channel-C0kxZQ7E.js +883 -0
- package/dist/channel-CJgXhuIs.js +698 -0
- package/dist/channel-DQWDH71E.js +337 -0
- package/dist/channel-DqywfjHt.js +361 -0
- package/dist/channel-inbound-BbIwjinv.js +30 -0
- package/dist/channel-o7dERoVP.js +1129 -0
- package/dist/channel-ouAyZmKb.js +788 -0
- package/dist/channel-pGQXHihG.js +783 -0
- package/dist/channel-plugin-resolution-E1W_efdm.js +144 -0
- package/dist/channel-qw2GU-78.js +1661 -0
- package/dist/channel-shared-DsqgfMVz.js +58 -0
- package/dist/channel-x8EJXY-p.js +4976 -0
- package/dist/channel.runtime-9U-FzlTX.js +22252 -0
- package/dist/channel.runtime-CDRgtalS.js +309 -0
- package/dist/channel.runtime-CrTb-acp.js +373 -0
- package/dist/channel.runtime-CvUJhEWE.js +14 -0
- package/dist/channel.runtime-D86obE0J.js +108 -0
- package/dist/channel.runtime-DR14R1qn.js +125 -0
- package/dist/channel.runtime-DY-t80Mq.js +335 -0
- package/dist/channel.runtime-Db6-JgiT.js +80 -0
- package/dist/channel.setup-5ccX1E-a.js +279 -0
- package/dist/channels-CU1r9oWn.js +1134 -0
- package/dist/channels-cli-H6kLKRCJ.js +246 -0
- package/dist/clawhub-CicQAK3Q.js +163 -0
- package/dist/cli/daemon-cli.js +3 -9
- package/dist/cli-BeJobAfz.js +695 -0
- package/dist/cli-Bw_QTHCD.js +152 -0
- package/dist/cli-migration-DBUl9wOM.js +100 -0
- package/dist/cli-runner-CNdeXILj.js +1014 -0
- package/dist/client-C7KrfnR_.js +5 -0
- package/dist/client-D1IMuN2R.js +7 -0
- package/dist/client-bootstrap-BRL3IJbX.js +2 -0
- package/dist/client-bootstrap-BnU_fgOa.js +121 -0
- package/dist/code-execution-Dy3oNAvz.js +142 -0
- package/dist/command-auth-BoH1IkmW.js +64 -0
- package/dist/command-registry-CFUnlk3Y.js +199 -0
- package/dist/command-registry-Dy7lErHE.js +3 -0
- package/dist/commands-P7L4abaE.js +4 -0
- package/dist/commands-acp-CRBC84-r.js +990 -0
- package/dist/commands-core-DfVd-xq7.js +241 -0
- package/dist/commands-core.runtime-CCF1BiL7.js +2 -0
- package/dist/commands-core.runtime.js +1 -1
- package/dist/commands-handlers.runtime-BWoNwBZE.js +3708 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-info-CSt3aoRZ.js +651 -0
- package/dist/commands-models-FgUB1hGv.js +395 -0
- package/dist/commands-status.runtime-jcqPwtM3.js +2 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands.runtime-CIbt20JL.js +4 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/compact.runtime-DKdAjeMZ.js +7 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-7xXpXxID.js +2 -0
- package/dist/completion-cli-Csbpl09N.js +466 -0
- package/dist/config-BGW2qyLw.js +475 -0
- package/dist/config-cli--4OexF6J.js +945 -0
- package/dist/config-guard-V5IAh_mF.js +113 -0
- package/dist/config-runtime-D208l2BL.js +13 -0
- package/dist/config-secret-input.runtime-BF9IBBeM.js +3 -0
- package/dist/config-secret-input.runtime.js +1 -1
- package/dist/config-update-BBzrkxal.js +127 -0
- package/dist/config-update-DrtP_s0Y.js +3 -0
- package/dist/configure-B5cJf26V.js +2 -0
- package/dist/configure-Ts01pF4g.js +1140 -0
- package/dist/context-DeDQINVq.js +227 -0
- package/dist/control-ui-C9vPgc9L.js +388 -0
- package/dist/conversation-bindings-CwHBn1fl.js +210 -0
- package/dist/conversation-id-BOk-dTsl.js +168 -0
- package/dist/conversation-runtime-DvoDx5Lp.js +85 -0
- package/dist/core-_nKe7lGV.js +195 -0
- package/dist/create-client-BenzpBNt.js +2 -0
- package/dist/create-client-CGt4-gcv.js +58 -0
- package/dist/credentials-7IVnN_TF.js +22 -0
- package/dist/credentials-write.runtime-D1VXZncp.js +9 -0
- package/dist/credentials-write.runtime.js +1 -1
- package/dist/crypto-runtime-Y20cyTTx.js +3495 -0
- package/dist/daemon-cli-DvP7I-Uu.js +383 -0
- package/dist/daemon-install-CVIbxBN5.js +63 -0
- package/dist/delegate-VctUvdru.js +43 -0
- package/dist/deliver-DTfKSC4Q.js +954 -0
- package/dist/deliver-LbQQnhR5.js +3 -0
- package/dist/deliver-reply-18sWD8M4.js +238 -0
- package/dist/deliver-runtime-Qg81IeZu.js +2 -0
- package/dist/delivery-D8E92dmQ.js +834 -0
- package/dist/delivery-info-Cls9iWRl.js +40 -0
- package/dist/direct-dm-Dg-rhCG0.js +139 -0
- package/dist/direct-management-CaI85_dA.js +2 -0
- package/dist/direct-management-DjdwL-F4.js +300 -0
- package/dist/directive-handling.fast-lane-3sGyxlH_.js +64 -0
- package/dist/directive-handling.fast-lane-CKe_S3fo.js +2 -0
- package/dist/directive-handling.impl-C1D-MGbp.js +2 -0
- package/dist/directive-handling.impl-Dk6oRN3H.js +672 -0
- package/dist/directive-handling.parse-ni5LIlSW.js +375 -0
- package/dist/directive-handling.persist-DSyJG2Kq.js +133 -0
- package/dist/directive-handling.persist.runtime-WEeAbhJ8.js +2 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/directive-handling.shared-DPXk9T6l.js +158 -0
- package/dist/directory-cli-CL6UudXS.js +238 -0
- package/dist/directory.static-BX7RI4Aq.js +45 -0
- package/dist/discovery-DhEDepjw.js +171 -0
- package/dist/dispatch-acp.runtime-DHUc4MMQ.js +884 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/dispatch-au2t5HsH.js +858 -0
- package/dist/doctor-completion-fD570xvd.js +90 -0
- package/dist/doctor-config-preflight-B0C_HTWN.js +2 -0
- package/dist/doctor-config-preflight-OMEufm7U.js +148 -0
- package/dist/doctor-state-migrations-BJ5M0r8a.js +2 -0
- package/dist/doctor-state-migrations-CPG_ii-i.js +3 -0
- package/dist/embedding-provider-vb6JoF5D.js +129 -0
- package/dist/encryption-guidance-BRY-GWVy.js +33 -0
- package/dist/entry.js +2 -2
- package/dist/error-text-CM5bR2qT.js +24 -0
- package/dist/exec-approval-session-target-Ci45mXNL.js +159 -0
- package/dist/exec-approvals-D9wFcLn9.js +121 -0
- package/dist/extensionAPI.js +3 -3
- package/dist/extensions/acpx/index.js +3 -3
- package/dist/extensions/acpx/runtime-api.js +2 -2
- package/dist/extensions/amazon-bedrock/api.js +2 -2
- package/dist/extensions/amazon-bedrock/discovery.js +1 -1
- package/dist/extensions/amazon-bedrock/index.js +2 -2
- package/dist/extensions/anthropic/cli-migration.js +1 -1
- package/dist/extensions/anthropic/index.js +5 -5
- package/dist/extensions/anthropic/media-understanding-provider.js +1 -1
- package/dist/extensions/bluebubbles/api.js +2 -2
- package/dist/extensions/bluebubbles/index.js +2 -2
- package/dist/extensions/bluebubbles/setup-entry.js +1 -1
- package/dist/extensions/browser/test-support.js +1 -1
- package/dist/extensions/byteplus/index.js +2 -2
- package/dist/extensions/chutes/index.js +4 -4
- package/dist/extensions/cloudflare-ai-gateway/index.js +1 -1
- package/dist/extensions/deepseek/index.js +1 -1
- package/dist/extensions/device-pair/api.js +2 -2
- package/dist/extensions/device-pair/index.js +3 -3
- package/dist/extensions/device-pair/notify.js +1 -1
- package/dist/extensions/device-pair/qr-image.js +2 -2
- package/dist/extensions/diffs/index.js +1 -1
- package/dist/extensions/discord/action-runtime-api.js +1 -1
- package/dist/extensions/discord/api.js +4 -4
- package/dist/extensions/discord/index.js +9 -9
- package/dist/extensions/discord/runtime-api.js +10 -10
- package/dist/extensions/discord/setup-entry.js +2 -2
- package/dist/extensions/discord/test-api.js +3 -3
- package/dist/extensions/fal/index.js +2 -2
- package/dist/extensions/feishu/api.js +2 -2
- package/dist/extensions/feishu/index.js +7 -7
- package/dist/extensions/feishu/setup-api.js +1 -1
- package/dist/extensions/feishu/setup-entry.js +2 -2
- package/dist/extensions/github-copilot/api.js +1 -1
- package/dist/extensions/github-copilot/index.js +2 -2
- package/dist/extensions/github-copilot/login.js +1 -1
- package/dist/extensions/google/index.js +2 -2
- package/dist/extensions/google/media-understanding-provider.js +2 -2
- package/dist/extensions/googlechat/api.js +1 -1
- package/dist/extensions/googlechat/index.js +2 -2
- package/dist/extensions/googlechat/setup-entry.js +2 -2
- package/dist/extensions/googlechat/test-api.js +1 -1
- package/dist/extensions/groq/index.js +1 -1
- package/dist/extensions/groq/media-understanding-provider.js +1 -1
- package/dist/extensions/huggingface/index.js +2 -2
- package/dist/extensions/imessage/api.js +2 -2
- package/dist/extensions/imessage/index.js +7 -7
- package/dist/extensions/imessage/runtime-api.js +2 -2
- package/dist/extensions/imessage/setup-entry.js +3 -3
- package/dist/extensions/irc/api.js +1 -1
- package/dist/extensions/irc/index.js +2 -2
- package/dist/extensions/irc/setup-entry.js +2 -2
- package/dist/extensions/kilocode/index.js +1 -1
- package/dist/extensions/kimi-coding/index.js +2 -2
- package/dist/extensions/line/api.js +4 -4
- package/dist/extensions/line/index.js +5 -5
- package/dist/extensions/line/runtime-api.js +2 -2
- package/dist/extensions/line/setup-api.js +2 -2
- package/dist/extensions/line/setup-entry.js +3 -3
- package/dist/extensions/litellm/index.js +1 -1
- package/dist/extensions/lobster/index.js +1 -1
- package/dist/extensions/lobster/runtime-api.js +1 -1
- package/dist/extensions/matrix/api.js +3 -3
- package/dist/extensions/matrix/index.js +3 -3
- package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +3 -3
- package/dist/extensions/matrix/setup-entry.js +2 -2
- package/dist/extensions/matrix/test-api.js +1 -1
- package/dist/extensions/mattermost/api.js +1 -1
- package/dist/extensions/mattermost/index.js +2 -2
- package/dist/extensions/mattermost/runtime-api.js +4 -4
- package/dist/extensions/mattermost/setup-entry.js +2 -2
- package/dist/extensions/media-understanding-core/runtime-api.js +2 -2
- package/dist/extensions/microsoft/index.js +1 -1
- package/dist/extensions/microsoft/speech-provider.js +1 -1
- package/dist/extensions/microsoft/test-api.js +1 -1
- package/dist/extensions/microsoft-foundry/auth.js +1 -1
- package/dist/extensions/microsoft-foundry/cli.js +1 -1
- package/dist/extensions/microsoft-foundry/index.js +1 -1
- package/dist/extensions/microsoft-foundry/onboard.js +2 -2
- package/dist/extensions/microsoft-foundry/provider.js +1 -1
- package/dist/extensions/microsoft-foundry/runtime.js +1 -1
- package/dist/extensions/microsoft-foundry/shared-runtime.js +2 -2
- package/dist/extensions/microsoft-foundry/shared.js +1 -1
- package/dist/extensions/minimax/index.js +4 -4
- package/dist/extensions/minimax/media-understanding-provider.js +1 -1
- package/dist/extensions/minimax/oauth.js +1 -1
- package/dist/extensions/minimax/oauth.runtime.js +1 -1
- package/dist/extensions/mistral/index.js +2 -2
- package/dist/extensions/mistral/media-understanding-provider.js +1 -1
- package/dist/extensions/modelstudio/index.js +1 -1
- package/dist/extensions/moonshot/index.js +2 -2
- package/dist/extensions/moonshot/media-understanding-provider.js +1 -1
- package/dist/extensions/msteams/api.js +1 -1
- package/dist/extensions/msteams/index.js +3 -3
- package/dist/extensions/msteams/runtime-api.js +4 -4
- package/dist/extensions/msteams/setup-entry.js +2 -2
- package/dist/extensions/msteams/test-api.js +1 -1
- package/dist/extensions/nextcloud-talk/api.js +1 -1
- package/dist/extensions/nextcloud-talk/index.js +2 -2
- package/dist/extensions/nextcloud-talk/runtime-api.js +2 -2
- package/dist/extensions/nextcloud-talk/setup-entry.js +2 -2
- package/dist/extensions/nostr/api.js +3 -3
- package/dist/extensions/nostr/index.js +4 -4
- package/dist/extensions/nostr/runtime-api.js +3 -3
- package/dist/extensions/nostr/setup-api.js +1 -1
- package/dist/extensions/nostr/setup-entry.js +2 -2
- package/dist/extensions/nostr/test-api.js +1 -1
- package/dist/extensions/nvidia/index.js +1 -1
- package/dist/extensions/ollama/api.js +2 -2
- package/dist/extensions/ollama/index.js +3 -3
- package/dist/extensions/ollama/runtime-api.js +2 -2
- package/dist/extensions/openai/api.js +1 -1
- package/dist/extensions/openai/index.js +3 -3
- package/dist/extensions/openai/media-understanding-provider.js +1 -1
- package/dist/extensions/openai/openai-codex-provider.js +1 -1
- package/dist/extensions/openai/openai-provider.js +1 -1
- package/dist/extensions/openai/test-api.js +1 -1
- package/dist/extensions/opencode/index.js +2 -2
- package/dist/extensions/opencode-go/index.js +2 -2
- package/dist/extensions/openrouter/index.js +3 -3
- package/dist/extensions/openrouter/media-understanding-provider.js +1 -1
- package/dist/extensions/openshell/index.js +1 -1
- package/dist/extensions/qianfan/index.js +1 -1
- package/dist/extensions/qqbot/index.js +2 -2
- package/dist/extensions/qqbot/setup-entry.js +2 -2
- package/dist/extensions/signal/api.js +4 -4
- package/dist/extensions/signal/index.js +9 -9
- package/dist/extensions/signal/reaction-runtime-api.js +1 -1
- package/dist/extensions/signal/runtime-api.js +4 -4
- package/dist/extensions/signal/setup-entry.js +2 -2
- package/dist/extensions/signal/test-api.js +4 -4
- package/dist/extensions/slack/api.js +6 -6
- package/dist/extensions/slack/index.js +2 -2
- package/dist/extensions/slack/runtime-api.js +6 -6
- package/dist/extensions/slack/setup-entry.js +2 -2
- package/dist/extensions/slack/test-api.js +4 -4
- package/dist/extensions/stepfun/index.js +2 -2
- package/dist/extensions/synology-chat/index.js +2 -2
- package/dist/extensions/synology-chat/setup-api.js +1 -1
- package/dist/extensions/synology-chat/setup-entry.js +2 -2
- package/dist/extensions/synthetic/index.js +1 -1
- package/dist/extensions/talk-voice/index.js +1 -1
- package/dist/extensions/telegram/api.js +8 -8
- package/dist/extensions/telegram/index.js +2 -2
- package/dist/extensions/telegram/runtime-api.js +8 -8
- package/dist/extensions/telegram/setup-entry.js +3 -3
- package/dist/extensions/telegram/test-api.js +7 -7
- package/dist/extensions/telegram/test-support.js +4 -4
- package/dist/extensions/tlon/index.js +2 -2
- package/dist/extensions/tlon/setup-entry.js +2 -2
- package/dist/extensions/tlon/test-api.js +1 -1
- package/dist/extensions/together/index.js +1 -1
- package/dist/extensions/twitch/index.js +1 -1
- package/dist/extensions/venice/index.js +1 -1
- package/dist/extensions/vercel-ai-gateway/index.js +1 -1
- package/dist/extensions/volcengine/index.js +2 -2
- package/dist/extensions/whatsapp/action-runtime-api.js +1 -1
- package/dist/extensions/whatsapp/action-runtime.runtime.js +1 -1
- package/dist/extensions/whatsapp/api.js +2 -2
- package/dist/extensions/whatsapp/index.js +2 -2
- package/dist/extensions/whatsapp/light-runtime-api.js +1 -1
- package/dist/extensions/whatsapp/login-qr-api.js +1 -1
- package/dist/extensions/whatsapp/runtime-api.js +13 -13
- package/dist/extensions/whatsapp/setup-entry.js +3 -3
- package/dist/extensions/whatsapp/test-api.js +6 -6
- package/dist/extensions/xai/code-execution.js +1 -1
- package/dist/extensions/xai/index.js +4 -4
- package/dist/extensions/xai/x-search.js +1 -1
- package/dist/extensions/xiaomi/index.js +1 -1
- package/dist/extensions/zai/index.js +2 -2
- package/dist/extensions/zai/media-understanding-provider.js +1 -1
- package/dist/extensions/zalo/api.js +2 -2
- package/dist/extensions/zalo/index.js +2 -2
- package/dist/extensions/zalo/runtime-api.js +2 -2
- package/dist/extensions/zalo/setup-entry.js +2 -2
- package/dist/extensions/zalo/test-api.js +1 -1
- package/dist/extensions/zalouser/api.js +1 -1
- package/dist/extensions/zalouser/index.js +10 -10
- package/dist/extensions/zalouser/runtime-api.js +3 -3
- package/dist/extensions/zalouser/setup-entry.js +3 -3
- package/dist/extensions/zalouser/test-api.js +4 -4
- package/dist/format-BN8tV56q.js +817 -0
- package/dist/gateway-CK0mVyJH.js +2575 -0
- package/dist/gateway-cli-BIGurgdT.js +1596 -0
- package/dist/gateway-install-token-CnLiX_Zd.js +230 -0
- package/dist/get-reply-from-config.runtime-DHVxBB-O.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/gmail-watcher-lifecycle-BOSlI4iv.js +2 -0
- package/dist/graph-users-CceVBSPZ.js +918 -0
- package/dist/group-access-Cwl8gW8B.js +32 -0
- package/dist/group-access-DHoGAQFt.js +119 -0
- package/dist/handle-action-BmBnXGdV.js +500 -0
- package/dist/health-CkL8pqV8.js +2 -0
- package/dist/health-DhHzqohg.js +577 -0
- package/dist/heartbeat-runner-N3rkIDfo.js +995 -0
- package/dist/hooks-cli-LfG_KZSu.js +353 -0
- package/dist/http-client-lTUwUVkV.js +294 -0
- package/dist/image-BZJoriob.js +152 -0
- package/dist/image-runtime-V0FuCGlj.js +7 -0
- package/dist/inbound-reply-dispatch-C8za1uEq.js +73 -0
- package/dist/inbound.runtime-BYJ118rE.js +3 -0
- package/dist/inbound.runtime.js +1 -1
- package/dist/index.js +2 -2
- package/dist/infra-runtime-C9fJenAY.js +22 -0
- package/dist/install-BKR6ckWd.js +590 -0
- package/dist/install-security-scan-BWWG9NEd.js +22 -0
- package/dist/install-security-scan.runtime-CNFIn93M.js +299 -0
- package/dist/install-security-scan.runtime.js +1 -1
- package/dist/install.runtime-BKwzESsg.js +11 -0
- package/dist/install.runtime-DrieSb_M.js +27 -0
- package/dist/install.runtime.js +1 -1
- package/dist/irc-DRWT3CQf.js +14 -0
- package/dist/legacy-crypto-restore-CZycrxha.js +85 -0
- package/dist/library-CVZUhyOq.js +44 -0
- package/dist/llm-slug-generator-B79ECeWZ.js +68 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/loader-BJO8z2ig.js +2 -0
- package/dist/login-Cs2tMFcs.js +2332 -0
- package/dist/login-GAWpWfxh.js +108 -0
- package/dist/login-qr-CUosF6JZ.js +211 -0
- package/dist/login-qr-api-W1NF3gA_.js +16 -0
- package/dist/manager.runtime-Dmq8R0mb.js +670 -0
- package/dist/manager.runtime.js +1 -1
- package/dist/matrix-DrH1M_Sr.js +351 -0
- package/dist/matrix-runtime-heavy-C6fkT2VX.js +4 -0
- package/dist/mattermost-B9327zl5.js +18 -0
- package/dist/media-CIdwV3Lu.js +1691 -0
- package/dist/media-runtime-QMgMQ3WZ.js +295 -0
- package/dist/media-understanding-C66pUC4U.js +51 -0
- package/dist/media-understanding-provider-BRzfmJfY.js +86 -0
- package/dist/media-understanding-provider-Bd8aZtsH.js +11 -0
- package/dist/media-understanding-provider-By1hanjB.js +16 -0
- package/dist/media-understanding-provider-C6SiAxyT.js +11 -0
- package/dist/media-understanding-provider-DGKwGu0P.js +16 -0
- package/dist/media-understanding-provider-Jlh0zs2Z.js +17 -0
- package/dist/media-understanding-provider-SRUeyQqG.js +28 -0
- package/dist/media-understanding-provider-wimL3kdC.js +11 -0
- package/dist/media-understanding.runtime-BPtAeqrg.js +7 -0
- package/dist/media-understanding.runtime.js +1 -1
- package/dist/message-CzGnK5F3.js +206 -0
- package/dist/message-action-runner-BZ8x9K7O.js +1330 -0
- package/dist/message-handler-gpYZEW_K.js +1771 -0
- package/dist/messages-Xy50Pa2j.js +270 -0
- package/dist/migration-snapshot.runtime-jCZaBq39.js +3 -0
- package/dist/migration-snapshot.runtime.js +1 -1
- package/dist/model-catalog-sx4GaLTc.js +216 -0
- package/dist/model-catalog.runtime-DDSdoGE4.js +2 -0
- package/dist/model-catalog.runtime.js +1 -1
- package/dist/model-picker-CDs8bq1G.js +3 -0
- package/dist/model-picker-bY3x3ppH.js +439 -0
- package/dist/model-runtime-BiWDK2-B.js +1772 -0
- package/dist/model-selection-rJYfkbE0.js +407 -0
- package/dist/models-D5u4cqP1.js +3 -0
- package/dist/models-Xs8Qafsh.js +2550 -0
- package/dist/models-cli-6McdkNo9.js +197 -0
- package/dist/models-config-CAPHcyO2.js +1106 -0
- package/dist/models-config-DABSjBBO.js +2 -0
- package/dist/models-config.runtime-B4-0SSTG.js +2 -0
- package/dist/models-config.runtime.js +1 -1
- package/dist/models-provider-runtime-C0oxGm-e.js +2 -0
- package/dist/monitor-B1P5ei52.js +3622 -0
- package/dist/monitor-B8Q7rxtC.js +666 -0
- package/dist/monitor-B9o5AegX.js +3660 -0
- package/dist/monitor-BSMPXJ97.js +676 -0
- package/dist/monitor-BgD5Jrad.js +4067 -0
- package/dist/monitor-Bzvaap7m.js +1525 -0
- package/dist/monitor-DOHgeQjB.js +687 -0
- package/dist/monitor-auth-3ZkW5CEr.js +192 -0
- package/dist/monitor-polling.runtime-Bs9-PKyv.js +307 -0
- package/dist/monitor-polling.runtime.js +1 -1
- package/dist/monitor-provider-BhVxiO1J.js +1782 -0
- package/dist/monitor-webhook.runtime-DtF-7o03.js +297 -0
- package/dist/monitor-webhook.runtime.js +1 -1
- package/dist/msteams-BIcHfY4o.js +33 -0
- package/dist/nextcloud-talk-Csx58yBv.js +18 -0
- package/dist/nostr-CMrgscuJ.js +19 -0
- package/dist/notify-DSCFVe6i.js +298 -0
- package/dist/oauth-CthjG7hQ.js +152 -0
- package/dist/onboard-C-jsaHwd.js +307 -0
- package/dist/onboard-channels-I98y7NZ8.js +2 -0
- package/dist/onboard-channels-NS1vMCQr.js +705 -0
- package/dist/onboard-custom-BMQ33xqX.js +2 -0
- package/dist/onboard-custom-Dz1DOCJM.js +646 -0
- package/dist/onboard-helpers-BnxgMgMT.js +228 -0
- package/dist/onboard-helpers-DEn4dg5k.js +4 -0
- package/dist/onboard-oYw6GJEA.js +591 -0
- package/dist/onboard-remote-CMmcPmsN.js +2 -0
- package/dist/onboard-remote-uiiE3QnY.js +193 -0
- package/dist/onboard-skills-CttSUeZa.js +2 -0
- package/dist/onboard-skills-DbUk33Ct.js +134 -0
- package/dist/openai-codex-provider-DZN_1A31.js +254 -0
- package/dist/openai-provider-CxBasM1Z.js +272 -0
- package/dist/openclaw-tools.runtime-nwmrOrNY.js +2 -0
- package/dist/openclaw-tools.runtime.js +1 -1
- package/dist/outbound-adapter-DfYvjhM_.js +183 -0
- package/dist/outbound-session-BTLOycg4.js +41 -0
- package/dist/persistent-bindings.lifecycle-CR9WhqMq.js +159 -0
- package/dist/pi-embedded-T_JLa73v.js +40738 -0
- package/dist/pi-embedded.runtime-Bn2DltTS.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/plugin-install-BQ6Yfbir.js +230 -0
- package/dist/plugin-install-config-policy-Dr_wjNho.js +93 -0
- package/dist/plugin-install-lmnNJcpj.js +2 -0
- package/dist/plugin-install-plan-BysT2Zgt.js +50 -0
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-runtime.js +4 -4
- package/dist/plugin-sdk/approval-runtime.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +3 -3
- package/dist/plugin-sdk/command-auth.js +6 -6
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/config-runtime.js +4 -4
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +2 -2
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/infra-runtime.js +2 -2
- package/dist/plugin-sdk/irc.js +2 -2
- package/dist/plugin-sdk/matrix-runtime-heavy.js +3 -3
- package/dist/plugin-sdk/mattermost.js +4 -4
- package/dist/plugin-sdk/media-runtime.js +3 -3
- package/dist/plugin-sdk/media-understanding.js +2 -2
- package/dist/plugin-sdk/models-provider-runtime.js +2 -2
- package/dist/plugin-sdk/msteams.js +3 -3
- package/dist/plugin-sdk/nextcloud-talk.js +2 -2
- package/dist/plugin-sdk/nostr.js +2 -2
- package/dist/plugin-sdk/provider-auth-api-key.js +2 -2
- package/dist/plugin-sdk/provider-auth-login.js +1 -1
- package/dist/plugin-sdk/provider-auth.js +2 -2
- package/dist/plugin-sdk/provider-entry.js +1 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.js +2 -2
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/session-store-runtime.js +2 -2
- package/dist/plugin-sdk/testing.js +3 -3
- package/dist/plugin-sdk/webhook-path.js +2 -29
- package/dist/plugin-sdk/zalo.js +2 -2
- package/dist/plugin-sdk/zalouser.js +2 -2
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins-cli-QKhcgiO8.js +561 -0
- package/dist/plugins-command-helpers-DhvJn5jI.js +116 -0
- package/dist/plugins-install-persist-Qeas2eSh.js +121 -0
- package/dist/plugins-update-command-BKJEivnf.js +974 -0
- package/dist/policy-Oilx4qmu.js +147 -0
- package/dist/preflight-audio-BmL4gGyL.js +48 -0
- package/dist/preflight-audio.runtime-CAepz41v.js +7 -0
- package/dist/preflight-audio.runtime.js +1 -1
- package/dist/prepare-8M63vDxs.js +1301 -0
- package/dist/probe-Btp49F9p.js +170 -0
- package/dist/probe-CAA_bibg.js +349 -0
- package/dist/probe-CcT1Zjlx.js +431 -0
- package/dist/probe-zQeRFb2K.js +1868 -0
- package/dist/profile-update-P49WNZII.js +67 -0
- package/dist/program-Kb8jcb5x.js +158 -0
- package/dist/prompt-select-styled-G8WwN-L7.js +6434 -0
- package/dist/provider-B2yqefja.js +3685 -0
- package/dist/provider-CzbklD1X.js +70 -0
- package/dist/provider-DIIdFC34.js +18901 -0
- package/dist/provider-api-key-auth-BliP73d_.js +109 -0
- package/dist/provider-api-key-auth.runtime.js +1 -1
- package/dist/provider-auth-DxViiapc.js +43 -0
- package/dist/provider-auth-api-key-BlF9OozZ.js +5 -0
- package/dist/provider-auth-login-DAhr6tMx.js +8 -0
- package/dist/provider-auth-login.runtime.js +1 -1
- package/dist/provider-discovery.runtime.js +1 -1
- package/dist/provider-dispatcher-BEZOvNvI.js +22 -0
- package/dist/provider-entry-CSq-QYSf.js +86 -0
- package/dist/provider-session.runtime-D3rfVYR5.js +7 -0
- package/dist/provider-session.runtime.js +1 -1
- package/dist/provider.runtime-Bbi0dGrm.js +2 -0
- package/dist/provider.runtime.js +1 -1
- package/dist/qr-image-IXoz2Bw3.js +2 -0
- package/dist/queue-Ca31F-8a.js +663 -0
- package/dist/reaction-runtime-api-CZLmJ_WX.js +114 -0
- package/dist/reactions-D-WSon-m.js +258 -0
- package/dist/read-only-account-inspect.telegram-MmNQAAZr.js +202 -0
- package/dist/register.agent-B7D4sSrd.js +240 -0
- package/dist/register.configure-BgQOxerG.js +15 -0
- package/dist/register.maintenance-CiTThGcR.js +449 -0
- package/dist/register.message-CReL6dlw.js +644 -0
- package/dist/register.onboard-DHhhEg9U.js +79 -0
- package/dist/register.setup-COczC1It.js +183 -0
- package/dist/register.status-health-sessions-DRX2aQSL.js +1206 -0
- package/dist/register.subclis-DXBjIEu_.js +3 -0
- package/dist/register.subclis-DokJMw3i.js +295 -0
- package/dist/replies-DuTJPPK4.js +118 -0
- package/dist/reply-CU8qGvKT.js +3192 -0
- package/dist/reply-blocks-BpVJG1en.js +103 -0
- package/dist/reply-dispatch-runtime-DxUm7xv8.js +3 -0
- package/dist/reply-runtime-CvaF7P6-.js +123 -0
- package/dist/reply.runtime-BfN6C1_l.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/resolve-allowlist-C_Y8enFH.js +147 -0
- package/dist/resolve-targets-gk4hti4C.js +280 -0
- package/dist/rooms-Can12aFd.js +325 -0
- package/dist/route-reply-BxhqzhSe.js +133 -0
- package/dist/route-reply.runtime-BuSWcdvc.js +2 -0
- package/dist/route-reply.runtime.js +1 -1
- package/dist/route-resolution-DSj60ZbR.js +461 -0
- package/dist/rpc-context-a4f1uaqq.js +155 -0
- package/dist/run-main-CvRWW8mV.js +425 -0
- package/dist/runner-D_uJ9v3f.js +1479 -0
- package/dist/runtime-8Mw5wFou.js +68 -0
- package/dist/runtime-DQ8O9TLG.js +1175 -0
- package/dist/runtime-api-2l7jjGPw.js +3 -0
- package/dist/runtime-api-3_TNQnpI.js +81 -0
- package/dist/runtime-api-B6vjGOFJ.js +2 -0
- package/dist/runtime-api-BVjd5QC5.js +2 -0
- package/dist/runtime-api-BcMW34og.js +14 -0
- package/dist/runtime-api-Bih0haVa.js +2 -0
- package/dist/runtime-api-CZBqKHRi.js +2 -0
- package/dist/runtime-api-CnP_Jrha.js +2 -0
- package/dist/runtime-api-CnS87iaj.js +2 -0
- package/dist/runtime-api-DOLRVoZD.js +29 -0
- package/dist/runtime-api-R7oPeDFN.js +3676 -0
- package/dist/runtime-api-SP4kFvYZ.js +2 -0
- package/dist/runtime-api-y4jBsmod.js +2 -0
- package/dist/runtime-discord-ops.runtime.js +1 -1
- package/dist/runtime-embedded-pi.runtime-eHP2DunP.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-media-understanding.runtime.js +1 -1
- package/dist/runtime-model-auth.runtime.js +1 -1
- package/dist/runtime-slack-ops.runtime.js +1 -1
- package/dist/runtime-tts.runtime.js +1 -1
- package/dist/sandbox-cli-DT2znKIY.js +443 -0
- package/dist/sdk-V8yEikk_.js +1108 -0
- package/dist/security-cli-DYR5zC6Y.js +477 -0
- package/dist/send-B-Z8V4Cq.js +532 -0
- package/dist/send-Bqywq3tg.js +3 -0
- package/dist/send-BxvA6SmF.js +100 -0
- package/dist/send-ChbtrSVp.js +2 -0
- package/dist/send-CzWEW9Zb.js +856 -0
- package/dist/send-DIfvOzDT.js +318 -0
- package/dist/send-DLHztqfo.js +442 -0
- package/dist/send-DYtTIT9n.js +178 -0
- package/dist/send-DiOk2E98.js +1076 -0
- package/dist/send.components-6LOUmhSy.js +2 -0
- package/dist/send.components-D75OT62r.js +942 -0
- package/dist/server-BNNkiKsj.js +9741 -0
- package/dist/server-cron-DuTAwT4O.js +4173 -0
- package/dist/server-cron-dsNWt3Xk.js +2 -0
- package/dist/server-lite-COJ3scXX.js +830 -0
- package/dist/server-maintenance-B1miba9h.js +542 -0
- package/dist/server-maintenance-Bc6xlNTK.js +2 -0
- package/dist/server-node-events-C8B10rlc.js +454 -0
- package/dist/server-node-subscriptions-BbcfGfam.js +2 -0
- package/dist/server-plugins-40fdRywj.js +10354 -0
- package/dist/server-plugins-D2LGejil.js +2 -0
- package/dist/server-startup-memory-BSth6DJB.js +2 -0
- package/dist/server-tailscale-Bwmz6UuQ.js +2 -0
- package/dist/services-CdVUH8cK.js +2 -0
- package/dist/session-DifMNh_t.js +50 -0
- package/dist/session-archive.runtime-EJGWbu-k.js +2 -0
- package/dist/session-archive.runtime.js +1 -1
- package/dist/session-envelope-Cc5bPuvN.js +18 -0
- package/dist/session-file-C6zGg-sn.js +120 -0
- package/dist/session-key-DPKf0dWL.js +52 -0
- package/dist/session-override-Cd7zBl0i.js +100 -0
- package/dist/session-reset-model.runtime-D_iAW4sx.js +119 -0
- package/dist/session-reset-model.runtime.js +1 -1
- package/dist/session-route-USlsJP9v.js +91 -0
- package/dist/session-store-runtime-Bac-IfWa.js +2 -0
- package/dist/session-subagent-reactivation.runtime-BrSBT1dK.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-transcript-files.fs-D2Mq9mp7.js +149 -0
- package/dist/session-updates-RRq3LS7F.js +222 -0
- package/dist/session-updates.runtime-DlCqhR2y.js +2 -0
- package/dist/session-updates.runtime.js +1 -1
- package/dist/session-utils-B6yctVT6.js +1743 -0
- package/dist/sessions-BDZF0KSB.js +224 -0
- package/dist/sessions-Di_GACQe.js +2 -0
- package/dist/sessions-xeX9HpAZ.js +443 -0
- package/dist/setup-Du8OSH3g.js +427 -0
- package/dist/setup-api-ALaLEpZD.js +2 -0
- package/dist/setup-bootstrap-Dzdz67yA.js +54 -0
- package/dist/setup-core-CljP-9Aw.js +256 -0
- package/dist/setup-core-mlfG8i3t.js +146 -0
- package/dist/setup-surface-8NjprfQ4.js +261 -0
- package/dist/setup-surface-BBhpO_bO.js +304 -0
- package/dist/setup-surface-BpJACnBD.js +450 -0
- package/dist/setup-surface-C3-Jx6vF.js +272 -0
- package/dist/setup-surface-CzMh5yAL.js +656 -0
- package/dist/setup-surface-CzzVm3hE.js +353 -0
- package/dist/setup-surface-D6yTgwHY.js +346 -0
- package/dist/setup-surface-DjJE20Ud.js +484 -0
- package/dist/setup-surface-DpqfELkE.js +261 -0
- package/dist/setup-surface-VdCxFOLw.js +237 -0
- package/dist/setup-surface-fuNIOdUY.js +8848 -0
- package/dist/setup-surface-v155bftZ.js +333 -0
- package/dist/setup.finalize-iyzp5VAT.js +458 -0
- package/dist/setup.gateway-config-CU0y8lbT.js +247 -0
- package/dist/shared-Blh_fJTo.js +64 -0
- package/dist/shared-CBnUPRHA.js +180 -0
- package/dist/shared-CM5Gt0l4.js +198 -0
- package/dist/shared-CaqlRGF3.js +160 -0
- package/dist/shared-Cf75swpz.js +144 -0
- package/dist/shared-DL7by7Wd.js +2 -0
- package/dist/shared-DSx0wubR.js +72 -0
- package/dist/shared-DykGaEWS.js +94 -0
- package/dist/shared-azg27y31.js +78 -0
- package/dist/shared-runtime-Bt4waeX3.js +7 -0
- package/dist/skills-install-ByDR1-M6.js +819 -0
- package/dist/slash-commands-DG50c1a2.js +672 -0
- package/dist/slash-commands.runtime-CVcxhZ8u.js +20 -0
- package/dist/slash-commands.runtime.js +1 -1
- package/dist/slash-dispatch.runtime-C_YtFTUx.js +38 -0
- package/dist/slash-dispatch.runtime.js +1 -1
- package/dist/slash-skill-commands.runtime-Bj_cUvfb.js +8 -0
- package/dist/slash-skill-commands.runtime.js +1 -1
- package/dist/speech-provider-CC-UZuqH.js +190 -0
- package/dist/src-CAL53FNb.js +2739 -0
- package/dist/startup-verification-BpSIv6hV.js +131 -0
- package/dist/state-migrations-BZk1lezo.js +845 -0
- package/dist/status-8IelSped.js +650 -0
- package/dist/status-BVcZIA1F.js +3 -0
- package/dist/status-Bf-qPLzv.js +608 -0
- package/dist/status-BviySeE3.js +2 -0
- package/dist/status-all-Cmj7Gw5o.js +798 -0
- package/dist/status-issues--arI8w_g.js +187 -0
- package/dist/status-issues-byw_R8T_.js +336 -0
- package/dist/status-json-CKuOdeh3.js +86 -0
- package/dist/status.command.text-runtime-B3Z2fUDH.js +18 -0
- package/dist/status.scan-boBZeJmL.js +264 -0
- package/dist/status.scan.fast-json-AJppC2D5.js +97 -0
- package/dist/status.scan.fast-json-shj4aBtI.js +2 -0
- package/dist/status.scan.json-core-BpHhaewp.js +254 -0
- package/dist/status.summary-C4itGbbW.js +210 -0
- package/dist/status.summary-zSPMfFai.js +2 -0
- package/dist/sticker-cache-BN_g5-an.js +1573 -0
- package/dist/sticker-vision.runtime-DC2hIjcl.js +16 -0
- package/dist/sticker-vision.runtime.js +1 -1
- package/dist/storage-YrOCuZuJ.js +234 -0
- package/dist/store-DJaTq2_f.js +1343 -0
- package/dist/store.runtime-B05zX98d.js +2 -0
- package/dist/store.runtime.js +1 -1
- package/dist/stream-D5aKuhrW.js +633 -0
- package/dist/subagent-orphan-recovery-vUbckcfb.js +206 -0
- package/dist/subagent-registry-runtime-BE_luJ3B.js +2 -0
- package/dist/supervisor-log.runtime.js +1 -1
- package/dist/targets-BG8dKyny.js +748 -0
- package/dist/task-registry-delivery-runtime-B-oO-IGC.js +2 -0
- package/dist/task-registry.audit-BCghpxrn.js +320 -0
- package/dist/task-registry.maintenance-B55J7Hf8.js +2 -0
- package/dist/telegram/token.js +1 -1
- package/dist/test-api-BBW7IReU.js +47 -0
- package/dist/testing-fkQ9XFkv.js +677 -0
- package/dist/thread-bindings-B0ugWuKq.js +534 -0
- package/dist/thread-bindings-Dx2arldI.js +778 -0
- package/dist/thread-bindings-iFF5pMFx.js +219 -0
- package/dist/thread-bindings-lTuhY3On.js +352 -0
- package/dist/thread-bindings.discord-api-iGyDtjBI.js +487 -0
- package/dist/threading-7EMTgTsu.js +832 -0
- package/dist/threading-BkydE-cL.js +2 -0
- package/dist/threading-tool-context-C3JbrV_5.js +157 -0
- package/dist/token-wT6DwKaB.js +82 -0
- package/dist/tool-actions.runtime-B5mERIej.js +532 -0
- package/dist/tool-actions.runtime.js +1 -1
- package/dist/tools-effective-inventory-DWXkEygO.js +148 -0
- package/dist/tts.runtime.js +1 -1
- package/dist/ui-CC9JMpg4.js +212 -0
- package/dist/update-BjW3w9eI.js +1253 -0
- package/dist/update-cli-B27tZquO.js +1447 -0
- package/dist/update-runner-BMiyTW62.js +1195 -0
- package/dist/verification-C_ZgAv5v.js +130 -0
- package/dist/verification-DCQ1M0pg.js +2 -0
- package/dist/x-search-Btj7UfUg.js +166 -0
- package/dist/zalo-CnU0tzBl.js +13 -0
- package/dist/zalo-js-InpiWFuE.js +1156 -0
- package/dist/zalouser-CuRMbL4r.js +22 -0
- package/package.json +4 -1
- package/dist/abort-CuFxEr2t.js +0 -192
- package/dist/abort-cutoff.runtime-CU97Q3Ef.js +0 -20
- package/dist/abort.runtime-CZflOJv6.js +0 -2
- package/dist/access-control-CLswIHY1.js +0 -152
- package/dist/account-inspect-DiDpXY0-.js +0 -158
- package/dist/accounts-BwSkt2tm.js +0 -57
- package/dist/accounts-C8c90Uek.js +0 -2
- package/dist/accounts-CiFhbmdr.js +0 -107
- package/dist/accounts-D9Qnnbfl.js +0 -102
- package/dist/accounts-DKwfzzAC.js +0 -137
- package/dist/acp-runtime-CwGef6ZP.js +0 -8
- package/dist/acp-stateful-target-driver-p0EDW10u.js +0 -60
- package/dist/action-runtime-BWY3HXxf.js +0 -318
- package/dist/action-runtime-DNi9yizU.js +0 -72
- package/dist/action-runtime-api-BSPlMrO-.js +0 -1028
- package/dist/actions-MNvlds_S.js +0 -531
- package/dist/actions.runtime--mEwSSNe.js +0 -18
- package/dist/actions.runtime-B1HzEE8Z.js +0 -5
- package/dist/actions.runtime-BG6xvov3.js +0 -2
- package/dist/agent-CGwFOztX.js +0 -2
- package/dist/agent-command-IPMBbUVI.js +0 -1457
- package/dist/agent-runner.runtime-Bzf0jJA9.js +0 -2241
- package/dist/agent-runtime-oVxaAl9G.js +0 -142
- package/dist/agent-tools-login-BIEsXGSl.js +0 -57
- package/dist/agents-CYexVjSC.js +0 -888
- package/dist/agents-DpXXlVMm.js +0 -5
- package/dist/api-B5hYfONF2.js +0 -322
- package/dist/api-CWf7SD_r.js +0 -2
- package/dist/api-CoVu8JQC.js +0 -6
- package/dist/api-D1zC-04H.js +0 -2
- package/dist/api-DAJXC6Eh.js +0 -5
- package/dist/api-DIBiOiU5.js +0 -5
- package/dist/api-DNiO8MKu.js +0 -10
- package/dist/apply-T4gGjbIw.js +0 -485
- package/dist/apply.runtime-BIKyTMdb.js +0 -2
- package/dist/approval-native-PdTPYbWz.js +0 -79
- package/dist/approval-runtime-DQds_bzO.js +0 -262
- package/dist/attachment-normalize-KVBm83XJ.js +0 -921
- package/dist/audit-ClUk-eTw.js +0 -892
- package/dist/audit-NQngcqbL.js +0 -86
- package/dist/audit-channel.collect.runtime-BJlZ1Tqv.js +0 -528
- package/dist/audit-channel.telegram.runtime-CoLwvFcv.js +0 -8
- package/dist/audit-extra.async-B3ODYISl.js +0 -820
- package/dist/audit.deep.runtime-BaiMFfPv.js +0 -2
- package/dist/audit.nondeep.runtime-Cvt1jVHR.js +0 -831
- package/dist/audit.runtime-BOuTTKD4.js +0 -7
- package/dist/auth-BuSqMfLL.js +0 -181
- package/dist/auth-choice-B69NsSNK.js +0 -69
- package/dist/auth-choice-C7dAbZYQ.js +0 -3
- package/dist/auth-choice-ChlvsxHZ.js +0 -341
- package/dist/binding-targets-i1Phu9Ml.js +0 -99
- package/dist/bot-DA6nZ125.js +0 -4268
- package/dist/bot-message-context-4RzAPTiL.js +0 -2
- package/dist/bot-message-context-Bd0CyeDw.js +0 -1175
- package/dist/bot-message-context.runtime-CwPXKJUK.js +0 -7
- package/dist/bot-message-context.session.runtime-C9Qk9RJ2.js +0 -12
- package/dist/bot-native-commands.delivery.runtime-DP3bmRQI.js +0 -3
- package/dist/bot-native-commands.runtime-CIprmHSX.js +0 -11
- package/dist/build-info.json +0 -5
- package/dist/bundled/boot-md/HOOK.md +0 -20
- package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
- package/dist/bundled/command-logger/HOOK.md +0 -122
- package/dist/bundled/session-memory/HOOK.md +0 -108
- package/dist/bundled/workflow-summary/HOOK.md +0 -123
- package/dist/canvas-host/a2ui/.bundle.hash +0 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +0 -14896
- package/dist/canvas-host/a2ui/index.html +0 -307
- package/dist/channel-5dQinNdH.js +0 -783
- package/dist/channel-7CzQF9TT.js +0 -1135
- package/dist/channel-B4fvHRK-.js +0 -698
- package/dist/channel-B_TyijiN.js +0 -454
- package/dist/channel-Bcj7dCz-.js +0 -208
- package/dist/channel-CAPp1zv2.js +0 -599
- package/dist/channel-CSFDlAzr.js +0 -337
- package/dist/channel-CYMfBONo.js +0 -4976
- package/dist/channel-CkvHjmWG.js +0 -883
- package/dist/channel-CoWCft7t.js +0 -1217
- package/dist/channel-DNTrg5rc.js +0 -1661
- package/dist/channel-Dw5L6ZCL.js +0 -1129
- package/dist/channel-DzPVCd5F.js +0 -361
- package/dist/channel-GiLFmQxZ.js +0 -800
- package/dist/channel-XFvR7Dxh.js +0 -788
- package/dist/channel-inbound-bfoCnYI3.js +0 -30
- package/dist/channel-plugin-resolution-BMT07Y4B.js +0 -144
- package/dist/channel-shared-BNnyz1wC.js +0 -58
- package/dist/channel.runtime-B_dMxh1q.js +0 -125
- package/dist/channel.runtime-B_fR3JCp.js +0 -335
- package/dist/channel.runtime-BhQ_73jj.js +0 -14
- package/dist/channel.runtime-CDgrnVP6.js +0 -108
- package/dist/channel.runtime-DPFtjm6K.js +0 -309
- package/dist/channel.runtime-DigoZ45U.js +0 -80
- package/dist/channel.runtime-IHt2hi0h.js +0 -22252
- package/dist/channel.runtime-M3E3w35V.js +0 -373
- package/dist/channel.setup-CQIfV874.js +0 -279
- package/dist/channels-PlRayWHp.js +0 -1134
- package/dist/channels-cli-B4MObWHe.js +0 -246
- package/dist/clawhub-UfARocx9.js +0 -163
- package/dist/cli-B7qV90_y.js +0 -152
- package/dist/cli-DoYOPf2E.js +0 -695
- package/dist/cli-migration-7qu0VuUR.js +0 -100
- package/dist/cli-runner-C1qdQ4P5.js +0 -1014
- package/dist/cli-startup-metadata.json +0 -14
- package/dist/client-bootstrap-Bf-VJF8o.js +0 -2
- package/dist/client-bootstrap-BtDC_ghW.js +0 -121
- package/dist/client-c8NPFdV6.js +0 -7
- package/dist/client-xBBbf9T_.js +0 -5
- package/dist/code-execution-IwkUcM9K.js +0 -142
- package/dist/command-auth-CDvEQqI-.js +0 -64
- package/dist/command-registry-1pRI9W0V.js +0 -3
- package/dist/command-registry-Dr8xswzu.js +0 -199
- package/dist/commands-B7zoPsaq.js +0 -4
- package/dist/commands-acp-_0Jt7bpI.js +0 -990
- package/dist/commands-core-B2PxYebU.js +0 -241
- package/dist/commands-core.runtime-Bk-kMe8I.js +0 -2
- package/dist/commands-handlers.runtime-Dp-fdvyC.js +0 -3708
- package/dist/commands-info-CM-kPvq5.js +0 -651
- package/dist/commands-models-B_KkCnYQ.js +0 -395
- package/dist/commands-status.runtime-B7xG5l06.js +0 -2
- package/dist/commands.runtime-DTcg2ygT.js +0 -4
- package/dist/compact.runtime-C-TOc6On.js +0 -7
- package/dist/completion-cli-DYyVmY2G.js +0 -466
- package/dist/completion-cli-IsVueMzq.js +0 -2
- package/dist/config-DgES7wDO.js +0 -475
- package/dist/config-cli-B-FLvmji.js +0 -945
- package/dist/config-guard-DolG9Hb3.js +0 -113
- package/dist/config-runtime-DOU6nuit.js +0 -13
- package/dist/config-secret-input.runtime-D8uisXyK.js +0 -3
- package/dist/config-update-6NzLhzi0.js +0 -3
- package/dist/config-update-DvNp6OTj.js +0 -127
- package/dist/configure-BMLNn-t4.js +0 -1140
- package/dist/configure-Ce061vUB.js +0 -2
- package/dist/context-B_IskqEg.js +0 -227
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/agents-CouEImnJ.js +0 -813
- package/dist/control-ui/assets/anthropic-D2gWjM8y.js +0 -37
- package/dist/control-ui/assets/azure-openai-responses-rSA0t6IS.js +0 -2
- package/dist/control-ui/assets/channel-config-extras-DNCeHtEf.js +0 -2
- package/dist/control-ui/assets/channels-BgJBIl8z.js +0 -349
- package/dist/control-ui/assets/cron-CESIxOYW.js +0 -928
- package/dist/control-ui/assets/de-DU-XmSEb.js +0 -2
- package/dist/control-ui/assets/debug-BAZT8Cur.js +0 -94
- package/dist/control-ui/assets/directive-C6NBp6xJ.js +0 -2
- package/dist/control-ui/assets/dist-D8DZLmCF.js +0 -18
- package/dist/control-ui/assets/es-Be891ZDf.js +0 -2
- package/dist/control-ui/assets/event-stream-B8X6sYaV.js +0 -2
- package/dist/control-ui/assets/format-nUIQxx1z.js +0 -2
- package/dist/control-ui/assets/github-copilot-headers-CrI0CIJ7.js +0 -2
- package/dist/control-ui/assets/google-B2pGWEiN.js +0 -2
- package/dist/control-ui/assets/google-gemini-cli-BpxbH95Q.js +0 -3
- package/dist/control-ui/assets/google-shared-CbPHVnPr.js +0 -12
- package/dist/control-ui/assets/google-vertex-lQwbjEII.js +0 -2
- package/dist/control-ui/assets/hash-Bt1aVMQ3.js +0 -2
- package/dist/control-ui/assets/index-C0UxQzEn.js +0 -4813
- package/dist/control-ui/assets/index-DOMg2RvO.css +0 -1
- package/dist/control-ui/assets/instances-ClbVvaQy.js +0 -57
- package/dist/control-ui/assets/lit-zdTgzAJI.js +0 -3
- package/dist/control-ui/assets/logs-vVeVJ0CI.js +0 -74
- package/dist/control-ui/assets/mistral-imHzDZ_7.js +0 -8
- package/dist/control-ui/assets/nodes-CeaJKODa.js +0 -430
- package/dist/control-ui/assets/openai-Cn7eGqwa.js +0 -17
- package/dist/control-ui/assets/openai-codex-responses-DRaOkrRO.js +0 -8
- package/dist/control-ui/assets/openai-completions-0yOZERna.js +0 -6
- package/dist/control-ui/assets/openai-responses-8vqADgIw.js +0 -2
- package/dist/control-ui/assets/openai-responses-shared-Q7jopnLp.js +0 -11
- package/dist/control-ui/assets/preload-helper-xBbMyY7u.js +0 -1
- package/dist/control-ui/assets/pt-BR-RqwUvKTB.js +0 -2
- package/dist/control-ui/assets/sessions-CiBN6LBg.js +0 -236
- package/dist/control-ui/assets/skills-shared-DJsJP4-4.js +0 -11
- package/dist/control-ui/assets/skills-yhlO3Ote.js +0 -216
- package/dist/control-ui/assets/transform-messages-XKqwKV3D.js +0 -2
- package/dist/control-ui/assets/zh-CN-CUzhgfRs.js +0 -2
- package/dist/control-ui/assets/zh-TW-CCgwa2eS.js +0 -2
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +0 -66
- package/dist/control-ui/index.html +0 -75
- package/dist/conversation-bindings-BWn8Eq0t.js +0 -210
- package/dist/conversation-id-CIpyn-VD.js +0 -168
- package/dist/conversation-runtime-BpJdJqei.js +0 -85
- package/dist/core-BsdZRsb0.js +0 -195
- package/dist/create-client-HZBJ7-Fl.js +0 -2
- package/dist/create-client-WqOz1ro_.js +0 -58
- package/dist/credentials-5vTiF-oK.js +0 -22
- package/dist/credentials-write.runtime-3bouyp8U.js +0 -9
- package/dist/crypto-runtime-DirRLBDM.js +0 -3495
- package/dist/daemon-cli-AJpZY4sn.js +0 -383
- package/dist/daemon-install-FZTHcBaU.js +0 -63
- package/dist/delegate-BaC3I_I2.js +0 -43
- package/dist/deliver-BaDjGKa4.js +0 -3
- package/dist/deliver-CWBM3uFK.js +0 -954
- package/dist/deliver-reply-B1lULS4T.js +0 -238
- package/dist/deliver-runtime-C9wPhPVo.js +0 -2
- package/dist/delivery-info-UablM7m8.js +0 -40
- package/dist/delivery-jNAx1UXj.js +0 -834
- package/dist/direct-dm-BOWirToy.js +0 -139
- package/dist/direct-management-D7iGx6GI.js +0 -300
- package/dist/direct-management-DmQUf3My.js +0 -2
- package/dist/directive-handling.fast-lane-BgUe6rBZ.js +0 -64
- package/dist/directive-handling.fast-lane-C__EV2OZ.js +0 -2
- package/dist/directive-handling.impl-D466FFH9.js +0 -672
- package/dist/directive-handling.impl-tl3nNkjQ.js +0 -2
- package/dist/directive-handling.parse-H-NqZbGQ.js +0 -375
- package/dist/directive-handling.persist-D-TH7X00.js +0 -133
- package/dist/directive-handling.persist.runtime-CKzh0FFl.js +0 -2
- package/dist/directive-handling.shared-CMdDhj2s.js +0 -158
- package/dist/directory-cli-BkFOqvau.js +0 -238
- package/dist/directory.static-CWHw_6bd.js +0 -45
- package/dist/discovery-CmDmBzyt.js +0 -171
- package/dist/dispatch-5P8XNY-z.js +0 -858
- package/dist/dispatch-acp.runtime-BXLlUo6a.js +0 -884
- package/dist/doctor-completion-C-PtqnX4.js +0 -90
- package/dist/doctor-config-preflight--G_zFI_P.js +0 -148
- package/dist/doctor-config-preflight-Cgmj0J2d.js +0 -2
- package/dist/doctor-state-migrations-B4vgkpe8.js +0 -3
- package/dist/doctor-state-migrations-R3EnGfXE.js +0 -2
- package/dist/embedding-provider-DllEP1OZ.js +0 -129
- package/dist/encryption-guidance-DDwXFxqS.js +0 -33
- package/dist/error-text-C4BdRT0b.js +0 -24
- package/dist/exec-approval-session-target-BpHDdAt6.js +0 -159
- package/dist/exec-approvals-Lpud2QXU.js +0 -121
- package/dist/export-html/template.css +0 -1060
- package/dist/export-html/template.html +0 -88
- package/dist/export-html/template.js +0 -1875
- package/dist/export-html/vendor/highlight.min.js +0 -1213
- package/dist/export-html/vendor/marked.min.js +0 -6
- package/dist/format-CerBTToC.js +0 -817
- package/dist/gateway-BuNsK2ll.js +0 -2575
- package/dist/gateway-cli-WL9O_amN.js +0 -1596
- package/dist/gateway-install-token-DBjV7vuQ.js +0 -230
- package/dist/get-reply-from-config.runtime-Ci2UvY3-.js +0 -2
- package/dist/gmail-watcher-lifecycle-BE_4dMST.js +0 -2
- package/dist/graph-users-CGePGfzI.js +0 -918
- package/dist/group-access-D9zxJ9Eg.js +0 -119
- package/dist/group-access-qaCYNF5W.js +0 -32
- package/dist/handle-action-CqjxOWwH.js +0 -500
- package/dist/health-Ckh-98zt.js +0 -577
- package/dist/health-Dte2hwwy.js +0 -2
- package/dist/heartbeat-runner-BSkqJHkl.js +0 -995
- package/dist/hooks-cli-5qH5guhQ.js +0 -353
- package/dist/http-client-E-AK0hBj.js +0 -294
- package/dist/image-Dflgshq4.js +0 -152
- package/dist/image-runtime-C8N4pHiL.js +0 -7
- package/dist/inbound-reply-dispatch-DnSGPONh.js +0 -73
- package/dist/inbound.runtime-CSV1NzQc.js +0 -3
- package/dist/infra-runtime-B0CHuzrJ.js +0 -22
- package/dist/install-security-scan-pEC-BNIh.js +0 -22
- package/dist/install-security-scan.runtime-KtCBz8Ms.js +0 -299
- package/dist/install-slQpgebI.js +0 -590
- package/dist/install.runtime-BDKuVJIa.js +0 -27
- package/dist/install.runtime-Cdb5F3uW.js +0 -11
- package/dist/irc-CWidrqqa.js +0 -14
- package/dist/legacy-crypto-restore-DrVtd4-4.js +0 -85
- package/dist/library-CmpBsnzV.js +0 -44
- package/dist/llm-slug-generator-5ztca3GP.js +0 -68
- package/dist/loader-BOVnpEv5.js +0 -2
- package/dist/login-I8HWXek2.js +0 -108
- package/dist/login-Xx8YN-Ut.js +0 -2332
- package/dist/login-qr-AEmAM7Qe.js +0 -211
- package/dist/login-qr-api-BSW8Ta-A.js +0 -16
- package/dist/manager.runtime-DpPqh8fu.js +0 -670
- package/dist/matrix-CVj94cvn.js +0 -351
- package/dist/matrix-runtime-heavy-n2o8hviY.js +0 -4
- package/dist/mattermost-D0PPzHDR.js +0 -18
- package/dist/media-CS8BGM6_.js +0 -1691
- package/dist/media-runtime-CzcnSxHP.js +0 -295
- package/dist/media-understanding-6pmWMadX.js +0 -51
- package/dist/media-understanding-provider--2czf2Xl.js +0 -16
- package/dist/media-understanding-provider-1v3aAmph.js +0 -17
- package/dist/media-understanding-provider-Bo02B0WG.js +0 -16
- package/dist/media-understanding-provider-C1e568I5.js +0 -86
- package/dist/media-understanding-provider-DftOn7qM.js +0 -28
- package/dist/media-understanding-provider-JfEcvB6a.js +0 -11
- package/dist/media-understanding-provider-Zvb9Fi0L.js +0 -11
- package/dist/media-understanding-provider-fpeKUYrh.js +0 -11
- package/dist/media-understanding.runtime-CBg9Myvx.js +0 -7
- package/dist/message-DTcLbUjJ.js +0 -206
- package/dist/message-action-runner-Nkrb1psP.js +0 -1330
- package/dist/message-handler-ozmV6rws.js +0 -1771
- package/dist/messages-W3Tl9C55.js +0 -270
- package/dist/migration-snapshot.runtime-CBx6_nXj.js +0 -3
- package/dist/model-catalog-BdRYqKL1.js +0 -216
- package/dist/model-catalog.runtime--yFOIYWV.js +0 -2
- package/dist/model-picker-Cgjw3ytp.js +0 -3
- package/dist/model-picker-jZueDrUL.js +0 -439
- package/dist/model-runtime-51DWArDE.js +0 -1772
- package/dist/model-selection-BohZPMIS.js +0 -407
- package/dist/models-By72Z6_k.js +0 -2550
- package/dist/models-Dgkh71VB.js +0 -3
- package/dist/models-cli-6ZWkpdCu.js +0 -197
- package/dist/models-config-C4DcwiKp.js +0 -2
- package/dist/models-config-CMbP7C_L.js +0 -1106
- package/dist/models-config.runtime-Chha_CyE.js +0 -2
- package/dist/models-provider-runtime-Bu0Agcak.js +0 -2
- package/dist/monitor-B7gDwViK.js +0 -3622
- package/dist/monitor-BE6u7xIu.js +0 -1525
- package/dist/monitor-BRMbIrFT.js +0 -3660
- package/dist/monitor-COLTfgXl.js +0 -676
- package/dist/monitor-CvHGVZmI.js +0 -4067
- package/dist/monitor-DB9RduAn.js +0 -687
- package/dist/monitor-DL7WkrAh.js +0 -666
- package/dist/monitor-auth-EM0izKiw.js +0 -192
- package/dist/monitor-polling.runtime-DFWDyq0r.js +0 -307
- package/dist/monitor-provider-BCduxzuC.js +0 -1782
- package/dist/monitor-webhook.runtime-66MaZoy1.js +0 -297
- package/dist/msteams-DfVsNAAv.js +0 -33
- package/dist/nextcloud-talk-DzdSPp33.js +0 -18
- package/dist/nostr-CA9Nyz3w.js +0 -19
- package/dist/notify-C6g-CT-E.js +0 -298
- package/dist/oauth-0jEycYdH.js +0 -152
- package/dist/onboard-BBY0wtI-.js +0 -591
- package/dist/onboard-BJZUne8W.js +0 -307
- package/dist/onboard-channels-2M_l-yYq.js +0 -705
- package/dist/onboard-channels-B8fOn_J8.js +0 -2
- package/dist/onboard-custom-BQxH-LlD.js +0 -646
- package/dist/onboard-custom-BXJFm5tv.js +0 -2
- package/dist/onboard-helpers-DAmUY5cA.js +0 -228
- package/dist/onboard-helpers-DalDwXjg.js +0 -4
- package/dist/onboard-remote-CAS2F09D.js +0 -2
- package/dist/onboard-remote-nfFOhKzl.js +0 -193
- package/dist/onboard-skills-CH4ZsJr7.js +0 -2
- package/dist/onboard-skills-DSYZC5D0.js +0 -134
- package/dist/openai-codex-provider-B_8TNnmh.js +0 -254
- package/dist/openai-provider-CwnYhA5Q.js +0 -272
- package/dist/openclaw-tools.runtime-1mX4RgUb.js +0 -2
- package/dist/outbound-adapter-DDaf1Qmt.js +0 -183
- package/dist/outbound-session-XCEG44pM.js +0 -41
- package/dist/persistent-bindings.lifecycle-CC1LNlZw.js +0 -159
- package/dist/pi-embedded-B2zIKehU.js +0 -40738
- package/dist/pi-embedded.runtime-tIoF88cE.js +0 -4
- package/dist/plugin-install-CqzqZMog.js +0 -230
- package/dist/plugin-install-P8ACZKV4.js +0 -2
- package/dist/plugin-install-config-policy-CWxlz2Uf.js +0 -93
- package/dist/plugin-install-plan-D2X3sbgg.js +0 -50
- package/dist/plugin-sdk/account-core.d.ts +0 -1
- package/dist/plugin-sdk/account-helpers.d.ts +0 -1
- package/dist/plugin-sdk/account-id.d.ts +0 -1
- package/dist/plugin-sdk/account-resolution.d.ts +0 -1
- package/dist/plugin-sdk/acp-runtime.d.ts +0 -1
- package/dist/plugin-sdk/agent-config-primitives.d.ts +0 -1
- package/dist/plugin-sdk/agent-runtime.d.ts +0 -1
- package/dist/plugin-sdk/allow-from.d.ts +0 -1
- package/dist/plugin-sdk/allowlist-config-edit.d.ts +0 -1
- package/dist/plugin-sdk/amazon-bedrock.d.ts +0 -1
- package/dist/plugin-sdk/anthropic-vertex.d.ts +0 -1
- package/dist/plugin-sdk/approval-runtime.d.ts +0 -1
- package/dist/plugin-sdk/bluebubbles-policy.d.ts +0 -1
- package/dist/plugin-sdk/bluebubbles.d.ts +0 -1
- package/dist/plugin-sdk/boolean-param.d.ts +0 -1
- package/dist/plugin-sdk/browser-runtime.d.ts +0 -1
- package/dist/plugin-sdk/browser-support.d.ts +0 -1
- package/dist/plugin-sdk/browser.d.ts +0 -1
- package/dist/plugin-sdk/byteplus.d.ts +0 -1
- package/dist/plugin-sdk/channel-actions.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-helpers.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-primitives.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-schema.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-writes.d.ts +0 -1
- package/dist/plugin-sdk/channel-contract.d.ts +0 -1
- package/dist/plugin-sdk/channel-feedback.d.ts +0 -1
- package/dist/plugin-sdk/channel-inbound.d.ts +0 -1
- package/dist/plugin-sdk/channel-lifecycle.d.ts +0 -1
- package/dist/plugin-sdk/channel-pairing.d.ts +0 -1
- package/dist/plugin-sdk/channel-policy.d.ts +0 -1
- package/dist/plugin-sdk/channel-reply-pipeline.d.ts +0 -1
- package/dist/plugin-sdk/channel-runtime.d.ts +0 -1
- package/dist/plugin-sdk/channel-send-result.d.ts +0 -1
- package/dist/plugin-sdk/channel-setup.d.ts +0 -1
- package/dist/plugin-sdk/channel-status.d.ts +0 -1
- package/dist/plugin-sdk/channel-targets.d.ts +0 -1
- package/dist/plugin-sdk/chutes.d.ts +0 -1
- package/dist/plugin-sdk/cli-backend.d.ts +0 -1
- package/dist/plugin-sdk/cli-runtime.d.ts +0 -1
- package/dist/plugin-sdk/cloudflare-ai-gateway.d.ts +0 -1
- package/dist/plugin-sdk/collection-runtime.d.ts +0 -1
- package/dist/plugin-sdk/command-auth-native.d.ts +0 -1
- package/dist/plugin-sdk/command-auth.d.ts +0 -1
- package/dist/plugin-sdk/command-detection.d.ts +0 -1
- package/dist/plugin-sdk/command-surface.d.ts +0 -1
- package/dist/plugin-sdk/compat.d.ts +0 -1
- package/dist/plugin-sdk/config-runtime.d.ts +0 -1
- package/dist/plugin-sdk/conversation-runtime.d.ts +0 -1
- package/dist/plugin-sdk/core.d.ts +0 -1
- package/dist/plugin-sdk/dangerous-name-runtime.d.ts +0 -1
- package/dist/plugin-sdk/deepseek.d.ts +0 -1
- package/dist/plugin-sdk/device-bootstrap.d.ts +0 -1
- package/dist/plugin-sdk/diagnostic-runtime.d.ts +0 -1
- package/dist/plugin-sdk/diagnostics-otel.d.ts +0 -1
- package/dist/plugin-sdk/diffs.d.ts +0 -1
- package/dist/plugin-sdk/direct-dm.d.ts +0 -1
- package/dist/plugin-sdk/directory-runtime.d.ts +0 -1
- package/dist/plugin-sdk/discord-account.d.ts +0 -1
- package/dist/plugin-sdk/discord-core.d.ts +0 -1
- package/dist/plugin-sdk/discord-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/discord-session-key.d.ts +0 -1
- package/dist/plugin-sdk/discord-surface.d.ts +0 -1
- package/dist/plugin-sdk/discord-thread-bindings.d.ts +0 -1
- package/dist/plugin-sdk/discord-timeouts.d.ts +0 -1
- package/dist/plugin-sdk/discord.d.ts +0 -1
- package/dist/plugin-sdk/error-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extension-shared.d.ts +0 -1
- package/dist/plugin-sdk/extensions/anthropic/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/anthropic/cli-shared.d.ts +0 -8
- package/dist/plugin-sdk/extensions/anthropic/stream-wrappers.d.ts +0 -12
- package/dist/plugin-sdk/extensions/bluebubbles/api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/bluebubbles/src/account-resolve.d.ts +0 -13
- package/dist/plugin-sdk/extensions/bluebubbles/src/accounts.d.ts +0 -17
- package/dist/plugin-sdk/extensions/bluebubbles/src/actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/actions.runtime.d.ts +0 -19
- package/dist/plugin-sdk/extensions/bluebubbles/src/attachments.d.ts +0 -34
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel-shared.d.ts +0 -49
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel.runtime.d.ts +0 -13
- package/dist/plugin-sdk/extensions/bluebubbles/src/chat.d.ts +0 -48
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-apply.d.ts +0 -15
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-schema.d.ts +0 -76
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-ui-hints.d.ts +0 -10
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-bindings.d.ts +0 -37
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-id.d.ts +0 -18
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-route.d.ts +0 -12
- package/dist/plugin-sdk/extensions/bluebubbles/src/group-policy.d.ts +0 -14
- package/dist/plugin-sdk/extensions/bluebubbles/src/history.d.ts +0 -40
- package/dist/plugin-sdk/extensions/bluebubbles/src/local-file-access.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/media-send.d.ts +0 -14
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-debounce.d.ts +0 -22
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-normalize.d.ts +0 -77
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-processing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-reply-cache.d.ts +0 -36
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-self-chat-cache.d.ts +0 -15
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-shared.d.ts +0 -31
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor.d.ts +0 -8
- package/dist/plugin-sdk/extensions/bluebubbles/src/multipart.d.ts +0 -10
- package/dist/plugin-sdk/extensions/bluebubbles/src/participant-contact-names.d.ts +0 -28
- package/dist/plugin-sdk/extensions/bluebubbles/src/probe.d.ts +0 -53
- package/dist/plugin-sdk/extensions/bluebubbles/src/reactions.d.ts +0 -17
- package/dist/plugin-sdk/extensions/bluebubbles/src/request-url.d.ts +0 -1
- package/dist/plugin-sdk/extensions/bluebubbles/src/runtime-api.d.ts +0 -28
- package/dist/plugin-sdk/extensions/bluebubbles/src/runtime.d.ts +0 -6
- package/dist/plugin-sdk/extensions/bluebubbles/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/bluebubbles/src/send-helpers.d.ts +0 -3
- package/dist/plugin-sdk/extensions/bluebubbles/src/send.d.ts +0 -45
- package/dist/plugin-sdk/extensions/bluebubbles/src/session-route.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/setup-core.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/setup-surface.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/targets.d.ts +0 -45
- package/dist/plugin-sdk/extensions/bluebubbles/src/types.d.ts +0 -121
- package/dist/plugin-sdk/extensions/bluebubbles/src/webhook-shared.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/runtime-api.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/bridge-auth-registry.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/bridge-server.d.ts +0 -24
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp-proxy-bypass.d.ts +0 -31
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp-timeouts.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp.d.ts +0 -125
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp.helpers.d.ts +0 -29
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome-mcp.d.ts +0 -127
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome-mcp.snapshot.d.ts +0 -26
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.d.ts +0 -26
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.executables.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.profile-decoration.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-core.d.ts +0 -159
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-observe.d.ts +0 -68
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-state.d.ts +0 -93
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-types.d.ts +0 -18
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-url.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/browser/client-fetch.d.ts +0 -21
- package/dist/plugin-sdk/extensions/browser/src/browser/client.d.ts +0 -157
- package/dist/plugin-sdk/extensions/browser/src/browser/config-refresh-source.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/config.d.ts +0 -46
- package/dist/plugin-sdk/extensions/browser/src/browser/constants.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/control-auth.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/control-service.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/csrf.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/errors.d.ts +0 -35
- package/dist/plugin-sdk/extensions/browser/src/browser/form-fields.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/http-auth.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/browser/navigation-guard.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/output-atomic.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/browser/paths.d.ts +0 -61
- package/dist/plugin-sdk/extensions/browser/src/browser/profile-capabilities.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/profiles-service.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser/profiles.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/proxy-files.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai-module.d.ts +0 -6
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai-state.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-role-snapshot.d.ts +0 -35
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-session.d.ts +0 -182
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-session.page-cdp.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.activity.d.ts +0 -21
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.downloads.d.ts +0 -34
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.interactions.d.ts +0 -135
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.responses.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.shared.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.snapshot.d.ts +0 -66
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.state.d.ts +0 -46
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.storage.d.ts +0 -47
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.trace.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/request-policy.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/resolved-config-refresh.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.download.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.hooks.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.shared.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.debug.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.shared.d.ts +0 -37
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.snapshot.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.snapshot.plan.d.ts +0 -22
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.storage.d.ts +0 -14
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/basic.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/dispatcher.d.ts +0 -16
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/index.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/output-paths.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/path-output.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/tabs.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/types.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/utils.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/runtime-lifecycle.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/safe-filename.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/screenshot.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.availability.d.ts +0 -19
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.constants.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.reset.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.selection.d.ts +0 -16
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.tab-ops.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.types.d.ts +0 -74
- package/dist/plugin-sdk/extensions/browser/src/browser/server-lifecycle.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/server-middleware.d.ts +0 -6
- package/dist/plugin-sdk/extensions/browser/src/browser/session-tab-registry.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/snapshot-roles.d.ts +0 -11
- package/dist/plugin-sdk/extensions/browser/src/browser/target-id.d.ts +0 -11
- package/dist/plugin-sdk/extensions/browser/src/browser/trash.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/url-pattern.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser-runtime.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.actions.d.ts +0 -44
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.schema.d.ts +0 -75
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.element.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.files-downloads.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.form-wait-eval.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.navigation.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/shared.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-observe.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-debug.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-examples.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-inspect.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-manage.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-resize.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-shared.d.ts +0 -24
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-state.cookies-storage.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-state.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/cli/command-format.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/cli/core-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/config.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/paths.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/port-defaults.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/control-service.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/core-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/gateway/auth.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/gateway/browser-request.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/gateway/net.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/gateway/startup-auth.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/errors.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/fs-safe.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/net/proxy-env.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/net/ssrf.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/path-guards.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/ports.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/secure-random.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/tmp-openclaw-dir.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/ws.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/logging/redact.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/logging/subsystem.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/media/image-ops.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/media/store.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/node-host/invoke-browser.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/plugin-enabled.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/plugin-service.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/process/exec.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/security/secret-equal.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/server.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/utils/boolean.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/utils.d.ts +0 -1
- package/dist/plugin-sdk/extensions/byteplus/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/byteplus/models.d.ts +0 -73
- package/dist/plugin-sdk/extensions/byteplus/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/chutes/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/chutes/models.d.ts +0 -7
- package/dist/plugin-sdk/extensions/chutes/onboard.d.ts +0 -13
- package/dist/plugin-sdk/extensions/chutes/provider-catalog.d.ts +0 -7
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/models.d.ts +0 -14
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/onboard.d.ts +0 -32
- package/dist/plugin-sdk/extensions/deepseek/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/deepseek/models.d.ts +0 -4
- package/dist/plugin-sdk/extensions/deepseek/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/action-runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/api.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/runtime-api.d.ts +0 -18
- package/dist/plugin-sdk/extensions/discord/session-key-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.guild-admin.d.ts +0 -9
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.guild.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.messaging.d.ts +0 -33
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation-shared.d.ts +0 -13
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation.d.ts +0 -10
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.presence.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.shared.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/approval-native.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/audit.d.ts +0 -29
- package/dist/plugin-sdk/extensions/discord/src/channel-actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/chunk.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/client.d.ts +0 -23
- package/dist/plugin-sdk/extensions/discord/src/component-custom-id.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/components-registry.d.ts +0 -16
- package/dist/plugin-sdk/extensions/discord/src/components.d.ts +0 -195
- package/dist/plugin-sdk/extensions/discord/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/draft-chunking.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/draft-stream.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/exec-approvals.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/gateway-logging.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/group-policy.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/guilds.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/mentions.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/message-tool-schema.d.ts +0 -96
- package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components-helpers.d.ts +0 -160
- package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/auto-presence.d.ts +0 -59
- package/dist/plugin-sdk/extensions/discord/src/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-auth.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-decision.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/exec-approvals.d.ts +0 -54
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-handle.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-plugin.d.ts +0 -22
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-registry.d.ts +0 -9
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-supervisor.d.ts +0 -25
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-context.d.ts +0 -36
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-job.d.ts +0 -13
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-worker.d.ts +0 -22
- package/dist/plugin-sdk/extensions/discord/src/monitor/listeners.d.ts +0 -67
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.types.d.ts +0 -88
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.process.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-utils.d.ts +0 -53
- package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker-preferences.d.ts +0 -18
- package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker.d.ts +0 -117
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-context.d.ts +0 -68
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-route.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-ui.d.ts +0 -106
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/monitor/presence.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider-session.runtime.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.allowlist.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.d.ts +0 -61
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.lifecycle.d.ts +0 -27
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.startup.d.ts +0 -82
- package/dist/plugin-sdk/extensions/discord/src/monitor/reply-context.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/reply-delivery.d.ts +0 -40
- package/dist/plugin-sdk/extensions/discord/src/monitor/rest-fetch.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/route-resolution.d.ts +0 -40
- package/dist/plugin-sdk/extensions/discord/src/monitor/sender-identity.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/monitor/startup-status.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/monitor/status.d.ts +0 -17
- package/dist/plugin-sdk/extensions/discord/src/monitor/system-events.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.config.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.discord-api.d.ts +0 -41
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.lifecycle.d.ts +0 -60
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.manager.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.messages.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.persona.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.state.d.ts +0 -79
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.types.d.ts +0 -79
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-session-close.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-title.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/threading.d.ts +0 -108
- package/dist/plugin-sdk/extensions/discord/src/monitor/timeouts.d.ts +0 -16
- package/dist/plugin-sdk/extensions/discord/src/monitor/typing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/monitor.d.ts +0 -10
- package/dist/plugin-sdk/extensions/discord/src/monitor.gateway.d.ts +0 -12
- package/dist/plugin-sdk/extensions/discord/src/normalize.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/outbound-adapter.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/pluralkit.d.ts +0 -26
- package/dist/plugin-sdk/extensions/discord/src/probe.d.ts +0 -37
- package/dist/plugin-sdk/extensions/discord/src/resolve-allowlist-common.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/resolve-channels.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/resolve-users.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/retry.d.ts +0 -12
- package/dist/plugin-sdk/extensions/discord/src/send.channels.d.ts +0 -17
- package/dist/plugin-sdk/extensions/discord/src/send.components.d.ts +0 -29
- package/dist/plugin-sdk/extensions/discord/src/send.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/send.emojis-stickers.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/send.guild.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/send.messages.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/send.outbound.d.ts +0 -67
- package/dist/plugin-sdk/extensions/discord/src/send.permissions.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/send.reactions.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/send.shared.d.ts +0 -86
- package/dist/plugin-sdk/extensions/discord/src/send.types.d.ts +0 -148
- package/dist/plugin-sdk/extensions/discord/src/send.typing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/session-key-normalization.d.ts +0 -7
- package/dist/plugin-sdk/extensions/discord/src/shared-interactive.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/status-issues.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/ui.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/src/voice/access.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/voice/command.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/voice/manager.d.ts +0 -59
- package/dist/plugin-sdk/extensions/discord/src/voice/manager.runtime.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/voice/sdk-runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/voice-message.d.ts +0 -50
- package/dist/plugin-sdk/extensions/discord/timeouts.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/feishu/runtime-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/feishu/src/accounts.d.ts +0 -72
- package/dist/plugin-sdk/extensions/feishu/src/async.d.ts +0 -13
- package/dist/plugin-sdk/extensions/feishu/src/bot-content.d.ts +0 -85
- package/dist/plugin-sdk/extensions/feishu/src/bot-sender-name.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/bot.d.ts +0 -70
- package/dist/plugin-sdk/extensions/feishu/src/client.d.ts +0 -47
- package/dist/plugin-sdk/extensions/feishu/src/config-schema.d.ts +0 -550
- package/dist/plugin-sdk/extensions/feishu/src/conversation-id.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/dedup.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/dynamic-agent.d.ts +0 -18
- package/dist/plugin-sdk/extensions/feishu/src/external-keys.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/src/media.d.ts +0 -118
- package/dist/plugin-sdk/extensions/feishu/src/mention.d.ts +0 -52
- package/dist/plugin-sdk/extensions/feishu/src/policy.d.ts +0 -36
- package/dist/plugin-sdk/extensions/feishu/src/post.d.ts +0 -11
- package/dist/plugin-sdk/extensions/feishu/src/probe.d.ts +0 -10
- package/dist/plugin-sdk/extensions/feishu/src/reply-dispatcher.d.ts +0 -35
- package/dist/plugin-sdk/extensions/feishu/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/src/send-result.d.ts +0 -12
- package/dist/plugin-sdk/extensions/feishu/src/send-target.d.ts +0 -10
- package/dist/plugin-sdk/extensions/feishu/src/send.d.ts +0 -131
- package/dist/plugin-sdk/extensions/feishu/src/setup-core.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/setup-surface.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/streaming-card.d.ts +0 -55
- package/dist/plugin-sdk/extensions/feishu/src/targets.d.ts +0 -6
- package/dist/plugin-sdk/extensions/feishu/src/thread-bindings.d.ts +0 -42
- package/dist/plugin-sdk/extensions/feishu/src/types.d.ts +0 -84
- package/dist/plugin-sdk/extensions/feishu/src/typing.d.ts +0 -57
- package/dist/plugin-sdk/extensions/github-copilot/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/github-copilot/login.d.ts +0 -5
- package/dist/plugin-sdk/extensions/google/api.d.ts +0 -33
- package/dist/plugin-sdk/extensions/google/model-id.d.ts +0 -2
- package/dist/plugin-sdk/extensions/huggingface/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/huggingface/models.d.ts +0 -7
- package/dist/plugin-sdk/extensions/huggingface/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/huggingface/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/image-generation-core/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/image-generation-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/image-generation-core/src/runtime.d.ts +0 -24
- package/dist/plugin-sdk/extensions/irc/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/irc/src/accounts.d.ts +0 -23
- package/dist/plugin-sdk/extensions/irc/src/control-chars.d.ts +0 -3
- package/dist/plugin-sdk/extensions/irc/src/normalize.d.ts +0 -18
- package/dist/plugin-sdk/extensions/irc/src/runtime-api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/irc/src/setup-core.d.ts +0 -10
- package/dist/plugin-sdk/extensions/irc/src/setup-surface.d.ts +0 -4
- package/dist/plugin-sdk/extensions/irc/src/types.d.ts +0 -83
- package/dist/plugin-sdk/extensions/kilocode/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/kilocode/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/kilocode/provider-models.d.ts +0 -18
- package/dist/plugin-sdk/extensions/kimi-coding/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/kimi-coding/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/kimi-coding/provider-catalog.d.ts +0 -10
- package/dist/plugin-sdk/extensions/line/runtime-api.d.ts +0 -36
- package/dist/plugin-sdk/extensions/line/src/accounts.d.ts +0 -10
- package/dist/plugin-sdk/extensions/line/src/actions.d.ts +0 -22
- package/dist/plugin-sdk/extensions/line/src/auto-reply-delivery.d.ts +0 -38
- package/dist/plugin-sdk/extensions/line/src/bot-access.d.ts +0 -17
- package/dist/plugin-sdk/extensions/line/src/bot-handlers.d.ts +0 -23
- package/dist/plugin-sdk/extensions/line/src/bot-message-context.d.ts +0 -129
- package/dist/plugin-sdk/extensions/line/src/bot.d.ts +0 -24
- package/dist/plugin-sdk/extensions/line/src/channel-access-token.d.ts +0 -4
- package/dist/plugin-sdk/extensions/line/src/config-schema.d.ts +0 -80
- package/dist/plugin-sdk/extensions/line/src/download.d.ts +0 -7
- package/dist/plugin-sdk/extensions/line/src/flex-templates/basic-cards.d.ts +0 -46
- package/dist/plugin-sdk/extensions/line/src/flex-templates/common.d.ts +0 -2
- package/dist/plugin-sdk/extensions/line/src/flex-templates/media-control-cards.d.ts +0 -73
- package/dist/plugin-sdk/extensions/line/src/flex-templates/message.d.ts +0 -6
- package/dist/plugin-sdk/extensions/line/src/flex-templates/schedule-cards.d.ts +0 -55
- package/dist/plugin-sdk/extensions/line/src/flex-templates/types.d.ts +0 -19
- package/dist/plugin-sdk/extensions/line/src/flex-templates.d.ts +0 -5
- package/dist/plugin-sdk/extensions/line/src/group-keys.d.ts +0 -17
- package/dist/plugin-sdk/extensions/line/src/markdown-to-line.d.ts +0 -67
- package/dist/plugin-sdk/extensions/line/src/monitor.d.ts +0 -28
- package/dist/plugin-sdk/extensions/line/src/probe.d.ts +0 -2
- package/dist/plugin-sdk/extensions/line/src/reply-chunks.d.ts +0 -24
- package/dist/plugin-sdk/extensions/line/src/rich-menu.d.ts +0 -50
- package/dist/plugin-sdk/extensions/line/src/send.d.ts +0 -73
- package/dist/plugin-sdk/extensions/line/src/signature.d.ts +0 -1
- package/dist/plugin-sdk/extensions/line/src/template-messages.d.ts +0 -100
- package/dist/plugin-sdk/extensions/line/src/types.d.ts +0 -120
- package/dist/plugin-sdk/extensions/line/src/webhook-node.d.ts +0 -16
- package/dist/plugin-sdk/extensions/line/src/webhook-utils.d.ts +0 -3
- package/dist/plugin-sdk/extensions/line/src/webhook.d.ts +0 -19
- package/dist/plugin-sdk/extensions/litellm/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/litellm/onboard.d.ts +0 -7
- package/dist/plugin-sdk/extensions/matrix/api.d.ts +0 -9
- package/dist/plugin-sdk/extensions/matrix/runtime-api.d.ts +0 -12
- package/dist/plugin-sdk/extensions/matrix/src/account-selection.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/auth-precedence.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/directory-live.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/env-vars.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/account-config.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/accounts.d.ts +0 -23
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/client.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/types.d.ts +0 -68
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/verification.d.ts +0 -78
- package/dist/plugin-sdk/extensions/matrix/src/matrix/active-client.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/async-lock.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/matrix/backup-health.d.ts +0 -19
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config-runtime-api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config-secret-input.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config.d.ts +0 -55
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/create-client.d.ts +0 -18
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/env-auth.d.ts +0 -23
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/file-sync-store.d.ts +0 -29
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/logging.d.ts +0 -13
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/migration-snapshot.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/private-network-host.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/shared.d.ts +0 -24
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/storage.d.ts +0 -30
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/types.d.ts +0 -47
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client-bootstrap.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/matrix/config-paths.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/config-update.d.ts +0 -24
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials-read.d.ts +0 -17
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials-write.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials.d.ts +0 -5
- package/dist/plugin-sdk/extensions/matrix/src/matrix/deps.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/direct-management.d.ts +0 -53
- package/dist/plugin-sdk/extensions/matrix/src/matrix/direct-room.d.ts +0 -27
- package/dist/plugin-sdk/extensions/matrix/src/matrix/encryption-guidance.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/errors.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/format.d.ts +0 -17
- package/dist/plugin-sdk/extensions/matrix/src/matrix/outbound-media-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/poll-types.d.ts +0 -114
- package/dist/plugin-sdk/extensions/matrix/src/matrix/reaction-common.d.ts +0 -32
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-bootstrap.d.ts +0 -34
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-facade.d.ts +0 -67
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-node.runtime.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-runtime.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/decrypt-bridge.d.ts +0 -45
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/event-helpers.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/http-client.d.ts +0 -34
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/idb-persistence-lock.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/idb-persistence.d.ts +0 -5
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/logger.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/read-response-with-limit.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/recovery-key-store.d.ts +0 -48
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/transport.d.ts +0 -29
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/types.d.ts +0 -186
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/verification-manager.d.ts +0 -127
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/verification-status.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk.d.ts +0 -212
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/client.d.ts +0 -15
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/formatting.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/media.d.ts +0 -42
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/targets.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/types.d.ts +0 -80
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send.d.ts +0 -54
- package/dist/plugin-sdk/extensions/matrix/src/matrix/target-ids.d.ts +0 -19
- package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings-shared.d.ts +0 -77
- package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings.d.ts +0 -15
- package/dist/plugin-sdk/extensions/matrix/src/onboarding.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/resolve-targets.d.ts +0 -8
- package/dist/plugin-sdk/extensions/matrix/src/runtime-api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/setup-bootstrap.d.ts +0 -20
- package/dist/plugin-sdk/extensions/matrix/src/setup-config.d.ts +0 -12
- package/dist/plugin-sdk/extensions/matrix/src/setup-core.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/setup-surface.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/storage-paths.d.ts +0 -26
- package/dist/plugin-sdk/extensions/matrix/src/types.d.ts +0 -202
- package/dist/plugin-sdk/extensions/mattermost/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/accounts.d.ts +0 -33
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/client.d.ts +0 -103
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/monitor-auth.d.ts +0 -51
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/secret-input.d.ts +0 -2
- package/dist/plugin-sdk/extensions/mattermost/src/types.d.ts +0 -105
- package/dist/plugin-sdk/extensions/media-understanding-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/media-understanding-core/src/runtime.d.ts +0 -54
- package/dist/plugin-sdk/extensions/memory-core/runtime-api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/memory-core/src/memory/embeddings.d.ts +0 -21
- package/dist/plugin-sdk/extensions/memory-core/src/memory/hybrid.d.ts +0 -45
- package/dist/plugin-sdk/extensions/memory-core/src/memory/index.d.ts +0 -3
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-embedding-ops.d.ts +0 -47
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-search.d.ts +0 -61
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-sync-ops.d.ts +0 -142
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager.d.ts +0 -155
- package/dist/plugin-sdk/extensions/memory-core/src/memory/mmr.d.ts +0 -67
- package/dist/plugin-sdk/extensions/memory-core/src/memory/provider-adapters.d.ts +0 -19
- package/dist/plugin-sdk/extensions/memory-core/src/memory/qmd-manager.d.ts +0 -191
- package/dist/plugin-sdk/extensions/memory-core/src/memory/search-manager.d.ts +0 -12
- package/dist/plugin-sdk/extensions/memory-core/src/memory/temporal-decay.d.ts +0 -25
- package/dist/plugin-sdk/extensions/minimax/api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/minimax/model-definitions.d.ts +0 -35
- package/dist/plugin-sdk/extensions/minimax/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/minimax/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/minimax/provider-models.d.ts +0 -15
- package/dist/plugin-sdk/extensions/mistral/api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/mistral/model-definitions.d.ts +0 -14
- package/dist/plugin-sdk/extensions/mistral/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/mistral/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/modelstudio/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/modelstudio/models.d.ts +0 -27
- package/dist/plugin-sdk/extensions/modelstudio/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/moonshot/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/moonshot/onboard.d.ts +0 -6
- package/dist/plugin-sdk/extensions/moonshot/provider-catalog.d.ts +0 -7
- package/dist/plugin-sdk/extensions/nvidia/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/nvidia/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/ollama/api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/ollama/runtime-api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/ollama/src/defaults.d.ts +0 -11
- package/dist/plugin-sdk/extensions/ollama/src/embedding-provider.d.ts +0 -37
- package/dist/plugin-sdk/extensions/ollama/src/provider-models.d.ts +0 -31
- package/dist/plugin-sdk/extensions/ollama/src/setup.d.ts +0 -36
- package/dist/plugin-sdk/extensions/ollama/src/stream.d.ts +0 -104
- package/dist/plugin-sdk/extensions/openai/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/openai/default-models.d.ts +0 -10
- package/dist/plugin-sdk/extensions/openai/openai-codex-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/openai/openai-provider.d.ts +0 -2
- package/dist/plugin-sdk/extensions/openai/shared.d.ts +0 -5
- package/dist/plugin-sdk/extensions/opencode/api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/opencode/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/opencode-go/api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/opencode-go/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/openrouter/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/openrouter/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/openrouter/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/qianfan/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/qianfan/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/qianfan/provider-catalog.d.ts +0 -4
- package/dist/plugin-sdk/extensions/sglang/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/sglang/defaults.d.ts +0 -4
- package/dist/plugin-sdk/extensions/sglang/models.d.ts +0 -8
- package/dist/plugin-sdk/extensions/signal/api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/signal/reaction-runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/signal/src/accounts.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/client.d.ts +0 -32
- package/dist/plugin-sdk/extensions/signal/src/daemon.d.ts +0 -26
- package/dist/plugin-sdk/extensions/signal/src/format.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/identity.d.ts +0 -25
- package/dist/plugin-sdk/extensions/signal/src/message-actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/monitor/access-policy.d.ts +0 -40
- package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.d.ts +0 -5
- package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.types.d.ts +0 -128
- package/dist/plugin-sdk/extensions/signal/src/monitor/inbound-context.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/monitor/mentions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/monitor.d.ts +0 -26
- package/dist/plugin-sdk/extensions/signal/src/normalize.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/outbound-session.d.ts +0 -8
- package/dist/plugin-sdk/extensions/signal/src/probe.d.ts +0 -7
- package/dist/plugin-sdk/extensions/signal/src/reaction-level.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/rpc-context.d.ts +0 -9
- package/dist/plugin-sdk/extensions/signal/src/runtime-api.d.ts +0 -25
- package/dist/plugin-sdk/extensions/signal/src/send-reactions.d.ts +0 -34
- package/dist/plugin-sdk/extensions/signal/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/signal/src/setup-core.d.ts +0 -20
- package/dist/plugin-sdk/extensions/signal/src/sse-reconnect.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/api.d.ts +0 -19
- package/dist/plugin-sdk/extensions/slack/runtime-api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/account-inspect.d.ts +0 -32
- package/dist/plugin-sdk/extensions/slack/src/account-surface-fields.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/accounts.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/accounts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/action-runtime.d.ts +0 -38
- package/dist/plugin-sdk/extensions/slack/src/action-threading.d.ts +0 -11
- package/dist/plugin-sdk/extensions/slack/src/actions.d.ts +0 -81
- package/dist/plugin-sdk/extensions/slack/src/actions.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/approval-auth.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/approval-native.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/blocks-fallback.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/blocks-input.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/blocks-render.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/channel-actions.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/channel-migration.d.ts +0 -20
- package/dist/plugin-sdk/extensions/slack/src/channel-type.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/channel.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/client.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/config-schema.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/config-ui-hints.d.ts +0 -98
- package/dist/plugin-sdk/extensions/slack/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/directory-live.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/draft-stream.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/exec-approvals.d.ts +0 -43
- package/dist/plugin-sdk/extensions/slack/src/format.d.ts +0 -8
- package/dist/plugin-sdk/extensions/slack/src/group-policy.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/http/index.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/http/registry.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/index.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/interactive-replies.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/limits.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/message-action-dispatch.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/message-actions.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/message-tool-schema.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/modal-metadata.d.ts +0 -8
- package/dist/plugin-sdk/extensions/slack/src/monitor/allow-list.d.ts +0 -24
- package/dist/plugin-sdk/extensions/slack/src/monitor/auth.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/monitor/channel-config.d.ts +0 -45
- package/dist/plugin-sdk/extensions/slack/src/monitor/channel-type.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/monitor/commands.d.ts +0 -9
- package/dist/plugin-sdk/extensions/slack/src/monitor/context.d.ts +0 -107
- package/dist/plugin-sdk/extensions/slack/src/monitor/dm-auth.d.ts +0 -17
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/channels.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.block-actions.d.ts +0 -49
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.modal.d.ts +0 -68
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/members.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/message-subtype-handlers.d.ts +0 -13
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/messages.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/pins.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/reactions.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/system-event-context.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/events.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/monitor/exec-approvals.d.ts +0 -26
- package/dist/plugin-sdk/extensions/slack/src/monitor/external-arg-menu-store.d.ts +0 -18
- package/dist/plugin-sdk/extensions/slack/src/monitor/media.d.ts +0 -67
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/dispatch.d.ts +0 -21
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-content.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-thread-context.d.ts +0 -28
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.d.ts +0 -13
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.test-helpers.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/preview-finalize.d.ts +0 -44
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/types.d.ts +0 -23
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler.d.ts +0 -22
- package/dist/plugin-sdk/extensions/slack/src/monitor/mrkdwn.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/monitor/policy.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/provider.d.ts +0 -33
- package/dist/plugin-sdk/extensions/slack/src/monitor/reconnect-policy.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/monitor/replies.d.ts +0 -56
- package/dist/plugin-sdk/extensions/slack/src/monitor/room-context.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-commands.runtime.d.ts +0 -11
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-dispatch.runtime.d.ts +0 -17
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-skill-commands.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/monitor/thread-resolution.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/types.d.ts +0 -113
- package/dist/plugin-sdk/extensions/slack/src/monitor.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/outbound-adapter.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/probe.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/reply-blocks.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/resolve-allowlist-common.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/resolve-channels.d.ts +0 -19
- package/dist/plugin-sdk/extensions/slack/src/resolve-users.d.ts +0 -26
- package/dist/plugin-sdk/extensions/slack/src/runtime-api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/scopes.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/slack/src/sent-thread-cache.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/setup-core.d.ts +0 -80
- package/dist/plugin-sdk/extensions/slack/src/setup-surface.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/shared.d.ts +0 -39
- package/dist/plugin-sdk/extensions/slack/src/stream-mode.d.ts +0 -23
- package/dist/plugin-sdk/extensions/slack/src/streaming.d.ts +0 -72
- package/dist/plugin-sdk/extensions/slack/src/targets.d.ts +0 -9
- package/dist/plugin-sdk/extensions/slack/src/threading-tool-context.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/threading.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/token.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/truncate.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/types.d.ts +0 -58
- package/dist/plugin-sdk/extensions/slack/test-api.d.ts +0 -9
- package/dist/plugin-sdk/extensions/speech-core/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/speech-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/speech-core/src/tts.d.ts +0 -145
- package/dist/plugin-sdk/extensions/synthetic/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/synthetic/models.d.ts +0 -160
- package/dist/plugin-sdk/extensions/synthetic/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/synthetic/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/together/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/together/models.d.ts +0 -4
- package/dist/plugin-sdk/extensions/together/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/together/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/venice/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/venice/models.d.ts +0 -345
- package/dist/plugin-sdk/extensions/venice/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/models.d.ts +0 -15
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vllm/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vllm/defaults.d.ts +0 -4
- package/dist/plugin-sdk/extensions/vllm/models.d.ts +0 -8
- package/dist/plugin-sdk/extensions/volcengine/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/volcengine/models.d.ts +0 -94
- package/dist/plugin-sdk/extensions/volcengine/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/api.d.ts +0 -10
- package/dist/plugin-sdk/extensions/whatsapp/constants.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/light-runtime-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/login-qr-api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/whatsapp/runtime-api.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/account-config.d.ts +0 -8
- package/dist/plugin-sdk/extensions/whatsapp/src/accounts.d.ts +0 -43
- package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime-target-auth.d.ts +0 -10
- package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/agent-tools-login.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auth-store.d.ts +0 -31
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/constants.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/deliver-reply.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/heartbeat-runner.d.ts +0 -20
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/loggers.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/mentions.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.d.ts +0 -13
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/broadcast.d.ts +0 -16
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/echo.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-activation.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-gating.d.ts +0 -33
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-members.d.ts +0 -6
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/inbound-context.d.ts +0 -28
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.d.ts +0 -140
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/last-route.d.ts +0 -15
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/message-line.d.ts +0 -11
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/on-message.d.ts +0 -24
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/peer.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/process-message.d.ts +0 -31
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/runtime-api.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor-state.d.ts +0 -18
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor.d.ts +0 -5
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/session-snapshot.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/types.d.ts +0 -33
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/util.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.impl.d.ts +0 -6
- package/dist/plugin-sdk/extensions/whatsapp/src/channel.runtime.d.ts +0 -23
- package/dist/plugin-sdk/extensions/whatsapp/src/creds-files.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/group-policy.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/identity.d.ts +0 -52
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/access-control.d.ts +0 -36
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/dedupe.d.ts +0 -12
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/extract.d.ts +0 -8
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/lifecycle.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/media.d.ts +0 -7
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/monitor.d.ts +0 -32
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/send-api.d.ts +0 -22
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/types.d.ts +0 -48
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/src/login-qr.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/login.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/media.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/normalize-target.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/normalize.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/qr-image.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/reaction-level.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/reconnect.d.ts +0 -11
- package/dist/plugin-sdk/extensions/whatsapp/src/resolve-outbound-target.d.ts +0 -12
- package/dist/plugin-sdk/extensions/whatsapp/src/runtime-api.d.ts +0 -16
- package/dist/plugin-sdk/extensions/whatsapp/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/whatsapp/src/session-errors.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/session.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/setup-core.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/setup-surface.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/vcard.d.ts +0 -6
- package/dist/plugin-sdk/extensions/xai/api.d.ts +0 -27
- package/dist/plugin-sdk/extensions/xai/model-definitions.d.ts +0 -13
- package/dist/plugin-sdk/extensions/xai/model-id.d.ts +0 -1
- package/dist/plugin-sdk/extensions/xai/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/xai/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/xai/provider-models.d.ts +0 -6
- package/dist/plugin-sdk/extensions/xiaomi/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/xiaomi/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/xiaomi/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zai/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/zai/model-definitions.d.ts +0 -23
- package/dist/plugin-sdk/extensions/zai/onboard.d.ts +0 -10
- package/dist/plugin-sdk/extensions/zalo/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zalo/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/accounts.d.ts +0 -11
- package/dist/plugin-sdk/extensions/zalo/src/group-access.d.ts +0 -17
- package/dist/plugin-sdk/extensions/zalo/src/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/setup-core.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/setup-surface.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zalo/src/token.d.ts +0 -8
- package/dist/plugin-sdk/extensions/zalo/src/types.d.ts +0 -46
- package/dist/plugin-sdk/feishu-conversation.d.ts +0 -1
- package/dist/plugin-sdk/feishu-setup.d.ts +0 -1
- package/dist/plugin-sdk/feishu.d.ts +0 -1
- package/dist/plugin-sdk/fetch-runtime.d.ts +0 -1
- package/dist/plugin-sdk/file-lock.d.ts +0 -1
- package/dist/plugin-sdk/gateway-runtime.d.ts +0 -1
- package/dist/plugin-sdk/github-copilot-login.d.ts +0 -1
- package/dist/plugin-sdk/github-copilot-token.d.ts +0 -1
- package/dist/plugin-sdk/global-singleton.d.ts +0 -1
- package/dist/plugin-sdk/google.d.ts +0 -1
- package/dist/plugin-sdk/googlechat.d.ts +0 -1
- package/dist/plugin-sdk/group-access.d.ts +0 -1
- package/dist/plugin-sdk/hook-runtime.d.ts +0 -1
- package/dist/plugin-sdk/host-runtime.d.ts +0 -1
- package/dist/plugin-sdk/huggingface.d.ts +0 -1
- package/dist/plugin-sdk/image-generation-core.d.ts +0 -1
- package/dist/plugin-sdk/image-generation.d.ts +0 -1
- package/dist/plugin-sdk/index.d.ts +0 -1
- package/dist/plugin-sdk/infra-runtime.d.ts +0 -1
- package/dist/plugin-sdk/interactive-runtime.d.ts +0 -1
- package/dist/plugin-sdk/irc-surface.d.ts +0 -1
- package/dist/plugin-sdk/irc.d.ts +0 -1
- package/dist/plugin-sdk/json-store.d.ts +0 -1
- package/dist/plugin-sdk/keyed-async-queue.d.ts +0 -1
- package/dist/plugin-sdk/kilocode.d.ts +0 -1
- package/dist/plugin-sdk/kimi-coding.d.ts +0 -1
- package/dist/plugin-sdk/lazy-runtime.d.ts +0 -1
- package/dist/plugin-sdk/line-core.d.ts +0 -1
- package/dist/plugin-sdk/line-runtime.d.ts +0 -1
- package/dist/plugin-sdk/line-surface.d.ts +0 -1
- package/dist/plugin-sdk/line.d.ts +0 -1
- package/dist/plugin-sdk/llm-task.d.ts +0 -1
- package/dist/plugin-sdk/logging-core.d.ts +0 -1
- package/dist/plugin-sdk/markdown-table-runtime.d.ts +0 -1
- package/dist/plugin-sdk/matrix-helper.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-heavy.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-shared.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/matrix-surface.d.ts +0 -1
- package/dist/plugin-sdk/matrix-thread-bindings.d.ts +0 -1
- package/dist/plugin-sdk/matrix.d.ts +0 -1
- package/dist/plugin-sdk/mattermost-policy.d.ts +0 -1
- package/dist/plugin-sdk/mattermost.d.ts +0 -1
- package/dist/plugin-sdk/media-runtime.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding-runtime.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-engine-runtime.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-foundation.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-qmd.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-storage.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-multimodal.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-query.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-cli.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-core.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-files.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-secret.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-status.d.ts +0 -1
- package/dist/plugin-sdk/memory-core.d.ts +0 -1
- package/dist/plugin-sdk/memory-lancedb.d.ts +0 -1
- package/dist/plugin-sdk/minimax.d.ts +0 -1
- package/dist/plugin-sdk/mistral.d.ts +0 -1
- package/dist/plugin-sdk/models-provider-runtime.d.ts +0 -1
- package/dist/plugin-sdk/modelstudio-definitions.d.ts +0 -1
- package/dist/plugin-sdk/modelstudio.d.ts +0 -1
- package/dist/plugin-sdk/moonshot.d.ts +0 -1
- package/dist/plugin-sdk/msteams.d.ts +0 -1
- package/dist/plugin-sdk/native-command-registry.d.ts +0 -1
- package/dist/plugin-sdk/nextcloud-talk.d.ts +0 -1
- package/dist/plugin-sdk/nostr.d.ts +0 -1
- package/dist/plugin-sdk/nvidia.d.ts +0 -1
- package/dist/plugin-sdk/ollama-surface.d.ts +0 -1
- package/dist/plugin-sdk/ollama.d.ts +0 -1
- package/dist/plugin-sdk/openai.d.ts +0 -1
- package/dist/plugin-sdk/opencode-go.d.ts +0 -1
- package/dist/plugin-sdk/opencode.d.ts +0 -1
- package/dist/plugin-sdk/outbound-runtime.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-embeddings.d.ts +0 -16
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-foundation.d.ts +0 -20
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-qmd.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-embedding-common.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-error-utils.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-gemini.d.ts +0 -46
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-http.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-openai.d.ts +0 -19
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-output.d.ts +0 -23
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-provider-common.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-runner.d.ts +0 -38
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-status.d.ts +0 -27
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-upload.d.ts +0 -6
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-utils.d.ts +0 -11
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-voyage.d.ts +0 -29
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-chunk-limits.d.ts +0 -3
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-model-limits.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-vectors.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-debug.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-gemini.d.ts +0 -63
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-mistral.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-model-normalize.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-ollama.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-openai.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-client.d.ts +0 -12
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-fetch.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-provider.d.ts +0 -21
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-voyage.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings.d.ts +0 -59
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/node-llama.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/post-json.d.ts +0 -10
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-process.d.ts +0 -34
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-query-parser.d.ts +0 -11
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-scope.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/remote-http.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/secret-input.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/session-files.d.ts +0 -14
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/status-format.d.ts +0 -28
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/test-helpers/ssrf.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-cli.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-core.d.ts +0 -17
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-files.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/packages/memory-host-sdk/src/secret.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/status.d.ts +0 -1
- package/dist/plugin-sdk/param-readers.d.ts +0 -1
- package/dist/plugin-sdk/plugin-entry.d.ts +0 -1
- package/dist/plugin-sdk/plugin-runtime.d.ts +0 -1
- package/dist/plugin-sdk/process-runtime.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-api-key.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-login.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-result.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-runtime.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth.d.ts +0 -1
- package/dist/plugin-sdk/provider-catalog-shared.d.ts +0 -1
- package/dist/plugin-sdk/provider-entry.d.ts +0 -1
- package/dist/plugin-sdk/provider-env-vars.d.ts +0 -1
- package/dist/plugin-sdk/provider-http.d.ts +0 -1
- package/dist/plugin-sdk/provider-model-shared.d.ts +0 -1
- package/dist/plugin-sdk/provider-moonshot.d.ts +0 -1
- package/dist/plugin-sdk/provider-onboard.d.ts +0 -1
- package/dist/plugin-sdk/provider-setup.d.ts +0 -1
- package/dist/plugin-sdk/provider-stream.d.ts +0 -1
- package/dist/plugin-sdk/provider-tools.d.ts +0 -1
- package/dist/plugin-sdk/provider-usage.d.ts +0 -1
- package/dist/plugin-sdk/provider-web-fetch.d.ts +0 -1
- package/dist/plugin-sdk/provider-web-search.d.ts +0 -1
- package/dist/plugin-sdk/provider-zai-endpoint.d.ts +0 -1
- package/dist/plugin-sdk/qianfan.d.ts +0 -1
- package/dist/plugin-sdk/reply-chunking.d.ts +0 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.d.ts +0 -1
- package/dist/plugin-sdk/reply-history.d.ts +0 -1
- package/dist/plugin-sdk/reply-payload.d.ts +0 -1
- package/dist/plugin-sdk/reply-runtime.d.ts +0 -1
- package/dist/plugin-sdk/request-url.d.ts +0 -1
- package/dist/plugin-sdk/retry-runtime.d.ts +0 -1
- package/dist/plugin-sdk/routing.d.ts +0 -1
- package/dist/plugin-sdk/runtime-config-snapshot.d.ts +0 -1
- package/dist/plugin-sdk/runtime-env.d.ts +0 -1
- package/dist/plugin-sdk/runtime-group-policy.d.ts +0 -1
- package/dist/plugin-sdk/runtime-store.d.ts +0 -1
- package/dist/plugin-sdk/runtime.d.ts +0 -1
- package/dist/plugin-sdk/sandbox.d.ts +0 -1
- package/dist/plugin-sdk/scripts/lib/plugin-sdk-doc-metadata.d.ts +0 -64
- package/dist/plugin-sdk/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/security-runtime.d.ts +0 -1
- package/dist/plugin-sdk/self-hosted-provider-setup.d.ts +0 -1
- package/dist/plugin-sdk/session-store-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-adapter-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-tools.d.ts +0 -1
- package/dist/plugin-sdk/setup.d.ts +0 -1
- package/dist/plugin-sdk/sglang.d.ts +0 -1
- package/dist/plugin-sdk/signal-account.d.ts +0 -1
- package/dist/plugin-sdk/signal-surface.d.ts +0 -1
- package/dist/plugin-sdk/signal.d.ts +0 -1
- package/dist/plugin-sdk/skill-commands-runtime.d.ts +0 -1
- package/dist/plugin-sdk/slack-account.d.ts +0 -1
- package/dist/plugin-sdk/slack-core.d.ts +0 -1
- package/dist/plugin-sdk/slack-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/slack-surface.d.ts +0 -1
- package/dist/plugin-sdk/slack-target-parser.d.ts +0 -1
- package/dist/plugin-sdk/slack-targets.d.ts +0 -1
- package/dist/plugin-sdk/slack.d.ts +0 -1
- package/dist/plugin-sdk/speech-core.d.ts +0 -1
- package/dist/plugin-sdk/speech-runtime.d.ts +0 -1
- package/dist/plugin-sdk/speech.d.ts +0 -1
- package/dist/plugin-sdk/src/acp/runtime/adapter-contract.testkit.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/auth-profiles/upsert-with-lock.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/live-test-helpers.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/model-allowlist-ref.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/model-catalog.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/model-suppression.runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/openclaw-tools.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/openrouter-model-capabilities.d.ts +0 -53
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/proxy-stream-wrappers.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/zai-stream-wrappers.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-embedded.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/sandbox/test-fixtures.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/self-hosted-provider-defaults.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/simple-completion-transport.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/skills.e2e-test-helpers.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/chunk.d.ts +0 -45
- package/dist/plugin-sdk/src/auto-reply/dispatch.d.ts +0 -32
- package/dist/plugin-sdk/src/auto-reply/heartbeat-reply-payload.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/media-note.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/abort-cutoff.runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/abort.d.ts +0 -40
- package/dist/plugin-sdk/src/auto-reply/reply/abort.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/acp-projector.d.ts +0 -21
- package/dist/plugin-sdk/src/auto-reply/reply/acp-stream-settings.d.ts +0 -24
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-helpers.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-memory.d.ts +0 -42
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-payloads.d.ts +0 -29
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-reminder-guard.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-usage-line.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.d.ts +0 -39
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label-config.d.ts +0 -14
- package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/body.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/commands-handlers.runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-abort.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-store.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/commands-spawn.test-harness.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-agents.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-focus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-help.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-info.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-kill.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-list.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-log.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-send.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-spawn.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-unfocus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tasks.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tts.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/commands.test-harness.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp-delivery.d.ts +0 -35
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.d.ts +0 -34
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-from-config.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/reply/exec.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/followup-runner.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-from-config.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-inline-actions.d.ts +0 -62
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-run.d.ts +0 -69
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/history.d.ts +0 -72
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-meta.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/matrix-context.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/memory-flush.d.ts +0 -48
- package/dist/plugin-sdk/src/auto-reply/reply/message-preprocess-hooks.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/queue-policy.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/reply-payloads-dedupe.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/reply-reference.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/session-delivery.d.ts +0 -30
- package/dist/plugin-sdk/src/auto-reply/reply/session-fork.d.ts +0 -11
- package/dist/plugin-sdk/src/auto-reply/reply/session-fork.runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-prompt.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/session-run-accounting.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/session-updates.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-usage.d.ts +0 -25
- package/dist/plugin-sdk/src/auto-reply/reply/session.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/untrusted-context.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/send-policy.d.ts +0 -6
- package/dist/plugin-sdk/src/channel-web.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/draft-stream-controls.d.ts +0 -54
- package/dist/plugin-sdk/src/channels/draft-stream-loop.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/native-command-session-targets.d.ts +0 -12
- package/dist/plugin-sdk/src/channels/plugins/actions/reaction-message-id.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/actions/shared.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/bluebubbles-actions.d.ts +0 -48
- package/dist/plugin-sdk/src/channels/plugins/bundled.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/contracts/inbound-testkit.d.ts +0 -70
- package/dist/plugin-sdk/src/channels/plugins/contracts/suites.d.ts +0 -129
- package/dist/plugin-sdk/src/channels/plugins/pairing-adapters.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/plugins/setup-registry.d.ts +0 -3
- package/dist/plugin-sdk/src/channels/plugins/status-issues/bluebubbles.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/types.adapters.d.ts +0 -694
- package/dist/plugin-sdk/src/channels/plugins/types.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/whatsapp-shared.d.ts +0 -44
- package/dist/plugin-sdk/src/channels/registry.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/run-state-machine.d.ts +0 -19
- package/dist/plugin-sdk/src/channels/sender-identity.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/status-reactions.d.ts +0 -66
- package/dist/plugin-sdk/src/channels/transport/stall-watchdog.d.ts +0 -20
- package/dist/plugin-sdk/src/cli/cli-utils.d.ts +0 -19
- package/dist/plugin-sdk/src/cli/command-options.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/deps.d.ts +0 -10
- package/dist/plugin-sdk/src/cli/gateway-rpc.d.ts +0 -13
- package/dist/plugin-sdk/src/cli/help-format.d.ts +0 -5
- package/dist/plugin-sdk/src/cli/progress.d.ts +0 -24
- package/dist/plugin-sdk/src/cli/send-runtime/discord.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/imessage.d.ts +0 -12
- package/dist/plugin-sdk/src/cli/send-runtime/signal.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/slack.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/telegram.d.ts +0 -16
- package/dist/plugin-sdk/src/cli/send-runtime/whatsapp.d.ts +0 -4
- package/dist/plugin-sdk/src/cli/test-runtime-capture.d.ts +0 -31
- package/dist/plugin-sdk/src/commands/backup-shared.d.ts +0 -32
- package/dist/plugin-sdk/src/commands/channel-setup/registry.d.ts +0 -6
- package/dist/plugin-sdk/src/commands/channel-setup/types.d.ts +0 -1
- package/dist/plugin-sdk/src/commands/channel-test-helpers.d.ts +0 -7
- package/dist/plugin-sdk/src/commands/chutes-oauth.d.ts +0 -21
- package/dist/plugin-sdk/src/commands/cleanup-utils.d.ts +0 -36
- package/dist/plugin-sdk/src/commands/daemon-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/commands/health.d.ts +0 -63
- package/dist/plugin-sdk/src/commands/onboard-types.d.ts +0 -95
- package/dist/plugin-sdk/src/config/backup-rotation.d.ts +0 -58
- package/dist/plugin-sdk/src/config/config.d.ts +0 -8
- package/dist/plugin-sdk/src/config/env-preserve.d.ts +0 -10
- package/dist/plugin-sdk/src/config/includes.d.ts +0 -43
- package/dist/plugin-sdk/src/config/io.d.ts +0 -93
- package/dist/plugin-sdk/src/config/paths.d.ts +0 -58
- package/dist/plugin-sdk/src/config/types.agent-defaults.d.ts +0 -377
- package/dist/plugin-sdk/src/config/types.channel-messaging-common.d.ts +0 -53
- package/dist/plugin-sdk/src/config/types.d.ts +0 -34
- package/dist/plugin-sdk/src/config/types.googlechat.d.ts +0 -120
- package/dist/plugin-sdk/src/config/types.imessage.d.ts +0 -88
- package/dist/plugin-sdk/src/config/types.irc.d.ts +0 -61
- package/dist/plugin-sdk/src/config/types.msteams.d.ts +0 -132
- package/dist/plugin-sdk/src/config/types.signal.d.ts +0 -65
- package/dist/plugin-sdk/src/context-engine/registry.d.ts +0 -47
- package/dist/plugin-sdk/src/cron/delivery.d.ts +0 -33
- package/dist/plugin-sdk/src/cron/isolated-agent/delivery-target.d.ts +0 -27
- package/dist/plugin-sdk/src/cron/isolated-agent/session.d.ts +0 -15
- package/dist/plugin-sdk/src/cron/schedule.d.ts +0 -6
- package/dist/plugin-sdk/src/cron/service/initial-delivery.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/jobs.d.ts +0 -33
- package/dist/plugin-sdk/src/cron/service/locked.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/ops.d.ts +0 -84
- package/dist/plugin-sdk/src/cron/service/state.d.ts +0 -158
- package/dist/plugin-sdk/src/cron/service/store.d.ts +0 -11
- package/dist/plugin-sdk/src/cron/service/timeout-policy.d.ts +0 -13
- package/dist/plugin-sdk/src/cron/service/timer.d.ts +0 -46
- package/dist/plugin-sdk/src/cron/service.d.ts +0 -69
- package/dist/plugin-sdk/src/cron/session-reaper.d.ts +0 -35
- package/dist/plugin-sdk/src/gateway/auth-mode-policy.d.ts +0 -4
- package/dist/plugin-sdk/src/gateway/channel-status-patches.d.ts +0 -6
- package/dist/plugin-sdk/src/gateway/chat-abort.d.ts +0 -47
- package/dist/plugin-sdk/src/gateway/exec-approval-manager.d.ts +0 -47
- package/dist/plugin-sdk/src/gateway/node-command-policy.d.ts +0 -18
- package/dist/plugin-sdk/src/gateway/security-path.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-broadcast.d.ts +0 -17
- package/dist/plugin-sdk/src/gateway/server-channels.d.ts +0 -78
- package/dist/plugin-sdk/src/gateway/server-constants.d.ts +0 -9
- package/dist/plugin-sdk/src/gateway/server-methods/nodes.helpers.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-methods/types.d.ts +0 -108
- package/dist/plugin-sdk/src/gateway/server-shared.d.ts +0 -7
- package/dist/plugin-sdk/src/gateway/startup-auth.d.ts +0 -21
- package/dist/plugin-sdk/src/gateway/ws-log.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/ws-logging.d.ts +0 -4
- package/dist/plugin-sdk/src/generated/plugin-sdk-facade-type-map.generated.d.ts +0 -769
- package/dist/plugin-sdk/src/hooks/types.d.ts +0 -62
- package/dist/plugin-sdk/src/image-generation/provider-registry.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/backup-create.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/device-bootstrap.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/device-pairing.d.ts +0 -122
- package/dist/plugin-sdk/src/infra/dotenv.d.ts +0 -9
- package/dist/plugin-sdk/src/infra/gemini-auth.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/google-api-base-url.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/heartbeat-active-hours.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/heartbeat-events-filter.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/heartbeat-runner.d.ts +0 -35
- package/dist/plugin-sdk/src/infra/heartbeat-summary.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/http-body.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/matrix-legacy-crypto.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/matrix-legacy-state.d.ts +0 -30
- package/dist/plugin-sdk/src/infra/matrix-migration-config.d.ts +0 -48
- package/dist/plugin-sdk/src/infra/matrix-migration-snapshot.d.ts +0 -25
- package/dist/plugin-sdk/src/infra/matrix-plugin-helper.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/outbound/deliver.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue-recovery.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue-storage.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/outbound/sanitize-text.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/session-maintenance-warning.d.ts +0 -15
- package/dist/plugin-sdk/src/link-understanding/apply.d.ts +0 -10
- package/dist/plugin-sdk/src/link-understanding/apply.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/link-understanding/defaults.d.ts +0 -2
- package/dist/plugin-sdk/src/link-understanding/detect.d.ts +0 -3
- package/dist/plugin-sdk/src/link-understanding/format.d.ts +0 -4
- package/dist/plugin-sdk/src/link-understanding/runner.d.ts +0 -11
- package/dist/plugin-sdk/src/media/file-context.d.ts +0 -7
- package/dist/plugin-sdk/src/media/input-files.d.ts +0 -99
- package/dist/plugin-sdk/src/media-understanding/apply.d.ts +0 -19
- package/dist/plugin-sdk/src/media-understanding/apply.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/audio.test-helpers.d.ts +0 -27
- package/dist/plugin-sdk/src/media-understanding/concurrency.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/echo-transcript.d.ts +0 -13
- package/dist/plugin-sdk/src/media-understanding/format.d.ts +0 -7
- package/dist/plugin-sdk/src/media-understanding/runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/transcribe-audio.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/account-core.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/account-resolution.d.ts +0 -24
- package/dist/plugin-sdk/src/plugin-sdk/acp-runtime.d.ts +0 -16
- package/dist/plugin-sdk/src/plugin-sdk/acpx.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/agent-config-primitives.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/allowlist-config-edit.d.ts +0 -99
- package/dist/plugin-sdk/src/plugin-sdk/amazon-bedrock.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/api-baseline.d.ts +0 -43
- package/dist/plugin-sdk/src/plugin-sdk/bluebubbles-policy.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/bluebubbles.d.ts +0 -62
- package/dist/plugin-sdk/src/plugin-sdk/browser-support.d.ts +0 -54
- package/dist/plugin-sdk/src/plugin-sdk/browser.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/byteplus.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/channel-actions.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-primitives.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-schema.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-writes.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/channel-feedback.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/channel-lifecycle.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/channel-pairing.d.ts +0 -24
- package/dist/plugin-sdk/src/plugin-sdk/channel-plugin-common.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/channel-setup.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/chutes.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/cli-backend.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/cloudflare-ai-gateway.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/collection-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/command-auth-native.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/command-auth.d.ts +0 -65
- package/dist/plugin-sdk/src/plugin-sdk/command-detection.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/command-surface.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/compat.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/config-paths.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/copilot-proxy.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/dangerous-name-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/deepseek.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/device-bootstrap.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/diagnostics-otel.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/diffs.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/discord-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/discord-runtime-surface.d.ts +0 -61
- package/dist/plugin-sdk/src/plugin-sdk/discord-send.d.ts +0 -36
- package/dist/plugin-sdk/src/plugin-sdk/entrypoints.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/extension-shared.d.ts +0 -67
- package/dist/plugin-sdk/src/plugin-sdk/feishu-conversation.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/feishu-setup.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/feishu.d.ts +0 -45
- package/dist/plugin-sdk/src/plugin-sdk/fetch-auth.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/gateway-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/github-copilot-login.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/github-copilot-token.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/global-singleton.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/google.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/googlechat.d.ts +0 -49
- package/dist/plugin-sdk/src/plugin-sdk/hook-runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/host-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/huggingface.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/image-generation-core.d.ts +0 -15
- package/dist/plugin-sdk/src/plugin-sdk/image-generation.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/index.d.ts +0 -28
- package/dist/plugin-sdk/src/plugin-sdk/infra-runtime.d.ts +0 -47
- package/dist/plugin-sdk/src/plugin-sdk/irc-surface.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/irc.d.ts +0 -38
- package/dist/plugin-sdk/src/plugin-sdk/kilocode.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/kimi-coding.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/lazy-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/line-core.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/line-runtime.d.ts +0 -75
- package/dist/plugin-sdk/src/plugin-sdk/litellm.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/llm-task.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/lobster.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/logging-core.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/markdown-table-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/matrix-helper.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-heavy.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-shared.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-surface.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix-surface.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/matrix-thread-bindings.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix.d.ts +0 -72
- package/dist/plugin-sdk/src/plugin-sdk/mattermost-policy.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/mattermost.d.ts +0 -50
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-engine-runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-embeddings.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-foundation.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-qmd.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-cli.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-core.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-files.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-secret.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-status.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/memory-lancedb.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/minimax.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/mistral.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/models-provider-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/modelstudio-definitions.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/modelstudio.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/moonshot.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/msteams.d.ts +0 -60
- package/dist/plugin-sdk/src/plugin-sdk/native-command-registry.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/nextcloud-talk.d.ts +0 -45
- package/dist/plugin-sdk/src/plugin-sdk/nostr.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/nvidia.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/ollama-surface.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/open-prose.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/openai.d.ts +0 -15
- package/dist/plugin-sdk/src/plugin-sdk/opencode-go.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/opencode.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/openrouter.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/optional-channel-setup.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/pairing-access.d.ts +0 -19
- package/dist/plugin-sdk/src/plugin-sdk/param-readers.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/persistent-dedupe.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/phone-control.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/plugin-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/process-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-api-key.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.d.ts +0 -27
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/provider-catalog-shared.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/provider-entry.d.ts +0 -38
- package/dist/plugin-sdk/src/plugin-sdk/provider-env-vars.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-moonshot.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-onboard.d.ts +0 -85
- package/dist/plugin-sdk/src/plugin-sdk/provider-reasoning.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/provider-setup.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/provider-stream.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/provider-usage.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/provider-web-fetch.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/provider-zai-endpoint.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/qianfan.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/reply-chunking.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/reply-dispatch-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/reply-history.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/reply-runtime.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/request-url.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/resolution-notes.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/run-command.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/runtime-config-snapshot.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/runtime-group-policy.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/runtime-store.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/runtime.d.ts +0 -39
- package/dist/plugin-sdk/src/plugin-sdk/sandbox.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/secret-input-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/security-runtime.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/self-hosted-provider-setup.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/session-store-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/setup-adapter-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/setup-runtime.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/setup-tools.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/setup.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/sglang.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/signal-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/signal-core.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/skill-commands-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/slack-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/slack-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/speech-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/speech.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/string-normalization-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/synthetic.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/talk-voice.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/telegram-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/telegram-allow-from.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/telegram-command-config.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/telegram-surface.d.ts +0 -44
- package/dist/plugin-sdk/src/plugin-sdk/test-utils.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/testing.d.ts +0 -53
- package/dist/plugin-sdk/src/plugin-sdk/text-chunking.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/thread-bindings-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/thread-ownership.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/tlon.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/together.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/tool-send.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/twitch.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/venice.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/vercel-ai-gateway.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/vllm.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/voice-call.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/volcengine.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/webhook-ingress.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/webhook-memory-guards.d.ts +0 -52
- package/dist/plugin-sdk/src/plugin-sdk/webhook-path.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/webhook-request-guards.d.ts +0 -89
- package/dist/plugin-sdk/src/plugin-sdk/webhook-targets.d.ts +0 -97
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-action-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-core.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-login-qr.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-shared.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-surface.d.ts +0 -19
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp.d.ts +0 -32
- package/dist/plugin-sdk/src/plugin-sdk/xai.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/xiaomi.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/zai.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/zalo-setup.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/zalo.d.ts +0 -47
- package/dist/plugin-sdk/src/plugin-sdk/zalouser.d.ts +0 -39
- package/dist/plugin-sdk/src/plugin-sdk/zod.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/bundled-compat.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/http-path.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/http-registry.d.ts +0 -16
- package/dist/plugin-sdk/src/plugins/http-route-overlap.d.ts +0 -11
- package/dist/plugin-sdk/src/plugins/interactive-dispatch-adapters.d.ts +0 -44
- package/dist/plugin-sdk/src/plugins/interactive.d.ts +0 -60
- package/dist/plugin-sdk/src/plugins/lazy-service-module.d.ts +0 -13
- package/dist/plugin-sdk/src/plugins/loader.d.ts +0 -74
- package/dist/plugin-sdk/src/plugins/plugin-error-handler.d.ts +0 -130
- package/dist/plugin-sdk/src/plugins/provider-auth-choice.runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/provider-catalog.d.ts +0 -24
- package/dist/plugin-sdk/src/plugins/provider-model-allowlist.d.ts +0 -6
- package/dist/plugin-sdk/src/plugins/provider-model-defaults.d.ts +0 -26
- package/dist/plugin-sdk/src/plugins/provider-oauth-flow.d.ts +0 -20
- package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth-tls.d.ts +0 -22
- package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/provider-runtime.d.ts +0 -271
- package/dist/plugin-sdk/src/plugins/provider-runtime.runtime.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/provider-self-hosted-setup.d.ts +0 -60
- package/dist/plugin-sdk/src/plugins/provider-validation.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/provider-wizard.d.ts +0 -45
- package/dist/plugin-sdk/src/plugins/provider-zai-endpoint.d.ts +0 -16
- package/dist/plugin-sdk/src/plugins/providers.d.ts +0 -39
- package/dist/plugin-sdk/src/plugins/registry-empty.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/registry.d.ts +0 -217
- package/dist/plugin-sdk/src/plugins/runtime/gateway-request-scope.d.ts +0 -19
- package/dist/plugin-sdk/src/plugins/runtime/index.d.ts +0 -19
- package/dist/plugin-sdk/src/plugins/runtime/native-deps.d.ts +0 -8
- package/dist/plugin-sdk/src/plugins/runtime/runtime-channel.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-config.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-events.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-logging.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-media-understanding.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/runtime/runtime-media.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-slack-ops.runtime.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/runtime/runtime-slack.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-system.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-tts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/runtime/runtime-whatsapp-boundary.d.ts +0 -35
- package/dist/plugin-sdk/src/plugins/runtime/types-channel.d.ts +0 -200
- package/dist/plugin-sdk/src/plugins/runtime/types-core.d.ts +0 -123
- package/dist/plugin-sdk/src/plugins/runtime/types.d.ts +0 -51
- package/dist/plugin-sdk/src/plugins/runtime.d.ts +0 -39
- package/dist/plugin-sdk/src/plugins/slots.d.ts +0 -36
- package/dist/plugin-sdk/src/plugins/types.d.ts +0 -2287
- package/dist/plugin-sdk/src/security/channel-metadata.d.ts +0 -6
- package/dist/plugin-sdk/src/security/context-visibility.d.ts +0 -26
- package/dist/plugin-sdk/src/shared/device-bootstrap-profile.d.ts +0 -10
- package/dist/plugin-sdk/src/terminal/health-style.d.ts +0 -1
- package/dist/plugin-sdk/src/terminal/note.d.ts +0 -5
- package/dist/plugin-sdk/src/test-helpers/http.d.ts +0 -3
- package/dist/plugin-sdk/src/test-helpers/ssrf.d.ts +0 -2
- package/dist/plugin-sdk/src/test-helpers/state-dir-env.d.ts +0 -9
- package/dist/plugin-sdk/src/test-helpers/whatsapp-outbound.d.ts +0 -22
- package/dist/plugin-sdk/src/test-utils/bundled-plugin-public-surface.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/channel-plugins.d.ts +0 -40
- package/dist/plugin-sdk/src/test-utils/env.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/fetch-mock.d.ts +0 -13
- package/dist/plugin-sdk/src/test-utils/session-state-cleanup.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/vitest-mock-fn.d.ts +0 -1
- package/dist/plugin-sdk/src/tts/directives.d.ts +0 -10
- package/dist/plugin-sdk/src/tts/provider-error-utils.d.ts +0 -4
- package/dist/plugin-sdk/src/tts/provider-registry.d.ts +0 -7
- package/dist/plugin-sdk/src/tts/provider-types.d.ts +0 -100
- package/dist/plugin-sdk/src/tts/tts-core.d.ts +0 -32
- package/dist/plugin-sdk/src/tts/tts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/message-channel.d.ts +0 -29
- package/dist/plugin-sdk/src/utils.d.ts +0 -58
- package/dist/plugin-sdk/src/wizard/session.d.ts +0 -42
- package/dist/plugin-sdk/ssrf-runtime.d.ts +0 -1
- package/dist/plugin-sdk/state-paths.d.ts +0 -1
- package/dist/plugin-sdk/status-helpers.d.ts +0 -1
- package/dist/plugin-sdk/string-normalization-runtime.d.ts +0 -1
- package/dist/plugin-sdk/synthetic.d.ts +0 -1
- package/dist/plugin-sdk/telegram-account.d.ts +0 -1
- package/dist/plugin-sdk/telegram-allow-from.d.ts +0 -1
- package/dist/plugin-sdk/telegram-command-config.d.ts +0 -1
- package/dist/plugin-sdk/telegram-core.d.ts +0 -1
- package/dist/plugin-sdk/telegram-surface.d.ts +0 -1
- package/dist/plugin-sdk/temp-path.d.ts +0 -1
- package/dist/plugin-sdk/testing.d.ts +0 -1
- package/dist/plugin-sdk/text-runtime.d.ts +0 -1
- package/dist/plugin-sdk/thread-bindings-runtime.d.ts +0 -1
- package/dist/plugin-sdk/thread-ownership.d.ts +0 -1
- package/dist/plugin-sdk/tlon.d.ts +0 -1
- package/dist/plugin-sdk/together.d.ts +0 -1
- package/dist/plugin-sdk/tool-send.d.ts +0 -1
- package/dist/plugin-sdk/twitch.d.ts +0 -1
- package/dist/plugin-sdk/venice.d.ts +0 -1
- package/dist/plugin-sdk/vllm.d.ts +0 -1
- package/dist/plugin-sdk/voice-call.d.ts +0 -1
- package/dist/plugin-sdk/volcengine.d.ts +0 -1
- package/dist/plugin-sdk/web-media.d.ts +0 -1
- package/dist/plugin-sdk/webhook-ingress.d.ts +0 -1
- package/dist/plugin-sdk/webhook-path.d.ts +0 -1
- package/dist/plugin-sdk/webhook-request-guards.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-auth-presence.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-core.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-shared.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-surface.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-targets.d.ts +0 -1
- package/dist/plugin-sdk/windows-spawn.d.ts +0 -1
- package/dist/plugin-sdk/xai.d.ts +0 -1
- package/dist/plugin-sdk/zalo-setup.d.ts +0 -1
- package/dist/plugin-sdk/zalo.d.ts +0 -1
- package/dist/plugin-sdk/zalouser.d.ts +0 -1
- package/dist/plugin-sdk/zod.d.ts +0 -1
- package/dist/plugins-cli-BuRzZElZ.js +0 -561
- package/dist/plugins-command-helpers-2uhVdnBb.js +0 -116
- package/dist/plugins-install-persist-BVZkrB2-.js +0 -121
- package/dist/plugins-update-command-CWl-U7Wy.js +0 -974
- package/dist/policy-CBLebx7K.js +0 -147
- package/dist/preflight-audio-RQNk7yfw.js +0 -48
- package/dist/preflight-audio.runtime-BKLaDdXh.js +0 -7
- package/dist/prepare-BdWIhg02.js +0 -1301
- package/dist/probe-7PmWRQdg.js +0 -1868
- package/dist/probe-DBGVRz02.js +0 -170
- package/dist/probe-DtN67E1D.js +0 -349
- package/dist/probe-F0974SeN.js +0 -431
- package/dist/profile-update-B98rJ-pB.js +0 -67
- package/dist/program-CCSYcbNv.js +0 -158
- package/dist/prompt-select-styled-QezSJIFt.js +0 -6434
- package/dist/provider-CvWQLyt5.js +0 -18901
- package/dist/provider-Cvp1QQuM.js +0 -70
- package/dist/provider-IEIXFsBr.js +0 -3685
- package/dist/provider-api-key-auth-BjgG22Cp.js +0 -109
- package/dist/provider-auth-Dlfypk2e.js +0 -43
- package/dist/provider-auth-api-key-DPeAD4Wh.js +0 -5
- package/dist/provider-auth-login-eRYV4NRi.js +0 -8
- package/dist/provider-dispatcher-D2OJ5CNa.js +0 -22
- package/dist/provider-entry-D8rVAPy0.js +0 -86
- package/dist/provider-session.runtime-GQeUwL4B.js +0 -7
- package/dist/provider.runtime-BokN-cp6.js +0 -2
- package/dist/qr-image-CNXmqHBd.js +0 -2
- package/dist/queue-eLL6EbrW.js +0 -663
- package/dist/reaction-runtime-api-DwLFcfeo.js +0 -114
- package/dist/reactions-K9RuCuhE.js +0 -258
- package/dist/read-only-account-inspect.telegram-BoATG5TP.js +0 -202
- package/dist/register.agent-DdFsdgdX.js +0 -240
- package/dist/register.configure-BTVikzNj.js +0 -15
- package/dist/register.maintenance-CDt8_LBs.js +0 -449
- package/dist/register.message-C_Wf261e.js +0 -644
- package/dist/register.onboard-FL6Mny10.js +0 -79
- package/dist/register.setup-BeW8HY0P.js +0 -183
- package/dist/register.status-health-sessions-Bl0-x2Ok.js +0 -1206
- package/dist/register.subclis-DUBZB3bR.js +0 -295
- package/dist/register.subclis-Db9Qegv7.js +0 -3
- package/dist/replies-CWZyv0g5.js +0 -118
- package/dist/reply-DMsC03Iw.js +0 -3192
- package/dist/reply-blocks-DuXsQojy.js +0 -103
- package/dist/reply-dispatch-runtime-D_8J_oEP.js +0 -3
- package/dist/reply-runtime-TZcIYAGQ.js +0 -123
- package/dist/reply.runtime-Bht7FBbJ.js +0 -2
- package/dist/resolve-allowlist-Bnvzjka0.js +0 -147
- package/dist/resolve-targets-D3K5Z5gf.js +0 -280
- package/dist/rooms-mp7F7lsA.js +0 -325
- package/dist/route-reply-DKoNoGml.js +0 -133
- package/dist/route-reply.runtime-ByCsyDjS.js +0 -2
- package/dist/route-resolution-CshIQw9s.js +0 -461
- package/dist/rpc-context-DQ0FBc41.js +0 -155
- package/dist/run-main-BzIbww9g.js +0 -425
- package/dist/runner-IAThb076.js +0 -1479
- package/dist/runtime-C4nQKohR.js +0 -68
- package/dist/runtime-DpQadrfd.js +0 -1175
- package/dist/runtime-api-B-n73E_A.js +0 -2
- package/dist/runtime-api-B0TzzMRA.js +0 -2
- package/dist/runtime-api-B2g4aFI0.js +0 -2
- package/dist/runtime-api-Bjn-vYvi.js +0 -3676
- package/dist/runtime-api-Ckw6TKHu.js +0 -2
- package/dist/runtime-api-CqpkXWTZ.js +0 -14
- package/dist/runtime-api-DLcWBYBn.js +0 -2
- package/dist/runtime-api-DTkksxUA.js +0 -2
- package/dist/runtime-api-Dqjul0s_.js +0 -3
- package/dist/runtime-api-Dt4a5hxH.js +0 -81
- package/dist/runtime-api-exjXBw5x.js +0 -2
- package/dist/runtime-api-iiaetepr.js +0 -29
- package/dist/runtime-api-uq8PFObQ.js +0 -2
- package/dist/runtime-embedded-pi.runtime-C_VTO5Hb.js +0 -2
- package/dist/sandbox-cli-DCBzqdRP.js +0 -443
- package/dist/sdk-xNF3YVy5.js +0 -1108
- package/dist/security-cli-BRQ9l5SH.js +0 -477
- package/dist/send-BR9WsDjK.js +0 -532
- package/dist/send-BYZ6LXaA.js +0 -856
- package/dist/send-C9XFbxrx.js +0 -2
- package/dist/send-CP6xLBgu.js +0 -100
- package/dist/send-CevSHBU3.js +0 -442
- package/dist/send-CiU0wWHJ.js +0 -178
- package/dist/send-CzZHXvb0.js +0 -318
- package/dist/send-D8Q38WQW.js +0 -1076
- package/dist/send-DSrMDTx6.js +0 -3
- package/dist/send.components-CSiMYa_k.js +0 -2
- package/dist/send.components-DuCC5xXW.js +0 -942
- package/dist/server-cron-CnWsiroT.js +0 -2
- package/dist/server-cron-pXTPca6M.js +0 -4173
- package/dist/server-hfFKzOMa.js +0 -10120
- package/dist/server-lite-CpD0TAwt.js +0 -831
- package/dist/server-maintenance-CSzGshfI.js +0 -542
- package/dist/server-maintenance-m-ekNAYN.js +0 -2
- package/dist/server-node-events-o25FUhFi.js +0 -454
- package/dist/server-node-subscriptions-D1cnZtZz.js +0 -2
- package/dist/server-plugins-BYGRllKK.js +0 -10423
- package/dist/server-plugins-D-GLUOyL.js +0 -2
- package/dist/server-startup-memory-CwdtRW65.js +0 -2
- package/dist/server-tailscale-BurW9eR4.js +0 -2
- package/dist/services-B4WpjjQk.js +0 -2
- package/dist/session-BZC_ExXj.js +0 -50
- package/dist/session-archive.runtime-CpJ_-vMn.js +0 -2
- package/dist/session-envelope-D53bqIsw.js +0 -18
- package/dist/session-file-L8H_0oIY.js +0 -120
- package/dist/session-key-DlGku_2P.js +0 -52
- package/dist/session-override-BwLTMvlR.js +0 -100
- package/dist/session-reset-model.runtime-B-f6UyAY.js +0 -119
- package/dist/session-route-CWWuYCWY.js +0 -91
- package/dist/session-store-runtime-DbJ_acdU.js +0 -2
- package/dist/session-subagent-reactivation.runtime-DQP-UkdA.js +0 -2
- package/dist/session-transcript-files.fs-BRLPQRBN.js +0 -149
- package/dist/session-updates-BiofcJQ9.js +0 -222
- package/dist/session-updates.runtime-B5YxiezL.js +0 -2
- package/dist/session-utils-BsLMe4R0.js +0 -1743
- package/dist/sessions-BGky6-U4.js +0 -224
- package/dist/sessions-CizZS4Rb.js +0 -2
- package/dist/sessions-CnolLDg0.js +0 -443
- package/dist/setup-BPkdGC8C.js +0 -427
- package/dist/setup-api-Bd-qaaRg.js +0 -2
- package/dist/setup-bootstrap-BUPymwJl.js +0 -54
- package/dist/setup-core-CE5GuYaV.js +0 -256
- package/dist/setup-core-tvt7DN1q.js +0 -146
- package/dist/setup-surface-BbOvAxU6.js +0 -484
- package/dist/setup-surface-BlIvCltJ.js +0 -450
- package/dist/setup-surface-BoJI-ftG.js +0 -237
- package/dist/setup-surface-C6yPqLIS.js +0 -261
- package/dist/setup-surface-CNFczxjl.js +0 -656
- package/dist/setup-surface-D5hZFXlx.js +0 -8848
- package/dist/setup-surface-DMOex3oo.js +0 -346
- package/dist/setup-surface-DRmn71vw.js +0 -333
- package/dist/setup-surface-DUodX6wM.js +0 -353
- package/dist/setup-surface-DVnka34A.js +0 -272
- package/dist/setup-surface-DrFSCD5A.js +0 -304
- package/dist/setup-surface-WtMan1x2.js +0 -261
- package/dist/setup.finalize-BcpxSMo5.js +0 -458
- package/dist/setup.gateway-config-BHvGYGOD.js +0 -247
- package/dist/shared-1r1qYN6z.js +0 -198
- package/dist/shared-BXz6HKLm.js +0 -180
- package/dist/shared-Bg7yDHOE.js +0 -94
- package/dist/shared-DBX8qPP6.js +0 -144
- package/dist/shared-DHFHItFt.js +0 -160
- package/dist/shared-DJV3Mmv8.js +0 -72
- package/dist/shared-ZeWcr3rG.js +0 -2
- package/dist/shared-nCJ3kgXi.js +0 -78
- package/dist/shared-rKEs-OIg.js +0 -64
- package/dist/shared-runtime-CTD5ywGR.js +0 -7
- package/dist/skills-install-CoUJk9aZ.js +0 -819
- package/dist/slash-commands-CKUKTwMa.js +0 -672
- package/dist/slash-commands.runtime-BrfELsEA.js +0 -20
- package/dist/slash-dispatch.runtime-CfjHhQmx.js +0 -38
- package/dist/slash-skill-commands.runtime-Bxm-652_.js +0 -8
- package/dist/speech-provider-BjDZhOzO.js +0 -190
- package/dist/src-BscJ0OyQ.js +0 -2739
- package/dist/startup-verification-Bwer6SPQ.js +0 -131
- package/dist/state-migrations-Dh5gaxn0.js +0 -845
- package/dist/status-CxiD9-L2.js +0 -2
- package/dist/status-all-CteZuvg_.js +0 -798
- package/dist/status-hLuTMJgT.js +0 -650
- package/dist/status-issues-CZdlgUVQ.js +0 -187
- package/dist/status-issues-Dx4xsUU6.js +0 -336
- package/dist/status-json-CU_sqXwN.js +0 -86
- package/dist/status-l8LyDb-X.js +0 -608
- package/dist/status-mpmZALQx.js +0 -3
- package/dist/status.command.text-runtime-Ck9abrv4.js +0 -18
- package/dist/status.scan-N2AgYo5y.js +0 -264
- package/dist/status.scan.fast-json-B8TmllqQ.js +0 -97
- package/dist/status.scan.fast-json-CiJfPteF.js +0 -2
- package/dist/status.scan.json-core-Bqw5Ethf.js +0 -254
- package/dist/status.summary-CN0kS8iw.js +0 -2
- package/dist/status.summary-joaOukPU.js +0 -210
- package/dist/sticker-cache-DXLBnGCi.js +0 -1573
- package/dist/sticker-vision.runtime-DP1NsaCZ.js +0 -16
- package/dist/storage-BRnLX4P7.js +0 -234
- package/dist/store-BvP1FWCI.js +0 -1343
- package/dist/store.runtime-NoYeZeac.js +0 -2
- package/dist/stream-BJ4HYVwA.js +0 -633
- package/dist/subagent-orphan-recovery-hTBxfwY4.js +0 -206
- package/dist/subagent-registry-runtime-3PIBzuDd.js +0 -2
- package/dist/targets-BAsektUE.js +0 -748
- package/dist/task-registry-delivery-runtime-CkJ71rwb.js +0 -2
- package/dist/task-registry.audit-gdULOiFp.js +0 -320
- package/dist/task-registry.maintenance-DhI_cx5O.js +0 -2
- package/dist/test-api-B4g2UUbw.js +0 -47
- package/dist/testing-DFnq00vr.js +0 -677
- package/dist/thread-bindings-CEuvQ0a5.js +0 -219
- package/dist/thread-bindings-CzFRpuy7.js +0 -534
- package/dist/thread-bindings-D-QA8SBh.js +0 -352
- package/dist/thread-bindings-EP9pAodb.js +0 -778
- package/dist/thread-bindings.discord-api-DKSgmJf_.js +0 -487
- package/dist/threading-CLq9AwSD.js +0 -832
- package/dist/threading-CQM3vrch.js +0 -2
- package/dist/threading-tool-context-DN0TQ-o6.js +0 -157
- package/dist/token-Bs7YIYbI.js +0 -82
- package/dist/tool-actions.runtime-mxezUV4D.js +0 -532
- package/dist/tools-effective-inventory-Dz6tWQxy.js +0 -148
- package/dist/ui-Cmeq4ZXg.js +0 -212
- package/dist/update-CADy3L5e.js +0 -1253
- package/dist/update-cli-B61EQsEl.js +0 -1447
- package/dist/update-runner--BEMGokU.js +0 -1195
- package/dist/verification-C5PYFyB0.js +0 -130
- package/dist/verification-CzP234iv.js +0 -2
- package/dist/x-search-ToCIaz7t.js +0 -166
- package/dist/zalo-BCF4thCG.js +0 -13
- package/dist/zalo-js-C4A7Gxjy.js +0 -1156
- package/dist/zalouser-CO0W9KZf.js +0 -22
- /package/dist/{apply.runtime-DBsSkbq5.js → apply.runtime-eSa-O_F2.js} +0 -0
- /package/dist/{audit-channel.allow-from.runtime-BE3PpHCg.js → audit-channel.allow-from.runtime-DNte8cmH.js} +0 -0
- /package/dist/{audit-channel.discord.runtime-CKQwUTue.js → audit-channel.discord.runtime-BWLuLCE0.js} +0 -0
- /package/dist/{audit-channel.zalouser.runtime-DvOclP53.js → audit-channel.zalouser.runtime-D_nIX7hv.js} +0 -0
- /package/dist/{gaxios-fetch-compat-DSrL7y2X.js → gaxios-fetch-compat-Dsb6Dess.js} +0 -0
- /package/dist/{gmail-watcher-lifecycle-CnbN1EfN.js → gmail-watcher-lifecycle-D6jhzjD2.js} +0 -0
- /package/dist/{hooks-policy-BjyPwwpQ.js → hooks-policy-BS7eSxPm.js} +0 -0
- /package/dist/{install-target-BXHZSfie.js → install-target-DunBxcXd.js} +0 -0
- /package/dist/{loader-_QerU742.js → loader-DrwewZGF.js} +0 -0
- /package/dist/{plugin-error-boundary-Ze95TniC.js → plugin-error-boundary-BkeWnWCG.js} +0 -0
- /package/dist/{plugin-health-checker-BdL9iBvs.js → plugin-health-checker--ObpW5TZ.js} +0 -0
- /package/dist/{plugin-hot-reload-t-fD3k4-.js → plugin-hot-reload-uBgB89Et.js} +0 -0
- /package/dist/{provider-api-key-auth.runtime-PWOshlD_.js → provider-api-key-auth.runtime-s-qWJDKg.js} +0 -0
- /package/dist/{provider-auth-login.runtime-B8ZroIz0.js → provider-auth-login.runtime-BJ3_RYVu.js} +0 -0
- /package/dist/{provider-discovery.runtime-C9i7ZYfW.js → provider-discovery.runtime-hzNrePTv.js} +0 -0
- /package/dist/{runtime-discord-ops.runtime-DD-5fh_t.js → runtime-discord-ops.runtime-DXnkkrxh.js} +0 -0
- /package/dist/{runtime-media-understanding.runtime-BnpKjL7w.js → runtime-media-understanding.runtime-CqkE-xQD.js} +0 -0
- /package/dist/{runtime-model-auth.runtime-BJVutp59.js → runtime-model-auth.runtime-Eceghr0K.js} +0 -0
- /package/dist/{runtime-slack-ops.runtime-BHlRr1Yr.js → runtime-slack-ops.runtime-BiNFnBIK.js} +0 -0
- /package/dist/{runtime-tts.runtime-CraALy-I.js → runtime-tts.runtime-DucSlAZ7.js} +0 -0
- /package/dist/{server-constants-DYaJmd0J.js → server-constants-DygisMJm.js} +0 -0
- /package/dist/{server-node-subscriptions-B0IJt_Ut.js → server-node-subscriptions-k9pzvFjc.js} +0 -0
- /package/dist/{server-startup-memory-DVUV59tb.js → server-startup-memory-BF7b6hV-.js} +0 -0
- /package/dist/{server-tailscale-YNZLPwK0.js → server-tailscale-C4_57iBM.js} +0 -0
- /package/dist/{services-D-LPmYY2.js → services-DGh2Nlk1.js} +0 -0
- /package/dist/{skill-scanner-CiGO-i2b.js → skill-scanner-CQOOKx41.js} +0 -0
- /package/dist/{ssh-config-BeNW3BFI.js → ssh-config-C0OJnSro.js} +0 -0
- /package/dist/{supervisor-log.runtime-C5wGw6pn.js → supervisor-log.runtime-C7jNH-kn.js} +0 -0
- /package/dist/{system-presence-Dllq5OiL.js → system-presence-Ctj0G23x.js} +0 -0
- /package/dist/{tts.runtime-DmgJozN5.js → tts.runtime-BmZyMwz6.js} +0 -0
|
@@ -0,0 +1,3685 @@
|
|
|
1
|
+
import { t as createNonExitingRuntime } from "./runtime-kS8e4c6-.js";
|
|
2
|
+
import { _ as normalizeAccountId, l as normalizeMainKey } from "./session-key-Do__tq1E.js";
|
|
3
|
+
import { a as shouldLogVerbose, r as logVerbose, s as warn, t as danger } from "./globals-CDtV0ht8.js";
|
|
4
|
+
import { r as normalizeStringEntries } from "./string-normalization-Ddc4JXRe.js";
|
|
5
|
+
import { n as logError } from "./logger-DdGvppaE.js";
|
|
6
|
+
import { c as loadConfig, x as writeConfigFile } from "./io-8kNEV_ou.js";
|
|
7
|
+
import { C as resolveSlackNativeStreaming, w as resolveSlackStreamingMode, x as mapStreamingModeToSlackLegacyDraftStreamMode } from "./zod-schema.providers-core-Bmbs-R4l.js";
|
|
8
|
+
import { c as normalizeResolvedSecretInputString } from "./types.secrets-BpcqHPAv.js";
|
|
9
|
+
import { u as updateLastRoute } from "./store-DJaTq2_f.js";
|
|
10
|
+
import { l as resolveStorePath } from "./paths-BJziUb2E.js";
|
|
11
|
+
import { a as resolveNativeSkillsEnabled, i as resolveNativeCommandsEnabled } from "./commands-DBiogh0E.js";
|
|
12
|
+
import { m as dispatchPluginInteractiveHandler } from "./types-CAIybprP.js";
|
|
13
|
+
import { t as pruneMapToMaxSize } from "./map-size-D3x3fybL.js";
|
|
14
|
+
import { f as parsePluginBindingApprovalCustomId, i as buildPluginBindingResolvedText, m as resolvePluginConversationBindingApproval } from "./conversation-binding-C9dt9f8n.js";
|
|
15
|
+
import { a as warnMissingProviderGroupPolicyFallbackOnce, i as resolveOpenProviderRuntimeGroupPolicy, r as resolveDefaultGroupPolicy } from "./runtime-group-policy-5Lr0Ieci.js";
|
|
16
|
+
import { i as resolveHumanDelayConfig } from "./identity-BuQIY7DT.js";
|
|
17
|
+
import { i as generateSecureToken } from "./secure-random-DOP5ahoQ.js";
|
|
18
|
+
import { T as resolveExecApprovalRequestAllowedDecisions } from "./exec-approvals-iwcnYHar.js";
|
|
19
|
+
import { r as enqueueSystemEvent } from "./system-events-Di7LVrMk.js";
|
|
20
|
+
import { c as getExecApprovalApproverDmNoticeText, t as buildApprovalInteractiveReply } from "./exec-approval-reply-CnW2WZof.js";
|
|
21
|
+
import { p as resolveSendableOutboundReplyParts } from "./reply-payload-DPD7eb4b.js";
|
|
22
|
+
import { c as resolveTextChunkLimit } from "./chunk-qF6XcBVp.js";
|
|
23
|
+
import { _ as resolveChannelConfigWrites } from "./channel-config-helpers-CDrwTLrh.js";
|
|
24
|
+
import { n as sleepWithAbort, t as computeBackoff } from "./backoff-Y3d8DA-r.js";
|
|
25
|
+
import "./core-_nKe7lGV.js";
|
|
26
|
+
import "./routing-BKQZI-Y4.js";
|
|
27
|
+
import "./secret-input-iODSIXu3.js";
|
|
28
|
+
import { o as createReplyDispatcherWithTyping, t as dispatchInboundMessage } from "./dispatch-au2t5HsH.js";
|
|
29
|
+
import { t as removeAckReactionAfterReply } from "./ack-reactions-BZ-o06GS.js";
|
|
30
|
+
import { t as resolveCommandAuthorizedFromAuthorizers } from "./command-gating-HO-bVa6h.js";
|
|
31
|
+
import { a as patchAllowlistUsersInConfigEntries, i as mergeAllowlist, n as buildAllowlistResolutionSummary, o as summarizeMapping, t as addAllowlistUserEntriesFromConfigEntry } from "./resolve-utils-lzHLWW1m.js";
|
|
32
|
+
import { c as resolvePinnedMainDmOwnerFromAllowlist } from "./dm-policy-shared-CaDbQVNm.js";
|
|
33
|
+
import { s as clearHistoryEntriesIfEnabled } from "./history-UDByIZZ1.js";
|
|
34
|
+
import "./reply-history-UL04gA_Z.js";
|
|
35
|
+
import "./runtime-env-Gi8zIuHa.js";
|
|
36
|
+
import { o as resolveExecApprovalCommandDisplay } from "./exec-approval-session-target-Ci45mXNL.js";
|
|
37
|
+
import { t as createChannelNativeApprovalRuntime } from "./approval-native-runtime-Bw_-auoy.js";
|
|
38
|
+
import { n as isDangerousNameMatchingEnabled } from "./dangerous-name-matching-DK6-X-Xt.js";
|
|
39
|
+
import "./config-runtime-D208l2BL.js";
|
|
40
|
+
import "./reply-runtime-CvaF7P6-.js";
|
|
41
|
+
import { t as createChannelReplyPipeline } from "./channel-reply-pipeline-Dyh1zCi9.js";
|
|
42
|
+
import "./channel-runtime-DLANIaFl.js";
|
|
43
|
+
import { n as resolveAgentOutboundIdentity } from "./identity-Rl0zYy8N.js";
|
|
44
|
+
import "./outbound-runtime-If8N44bT.js";
|
|
45
|
+
import { i as installRequestBodyLimitGuard } from "./http-body-CfWmnfar.js";
|
|
46
|
+
import "./infra-runtime-C9fJenAY.js";
|
|
47
|
+
import "./conversation-runtime-DvoDx5Lp.js";
|
|
48
|
+
import { n as chunkItems } from "./text-runtime-UxAYZSfy.js";
|
|
49
|
+
import "./agent-runtime-Cm6WYH1X.js";
|
|
50
|
+
import "./plugin-runtime-CE3WN5Ec.js";
|
|
51
|
+
import "./security-runtime-CYsRjgKf.js";
|
|
52
|
+
import { t as createConnectedChannelStatusPatch } from "./gateway-runtime-C3cNR3CI.js";
|
|
53
|
+
import { a as resolveSlackAccount, c as resolveSlackBotToken, s as resolveSlackAppToken } from "./accounts-BjXGAwJ1.js";
|
|
54
|
+
import { a as resolveSlackWebClientOptions } from "./client-D3PugecT.js";
|
|
55
|
+
import { _ as normalizeSlackApproverId, a as normalizeAllowList, g as isSlackExecApprovalClientEnabled, h as slackNativeApprovalAdapter, l as resolveSlackAllowListMatch, p as recordSlackThreadParticipation, s as normalizeSlackAllowOwnerEntry, u as resolveSlackUserAllowed, v as shouldHandleSlackExecApprovalRequest } from "./probe-CAA_bibg.js";
|
|
56
|
+
import { a as SLACK_TEXT_LIMIT, i as buildSlackBlocksFallbackText, r as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-DLHztqfo.js";
|
|
57
|
+
import { a as truncateSlackText, t as resolveSlackReplyBlocks } from "./reply-blocks-BpVJG1en.js";
|
|
58
|
+
import { n as resolveSlackUserAllowlist, t as resolveSlackChannelAllowlist } from "./resolve-channels-DJg8v6AE.js";
|
|
59
|
+
import { r as logTypingFailure, t as logAckFailure } from "./logging-DIucOhk1.js";
|
|
60
|
+
import { a as createStatusReactionController, r as DEFAULT_TIMING } from "./channel-feedback-Ro-BTZzh.js";
|
|
61
|
+
import { n as shouldDebounceTextInbound, t as createChannelInboundDebouncer } from "./channel-inbound-BbIwjinv.js";
|
|
62
|
+
import { t as resolveNativeCommandSessionTargets } from "./native-command-session-targets-oTjRWnvo.js";
|
|
63
|
+
import "./command-auth-BoH1IkmW.js";
|
|
64
|
+
import { f as removeSlackReaction, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage } from "./actions-BrAcUNm-.js";
|
|
65
|
+
import { a as resolveSlackSlashCommandConfig, c as resolveSlackEffectiveAllowFrom, d as normalizeSlackChannelType, f as resolveSlackChannelConfig, i as buildSlackSlashCommandMatcher, l as createSlackMonitorContext, m as resolveSlackThreadTargets, n as resolveSlackRoomContextHints, o as stripSlackMentionsForCommandDetection, p as resolveSlackChannelLabel, r as authorizeSlackDirectMessage, s as authorizeSlackSystemEventSender, t as prepareSlackMessage, u as isSlackChannelAllowedByPolicy } from "./prepare-8M63vDxs.js";
|
|
66
|
+
import "./webhook-request-guards-B8flzgTp.js";
|
|
67
|
+
import { c as createDraftStreamLoop } from "./channel-lifecycle-CobgWzsY.js";
|
|
68
|
+
import { a as resolveSlackThreadTs, i as readSlackReplyBlocks, n as deliverReplies, t as createSlackReplyDeliveryPlan } from "./replies-DuTJPPK4.js";
|
|
69
|
+
import * as SlackBoltNamespace from "@slack/bolt";
|
|
70
|
+
import SlackBolt from "@slack/bolt";
|
|
71
|
+
//#region extensions/slack/src/http/registry.ts
|
|
72
|
+
const slackHttpRoutes = /* @__PURE__ */ new Map();
|
|
73
|
+
function normalizeSlackWebhookPath(path) {
|
|
74
|
+
const trimmed = path?.trim();
|
|
75
|
+
if (!trimmed) return "/slack/events";
|
|
76
|
+
return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
77
|
+
}
|
|
78
|
+
function registerSlackHttpHandler(params) {
|
|
79
|
+
const normalizedPath = normalizeSlackWebhookPath(params.path);
|
|
80
|
+
if (slackHttpRoutes.has(normalizedPath)) {
|
|
81
|
+
const suffix = params.accountId ? ` for account "${params.accountId}"` : "";
|
|
82
|
+
params.log?.(`slack: webhook path ${normalizedPath} already registered${suffix}`);
|
|
83
|
+
return () => {};
|
|
84
|
+
}
|
|
85
|
+
slackHttpRoutes.set(normalizedPath, params.handler);
|
|
86
|
+
return () => {
|
|
87
|
+
slackHttpRoutes.delete(normalizedPath);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async function handleSlackHttpRequest(req, res) {
|
|
91
|
+
const url = new URL(req.url ?? "/", "http://localhost");
|
|
92
|
+
const handler = slackHttpRoutes.get(url.pathname);
|
|
93
|
+
if (!handler) return false;
|
|
94
|
+
await handler(req, res);
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region extensions/slack/src/channel-migration.ts
|
|
99
|
+
function resolveAccountChannels(cfg, accountId) {
|
|
100
|
+
if (!accountId) return {};
|
|
101
|
+
const normalized = normalizeAccountId(accountId);
|
|
102
|
+
const accounts = cfg.channels?.slack?.accounts;
|
|
103
|
+
if (!accounts || typeof accounts !== "object") return {};
|
|
104
|
+
const exact = accounts[normalized];
|
|
105
|
+
if (exact?.channels) return { channels: exact.channels };
|
|
106
|
+
const matchKey = Object.keys(accounts).find((key) => key.toLowerCase() === normalized.toLowerCase());
|
|
107
|
+
return { channels: matchKey ? accounts[matchKey]?.channels : void 0 };
|
|
108
|
+
}
|
|
109
|
+
function migrateSlackChannelsInPlace(channels, oldChannelId, newChannelId) {
|
|
110
|
+
if (!channels) return {
|
|
111
|
+
migrated: false,
|
|
112
|
+
skippedExisting: false
|
|
113
|
+
};
|
|
114
|
+
if (oldChannelId === newChannelId) return {
|
|
115
|
+
migrated: false,
|
|
116
|
+
skippedExisting: false
|
|
117
|
+
};
|
|
118
|
+
if (!Object.hasOwn(channels, oldChannelId)) return {
|
|
119
|
+
migrated: false,
|
|
120
|
+
skippedExisting: false
|
|
121
|
+
};
|
|
122
|
+
if (Object.hasOwn(channels, newChannelId)) return {
|
|
123
|
+
migrated: false,
|
|
124
|
+
skippedExisting: true
|
|
125
|
+
};
|
|
126
|
+
channels[newChannelId] = channels[oldChannelId];
|
|
127
|
+
delete channels[oldChannelId];
|
|
128
|
+
return {
|
|
129
|
+
migrated: true,
|
|
130
|
+
skippedExisting: false
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function migrateSlackChannelConfig(params) {
|
|
134
|
+
const scopes = [];
|
|
135
|
+
let migrated = false;
|
|
136
|
+
let skippedExisting = false;
|
|
137
|
+
const accountChannels = resolveAccountChannels(params.cfg, params.accountId).channels;
|
|
138
|
+
if (accountChannels) {
|
|
139
|
+
const result = migrateSlackChannelsInPlace(accountChannels, params.oldChannelId, params.newChannelId);
|
|
140
|
+
if (result.migrated) {
|
|
141
|
+
migrated = true;
|
|
142
|
+
scopes.push("account");
|
|
143
|
+
}
|
|
144
|
+
if (result.skippedExisting) skippedExisting = true;
|
|
145
|
+
}
|
|
146
|
+
const globalChannels = params.cfg.channels?.slack?.channels;
|
|
147
|
+
if (globalChannels) {
|
|
148
|
+
const result = migrateSlackChannelsInPlace(globalChannels, params.oldChannelId, params.newChannelId);
|
|
149
|
+
if (result.migrated) {
|
|
150
|
+
migrated = true;
|
|
151
|
+
scopes.push("global");
|
|
152
|
+
}
|
|
153
|
+
if (result.skippedExisting) skippedExisting = true;
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
migrated,
|
|
157
|
+
skippedExisting,
|
|
158
|
+
scopes
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region extensions/slack/src/monitor/events/channels.ts
|
|
163
|
+
function registerSlackChannelEvents(params) {
|
|
164
|
+
const { ctx, trackEvent } = params;
|
|
165
|
+
const enqueueChannelSystemEvent = (params) => {
|
|
166
|
+
if (!ctx.isChannelAllowed({
|
|
167
|
+
channelId: params.channelId,
|
|
168
|
+
channelName: params.channelName,
|
|
169
|
+
channelType: "channel"
|
|
170
|
+
})) return;
|
|
171
|
+
const label = resolveSlackChannelLabel({
|
|
172
|
+
channelId: params.channelId,
|
|
173
|
+
channelName: params.channelName
|
|
174
|
+
});
|
|
175
|
+
const sessionKey = ctx.resolveSlackSystemEventSessionKey({
|
|
176
|
+
channelId: params.channelId,
|
|
177
|
+
channelType: "channel"
|
|
178
|
+
});
|
|
179
|
+
enqueueSystemEvent(`Slack channel ${params.kind}: ${label}.`, {
|
|
180
|
+
sessionKey,
|
|
181
|
+
contextKey: `slack:channel:${params.kind}:${params.channelId ?? params.channelName ?? "unknown"}`
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
ctx.app.event("channel_created", async ({ event, body }) => {
|
|
185
|
+
try {
|
|
186
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
187
|
+
trackEvent?.();
|
|
188
|
+
const payload = event;
|
|
189
|
+
const channelId = payload.channel?.id;
|
|
190
|
+
const channelName = payload.channel?.name;
|
|
191
|
+
enqueueChannelSystemEvent({
|
|
192
|
+
kind: "created",
|
|
193
|
+
channelId,
|
|
194
|
+
channelName
|
|
195
|
+
});
|
|
196
|
+
} catch (err) {
|
|
197
|
+
ctx.runtime.error?.(danger(`slack channel created handler failed: ${String(err)}`));
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
ctx.app.event("channel_rename", async ({ event, body }) => {
|
|
201
|
+
try {
|
|
202
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
203
|
+
trackEvent?.();
|
|
204
|
+
const payload = event;
|
|
205
|
+
const channelId = payload.channel?.id;
|
|
206
|
+
enqueueChannelSystemEvent({
|
|
207
|
+
kind: "renamed",
|
|
208
|
+
channelId,
|
|
209
|
+
channelName: payload.channel?.name_normalized ?? payload.channel?.name
|
|
210
|
+
});
|
|
211
|
+
} catch (err) {
|
|
212
|
+
ctx.runtime.error?.(danger(`slack channel rename handler failed: ${String(err)}`));
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
ctx.app.event("channel_id_changed", async ({ event, body }) => {
|
|
216
|
+
try {
|
|
217
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
218
|
+
trackEvent?.();
|
|
219
|
+
const payload = event;
|
|
220
|
+
const oldChannelId = payload.old_channel_id;
|
|
221
|
+
const newChannelId = payload.new_channel_id;
|
|
222
|
+
if (!oldChannelId || !newChannelId) return;
|
|
223
|
+
const label = resolveSlackChannelLabel({
|
|
224
|
+
channelId: newChannelId,
|
|
225
|
+
channelName: (await ctx.resolveChannelName(newChannelId))?.name
|
|
226
|
+
});
|
|
227
|
+
ctx.runtime.log?.(warn(`[slack] Channel ID changed: ${oldChannelId} → ${newChannelId} (${label})`));
|
|
228
|
+
if (!resolveChannelConfigWrites({
|
|
229
|
+
cfg: ctx.cfg,
|
|
230
|
+
channelId: "slack",
|
|
231
|
+
accountId: ctx.accountId
|
|
232
|
+
})) {
|
|
233
|
+
ctx.runtime.log?.(warn("[slack] Config writes disabled; skipping channel config migration."));
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
const currentConfig = loadConfig();
|
|
237
|
+
const migration = migrateSlackChannelConfig({
|
|
238
|
+
cfg: currentConfig,
|
|
239
|
+
accountId: ctx.accountId,
|
|
240
|
+
oldChannelId,
|
|
241
|
+
newChannelId
|
|
242
|
+
});
|
|
243
|
+
if (migration.migrated) {
|
|
244
|
+
migrateSlackChannelConfig({
|
|
245
|
+
cfg: ctx.cfg,
|
|
246
|
+
accountId: ctx.accountId,
|
|
247
|
+
oldChannelId,
|
|
248
|
+
newChannelId
|
|
249
|
+
});
|
|
250
|
+
await writeConfigFile(currentConfig);
|
|
251
|
+
ctx.runtime.log?.(warn("[slack] Channel config migrated and saved successfully."));
|
|
252
|
+
} else if (migration.skippedExisting) ctx.runtime.log?.(warn(`[slack] Channel config already exists for ${newChannelId}; leaving ${oldChannelId} unchanged`));
|
|
253
|
+
else ctx.runtime.log?.(warn(`[slack] No config found for old channel ID ${oldChannelId}; migration logged only`));
|
|
254
|
+
} catch (err) {
|
|
255
|
+
ctx.runtime.error?.(danger(`slack channel_id_changed handler failed: ${String(err)}`));
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region extensions/slack/src/monitor/mrkdwn.ts
|
|
261
|
+
function escapeSlackMrkdwn(value) {
|
|
262
|
+
return value.replaceAll("\\", "\\\\").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/([*_`~])/g, "\\$1");
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region extensions/slack/src/monitor/events/interactions.block-actions.ts
|
|
266
|
+
function readOptionValues(options) {
|
|
267
|
+
if (!Array.isArray(options)) return;
|
|
268
|
+
const values = options.map((option) => option && typeof option === "object" ? option.value : null).filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
269
|
+
return values.length > 0 ? values : void 0;
|
|
270
|
+
}
|
|
271
|
+
function readOptionLabels(options) {
|
|
272
|
+
if (!Array.isArray(options)) return;
|
|
273
|
+
const labels = options.map((option) => option && typeof option === "object" ? option.text?.text ?? null : null).filter((label) => typeof label === "string" && label.trim().length > 0);
|
|
274
|
+
return labels.length > 0 ? labels : void 0;
|
|
275
|
+
}
|
|
276
|
+
function uniqueNonEmptyStrings(values) {
|
|
277
|
+
const unique = [];
|
|
278
|
+
const seen = /* @__PURE__ */ new Set();
|
|
279
|
+
for (const entry of values) {
|
|
280
|
+
if (typeof entry !== "string") continue;
|
|
281
|
+
const trimmed = entry.trim();
|
|
282
|
+
if (!trimmed || seen.has(trimmed)) continue;
|
|
283
|
+
seen.add(trimmed);
|
|
284
|
+
unique.push(trimmed);
|
|
285
|
+
}
|
|
286
|
+
return unique;
|
|
287
|
+
}
|
|
288
|
+
function collectRichTextFragments(value, out) {
|
|
289
|
+
if (!value || typeof value !== "object") return;
|
|
290
|
+
const typed = value;
|
|
291
|
+
if (typeof typed.text === "string" && typed.text.trim().length > 0) out.push(typed.text.trim());
|
|
292
|
+
if (Array.isArray(typed.elements)) for (const child of typed.elements) collectRichTextFragments(child, out);
|
|
293
|
+
}
|
|
294
|
+
function summarizeRichTextPreview(value) {
|
|
295
|
+
const fragments = [];
|
|
296
|
+
collectRichTextFragments(value, fragments);
|
|
297
|
+
if (fragments.length === 0) return;
|
|
298
|
+
const joined = fragments.join(" ").replace(/\s+/g, " ").trim();
|
|
299
|
+
if (!joined) return;
|
|
300
|
+
const max = 120;
|
|
301
|
+
return joined.length <= max ? joined : `${joined.slice(0, max - 1)}…`;
|
|
302
|
+
}
|
|
303
|
+
function readInteractionAction(raw) {
|
|
304
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
|
|
305
|
+
return raw;
|
|
306
|
+
}
|
|
307
|
+
function summarizeAction(action) {
|
|
308
|
+
const typed = action;
|
|
309
|
+
const actionType = typed.type;
|
|
310
|
+
const selectedUsers = uniqueNonEmptyStrings([...typed.selected_user ? [typed.selected_user] : [], ...Array.isArray(typed.selected_users) ? typed.selected_users : []]);
|
|
311
|
+
const selectedChannels = uniqueNonEmptyStrings([...typed.selected_channel ? [typed.selected_channel] : [], ...Array.isArray(typed.selected_channels) ? typed.selected_channels : []]);
|
|
312
|
+
const selectedConversations = uniqueNonEmptyStrings([...typed.selected_conversation ? [typed.selected_conversation] : [], ...Array.isArray(typed.selected_conversations) ? typed.selected_conversations : []]);
|
|
313
|
+
const selectedValues = uniqueNonEmptyStrings([
|
|
314
|
+
...typed.selected_option?.value ? [typed.selected_option.value] : [],
|
|
315
|
+
...readOptionValues(typed.selected_options) ?? [],
|
|
316
|
+
...selectedUsers,
|
|
317
|
+
...selectedChannels,
|
|
318
|
+
...selectedConversations
|
|
319
|
+
]);
|
|
320
|
+
const selectedLabels = uniqueNonEmptyStrings([...typed.selected_option?.text?.text ? [typed.selected_option.text.text] : [], ...readOptionLabels(typed.selected_options) ?? []]);
|
|
321
|
+
const inputValue = typeof typed.value === "string" ? typed.value : void 0;
|
|
322
|
+
const inputNumber = actionType === "number_input" && inputValue != null ? Number.parseFloat(inputValue) : void 0;
|
|
323
|
+
const parsedNumber = Number.isFinite(inputNumber) ? inputNumber : void 0;
|
|
324
|
+
const inputEmail = actionType === "email_text_input" && inputValue?.includes("@") ? inputValue : void 0;
|
|
325
|
+
let inputUrl;
|
|
326
|
+
if (actionType === "url_text_input" && inputValue) try {
|
|
327
|
+
inputUrl = new URL(inputValue).toString();
|
|
328
|
+
} catch {
|
|
329
|
+
inputUrl = void 0;
|
|
330
|
+
}
|
|
331
|
+
const richTextValue = actionType === "rich_text_input" ? typed.rich_text_value : void 0;
|
|
332
|
+
const richTextPreview = summarizeRichTextPreview(richTextValue);
|
|
333
|
+
return {
|
|
334
|
+
actionType,
|
|
335
|
+
inputKind: actionType === "number_input" ? "number" : actionType === "email_text_input" ? "email" : actionType === "url_text_input" ? "url" : actionType === "rich_text_input" ? "rich_text" : inputValue != null ? "text" : void 0,
|
|
336
|
+
value: typed.value,
|
|
337
|
+
selectedValues: selectedValues.length > 0 ? selectedValues : void 0,
|
|
338
|
+
selectedUsers: selectedUsers.length > 0 ? selectedUsers : void 0,
|
|
339
|
+
selectedChannels: selectedChannels.length > 0 ? selectedChannels : void 0,
|
|
340
|
+
selectedConversations: selectedConversations.length > 0 ? selectedConversations : void 0,
|
|
341
|
+
selectedLabels: selectedLabels.length > 0 ? selectedLabels : void 0,
|
|
342
|
+
selectedDate: typed.selected_date,
|
|
343
|
+
selectedTime: typed.selected_time,
|
|
344
|
+
selectedDateTime: typeof typed.selected_date_time === "number" ? typed.selected_date_time : void 0,
|
|
345
|
+
inputValue,
|
|
346
|
+
inputNumber: parsedNumber,
|
|
347
|
+
inputEmail,
|
|
348
|
+
inputUrl,
|
|
349
|
+
richTextValue,
|
|
350
|
+
richTextPreview,
|
|
351
|
+
workflowTriggerUrl: typed.workflow?.trigger_url,
|
|
352
|
+
workflowId: typed.workflow?.workflow_id
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function isBulkActionsBlock(block) {
|
|
356
|
+
return block.type === "actions" && Array.isArray(block.elements) && block.elements.length > 0 && block.elements.every((el) => typeof el.action_id === "string" && el.action_id.includes("_all_"));
|
|
357
|
+
}
|
|
358
|
+
function formatInteractionSelectionLabel(params) {
|
|
359
|
+
if (params.summary.actionType === "button" && params.buttonText?.trim()) return params.buttonText.trim();
|
|
360
|
+
if (params.summary.selectedLabels?.length) {
|
|
361
|
+
if (params.summary.selectedLabels.length <= 3) return params.summary.selectedLabels.join(", ");
|
|
362
|
+
return `${params.summary.selectedLabels.slice(0, 3).join(", ")} +${params.summary.selectedLabels.length - 3}`;
|
|
363
|
+
}
|
|
364
|
+
if (params.summary.selectedValues?.length) {
|
|
365
|
+
if (params.summary.selectedValues.length <= 3) return params.summary.selectedValues.join(", ");
|
|
366
|
+
return `${params.summary.selectedValues.slice(0, 3).join(", ")} +${params.summary.selectedValues.length - 3}`;
|
|
367
|
+
}
|
|
368
|
+
if (params.summary.selectedDate) return params.summary.selectedDate;
|
|
369
|
+
if (params.summary.selectedTime) return params.summary.selectedTime;
|
|
370
|
+
if (typeof params.summary.selectedDateTime === "number") return (/* @__PURE__ */ new Date(params.summary.selectedDateTime * 1e3)).toISOString();
|
|
371
|
+
if (params.summary.richTextPreview) return params.summary.richTextPreview;
|
|
372
|
+
if (params.summary.value?.trim()) return params.summary.value.trim();
|
|
373
|
+
return params.actionId;
|
|
374
|
+
}
|
|
375
|
+
function formatInteractionConfirmationText(params) {
|
|
376
|
+
const actor = params.userId?.trim() ? ` by <@${params.userId.trim()}>` : "";
|
|
377
|
+
return `:white_check_mark: *${escapeSlackMrkdwn(params.selectedLabel)}* selected${actor}`;
|
|
378
|
+
}
|
|
379
|
+
function buildSlackPluginInteractionData(params) {
|
|
380
|
+
const actionId = params.actionId.trim();
|
|
381
|
+
if (!actionId) return null;
|
|
382
|
+
const payload = params.summary.value?.trim() || params.summary.selectedValues?.map((value) => value.trim()).find(Boolean) || "";
|
|
383
|
+
if (actionId === "openclaw:reply_button" || actionId === "openclaw:reply_select" || actionId.startsWith(`openclaw:reply_button:`) || actionId.startsWith(`openclaw:reply_select:`)) return payload || null;
|
|
384
|
+
return payload ? `${actionId}:${payload}` : actionId;
|
|
385
|
+
}
|
|
386
|
+
function isSlackReplyActionId(actionId) {
|
|
387
|
+
return actionId === "openclaw:reply_button" || actionId === "openclaw:reply_select" || actionId.startsWith(`openclaw:reply_button:`) || actionId.startsWith(`openclaw:reply_select:`);
|
|
388
|
+
}
|
|
389
|
+
function buildSlackPluginInteractionId(params) {
|
|
390
|
+
const primaryValue = params.summary.value?.trim() || params.summary.selectedValues?.map((value) => value.trim()).find(Boolean) || "";
|
|
391
|
+
return [
|
|
392
|
+
params.userId?.trim() || "",
|
|
393
|
+
params.channelId?.trim() || "",
|
|
394
|
+
params.messageTs?.trim() || "",
|
|
395
|
+
params.triggerId?.trim() || "",
|
|
396
|
+
params.actionId.trim(),
|
|
397
|
+
primaryValue
|
|
398
|
+
].join(":");
|
|
399
|
+
}
|
|
400
|
+
function parseSlackBlockAction(params) {
|
|
401
|
+
const typedBody = params.body;
|
|
402
|
+
const typedAction = readInteractionAction(params.action);
|
|
403
|
+
if (!typedAction) {
|
|
404
|
+
params.log?.(`slack:interaction malformed action payload channel=${typedBody.channel?.id ?? typedBody.container?.channel_id ?? "unknown"} user=${typedBody.user?.id ?? "unknown"}`);
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
const typedActionWithText = typedAction;
|
|
408
|
+
return {
|
|
409
|
+
typedBody,
|
|
410
|
+
typedAction,
|
|
411
|
+
typedActionWithText,
|
|
412
|
+
actionId: typeof typedActionWithText.action_id === "string" ? typedActionWithText.action_id : "unknown",
|
|
413
|
+
blockId: typedActionWithText.block_id,
|
|
414
|
+
userId: typedBody.user?.id ?? "unknown",
|
|
415
|
+
channelId: typedBody.channel?.id ?? typedBody.container?.channel_id,
|
|
416
|
+
messageTs: typedBody.message?.ts ?? typedBody.container?.message_ts,
|
|
417
|
+
threadTs: typedBody.container?.thread_ts,
|
|
418
|
+
actionSummary: summarizeAction(typedAction)
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
async function respondEphemeral(respond, text) {
|
|
422
|
+
if (!respond) return;
|
|
423
|
+
try {
|
|
424
|
+
await respond({
|
|
425
|
+
text,
|
|
426
|
+
response_type: "ephemeral"
|
|
427
|
+
});
|
|
428
|
+
} catch {}
|
|
429
|
+
}
|
|
430
|
+
async function updateSlackInteractionMessage(params) {
|
|
431
|
+
if (!params.channelId || !params.messageTs) return;
|
|
432
|
+
await params.ctx.app.client.chat.update({
|
|
433
|
+
channel: params.channelId,
|
|
434
|
+
ts: params.messageTs,
|
|
435
|
+
text: params.text,
|
|
436
|
+
...params.blocks ? { blocks: params.blocks } : {}
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
async function authorizeSlackBlockAction(params) {
|
|
440
|
+
const auth = await authorizeSlackSystemEventSender({
|
|
441
|
+
ctx: params.ctx,
|
|
442
|
+
senderId: params.parsed.userId,
|
|
443
|
+
channelId: params.parsed.channelId
|
|
444
|
+
});
|
|
445
|
+
if (auth.allowed) return auth;
|
|
446
|
+
params.ctx.runtime.log?.(`slack:interaction drop action=${params.parsed.actionId} user=${params.parsed.userId} channel=${params.parsed.channelId ?? "unknown"} reason=${auth.reason ?? "unauthorized"}`);
|
|
447
|
+
await respondEphemeral(params.respond, "You are not authorized to use this control.");
|
|
448
|
+
return { allowed: false };
|
|
449
|
+
}
|
|
450
|
+
async function handleSlackPluginBindingApproval(params) {
|
|
451
|
+
const pluginBindingApproval = parsePluginBindingApprovalCustomId(params.pluginInteractionData);
|
|
452
|
+
if (!pluginBindingApproval) return false;
|
|
453
|
+
const resolved = await resolvePluginConversationBindingApproval({
|
|
454
|
+
approvalId: pluginBindingApproval.approvalId,
|
|
455
|
+
decision: pluginBindingApproval.decision,
|
|
456
|
+
senderId: params.parsed.userId
|
|
457
|
+
});
|
|
458
|
+
try {
|
|
459
|
+
await updateSlackInteractionMessage({
|
|
460
|
+
ctx: params.ctx,
|
|
461
|
+
channelId: params.parsed.channelId,
|
|
462
|
+
messageTs: params.parsed.messageTs,
|
|
463
|
+
text: params.parsed.typedBody.message?.text ?? "",
|
|
464
|
+
blocks: []
|
|
465
|
+
});
|
|
466
|
+
} catch {}
|
|
467
|
+
await respondEphemeral(params.respond, buildPluginBindingResolvedText(resolved));
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
async function dispatchSlackPluginInteraction(params) {
|
|
471
|
+
const pluginInteractionId = buildSlackPluginInteractionId({
|
|
472
|
+
userId: params.parsed.userId,
|
|
473
|
+
channelId: params.parsed.channelId,
|
|
474
|
+
messageTs: params.parsed.messageTs,
|
|
475
|
+
triggerId: params.parsed.typedBody.trigger_id,
|
|
476
|
+
actionId: params.parsed.actionId,
|
|
477
|
+
summary: params.parsed.actionSummary
|
|
478
|
+
});
|
|
479
|
+
if (await handleSlackPluginBindingApproval({
|
|
480
|
+
ctx: params.ctx,
|
|
481
|
+
parsed: params.parsed,
|
|
482
|
+
pluginInteractionData: params.pluginInteractionData,
|
|
483
|
+
respond: params.respond
|
|
484
|
+
})) return true;
|
|
485
|
+
const pluginResult = await dispatchPluginInteractiveHandler({
|
|
486
|
+
channel: "slack",
|
|
487
|
+
data: params.pluginInteractionData,
|
|
488
|
+
interactionId: pluginInteractionId,
|
|
489
|
+
ctx: {
|
|
490
|
+
accountId: params.ctx.accountId,
|
|
491
|
+
interactionId: pluginInteractionId,
|
|
492
|
+
conversationId: params.parsed.channelId ?? "",
|
|
493
|
+
parentConversationId: void 0,
|
|
494
|
+
threadId: params.parsed.threadTs,
|
|
495
|
+
senderId: params.parsed.userId,
|
|
496
|
+
senderUsername: void 0,
|
|
497
|
+
auth: params.auth,
|
|
498
|
+
interaction: {
|
|
499
|
+
kind: params.parsed.actionSummary.actionType === "button" ? "button" : "select",
|
|
500
|
+
actionId: params.parsed.actionId,
|
|
501
|
+
blockId: params.parsed.blockId,
|
|
502
|
+
messageTs: params.parsed.messageTs,
|
|
503
|
+
threadTs: params.parsed.threadTs,
|
|
504
|
+
value: params.parsed.actionSummary.value,
|
|
505
|
+
selectedValues: params.parsed.actionSummary.selectedValues,
|
|
506
|
+
selectedLabels: params.parsed.actionSummary.selectedLabels,
|
|
507
|
+
triggerId: params.parsed.typedBody.trigger_id,
|
|
508
|
+
responseUrl: params.parsed.typedBody.response_url
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
respond: {
|
|
512
|
+
acknowledge: async () => {},
|
|
513
|
+
reply: async ({ text, responseType }) => {
|
|
514
|
+
if (!text) return;
|
|
515
|
+
await params.respond?.({
|
|
516
|
+
text,
|
|
517
|
+
response_type: responseType ?? "ephemeral"
|
|
518
|
+
});
|
|
519
|
+
},
|
|
520
|
+
followUp: async ({ text, responseType }) => {
|
|
521
|
+
if (!text) return;
|
|
522
|
+
await params.respond?.({
|
|
523
|
+
text,
|
|
524
|
+
response_type: responseType ?? "ephemeral"
|
|
525
|
+
});
|
|
526
|
+
},
|
|
527
|
+
editMessage: async ({ text, blocks }) => {
|
|
528
|
+
await updateSlackInteractionMessage({
|
|
529
|
+
ctx: params.ctx,
|
|
530
|
+
channelId: params.parsed.channelId,
|
|
531
|
+
messageTs: params.parsed.messageTs,
|
|
532
|
+
text: text ?? params.parsed.typedBody.message?.text ?? "",
|
|
533
|
+
blocks: Array.isArray(blocks) ? blocks : void 0
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
return pluginResult.matched && pluginResult.handled;
|
|
539
|
+
}
|
|
540
|
+
function enqueueSlackBlockActionEvent(params) {
|
|
541
|
+
const eventPayload = {
|
|
542
|
+
interactionType: "block_action",
|
|
543
|
+
actionId: params.parsed.actionId,
|
|
544
|
+
blockId: params.parsed.blockId,
|
|
545
|
+
...params.parsed.actionSummary,
|
|
546
|
+
userId: params.parsed.userId,
|
|
547
|
+
teamId: params.parsed.typedBody.team?.id,
|
|
548
|
+
triggerId: params.parsed.typedBody.trigger_id,
|
|
549
|
+
responseUrl: params.parsed.typedBody.response_url,
|
|
550
|
+
channelId: params.parsed.channelId,
|
|
551
|
+
messageTs: params.parsed.messageTs,
|
|
552
|
+
threadTs: params.parsed.threadTs
|
|
553
|
+
};
|
|
554
|
+
params.ctx.runtime.log?.(`slack:interaction action=${params.parsed.actionId} type=${params.parsed.actionSummary.actionType ?? "unknown"} user=${params.parsed.userId} channel=${params.parsed.channelId}`);
|
|
555
|
+
const sessionKey = params.ctx.resolveSlackSystemEventSessionKey({
|
|
556
|
+
channelId: params.parsed.channelId,
|
|
557
|
+
channelType: params.auth.channelType,
|
|
558
|
+
senderId: params.parsed.userId
|
|
559
|
+
});
|
|
560
|
+
const contextParts = [
|
|
561
|
+
"slack:interaction",
|
|
562
|
+
params.parsed.channelId,
|
|
563
|
+
params.parsed.messageTs,
|
|
564
|
+
params.parsed.actionId
|
|
565
|
+
].filter(Boolean);
|
|
566
|
+
enqueueSystemEvent(params.formatSystemEvent(eventPayload), {
|
|
567
|
+
sessionKey,
|
|
568
|
+
contextKey: contextParts.join(":")
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
function buildSlackConfirmationBlocks(params) {
|
|
572
|
+
const selectedLabel = formatInteractionSelectionLabel({
|
|
573
|
+
actionId: params.parsed.actionId,
|
|
574
|
+
summary: params.parsed.actionSummary,
|
|
575
|
+
buttonText: params.parsed.typedActionWithText.text?.text
|
|
576
|
+
});
|
|
577
|
+
let updatedBlocks = params.originalBlocks.map((block) => {
|
|
578
|
+
const typedBlock = block;
|
|
579
|
+
if (typedBlock.type === "actions" && typedBlock.block_id === params.parsed.blockId) return {
|
|
580
|
+
type: "context",
|
|
581
|
+
elements: [{
|
|
582
|
+
type: "mrkdwn",
|
|
583
|
+
text: formatInteractionConfirmationText({
|
|
584
|
+
selectedLabel,
|
|
585
|
+
userId: params.parsed.userId
|
|
586
|
+
})
|
|
587
|
+
}]
|
|
588
|
+
};
|
|
589
|
+
return block;
|
|
590
|
+
});
|
|
591
|
+
if (!updatedBlocks.some((block) => {
|
|
592
|
+
const typedBlock = block;
|
|
593
|
+
return typedBlock.type === "actions" && !isBulkActionsBlock(typedBlock);
|
|
594
|
+
})) updatedBlocks = updatedBlocks.filter((block, index) => {
|
|
595
|
+
const typedBlock = block;
|
|
596
|
+
if (isBulkActionsBlock(typedBlock)) return false;
|
|
597
|
+
if (typedBlock.type !== "divider") return true;
|
|
598
|
+
const next = updatedBlocks[index + 1];
|
|
599
|
+
return !next || !isBulkActionsBlock(next);
|
|
600
|
+
});
|
|
601
|
+
return updatedBlocks;
|
|
602
|
+
}
|
|
603
|
+
async function updateSlackLegacyBlockAction(params) {
|
|
604
|
+
const originalBlocks = params.parsed.typedBody.message?.blocks;
|
|
605
|
+
if (!Array.isArray(originalBlocks) || !params.parsed.channelId || !params.parsed.messageTs || !params.parsed.blockId) return;
|
|
606
|
+
try {
|
|
607
|
+
await updateSlackInteractionMessage({
|
|
608
|
+
ctx: params.ctx,
|
|
609
|
+
channelId: params.parsed.channelId,
|
|
610
|
+
messageTs: params.parsed.messageTs,
|
|
611
|
+
text: params.parsed.typedBody.message?.text ?? "",
|
|
612
|
+
blocks: buildSlackConfirmationBlocks({
|
|
613
|
+
parsed: params.parsed,
|
|
614
|
+
originalBlocks
|
|
615
|
+
})
|
|
616
|
+
});
|
|
617
|
+
} catch {
|
|
618
|
+
await respondEphemeral(params.respond, `Button "${params.parsed.actionId}" clicked!`);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
async function handleSlackBlockAction(params) {
|
|
622
|
+
const { ack, body, action, respond } = params.args;
|
|
623
|
+
await ack();
|
|
624
|
+
if (params.ctx.shouldDropMismatchedSlackEvent?.(body)) {
|
|
625
|
+
params.ctx.runtime.log?.("slack:interaction drop block action payload (mismatched app/team)");
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
const parsed = parseSlackBlockAction({
|
|
629
|
+
body,
|
|
630
|
+
action,
|
|
631
|
+
log: params.ctx.runtime.log
|
|
632
|
+
});
|
|
633
|
+
if (!parsed) return;
|
|
634
|
+
const auth = await authorizeSlackBlockAction({
|
|
635
|
+
ctx: params.ctx,
|
|
636
|
+
parsed,
|
|
637
|
+
respond
|
|
638
|
+
});
|
|
639
|
+
if (!auth.allowed) return;
|
|
640
|
+
const pluginInteractionData = buildSlackPluginInteractionData({
|
|
641
|
+
actionId: parsed.actionId,
|
|
642
|
+
summary: parsed.actionSummary
|
|
643
|
+
});
|
|
644
|
+
if (pluginInteractionData && isSlackReplyActionId(parsed.actionId)) {
|
|
645
|
+
if (await handleSlackPluginBindingApproval({
|
|
646
|
+
ctx: params.ctx,
|
|
647
|
+
parsed,
|
|
648
|
+
pluginInteractionData,
|
|
649
|
+
respond
|
|
650
|
+
})) return;
|
|
651
|
+
} else if (pluginInteractionData) {
|
|
652
|
+
if (await dispatchSlackPluginInteraction({
|
|
653
|
+
ctx: params.ctx,
|
|
654
|
+
parsed,
|
|
655
|
+
pluginInteractionData,
|
|
656
|
+
auth: { isAuthorizedSender: true },
|
|
657
|
+
respond
|
|
658
|
+
})) return;
|
|
659
|
+
}
|
|
660
|
+
enqueueSlackBlockActionEvent({
|
|
661
|
+
ctx: params.ctx,
|
|
662
|
+
parsed,
|
|
663
|
+
auth,
|
|
664
|
+
formatSystemEvent: params.formatSystemEvent
|
|
665
|
+
});
|
|
666
|
+
await updateSlackLegacyBlockAction({
|
|
667
|
+
ctx: params.ctx,
|
|
668
|
+
parsed,
|
|
669
|
+
respond
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
function registerSlackBlockActionHandler(params) {
|
|
673
|
+
if (typeof params.ctx.app.action !== "function") return;
|
|
674
|
+
params.ctx.app.action(/.+/, async (args) => {
|
|
675
|
+
await handleSlackBlockAction({
|
|
676
|
+
ctx: params.ctx,
|
|
677
|
+
args,
|
|
678
|
+
formatSystemEvent: params.formatSystemEvent
|
|
679
|
+
});
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
//#endregion
|
|
683
|
+
//#region extensions/slack/src/modal-metadata.ts
|
|
684
|
+
function normalizeString(value) {
|
|
685
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
686
|
+
}
|
|
687
|
+
function parseSlackModalPrivateMetadata(raw) {
|
|
688
|
+
if (typeof raw !== "string" || raw.trim().length === 0) return {};
|
|
689
|
+
try {
|
|
690
|
+
const parsed = JSON.parse(raw);
|
|
691
|
+
return {
|
|
692
|
+
sessionKey: normalizeString(parsed.sessionKey),
|
|
693
|
+
channelId: normalizeString(parsed.channelId),
|
|
694
|
+
channelType: normalizeString(parsed.channelType),
|
|
695
|
+
userId: normalizeString(parsed.userId)
|
|
696
|
+
};
|
|
697
|
+
} catch {
|
|
698
|
+
return {};
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region extensions/slack/src/monitor/events/interactions.modal.ts
|
|
703
|
+
function resolveModalSessionRouting(params) {
|
|
704
|
+
const metadata = params.metadata;
|
|
705
|
+
if (metadata.sessionKey) return {
|
|
706
|
+
sessionKey: metadata.sessionKey,
|
|
707
|
+
channelId: metadata.channelId,
|
|
708
|
+
channelType: metadata.channelType
|
|
709
|
+
};
|
|
710
|
+
if (metadata.channelId) return {
|
|
711
|
+
sessionKey: params.ctx.resolveSlackSystemEventSessionKey({
|
|
712
|
+
channelId: metadata.channelId,
|
|
713
|
+
channelType: metadata.channelType,
|
|
714
|
+
senderId: params.userId
|
|
715
|
+
}),
|
|
716
|
+
channelId: metadata.channelId,
|
|
717
|
+
channelType: metadata.channelType
|
|
718
|
+
};
|
|
719
|
+
return { sessionKey: params.ctx.resolveSlackSystemEventSessionKey({}) };
|
|
720
|
+
}
|
|
721
|
+
function summarizeSlackViewLifecycleContext(view) {
|
|
722
|
+
const rootViewId = view.root_view_id;
|
|
723
|
+
const previousViewId = view.previous_view_id;
|
|
724
|
+
return {
|
|
725
|
+
rootViewId,
|
|
726
|
+
previousViewId,
|
|
727
|
+
externalId: view.external_id,
|
|
728
|
+
viewHash: view.hash,
|
|
729
|
+
isStackedView: Boolean(previousViewId)
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
function resolveSlackModalEventBase(params) {
|
|
733
|
+
const metadata = parseSlackModalPrivateMetadata(params.body.view?.private_metadata);
|
|
734
|
+
const callbackId = params.body.view?.callback_id ?? "unknown";
|
|
735
|
+
const userId = params.body.user?.id ?? "unknown";
|
|
736
|
+
const viewId = params.body.view?.id;
|
|
737
|
+
const inputs = params.summarizeViewState(params.body.view?.state?.values);
|
|
738
|
+
const sessionRouting = resolveModalSessionRouting({
|
|
739
|
+
ctx: params.ctx,
|
|
740
|
+
metadata,
|
|
741
|
+
userId
|
|
742
|
+
});
|
|
743
|
+
return {
|
|
744
|
+
callbackId,
|
|
745
|
+
userId,
|
|
746
|
+
expectedUserId: metadata.userId,
|
|
747
|
+
viewId,
|
|
748
|
+
sessionRouting,
|
|
749
|
+
payload: {
|
|
750
|
+
actionId: `view:${callbackId}`,
|
|
751
|
+
callbackId,
|
|
752
|
+
viewId,
|
|
753
|
+
userId,
|
|
754
|
+
teamId: params.body.team?.id,
|
|
755
|
+
...summarizeSlackViewLifecycleContext({
|
|
756
|
+
root_view_id: params.body.view?.root_view_id,
|
|
757
|
+
previous_view_id: params.body.view?.previous_view_id,
|
|
758
|
+
external_id: params.body.view?.external_id,
|
|
759
|
+
hash: params.body.view?.hash
|
|
760
|
+
}),
|
|
761
|
+
privateMetadata: params.body.view?.private_metadata,
|
|
762
|
+
routedChannelId: sessionRouting.channelId,
|
|
763
|
+
routedChannelType: sessionRouting.channelType,
|
|
764
|
+
inputs
|
|
765
|
+
}
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
async function emitSlackModalLifecycleEvent(params) {
|
|
769
|
+
const { callbackId, userId, expectedUserId, viewId, sessionRouting, payload } = resolveSlackModalEventBase({
|
|
770
|
+
ctx: params.ctx,
|
|
771
|
+
body: params.body,
|
|
772
|
+
summarizeViewState: params.summarizeViewState
|
|
773
|
+
});
|
|
774
|
+
const isViewClosed = params.interactionType === "view_closed";
|
|
775
|
+
const isCleared = params.body.is_cleared === true;
|
|
776
|
+
const eventPayload = isViewClosed ? {
|
|
777
|
+
interactionType: params.interactionType,
|
|
778
|
+
...payload,
|
|
779
|
+
isCleared
|
|
780
|
+
} : {
|
|
781
|
+
interactionType: params.interactionType,
|
|
782
|
+
...payload
|
|
783
|
+
};
|
|
784
|
+
if (isViewClosed) params.ctx.runtime.log?.(`slack:interaction view_closed callback=${callbackId} user=${userId} cleared=${isCleared}`);
|
|
785
|
+
else params.ctx.runtime.log?.(`slack:interaction view_submission callback=${callbackId} user=${userId} inputs=${payload.inputs.length}`);
|
|
786
|
+
if (!expectedUserId) {
|
|
787
|
+
params.ctx.runtime.log?.(`slack:interaction drop modal callback=${callbackId} user=${userId} reason=missing-expected-user`);
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
const auth = await authorizeSlackSystemEventSender({
|
|
791
|
+
ctx: params.ctx,
|
|
792
|
+
senderId: userId,
|
|
793
|
+
channelId: sessionRouting.channelId,
|
|
794
|
+
channelType: sessionRouting.channelType,
|
|
795
|
+
expectedSenderId: expectedUserId
|
|
796
|
+
});
|
|
797
|
+
if (!auth.allowed) {
|
|
798
|
+
params.ctx.runtime.log?.(`slack:interaction drop modal callback=${callbackId} user=${userId} reason=${auth.reason ?? "unauthorized"}`);
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
enqueueSystemEvent(params.formatSystemEvent(eventPayload), {
|
|
802
|
+
sessionKey: sessionRouting.sessionKey,
|
|
803
|
+
contextKey: [
|
|
804
|
+
params.contextPrefix,
|
|
805
|
+
callbackId,
|
|
806
|
+
viewId,
|
|
807
|
+
userId
|
|
808
|
+
].filter(Boolean).join(":")
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
function registerModalLifecycleHandler(params) {
|
|
812
|
+
params.register(params.matcher, async ({ ack, body }) => {
|
|
813
|
+
await ack();
|
|
814
|
+
if (params.ctx.shouldDropMismatchedSlackEvent?.(body)) {
|
|
815
|
+
params.ctx.runtime.log?.(`slack:interaction drop ${params.interactionType} payload (mismatched app/team)`);
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
await emitSlackModalLifecycleEvent({
|
|
819
|
+
ctx: params.ctx,
|
|
820
|
+
body,
|
|
821
|
+
interactionType: params.interactionType,
|
|
822
|
+
contextPrefix: params.contextPrefix,
|
|
823
|
+
summarizeViewState: params.summarizeViewState,
|
|
824
|
+
formatSystemEvent: params.formatSystemEvent
|
|
825
|
+
});
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
//#endregion
|
|
829
|
+
//#region extensions/slack/src/monitor/events/interactions.ts
|
|
830
|
+
const OPENCLAW_ACTION_PREFIX = "openclaw:";
|
|
831
|
+
const SLACK_INTERACTION_EVENT_PREFIX = "Slack interaction: ";
|
|
832
|
+
const REDACTED_INTERACTION_VALUE = "[redacted]";
|
|
833
|
+
const SLACK_INTERACTION_EVENT_MAX_CHARS = 2400;
|
|
834
|
+
const SLACK_INTERACTION_STRING_MAX_CHARS = 160;
|
|
835
|
+
const SLACK_INTERACTION_ARRAY_MAX_ITEMS = 64;
|
|
836
|
+
const SLACK_INTERACTION_COMPACT_INPUTS_MAX_ITEMS = 3;
|
|
837
|
+
const SLACK_INTERACTION_REDACTED_KEYS = new Set([
|
|
838
|
+
"triggerId",
|
|
839
|
+
"responseUrl",
|
|
840
|
+
"workflowTriggerUrl",
|
|
841
|
+
"privateMetadata",
|
|
842
|
+
"viewHash"
|
|
843
|
+
]);
|
|
844
|
+
function sanitizeSlackInteractionPayloadValue(value, key) {
|
|
845
|
+
if (value === void 0) return;
|
|
846
|
+
if (key && SLACK_INTERACTION_REDACTED_KEYS.has(key)) {
|
|
847
|
+
if (typeof value !== "string" || value.trim().length === 0) return;
|
|
848
|
+
return REDACTED_INTERACTION_VALUE;
|
|
849
|
+
}
|
|
850
|
+
if (typeof value === "string") return truncateSlackText(value, SLACK_INTERACTION_STRING_MAX_CHARS);
|
|
851
|
+
if (Array.isArray(value)) {
|
|
852
|
+
const sanitized = value.slice(0, SLACK_INTERACTION_ARRAY_MAX_ITEMS).map((entry) => sanitizeSlackInteractionPayloadValue(entry)).filter((entry) => entry !== void 0);
|
|
853
|
+
if (value.length > SLACK_INTERACTION_ARRAY_MAX_ITEMS) sanitized.push(`…+${value.length - SLACK_INTERACTION_ARRAY_MAX_ITEMS} more`);
|
|
854
|
+
return sanitized;
|
|
855
|
+
}
|
|
856
|
+
if (!value || typeof value !== "object") return value;
|
|
857
|
+
const output = {};
|
|
858
|
+
for (const [entryKey, entryValue] of Object.entries(value)) {
|
|
859
|
+
const sanitized = sanitizeSlackInteractionPayloadValue(entryValue, entryKey);
|
|
860
|
+
if (sanitized === void 0) continue;
|
|
861
|
+
if (typeof sanitized === "string" && sanitized.length === 0) continue;
|
|
862
|
+
if (Array.isArray(sanitized) && sanitized.length === 0) continue;
|
|
863
|
+
output[entryKey] = sanitized;
|
|
864
|
+
}
|
|
865
|
+
return output;
|
|
866
|
+
}
|
|
867
|
+
function buildCompactSlackInteractionPayload(payload) {
|
|
868
|
+
const rawInputs = Array.isArray(payload.inputs) ? payload.inputs : [];
|
|
869
|
+
const compactInputs = rawInputs.slice(0, SLACK_INTERACTION_COMPACT_INPUTS_MAX_ITEMS).flatMap((entry) => {
|
|
870
|
+
if (!entry || typeof entry !== "object") return [];
|
|
871
|
+
const typed = entry;
|
|
872
|
+
return [{
|
|
873
|
+
actionId: typed.actionId,
|
|
874
|
+
blockId: typed.blockId,
|
|
875
|
+
actionType: typed.actionType,
|
|
876
|
+
inputKind: typed.inputKind,
|
|
877
|
+
selectedValues: typed.selectedValues,
|
|
878
|
+
selectedLabels: typed.selectedLabels,
|
|
879
|
+
inputValue: typed.inputValue,
|
|
880
|
+
inputNumber: typed.inputNumber,
|
|
881
|
+
selectedDate: typed.selectedDate,
|
|
882
|
+
selectedTime: typed.selectedTime,
|
|
883
|
+
selectedDateTime: typed.selectedDateTime,
|
|
884
|
+
richTextPreview: typed.richTextPreview
|
|
885
|
+
}];
|
|
886
|
+
});
|
|
887
|
+
return {
|
|
888
|
+
interactionType: payload.interactionType,
|
|
889
|
+
actionId: payload.actionId,
|
|
890
|
+
callbackId: payload.callbackId,
|
|
891
|
+
actionType: payload.actionType,
|
|
892
|
+
userId: payload.userId,
|
|
893
|
+
teamId: payload.teamId,
|
|
894
|
+
channelId: payload.channelId ?? payload.routedChannelId,
|
|
895
|
+
messageTs: payload.messageTs,
|
|
896
|
+
threadTs: payload.threadTs,
|
|
897
|
+
viewId: payload.viewId,
|
|
898
|
+
isCleared: payload.isCleared,
|
|
899
|
+
selectedValues: payload.selectedValues,
|
|
900
|
+
selectedLabels: payload.selectedLabels,
|
|
901
|
+
selectedDate: payload.selectedDate,
|
|
902
|
+
selectedTime: payload.selectedTime,
|
|
903
|
+
selectedDateTime: payload.selectedDateTime,
|
|
904
|
+
workflowId: payload.workflowId,
|
|
905
|
+
routedChannelType: payload.routedChannelType,
|
|
906
|
+
inputs: compactInputs.length > 0 ? compactInputs : void 0,
|
|
907
|
+
inputsOmitted: rawInputs.length > SLACK_INTERACTION_COMPACT_INPUTS_MAX_ITEMS ? rawInputs.length - SLACK_INTERACTION_COMPACT_INPUTS_MAX_ITEMS : void 0,
|
|
908
|
+
payloadTruncated: true
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
function formatSlackInteractionSystemEvent(payload) {
|
|
912
|
+
const toEventText = (value) => `${SLACK_INTERACTION_EVENT_PREFIX}${JSON.stringify(value)}`;
|
|
913
|
+
const sanitizedPayload = sanitizeSlackInteractionPayloadValue(payload) ?? {};
|
|
914
|
+
let eventText = toEventText(sanitizedPayload);
|
|
915
|
+
if (eventText.length <= SLACK_INTERACTION_EVENT_MAX_CHARS) return eventText;
|
|
916
|
+
eventText = toEventText(sanitizeSlackInteractionPayloadValue(buildCompactSlackInteractionPayload(sanitizedPayload)));
|
|
917
|
+
if (eventText.length <= SLACK_INTERACTION_EVENT_MAX_CHARS) return eventText;
|
|
918
|
+
return toEventText({
|
|
919
|
+
interactionType: sanitizedPayload.interactionType,
|
|
920
|
+
actionId: sanitizedPayload.actionId ?? "unknown",
|
|
921
|
+
userId: sanitizedPayload.userId,
|
|
922
|
+
channelId: sanitizedPayload.channelId ?? sanitizedPayload.routedChannelId,
|
|
923
|
+
payloadTruncated: true
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
function summarizeViewState(values) {
|
|
927
|
+
if (!values || typeof values !== "object") return [];
|
|
928
|
+
const entries = [];
|
|
929
|
+
for (const [blockId, blockValue] of Object.entries(values)) {
|
|
930
|
+
if (!blockValue || typeof blockValue !== "object") continue;
|
|
931
|
+
for (const [actionId, rawAction] of Object.entries(blockValue)) {
|
|
932
|
+
if (!rawAction || typeof rawAction !== "object") continue;
|
|
933
|
+
const actionSummary = summarizeAction(rawAction);
|
|
934
|
+
entries.push({
|
|
935
|
+
blockId,
|
|
936
|
+
actionId,
|
|
937
|
+
...actionSummary
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
return entries;
|
|
942
|
+
}
|
|
943
|
+
function registerSlackInteractionEvents(params) {
|
|
944
|
+
const { ctx } = params;
|
|
945
|
+
registerSlackBlockActionHandler({
|
|
946
|
+
ctx,
|
|
947
|
+
formatSystemEvent: formatSlackInteractionSystemEvent
|
|
948
|
+
});
|
|
949
|
+
if (typeof ctx.app.view !== "function") return;
|
|
950
|
+
const modalMatcher = new RegExp(`^${OPENCLAW_ACTION_PREFIX}`);
|
|
951
|
+
registerModalLifecycleHandler({
|
|
952
|
+
register: (matcher, handler) => ctx.app.view(matcher, handler),
|
|
953
|
+
matcher: modalMatcher,
|
|
954
|
+
ctx,
|
|
955
|
+
interactionType: "view_submission",
|
|
956
|
+
contextPrefix: "slack:interaction:view",
|
|
957
|
+
summarizeViewState,
|
|
958
|
+
formatSystemEvent: formatSlackInteractionSystemEvent
|
|
959
|
+
});
|
|
960
|
+
const viewClosed = ctx.app.viewClosed;
|
|
961
|
+
if (typeof viewClosed !== "function") return;
|
|
962
|
+
registerModalLifecycleHandler({
|
|
963
|
+
register: viewClosed,
|
|
964
|
+
matcher: modalMatcher,
|
|
965
|
+
ctx,
|
|
966
|
+
interactionType: "view_closed",
|
|
967
|
+
contextPrefix: "slack:interaction:view-closed",
|
|
968
|
+
summarizeViewState,
|
|
969
|
+
formatSystemEvent: formatSlackInteractionSystemEvent
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
//#endregion
|
|
973
|
+
//#region extensions/slack/src/monitor/events/system-event-context.ts
|
|
974
|
+
async function authorizeAndResolveSlackSystemEventContext(params) {
|
|
975
|
+
const { ctx, senderId, channelId, channelType, eventKind } = params;
|
|
976
|
+
const auth = await authorizeSlackSystemEventSender({
|
|
977
|
+
ctx,
|
|
978
|
+
senderId,
|
|
979
|
+
channelId,
|
|
980
|
+
channelType
|
|
981
|
+
});
|
|
982
|
+
if (!auth.allowed) {
|
|
983
|
+
logVerbose(`slack: drop ${eventKind} sender ${senderId ?? "unknown"} channel=${channelId ?? "unknown"} reason=${auth.reason ?? "unauthorized"}`);
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
return {
|
|
987
|
+
channelLabel: resolveSlackChannelLabel({
|
|
988
|
+
channelId,
|
|
989
|
+
channelName: auth.channelName
|
|
990
|
+
}),
|
|
991
|
+
sessionKey: ctx.resolveSlackSystemEventSessionKey({
|
|
992
|
+
channelId,
|
|
993
|
+
channelType: auth.channelType,
|
|
994
|
+
senderId
|
|
995
|
+
})
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
//#endregion
|
|
999
|
+
//#region extensions/slack/src/monitor/events/members.ts
|
|
1000
|
+
function registerSlackMemberEvents(params) {
|
|
1001
|
+
const { ctx, trackEvent } = params;
|
|
1002
|
+
const handleMemberChannelEvent = async (params) => {
|
|
1003
|
+
try {
|
|
1004
|
+
if (ctx.shouldDropMismatchedSlackEvent(params.body)) return;
|
|
1005
|
+
trackEvent?.();
|
|
1006
|
+
const payload = params.event;
|
|
1007
|
+
const channelId = payload.channel;
|
|
1008
|
+
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
1009
|
+
const channelType = payload.channel_type ?? channelInfo?.type;
|
|
1010
|
+
const ingressContext = await authorizeAndResolveSlackSystemEventContext({
|
|
1011
|
+
ctx,
|
|
1012
|
+
senderId: payload.user,
|
|
1013
|
+
channelId,
|
|
1014
|
+
channelType,
|
|
1015
|
+
eventKind: `member-${params.verb}`
|
|
1016
|
+
});
|
|
1017
|
+
if (!ingressContext) return;
|
|
1018
|
+
enqueueSystemEvent(`Slack: ${(payload.user ? await ctx.resolveUserName(payload.user) : {})?.name ?? payload.user ?? "someone"} ${params.verb} ${ingressContext.channelLabel}.`, {
|
|
1019
|
+
sessionKey: ingressContext.sessionKey,
|
|
1020
|
+
contextKey: `slack:member:${params.verb}:${channelId ?? "unknown"}:${payload.user ?? "unknown"}`
|
|
1021
|
+
});
|
|
1022
|
+
} catch (err) {
|
|
1023
|
+
ctx.runtime.error?.(danger(`slack ${params.verb} handler failed: ${String(err)}`));
|
|
1024
|
+
}
|
|
1025
|
+
};
|
|
1026
|
+
ctx.app.event("member_joined_channel", async ({ event, body }) => {
|
|
1027
|
+
await handleMemberChannelEvent({
|
|
1028
|
+
verb: "joined",
|
|
1029
|
+
event,
|
|
1030
|
+
body
|
|
1031
|
+
});
|
|
1032
|
+
});
|
|
1033
|
+
ctx.app.event("member_left_channel", async ({ event, body }) => {
|
|
1034
|
+
await handleMemberChannelEvent({
|
|
1035
|
+
verb: "left",
|
|
1036
|
+
event,
|
|
1037
|
+
body
|
|
1038
|
+
});
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region extensions/slack/src/monitor/events/message-subtype-handlers.ts
|
|
1043
|
+
const SUBTYPE_HANDLER_REGISTRY = {
|
|
1044
|
+
message_changed: {
|
|
1045
|
+
subtype: "message_changed",
|
|
1046
|
+
eventKind: "message_changed",
|
|
1047
|
+
describe: (channelLabel) => `Slack message edited in ${channelLabel}.`,
|
|
1048
|
+
contextKey: (event) => {
|
|
1049
|
+
const changed = event;
|
|
1050
|
+
return `slack:message:changed:${changed.channel ?? "unknown"}:${changed.message?.ts ?? changed.previous_message?.ts ?? changed.event_ts ?? "unknown"}`;
|
|
1051
|
+
},
|
|
1052
|
+
resolveSenderId: (event) => {
|
|
1053
|
+
const changed = event;
|
|
1054
|
+
return changed.message?.user ?? changed.previous_message?.user ?? changed.message?.bot_id ?? changed.previous_message?.bot_id;
|
|
1055
|
+
},
|
|
1056
|
+
resolveChannelId: (event) => event.channel,
|
|
1057
|
+
resolveChannelType: () => void 0
|
|
1058
|
+
},
|
|
1059
|
+
message_deleted: {
|
|
1060
|
+
subtype: "message_deleted",
|
|
1061
|
+
eventKind: "message_deleted",
|
|
1062
|
+
describe: (channelLabel) => `Slack message deleted in ${channelLabel}.`,
|
|
1063
|
+
contextKey: (event) => {
|
|
1064
|
+
const deleted = event;
|
|
1065
|
+
return `slack:message:deleted:${deleted.channel ?? "unknown"}:${deleted.deleted_ts ?? deleted.event_ts ?? "unknown"}`;
|
|
1066
|
+
},
|
|
1067
|
+
resolveSenderId: (event) => {
|
|
1068
|
+
const deleted = event;
|
|
1069
|
+
return deleted.previous_message?.user ?? deleted.previous_message?.bot_id;
|
|
1070
|
+
},
|
|
1071
|
+
resolveChannelId: (event) => event.channel,
|
|
1072
|
+
resolveChannelType: () => void 0
|
|
1073
|
+
},
|
|
1074
|
+
thread_broadcast: {
|
|
1075
|
+
subtype: "thread_broadcast",
|
|
1076
|
+
eventKind: "thread_broadcast",
|
|
1077
|
+
describe: (channelLabel) => `Slack thread reply broadcast in ${channelLabel}.`,
|
|
1078
|
+
contextKey: (event) => {
|
|
1079
|
+
const thread = event;
|
|
1080
|
+
return `slack:thread:broadcast:${thread.channel ?? "unknown"}:${thread.message?.ts ?? thread.event_ts ?? "unknown"}`;
|
|
1081
|
+
},
|
|
1082
|
+
resolveSenderId: (event) => {
|
|
1083
|
+
const thread = event;
|
|
1084
|
+
return thread.user ?? thread.message?.user ?? thread.message?.bot_id;
|
|
1085
|
+
},
|
|
1086
|
+
resolveChannelId: (event) => event.channel,
|
|
1087
|
+
resolveChannelType: () => void 0
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
function resolveSlackMessageSubtypeHandler(event) {
|
|
1091
|
+
const subtype = event.subtype;
|
|
1092
|
+
if (subtype !== "message_changed" && subtype !== "message_deleted" && subtype !== "thread_broadcast") return;
|
|
1093
|
+
return SUBTYPE_HANDLER_REGISTRY[subtype];
|
|
1094
|
+
}
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region extensions/slack/src/monitor/events/messages.ts
|
|
1097
|
+
function registerSlackMessageEvents(params) {
|
|
1098
|
+
const { ctx, handleSlackMessage } = params;
|
|
1099
|
+
const handleIncomingMessageEvent = async ({ event, body }) => {
|
|
1100
|
+
try {
|
|
1101
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
1102
|
+
const message = event;
|
|
1103
|
+
const subtypeHandler = resolveSlackMessageSubtypeHandler(message);
|
|
1104
|
+
if (subtypeHandler) {
|
|
1105
|
+
const channelId = subtypeHandler.resolveChannelId(message);
|
|
1106
|
+
const ingressContext = await authorizeAndResolveSlackSystemEventContext({
|
|
1107
|
+
ctx,
|
|
1108
|
+
senderId: subtypeHandler.resolveSenderId(message),
|
|
1109
|
+
channelId,
|
|
1110
|
+
channelType: subtypeHandler.resolveChannelType(message),
|
|
1111
|
+
eventKind: subtypeHandler.eventKind
|
|
1112
|
+
});
|
|
1113
|
+
if (!ingressContext) return;
|
|
1114
|
+
enqueueSystemEvent(subtypeHandler.describe(ingressContext.channelLabel), {
|
|
1115
|
+
sessionKey: ingressContext.sessionKey,
|
|
1116
|
+
contextKey: subtypeHandler.contextKey(message)
|
|
1117
|
+
});
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
await handleSlackMessage(message, { source: "message" });
|
|
1121
|
+
} catch (err) {
|
|
1122
|
+
ctx.runtime.error?.(danger(`slack handler failed: ${String(err)}`));
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
ctx.app.event("message", async ({ event, body }) => {
|
|
1126
|
+
await handleIncomingMessageEvent({
|
|
1127
|
+
event,
|
|
1128
|
+
body
|
|
1129
|
+
});
|
|
1130
|
+
});
|
|
1131
|
+
ctx.app.event("app_mention", async ({ event, body }) => {
|
|
1132
|
+
try {
|
|
1133
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
1134
|
+
const mention = event;
|
|
1135
|
+
const channelType = normalizeSlackChannelType(mention.channel_type, mention.channel);
|
|
1136
|
+
if (channelType === "im" || channelType === "mpim") return;
|
|
1137
|
+
await handleSlackMessage(mention, {
|
|
1138
|
+
source: "app_mention",
|
|
1139
|
+
wasMentioned: true
|
|
1140
|
+
});
|
|
1141
|
+
} catch (err) {
|
|
1142
|
+
ctx.runtime.error?.(danger(`slack mention handler failed: ${String(err)}`));
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
//#endregion
|
|
1147
|
+
//#region extensions/slack/src/monitor/events/pins.ts
|
|
1148
|
+
async function handleSlackPinEvent(params) {
|
|
1149
|
+
const { ctx, trackEvent, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
1150
|
+
try {
|
|
1151
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
1152
|
+
trackEvent?.();
|
|
1153
|
+
const payload = event;
|
|
1154
|
+
const channelId = payload.channel_id;
|
|
1155
|
+
const ingressContext = await authorizeAndResolveSlackSystemEventContext({
|
|
1156
|
+
ctx,
|
|
1157
|
+
senderId: payload.user,
|
|
1158
|
+
channelId,
|
|
1159
|
+
eventKind: "pin"
|
|
1160
|
+
});
|
|
1161
|
+
if (!ingressContext) return;
|
|
1162
|
+
const userLabel = (payload.user ? await ctx.resolveUserName(payload.user) : {})?.name ?? payload.user ?? "someone";
|
|
1163
|
+
const itemType = payload.item?.type ?? "item";
|
|
1164
|
+
const messageId = payload.item?.message?.ts ?? payload.event_ts;
|
|
1165
|
+
enqueueSystemEvent(`Slack: ${userLabel} ${action} a ${itemType} in ${ingressContext.channelLabel}.`, {
|
|
1166
|
+
sessionKey: ingressContext.sessionKey,
|
|
1167
|
+
contextKey: `slack:pin:${contextKeySuffix}:${channelId ?? "unknown"}:${messageId ?? "unknown"}`
|
|
1168
|
+
});
|
|
1169
|
+
} catch (err) {
|
|
1170
|
+
ctx.runtime.error?.(danger(`slack ${errorLabel} handler failed: ${String(err)}`));
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
function registerSlackPinEvents(params) {
|
|
1174
|
+
const { ctx, trackEvent } = params;
|
|
1175
|
+
ctx.app.event("pin_added", async ({ event, body }) => {
|
|
1176
|
+
await handleSlackPinEvent({
|
|
1177
|
+
ctx,
|
|
1178
|
+
trackEvent,
|
|
1179
|
+
body,
|
|
1180
|
+
event,
|
|
1181
|
+
action: "pinned",
|
|
1182
|
+
contextKeySuffix: "added",
|
|
1183
|
+
errorLabel: "pin added"
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
ctx.app.event("pin_removed", async ({ event, body }) => {
|
|
1187
|
+
await handleSlackPinEvent({
|
|
1188
|
+
ctx,
|
|
1189
|
+
trackEvent,
|
|
1190
|
+
body,
|
|
1191
|
+
event,
|
|
1192
|
+
action: "unpinned",
|
|
1193
|
+
contextKeySuffix: "removed",
|
|
1194
|
+
errorLabel: "pin removed"
|
|
1195
|
+
});
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
//#endregion
|
|
1199
|
+
//#region extensions/slack/src/monitor/events/reactions.ts
|
|
1200
|
+
function registerSlackReactionEvents(params) {
|
|
1201
|
+
const { ctx, trackEvent } = params;
|
|
1202
|
+
const handleReactionEvent = async (event, action) => {
|
|
1203
|
+
try {
|
|
1204
|
+
const item = event.item;
|
|
1205
|
+
if (!item || item.type !== "message") return;
|
|
1206
|
+
trackEvent?.();
|
|
1207
|
+
const ingressContext = await authorizeAndResolveSlackSystemEventContext({
|
|
1208
|
+
ctx,
|
|
1209
|
+
senderId: event.user,
|
|
1210
|
+
channelId: item.channel,
|
|
1211
|
+
eventKind: "reaction"
|
|
1212
|
+
});
|
|
1213
|
+
if (!ingressContext) return;
|
|
1214
|
+
const actorInfoPromise = event.user ? ctx.resolveUserName(event.user) : Promise.resolve(void 0);
|
|
1215
|
+
const authorInfoPromise = event.item_user ? ctx.resolveUserName(event.item_user) : Promise.resolve(void 0);
|
|
1216
|
+
const [actorInfo, authorInfo] = await Promise.all([actorInfoPromise, authorInfoPromise]);
|
|
1217
|
+
const actorLabel = actorInfo?.name ?? event.user;
|
|
1218
|
+
const emojiLabel = event.reaction ?? "emoji";
|
|
1219
|
+
const authorLabel = authorInfo?.name ?? event.item_user;
|
|
1220
|
+
const baseText = `Slack reaction ${action}: :${emojiLabel}: by ${actorLabel} in ${ingressContext.channelLabel} msg ${item.ts}`;
|
|
1221
|
+
enqueueSystemEvent(authorLabel ? `${baseText} from ${authorLabel}` : baseText, {
|
|
1222
|
+
sessionKey: ingressContext.sessionKey,
|
|
1223
|
+
contextKey: `slack:reaction:${action}:${item.channel}:${item.ts}:${event.user}:${emojiLabel}`
|
|
1224
|
+
});
|
|
1225
|
+
} catch (err) {
|
|
1226
|
+
ctx.runtime.error?.(danger(`slack reaction handler failed: ${String(err)}`));
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
ctx.app.event("reaction_added", async ({ event, body }) => {
|
|
1230
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
1231
|
+
await handleReactionEvent(event, "added");
|
|
1232
|
+
});
|
|
1233
|
+
ctx.app.event("reaction_removed", async ({ event, body }) => {
|
|
1234
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
1235
|
+
await handleReactionEvent(event, "removed");
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
//#endregion
|
|
1239
|
+
//#region extensions/slack/src/monitor/events.ts
|
|
1240
|
+
function registerSlackMonitorEvents(params) {
|
|
1241
|
+
registerSlackMessageEvents({
|
|
1242
|
+
ctx: params.ctx,
|
|
1243
|
+
handleSlackMessage: params.handleSlackMessage
|
|
1244
|
+
});
|
|
1245
|
+
registerSlackReactionEvents({
|
|
1246
|
+
ctx: params.ctx,
|
|
1247
|
+
trackEvent: params.trackEvent
|
|
1248
|
+
});
|
|
1249
|
+
registerSlackMemberEvents({
|
|
1250
|
+
ctx: params.ctx,
|
|
1251
|
+
trackEvent: params.trackEvent
|
|
1252
|
+
});
|
|
1253
|
+
registerSlackChannelEvents({
|
|
1254
|
+
ctx: params.ctx,
|
|
1255
|
+
trackEvent: params.trackEvent
|
|
1256
|
+
});
|
|
1257
|
+
registerSlackPinEvents({
|
|
1258
|
+
ctx: params.ctx,
|
|
1259
|
+
trackEvent: params.trackEvent
|
|
1260
|
+
});
|
|
1261
|
+
registerSlackInteractionEvents({ ctx: params.ctx });
|
|
1262
|
+
}
|
|
1263
|
+
//#endregion
|
|
1264
|
+
//#region extensions/slack/src/monitor/exec-approvals.ts
|
|
1265
|
+
function truncateSlackMrkdwn(text, maxChars) {
|
|
1266
|
+
return text.length <= maxChars ? text : `${text.slice(0, maxChars - 1)}…`;
|
|
1267
|
+
}
|
|
1268
|
+
function buildSlackCodeBlock(text) {
|
|
1269
|
+
let fence = "```";
|
|
1270
|
+
while (text.includes(fence)) fence += "`";
|
|
1271
|
+
return `${fence}\n${text}\n${fence}`;
|
|
1272
|
+
}
|
|
1273
|
+
function formatSlackApprover(resolvedBy) {
|
|
1274
|
+
const normalized = resolvedBy ? normalizeSlackApproverId(resolvedBy) : void 0;
|
|
1275
|
+
if (normalized) return `<@${normalized}>`;
|
|
1276
|
+
const trimmed = resolvedBy?.trim();
|
|
1277
|
+
return trimmed ? trimmed : null;
|
|
1278
|
+
}
|
|
1279
|
+
function buildSlackApprovalContextLines(request) {
|
|
1280
|
+
const lines = [];
|
|
1281
|
+
if (request.request.agentId) lines.push(`*Agent:* ${request.request.agentId}`);
|
|
1282
|
+
if (request.request.cwd) lines.push(`*CWD:* ${request.request.cwd}`);
|
|
1283
|
+
if (request.request.host) lines.push(`*Host:* ${request.request.host}`);
|
|
1284
|
+
return lines;
|
|
1285
|
+
}
|
|
1286
|
+
function buildSlackPendingApprovalText(request) {
|
|
1287
|
+
const { commandText } = resolveExecApprovalCommandDisplay(request.request);
|
|
1288
|
+
return [
|
|
1289
|
+
"*Exec approval required*",
|
|
1290
|
+
"A command needs your approval.",
|
|
1291
|
+
"",
|
|
1292
|
+
"*Command*",
|
|
1293
|
+
buildSlackCodeBlock(commandText),
|
|
1294
|
+
...buildSlackApprovalContextLines(request)
|
|
1295
|
+
].join("\n");
|
|
1296
|
+
}
|
|
1297
|
+
function buildSlackPendingApprovalBlocks(request) {
|
|
1298
|
+
const { commandText } = resolveExecApprovalCommandDisplay(request.request);
|
|
1299
|
+
const metadataLines = buildSlackApprovalContextLines(request);
|
|
1300
|
+
const interactiveBlocks = resolveSlackReplyBlocks({
|
|
1301
|
+
text: "",
|
|
1302
|
+
interactive: buildApprovalInteractiveReply({
|
|
1303
|
+
approvalId: request.id,
|
|
1304
|
+
ask: request.request.ask,
|
|
1305
|
+
allowedDecisions: resolveExecApprovalRequestAllowedDecisions(request.request)
|
|
1306
|
+
})
|
|
1307
|
+
}) ?? [];
|
|
1308
|
+
return [
|
|
1309
|
+
{
|
|
1310
|
+
type: "section",
|
|
1311
|
+
text: {
|
|
1312
|
+
type: "mrkdwn",
|
|
1313
|
+
text: "*Exec approval required*\nA command needs your approval."
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
type: "section",
|
|
1318
|
+
text: {
|
|
1319
|
+
type: "mrkdwn",
|
|
1320
|
+
text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(commandText, 2600))}`
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
...metadataLines.length > 0 ? [{
|
|
1324
|
+
type: "context",
|
|
1325
|
+
elements: metadataLines.map((line) => ({
|
|
1326
|
+
type: "mrkdwn",
|
|
1327
|
+
text: line
|
|
1328
|
+
}))
|
|
1329
|
+
}] : [],
|
|
1330
|
+
...interactiveBlocks
|
|
1331
|
+
];
|
|
1332
|
+
}
|
|
1333
|
+
function buildSlackResolvedText(params) {
|
|
1334
|
+
const { commandText } = resolveExecApprovalCommandDisplay(params.request.request);
|
|
1335
|
+
const decisionLabel = params.decision === "allow-once" ? "Allowed once" : params.decision === "allow-always" ? "Allowed always" : "Denied";
|
|
1336
|
+
const resolvedBy = formatSlackApprover(params.resolvedBy);
|
|
1337
|
+
return [
|
|
1338
|
+
`*Exec approval: ${decisionLabel}*`,
|
|
1339
|
+
resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved.",
|
|
1340
|
+
"",
|
|
1341
|
+
"*Command*",
|
|
1342
|
+
buildSlackCodeBlock(commandText)
|
|
1343
|
+
].join("\n");
|
|
1344
|
+
}
|
|
1345
|
+
function buildSlackResolvedBlocks(params) {
|
|
1346
|
+
const { commandText } = resolveExecApprovalCommandDisplay(params.request.request);
|
|
1347
|
+
const decisionLabel = params.decision === "allow-once" ? "Allowed once" : params.decision === "allow-always" ? "Allowed always" : "Denied";
|
|
1348
|
+
const resolvedBy = formatSlackApprover(params.resolvedBy);
|
|
1349
|
+
return [{
|
|
1350
|
+
type: "section",
|
|
1351
|
+
text: {
|
|
1352
|
+
type: "mrkdwn",
|
|
1353
|
+
text: `*Exec approval: ${decisionLabel}*\n${resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved."}`
|
|
1354
|
+
}
|
|
1355
|
+
}, {
|
|
1356
|
+
type: "section",
|
|
1357
|
+
text: {
|
|
1358
|
+
type: "mrkdwn",
|
|
1359
|
+
text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(commandText, 2600))}`
|
|
1360
|
+
}
|
|
1361
|
+
}];
|
|
1362
|
+
}
|
|
1363
|
+
function buildSlackExpiredText(request) {
|
|
1364
|
+
const { commandText } = resolveExecApprovalCommandDisplay(request.request);
|
|
1365
|
+
return [
|
|
1366
|
+
"*Exec approval expired*",
|
|
1367
|
+
"This approval request expired before it was resolved.",
|
|
1368
|
+
"",
|
|
1369
|
+
"*Command*",
|
|
1370
|
+
buildSlackCodeBlock(commandText)
|
|
1371
|
+
].join("\n");
|
|
1372
|
+
}
|
|
1373
|
+
function buildSlackExpiredBlocks(request) {
|
|
1374
|
+
const { commandText } = resolveExecApprovalCommandDisplay(request.request);
|
|
1375
|
+
return [{
|
|
1376
|
+
type: "section",
|
|
1377
|
+
text: {
|
|
1378
|
+
type: "mrkdwn",
|
|
1379
|
+
text: "*Exec approval expired*\nThis approval request expired before it was resolved."
|
|
1380
|
+
}
|
|
1381
|
+
}, {
|
|
1382
|
+
type: "section",
|
|
1383
|
+
text: {
|
|
1384
|
+
type: "mrkdwn",
|
|
1385
|
+
text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(commandText, 2600))}`
|
|
1386
|
+
}
|
|
1387
|
+
}];
|
|
1388
|
+
}
|
|
1389
|
+
var SlackExecApprovalHandler = class {
|
|
1390
|
+
constructor(opts) {
|
|
1391
|
+
this.opts = opts;
|
|
1392
|
+
this.runtime = createChannelNativeApprovalRuntime({
|
|
1393
|
+
label: "slack/exec-approvals",
|
|
1394
|
+
clientDisplayName: "Slack Exec Approvals",
|
|
1395
|
+
cfg: opts.cfg,
|
|
1396
|
+
accountId: opts.accountId,
|
|
1397
|
+
gatewayUrl: opts.gatewayUrl,
|
|
1398
|
+
nativeAdapter: slackNativeApprovalAdapter.native,
|
|
1399
|
+
isConfigured: () => isSlackExecApprovalClientEnabled({
|
|
1400
|
+
cfg: opts.cfg,
|
|
1401
|
+
accountId: opts.accountId
|
|
1402
|
+
}),
|
|
1403
|
+
shouldHandle: (request) => this.shouldHandle(request),
|
|
1404
|
+
buildPendingContent: ({ request }) => ({
|
|
1405
|
+
text: buildSlackPendingApprovalText(request),
|
|
1406
|
+
blocks: buildSlackPendingApprovalBlocks(request)
|
|
1407
|
+
}),
|
|
1408
|
+
sendOriginNotice: async ({ originTarget }) => {
|
|
1409
|
+
await sendMessageSlack(originTarget.to, getExecApprovalApproverDmNoticeText(), {
|
|
1410
|
+
cfg: this.opts.cfg,
|
|
1411
|
+
accountId: this.opts.accountId,
|
|
1412
|
+
threadTs: originTarget.threadId != null ? String(originTarget.threadId) : void 0,
|
|
1413
|
+
client: this.opts.app.client
|
|
1414
|
+
});
|
|
1415
|
+
},
|
|
1416
|
+
prepareTarget: ({ plannedTarget }) => ({
|
|
1417
|
+
dedupeKey: `${plannedTarget.target.to}:${plannedTarget.target.threadId == null ? "" : String(plannedTarget.target.threadId)}`,
|
|
1418
|
+
target: {
|
|
1419
|
+
to: plannedTarget.target.to,
|
|
1420
|
+
threadTs: plannedTarget.target.threadId != null ? String(plannedTarget.target.threadId) : void 0
|
|
1421
|
+
}
|
|
1422
|
+
}),
|
|
1423
|
+
deliverTarget: async ({ preparedTarget, pendingContent, request }) => {
|
|
1424
|
+
const message = await sendMessageSlack(preparedTarget.to, pendingContent.text, {
|
|
1425
|
+
cfg: this.opts.cfg,
|
|
1426
|
+
accountId: this.opts.accountId,
|
|
1427
|
+
threadTs: preparedTarget.threadTs,
|
|
1428
|
+
blocks: pendingContent.blocks,
|
|
1429
|
+
client: this.opts.app.client
|
|
1430
|
+
});
|
|
1431
|
+
return {
|
|
1432
|
+
channelId: message.channelId,
|
|
1433
|
+
messageTs: message.messageId
|
|
1434
|
+
};
|
|
1435
|
+
},
|
|
1436
|
+
onOriginNoticeError: ({ error }) => {
|
|
1437
|
+
logError(`slack exec approvals: failed to send DM redirect notice: ${String(error)}`);
|
|
1438
|
+
},
|
|
1439
|
+
onDeliveryError: ({ error, request }) => {
|
|
1440
|
+
logError(`slack exec approvals: failed to deliver approval ${request.id}: ${String(error)}`);
|
|
1441
|
+
},
|
|
1442
|
+
finalizeResolved: async ({ request, resolved, entries }) => {
|
|
1443
|
+
await this.finalizeResolved(request, resolved, entries);
|
|
1444
|
+
},
|
|
1445
|
+
finalizeExpired: async ({ request, entries }) => {
|
|
1446
|
+
await this.finalizeExpired(request, entries);
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
shouldHandle(request) {
|
|
1451
|
+
return shouldHandleSlackExecApprovalRequest({
|
|
1452
|
+
cfg: this.opts.cfg,
|
|
1453
|
+
accountId: this.opts.accountId,
|
|
1454
|
+
request
|
|
1455
|
+
}) ? slackNativeApprovalAdapter.native?.describeDeliveryCapabilities({
|
|
1456
|
+
cfg: this.opts.cfg,
|
|
1457
|
+
accountId: this.opts.accountId,
|
|
1458
|
+
approvalKind: "exec",
|
|
1459
|
+
request
|
|
1460
|
+
}).enabled === true : false;
|
|
1461
|
+
}
|
|
1462
|
+
async start() {
|
|
1463
|
+
await this.runtime.start();
|
|
1464
|
+
}
|
|
1465
|
+
async stop() {
|
|
1466
|
+
await this.runtime.stop();
|
|
1467
|
+
}
|
|
1468
|
+
async handleApprovalRequested(request) {
|
|
1469
|
+
await this.runtime.handleRequested(request);
|
|
1470
|
+
}
|
|
1471
|
+
async handleApprovalResolved(resolved) {
|
|
1472
|
+
await this.runtime.handleResolved(resolved);
|
|
1473
|
+
}
|
|
1474
|
+
async handleApprovalTimeout(approvalId) {
|
|
1475
|
+
await this.runtime.handleExpired(approvalId);
|
|
1476
|
+
}
|
|
1477
|
+
async finalizeResolved(request, resolved, entries) {
|
|
1478
|
+
const text = buildSlackResolvedText({
|
|
1479
|
+
request,
|
|
1480
|
+
decision: resolved.decision,
|
|
1481
|
+
resolvedBy: resolved.resolvedBy
|
|
1482
|
+
});
|
|
1483
|
+
const blocks = buildSlackResolvedBlocks({
|
|
1484
|
+
request,
|
|
1485
|
+
decision: resolved.decision,
|
|
1486
|
+
resolvedBy: resolved.resolvedBy
|
|
1487
|
+
});
|
|
1488
|
+
for (const entry of entries) await this.updateMessage({
|
|
1489
|
+
channelId: entry.channelId,
|
|
1490
|
+
messageTs: entry.messageTs,
|
|
1491
|
+
text,
|
|
1492
|
+
blocks
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
async finalizeExpired(request, entries) {
|
|
1496
|
+
const blocks = buildSlackExpiredBlocks(request);
|
|
1497
|
+
const text = buildSlackExpiredText(request);
|
|
1498
|
+
for (const entry of entries) await this.updateMessage({
|
|
1499
|
+
channelId: entry.channelId,
|
|
1500
|
+
messageTs: entry.messageTs,
|
|
1501
|
+
text,
|
|
1502
|
+
blocks
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
async updateMessage(params) {
|
|
1506
|
+
try {
|
|
1507
|
+
await this.opts.app.client.chat.update({
|
|
1508
|
+
channel: params.channelId,
|
|
1509
|
+
ts: params.messageTs,
|
|
1510
|
+
text: params.text,
|
|
1511
|
+
blocks: params.blocks
|
|
1512
|
+
});
|
|
1513
|
+
} catch (err) {
|
|
1514
|
+
logError(`slack exec approvals: failed to update message: ${String(err)}`);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
};
|
|
1518
|
+
//#endregion
|
|
1519
|
+
//#region extensions/slack/src/draft-stream.ts
|
|
1520
|
+
const DEFAULT_THROTTLE_MS = 1e3;
|
|
1521
|
+
function createSlackDraftStream(params) {
|
|
1522
|
+
const maxChars = Math.min(params.maxChars ?? 8e3, SLACK_TEXT_LIMIT);
|
|
1523
|
+
const throttleMs = Math.max(250, params.throttleMs ?? DEFAULT_THROTTLE_MS);
|
|
1524
|
+
const send = params.send ?? sendMessageSlack;
|
|
1525
|
+
const edit = params.edit ?? editSlackMessage;
|
|
1526
|
+
const remove = params.remove ?? deleteSlackMessage;
|
|
1527
|
+
let streamMessageId;
|
|
1528
|
+
let streamChannelId;
|
|
1529
|
+
let lastSentText = "";
|
|
1530
|
+
let stopped = false;
|
|
1531
|
+
const sendOrEditStreamMessage = async (text) => {
|
|
1532
|
+
if (stopped) return;
|
|
1533
|
+
const trimmed = text.trimEnd();
|
|
1534
|
+
if (!trimmed) return;
|
|
1535
|
+
if (trimmed.length > maxChars) {
|
|
1536
|
+
stopped = true;
|
|
1537
|
+
params.warn?.(`slack stream preview stopped (text length ${trimmed.length} > ${maxChars})`);
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
if (trimmed === lastSentText) return;
|
|
1541
|
+
lastSentText = trimmed;
|
|
1542
|
+
try {
|
|
1543
|
+
if (streamChannelId && streamMessageId) {
|
|
1544
|
+
await edit(streamChannelId, streamMessageId, trimmed, {
|
|
1545
|
+
token: params.token,
|
|
1546
|
+
accountId: params.accountId
|
|
1547
|
+
});
|
|
1548
|
+
return;
|
|
1549
|
+
}
|
|
1550
|
+
const sent = await send(params.target, trimmed, {
|
|
1551
|
+
token: params.token,
|
|
1552
|
+
accountId: params.accountId,
|
|
1553
|
+
threadTs: params.resolveThreadTs?.()
|
|
1554
|
+
});
|
|
1555
|
+
streamChannelId = sent.channelId || streamChannelId;
|
|
1556
|
+
streamMessageId = sent.messageId || streamMessageId;
|
|
1557
|
+
if (!streamChannelId || !streamMessageId) {
|
|
1558
|
+
stopped = true;
|
|
1559
|
+
params.warn?.("slack stream preview stopped (missing identifiers from sendMessage)");
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
params.onMessageSent?.();
|
|
1563
|
+
} catch (err) {
|
|
1564
|
+
stopped = true;
|
|
1565
|
+
params.warn?.(`slack stream preview failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
const loop = createDraftStreamLoop({
|
|
1569
|
+
throttleMs,
|
|
1570
|
+
isStopped: () => stopped,
|
|
1571
|
+
sendOrEditStreamMessage
|
|
1572
|
+
});
|
|
1573
|
+
const stop = () => {
|
|
1574
|
+
stopped = true;
|
|
1575
|
+
loop.stop();
|
|
1576
|
+
};
|
|
1577
|
+
const clear = async () => {
|
|
1578
|
+
stop();
|
|
1579
|
+
await loop.waitForInFlight();
|
|
1580
|
+
const channelId = streamChannelId;
|
|
1581
|
+
const messageId = streamMessageId;
|
|
1582
|
+
streamChannelId = void 0;
|
|
1583
|
+
streamMessageId = void 0;
|
|
1584
|
+
lastSentText = "";
|
|
1585
|
+
if (!channelId || !messageId) return;
|
|
1586
|
+
try {
|
|
1587
|
+
await remove(channelId, messageId, {
|
|
1588
|
+
token: params.token,
|
|
1589
|
+
accountId: params.accountId
|
|
1590
|
+
});
|
|
1591
|
+
} catch (err) {
|
|
1592
|
+
params.warn?.(`slack stream preview cleanup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1593
|
+
}
|
|
1594
|
+
};
|
|
1595
|
+
const forceNewMessage = () => {
|
|
1596
|
+
streamMessageId = void 0;
|
|
1597
|
+
streamChannelId = void 0;
|
|
1598
|
+
lastSentText = "";
|
|
1599
|
+
loop.resetPending();
|
|
1600
|
+
};
|
|
1601
|
+
params.log?.(`slack stream preview ready (maxChars=${maxChars}, throttleMs=${throttleMs})`);
|
|
1602
|
+
return {
|
|
1603
|
+
update: loop.update,
|
|
1604
|
+
flush: loop.flush,
|
|
1605
|
+
clear,
|
|
1606
|
+
stop,
|
|
1607
|
+
forceNewMessage,
|
|
1608
|
+
messageId: () => streamMessageId,
|
|
1609
|
+
channelId: () => streamChannelId
|
|
1610
|
+
};
|
|
1611
|
+
}
|
|
1612
|
+
//#endregion
|
|
1613
|
+
//#region extensions/slack/src/stream-mode.ts
|
|
1614
|
+
function resolveSlackStreamingConfig(params) {
|
|
1615
|
+
const mode = resolveSlackStreamingMode(params);
|
|
1616
|
+
return {
|
|
1617
|
+
mode,
|
|
1618
|
+
nativeStreaming: resolveSlackNativeStreaming(params),
|
|
1619
|
+
draftMode: mapStreamingModeToSlackLegacyDraftStreamMode(mode)
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
function applyAppendOnlyStreamUpdate(params) {
|
|
1623
|
+
const incoming = params.incoming.trimEnd();
|
|
1624
|
+
if (!incoming) return {
|
|
1625
|
+
rendered: params.rendered,
|
|
1626
|
+
source: params.source,
|
|
1627
|
+
changed: false
|
|
1628
|
+
};
|
|
1629
|
+
if (!params.rendered) return {
|
|
1630
|
+
rendered: incoming,
|
|
1631
|
+
source: incoming,
|
|
1632
|
+
changed: true
|
|
1633
|
+
};
|
|
1634
|
+
if (incoming === params.source) return {
|
|
1635
|
+
rendered: params.rendered,
|
|
1636
|
+
source: params.source,
|
|
1637
|
+
changed: false
|
|
1638
|
+
};
|
|
1639
|
+
if (incoming.startsWith(params.source) || incoming.startsWith(params.rendered)) return {
|
|
1640
|
+
rendered: incoming,
|
|
1641
|
+
source: incoming,
|
|
1642
|
+
changed: incoming !== params.rendered
|
|
1643
|
+
};
|
|
1644
|
+
if (params.source.startsWith(incoming)) return {
|
|
1645
|
+
rendered: params.rendered,
|
|
1646
|
+
source: params.source,
|
|
1647
|
+
changed: false
|
|
1648
|
+
};
|
|
1649
|
+
const separator = params.rendered.endsWith("\n") ? "" : "\n";
|
|
1650
|
+
return {
|
|
1651
|
+
rendered: `${params.rendered}${separator}${incoming}`,
|
|
1652
|
+
source: incoming,
|
|
1653
|
+
changed: true
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
function buildStatusFinalPreviewText(updateCount) {
|
|
1657
|
+
return `Status: thinking${".".repeat(Math.max(1, updateCount) % 3 + 1)}`;
|
|
1658
|
+
}
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region extensions/slack/src/streaming.ts
|
|
1661
|
+
/**
|
|
1662
|
+
* Start a new Slack text stream.
|
|
1663
|
+
*
|
|
1664
|
+
* Returns a {@link SlackStreamSession} that should be passed to
|
|
1665
|
+
* {@link appendSlackStream} and {@link stopSlackStream}.
|
|
1666
|
+
*
|
|
1667
|
+
* The first chunk of text can optionally be included via `text`.
|
|
1668
|
+
*/
|
|
1669
|
+
async function startSlackStream(params) {
|
|
1670
|
+
const { client, channel, threadTs, text, teamId, userId } = params;
|
|
1671
|
+
logVerbose(`slack-stream: starting stream in ${channel} thread=${threadTs}${teamId ? ` team=${teamId}` : ""}${userId ? ` user=${userId}` : ""}`);
|
|
1672
|
+
const streamer = client.chatStream({
|
|
1673
|
+
channel,
|
|
1674
|
+
thread_ts: threadTs,
|
|
1675
|
+
...teamId ? { recipient_team_id: teamId } : {},
|
|
1676
|
+
...userId ? { recipient_user_id: userId } : {}
|
|
1677
|
+
});
|
|
1678
|
+
const session = {
|
|
1679
|
+
streamer,
|
|
1680
|
+
channel,
|
|
1681
|
+
threadTs,
|
|
1682
|
+
stopped: false
|
|
1683
|
+
};
|
|
1684
|
+
if (text) {
|
|
1685
|
+
await streamer.append({ markdown_text: text });
|
|
1686
|
+
logVerbose(`slack-stream: appended initial text (${text.length} chars)`);
|
|
1687
|
+
}
|
|
1688
|
+
return session;
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Append markdown text to an active Slack stream.
|
|
1692
|
+
*/
|
|
1693
|
+
async function appendSlackStream(params) {
|
|
1694
|
+
const { session, text } = params;
|
|
1695
|
+
if (session.stopped) {
|
|
1696
|
+
logVerbose("slack-stream: attempted to append to a stopped stream, ignoring");
|
|
1697
|
+
return;
|
|
1698
|
+
}
|
|
1699
|
+
if (!text) return;
|
|
1700
|
+
await session.streamer.append({ markdown_text: text });
|
|
1701
|
+
logVerbose(`slack-stream: appended ${text.length} chars`);
|
|
1702
|
+
}
|
|
1703
|
+
/**
|
|
1704
|
+
* Stop (finalize) a Slack stream.
|
|
1705
|
+
*
|
|
1706
|
+
* After calling this the stream message becomes a normal Slack message.
|
|
1707
|
+
* Optionally include final text to append before stopping.
|
|
1708
|
+
*/
|
|
1709
|
+
async function stopSlackStream(params) {
|
|
1710
|
+
const { session, text } = params;
|
|
1711
|
+
if (session.stopped) {
|
|
1712
|
+
logVerbose("slack-stream: stream already stopped, ignoring duplicate stop");
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
session.stopped = true;
|
|
1716
|
+
logVerbose(`slack-stream: stopping stream in ${session.channel} thread=${session.threadTs}${text ? ` (final text: ${text.length} chars)` : ""}`);
|
|
1717
|
+
await session.streamer.stop(text ? { markdown_text: text } : void 0);
|
|
1718
|
+
logVerbose("slack-stream: stream stopped");
|
|
1719
|
+
}
|
|
1720
|
+
//#endregion
|
|
1721
|
+
//#region extensions/slack/src/monitor/message-handler/preview-finalize.ts
|
|
1722
|
+
function buildExpectedSlackEditText(params) {
|
|
1723
|
+
const trimmed = normalizeSlackOutboundText(params.text.trim());
|
|
1724
|
+
if (trimmed) return trimmed;
|
|
1725
|
+
if (params.blocks?.length) return buildSlackBlocksFallbackText(params.blocks);
|
|
1726
|
+
return " ";
|
|
1727
|
+
}
|
|
1728
|
+
function blocksMatch(expected, actual) {
|
|
1729
|
+
if (!expected?.length) return !actual?.length;
|
|
1730
|
+
if (!actual?.length) return false;
|
|
1731
|
+
return JSON.stringify(expected) === JSON.stringify(actual);
|
|
1732
|
+
}
|
|
1733
|
+
async function readSlackMessageAfterEditError(params) {
|
|
1734
|
+
if (params.threadTs) return ((await params.client.conversations.replies({
|
|
1735
|
+
token: params.token,
|
|
1736
|
+
channel: params.channelId,
|
|
1737
|
+
ts: params.threadTs,
|
|
1738
|
+
latest: params.messageId,
|
|
1739
|
+
inclusive: true,
|
|
1740
|
+
limit: 100
|
|
1741
|
+
})).messages ?? []).find((message) => message?.ts === params.messageId) ?? null;
|
|
1742
|
+
const message = (await params.client.conversations.history({
|
|
1743
|
+
token: params.token,
|
|
1744
|
+
channel: params.channelId,
|
|
1745
|
+
latest: params.messageId,
|
|
1746
|
+
oldest: params.messageId,
|
|
1747
|
+
inclusive: true,
|
|
1748
|
+
limit: 1
|
|
1749
|
+
})).messages?.[0];
|
|
1750
|
+
if (!message?.ts || message.ts !== params.messageId) return null;
|
|
1751
|
+
return message;
|
|
1752
|
+
}
|
|
1753
|
+
async function didSlackPreviewEditApplyAfterError(params) {
|
|
1754
|
+
const readback = await readSlackMessageAfterEditError(params);
|
|
1755
|
+
if (!readback) return false;
|
|
1756
|
+
const expectedText = buildExpectedSlackEditText({
|
|
1757
|
+
text: params.text,
|
|
1758
|
+
blocks: params.blocks
|
|
1759
|
+
});
|
|
1760
|
+
const actualText = normalizeSlackOutboundText((readback.text ?? "").trim());
|
|
1761
|
+
if (params.blocks?.length) return actualText === expectedText && blocksMatch(params.blocks, readback.blocks);
|
|
1762
|
+
return actualText === expectedText;
|
|
1763
|
+
}
|
|
1764
|
+
async function finalizeSlackPreviewEdit(params) {
|
|
1765
|
+
try {
|
|
1766
|
+
await editSlackMessage(params.channelId, params.messageId, params.text, {
|
|
1767
|
+
token: params.token,
|
|
1768
|
+
accountId: params.accountId,
|
|
1769
|
+
client: params.client,
|
|
1770
|
+
...params.blocks?.length ? { blocks: params.blocks } : {}
|
|
1771
|
+
});
|
|
1772
|
+
return;
|
|
1773
|
+
} catch (err) {
|
|
1774
|
+
try {
|
|
1775
|
+
if (await didSlackPreviewEditApplyAfterError({
|
|
1776
|
+
client: params.client,
|
|
1777
|
+
token: params.token,
|
|
1778
|
+
channelId: params.channelId,
|
|
1779
|
+
messageId: params.messageId,
|
|
1780
|
+
text: params.text,
|
|
1781
|
+
blocks: params.blocks,
|
|
1782
|
+
threadTs: params.threadTs
|
|
1783
|
+
})) {
|
|
1784
|
+
logVerbose(`slack: preview final edit response failed but readback matched message ${params.channelId}/${params.messageId}; suppressing duplicate fallback send`);
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
} catch (readbackErr) {
|
|
1788
|
+
logVerbose(`slack: preview final edit readback failed (${String(readbackErr)})`);
|
|
1789
|
+
}
|
|
1790
|
+
throw err;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
//#endregion
|
|
1794
|
+
//#region extensions/slack/src/monitor/message-handler/dispatch.ts
|
|
1795
|
+
function sleep(ms) {
|
|
1796
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1797
|
+
}
|
|
1798
|
+
const UNICODE_TO_SLACK = {
|
|
1799
|
+
"👀": "eyes",
|
|
1800
|
+
"🤔": "thinking_face",
|
|
1801
|
+
"🔥": "fire",
|
|
1802
|
+
"👨💻": "male-technologist",
|
|
1803
|
+
"👨💻": "male-technologist",
|
|
1804
|
+
"👩💻": "female-technologist",
|
|
1805
|
+
"⚡": "zap",
|
|
1806
|
+
"🌐": "globe_with_meridians",
|
|
1807
|
+
"✅": "white_check_mark",
|
|
1808
|
+
"👍": "thumbsup",
|
|
1809
|
+
"❌": "x",
|
|
1810
|
+
"😱": "scream",
|
|
1811
|
+
"🥱": "yawning_face",
|
|
1812
|
+
"😨": "fearful",
|
|
1813
|
+
"⏳": "hourglass_flowing_sand",
|
|
1814
|
+
"⚠️": "warning",
|
|
1815
|
+
"✍": "writing_hand",
|
|
1816
|
+
"🧠": "brain",
|
|
1817
|
+
"🛠️": "hammer_and_wrench",
|
|
1818
|
+
"💻": "computer"
|
|
1819
|
+
};
|
|
1820
|
+
function toSlackEmojiName(emoji) {
|
|
1821
|
+
const trimmed = emoji.trim().replace(/^:+|:+$/g, "");
|
|
1822
|
+
return UNICODE_TO_SLACK[trimmed] ?? trimmed;
|
|
1823
|
+
}
|
|
1824
|
+
function isSlackStreamingEnabled(params) {
|
|
1825
|
+
if (params.mode !== "partial") return false;
|
|
1826
|
+
return params.nativeStreaming;
|
|
1827
|
+
}
|
|
1828
|
+
function shouldEnableSlackPreviewStreaming(params) {
|
|
1829
|
+
if (params.mode === "off") return false;
|
|
1830
|
+
if (!params.isDirectMessage) return true;
|
|
1831
|
+
return Boolean(params.threadTs);
|
|
1832
|
+
}
|
|
1833
|
+
function shouldInitializeSlackDraftStream(params) {
|
|
1834
|
+
return params.previewStreamingEnabled && !params.useStreaming;
|
|
1835
|
+
}
|
|
1836
|
+
function resolveSlackStreamingThreadHint(params) {
|
|
1837
|
+
return resolveSlackThreadTs({
|
|
1838
|
+
replyToMode: params.replyToMode,
|
|
1839
|
+
incomingThreadTs: params.incomingThreadTs,
|
|
1840
|
+
messageTs: params.messageTs,
|
|
1841
|
+
hasReplied: false,
|
|
1842
|
+
isThreadReply: params.isThreadReply
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
function shouldUseStreaming(params) {
|
|
1846
|
+
if (!params.streamingEnabled) return false;
|
|
1847
|
+
if (!params.threadTs) {
|
|
1848
|
+
logVerbose("slack-stream: streaming disabled — no reply thread target available");
|
|
1849
|
+
return false;
|
|
1850
|
+
}
|
|
1851
|
+
return true;
|
|
1852
|
+
}
|
|
1853
|
+
async function dispatchPreparedSlackMessage(prepared) {
|
|
1854
|
+
const { ctx, account, message, route } = prepared;
|
|
1855
|
+
const cfg = ctx.cfg;
|
|
1856
|
+
const runtime = ctx.runtime;
|
|
1857
|
+
const outboundIdentity = resolveAgentOutboundIdentity(cfg, route.agentId);
|
|
1858
|
+
const slackIdentity = outboundIdentity ? {
|
|
1859
|
+
username: outboundIdentity.name,
|
|
1860
|
+
iconUrl: outboundIdentity.avatarUrl,
|
|
1861
|
+
iconEmoji: outboundIdentity.emoji
|
|
1862
|
+
} : void 0;
|
|
1863
|
+
if (prepared.isDirectMessage) {
|
|
1864
|
+
const sessionCfg = cfg.session;
|
|
1865
|
+
const storePath = resolveStorePath(sessionCfg?.store, { agentId: route.agentId });
|
|
1866
|
+
const pinnedMainDmOwner = resolvePinnedMainDmOwnerFromAllowlist({
|
|
1867
|
+
dmScope: cfg.session?.dmScope,
|
|
1868
|
+
allowFrom: ctx.allowFrom,
|
|
1869
|
+
normalizeEntry: normalizeSlackAllowOwnerEntry
|
|
1870
|
+
});
|
|
1871
|
+
const senderRecipient = message.user?.trim().toLowerCase();
|
|
1872
|
+
if (pinnedMainDmOwner && senderRecipient && pinnedMainDmOwner.trim().toLowerCase() !== senderRecipient) logVerbose(`slack: skip main-session last route for ${senderRecipient} (pinned owner ${pinnedMainDmOwner})`);
|
|
1873
|
+
else await updateLastRoute({
|
|
1874
|
+
storePath,
|
|
1875
|
+
sessionKey: route.mainSessionKey,
|
|
1876
|
+
deliveryContext: {
|
|
1877
|
+
channel: "slack",
|
|
1878
|
+
to: `user:${message.user}`,
|
|
1879
|
+
accountId: route.accountId,
|
|
1880
|
+
threadId: prepared.ctxPayload.MessageThreadId
|
|
1881
|
+
},
|
|
1882
|
+
ctx: prepared.ctxPayload
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1885
|
+
const { statusThreadTs, isThreadReply } = resolveSlackThreadTargets({
|
|
1886
|
+
message,
|
|
1887
|
+
replyToMode: prepared.replyToMode
|
|
1888
|
+
});
|
|
1889
|
+
const reactionMessageTs = prepared.ackReactionMessageTs;
|
|
1890
|
+
const messageTs = message.ts ?? message.event_ts;
|
|
1891
|
+
const incomingThreadTs = message.thread_ts;
|
|
1892
|
+
let didSetStatus = false;
|
|
1893
|
+
const statusReactionsEnabled = Boolean(prepared.ackReactionPromise) && Boolean(reactionMessageTs) && cfg.messages?.statusReactions?.enabled !== false;
|
|
1894
|
+
const slackStatusAdapter = {
|
|
1895
|
+
setReaction: async (emoji) => {
|
|
1896
|
+
await reactSlackMessage(message.channel, reactionMessageTs ?? "", toSlackEmojiName(emoji), {
|
|
1897
|
+
token: ctx.botToken,
|
|
1898
|
+
client: ctx.app.client
|
|
1899
|
+
}).catch((err) => {
|
|
1900
|
+
if (String(err).includes("already_reacted")) return;
|
|
1901
|
+
throw err;
|
|
1902
|
+
});
|
|
1903
|
+
},
|
|
1904
|
+
removeReaction: async (emoji) => {
|
|
1905
|
+
await removeSlackReaction(message.channel, reactionMessageTs ?? "", toSlackEmojiName(emoji), {
|
|
1906
|
+
token: ctx.botToken,
|
|
1907
|
+
client: ctx.app.client
|
|
1908
|
+
}).catch((err) => {
|
|
1909
|
+
if (String(err).includes("no_reaction")) return;
|
|
1910
|
+
throw err;
|
|
1911
|
+
});
|
|
1912
|
+
}
|
|
1913
|
+
};
|
|
1914
|
+
const statusReactionTiming = {
|
|
1915
|
+
...DEFAULT_TIMING,
|
|
1916
|
+
...cfg.messages?.statusReactions?.timing
|
|
1917
|
+
};
|
|
1918
|
+
const statusReactions = createStatusReactionController({
|
|
1919
|
+
enabled: statusReactionsEnabled,
|
|
1920
|
+
adapter: slackStatusAdapter,
|
|
1921
|
+
initialEmoji: prepared.ackReactionValue || "eyes",
|
|
1922
|
+
emojis: cfg.messages?.statusReactions?.emojis,
|
|
1923
|
+
timing: cfg.messages?.statusReactions?.timing,
|
|
1924
|
+
onError: (err) => {
|
|
1925
|
+
logAckFailure({
|
|
1926
|
+
log: logVerbose,
|
|
1927
|
+
channel: "slack",
|
|
1928
|
+
target: `${message.channel}/${message.ts}`,
|
|
1929
|
+
error: err
|
|
1930
|
+
});
|
|
1931
|
+
}
|
|
1932
|
+
});
|
|
1933
|
+
if (statusReactionsEnabled) statusReactions.setQueued();
|
|
1934
|
+
const hasRepliedRef = { value: false };
|
|
1935
|
+
const replyPlan = createSlackReplyDeliveryPlan({
|
|
1936
|
+
replyToMode: prepared.replyToMode,
|
|
1937
|
+
incomingThreadTs,
|
|
1938
|
+
messageTs,
|
|
1939
|
+
hasRepliedRef,
|
|
1940
|
+
isThreadReply
|
|
1941
|
+
});
|
|
1942
|
+
const typingTarget = statusThreadTs ? `${message.channel}/${statusThreadTs}` : message.channel;
|
|
1943
|
+
const typingReaction = ctx.typingReaction;
|
|
1944
|
+
const { onModelSelected, ...replyPipeline } = createChannelReplyPipeline({
|
|
1945
|
+
cfg,
|
|
1946
|
+
agentId: route.agentId,
|
|
1947
|
+
channel: "slack",
|
|
1948
|
+
accountId: route.accountId,
|
|
1949
|
+
typing: {
|
|
1950
|
+
start: async () => {
|
|
1951
|
+
didSetStatus = true;
|
|
1952
|
+
await ctx.setSlackThreadStatus({
|
|
1953
|
+
channelId: message.channel,
|
|
1954
|
+
threadTs: statusThreadTs,
|
|
1955
|
+
status: "is typing..."
|
|
1956
|
+
});
|
|
1957
|
+
if (typingReaction && message.ts) await reactSlackMessage(message.channel, message.ts, typingReaction, {
|
|
1958
|
+
token: ctx.botToken,
|
|
1959
|
+
client: ctx.app.client
|
|
1960
|
+
}).catch(() => {});
|
|
1961
|
+
},
|
|
1962
|
+
stop: async () => {
|
|
1963
|
+
if (!didSetStatus) return;
|
|
1964
|
+
didSetStatus = false;
|
|
1965
|
+
await ctx.setSlackThreadStatus({
|
|
1966
|
+
channelId: message.channel,
|
|
1967
|
+
threadTs: statusThreadTs,
|
|
1968
|
+
status: ""
|
|
1969
|
+
});
|
|
1970
|
+
if (typingReaction && message.ts) await removeSlackReaction(message.channel, message.ts, typingReaction, {
|
|
1971
|
+
token: ctx.botToken,
|
|
1972
|
+
client: ctx.app.client
|
|
1973
|
+
}).catch(() => {});
|
|
1974
|
+
},
|
|
1975
|
+
onStartError: (err) => {
|
|
1976
|
+
logTypingFailure({
|
|
1977
|
+
log: (message) => runtime.error?.(danger(message)),
|
|
1978
|
+
channel: "slack",
|
|
1979
|
+
action: "start",
|
|
1980
|
+
target: typingTarget,
|
|
1981
|
+
error: err
|
|
1982
|
+
});
|
|
1983
|
+
},
|
|
1984
|
+
onStopError: (err) => {
|
|
1985
|
+
logTypingFailure({
|
|
1986
|
+
log: (message) => runtime.error?.(danger(message)),
|
|
1987
|
+
channel: "slack",
|
|
1988
|
+
action: "stop",
|
|
1989
|
+
target: typingTarget,
|
|
1990
|
+
error: err
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
});
|
|
1995
|
+
const slackStreaming = resolveSlackStreamingConfig({
|
|
1996
|
+
streaming: account.config.streaming,
|
|
1997
|
+
streamMode: account.config.streamMode,
|
|
1998
|
+
nativeStreaming: account.config.nativeStreaming
|
|
1999
|
+
});
|
|
2000
|
+
const streamThreadHint = resolveSlackStreamingThreadHint({
|
|
2001
|
+
replyToMode: prepared.replyToMode,
|
|
2002
|
+
incomingThreadTs,
|
|
2003
|
+
messageTs,
|
|
2004
|
+
isThreadReply
|
|
2005
|
+
});
|
|
2006
|
+
const previewStreamingEnabled = shouldEnableSlackPreviewStreaming({
|
|
2007
|
+
mode: slackStreaming.mode,
|
|
2008
|
+
isDirectMessage: prepared.isDirectMessage,
|
|
2009
|
+
threadTs: streamThreadHint
|
|
2010
|
+
});
|
|
2011
|
+
const useStreaming = shouldUseStreaming({
|
|
2012
|
+
streamingEnabled: isSlackStreamingEnabled({
|
|
2013
|
+
mode: slackStreaming.mode,
|
|
2014
|
+
nativeStreaming: slackStreaming.nativeStreaming
|
|
2015
|
+
}),
|
|
2016
|
+
threadTs: streamThreadHint
|
|
2017
|
+
});
|
|
2018
|
+
const shouldUseDraftStream = shouldInitializeSlackDraftStream({
|
|
2019
|
+
previewStreamingEnabled,
|
|
2020
|
+
useStreaming
|
|
2021
|
+
});
|
|
2022
|
+
let streamSession = null;
|
|
2023
|
+
let streamFailed = false;
|
|
2024
|
+
let usedReplyThreadTs;
|
|
2025
|
+
let observedReplyDelivery = false;
|
|
2026
|
+
const deliverNormally = async (payload, forcedThreadTs) => {
|
|
2027
|
+
const replyThreadTs = forcedThreadTs ?? replyPlan.nextThreadTs();
|
|
2028
|
+
await deliverReplies({
|
|
2029
|
+
replies: [payload],
|
|
2030
|
+
target: prepared.replyTarget,
|
|
2031
|
+
token: ctx.botToken,
|
|
2032
|
+
accountId: account.accountId,
|
|
2033
|
+
runtime,
|
|
2034
|
+
textLimit: ctx.textLimit,
|
|
2035
|
+
replyThreadTs,
|
|
2036
|
+
replyToMode: prepared.replyToMode,
|
|
2037
|
+
...slackIdentity ? { identity: slackIdentity } : {}
|
|
2038
|
+
});
|
|
2039
|
+
observedReplyDelivery = true;
|
|
2040
|
+
if (replyThreadTs) usedReplyThreadTs ??= replyThreadTs;
|
|
2041
|
+
replyPlan.markSent();
|
|
2042
|
+
};
|
|
2043
|
+
const deliverWithStreaming = async (payload) => {
|
|
2044
|
+
const reply = resolveSendableOutboundReplyParts(payload);
|
|
2045
|
+
if (streamFailed || reply.hasMedia || readSlackReplyBlocks(payload)?.length || !reply.hasText) {
|
|
2046
|
+
await deliverNormally(payload, streamSession?.threadTs);
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
const text = reply.trimmedText;
|
|
2050
|
+
let plannedThreadTs;
|
|
2051
|
+
try {
|
|
2052
|
+
if (!streamSession) {
|
|
2053
|
+
const streamThreadTs = replyPlan.nextThreadTs();
|
|
2054
|
+
plannedThreadTs = streamThreadTs;
|
|
2055
|
+
if (!streamThreadTs) {
|
|
2056
|
+
logVerbose("slack-stream: no reply thread target for stream start, falling back to normal delivery");
|
|
2057
|
+
streamFailed = true;
|
|
2058
|
+
await deliverNormally(payload);
|
|
2059
|
+
return;
|
|
2060
|
+
}
|
|
2061
|
+
streamSession = await startSlackStream({
|
|
2062
|
+
client: ctx.app.client,
|
|
2063
|
+
channel: message.channel,
|
|
2064
|
+
threadTs: streamThreadTs,
|
|
2065
|
+
text,
|
|
2066
|
+
teamId: ctx.teamId,
|
|
2067
|
+
userId: message.user
|
|
2068
|
+
});
|
|
2069
|
+
observedReplyDelivery = true;
|
|
2070
|
+
usedReplyThreadTs ??= streamThreadTs;
|
|
2071
|
+
replyPlan.markSent();
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
await appendSlackStream({
|
|
2075
|
+
session: streamSession,
|
|
2076
|
+
text: "\n" + text
|
|
2077
|
+
});
|
|
2078
|
+
} catch (err) {
|
|
2079
|
+
runtime.error?.(danger(`slack-stream: streaming API call failed: ${String(err)}, falling back`));
|
|
2080
|
+
streamFailed = true;
|
|
2081
|
+
await deliverNormally(payload, streamSession?.threadTs ?? plannedThreadTs);
|
|
2082
|
+
}
|
|
2083
|
+
};
|
|
2084
|
+
const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
|
|
2085
|
+
...replyPipeline,
|
|
2086
|
+
humanDelay: resolveHumanDelayConfig(cfg, route.agentId),
|
|
2087
|
+
deliver: async (payload) => {
|
|
2088
|
+
if (useStreaming) {
|
|
2089
|
+
await deliverWithStreaming(payload);
|
|
2090
|
+
return;
|
|
2091
|
+
}
|
|
2092
|
+
const reply = resolveSendableOutboundReplyParts(payload);
|
|
2093
|
+
const slackBlocks = readSlackReplyBlocks(payload);
|
|
2094
|
+
const draftMessageId = draftStream?.messageId();
|
|
2095
|
+
const draftChannelId = draftStream?.channelId();
|
|
2096
|
+
reply.text;
|
|
2097
|
+
const trimmedFinalText = reply.trimmedText;
|
|
2098
|
+
if (previewStreamingEnabled && streamMode !== "status_final" && !reply.hasMedia && !payload.isError && (trimmedFinalText.length > 0 || Boolean(slackBlocks?.length)) && typeof draftMessageId === "string" && typeof draftChannelId === "string") {
|
|
2099
|
+
draftStream?.stop();
|
|
2100
|
+
try {
|
|
2101
|
+
await finalizeSlackPreviewEdit({
|
|
2102
|
+
client: ctx.app.client,
|
|
2103
|
+
token: ctx.botToken,
|
|
2104
|
+
accountId: account.accountId,
|
|
2105
|
+
channelId: draftChannelId,
|
|
2106
|
+
messageId: draftMessageId,
|
|
2107
|
+
text: normalizeSlackOutboundText(trimmedFinalText),
|
|
2108
|
+
...slackBlocks?.length ? { blocks: slackBlocks } : {},
|
|
2109
|
+
threadTs: usedReplyThreadTs ?? statusThreadTs
|
|
2110
|
+
});
|
|
2111
|
+
observedReplyDelivery = true;
|
|
2112
|
+
return;
|
|
2113
|
+
} catch (err) {
|
|
2114
|
+
logVerbose(`slack: preview final edit failed; falling back to standard send (${String(err)})`);
|
|
2115
|
+
}
|
|
2116
|
+
} else if (previewStreamingEnabled && streamMode === "status_final" && hasStreamedMessage) try {
|
|
2117
|
+
const statusChannelId = draftStream?.channelId();
|
|
2118
|
+
const statusMessageId = draftStream?.messageId();
|
|
2119
|
+
if (statusChannelId && statusMessageId) await ctx.app.client.chat.update({
|
|
2120
|
+
token: ctx.botToken,
|
|
2121
|
+
channel: statusChannelId,
|
|
2122
|
+
ts: statusMessageId,
|
|
2123
|
+
text: "Status: complete. Final answer posted below."
|
|
2124
|
+
});
|
|
2125
|
+
} catch (err) {
|
|
2126
|
+
logVerbose(`slack: status_final completion update failed (${String(err)})`);
|
|
2127
|
+
}
|
|
2128
|
+
else if (reply.hasMedia) {
|
|
2129
|
+
await draftStream?.clear();
|
|
2130
|
+
hasStreamedMessage = false;
|
|
2131
|
+
}
|
|
2132
|
+
await deliverNormally(payload);
|
|
2133
|
+
},
|
|
2134
|
+
onError: (err, info) => {
|
|
2135
|
+
runtime.error?.(danger(`slack ${info.kind} reply failed: ${String(err)}`));
|
|
2136
|
+
replyPipeline.typingCallbacks?.onIdle?.();
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
const draftStream = shouldUseDraftStream ? createSlackDraftStream({
|
|
2140
|
+
target: prepared.replyTarget,
|
|
2141
|
+
token: ctx.botToken,
|
|
2142
|
+
accountId: account.accountId,
|
|
2143
|
+
maxChars: Math.min(ctx.textLimit, SLACK_TEXT_LIMIT),
|
|
2144
|
+
resolveThreadTs: () => {
|
|
2145
|
+
const ts = replyPlan.nextThreadTs();
|
|
2146
|
+
if (ts) usedReplyThreadTs ??= ts;
|
|
2147
|
+
return ts;
|
|
2148
|
+
},
|
|
2149
|
+
onMessageSent: () => replyPlan.markSent(),
|
|
2150
|
+
log: logVerbose,
|
|
2151
|
+
warn: logVerbose
|
|
2152
|
+
}) : void 0;
|
|
2153
|
+
let hasStreamedMessage = false;
|
|
2154
|
+
const streamMode = slackStreaming.draftMode;
|
|
2155
|
+
let appendRenderedText = "";
|
|
2156
|
+
let appendSourceText = "";
|
|
2157
|
+
let statusUpdateCount = 0;
|
|
2158
|
+
const updateDraftFromPartial = (text) => {
|
|
2159
|
+
const trimmed = text?.trimEnd();
|
|
2160
|
+
if (!trimmed) return;
|
|
2161
|
+
if (streamMode === "append") {
|
|
2162
|
+
const next = applyAppendOnlyStreamUpdate({
|
|
2163
|
+
incoming: trimmed,
|
|
2164
|
+
rendered: appendRenderedText,
|
|
2165
|
+
source: appendSourceText
|
|
2166
|
+
});
|
|
2167
|
+
appendRenderedText = next.rendered;
|
|
2168
|
+
appendSourceText = next.source;
|
|
2169
|
+
if (!next.changed) return;
|
|
2170
|
+
draftStream?.update(next.rendered);
|
|
2171
|
+
hasStreamedMessage = true;
|
|
2172
|
+
return;
|
|
2173
|
+
}
|
|
2174
|
+
if (streamMode === "status_final") {
|
|
2175
|
+
statusUpdateCount += 1;
|
|
2176
|
+
if (statusUpdateCount > 1 && statusUpdateCount % 4 !== 0) return;
|
|
2177
|
+
draftStream?.update(buildStatusFinalPreviewText(statusUpdateCount));
|
|
2178
|
+
hasStreamedMessage = true;
|
|
2179
|
+
return;
|
|
2180
|
+
}
|
|
2181
|
+
draftStream?.update(trimmed);
|
|
2182
|
+
hasStreamedMessage = true;
|
|
2183
|
+
};
|
|
2184
|
+
const onDraftBoundary = !shouldUseDraftStream ? void 0 : async () => {
|
|
2185
|
+
if (hasStreamedMessage) {
|
|
2186
|
+
draftStream?.forceNewMessage();
|
|
2187
|
+
hasStreamedMessage = false;
|
|
2188
|
+
appendRenderedText = "";
|
|
2189
|
+
appendSourceText = "";
|
|
2190
|
+
statusUpdateCount = 0;
|
|
2191
|
+
}
|
|
2192
|
+
};
|
|
2193
|
+
let dispatchError;
|
|
2194
|
+
let queuedFinal = false;
|
|
2195
|
+
let counts = {};
|
|
2196
|
+
try {
|
|
2197
|
+
const result = await dispatchInboundMessage({
|
|
2198
|
+
ctx: prepared.ctxPayload,
|
|
2199
|
+
cfg,
|
|
2200
|
+
dispatcher,
|
|
2201
|
+
replyOptions: {
|
|
2202
|
+
...replyOptions,
|
|
2203
|
+
skillFilter: prepared.channelConfig?.skills,
|
|
2204
|
+
hasRepliedRef,
|
|
2205
|
+
disableBlockStreaming: useStreaming ? true : typeof account.config.blockStreaming === "boolean" ? !account.config.blockStreaming : void 0,
|
|
2206
|
+
onModelSelected,
|
|
2207
|
+
onPartialReply: useStreaming ? void 0 : !previewStreamingEnabled ? void 0 : async (payload) => {
|
|
2208
|
+
updateDraftFromPartial(payload.text);
|
|
2209
|
+
},
|
|
2210
|
+
onAssistantMessageStart: onDraftBoundary,
|
|
2211
|
+
onReasoningEnd: onDraftBoundary,
|
|
2212
|
+
onReasoningStream: statusReactionsEnabled ? async () => {
|
|
2213
|
+
await statusReactions.setThinking();
|
|
2214
|
+
} : void 0,
|
|
2215
|
+
onToolStart: statusReactionsEnabled ? async (payload) => {
|
|
2216
|
+
await statusReactions.setTool(payload.name);
|
|
2217
|
+
} : void 0
|
|
2218
|
+
}
|
|
2219
|
+
});
|
|
2220
|
+
queuedFinal = result.queuedFinal;
|
|
2221
|
+
counts = result.counts;
|
|
2222
|
+
} catch (err) {
|
|
2223
|
+
dispatchError = err;
|
|
2224
|
+
} finally {
|
|
2225
|
+
await draftStream?.flush();
|
|
2226
|
+
draftStream?.stop();
|
|
2227
|
+
markDispatchIdle();
|
|
2228
|
+
}
|
|
2229
|
+
const finalStream = streamSession;
|
|
2230
|
+
if (finalStream && !finalStream.stopped) try {
|
|
2231
|
+
await stopSlackStream({ session: finalStream });
|
|
2232
|
+
} catch (err) {
|
|
2233
|
+
runtime.error?.(danger(`slack-stream: failed to stop stream: ${String(err)}`));
|
|
2234
|
+
}
|
|
2235
|
+
const anyReplyDelivered = observedReplyDelivery || queuedFinal || (counts.block ?? 0) > 0 || (counts.final ?? 0) > 0;
|
|
2236
|
+
if (statusReactionsEnabled) if (dispatchError) {
|
|
2237
|
+
await statusReactions.setError();
|
|
2238
|
+
if (ctx.removeAckAfterReply) (async () => {
|
|
2239
|
+
await sleep(statusReactionTiming.errorHoldMs);
|
|
2240
|
+
if (anyReplyDelivered) {
|
|
2241
|
+
await statusReactions.clear();
|
|
2242
|
+
return;
|
|
2243
|
+
}
|
|
2244
|
+
await statusReactions.restoreInitial();
|
|
2245
|
+
})();
|
|
2246
|
+
else statusReactions.restoreInitial();
|
|
2247
|
+
} else if (anyReplyDelivered) {
|
|
2248
|
+
await statusReactions.setDone();
|
|
2249
|
+
if (ctx.removeAckAfterReply) (async () => {
|
|
2250
|
+
await sleep(statusReactionTiming.doneHoldMs);
|
|
2251
|
+
await statusReactions.clear();
|
|
2252
|
+
})();
|
|
2253
|
+
else statusReactions.restoreInitial();
|
|
2254
|
+
} else await statusReactions.restoreInitial();
|
|
2255
|
+
if (dispatchError) throw dispatchError;
|
|
2256
|
+
const participationThreadTs = usedReplyThreadTs ?? statusThreadTs;
|
|
2257
|
+
if (anyReplyDelivered && participationThreadTs) recordSlackThreadParticipation(account.accountId, message.channel, participationThreadTs);
|
|
2258
|
+
if (!anyReplyDelivered) {
|
|
2259
|
+
await draftStream?.clear();
|
|
2260
|
+
if (prepared.isRoomish) clearHistoryEntriesIfEnabled({
|
|
2261
|
+
historyMap: ctx.channelHistories,
|
|
2262
|
+
historyKey: prepared.historyKey,
|
|
2263
|
+
limit: ctx.historyLimit
|
|
2264
|
+
});
|
|
2265
|
+
return;
|
|
2266
|
+
}
|
|
2267
|
+
if (shouldLogVerbose()) {
|
|
2268
|
+
const finalCount = counts.final;
|
|
2269
|
+
logVerbose(`slack: delivered ${finalCount} reply${finalCount === 1 ? "" : "ies"} to ${prepared.replyTarget}`);
|
|
2270
|
+
}
|
|
2271
|
+
if (!statusReactionsEnabled) removeAckReactionAfterReply({
|
|
2272
|
+
removeAfterReply: ctx.removeAckAfterReply && anyReplyDelivered,
|
|
2273
|
+
ackReactionPromise: prepared.ackReactionPromise,
|
|
2274
|
+
ackReactionValue: prepared.ackReactionValue,
|
|
2275
|
+
remove: () => removeSlackReaction(message.channel, prepared.ackReactionMessageTs ?? "", prepared.ackReactionValue, {
|
|
2276
|
+
token: ctx.botToken,
|
|
2277
|
+
client: ctx.app.client
|
|
2278
|
+
}),
|
|
2279
|
+
onError: (err) => {
|
|
2280
|
+
logAckFailure({
|
|
2281
|
+
log: logVerbose,
|
|
2282
|
+
channel: "slack",
|
|
2283
|
+
target: `${message.channel}/${message.ts}`,
|
|
2284
|
+
error: err
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
});
|
|
2288
|
+
if (prepared.isRoomish) clearHistoryEntriesIfEnabled({
|
|
2289
|
+
historyMap: ctx.channelHistories,
|
|
2290
|
+
historyKey: prepared.historyKey,
|
|
2291
|
+
limit: ctx.historyLimit
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
//#endregion
|
|
2295
|
+
//#region extensions/slack/src/monitor/thread-resolution.ts
|
|
2296
|
+
const DEFAULT_THREAD_TS_CACHE_TTL_MS = 6e4;
|
|
2297
|
+
const DEFAULT_THREAD_TS_CACHE_MAX = 500;
|
|
2298
|
+
const normalizeThreadTs = (threadTs) => {
|
|
2299
|
+
const trimmed = threadTs?.trim();
|
|
2300
|
+
return trimmed ? trimmed : void 0;
|
|
2301
|
+
};
|
|
2302
|
+
async function resolveThreadTsFromHistory(params) {
|
|
2303
|
+
try {
|
|
2304
|
+
const response = await params.client.conversations.history({
|
|
2305
|
+
channel: params.channelId,
|
|
2306
|
+
latest: params.messageTs,
|
|
2307
|
+
oldest: params.messageTs,
|
|
2308
|
+
inclusive: true,
|
|
2309
|
+
limit: 1
|
|
2310
|
+
});
|
|
2311
|
+
return normalizeThreadTs((response.messages?.find((entry) => entry.ts === params.messageTs) ?? response.messages?.[0])?.thread_ts);
|
|
2312
|
+
} catch (err) {
|
|
2313
|
+
if (shouldLogVerbose()) logVerbose(`slack inbound: failed to resolve thread_ts via conversations.history for channel=${params.channelId} ts=${params.messageTs}: ${String(err)}`);
|
|
2314
|
+
return;
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
function createSlackThreadTsResolver(params) {
|
|
2318
|
+
const ttlMs = Math.max(0, params.cacheTtlMs ?? DEFAULT_THREAD_TS_CACHE_TTL_MS);
|
|
2319
|
+
const maxSize = Math.max(0, params.maxSize ?? DEFAULT_THREAD_TS_CACHE_MAX);
|
|
2320
|
+
const cache = /* @__PURE__ */ new Map();
|
|
2321
|
+
const inflight = /* @__PURE__ */ new Map();
|
|
2322
|
+
const getCached = (key, now) => {
|
|
2323
|
+
const entry = cache.get(key);
|
|
2324
|
+
if (!entry) return;
|
|
2325
|
+
if (ttlMs > 0 && now - entry.updatedAt > ttlMs) {
|
|
2326
|
+
cache.delete(key);
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
cache.delete(key);
|
|
2330
|
+
cache.set(key, {
|
|
2331
|
+
...entry,
|
|
2332
|
+
updatedAt: now
|
|
2333
|
+
});
|
|
2334
|
+
return entry.threadTs;
|
|
2335
|
+
};
|
|
2336
|
+
const setCached = (key, threadTs, now) => {
|
|
2337
|
+
cache.delete(key);
|
|
2338
|
+
cache.set(key, {
|
|
2339
|
+
threadTs,
|
|
2340
|
+
updatedAt: now
|
|
2341
|
+
});
|
|
2342
|
+
pruneMapToMaxSize(cache, maxSize);
|
|
2343
|
+
};
|
|
2344
|
+
return { resolve: async (request) => {
|
|
2345
|
+
const { message } = request;
|
|
2346
|
+
if (!message.parent_user_id || message.thread_ts || !message.ts) return message;
|
|
2347
|
+
const cacheKey = `${message.channel}:${message.ts}`;
|
|
2348
|
+
const cached = getCached(cacheKey, Date.now());
|
|
2349
|
+
if (cached !== void 0) return cached ? {
|
|
2350
|
+
...message,
|
|
2351
|
+
thread_ts: cached
|
|
2352
|
+
} : message;
|
|
2353
|
+
if (shouldLogVerbose()) logVerbose(`slack inbound: missing thread_ts for thread reply channel=${message.channel} ts=${message.ts} source=${request.source}`);
|
|
2354
|
+
let pending = inflight.get(cacheKey);
|
|
2355
|
+
if (!pending) {
|
|
2356
|
+
pending = resolveThreadTsFromHistory({
|
|
2357
|
+
client: params.client,
|
|
2358
|
+
channelId: message.channel,
|
|
2359
|
+
messageTs: message.ts
|
|
2360
|
+
});
|
|
2361
|
+
inflight.set(cacheKey, pending);
|
|
2362
|
+
}
|
|
2363
|
+
let resolved;
|
|
2364
|
+
try {
|
|
2365
|
+
resolved = await pending;
|
|
2366
|
+
} finally {
|
|
2367
|
+
inflight.delete(cacheKey);
|
|
2368
|
+
}
|
|
2369
|
+
setCached(cacheKey, resolved ?? null, Date.now());
|
|
2370
|
+
if (resolved) {
|
|
2371
|
+
if (shouldLogVerbose()) logVerbose(`slack inbound: resolved missing thread_ts channel=${message.channel} ts=${message.ts} -> thread_ts=${resolved}`);
|
|
2372
|
+
return {
|
|
2373
|
+
...message,
|
|
2374
|
+
thread_ts: resolved
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
if (shouldLogVerbose()) logVerbose(`slack inbound: could not resolve missing thread_ts channel=${message.channel} ts=${message.ts}`);
|
|
2378
|
+
return message;
|
|
2379
|
+
} };
|
|
2380
|
+
}
|
|
2381
|
+
//#endregion
|
|
2382
|
+
//#region extensions/slack/src/monitor/message-handler.ts
|
|
2383
|
+
const APP_MENTION_RETRY_TTL_MS = 6e4;
|
|
2384
|
+
function resolveSlackSenderId(message) {
|
|
2385
|
+
return message.user ?? message.bot_id ?? null;
|
|
2386
|
+
}
|
|
2387
|
+
function isSlackDirectMessageChannel(channelId) {
|
|
2388
|
+
return channelId.startsWith("D");
|
|
2389
|
+
}
|
|
2390
|
+
function isTopLevelSlackMessage(message) {
|
|
2391
|
+
return !message.thread_ts && !message.parent_user_id;
|
|
2392
|
+
}
|
|
2393
|
+
function buildTopLevelSlackConversationKey(message, accountId) {
|
|
2394
|
+
if (!isTopLevelSlackMessage(message)) return null;
|
|
2395
|
+
const senderId = resolveSlackSenderId(message);
|
|
2396
|
+
if (!senderId) return null;
|
|
2397
|
+
return `slack:${accountId}:${message.channel}:${senderId}`;
|
|
2398
|
+
}
|
|
2399
|
+
function shouldDebounceSlackMessage(message, cfg) {
|
|
2400
|
+
return shouldDebounceTextInbound({
|
|
2401
|
+
text: stripSlackMentionsForCommandDetection(message.text ?? ""),
|
|
2402
|
+
cfg,
|
|
2403
|
+
hasMedia: Boolean(message.files && message.files.length > 0)
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
function buildSeenMessageKey(channelId, ts) {
|
|
2407
|
+
if (!channelId || !ts) return null;
|
|
2408
|
+
return `${channelId}:${ts}`;
|
|
2409
|
+
}
|
|
2410
|
+
/**
|
|
2411
|
+
* Build a debounce key that isolates messages by thread (or by message timestamp
|
|
2412
|
+
* for top-level non-DM channel messages). Without per-message scoping, concurrent
|
|
2413
|
+
* top-level messages from the same sender can share a key and get merged
|
|
2414
|
+
* into a single reply on the wrong thread.
|
|
2415
|
+
*
|
|
2416
|
+
* DMs intentionally stay channel-scoped to preserve short-message batching.
|
|
2417
|
+
*/
|
|
2418
|
+
function buildSlackDebounceKey(message, accountId) {
|
|
2419
|
+
const senderId = resolveSlackSenderId(message);
|
|
2420
|
+
if (!senderId) return null;
|
|
2421
|
+
const messageTs = message.ts ?? message.event_ts;
|
|
2422
|
+
return `slack:${accountId}:${message.thread_ts ? `${message.channel}:${message.thread_ts}` : message.parent_user_id && messageTs ? `${message.channel}:maybe-thread:${messageTs}` : messageTs && !isSlackDirectMessageChannel(message.channel) ? `${message.channel}:${messageTs}` : message.channel}:${senderId}`;
|
|
2423
|
+
}
|
|
2424
|
+
function createSlackMessageHandler(params) {
|
|
2425
|
+
const { ctx, account, trackEvent } = params;
|
|
2426
|
+
const { debounceMs, debouncer } = createChannelInboundDebouncer({
|
|
2427
|
+
cfg: ctx.cfg,
|
|
2428
|
+
channel: "slack",
|
|
2429
|
+
buildKey: (entry) => buildSlackDebounceKey(entry.message, ctx.accountId),
|
|
2430
|
+
shouldDebounce: (entry) => shouldDebounceSlackMessage(entry.message, ctx.cfg),
|
|
2431
|
+
onFlush: async (entries) => {
|
|
2432
|
+
const last = entries.at(-1);
|
|
2433
|
+
if (!last) return;
|
|
2434
|
+
const flushedKey = buildSlackDebounceKey(last.message, ctx.accountId);
|
|
2435
|
+
const topLevelConversationKey = buildTopLevelSlackConversationKey(last.message, ctx.accountId);
|
|
2436
|
+
if (flushedKey && topLevelConversationKey) {
|
|
2437
|
+
const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
|
|
2438
|
+
if (pendingKeys) {
|
|
2439
|
+
pendingKeys.delete(flushedKey);
|
|
2440
|
+
if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
const combinedText = entries.length === 1 ? last.message.text ?? "" : entries.map((entry) => entry.message.text ?? "").filter(Boolean).join("\n");
|
|
2444
|
+
const combinedMentioned = entries.some((entry) => Boolean(entry.opts.wasMentioned));
|
|
2445
|
+
const prepared = await prepareSlackMessage({
|
|
2446
|
+
ctx,
|
|
2447
|
+
account,
|
|
2448
|
+
message: {
|
|
2449
|
+
...last.message,
|
|
2450
|
+
text: combinedText
|
|
2451
|
+
},
|
|
2452
|
+
opts: {
|
|
2453
|
+
...last.opts,
|
|
2454
|
+
wasMentioned: combinedMentioned || last.opts.wasMentioned
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2457
|
+
const seenMessageKey = buildSeenMessageKey(last.message.channel, last.message.ts);
|
|
2458
|
+
if (!prepared) return;
|
|
2459
|
+
if (seenMessageKey) {
|
|
2460
|
+
pruneAppMentionRetryKeys(Date.now());
|
|
2461
|
+
if (last.opts.source === "app_mention") appMentionDispatchedKeys.set(seenMessageKey, Date.now() + APP_MENTION_RETRY_TTL_MS);
|
|
2462
|
+
else if (last.opts.source === "message" && appMentionDispatchedKeys.has(seenMessageKey)) {
|
|
2463
|
+
appMentionDispatchedKeys.delete(seenMessageKey);
|
|
2464
|
+
appMentionRetryKeys.delete(seenMessageKey);
|
|
2465
|
+
return;
|
|
2466
|
+
}
|
|
2467
|
+
appMentionRetryKeys.delete(seenMessageKey);
|
|
2468
|
+
}
|
|
2469
|
+
if (entries.length > 1) {
|
|
2470
|
+
const ids = entries.map((entry) => entry.message.ts).filter(Boolean);
|
|
2471
|
+
if (ids.length > 0) {
|
|
2472
|
+
prepared.ctxPayload.MessageSids = ids;
|
|
2473
|
+
prepared.ctxPayload.MessageSidFirst = ids[0];
|
|
2474
|
+
prepared.ctxPayload.MessageSidLast = ids[ids.length - 1];
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
await dispatchPreparedSlackMessage(prepared);
|
|
2478
|
+
},
|
|
2479
|
+
onError: (err) => {
|
|
2480
|
+
ctx.runtime.error?.(`slack inbound debounce flush failed: ${String(err)}`);
|
|
2481
|
+
}
|
|
2482
|
+
});
|
|
2483
|
+
const threadTsResolver = createSlackThreadTsResolver({ client: ctx.app.client });
|
|
2484
|
+
const pendingTopLevelDebounceKeys = /* @__PURE__ */ new Map();
|
|
2485
|
+
const appMentionRetryKeys = /* @__PURE__ */ new Map();
|
|
2486
|
+
const appMentionDispatchedKeys = /* @__PURE__ */ new Map();
|
|
2487
|
+
const pruneAppMentionRetryKeys = (now) => {
|
|
2488
|
+
for (const [key, expiresAt] of appMentionRetryKeys) if (expiresAt <= now) appMentionRetryKeys.delete(key);
|
|
2489
|
+
for (const [key, expiresAt] of appMentionDispatchedKeys) if (expiresAt <= now) appMentionDispatchedKeys.delete(key);
|
|
2490
|
+
};
|
|
2491
|
+
const rememberAppMentionRetryKey = (key) => {
|
|
2492
|
+
const now = Date.now();
|
|
2493
|
+
pruneAppMentionRetryKeys(now);
|
|
2494
|
+
appMentionRetryKeys.set(key, now + APP_MENTION_RETRY_TTL_MS);
|
|
2495
|
+
};
|
|
2496
|
+
const consumeAppMentionRetryKey = (key) => {
|
|
2497
|
+
pruneAppMentionRetryKeys(Date.now());
|
|
2498
|
+
if (!appMentionRetryKeys.has(key)) return false;
|
|
2499
|
+
appMentionRetryKeys.delete(key);
|
|
2500
|
+
return true;
|
|
2501
|
+
};
|
|
2502
|
+
return async (message, opts) => {
|
|
2503
|
+
if (opts.source === "message" && message.type !== "message") return;
|
|
2504
|
+
if (opts.source === "message" && message.subtype && message.subtype !== "file_share" && message.subtype !== "bot_message") return;
|
|
2505
|
+
const seenMessageKey = buildSeenMessageKey(message.channel, message.ts);
|
|
2506
|
+
const wasSeen = seenMessageKey ? ctx.markMessageSeen(message.channel, message.ts) : false;
|
|
2507
|
+
if (seenMessageKey && opts.source === "message" && !wasSeen) rememberAppMentionRetryKey(seenMessageKey);
|
|
2508
|
+
if (seenMessageKey && wasSeen) {
|
|
2509
|
+
if (opts.source !== "app_mention" || !consumeAppMentionRetryKey(seenMessageKey)) return;
|
|
2510
|
+
}
|
|
2511
|
+
trackEvent?.();
|
|
2512
|
+
const resolvedMessage = await threadTsResolver.resolve({
|
|
2513
|
+
message,
|
|
2514
|
+
source: opts.source
|
|
2515
|
+
});
|
|
2516
|
+
const debounceKey = buildSlackDebounceKey(resolvedMessage, ctx.accountId);
|
|
2517
|
+
const conversationKey = buildTopLevelSlackConversationKey(resolvedMessage, ctx.accountId);
|
|
2518
|
+
const canDebounce = debounceMs > 0 && shouldDebounceSlackMessage(resolvedMessage, ctx.cfg);
|
|
2519
|
+
if (!canDebounce && conversationKey) {
|
|
2520
|
+
const pendingKeys = pendingTopLevelDebounceKeys.get(conversationKey);
|
|
2521
|
+
if (pendingKeys && pendingKeys.size > 0) {
|
|
2522
|
+
const keysToFlush = Array.from(pendingKeys);
|
|
2523
|
+
for (const pendingKey of keysToFlush) await debouncer.flushKey(pendingKey);
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
if (canDebounce && debounceKey && conversationKey) {
|
|
2527
|
+
const pendingKeys = pendingTopLevelDebounceKeys.get(conversationKey) ?? /* @__PURE__ */ new Set();
|
|
2528
|
+
pendingKeys.add(debounceKey);
|
|
2529
|
+
pendingTopLevelDebounceKeys.set(conversationKey, pendingKeys);
|
|
2530
|
+
}
|
|
2531
|
+
await debouncer.enqueue({
|
|
2532
|
+
message: resolvedMessage,
|
|
2533
|
+
opts
|
|
2534
|
+
});
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
//#endregion
|
|
2538
|
+
//#region extensions/slack/src/monitor/reconnect-policy.ts
|
|
2539
|
+
const SLACK_AUTH_ERROR_RE = /account_inactive|invalid_auth|token_revoked|token_expired|not_authed|org_login_required|team_access_not_granted|missing_scope|cannot_find_service|invalid_token/i;
|
|
2540
|
+
const SLACK_SOCKET_RECONNECT_POLICY = {
|
|
2541
|
+
initialMs: 2e3,
|
|
2542
|
+
maxMs: 3e4,
|
|
2543
|
+
factor: 1.8,
|
|
2544
|
+
jitter: .25,
|
|
2545
|
+
maxAttempts: 12
|
|
2546
|
+
};
|
|
2547
|
+
function getSocketEmitter(app) {
|
|
2548
|
+
const receiver = app.receiver;
|
|
2549
|
+
const client = receiver && typeof receiver === "object" ? receiver.client : void 0;
|
|
2550
|
+
if (!client || typeof client !== "object") return null;
|
|
2551
|
+
const on = client.on;
|
|
2552
|
+
const off = client.off;
|
|
2553
|
+
if (typeof on !== "function" || typeof off !== "function") return null;
|
|
2554
|
+
return {
|
|
2555
|
+
on: (event, listener) => on.call(client, event, listener),
|
|
2556
|
+
off: (event, listener) => off.call(client, event, listener)
|
|
2557
|
+
};
|
|
2558
|
+
}
|
|
2559
|
+
function waitForSlackSocketDisconnect(app, abortSignal) {
|
|
2560
|
+
return new Promise((resolve) => {
|
|
2561
|
+
const emitter = getSocketEmitter(app);
|
|
2562
|
+
if (!emitter) {
|
|
2563
|
+
abortSignal?.addEventListener("abort", () => resolve({ event: "disconnect" }), { once: true });
|
|
2564
|
+
return;
|
|
2565
|
+
}
|
|
2566
|
+
const disconnectListener = () => resolveOnce({ event: "disconnect" });
|
|
2567
|
+
const startFailListener = (error) => resolveOnce({
|
|
2568
|
+
event: "unable_to_socket_mode_start",
|
|
2569
|
+
error
|
|
2570
|
+
});
|
|
2571
|
+
const errorListener = (error) => resolveOnce({
|
|
2572
|
+
event: "error",
|
|
2573
|
+
error
|
|
2574
|
+
});
|
|
2575
|
+
const abortListener = () => resolveOnce({ event: "disconnect" });
|
|
2576
|
+
const cleanup = () => {
|
|
2577
|
+
emitter.off("disconnected", disconnectListener);
|
|
2578
|
+
emitter.off("unable_to_socket_mode_start", startFailListener);
|
|
2579
|
+
emitter.off("error", errorListener);
|
|
2580
|
+
abortSignal?.removeEventListener("abort", abortListener);
|
|
2581
|
+
};
|
|
2582
|
+
const resolveOnce = (value) => {
|
|
2583
|
+
cleanup();
|
|
2584
|
+
resolve(value);
|
|
2585
|
+
};
|
|
2586
|
+
emitter.on("disconnected", disconnectListener);
|
|
2587
|
+
emitter.on("unable_to_socket_mode_start", startFailListener);
|
|
2588
|
+
emitter.on("error", errorListener);
|
|
2589
|
+
abortSignal?.addEventListener("abort", abortListener, { once: true });
|
|
2590
|
+
});
|
|
2591
|
+
}
|
|
2592
|
+
/**
|
|
2593
|
+
* Detect non-recoverable Slack API / auth errors that should NOT be retried.
|
|
2594
|
+
* These indicate permanent credential problems (revoked bot, deactivated account, etc.)
|
|
2595
|
+
* and retrying will never succeed — continuing to retry blocks the entire gateway.
|
|
2596
|
+
*/
|
|
2597
|
+
function isNonRecoverableSlackAuthError(error) {
|
|
2598
|
+
const msg = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
2599
|
+
return SLACK_AUTH_ERROR_RE.test(msg);
|
|
2600
|
+
}
|
|
2601
|
+
function formatUnknownError(error) {
|
|
2602
|
+
if (error instanceof Error) return error.message;
|
|
2603
|
+
if (typeof error === "string") return error;
|
|
2604
|
+
try {
|
|
2605
|
+
return JSON.stringify(error);
|
|
2606
|
+
} catch {
|
|
2607
|
+
return "unknown error";
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
//#endregion
|
|
2611
|
+
//#region extensions/slack/src/monitor/external-arg-menu-store.ts
|
|
2612
|
+
const SLACK_EXTERNAL_ARG_MENU_TOKEN_BYTES = 18;
|
|
2613
|
+
const SLACK_EXTERNAL_ARG_MENU_TOKEN_LENGTH = Math.ceil(SLACK_EXTERNAL_ARG_MENU_TOKEN_BYTES * 8 / 6);
|
|
2614
|
+
const SLACK_EXTERNAL_ARG_MENU_TOKEN_PATTERN = new RegExp(`^[A-Za-z0-9_-]{${SLACK_EXTERNAL_ARG_MENU_TOKEN_LENGTH}}$`);
|
|
2615
|
+
const SLACK_EXTERNAL_ARG_MENU_TTL_MS = 600 * 1e3;
|
|
2616
|
+
const SLACK_EXTERNAL_ARG_MENU_PREFIX = "openclaw_cmdarg_ext:";
|
|
2617
|
+
function pruneSlackExternalArgMenuStore(store, now) {
|
|
2618
|
+
for (const [token, entry] of store.entries()) if (entry.expiresAt <= now) store.delete(token);
|
|
2619
|
+
}
|
|
2620
|
+
function createSlackExternalArgMenuToken(store) {
|
|
2621
|
+
let token = "";
|
|
2622
|
+
do
|
|
2623
|
+
token = generateSecureToken(SLACK_EXTERNAL_ARG_MENU_TOKEN_BYTES);
|
|
2624
|
+
while (store.has(token));
|
|
2625
|
+
return token;
|
|
2626
|
+
}
|
|
2627
|
+
function createSlackExternalArgMenuStore() {
|
|
2628
|
+
const store = /* @__PURE__ */ new Map();
|
|
2629
|
+
return {
|
|
2630
|
+
create(params, now = Date.now()) {
|
|
2631
|
+
pruneSlackExternalArgMenuStore(store, now);
|
|
2632
|
+
const token = createSlackExternalArgMenuToken(store);
|
|
2633
|
+
store.set(token, {
|
|
2634
|
+
choices: params.choices,
|
|
2635
|
+
userId: params.userId,
|
|
2636
|
+
expiresAt: now + SLACK_EXTERNAL_ARG_MENU_TTL_MS
|
|
2637
|
+
});
|
|
2638
|
+
return token;
|
|
2639
|
+
},
|
|
2640
|
+
readToken(raw) {
|
|
2641
|
+
if (typeof raw !== "string" || !raw.startsWith("openclaw_cmdarg_ext:")) return;
|
|
2642
|
+
const token = raw.slice(20).trim();
|
|
2643
|
+
return SLACK_EXTERNAL_ARG_MENU_TOKEN_PATTERN.test(token) ? token : void 0;
|
|
2644
|
+
},
|
|
2645
|
+
get(token, now = Date.now()) {
|
|
2646
|
+
pruneSlackExternalArgMenuStore(store, now);
|
|
2647
|
+
return store.get(token);
|
|
2648
|
+
}
|
|
2649
|
+
};
|
|
2650
|
+
}
|
|
2651
|
+
//#endregion
|
|
2652
|
+
//#region extensions/slack/src/monitor/slash.ts
|
|
2653
|
+
const SLACK_COMMAND_ARG_ACTION_ID = "openclaw_cmdarg";
|
|
2654
|
+
const SLACK_COMMAND_ARG_VALUE_PREFIX = "cmdarg";
|
|
2655
|
+
const SLACK_COMMAND_ARG_BUTTON_ROW_SIZE = 5;
|
|
2656
|
+
const SLACK_COMMAND_ARG_OVERFLOW_MIN = 3;
|
|
2657
|
+
const SLACK_COMMAND_ARG_OVERFLOW_MAX = 5;
|
|
2658
|
+
const SLACK_COMMAND_ARG_SELECT_OPTIONS_MAX = 100;
|
|
2659
|
+
const SLACK_COMMAND_ARG_SELECT_OPTION_VALUE_MAX = 75;
|
|
2660
|
+
const SLACK_HEADER_TEXT_MAX = 150;
|
|
2661
|
+
let slashCommandsRuntimePromise = null;
|
|
2662
|
+
let slashDispatchRuntimePromise = null;
|
|
2663
|
+
let slashSkillCommandsRuntimePromise = null;
|
|
2664
|
+
function loadSlashCommandsRuntime() {
|
|
2665
|
+
slashCommandsRuntimePromise ??= import("./slash-commands.runtime-CVcxhZ8u.js");
|
|
2666
|
+
return slashCommandsRuntimePromise;
|
|
2667
|
+
}
|
|
2668
|
+
function loadSlashDispatchRuntime() {
|
|
2669
|
+
slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-C_YtFTUx.js");
|
|
2670
|
+
return slashDispatchRuntimePromise;
|
|
2671
|
+
}
|
|
2672
|
+
function loadSlashSkillCommandsRuntime() {
|
|
2673
|
+
slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-Bj_cUvfb.js");
|
|
2674
|
+
return slashSkillCommandsRuntimePromise;
|
|
2675
|
+
}
|
|
2676
|
+
const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
|
|
2677
|
+
function buildSlackArgMenuConfirm(params) {
|
|
2678
|
+
return {
|
|
2679
|
+
title: {
|
|
2680
|
+
type: "plain_text",
|
|
2681
|
+
text: "Confirm selection"
|
|
2682
|
+
},
|
|
2683
|
+
text: {
|
|
2684
|
+
type: "mrkdwn",
|
|
2685
|
+
text: `Run */${escapeSlackMrkdwn(params.command)}* with *${escapeSlackMrkdwn(params.arg)}* set to this value?`
|
|
2686
|
+
},
|
|
2687
|
+
confirm: {
|
|
2688
|
+
type: "plain_text",
|
|
2689
|
+
text: "Run command"
|
|
2690
|
+
},
|
|
2691
|
+
deny: {
|
|
2692
|
+
type: "plain_text",
|
|
2693
|
+
text: "Cancel"
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
}
|
|
2697
|
+
function storeSlackExternalArgMenu(params) {
|
|
2698
|
+
return slackExternalArgMenuStore.create({
|
|
2699
|
+
choices: params.choices,
|
|
2700
|
+
userId: params.userId
|
|
2701
|
+
});
|
|
2702
|
+
}
|
|
2703
|
+
function readSlackExternalArgMenuToken(raw) {
|
|
2704
|
+
return slackExternalArgMenuStore.readToken(raw);
|
|
2705
|
+
}
|
|
2706
|
+
function encodeSlackCommandArgValue(parts) {
|
|
2707
|
+
return [
|
|
2708
|
+
SLACK_COMMAND_ARG_VALUE_PREFIX,
|
|
2709
|
+
encodeURIComponent(parts.command),
|
|
2710
|
+
encodeURIComponent(parts.arg),
|
|
2711
|
+
encodeURIComponent(parts.value),
|
|
2712
|
+
encodeURIComponent(parts.userId)
|
|
2713
|
+
].join("|");
|
|
2714
|
+
}
|
|
2715
|
+
function parseSlackCommandArgValue(raw) {
|
|
2716
|
+
if (!raw) return null;
|
|
2717
|
+
const parts = raw.split("|");
|
|
2718
|
+
if (parts.length !== 5 || parts[0] !== SLACK_COMMAND_ARG_VALUE_PREFIX) return null;
|
|
2719
|
+
const [, command, arg, value, userId] = parts;
|
|
2720
|
+
if (!command || !arg || !value || !userId) return null;
|
|
2721
|
+
const decode = (text) => {
|
|
2722
|
+
try {
|
|
2723
|
+
return decodeURIComponent(text);
|
|
2724
|
+
} catch {
|
|
2725
|
+
return null;
|
|
2726
|
+
}
|
|
2727
|
+
};
|
|
2728
|
+
const decodedCommand = decode(command);
|
|
2729
|
+
const decodedArg = decode(arg);
|
|
2730
|
+
const decodedValue = decode(value);
|
|
2731
|
+
const decodedUserId = decode(userId);
|
|
2732
|
+
if (!decodedCommand || !decodedArg || !decodedValue || !decodedUserId) return null;
|
|
2733
|
+
return {
|
|
2734
|
+
command: decodedCommand,
|
|
2735
|
+
arg: decodedArg,
|
|
2736
|
+
value: decodedValue,
|
|
2737
|
+
userId: decodedUserId
|
|
2738
|
+
};
|
|
2739
|
+
}
|
|
2740
|
+
function buildSlackArgMenuOptions(choices) {
|
|
2741
|
+
return choices.map((choice) => ({
|
|
2742
|
+
text: {
|
|
2743
|
+
type: "plain_text",
|
|
2744
|
+
text: choice.label.slice(0, 75)
|
|
2745
|
+
},
|
|
2746
|
+
value: choice.value
|
|
2747
|
+
}));
|
|
2748
|
+
}
|
|
2749
|
+
function buildSlackCommandArgMenuBlocks(params) {
|
|
2750
|
+
const encodedChoices = params.choices.map((choice) => ({
|
|
2751
|
+
label: choice.label,
|
|
2752
|
+
value: encodeSlackCommandArgValue({
|
|
2753
|
+
command: params.command,
|
|
2754
|
+
arg: params.arg,
|
|
2755
|
+
value: choice.value,
|
|
2756
|
+
userId: params.userId
|
|
2757
|
+
})
|
|
2758
|
+
}));
|
|
2759
|
+
const canUseStaticSelect = encodedChoices.every((choice) => choice.value.length <= SLACK_COMMAND_ARG_SELECT_OPTION_VALUE_MAX);
|
|
2760
|
+
const canUseOverflow = canUseStaticSelect && encodedChoices.length >= SLACK_COMMAND_ARG_OVERFLOW_MIN && encodedChoices.length <= SLACK_COMMAND_ARG_OVERFLOW_MAX;
|
|
2761
|
+
const canUseExternalSelect = params.supportsExternalSelect && canUseStaticSelect && encodedChoices.length > SLACK_COMMAND_ARG_SELECT_OPTIONS_MAX;
|
|
2762
|
+
const rows = canUseOverflow ? [{
|
|
2763
|
+
type: "actions",
|
|
2764
|
+
elements: [{
|
|
2765
|
+
type: "overflow",
|
|
2766
|
+
action_id: SLACK_COMMAND_ARG_ACTION_ID,
|
|
2767
|
+
confirm: buildSlackArgMenuConfirm({
|
|
2768
|
+
command: params.command,
|
|
2769
|
+
arg: params.arg
|
|
2770
|
+
}),
|
|
2771
|
+
options: buildSlackArgMenuOptions(encodedChoices)
|
|
2772
|
+
}]
|
|
2773
|
+
}] : canUseExternalSelect ? [{
|
|
2774
|
+
type: "actions",
|
|
2775
|
+
block_id: `${SLACK_EXTERNAL_ARG_MENU_PREFIX}${params.createExternalMenuToken(encodedChoices)}`,
|
|
2776
|
+
elements: [{
|
|
2777
|
+
type: "external_select",
|
|
2778
|
+
action_id: SLACK_COMMAND_ARG_ACTION_ID,
|
|
2779
|
+
confirm: buildSlackArgMenuConfirm({
|
|
2780
|
+
command: params.command,
|
|
2781
|
+
arg: params.arg
|
|
2782
|
+
}),
|
|
2783
|
+
min_query_length: 0,
|
|
2784
|
+
placeholder: {
|
|
2785
|
+
type: "plain_text",
|
|
2786
|
+
text: `Search ${params.arg}`
|
|
2787
|
+
}
|
|
2788
|
+
}]
|
|
2789
|
+
}] : encodedChoices.length <= SLACK_COMMAND_ARG_BUTTON_ROW_SIZE || !canUseStaticSelect ? chunkItems(encodedChoices, SLACK_COMMAND_ARG_BUTTON_ROW_SIZE).map((choices) => ({
|
|
2790
|
+
type: "actions",
|
|
2791
|
+
elements: choices.map((choice) => ({
|
|
2792
|
+
type: "button",
|
|
2793
|
+
action_id: SLACK_COMMAND_ARG_ACTION_ID,
|
|
2794
|
+
text: {
|
|
2795
|
+
type: "plain_text",
|
|
2796
|
+
text: choice.label
|
|
2797
|
+
},
|
|
2798
|
+
value: choice.value,
|
|
2799
|
+
confirm: buildSlackArgMenuConfirm({
|
|
2800
|
+
command: params.command,
|
|
2801
|
+
arg: params.arg
|
|
2802
|
+
})
|
|
2803
|
+
}))
|
|
2804
|
+
})) : chunkItems(encodedChoices, SLACK_COMMAND_ARG_SELECT_OPTIONS_MAX).map((choices, index) => ({
|
|
2805
|
+
type: "actions",
|
|
2806
|
+
elements: [{
|
|
2807
|
+
type: "static_select",
|
|
2808
|
+
action_id: SLACK_COMMAND_ARG_ACTION_ID,
|
|
2809
|
+
confirm: buildSlackArgMenuConfirm({
|
|
2810
|
+
command: params.command,
|
|
2811
|
+
arg: params.arg
|
|
2812
|
+
}),
|
|
2813
|
+
placeholder: {
|
|
2814
|
+
type: "plain_text",
|
|
2815
|
+
text: index === 0 ? `Choose ${params.arg}` : `Choose ${params.arg} (${index + 1})`
|
|
2816
|
+
},
|
|
2817
|
+
options: buildSlackArgMenuOptions(choices)
|
|
2818
|
+
}]
|
|
2819
|
+
}));
|
|
2820
|
+
const headerText = truncateSlackText(`/${params.command}: choose ${params.arg}`, SLACK_HEADER_TEXT_MAX);
|
|
2821
|
+
const sectionText = truncateSlackText(params.title, 3e3);
|
|
2822
|
+
const contextText = truncateSlackText(`Select one option to continue /${params.command} (${params.arg})`, 3e3);
|
|
2823
|
+
return [
|
|
2824
|
+
{
|
|
2825
|
+
type: "header",
|
|
2826
|
+
text: {
|
|
2827
|
+
type: "plain_text",
|
|
2828
|
+
text: headerText
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
type: "section",
|
|
2833
|
+
text: {
|
|
2834
|
+
type: "mrkdwn",
|
|
2835
|
+
text: sectionText
|
|
2836
|
+
}
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
type: "context",
|
|
2840
|
+
elements: [{
|
|
2841
|
+
type: "mrkdwn",
|
|
2842
|
+
text: contextText
|
|
2843
|
+
}]
|
|
2844
|
+
},
|
|
2845
|
+
...rows
|
|
2846
|
+
];
|
|
2847
|
+
}
|
|
2848
|
+
async function registerSlackMonitorSlashCommands(params) {
|
|
2849
|
+
const { ctx, account } = params;
|
|
2850
|
+
const cfg = ctx.cfg;
|
|
2851
|
+
const runtime = ctx.runtime;
|
|
2852
|
+
const supportsInteractiveArgMenus = typeof ctx.app.action === "function";
|
|
2853
|
+
let supportsExternalArgMenus = typeof ctx.app.options === "function";
|
|
2854
|
+
const slashCommand = resolveSlackSlashCommandConfig(ctx.slashCommand ?? account.config.slashCommand);
|
|
2855
|
+
const handleSlashCommand = async (p) => {
|
|
2856
|
+
const { command, ack, respond, body, prompt, commandArgs, commandDefinition } = p;
|
|
2857
|
+
try {
|
|
2858
|
+
if (ctx.shouldDropMismatchedSlackEvent?.(body)) {
|
|
2859
|
+
await ack();
|
|
2860
|
+
runtime.log?.(`slack: drop slash command from user=${command.user_id ?? "unknown"} channel=${command.channel_id ?? "unknown"} (mismatched app/team)`);
|
|
2861
|
+
return;
|
|
2862
|
+
}
|
|
2863
|
+
if (!prompt.trim()) {
|
|
2864
|
+
await ack({
|
|
2865
|
+
text: "Message required.",
|
|
2866
|
+
response_type: "ephemeral"
|
|
2867
|
+
});
|
|
2868
|
+
return;
|
|
2869
|
+
}
|
|
2870
|
+
await ack();
|
|
2871
|
+
if (ctx.botUserId && command.user_id === ctx.botUserId) return;
|
|
2872
|
+
const channelInfo = await ctx.resolveChannelName(command.channel_id);
|
|
2873
|
+
const channelType = normalizeSlackChannelType(channelInfo?.type ?? (command.channel_name === "directmessage" ? "im" : void 0), command.channel_id);
|
|
2874
|
+
const isDirectMessage = channelType === "im";
|
|
2875
|
+
const isGroupDm = channelType === "mpim";
|
|
2876
|
+
const isRoom = channelType === "channel" || channelType === "group";
|
|
2877
|
+
const isRoomish = isRoom || isGroupDm;
|
|
2878
|
+
if (!ctx.isChannelAllowed({
|
|
2879
|
+
channelId: command.channel_id,
|
|
2880
|
+
channelName: channelInfo?.name,
|
|
2881
|
+
channelType
|
|
2882
|
+
})) {
|
|
2883
|
+
await respond({
|
|
2884
|
+
text: "This channel is not allowed.",
|
|
2885
|
+
response_type: "ephemeral"
|
|
2886
|
+
});
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
const { allowFromLower: effectiveAllowFromLower } = await resolveSlackEffectiveAllowFrom(ctx, { includePairingStore: isDirectMessage });
|
|
2890
|
+
let commandAuthorized = false;
|
|
2891
|
+
let channelConfig = null;
|
|
2892
|
+
if (isDirectMessage) {
|
|
2893
|
+
if (!await authorizeSlackDirectMessage({
|
|
2894
|
+
ctx,
|
|
2895
|
+
accountId: ctx.accountId,
|
|
2896
|
+
senderId: command.user_id,
|
|
2897
|
+
allowFromLower: effectiveAllowFromLower,
|
|
2898
|
+
resolveSenderName: ctx.resolveUserName,
|
|
2899
|
+
sendPairingReply: async (text) => {
|
|
2900
|
+
await respond({
|
|
2901
|
+
text,
|
|
2902
|
+
response_type: "ephemeral"
|
|
2903
|
+
});
|
|
2904
|
+
},
|
|
2905
|
+
onDisabled: async () => {
|
|
2906
|
+
await respond({
|
|
2907
|
+
text: "Slack DMs are disabled.",
|
|
2908
|
+
response_type: "ephemeral"
|
|
2909
|
+
});
|
|
2910
|
+
},
|
|
2911
|
+
onUnauthorized: async ({ allowMatchMeta }) => {
|
|
2912
|
+
logVerbose(`slack: blocked slash sender ${command.user_id} (dmPolicy=${ctx.dmPolicy}, ${allowMatchMeta})`);
|
|
2913
|
+
await respond({
|
|
2914
|
+
text: "You are not authorized to use this command.",
|
|
2915
|
+
response_type: "ephemeral"
|
|
2916
|
+
});
|
|
2917
|
+
},
|
|
2918
|
+
log: logVerbose
|
|
2919
|
+
})) return;
|
|
2920
|
+
}
|
|
2921
|
+
if (isRoom) {
|
|
2922
|
+
channelConfig = resolveSlackChannelConfig({
|
|
2923
|
+
channelId: command.channel_id,
|
|
2924
|
+
channelName: channelInfo?.name,
|
|
2925
|
+
channels: ctx.channelsConfig,
|
|
2926
|
+
channelKeys: ctx.channelsConfigKeys,
|
|
2927
|
+
defaultRequireMention: ctx.defaultRequireMention,
|
|
2928
|
+
allowNameMatching: ctx.allowNameMatching
|
|
2929
|
+
});
|
|
2930
|
+
if (ctx.useAccessGroups) {
|
|
2931
|
+
const channelAllowlistConfigured = (ctx.channelsConfigKeys?.length ?? 0) > 0;
|
|
2932
|
+
const channelAllowed = channelConfig?.allowed !== false;
|
|
2933
|
+
if (!isSlackChannelAllowedByPolicy({
|
|
2934
|
+
groupPolicy: ctx.groupPolicy,
|
|
2935
|
+
channelAllowlistConfigured,
|
|
2936
|
+
channelAllowed
|
|
2937
|
+
})) {
|
|
2938
|
+
await respond({
|
|
2939
|
+
text: "This channel is not allowed.",
|
|
2940
|
+
response_type: "ephemeral"
|
|
2941
|
+
});
|
|
2942
|
+
return;
|
|
2943
|
+
}
|
|
2944
|
+
const hasExplicitConfig = Boolean(channelConfig?.matchSource);
|
|
2945
|
+
if (!channelAllowed && (ctx.groupPolicy !== "open" || hasExplicitConfig)) {
|
|
2946
|
+
await respond({
|
|
2947
|
+
text: "This channel is not allowed.",
|
|
2948
|
+
response_type: "ephemeral"
|
|
2949
|
+
});
|
|
2950
|
+
return;
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
const senderName = (await ctx.resolveUserName(command.user_id))?.name ?? command.user_name ?? command.user_id;
|
|
2955
|
+
const channelUsersAllowlistConfigured = isRoom && Array.isArray(channelConfig?.users) && channelConfig.users.length > 0;
|
|
2956
|
+
const channelUserAllowed = channelUsersAllowlistConfigured ? resolveSlackUserAllowed({
|
|
2957
|
+
allowList: channelConfig?.users,
|
|
2958
|
+
userId: command.user_id,
|
|
2959
|
+
userName: senderName,
|
|
2960
|
+
allowNameMatching: ctx.allowNameMatching
|
|
2961
|
+
}) : false;
|
|
2962
|
+
if (channelUsersAllowlistConfigured && !channelUserAllowed) {
|
|
2963
|
+
await respond({
|
|
2964
|
+
text: "You are not authorized to use this command here.",
|
|
2965
|
+
response_type: "ephemeral"
|
|
2966
|
+
});
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2969
|
+
const ownerAllowed = resolveSlackAllowListMatch({
|
|
2970
|
+
allowList: effectiveAllowFromLower,
|
|
2971
|
+
id: command.user_id,
|
|
2972
|
+
name: senderName,
|
|
2973
|
+
allowNameMatching: ctx.allowNameMatching
|
|
2974
|
+
}).allowed;
|
|
2975
|
+
commandAuthorized = resolveCommandAuthorizedFromAuthorizers({
|
|
2976
|
+
useAccessGroups: ctx.useAccessGroups,
|
|
2977
|
+
authorizers: [{
|
|
2978
|
+
configured: effectiveAllowFromLower.length > 0,
|
|
2979
|
+
allowed: ownerAllowed
|
|
2980
|
+
}],
|
|
2981
|
+
modeWhenAccessGroupsOff: "configured"
|
|
2982
|
+
});
|
|
2983
|
+
if (isRoomish) {
|
|
2984
|
+
commandAuthorized = resolveCommandAuthorizedFromAuthorizers({
|
|
2985
|
+
useAccessGroups: ctx.useAccessGroups,
|
|
2986
|
+
authorizers: [{
|
|
2987
|
+
configured: effectiveAllowFromLower.length > 0,
|
|
2988
|
+
allowed: ownerAllowed
|
|
2989
|
+
}, {
|
|
2990
|
+
configured: channelUsersAllowlistConfigured,
|
|
2991
|
+
allowed: channelUserAllowed
|
|
2992
|
+
}],
|
|
2993
|
+
modeWhenAccessGroupsOff: "configured"
|
|
2994
|
+
});
|
|
2995
|
+
if (ctx.useAccessGroups && !commandAuthorized) {
|
|
2996
|
+
await respond({
|
|
2997
|
+
text: "You are not authorized to use this command.",
|
|
2998
|
+
response_type: "ephemeral"
|
|
2999
|
+
});
|
|
3000
|
+
return;
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
if (commandDefinition && supportsInteractiveArgMenus) {
|
|
3004
|
+
const { resolveCommandArgMenu } = await loadSlashCommandsRuntime();
|
|
3005
|
+
const menu = resolveCommandArgMenu({
|
|
3006
|
+
command: commandDefinition,
|
|
3007
|
+
args: commandArgs,
|
|
3008
|
+
cfg
|
|
3009
|
+
});
|
|
3010
|
+
if (menu) {
|
|
3011
|
+
const commandLabel = commandDefinition.nativeName ?? commandDefinition.key;
|
|
3012
|
+
const title = menu.title ?? `Choose ${menu.arg.description || menu.arg.name} for /${commandLabel}.`;
|
|
3013
|
+
await respond({
|
|
3014
|
+
text: title,
|
|
3015
|
+
blocks: buildSlackCommandArgMenuBlocks({
|
|
3016
|
+
title,
|
|
3017
|
+
command: commandLabel,
|
|
3018
|
+
arg: menu.arg.name,
|
|
3019
|
+
choices: menu.choices,
|
|
3020
|
+
userId: command.user_id,
|
|
3021
|
+
supportsExternalSelect: supportsExternalArgMenus,
|
|
3022
|
+
createExternalMenuToken: (choices) => storeSlackExternalArgMenu({
|
|
3023
|
+
choices,
|
|
3024
|
+
userId: command.user_id
|
|
3025
|
+
})
|
|
3026
|
+
}),
|
|
3027
|
+
response_type: "ephemeral"
|
|
3028
|
+
});
|
|
3029
|
+
return;
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
const channelName = channelInfo?.name;
|
|
3033
|
+
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
3034
|
+
const { deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode } = await loadSlashDispatchRuntime();
|
|
3035
|
+
const route = resolveAgentRoute({
|
|
3036
|
+
cfg,
|
|
3037
|
+
channel: "slack",
|
|
3038
|
+
accountId: account.accountId,
|
|
3039
|
+
teamId: ctx.teamId || void 0,
|
|
3040
|
+
peer: {
|
|
3041
|
+
kind: isDirectMessage ? "direct" : isRoom ? "channel" : "group",
|
|
3042
|
+
id: isDirectMessage ? command.user_id : command.channel_id
|
|
3043
|
+
}
|
|
3044
|
+
});
|
|
3045
|
+
const { untrustedChannelMetadata, groupSystemPrompt } = resolveSlackRoomContextHints({
|
|
3046
|
+
isRoomish,
|
|
3047
|
+
channelInfo,
|
|
3048
|
+
channelConfig
|
|
3049
|
+
});
|
|
3050
|
+
const { sessionKey, commandTargetSessionKey } = resolveNativeCommandSessionTargets({
|
|
3051
|
+
agentId: route.agentId,
|
|
3052
|
+
sessionPrefix: slashCommand.sessionPrefix,
|
|
3053
|
+
userId: command.user_id,
|
|
3054
|
+
targetSessionKey: route.sessionKey,
|
|
3055
|
+
lowercaseSessionKey: true
|
|
3056
|
+
});
|
|
3057
|
+
const ctxPayload = finalizeInboundContext({
|
|
3058
|
+
Body: prompt,
|
|
3059
|
+
BodyForAgent: prompt,
|
|
3060
|
+
RawBody: prompt,
|
|
3061
|
+
CommandBody: prompt,
|
|
3062
|
+
CommandArgs: commandArgs,
|
|
3063
|
+
From: isDirectMessage ? `slack:${command.user_id}` : isRoom ? `slack:channel:${command.channel_id}` : `slack:group:${command.channel_id}`,
|
|
3064
|
+
To: `slash:${command.user_id}`,
|
|
3065
|
+
ChatType: isDirectMessage ? "direct" : "channel",
|
|
3066
|
+
ConversationLabel: resolveConversationLabel({
|
|
3067
|
+
ChatType: isDirectMessage ? "direct" : "channel",
|
|
3068
|
+
SenderName: senderName,
|
|
3069
|
+
GroupSubject: isRoomish ? roomLabel : void 0,
|
|
3070
|
+
From: isDirectMessage ? `slack:${command.user_id}` : isRoom ? `slack:channel:${command.channel_id}` : `slack:group:${command.channel_id}`
|
|
3071
|
+
}) ?? (isDirectMessage ? senderName : roomLabel),
|
|
3072
|
+
GroupSubject: isRoomish ? roomLabel : void 0,
|
|
3073
|
+
GroupSystemPrompt: groupSystemPrompt,
|
|
3074
|
+
UntrustedContext: untrustedChannelMetadata ? [untrustedChannelMetadata] : void 0,
|
|
3075
|
+
SenderName: senderName,
|
|
3076
|
+
SenderId: command.user_id,
|
|
3077
|
+
Provider: "slack",
|
|
3078
|
+
Surface: "slack",
|
|
3079
|
+
WasMentioned: true,
|
|
3080
|
+
MessageSid: command.trigger_id,
|
|
3081
|
+
Timestamp: Date.now(),
|
|
3082
|
+
SessionKey: sessionKey,
|
|
3083
|
+
CommandTargetSessionKey: commandTargetSessionKey,
|
|
3084
|
+
AccountId: route.accountId,
|
|
3085
|
+
CommandSource: "native",
|
|
3086
|
+
CommandAuthorized: commandAuthorized,
|
|
3087
|
+
OriginatingChannel: "slack",
|
|
3088
|
+
OriginatingTo: `user:${command.user_id}`
|
|
3089
|
+
});
|
|
3090
|
+
await recordInboundSessionMetaSafe({
|
|
3091
|
+
cfg,
|
|
3092
|
+
agentId: route.agentId,
|
|
3093
|
+
sessionKey: ctxPayload.SessionKey ?? route.sessionKey,
|
|
3094
|
+
ctx: ctxPayload,
|
|
3095
|
+
onError: (err) => runtime.error?.(danger(`slack slash: failed updating session meta: ${String(err)}`))
|
|
3096
|
+
});
|
|
3097
|
+
const { onModelSelected, ...replyPipeline } = createChannelReplyPipeline({
|
|
3098
|
+
cfg,
|
|
3099
|
+
agentId: route.agentId,
|
|
3100
|
+
channel: "slack",
|
|
3101
|
+
accountId: route.accountId
|
|
3102
|
+
});
|
|
3103
|
+
const deliverSlashPayloads = async (replies) => {
|
|
3104
|
+
await deliverSlackSlashReplies({
|
|
3105
|
+
replies,
|
|
3106
|
+
respond,
|
|
3107
|
+
ephemeral: slashCommand.ephemeral,
|
|
3108
|
+
textLimit: ctx.textLimit,
|
|
3109
|
+
chunkMode: resolveChunkMode(cfg, "slack", route.accountId),
|
|
3110
|
+
tableMode: resolveMarkdownTableMode({
|
|
3111
|
+
cfg,
|
|
3112
|
+
channel: "slack",
|
|
3113
|
+
accountId: route.accountId
|
|
3114
|
+
})
|
|
3115
|
+
});
|
|
3116
|
+
};
|
|
3117
|
+
const { counts } = await dispatchReplyWithDispatcher({
|
|
3118
|
+
ctx: ctxPayload,
|
|
3119
|
+
cfg,
|
|
3120
|
+
dispatcherOptions: {
|
|
3121
|
+
...replyPipeline,
|
|
3122
|
+
deliver: async (payload) => deliverSlashPayloads([payload]),
|
|
3123
|
+
onError: (err, info) => {
|
|
3124
|
+
runtime.error?.(danger(`slack slash ${info.kind} reply failed: ${String(err)}`));
|
|
3125
|
+
}
|
|
3126
|
+
},
|
|
3127
|
+
replyOptions: {
|
|
3128
|
+
skillFilter: channelConfig?.skills,
|
|
3129
|
+
onModelSelected
|
|
3130
|
+
}
|
|
3131
|
+
});
|
|
3132
|
+
if (counts.final + counts.tool + counts.block === 0) await deliverSlashPayloads([]);
|
|
3133
|
+
} catch (err) {
|
|
3134
|
+
runtime.error?.(danger(`slack slash handler failed: ${String(err)}`));
|
|
3135
|
+
await respond({
|
|
3136
|
+
text: "Sorry, something went wrong handling that command.",
|
|
3137
|
+
response_type: "ephemeral"
|
|
3138
|
+
});
|
|
3139
|
+
}
|
|
3140
|
+
};
|
|
3141
|
+
const nativeEnabled = resolveNativeCommandsEnabled({
|
|
3142
|
+
providerId: "slack",
|
|
3143
|
+
providerSetting: account.config.commands?.native,
|
|
3144
|
+
globalSetting: cfg.commands?.native
|
|
3145
|
+
});
|
|
3146
|
+
const nativeSkillsEnabled = resolveNativeSkillsEnabled({
|
|
3147
|
+
providerId: "slack",
|
|
3148
|
+
providerSetting: account.config.commands?.nativeSkills,
|
|
3149
|
+
globalSetting: cfg.commands?.nativeSkills
|
|
3150
|
+
});
|
|
3151
|
+
let nativeCommands = [];
|
|
3152
|
+
let slashCommandsRuntime = null;
|
|
3153
|
+
if (nativeEnabled) {
|
|
3154
|
+
slashCommandsRuntime = await loadSlashCommandsRuntime();
|
|
3155
|
+
const skillCommands = nativeSkillsEnabled ? (await loadSlashSkillCommandsRuntime()).listSkillCommandsForAgents({ cfg }) : [];
|
|
3156
|
+
nativeCommands = slashCommandsRuntime.listNativeCommandSpecsForConfig(cfg, {
|
|
3157
|
+
skillCommands,
|
|
3158
|
+
provider: "slack"
|
|
3159
|
+
});
|
|
3160
|
+
}
|
|
3161
|
+
if (nativeCommands.length > 0) {
|
|
3162
|
+
if (!slashCommandsRuntime) throw new Error("Missing commands runtime for native Slack commands.");
|
|
3163
|
+
for (const command of nativeCommands) ctx.app.command(`/${command.name}`, async ({ command: cmd, ack, respond, body }) => {
|
|
3164
|
+
const commandDefinition = slashCommandsRuntime.findCommandByNativeName(command.name, "slack");
|
|
3165
|
+
const rawText = cmd.text?.trim() ?? "";
|
|
3166
|
+
const commandArgs = commandDefinition ? slashCommandsRuntime.parseCommandArgs(commandDefinition, rawText) : rawText ? { raw: rawText } : void 0;
|
|
3167
|
+
await handleSlashCommand({
|
|
3168
|
+
command: cmd,
|
|
3169
|
+
ack,
|
|
3170
|
+
respond,
|
|
3171
|
+
body,
|
|
3172
|
+
prompt: commandDefinition ? slashCommandsRuntime.buildCommandTextFromArgs(commandDefinition, commandArgs) : rawText ? `/${command.name} ${rawText}` : `/${command.name}`,
|
|
3173
|
+
commandArgs,
|
|
3174
|
+
commandDefinition: commandDefinition ?? void 0
|
|
3175
|
+
});
|
|
3176
|
+
});
|
|
3177
|
+
} else if (slashCommand.enabled) ctx.app.command(buildSlackSlashCommandMatcher(slashCommand.name), async ({ command, ack, respond, body }) => {
|
|
3178
|
+
await handleSlashCommand({
|
|
3179
|
+
command,
|
|
3180
|
+
ack,
|
|
3181
|
+
respond,
|
|
3182
|
+
body,
|
|
3183
|
+
prompt: command.text?.trim() ?? ""
|
|
3184
|
+
});
|
|
3185
|
+
});
|
|
3186
|
+
else logVerbose("slack: slash commands disabled");
|
|
3187
|
+
if (nativeCommands.length === 0 || !supportsInteractiveArgMenus) return;
|
|
3188
|
+
const registerArgOptions = () => {
|
|
3189
|
+
const appWithOptions = ctx.app;
|
|
3190
|
+
if (typeof appWithOptions.options !== "function") return;
|
|
3191
|
+
appWithOptions.options(SLACK_COMMAND_ARG_ACTION_ID, async ({ ack, body }) => {
|
|
3192
|
+
if (ctx.shouldDropMismatchedSlackEvent?.(body)) {
|
|
3193
|
+
await ack({ options: [] });
|
|
3194
|
+
runtime.log?.("slack: drop slash arg options payload (mismatched app/team)");
|
|
3195
|
+
return;
|
|
3196
|
+
}
|
|
3197
|
+
const typedBody = body;
|
|
3198
|
+
const token = readSlackExternalArgMenuToken(typedBody.actions?.[0]?.block_id ?? typedBody.block_id);
|
|
3199
|
+
if (!token) {
|
|
3200
|
+
await ack({ options: [] });
|
|
3201
|
+
return;
|
|
3202
|
+
}
|
|
3203
|
+
const entry = slackExternalArgMenuStore.get(token);
|
|
3204
|
+
if (!entry) {
|
|
3205
|
+
await ack({ options: [] });
|
|
3206
|
+
return;
|
|
3207
|
+
}
|
|
3208
|
+
const requesterUserId = typedBody.user?.id?.trim();
|
|
3209
|
+
if (!requesterUserId || requesterUserId !== entry.userId) {
|
|
3210
|
+
await ack({ options: [] });
|
|
3211
|
+
return;
|
|
3212
|
+
}
|
|
3213
|
+
const query = typedBody.value?.trim().toLowerCase() ?? "";
|
|
3214
|
+
await ack({ options: entry.choices.filter((choice) => !query || choice.label.toLowerCase().includes(query)).slice(0, SLACK_COMMAND_ARG_SELECT_OPTIONS_MAX).map((choice) => ({
|
|
3215
|
+
text: {
|
|
3216
|
+
type: "plain_text",
|
|
3217
|
+
text: choice.label.slice(0, 75)
|
|
3218
|
+
},
|
|
3219
|
+
value: choice.value
|
|
3220
|
+
})) });
|
|
3221
|
+
});
|
|
3222
|
+
};
|
|
3223
|
+
try {
|
|
3224
|
+
registerArgOptions();
|
|
3225
|
+
} catch (err) {
|
|
3226
|
+
supportsExternalArgMenus = false;
|
|
3227
|
+
logVerbose(`slack: external arg-menu registration failed, falling back to static menus: ${String(err)}`);
|
|
3228
|
+
}
|
|
3229
|
+
const registerArgAction = (actionId) => {
|
|
3230
|
+
ctx.app.action(actionId, async (args) => {
|
|
3231
|
+
const { ack, body, respond } = args;
|
|
3232
|
+
const action = args.action;
|
|
3233
|
+
await ack();
|
|
3234
|
+
if (ctx.shouldDropMismatchedSlackEvent?.(body)) {
|
|
3235
|
+
runtime.log?.("slack: drop slash arg action payload (mismatched app/team)");
|
|
3236
|
+
return;
|
|
3237
|
+
}
|
|
3238
|
+
const respondFn = respond ?? (async (payload) => {
|
|
3239
|
+
if (!body.channel?.id || !body.user?.id) return;
|
|
3240
|
+
await ctx.app.client.chat.postEphemeral({
|
|
3241
|
+
token: ctx.botToken,
|
|
3242
|
+
channel: body.channel.id,
|
|
3243
|
+
user: body.user.id,
|
|
3244
|
+
text: payload.text,
|
|
3245
|
+
blocks: payload.blocks
|
|
3246
|
+
});
|
|
3247
|
+
});
|
|
3248
|
+
const parsed = parseSlackCommandArgValue(action?.value ?? action?.selected_option?.value);
|
|
3249
|
+
if (!parsed) {
|
|
3250
|
+
await respondFn({
|
|
3251
|
+
text: "Sorry, that button is no longer valid.",
|
|
3252
|
+
response_type: "ephemeral"
|
|
3253
|
+
});
|
|
3254
|
+
return;
|
|
3255
|
+
}
|
|
3256
|
+
if (body.user?.id && parsed.userId !== body.user.id) {
|
|
3257
|
+
await respondFn({
|
|
3258
|
+
text: "That menu is for another user.",
|
|
3259
|
+
response_type: "ephemeral"
|
|
3260
|
+
});
|
|
3261
|
+
return;
|
|
3262
|
+
}
|
|
3263
|
+
const { buildCommandTextFromArgs, findCommandByNativeName } = await loadSlashCommandsRuntime();
|
|
3264
|
+
const commandDefinition = findCommandByNativeName(parsed.command, "slack");
|
|
3265
|
+
const commandArgs = { values: { [parsed.arg]: parsed.value } };
|
|
3266
|
+
const prompt = commandDefinition ? buildCommandTextFromArgs(commandDefinition, commandArgs) : `/${parsed.command} ${parsed.value}`;
|
|
3267
|
+
const user = body.user;
|
|
3268
|
+
const userName = user && "name" in user && user.name ? user.name : user && "username" in user && user.username ? user.username : user?.id ?? "";
|
|
3269
|
+
const triggerId = "trigger_id" in body ? body.trigger_id : void 0;
|
|
3270
|
+
await handleSlashCommand({
|
|
3271
|
+
command: {
|
|
3272
|
+
user_id: user?.id ?? "",
|
|
3273
|
+
user_name: userName,
|
|
3274
|
+
channel_id: body.channel?.id ?? "",
|
|
3275
|
+
channel_name: body.channel?.name ?? body.channel?.id ?? "",
|
|
3276
|
+
trigger_id: triggerId
|
|
3277
|
+
},
|
|
3278
|
+
ack: async () => {},
|
|
3279
|
+
respond: respondFn,
|
|
3280
|
+
body,
|
|
3281
|
+
prompt,
|
|
3282
|
+
commandArgs,
|
|
3283
|
+
commandDefinition: commandDefinition ?? void 0
|
|
3284
|
+
});
|
|
3285
|
+
});
|
|
3286
|
+
};
|
|
3287
|
+
registerArgAction(SLACK_COMMAND_ARG_ACTION_ID);
|
|
3288
|
+
}
|
|
3289
|
+
//#endregion
|
|
3290
|
+
//#region extensions/slack/src/monitor/provider.ts
|
|
3291
|
+
function isConstructorFunction(value) {
|
|
3292
|
+
return typeof value === "function";
|
|
3293
|
+
}
|
|
3294
|
+
function resolveSlackBoltModule(value) {
|
|
3295
|
+
if (!value || typeof value !== "object") return null;
|
|
3296
|
+
const app = Reflect.get(value, "App");
|
|
3297
|
+
const httpReceiver = Reflect.get(value, "HTTPReceiver");
|
|
3298
|
+
if (!isConstructorFunction(app) || !isConstructorFunction(httpReceiver)) return null;
|
|
3299
|
+
return {
|
|
3300
|
+
App: app,
|
|
3301
|
+
HTTPReceiver: httpReceiver
|
|
3302
|
+
};
|
|
3303
|
+
}
|
|
3304
|
+
function resolveSlackBoltInterop(params) {
|
|
3305
|
+
const { defaultImport, namespaceImport } = params;
|
|
3306
|
+
const nestedDefault = defaultImport && typeof defaultImport === "object" ? Reflect.get(defaultImport, "default") : void 0;
|
|
3307
|
+
const namespaceDefault = namespaceImport && typeof namespaceImport === "object" ? Reflect.get(namespaceImport, "default") : void 0;
|
|
3308
|
+
const namespaceReceiver = namespaceImport && typeof namespaceImport === "object" ? Reflect.get(namespaceImport, "HTTPReceiver") : void 0;
|
|
3309
|
+
const directModule = resolveSlackBoltModule(defaultImport) ?? resolveSlackBoltModule(nestedDefault) ?? resolveSlackBoltModule(namespaceDefault) ?? resolveSlackBoltModule(namespaceImport);
|
|
3310
|
+
if (directModule) return directModule;
|
|
3311
|
+
if (isConstructorFunction(defaultImport) && isConstructorFunction(namespaceReceiver)) return {
|
|
3312
|
+
App: defaultImport,
|
|
3313
|
+
HTTPReceiver: namespaceReceiver
|
|
3314
|
+
};
|
|
3315
|
+
throw new TypeError("Unable to resolve @slack/bolt App/HTTPReceiver exports");
|
|
3316
|
+
}
|
|
3317
|
+
let slackBoltInterop;
|
|
3318
|
+
function getSlackBoltInterop() {
|
|
3319
|
+
if (!slackBoltInterop) slackBoltInterop = resolveSlackBoltInterop({
|
|
3320
|
+
defaultImport: SlackBolt,
|
|
3321
|
+
namespaceImport: SlackBoltNamespace
|
|
3322
|
+
});
|
|
3323
|
+
return slackBoltInterop;
|
|
3324
|
+
}
|
|
3325
|
+
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
3326
|
+
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
3327
|
+
function parseApiAppIdFromAppToken(raw) {
|
|
3328
|
+
const token = raw?.trim();
|
|
3329
|
+
if (!token) return;
|
|
3330
|
+
return /^xapp-\d-([a-z0-9]+)-/i.exec(token)?.[1]?.toUpperCase();
|
|
3331
|
+
}
|
|
3332
|
+
function publishSlackConnectedStatus(setStatus) {
|
|
3333
|
+
if (!setStatus) return;
|
|
3334
|
+
setStatus({
|
|
3335
|
+
...createConnectedChannelStatusPatch(Date.now()),
|
|
3336
|
+
lastError: null
|
|
3337
|
+
});
|
|
3338
|
+
}
|
|
3339
|
+
function publishSlackDisconnectedStatus(setStatus, error) {
|
|
3340
|
+
if (!setStatus) return;
|
|
3341
|
+
const at = Date.now();
|
|
3342
|
+
const message = error ? formatUnknownError(error) : void 0;
|
|
3343
|
+
setStatus({
|
|
3344
|
+
connected: false,
|
|
3345
|
+
lastDisconnect: message ? {
|
|
3346
|
+
at,
|
|
3347
|
+
error: message
|
|
3348
|
+
} : { at },
|
|
3349
|
+
lastError: message ?? null
|
|
3350
|
+
});
|
|
3351
|
+
}
|
|
3352
|
+
function formatSlackResolvedLabel(params) {
|
|
3353
|
+
const extras = params.extra?.filter(Boolean) ?? [];
|
|
3354
|
+
const suffix = extras.length > 0 ? ` (id:${params.id}, ${extras.join(", ")})` : ` (id:${params.id})`;
|
|
3355
|
+
return `${params.input}→${params.name ?? params.id}${suffix}`;
|
|
3356
|
+
}
|
|
3357
|
+
function formatSlackChannelResolved(entry) {
|
|
3358
|
+
const id = entry.id ?? entry.input;
|
|
3359
|
+
return formatSlackResolvedLabel({
|
|
3360
|
+
input: entry.input,
|
|
3361
|
+
id,
|
|
3362
|
+
name: entry.name,
|
|
3363
|
+
extra: entry.archived ? ["archived"] : []
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
function formatSlackUserResolved(entry) {
|
|
3367
|
+
const id = entry.id ?? entry.input;
|
|
3368
|
+
return formatSlackResolvedLabel({
|
|
3369
|
+
input: entry.input,
|
|
3370
|
+
id,
|
|
3371
|
+
name: entry.name,
|
|
3372
|
+
extra: entry.note ? [entry.note] : []
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3375
|
+
async function monitorSlackProvider(opts = {}) {
|
|
3376
|
+
const cfg = opts.config ?? loadConfig();
|
|
3377
|
+
const runtime = opts.runtime ?? createNonExitingRuntime();
|
|
3378
|
+
let account = resolveSlackAccount({
|
|
3379
|
+
cfg,
|
|
3380
|
+
accountId: opts.accountId
|
|
3381
|
+
});
|
|
3382
|
+
if (!account.enabled) {
|
|
3383
|
+
runtime.log?.(`[${account.accountId}] slack account disabled; monitor startup skipped`);
|
|
3384
|
+
if (opts.abortSignal?.aborted) return;
|
|
3385
|
+
await new Promise((resolve) => {
|
|
3386
|
+
opts.abortSignal?.addEventListener("abort", () => resolve(), { once: true });
|
|
3387
|
+
});
|
|
3388
|
+
return;
|
|
3389
|
+
}
|
|
3390
|
+
const historyLimit = Math.max(0, account.config.historyLimit ?? cfg.messages?.groupChat?.historyLimit ?? 50);
|
|
3391
|
+
const sessionCfg = cfg.session;
|
|
3392
|
+
const sessionScope = sessionCfg?.scope ?? "per-sender";
|
|
3393
|
+
const mainKey = normalizeMainKey(sessionCfg?.mainKey);
|
|
3394
|
+
const slackMode = opts.mode ?? account.config.mode ?? "socket";
|
|
3395
|
+
const slackWebhookPath = normalizeSlackWebhookPath(account.config.webhookPath);
|
|
3396
|
+
const signingSecret = normalizeResolvedSecretInputString({
|
|
3397
|
+
value: account.config.signingSecret,
|
|
3398
|
+
path: `channels.slack.accounts.${account.accountId}.signingSecret`
|
|
3399
|
+
});
|
|
3400
|
+
const botToken = resolveSlackBotToken(opts.botToken ?? account.botToken);
|
|
3401
|
+
const appToken = resolveSlackAppToken(opts.appToken ?? account.appToken);
|
|
3402
|
+
if (!botToken || slackMode !== "http" && !appToken) {
|
|
3403
|
+
const missing = slackMode === "http" ? `Slack bot token missing for account "${account.accountId}" (set channels.slack.accounts.${account.accountId}.botToken or SLACK_BOT_TOKEN for default).` : `Slack bot + app tokens missing for account "${account.accountId}" (set channels.slack.accounts.${account.accountId}.botToken/appToken or SLACK_BOT_TOKEN/SLACK_APP_TOKEN for default).`;
|
|
3404
|
+
throw new Error(missing);
|
|
3405
|
+
}
|
|
3406
|
+
if (slackMode === "http" && !signingSecret) throw new Error(`Slack signing secret missing for account "${account.accountId}" (set channels.slack.signingSecret or channels.slack.accounts.${account.accountId}.signingSecret).`);
|
|
3407
|
+
const slackCfg = account.config;
|
|
3408
|
+
const dmConfig = slackCfg.dm;
|
|
3409
|
+
const dmEnabled = dmConfig?.enabled ?? true;
|
|
3410
|
+
const dmPolicy = slackCfg.dmPolicy ?? dmConfig?.policy ?? "pairing";
|
|
3411
|
+
let allowFrom = slackCfg.allowFrom ?? dmConfig?.allowFrom;
|
|
3412
|
+
const groupDmEnabled = dmConfig?.groupEnabled ?? false;
|
|
3413
|
+
const groupDmChannels = dmConfig?.groupChannels;
|
|
3414
|
+
let channelsConfig = slackCfg.channels;
|
|
3415
|
+
const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
|
|
3416
|
+
const { groupPolicy, providerMissingFallbackApplied } = resolveOpenProviderRuntimeGroupPolicy({
|
|
3417
|
+
providerConfigPresent: cfg.channels?.slack !== void 0,
|
|
3418
|
+
groupPolicy: slackCfg.groupPolicy,
|
|
3419
|
+
defaultGroupPolicy
|
|
3420
|
+
});
|
|
3421
|
+
warnMissingProviderGroupPolicyFallbackOnce({
|
|
3422
|
+
providerMissingFallbackApplied,
|
|
3423
|
+
providerKey: "slack",
|
|
3424
|
+
accountId: account.accountId,
|
|
3425
|
+
log: (message) => runtime.log?.(warn(message))
|
|
3426
|
+
});
|
|
3427
|
+
const resolveToken = account.userToken || botToken;
|
|
3428
|
+
const useAccessGroups = cfg.commands?.useAccessGroups !== false;
|
|
3429
|
+
const reactionMode = slackCfg.reactionNotifications ?? "own";
|
|
3430
|
+
const reactionAllowlist = slackCfg.reactionAllowlist ?? [];
|
|
3431
|
+
const replyToMode = slackCfg.replyToMode ?? "off";
|
|
3432
|
+
const threadHistoryScope = slackCfg.thread?.historyScope ?? "thread";
|
|
3433
|
+
const threadInheritParent = slackCfg.thread?.inheritParent ?? false;
|
|
3434
|
+
const slashCommand = resolveSlackSlashCommandConfig(opts.slashCommand ?? slackCfg.slashCommand);
|
|
3435
|
+
const textLimit = resolveTextChunkLimit(cfg, "slack", account.accountId, { fallbackLimit: SLACK_TEXT_LIMIT });
|
|
3436
|
+
const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions";
|
|
3437
|
+
const typingReaction = slackCfg.typingReaction?.trim() ?? "";
|
|
3438
|
+
const mediaMaxBytes = (opts.mediaMaxMb ?? slackCfg.mediaMaxMb ?? 20) * 1024 * 1024;
|
|
3439
|
+
const removeAckAfterReply = cfg.messages?.removeAckAfterReply ?? false;
|
|
3440
|
+
const { App, HTTPReceiver } = getSlackBoltInterop();
|
|
3441
|
+
const receiver = slackMode === "http" ? new HTTPReceiver({
|
|
3442
|
+
signingSecret: signingSecret ?? "",
|
|
3443
|
+
endpoints: slackWebhookPath
|
|
3444
|
+
}) : null;
|
|
3445
|
+
const clientOptions = resolveSlackWebClientOptions();
|
|
3446
|
+
const app = new App(slackMode === "socket" ? {
|
|
3447
|
+
token: botToken,
|
|
3448
|
+
appToken,
|
|
3449
|
+
socketMode: true,
|
|
3450
|
+
clientOptions
|
|
3451
|
+
} : {
|
|
3452
|
+
token: botToken,
|
|
3453
|
+
receiver: receiver ?? void 0,
|
|
3454
|
+
clientOptions
|
|
3455
|
+
});
|
|
3456
|
+
const slackHttpHandler = slackMode === "http" && receiver ? async (req, res) => {
|
|
3457
|
+
const guard = installRequestBodyLimitGuard(req, res, {
|
|
3458
|
+
maxBytes: SLACK_WEBHOOK_MAX_BODY_BYTES,
|
|
3459
|
+
timeoutMs: SLACK_WEBHOOK_BODY_TIMEOUT_MS,
|
|
3460
|
+
responseFormat: "text"
|
|
3461
|
+
});
|
|
3462
|
+
if (guard.isTripped()) return;
|
|
3463
|
+
try {
|
|
3464
|
+
await Promise.resolve(receiver.requestListener(req, res));
|
|
3465
|
+
} catch (err) {
|
|
3466
|
+
if (!guard.isTripped()) throw err;
|
|
3467
|
+
} finally {
|
|
3468
|
+
guard.dispose();
|
|
3469
|
+
}
|
|
3470
|
+
} : null;
|
|
3471
|
+
let unregisterHttpHandler = null;
|
|
3472
|
+
let botUserId = "";
|
|
3473
|
+
let teamId = "";
|
|
3474
|
+
let apiAppId = "";
|
|
3475
|
+
const expectedApiAppIdFromAppToken = parseApiAppIdFromAppToken(appToken);
|
|
3476
|
+
try {
|
|
3477
|
+
const auth = await app.client.auth.test({ token: botToken });
|
|
3478
|
+
botUserId = auth.user_id ?? "";
|
|
3479
|
+
teamId = auth.team_id ?? "";
|
|
3480
|
+
apiAppId = auth.api_app_id ?? "";
|
|
3481
|
+
} catch {}
|
|
3482
|
+
if (apiAppId && expectedApiAppIdFromAppToken && apiAppId !== expectedApiAppIdFromAppToken) runtime.error?.(`slack token mismatch: bot token api_app_id=${apiAppId} but app token looks like api_app_id=${expectedApiAppIdFromAppToken}`);
|
|
3483
|
+
const ctx = createSlackMonitorContext({
|
|
3484
|
+
cfg,
|
|
3485
|
+
accountId: account.accountId,
|
|
3486
|
+
botToken,
|
|
3487
|
+
app,
|
|
3488
|
+
runtime,
|
|
3489
|
+
botUserId,
|
|
3490
|
+
teamId,
|
|
3491
|
+
apiAppId,
|
|
3492
|
+
historyLimit,
|
|
3493
|
+
sessionScope,
|
|
3494
|
+
mainKey,
|
|
3495
|
+
dmEnabled,
|
|
3496
|
+
dmPolicy,
|
|
3497
|
+
allowFrom,
|
|
3498
|
+
allowNameMatching: isDangerousNameMatchingEnabled(slackCfg),
|
|
3499
|
+
groupDmEnabled,
|
|
3500
|
+
groupDmChannels,
|
|
3501
|
+
defaultRequireMention: slackCfg.requireMention,
|
|
3502
|
+
channelsConfig,
|
|
3503
|
+
groupPolicy,
|
|
3504
|
+
useAccessGroups,
|
|
3505
|
+
reactionMode,
|
|
3506
|
+
reactionAllowlist,
|
|
3507
|
+
replyToMode,
|
|
3508
|
+
threadHistoryScope,
|
|
3509
|
+
threadInheritParent,
|
|
3510
|
+
slashCommand,
|
|
3511
|
+
textLimit,
|
|
3512
|
+
ackReactionScope,
|
|
3513
|
+
typingReaction,
|
|
3514
|
+
mediaMaxBytes,
|
|
3515
|
+
removeAckAfterReply
|
|
3516
|
+
});
|
|
3517
|
+
const trackEvent = opts.setStatus ? () => {
|
|
3518
|
+
opts.setStatus({
|
|
3519
|
+
lastEventAt: Date.now(),
|
|
3520
|
+
lastInboundAt: Date.now()
|
|
3521
|
+
});
|
|
3522
|
+
} : void 0;
|
|
3523
|
+
const handleSlackMessage = createSlackMessageHandler({
|
|
3524
|
+
ctx,
|
|
3525
|
+
account,
|
|
3526
|
+
trackEvent
|
|
3527
|
+
});
|
|
3528
|
+
const execApprovalsHandler = isSlackExecApprovalClientEnabled({
|
|
3529
|
+
cfg,
|
|
3530
|
+
accountId: account.accountId
|
|
3531
|
+
}) ? new SlackExecApprovalHandler({
|
|
3532
|
+
app,
|
|
3533
|
+
accountId: account.accountId,
|
|
3534
|
+
config: slackCfg.execApprovals ?? {},
|
|
3535
|
+
cfg
|
|
3536
|
+
}) : null;
|
|
3537
|
+
registerSlackMonitorEvents({
|
|
3538
|
+
ctx,
|
|
3539
|
+
account,
|
|
3540
|
+
handleSlackMessage,
|
|
3541
|
+
trackEvent
|
|
3542
|
+
});
|
|
3543
|
+
await registerSlackMonitorSlashCommands({
|
|
3544
|
+
ctx,
|
|
3545
|
+
account
|
|
3546
|
+
});
|
|
3547
|
+
await execApprovalsHandler?.start();
|
|
3548
|
+
if (slackMode === "http" && slackHttpHandler) unregisterHttpHandler = registerSlackHttpHandler({
|
|
3549
|
+
path: slackWebhookPath,
|
|
3550
|
+
handler: slackHttpHandler,
|
|
3551
|
+
log: runtime.log,
|
|
3552
|
+
accountId: account.accountId
|
|
3553
|
+
});
|
|
3554
|
+
if (resolveToken) (async () => {
|
|
3555
|
+
if (opts.abortSignal?.aborted) return;
|
|
3556
|
+
if (channelsConfig && Object.keys(channelsConfig).length > 0) try {
|
|
3557
|
+
const entries = Object.keys(channelsConfig).filter((key) => key !== "*");
|
|
3558
|
+
if (entries.length > 0) {
|
|
3559
|
+
const resolved = await resolveSlackChannelAllowlist({
|
|
3560
|
+
token: resolveToken,
|
|
3561
|
+
entries
|
|
3562
|
+
});
|
|
3563
|
+
const nextChannels = { ...channelsConfig };
|
|
3564
|
+
const mapping = [];
|
|
3565
|
+
const unresolved = [];
|
|
3566
|
+
for (const entry of resolved) {
|
|
3567
|
+
const source = channelsConfig?.[entry.input];
|
|
3568
|
+
if (!source) continue;
|
|
3569
|
+
if (!entry.resolved || !entry.id) {
|
|
3570
|
+
unresolved.push(entry.input);
|
|
3571
|
+
continue;
|
|
3572
|
+
}
|
|
3573
|
+
mapping.push(formatSlackChannelResolved(entry));
|
|
3574
|
+
const existing = nextChannels[entry.id] ?? {};
|
|
3575
|
+
nextChannels[entry.id] = {
|
|
3576
|
+
...source,
|
|
3577
|
+
...existing
|
|
3578
|
+
};
|
|
3579
|
+
}
|
|
3580
|
+
channelsConfig = nextChannels;
|
|
3581
|
+
ctx.channelsConfig = nextChannels;
|
|
3582
|
+
summarizeMapping("slack channels", mapping, unresolved, runtime);
|
|
3583
|
+
}
|
|
3584
|
+
} catch (err) {
|
|
3585
|
+
runtime.log?.(`slack channel resolve failed; using config entries. ${String(err)}`);
|
|
3586
|
+
}
|
|
3587
|
+
const allowEntries = normalizeStringEntries(allowFrom).filter((entry) => entry !== "*");
|
|
3588
|
+
if (allowEntries.length > 0) try {
|
|
3589
|
+
const { mapping, unresolved, additions } = buildAllowlistResolutionSummary(await resolveSlackUserAllowlist({
|
|
3590
|
+
token: resolveToken,
|
|
3591
|
+
entries: allowEntries
|
|
3592
|
+
}), { formatResolved: formatSlackUserResolved });
|
|
3593
|
+
allowFrom = mergeAllowlist({
|
|
3594
|
+
existing: allowFrom,
|
|
3595
|
+
additions
|
|
3596
|
+
});
|
|
3597
|
+
ctx.allowFrom = normalizeAllowList(allowFrom);
|
|
3598
|
+
summarizeMapping("slack users", mapping, unresolved, runtime);
|
|
3599
|
+
} catch (err) {
|
|
3600
|
+
runtime.log?.(`slack user resolve failed; using config entries. ${String(err)}`);
|
|
3601
|
+
}
|
|
3602
|
+
if (channelsConfig && Object.keys(channelsConfig).length > 0) {
|
|
3603
|
+
const userEntries = /* @__PURE__ */ new Set();
|
|
3604
|
+
for (const channel of Object.values(channelsConfig)) addAllowlistUserEntriesFromConfigEntry(userEntries, channel);
|
|
3605
|
+
if (userEntries.size > 0) try {
|
|
3606
|
+
const { resolvedMap, mapping, unresolved } = buildAllowlistResolutionSummary(await resolveSlackUserAllowlist({
|
|
3607
|
+
token: resolveToken,
|
|
3608
|
+
entries: Array.from(userEntries)
|
|
3609
|
+
}), { formatResolved: formatSlackUserResolved });
|
|
3610
|
+
const nextChannels = patchAllowlistUsersInConfigEntries({
|
|
3611
|
+
entries: channelsConfig,
|
|
3612
|
+
resolvedMap
|
|
3613
|
+
});
|
|
3614
|
+
channelsConfig = nextChannels;
|
|
3615
|
+
ctx.channelsConfig = nextChannels;
|
|
3616
|
+
summarizeMapping("slack channel users", mapping, unresolved, runtime);
|
|
3617
|
+
} catch (err) {
|
|
3618
|
+
runtime.log?.(`slack channel user resolve failed; using config entries. ${String(err)}`);
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
})();
|
|
3622
|
+
const stopOnAbort = () => {
|
|
3623
|
+
if (opts.abortSignal?.aborted && slackMode === "socket") app.stop();
|
|
3624
|
+
};
|
|
3625
|
+
opts.abortSignal?.addEventListener("abort", stopOnAbort, { once: true });
|
|
3626
|
+
try {
|
|
3627
|
+
if (slackMode === "socket") {
|
|
3628
|
+
let reconnectAttempts = 0;
|
|
3629
|
+
while (!opts.abortSignal?.aborted) {
|
|
3630
|
+
try {
|
|
3631
|
+
await app.start();
|
|
3632
|
+
reconnectAttempts = 0;
|
|
3633
|
+
publishSlackConnectedStatus(opts.setStatus);
|
|
3634
|
+
runtime.log?.("slack socket mode connected");
|
|
3635
|
+
} catch (err) {
|
|
3636
|
+
if (isNonRecoverableSlackAuthError(err)) {
|
|
3637
|
+
runtime.error?.(`slack socket mode failed to start due to non-recoverable auth error — skipping channel (${formatUnknownError(err)})`);
|
|
3638
|
+
throw err;
|
|
3639
|
+
}
|
|
3640
|
+
reconnectAttempts += 1;
|
|
3641
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw err;
|
|
3642
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
3643
|
+
runtime.error?.(`slack socket mode failed to start. retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s (${formatUnknownError(err)})`);
|
|
3644
|
+
try {
|
|
3645
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
3646
|
+
} catch {
|
|
3647
|
+
break;
|
|
3648
|
+
}
|
|
3649
|
+
continue;
|
|
3650
|
+
}
|
|
3651
|
+
if (opts.abortSignal?.aborted) break;
|
|
3652
|
+
const disconnect = await waitForSlackSocketDisconnect(app, opts.abortSignal);
|
|
3653
|
+
if (opts.abortSignal?.aborted) break;
|
|
3654
|
+
publishSlackDisconnectedStatus(opts.setStatus, disconnect.error);
|
|
3655
|
+
if (disconnect.error && isNonRecoverableSlackAuthError(disconnect.error)) {
|
|
3656
|
+
runtime.error?.(`slack socket mode disconnected due to non-recoverable auth error — skipping channel (${formatUnknownError(disconnect.error)})`);
|
|
3657
|
+
throw disconnect.error instanceof Error ? disconnect.error : new Error(formatUnknownError(disconnect.error));
|
|
3658
|
+
}
|
|
3659
|
+
reconnectAttempts += 1;
|
|
3660
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw new Error(`Slack socket mode reconnect max attempts reached (${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts}) after ${disconnect.event}`);
|
|
3661
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
3662
|
+
runtime.error?.(`slack socket disconnected (${disconnect.event}). retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s${disconnect.error ? ` (${formatUnknownError(disconnect.error)})` : ""}`);
|
|
3663
|
+
await app.stop().catch(() => void 0);
|
|
3664
|
+
try {
|
|
3665
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
3666
|
+
} catch {
|
|
3667
|
+
break;
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
} else {
|
|
3671
|
+
runtime.log?.(`slack http mode listening at ${slackWebhookPath}`);
|
|
3672
|
+
if (!opts.abortSignal?.aborted) await new Promise((resolve) => {
|
|
3673
|
+
opts.abortSignal?.addEventListener("abort", () => resolve(), { once: true });
|
|
3674
|
+
});
|
|
3675
|
+
}
|
|
3676
|
+
} finally {
|
|
3677
|
+
opts.abortSignal?.removeEventListener("abort", stopOnAbort);
|
|
3678
|
+
unregisterHttpHandler?.();
|
|
3679
|
+
await execApprovalsHandler?.stop().catch(() => void 0);
|
|
3680
|
+
await app.stop().catch(() => void 0);
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy;
|
|
3684
|
+
//#endregion
|
|
3685
|
+
export { registerSlackHttpHandler as a, normalizeSlackWebhookPath as i, resolveSlackRuntimeGroupPolicy as n, handleSlackHttpRequest as r, monitorSlackProvider as t };
|