stableclaw 2026.5.1 → 2026.5.3
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/assets/agents-DIJiVfPj.js +813 -0
- package/dist/control-ui/assets/anthropic-BnQLajET.js +37 -0
- package/dist/control-ui/assets/azure-openai-responses-D6oH5P8v.js +2 -0
- package/dist/control-ui/assets/channel-config-extras-Cu8rP5sC.js +2 -0
- package/dist/control-ui/assets/channels-DMte0OdA.js +349 -0
- package/dist/control-ui/assets/cron-hM6tj-cg.js +928 -0
- package/dist/control-ui/assets/de-BzA7Smom.js +2 -0
- package/dist/control-ui/assets/debug-ChdgbieB.js +94 -0
- package/dist/control-ui/assets/es--sAce87o.js +2 -0
- package/dist/control-ui/assets/github-copilot-headers-cUjskhp6.js +2 -0
- package/dist/control-ui/assets/google-DDYMjR2f.js +2 -0
- package/dist/control-ui/assets/google-gemini-cli-BBZpF1Bz.js +3 -0
- package/dist/control-ui/assets/google-shared-Brxly9jR.js +12 -0
- package/dist/control-ui/assets/google-vertex-moPkJqQt.js +2 -0
- package/dist/control-ui/assets/hash-BN8UQrrC.js +2 -0
- package/dist/control-ui/assets/index-hSu8pNmQ.js +4841 -0
- package/dist/control-ui/assets/instances-BO-5LU4G.js +57 -0
- package/dist/control-ui/assets/logs-CaFT90eM.js +74 -0
- package/dist/control-ui/assets/mistral-yMnz8nsP.js +8 -0
- package/dist/control-ui/assets/nodes-6XxETMb5.js +430 -0
- package/dist/control-ui/assets/openai-CQsomflW.js +17 -0
- package/dist/control-ui/assets/openai-codex-responses-DXqDuiSK.js +8 -0
- package/dist/control-ui/assets/openai-completions-Bme8q7yw.js +6 -0
- package/dist/control-ui/assets/openai-responses-DpESo9k8.js +2 -0
- package/dist/control-ui/assets/openai-responses-shared-CjacPL_h.js +11 -0
- package/dist/control-ui/assets/preview-Ca6p7-4-.js +2 -0
- package/dist/control-ui/assets/pt-BR-DkjnRLn3.js +2 -0
- package/dist/control-ui/assets/sessions-USutdtjY.js +236 -0
- package/dist/control-ui/assets/skills-DLY8KTEh.js +216 -0
- package/dist/control-ui/assets/skills-shared-DUfo2UBp.js +11 -0
- package/dist/control-ui/assets/transform-messages-Lu1Q3cQf.js +2 -0
- package/dist/control-ui/assets/zh-CN-Di7IMlSu.js +2 -0
- package/dist/control-ui/assets/zh-TW-yENTnmx1.js +2 -0
- package/dist/control-ui/index.html +2 -2
- 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/assets/agents-BQThDjmV.js +0 -813
- package/dist/control-ui/assets/anthropic-DgG8lDlL.js +0 -37
- package/dist/control-ui/assets/azure-openai-responses-CBgrXqWI.js +0 -2
- package/dist/control-ui/assets/channel-config-extras-DNCeHtEf.js +0 -2
- package/dist/control-ui/assets/channels-Dpq8rmYk.js +0 -349
- package/dist/control-ui/assets/cron-Cc7oz4VO.js +0 -928
- package/dist/control-ui/assets/de-DU-XmSEb.js +0 -2
- package/dist/control-ui/assets/debug-CwAvIw7x.js +0 -94
- 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/github-copilot-headers-CrI0CIJ7.js +0 -2
- package/dist/control-ui/assets/google-D-Vqc1qj.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-CUmjeRtH.js +0 -4841
- package/dist/control-ui/assets/instances-BwyJkk_4.js +0 -57
- package/dist/control-ui/assets/logs-vVeVJ0CI.js +0 -74
- package/dist/control-ui/assets/mistral-C-PkU019.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-Cr7J2fxH.js +0 -8
- package/dist/control-ui/assets/openai-completions-ZUYR4bUM.js +0 -6
- package/dist/control-ui/assets/openai-responses-D5cbpSni.js +0 -2
- package/dist/control-ui/assets/openai-responses-shared-BzAz6CNs.js +0 -11
- package/dist/control-ui/assets/pt-BR-RqwUvKTB.js +0 -2
- package/dist/control-ui/assets/sessions-_scr02pD.js +0 -236
- package/dist/control-ui/assets/skills-DCt5NidQ.js +0 -216
- package/dist/control-ui/assets/skills-shared-DJsJP4-4.js +0 -11
- 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/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,3676 @@
|
|
|
1
|
+
import { t as createNonExitingRuntime } from "./runtime-kS8e4c6-.js";
|
|
2
|
+
import { _ as normalizeAccountId, u as resolveAgentIdFromSessionKey } from "./session-key-Do__tq1E.js";
|
|
3
|
+
import { a as shouldLogVerbose, r as logVerbose, t as danger } from "./globals-CDtV0ht8.js";
|
|
4
|
+
import { c as loadConfig } from "./io-8kNEV_ou.js";
|
|
5
|
+
import { r as buildChannelConfigSchema } from "./config-schema-mfJ91WLf.js";
|
|
6
|
+
import { t as resolveAccountEntry } from "./account-lookup-CLJxpfHr.js";
|
|
7
|
+
import { r as getSessionBindingService } from "./session-binding-service-B1JT9Vbs.js";
|
|
8
|
+
import { a as normalizePluginHttpPath } from "./http-route-overlap-DHaF9uSy.js";
|
|
9
|
+
import { a as warnMissingProviderGroupPolicyFallbackOnce, n as resolveAllowlistProviderRuntimeGroupPolicy, r as resolveDefaultGroupPolicy } from "./runtime-group-policy-5Lr0Ieci.js";
|
|
10
|
+
import "./status-helpers-BY87Y_59.js";
|
|
11
|
+
import { p as resolveSendableOutboundReplyParts } from "./reply-payload-DPD7eb4b.js";
|
|
12
|
+
import { r as chunkMarkdownText } from "./chunk-qF6XcBVp.js";
|
|
13
|
+
import { t as buildRandomTempFilePath } from "./temp-download-lZ5Q4P_b.js";
|
|
14
|
+
import "./temp-path-DGw1cXDg.js";
|
|
15
|
+
import { i as resolveAgentRoute, n as deriveLastRoutePolicy } from "./resolve-route-BxAbY_hl.js";
|
|
16
|
+
import "./core-_nKe7lGV.js";
|
|
17
|
+
import "./routing-BKQZI-Y4.js";
|
|
18
|
+
import { t as hasControlCommand } from "./command-detection-ILpwoAEk.js";
|
|
19
|
+
import { t as finalizeInboundContext } from "./inbound-context-BxNfypB6.js";
|
|
20
|
+
import { r as formatInboundEnvelope } from "./envelope-Eqtls_G0.js";
|
|
21
|
+
import { n as buildMentionRegexes, r as matchesMentionPatterns } from "./mentions-AMWjK6WR.js";
|
|
22
|
+
import { t as dispatchReplyWithBufferedBlockDispatcher } from "./provider-dispatcher-BEZOvNvI.js";
|
|
23
|
+
import { n as resolveControlCommandGate } from "./command-gating-HO-bVa6h.js";
|
|
24
|
+
import { t as recordInboundSession } from "./session-DifMNh_t.js";
|
|
25
|
+
import { n as recordChannelActivity } from "./channel-activity-UUJp6qqz.js";
|
|
26
|
+
import { a as readChannelAllowFromStore, d as upsertChannelPairingRequest } from "./pairing-store-BZr880dY.js";
|
|
27
|
+
import { n as isSenderIdAllowed, r as mergeDmAllowFromSources, t as firstDefined } from "./allow-from-CxUv1m05.js";
|
|
28
|
+
import "./channel-config-schema-CfbLUVxc.js";
|
|
29
|
+
import { n as evaluateMatchedGroupAccessForPolicy } from "./group-access-ekSGhWQ1.js";
|
|
30
|
+
import { c as resolvePinnedMainDmOwnerFromAllowlist } from "./dm-policy-shared-CaDbQVNm.js";
|
|
31
|
+
import { s as clearHistoryEntriesIfEnabled, u as recordPendingHistoryEntryIfEnabled } from "./history-UDByIZZ1.js";
|
|
32
|
+
import "./reply-history-UL04gA_Z.js";
|
|
33
|
+
import { t as waitForAbortSignal } from "./abort-signal-BJHZapll.js";
|
|
34
|
+
import "./runtime-BWPc8yxN.js";
|
|
35
|
+
import { t as withTimeout } from "./with-timeout-zJ9dD3CG.js";
|
|
36
|
+
import "./runtime-env-Gi8zIuHa.js";
|
|
37
|
+
import "./setup-8JVr0TMo.js";
|
|
38
|
+
import "./config-runtime-D208l2BL.js";
|
|
39
|
+
import "./reply-runtime-CvaF7P6-.js";
|
|
40
|
+
import "./reply-dispatch-runtime-DxUm7xv8.js";
|
|
41
|
+
import { t as createChannelReplyPipeline } from "./channel-reply-pipeline-Dyh1zCi9.js";
|
|
42
|
+
import "./channel-runtime-DLANIaFl.js";
|
|
43
|
+
import { a as isRequestBodyLimitError, c as requestBodyErrorToText, s as readRequestBodyWithLimit } from "./http-body-CfWmnfar.js";
|
|
44
|
+
import { i as resolveConfiguredBindingRoute, r as ensureConfiguredBindingRouteReady } from "./conversation-runtime-DvoDx5Lp.js";
|
|
45
|
+
import { t as resolvePairingIdLabel } from "./pairing-labels-D6PPeU9T.js";
|
|
46
|
+
import { r as stripMarkdown } from "./text-runtime-UxAYZSfy.js";
|
|
47
|
+
import { t as registerPluginHttpRoute } from "./http-registry-BosSTk62.js";
|
|
48
|
+
import { t as createChannelPairingChallengeIssuer } from "./channel-pairing-mk5cf7oC.js";
|
|
49
|
+
import "./account-resolution-ETKTx0tC.js";
|
|
50
|
+
import "./channel-inbound-BbIwjinv.js";
|
|
51
|
+
import { n as resolveMentionGatingWithBypass } from "./mention-gating-wYlgG3vD.js";
|
|
52
|
+
import { n as toLocationContext, t as formatLocationText } from "./location-BpF0yH4v.js";
|
|
53
|
+
import { t as resolveInboundSessionEnvelopeContext } from "./session-envelope-Cc5bPuvN.js";
|
|
54
|
+
import "./command-auth-BoH1IkmW.js";
|
|
55
|
+
import { a as createWebhookInFlightLimiter, i as beginWebhookRequestPipelineOrReject } from "./webhook-request-guards-B8flzgTp.js";
|
|
56
|
+
import "./webhook-ingress-DElWn_px.js";
|
|
57
|
+
import { t as zod_exports } from "./zod-Bww_ovOv.js";
|
|
58
|
+
import { i as resolveLineAccount } from "./accounts-CinolZTU.js";
|
|
59
|
+
import fsSync from "node:fs";
|
|
60
|
+
import { readFile } from "node:fs/promises";
|
|
61
|
+
import crypto from "node:crypto";
|
|
62
|
+
import { messagingApi } from "@line/bot-sdk";
|
|
63
|
+
//#region extensions/line/src/bot-access.ts
|
|
64
|
+
function normalizeAllowEntry(value) {
|
|
65
|
+
const trimmed = String(value).trim();
|
|
66
|
+
if (!trimmed) return "";
|
|
67
|
+
if (trimmed === "*") return "*";
|
|
68
|
+
return trimmed.replace(/^line:(?:user:)?/i, "");
|
|
69
|
+
}
|
|
70
|
+
const normalizeAllowFrom = (list) => {
|
|
71
|
+
const entries = (list ?? []).map((value) => normalizeAllowEntry(value)).filter(Boolean);
|
|
72
|
+
return {
|
|
73
|
+
entries,
|
|
74
|
+
hasWildcard: entries.includes("*"),
|
|
75
|
+
hasEntries: entries.length > 0
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
const normalizeDmAllowFromWithStore = (params) => normalizeAllowFrom(mergeDmAllowFromSources(params));
|
|
79
|
+
const isSenderAllowed = (params) => {
|
|
80
|
+
const { allow, senderId } = params;
|
|
81
|
+
return isSenderIdAllowed(allow, senderId, false);
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region extensions/line/src/download.ts
|
|
85
|
+
const AUDIO_BRANDS = new Set([
|
|
86
|
+
"m4a ",
|
|
87
|
+
"m4b ",
|
|
88
|
+
"m4p ",
|
|
89
|
+
"m4r ",
|
|
90
|
+
"f4a ",
|
|
91
|
+
"f4b "
|
|
92
|
+
]);
|
|
93
|
+
async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 * 1024 * 1024) {
|
|
94
|
+
const response = await new messagingApi.MessagingApiBlobClient({ channelAccessToken }).getMessageContent(messageId);
|
|
95
|
+
const chunks = [];
|
|
96
|
+
let totalSize = 0;
|
|
97
|
+
for await (const chunk of response) {
|
|
98
|
+
totalSize += chunk.length;
|
|
99
|
+
if (totalSize > maxBytes) throw new Error(`Media exceeds ${Math.round(maxBytes / (1024 * 1024))}MB limit`);
|
|
100
|
+
chunks.push(chunk);
|
|
101
|
+
}
|
|
102
|
+
const buffer = Buffer.concat(chunks);
|
|
103
|
+
const contentType = detectContentType(buffer);
|
|
104
|
+
const filePath = buildRandomTempFilePath({
|
|
105
|
+
prefix: "line-media",
|
|
106
|
+
extension: getExtensionForContentType(contentType)
|
|
107
|
+
});
|
|
108
|
+
await fsSync.promises.writeFile(filePath, buffer);
|
|
109
|
+
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
110
|
+
return {
|
|
111
|
+
path: filePath,
|
|
112
|
+
contentType,
|
|
113
|
+
size: buffer.length
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function detectContentType(buffer) {
|
|
117
|
+
const hasFtypBox = buffer.length >= 12 && buffer[4] === 102 && buffer[5] === 116 && buffer[6] === 121 && buffer[7] === 112;
|
|
118
|
+
if (buffer.length >= 2) {
|
|
119
|
+
if (buffer[0] === 255 && buffer[1] === 216) return "image/jpeg";
|
|
120
|
+
if (buffer[0] === 137 && buffer[1] === 80 && buffer[2] === 78 && buffer[3] === 71) return "image/png";
|
|
121
|
+
if (buffer[0] === 71 && buffer[1] === 73 && buffer[2] === 70) return "image/gif";
|
|
122
|
+
if (buffer[0] === 82 && buffer[1] === 73 && buffer[2] === 70 && buffer[3] === 70 && buffer[8] === 87 && buffer[9] === 69 && buffer[10] === 66 && buffer[11] === 80) return "image/webp";
|
|
123
|
+
if (hasFtypBox) {
|
|
124
|
+
const majorBrand = buffer.toString("ascii", 8, 12).toLowerCase();
|
|
125
|
+
if (AUDIO_BRANDS.has(majorBrand)) return "audio/mp4";
|
|
126
|
+
return "video/mp4";
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return "application/octet-stream";
|
|
130
|
+
}
|
|
131
|
+
function getExtensionForContentType(contentType) {
|
|
132
|
+
switch (contentType) {
|
|
133
|
+
case "image/jpeg": return ".jpg";
|
|
134
|
+
case "image/png": return ".png";
|
|
135
|
+
case "image/gif": return ".gif";
|
|
136
|
+
case "image/webp": return ".webp";
|
|
137
|
+
case "video/mp4": return ".mp4";
|
|
138
|
+
case "audio/mp4": return ".m4a";
|
|
139
|
+
case "audio/mpeg": return ".mp3";
|
|
140
|
+
default: return ".bin";
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region extensions/line/src/probe.ts
|
|
145
|
+
async function probeLineBot(channelAccessToken, timeoutMs = 5e3) {
|
|
146
|
+
if (!channelAccessToken?.trim()) return {
|
|
147
|
+
ok: false,
|
|
148
|
+
error: "Channel access token not configured"
|
|
149
|
+
};
|
|
150
|
+
const client = new messagingApi.MessagingApiClient({ channelAccessToken: channelAccessToken.trim() });
|
|
151
|
+
try {
|
|
152
|
+
const profile = await withTimeout(client.getBotInfo(), timeoutMs);
|
|
153
|
+
return {
|
|
154
|
+
ok: true,
|
|
155
|
+
bot: {
|
|
156
|
+
displayName: profile.displayName,
|
|
157
|
+
userId: profile.userId,
|
|
158
|
+
basicId: profile.basicId,
|
|
159
|
+
pictureUrl: profile.pictureUrl
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
} catch (err) {
|
|
163
|
+
return {
|
|
164
|
+
ok: false,
|
|
165
|
+
error: err instanceof Error ? err.message : String(err)
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region extensions/line/src/actions.ts
|
|
171
|
+
/**
|
|
172
|
+
* Create a message action (sends text when tapped)
|
|
173
|
+
*/
|
|
174
|
+
function messageAction(label, text) {
|
|
175
|
+
return {
|
|
176
|
+
type: "message",
|
|
177
|
+
label: label.slice(0, 20),
|
|
178
|
+
text: text ?? label
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Create a URI action (opens a URL when tapped)
|
|
183
|
+
*/
|
|
184
|
+
function uriAction(label, uri) {
|
|
185
|
+
return {
|
|
186
|
+
type: "uri",
|
|
187
|
+
label: label.slice(0, 20),
|
|
188
|
+
uri
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Create a postback action (sends data to webhook when tapped)
|
|
193
|
+
*/
|
|
194
|
+
function postbackAction(label, data, displayText) {
|
|
195
|
+
return {
|
|
196
|
+
type: "postback",
|
|
197
|
+
label: label.slice(0, 20),
|
|
198
|
+
data: data.slice(0, 300),
|
|
199
|
+
displayText: displayText?.slice(0, 300)
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Create a datetime picker action
|
|
204
|
+
*/
|
|
205
|
+
function datetimePickerAction(label, data, mode, options) {
|
|
206
|
+
return {
|
|
207
|
+
type: "datetimepicker",
|
|
208
|
+
label: label.slice(0, 20),
|
|
209
|
+
data: data.slice(0, 300),
|
|
210
|
+
mode,
|
|
211
|
+
initial: options?.initial,
|
|
212
|
+
max: options?.max,
|
|
213
|
+
min: options?.min
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region extensions/line/src/template-messages.ts
|
|
218
|
+
function buildTemplatePayloadAction(action) {
|
|
219
|
+
if (action.type === "uri" && action.uri) return uriAction(action.label, action.uri);
|
|
220
|
+
if (action.type === "postback" && action.data) return postbackAction(action.label, action.data, action.label);
|
|
221
|
+
return messageAction(action.label, action.data ?? action.label);
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Create a confirm template (yes/no style dialog)
|
|
225
|
+
*/
|
|
226
|
+
function createConfirmTemplate(text, confirmAction, cancelAction, altText) {
|
|
227
|
+
const template = {
|
|
228
|
+
type: "confirm",
|
|
229
|
+
text: text.slice(0, 240),
|
|
230
|
+
actions: [confirmAction, cancelAction]
|
|
231
|
+
};
|
|
232
|
+
return {
|
|
233
|
+
type: "template",
|
|
234
|
+
altText: altText?.slice(0, 400) ?? text.slice(0, 400),
|
|
235
|
+
template
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Create a button template with title, text, and action buttons
|
|
240
|
+
*/
|
|
241
|
+
function createButtonTemplate(title, text, actions, options) {
|
|
242
|
+
const textLimit = Boolean(options?.thumbnailImageUrl?.trim()) ? 160 : 60;
|
|
243
|
+
const template = {
|
|
244
|
+
type: "buttons",
|
|
245
|
+
title: title.slice(0, 40),
|
|
246
|
+
text: text.slice(0, textLimit),
|
|
247
|
+
actions: actions.slice(0, 4),
|
|
248
|
+
thumbnailImageUrl: options?.thumbnailImageUrl,
|
|
249
|
+
imageAspectRatio: options?.imageAspectRatio ?? "rectangle",
|
|
250
|
+
imageSize: options?.imageSize ?? "cover",
|
|
251
|
+
imageBackgroundColor: options?.imageBackgroundColor,
|
|
252
|
+
defaultAction: options?.defaultAction
|
|
253
|
+
};
|
|
254
|
+
return {
|
|
255
|
+
type: "template",
|
|
256
|
+
altText: options?.altText?.slice(0, 400) ?? `${title}: ${text}`.slice(0, 400),
|
|
257
|
+
template
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Create a carousel template with multiple columns
|
|
262
|
+
*/
|
|
263
|
+
function createTemplateCarousel(columns, options) {
|
|
264
|
+
const template = {
|
|
265
|
+
type: "carousel",
|
|
266
|
+
columns: columns.slice(0, 10),
|
|
267
|
+
imageAspectRatio: options?.imageAspectRatio ?? "rectangle",
|
|
268
|
+
imageSize: options?.imageSize ?? "cover"
|
|
269
|
+
};
|
|
270
|
+
return {
|
|
271
|
+
type: "template",
|
|
272
|
+
altText: options?.altText?.slice(0, 400) ?? "View carousel",
|
|
273
|
+
template
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Create a carousel column for use with createTemplateCarousel
|
|
278
|
+
*/
|
|
279
|
+
function createCarouselColumn(params) {
|
|
280
|
+
return {
|
|
281
|
+
title: params.title?.slice(0, 40),
|
|
282
|
+
text: params.text.slice(0, 120),
|
|
283
|
+
actions: params.actions.slice(0, 3),
|
|
284
|
+
thumbnailImageUrl: params.thumbnailImageUrl,
|
|
285
|
+
imageBackgroundColor: params.imageBackgroundColor,
|
|
286
|
+
defaultAction: params.defaultAction
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Create an image carousel template (simpler, image-focused carousel)
|
|
291
|
+
*/
|
|
292
|
+
function createImageCarousel(columns, altText) {
|
|
293
|
+
const template = {
|
|
294
|
+
type: "image_carousel",
|
|
295
|
+
columns: columns.slice(0, 10)
|
|
296
|
+
};
|
|
297
|
+
return {
|
|
298
|
+
type: "template",
|
|
299
|
+
altText: altText?.slice(0, 400) ?? "View images",
|
|
300
|
+
template
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Create an image carousel column for use with createImageCarousel
|
|
305
|
+
*/
|
|
306
|
+
function createImageCarouselColumn(imageUrl, action) {
|
|
307
|
+
return {
|
|
308
|
+
imageUrl,
|
|
309
|
+
action
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Create a simple yes/no confirmation dialog
|
|
314
|
+
*/
|
|
315
|
+
function createYesNoConfirm(question, options) {
|
|
316
|
+
return createConfirmTemplate(question, options?.yesData ? postbackAction(options.yesText ?? "Yes", options.yesData, options.yesText ?? "Yes") : messageAction(options?.yesText ?? "Yes"), options?.noData ? postbackAction(options.noText ?? "No", options.noData, options.noText ?? "No") : messageAction(options?.noText ?? "No"), options?.altText);
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Create a button menu with simple text buttons
|
|
320
|
+
*/
|
|
321
|
+
function createButtonMenu(title, text, buttons, options) {
|
|
322
|
+
return createButtonTemplate(title, text, buttons.slice(0, 4).map((btn) => messageAction(btn.label, btn.text)), {
|
|
323
|
+
thumbnailImageUrl: options?.thumbnailImageUrl,
|
|
324
|
+
altText: options?.altText
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Create a button menu with URL links
|
|
329
|
+
*/
|
|
330
|
+
function createLinkMenu(title, text, links, options) {
|
|
331
|
+
return createButtonTemplate(title, text, links.slice(0, 4).map((link) => uriAction(link.label, link.url)), {
|
|
332
|
+
thumbnailImageUrl: options?.thumbnailImageUrl,
|
|
333
|
+
altText: options?.altText
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Create a simple product/item carousel
|
|
338
|
+
*/
|
|
339
|
+
function createProductCarousel(products, altText) {
|
|
340
|
+
return createTemplateCarousel(products.slice(0, 10).map((product) => {
|
|
341
|
+
const actions = [];
|
|
342
|
+
if (product.actionUrl) actions.push(uriAction(product.actionLabel ?? "View", product.actionUrl));
|
|
343
|
+
else if (product.actionData) actions.push(postbackAction(product.actionLabel ?? "Select", product.actionData));
|
|
344
|
+
else actions.push(messageAction(product.actionLabel ?? "Select", product.title));
|
|
345
|
+
return createCarouselColumn({
|
|
346
|
+
title: product.title,
|
|
347
|
+
text: product.price ? `${product.description}\n${product.price}`.slice(0, 120) : product.description,
|
|
348
|
+
thumbnailImageUrl: product.imageUrl,
|
|
349
|
+
actions
|
|
350
|
+
});
|
|
351
|
+
}), { altText });
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Convert a TemplateMessagePayload from ReplyPayload to a LINE TemplateMessage
|
|
355
|
+
*/
|
|
356
|
+
function buildTemplateMessageFromPayload(payload) {
|
|
357
|
+
switch (payload.type) {
|
|
358
|
+
case "confirm": {
|
|
359
|
+
const confirmAction = payload.confirmData.startsWith("http") ? uriAction(payload.confirmLabel, payload.confirmData) : payload.confirmData.includes("=") ? postbackAction(payload.confirmLabel, payload.confirmData, payload.confirmLabel) : messageAction(payload.confirmLabel, payload.confirmData);
|
|
360
|
+
const cancelAction = payload.cancelData.startsWith("http") ? uriAction(payload.cancelLabel, payload.cancelData) : payload.cancelData.includes("=") ? postbackAction(payload.cancelLabel, payload.cancelData, payload.cancelLabel) : messageAction(payload.cancelLabel, payload.cancelData);
|
|
361
|
+
return createConfirmTemplate(payload.text, confirmAction, cancelAction, payload.altText);
|
|
362
|
+
}
|
|
363
|
+
case "buttons": {
|
|
364
|
+
const actions = payload.actions.slice(0, 4).map((action) => buildTemplatePayloadAction(action));
|
|
365
|
+
return createButtonTemplate(payload.title, payload.text, actions, {
|
|
366
|
+
thumbnailImageUrl: payload.thumbnailImageUrl,
|
|
367
|
+
altText: payload.altText
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
case "carousel": return createTemplateCarousel(payload.columns.slice(0, 10).map((col) => {
|
|
371
|
+
const colActions = col.actions.slice(0, 3).map((action) => buildTemplatePayloadAction(action));
|
|
372
|
+
return createCarouselColumn({
|
|
373
|
+
title: col.title,
|
|
374
|
+
text: col.text,
|
|
375
|
+
thumbnailImageUrl: col.thumbnailImageUrl,
|
|
376
|
+
actions: colActions
|
|
377
|
+
});
|
|
378
|
+
}), { altText: payload.altText });
|
|
379
|
+
default: return null;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region extensions/line/src/channel-access-token.ts
|
|
384
|
+
function resolveLineChannelAccessToken(explicit, params) {
|
|
385
|
+
if (explicit?.trim()) return explicit.trim();
|
|
386
|
+
if (!params.channelAccessToken) throw new Error(`LINE channel access token missing for account "${params.accountId}" (set channels.line.channelAccessToken or LINE_CHANNEL_ACCESS_TOKEN).`);
|
|
387
|
+
return params.channelAccessToken.trim();
|
|
388
|
+
}
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region extensions/line/src/send.ts
|
|
391
|
+
const userProfileCache = /* @__PURE__ */ new Map();
|
|
392
|
+
const PROFILE_CACHE_TTL_MS = 300 * 1e3;
|
|
393
|
+
function normalizeTarget(to) {
|
|
394
|
+
const trimmed = to.trim();
|
|
395
|
+
if (!trimmed) throw new Error("Recipient is required for LINE sends");
|
|
396
|
+
const normalized = trimmed.replace(/^line:group:/i, "").replace(/^line:room:/i, "").replace(/^line:user:/i, "").replace(/^line:/i, "");
|
|
397
|
+
if (!normalized) throw new Error("Recipient is required for LINE sends");
|
|
398
|
+
return normalized;
|
|
399
|
+
}
|
|
400
|
+
function isLineUserChatId(chatId) {
|
|
401
|
+
return /^U/i.test(chatId);
|
|
402
|
+
}
|
|
403
|
+
function createLineMessagingClient(opts) {
|
|
404
|
+
const account = resolveLineAccount({
|
|
405
|
+
cfg: opts.cfg ?? loadConfig(),
|
|
406
|
+
accountId: opts.accountId
|
|
407
|
+
});
|
|
408
|
+
const token = resolveLineChannelAccessToken(opts.channelAccessToken, account);
|
|
409
|
+
return {
|
|
410
|
+
account,
|
|
411
|
+
client: new messagingApi.MessagingApiClient({ channelAccessToken: token })
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function createLinePushContext(to, opts) {
|
|
415
|
+
const { account, client } = createLineMessagingClient(opts);
|
|
416
|
+
return {
|
|
417
|
+
account,
|
|
418
|
+
client,
|
|
419
|
+
chatId: normalizeTarget(to)
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
function createTextMessage(text) {
|
|
423
|
+
return {
|
|
424
|
+
type: "text",
|
|
425
|
+
text
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function createImageMessage(originalContentUrl, previewImageUrl) {
|
|
429
|
+
return {
|
|
430
|
+
type: "image",
|
|
431
|
+
originalContentUrl,
|
|
432
|
+
previewImageUrl: previewImageUrl ?? originalContentUrl
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
function createVideoMessage(originalContentUrl, previewImageUrl, trackingId) {
|
|
436
|
+
return {
|
|
437
|
+
type: "video",
|
|
438
|
+
originalContentUrl,
|
|
439
|
+
previewImageUrl,
|
|
440
|
+
...trackingId ? { trackingId } : {}
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
function createAudioMessage(originalContentUrl, durationMs) {
|
|
444
|
+
return {
|
|
445
|
+
type: "audio",
|
|
446
|
+
originalContentUrl,
|
|
447
|
+
duration: durationMs
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
function createLocationMessage(location) {
|
|
451
|
+
return {
|
|
452
|
+
type: "location",
|
|
453
|
+
title: location.title.slice(0, 100),
|
|
454
|
+
address: location.address.slice(0, 100),
|
|
455
|
+
latitude: location.latitude,
|
|
456
|
+
longitude: location.longitude
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
function logLineHttpError(err, context) {
|
|
460
|
+
if (!err || typeof err !== "object") return;
|
|
461
|
+
const { status, statusText, body } = err;
|
|
462
|
+
if (typeof body === "string") logVerbose(`line: ${context} failed (${status ? `${status} ${statusText ?? ""}`.trim() : "unknown status"}): ${body}`);
|
|
463
|
+
}
|
|
464
|
+
function recordLineOutboundActivity(accountId) {
|
|
465
|
+
recordChannelActivity({
|
|
466
|
+
channel: "line",
|
|
467
|
+
accountId,
|
|
468
|
+
direction: "outbound"
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
async function pushLineMessages(to, messages, opts = {}, behavior = {}) {
|
|
472
|
+
if (messages.length === 0) throw new Error("Message must be non-empty for LINE sends");
|
|
473
|
+
const { account, client, chatId } = createLinePushContext(to, opts);
|
|
474
|
+
const pushRequest = client.pushMessage({
|
|
475
|
+
to: chatId,
|
|
476
|
+
messages
|
|
477
|
+
});
|
|
478
|
+
if (behavior.errorContext) await pushRequest.catch((err) => {
|
|
479
|
+
logLineHttpError(err, behavior.errorContext);
|
|
480
|
+
throw err;
|
|
481
|
+
});
|
|
482
|
+
else await pushRequest;
|
|
483
|
+
recordLineOutboundActivity(account.accountId);
|
|
484
|
+
if (opts.verbose) logVerbose(behavior.verboseMessage?.(chatId, messages.length) ?? `line: pushed ${messages.length} messages to ${chatId}`);
|
|
485
|
+
return {
|
|
486
|
+
messageId: "push",
|
|
487
|
+
chatId
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
async function replyLineMessages(replyToken, messages, opts = {}, behavior = {}) {
|
|
491
|
+
const { account, client } = createLineMessagingClient(opts);
|
|
492
|
+
await client.replyMessage({
|
|
493
|
+
replyToken,
|
|
494
|
+
messages
|
|
495
|
+
});
|
|
496
|
+
recordLineOutboundActivity(account.accountId);
|
|
497
|
+
if (opts.verbose) logVerbose(behavior.verboseMessage?.(messages.length) ?? `line: replied with ${messages.length} messages`);
|
|
498
|
+
}
|
|
499
|
+
async function sendMessageLine(to, text, opts = {}) {
|
|
500
|
+
const chatId = normalizeTarget(to);
|
|
501
|
+
const messages = [];
|
|
502
|
+
const mediaUrl = opts.mediaUrl?.trim();
|
|
503
|
+
if (mediaUrl) switch (opts.mediaKind) {
|
|
504
|
+
case "video": {
|
|
505
|
+
const previewImageUrl = opts.previewImageUrl?.trim();
|
|
506
|
+
if (!previewImageUrl) throw new Error("LINE video messages require previewImageUrl to reference an image URL");
|
|
507
|
+
const trackingId = isLineUserChatId(chatId) ? opts.trackingId : void 0;
|
|
508
|
+
messages.push(createVideoMessage(mediaUrl, previewImageUrl, trackingId));
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
case "audio":
|
|
512
|
+
messages.push(createAudioMessage(mediaUrl, opts.durationMs ?? 6e4));
|
|
513
|
+
break;
|
|
514
|
+
default:
|
|
515
|
+
messages.push(createImageMessage(mediaUrl, opts.previewImageUrl?.trim() || mediaUrl));
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
if (text?.trim()) messages.push(createTextMessage(text.trim()));
|
|
519
|
+
if (messages.length === 0) throw new Error("Message must be non-empty for LINE sends");
|
|
520
|
+
if (opts.replyToken) {
|
|
521
|
+
await replyLineMessages(opts.replyToken, messages, opts, { verboseMessage: () => `line: replied to ${chatId}` });
|
|
522
|
+
return {
|
|
523
|
+
messageId: "reply",
|
|
524
|
+
chatId
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
return pushLineMessages(chatId, messages, opts, { verboseMessage: (resolvedChatId) => `line: pushed message to ${resolvedChatId}` });
|
|
528
|
+
}
|
|
529
|
+
async function pushMessageLine(to, text, opts = {}) {
|
|
530
|
+
return sendMessageLine(to, text, {
|
|
531
|
+
...opts,
|
|
532
|
+
replyToken: void 0
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
async function replyMessageLine(replyToken, messages, opts = {}) {
|
|
536
|
+
await replyLineMessages(replyToken, messages, opts);
|
|
537
|
+
}
|
|
538
|
+
async function pushMessagesLine(to, messages, opts = {}) {
|
|
539
|
+
return pushLineMessages(to, messages, opts, { errorContext: "push message" });
|
|
540
|
+
}
|
|
541
|
+
function createFlexMessage(altText, contents) {
|
|
542
|
+
return {
|
|
543
|
+
type: "flex",
|
|
544
|
+
altText,
|
|
545
|
+
contents
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
async function pushImageMessage(to, originalContentUrl, previewImageUrl, opts = {}) {
|
|
549
|
+
return pushLineMessages(to, [createImageMessage(originalContentUrl, previewImageUrl)], opts, { verboseMessage: (chatId) => `line: pushed image to ${chatId}` });
|
|
550
|
+
}
|
|
551
|
+
async function pushLocationMessage(to, location, opts = {}) {
|
|
552
|
+
return pushLineMessages(to, [createLocationMessage(location)], opts, { verboseMessage: (chatId) => `line: pushed location to ${chatId}` });
|
|
553
|
+
}
|
|
554
|
+
async function pushFlexMessage(to, altText, contents, opts = {}) {
|
|
555
|
+
return pushLineMessages(to, [{
|
|
556
|
+
type: "flex",
|
|
557
|
+
altText: altText.slice(0, 400),
|
|
558
|
+
contents
|
|
559
|
+
}], opts, {
|
|
560
|
+
errorContext: "push flex message",
|
|
561
|
+
verboseMessage: (chatId) => `line: pushed flex message to ${chatId}`
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
async function pushTemplateMessage(to, template, opts = {}) {
|
|
565
|
+
return pushLineMessages(to, [template], opts, { verboseMessage: (chatId) => `line: pushed template message to ${chatId}` });
|
|
566
|
+
}
|
|
567
|
+
async function pushTextMessageWithQuickReplies(to, text, quickReplyLabels, opts = {}) {
|
|
568
|
+
return pushLineMessages(to, [createTextMessageWithQuickReplies(text, quickReplyLabels)], opts, { verboseMessage: (chatId) => `line: pushed message with quick replies to ${chatId}` });
|
|
569
|
+
}
|
|
570
|
+
function createQuickReplyItems(labels) {
|
|
571
|
+
return { items: labels.slice(0, 13).map((label) => ({
|
|
572
|
+
type: "action",
|
|
573
|
+
action: {
|
|
574
|
+
type: "message",
|
|
575
|
+
label: label.slice(0, 20),
|
|
576
|
+
text: label
|
|
577
|
+
}
|
|
578
|
+
})) };
|
|
579
|
+
}
|
|
580
|
+
function createTextMessageWithQuickReplies(text, quickReplyLabels) {
|
|
581
|
+
return {
|
|
582
|
+
type: "text",
|
|
583
|
+
text,
|
|
584
|
+
quickReply: createQuickReplyItems(quickReplyLabels)
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
async function showLoadingAnimation(chatId, opts = {}) {
|
|
588
|
+
const { client } = createLineMessagingClient(opts);
|
|
589
|
+
try {
|
|
590
|
+
await client.showLoadingAnimation({
|
|
591
|
+
chatId: normalizeTarget(chatId),
|
|
592
|
+
loadingSeconds: opts.loadingSeconds ?? 20
|
|
593
|
+
});
|
|
594
|
+
logVerbose(`line: showing loading animation to ${chatId}`);
|
|
595
|
+
} catch (err) {
|
|
596
|
+
logVerbose(`line: loading animation failed (non-fatal): ${String(err)}`);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
async function getUserProfile(userId, opts = {}) {
|
|
600
|
+
if (opts.useCache ?? true) {
|
|
601
|
+
const cached = userProfileCache.get(userId);
|
|
602
|
+
if (cached && Date.now() - cached.fetchedAt < PROFILE_CACHE_TTL_MS) return {
|
|
603
|
+
displayName: cached.displayName,
|
|
604
|
+
pictureUrl: cached.pictureUrl
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
const { client } = createLineMessagingClient(opts);
|
|
608
|
+
try {
|
|
609
|
+
const profile = await client.getProfile(userId);
|
|
610
|
+
const result = {
|
|
611
|
+
displayName: profile.displayName,
|
|
612
|
+
pictureUrl: profile.pictureUrl
|
|
613
|
+
};
|
|
614
|
+
userProfileCache.set(userId, {
|
|
615
|
+
...result,
|
|
616
|
+
fetchedAt: Date.now()
|
|
617
|
+
});
|
|
618
|
+
return result;
|
|
619
|
+
} catch (err) {
|
|
620
|
+
logVerbose(`line: failed to fetch profile for ${userId}: ${String(err)}`);
|
|
621
|
+
return null;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
async function getUserDisplayName(userId, opts = {}) {
|
|
625
|
+
return (await getUserProfile(userId, opts))?.displayName ?? userId;
|
|
626
|
+
}
|
|
627
|
+
//#endregion
|
|
628
|
+
//#region extensions/line/src/auto-reply-delivery.ts
|
|
629
|
+
async function deliverLineAutoReply(params) {
|
|
630
|
+
const { payload, lineData, replyToken, accountId, to, textLimit, deps } = params;
|
|
631
|
+
let replyTokenUsed = params.replyTokenUsed;
|
|
632
|
+
const pushLineMessages = async (messages) => {
|
|
633
|
+
if (messages.length === 0) return;
|
|
634
|
+
for (let i = 0; i < messages.length; i += 5) await deps.pushMessagesLine(to, messages.slice(i, i + 5), { accountId });
|
|
635
|
+
};
|
|
636
|
+
const sendLineMessages = async (messages, allowReplyToken) => {
|
|
637
|
+
if (messages.length === 0) return;
|
|
638
|
+
let remaining = messages;
|
|
639
|
+
if (allowReplyToken && replyToken && !replyTokenUsed) {
|
|
640
|
+
const replyBatch = remaining.slice(0, 5);
|
|
641
|
+
try {
|
|
642
|
+
await deps.replyMessageLine(replyToken, replyBatch, { accountId });
|
|
643
|
+
} catch (err) {
|
|
644
|
+
deps.onReplyError?.(err);
|
|
645
|
+
await pushLineMessages(replyBatch);
|
|
646
|
+
}
|
|
647
|
+
replyTokenUsed = true;
|
|
648
|
+
remaining = remaining.slice(replyBatch.length);
|
|
649
|
+
}
|
|
650
|
+
if (remaining.length > 0) await pushLineMessages(remaining);
|
|
651
|
+
};
|
|
652
|
+
const richMessages = [];
|
|
653
|
+
const hasQuickReplies = Boolean(lineData.quickReplies?.length);
|
|
654
|
+
if (lineData.flexMessage) richMessages.push(deps.createFlexMessage(lineData.flexMessage.altText.slice(0, 400), lineData.flexMessage.contents));
|
|
655
|
+
if (lineData.templateMessage) {
|
|
656
|
+
const templateMsg = deps.buildTemplateMessageFromPayload(lineData.templateMessage);
|
|
657
|
+
if (templateMsg) richMessages.push(templateMsg);
|
|
658
|
+
}
|
|
659
|
+
if (lineData.location) richMessages.push(deps.createLocationMessage(lineData.location));
|
|
660
|
+
const processed = payload.text ? deps.processLineMessage(payload.text) : {
|
|
661
|
+
text: "",
|
|
662
|
+
flexMessages: []
|
|
663
|
+
};
|
|
664
|
+
for (const flexMsg of processed.flexMessages) richMessages.push(deps.createFlexMessage(flexMsg.altText.slice(0, 400), flexMsg.contents));
|
|
665
|
+
const chunks = processed.text ? deps.chunkMarkdownText(processed.text, textLimit) : [];
|
|
666
|
+
const mediaMessages = resolveSendableOutboundReplyParts(payload).mediaUrls.map((url) => url?.trim()).filter((url) => Boolean(url)).map((url) => deps.createImageMessage(url));
|
|
667
|
+
if (chunks.length > 0) {
|
|
668
|
+
const hasRichOrMedia = richMessages.length > 0 || mediaMessages.length > 0;
|
|
669
|
+
if (hasQuickReplies && hasRichOrMedia) try {
|
|
670
|
+
await sendLineMessages([...richMessages, ...mediaMessages], false);
|
|
671
|
+
} catch (err) {
|
|
672
|
+
deps.onReplyError?.(err);
|
|
673
|
+
}
|
|
674
|
+
const { replyTokenUsed: nextReplyTokenUsed } = await deps.sendLineReplyChunks({
|
|
675
|
+
to,
|
|
676
|
+
chunks,
|
|
677
|
+
quickReplies: lineData.quickReplies,
|
|
678
|
+
replyToken,
|
|
679
|
+
replyTokenUsed,
|
|
680
|
+
accountId,
|
|
681
|
+
replyMessageLine: deps.replyMessageLine,
|
|
682
|
+
pushMessageLine: deps.pushMessageLine,
|
|
683
|
+
pushTextMessageWithQuickReplies: deps.pushTextMessageWithQuickReplies,
|
|
684
|
+
createTextMessageWithQuickReplies: deps.createTextMessageWithQuickReplies
|
|
685
|
+
});
|
|
686
|
+
replyTokenUsed = nextReplyTokenUsed;
|
|
687
|
+
if (!hasQuickReplies || !hasRichOrMedia) {
|
|
688
|
+
await sendLineMessages(richMessages, false);
|
|
689
|
+
if (mediaMessages.length > 0) await sendLineMessages(mediaMessages, false);
|
|
690
|
+
}
|
|
691
|
+
} else {
|
|
692
|
+
const combined = [...richMessages, ...mediaMessages];
|
|
693
|
+
if (hasQuickReplies && combined.length > 0) {
|
|
694
|
+
const quickReply = deps.createQuickReplyItems(lineData.quickReplies);
|
|
695
|
+
const targetIndex = replyToken && !replyTokenUsed ? Math.min(4, combined.length - 1) : combined.length - 1;
|
|
696
|
+
combined[targetIndex] = {
|
|
697
|
+
...combined[targetIndex],
|
|
698
|
+
quickReply
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
await sendLineMessages(combined, true);
|
|
702
|
+
}
|
|
703
|
+
return { replyTokenUsed };
|
|
704
|
+
}
|
|
705
|
+
//#endregion
|
|
706
|
+
//#region extensions/line/src/group-keys.ts
|
|
707
|
+
function resolveLineGroupLookupIds(groupId) {
|
|
708
|
+
const normalized = groupId?.trim();
|
|
709
|
+
if (!normalized) return [];
|
|
710
|
+
if (normalized.startsWith("group:") || normalized.startsWith("room:")) {
|
|
711
|
+
const rawId = normalized.split(":").slice(1).join(":");
|
|
712
|
+
return rawId ? [rawId, normalized] : [normalized];
|
|
713
|
+
}
|
|
714
|
+
return [
|
|
715
|
+
normalized,
|
|
716
|
+
`group:${normalized}`,
|
|
717
|
+
`room:${normalized}`
|
|
718
|
+
];
|
|
719
|
+
}
|
|
720
|
+
function resolveLineGroupConfigEntry(groups, params) {
|
|
721
|
+
if (!groups) return;
|
|
722
|
+
for (const candidate of resolveLineGroupLookupIds(params.groupId)) {
|
|
723
|
+
const hit = groups[candidate];
|
|
724
|
+
if (hit) return hit;
|
|
725
|
+
}
|
|
726
|
+
for (const candidate of resolveLineGroupLookupIds(params.roomId)) {
|
|
727
|
+
const hit = groups[candidate];
|
|
728
|
+
if (hit) return hit;
|
|
729
|
+
}
|
|
730
|
+
return groups["*"];
|
|
731
|
+
}
|
|
732
|
+
function resolveLineGroupsConfig(cfg, accountId) {
|
|
733
|
+
const lineConfig = cfg.channels?.line;
|
|
734
|
+
if (!lineConfig) return;
|
|
735
|
+
const normalizedAccountId = normalizeAccountId(accountId);
|
|
736
|
+
return resolveAccountEntry(lineConfig.accounts, normalizedAccountId)?.groups ?? lineConfig.groups;
|
|
737
|
+
}
|
|
738
|
+
function resolveExactLineGroupConfigKey(params) {
|
|
739
|
+
const groups = resolveLineGroupsConfig(params.cfg, params.accountId);
|
|
740
|
+
if (!groups) return;
|
|
741
|
+
return resolveLineGroupLookupIds(params.groupId).find((candidate) => Object.hasOwn(groups, candidate));
|
|
742
|
+
}
|
|
743
|
+
function resolveLineGroupHistoryKey(params) {
|
|
744
|
+
return params.groupId?.trim() || params.roomId?.trim() || void 0;
|
|
745
|
+
}
|
|
746
|
+
//#endregion
|
|
747
|
+
//#region extensions/line/src/bot-message-context.ts
|
|
748
|
+
function getLineSourceInfo(source) {
|
|
749
|
+
return {
|
|
750
|
+
userId: source.type === "user" ? source.userId : source.type === "group" ? source.userId : source.type === "room" ? source.userId : void 0,
|
|
751
|
+
groupId: source.type === "group" ? source.groupId : void 0,
|
|
752
|
+
roomId: source.type === "room" ? source.roomId : void 0,
|
|
753
|
+
isGroup: source.type === "group" || source.type === "room"
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function buildPeerId(source) {
|
|
757
|
+
const groupKey = resolveLineGroupHistoryKey({
|
|
758
|
+
groupId: source.type === "group" ? source.groupId : void 0,
|
|
759
|
+
roomId: source.type === "room" ? source.roomId : void 0
|
|
760
|
+
});
|
|
761
|
+
if (groupKey) return groupKey;
|
|
762
|
+
if (source.type === "user" && source.userId) return source.userId;
|
|
763
|
+
return "unknown";
|
|
764
|
+
}
|
|
765
|
+
async function resolveLineInboundRoute(params) {
|
|
766
|
+
recordChannelActivity({
|
|
767
|
+
channel: "line",
|
|
768
|
+
accountId: params.account.accountId,
|
|
769
|
+
direction: "inbound"
|
|
770
|
+
});
|
|
771
|
+
const { userId, groupId, roomId, isGroup } = getLineSourceInfo(params.source);
|
|
772
|
+
const peerId = buildPeerId(params.source);
|
|
773
|
+
let route = resolveAgentRoute({
|
|
774
|
+
cfg: params.cfg,
|
|
775
|
+
channel: "line",
|
|
776
|
+
accountId: params.account.accountId,
|
|
777
|
+
peer: {
|
|
778
|
+
kind: isGroup ? "group" : "direct",
|
|
779
|
+
id: peerId
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
const configuredRoute = resolveConfiguredBindingRoute({
|
|
783
|
+
cfg: params.cfg,
|
|
784
|
+
route,
|
|
785
|
+
conversation: {
|
|
786
|
+
channel: "line",
|
|
787
|
+
accountId: params.account.accountId,
|
|
788
|
+
conversationId: peerId
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
let configuredBinding = configuredRoute.bindingResolution;
|
|
792
|
+
const configuredBindingSessionKey = configuredRoute.boundSessionKey ?? "";
|
|
793
|
+
route = configuredRoute.route;
|
|
794
|
+
const boundConversation = getSessionBindingService().resolveByConversation({
|
|
795
|
+
channel: "line",
|
|
796
|
+
accountId: params.account.accountId,
|
|
797
|
+
conversationId: peerId
|
|
798
|
+
});
|
|
799
|
+
const boundSessionKey = boundConversation?.targetSessionKey?.trim();
|
|
800
|
+
if (boundConversation && boundSessionKey) {
|
|
801
|
+
route = {
|
|
802
|
+
...route,
|
|
803
|
+
sessionKey: boundSessionKey,
|
|
804
|
+
agentId: resolveAgentIdFromSessionKey(boundSessionKey) || route.agentId,
|
|
805
|
+
lastRoutePolicy: deriveLastRoutePolicy({
|
|
806
|
+
sessionKey: boundSessionKey,
|
|
807
|
+
mainSessionKey: route.mainSessionKey
|
|
808
|
+
}),
|
|
809
|
+
matchedBy: "binding.channel"
|
|
810
|
+
};
|
|
811
|
+
configuredBinding = null;
|
|
812
|
+
getSessionBindingService().touch(boundConversation.bindingId);
|
|
813
|
+
logVerbose(`line: routed via bound conversation ${peerId} -> ${boundSessionKey}`);
|
|
814
|
+
}
|
|
815
|
+
if (configuredBinding) {
|
|
816
|
+
const ensured = await ensureConfiguredBindingRouteReady({
|
|
817
|
+
cfg: params.cfg,
|
|
818
|
+
bindingResolution: configuredBinding
|
|
819
|
+
});
|
|
820
|
+
if (!ensured.ok) {
|
|
821
|
+
logVerbose(`line: configured ACP binding unavailable for ${peerId} -> ${configuredBindingSessionKey}: ${ensured.error}`);
|
|
822
|
+
throw new Error(`Configured ACP binding unavailable: ${ensured.error}`);
|
|
823
|
+
}
|
|
824
|
+
logVerbose(`line: using configured ACP binding for ${peerId} -> ${configuredBindingSessionKey}`);
|
|
825
|
+
}
|
|
826
|
+
return {
|
|
827
|
+
userId,
|
|
828
|
+
groupId,
|
|
829
|
+
roomId,
|
|
830
|
+
isGroup,
|
|
831
|
+
peerId,
|
|
832
|
+
route
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
const STICKER_PACKAGES = {
|
|
836
|
+
"1": "Moon & James",
|
|
837
|
+
"2": "Cony & Brown",
|
|
838
|
+
"3": "Brown & Friends",
|
|
839
|
+
"4": "Moon Special",
|
|
840
|
+
"789": "LINE Characters",
|
|
841
|
+
"6136": "Cony's Happy Life",
|
|
842
|
+
"6325": "Brown's Life",
|
|
843
|
+
"6359": "Choco",
|
|
844
|
+
"6362": "Sally",
|
|
845
|
+
"6370": "Edward",
|
|
846
|
+
"11537": "Cony",
|
|
847
|
+
"11538": "Brown",
|
|
848
|
+
"11539": "Moon"
|
|
849
|
+
};
|
|
850
|
+
function describeStickerKeywords(sticker) {
|
|
851
|
+
const keywords = sticker.keywords;
|
|
852
|
+
if (keywords && keywords.length > 0) return keywords.slice(0, 3).join(", ");
|
|
853
|
+
const stickerText = sticker.text;
|
|
854
|
+
if (stickerText) return stickerText;
|
|
855
|
+
return "";
|
|
856
|
+
}
|
|
857
|
+
function extractMessageText(message) {
|
|
858
|
+
if (message.type === "text") return message.text;
|
|
859
|
+
if (message.type === "location") {
|
|
860
|
+
const loc = message;
|
|
861
|
+
return formatLocationText({
|
|
862
|
+
latitude: loc.latitude,
|
|
863
|
+
longitude: loc.longitude,
|
|
864
|
+
name: loc.title,
|
|
865
|
+
address: loc.address
|
|
866
|
+
}) ?? "";
|
|
867
|
+
}
|
|
868
|
+
if (message.type === "sticker") {
|
|
869
|
+
const sticker = message;
|
|
870
|
+
const packageName = STICKER_PACKAGES[sticker.packageId] ?? "sticker";
|
|
871
|
+
const keywords = describeStickerKeywords(sticker);
|
|
872
|
+
if (keywords) return `[Sent a ${packageName} sticker: ${keywords}]`;
|
|
873
|
+
return `[Sent a ${packageName} sticker]`;
|
|
874
|
+
}
|
|
875
|
+
return "";
|
|
876
|
+
}
|
|
877
|
+
function extractMediaPlaceholder(message) {
|
|
878
|
+
switch (message.type) {
|
|
879
|
+
case "image": return "<media:image>";
|
|
880
|
+
case "video": return "<media:video>";
|
|
881
|
+
case "audio": return "<media:audio>";
|
|
882
|
+
case "file": return "<media:document>";
|
|
883
|
+
default: return "";
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
function resolveLineConversationLabel(params) {
|
|
887
|
+
return params.isGroup ? params.groupId ? `group:${params.groupId}` : params.roomId ? `room:${params.roomId}` : "unknown-group" : params.senderLabel;
|
|
888
|
+
}
|
|
889
|
+
function resolveLineAddresses(params) {
|
|
890
|
+
const fromAddress = params.isGroup ? params.groupId ? `line:group:${params.groupId}` : params.roomId ? `line:room:${params.roomId}` : `line:${params.peerId}` : `line:${params.userId ?? params.peerId}`;
|
|
891
|
+
return {
|
|
892
|
+
fromAddress,
|
|
893
|
+
toAddress: params.isGroup ? fromAddress : `line:${params.userId ?? params.peerId}`,
|
|
894
|
+
originatingTo: params.isGroup ? fromAddress : `line:${params.userId ?? params.peerId}`
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
function resolveLineGroupSystemPrompt(groups, source) {
|
|
898
|
+
return resolveLineGroupConfigEntry(groups, {
|
|
899
|
+
groupId: source.groupId,
|
|
900
|
+
roomId: source.roomId
|
|
901
|
+
})?.systemPrompt?.trim() || void 0;
|
|
902
|
+
}
|
|
903
|
+
async function finalizeLineInboundContext(params) {
|
|
904
|
+
const { fromAddress, toAddress, originatingTo } = resolveLineAddresses({
|
|
905
|
+
isGroup: params.source.isGroup,
|
|
906
|
+
groupId: params.source.groupId,
|
|
907
|
+
roomId: params.source.roomId,
|
|
908
|
+
userId: params.source.userId,
|
|
909
|
+
peerId: params.source.peerId
|
|
910
|
+
});
|
|
911
|
+
const senderId = params.source.userId ?? "unknown";
|
|
912
|
+
const senderLabel = params.source.userId ? `user:${params.source.userId}` : "unknown";
|
|
913
|
+
const conversationLabel = resolveLineConversationLabel({
|
|
914
|
+
isGroup: params.source.isGroup,
|
|
915
|
+
groupId: params.source.groupId,
|
|
916
|
+
roomId: params.source.roomId,
|
|
917
|
+
senderLabel
|
|
918
|
+
});
|
|
919
|
+
const { storePath, envelopeOptions, previousTimestamp } = resolveInboundSessionEnvelopeContext({
|
|
920
|
+
cfg: params.cfg,
|
|
921
|
+
agentId: params.route.agentId,
|
|
922
|
+
sessionKey: params.route.sessionKey
|
|
923
|
+
});
|
|
924
|
+
const body = formatInboundEnvelope({
|
|
925
|
+
channel: "LINE",
|
|
926
|
+
from: conversationLabel,
|
|
927
|
+
timestamp: params.timestamp,
|
|
928
|
+
body: params.rawBody,
|
|
929
|
+
chatType: params.source.isGroup ? "group" : "direct",
|
|
930
|
+
sender: { id: senderId },
|
|
931
|
+
previousTimestamp,
|
|
932
|
+
envelope: envelopeOptions
|
|
933
|
+
});
|
|
934
|
+
const ctxPayload = finalizeInboundContext({
|
|
935
|
+
Body: body,
|
|
936
|
+
BodyForAgent: params.rawBody,
|
|
937
|
+
RawBody: params.rawBody,
|
|
938
|
+
CommandBody: params.rawBody,
|
|
939
|
+
From: fromAddress,
|
|
940
|
+
To: toAddress,
|
|
941
|
+
SessionKey: params.route.sessionKey,
|
|
942
|
+
AccountId: params.route.accountId,
|
|
943
|
+
ChatType: params.source.isGroup ? "group" : "direct",
|
|
944
|
+
ConversationLabel: conversationLabel,
|
|
945
|
+
GroupSubject: params.source.isGroup ? params.source.groupId ?? params.source.roomId : void 0,
|
|
946
|
+
SenderId: senderId,
|
|
947
|
+
Provider: "line",
|
|
948
|
+
Surface: "line",
|
|
949
|
+
MessageSid: params.messageSid,
|
|
950
|
+
Timestamp: params.timestamp,
|
|
951
|
+
MediaPath: params.media.firstPath,
|
|
952
|
+
MediaType: params.media.firstContentType,
|
|
953
|
+
MediaUrl: params.media.firstPath,
|
|
954
|
+
MediaPaths: params.media.paths,
|
|
955
|
+
MediaUrls: params.media.paths,
|
|
956
|
+
MediaTypes: params.media.types,
|
|
957
|
+
...params.locationContext,
|
|
958
|
+
CommandAuthorized: params.commandAuthorized,
|
|
959
|
+
OriginatingChannel: "line",
|
|
960
|
+
OriginatingTo: originatingTo,
|
|
961
|
+
GroupSystemPrompt: params.source.isGroup ? resolveLineGroupSystemPrompt(params.account.config.groups, params.source) : void 0,
|
|
962
|
+
InboundHistory: params.inboundHistory
|
|
963
|
+
});
|
|
964
|
+
const pinnedMainDmOwner = !params.source.isGroup ? resolvePinnedMainDmOwnerFromAllowlist({
|
|
965
|
+
dmScope: params.cfg.session?.dmScope,
|
|
966
|
+
allowFrom: params.account.config.allowFrom,
|
|
967
|
+
normalizeEntry: (entry) => normalizeAllowFrom([entry]).entries[0]
|
|
968
|
+
}) : null;
|
|
969
|
+
await recordInboundSession({
|
|
970
|
+
storePath,
|
|
971
|
+
sessionKey: ctxPayload.SessionKey ?? params.route.sessionKey,
|
|
972
|
+
ctx: ctxPayload,
|
|
973
|
+
updateLastRoute: !params.source.isGroup ? {
|
|
974
|
+
sessionKey: params.route.mainSessionKey,
|
|
975
|
+
channel: "line",
|
|
976
|
+
to: params.source.userId ?? params.source.peerId,
|
|
977
|
+
accountId: params.route.accountId,
|
|
978
|
+
mainDmOwnerPin: pinnedMainDmOwner && params.source.userId ? {
|
|
979
|
+
ownerRecipient: pinnedMainDmOwner,
|
|
980
|
+
senderRecipient: params.source.userId,
|
|
981
|
+
onSkip: ({ ownerRecipient, senderRecipient }) => {
|
|
982
|
+
logVerbose(`line: skip main-session last route for ${senderRecipient} (pinned owner ${ownerRecipient})`);
|
|
983
|
+
}
|
|
984
|
+
} : void 0
|
|
985
|
+
} : void 0,
|
|
986
|
+
onRecordError: (err) => {
|
|
987
|
+
logVerbose(`line: failed updating session meta: ${String(err)}`);
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
if (shouldLogVerbose()) {
|
|
991
|
+
const preview = body.slice(0, 200).replace(/\n/g, "\\n");
|
|
992
|
+
const mediaInfo = params.verboseLog.kind === "inbound" && (params.verboseLog.mediaCount ?? 0) > 1 ? ` mediaCount=${params.verboseLog.mediaCount}` : "";
|
|
993
|
+
logVerbose(`${params.verboseLog.kind === "inbound" ? "line inbound" : "line postback"}: from=${ctxPayload.From} len=${body.length}${mediaInfo} preview="${preview}"`);
|
|
994
|
+
}
|
|
995
|
+
return {
|
|
996
|
+
ctxPayload,
|
|
997
|
+
replyToken: params.event.replyToken
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
async function buildLineMessageContext(params) {
|
|
1001
|
+
const { event, allMedia, cfg, account, commandAuthorized, groupHistories, historyLimit } = params;
|
|
1002
|
+
const source = event.source;
|
|
1003
|
+
const { userId, groupId, roomId, isGroup, peerId, route } = await resolveLineInboundRoute({
|
|
1004
|
+
source,
|
|
1005
|
+
cfg,
|
|
1006
|
+
account
|
|
1007
|
+
});
|
|
1008
|
+
const message = event.message;
|
|
1009
|
+
const messageId = message.id;
|
|
1010
|
+
const timestamp = event.timestamp;
|
|
1011
|
+
const textContent = extractMessageText(message);
|
|
1012
|
+
const placeholder = extractMediaPlaceholder(message);
|
|
1013
|
+
let rawBody = textContent || placeholder;
|
|
1014
|
+
if (!rawBody && allMedia.length > 0) rawBody = `<media:image>${allMedia.length > 1 ? ` (${allMedia.length} images)` : ""}`;
|
|
1015
|
+
if (!rawBody && allMedia.length === 0) return null;
|
|
1016
|
+
let locationContext;
|
|
1017
|
+
if (message.type === "location") {
|
|
1018
|
+
const loc = message;
|
|
1019
|
+
locationContext = toLocationContext({
|
|
1020
|
+
latitude: loc.latitude,
|
|
1021
|
+
longitude: loc.longitude,
|
|
1022
|
+
name: loc.title,
|
|
1023
|
+
address: loc.address
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
const historyKey = isGroup ? peerId : void 0;
|
|
1027
|
+
const inboundHistory = historyKey && groupHistories && (historyLimit ?? 0) > 0 ? (groupHistories.get(historyKey) ?? []).map((entry) => ({
|
|
1028
|
+
sender: entry.sender,
|
|
1029
|
+
body: entry.body,
|
|
1030
|
+
timestamp: entry.timestamp
|
|
1031
|
+
})) : void 0;
|
|
1032
|
+
const { ctxPayload } = await finalizeLineInboundContext({
|
|
1033
|
+
cfg,
|
|
1034
|
+
account,
|
|
1035
|
+
event,
|
|
1036
|
+
route,
|
|
1037
|
+
source: {
|
|
1038
|
+
userId,
|
|
1039
|
+
groupId,
|
|
1040
|
+
roomId,
|
|
1041
|
+
isGroup,
|
|
1042
|
+
peerId
|
|
1043
|
+
},
|
|
1044
|
+
rawBody,
|
|
1045
|
+
timestamp,
|
|
1046
|
+
messageSid: messageId,
|
|
1047
|
+
commandAuthorized,
|
|
1048
|
+
media: {
|
|
1049
|
+
firstPath: allMedia[0]?.path,
|
|
1050
|
+
firstContentType: allMedia[0]?.contentType,
|
|
1051
|
+
paths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
1052
|
+
types: allMedia.length > 0 ? allMedia.map((m) => m.contentType).filter(Boolean) : void 0
|
|
1053
|
+
},
|
|
1054
|
+
locationContext,
|
|
1055
|
+
verboseLog: {
|
|
1056
|
+
kind: "inbound",
|
|
1057
|
+
mediaCount: allMedia.length
|
|
1058
|
+
},
|
|
1059
|
+
inboundHistory
|
|
1060
|
+
});
|
|
1061
|
+
return {
|
|
1062
|
+
ctxPayload,
|
|
1063
|
+
event,
|
|
1064
|
+
userId,
|
|
1065
|
+
groupId,
|
|
1066
|
+
roomId,
|
|
1067
|
+
isGroup,
|
|
1068
|
+
route,
|
|
1069
|
+
replyToken: event.replyToken,
|
|
1070
|
+
accountId: account.accountId
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
async function buildLinePostbackContext(params) {
|
|
1074
|
+
const { event, cfg, account, commandAuthorized } = params;
|
|
1075
|
+
const source = event.source;
|
|
1076
|
+
const { userId, groupId, roomId, isGroup, peerId, route } = await resolveLineInboundRoute({
|
|
1077
|
+
source,
|
|
1078
|
+
cfg,
|
|
1079
|
+
account
|
|
1080
|
+
});
|
|
1081
|
+
const timestamp = event.timestamp;
|
|
1082
|
+
const rawData = event.postback?.data?.trim() ?? "";
|
|
1083
|
+
if (!rawData) return null;
|
|
1084
|
+
let rawBody = rawData;
|
|
1085
|
+
if (rawData.includes("line.action=")) {
|
|
1086
|
+
const searchParams = new URLSearchParams(rawData);
|
|
1087
|
+
const action = searchParams.get("line.action") ?? "";
|
|
1088
|
+
const device = searchParams.get("line.device");
|
|
1089
|
+
rawBody = device ? `line action ${action} device ${device}` : `line action ${action}`;
|
|
1090
|
+
}
|
|
1091
|
+
const messageSid = event.replyToken ? `postback:${event.replyToken}` : `postback:${timestamp}`;
|
|
1092
|
+
const { ctxPayload } = await finalizeLineInboundContext({
|
|
1093
|
+
cfg,
|
|
1094
|
+
account,
|
|
1095
|
+
event,
|
|
1096
|
+
route,
|
|
1097
|
+
source: {
|
|
1098
|
+
userId,
|
|
1099
|
+
groupId,
|
|
1100
|
+
roomId,
|
|
1101
|
+
isGroup,
|
|
1102
|
+
peerId
|
|
1103
|
+
},
|
|
1104
|
+
rawBody,
|
|
1105
|
+
timestamp,
|
|
1106
|
+
messageSid,
|
|
1107
|
+
commandAuthorized,
|
|
1108
|
+
media: {
|
|
1109
|
+
firstPath: "",
|
|
1110
|
+
firstContentType: void 0,
|
|
1111
|
+
paths: void 0,
|
|
1112
|
+
types: void 0
|
|
1113
|
+
},
|
|
1114
|
+
verboseLog: { kind: "postback" }
|
|
1115
|
+
});
|
|
1116
|
+
return {
|
|
1117
|
+
ctxPayload,
|
|
1118
|
+
event,
|
|
1119
|
+
userId,
|
|
1120
|
+
groupId,
|
|
1121
|
+
roomId,
|
|
1122
|
+
isGroup,
|
|
1123
|
+
route,
|
|
1124
|
+
replyToken: event.replyToken,
|
|
1125
|
+
accountId: account.accountId
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
//#endregion
|
|
1129
|
+
//#region extensions/line/src/bot-handlers.ts
|
|
1130
|
+
const LINE_DOWNLOADABLE_MESSAGE_TYPES = new Set([
|
|
1131
|
+
"image",
|
|
1132
|
+
"video",
|
|
1133
|
+
"audio",
|
|
1134
|
+
"file"
|
|
1135
|
+
]);
|
|
1136
|
+
function isDownloadableLineMessageType(messageType) {
|
|
1137
|
+
return LINE_DOWNLOADABLE_MESSAGE_TYPES.has(messageType);
|
|
1138
|
+
}
|
|
1139
|
+
const LINE_WEBHOOK_REPLAY_WINDOW_MS = 600 * 1e3;
|
|
1140
|
+
const LINE_WEBHOOK_REPLAY_MAX_ENTRIES = 4096;
|
|
1141
|
+
const LINE_WEBHOOK_REPLAY_PRUNE_INTERVAL_MS = 1e3;
|
|
1142
|
+
function createLineWebhookReplayCache() {
|
|
1143
|
+
return {
|
|
1144
|
+
seenEvents: /* @__PURE__ */ new Map(),
|
|
1145
|
+
inFlightEvents: /* @__PURE__ */ new Map(),
|
|
1146
|
+
lastPruneAtMs: 0
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
function pruneLineWebhookReplayCache(cache, nowMs) {
|
|
1150
|
+
const minSeenAt = nowMs - LINE_WEBHOOK_REPLAY_WINDOW_MS;
|
|
1151
|
+
for (const [key, seenAt] of cache.seenEvents) if (seenAt < minSeenAt) cache.seenEvents.delete(key);
|
|
1152
|
+
if (cache.seenEvents.size > LINE_WEBHOOK_REPLAY_MAX_ENTRIES) {
|
|
1153
|
+
const deleteCount = cache.seenEvents.size - LINE_WEBHOOK_REPLAY_MAX_ENTRIES;
|
|
1154
|
+
let deleted = 0;
|
|
1155
|
+
for (const key of cache.seenEvents.keys()) {
|
|
1156
|
+
if (deleted >= deleteCount) break;
|
|
1157
|
+
cache.seenEvents.delete(key);
|
|
1158
|
+
deleted += 1;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
function buildLineWebhookReplayKey(event, accountId) {
|
|
1163
|
+
if (event.type === "message") {
|
|
1164
|
+
const messageId = event.message?.id?.trim();
|
|
1165
|
+
if (messageId) return {
|
|
1166
|
+
key: `${accountId}|message:${messageId}`,
|
|
1167
|
+
eventId: `message:${messageId}`
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
const eventId = event.webhookEventId?.trim();
|
|
1171
|
+
if (!eventId) return null;
|
|
1172
|
+
const source = event.source;
|
|
1173
|
+
const sourceId = source?.type === "group" ? `group:${source.groupId ?? ""}` : source?.type === "room" ? `room:${source.roomId ?? ""}` : `user:${source?.userId ?? ""}`;
|
|
1174
|
+
return {
|
|
1175
|
+
key: `${accountId}|${event.type}|${sourceId}|${eventId}`,
|
|
1176
|
+
eventId: `event:${eventId}`
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
function getLineReplayCandidate(event, context) {
|
|
1180
|
+
const replay = buildLineWebhookReplayKey(event, context.account.accountId);
|
|
1181
|
+
const cache = context.replayCache;
|
|
1182
|
+
if (!replay || !cache) return null;
|
|
1183
|
+
const nowMs = Date.now();
|
|
1184
|
+
if (nowMs - cache.lastPruneAtMs >= LINE_WEBHOOK_REPLAY_PRUNE_INTERVAL_MS || cache.seenEvents.size >= LINE_WEBHOOK_REPLAY_MAX_ENTRIES) {
|
|
1185
|
+
pruneLineWebhookReplayCache(cache, nowMs);
|
|
1186
|
+
cache.lastPruneAtMs = nowMs;
|
|
1187
|
+
}
|
|
1188
|
+
return {
|
|
1189
|
+
key: replay.key,
|
|
1190
|
+
eventId: replay.eventId,
|
|
1191
|
+
seenAtMs: nowMs,
|
|
1192
|
+
cache
|
|
1193
|
+
};
|
|
1194
|
+
}
|
|
1195
|
+
function shouldSkipLineReplayEvent(candidate) {
|
|
1196
|
+
const inFlightResult = candidate.cache.inFlightEvents.get(candidate.key);
|
|
1197
|
+
if (inFlightResult) {
|
|
1198
|
+
logVerbose(`line: skipped in-flight replayed webhook event ${candidate.eventId}`);
|
|
1199
|
+
return {
|
|
1200
|
+
skip: true,
|
|
1201
|
+
inFlightResult
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
if (candidate.cache.seenEvents.has(candidate.key)) {
|
|
1205
|
+
logVerbose(`line: skipped replayed webhook event ${candidate.eventId}`);
|
|
1206
|
+
return { skip: true };
|
|
1207
|
+
}
|
|
1208
|
+
return { skip: false };
|
|
1209
|
+
}
|
|
1210
|
+
function markLineReplayEventInFlight(candidate) {
|
|
1211
|
+
let resolve;
|
|
1212
|
+
let reject;
|
|
1213
|
+
const promise = new Promise((resolvePromise, rejectPromise) => {
|
|
1214
|
+
resolve = resolvePromise;
|
|
1215
|
+
reject = rejectPromise;
|
|
1216
|
+
});
|
|
1217
|
+
promise.catch(() => {});
|
|
1218
|
+
candidate.cache.inFlightEvents.set(candidate.key, promise);
|
|
1219
|
+
return {
|
|
1220
|
+
promise,
|
|
1221
|
+
resolve,
|
|
1222
|
+
reject
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
function clearLineReplayEventInFlight(candidate) {
|
|
1226
|
+
candidate.cache.inFlightEvents.delete(candidate.key);
|
|
1227
|
+
}
|
|
1228
|
+
function rememberLineReplayEvent(candidate) {
|
|
1229
|
+
candidate.cache.seenEvents.set(candidate.key, candidate.seenAtMs);
|
|
1230
|
+
}
|
|
1231
|
+
function resolveLineGroupConfig(params) {
|
|
1232
|
+
return resolveLineGroupConfigEntry(params.config.groups, {
|
|
1233
|
+
groupId: params.groupId,
|
|
1234
|
+
roomId: params.roomId
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
async function sendLinePairingReply(params) {
|
|
1238
|
+
const { senderId, replyToken, context } = params;
|
|
1239
|
+
const idLabel = (() => {
|
|
1240
|
+
try {
|
|
1241
|
+
return resolvePairingIdLabel("line");
|
|
1242
|
+
} catch {
|
|
1243
|
+
return "lineUserId";
|
|
1244
|
+
}
|
|
1245
|
+
})();
|
|
1246
|
+
await createChannelPairingChallengeIssuer({
|
|
1247
|
+
channel: "line",
|
|
1248
|
+
upsertPairingRequest: async ({ id, meta }) => await upsertChannelPairingRequest({
|
|
1249
|
+
channel: "line",
|
|
1250
|
+
id,
|
|
1251
|
+
accountId: context.account.accountId,
|
|
1252
|
+
meta
|
|
1253
|
+
})
|
|
1254
|
+
})({
|
|
1255
|
+
senderId,
|
|
1256
|
+
senderIdLine: `Your ${idLabel}: ${senderId}`,
|
|
1257
|
+
onCreated: () => {
|
|
1258
|
+
logVerbose(`line pairing request sender=${senderId}`);
|
|
1259
|
+
},
|
|
1260
|
+
sendPairingReply: async (text) => {
|
|
1261
|
+
if (replyToken) try {
|
|
1262
|
+
await replyMessageLine(replyToken, [{
|
|
1263
|
+
type: "text",
|
|
1264
|
+
text
|
|
1265
|
+
}], {
|
|
1266
|
+
accountId: context.account.accountId,
|
|
1267
|
+
channelAccessToken: context.account.channelAccessToken
|
|
1268
|
+
});
|
|
1269
|
+
return;
|
|
1270
|
+
} catch (err) {
|
|
1271
|
+
logVerbose(`line pairing reply failed for ${senderId}: ${String(err)}`);
|
|
1272
|
+
}
|
|
1273
|
+
try {
|
|
1274
|
+
await pushMessageLine(`line:${senderId}`, text, {
|
|
1275
|
+
accountId: context.account.accountId,
|
|
1276
|
+
channelAccessToken: context.account.channelAccessToken
|
|
1277
|
+
});
|
|
1278
|
+
} catch (err) {
|
|
1279
|
+
logVerbose(`line pairing reply failed for ${senderId}: ${String(err)}`);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
async function shouldProcessLineEvent(event, context) {
|
|
1285
|
+
const denied = {
|
|
1286
|
+
allowed: false,
|
|
1287
|
+
commandAuthorized: false
|
|
1288
|
+
};
|
|
1289
|
+
const { cfg, account } = context;
|
|
1290
|
+
const { userId, groupId, roomId, isGroup } = getLineSourceInfo(event.source);
|
|
1291
|
+
const senderId = userId ?? "";
|
|
1292
|
+
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
1293
|
+
const storeAllowFrom = await readChannelAllowFromStore("line", void 0, account.accountId).catch(() => []);
|
|
1294
|
+
const effectiveDmAllow = normalizeDmAllowFromWithStore({
|
|
1295
|
+
allowFrom: account.config.allowFrom,
|
|
1296
|
+
storeAllowFrom,
|
|
1297
|
+
dmPolicy
|
|
1298
|
+
});
|
|
1299
|
+
const groupConfig = resolveLineGroupConfig({
|
|
1300
|
+
config: account.config,
|
|
1301
|
+
groupId,
|
|
1302
|
+
roomId
|
|
1303
|
+
});
|
|
1304
|
+
const groupAllowOverride = groupConfig?.allowFrom;
|
|
1305
|
+
const fallbackGroupAllowFrom = account.config.allowFrom?.length ? account.config.allowFrom : void 0;
|
|
1306
|
+
const effectiveGroupAllow = normalizeAllowFrom(firstDefined(groupAllowOverride, account.config.groupAllowFrom, fallbackGroupAllowFrom));
|
|
1307
|
+
const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
|
|
1308
|
+
const { groupPolicy, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
|
|
1309
|
+
providerConfigPresent: cfg.channels?.line !== void 0,
|
|
1310
|
+
groupPolicy: account.config.groupPolicy,
|
|
1311
|
+
defaultGroupPolicy
|
|
1312
|
+
});
|
|
1313
|
+
warnMissingProviderGroupPolicyFallbackOnce({
|
|
1314
|
+
providerMissingFallbackApplied,
|
|
1315
|
+
providerKey: "line",
|
|
1316
|
+
accountId: account.accountId,
|
|
1317
|
+
log: (message) => logVerbose(message)
|
|
1318
|
+
});
|
|
1319
|
+
if (isGroup) {
|
|
1320
|
+
if (groupConfig?.enabled === false) {
|
|
1321
|
+
logVerbose(`Blocked line group ${groupId ?? roomId ?? "unknown"} (group disabled)`);
|
|
1322
|
+
return denied;
|
|
1323
|
+
}
|
|
1324
|
+
if (typeof groupAllowOverride !== "undefined") {
|
|
1325
|
+
if (!senderId) {
|
|
1326
|
+
logVerbose("Blocked line group message (group allowFrom override, no sender ID)");
|
|
1327
|
+
return denied;
|
|
1328
|
+
}
|
|
1329
|
+
if (!isSenderAllowed({
|
|
1330
|
+
allow: effectiveGroupAllow,
|
|
1331
|
+
senderId
|
|
1332
|
+
})) {
|
|
1333
|
+
logVerbose(`Blocked line group sender ${senderId} (group allowFrom override)`);
|
|
1334
|
+
return denied;
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
const senderGroupAccess = evaluateMatchedGroupAccessForPolicy({
|
|
1338
|
+
groupPolicy,
|
|
1339
|
+
requireMatchInput: true,
|
|
1340
|
+
hasMatchInput: Boolean(senderId),
|
|
1341
|
+
allowlistConfigured: effectiveGroupAllow.entries.length > 0,
|
|
1342
|
+
allowlistMatched: Boolean(senderId) && isSenderAllowed({
|
|
1343
|
+
allow: effectiveGroupAllow,
|
|
1344
|
+
senderId
|
|
1345
|
+
})
|
|
1346
|
+
});
|
|
1347
|
+
if (!senderGroupAccess.allowed && senderGroupAccess.reason === "disabled") {
|
|
1348
|
+
logVerbose("Blocked line group message (groupPolicy: disabled)");
|
|
1349
|
+
return denied;
|
|
1350
|
+
}
|
|
1351
|
+
if (!senderGroupAccess.allowed && senderGroupAccess.reason === "missing_match_input") {
|
|
1352
|
+
logVerbose("Blocked line group message (no sender ID, groupPolicy: allowlist)");
|
|
1353
|
+
return denied;
|
|
1354
|
+
}
|
|
1355
|
+
if (!senderGroupAccess.allowed && senderGroupAccess.reason === "empty_allowlist") {
|
|
1356
|
+
logVerbose("Blocked line group message (groupPolicy: allowlist, no groupAllowFrom)");
|
|
1357
|
+
return denied;
|
|
1358
|
+
}
|
|
1359
|
+
if (!senderGroupAccess.allowed && senderGroupAccess.reason === "not_allowlisted") {
|
|
1360
|
+
logVerbose(`Blocked line group message from ${senderId} (groupPolicy: allowlist)`);
|
|
1361
|
+
return denied;
|
|
1362
|
+
}
|
|
1363
|
+
return {
|
|
1364
|
+
allowed: true,
|
|
1365
|
+
commandAuthorized: resolveLineCommandAuthorized({
|
|
1366
|
+
cfg,
|
|
1367
|
+
event,
|
|
1368
|
+
senderId,
|
|
1369
|
+
allow: effectiveGroupAllow
|
|
1370
|
+
})
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
if (dmPolicy === "disabled") {
|
|
1374
|
+
logVerbose("Blocked line sender (dmPolicy: disabled)");
|
|
1375
|
+
return denied;
|
|
1376
|
+
}
|
|
1377
|
+
if (!(dmPolicy === "open" || isSenderAllowed({
|
|
1378
|
+
allow: effectiveDmAllow,
|
|
1379
|
+
senderId
|
|
1380
|
+
}))) {
|
|
1381
|
+
if (dmPolicy === "pairing") {
|
|
1382
|
+
if (!senderId) {
|
|
1383
|
+
logVerbose("Blocked line sender (dmPolicy: pairing, no sender ID)");
|
|
1384
|
+
return denied;
|
|
1385
|
+
}
|
|
1386
|
+
await sendLinePairingReply({
|
|
1387
|
+
senderId,
|
|
1388
|
+
replyToken: "replyToken" in event ? event.replyToken : void 0,
|
|
1389
|
+
context
|
|
1390
|
+
});
|
|
1391
|
+
} else logVerbose(`Blocked line sender ${senderId || "unknown"} (dmPolicy: ${dmPolicy})`);
|
|
1392
|
+
return denied;
|
|
1393
|
+
}
|
|
1394
|
+
return {
|
|
1395
|
+
allowed: true,
|
|
1396
|
+
commandAuthorized: resolveLineCommandAuthorized({
|
|
1397
|
+
cfg,
|
|
1398
|
+
event,
|
|
1399
|
+
senderId,
|
|
1400
|
+
allow: effectiveDmAllow
|
|
1401
|
+
})
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
function getLineMentionees(message) {
|
|
1405
|
+
if (message.type !== "text") return [];
|
|
1406
|
+
const mentionees = message.mention?.mentionees;
|
|
1407
|
+
return Array.isArray(mentionees) ? mentionees : [];
|
|
1408
|
+
}
|
|
1409
|
+
function isLineBotMentioned(message) {
|
|
1410
|
+
return getLineMentionees(message).some((m) => m.isSelf === true || m.type === "all");
|
|
1411
|
+
}
|
|
1412
|
+
function hasAnyLineMention(message) {
|
|
1413
|
+
return getLineMentionees(message).length > 0;
|
|
1414
|
+
}
|
|
1415
|
+
function resolveEventRawText(event) {
|
|
1416
|
+
if (event.type === "message") {
|
|
1417
|
+
const msg = event.message;
|
|
1418
|
+
if (msg.type === "text") return msg.text;
|
|
1419
|
+
return "";
|
|
1420
|
+
}
|
|
1421
|
+
if (event.type === "postback") return event.postback?.data?.trim() ?? "";
|
|
1422
|
+
return "";
|
|
1423
|
+
}
|
|
1424
|
+
function resolveLineCommandAuthorized(params) {
|
|
1425
|
+
const senderAllowedForCommands = isSenderAllowed({
|
|
1426
|
+
allow: params.allow,
|
|
1427
|
+
senderId: params.senderId
|
|
1428
|
+
});
|
|
1429
|
+
const useAccessGroups = params.cfg.commands?.useAccessGroups !== false;
|
|
1430
|
+
const rawText = resolveEventRawText(params.event);
|
|
1431
|
+
return resolveControlCommandGate({
|
|
1432
|
+
useAccessGroups,
|
|
1433
|
+
authorizers: [{
|
|
1434
|
+
configured: params.allow.hasEntries,
|
|
1435
|
+
allowed: senderAllowedForCommands
|
|
1436
|
+
}],
|
|
1437
|
+
allowTextCommands: true,
|
|
1438
|
+
hasControlCommand: hasControlCommand(rawText, params.cfg)
|
|
1439
|
+
}).commandAuthorized;
|
|
1440
|
+
}
|
|
1441
|
+
async function handleMessageEvent(event, context) {
|
|
1442
|
+
const { cfg, account, runtime, mediaMaxBytes, processMessage } = context;
|
|
1443
|
+
const message = event.message;
|
|
1444
|
+
const decision = await shouldProcessLineEvent(event, context);
|
|
1445
|
+
if (!decision.allowed) return;
|
|
1446
|
+
const { isGroup, groupId, roomId } = getLineSourceInfo(event.source);
|
|
1447
|
+
if (isGroup) {
|
|
1448
|
+
const requireMention = resolveLineGroupConfig({
|
|
1449
|
+
config: account.config,
|
|
1450
|
+
groupId,
|
|
1451
|
+
roomId
|
|
1452
|
+
})?.requireMention !== false;
|
|
1453
|
+
const rawText = message.type === "text" ? message.text : "";
|
|
1454
|
+
const peerId = groupId ?? roomId ?? event.source.userId ?? "unknown";
|
|
1455
|
+
const { agentId } = resolveAgentRoute({
|
|
1456
|
+
cfg,
|
|
1457
|
+
channel: "line",
|
|
1458
|
+
accountId: account.accountId,
|
|
1459
|
+
peer: {
|
|
1460
|
+
kind: "group",
|
|
1461
|
+
id: peerId
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
const mentionRegexes = buildMentionRegexes(cfg, agentId);
|
|
1465
|
+
const wasMentionedByNative = isLineBotMentioned(message);
|
|
1466
|
+
const wasMentionedByPattern = message.type === "text" ? matchesMentionPatterns(rawText, mentionRegexes) : false;
|
|
1467
|
+
const wasMentioned = wasMentionedByNative || wasMentionedByPattern;
|
|
1468
|
+
if (resolveMentionGatingWithBypass({
|
|
1469
|
+
isGroup: true,
|
|
1470
|
+
requireMention,
|
|
1471
|
+
canDetectMention: message.type === "text",
|
|
1472
|
+
wasMentioned,
|
|
1473
|
+
hasAnyMention: hasAnyLineMention(message),
|
|
1474
|
+
allowTextCommands: true,
|
|
1475
|
+
hasControlCommand: hasControlCommand(rawText, cfg),
|
|
1476
|
+
commandAuthorized: decision.commandAuthorized
|
|
1477
|
+
}).shouldSkip) {
|
|
1478
|
+
logVerbose(`line: skipping group message (requireMention, not mentioned)`);
|
|
1479
|
+
const historyKey = groupId ?? roomId;
|
|
1480
|
+
const senderId = event.source.type === "group" || event.source.type === "room" ? event.source.userId ?? "unknown" : "unknown";
|
|
1481
|
+
if (historyKey && context.groupHistories) recordPendingHistoryEntryIfEnabled({
|
|
1482
|
+
historyMap: context.groupHistories,
|
|
1483
|
+
historyKey,
|
|
1484
|
+
limit: context.historyLimit ?? 50,
|
|
1485
|
+
entry: {
|
|
1486
|
+
sender: `user:${senderId}`,
|
|
1487
|
+
body: rawText || `<${message.type}>`,
|
|
1488
|
+
timestamp: event.timestamp
|
|
1489
|
+
}
|
|
1490
|
+
});
|
|
1491
|
+
return;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
const allMedia = [];
|
|
1495
|
+
if (isDownloadableLineMessageType(message.type)) try {
|
|
1496
|
+
const media = await downloadLineMedia(message.id, account.channelAccessToken, mediaMaxBytes);
|
|
1497
|
+
allMedia.push({
|
|
1498
|
+
path: media.path,
|
|
1499
|
+
contentType: media.contentType
|
|
1500
|
+
});
|
|
1501
|
+
} catch (err) {
|
|
1502
|
+
const errMsg = String(err);
|
|
1503
|
+
if (errMsg.includes("exceeds") && errMsg.includes("limit")) logVerbose(`line: media exceeds size limit for message ${message.id}`);
|
|
1504
|
+
else runtime.error?.(danger(`line: failed to download media: ${errMsg}`));
|
|
1505
|
+
}
|
|
1506
|
+
const messageContext = await buildLineMessageContext({
|
|
1507
|
+
event,
|
|
1508
|
+
allMedia,
|
|
1509
|
+
cfg,
|
|
1510
|
+
account,
|
|
1511
|
+
commandAuthorized: decision.commandAuthorized,
|
|
1512
|
+
groupHistories: context.groupHistories,
|
|
1513
|
+
historyLimit: context.historyLimit ?? 50
|
|
1514
|
+
});
|
|
1515
|
+
if (!messageContext) {
|
|
1516
|
+
logVerbose("line: skipping empty message");
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
await processMessage(messageContext);
|
|
1520
|
+
if (isGroup && context.groupHistories) {
|
|
1521
|
+
const historyKey = groupId ?? roomId;
|
|
1522
|
+
if (historyKey && context.groupHistories.has(historyKey)) clearHistoryEntriesIfEnabled({
|
|
1523
|
+
historyMap: context.groupHistories,
|
|
1524
|
+
historyKey,
|
|
1525
|
+
limit: context.historyLimit ?? 50
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
async function handleFollowEvent(event, _context) {
|
|
1530
|
+
logVerbose(`line: user ${(event.source.type === "user" ? event.source.userId : void 0) ?? "unknown"} followed`);
|
|
1531
|
+
}
|
|
1532
|
+
async function handleUnfollowEvent(event, _context) {
|
|
1533
|
+
logVerbose(`line: user ${(event.source.type === "user" ? event.source.userId : void 0) ?? "unknown"} unfollowed`);
|
|
1534
|
+
}
|
|
1535
|
+
async function handleJoinEvent(event, _context) {
|
|
1536
|
+
const groupId = event.source.type === "group" ? event.source.groupId : void 0;
|
|
1537
|
+
const roomId = event.source.type === "room" ? event.source.roomId : void 0;
|
|
1538
|
+
logVerbose(`line: bot joined ${groupId ? `group ${groupId}` : `room ${roomId}`}`);
|
|
1539
|
+
}
|
|
1540
|
+
async function handleLeaveEvent(event, _context) {
|
|
1541
|
+
const groupId = event.source.type === "group" ? event.source.groupId : void 0;
|
|
1542
|
+
const roomId = event.source.type === "room" ? event.source.roomId : void 0;
|
|
1543
|
+
logVerbose(`line: bot left ${groupId ? `group ${groupId}` : `room ${roomId}`}`);
|
|
1544
|
+
}
|
|
1545
|
+
async function handlePostbackEvent(event, context) {
|
|
1546
|
+
const data = event.postback.data;
|
|
1547
|
+
logVerbose(`line: received postback: ${data}`);
|
|
1548
|
+
const decision = await shouldProcessLineEvent(event, context);
|
|
1549
|
+
if (!decision.allowed) return;
|
|
1550
|
+
const postbackContext = await buildLinePostbackContext({
|
|
1551
|
+
event,
|
|
1552
|
+
cfg: context.cfg,
|
|
1553
|
+
account: context.account,
|
|
1554
|
+
commandAuthorized: decision.commandAuthorized
|
|
1555
|
+
});
|
|
1556
|
+
if (!postbackContext) return;
|
|
1557
|
+
await context.processMessage(postbackContext);
|
|
1558
|
+
}
|
|
1559
|
+
async function handleLineWebhookEvents(events, context) {
|
|
1560
|
+
let firstError;
|
|
1561
|
+
for (const event of events) {
|
|
1562
|
+
const replayCandidate = getLineReplayCandidate(event, context);
|
|
1563
|
+
const replaySkip = replayCandidate ? shouldSkipLineReplayEvent(replayCandidate) : null;
|
|
1564
|
+
if (replaySkip?.skip) {
|
|
1565
|
+
if (replaySkip.inFlightResult) try {
|
|
1566
|
+
await replaySkip.inFlightResult;
|
|
1567
|
+
} catch (err) {
|
|
1568
|
+
context.runtime.error?.(danger(`line: replayed in-flight event failed: ${String(err)}`));
|
|
1569
|
+
firstError ??= err;
|
|
1570
|
+
}
|
|
1571
|
+
continue;
|
|
1572
|
+
}
|
|
1573
|
+
const inFlightReservation = replayCandidate ? markLineReplayEventInFlight(replayCandidate) : null;
|
|
1574
|
+
try {
|
|
1575
|
+
switch (event.type) {
|
|
1576
|
+
case "message":
|
|
1577
|
+
await handleMessageEvent(event, context);
|
|
1578
|
+
break;
|
|
1579
|
+
case "follow":
|
|
1580
|
+
await handleFollowEvent(event, context);
|
|
1581
|
+
break;
|
|
1582
|
+
case "unfollow":
|
|
1583
|
+
await handleUnfollowEvent(event, context);
|
|
1584
|
+
break;
|
|
1585
|
+
case "join":
|
|
1586
|
+
await handleJoinEvent(event, context);
|
|
1587
|
+
break;
|
|
1588
|
+
case "leave":
|
|
1589
|
+
await handleLeaveEvent(event, context);
|
|
1590
|
+
break;
|
|
1591
|
+
case "postback":
|
|
1592
|
+
await handlePostbackEvent(event, context);
|
|
1593
|
+
break;
|
|
1594
|
+
default: logVerbose(`line: unhandled event type: ${event.type}`);
|
|
1595
|
+
}
|
|
1596
|
+
if (replayCandidate) {
|
|
1597
|
+
rememberLineReplayEvent(replayCandidate);
|
|
1598
|
+
inFlightReservation?.resolve();
|
|
1599
|
+
clearLineReplayEventInFlight(replayCandidate);
|
|
1600
|
+
}
|
|
1601
|
+
} catch (err) {
|
|
1602
|
+
if (replayCandidate) {
|
|
1603
|
+
inFlightReservation?.reject(err);
|
|
1604
|
+
clearLineReplayEventInFlight(replayCandidate);
|
|
1605
|
+
}
|
|
1606
|
+
context.runtime.error?.(danger(`line: event handler failed: ${String(err)}`));
|
|
1607
|
+
firstError ??= err;
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
if (firstError) throw firstError;
|
|
1611
|
+
}
|
|
1612
|
+
//#endregion
|
|
1613
|
+
//#region extensions/line/src/signature.ts
|
|
1614
|
+
function validateLineSignature(body, signature, channelSecret) {
|
|
1615
|
+
const hash = crypto.createHmac("SHA256", channelSecret).update(body).digest("base64");
|
|
1616
|
+
const hashBuffer = Buffer.from(hash);
|
|
1617
|
+
const signatureBuffer = Buffer.from(signature);
|
|
1618
|
+
const maxLen = Math.max(hashBuffer.length, signatureBuffer.length);
|
|
1619
|
+
const paddedHash = Buffer.alloc(maxLen);
|
|
1620
|
+
const paddedSig = Buffer.alloc(maxLen);
|
|
1621
|
+
hashBuffer.copy(paddedHash);
|
|
1622
|
+
signatureBuffer.copy(paddedSig);
|
|
1623
|
+
const timingResult = crypto.timingSafeEqual(paddedHash, paddedSig);
|
|
1624
|
+
return hashBuffer.length === signatureBuffer.length && timingResult;
|
|
1625
|
+
}
|
|
1626
|
+
//#endregion
|
|
1627
|
+
//#region extensions/line/src/webhook-utils.ts
|
|
1628
|
+
function parseLineWebhookBody(rawBody) {
|
|
1629
|
+
try {
|
|
1630
|
+
return JSON.parse(rawBody);
|
|
1631
|
+
} catch {
|
|
1632
|
+
return null;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
//#endregion
|
|
1636
|
+
//#region extensions/line/src/webhook.ts
|
|
1637
|
+
const LINE_WEBHOOK_MAX_RAW_BODY_BYTES = 64 * 1024;
|
|
1638
|
+
function readRawBody(req) {
|
|
1639
|
+
const rawBody = req.rawBody ?? (typeof req.body === "string" || Buffer.isBuffer(req.body) ? req.body : null);
|
|
1640
|
+
if (!rawBody) return null;
|
|
1641
|
+
return Buffer.isBuffer(rawBody) ? rawBody.toString("utf-8") : rawBody;
|
|
1642
|
+
}
|
|
1643
|
+
function parseWebhookBody(rawBody) {
|
|
1644
|
+
if (!rawBody) return null;
|
|
1645
|
+
return parseLineWebhookBody(rawBody);
|
|
1646
|
+
}
|
|
1647
|
+
function createLineWebhookMiddleware(options) {
|
|
1648
|
+
const { channelSecret, onEvents, runtime } = options;
|
|
1649
|
+
return async (req, res, _next) => {
|
|
1650
|
+
try {
|
|
1651
|
+
const signature = req.headers["x-line-signature"];
|
|
1652
|
+
if (!signature || typeof signature !== "string") {
|
|
1653
|
+
res.status(400).json({ error: "Missing X-Line-Signature header" });
|
|
1654
|
+
return;
|
|
1655
|
+
}
|
|
1656
|
+
const rawBody = readRawBody(req);
|
|
1657
|
+
if (!rawBody) {
|
|
1658
|
+
res.status(400).json({ error: "Missing raw request body for signature verification" });
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1661
|
+
if (Buffer.byteLength(rawBody, "utf-8") > LINE_WEBHOOK_MAX_RAW_BODY_BYTES) {
|
|
1662
|
+
res.status(413).json({ error: "Payload too large" });
|
|
1663
|
+
return;
|
|
1664
|
+
}
|
|
1665
|
+
if (!validateLineSignature(rawBody, signature, channelSecret)) {
|
|
1666
|
+
logVerbose("line: webhook signature validation failed");
|
|
1667
|
+
res.status(401).json({ error: "Invalid signature" });
|
|
1668
|
+
return;
|
|
1669
|
+
}
|
|
1670
|
+
const body = parseWebhookBody(rawBody);
|
|
1671
|
+
if (!body) {
|
|
1672
|
+
res.status(400).json({ error: "Invalid webhook payload" });
|
|
1673
|
+
return;
|
|
1674
|
+
}
|
|
1675
|
+
if (body.events && body.events.length > 0) {
|
|
1676
|
+
logVerbose(`line: received ${body.events.length} webhook events`);
|
|
1677
|
+
await onEvents(body);
|
|
1678
|
+
}
|
|
1679
|
+
res.status(200).json({ status: "ok" });
|
|
1680
|
+
} catch (err) {
|
|
1681
|
+
runtime?.error?.(danger(`line webhook error: ${String(err)}`));
|
|
1682
|
+
if (!res.headersSent) res.status(500).json({ error: "Internal server error" });
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1685
|
+
}
|
|
1686
|
+
function startLineWebhook(options) {
|
|
1687
|
+
const channelSecret = typeof options.channelSecret === "string" ? options.channelSecret.trim() : "";
|
|
1688
|
+
if (!channelSecret) throw new Error("LINE webhook mode requires a non-empty channel secret. Set channels.line.channelSecret in your config.");
|
|
1689
|
+
return {
|
|
1690
|
+
path: options.path ?? "/line/webhook",
|
|
1691
|
+
handler: createLineWebhookMiddleware({
|
|
1692
|
+
channelSecret,
|
|
1693
|
+
onEvents: options.onEvents,
|
|
1694
|
+
runtime: options.runtime
|
|
1695
|
+
})
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
//#endregion
|
|
1699
|
+
//#region extensions/line/src/bot.ts
|
|
1700
|
+
function createLineBot(opts) {
|
|
1701
|
+
const runtime = opts.runtime ?? createNonExitingRuntime();
|
|
1702
|
+
const cfg = opts.config ?? loadConfig();
|
|
1703
|
+
const account = resolveLineAccount({
|
|
1704
|
+
cfg,
|
|
1705
|
+
accountId: opts.accountId
|
|
1706
|
+
});
|
|
1707
|
+
const mediaMaxBytes = (opts.mediaMaxMb ?? account.config.mediaMaxMb ?? 10) * 1024 * 1024;
|
|
1708
|
+
const processMessage = opts.onMessage ?? (async () => {
|
|
1709
|
+
logVerbose("line: no message handler configured");
|
|
1710
|
+
});
|
|
1711
|
+
const replayCache = createLineWebhookReplayCache();
|
|
1712
|
+
const groupHistories = /* @__PURE__ */ new Map();
|
|
1713
|
+
const handleWebhook = async (body) => {
|
|
1714
|
+
if (!body.events || body.events.length === 0) return;
|
|
1715
|
+
await handleLineWebhookEvents(body.events, {
|
|
1716
|
+
cfg,
|
|
1717
|
+
account,
|
|
1718
|
+
runtime,
|
|
1719
|
+
mediaMaxBytes,
|
|
1720
|
+
processMessage,
|
|
1721
|
+
replayCache,
|
|
1722
|
+
groupHistories,
|
|
1723
|
+
historyLimit: cfg.messages?.groupChat?.historyLimit ?? 50
|
|
1724
|
+
});
|
|
1725
|
+
};
|
|
1726
|
+
return {
|
|
1727
|
+
handleWebhook,
|
|
1728
|
+
account
|
|
1729
|
+
};
|
|
1730
|
+
}
|
|
1731
|
+
//#endregion
|
|
1732
|
+
//#region extensions/line/src/flex-templates/common.ts
|
|
1733
|
+
function attachFooterText(bubble, footer) {
|
|
1734
|
+
bubble.footer = {
|
|
1735
|
+
type: "box",
|
|
1736
|
+
layout: "vertical",
|
|
1737
|
+
contents: [{
|
|
1738
|
+
type: "text",
|
|
1739
|
+
text: footer,
|
|
1740
|
+
size: "xs",
|
|
1741
|
+
color: "#AAAAAA",
|
|
1742
|
+
wrap: true,
|
|
1743
|
+
align: "center"
|
|
1744
|
+
}],
|
|
1745
|
+
paddingAll: "lg",
|
|
1746
|
+
backgroundColor: "#FAFAFA"
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
//#endregion
|
|
1750
|
+
//#region extensions/line/src/flex-templates/basic-cards.ts
|
|
1751
|
+
/**
|
|
1752
|
+
* Create an info card with title, body, and optional footer
|
|
1753
|
+
*
|
|
1754
|
+
* Editorial design: Clean hierarchy with accent bar, generous spacing,
|
|
1755
|
+
* and subtle background zones for visual separation.
|
|
1756
|
+
*/
|
|
1757
|
+
function createInfoCard(title, body, footer) {
|
|
1758
|
+
const bubble = {
|
|
1759
|
+
type: "bubble",
|
|
1760
|
+
size: "mega",
|
|
1761
|
+
body: {
|
|
1762
|
+
type: "box",
|
|
1763
|
+
layout: "vertical",
|
|
1764
|
+
contents: [{
|
|
1765
|
+
type: "box",
|
|
1766
|
+
layout: "horizontal",
|
|
1767
|
+
contents: [{
|
|
1768
|
+
type: "box",
|
|
1769
|
+
layout: "vertical",
|
|
1770
|
+
contents: [],
|
|
1771
|
+
width: "4px",
|
|
1772
|
+
backgroundColor: "#06C755",
|
|
1773
|
+
cornerRadius: "2px"
|
|
1774
|
+
}, {
|
|
1775
|
+
type: "text",
|
|
1776
|
+
text: title,
|
|
1777
|
+
weight: "bold",
|
|
1778
|
+
size: "xl",
|
|
1779
|
+
color: "#111111",
|
|
1780
|
+
wrap: true,
|
|
1781
|
+
flex: 1,
|
|
1782
|
+
margin: "lg"
|
|
1783
|
+
}]
|
|
1784
|
+
}, {
|
|
1785
|
+
type: "box",
|
|
1786
|
+
layout: "vertical",
|
|
1787
|
+
contents: [{
|
|
1788
|
+
type: "text",
|
|
1789
|
+
text: body,
|
|
1790
|
+
size: "md",
|
|
1791
|
+
color: "#444444",
|
|
1792
|
+
wrap: true,
|
|
1793
|
+
lineSpacing: "6px"
|
|
1794
|
+
}],
|
|
1795
|
+
margin: "xl",
|
|
1796
|
+
paddingAll: "lg",
|
|
1797
|
+
backgroundColor: "#F8F9FA",
|
|
1798
|
+
cornerRadius: "lg"
|
|
1799
|
+
}],
|
|
1800
|
+
paddingAll: "xl",
|
|
1801
|
+
backgroundColor: "#FFFFFF"
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
if (footer) attachFooterText(bubble, footer);
|
|
1805
|
+
return bubble;
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* Create a list card with title and multiple items
|
|
1809
|
+
*
|
|
1810
|
+
* Editorial design: Numbered/bulleted list with clear visual hierarchy,
|
|
1811
|
+
* accent dots for each item, and generous spacing.
|
|
1812
|
+
*/
|
|
1813
|
+
function createListCard(title, items) {
|
|
1814
|
+
const itemContents = items.slice(0, 8).map((item, index) => {
|
|
1815
|
+
const itemContents = [{
|
|
1816
|
+
type: "text",
|
|
1817
|
+
text: item.title,
|
|
1818
|
+
size: "md",
|
|
1819
|
+
weight: "bold",
|
|
1820
|
+
color: "#1a1a1a",
|
|
1821
|
+
wrap: true
|
|
1822
|
+
}];
|
|
1823
|
+
if (item.subtitle) itemContents.push({
|
|
1824
|
+
type: "text",
|
|
1825
|
+
text: item.subtitle,
|
|
1826
|
+
size: "sm",
|
|
1827
|
+
color: "#888888",
|
|
1828
|
+
wrap: true,
|
|
1829
|
+
margin: "xs"
|
|
1830
|
+
});
|
|
1831
|
+
const itemBox = {
|
|
1832
|
+
type: "box",
|
|
1833
|
+
layout: "horizontal",
|
|
1834
|
+
contents: [{
|
|
1835
|
+
type: "box",
|
|
1836
|
+
layout: "vertical",
|
|
1837
|
+
contents: [{
|
|
1838
|
+
type: "box",
|
|
1839
|
+
layout: "vertical",
|
|
1840
|
+
contents: [],
|
|
1841
|
+
width: "8px",
|
|
1842
|
+
height: "8px",
|
|
1843
|
+
backgroundColor: index === 0 ? "#06C755" : "#DDDDDD",
|
|
1844
|
+
cornerRadius: "4px"
|
|
1845
|
+
}],
|
|
1846
|
+
width: "20px",
|
|
1847
|
+
alignItems: "center",
|
|
1848
|
+
paddingTop: "sm"
|
|
1849
|
+
}, {
|
|
1850
|
+
type: "box",
|
|
1851
|
+
layout: "vertical",
|
|
1852
|
+
contents: itemContents,
|
|
1853
|
+
flex: 1
|
|
1854
|
+
}],
|
|
1855
|
+
margin: index > 0 ? "lg" : void 0
|
|
1856
|
+
};
|
|
1857
|
+
if (item.action) itemBox.action = item.action;
|
|
1858
|
+
return itemBox;
|
|
1859
|
+
});
|
|
1860
|
+
return {
|
|
1861
|
+
type: "bubble",
|
|
1862
|
+
size: "mega",
|
|
1863
|
+
body: {
|
|
1864
|
+
type: "box",
|
|
1865
|
+
layout: "vertical",
|
|
1866
|
+
contents: [
|
|
1867
|
+
{
|
|
1868
|
+
type: "text",
|
|
1869
|
+
text: title,
|
|
1870
|
+
weight: "bold",
|
|
1871
|
+
size: "xl",
|
|
1872
|
+
color: "#111111",
|
|
1873
|
+
wrap: true
|
|
1874
|
+
},
|
|
1875
|
+
{
|
|
1876
|
+
type: "separator",
|
|
1877
|
+
margin: "lg",
|
|
1878
|
+
color: "#EEEEEE"
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
type: "box",
|
|
1882
|
+
layout: "vertical",
|
|
1883
|
+
contents: itemContents,
|
|
1884
|
+
margin: "lg"
|
|
1885
|
+
}
|
|
1886
|
+
],
|
|
1887
|
+
paddingAll: "xl",
|
|
1888
|
+
backgroundColor: "#FFFFFF"
|
|
1889
|
+
}
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Create an image card with image, title, and optional body text
|
|
1894
|
+
*/
|
|
1895
|
+
function createImageCard(imageUrl, title, body, options) {
|
|
1896
|
+
const bubble = {
|
|
1897
|
+
type: "bubble",
|
|
1898
|
+
hero: {
|
|
1899
|
+
type: "image",
|
|
1900
|
+
url: imageUrl,
|
|
1901
|
+
size: "full",
|
|
1902
|
+
aspectRatio: options?.aspectRatio ?? "20:13",
|
|
1903
|
+
aspectMode: options?.aspectMode ?? "cover",
|
|
1904
|
+
action: options?.action
|
|
1905
|
+
},
|
|
1906
|
+
body: {
|
|
1907
|
+
type: "box",
|
|
1908
|
+
layout: "vertical",
|
|
1909
|
+
contents: [{
|
|
1910
|
+
type: "text",
|
|
1911
|
+
text: title,
|
|
1912
|
+
weight: "bold",
|
|
1913
|
+
size: "xl",
|
|
1914
|
+
wrap: true
|
|
1915
|
+
}],
|
|
1916
|
+
paddingAll: "lg"
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1919
|
+
if (body && bubble.body) bubble.body.contents.push({
|
|
1920
|
+
type: "text",
|
|
1921
|
+
text: body,
|
|
1922
|
+
size: "md",
|
|
1923
|
+
wrap: true,
|
|
1924
|
+
margin: "md",
|
|
1925
|
+
color: "#666666"
|
|
1926
|
+
});
|
|
1927
|
+
return bubble;
|
|
1928
|
+
}
|
|
1929
|
+
/**
|
|
1930
|
+
* Create an action card with title, body, and action buttons
|
|
1931
|
+
*/
|
|
1932
|
+
function createActionCard(title, body, actions, options) {
|
|
1933
|
+
const bubble = {
|
|
1934
|
+
type: "bubble",
|
|
1935
|
+
body: {
|
|
1936
|
+
type: "box",
|
|
1937
|
+
layout: "vertical",
|
|
1938
|
+
contents: [{
|
|
1939
|
+
type: "text",
|
|
1940
|
+
text: title,
|
|
1941
|
+
weight: "bold",
|
|
1942
|
+
size: "xl",
|
|
1943
|
+
wrap: true
|
|
1944
|
+
}, {
|
|
1945
|
+
type: "text",
|
|
1946
|
+
text: body,
|
|
1947
|
+
size: "md",
|
|
1948
|
+
wrap: true,
|
|
1949
|
+
margin: "md",
|
|
1950
|
+
color: "#666666"
|
|
1951
|
+
}],
|
|
1952
|
+
paddingAll: "lg"
|
|
1953
|
+
},
|
|
1954
|
+
footer: {
|
|
1955
|
+
type: "box",
|
|
1956
|
+
layout: "vertical",
|
|
1957
|
+
contents: actions.slice(0, 4).map((action, index) => ({
|
|
1958
|
+
type: "button",
|
|
1959
|
+
action: action.action,
|
|
1960
|
+
style: index === 0 ? "primary" : "secondary",
|
|
1961
|
+
margin: index > 0 ? "sm" : void 0
|
|
1962
|
+
})),
|
|
1963
|
+
paddingAll: "md"
|
|
1964
|
+
}
|
|
1965
|
+
};
|
|
1966
|
+
if (options?.imageUrl) bubble.hero = {
|
|
1967
|
+
type: "image",
|
|
1968
|
+
url: options.imageUrl,
|
|
1969
|
+
size: "full",
|
|
1970
|
+
aspectRatio: options.aspectRatio ?? "20:13",
|
|
1971
|
+
aspectMode: "cover"
|
|
1972
|
+
};
|
|
1973
|
+
return bubble;
|
|
1974
|
+
}
|
|
1975
|
+
/**
|
|
1976
|
+
* Create a carousel container from multiple bubbles
|
|
1977
|
+
* LINE allows max 12 bubbles in a carousel
|
|
1978
|
+
*/
|
|
1979
|
+
function createCarousel(bubbles) {
|
|
1980
|
+
return {
|
|
1981
|
+
type: "carousel",
|
|
1982
|
+
contents: bubbles.slice(0, 12)
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1986
|
+
* Create a notification bubble (for alerts, status updates)
|
|
1987
|
+
*
|
|
1988
|
+
* Editorial design: Bold status indicator with accent color,
|
|
1989
|
+
* clear typography, optional icon for context.
|
|
1990
|
+
*/
|
|
1991
|
+
function createNotificationBubble(text, options) {
|
|
1992
|
+
const typeColors = {
|
|
1993
|
+
info: {
|
|
1994
|
+
accent: "#3B82F6",
|
|
1995
|
+
bg: "#EFF6FF"
|
|
1996
|
+
},
|
|
1997
|
+
success: {
|
|
1998
|
+
accent: "#06C755",
|
|
1999
|
+
bg: "#F0FDF4"
|
|
2000
|
+
},
|
|
2001
|
+
warning: {
|
|
2002
|
+
accent: "#F59E0B",
|
|
2003
|
+
bg: "#FFFBEB"
|
|
2004
|
+
},
|
|
2005
|
+
error: {
|
|
2006
|
+
accent: "#EF4444",
|
|
2007
|
+
bg: "#FEF2F2"
|
|
2008
|
+
}
|
|
2009
|
+
}[options?.type ?? "info"];
|
|
2010
|
+
const contents = [];
|
|
2011
|
+
contents.push({
|
|
2012
|
+
type: "box",
|
|
2013
|
+
layout: "vertical",
|
|
2014
|
+
contents: [],
|
|
2015
|
+
width: "4px",
|
|
2016
|
+
backgroundColor: typeColors.accent,
|
|
2017
|
+
cornerRadius: "2px"
|
|
2018
|
+
});
|
|
2019
|
+
const textContents = [];
|
|
2020
|
+
if (options?.title) textContents.push({
|
|
2021
|
+
type: "text",
|
|
2022
|
+
text: options.title,
|
|
2023
|
+
size: "md",
|
|
2024
|
+
weight: "bold",
|
|
2025
|
+
color: "#111111",
|
|
2026
|
+
wrap: true
|
|
2027
|
+
});
|
|
2028
|
+
textContents.push({
|
|
2029
|
+
type: "text",
|
|
2030
|
+
text,
|
|
2031
|
+
size: options?.title ? "sm" : "md",
|
|
2032
|
+
color: options?.title ? "#666666" : "#333333",
|
|
2033
|
+
wrap: true,
|
|
2034
|
+
margin: options?.title ? "sm" : void 0
|
|
2035
|
+
});
|
|
2036
|
+
contents.push({
|
|
2037
|
+
type: "box",
|
|
2038
|
+
layout: "vertical",
|
|
2039
|
+
contents: textContents,
|
|
2040
|
+
flex: 1,
|
|
2041
|
+
paddingStart: "lg"
|
|
2042
|
+
});
|
|
2043
|
+
return {
|
|
2044
|
+
type: "bubble",
|
|
2045
|
+
body: {
|
|
2046
|
+
type: "box",
|
|
2047
|
+
layout: "horizontal",
|
|
2048
|
+
contents,
|
|
2049
|
+
paddingAll: "xl",
|
|
2050
|
+
backgroundColor: typeColors.bg
|
|
2051
|
+
}
|
|
2052
|
+
};
|
|
2053
|
+
}
|
|
2054
|
+
//#endregion
|
|
2055
|
+
//#region extensions/line/src/flex-templates/schedule-cards.ts
|
|
2056
|
+
function buildTitleSubtitleHeader(params) {
|
|
2057
|
+
const { title, subtitle } = params;
|
|
2058
|
+
const headerContents = [{
|
|
2059
|
+
type: "text",
|
|
2060
|
+
text: title,
|
|
2061
|
+
weight: "bold",
|
|
2062
|
+
size: "xl",
|
|
2063
|
+
color: "#111111",
|
|
2064
|
+
wrap: true
|
|
2065
|
+
}];
|
|
2066
|
+
if (subtitle) headerContents.push({
|
|
2067
|
+
type: "text",
|
|
2068
|
+
text: subtitle,
|
|
2069
|
+
size: "sm",
|
|
2070
|
+
color: "#888888",
|
|
2071
|
+
margin: "sm",
|
|
2072
|
+
wrap: true
|
|
2073
|
+
});
|
|
2074
|
+
return headerContents;
|
|
2075
|
+
}
|
|
2076
|
+
function buildCardHeaderSections(headerContents) {
|
|
2077
|
+
return [{
|
|
2078
|
+
type: "box",
|
|
2079
|
+
layout: "vertical",
|
|
2080
|
+
contents: headerContents,
|
|
2081
|
+
paddingBottom: "lg"
|
|
2082
|
+
}, {
|
|
2083
|
+
type: "separator",
|
|
2084
|
+
color: "#EEEEEE"
|
|
2085
|
+
}];
|
|
2086
|
+
}
|
|
2087
|
+
function createMegaBubbleWithFooter(params) {
|
|
2088
|
+
const bubble = {
|
|
2089
|
+
type: "bubble",
|
|
2090
|
+
size: "mega",
|
|
2091
|
+
body: {
|
|
2092
|
+
type: "box",
|
|
2093
|
+
layout: "vertical",
|
|
2094
|
+
contents: params.bodyContents,
|
|
2095
|
+
paddingAll: "xl",
|
|
2096
|
+
backgroundColor: "#FFFFFF"
|
|
2097
|
+
}
|
|
2098
|
+
};
|
|
2099
|
+
if (params.footer) attachFooterText(bubble, params.footer);
|
|
2100
|
+
return bubble;
|
|
2101
|
+
}
|
|
2102
|
+
/**
|
|
2103
|
+
* Create a receipt/summary card (for orders, transactions, data tables)
|
|
2104
|
+
*
|
|
2105
|
+
* Editorial design: Clean table layout with alternating row backgrounds,
|
|
2106
|
+
* prominent total section, and clear visual hierarchy.
|
|
2107
|
+
*/
|
|
2108
|
+
function createReceiptCard(params) {
|
|
2109
|
+
const { title, subtitle, items, total, footer } = params;
|
|
2110
|
+
const itemRows = items.slice(0, 12).map((item, index) => ({
|
|
2111
|
+
type: "box",
|
|
2112
|
+
layout: "horizontal",
|
|
2113
|
+
contents: [{
|
|
2114
|
+
type: "text",
|
|
2115
|
+
text: item.name,
|
|
2116
|
+
size: "sm",
|
|
2117
|
+
color: item.highlight ? "#111111" : "#666666",
|
|
2118
|
+
weight: item.highlight ? "bold" : "regular",
|
|
2119
|
+
flex: 3,
|
|
2120
|
+
wrap: true
|
|
2121
|
+
}, {
|
|
2122
|
+
type: "text",
|
|
2123
|
+
text: item.value,
|
|
2124
|
+
size: "sm",
|
|
2125
|
+
color: item.highlight ? "#06C755" : "#333333",
|
|
2126
|
+
weight: item.highlight ? "bold" : "regular",
|
|
2127
|
+
flex: 2,
|
|
2128
|
+
align: "end",
|
|
2129
|
+
wrap: true
|
|
2130
|
+
}],
|
|
2131
|
+
paddingAll: "md",
|
|
2132
|
+
backgroundColor: index % 2 === 0 ? "#FFFFFF" : "#FAFAFA"
|
|
2133
|
+
}));
|
|
2134
|
+
const bodyContents = [...buildCardHeaderSections(buildTitleSubtitleHeader({
|
|
2135
|
+
title,
|
|
2136
|
+
subtitle
|
|
2137
|
+
})), {
|
|
2138
|
+
type: "box",
|
|
2139
|
+
layout: "vertical",
|
|
2140
|
+
contents: itemRows,
|
|
2141
|
+
margin: "md",
|
|
2142
|
+
cornerRadius: "md",
|
|
2143
|
+
borderWidth: "light",
|
|
2144
|
+
borderColor: "#EEEEEE"
|
|
2145
|
+
}];
|
|
2146
|
+
if (total) bodyContents.push({
|
|
2147
|
+
type: "box",
|
|
2148
|
+
layout: "horizontal",
|
|
2149
|
+
contents: [{
|
|
2150
|
+
type: "text",
|
|
2151
|
+
text: total.label,
|
|
2152
|
+
size: "lg",
|
|
2153
|
+
weight: "bold",
|
|
2154
|
+
color: "#111111",
|
|
2155
|
+
flex: 2
|
|
2156
|
+
}, {
|
|
2157
|
+
type: "text",
|
|
2158
|
+
text: total.value,
|
|
2159
|
+
size: "xl",
|
|
2160
|
+
weight: "bold",
|
|
2161
|
+
color: "#06C755",
|
|
2162
|
+
flex: 2,
|
|
2163
|
+
align: "end"
|
|
2164
|
+
}],
|
|
2165
|
+
margin: "xl",
|
|
2166
|
+
paddingAll: "lg",
|
|
2167
|
+
backgroundColor: "#F0FDF4",
|
|
2168
|
+
cornerRadius: "lg"
|
|
2169
|
+
});
|
|
2170
|
+
return createMegaBubbleWithFooter({
|
|
2171
|
+
bodyContents,
|
|
2172
|
+
footer
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
/**
|
|
2176
|
+
* Create a calendar event card (for meetings, appointments, reminders)
|
|
2177
|
+
*
|
|
2178
|
+
* Editorial design: Date as hero, strong typographic hierarchy,
|
|
2179
|
+
* color-blocked zones, full text wrapping for readability.
|
|
2180
|
+
*/
|
|
2181
|
+
function createEventCard(params) {
|
|
2182
|
+
const { title, date, time, location, description, calendar, isAllDay, action } = params;
|
|
2183
|
+
const dateBlock = {
|
|
2184
|
+
type: "box",
|
|
2185
|
+
layout: "vertical",
|
|
2186
|
+
contents: [{
|
|
2187
|
+
type: "text",
|
|
2188
|
+
text: date.toUpperCase(),
|
|
2189
|
+
size: "sm",
|
|
2190
|
+
weight: "bold",
|
|
2191
|
+
color: "#06C755",
|
|
2192
|
+
wrap: true
|
|
2193
|
+
}, {
|
|
2194
|
+
type: "text",
|
|
2195
|
+
text: isAllDay ? "ALL DAY" : time ?? "",
|
|
2196
|
+
size: "xxl",
|
|
2197
|
+
weight: "bold",
|
|
2198
|
+
color: "#111111",
|
|
2199
|
+
wrap: true,
|
|
2200
|
+
margin: "xs"
|
|
2201
|
+
}],
|
|
2202
|
+
paddingBottom: "lg",
|
|
2203
|
+
borderWidth: "none"
|
|
2204
|
+
};
|
|
2205
|
+
if (!time && !isAllDay) dateBlock.contents = [{
|
|
2206
|
+
type: "text",
|
|
2207
|
+
text: date,
|
|
2208
|
+
size: "xl",
|
|
2209
|
+
weight: "bold",
|
|
2210
|
+
color: "#111111",
|
|
2211
|
+
wrap: true
|
|
2212
|
+
}];
|
|
2213
|
+
const bodyContents = [dateBlock, {
|
|
2214
|
+
type: "box",
|
|
2215
|
+
layout: "horizontal",
|
|
2216
|
+
contents: [{
|
|
2217
|
+
type: "box",
|
|
2218
|
+
layout: "vertical",
|
|
2219
|
+
contents: [],
|
|
2220
|
+
width: "4px",
|
|
2221
|
+
backgroundColor: "#06C755",
|
|
2222
|
+
cornerRadius: "2px"
|
|
2223
|
+
}, {
|
|
2224
|
+
type: "box",
|
|
2225
|
+
layout: "vertical",
|
|
2226
|
+
contents: [{
|
|
2227
|
+
type: "text",
|
|
2228
|
+
text: title,
|
|
2229
|
+
size: "lg",
|
|
2230
|
+
weight: "bold",
|
|
2231
|
+
color: "#1a1a1a",
|
|
2232
|
+
wrap: true
|
|
2233
|
+
}, ...calendar ? [{
|
|
2234
|
+
type: "text",
|
|
2235
|
+
text: calendar,
|
|
2236
|
+
size: "xs",
|
|
2237
|
+
color: "#888888",
|
|
2238
|
+
margin: "sm",
|
|
2239
|
+
wrap: true
|
|
2240
|
+
}] : []],
|
|
2241
|
+
flex: 1,
|
|
2242
|
+
paddingStart: "lg"
|
|
2243
|
+
}],
|
|
2244
|
+
paddingTop: "lg",
|
|
2245
|
+
paddingBottom: "lg",
|
|
2246
|
+
borderWidth: "light",
|
|
2247
|
+
borderColor: "#EEEEEE"
|
|
2248
|
+
}];
|
|
2249
|
+
if (location || description) {
|
|
2250
|
+
const detailItems = [];
|
|
2251
|
+
if (location) detailItems.push({
|
|
2252
|
+
type: "box",
|
|
2253
|
+
layout: "horizontal",
|
|
2254
|
+
contents: [{
|
|
2255
|
+
type: "text",
|
|
2256
|
+
text: "📍",
|
|
2257
|
+
size: "sm",
|
|
2258
|
+
flex: 0
|
|
2259
|
+
}, {
|
|
2260
|
+
type: "text",
|
|
2261
|
+
text: location,
|
|
2262
|
+
size: "sm",
|
|
2263
|
+
color: "#444444",
|
|
2264
|
+
margin: "md",
|
|
2265
|
+
flex: 1,
|
|
2266
|
+
wrap: true
|
|
2267
|
+
}],
|
|
2268
|
+
alignItems: "flex-start"
|
|
2269
|
+
});
|
|
2270
|
+
if (description) detailItems.push({
|
|
2271
|
+
type: "text",
|
|
2272
|
+
text: description,
|
|
2273
|
+
size: "sm",
|
|
2274
|
+
color: "#666666",
|
|
2275
|
+
wrap: true,
|
|
2276
|
+
margin: location ? "lg" : "none"
|
|
2277
|
+
});
|
|
2278
|
+
bodyContents.push({
|
|
2279
|
+
type: "box",
|
|
2280
|
+
layout: "vertical",
|
|
2281
|
+
contents: detailItems,
|
|
2282
|
+
margin: "lg",
|
|
2283
|
+
paddingAll: "lg",
|
|
2284
|
+
backgroundColor: "#F8F9FA",
|
|
2285
|
+
cornerRadius: "lg"
|
|
2286
|
+
});
|
|
2287
|
+
}
|
|
2288
|
+
return {
|
|
2289
|
+
type: "bubble",
|
|
2290
|
+
size: "mega",
|
|
2291
|
+
body: {
|
|
2292
|
+
type: "box",
|
|
2293
|
+
layout: "vertical",
|
|
2294
|
+
contents: bodyContents,
|
|
2295
|
+
paddingAll: "xl",
|
|
2296
|
+
backgroundColor: "#FFFFFF",
|
|
2297
|
+
action
|
|
2298
|
+
}
|
|
2299
|
+
};
|
|
2300
|
+
}
|
|
2301
|
+
/**
|
|
2302
|
+
* Create a calendar agenda card showing multiple events
|
|
2303
|
+
*
|
|
2304
|
+
* Editorial timeline design: Time-focused left column with event details
|
|
2305
|
+
* on the right. Visual accent bars indicate event priority/recency.
|
|
2306
|
+
*/
|
|
2307
|
+
function createAgendaCard(params) {
|
|
2308
|
+
const { title, subtitle, events, footer } = params;
|
|
2309
|
+
const headerContents = buildTitleSubtitleHeader({
|
|
2310
|
+
title,
|
|
2311
|
+
subtitle
|
|
2312
|
+
});
|
|
2313
|
+
const eventItems = events.slice(0, 6).map((event, index) => {
|
|
2314
|
+
const isActive = event.isNow || index === 0;
|
|
2315
|
+
const accentColor = isActive ? "#06C755" : "#E5E5E5";
|
|
2316
|
+
const timeColumn = {
|
|
2317
|
+
type: "box",
|
|
2318
|
+
layout: "vertical",
|
|
2319
|
+
contents: [{
|
|
2320
|
+
type: "text",
|
|
2321
|
+
text: event.time ?? "—",
|
|
2322
|
+
size: "sm",
|
|
2323
|
+
weight: isActive ? "bold" : "regular",
|
|
2324
|
+
color: isActive ? "#06C755" : "#666666",
|
|
2325
|
+
align: "end",
|
|
2326
|
+
wrap: true
|
|
2327
|
+
}],
|
|
2328
|
+
width: "65px",
|
|
2329
|
+
justifyContent: "flex-start"
|
|
2330
|
+
};
|
|
2331
|
+
const dotColumn = {
|
|
2332
|
+
type: "box",
|
|
2333
|
+
layout: "vertical",
|
|
2334
|
+
contents: [{
|
|
2335
|
+
type: "box",
|
|
2336
|
+
layout: "vertical",
|
|
2337
|
+
contents: [],
|
|
2338
|
+
width: "10px",
|
|
2339
|
+
height: "10px",
|
|
2340
|
+
backgroundColor: accentColor,
|
|
2341
|
+
cornerRadius: "5px"
|
|
2342
|
+
}],
|
|
2343
|
+
width: "24px",
|
|
2344
|
+
alignItems: "center",
|
|
2345
|
+
justifyContent: "flex-start",
|
|
2346
|
+
paddingTop: "xs"
|
|
2347
|
+
};
|
|
2348
|
+
const detailContents = [{
|
|
2349
|
+
type: "text",
|
|
2350
|
+
text: event.title,
|
|
2351
|
+
size: "md",
|
|
2352
|
+
weight: "bold",
|
|
2353
|
+
color: "#1a1a1a",
|
|
2354
|
+
wrap: true
|
|
2355
|
+
}];
|
|
2356
|
+
const secondaryParts = [];
|
|
2357
|
+
if (event.location) secondaryParts.push(event.location);
|
|
2358
|
+
if (event.calendar) secondaryParts.push(event.calendar);
|
|
2359
|
+
if (secondaryParts.length > 0) detailContents.push({
|
|
2360
|
+
type: "text",
|
|
2361
|
+
text: secondaryParts.join(" · "),
|
|
2362
|
+
size: "xs",
|
|
2363
|
+
color: "#888888",
|
|
2364
|
+
wrap: true,
|
|
2365
|
+
margin: "xs"
|
|
2366
|
+
});
|
|
2367
|
+
return {
|
|
2368
|
+
type: "box",
|
|
2369
|
+
layout: "horizontal",
|
|
2370
|
+
contents: [
|
|
2371
|
+
timeColumn,
|
|
2372
|
+
dotColumn,
|
|
2373
|
+
{
|
|
2374
|
+
type: "box",
|
|
2375
|
+
layout: "vertical",
|
|
2376
|
+
contents: detailContents,
|
|
2377
|
+
flex: 1
|
|
2378
|
+
}
|
|
2379
|
+
],
|
|
2380
|
+
margin: index > 0 ? "xl" : void 0,
|
|
2381
|
+
alignItems: "flex-start"
|
|
2382
|
+
};
|
|
2383
|
+
});
|
|
2384
|
+
return createMegaBubbleWithFooter({
|
|
2385
|
+
bodyContents: [...buildCardHeaderSections(headerContents), {
|
|
2386
|
+
type: "box",
|
|
2387
|
+
layout: "vertical",
|
|
2388
|
+
contents: eventItems,
|
|
2389
|
+
paddingTop: "xl"
|
|
2390
|
+
}],
|
|
2391
|
+
footer
|
|
2392
|
+
});
|
|
2393
|
+
}
|
|
2394
|
+
//#endregion
|
|
2395
|
+
//#region extensions/line/src/flex-templates/media-control-cards.ts
|
|
2396
|
+
/**
|
|
2397
|
+
* Create a media player card for Sonos, Spotify, Apple Music, etc.
|
|
2398
|
+
*
|
|
2399
|
+
* Editorial design: Album art hero with gradient overlay for text,
|
|
2400
|
+
* prominent now-playing indicator, refined playback controls.
|
|
2401
|
+
*/
|
|
2402
|
+
function createMediaPlayerCard(params) {
|
|
2403
|
+
const { title, subtitle, source, imageUrl, isPlaying, progress, controls, extraActions } = params;
|
|
2404
|
+
const trackInfo = [{
|
|
2405
|
+
type: "text",
|
|
2406
|
+
text: title,
|
|
2407
|
+
weight: "bold",
|
|
2408
|
+
size: "xl",
|
|
2409
|
+
color: "#111111",
|
|
2410
|
+
wrap: true
|
|
2411
|
+
}];
|
|
2412
|
+
if (subtitle) trackInfo.push({
|
|
2413
|
+
type: "text",
|
|
2414
|
+
text: subtitle,
|
|
2415
|
+
size: "md",
|
|
2416
|
+
color: "#666666",
|
|
2417
|
+
wrap: true,
|
|
2418
|
+
margin: "sm"
|
|
2419
|
+
});
|
|
2420
|
+
const statusItems = [];
|
|
2421
|
+
if (isPlaying !== void 0) statusItems.push({
|
|
2422
|
+
type: "box",
|
|
2423
|
+
layout: "horizontal",
|
|
2424
|
+
contents: [{
|
|
2425
|
+
type: "box",
|
|
2426
|
+
layout: "vertical",
|
|
2427
|
+
contents: [],
|
|
2428
|
+
width: "8px",
|
|
2429
|
+
height: "8px",
|
|
2430
|
+
backgroundColor: isPlaying ? "#06C755" : "#CCCCCC",
|
|
2431
|
+
cornerRadius: "4px"
|
|
2432
|
+
}, {
|
|
2433
|
+
type: "text",
|
|
2434
|
+
text: isPlaying ? "Now Playing" : "Paused",
|
|
2435
|
+
size: "xs",
|
|
2436
|
+
color: isPlaying ? "#06C755" : "#888888",
|
|
2437
|
+
weight: "bold",
|
|
2438
|
+
margin: "sm"
|
|
2439
|
+
}],
|
|
2440
|
+
alignItems: "center"
|
|
2441
|
+
});
|
|
2442
|
+
if (source) statusItems.push({
|
|
2443
|
+
type: "text",
|
|
2444
|
+
text: source,
|
|
2445
|
+
size: "xs",
|
|
2446
|
+
color: "#AAAAAA",
|
|
2447
|
+
margin: statusItems.length > 0 ? "lg" : void 0
|
|
2448
|
+
});
|
|
2449
|
+
if (progress) statusItems.push({
|
|
2450
|
+
type: "text",
|
|
2451
|
+
text: progress,
|
|
2452
|
+
size: "xs",
|
|
2453
|
+
color: "#888888",
|
|
2454
|
+
align: "end",
|
|
2455
|
+
flex: 1
|
|
2456
|
+
});
|
|
2457
|
+
const bodyContents = [{
|
|
2458
|
+
type: "box",
|
|
2459
|
+
layout: "vertical",
|
|
2460
|
+
contents: trackInfo
|
|
2461
|
+
}];
|
|
2462
|
+
if (statusItems.length > 0) bodyContents.push({
|
|
2463
|
+
type: "box",
|
|
2464
|
+
layout: "horizontal",
|
|
2465
|
+
contents: statusItems,
|
|
2466
|
+
margin: "lg",
|
|
2467
|
+
alignItems: "center"
|
|
2468
|
+
});
|
|
2469
|
+
const bubble = {
|
|
2470
|
+
type: "bubble",
|
|
2471
|
+
size: "mega",
|
|
2472
|
+
body: {
|
|
2473
|
+
type: "box",
|
|
2474
|
+
layout: "vertical",
|
|
2475
|
+
contents: bodyContents,
|
|
2476
|
+
paddingAll: "xl",
|
|
2477
|
+
backgroundColor: "#FFFFFF"
|
|
2478
|
+
}
|
|
2479
|
+
};
|
|
2480
|
+
if (imageUrl) bubble.hero = {
|
|
2481
|
+
type: "image",
|
|
2482
|
+
url: imageUrl,
|
|
2483
|
+
size: "full",
|
|
2484
|
+
aspectRatio: "1:1",
|
|
2485
|
+
aspectMode: "cover"
|
|
2486
|
+
};
|
|
2487
|
+
if (controls || extraActions?.length) {
|
|
2488
|
+
const footerContents = [];
|
|
2489
|
+
if (controls) {
|
|
2490
|
+
const controlButtons = [];
|
|
2491
|
+
if (controls.previous) controlButtons.push({
|
|
2492
|
+
type: "button",
|
|
2493
|
+
action: {
|
|
2494
|
+
type: "postback",
|
|
2495
|
+
label: "⏮",
|
|
2496
|
+
data: controls.previous.data
|
|
2497
|
+
},
|
|
2498
|
+
style: "secondary",
|
|
2499
|
+
flex: 1,
|
|
2500
|
+
height: "sm"
|
|
2501
|
+
});
|
|
2502
|
+
if (controls.play) controlButtons.push({
|
|
2503
|
+
type: "button",
|
|
2504
|
+
action: {
|
|
2505
|
+
type: "postback",
|
|
2506
|
+
label: "▶",
|
|
2507
|
+
data: controls.play.data
|
|
2508
|
+
},
|
|
2509
|
+
style: isPlaying ? "secondary" : "primary",
|
|
2510
|
+
flex: 1,
|
|
2511
|
+
height: "sm",
|
|
2512
|
+
margin: controls.previous ? "md" : void 0
|
|
2513
|
+
});
|
|
2514
|
+
if (controls.pause) controlButtons.push({
|
|
2515
|
+
type: "button",
|
|
2516
|
+
action: {
|
|
2517
|
+
type: "postback",
|
|
2518
|
+
label: "⏸",
|
|
2519
|
+
data: controls.pause.data
|
|
2520
|
+
},
|
|
2521
|
+
style: isPlaying ? "primary" : "secondary",
|
|
2522
|
+
flex: 1,
|
|
2523
|
+
height: "sm",
|
|
2524
|
+
margin: controlButtons.length > 0 ? "md" : void 0
|
|
2525
|
+
});
|
|
2526
|
+
if (controls.next) controlButtons.push({
|
|
2527
|
+
type: "button",
|
|
2528
|
+
action: {
|
|
2529
|
+
type: "postback",
|
|
2530
|
+
label: "⏭",
|
|
2531
|
+
data: controls.next.data
|
|
2532
|
+
},
|
|
2533
|
+
style: "secondary",
|
|
2534
|
+
flex: 1,
|
|
2535
|
+
height: "sm",
|
|
2536
|
+
margin: controlButtons.length > 0 ? "md" : void 0
|
|
2537
|
+
});
|
|
2538
|
+
if (controlButtons.length > 0) footerContents.push({
|
|
2539
|
+
type: "box",
|
|
2540
|
+
layout: "horizontal",
|
|
2541
|
+
contents: controlButtons
|
|
2542
|
+
});
|
|
2543
|
+
}
|
|
2544
|
+
if (extraActions?.length) footerContents.push({
|
|
2545
|
+
type: "box",
|
|
2546
|
+
layout: "horizontal",
|
|
2547
|
+
contents: extraActions.slice(0, 2).map((action, index) => ({
|
|
2548
|
+
type: "button",
|
|
2549
|
+
action: {
|
|
2550
|
+
type: "postback",
|
|
2551
|
+
label: action.label.slice(0, 15),
|
|
2552
|
+
data: action.data
|
|
2553
|
+
},
|
|
2554
|
+
style: "secondary",
|
|
2555
|
+
flex: 1,
|
|
2556
|
+
height: "sm",
|
|
2557
|
+
margin: index > 0 ? "md" : void 0
|
|
2558
|
+
})),
|
|
2559
|
+
margin: "md"
|
|
2560
|
+
});
|
|
2561
|
+
if (footerContents.length > 0) bubble.footer = {
|
|
2562
|
+
type: "box",
|
|
2563
|
+
layout: "vertical",
|
|
2564
|
+
contents: footerContents,
|
|
2565
|
+
paddingAll: "lg",
|
|
2566
|
+
backgroundColor: "#FAFAFA"
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
return bubble;
|
|
2570
|
+
}
|
|
2571
|
+
/**
|
|
2572
|
+
* Create an Apple TV remote card with a D-pad and control rows.
|
|
2573
|
+
*/
|
|
2574
|
+
function createAppleTvRemoteCard(params) {
|
|
2575
|
+
const { deviceName, status, actionData } = params;
|
|
2576
|
+
const headerContents = [{
|
|
2577
|
+
type: "text",
|
|
2578
|
+
text: deviceName,
|
|
2579
|
+
weight: "bold",
|
|
2580
|
+
size: "xl",
|
|
2581
|
+
color: "#111111",
|
|
2582
|
+
wrap: true
|
|
2583
|
+
}];
|
|
2584
|
+
if (status) headerContents.push({
|
|
2585
|
+
type: "text",
|
|
2586
|
+
text: status,
|
|
2587
|
+
size: "sm",
|
|
2588
|
+
color: "#666666",
|
|
2589
|
+
wrap: true,
|
|
2590
|
+
margin: "sm"
|
|
2591
|
+
});
|
|
2592
|
+
const makeButton = (label, data, style = "secondary") => ({
|
|
2593
|
+
type: "button",
|
|
2594
|
+
action: {
|
|
2595
|
+
type: "postback",
|
|
2596
|
+
label,
|
|
2597
|
+
data
|
|
2598
|
+
},
|
|
2599
|
+
style,
|
|
2600
|
+
height: "sm",
|
|
2601
|
+
flex: 1
|
|
2602
|
+
});
|
|
2603
|
+
const dpadRows = [
|
|
2604
|
+
{
|
|
2605
|
+
type: "box",
|
|
2606
|
+
layout: "horizontal",
|
|
2607
|
+
contents: [
|
|
2608
|
+
{ type: "filler" },
|
|
2609
|
+
makeButton("↑", actionData.up),
|
|
2610
|
+
{ type: "filler" }
|
|
2611
|
+
]
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
type: "box",
|
|
2615
|
+
layout: "horizontal",
|
|
2616
|
+
contents: [
|
|
2617
|
+
makeButton("←", actionData.left),
|
|
2618
|
+
makeButton("OK", actionData.select, "primary"),
|
|
2619
|
+
makeButton("→", actionData.right)
|
|
2620
|
+
],
|
|
2621
|
+
margin: "md"
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
type: "box",
|
|
2625
|
+
layout: "horizontal",
|
|
2626
|
+
contents: [
|
|
2627
|
+
{ type: "filler" },
|
|
2628
|
+
makeButton("↓", actionData.down),
|
|
2629
|
+
{ type: "filler" }
|
|
2630
|
+
],
|
|
2631
|
+
margin: "md"
|
|
2632
|
+
}
|
|
2633
|
+
];
|
|
2634
|
+
const menuRow = {
|
|
2635
|
+
type: "box",
|
|
2636
|
+
layout: "horizontal",
|
|
2637
|
+
contents: [makeButton("Menu", actionData.menu), makeButton("Home", actionData.home)],
|
|
2638
|
+
margin: "lg"
|
|
2639
|
+
};
|
|
2640
|
+
const playbackRow = {
|
|
2641
|
+
type: "box",
|
|
2642
|
+
layout: "horizontal",
|
|
2643
|
+
contents: [makeButton("Play", actionData.play), makeButton("Pause", actionData.pause)],
|
|
2644
|
+
margin: "md"
|
|
2645
|
+
};
|
|
2646
|
+
const volumeRow = {
|
|
2647
|
+
type: "box",
|
|
2648
|
+
layout: "horizontal",
|
|
2649
|
+
contents: [
|
|
2650
|
+
makeButton("Vol +", actionData.volumeUp),
|
|
2651
|
+
makeButton("Mute", actionData.mute),
|
|
2652
|
+
makeButton("Vol -", actionData.volumeDown)
|
|
2653
|
+
],
|
|
2654
|
+
margin: "md"
|
|
2655
|
+
};
|
|
2656
|
+
return {
|
|
2657
|
+
type: "bubble",
|
|
2658
|
+
size: "mega",
|
|
2659
|
+
body: {
|
|
2660
|
+
type: "box",
|
|
2661
|
+
layout: "vertical",
|
|
2662
|
+
contents: [
|
|
2663
|
+
{
|
|
2664
|
+
type: "box",
|
|
2665
|
+
layout: "vertical",
|
|
2666
|
+
contents: headerContents
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
type: "separator",
|
|
2670
|
+
margin: "lg",
|
|
2671
|
+
color: "#EEEEEE"
|
|
2672
|
+
},
|
|
2673
|
+
...dpadRows,
|
|
2674
|
+
menuRow,
|
|
2675
|
+
playbackRow,
|
|
2676
|
+
volumeRow
|
|
2677
|
+
],
|
|
2678
|
+
paddingAll: "xl",
|
|
2679
|
+
backgroundColor: "#FFFFFF"
|
|
2680
|
+
}
|
|
2681
|
+
};
|
|
2682
|
+
}
|
|
2683
|
+
/**
|
|
2684
|
+
* Create a device control card for Apple TV, smart home devices, etc.
|
|
2685
|
+
*
|
|
2686
|
+
* Editorial design: Device-focused header with status indicator,
|
|
2687
|
+
* clean control grid with clear visual hierarchy.
|
|
2688
|
+
*/
|
|
2689
|
+
function createDeviceControlCard(params) {
|
|
2690
|
+
const { deviceName, deviceType, status, isOnline, imageUrl, controls } = params;
|
|
2691
|
+
const headerContents = [{
|
|
2692
|
+
type: "box",
|
|
2693
|
+
layout: "horizontal",
|
|
2694
|
+
contents: [{
|
|
2695
|
+
type: "box",
|
|
2696
|
+
layout: "vertical",
|
|
2697
|
+
contents: [],
|
|
2698
|
+
width: "10px",
|
|
2699
|
+
height: "10px",
|
|
2700
|
+
backgroundColor: isOnline !== false ? "#06C755" : "#FF5555",
|
|
2701
|
+
cornerRadius: "5px"
|
|
2702
|
+
}, {
|
|
2703
|
+
type: "text",
|
|
2704
|
+
text: deviceName,
|
|
2705
|
+
weight: "bold",
|
|
2706
|
+
size: "xl",
|
|
2707
|
+
color: "#111111",
|
|
2708
|
+
wrap: true,
|
|
2709
|
+
flex: 1,
|
|
2710
|
+
margin: "md"
|
|
2711
|
+
}],
|
|
2712
|
+
alignItems: "center"
|
|
2713
|
+
}];
|
|
2714
|
+
if (deviceType) headerContents.push({
|
|
2715
|
+
type: "text",
|
|
2716
|
+
text: deviceType,
|
|
2717
|
+
size: "sm",
|
|
2718
|
+
color: "#888888",
|
|
2719
|
+
margin: "sm"
|
|
2720
|
+
});
|
|
2721
|
+
if (status) headerContents.push({
|
|
2722
|
+
type: "box",
|
|
2723
|
+
layout: "vertical",
|
|
2724
|
+
contents: [{
|
|
2725
|
+
type: "text",
|
|
2726
|
+
text: status,
|
|
2727
|
+
size: "sm",
|
|
2728
|
+
color: "#444444",
|
|
2729
|
+
wrap: true
|
|
2730
|
+
}],
|
|
2731
|
+
margin: "lg",
|
|
2732
|
+
paddingAll: "md",
|
|
2733
|
+
backgroundColor: "#F8F9FA",
|
|
2734
|
+
cornerRadius: "md"
|
|
2735
|
+
});
|
|
2736
|
+
const bubble = {
|
|
2737
|
+
type: "bubble",
|
|
2738
|
+
size: "mega",
|
|
2739
|
+
body: {
|
|
2740
|
+
type: "box",
|
|
2741
|
+
layout: "vertical",
|
|
2742
|
+
contents: headerContents,
|
|
2743
|
+
paddingAll: "xl",
|
|
2744
|
+
backgroundColor: "#FFFFFF"
|
|
2745
|
+
}
|
|
2746
|
+
};
|
|
2747
|
+
if (imageUrl) bubble.hero = {
|
|
2748
|
+
type: "image",
|
|
2749
|
+
url: imageUrl,
|
|
2750
|
+
size: "full",
|
|
2751
|
+
aspectRatio: "16:9",
|
|
2752
|
+
aspectMode: "cover"
|
|
2753
|
+
};
|
|
2754
|
+
if (controls.length > 0) {
|
|
2755
|
+
const rows = [];
|
|
2756
|
+
const limitedControls = controls.slice(0, 6);
|
|
2757
|
+
for (let i = 0; i < limitedControls.length; i += 2) {
|
|
2758
|
+
const rowButtons = [];
|
|
2759
|
+
for (let j = i; j < Math.min(i + 2, limitedControls.length); j++) {
|
|
2760
|
+
const ctrl = limitedControls[j];
|
|
2761
|
+
const buttonLabel = ctrl.icon ? `${ctrl.icon} ${ctrl.label}` : ctrl.label;
|
|
2762
|
+
rowButtons.push({
|
|
2763
|
+
type: "button",
|
|
2764
|
+
action: {
|
|
2765
|
+
type: "postback",
|
|
2766
|
+
label: buttonLabel.slice(0, 18),
|
|
2767
|
+
data: ctrl.data
|
|
2768
|
+
},
|
|
2769
|
+
style: ctrl.style ?? "secondary",
|
|
2770
|
+
flex: 1,
|
|
2771
|
+
height: "sm",
|
|
2772
|
+
margin: j > i ? "md" : void 0
|
|
2773
|
+
});
|
|
2774
|
+
}
|
|
2775
|
+
if (rowButtons.length === 1) rowButtons.push({ type: "filler" });
|
|
2776
|
+
rows.push({
|
|
2777
|
+
type: "box",
|
|
2778
|
+
layout: "horizontal",
|
|
2779
|
+
contents: rowButtons,
|
|
2780
|
+
margin: i > 0 ? "md" : void 0
|
|
2781
|
+
});
|
|
2782
|
+
}
|
|
2783
|
+
bubble.footer = {
|
|
2784
|
+
type: "box",
|
|
2785
|
+
layout: "vertical",
|
|
2786
|
+
contents: rows,
|
|
2787
|
+
paddingAll: "lg",
|
|
2788
|
+
backgroundColor: "#FAFAFA"
|
|
2789
|
+
};
|
|
2790
|
+
}
|
|
2791
|
+
return bubble;
|
|
2792
|
+
}
|
|
2793
|
+
//#endregion
|
|
2794
|
+
//#region extensions/line/src/flex-templates/message.ts
|
|
2795
|
+
/**
|
|
2796
|
+
* Wrap a FlexContainer in a FlexMessage
|
|
2797
|
+
*/
|
|
2798
|
+
function toFlexMessage(altText, contents) {
|
|
2799
|
+
return {
|
|
2800
|
+
type: "flex",
|
|
2801
|
+
altText,
|
|
2802
|
+
contents
|
|
2803
|
+
};
|
|
2804
|
+
}
|
|
2805
|
+
//#endregion
|
|
2806
|
+
//#region extensions/line/src/markdown-to-line.ts
|
|
2807
|
+
/**
|
|
2808
|
+
* Regex patterns for markdown detection
|
|
2809
|
+
*/
|
|
2810
|
+
const MARKDOWN_TABLE_REGEX = /^\|(.+)\|[\r\n]+\|[-:\s|]+\|[\r\n]+((?:\|.+\|[\r\n]*)+)/gm;
|
|
2811
|
+
const MARKDOWN_CODE_BLOCK_REGEX = /```(\w*)\n([\s\S]*?)```/g;
|
|
2812
|
+
const MARKDOWN_LINK_REGEX = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
2813
|
+
/**
|
|
2814
|
+
* Detect and extract markdown tables from text
|
|
2815
|
+
*/
|
|
2816
|
+
function extractMarkdownTables(text) {
|
|
2817
|
+
const tables = [];
|
|
2818
|
+
let textWithoutTables = text;
|
|
2819
|
+
MARKDOWN_TABLE_REGEX.lastIndex = 0;
|
|
2820
|
+
let match;
|
|
2821
|
+
const matches = [];
|
|
2822
|
+
while ((match = MARKDOWN_TABLE_REGEX.exec(text)) !== null) {
|
|
2823
|
+
const fullMatch = match[0];
|
|
2824
|
+
const headerLine = match[1];
|
|
2825
|
+
const bodyLines = match[2];
|
|
2826
|
+
const headers = parseTableRow(headerLine);
|
|
2827
|
+
const rows = bodyLines.trim().split(/[\r\n]+/).filter((line) => line.trim()).map(parseTableRow);
|
|
2828
|
+
if (headers.length > 0 && rows.length > 0) matches.push({
|
|
2829
|
+
fullMatch,
|
|
2830
|
+
table: {
|
|
2831
|
+
headers,
|
|
2832
|
+
rows
|
|
2833
|
+
}
|
|
2834
|
+
});
|
|
2835
|
+
}
|
|
2836
|
+
for (let i = matches.length - 1; i >= 0; i--) {
|
|
2837
|
+
const { fullMatch, table } = matches[i];
|
|
2838
|
+
tables.unshift(table);
|
|
2839
|
+
textWithoutTables = textWithoutTables.replace(fullMatch, "");
|
|
2840
|
+
}
|
|
2841
|
+
return {
|
|
2842
|
+
tables,
|
|
2843
|
+
textWithoutTables
|
|
2844
|
+
};
|
|
2845
|
+
}
|
|
2846
|
+
/**
|
|
2847
|
+
* Parse a single table row (pipe-separated values)
|
|
2848
|
+
*/
|
|
2849
|
+
function parseTableRow(row) {
|
|
2850
|
+
return row.split("|").map((cell) => cell.trim()).filter((cell, index, arr) => {
|
|
2851
|
+
if (index === 0 && cell === "") return false;
|
|
2852
|
+
if (index === arr.length - 1 && cell === "") return false;
|
|
2853
|
+
return true;
|
|
2854
|
+
});
|
|
2855
|
+
}
|
|
2856
|
+
/**
|
|
2857
|
+
* Convert a markdown table to a LINE Flex Message bubble
|
|
2858
|
+
*/
|
|
2859
|
+
function convertTableToFlexBubble(table) {
|
|
2860
|
+
const parseCell = (value) => {
|
|
2861
|
+
const raw = value?.trim() ?? "";
|
|
2862
|
+
if (!raw) return {
|
|
2863
|
+
text: "-",
|
|
2864
|
+
bold: false,
|
|
2865
|
+
hasMarkup: false
|
|
2866
|
+
};
|
|
2867
|
+
let hasMarkup = false;
|
|
2868
|
+
return {
|
|
2869
|
+
text: raw.replace(/\*\*(.+?)\*\*/g, (_, inner) => {
|
|
2870
|
+
hasMarkup = true;
|
|
2871
|
+
return String(inner);
|
|
2872
|
+
}).trim() || "-",
|
|
2873
|
+
bold: /^\*\*.+\*\*$/.test(raw),
|
|
2874
|
+
hasMarkup
|
|
2875
|
+
};
|
|
2876
|
+
};
|
|
2877
|
+
const headerCells = table.headers.map((header) => parseCell(header));
|
|
2878
|
+
const rowCells = table.rows.map((row) => row.map((cell) => parseCell(cell)));
|
|
2879
|
+
const hasInlineMarkup = headerCells.some((cell) => cell.hasMarkup) || rowCells.some((row) => row.some((cell) => cell.hasMarkup));
|
|
2880
|
+
if (table.headers.length === 2 && !hasInlineMarkup) {
|
|
2881
|
+
const items = rowCells.map((row) => ({
|
|
2882
|
+
name: row[0]?.text ?? "-",
|
|
2883
|
+
value: row[1]?.text ?? "-"
|
|
2884
|
+
}));
|
|
2885
|
+
return createReceiptCard({
|
|
2886
|
+
title: headerCells.map((cell) => cell.text).join(" / "),
|
|
2887
|
+
items
|
|
2888
|
+
});
|
|
2889
|
+
}
|
|
2890
|
+
return {
|
|
2891
|
+
type: "bubble",
|
|
2892
|
+
body: {
|
|
2893
|
+
type: "box",
|
|
2894
|
+
layout: "vertical",
|
|
2895
|
+
contents: [
|
|
2896
|
+
{
|
|
2897
|
+
type: "box",
|
|
2898
|
+
layout: "horizontal",
|
|
2899
|
+
contents: headerCells.map((cell) => ({
|
|
2900
|
+
type: "text",
|
|
2901
|
+
text: cell.text,
|
|
2902
|
+
weight: "bold",
|
|
2903
|
+
size: "sm",
|
|
2904
|
+
color: "#333333",
|
|
2905
|
+
flex: 1,
|
|
2906
|
+
wrap: true
|
|
2907
|
+
})),
|
|
2908
|
+
paddingBottom: "sm"
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
type: "separator",
|
|
2912
|
+
margin: "sm"
|
|
2913
|
+
},
|
|
2914
|
+
...rowCells.slice(0, 10).map((row, rowIndex) => {
|
|
2915
|
+
return {
|
|
2916
|
+
type: "box",
|
|
2917
|
+
layout: "horizontal",
|
|
2918
|
+
contents: table.headers.map((_, colIndex) => {
|
|
2919
|
+
const cell = row[colIndex] ?? {
|
|
2920
|
+
text: "-",
|
|
2921
|
+
bold: false,
|
|
2922
|
+
hasMarkup: false
|
|
2923
|
+
};
|
|
2924
|
+
return {
|
|
2925
|
+
type: "text",
|
|
2926
|
+
text: cell.text,
|
|
2927
|
+
size: "sm",
|
|
2928
|
+
color: "#666666",
|
|
2929
|
+
flex: 1,
|
|
2930
|
+
wrap: true,
|
|
2931
|
+
weight: cell.bold ? "bold" : void 0
|
|
2932
|
+
};
|
|
2933
|
+
}),
|
|
2934
|
+
margin: rowIndex === 0 ? "md" : "sm"
|
|
2935
|
+
};
|
|
2936
|
+
})
|
|
2937
|
+
],
|
|
2938
|
+
paddingAll: "lg"
|
|
2939
|
+
}
|
|
2940
|
+
};
|
|
2941
|
+
}
|
|
2942
|
+
/**
|
|
2943
|
+
* Detect and extract code blocks from text
|
|
2944
|
+
*/
|
|
2945
|
+
function extractCodeBlocks(text) {
|
|
2946
|
+
const codeBlocks = [];
|
|
2947
|
+
let textWithoutCode = text;
|
|
2948
|
+
MARKDOWN_CODE_BLOCK_REGEX.lastIndex = 0;
|
|
2949
|
+
let match;
|
|
2950
|
+
const matches = [];
|
|
2951
|
+
while ((match = MARKDOWN_CODE_BLOCK_REGEX.exec(text)) !== null) {
|
|
2952
|
+
const fullMatch = match[0];
|
|
2953
|
+
const language = match[1] || void 0;
|
|
2954
|
+
const code = match[2];
|
|
2955
|
+
matches.push({
|
|
2956
|
+
fullMatch,
|
|
2957
|
+
block: {
|
|
2958
|
+
language,
|
|
2959
|
+
code: code.trim()
|
|
2960
|
+
}
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
for (let i = matches.length - 1; i >= 0; i--) {
|
|
2964
|
+
const { fullMatch, block } = matches[i];
|
|
2965
|
+
codeBlocks.unshift(block);
|
|
2966
|
+
textWithoutCode = textWithoutCode.replace(fullMatch, "");
|
|
2967
|
+
}
|
|
2968
|
+
return {
|
|
2969
|
+
codeBlocks,
|
|
2970
|
+
textWithoutCode
|
|
2971
|
+
};
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* Convert a code block to a LINE Flex Message bubble
|
|
2975
|
+
*/
|
|
2976
|
+
function convertCodeBlockToFlexBubble(block) {
|
|
2977
|
+
const titleText = block.language ? `Code (${block.language})` : "Code";
|
|
2978
|
+
const displayCode = block.code.length > 2e3 ? block.code.slice(0, 2e3) + "\n..." : block.code;
|
|
2979
|
+
return {
|
|
2980
|
+
type: "bubble",
|
|
2981
|
+
body: {
|
|
2982
|
+
type: "box",
|
|
2983
|
+
layout: "vertical",
|
|
2984
|
+
contents: [{
|
|
2985
|
+
type: "text",
|
|
2986
|
+
text: titleText,
|
|
2987
|
+
weight: "bold",
|
|
2988
|
+
size: "sm",
|
|
2989
|
+
color: "#666666"
|
|
2990
|
+
}, {
|
|
2991
|
+
type: "box",
|
|
2992
|
+
layout: "vertical",
|
|
2993
|
+
contents: [{
|
|
2994
|
+
type: "text",
|
|
2995
|
+
text: displayCode,
|
|
2996
|
+
size: "xs",
|
|
2997
|
+
color: "#333333",
|
|
2998
|
+
wrap: true
|
|
2999
|
+
}],
|
|
3000
|
+
backgroundColor: "#F5F5F5",
|
|
3001
|
+
paddingAll: "md",
|
|
3002
|
+
cornerRadius: "md",
|
|
3003
|
+
margin: "sm"
|
|
3004
|
+
}],
|
|
3005
|
+
paddingAll: "lg"
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Extract markdown links from text
|
|
3011
|
+
*/
|
|
3012
|
+
function extractLinks(text) {
|
|
3013
|
+
const links = [];
|
|
3014
|
+
MARKDOWN_LINK_REGEX.lastIndex = 0;
|
|
3015
|
+
let match;
|
|
3016
|
+
while ((match = MARKDOWN_LINK_REGEX.exec(text)) !== null) links.push({
|
|
3017
|
+
text: match[1],
|
|
3018
|
+
url: match[2]
|
|
3019
|
+
});
|
|
3020
|
+
return {
|
|
3021
|
+
links,
|
|
3022
|
+
textWithLinks: text.replace(MARKDOWN_LINK_REGEX, "$1")
|
|
3023
|
+
};
|
|
3024
|
+
}
|
|
3025
|
+
/**
|
|
3026
|
+
* Create a Flex Message with tappable link buttons
|
|
3027
|
+
*/
|
|
3028
|
+
function convertLinksToFlexBubble(links) {
|
|
3029
|
+
return {
|
|
3030
|
+
type: "bubble",
|
|
3031
|
+
body: {
|
|
3032
|
+
type: "box",
|
|
3033
|
+
layout: "vertical",
|
|
3034
|
+
contents: [{
|
|
3035
|
+
type: "text",
|
|
3036
|
+
text: "Links",
|
|
3037
|
+
weight: "bold",
|
|
3038
|
+
size: "md",
|
|
3039
|
+
color: "#333333"
|
|
3040
|
+
}],
|
|
3041
|
+
paddingAll: "lg",
|
|
3042
|
+
paddingBottom: "sm"
|
|
3043
|
+
},
|
|
3044
|
+
footer: {
|
|
3045
|
+
type: "box",
|
|
3046
|
+
layout: "vertical",
|
|
3047
|
+
contents: links.slice(0, 4).map((link, index) => ({
|
|
3048
|
+
type: "button",
|
|
3049
|
+
action: {
|
|
3050
|
+
type: "uri",
|
|
3051
|
+
label: link.text.slice(0, 20),
|
|
3052
|
+
uri: link.url
|
|
3053
|
+
},
|
|
3054
|
+
style: index === 0 ? "primary" : "secondary",
|
|
3055
|
+
margin: index > 0 ? "sm" : void 0
|
|
3056
|
+
})),
|
|
3057
|
+
paddingAll: "md"
|
|
3058
|
+
}
|
|
3059
|
+
};
|
|
3060
|
+
}
|
|
3061
|
+
/**
|
|
3062
|
+
* Main function: Process text for LINE output
|
|
3063
|
+
* - Extracts tables → Flex Messages
|
|
3064
|
+
* - Extracts code blocks → Flex Messages
|
|
3065
|
+
* - Strips remaining markdown
|
|
3066
|
+
* - Returns processed text + Flex Messages
|
|
3067
|
+
*/
|
|
3068
|
+
function processLineMessage(text) {
|
|
3069
|
+
const flexMessages = [];
|
|
3070
|
+
let processedText = text;
|
|
3071
|
+
const { tables, textWithoutTables } = extractMarkdownTables(processedText);
|
|
3072
|
+
processedText = textWithoutTables;
|
|
3073
|
+
for (const table of tables) {
|
|
3074
|
+
const bubble = convertTableToFlexBubble(table);
|
|
3075
|
+
flexMessages.push(toFlexMessage("Table", bubble));
|
|
3076
|
+
}
|
|
3077
|
+
const { codeBlocks, textWithoutCode } = extractCodeBlocks(processedText);
|
|
3078
|
+
processedText = textWithoutCode;
|
|
3079
|
+
for (const block of codeBlocks) {
|
|
3080
|
+
const bubble = convertCodeBlockToFlexBubble(block);
|
|
3081
|
+
flexMessages.push(toFlexMessage("Code", bubble));
|
|
3082
|
+
}
|
|
3083
|
+
const { textWithLinks } = extractLinks(processedText);
|
|
3084
|
+
processedText = textWithLinks;
|
|
3085
|
+
processedText = stripMarkdown(processedText);
|
|
3086
|
+
return {
|
|
3087
|
+
text: processedText,
|
|
3088
|
+
flexMessages
|
|
3089
|
+
};
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3092
|
+
* Check if text contains markdown that needs conversion
|
|
3093
|
+
*/
|
|
3094
|
+
function hasMarkdownToConvert(text) {
|
|
3095
|
+
MARKDOWN_TABLE_REGEX.lastIndex = 0;
|
|
3096
|
+
if (MARKDOWN_TABLE_REGEX.test(text)) return true;
|
|
3097
|
+
MARKDOWN_CODE_BLOCK_REGEX.lastIndex = 0;
|
|
3098
|
+
if (MARKDOWN_CODE_BLOCK_REGEX.test(text)) return true;
|
|
3099
|
+
if (/\*\*[^*]+\*\*/.test(text)) return true;
|
|
3100
|
+
if (/~~[^~]+~~/.test(text)) return true;
|
|
3101
|
+
if (/^#{1,6}\s+/m.test(text)) return true;
|
|
3102
|
+
if (/^>\s+/m.test(text)) return true;
|
|
3103
|
+
return false;
|
|
3104
|
+
}
|
|
3105
|
+
//#endregion
|
|
3106
|
+
//#region extensions/line/src/reply-chunks.ts
|
|
3107
|
+
async function sendLineReplyChunks(params) {
|
|
3108
|
+
const hasQuickReplies = Boolean(params.quickReplies?.length);
|
|
3109
|
+
let replyTokenUsed = Boolean(params.replyTokenUsed);
|
|
3110
|
+
if (params.chunks.length === 0) return { replyTokenUsed };
|
|
3111
|
+
if (params.replyToken && !replyTokenUsed) try {
|
|
3112
|
+
const replyBatch = params.chunks.slice(0, 5);
|
|
3113
|
+
const remaining = params.chunks.slice(replyBatch.length);
|
|
3114
|
+
const replyMessages = replyBatch.map((chunk) => ({
|
|
3115
|
+
type: "text",
|
|
3116
|
+
text: chunk
|
|
3117
|
+
}));
|
|
3118
|
+
if (hasQuickReplies && remaining.length === 0 && replyMessages.length > 0) {
|
|
3119
|
+
const lastIndex = replyMessages.length - 1;
|
|
3120
|
+
replyMessages[lastIndex] = params.createTextMessageWithQuickReplies(replyBatch[lastIndex], params.quickReplies);
|
|
3121
|
+
}
|
|
3122
|
+
await params.replyMessageLine(params.replyToken, replyMessages, { accountId: params.accountId });
|
|
3123
|
+
replyTokenUsed = true;
|
|
3124
|
+
for (let i = 0; i < remaining.length; i += 1) if (i === remaining.length - 1 && hasQuickReplies) await params.pushTextMessageWithQuickReplies(params.to, remaining[i], params.quickReplies, { accountId: params.accountId });
|
|
3125
|
+
else await params.pushMessageLine(params.to, remaining[i], { accountId: params.accountId });
|
|
3126
|
+
return { replyTokenUsed };
|
|
3127
|
+
} catch (err) {
|
|
3128
|
+
params.onReplyError?.(err);
|
|
3129
|
+
replyTokenUsed = true;
|
|
3130
|
+
}
|
|
3131
|
+
for (let i = 0; i < params.chunks.length; i += 1) if (i === params.chunks.length - 1 && hasQuickReplies) await params.pushTextMessageWithQuickReplies(params.to, params.chunks[i], params.quickReplies, { accountId: params.accountId });
|
|
3132
|
+
else await params.pushMessageLine(params.to, params.chunks[i], { accountId: params.accountId });
|
|
3133
|
+
return { replyTokenUsed };
|
|
3134
|
+
}
|
|
3135
|
+
//#endregion
|
|
3136
|
+
//#region extensions/line/src/webhook-node.ts
|
|
3137
|
+
const LINE_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
3138
|
+
const LINE_WEBHOOK_PREAUTH_MAX_BODY_BYTES = 64 * 1024;
|
|
3139
|
+
const LINE_WEBHOOK_PREAUTH_BODY_TIMEOUT_MS = 5e3;
|
|
3140
|
+
async function readLineWebhookRequestBody(req, maxBytes = LINE_WEBHOOK_MAX_BODY_BYTES, timeoutMs = LINE_WEBHOOK_PREAUTH_BODY_TIMEOUT_MS) {
|
|
3141
|
+
return await readRequestBodyWithLimit(req, {
|
|
3142
|
+
maxBytes,
|
|
3143
|
+
timeoutMs
|
|
3144
|
+
});
|
|
3145
|
+
}
|
|
3146
|
+
function createLineNodeWebhookHandler(params) {
|
|
3147
|
+
const maxBodyBytes = params.maxBodyBytes ?? LINE_WEBHOOK_MAX_BODY_BYTES;
|
|
3148
|
+
const readBody = params.readBody ?? readLineWebhookRequestBody;
|
|
3149
|
+
return async (req, res) => {
|
|
3150
|
+
if (req.method === "GET" || req.method === "HEAD") {
|
|
3151
|
+
if (req.method === "HEAD") {
|
|
3152
|
+
res.statusCode = 204;
|
|
3153
|
+
res.end();
|
|
3154
|
+
return;
|
|
3155
|
+
}
|
|
3156
|
+
res.statusCode = 200;
|
|
3157
|
+
res.setHeader("Content-Type", "text/plain");
|
|
3158
|
+
res.end("OK");
|
|
3159
|
+
return;
|
|
3160
|
+
}
|
|
3161
|
+
if (req.method !== "POST") {
|
|
3162
|
+
res.statusCode = 405;
|
|
3163
|
+
res.setHeader("Allow", "GET, HEAD, POST");
|
|
3164
|
+
res.setHeader("Content-Type", "application/json");
|
|
3165
|
+
res.end(JSON.stringify({ error: "Method Not Allowed" }));
|
|
3166
|
+
return;
|
|
3167
|
+
}
|
|
3168
|
+
try {
|
|
3169
|
+
const signatureHeader = req.headers["x-line-signature"];
|
|
3170
|
+
const signature = typeof signatureHeader === "string" ? signatureHeader.trim() : Array.isArray(signatureHeader) ? (signatureHeader[0] ?? "").trim() : "";
|
|
3171
|
+
if (!signature) {
|
|
3172
|
+
logVerbose("line: webhook missing X-Line-Signature header");
|
|
3173
|
+
res.statusCode = 400;
|
|
3174
|
+
res.setHeader("Content-Type", "application/json");
|
|
3175
|
+
res.end(JSON.stringify({ error: "Missing X-Line-Signature header" }));
|
|
3176
|
+
return;
|
|
3177
|
+
}
|
|
3178
|
+
const rawBody = await readBody(req, Math.min(maxBodyBytes, LINE_WEBHOOK_PREAUTH_MAX_BODY_BYTES), LINE_WEBHOOK_PREAUTH_BODY_TIMEOUT_MS);
|
|
3179
|
+
if (!validateLineSignature(rawBody, signature, params.channelSecret)) {
|
|
3180
|
+
logVerbose("line: webhook signature validation failed");
|
|
3181
|
+
res.statusCode = 401;
|
|
3182
|
+
res.setHeader("Content-Type", "application/json");
|
|
3183
|
+
res.end(JSON.stringify({ error: "Invalid signature" }));
|
|
3184
|
+
return;
|
|
3185
|
+
}
|
|
3186
|
+
const body = parseLineWebhookBody(rawBody);
|
|
3187
|
+
if (!body) {
|
|
3188
|
+
res.statusCode = 400;
|
|
3189
|
+
res.setHeader("Content-Type", "application/json");
|
|
3190
|
+
res.end(JSON.stringify({ error: "Invalid webhook payload" }));
|
|
3191
|
+
return;
|
|
3192
|
+
}
|
|
3193
|
+
params.onRequestAuthenticated?.();
|
|
3194
|
+
if (body.events && body.events.length > 0) {
|
|
3195
|
+
logVerbose(`line: received ${body.events.length} webhook events`);
|
|
3196
|
+
await params.bot.handleWebhook(body);
|
|
3197
|
+
}
|
|
3198
|
+
res.statusCode = 200;
|
|
3199
|
+
res.setHeader("Content-Type", "application/json");
|
|
3200
|
+
res.end(JSON.stringify({ status: "ok" }));
|
|
3201
|
+
} catch (err) {
|
|
3202
|
+
if (isRequestBodyLimitError(err, "PAYLOAD_TOO_LARGE")) {
|
|
3203
|
+
res.statusCode = 413;
|
|
3204
|
+
res.setHeader("Content-Type", "application/json");
|
|
3205
|
+
res.end(JSON.stringify({ error: "Payload too large" }));
|
|
3206
|
+
return;
|
|
3207
|
+
}
|
|
3208
|
+
if (isRequestBodyLimitError(err, "REQUEST_BODY_TIMEOUT")) {
|
|
3209
|
+
res.statusCode = 408;
|
|
3210
|
+
res.setHeader("Content-Type", "application/json");
|
|
3211
|
+
res.end(JSON.stringify({ error: requestBodyErrorToText("REQUEST_BODY_TIMEOUT") }));
|
|
3212
|
+
return;
|
|
3213
|
+
}
|
|
3214
|
+
params.runtime.error?.(danger(`line webhook error: ${String(err)}`));
|
|
3215
|
+
if (!res.headersSent) {
|
|
3216
|
+
res.statusCode = 500;
|
|
3217
|
+
res.setHeader("Content-Type", "application/json");
|
|
3218
|
+
res.end(JSON.stringify({ error: "Internal server error" }));
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
};
|
|
3222
|
+
}
|
|
3223
|
+
//#endregion
|
|
3224
|
+
//#region extensions/line/src/monitor.ts
|
|
3225
|
+
const runtimeState = /* @__PURE__ */ new Map();
|
|
3226
|
+
const lineWebhookInFlightLimiter = createWebhookInFlightLimiter();
|
|
3227
|
+
function recordChannelRuntimeState(params) {
|
|
3228
|
+
const key = `${params.channel}:${params.accountId}`;
|
|
3229
|
+
const existing = runtimeState.get(key) ?? {
|
|
3230
|
+
running: false,
|
|
3231
|
+
lastStartAt: null,
|
|
3232
|
+
lastStopAt: null,
|
|
3233
|
+
lastError: null
|
|
3234
|
+
};
|
|
3235
|
+
runtimeState.set(key, {
|
|
3236
|
+
...existing,
|
|
3237
|
+
...params.state
|
|
3238
|
+
});
|
|
3239
|
+
}
|
|
3240
|
+
function startLineLoadingKeepalive(params) {
|
|
3241
|
+
const intervalMs = params.intervalMs ?? 18e3;
|
|
3242
|
+
const loadingSeconds = params.loadingSeconds ?? 20;
|
|
3243
|
+
let stopped = false;
|
|
3244
|
+
const trigger = () => {
|
|
3245
|
+
if (stopped) return;
|
|
3246
|
+
showLoadingAnimation(params.userId, {
|
|
3247
|
+
accountId: params.accountId,
|
|
3248
|
+
loadingSeconds
|
|
3249
|
+
}).catch(() => {});
|
|
3250
|
+
};
|
|
3251
|
+
trigger();
|
|
3252
|
+
const timer = setInterval(trigger, intervalMs);
|
|
3253
|
+
return () => {
|
|
3254
|
+
if (stopped) return;
|
|
3255
|
+
stopped = true;
|
|
3256
|
+
clearInterval(timer);
|
|
3257
|
+
};
|
|
3258
|
+
}
|
|
3259
|
+
async function monitorLineProvider(opts) {
|
|
3260
|
+
const { channelAccessToken, channelSecret, accountId, config, runtime, abortSignal, webhookPath } = opts;
|
|
3261
|
+
const resolvedAccountId = accountId ?? "default";
|
|
3262
|
+
const token = channelAccessToken.trim();
|
|
3263
|
+
const secret = channelSecret.trim();
|
|
3264
|
+
if (!token) throw new Error("LINE webhook mode requires a non-empty channel access token.");
|
|
3265
|
+
if (!secret) throw new Error("LINE webhook mode requires a non-empty channel secret.");
|
|
3266
|
+
recordChannelRuntimeState({
|
|
3267
|
+
channel: "line",
|
|
3268
|
+
accountId: resolvedAccountId,
|
|
3269
|
+
state: {
|
|
3270
|
+
running: true,
|
|
3271
|
+
lastStartAt: Date.now()
|
|
3272
|
+
}
|
|
3273
|
+
});
|
|
3274
|
+
const bot = createLineBot({
|
|
3275
|
+
channelAccessToken: token,
|
|
3276
|
+
channelSecret: secret,
|
|
3277
|
+
accountId,
|
|
3278
|
+
runtime,
|
|
3279
|
+
config,
|
|
3280
|
+
onMessage: async (ctx) => {
|
|
3281
|
+
if (!ctx) return;
|
|
3282
|
+
const { ctxPayload, replyToken, route } = ctx;
|
|
3283
|
+
recordChannelRuntimeState({
|
|
3284
|
+
channel: "line",
|
|
3285
|
+
accountId: resolvedAccountId,
|
|
3286
|
+
state: { lastInboundAt: Date.now() }
|
|
3287
|
+
});
|
|
3288
|
+
const shouldShowLoading = Boolean(ctx.userId && !ctx.isGroup);
|
|
3289
|
+
const displayNamePromise = ctx.userId ? getUserDisplayName(ctx.userId, { accountId: ctx.accountId }) : Promise.resolve(ctxPayload.From);
|
|
3290
|
+
const stopLoading = shouldShowLoading ? startLineLoadingKeepalive({
|
|
3291
|
+
userId: ctx.userId,
|
|
3292
|
+
accountId: ctx.accountId
|
|
3293
|
+
}) : null;
|
|
3294
|
+
logVerbose(`line: received message from ${await displayNamePromise} (${ctxPayload.From})`);
|
|
3295
|
+
try {
|
|
3296
|
+
const textLimit = 5e3;
|
|
3297
|
+
let replyTokenUsed = false;
|
|
3298
|
+
const { onModelSelected, ...replyPipeline } = createChannelReplyPipeline({
|
|
3299
|
+
cfg: config,
|
|
3300
|
+
agentId: route.agentId,
|
|
3301
|
+
channel: "line",
|
|
3302
|
+
accountId: route.accountId
|
|
3303
|
+
});
|
|
3304
|
+
const { queuedFinal } = await dispatchReplyWithBufferedBlockDispatcher({
|
|
3305
|
+
ctx: ctxPayload,
|
|
3306
|
+
cfg: config,
|
|
3307
|
+
dispatcherOptions: {
|
|
3308
|
+
...replyPipeline,
|
|
3309
|
+
deliver: async (payload, _info) => {
|
|
3310
|
+
const lineData = payload.channelData?.line ?? {};
|
|
3311
|
+
if (ctx.userId && !ctx.isGroup) showLoadingAnimation(ctx.userId, { accountId: ctx.accountId }).catch(() => {});
|
|
3312
|
+
const { replyTokenUsed: nextReplyTokenUsed } = await deliverLineAutoReply({
|
|
3313
|
+
payload,
|
|
3314
|
+
lineData,
|
|
3315
|
+
to: ctxPayload.From,
|
|
3316
|
+
replyToken,
|
|
3317
|
+
replyTokenUsed,
|
|
3318
|
+
accountId: ctx.accountId,
|
|
3319
|
+
textLimit,
|
|
3320
|
+
deps: {
|
|
3321
|
+
buildTemplateMessageFromPayload,
|
|
3322
|
+
processLineMessage,
|
|
3323
|
+
chunkMarkdownText,
|
|
3324
|
+
sendLineReplyChunks,
|
|
3325
|
+
replyMessageLine,
|
|
3326
|
+
pushMessageLine,
|
|
3327
|
+
pushTextMessageWithQuickReplies,
|
|
3328
|
+
createQuickReplyItems,
|
|
3329
|
+
createTextMessageWithQuickReplies,
|
|
3330
|
+
pushMessagesLine,
|
|
3331
|
+
createFlexMessage,
|
|
3332
|
+
createImageMessage,
|
|
3333
|
+
createLocationMessage,
|
|
3334
|
+
onReplyError: (replyErr) => {
|
|
3335
|
+
logVerbose(`line: reply token failed, falling back to push: ${String(replyErr)}`);
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
});
|
|
3339
|
+
replyTokenUsed = nextReplyTokenUsed;
|
|
3340
|
+
recordChannelRuntimeState({
|
|
3341
|
+
channel: "line",
|
|
3342
|
+
accountId: resolvedAccountId,
|
|
3343
|
+
state: { lastOutboundAt: Date.now() }
|
|
3344
|
+
});
|
|
3345
|
+
},
|
|
3346
|
+
onError: (err, info) => {
|
|
3347
|
+
runtime.error?.(danger(`line ${info.kind} reply failed: ${String(err)}`));
|
|
3348
|
+
}
|
|
3349
|
+
},
|
|
3350
|
+
replyOptions: { onModelSelected }
|
|
3351
|
+
});
|
|
3352
|
+
if (!queuedFinal) logVerbose(`line: no response generated for message from ${ctxPayload.From}`);
|
|
3353
|
+
} catch (err) {
|
|
3354
|
+
runtime.error?.(danger(`line: auto-reply failed: ${String(err)}`));
|
|
3355
|
+
if (replyToken) try {
|
|
3356
|
+
await replyMessageLine(replyToken, [{
|
|
3357
|
+
type: "text",
|
|
3358
|
+
text: "Sorry, I encountered an error processing your message."
|
|
3359
|
+
}], { accountId: ctx.accountId });
|
|
3360
|
+
} catch (replyErr) {
|
|
3361
|
+
runtime.error?.(danger(`line: error reply failed: ${String(replyErr)}`));
|
|
3362
|
+
}
|
|
3363
|
+
} finally {
|
|
3364
|
+
stopLoading?.();
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
});
|
|
3368
|
+
const normalizedPath = normalizePluginHttpPath(webhookPath, "/line/webhook") ?? "/line/webhook";
|
|
3369
|
+
const createScopedLineWebhookHandler = (onRequestAuthenticated) => createLineNodeWebhookHandler({
|
|
3370
|
+
channelSecret: secret,
|
|
3371
|
+
bot,
|
|
3372
|
+
runtime,
|
|
3373
|
+
onRequestAuthenticated
|
|
3374
|
+
});
|
|
3375
|
+
const unregisterHttp = registerPluginHttpRoute({
|
|
3376
|
+
path: normalizedPath,
|
|
3377
|
+
auth: "plugin",
|
|
3378
|
+
replaceExisting: true,
|
|
3379
|
+
pluginId: "line",
|
|
3380
|
+
accountId: resolvedAccountId,
|
|
3381
|
+
log: (msg) => logVerbose(msg),
|
|
3382
|
+
handler: async (req, res) => {
|
|
3383
|
+
if (req.method !== "POST") {
|
|
3384
|
+
await createScopedLineWebhookHandler()(req, res);
|
|
3385
|
+
return;
|
|
3386
|
+
}
|
|
3387
|
+
const requestLifecycle = beginWebhookRequestPipelineOrReject({
|
|
3388
|
+
req,
|
|
3389
|
+
res,
|
|
3390
|
+
inFlightLimiter: lineWebhookInFlightLimiter,
|
|
3391
|
+
inFlightKey: `line:${resolvedAccountId}`
|
|
3392
|
+
});
|
|
3393
|
+
if (!requestLifecycle.ok) return;
|
|
3394
|
+
try {
|
|
3395
|
+
await createScopedLineWebhookHandler(requestLifecycle.release)(req, res);
|
|
3396
|
+
} finally {
|
|
3397
|
+
requestLifecycle.release();
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
});
|
|
3401
|
+
logVerbose(`line: registered webhook handler at ${normalizedPath}`);
|
|
3402
|
+
let stopped = false;
|
|
3403
|
+
const stopHandler = () => {
|
|
3404
|
+
if (stopped) return;
|
|
3405
|
+
stopped = true;
|
|
3406
|
+
logVerbose(`line: stopping provider for account ${resolvedAccountId}`);
|
|
3407
|
+
unregisterHttp();
|
|
3408
|
+
recordChannelRuntimeState({
|
|
3409
|
+
channel: "line",
|
|
3410
|
+
accountId: resolvedAccountId,
|
|
3411
|
+
state: {
|
|
3412
|
+
running: false,
|
|
3413
|
+
lastStopAt: Date.now()
|
|
3414
|
+
}
|
|
3415
|
+
});
|
|
3416
|
+
};
|
|
3417
|
+
if (abortSignal?.aborted) stopHandler();
|
|
3418
|
+
else if (abortSignal) {
|
|
3419
|
+
abortSignal.addEventListener("abort", stopHandler, { once: true });
|
|
3420
|
+
await waitForAbortSignal(abortSignal);
|
|
3421
|
+
}
|
|
3422
|
+
return {
|
|
3423
|
+
account: bot.account,
|
|
3424
|
+
handleWebhook: bot.handleWebhook,
|
|
3425
|
+
stop: () => {
|
|
3426
|
+
stopHandler();
|
|
3427
|
+
abortSignal?.removeEventListener("abort", stopHandler);
|
|
3428
|
+
}
|
|
3429
|
+
};
|
|
3430
|
+
}
|
|
3431
|
+
//#endregion
|
|
3432
|
+
//#region extensions/line/src/config-schema.ts
|
|
3433
|
+
const DmPolicySchema = zod_exports.z.enum([
|
|
3434
|
+
"open",
|
|
3435
|
+
"allowlist",
|
|
3436
|
+
"pairing",
|
|
3437
|
+
"disabled"
|
|
3438
|
+
]);
|
|
3439
|
+
const GroupPolicySchema = zod_exports.z.enum([
|
|
3440
|
+
"open",
|
|
3441
|
+
"allowlist",
|
|
3442
|
+
"disabled"
|
|
3443
|
+
]);
|
|
3444
|
+
const ThreadBindingsSchema = zod_exports.z.object({
|
|
3445
|
+
enabled: zod_exports.z.boolean().optional(),
|
|
3446
|
+
idleHours: zod_exports.z.number().optional(),
|
|
3447
|
+
maxAgeHours: zod_exports.z.number().optional(),
|
|
3448
|
+
spawnSubagentSessions: zod_exports.z.boolean().optional(),
|
|
3449
|
+
spawnAcpSessions: zod_exports.z.boolean().optional()
|
|
3450
|
+
}).strict();
|
|
3451
|
+
const LineCommonConfigSchema = zod_exports.z.object({
|
|
3452
|
+
enabled: zod_exports.z.boolean().optional(),
|
|
3453
|
+
channelAccessToken: zod_exports.z.string().optional(),
|
|
3454
|
+
channelSecret: zod_exports.z.string().optional(),
|
|
3455
|
+
tokenFile: zod_exports.z.string().optional(),
|
|
3456
|
+
secretFile: zod_exports.z.string().optional(),
|
|
3457
|
+
name: zod_exports.z.string().optional(),
|
|
3458
|
+
allowFrom: zod_exports.z.array(zod_exports.z.union([zod_exports.z.string(), zod_exports.z.number()])).optional(),
|
|
3459
|
+
groupAllowFrom: zod_exports.z.array(zod_exports.z.union([zod_exports.z.string(), zod_exports.z.number()])).optional(),
|
|
3460
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
3461
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
3462
|
+
responsePrefix: zod_exports.z.string().optional(),
|
|
3463
|
+
mediaMaxMb: zod_exports.z.number().optional(),
|
|
3464
|
+
webhookPath: zod_exports.z.string().optional(),
|
|
3465
|
+
threadBindings: ThreadBindingsSchema.optional()
|
|
3466
|
+
});
|
|
3467
|
+
const LineGroupConfigSchema = zod_exports.z.object({
|
|
3468
|
+
enabled: zod_exports.z.boolean().optional(),
|
|
3469
|
+
allowFrom: zod_exports.z.array(zod_exports.z.union([zod_exports.z.string(), zod_exports.z.number()])).optional(),
|
|
3470
|
+
requireMention: zod_exports.z.boolean().optional(),
|
|
3471
|
+
systemPrompt: zod_exports.z.string().optional(),
|
|
3472
|
+
skills: zod_exports.z.array(zod_exports.z.string()).optional()
|
|
3473
|
+
}).strict();
|
|
3474
|
+
const LineAccountConfigSchema = LineCommonConfigSchema.extend({ groups: zod_exports.z.record(zod_exports.z.string(), LineGroupConfigSchema.optional()).optional() }).strict();
|
|
3475
|
+
const LineConfigSchema = LineCommonConfigSchema.extend({
|
|
3476
|
+
accounts: zod_exports.z.record(zod_exports.z.string(), LineAccountConfigSchema.optional()).optional(),
|
|
3477
|
+
defaultAccount: zod_exports.z.string().optional(),
|
|
3478
|
+
groups: zod_exports.z.record(zod_exports.z.string(), LineGroupConfigSchema.optional()).optional()
|
|
3479
|
+
}).strict();
|
|
3480
|
+
const LineChannelConfigSchema = buildChannelConfigSchema(LineConfigSchema);
|
|
3481
|
+
//#endregion
|
|
3482
|
+
//#region extensions/line/src/rich-menu.ts
|
|
3483
|
+
const USER_BATCH_SIZE = 500;
|
|
3484
|
+
function getClient(opts = {}) {
|
|
3485
|
+
const account = resolveLineAccount({
|
|
3486
|
+
cfg: loadConfig(),
|
|
3487
|
+
accountId: opts.accountId
|
|
3488
|
+
});
|
|
3489
|
+
const token = resolveLineChannelAccessToken(opts.channelAccessToken, account);
|
|
3490
|
+
return new messagingApi.MessagingApiClient({ channelAccessToken: token });
|
|
3491
|
+
}
|
|
3492
|
+
function getBlobClient(opts = {}) {
|
|
3493
|
+
const account = resolveLineAccount({
|
|
3494
|
+
cfg: loadConfig(),
|
|
3495
|
+
accountId: opts.accountId
|
|
3496
|
+
});
|
|
3497
|
+
const token = resolveLineChannelAccessToken(opts.channelAccessToken, account);
|
|
3498
|
+
return new messagingApi.MessagingApiBlobClient({ channelAccessToken: token });
|
|
3499
|
+
}
|
|
3500
|
+
function chunkUserIds(userIds) {
|
|
3501
|
+
const batches = [];
|
|
3502
|
+
for (let i = 0; i < userIds.length; i += USER_BATCH_SIZE) batches.push(userIds.slice(i, i + USER_BATCH_SIZE));
|
|
3503
|
+
return batches;
|
|
3504
|
+
}
|
|
3505
|
+
async function createRichMenu(menu, opts = {}) {
|
|
3506
|
+
const client = getClient(opts);
|
|
3507
|
+
const richMenuRequest = {
|
|
3508
|
+
size: menu.size,
|
|
3509
|
+
selected: menu.selected ?? false,
|
|
3510
|
+
name: menu.name.slice(0, 300),
|
|
3511
|
+
chatBarText: menu.chatBarText.slice(0, 14),
|
|
3512
|
+
areas: menu.areas
|
|
3513
|
+
};
|
|
3514
|
+
const response = await client.createRichMenu(richMenuRequest);
|
|
3515
|
+
if (opts.verbose) logVerbose(`line: created rich menu ${response.richMenuId}`);
|
|
3516
|
+
return response.richMenuId;
|
|
3517
|
+
}
|
|
3518
|
+
async function uploadRichMenuImage(richMenuId, imagePath, opts = {}) {
|
|
3519
|
+
const blobClient = getBlobClient(opts);
|
|
3520
|
+
const imageData = await readFile(imagePath);
|
|
3521
|
+
const contentType = imagePath.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
|
|
3522
|
+
await blobClient.setRichMenuImage(richMenuId, new Blob([imageData], { type: contentType }));
|
|
3523
|
+
if (opts.verbose) logVerbose(`line: uploaded image to rich menu ${richMenuId}`);
|
|
3524
|
+
}
|
|
3525
|
+
async function setDefaultRichMenu(richMenuId, opts = {}) {
|
|
3526
|
+
await getClient(opts).setDefaultRichMenu(richMenuId);
|
|
3527
|
+
if (opts.verbose) logVerbose(`line: set default rich menu to ${richMenuId}`);
|
|
3528
|
+
}
|
|
3529
|
+
async function cancelDefaultRichMenu(opts = {}) {
|
|
3530
|
+
await getClient(opts).cancelDefaultRichMenu();
|
|
3531
|
+
if (opts.verbose) logVerbose("line: cancelled default rich menu");
|
|
3532
|
+
}
|
|
3533
|
+
async function getDefaultRichMenuId(opts = {}) {
|
|
3534
|
+
const client = getClient(opts);
|
|
3535
|
+
try {
|
|
3536
|
+
return (await client.getDefaultRichMenuId()).richMenuId ?? null;
|
|
3537
|
+
} catch {
|
|
3538
|
+
return null;
|
|
3539
|
+
}
|
|
3540
|
+
}
|
|
3541
|
+
async function linkRichMenuToUser(userId, richMenuId, opts = {}) {
|
|
3542
|
+
await getClient(opts).linkRichMenuIdToUser(userId, richMenuId);
|
|
3543
|
+
if (opts.verbose) logVerbose(`line: linked rich menu ${richMenuId} to user ${userId}`);
|
|
3544
|
+
}
|
|
3545
|
+
async function linkRichMenuToUsers(userIds, richMenuId, opts = {}) {
|
|
3546
|
+
const client = getClient(opts);
|
|
3547
|
+
for (const batch of chunkUserIds(userIds)) await client.linkRichMenuIdToUsers({
|
|
3548
|
+
richMenuId,
|
|
3549
|
+
userIds: batch
|
|
3550
|
+
});
|
|
3551
|
+
if (opts.verbose) logVerbose(`line: linked rich menu ${richMenuId} to ${userIds.length} users`);
|
|
3552
|
+
}
|
|
3553
|
+
async function unlinkRichMenuFromUser(userId, opts = {}) {
|
|
3554
|
+
await getClient(opts).unlinkRichMenuIdFromUser(userId);
|
|
3555
|
+
if (opts.verbose) logVerbose(`line: unlinked rich menu from user ${userId}`);
|
|
3556
|
+
}
|
|
3557
|
+
async function unlinkRichMenuFromUsers(userIds, opts = {}) {
|
|
3558
|
+
const client = getClient(opts);
|
|
3559
|
+
for (const batch of chunkUserIds(userIds)) await client.unlinkRichMenuIdFromUsers({ userIds: batch });
|
|
3560
|
+
if (opts.verbose) logVerbose(`line: unlinked rich menu from ${userIds.length} users`);
|
|
3561
|
+
}
|
|
3562
|
+
async function getRichMenuIdOfUser(userId, opts = {}) {
|
|
3563
|
+
const client = getClient(opts);
|
|
3564
|
+
try {
|
|
3565
|
+
return (await client.getRichMenuIdOfUser(userId)).richMenuId ?? null;
|
|
3566
|
+
} catch {
|
|
3567
|
+
return null;
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
async function getRichMenuList(opts = {}) {
|
|
3571
|
+
return (await getClient(opts).getRichMenuList()).richmenus ?? [];
|
|
3572
|
+
}
|
|
3573
|
+
async function getRichMenu(richMenuId, opts = {}) {
|
|
3574
|
+
const client = getClient(opts);
|
|
3575
|
+
try {
|
|
3576
|
+
return await client.getRichMenu(richMenuId);
|
|
3577
|
+
} catch {
|
|
3578
|
+
return null;
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
async function deleteRichMenu(richMenuId, opts = {}) {
|
|
3582
|
+
await getClient(opts).deleteRichMenu(richMenuId);
|
|
3583
|
+
if (opts.verbose) logVerbose(`line: deleted rich menu ${richMenuId}`);
|
|
3584
|
+
}
|
|
3585
|
+
async function createRichMenuAlias(richMenuId, aliasId, opts = {}) {
|
|
3586
|
+
await getClient(opts).createRichMenuAlias({
|
|
3587
|
+
richMenuId,
|
|
3588
|
+
richMenuAliasId: aliasId
|
|
3589
|
+
});
|
|
3590
|
+
if (opts.verbose) logVerbose(`line: created alias ${aliasId} for rich menu ${richMenuId}`);
|
|
3591
|
+
}
|
|
3592
|
+
async function deleteRichMenuAlias(aliasId, opts = {}) {
|
|
3593
|
+
await getClient(opts).deleteRichMenuAlias(aliasId);
|
|
3594
|
+
if (opts.verbose) logVerbose(`line: deleted alias ${aliasId}`);
|
|
3595
|
+
}
|
|
3596
|
+
function createGridLayout(height, actions) {
|
|
3597
|
+
const colWidth = Math.floor(2500 / 3);
|
|
3598
|
+
const rowHeight = Math.floor(height / 2);
|
|
3599
|
+
return [
|
|
3600
|
+
{
|
|
3601
|
+
bounds: {
|
|
3602
|
+
x: 0,
|
|
3603
|
+
y: 0,
|
|
3604
|
+
width: colWidth,
|
|
3605
|
+
height: rowHeight
|
|
3606
|
+
},
|
|
3607
|
+
action: actions[0]
|
|
3608
|
+
},
|
|
3609
|
+
{
|
|
3610
|
+
bounds: {
|
|
3611
|
+
x: colWidth,
|
|
3612
|
+
y: 0,
|
|
3613
|
+
width: colWidth,
|
|
3614
|
+
height: rowHeight
|
|
3615
|
+
},
|
|
3616
|
+
action: actions[1]
|
|
3617
|
+
},
|
|
3618
|
+
{
|
|
3619
|
+
bounds: {
|
|
3620
|
+
x: colWidth * 2,
|
|
3621
|
+
y: 0,
|
|
3622
|
+
width: colWidth,
|
|
3623
|
+
height: rowHeight
|
|
3624
|
+
},
|
|
3625
|
+
action: actions[2]
|
|
3626
|
+
},
|
|
3627
|
+
{
|
|
3628
|
+
bounds: {
|
|
3629
|
+
x: 0,
|
|
3630
|
+
y: rowHeight,
|
|
3631
|
+
width: colWidth,
|
|
3632
|
+
height: rowHeight
|
|
3633
|
+
},
|
|
3634
|
+
action: actions[3]
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
bounds: {
|
|
3638
|
+
x: colWidth,
|
|
3639
|
+
y: rowHeight,
|
|
3640
|
+
width: colWidth,
|
|
3641
|
+
height: rowHeight
|
|
3642
|
+
},
|
|
3643
|
+
action: actions[4]
|
|
3644
|
+
},
|
|
3645
|
+
{
|
|
3646
|
+
bounds: {
|
|
3647
|
+
x: colWidth * 2,
|
|
3648
|
+
y: rowHeight,
|
|
3649
|
+
width: colWidth,
|
|
3650
|
+
height: rowHeight
|
|
3651
|
+
},
|
|
3652
|
+
action: actions[5]
|
|
3653
|
+
}
|
|
3654
|
+
];
|
|
3655
|
+
}
|
|
3656
|
+
function createDefaultMenuConfig() {
|
|
3657
|
+
return {
|
|
3658
|
+
size: {
|
|
3659
|
+
width: 2500,
|
|
3660
|
+
height: 843
|
|
3661
|
+
},
|
|
3662
|
+
selected: false,
|
|
3663
|
+
name: "Default Menu",
|
|
3664
|
+
chatBarText: "Menu",
|
|
3665
|
+
areas: createGridLayout(843, [
|
|
3666
|
+
messageAction("Help", "/help"),
|
|
3667
|
+
messageAction("Status", "/status"),
|
|
3668
|
+
messageAction("Settings", "/settings"),
|
|
3669
|
+
messageAction("About", "/about"),
|
|
3670
|
+
messageAction("Feedback", "/feedback"),
|
|
3671
|
+
messageAction("Contact", "/contact")
|
|
3672
|
+
])
|
|
3673
|
+
};
|
|
3674
|
+
}
|
|
3675
|
+
//#endregion
|
|
3676
|
+
export { createAudioMessage as $, processLineMessage as A, datetimePickerAction as At, createImageCard as B, convertCodeBlockToFlexBubble as C, createConfirmTemplate as Ct, extractLinks as D, createProductCarousel as Dt, extractCodeBlocks as E, createLinkMenu as Et, createAgendaCard as F, downloadLineMedia as Ft, startLineWebhook as G, createListCard as H, createEventCard as I, isSenderAllowed as It, resolveExactLineGroupConfigKey as J, parseLineWebhookBody as K, createReceiptCard as L, normalizeAllowFrom as Lt, createAppleTvRemoteCard as M, postbackAction as Mt, createDeviceControlCard as N, uriAction as Nt, extractMarkdownTables as O, createTemplateCarousel as Ot, createMediaPlayerCard as P, probeLineBot as Pt, resolveLineGroupsConfig as Q, createActionCard as R, normalizeDmAllowFromWithStore as Rt, readLineWebhookRequestBody as S, createCarouselColumn as St, convertTableToFlexBubble as T, createImageCarouselColumn as Tt, createNotificationBubble as U, createInfoCard as V, createLineWebhookMiddleware as W, resolveLineGroupHistoryKey as X, resolveLineGroupConfigEntry as Y, resolveLineGroupLookupIds as Z, uploadRichMenuImage as _, showLoadingAnimation as _t, createRichMenuAlias as a, createVideoMessage as at, monitorLineProvider as b, createButtonMenu as bt, getDefaultRichMenuId as c, pushFlexMessage as ct, getRichMenuList as d, pushMessageLine as dt, createFlexMessage as et, linkRichMenuToUser as f, pushMessagesLine as ft, unlinkRichMenuFromUsers as g, sendMessageLine as gt, unlinkRichMenuFromUser as h, replyMessageLine as ht, createRichMenu as i, createTextMessageWithQuickReplies as it, toFlexMessage as j, messageAction as jt, hasMarkdownToConvert as k, createYesNoConfirm as kt, getRichMenu as l, pushImageMessage as lt, setDefaultRichMenu as m, pushTextMessageWithQuickReplies as mt, createDefaultMenuConfig as n, createLocationMessage as nt, deleteRichMenu as o, getUserDisplayName as ot, linkRichMenuToUsers as p, pushTemplateMessage as pt, validateLineSignature as q, createGridLayout as r, createQuickReplyItems as rt, deleteRichMenuAlias as s, getUserProfile as st, cancelDefaultRichMenu as t, createImageMessage as tt, getRichMenuIdOfUser as u, pushLocationMessage as ut, LineChannelConfigSchema as v, resolveLineChannelAccessToken as vt, convertLinksToFlexBubble as w, createImageCarousel as wt, createLineNodeWebhookHandler as x, createButtonTemplate as xt, LineConfigSchema as y, buildTemplateMessageFromPayload as yt, createCarousel as z };
|