stableclaw 2026.5.0 ā 2026.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.buildstamp +1 -1
- package/dist/abort-DbOWfk1R.js +192 -0
- package/dist/abort-cutoff.runtime-ZDeu_mNv.js +20 -0
- package/dist/abort-cutoff.runtime.js +1 -1
- package/dist/abort.runtime-DzSEcqwd.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/access-control-ChkJvEGP.js +152 -0
- package/dist/account-inspect-DCKRZRny.js +158 -0
- package/dist/accounts-BGTN7cr-.js +102 -0
- package/dist/accounts-CinolZTU.js +107 -0
- package/dist/accounts-CkhyYlS6.js +137 -0
- package/dist/accounts-D219ghr6.js +57 -0
- package/dist/accounts-DrggbKcd.js +2 -0
- package/dist/acp-runtime-_pYPcJEH.js +8 -0
- package/dist/acp-stateful-target-driver-BEIUsg83.js +60 -0
- package/dist/action-runtime-CJhBKfDC.js +318 -0
- package/dist/action-runtime-NLKQbAQA.js +72 -0
- package/dist/action-runtime-api-YzbQ4Qy6.js +1028 -0
- package/dist/actions-BrAcUNm-.js +531 -0
- package/dist/actions.runtime-BwB4CvxW.js +2 -0
- package/dist/actions.runtime-CiYUOMp1.js +18 -0
- package/dist/actions.runtime-SFl3LXbz.js +5 -0
- package/dist/actions.runtime.js +1 -1
- package/dist/agent-CdYMZ9fr.js +2 -0
- package/dist/agent-command-wY0aEiLZ.js +1457 -0
- package/dist/agent-runner.runtime-BJYxz_AG.js +2241 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-Cm6WYH1X.js +142 -0
- package/dist/agent-tools-login-Bd1V75kh.js +57 -0
- package/dist/agents-IbQmK8Yn.js +888 -0
- package/dist/agents-MrSC-Up6.js +5 -0
- package/dist/api-BQHk-t06.js +5 -0
- package/dist/api-Bmx0BK0F.js +5 -0
- package/dist/api-CJIpnZrc.js +10 -0
- package/dist/api-CRhMGxLB.js +6 -0
- package/dist/api-CdYIiak82.js +322 -0
- package/dist/api-DOdPShPk.js +2 -0
- package/dist/api-jI3BtiNB.js +2 -0
- package/dist/apply-Cbt003x7.js +485 -0
- package/dist/apply.runtime-CY47EbzA.js +2 -0
- package/dist/apply.runtime.js +1 -1
- package/dist/approval-native-B4HJRa55.js +79 -0
- package/dist/approval-runtime-B6PXavdQ.js +262 -0
- package/dist/assistant-identity-CeKI09AJ.js +74 -0
- package/dist/attachment-normalize-BZdNI2So.js +921 -0
- package/dist/audit-BLq9P3oA.js +86 -0
- package/dist/audit-DtlsDuaM.js +892 -0
- package/dist/audit-channel.allow-from.runtime.js +1 -1
- package/dist/audit-channel.collect.runtime-CTutyCbl.js +528 -0
- package/dist/audit-channel.collect.runtime.js +1 -1
- package/dist/audit-channel.discord.runtime.js +1 -1
- package/dist/audit-channel.telegram.runtime-DgjqHj_y.js +8 -0
- package/dist/audit-channel.telegram.runtime.js +1 -1
- package/dist/audit-channel.zalouser.runtime.js +1 -1
- package/dist/audit-extra.async-azTwi9Ii.js +820 -0
- package/dist/audit.deep.runtime-DczMVmZl.js +2 -0
- package/dist/audit.deep.runtime.js +1 -1
- package/dist/audit.nondeep.runtime-C0-gevdg.js +831 -0
- package/dist/audit.nondeep.runtime.js +1 -1
- package/dist/audit.runtime-CjmP-IVf.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-D9R9vTdP.js +181 -0
- package/dist/auth-choice-ASVf3uqH.js +3 -0
- package/dist/auth-choice-CUGc7jRT.js +341 -0
- package/dist/auth-choice-TdFpgqf8.js +69 -0
- package/dist/binding-targets-BB736PNg.js +99 -0
- package/dist/bot-i7rkFnoU.js +4268 -0
- package/dist/bot-message-context-NjuZxwNf.js +2 -0
- package/dist/bot-message-context-SFoFcMU0.js +1175 -0
- package/dist/bot-message-context.runtime-BuHjCi1s.js +7 -0
- package/dist/bot-message-context.runtime.js +1 -1
- package/dist/bot-message-context.session.runtime-BOjKvTjg.js +12 -0
- package/dist/bot-message-context.session.runtime.js +1 -1
- package/dist/bot-native-commands.delivery.runtime-CMVcyVfr.js +3 -0
- package/dist/bot-native-commands.delivery.runtime.js +1 -1
- package/dist/bot-native-commands.runtime-DPXiZ-g-.js +11 -0
- package/dist/bot-native-commands.runtime.js +1 -1
- package/dist/bundled/boot-md/handler.js +3 -3
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/channel-6JSPqz3S.js +599 -0
- package/dist/channel-8fxnaoxA.js +1135 -0
- package/dist/channel-BGr4lB_p.js +208 -0
- package/dist/channel-BRZOhpO-.js +1217 -0
- package/dist/channel-BTaI9Vsm.js +454 -0
- package/dist/channel-BuvbHCUl.js +800 -0
- package/dist/channel-C0kxZQ7E.js +883 -0
- package/dist/channel-CJgXhuIs.js +698 -0
- package/dist/channel-DQWDH71E.js +337 -0
- package/dist/channel-DqywfjHt.js +361 -0
- package/dist/channel-inbound-BbIwjinv.js +30 -0
- package/dist/channel-o7dERoVP.js +1129 -0
- package/dist/channel-ouAyZmKb.js +788 -0
- package/dist/channel-pGQXHihG.js +783 -0
- package/dist/channel-plugin-resolution-E1W_efdm.js +144 -0
- package/dist/channel-qw2GU-78.js +1661 -0
- package/dist/channel-shared-DsqgfMVz.js +58 -0
- package/dist/channel-x8EJXY-p.js +4976 -0
- package/dist/channel.runtime-9U-FzlTX.js +22252 -0
- package/dist/channel.runtime-CDRgtalS.js +309 -0
- package/dist/channel.runtime-CrTb-acp.js +373 -0
- package/dist/channel.runtime-CvUJhEWE.js +14 -0
- package/dist/channel.runtime-D86obE0J.js +108 -0
- package/dist/channel.runtime-DR14R1qn.js +125 -0
- package/dist/channel.runtime-DY-t80Mq.js +335 -0
- package/dist/channel.runtime-Db6-JgiT.js +80 -0
- package/dist/channel.setup-5ccX1E-a.js +279 -0
- package/dist/channels-CU1r9oWn.js +1134 -0
- package/dist/channels-cli-H6kLKRCJ.js +246 -0
- package/dist/clawhub-CicQAK3Q.js +163 -0
- package/dist/cli/daemon-cli.js +3 -9
- package/dist/cli-BeJobAfz.js +695 -0
- package/dist/cli-Bw_QTHCD.js +152 -0
- package/dist/cli-migration-DBUl9wOM.js +100 -0
- package/dist/cli-runner-CNdeXILj.js +1014 -0
- package/dist/client-C7KrfnR_.js +5 -0
- package/dist/client-D1IMuN2R.js +7 -0
- package/dist/client-bootstrap-BRL3IJbX.js +2 -0
- package/dist/client-bootstrap-BnU_fgOa.js +121 -0
- package/dist/code-execution-Dy3oNAvz.js +142 -0
- package/dist/command-auth-BoH1IkmW.js +64 -0
- package/dist/command-registry-CFUnlk3Y.js +199 -0
- package/dist/command-registry-Dy7lErHE.js +3 -0
- package/dist/commands-P7L4abaE.js +4 -0
- package/dist/commands-acp-CRBC84-r.js +990 -0
- package/dist/commands-core-DfVd-xq7.js +241 -0
- package/dist/commands-core.runtime-CCF1BiL7.js +2 -0
- package/dist/commands-core.runtime.js +1 -1
- package/dist/commands-handlers.runtime-BWoNwBZE.js +3708 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-info-CSt3aoRZ.js +651 -0
- package/dist/commands-models-FgUB1hGv.js +395 -0
- package/dist/commands-status.runtime-jcqPwtM3.js +2 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands.runtime-CIbt20JL.js +4 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/compact.runtime-DKdAjeMZ.js +7 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-7xXpXxID.js +2 -0
- package/dist/completion-cli-Csbpl09N.js +466 -0
- package/dist/config-BGW2qyLw.js +475 -0
- package/dist/config-cli--4OexF6J.js +945 -0
- package/dist/config-guard-V5IAh_mF.js +113 -0
- package/dist/config-runtime-D208l2BL.js +13 -0
- package/dist/config-secret-input.runtime-BF9IBBeM.js +3 -0
- package/dist/config-secret-input.runtime.js +1 -1
- package/dist/config-update-BBzrkxal.js +127 -0
- package/dist/config-update-DrtP_s0Y.js +3 -0
- package/dist/configure-B5cJf26V.js +2 -0
- package/dist/configure-Ts01pF4g.js +1140 -0
- package/dist/context-DeDQINVq.js +227 -0
- package/dist/control-ui-C9vPgc9L.js +388 -0
- package/dist/conversation-bindings-CwHBn1fl.js +210 -0
- package/dist/conversation-id-BOk-dTsl.js +168 -0
- package/dist/conversation-runtime-DvoDx5Lp.js +85 -0
- package/dist/core-_nKe7lGV.js +195 -0
- package/dist/create-client-BenzpBNt.js +2 -0
- package/dist/create-client-CGt4-gcv.js +58 -0
- package/dist/credentials-7IVnN_TF.js +22 -0
- package/dist/credentials-write.runtime-D1VXZncp.js +9 -0
- package/dist/credentials-write.runtime.js +1 -1
- package/dist/crypto-runtime-Y20cyTTx.js +3495 -0
- package/dist/daemon-cli-DvP7I-Uu.js +383 -0
- package/dist/daemon-install-CVIbxBN5.js +63 -0
- package/dist/delegate-VctUvdru.js +43 -0
- package/dist/deliver-DTfKSC4Q.js +954 -0
- package/dist/deliver-LbQQnhR5.js +3 -0
- package/dist/deliver-reply-18sWD8M4.js +238 -0
- package/dist/deliver-runtime-Qg81IeZu.js +2 -0
- package/dist/delivery-D8E92dmQ.js +834 -0
- package/dist/delivery-info-Cls9iWRl.js +40 -0
- package/dist/direct-dm-Dg-rhCG0.js +139 -0
- package/dist/direct-management-CaI85_dA.js +2 -0
- package/dist/direct-management-DjdwL-F4.js +300 -0
- package/dist/directive-handling.fast-lane-3sGyxlH_.js +64 -0
- package/dist/directive-handling.fast-lane-CKe_S3fo.js +2 -0
- package/dist/directive-handling.impl-C1D-MGbp.js +2 -0
- package/dist/directive-handling.impl-Dk6oRN3H.js +672 -0
- package/dist/directive-handling.parse-ni5LIlSW.js +375 -0
- package/dist/directive-handling.persist-DSyJG2Kq.js +133 -0
- package/dist/directive-handling.persist.runtime-WEeAbhJ8.js +2 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/directive-handling.shared-DPXk9T6l.js +158 -0
- package/dist/directory-cli-CL6UudXS.js +238 -0
- package/dist/directory.static-BX7RI4Aq.js +45 -0
- package/dist/discovery-DhEDepjw.js +171 -0
- package/dist/dispatch-acp.runtime-DHUc4MMQ.js +884 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/dispatch-au2t5HsH.js +858 -0
- package/dist/doctor-completion-fD570xvd.js +90 -0
- package/dist/doctor-config-preflight-B0C_HTWN.js +2 -0
- package/dist/doctor-config-preflight-OMEufm7U.js +148 -0
- package/dist/doctor-state-migrations-BJ5M0r8a.js +2 -0
- package/dist/doctor-state-migrations-CPG_ii-i.js +3 -0
- package/dist/embedding-provider-vb6JoF5D.js +129 -0
- package/dist/encryption-guidance-BRY-GWVy.js +33 -0
- package/dist/entry.js +2 -2
- package/dist/error-text-CM5bR2qT.js +24 -0
- package/dist/exec-approval-session-target-Ci45mXNL.js +159 -0
- package/dist/exec-approvals-D9wFcLn9.js +121 -0
- package/dist/extensionAPI.js +3 -3
- package/dist/extensions/acpx/index.js +3 -3
- package/dist/extensions/acpx/runtime-api.js +2 -2
- package/dist/extensions/amazon-bedrock/api.js +2 -2
- package/dist/extensions/amazon-bedrock/discovery.js +1 -1
- package/dist/extensions/amazon-bedrock/index.js +2 -2
- package/dist/extensions/anthropic/cli-migration.js +1 -1
- package/dist/extensions/anthropic/index.js +5 -5
- package/dist/extensions/anthropic/media-understanding-provider.js +1 -1
- package/dist/extensions/bluebubbles/api.js +2 -2
- package/dist/extensions/bluebubbles/index.js +2 -2
- package/dist/extensions/bluebubbles/setup-entry.js +1 -1
- package/dist/extensions/browser/test-support.js +1 -1
- package/dist/extensions/byteplus/index.js +2 -2
- package/dist/extensions/chutes/index.js +4 -4
- package/dist/extensions/cloudflare-ai-gateway/index.js +1 -1
- package/dist/extensions/deepseek/index.js +1 -1
- package/dist/extensions/device-pair/api.js +2 -2
- package/dist/extensions/device-pair/index.js +3 -3
- package/dist/extensions/device-pair/notify.js +1 -1
- package/dist/extensions/device-pair/qr-image.js +2 -2
- package/dist/extensions/diffs/index.js +1 -1
- package/dist/extensions/discord/action-runtime-api.js +1 -1
- package/dist/extensions/discord/api.js +4 -4
- package/dist/extensions/discord/index.js +9 -9
- package/dist/extensions/discord/runtime-api.js +10 -10
- package/dist/extensions/discord/setup-entry.js +2 -2
- package/dist/extensions/discord/test-api.js +3 -3
- package/dist/extensions/fal/index.js +2 -2
- package/dist/extensions/feishu/api.js +2 -2
- package/dist/extensions/feishu/index.js +7 -7
- package/dist/extensions/feishu/setup-api.js +1 -1
- package/dist/extensions/feishu/setup-entry.js +2 -2
- package/dist/extensions/github-copilot/api.js +1 -1
- package/dist/extensions/github-copilot/index.js +2 -2
- package/dist/extensions/github-copilot/login.js +1 -1
- package/dist/extensions/google/index.js +2 -2
- package/dist/extensions/google/media-understanding-provider.js +2 -2
- package/dist/extensions/googlechat/api.js +1 -1
- package/dist/extensions/googlechat/index.js +2 -2
- package/dist/extensions/googlechat/setup-entry.js +2 -2
- package/dist/extensions/googlechat/test-api.js +1 -1
- package/dist/extensions/groq/index.js +1 -1
- package/dist/extensions/groq/media-understanding-provider.js +1 -1
- package/dist/extensions/huggingface/index.js +2 -2
- package/dist/extensions/imessage/api.js +2 -2
- package/dist/extensions/imessage/index.js +7 -7
- package/dist/extensions/imessage/runtime-api.js +2 -2
- package/dist/extensions/imessage/setup-entry.js +3 -3
- package/dist/extensions/irc/api.js +1 -1
- package/dist/extensions/irc/index.js +2 -2
- package/dist/extensions/irc/setup-entry.js +2 -2
- package/dist/extensions/kilocode/index.js +1 -1
- package/dist/extensions/kimi-coding/index.js +2 -2
- package/dist/extensions/line/api.js +4 -4
- package/dist/extensions/line/index.js +5 -5
- package/dist/extensions/line/runtime-api.js +2 -2
- package/dist/extensions/line/setup-api.js +2 -2
- package/dist/extensions/line/setup-entry.js +3 -3
- package/dist/extensions/litellm/index.js +1 -1
- package/dist/extensions/lobster/index.js +1 -1
- package/dist/extensions/lobster/runtime-api.js +1 -1
- package/dist/extensions/matrix/api.js +3 -3
- package/dist/extensions/matrix/index.js +3 -3
- package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +3 -3
- package/dist/extensions/matrix/setup-entry.js +2 -2
- package/dist/extensions/matrix/test-api.js +1 -1
- package/dist/extensions/mattermost/api.js +1 -1
- package/dist/extensions/mattermost/index.js +2 -2
- package/dist/extensions/mattermost/runtime-api.js +4 -4
- package/dist/extensions/mattermost/setup-entry.js +2 -2
- package/dist/extensions/media-understanding-core/runtime-api.js +2 -2
- package/dist/extensions/microsoft/index.js +1 -1
- package/dist/extensions/microsoft/speech-provider.js +1 -1
- package/dist/extensions/microsoft/test-api.js +1 -1
- package/dist/extensions/microsoft-foundry/auth.js +1 -1
- package/dist/extensions/microsoft-foundry/cli.js +1 -1
- package/dist/extensions/microsoft-foundry/index.js +1 -1
- package/dist/extensions/microsoft-foundry/onboard.js +2 -2
- package/dist/extensions/microsoft-foundry/provider.js +1 -1
- package/dist/extensions/microsoft-foundry/runtime.js +1 -1
- package/dist/extensions/microsoft-foundry/shared-runtime.js +2 -2
- package/dist/extensions/microsoft-foundry/shared.js +1 -1
- package/dist/extensions/minimax/index.js +4 -4
- package/dist/extensions/minimax/media-understanding-provider.js +1 -1
- package/dist/extensions/minimax/oauth.js +1 -1
- package/dist/extensions/minimax/oauth.runtime.js +1 -1
- package/dist/extensions/mistral/index.js +2 -2
- package/dist/extensions/mistral/media-understanding-provider.js +1 -1
- package/dist/extensions/modelstudio/index.js +1 -1
- package/dist/extensions/moonshot/index.js +2 -2
- package/dist/extensions/moonshot/media-understanding-provider.js +1 -1
- package/dist/extensions/msteams/api.js +1 -1
- package/dist/extensions/msteams/index.js +3 -3
- package/dist/extensions/msteams/runtime-api.js +4 -4
- package/dist/extensions/msteams/setup-entry.js +2 -2
- package/dist/extensions/msteams/test-api.js +1 -1
- package/dist/extensions/nextcloud-talk/api.js +1 -1
- package/dist/extensions/nextcloud-talk/index.js +2 -2
- package/dist/extensions/nextcloud-talk/runtime-api.js +2 -2
- package/dist/extensions/nextcloud-talk/setup-entry.js +2 -2
- package/dist/extensions/nostr/api.js +3 -3
- package/dist/extensions/nostr/index.js +4 -4
- package/dist/extensions/nostr/runtime-api.js +3 -3
- package/dist/extensions/nostr/setup-api.js +1 -1
- package/dist/extensions/nostr/setup-entry.js +2 -2
- package/dist/extensions/nostr/test-api.js +1 -1
- package/dist/extensions/nvidia/index.js +1 -1
- package/dist/extensions/ollama/api.js +2 -2
- package/dist/extensions/ollama/index.js +3 -3
- package/dist/extensions/ollama/runtime-api.js +2 -2
- package/dist/extensions/openai/api.js +1 -1
- package/dist/extensions/openai/index.js +3 -3
- package/dist/extensions/openai/media-understanding-provider.js +1 -1
- package/dist/extensions/openai/openai-codex-provider.js +1 -1
- package/dist/extensions/openai/openai-provider.js +1 -1
- package/dist/extensions/openai/test-api.js +1 -1
- package/dist/extensions/opencode/index.js +2 -2
- package/dist/extensions/opencode-go/index.js +2 -2
- package/dist/extensions/openrouter/index.js +3 -3
- package/dist/extensions/openrouter/media-understanding-provider.js +1 -1
- package/dist/extensions/openshell/index.js +1 -1
- package/dist/extensions/qianfan/index.js +1 -1
- package/dist/extensions/qqbot/index.js +2 -2
- package/dist/extensions/qqbot/setup-entry.js +2 -2
- package/dist/extensions/signal/api.js +4 -4
- package/dist/extensions/signal/index.js +9 -9
- package/dist/extensions/signal/reaction-runtime-api.js +1 -1
- package/dist/extensions/signal/runtime-api.js +4 -4
- package/dist/extensions/signal/setup-entry.js +2 -2
- package/dist/extensions/signal/test-api.js +4 -4
- package/dist/extensions/slack/api.js +6 -6
- package/dist/extensions/slack/index.js +2 -2
- package/dist/extensions/slack/runtime-api.js +6 -6
- package/dist/extensions/slack/setup-entry.js +2 -2
- package/dist/extensions/slack/test-api.js +4 -4
- package/dist/extensions/stepfun/index.js +2 -2
- package/dist/extensions/synology-chat/index.js +2 -2
- package/dist/extensions/synology-chat/setup-api.js +1 -1
- package/dist/extensions/synology-chat/setup-entry.js +2 -2
- package/dist/extensions/synthetic/index.js +1 -1
- package/dist/extensions/talk-voice/index.js +1 -1
- package/dist/extensions/telegram/api.js +8 -8
- package/dist/extensions/telegram/index.js +2 -2
- package/dist/extensions/telegram/runtime-api.js +8 -8
- package/dist/extensions/telegram/setup-entry.js +3 -3
- package/dist/extensions/telegram/test-api.js +7 -7
- package/dist/extensions/telegram/test-support.js +4 -4
- package/dist/extensions/tlon/index.js +2 -2
- package/dist/extensions/tlon/setup-entry.js +2 -2
- package/dist/extensions/tlon/test-api.js +1 -1
- package/dist/extensions/together/index.js +1 -1
- package/dist/extensions/twitch/index.js +1 -1
- package/dist/extensions/venice/index.js +1 -1
- package/dist/extensions/vercel-ai-gateway/index.js +1 -1
- package/dist/extensions/volcengine/index.js +2 -2
- package/dist/extensions/whatsapp/action-runtime-api.js +1 -1
- package/dist/extensions/whatsapp/action-runtime.runtime.js +1 -1
- package/dist/extensions/whatsapp/api.js +2 -2
- package/dist/extensions/whatsapp/index.js +2 -2
- package/dist/extensions/whatsapp/light-runtime-api.js +1 -1
- package/dist/extensions/whatsapp/login-qr-api.js +1 -1
- package/dist/extensions/whatsapp/runtime-api.js +13 -13
- package/dist/extensions/whatsapp/setup-entry.js +3 -3
- package/dist/extensions/whatsapp/test-api.js +6 -6
- package/dist/extensions/xai/code-execution.js +1 -1
- package/dist/extensions/xai/index.js +4 -4
- package/dist/extensions/xai/x-search.js +1 -1
- package/dist/extensions/xiaomi/index.js +1 -1
- package/dist/extensions/zai/index.js +2 -2
- package/dist/extensions/zai/media-understanding-provider.js +1 -1
- package/dist/extensions/zalo/api.js +2 -2
- package/dist/extensions/zalo/index.js +2 -2
- package/dist/extensions/zalo/runtime-api.js +2 -2
- package/dist/extensions/zalo/setup-entry.js +2 -2
- package/dist/extensions/zalo/test-api.js +1 -1
- package/dist/extensions/zalouser/api.js +1 -1
- package/dist/extensions/zalouser/index.js +10 -10
- package/dist/extensions/zalouser/runtime-api.js +3 -3
- package/dist/extensions/zalouser/setup-entry.js +3 -3
- package/dist/extensions/zalouser/test-api.js +4 -4
- package/dist/format-BN8tV56q.js +817 -0
- package/dist/gateway-CK0mVyJH.js +2575 -0
- package/dist/gateway-cli-BIGurgdT.js +1596 -0
- package/dist/gateway-install-token-CnLiX_Zd.js +230 -0
- package/dist/get-reply-from-config.runtime-DHVxBB-O.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/gmail-watcher-lifecycle-BOSlI4iv.js +2 -0
- package/dist/graph-users-CceVBSPZ.js +918 -0
- package/dist/group-access-Cwl8gW8B.js +32 -0
- package/dist/group-access-DHoGAQFt.js +119 -0
- package/dist/handle-action-BmBnXGdV.js +500 -0
- package/dist/health-CkL8pqV8.js +2 -0
- package/dist/health-DhHzqohg.js +577 -0
- package/dist/heartbeat-runner-N3rkIDfo.js +995 -0
- package/dist/hooks-cli-LfG_KZSu.js +353 -0
- package/dist/http-client-lTUwUVkV.js +294 -0
- package/dist/image-BZJoriob.js +152 -0
- package/dist/image-runtime-V0FuCGlj.js +7 -0
- package/dist/inbound-reply-dispatch-C8za1uEq.js +73 -0
- package/dist/inbound.runtime-BYJ118rE.js +3 -0
- package/dist/inbound.runtime.js +1 -1
- package/dist/index.js +2 -2
- package/dist/infra-runtime-C9fJenAY.js +22 -0
- package/dist/install-BKR6ckWd.js +590 -0
- package/dist/install-security-scan-BWWG9NEd.js +22 -0
- package/dist/install-security-scan.runtime-CNFIn93M.js +299 -0
- package/dist/install-security-scan.runtime.js +1 -1
- package/dist/install.runtime-BKwzESsg.js +11 -0
- package/dist/install.runtime-DrieSb_M.js +27 -0
- package/dist/install.runtime.js +1 -1
- package/dist/irc-DRWT3CQf.js +14 -0
- package/dist/legacy-crypto-restore-CZycrxha.js +85 -0
- package/dist/library-CVZUhyOq.js +44 -0
- package/dist/llm-slug-generator-B79ECeWZ.js +68 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/loader-BJO8z2ig.js +2 -0
- package/dist/login-Cs2tMFcs.js +2332 -0
- package/dist/login-GAWpWfxh.js +108 -0
- package/dist/login-qr-CUosF6JZ.js +211 -0
- package/dist/login-qr-api-W1NF3gA_.js +16 -0
- package/dist/manager.runtime-Dmq8R0mb.js +670 -0
- package/dist/manager.runtime.js +1 -1
- package/dist/matrix-DrH1M_Sr.js +351 -0
- package/dist/matrix-runtime-heavy-C6fkT2VX.js +4 -0
- package/dist/mattermost-B9327zl5.js +18 -0
- package/dist/media-CIdwV3Lu.js +1691 -0
- package/dist/media-runtime-QMgMQ3WZ.js +295 -0
- package/dist/media-understanding-C66pUC4U.js +51 -0
- package/dist/media-understanding-provider-BRzfmJfY.js +86 -0
- package/dist/media-understanding-provider-Bd8aZtsH.js +11 -0
- package/dist/media-understanding-provider-By1hanjB.js +16 -0
- package/dist/media-understanding-provider-C6SiAxyT.js +11 -0
- package/dist/media-understanding-provider-DGKwGu0P.js +16 -0
- package/dist/media-understanding-provider-Jlh0zs2Z.js +17 -0
- package/dist/media-understanding-provider-SRUeyQqG.js +28 -0
- package/dist/media-understanding-provider-wimL3kdC.js +11 -0
- package/dist/media-understanding.runtime-BPtAeqrg.js +7 -0
- package/dist/media-understanding.runtime.js +1 -1
- package/dist/message-CzGnK5F3.js +206 -0
- package/dist/message-action-runner-BZ8x9K7O.js +1330 -0
- package/dist/message-handler-gpYZEW_K.js +1771 -0
- package/dist/messages-Xy50Pa2j.js +270 -0
- package/dist/migration-snapshot.runtime-jCZaBq39.js +3 -0
- package/dist/migration-snapshot.runtime.js +1 -1
- package/dist/model-catalog-sx4GaLTc.js +216 -0
- package/dist/model-catalog.runtime-DDSdoGE4.js +2 -0
- package/dist/model-catalog.runtime.js +1 -1
- package/dist/model-picker-CDs8bq1G.js +3 -0
- package/dist/model-picker-bY3x3ppH.js +439 -0
- package/dist/model-runtime-BiWDK2-B.js +1772 -0
- package/dist/model-selection-rJYfkbE0.js +407 -0
- package/dist/models-D5u4cqP1.js +3 -0
- package/dist/models-Xs8Qafsh.js +2550 -0
- package/dist/models-cli-6McdkNo9.js +197 -0
- package/dist/models-config-CAPHcyO2.js +1106 -0
- package/dist/models-config-DABSjBBO.js +2 -0
- package/dist/models-config.runtime-B4-0SSTG.js +2 -0
- package/dist/models-config.runtime.js +1 -1
- package/dist/models-provider-runtime-C0oxGm-e.js +2 -0
- package/dist/monitor-B1P5ei52.js +3622 -0
- package/dist/monitor-B8Q7rxtC.js +666 -0
- package/dist/monitor-B9o5AegX.js +3660 -0
- package/dist/monitor-BSMPXJ97.js +676 -0
- package/dist/monitor-BgD5Jrad.js +4067 -0
- package/dist/monitor-Bzvaap7m.js +1525 -0
- package/dist/monitor-DOHgeQjB.js +687 -0
- package/dist/monitor-auth-3ZkW5CEr.js +192 -0
- package/dist/monitor-polling.runtime-Bs9-PKyv.js +307 -0
- package/dist/monitor-polling.runtime.js +1 -1
- package/dist/monitor-provider-BhVxiO1J.js +1782 -0
- package/dist/monitor-webhook.runtime-DtF-7o03.js +297 -0
- package/dist/monitor-webhook.runtime.js +1 -1
- package/dist/msteams-BIcHfY4o.js +33 -0
- package/dist/nextcloud-talk-Csx58yBv.js +18 -0
- package/dist/nostr-CMrgscuJ.js +19 -0
- package/dist/notify-DSCFVe6i.js +298 -0
- package/dist/oauth-CthjG7hQ.js +152 -0
- package/dist/onboard-C-jsaHwd.js +307 -0
- package/dist/onboard-channels-I98y7NZ8.js +2 -0
- package/dist/onboard-channels-NS1vMCQr.js +705 -0
- package/dist/onboard-custom-BMQ33xqX.js +2 -0
- package/dist/onboard-custom-Dz1DOCJM.js +646 -0
- package/dist/onboard-helpers-BnxgMgMT.js +228 -0
- package/dist/onboard-helpers-DEn4dg5k.js +4 -0
- package/dist/onboard-oYw6GJEA.js +591 -0
- package/dist/onboard-remote-CMmcPmsN.js +2 -0
- package/dist/onboard-remote-uiiE3QnY.js +193 -0
- package/dist/onboard-skills-CttSUeZa.js +2 -0
- package/dist/onboard-skills-DbUk33Ct.js +134 -0
- package/dist/openai-codex-provider-DZN_1A31.js +254 -0
- package/dist/openai-provider-CxBasM1Z.js +272 -0
- package/dist/openclaw-tools.runtime-nwmrOrNY.js +2 -0
- package/dist/openclaw-tools.runtime.js +1 -1
- package/dist/outbound-adapter-DfYvjhM_.js +183 -0
- package/dist/outbound-session-BTLOycg4.js +41 -0
- package/dist/persistent-bindings.lifecycle-CR9WhqMq.js +159 -0
- package/dist/pi-embedded-T_JLa73v.js +40738 -0
- package/dist/pi-embedded.runtime-Bn2DltTS.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/plugin-install-BQ6Yfbir.js +230 -0
- package/dist/plugin-install-config-policy-Dr_wjNho.js +93 -0
- package/dist/plugin-install-lmnNJcpj.js +2 -0
- package/dist/plugin-install-plan-BysT2Zgt.js +50 -0
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-runtime.js +4 -4
- package/dist/plugin-sdk/approval-runtime.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +3 -3
- package/dist/plugin-sdk/command-auth.js +6 -6
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/config-runtime.js +4 -4
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +2 -2
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/infra-runtime.js +2 -2
- package/dist/plugin-sdk/irc.js +2 -2
- package/dist/plugin-sdk/matrix-runtime-heavy.js +3 -3
- package/dist/plugin-sdk/mattermost.js +4 -4
- package/dist/plugin-sdk/media-runtime.js +3 -3
- package/dist/plugin-sdk/media-understanding.js +2 -2
- package/dist/plugin-sdk/models-provider-runtime.js +2 -2
- package/dist/plugin-sdk/msteams.js +3 -3
- package/dist/plugin-sdk/nextcloud-talk.js +2 -2
- package/dist/plugin-sdk/nostr.js +2 -2
- package/dist/plugin-sdk/provider-auth-api-key.js +2 -2
- package/dist/plugin-sdk/provider-auth-login.js +1 -1
- package/dist/plugin-sdk/provider-auth.js +2 -2
- package/dist/plugin-sdk/provider-entry.js +1 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.js +2 -2
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/session-store-runtime.js +2 -2
- package/dist/plugin-sdk/testing.js +3 -3
- package/dist/plugin-sdk/webhook-path.js +2 -29
- package/dist/plugin-sdk/zalo.js +2 -2
- package/dist/plugin-sdk/zalouser.js +2 -2
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins-cli-QKhcgiO8.js +561 -0
- package/dist/plugins-command-helpers-DhvJn5jI.js +116 -0
- package/dist/plugins-install-persist-Qeas2eSh.js +121 -0
- package/dist/plugins-update-command-BKJEivnf.js +974 -0
- package/dist/policy-Oilx4qmu.js +147 -0
- package/dist/preflight-audio-BmL4gGyL.js +48 -0
- package/dist/preflight-audio.runtime-CAepz41v.js +7 -0
- package/dist/preflight-audio.runtime.js +1 -1
- package/dist/prepare-8M63vDxs.js +1301 -0
- package/dist/probe-Btp49F9p.js +170 -0
- package/dist/probe-CAA_bibg.js +349 -0
- package/dist/probe-CcT1Zjlx.js +431 -0
- package/dist/probe-zQeRFb2K.js +1868 -0
- package/dist/profile-update-P49WNZII.js +67 -0
- package/dist/program-Kb8jcb5x.js +158 -0
- package/dist/prompt-select-styled-G8WwN-L7.js +6434 -0
- package/dist/provider-B2yqefja.js +3685 -0
- package/dist/provider-CzbklD1X.js +70 -0
- package/dist/provider-DIIdFC34.js +18901 -0
- package/dist/provider-api-key-auth-BliP73d_.js +109 -0
- package/dist/provider-api-key-auth.runtime.js +1 -1
- package/dist/provider-auth-DxViiapc.js +43 -0
- package/dist/provider-auth-api-key-BlF9OozZ.js +5 -0
- package/dist/provider-auth-login-DAhr6tMx.js +8 -0
- package/dist/provider-auth-login.runtime.js +1 -1
- package/dist/provider-discovery.runtime.js +1 -1
- package/dist/provider-dispatcher-BEZOvNvI.js +22 -0
- package/dist/provider-entry-CSq-QYSf.js +86 -0
- package/dist/provider-session.runtime-D3rfVYR5.js +7 -0
- package/dist/provider-session.runtime.js +1 -1
- package/dist/provider.runtime-Bbi0dGrm.js +2 -0
- package/dist/provider.runtime.js +1 -1
- package/dist/qr-image-IXoz2Bw3.js +2 -0
- package/dist/queue-Ca31F-8a.js +663 -0
- package/dist/reaction-runtime-api-CZLmJ_WX.js +114 -0
- package/dist/reactions-D-WSon-m.js +258 -0
- package/dist/read-only-account-inspect.telegram-MmNQAAZr.js +202 -0
- package/dist/register.agent-B7D4sSrd.js +240 -0
- package/dist/register.configure-BgQOxerG.js +15 -0
- package/dist/register.maintenance-CiTThGcR.js +449 -0
- package/dist/register.message-CReL6dlw.js +644 -0
- package/dist/register.onboard-DHhhEg9U.js +79 -0
- package/dist/register.setup-COczC1It.js +183 -0
- package/dist/register.status-health-sessions-DRX2aQSL.js +1206 -0
- package/dist/register.subclis-DXBjIEu_.js +3 -0
- package/dist/register.subclis-DokJMw3i.js +295 -0
- package/dist/replies-DuTJPPK4.js +118 -0
- package/dist/reply-CU8qGvKT.js +3192 -0
- package/dist/reply-blocks-BpVJG1en.js +103 -0
- package/dist/reply-dispatch-runtime-DxUm7xv8.js +3 -0
- package/dist/reply-runtime-CvaF7P6-.js +123 -0
- package/dist/reply.runtime-BfN6C1_l.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/resolve-allowlist-C_Y8enFH.js +147 -0
- package/dist/resolve-targets-gk4hti4C.js +280 -0
- package/dist/rooms-Can12aFd.js +325 -0
- package/dist/route-reply-BxhqzhSe.js +133 -0
- package/dist/route-reply.runtime-BuSWcdvc.js +2 -0
- package/dist/route-reply.runtime.js +1 -1
- package/dist/route-resolution-DSj60ZbR.js +461 -0
- package/dist/rpc-context-a4f1uaqq.js +155 -0
- package/dist/run-main-CvRWW8mV.js +425 -0
- package/dist/runner-D_uJ9v3f.js +1479 -0
- package/dist/runtime-8Mw5wFou.js +68 -0
- package/dist/runtime-DQ8O9TLG.js +1175 -0
- package/dist/runtime-api-2l7jjGPw.js +3 -0
- package/dist/runtime-api-3_TNQnpI.js +81 -0
- package/dist/runtime-api-B6vjGOFJ.js +2 -0
- package/dist/runtime-api-BVjd5QC5.js +2 -0
- package/dist/runtime-api-BcMW34og.js +14 -0
- package/dist/runtime-api-Bih0haVa.js +2 -0
- package/dist/runtime-api-CZBqKHRi.js +2 -0
- package/dist/runtime-api-CnP_Jrha.js +2 -0
- package/dist/runtime-api-CnS87iaj.js +2 -0
- package/dist/runtime-api-DOLRVoZD.js +29 -0
- package/dist/runtime-api-R7oPeDFN.js +3676 -0
- package/dist/runtime-api-SP4kFvYZ.js +2 -0
- package/dist/runtime-api-y4jBsmod.js +2 -0
- package/dist/runtime-discord-ops.runtime.js +1 -1
- package/dist/runtime-embedded-pi.runtime-eHP2DunP.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-media-understanding.runtime.js +1 -1
- package/dist/runtime-model-auth.runtime.js +1 -1
- package/dist/runtime-slack-ops.runtime.js +1 -1
- package/dist/runtime-tts.runtime.js +1 -1
- package/dist/sandbox-cli-DT2znKIY.js +443 -0
- package/dist/sdk-V8yEikk_.js +1108 -0
- package/dist/security-cli-DYR5zC6Y.js +477 -0
- package/dist/send-B-Z8V4Cq.js +532 -0
- package/dist/send-Bqywq3tg.js +3 -0
- package/dist/send-BxvA6SmF.js +100 -0
- package/dist/send-ChbtrSVp.js +2 -0
- package/dist/send-CzWEW9Zb.js +856 -0
- package/dist/send-DIfvOzDT.js +318 -0
- package/dist/send-DLHztqfo.js +442 -0
- package/dist/send-DYtTIT9n.js +178 -0
- package/dist/send-DiOk2E98.js +1076 -0
- package/dist/send.components-6LOUmhSy.js +2 -0
- package/dist/send.components-D75OT62r.js +942 -0
- package/dist/server-BNNkiKsj.js +9741 -0
- package/dist/server-cron-DuTAwT4O.js +4173 -0
- package/dist/server-cron-dsNWt3Xk.js +2 -0
- package/dist/server-lite-COJ3scXX.js +830 -0
- package/dist/server-maintenance-B1miba9h.js +542 -0
- package/dist/server-maintenance-Bc6xlNTK.js +2 -0
- package/dist/server-node-events-C8B10rlc.js +454 -0
- package/dist/server-node-subscriptions-BbcfGfam.js +2 -0
- package/dist/server-plugins-40fdRywj.js +10354 -0
- package/dist/server-plugins-D2LGejil.js +2 -0
- package/dist/server-startup-memory-BSth6DJB.js +2 -0
- package/dist/server-tailscale-Bwmz6UuQ.js +2 -0
- package/dist/services-CdVUH8cK.js +2 -0
- package/dist/session-DifMNh_t.js +50 -0
- package/dist/session-archive.runtime-EJGWbu-k.js +2 -0
- package/dist/session-archive.runtime.js +1 -1
- package/dist/session-envelope-Cc5bPuvN.js +18 -0
- package/dist/session-file-C6zGg-sn.js +120 -0
- package/dist/session-key-DPKf0dWL.js +52 -0
- package/dist/session-override-Cd7zBl0i.js +100 -0
- package/dist/session-reset-model.runtime-D_iAW4sx.js +119 -0
- package/dist/session-reset-model.runtime.js +1 -1
- package/dist/session-route-USlsJP9v.js +91 -0
- package/dist/session-store-runtime-Bac-IfWa.js +2 -0
- package/dist/session-subagent-reactivation.runtime-BrSBT1dK.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-transcript-files.fs-D2Mq9mp7.js +149 -0
- package/dist/session-updates-RRq3LS7F.js +222 -0
- package/dist/session-updates.runtime-DlCqhR2y.js +2 -0
- package/dist/session-updates.runtime.js +1 -1
- package/dist/session-utils-B6yctVT6.js +1743 -0
- package/dist/sessions-BDZF0KSB.js +224 -0
- package/dist/sessions-Di_GACQe.js +2 -0
- package/dist/sessions-xeX9HpAZ.js +443 -0
- package/dist/setup-Du8OSH3g.js +427 -0
- package/dist/setup-api-ALaLEpZD.js +2 -0
- package/dist/setup-bootstrap-Dzdz67yA.js +54 -0
- package/dist/setup-core-CljP-9Aw.js +256 -0
- package/dist/setup-core-mlfG8i3t.js +146 -0
- package/dist/setup-surface-8NjprfQ4.js +261 -0
- package/dist/setup-surface-BBhpO_bO.js +304 -0
- package/dist/setup-surface-BpJACnBD.js +450 -0
- package/dist/setup-surface-C3-Jx6vF.js +272 -0
- package/dist/setup-surface-CzMh5yAL.js +656 -0
- package/dist/setup-surface-CzzVm3hE.js +353 -0
- package/dist/setup-surface-D6yTgwHY.js +346 -0
- package/dist/setup-surface-DjJE20Ud.js +484 -0
- package/dist/setup-surface-DpqfELkE.js +261 -0
- package/dist/setup-surface-VdCxFOLw.js +237 -0
- package/dist/setup-surface-fuNIOdUY.js +8848 -0
- package/dist/setup-surface-v155bftZ.js +333 -0
- package/dist/setup.finalize-iyzp5VAT.js +458 -0
- package/dist/setup.gateway-config-CU0y8lbT.js +247 -0
- package/dist/shared-Blh_fJTo.js +64 -0
- package/dist/shared-CBnUPRHA.js +180 -0
- package/dist/shared-CM5Gt0l4.js +198 -0
- package/dist/shared-CaqlRGF3.js +160 -0
- package/dist/shared-Cf75swpz.js +144 -0
- package/dist/shared-DL7by7Wd.js +2 -0
- package/dist/shared-DSx0wubR.js +72 -0
- package/dist/shared-DykGaEWS.js +94 -0
- package/dist/shared-azg27y31.js +78 -0
- package/dist/shared-runtime-Bt4waeX3.js +7 -0
- package/dist/skills-install-ByDR1-M6.js +819 -0
- package/dist/slash-commands-DG50c1a2.js +672 -0
- package/dist/slash-commands.runtime-CVcxhZ8u.js +20 -0
- package/dist/slash-commands.runtime.js +1 -1
- package/dist/slash-dispatch.runtime-C_YtFTUx.js +38 -0
- package/dist/slash-dispatch.runtime.js +1 -1
- package/dist/slash-skill-commands.runtime-Bj_cUvfb.js +8 -0
- package/dist/slash-skill-commands.runtime.js +1 -1
- package/dist/speech-provider-CC-UZuqH.js +190 -0
- package/dist/src-CAL53FNb.js +2739 -0
- package/dist/startup-verification-BpSIv6hV.js +131 -0
- package/dist/state-migrations-BZk1lezo.js +845 -0
- package/dist/status-8IelSped.js +650 -0
- package/dist/status-BVcZIA1F.js +3 -0
- package/dist/status-Bf-qPLzv.js +608 -0
- package/dist/status-BviySeE3.js +2 -0
- package/dist/status-all-Cmj7Gw5o.js +798 -0
- package/dist/status-issues--arI8w_g.js +187 -0
- package/dist/status-issues-byw_R8T_.js +336 -0
- package/dist/status-json-CKuOdeh3.js +86 -0
- package/dist/status.command.text-runtime-B3Z2fUDH.js +18 -0
- package/dist/status.scan-boBZeJmL.js +264 -0
- package/dist/status.scan.fast-json-AJppC2D5.js +97 -0
- package/dist/status.scan.fast-json-shj4aBtI.js +2 -0
- package/dist/status.scan.json-core-BpHhaewp.js +254 -0
- package/dist/status.summary-C4itGbbW.js +210 -0
- package/dist/status.summary-zSPMfFai.js +2 -0
- package/dist/sticker-cache-BN_g5-an.js +1573 -0
- package/dist/sticker-vision.runtime-DC2hIjcl.js +16 -0
- package/dist/sticker-vision.runtime.js +1 -1
- package/dist/storage-YrOCuZuJ.js +234 -0
- package/dist/store-DJaTq2_f.js +1343 -0
- package/dist/store.runtime-B05zX98d.js +2 -0
- package/dist/store.runtime.js +1 -1
- package/dist/stream-D5aKuhrW.js +633 -0
- package/dist/subagent-orphan-recovery-vUbckcfb.js +206 -0
- package/dist/subagent-registry-runtime-BE_luJ3B.js +2 -0
- package/dist/supervisor-log.runtime.js +1 -1
- package/dist/targets-BG8dKyny.js +748 -0
- package/dist/task-registry-delivery-runtime-B-oO-IGC.js +2 -0
- package/dist/task-registry.audit-BCghpxrn.js +320 -0
- package/dist/task-registry.maintenance-B55J7Hf8.js +2 -0
- package/dist/telegram/token.js +1 -1
- package/dist/test-api-BBW7IReU.js +47 -0
- package/dist/testing-fkQ9XFkv.js +677 -0
- package/dist/thread-bindings-B0ugWuKq.js +534 -0
- package/dist/thread-bindings-Dx2arldI.js +778 -0
- package/dist/thread-bindings-iFF5pMFx.js +219 -0
- package/dist/thread-bindings-lTuhY3On.js +352 -0
- package/dist/thread-bindings.discord-api-iGyDtjBI.js +487 -0
- package/dist/threading-7EMTgTsu.js +832 -0
- package/dist/threading-BkydE-cL.js +2 -0
- package/dist/threading-tool-context-C3JbrV_5.js +157 -0
- package/dist/token-wT6DwKaB.js +82 -0
- package/dist/tool-actions.runtime-B5mERIej.js +532 -0
- package/dist/tool-actions.runtime.js +1 -1
- package/dist/tools-effective-inventory-DWXkEygO.js +148 -0
- package/dist/tts.runtime.js +1 -1
- package/dist/ui-CC9JMpg4.js +212 -0
- package/dist/update-BjW3w9eI.js +1253 -0
- package/dist/update-cli-B27tZquO.js +1447 -0
- package/dist/update-runner-BMiyTW62.js +1195 -0
- package/dist/verification-C_ZgAv5v.js +130 -0
- package/dist/verification-DCQ1M0pg.js +2 -0
- package/dist/x-search-Btj7UfUg.js +166 -0
- package/dist/zalo-CnU0tzBl.js +13 -0
- package/dist/zalo-js-InpiWFuE.js +1156 -0
- package/dist/zalouser-CuRMbL4r.js +22 -0
- package/package.json +4 -1
- package/dist/abort-CuFxEr2t.js +0 -192
- package/dist/abort-cutoff.runtime-CU97Q3Ef.js +0 -20
- package/dist/abort.runtime-CZflOJv6.js +0 -2
- package/dist/access-control-CLswIHY1.js +0 -152
- package/dist/account-inspect-DiDpXY0-.js +0 -158
- package/dist/accounts-BwSkt2tm.js +0 -57
- package/dist/accounts-C8c90Uek.js +0 -2
- package/dist/accounts-CiFhbmdr.js +0 -107
- package/dist/accounts-D9Qnnbfl.js +0 -102
- package/dist/accounts-DKwfzzAC.js +0 -137
- package/dist/acp-runtime-CwGef6ZP.js +0 -8
- package/dist/acp-stateful-target-driver-p0EDW10u.js +0 -60
- package/dist/action-runtime-BWY3HXxf.js +0 -318
- package/dist/action-runtime-DNi9yizU.js +0 -72
- package/dist/action-runtime-api-BSPlMrO-.js +0 -1028
- package/dist/actions-MNvlds_S.js +0 -531
- package/dist/actions.runtime--mEwSSNe.js +0 -18
- package/dist/actions.runtime-B1HzEE8Z.js +0 -5
- package/dist/actions.runtime-BG6xvov3.js +0 -2
- package/dist/agent-CGwFOztX.js +0 -2
- package/dist/agent-command-IPMBbUVI.js +0 -1457
- package/dist/agent-runner.runtime-Bzf0jJA9.js +0 -2241
- package/dist/agent-runtime-oVxaAl9G.js +0 -142
- package/dist/agent-tools-login-BIEsXGSl.js +0 -57
- package/dist/agents-CYexVjSC.js +0 -888
- package/dist/agents-DpXXlVMm.js +0 -5
- package/dist/api-B5hYfONF2.js +0 -322
- package/dist/api-CWf7SD_r.js +0 -2
- package/dist/api-CoVu8JQC.js +0 -6
- package/dist/api-D1zC-04H.js +0 -2
- package/dist/api-DAJXC6Eh.js +0 -5
- package/dist/api-DIBiOiU5.js +0 -5
- package/dist/api-DNiO8MKu.js +0 -10
- package/dist/apply-T4gGjbIw.js +0 -485
- package/dist/apply.runtime-BIKyTMdb.js +0 -2
- package/dist/approval-native-PdTPYbWz.js +0 -79
- package/dist/approval-runtime-DQds_bzO.js +0 -262
- package/dist/attachment-normalize-KVBm83XJ.js +0 -921
- package/dist/audit-ClUk-eTw.js +0 -892
- package/dist/audit-NQngcqbL.js +0 -86
- package/dist/audit-channel.collect.runtime-BJlZ1Tqv.js +0 -528
- package/dist/audit-channel.telegram.runtime-CoLwvFcv.js +0 -8
- package/dist/audit-extra.async-B3ODYISl.js +0 -820
- package/dist/audit.deep.runtime-BaiMFfPv.js +0 -2
- package/dist/audit.nondeep.runtime-Cvt1jVHR.js +0 -831
- package/dist/audit.runtime-BOuTTKD4.js +0 -7
- package/dist/auth-BuSqMfLL.js +0 -181
- package/dist/auth-choice-B69NsSNK.js +0 -69
- package/dist/auth-choice-C7dAbZYQ.js +0 -3
- package/dist/auth-choice-ChlvsxHZ.js +0 -341
- package/dist/binding-targets-i1Phu9Ml.js +0 -99
- package/dist/bot-DA6nZ125.js +0 -4268
- package/dist/bot-message-context-4RzAPTiL.js +0 -2
- package/dist/bot-message-context-Bd0CyeDw.js +0 -1175
- package/dist/bot-message-context.runtime-CwPXKJUK.js +0 -7
- package/dist/bot-message-context.session.runtime-C9Qk9RJ2.js +0 -12
- package/dist/bot-native-commands.delivery.runtime-DP3bmRQI.js +0 -3
- package/dist/bot-native-commands.runtime-CIprmHSX.js +0 -11
- package/dist/build-info.json +0 -5
- package/dist/bundled/boot-md/HOOK.md +0 -20
- package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
- package/dist/bundled/command-logger/HOOK.md +0 -122
- package/dist/bundled/session-memory/HOOK.md +0 -108
- package/dist/bundled/workflow-summary/HOOK.md +0 -123
- package/dist/canvas-host/a2ui/.bundle.hash +0 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +0 -14896
- package/dist/canvas-host/a2ui/index.html +0 -307
- package/dist/channel-5dQinNdH.js +0 -783
- package/dist/channel-7CzQF9TT.js +0 -1135
- package/dist/channel-B4fvHRK-.js +0 -698
- package/dist/channel-B_TyijiN.js +0 -454
- package/dist/channel-Bcj7dCz-.js +0 -208
- package/dist/channel-CAPp1zv2.js +0 -599
- package/dist/channel-CSFDlAzr.js +0 -337
- package/dist/channel-CYMfBONo.js +0 -4976
- package/dist/channel-CkvHjmWG.js +0 -883
- package/dist/channel-CoWCft7t.js +0 -1217
- package/dist/channel-DNTrg5rc.js +0 -1661
- package/dist/channel-Dw5L6ZCL.js +0 -1129
- package/dist/channel-DzPVCd5F.js +0 -361
- package/dist/channel-GiLFmQxZ.js +0 -800
- package/dist/channel-XFvR7Dxh.js +0 -788
- package/dist/channel-inbound-bfoCnYI3.js +0 -30
- package/dist/channel-plugin-resolution-BMT07Y4B.js +0 -144
- package/dist/channel-shared-BNnyz1wC.js +0 -58
- package/dist/channel.runtime-B_dMxh1q.js +0 -125
- package/dist/channel.runtime-B_fR3JCp.js +0 -335
- package/dist/channel.runtime-BhQ_73jj.js +0 -14
- package/dist/channel.runtime-CDgrnVP6.js +0 -108
- package/dist/channel.runtime-DPFtjm6K.js +0 -309
- package/dist/channel.runtime-DigoZ45U.js +0 -80
- package/dist/channel.runtime-IHt2hi0h.js +0 -22252
- package/dist/channel.runtime-M3E3w35V.js +0 -373
- package/dist/channel.setup-CQIfV874.js +0 -279
- package/dist/channels-PlRayWHp.js +0 -1134
- package/dist/channels-cli-B4MObWHe.js +0 -246
- package/dist/clawhub-UfARocx9.js +0 -163
- package/dist/cli-B7qV90_y.js +0 -152
- package/dist/cli-DoYOPf2E.js +0 -695
- package/dist/cli-migration-7qu0VuUR.js +0 -100
- package/dist/cli-runner-C1qdQ4P5.js +0 -1014
- package/dist/cli-startup-metadata.json +0 -14
- package/dist/client-bootstrap-Bf-VJF8o.js +0 -2
- package/dist/client-bootstrap-BtDC_ghW.js +0 -121
- package/dist/client-c8NPFdV6.js +0 -7
- package/dist/client-xBBbf9T_.js +0 -5
- package/dist/code-execution-IwkUcM9K.js +0 -142
- package/dist/command-auth-CDvEQqI-.js +0 -64
- package/dist/command-registry-1pRI9W0V.js +0 -3
- package/dist/command-registry-Dr8xswzu.js +0 -199
- package/dist/commands-B7zoPsaq.js +0 -4
- package/dist/commands-acp-_0Jt7bpI.js +0 -990
- package/dist/commands-core-B2PxYebU.js +0 -241
- package/dist/commands-core.runtime-Bk-kMe8I.js +0 -2
- package/dist/commands-handlers.runtime-Dp-fdvyC.js +0 -3708
- package/dist/commands-info-CM-kPvq5.js +0 -651
- package/dist/commands-models-B_KkCnYQ.js +0 -395
- package/dist/commands-status.runtime-B7xG5l06.js +0 -2
- package/dist/commands.runtime-DTcg2ygT.js +0 -4
- package/dist/compact.runtime-C-TOc6On.js +0 -7
- package/dist/completion-cli-DYyVmY2G.js +0 -466
- package/dist/completion-cli-IsVueMzq.js +0 -2
- package/dist/config-DgES7wDO.js +0 -475
- package/dist/config-cli-B-FLvmji.js +0 -945
- package/dist/config-guard-DolG9Hb3.js +0 -113
- package/dist/config-runtime-DOU6nuit.js +0 -13
- package/dist/config-secret-input.runtime-D8uisXyK.js +0 -3
- package/dist/config-update-6NzLhzi0.js +0 -3
- package/dist/config-update-DvNp6OTj.js +0 -127
- package/dist/configure-BMLNn-t4.js +0 -1140
- package/dist/configure-Ce061vUB.js +0 -2
- package/dist/context-B_IskqEg.js +0 -227
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/agents-CouEImnJ.js +0 -813
- package/dist/control-ui/assets/anthropic-D2gWjM8y.js +0 -37
- package/dist/control-ui/assets/azure-openai-responses-rSA0t6IS.js +0 -2
- package/dist/control-ui/assets/channel-config-extras-DNCeHtEf.js +0 -2
- package/dist/control-ui/assets/channels-BgJBIl8z.js +0 -349
- package/dist/control-ui/assets/cron-CESIxOYW.js +0 -928
- package/dist/control-ui/assets/de-DU-XmSEb.js +0 -2
- package/dist/control-ui/assets/debug-BAZT8Cur.js +0 -94
- package/dist/control-ui/assets/directive-C6NBp6xJ.js +0 -2
- package/dist/control-ui/assets/dist-D8DZLmCF.js +0 -18
- package/dist/control-ui/assets/es-Be891ZDf.js +0 -2
- package/dist/control-ui/assets/event-stream-B8X6sYaV.js +0 -2
- package/dist/control-ui/assets/format-nUIQxx1z.js +0 -2
- package/dist/control-ui/assets/github-copilot-headers-CrI0CIJ7.js +0 -2
- package/dist/control-ui/assets/google-B2pGWEiN.js +0 -2
- package/dist/control-ui/assets/google-gemini-cli-BpxbH95Q.js +0 -3
- package/dist/control-ui/assets/google-shared-CbPHVnPr.js +0 -12
- package/dist/control-ui/assets/google-vertex-lQwbjEII.js +0 -2
- package/dist/control-ui/assets/hash-Bt1aVMQ3.js +0 -2
- package/dist/control-ui/assets/index-C0UxQzEn.js +0 -4813
- package/dist/control-ui/assets/index-DOMg2RvO.css +0 -1
- package/dist/control-ui/assets/instances-ClbVvaQy.js +0 -57
- package/dist/control-ui/assets/lit-zdTgzAJI.js +0 -3
- package/dist/control-ui/assets/logs-vVeVJ0CI.js +0 -74
- package/dist/control-ui/assets/mistral-imHzDZ_7.js +0 -8
- package/dist/control-ui/assets/nodes-CeaJKODa.js +0 -430
- package/dist/control-ui/assets/openai-Cn7eGqwa.js +0 -17
- package/dist/control-ui/assets/openai-codex-responses-DRaOkrRO.js +0 -8
- package/dist/control-ui/assets/openai-completions-0yOZERna.js +0 -6
- package/dist/control-ui/assets/openai-responses-8vqADgIw.js +0 -2
- package/dist/control-ui/assets/openai-responses-shared-Q7jopnLp.js +0 -11
- package/dist/control-ui/assets/preload-helper-xBbMyY7u.js +0 -1
- package/dist/control-ui/assets/pt-BR-RqwUvKTB.js +0 -2
- package/dist/control-ui/assets/sessions-CiBN6LBg.js +0 -236
- package/dist/control-ui/assets/skills-shared-DJsJP4-4.js +0 -11
- package/dist/control-ui/assets/skills-yhlO3Ote.js +0 -216
- package/dist/control-ui/assets/transform-messages-XKqwKV3D.js +0 -2
- package/dist/control-ui/assets/zh-CN-CUzhgfRs.js +0 -2
- package/dist/control-ui/assets/zh-TW-CCgwa2eS.js +0 -2
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +0 -66
- package/dist/control-ui/index.html +0 -75
- package/dist/conversation-bindings-BWn8Eq0t.js +0 -210
- package/dist/conversation-id-CIpyn-VD.js +0 -168
- package/dist/conversation-runtime-BpJdJqei.js +0 -85
- package/dist/core-BsdZRsb0.js +0 -195
- package/dist/create-client-HZBJ7-Fl.js +0 -2
- package/dist/create-client-WqOz1ro_.js +0 -58
- package/dist/credentials-5vTiF-oK.js +0 -22
- package/dist/credentials-write.runtime-3bouyp8U.js +0 -9
- package/dist/crypto-runtime-DirRLBDM.js +0 -3495
- package/dist/daemon-cli-AJpZY4sn.js +0 -383
- package/dist/daemon-install-FZTHcBaU.js +0 -63
- package/dist/delegate-BaC3I_I2.js +0 -43
- package/dist/deliver-BaDjGKa4.js +0 -3
- package/dist/deliver-CWBM3uFK.js +0 -954
- package/dist/deliver-reply-B1lULS4T.js +0 -238
- package/dist/deliver-runtime-C9wPhPVo.js +0 -2
- package/dist/delivery-info-UablM7m8.js +0 -40
- package/dist/delivery-jNAx1UXj.js +0 -834
- package/dist/direct-dm-BOWirToy.js +0 -139
- package/dist/direct-management-D7iGx6GI.js +0 -300
- package/dist/direct-management-DmQUf3My.js +0 -2
- package/dist/directive-handling.fast-lane-BgUe6rBZ.js +0 -64
- package/dist/directive-handling.fast-lane-C__EV2OZ.js +0 -2
- package/dist/directive-handling.impl-D466FFH9.js +0 -672
- package/dist/directive-handling.impl-tl3nNkjQ.js +0 -2
- package/dist/directive-handling.parse-H-NqZbGQ.js +0 -375
- package/dist/directive-handling.persist-D-TH7X00.js +0 -133
- package/dist/directive-handling.persist.runtime-CKzh0FFl.js +0 -2
- package/dist/directive-handling.shared-CMdDhj2s.js +0 -158
- package/dist/directory-cli-BkFOqvau.js +0 -238
- package/dist/directory.static-CWHw_6bd.js +0 -45
- package/dist/discovery-CmDmBzyt.js +0 -171
- package/dist/dispatch-5P8XNY-z.js +0 -858
- package/dist/dispatch-acp.runtime-BXLlUo6a.js +0 -884
- package/dist/doctor-completion-C-PtqnX4.js +0 -90
- package/dist/doctor-config-preflight--G_zFI_P.js +0 -148
- package/dist/doctor-config-preflight-Cgmj0J2d.js +0 -2
- package/dist/doctor-state-migrations-B4vgkpe8.js +0 -3
- package/dist/doctor-state-migrations-R3EnGfXE.js +0 -2
- package/dist/embedding-provider-DllEP1OZ.js +0 -129
- package/dist/encryption-guidance-DDwXFxqS.js +0 -33
- package/dist/error-text-C4BdRT0b.js +0 -24
- package/dist/exec-approval-session-target-BpHDdAt6.js +0 -159
- package/dist/exec-approvals-Lpud2QXU.js +0 -121
- package/dist/export-html/template.css +0 -1060
- package/dist/export-html/template.html +0 -88
- package/dist/export-html/template.js +0 -1875
- package/dist/export-html/vendor/highlight.min.js +0 -1213
- package/dist/export-html/vendor/marked.min.js +0 -6
- package/dist/format-CerBTToC.js +0 -817
- package/dist/gateway-BuNsK2ll.js +0 -2575
- package/dist/gateway-cli-WL9O_amN.js +0 -1596
- package/dist/gateway-install-token-DBjV7vuQ.js +0 -230
- package/dist/get-reply-from-config.runtime-Ci2UvY3-.js +0 -2
- package/dist/gmail-watcher-lifecycle-BE_4dMST.js +0 -2
- package/dist/graph-users-CGePGfzI.js +0 -918
- package/dist/group-access-D9zxJ9Eg.js +0 -119
- package/dist/group-access-qaCYNF5W.js +0 -32
- package/dist/handle-action-CqjxOWwH.js +0 -500
- package/dist/health-Ckh-98zt.js +0 -577
- package/dist/health-Dte2hwwy.js +0 -2
- package/dist/heartbeat-runner-BSkqJHkl.js +0 -995
- package/dist/hooks-cli-5qH5guhQ.js +0 -353
- package/dist/http-client-E-AK0hBj.js +0 -294
- package/dist/image-Dflgshq4.js +0 -152
- package/dist/image-runtime-C8N4pHiL.js +0 -7
- package/dist/inbound-reply-dispatch-DnSGPONh.js +0 -73
- package/dist/inbound.runtime-CSV1NzQc.js +0 -3
- package/dist/infra-runtime-B0CHuzrJ.js +0 -22
- package/dist/install-security-scan-pEC-BNIh.js +0 -22
- package/dist/install-security-scan.runtime-KtCBz8Ms.js +0 -299
- package/dist/install-slQpgebI.js +0 -590
- package/dist/install.runtime-BDKuVJIa.js +0 -27
- package/dist/install.runtime-Cdb5F3uW.js +0 -11
- package/dist/irc-CWidrqqa.js +0 -14
- package/dist/legacy-crypto-restore-DrVtd4-4.js +0 -85
- package/dist/library-CmpBsnzV.js +0 -44
- package/dist/llm-slug-generator-5ztca3GP.js +0 -68
- package/dist/loader-BOVnpEv5.js +0 -2
- package/dist/login-I8HWXek2.js +0 -108
- package/dist/login-Xx8YN-Ut.js +0 -2332
- package/dist/login-qr-AEmAM7Qe.js +0 -211
- package/dist/login-qr-api-BSW8Ta-A.js +0 -16
- package/dist/manager.runtime-DpPqh8fu.js +0 -670
- package/dist/matrix-CVj94cvn.js +0 -351
- package/dist/matrix-runtime-heavy-n2o8hviY.js +0 -4
- package/dist/mattermost-D0PPzHDR.js +0 -18
- package/dist/media-CS8BGM6_.js +0 -1691
- package/dist/media-runtime-CzcnSxHP.js +0 -295
- package/dist/media-understanding-6pmWMadX.js +0 -51
- package/dist/media-understanding-provider--2czf2Xl.js +0 -16
- package/dist/media-understanding-provider-1v3aAmph.js +0 -17
- package/dist/media-understanding-provider-Bo02B0WG.js +0 -16
- package/dist/media-understanding-provider-C1e568I5.js +0 -86
- package/dist/media-understanding-provider-DftOn7qM.js +0 -28
- package/dist/media-understanding-provider-JfEcvB6a.js +0 -11
- package/dist/media-understanding-provider-Zvb9Fi0L.js +0 -11
- package/dist/media-understanding-provider-fpeKUYrh.js +0 -11
- package/dist/media-understanding.runtime-CBg9Myvx.js +0 -7
- package/dist/message-DTcLbUjJ.js +0 -206
- package/dist/message-action-runner-Nkrb1psP.js +0 -1330
- package/dist/message-handler-ozmV6rws.js +0 -1771
- package/dist/messages-W3Tl9C55.js +0 -270
- package/dist/migration-snapshot.runtime-CBx6_nXj.js +0 -3
- package/dist/model-catalog-BdRYqKL1.js +0 -216
- package/dist/model-catalog.runtime--yFOIYWV.js +0 -2
- package/dist/model-picker-Cgjw3ytp.js +0 -3
- package/dist/model-picker-jZueDrUL.js +0 -439
- package/dist/model-runtime-51DWArDE.js +0 -1772
- package/dist/model-selection-BohZPMIS.js +0 -407
- package/dist/models-By72Z6_k.js +0 -2550
- package/dist/models-Dgkh71VB.js +0 -3
- package/dist/models-cli-6ZWkpdCu.js +0 -197
- package/dist/models-config-C4DcwiKp.js +0 -2
- package/dist/models-config-CMbP7C_L.js +0 -1106
- package/dist/models-config.runtime-Chha_CyE.js +0 -2
- package/dist/models-provider-runtime-Bu0Agcak.js +0 -2
- package/dist/monitor-B7gDwViK.js +0 -3622
- package/dist/monitor-BE6u7xIu.js +0 -1525
- package/dist/monitor-BRMbIrFT.js +0 -3660
- package/dist/monitor-COLTfgXl.js +0 -676
- package/dist/monitor-CvHGVZmI.js +0 -4067
- package/dist/monitor-DB9RduAn.js +0 -687
- package/dist/monitor-DL7WkrAh.js +0 -666
- package/dist/monitor-auth-EM0izKiw.js +0 -192
- package/dist/monitor-polling.runtime-DFWDyq0r.js +0 -307
- package/dist/monitor-provider-BCduxzuC.js +0 -1782
- package/dist/monitor-webhook.runtime-66MaZoy1.js +0 -297
- package/dist/msteams-DfVsNAAv.js +0 -33
- package/dist/nextcloud-talk-DzdSPp33.js +0 -18
- package/dist/nostr-CA9Nyz3w.js +0 -19
- package/dist/notify-C6g-CT-E.js +0 -298
- package/dist/oauth-0jEycYdH.js +0 -152
- package/dist/onboard-BBY0wtI-.js +0 -591
- package/dist/onboard-BJZUne8W.js +0 -307
- package/dist/onboard-channels-2M_l-yYq.js +0 -705
- package/dist/onboard-channels-B8fOn_J8.js +0 -2
- package/dist/onboard-custom-BQxH-LlD.js +0 -646
- package/dist/onboard-custom-BXJFm5tv.js +0 -2
- package/dist/onboard-helpers-DAmUY5cA.js +0 -228
- package/dist/onboard-helpers-DalDwXjg.js +0 -4
- package/dist/onboard-remote-CAS2F09D.js +0 -2
- package/dist/onboard-remote-nfFOhKzl.js +0 -193
- package/dist/onboard-skills-CH4ZsJr7.js +0 -2
- package/dist/onboard-skills-DSYZC5D0.js +0 -134
- package/dist/openai-codex-provider-B_8TNnmh.js +0 -254
- package/dist/openai-provider-CwnYhA5Q.js +0 -272
- package/dist/openclaw-tools.runtime-1mX4RgUb.js +0 -2
- package/dist/outbound-adapter-DDaf1Qmt.js +0 -183
- package/dist/outbound-session-XCEG44pM.js +0 -41
- package/dist/persistent-bindings.lifecycle-CC1LNlZw.js +0 -159
- package/dist/pi-embedded-B2zIKehU.js +0 -40738
- package/dist/pi-embedded.runtime-tIoF88cE.js +0 -4
- package/dist/plugin-install-CqzqZMog.js +0 -230
- package/dist/plugin-install-P8ACZKV4.js +0 -2
- package/dist/plugin-install-config-policy-CWxlz2Uf.js +0 -93
- package/dist/plugin-install-plan-D2X3sbgg.js +0 -50
- package/dist/plugin-sdk/account-core.d.ts +0 -1
- package/dist/plugin-sdk/account-helpers.d.ts +0 -1
- package/dist/plugin-sdk/account-id.d.ts +0 -1
- package/dist/plugin-sdk/account-resolution.d.ts +0 -1
- package/dist/plugin-sdk/acp-runtime.d.ts +0 -1
- package/dist/plugin-sdk/agent-config-primitives.d.ts +0 -1
- package/dist/plugin-sdk/agent-runtime.d.ts +0 -1
- package/dist/plugin-sdk/allow-from.d.ts +0 -1
- package/dist/plugin-sdk/allowlist-config-edit.d.ts +0 -1
- package/dist/plugin-sdk/amazon-bedrock.d.ts +0 -1
- package/dist/plugin-sdk/anthropic-vertex.d.ts +0 -1
- package/dist/plugin-sdk/approval-runtime.d.ts +0 -1
- package/dist/plugin-sdk/bluebubbles-policy.d.ts +0 -1
- package/dist/plugin-sdk/bluebubbles.d.ts +0 -1
- package/dist/plugin-sdk/boolean-param.d.ts +0 -1
- package/dist/plugin-sdk/browser-runtime.d.ts +0 -1
- package/dist/plugin-sdk/browser-support.d.ts +0 -1
- package/dist/plugin-sdk/browser.d.ts +0 -1
- package/dist/plugin-sdk/byteplus.d.ts +0 -1
- package/dist/plugin-sdk/channel-actions.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-helpers.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-primitives.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-schema.d.ts +0 -1
- package/dist/plugin-sdk/channel-config-writes.d.ts +0 -1
- package/dist/plugin-sdk/channel-contract.d.ts +0 -1
- package/dist/plugin-sdk/channel-feedback.d.ts +0 -1
- package/dist/plugin-sdk/channel-inbound.d.ts +0 -1
- package/dist/plugin-sdk/channel-lifecycle.d.ts +0 -1
- package/dist/plugin-sdk/channel-pairing.d.ts +0 -1
- package/dist/plugin-sdk/channel-policy.d.ts +0 -1
- package/dist/plugin-sdk/channel-reply-pipeline.d.ts +0 -1
- package/dist/plugin-sdk/channel-runtime.d.ts +0 -1
- package/dist/plugin-sdk/channel-send-result.d.ts +0 -1
- package/dist/plugin-sdk/channel-setup.d.ts +0 -1
- package/dist/plugin-sdk/channel-status.d.ts +0 -1
- package/dist/plugin-sdk/channel-targets.d.ts +0 -1
- package/dist/plugin-sdk/chutes.d.ts +0 -1
- package/dist/plugin-sdk/cli-backend.d.ts +0 -1
- package/dist/plugin-sdk/cli-runtime.d.ts +0 -1
- package/dist/plugin-sdk/cloudflare-ai-gateway.d.ts +0 -1
- package/dist/plugin-sdk/collection-runtime.d.ts +0 -1
- package/dist/plugin-sdk/command-auth-native.d.ts +0 -1
- package/dist/plugin-sdk/command-auth.d.ts +0 -1
- package/dist/plugin-sdk/command-detection.d.ts +0 -1
- package/dist/plugin-sdk/command-surface.d.ts +0 -1
- package/dist/plugin-sdk/compat.d.ts +0 -1
- package/dist/plugin-sdk/config-runtime.d.ts +0 -1
- package/dist/plugin-sdk/conversation-runtime.d.ts +0 -1
- package/dist/plugin-sdk/core.d.ts +0 -1
- package/dist/plugin-sdk/dangerous-name-runtime.d.ts +0 -1
- package/dist/plugin-sdk/deepseek.d.ts +0 -1
- package/dist/plugin-sdk/device-bootstrap.d.ts +0 -1
- package/dist/plugin-sdk/diagnostic-runtime.d.ts +0 -1
- package/dist/plugin-sdk/diagnostics-otel.d.ts +0 -1
- package/dist/plugin-sdk/diffs.d.ts +0 -1
- package/dist/plugin-sdk/direct-dm.d.ts +0 -1
- package/dist/plugin-sdk/directory-runtime.d.ts +0 -1
- package/dist/plugin-sdk/discord-account.d.ts +0 -1
- package/dist/plugin-sdk/discord-core.d.ts +0 -1
- package/dist/plugin-sdk/discord-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/discord-session-key.d.ts +0 -1
- package/dist/plugin-sdk/discord-surface.d.ts +0 -1
- package/dist/plugin-sdk/discord-thread-bindings.d.ts +0 -1
- package/dist/plugin-sdk/discord-timeouts.d.ts +0 -1
- package/dist/plugin-sdk/discord.d.ts +0 -1
- package/dist/plugin-sdk/error-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extension-shared.d.ts +0 -1
- package/dist/plugin-sdk/extensions/anthropic/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/anthropic/cli-shared.d.ts +0 -8
- package/dist/plugin-sdk/extensions/anthropic/stream-wrappers.d.ts +0 -12
- package/dist/plugin-sdk/extensions/bluebubbles/api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/bluebubbles/src/account-resolve.d.ts +0 -13
- package/dist/plugin-sdk/extensions/bluebubbles/src/accounts.d.ts +0 -17
- package/dist/plugin-sdk/extensions/bluebubbles/src/actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/actions.runtime.d.ts +0 -19
- package/dist/plugin-sdk/extensions/bluebubbles/src/attachments.d.ts +0 -34
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel-shared.d.ts +0 -49
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/channel.runtime.d.ts +0 -13
- package/dist/plugin-sdk/extensions/bluebubbles/src/chat.d.ts +0 -48
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-apply.d.ts +0 -15
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-schema.d.ts +0 -76
- package/dist/plugin-sdk/extensions/bluebubbles/src/config-ui-hints.d.ts +0 -10
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-bindings.d.ts +0 -37
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-id.d.ts +0 -18
- package/dist/plugin-sdk/extensions/bluebubbles/src/conversation-route.d.ts +0 -12
- package/dist/plugin-sdk/extensions/bluebubbles/src/group-policy.d.ts +0 -14
- package/dist/plugin-sdk/extensions/bluebubbles/src/history.d.ts +0 -40
- package/dist/plugin-sdk/extensions/bluebubbles/src/local-file-access.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/media-send.d.ts +0 -14
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-debounce.d.ts +0 -22
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-normalize.d.ts +0 -77
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-processing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-reply-cache.d.ts +0 -36
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-self-chat-cache.d.ts +0 -15
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor-shared.d.ts +0 -31
- package/dist/plugin-sdk/extensions/bluebubbles/src/monitor.d.ts +0 -8
- package/dist/plugin-sdk/extensions/bluebubbles/src/multipart.d.ts +0 -10
- package/dist/plugin-sdk/extensions/bluebubbles/src/participant-contact-names.d.ts +0 -28
- package/dist/plugin-sdk/extensions/bluebubbles/src/probe.d.ts +0 -53
- package/dist/plugin-sdk/extensions/bluebubbles/src/reactions.d.ts +0 -17
- package/dist/plugin-sdk/extensions/bluebubbles/src/request-url.d.ts +0 -1
- package/dist/plugin-sdk/extensions/bluebubbles/src/runtime-api.d.ts +0 -28
- package/dist/plugin-sdk/extensions/bluebubbles/src/runtime.d.ts +0 -6
- package/dist/plugin-sdk/extensions/bluebubbles/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/bluebubbles/src/send-helpers.d.ts +0 -3
- package/dist/plugin-sdk/extensions/bluebubbles/src/send.d.ts +0 -45
- package/dist/plugin-sdk/extensions/bluebubbles/src/session-route.d.ts +0 -2
- package/dist/plugin-sdk/extensions/bluebubbles/src/setup-core.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/setup-surface.d.ts +0 -4
- package/dist/plugin-sdk/extensions/bluebubbles/src/targets.d.ts +0 -45
- package/dist/plugin-sdk/extensions/bluebubbles/src/types.d.ts +0 -121
- package/dist/plugin-sdk/extensions/bluebubbles/src/webhook-shared.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/runtime-api.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/bridge-auth-registry.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/bridge-server.d.ts +0 -24
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp-proxy-bypass.d.ts +0 -31
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp-timeouts.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp.d.ts +0 -125
- package/dist/plugin-sdk/extensions/browser/src/browser/cdp.helpers.d.ts +0 -29
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome-mcp.d.ts +0 -127
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome-mcp.snapshot.d.ts +0 -26
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.d.ts +0 -26
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.executables.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/chrome.profile-decoration.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-core.d.ts +0 -159
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-observe.d.ts +0 -68
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-state.d.ts +0 -93
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-types.d.ts +0 -18
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions-url.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/client-actions.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/browser/client-fetch.d.ts +0 -21
- package/dist/plugin-sdk/extensions/browser/src/browser/client.d.ts +0 -157
- package/dist/plugin-sdk/extensions/browser/src/browser/config-refresh-source.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/config.d.ts +0 -46
- package/dist/plugin-sdk/extensions/browser/src/browser/constants.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/control-auth.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/control-service.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/csrf.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/errors.d.ts +0 -35
- package/dist/plugin-sdk/extensions/browser/src/browser/form-fields.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/http-auth.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/browser/navigation-guard.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/output-atomic.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/browser/paths.d.ts +0 -61
- package/dist/plugin-sdk/extensions/browser/src/browser/profile-capabilities.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/profiles-service.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser/profiles.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/proxy-files.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai-module.d.ts +0 -6
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai-state.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-ai.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-role-snapshot.d.ts +0 -35
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-session.d.ts +0 -182
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-session.page-cdp.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.activity.d.ts +0 -21
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.d.ts +0 -8
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.downloads.d.ts +0 -34
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.interactions.d.ts +0 -135
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.responses.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.shared.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.snapshot.d.ts +0 -66
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.state.d.ts +0 -46
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.storage.d.ts +0 -47
- package/dist/plugin-sdk/extensions/browser/src/browser/pw-tools-core.trace.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/request-policy.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/resolved-config-refresh.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.download.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.hooks.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.act.shared.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.debug.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.shared.d.ts +0 -37
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.snapshot.d.ts +0 -12
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.snapshot.plan.d.ts +0 -22
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/agent.storage.d.ts +0 -14
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/basic.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/dispatcher.d.ts +0 -16
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/index.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/output-paths.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/path-output.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/tabs.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/types.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/browser/routes/utils.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/runtime-lifecycle.d.ts +0 -15
- package/dist/plugin-sdk/extensions/browser/src/browser/safe-filename.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/screenshot.d.ts +0 -9
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.availability.d.ts +0 -19
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.constants.d.ts +0 -7
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.reset.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.selection.d.ts +0 -16
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.tab-ops.d.ts +0 -13
- package/dist/plugin-sdk/extensions/browser/src/browser/server-context.types.d.ts +0 -74
- package/dist/plugin-sdk/extensions/browser/src/browser/server-lifecycle.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/browser/server-middleware.d.ts +0 -6
- package/dist/plugin-sdk/extensions/browser/src/browser/session-tab-registry.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser/snapshot-roles.d.ts +0 -11
- package/dist/plugin-sdk/extensions/browser/src/browser/target-id.d.ts +0 -11
- package/dist/plugin-sdk/extensions/browser/src/browser/trash.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser/url-pattern.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/browser-runtime.d.ts +0 -28
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.actions.d.ts +0 -44
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.d.ts +0 -30
- package/dist/plugin-sdk/extensions/browser/src/browser-tool.schema.d.ts +0 -75
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.element.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.files-downloads.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.form-wait-eval.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/register.navigation.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input/shared.d.ts +0 -20
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-actions-observe.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-debug.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-examples.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-inspect.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-manage.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-resize.d.ts +0 -10
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-shared.d.ts +0 -24
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-state.cookies-storage.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli-state.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/cli/browser-cli.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/cli/command-format.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/cli/core-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/config.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/paths.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/config/port-defaults.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/control-service.d.ts +0 -5
- package/dist/plugin-sdk/extensions/browser/src/core-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/browser/src/gateway/auth.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/gateway/browser-request.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/gateway/net.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/gateway/startup-auth.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/errors.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/fs-safe.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/net/proxy-env.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/net/ssrf.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/path-guards.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/ports.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/secure-random.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/tmp-openclaw-dir.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/infra/ws.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/logging/redact.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/logging/subsystem.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/media/image-ops.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/media/store.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/node-host/invoke-browser.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/plugin-enabled.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/plugin-service.d.ts +0 -2
- package/dist/plugin-sdk/extensions/browser/src/process/exec.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/security/secret-equal.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/server.d.ts +0 -3
- package/dist/plugin-sdk/extensions/browser/src/utils/boolean.d.ts +0 -1
- package/dist/plugin-sdk/extensions/browser/src/utils.d.ts +0 -1
- package/dist/plugin-sdk/extensions/byteplus/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/byteplus/models.d.ts +0 -73
- package/dist/plugin-sdk/extensions/byteplus/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/chutes/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/chutes/models.d.ts +0 -7
- package/dist/plugin-sdk/extensions/chutes/onboard.d.ts +0 -13
- package/dist/plugin-sdk/extensions/chutes/provider-catalog.d.ts +0 -7
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/models.d.ts +0 -14
- package/dist/plugin-sdk/extensions/cloudflare-ai-gateway/onboard.d.ts +0 -32
- package/dist/plugin-sdk/extensions/deepseek/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/deepseek/models.d.ts +0 -4
- package/dist/plugin-sdk/extensions/deepseek/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/action-runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/api.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/runtime-api.d.ts +0 -18
- package/dist/plugin-sdk/extensions/discord/session-key-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.guild-admin.d.ts +0 -9
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.guild.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.messaging.d.ts +0 -33
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation-shared.d.ts +0 -13
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation.d.ts +0 -10
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.presence.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/actions/runtime.shared.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/approval-native.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/audit.d.ts +0 -29
- package/dist/plugin-sdk/extensions/discord/src/channel-actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/chunk.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/client.d.ts +0 -23
- package/dist/plugin-sdk/extensions/discord/src/component-custom-id.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/components-registry.d.ts +0 -16
- package/dist/plugin-sdk/extensions/discord/src/components.d.ts +0 -195
- package/dist/plugin-sdk/extensions/discord/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/draft-chunking.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/draft-stream.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/exec-approvals.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/gateway-logging.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/group-policy.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/guilds.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/mentions.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/message-tool-schema.d.ts +0 -96
- package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components-helpers.d.ts +0 -160
- package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/auto-presence.d.ts +0 -59
- package/dist/plugin-sdk/extensions/discord/src/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-auth.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-decision.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/exec-approvals.d.ts +0 -54
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-handle.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-plugin.d.ts +0 -22
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-registry.d.ts +0 -9
- package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-supervisor.d.ts +0 -25
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-context.d.ts +0 -36
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-job.d.ts +0 -13
- package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-worker.d.ts +0 -22
- package/dist/plugin-sdk/extensions/discord/src/monitor/listeners.d.ts +0 -67
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.types.d.ts +0 -88
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.process.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/message-utils.d.ts +0 -53
- package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker-preferences.d.ts +0 -18
- package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker.d.ts +0 -117
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-context.d.ts +0 -68
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-route.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-ui.d.ts +0 -106
- package/dist/plugin-sdk/extensions/discord/src/monitor/native-command.d.ts +0 -28
- package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/monitor/presence.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider-session.runtime.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.allowlist.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.d.ts +0 -61
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.lifecycle.d.ts +0 -27
- package/dist/plugin-sdk/extensions/discord/src/monitor/provider.startup.d.ts +0 -82
- package/dist/plugin-sdk/extensions/discord/src/monitor/reply-context.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/reply-delivery.d.ts +0 -40
- package/dist/plugin-sdk/extensions/discord/src/monitor/rest-fetch.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/route-resolution.d.ts +0 -40
- package/dist/plugin-sdk/extensions/discord/src/monitor/sender-identity.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/monitor/startup-status.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/monitor/status.d.ts +0 -17
- package/dist/plugin-sdk/extensions/discord/src/monitor/system-events.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.config.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.d.ts +0 -8
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.discord-api.d.ts +0 -41
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.lifecycle.d.ts +0 -60
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.manager.d.ts +0 -21
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.messages.d.ts +0 -1
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.persona.d.ts +0 -6
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.state.d.ts +0 -79
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.types.d.ts +0 -79
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-session-close.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/monitor/thread-title.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/monitor/threading.d.ts +0 -108
- package/dist/plugin-sdk/extensions/discord/src/monitor/timeouts.d.ts +0 -16
- package/dist/plugin-sdk/extensions/discord/src/monitor/typing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/monitor.d.ts +0 -10
- package/dist/plugin-sdk/extensions/discord/src/monitor.gateway.d.ts +0 -12
- package/dist/plugin-sdk/extensions/discord/src/normalize.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/outbound-adapter.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/pluralkit.d.ts +0 -26
- package/dist/plugin-sdk/extensions/discord/src/probe.d.ts +0 -37
- package/dist/plugin-sdk/extensions/discord/src/resolve-allowlist-common.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/resolve-channels.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/resolve-users.d.ts +0 -14
- package/dist/plugin-sdk/extensions/discord/src/retry.d.ts +0 -12
- package/dist/plugin-sdk/extensions/discord/src/send.channels.d.ts +0 -17
- package/dist/plugin-sdk/extensions/discord/src/send.components.d.ts +0 -29
- package/dist/plugin-sdk/extensions/discord/src/send.d.ts +0 -11
- package/dist/plugin-sdk/extensions/discord/src/send.emojis-stickers.d.ts +0 -4
- package/dist/plugin-sdk/extensions/discord/src/send.guild.d.ts +0 -24
- package/dist/plugin-sdk/extensions/discord/src/send.messages.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/send.outbound.d.ts +0 -67
- package/dist/plugin-sdk/extensions/discord/src/send.permissions.d.ts +0 -20
- package/dist/plugin-sdk/extensions/discord/src/send.reactions.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/send.shared.d.ts +0 -86
- package/dist/plugin-sdk/extensions/discord/src/send.types.d.ts +0 -148
- package/dist/plugin-sdk/extensions/discord/src/send.typing.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/session-key-normalization.d.ts +0 -7
- package/dist/plugin-sdk/extensions/discord/src/shared-interactive.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/status-issues.d.ts +0 -2
- package/dist/plugin-sdk/extensions/discord/src/ui.d.ts +0 -19
- package/dist/plugin-sdk/extensions/discord/src/voice/access.d.ts +0 -31
- package/dist/plugin-sdk/extensions/discord/src/voice/command.d.ts +0 -15
- package/dist/plugin-sdk/extensions/discord/src/voice/manager.d.ts +0 -59
- package/dist/plugin-sdk/extensions/discord/src/voice/manager.runtime.d.ts +0 -5
- package/dist/plugin-sdk/extensions/discord/src/voice/sdk-runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/discord/src/voice-message.d.ts +0 -50
- package/dist/plugin-sdk/extensions/discord/timeouts.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/feishu/runtime-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/feishu/src/accounts.d.ts +0 -72
- package/dist/plugin-sdk/extensions/feishu/src/async.d.ts +0 -13
- package/dist/plugin-sdk/extensions/feishu/src/bot-content.d.ts +0 -85
- package/dist/plugin-sdk/extensions/feishu/src/bot-sender-name.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/bot.d.ts +0 -70
- package/dist/plugin-sdk/extensions/feishu/src/client.d.ts +0 -47
- package/dist/plugin-sdk/extensions/feishu/src/config-schema.d.ts +0 -550
- package/dist/plugin-sdk/extensions/feishu/src/conversation-id.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/dedup.d.ts +0 -19
- package/dist/plugin-sdk/extensions/feishu/src/dynamic-agent.d.ts +0 -18
- package/dist/plugin-sdk/extensions/feishu/src/external-keys.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/src/media.d.ts +0 -118
- package/dist/plugin-sdk/extensions/feishu/src/mention.d.ts +0 -52
- package/dist/plugin-sdk/extensions/feishu/src/policy.d.ts +0 -36
- package/dist/plugin-sdk/extensions/feishu/src/post.d.ts +0 -11
- package/dist/plugin-sdk/extensions/feishu/src/probe.d.ts +0 -10
- package/dist/plugin-sdk/extensions/feishu/src/reply-dispatcher.d.ts +0 -35
- package/dist/plugin-sdk/extensions/feishu/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/feishu/src/send-result.d.ts +0 -12
- package/dist/plugin-sdk/extensions/feishu/src/send-target.d.ts +0 -10
- package/dist/plugin-sdk/extensions/feishu/src/send.d.ts +0 -131
- package/dist/plugin-sdk/extensions/feishu/src/setup-core.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/setup-surface.d.ts +0 -3
- package/dist/plugin-sdk/extensions/feishu/src/streaming-card.d.ts +0 -55
- package/dist/plugin-sdk/extensions/feishu/src/targets.d.ts +0 -6
- package/dist/plugin-sdk/extensions/feishu/src/thread-bindings.d.ts +0 -42
- package/dist/plugin-sdk/extensions/feishu/src/types.d.ts +0 -84
- package/dist/plugin-sdk/extensions/feishu/src/typing.d.ts +0 -57
- package/dist/plugin-sdk/extensions/github-copilot/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/github-copilot/login.d.ts +0 -5
- package/dist/plugin-sdk/extensions/google/api.d.ts +0 -33
- package/dist/plugin-sdk/extensions/google/model-id.d.ts +0 -2
- package/dist/plugin-sdk/extensions/huggingface/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/huggingface/models.d.ts +0 -7
- package/dist/plugin-sdk/extensions/huggingface/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/huggingface/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/image-generation-core/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/image-generation-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/image-generation-core/src/runtime.d.ts +0 -24
- package/dist/plugin-sdk/extensions/irc/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/irc/src/accounts.d.ts +0 -23
- package/dist/plugin-sdk/extensions/irc/src/control-chars.d.ts +0 -3
- package/dist/plugin-sdk/extensions/irc/src/normalize.d.ts +0 -18
- package/dist/plugin-sdk/extensions/irc/src/runtime-api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/irc/src/setup-core.d.ts +0 -10
- package/dist/plugin-sdk/extensions/irc/src/setup-surface.d.ts +0 -4
- package/dist/plugin-sdk/extensions/irc/src/types.d.ts +0 -83
- package/dist/plugin-sdk/extensions/kilocode/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/kilocode/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/kilocode/provider-models.d.ts +0 -18
- package/dist/plugin-sdk/extensions/kimi-coding/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/kimi-coding/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/kimi-coding/provider-catalog.d.ts +0 -10
- package/dist/plugin-sdk/extensions/line/runtime-api.d.ts +0 -36
- package/dist/plugin-sdk/extensions/line/src/accounts.d.ts +0 -10
- package/dist/plugin-sdk/extensions/line/src/actions.d.ts +0 -22
- package/dist/plugin-sdk/extensions/line/src/auto-reply-delivery.d.ts +0 -38
- package/dist/plugin-sdk/extensions/line/src/bot-access.d.ts +0 -17
- package/dist/plugin-sdk/extensions/line/src/bot-handlers.d.ts +0 -23
- package/dist/plugin-sdk/extensions/line/src/bot-message-context.d.ts +0 -129
- package/dist/plugin-sdk/extensions/line/src/bot.d.ts +0 -24
- package/dist/plugin-sdk/extensions/line/src/channel-access-token.d.ts +0 -4
- package/dist/plugin-sdk/extensions/line/src/config-schema.d.ts +0 -80
- package/dist/plugin-sdk/extensions/line/src/download.d.ts +0 -7
- package/dist/plugin-sdk/extensions/line/src/flex-templates/basic-cards.d.ts +0 -46
- package/dist/plugin-sdk/extensions/line/src/flex-templates/common.d.ts +0 -2
- package/dist/plugin-sdk/extensions/line/src/flex-templates/media-control-cards.d.ts +0 -73
- package/dist/plugin-sdk/extensions/line/src/flex-templates/message.d.ts +0 -6
- package/dist/plugin-sdk/extensions/line/src/flex-templates/schedule-cards.d.ts +0 -55
- package/dist/plugin-sdk/extensions/line/src/flex-templates/types.d.ts +0 -19
- package/dist/plugin-sdk/extensions/line/src/flex-templates.d.ts +0 -5
- package/dist/plugin-sdk/extensions/line/src/group-keys.d.ts +0 -17
- package/dist/plugin-sdk/extensions/line/src/markdown-to-line.d.ts +0 -67
- package/dist/plugin-sdk/extensions/line/src/monitor.d.ts +0 -28
- package/dist/plugin-sdk/extensions/line/src/probe.d.ts +0 -2
- package/dist/plugin-sdk/extensions/line/src/reply-chunks.d.ts +0 -24
- package/dist/plugin-sdk/extensions/line/src/rich-menu.d.ts +0 -50
- package/dist/plugin-sdk/extensions/line/src/send.d.ts +0 -73
- package/dist/plugin-sdk/extensions/line/src/signature.d.ts +0 -1
- package/dist/plugin-sdk/extensions/line/src/template-messages.d.ts +0 -100
- package/dist/plugin-sdk/extensions/line/src/types.d.ts +0 -120
- package/dist/plugin-sdk/extensions/line/src/webhook-node.d.ts +0 -16
- package/dist/plugin-sdk/extensions/line/src/webhook-utils.d.ts +0 -3
- package/dist/plugin-sdk/extensions/line/src/webhook.d.ts +0 -19
- package/dist/plugin-sdk/extensions/litellm/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/litellm/onboard.d.ts +0 -7
- package/dist/plugin-sdk/extensions/matrix/api.d.ts +0 -9
- package/dist/plugin-sdk/extensions/matrix/runtime-api.d.ts +0 -12
- package/dist/plugin-sdk/extensions/matrix/src/account-selection.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/auth-precedence.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/directory-live.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/env-vars.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/account-config.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/accounts.d.ts +0 -23
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/client.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/types.d.ts +0 -68
- package/dist/plugin-sdk/extensions/matrix/src/matrix/actions/verification.d.ts +0 -78
- package/dist/plugin-sdk/extensions/matrix/src/matrix/active-client.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/async-lock.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/matrix/backup-health.d.ts +0 -19
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config-runtime-api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config-secret-input.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/config.d.ts +0 -55
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/create-client.d.ts +0 -18
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/env-auth.d.ts +0 -23
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/file-sync-store.d.ts +0 -29
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/logging.d.ts +0 -13
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/migration-snapshot.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/private-network-host.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/shared.d.ts +0 -24
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/storage.d.ts +0 -30
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client/types.d.ts +0 -47
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client-bootstrap.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/client.d.ts +0 -6
- package/dist/plugin-sdk/extensions/matrix/src/matrix/config-paths.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/config-update.d.ts +0 -24
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials-read.d.ts +0 -17
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials-write.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/credentials.d.ts +0 -5
- package/dist/plugin-sdk/extensions/matrix/src/matrix/deps.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/direct-management.d.ts +0 -53
- package/dist/plugin-sdk/extensions/matrix/src/matrix/direct-room.d.ts +0 -27
- package/dist/plugin-sdk/extensions/matrix/src/matrix/encryption-guidance.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/errors.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/format.d.ts +0 -17
- package/dist/plugin-sdk/extensions/matrix/src/matrix/outbound-media-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/matrix/poll-types.d.ts +0 -114
- package/dist/plugin-sdk/extensions/matrix/src/matrix/reaction-common.d.ts +0 -32
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-bootstrap.d.ts +0 -34
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-facade.d.ts +0 -67
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-node.runtime.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/crypto-runtime.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/decrypt-bridge.d.ts +0 -45
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/event-helpers.d.ts +0 -10
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/http-client.d.ts +0 -34
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/idb-persistence-lock.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/idb-persistence.d.ts +0 -5
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/logger.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/read-response-with-limit.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/recovery-key-store.d.ts +0 -48
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/transport.d.ts +0 -29
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/types.d.ts +0 -186
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/verification-manager.d.ts +0 -127
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk/verification-status.d.ts +0 -4
- package/dist/plugin-sdk/extensions/matrix/src/matrix/sdk.d.ts +0 -212
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/client.d.ts +0 -15
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/formatting.d.ts +0 -25
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/media.d.ts +0 -42
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/targets.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send/types.d.ts +0 -80
- package/dist/plugin-sdk/extensions/matrix/src/matrix/send.d.ts +0 -54
- package/dist/plugin-sdk/extensions/matrix/src/matrix/target-ids.d.ts +0 -19
- package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings-shared.d.ts +0 -77
- package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings.d.ts +0 -15
- package/dist/plugin-sdk/extensions/matrix/src/onboarding.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/resolve-targets.d.ts +0 -8
- package/dist/plugin-sdk/extensions/matrix/src/runtime-api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/matrix/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/matrix/src/setup-bootstrap.d.ts +0 -20
- package/dist/plugin-sdk/extensions/matrix/src/setup-config.d.ts +0 -12
- package/dist/plugin-sdk/extensions/matrix/src/setup-core.d.ts +0 -2
- package/dist/plugin-sdk/extensions/matrix/src/setup-surface.d.ts +0 -1
- package/dist/plugin-sdk/extensions/matrix/src/storage-paths.d.ts +0 -26
- package/dist/plugin-sdk/extensions/matrix/src/types.d.ts +0 -202
- package/dist/plugin-sdk/extensions/mattermost/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/accounts.d.ts +0 -33
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/client.d.ts +0 -103
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/monitor-auth.d.ts +0 -51
- package/dist/plugin-sdk/extensions/mattermost/src/mattermost/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/mattermost/src/secret-input.d.ts +0 -2
- package/dist/plugin-sdk/extensions/mattermost/src/types.d.ts +0 -105
- package/dist/plugin-sdk/extensions/media-understanding-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/media-understanding-core/src/runtime.d.ts +0 -54
- package/dist/plugin-sdk/extensions/memory-core/runtime-api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/memory-core/src/memory/embeddings.d.ts +0 -21
- package/dist/plugin-sdk/extensions/memory-core/src/memory/hybrid.d.ts +0 -45
- package/dist/plugin-sdk/extensions/memory-core/src/memory/index.d.ts +0 -3
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-embedding-ops.d.ts +0 -47
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-search.d.ts +0 -61
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager-sync-ops.d.ts +0 -142
- package/dist/plugin-sdk/extensions/memory-core/src/memory/manager.d.ts +0 -155
- package/dist/plugin-sdk/extensions/memory-core/src/memory/mmr.d.ts +0 -67
- package/dist/plugin-sdk/extensions/memory-core/src/memory/provider-adapters.d.ts +0 -19
- package/dist/plugin-sdk/extensions/memory-core/src/memory/qmd-manager.d.ts +0 -191
- package/dist/plugin-sdk/extensions/memory-core/src/memory/search-manager.d.ts +0 -12
- package/dist/plugin-sdk/extensions/memory-core/src/memory/temporal-decay.d.ts +0 -25
- package/dist/plugin-sdk/extensions/minimax/api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/minimax/model-definitions.d.ts +0 -35
- package/dist/plugin-sdk/extensions/minimax/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/minimax/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/minimax/provider-models.d.ts +0 -15
- package/dist/plugin-sdk/extensions/mistral/api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/mistral/model-definitions.d.ts +0 -14
- package/dist/plugin-sdk/extensions/mistral/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/mistral/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/modelstudio/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/modelstudio/models.d.ts +0 -27
- package/dist/plugin-sdk/extensions/modelstudio/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/moonshot/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/moonshot/onboard.d.ts +0 -6
- package/dist/plugin-sdk/extensions/moonshot/provider-catalog.d.ts +0 -7
- package/dist/plugin-sdk/extensions/nvidia/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/nvidia/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/ollama/api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/ollama/runtime-api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/ollama/src/defaults.d.ts +0 -11
- package/dist/plugin-sdk/extensions/ollama/src/embedding-provider.d.ts +0 -37
- package/dist/plugin-sdk/extensions/ollama/src/provider-models.d.ts +0 -31
- package/dist/plugin-sdk/extensions/ollama/src/setup.d.ts +0 -36
- package/dist/plugin-sdk/extensions/ollama/src/stream.d.ts +0 -104
- package/dist/plugin-sdk/extensions/openai/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/openai/default-models.d.ts +0 -10
- package/dist/plugin-sdk/extensions/openai/openai-codex-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/openai/openai-provider.d.ts +0 -2
- package/dist/plugin-sdk/extensions/openai/shared.d.ts +0 -5
- package/dist/plugin-sdk/extensions/opencode/api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/opencode/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/opencode-go/api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/opencode-go/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/openrouter/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/openrouter/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/openrouter/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/qianfan/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/qianfan/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/qianfan/provider-catalog.d.ts +0 -4
- package/dist/plugin-sdk/extensions/sglang/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/sglang/defaults.d.ts +0 -4
- package/dist/plugin-sdk/extensions/sglang/models.d.ts +0 -8
- package/dist/plugin-sdk/extensions/signal/api.d.ts +0 -11
- package/dist/plugin-sdk/extensions/signal/reaction-runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/signal/src/accounts.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/client.d.ts +0 -32
- package/dist/plugin-sdk/extensions/signal/src/daemon.d.ts +0 -26
- package/dist/plugin-sdk/extensions/signal/src/format.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/identity.d.ts +0 -25
- package/dist/plugin-sdk/extensions/signal/src/message-actions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/monitor/access-policy.d.ts +0 -40
- package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.d.ts +0 -5
- package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.types.d.ts +0 -128
- package/dist/plugin-sdk/extensions/signal/src/monitor/inbound-context.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/monitor/mentions.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/monitor.d.ts +0 -26
- package/dist/plugin-sdk/extensions/signal/src/normalize.d.ts +0 -2
- package/dist/plugin-sdk/extensions/signal/src/outbound-session.d.ts +0 -8
- package/dist/plugin-sdk/extensions/signal/src/probe.d.ts +0 -7
- package/dist/plugin-sdk/extensions/signal/src/reaction-level.d.ts +0 -17
- package/dist/plugin-sdk/extensions/signal/src/rpc-context.d.ts +0 -9
- package/dist/plugin-sdk/extensions/signal/src/runtime-api.d.ts +0 -25
- package/dist/plugin-sdk/extensions/signal/src/send-reactions.d.ts +0 -34
- package/dist/plugin-sdk/extensions/signal/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/signal/src/setup-core.d.ts +0 -20
- package/dist/plugin-sdk/extensions/signal/src/sse-reconnect.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/api.d.ts +0 -19
- package/dist/plugin-sdk/extensions/slack/runtime-api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/account-inspect.d.ts +0 -32
- package/dist/plugin-sdk/extensions/slack/src/account-surface-fields.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/accounts.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/accounts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/action-runtime.d.ts +0 -38
- package/dist/plugin-sdk/extensions/slack/src/action-threading.d.ts +0 -11
- package/dist/plugin-sdk/extensions/slack/src/actions.d.ts +0 -81
- package/dist/plugin-sdk/extensions/slack/src/actions.runtime.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/approval-auth.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/approval-native.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/blocks-fallback.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/blocks-input.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/blocks-render.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/channel-actions.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/channel-migration.d.ts +0 -20
- package/dist/plugin-sdk/extensions/slack/src/channel-type.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/channel.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/client.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/config-schema.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/config-ui-hints.d.ts +0 -98
- package/dist/plugin-sdk/extensions/slack/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/directory-live.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/draft-stream.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/exec-approvals.d.ts +0 -43
- package/dist/plugin-sdk/extensions/slack/src/format.d.ts +0 -8
- package/dist/plugin-sdk/extensions/slack/src/group-policy.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/http/index.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/http/registry.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/index.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/interactive-replies.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/limits.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/message-action-dispatch.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/message-actions.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/message-tool-schema.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/modal-metadata.d.ts +0 -8
- package/dist/plugin-sdk/extensions/slack/src/monitor/allow-list.d.ts +0 -24
- package/dist/plugin-sdk/extensions/slack/src/monitor/auth.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/monitor/channel-config.d.ts +0 -45
- package/dist/plugin-sdk/extensions/slack/src/monitor/channel-type.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/monitor/commands.d.ts +0 -9
- package/dist/plugin-sdk/extensions/slack/src/monitor/context.d.ts +0 -107
- package/dist/plugin-sdk/extensions/slack/src/monitor/dm-auth.d.ts +0 -17
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/channels.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.block-actions.d.ts +0 -49
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.modal.d.ts +0 -68
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/members.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/message-subtype-handlers.d.ts +0 -13
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/messages.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/pins.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/reactions.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/events/system-event-context.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/events.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/monitor/exec-approvals.d.ts +0 -26
- package/dist/plugin-sdk/extensions/slack/src/monitor/external-arg-menu-store.d.ts +0 -18
- package/dist/plugin-sdk/extensions/slack/src/monitor/media.d.ts +0 -67
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/dispatch.d.ts +0 -21
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-content.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-thread-context.d.ts +0 -28
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.d.ts +0 -13
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.test-helpers.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/preview-finalize.d.ts +0 -44
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/types.d.ts +0 -23
- package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler.d.ts +0 -22
- package/dist/plugin-sdk/extensions/slack/src/monitor/mrkdwn.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/monitor/policy.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/monitor/provider.d.ts +0 -33
- package/dist/plugin-sdk/extensions/slack/src/monitor/reconnect-policy.d.ts +0 -25
- package/dist/plugin-sdk/extensions/slack/src/monitor/replies.d.ts +0 -56
- package/dist/plugin-sdk/extensions/slack/src/monitor/room-context.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-commands.runtime.d.ts +0 -11
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-dispatch.runtime.d.ts +0 -17
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash-skill-commands.runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/monitor/slash.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/monitor/thread-resolution.d.ts +0 -12
- package/dist/plugin-sdk/extensions/slack/src/monitor/types.d.ts +0 -113
- package/dist/plugin-sdk/extensions/slack/src/monitor.d.ts +0 -5
- package/dist/plugin-sdk/extensions/slack/src/outbound-adapter.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/probe.d.ts +0 -14
- package/dist/plugin-sdk/extensions/slack/src/reply-blocks.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/resolve-allowlist-common.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/resolve-channels.d.ts +0 -19
- package/dist/plugin-sdk/extensions/slack/src/resolve-users.d.ts +0 -26
- package/dist/plugin-sdk/extensions/slack/src/runtime-api.d.ts +0 -6
- package/dist/plugin-sdk/extensions/slack/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/scopes.d.ts +0 -7
- package/dist/plugin-sdk/extensions/slack/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/slack/src/sent-thread-cache.d.ts +0 -3
- package/dist/plugin-sdk/extensions/slack/src/setup-core.d.ts +0 -80
- package/dist/plugin-sdk/extensions/slack/src/setup-surface.d.ts +0 -2
- package/dist/plugin-sdk/extensions/slack/src/shared.d.ts +0 -39
- package/dist/plugin-sdk/extensions/slack/src/stream-mode.d.ts +0 -23
- package/dist/plugin-sdk/extensions/slack/src/streaming.d.ts +0 -72
- package/dist/plugin-sdk/extensions/slack/src/targets.d.ts +0 -9
- package/dist/plugin-sdk/extensions/slack/src/threading-tool-context.d.ts +0 -10
- package/dist/plugin-sdk/extensions/slack/src/threading.d.ts +0 -29
- package/dist/plugin-sdk/extensions/slack/src/token.d.ts +0 -4
- package/dist/plugin-sdk/extensions/slack/src/truncate.d.ts +0 -1
- package/dist/plugin-sdk/extensions/slack/src/types.d.ts +0 -58
- package/dist/plugin-sdk/extensions/slack/test-api.d.ts +0 -9
- package/dist/plugin-sdk/extensions/speech-core/api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/speech-core/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/speech-core/src/tts.d.ts +0 -145
- package/dist/plugin-sdk/extensions/synthetic/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/synthetic/models.d.ts +0 -160
- package/dist/plugin-sdk/extensions/synthetic/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/synthetic/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/together/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/together/models.d.ts +0 -4
- package/dist/plugin-sdk/extensions/together/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/together/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/venice/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/venice/models.d.ts +0 -345
- package/dist/plugin-sdk/extensions/venice/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/models.d.ts +0 -15
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/vercel-ai-gateway/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vllm/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/vllm/defaults.d.ts +0 -4
- package/dist/plugin-sdk/extensions/vllm/models.d.ts +0 -8
- package/dist/plugin-sdk/extensions/volcengine/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/volcengine/models.d.ts +0 -94
- package/dist/plugin-sdk/extensions/volcengine/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/api.d.ts +0 -10
- package/dist/plugin-sdk/extensions/whatsapp/constants.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/light-runtime-api.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/login-qr-api.d.ts +0 -5
- package/dist/plugin-sdk/extensions/whatsapp/runtime-api.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/account-config.d.ts +0 -8
- package/dist/plugin-sdk/extensions/whatsapp/src/accounts.d.ts +0 -43
- package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime-target-auth.d.ts +0 -10
- package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/agent-tools-login.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auth-store.d.ts +0 -31
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/constants.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/deliver-reply.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/heartbeat-runner.d.ts +0 -20
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/loggers.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/mentions.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.d.ts +0 -13
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/broadcast.d.ts +0 -16
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/commands.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/echo.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-activation.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-gating.d.ts +0 -33
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-members.d.ts +0 -6
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/inbound-context.d.ts +0 -28
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.d.ts +0 -140
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/last-route.d.ts +0 -15
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/message-line.d.ts +0 -11
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/on-message.d.ts +0 -24
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/peer.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/process-message.d.ts +0 -31
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/runtime-api.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor-state.d.ts +0 -18
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor.d.ts +0 -5
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/session-snapshot.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/types.d.ts +0 -33
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/util.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.impl.d.ts +0 -6
- package/dist/plugin-sdk/extensions/whatsapp/src/channel.runtime.d.ts +0 -23
- package/dist/plugin-sdk/extensions/whatsapp/src/creds-files.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/directory-config.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/group-policy.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/identity.d.ts +0 -52
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/access-control.d.ts +0 -36
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/dedupe.d.ts +0 -12
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/extract.d.ts +0 -8
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/lifecycle.d.ts +0 -14
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/media.d.ts +0 -7
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/monitor.d.ts +0 -32
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/send-api.d.ts +0 -22
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound/types.d.ts +0 -48
- package/dist/plugin-sdk/extensions/whatsapp/src/inbound.d.ts +0 -4
- package/dist/plugin-sdk/extensions/whatsapp/src/login-qr.d.ts +0 -19
- package/dist/plugin-sdk/extensions/whatsapp/src/login.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/media.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/normalize-target.d.ts +0 -3
- package/dist/plugin-sdk/extensions/whatsapp/src/normalize.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/qr-image.d.ts +0 -1
- package/dist/plugin-sdk/extensions/whatsapp/src/reaction-level.d.ts +0 -9
- package/dist/plugin-sdk/extensions/whatsapp/src/reconnect.d.ts +0 -11
- package/dist/plugin-sdk/extensions/whatsapp/src/resolve-outbound-target.d.ts +0 -12
- package/dist/plugin-sdk/extensions/whatsapp/src/runtime-api.d.ts +0 -16
- package/dist/plugin-sdk/extensions/whatsapp/src/send.d.ts +0 -32
- package/dist/plugin-sdk/extensions/whatsapp/src/session-errors.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/session.d.ts +0 -17
- package/dist/plugin-sdk/extensions/whatsapp/src/setup-core.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/setup-surface.d.ts +0 -2
- package/dist/plugin-sdk/extensions/whatsapp/src/vcard.d.ts +0 -6
- package/dist/plugin-sdk/extensions/xai/api.d.ts +0 -27
- package/dist/plugin-sdk/extensions/xai/model-definitions.d.ts +0 -13
- package/dist/plugin-sdk/extensions/xai/model-id.d.ts +0 -1
- package/dist/plugin-sdk/extensions/xai/onboard.d.ts +0 -5
- package/dist/plugin-sdk/extensions/xai/provider-catalog.d.ts +0 -2
- package/dist/plugin-sdk/extensions/xai/provider-models.d.ts +0 -6
- package/dist/plugin-sdk/extensions/xiaomi/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/xiaomi/onboard.d.ts +0 -4
- package/dist/plugin-sdk/extensions/xiaomi/provider-catalog.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zai/api.d.ts +0 -2
- package/dist/plugin-sdk/extensions/zai/model-definitions.d.ts +0 -23
- package/dist/plugin-sdk/extensions/zai/onboard.d.ts +0 -10
- package/dist/plugin-sdk/extensions/zalo/api.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zalo/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/accounts.d.ts +0 -11
- package/dist/plugin-sdk/extensions/zalo/src/group-access.d.ts +0 -17
- package/dist/plugin-sdk/extensions/zalo/src/runtime-api.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/setup-core.d.ts +0 -1
- package/dist/plugin-sdk/extensions/zalo/src/setup-surface.d.ts +0 -3
- package/dist/plugin-sdk/extensions/zalo/src/token.d.ts +0 -8
- package/dist/plugin-sdk/extensions/zalo/src/types.d.ts +0 -46
- package/dist/plugin-sdk/feishu-conversation.d.ts +0 -1
- package/dist/plugin-sdk/feishu-setup.d.ts +0 -1
- package/dist/plugin-sdk/feishu.d.ts +0 -1
- package/dist/plugin-sdk/fetch-runtime.d.ts +0 -1
- package/dist/plugin-sdk/file-lock.d.ts +0 -1
- package/dist/plugin-sdk/gateway-runtime.d.ts +0 -1
- package/dist/plugin-sdk/github-copilot-login.d.ts +0 -1
- package/dist/plugin-sdk/github-copilot-token.d.ts +0 -1
- package/dist/plugin-sdk/global-singleton.d.ts +0 -1
- package/dist/plugin-sdk/google.d.ts +0 -1
- package/dist/plugin-sdk/googlechat.d.ts +0 -1
- package/dist/plugin-sdk/group-access.d.ts +0 -1
- package/dist/plugin-sdk/hook-runtime.d.ts +0 -1
- package/dist/plugin-sdk/host-runtime.d.ts +0 -1
- package/dist/plugin-sdk/huggingface.d.ts +0 -1
- package/dist/plugin-sdk/image-generation-core.d.ts +0 -1
- package/dist/plugin-sdk/image-generation.d.ts +0 -1
- package/dist/plugin-sdk/index.d.ts +0 -1
- package/dist/plugin-sdk/infra-runtime.d.ts +0 -1
- package/dist/plugin-sdk/interactive-runtime.d.ts +0 -1
- package/dist/plugin-sdk/irc-surface.d.ts +0 -1
- package/dist/plugin-sdk/irc.d.ts +0 -1
- package/dist/plugin-sdk/json-store.d.ts +0 -1
- package/dist/plugin-sdk/keyed-async-queue.d.ts +0 -1
- package/dist/plugin-sdk/kilocode.d.ts +0 -1
- package/dist/plugin-sdk/kimi-coding.d.ts +0 -1
- package/dist/plugin-sdk/lazy-runtime.d.ts +0 -1
- package/dist/plugin-sdk/line-core.d.ts +0 -1
- package/dist/plugin-sdk/line-runtime.d.ts +0 -1
- package/dist/plugin-sdk/line-surface.d.ts +0 -1
- package/dist/plugin-sdk/line.d.ts +0 -1
- package/dist/plugin-sdk/llm-task.d.ts +0 -1
- package/dist/plugin-sdk/logging-core.d.ts +0 -1
- package/dist/plugin-sdk/markdown-table-runtime.d.ts +0 -1
- package/dist/plugin-sdk/matrix-helper.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-heavy.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-shared.d.ts +0 -1
- package/dist/plugin-sdk/matrix-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/matrix-surface.d.ts +0 -1
- package/dist/plugin-sdk/matrix-thread-bindings.d.ts +0 -1
- package/dist/plugin-sdk/matrix.d.ts +0 -1
- package/dist/plugin-sdk/mattermost-policy.d.ts +0 -1
- package/dist/plugin-sdk/mattermost.d.ts +0 -1
- package/dist/plugin-sdk/media-runtime.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding-runtime.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-engine-runtime.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-foundation.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-qmd.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-engine-storage.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-multimodal.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-query.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-cli.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-core.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-runtime-files.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-secret.d.ts +0 -1
- package/dist/plugin-sdk/memory-core-host-status.d.ts +0 -1
- package/dist/plugin-sdk/memory-core.d.ts +0 -1
- package/dist/plugin-sdk/memory-lancedb.d.ts +0 -1
- package/dist/plugin-sdk/minimax.d.ts +0 -1
- package/dist/plugin-sdk/mistral.d.ts +0 -1
- package/dist/plugin-sdk/models-provider-runtime.d.ts +0 -1
- package/dist/plugin-sdk/modelstudio-definitions.d.ts +0 -1
- package/dist/plugin-sdk/modelstudio.d.ts +0 -1
- package/dist/plugin-sdk/moonshot.d.ts +0 -1
- package/dist/plugin-sdk/msteams.d.ts +0 -1
- package/dist/plugin-sdk/native-command-registry.d.ts +0 -1
- package/dist/plugin-sdk/nextcloud-talk.d.ts +0 -1
- package/dist/plugin-sdk/nostr.d.ts +0 -1
- package/dist/plugin-sdk/nvidia.d.ts +0 -1
- package/dist/plugin-sdk/ollama-surface.d.ts +0 -1
- package/dist/plugin-sdk/ollama.d.ts +0 -1
- package/dist/plugin-sdk/openai.d.ts +0 -1
- package/dist/plugin-sdk/opencode-go.d.ts +0 -1
- package/dist/plugin-sdk/opencode.d.ts +0 -1
- package/dist/plugin-sdk/outbound-runtime.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-embeddings.d.ts +0 -16
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-foundation.d.ts +0 -20
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine-qmd.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/engine.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-embedding-common.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-error-utils.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-gemini.d.ts +0 -46
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-http.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-openai.d.ts +0 -19
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-output.d.ts +0 -23
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-provider-common.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-runner.d.ts +0 -38
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-status.d.ts +0 -27
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-upload.d.ts +0 -6
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-utils.d.ts +0 -11
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/batch-voyage.d.ts +0 -29
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-chunk-limits.d.ts +0 -3
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-model-limits.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embedding-vectors.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-debug.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-gemini.d.ts +0 -63
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-mistral.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-model-normalize.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-ollama.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-openai.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-client.d.ts +0 -12
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-fetch.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-remote-provider.d.ts +0 -21
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings-voyage.d.ts +0 -15
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/embeddings.d.ts +0 -59
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/node-llama.d.ts +0 -8
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/post-json.d.ts +0 -10
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-process.d.ts +0 -34
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-query-parser.d.ts +0 -11
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/qmd-scope.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/remote-http.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/secret-input.d.ts +0 -5
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/session-files.d.ts +0 -14
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/status-format.d.ts +0 -28
- package/dist/plugin-sdk/packages/memory-host-sdk/src/host/test-helpers/ssrf.d.ts +0 -2
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-cli.d.ts +0 -9
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-core.d.ts +0 -17
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime-files.d.ts +0 -4
- package/dist/plugin-sdk/packages/memory-host-sdk/src/runtime.d.ts +0 -3
- package/dist/plugin-sdk/packages/memory-host-sdk/src/secret.d.ts +0 -1
- package/dist/plugin-sdk/packages/memory-host-sdk/src/status.d.ts +0 -1
- package/dist/plugin-sdk/param-readers.d.ts +0 -1
- package/dist/plugin-sdk/plugin-entry.d.ts +0 -1
- package/dist/plugin-sdk/plugin-runtime.d.ts +0 -1
- package/dist/plugin-sdk/process-runtime.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-api-key.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-login.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-result.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth-runtime.d.ts +0 -1
- package/dist/plugin-sdk/provider-auth.d.ts +0 -1
- package/dist/plugin-sdk/provider-catalog-shared.d.ts +0 -1
- package/dist/plugin-sdk/provider-entry.d.ts +0 -1
- package/dist/plugin-sdk/provider-env-vars.d.ts +0 -1
- package/dist/plugin-sdk/provider-http.d.ts +0 -1
- package/dist/plugin-sdk/provider-model-shared.d.ts +0 -1
- package/dist/plugin-sdk/provider-moonshot.d.ts +0 -1
- package/dist/plugin-sdk/provider-onboard.d.ts +0 -1
- package/dist/plugin-sdk/provider-setup.d.ts +0 -1
- package/dist/plugin-sdk/provider-stream.d.ts +0 -1
- package/dist/plugin-sdk/provider-tools.d.ts +0 -1
- package/dist/plugin-sdk/provider-usage.d.ts +0 -1
- package/dist/plugin-sdk/provider-web-fetch.d.ts +0 -1
- package/dist/plugin-sdk/provider-web-search.d.ts +0 -1
- package/dist/plugin-sdk/provider-zai-endpoint.d.ts +0 -1
- package/dist/plugin-sdk/qianfan.d.ts +0 -1
- package/dist/plugin-sdk/reply-chunking.d.ts +0 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.d.ts +0 -1
- package/dist/plugin-sdk/reply-history.d.ts +0 -1
- package/dist/plugin-sdk/reply-payload.d.ts +0 -1
- package/dist/plugin-sdk/reply-runtime.d.ts +0 -1
- package/dist/plugin-sdk/request-url.d.ts +0 -1
- package/dist/plugin-sdk/retry-runtime.d.ts +0 -1
- package/dist/plugin-sdk/routing.d.ts +0 -1
- package/dist/plugin-sdk/runtime-config-snapshot.d.ts +0 -1
- package/dist/plugin-sdk/runtime-env.d.ts +0 -1
- package/dist/plugin-sdk/runtime-group-policy.d.ts +0 -1
- package/dist/plugin-sdk/runtime-store.d.ts +0 -1
- package/dist/plugin-sdk/runtime.d.ts +0 -1
- package/dist/plugin-sdk/sandbox.d.ts +0 -1
- package/dist/plugin-sdk/scripts/lib/plugin-sdk-doc-metadata.d.ts +0 -64
- package/dist/plugin-sdk/secret-input.d.ts +0 -1
- package/dist/plugin-sdk/security-runtime.d.ts +0 -1
- package/dist/plugin-sdk/self-hosted-provider-setup.d.ts +0 -1
- package/dist/plugin-sdk/session-store-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-adapter-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-runtime.d.ts +0 -1
- package/dist/plugin-sdk/setup-tools.d.ts +0 -1
- package/dist/plugin-sdk/setup.d.ts +0 -1
- package/dist/plugin-sdk/sglang.d.ts +0 -1
- package/dist/plugin-sdk/signal-account.d.ts +0 -1
- package/dist/plugin-sdk/signal-surface.d.ts +0 -1
- package/dist/plugin-sdk/signal.d.ts +0 -1
- package/dist/plugin-sdk/skill-commands-runtime.d.ts +0 -1
- package/dist/plugin-sdk/slack-account.d.ts +0 -1
- package/dist/plugin-sdk/slack-core.d.ts +0 -1
- package/dist/plugin-sdk/slack-runtime-surface.d.ts +0 -1
- package/dist/plugin-sdk/slack-surface.d.ts +0 -1
- package/dist/plugin-sdk/slack-target-parser.d.ts +0 -1
- package/dist/plugin-sdk/slack-targets.d.ts +0 -1
- package/dist/plugin-sdk/slack.d.ts +0 -1
- package/dist/plugin-sdk/speech-core.d.ts +0 -1
- package/dist/plugin-sdk/speech-runtime.d.ts +0 -1
- package/dist/plugin-sdk/speech.d.ts +0 -1
- package/dist/plugin-sdk/src/acp/runtime/adapter-contract.testkit.d.ts +0 -14
- package/dist/plugin-sdk/src/agents/auth-profiles/upsert-with-lock.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/live-test-helpers.d.ts +0 -12
- package/dist/plugin-sdk/src/agents/model-allowlist-ref.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/model-catalog.d.ts +0 -35
- package/dist/plugin-sdk/src/agents/model-suppression.runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/agents/openclaw-tools.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/openrouter-model-capabilities.d.ts +0 -53
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/proxy-stream-wrappers.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/pi-embedded-runner/zai-stream-wrappers.d.ts +0 -7
- package/dist/plugin-sdk/src/agents/pi-embedded.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/agents/sandbox/test-fixtures.d.ts +0 -5
- package/dist/plugin-sdk/src/agents/self-hosted-provider-defaults.d.ts +0 -8
- package/dist/plugin-sdk/src/agents/simple-completion-transport.d.ts +0 -6
- package/dist/plugin-sdk/src/agents/skills.e2e-test-helpers.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/chunk.d.ts +0 -45
- package/dist/plugin-sdk/src/auto-reply/dispatch.d.ts +0 -32
- package/dist/plugin-sdk/src/auto-reply/heartbeat-reply-payload.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/media-note.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/abort-cutoff.runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/abort.d.ts +0 -40
- package/dist/plugin-sdk/src/auto-reply/reply/abort.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/acp-projector.d.ts +0 -21
- package/dist/plugin-sdk/src/auto-reply/reply/acp-stream-settings.d.ts +0 -24
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-helpers.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-memory.d.ts +0 -42
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-payloads.d.ts +0 -29
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-reminder-guard.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-usage-line.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.d.ts +0 -39
- package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label-config.d.ts +0 -14
- package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/body.d.ts +0 -10
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-core.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/commands-handlers.runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-abort.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session-store.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/commands-session.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/commands-spawn.test-harness.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-agents.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-focus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-help.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-info.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-kill.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-list.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-log.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-send.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-spawn.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-unfocus.d.ts +0 -3
- package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tasks.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/commands-tts.d.ts +0 -2
- package/dist/plugin-sdk/src/auto-reply/reply/commands.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/commands.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/commands.test-harness.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp-delivery.d.ts +0 -35
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.d.ts +0 -34
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/dispatch-from-config.d.ts +0 -17
- package/dist/plugin-sdk/src/auto-reply/reply/exec.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/followup-runner.d.ts +0 -16
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-from-config.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-inline-actions.d.ts +0 -62
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply-run.d.ts +0 -69
- package/dist/plugin-sdk/src/auto-reply/reply/get-reply.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/history.d.ts +0 -72
- package/dist/plugin-sdk/src/auto-reply/reply/inbound-meta.d.ts +0 -4
- package/dist/plugin-sdk/src/auto-reply/reply/matrix-context.d.ts +0 -13
- package/dist/plugin-sdk/src/auto-reply/reply/memory-flush.d.ts +0 -48
- package/dist/plugin-sdk/src/auto-reply/reply/message-preprocess-hooks.d.ts +0 -7
- package/dist/plugin-sdk/src/auto-reply/reply/queue-policy.d.ts +0 -8
- package/dist/plugin-sdk/src/auto-reply/reply/reply-payloads-dedupe.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/reply-reference.d.ts +0 -20
- package/dist/plugin-sdk/src/auto-reply/reply/session-delivery.d.ts +0 -30
- package/dist/plugin-sdk/src/auto-reply/reply/session-fork.d.ts +0 -11
- package/dist/plugin-sdk/src/auto-reply/reply/session-fork.runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.d.ts +0 -27
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-reset-prompt.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/session-run-accounting.d.ts +0 -15
- package/dist/plugin-sdk/src/auto-reply/reply/session-updates.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/session-usage.d.ts +0 -25
- package/dist/plugin-sdk/src/auto-reply/reply/session.d.ts +0 -26
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.d.ts +0 -9
- package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply/untrusted-context.d.ts +0 -1
- package/dist/plugin-sdk/src/auto-reply/reply.d.ts +0 -6
- package/dist/plugin-sdk/src/auto-reply/send-policy.d.ts +0 -6
- package/dist/plugin-sdk/src/channel-web.d.ts +0 -5
- package/dist/plugin-sdk/src/channels/draft-stream-controls.d.ts +0 -54
- package/dist/plugin-sdk/src/channels/draft-stream-loop.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/native-command-session-targets.d.ts +0 -12
- package/dist/plugin-sdk/src/channels/plugins/actions/reaction-message-id.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/actions/shared.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/bluebubbles-actions.d.ts +0 -48
- package/dist/plugin-sdk/src/channels/plugins/bundled.d.ts +0 -7
- package/dist/plugin-sdk/src/channels/plugins/contracts/inbound-testkit.d.ts +0 -70
- package/dist/plugin-sdk/src/channels/plugins/contracts/suites.d.ts +0 -129
- package/dist/plugin-sdk/src/channels/plugins/pairing-adapters.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/plugins/setup-registry.d.ts +0 -3
- package/dist/plugin-sdk/src/channels/plugins/status-issues/bluebubbles.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/plugins/types.adapters.d.ts +0 -694
- package/dist/plugin-sdk/src/channels/plugins/types.d.ts +0 -8
- package/dist/plugin-sdk/src/channels/plugins/whatsapp-shared.d.ts +0 -44
- package/dist/plugin-sdk/src/channels/registry.d.ts +0 -13
- package/dist/plugin-sdk/src/channels/run-state-machine.d.ts +0 -19
- package/dist/plugin-sdk/src/channels/sender-identity.d.ts +0 -2
- package/dist/plugin-sdk/src/channels/status-reactions.d.ts +0 -66
- package/dist/plugin-sdk/src/channels/transport/stall-watchdog.d.ts +0 -20
- package/dist/plugin-sdk/src/cli/cli-utils.d.ts +0 -19
- package/dist/plugin-sdk/src/cli/command-options.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/deps.d.ts +0 -10
- package/dist/plugin-sdk/src/cli/gateway-rpc.d.ts +0 -13
- package/dist/plugin-sdk/src/cli/help-format.d.ts +0 -5
- package/dist/plugin-sdk/src/cli/progress.d.ts +0 -24
- package/dist/plugin-sdk/src/cli/send-runtime/discord.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/imessage.d.ts +0 -12
- package/dist/plugin-sdk/src/cli/send-runtime/signal.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/slack.d.ts +0 -3
- package/dist/plugin-sdk/src/cli/send-runtime/telegram.d.ts +0 -16
- package/dist/plugin-sdk/src/cli/send-runtime/whatsapp.d.ts +0 -4
- package/dist/plugin-sdk/src/cli/test-runtime-capture.d.ts +0 -31
- package/dist/plugin-sdk/src/commands/backup-shared.d.ts +0 -32
- package/dist/plugin-sdk/src/commands/channel-setup/registry.d.ts +0 -6
- package/dist/plugin-sdk/src/commands/channel-setup/types.d.ts +0 -1
- package/dist/plugin-sdk/src/commands/channel-test-helpers.d.ts +0 -7
- package/dist/plugin-sdk/src/commands/chutes-oauth.d.ts +0 -21
- package/dist/plugin-sdk/src/commands/cleanup-utils.d.ts +0 -36
- package/dist/plugin-sdk/src/commands/daemon-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/commands/health.d.ts +0 -63
- package/dist/plugin-sdk/src/commands/onboard-types.d.ts +0 -95
- package/dist/plugin-sdk/src/config/backup-rotation.d.ts +0 -58
- package/dist/plugin-sdk/src/config/config.d.ts +0 -8
- package/dist/plugin-sdk/src/config/env-preserve.d.ts +0 -10
- package/dist/plugin-sdk/src/config/includes.d.ts +0 -43
- package/dist/plugin-sdk/src/config/io.d.ts +0 -93
- package/dist/plugin-sdk/src/config/paths.d.ts +0 -58
- package/dist/plugin-sdk/src/config/types.agent-defaults.d.ts +0 -377
- package/dist/plugin-sdk/src/config/types.channel-messaging-common.d.ts +0 -53
- package/dist/plugin-sdk/src/config/types.d.ts +0 -34
- package/dist/plugin-sdk/src/config/types.googlechat.d.ts +0 -120
- package/dist/plugin-sdk/src/config/types.imessage.d.ts +0 -88
- package/dist/plugin-sdk/src/config/types.irc.d.ts +0 -61
- package/dist/plugin-sdk/src/config/types.msteams.d.ts +0 -132
- package/dist/plugin-sdk/src/config/types.signal.d.ts +0 -65
- package/dist/plugin-sdk/src/context-engine/registry.d.ts +0 -47
- package/dist/plugin-sdk/src/cron/delivery.d.ts +0 -33
- package/dist/plugin-sdk/src/cron/isolated-agent/delivery-target.d.ts +0 -27
- package/dist/plugin-sdk/src/cron/isolated-agent/session.d.ts +0 -15
- package/dist/plugin-sdk/src/cron/schedule.d.ts +0 -6
- package/dist/plugin-sdk/src/cron/service/initial-delivery.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/jobs.d.ts +0 -33
- package/dist/plugin-sdk/src/cron/service/locked.d.ts +0 -2
- package/dist/plugin-sdk/src/cron/service/ops.d.ts +0 -84
- package/dist/plugin-sdk/src/cron/service/state.d.ts +0 -158
- package/dist/plugin-sdk/src/cron/service/store.d.ts +0 -11
- package/dist/plugin-sdk/src/cron/service/timeout-policy.d.ts +0 -13
- package/dist/plugin-sdk/src/cron/service/timer.d.ts +0 -46
- package/dist/plugin-sdk/src/cron/service.d.ts +0 -69
- package/dist/plugin-sdk/src/cron/session-reaper.d.ts +0 -35
- package/dist/plugin-sdk/src/gateway/auth-mode-policy.d.ts +0 -4
- package/dist/plugin-sdk/src/gateway/channel-status-patches.d.ts +0 -6
- package/dist/plugin-sdk/src/gateway/chat-abort.d.ts +0 -47
- package/dist/plugin-sdk/src/gateway/exec-approval-manager.d.ts +0 -47
- package/dist/plugin-sdk/src/gateway/node-command-policy.d.ts +0 -18
- package/dist/plugin-sdk/src/gateway/security-path.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-broadcast.d.ts +0 -17
- package/dist/plugin-sdk/src/gateway/server-channels.d.ts +0 -78
- package/dist/plugin-sdk/src/gateway/server-constants.d.ts +0 -9
- package/dist/plugin-sdk/src/gateway/server-methods/nodes.helpers.d.ts +0 -20
- package/dist/plugin-sdk/src/gateway/server-methods/types.d.ts +0 -108
- package/dist/plugin-sdk/src/gateway/server-shared.d.ts +0 -7
- package/dist/plugin-sdk/src/gateway/startup-auth.d.ts +0 -21
- package/dist/plugin-sdk/src/gateway/ws-log.d.ts +0 -5
- package/dist/plugin-sdk/src/gateway/ws-logging.d.ts +0 -4
- package/dist/plugin-sdk/src/generated/plugin-sdk-facade-type-map.generated.d.ts +0 -769
- package/dist/plugin-sdk/src/hooks/types.d.ts +0 -62
- package/dist/plugin-sdk/src/image-generation/provider-registry.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/backup-create.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/device-bootstrap.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/device-pairing.d.ts +0 -122
- package/dist/plugin-sdk/src/infra/dotenv.d.ts +0 -9
- package/dist/plugin-sdk/src/infra/gemini-auth.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/google-api-base-url.d.ts +0 -2
- package/dist/plugin-sdk/src/infra/heartbeat-active-hours.d.ts +0 -5
- package/dist/plugin-sdk/src/infra/heartbeat-events-filter.d.ts +0 -8
- package/dist/plugin-sdk/src/infra/heartbeat-runner.d.ts +0 -35
- package/dist/plugin-sdk/src/infra/heartbeat-summary.d.ts +0 -16
- package/dist/plugin-sdk/src/infra/http-body.d.ts +0 -46
- package/dist/plugin-sdk/src/infra/matrix-legacy-crypto.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/matrix-legacy-state.d.ts +0 -30
- package/dist/plugin-sdk/src/infra/matrix-migration-config.d.ts +0 -48
- package/dist/plugin-sdk/src/infra/matrix-migration-snapshot.d.ts +0 -25
- package/dist/plugin-sdk/src/infra/matrix-plugin-helper.d.ts +0 -29
- package/dist/plugin-sdk/src/infra/outbound/deliver.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue-recovery.d.ts +0 -41
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue-storage.d.ts +0 -50
- package/dist/plugin-sdk/src/infra/outbound/delivery-queue.d.ts +0 -4
- package/dist/plugin-sdk/src/infra/outbound/sanitize-text.d.ts +0 -23
- package/dist/plugin-sdk/src/infra/session-maintenance-warning.d.ts +0 -15
- package/dist/plugin-sdk/src/link-understanding/apply.d.ts +0 -10
- package/dist/plugin-sdk/src/link-understanding/apply.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/link-understanding/defaults.d.ts +0 -2
- package/dist/plugin-sdk/src/link-understanding/detect.d.ts +0 -3
- package/dist/plugin-sdk/src/link-understanding/format.d.ts +0 -4
- package/dist/plugin-sdk/src/link-understanding/runner.d.ts +0 -11
- package/dist/plugin-sdk/src/media/file-context.d.ts +0 -7
- package/dist/plugin-sdk/src/media/input-files.d.ts +0 -99
- package/dist/plugin-sdk/src/media-understanding/apply.d.ts +0 -19
- package/dist/plugin-sdk/src/media-understanding/apply.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/audio.test-helpers.d.ts +0 -27
- package/dist/plugin-sdk/src/media-understanding/concurrency.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/echo-transcript.d.ts +0 -13
- package/dist/plugin-sdk/src/media-understanding/format.d.ts +0 -7
- package/dist/plugin-sdk/src/media-understanding/runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/media-understanding/transcribe-audio.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/account-core.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/account-resolution.d.ts +0 -24
- package/dist/plugin-sdk/src/plugin-sdk/acp-runtime.d.ts +0 -16
- package/dist/plugin-sdk/src/plugin-sdk/acpx.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/agent-config-primitives.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/allowlist-config-edit.d.ts +0 -99
- package/dist/plugin-sdk/src/plugin-sdk/amazon-bedrock.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/api-baseline.d.ts +0 -43
- package/dist/plugin-sdk/src/plugin-sdk/bluebubbles-policy.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/bluebubbles.d.ts +0 -62
- package/dist/plugin-sdk/src/plugin-sdk/browser-support.d.ts +0 -54
- package/dist/plugin-sdk/src/plugin-sdk/browser.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/byteplus.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/channel-actions.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-primitives.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-schema.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/channel-config-writes.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/channel-feedback.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/channel-lifecycle.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/channel-pairing.d.ts +0 -24
- package/dist/plugin-sdk/src/plugin-sdk/channel-plugin-common.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/channel-setup.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/chutes.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/cli-backend.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/cloudflare-ai-gateway.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/collection-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/command-auth-native.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/command-auth.d.ts +0 -65
- package/dist/plugin-sdk/src/plugin-sdk/command-detection.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/command-surface.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/compat.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/config-paths.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/copilot-proxy.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/dangerous-name-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/deepseek.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/device-bootstrap.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/diagnostics-otel.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/diffs.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/discord-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/discord-runtime-surface.d.ts +0 -61
- package/dist/plugin-sdk/src/plugin-sdk/discord-send.d.ts +0 -36
- package/dist/plugin-sdk/src/plugin-sdk/entrypoints.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/extension-shared.d.ts +0 -67
- package/dist/plugin-sdk/src/plugin-sdk/feishu-conversation.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/feishu-setup.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/feishu.d.ts +0 -45
- package/dist/plugin-sdk/src/plugin-sdk/fetch-auth.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/gateway-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/github-copilot-login.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/github-copilot-token.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/global-singleton.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/google.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/googlechat.d.ts +0 -49
- package/dist/plugin-sdk/src/plugin-sdk/hook-runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/host-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/huggingface.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/image-generation-core.d.ts +0 -15
- package/dist/plugin-sdk/src/plugin-sdk/image-generation.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/index.d.ts +0 -28
- package/dist/plugin-sdk/src/plugin-sdk/infra-runtime.d.ts +0 -47
- package/dist/plugin-sdk/src/plugin-sdk/irc-surface.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/irc.d.ts +0 -38
- package/dist/plugin-sdk/src/plugin-sdk/kilocode.d.ts +0 -17
- package/dist/plugin-sdk/src/plugin-sdk/kimi-coding.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/lazy-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/line-core.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/line-runtime.d.ts +0 -75
- package/dist/plugin-sdk/src/plugin-sdk/litellm.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/llm-task.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/lobster.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/logging-core.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/markdown-table-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/matrix-helper.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-heavy.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-shared.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-surface.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix-surface.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/matrix-thread-bindings.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/matrix.d.ts +0 -72
- package/dist/plugin-sdk/src/plugin-sdk/mattermost-policy.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/mattermost.d.ts +0 -50
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-engine-runtime.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-embeddings.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-foundation.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-engine-qmd.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-cli.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-core.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-runtime-files.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-secret.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core-host-status.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/memory-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/memory-lancedb.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/minimax.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/mistral.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/models-provider-runtime.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/modelstudio-definitions.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/modelstudio.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/moonshot.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/msteams.d.ts +0 -60
- package/dist/plugin-sdk/src/plugin-sdk/native-command-registry.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/nextcloud-talk.d.ts +0 -45
- package/dist/plugin-sdk/src/plugin-sdk/nostr.d.ts +0 -20
- package/dist/plugin-sdk/src/plugin-sdk/nvidia.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/ollama-surface.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/open-prose.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/openai.d.ts +0 -15
- package/dist/plugin-sdk/src/plugin-sdk/opencode-go.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/opencode.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/openrouter.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/optional-channel-setup.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/pairing-access.d.ts +0 -19
- package/dist/plugin-sdk/src/plugin-sdk/param-readers.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/persistent-dedupe.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/phone-control.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/plugin-runtime.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/process-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-api-key.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.d.ts +0 -27
- package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.runtime.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/provider-catalog-shared.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/provider-entry.d.ts +0 -38
- package/dist/plugin-sdk/src/plugin-sdk/provider-env-vars.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-moonshot.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/provider-onboard.d.ts +0 -85
- package/dist/plugin-sdk/src/plugin-sdk/provider-reasoning.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/provider-setup.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/provider-stream.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/provider-usage.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/provider-web-fetch.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/provider-zai-endpoint.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/qianfan.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/reply-chunking.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/reply-dispatch-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/reply-history.d.ts +0 -3
- package/dist/plugin-sdk/src/plugin-sdk/reply-runtime.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/request-url.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/resolution-notes.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/run-command.d.ts +0 -13
- package/dist/plugin-sdk/src/plugin-sdk/runtime-config-snapshot.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/runtime-group-policy.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/runtime-store.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/runtime.d.ts +0 -39
- package/dist/plugin-sdk/src/plugin-sdk/sandbox.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/secret-input-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/security-runtime.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/self-hosted-provider-setup.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/session-store-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/setup-adapter-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/setup-runtime.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/setup-tools.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/setup.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/sglang.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/signal-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/signal-core.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/skill-commands-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/slack-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/slack-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/speech-core.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/speech.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/string-normalization-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/synthetic.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/talk-voice.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/telegram-account.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/telegram-allow-from.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/telegram-command-config.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/telegram-surface.d.ts +0 -44
- package/dist/plugin-sdk/src/plugin-sdk/test-utils.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/testing.d.ts +0 -53
- package/dist/plugin-sdk/src/plugin-sdk/text-chunking.d.ts +0 -2
- package/dist/plugin-sdk/src/plugin-sdk/thread-bindings-runtime.d.ts +0 -4
- package/dist/plugin-sdk/src/plugin-sdk/thread-ownership.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/tlon.d.ts +0 -22
- package/dist/plugin-sdk/src/plugin-sdk/together.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/tool-send.d.ts +0 -7
- package/dist/plugin-sdk/src/plugin-sdk/twitch.d.ts +0 -18
- package/dist/plugin-sdk/src/plugin-sdk/venice.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/vercel-ai-gateway.d.ts +0 -14
- package/dist/plugin-sdk/src/plugin-sdk/vllm.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/voice-call.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/volcengine.d.ts +0 -11
- package/dist/plugin-sdk/src/plugin-sdk/webhook-ingress.d.ts +0 -6
- package/dist/plugin-sdk/src/plugin-sdk/webhook-memory-guards.d.ts +0 -52
- package/dist/plugin-sdk/src/plugin-sdk/webhook-path.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/webhook-request-guards.d.ts +0 -89
- package/dist/plugin-sdk/src/plugin-sdk/webhook-targets.d.ts +0 -97
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-action-runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-core.d.ts +0 -10
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-login-qr.d.ts +0 -1
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-shared.d.ts +0 -5
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp-surface.d.ts +0 -19
- package/dist/plugin-sdk/src/plugin-sdk/whatsapp.d.ts +0 -32
- package/dist/plugin-sdk/src/plugin-sdk/xai.d.ts +0 -21
- package/dist/plugin-sdk/src/plugin-sdk/xiaomi.d.ts +0 -9
- package/dist/plugin-sdk/src/plugin-sdk/zai.d.ts +0 -12
- package/dist/plugin-sdk/src/plugin-sdk/zalo-setup.d.ts +0 -8
- package/dist/plugin-sdk/src/plugin-sdk/zalo.d.ts +0 -47
- package/dist/plugin-sdk/src/plugin-sdk/zalouser.d.ts +0 -39
- package/dist/plugin-sdk/src/plugin-sdk/zod.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/bundled-compat.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/http-path.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/http-registry.d.ts +0 -16
- package/dist/plugin-sdk/src/plugins/http-route-overlap.d.ts +0 -11
- package/dist/plugin-sdk/src/plugins/interactive-dispatch-adapters.d.ts +0 -44
- package/dist/plugin-sdk/src/plugins/interactive.d.ts +0 -60
- package/dist/plugin-sdk/src/plugins/lazy-service-module.d.ts +0 -13
- package/dist/plugin-sdk/src/plugins/loader.d.ts +0 -74
- package/dist/plugin-sdk/src/plugins/plugin-error-handler.d.ts +0 -130
- package/dist/plugin-sdk/src/plugins/provider-auth-choice.runtime.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/provider-catalog.d.ts +0 -24
- package/dist/plugin-sdk/src/plugins/provider-model-allowlist.d.ts +0 -6
- package/dist/plugin-sdk/src/plugins/provider-model-defaults.d.ts +0 -26
- package/dist/plugin-sdk/src/plugins/provider-oauth-flow.d.ts +0 -20
- package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth-tls.d.ts +0 -22
- package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/provider-runtime.d.ts +0 -271
- package/dist/plugin-sdk/src/plugins/provider-runtime.runtime.d.ts +0 -14
- package/dist/plugin-sdk/src/plugins/provider-self-hosted-setup.d.ts +0 -60
- package/dist/plugin-sdk/src/plugins/provider-validation.d.ts +0 -7
- package/dist/plugin-sdk/src/plugins/provider-wizard.d.ts +0 -45
- package/dist/plugin-sdk/src/plugins/provider-zai-endpoint.d.ts +0 -16
- package/dist/plugin-sdk/src/plugins/providers.d.ts +0 -39
- package/dist/plugin-sdk/src/plugins/registry-empty.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/registry.d.ts +0 -217
- package/dist/plugin-sdk/src/plugins/runtime/gateway-request-scope.d.ts +0 -19
- package/dist/plugin-sdk/src/plugins/runtime/index.d.ts +0 -19
- package/dist/plugin-sdk/src/plugins/runtime/native-deps.d.ts +0 -8
- package/dist/plugin-sdk/src/plugins/runtime/runtime-channel.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-config.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-events.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-logging.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-media-understanding.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/runtime/runtime-media.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-slack-ops.runtime.d.ts +0 -10
- package/dist/plugin-sdk/src/plugins/runtime/runtime-slack.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-system.d.ts +0 -2
- package/dist/plugin-sdk/src/plugins/runtime/runtime-tts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/plugins/runtime/runtime-whatsapp-boundary.d.ts +0 -35
- package/dist/plugin-sdk/src/plugins/runtime/types-channel.d.ts +0 -200
- package/dist/plugin-sdk/src/plugins/runtime/types-core.d.ts +0 -123
- package/dist/plugin-sdk/src/plugins/runtime/types.d.ts +0 -51
- package/dist/plugin-sdk/src/plugins/runtime.d.ts +0 -39
- package/dist/plugin-sdk/src/plugins/slots.d.ts +0 -36
- package/dist/plugin-sdk/src/plugins/types.d.ts +0 -2287
- package/dist/plugin-sdk/src/security/channel-metadata.d.ts +0 -6
- package/dist/plugin-sdk/src/security/context-visibility.d.ts +0 -26
- package/dist/plugin-sdk/src/shared/device-bootstrap-profile.d.ts +0 -10
- package/dist/plugin-sdk/src/terminal/health-style.d.ts +0 -1
- package/dist/plugin-sdk/src/terminal/note.d.ts +0 -5
- package/dist/plugin-sdk/src/test-helpers/http.d.ts +0 -3
- package/dist/plugin-sdk/src/test-helpers/ssrf.d.ts +0 -2
- package/dist/plugin-sdk/src/test-helpers/state-dir-env.d.ts +0 -9
- package/dist/plugin-sdk/src/test-helpers/whatsapp-outbound.d.ts +0 -22
- package/dist/plugin-sdk/src/test-utils/bundled-plugin-public-surface.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/channel-plugins.d.ts +0 -40
- package/dist/plugin-sdk/src/test-utils/env.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/fetch-mock.d.ts +0 -13
- package/dist/plugin-sdk/src/test-utils/session-state-cleanup.d.ts +0 -10
- package/dist/plugin-sdk/src/test-utils/vitest-mock-fn.d.ts +0 -1
- package/dist/plugin-sdk/src/tts/directives.d.ts +0 -10
- package/dist/plugin-sdk/src/tts/provider-error-utils.d.ts +0 -4
- package/dist/plugin-sdk/src/tts/provider-registry.d.ts +0 -7
- package/dist/plugin-sdk/src/tts/provider-types.d.ts +0 -100
- package/dist/plugin-sdk/src/tts/tts-core.d.ts +0 -32
- package/dist/plugin-sdk/src/tts/tts.runtime.d.ts +0 -1
- package/dist/plugin-sdk/src/utils/message-channel.d.ts +0 -29
- package/dist/plugin-sdk/src/utils.d.ts +0 -58
- package/dist/plugin-sdk/src/wizard/session.d.ts +0 -42
- package/dist/plugin-sdk/ssrf-runtime.d.ts +0 -1
- package/dist/plugin-sdk/state-paths.d.ts +0 -1
- package/dist/plugin-sdk/status-helpers.d.ts +0 -1
- package/dist/plugin-sdk/string-normalization-runtime.d.ts +0 -1
- package/dist/plugin-sdk/synthetic.d.ts +0 -1
- package/dist/plugin-sdk/telegram-account.d.ts +0 -1
- package/dist/plugin-sdk/telegram-allow-from.d.ts +0 -1
- package/dist/plugin-sdk/telegram-command-config.d.ts +0 -1
- package/dist/plugin-sdk/telegram-core.d.ts +0 -1
- package/dist/plugin-sdk/telegram-surface.d.ts +0 -1
- package/dist/plugin-sdk/temp-path.d.ts +0 -1
- package/dist/plugin-sdk/testing.d.ts +0 -1
- package/dist/plugin-sdk/text-runtime.d.ts +0 -1
- package/dist/plugin-sdk/thread-bindings-runtime.d.ts +0 -1
- package/dist/plugin-sdk/thread-ownership.d.ts +0 -1
- package/dist/plugin-sdk/tlon.d.ts +0 -1
- package/dist/plugin-sdk/together.d.ts +0 -1
- package/dist/plugin-sdk/tool-send.d.ts +0 -1
- package/dist/plugin-sdk/twitch.d.ts +0 -1
- package/dist/plugin-sdk/venice.d.ts +0 -1
- package/dist/plugin-sdk/vllm.d.ts +0 -1
- package/dist/plugin-sdk/voice-call.d.ts +0 -1
- package/dist/plugin-sdk/volcengine.d.ts +0 -1
- package/dist/plugin-sdk/web-media.d.ts +0 -1
- package/dist/plugin-sdk/webhook-ingress.d.ts +0 -1
- package/dist/plugin-sdk/webhook-path.d.ts +0 -1
- package/dist/plugin-sdk/webhook-request-guards.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-auth-presence.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-core.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-shared.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-surface.d.ts +0 -1
- package/dist/plugin-sdk/whatsapp-targets.d.ts +0 -1
- package/dist/plugin-sdk/windows-spawn.d.ts +0 -1
- package/dist/plugin-sdk/xai.d.ts +0 -1
- package/dist/plugin-sdk/zalo-setup.d.ts +0 -1
- package/dist/plugin-sdk/zalo.d.ts +0 -1
- package/dist/plugin-sdk/zalouser.d.ts +0 -1
- package/dist/plugin-sdk/zod.d.ts +0 -1
- package/dist/plugins-cli-BuRzZElZ.js +0 -561
- package/dist/plugins-command-helpers-2uhVdnBb.js +0 -116
- package/dist/plugins-install-persist-BVZkrB2-.js +0 -121
- package/dist/plugins-update-command-CWl-U7Wy.js +0 -974
- package/dist/policy-CBLebx7K.js +0 -147
- package/dist/preflight-audio-RQNk7yfw.js +0 -48
- package/dist/preflight-audio.runtime-BKLaDdXh.js +0 -7
- package/dist/prepare-BdWIhg02.js +0 -1301
- package/dist/probe-7PmWRQdg.js +0 -1868
- package/dist/probe-DBGVRz02.js +0 -170
- package/dist/probe-DtN67E1D.js +0 -349
- package/dist/probe-F0974SeN.js +0 -431
- package/dist/profile-update-B98rJ-pB.js +0 -67
- package/dist/program-CCSYcbNv.js +0 -158
- package/dist/prompt-select-styled-QezSJIFt.js +0 -6434
- package/dist/provider-CvWQLyt5.js +0 -18901
- package/dist/provider-Cvp1QQuM.js +0 -70
- package/dist/provider-IEIXFsBr.js +0 -3685
- package/dist/provider-api-key-auth-BjgG22Cp.js +0 -109
- package/dist/provider-auth-Dlfypk2e.js +0 -43
- package/dist/provider-auth-api-key-DPeAD4Wh.js +0 -5
- package/dist/provider-auth-login-eRYV4NRi.js +0 -8
- package/dist/provider-dispatcher-D2OJ5CNa.js +0 -22
- package/dist/provider-entry-D8rVAPy0.js +0 -86
- package/dist/provider-session.runtime-GQeUwL4B.js +0 -7
- package/dist/provider.runtime-BokN-cp6.js +0 -2
- package/dist/qr-image-CNXmqHBd.js +0 -2
- package/dist/queue-eLL6EbrW.js +0 -663
- package/dist/reaction-runtime-api-DwLFcfeo.js +0 -114
- package/dist/reactions-K9RuCuhE.js +0 -258
- package/dist/read-only-account-inspect.telegram-BoATG5TP.js +0 -202
- package/dist/register.agent-DdFsdgdX.js +0 -240
- package/dist/register.configure-BTVikzNj.js +0 -15
- package/dist/register.maintenance-CDt8_LBs.js +0 -449
- package/dist/register.message-C_Wf261e.js +0 -644
- package/dist/register.onboard-FL6Mny10.js +0 -79
- package/dist/register.setup-BeW8HY0P.js +0 -183
- package/dist/register.status-health-sessions-Bl0-x2Ok.js +0 -1206
- package/dist/register.subclis-DUBZB3bR.js +0 -295
- package/dist/register.subclis-Db9Qegv7.js +0 -3
- package/dist/replies-CWZyv0g5.js +0 -118
- package/dist/reply-DMsC03Iw.js +0 -3192
- package/dist/reply-blocks-DuXsQojy.js +0 -103
- package/dist/reply-dispatch-runtime-D_8J_oEP.js +0 -3
- package/dist/reply-runtime-TZcIYAGQ.js +0 -123
- package/dist/reply.runtime-Bht7FBbJ.js +0 -2
- package/dist/resolve-allowlist-Bnvzjka0.js +0 -147
- package/dist/resolve-targets-D3K5Z5gf.js +0 -280
- package/dist/rooms-mp7F7lsA.js +0 -325
- package/dist/route-reply-DKoNoGml.js +0 -133
- package/dist/route-reply.runtime-ByCsyDjS.js +0 -2
- package/dist/route-resolution-CshIQw9s.js +0 -461
- package/dist/rpc-context-DQ0FBc41.js +0 -155
- package/dist/run-main-BzIbww9g.js +0 -425
- package/dist/runner-IAThb076.js +0 -1479
- package/dist/runtime-C4nQKohR.js +0 -68
- package/dist/runtime-DpQadrfd.js +0 -1175
- package/dist/runtime-api-B-n73E_A.js +0 -2
- package/dist/runtime-api-B0TzzMRA.js +0 -2
- package/dist/runtime-api-B2g4aFI0.js +0 -2
- package/dist/runtime-api-Bjn-vYvi.js +0 -3676
- package/dist/runtime-api-Ckw6TKHu.js +0 -2
- package/dist/runtime-api-CqpkXWTZ.js +0 -14
- package/dist/runtime-api-DLcWBYBn.js +0 -2
- package/dist/runtime-api-DTkksxUA.js +0 -2
- package/dist/runtime-api-Dqjul0s_.js +0 -3
- package/dist/runtime-api-Dt4a5hxH.js +0 -81
- package/dist/runtime-api-exjXBw5x.js +0 -2
- package/dist/runtime-api-iiaetepr.js +0 -29
- package/dist/runtime-api-uq8PFObQ.js +0 -2
- package/dist/runtime-embedded-pi.runtime-C_VTO5Hb.js +0 -2
- package/dist/sandbox-cli-DCBzqdRP.js +0 -443
- package/dist/sdk-xNF3YVy5.js +0 -1108
- package/dist/security-cli-BRQ9l5SH.js +0 -477
- package/dist/send-BR9WsDjK.js +0 -532
- package/dist/send-BYZ6LXaA.js +0 -856
- package/dist/send-C9XFbxrx.js +0 -2
- package/dist/send-CP6xLBgu.js +0 -100
- package/dist/send-CevSHBU3.js +0 -442
- package/dist/send-CiU0wWHJ.js +0 -178
- package/dist/send-CzZHXvb0.js +0 -318
- package/dist/send-D8Q38WQW.js +0 -1076
- package/dist/send-DSrMDTx6.js +0 -3
- package/dist/send.components-CSiMYa_k.js +0 -2
- package/dist/send.components-DuCC5xXW.js +0 -942
- package/dist/server-cron-CnWsiroT.js +0 -2
- package/dist/server-cron-pXTPca6M.js +0 -4173
- package/dist/server-hfFKzOMa.js +0 -10120
- package/dist/server-lite-CpD0TAwt.js +0 -831
- package/dist/server-maintenance-CSzGshfI.js +0 -542
- package/dist/server-maintenance-m-ekNAYN.js +0 -2
- package/dist/server-node-events-o25FUhFi.js +0 -454
- package/dist/server-node-subscriptions-D1cnZtZz.js +0 -2
- package/dist/server-plugins-BYGRllKK.js +0 -10423
- package/dist/server-plugins-D-GLUOyL.js +0 -2
- package/dist/server-startup-memory-CwdtRW65.js +0 -2
- package/dist/server-tailscale-BurW9eR4.js +0 -2
- package/dist/services-B4WpjjQk.js +0 -2
- package/dist/session-BZC_ExXj.js +0 -50
- package/dist/session-archive.runtime-CpJ_-vMn.js +0 -2
- package/dist/session-envelope-D53bqIsw.js +0 -18
- package/dist/session-file-L8H_0oIY.js +0 -120
- package/dist/session-key-DlGku_2P.js +0 -52
- package/dist/session-override-BwLTMvlR.js +0 -100
- package/dist/session-reset-model.runtime-B-f6UyAY.js +0 -119
- package/dist/session-route-CWWuYCWY.js +0 -91
- package/dist/session-store-runtime-DbJ_acdU.js +0 -2
- package/dist/session-subagent-reactivation.runtime-DQP-UkdA.js +0 -2
- package/dist/session-transcript-files.fs-BRLPQRBN.js +0 -149
- package/dist/session-updates-BiofcJQ9.js +0 -222
- package/dist/session-updates.runtime-B5YxiezL.js +0 -2
- package/dist/session-utils-BsLMe4R0.js +0 -1743
- package/dist/sessions-BGky6-U4.js +0 -224
- package/dist/sessions-CizZS4Rb.js +0 -2
- package/dist/sessions-CnolLDg0.js +0 -443
- package/dist/setup-BPkdGC8C.js +0 -427
- package/dist/setup-api-Bd-qaaRg.js +0 -2
- package/dist/setup-bootstrap-BUPymwJl.js +0 -54
- package/dist/setup-core-CE5GuYaV.js +0 -256
- package/dist/setup-core-tvt7DN1q.js +0 -146
- package/dist/setup-surface-BbOvAxU6.js +0 -484
- package/dist/setup-surface-BlIvCltJ.js +0 -450
- package/dist/setup-surface-BoJI-ftG.js +0 -237
- package/dist/setup-surface-C6yPqLIS.js +0 -261
- package/dist/setup-surface-CNFczxjl.js +0 -656
- package/dist/setup-surface-D5hZFXlx.js +0 -8848
- package/dist/setup-surface-DMOex3oo.js +0 -346
- package/dist/setup-surface-DRmn71vw.js +0 -333
- package/dist/setup-surface-DUodX6wM.js +0 -353
- package/dist/setup-surface-DVnka34A.js +0 -272
- package/dist/setup-surface-DrFSCD5A.js +0 -304
- package/dist/setup-surface-WtMan1x2.js +0 -261
- package/dist/setup.finalize-BcpxSMo5.js +0 -458
- package/dist/setup.gateway-config-BHvGYGOD.js +0 -247
- package/dist/shared-1r1qYN6z.js +0 -198
- package/dist/shared-BXz6HKLm.js +0 -180
- package/dist/shared-Bg7yDHOE.js +0 -94
- package/dist/shared-DBX8qPP6.js +0 -144
- package/dist/shared-DHFHItFt.js +0 -160
- package/dist/shared-DJV3Mmv8.js +0 -72
- package/dist/shared-ZeWcr3rG.js +0 -2
- package/dist/shared-nCJ3kgXi.js +0 -78
- package/dist/shared-rKEs-OIg.js +0 -64
- package/dist/shared-runtime-CTD5ywGR.js +0 -7
- package/dist/skills-install-CoUJk9aZ.js +0 -819
- package/dist/slash-commands-CKUKTwMa.js +0 -672
- package/dist/slash-commands.runtime-BrfELsEA.js +0 -20
- package/dist/slash-dispatch.runtime-CfjHhQmx.js +0 -38
- package/dist/slash-skill-commands.runtime-Bxm-652_.js +0 -8
- package/dist/speech-provider-BjDZhOzO.js +0 -190
- package/dist/src-BscJ0OyQ.js +0 -2739
- package/dist/startup-verification-Bwer6SPQ.js +0 -131
- package/dist/state-migrations-Dh5gaxn0.js +0 -845
- package/dist/status-CxiD9-L2.js +0 -2
- package/dist/status-all-CteZuvg_.js +0 -798
- package/dist/status-hLuTMJgT.js +0 -650
- package/dist/status-issues-CZdlgUVQ.js +0 -187
- package/dist/status-issues-Dx4xsUU6.js +0 -336
- package/dist/status-json-CU_sqXwN.js +0 -86
- package/dist/status-l8LyDb-X.js +0 -608
- package/dist/status-mpmZALQx.js +0 -3
- package/dist/status.command.text-runtime-Ck9abrv4.js +0 -18
- package/dist/status.scan-N2AgYo5y.js +0 -264
- package/dist/status.scan.fast-json-B8TmllqQ.js +0 -97
- package/dist/status.scan.fast-json-CiJfPteF.js +0 -2
- package/dist/status.scan.json-core-Bqw5Ethf.js +0 -254
- package/dist/status.summary-CN0kS8iw.js +0 -2
- package/dist/status.summary-joaOukPU.js +0 -210
- package/dist/sticker-cache-DXLBnGCi.js +0 -1573
- package/dist/sticker-vision.runtime-DP1NsaCZ.js +0 -16
- package/dist/storage-BRnLX4P7.js +0 -234
- package/dist/store-BvP1FWCI.js +0 -1343
- package/dist/store.runtime-NoYeZeac.js +0 -2
- package/dist/stream-BJ4HYVwA.js +0 -633
- package/dist/subagent-orphan-recovery-hTBxfwY4.js +0 -206
- package/dist/subagent-registry-runtime-3PIBzuDd.js +0 -2
- package/dist/targets-BAsektUE.js +0 -748
- package/dist/task-registry-delivery-runtime-CkJ71rwb.js +0 -2
- package/dist/task-registry.audit-gdULOiFp.js +0 -320
- package/dist/task-registry.maintenance-DhI_cx5O.js +0 -2
- package/dist/test-api-B4g2UUbw.js +0 -47
- package/dist/testing-DFnq00vr.js +0 -677
- package/dist/thread-bindings-CEuvQ0a5.js +0 -219
- package/dist/thread-bindings-CzFRpuy7.js +0 -534
- package/dist/thread-bindings-D-QA8SBh.js +0 -352
- package/dist/thread-bindings-EP9pAodb.js +0 -778
- package/dist/thread-bindings.discord-api-DKSgmJf_.js +0 -487
- package/dist/threading-CLq9AwSD.js +0 -832
- package/dist/threading-CQM3vrch.js +0 -2
- package/dist/threading-tool-context-DN0TQ-o6.js +0 -157
- package/dist/token-Bs7YIYbI.js +0 -82
- package/dist/tool-actions.runtime-mxezUV4D.js +0 -532
- package/dist/tools-effective-inventory-Dz6tWQxy.js +0 -148
- package/dist/ui-Cmeq4ZXg.js +0 -212
- package/dist/update-CADy3L5e.js +0 -1253
- package/dist/update-cli-B61EQsEl.js +0 -1447
- package/dist/update-runner--BEMGokU.js +0 -1195
- package/dist/verification-C5PYFyB0.js +0 -130
- package/dist/verification-CzP234iv.js +0 -2
- package/dist/x-search-ToCIaz7t.js +0 -166
- package/dist/zalo-BCF4thCG.js +0 -13
- package/dist/zalo-js-C4A7Gxjy.js +0 -1156
- package/dist/zalouser-CO0W9KZf.js +0 -22
- /package/dist/{apply.runtime-DBsSkbq5.js ā apply.runtime-eSa-O_F2.js} +0 -0
- /package/dist/{audit-channel.allow-from.runtime-BE3PpHCg.js ā audit-channel.allow-from.runtime-DNte8cmH.js} +0 -0
- /package/dist/{audit-channel.discord.runtime-CKQwUTue.js ā audit-channel.discord.runtime-BWLuLCE0.js} +0 -0
- /package/dist/{audit-channel.zalouser.runtime-DvOclP53.js ā audit-channel.zalouser.runtime-D_nIX7hv.js} +0 -0
- /package/dist/{gaxios-fetch-compat-DSrL7y2X.js ā gaxios-fetch-compat-Dsb6Dess.js} +0 -0
- /package/dist/{gmail-watcher-lifecycle-CnbN1EfN.js ā gmail-watcher-lifecycle-D6jhzjD2.js} +0 -0
- /package/dist/{hooks-policy-BjyPwwpQ.js ā hooks-policy-BS7eSxPm.js} +0 -0
- /package/dist/{install-target-BXHZSfie.js ā install-target-DunBxcXd.js} +0 -0
- /package/dist/{loader-_QerU742.js ā loader-DrwewZGF.js} +0 -0
- /package/dist/{plugin-error-boundary-Ze95TniC.js ā plugin-error-boundary-BkeWnWCG.js} +0 -0
- /package/dist/{plugin-health-checker-BdL9iBvs.js ā plugin-health-checker--ObpW5TZ.js} +0 -0
- /package/dist/{plugin-hot-reload-t-fD3k4-.js ā plugin-hot-reload-uBgB89Et.js} +0 -0
- /package/dist/{provider-api-key-auth.runtime-PWOshlD_.js ā provider-api-key-auth.runtime-s-qWJDKg.js} +0 -0
- /package/dist/{provider-auth-login.runtime-B8ZroIz0.js ā provider-auth-login.runtime-BJ3_RYVu.js} +0 -0
- /package/dist/{provider-discovery.runtime-C9i7ZYfW.js ā provider-discovery.runtime-hzNrePTv.js} +0 -0
- /package/dist/{runtime-discord-ops.runtime-DD-5fh_t.js ā runtime-discord-ops.runtime-DXnkkrxh.js} +0 -0
- /package/dist/{runtime-media-understanding.runtime-BnpKjL7w.js ā runtime-media-understanding.runtime-CqkE-xQD.js} +0 -0
- /package/dist/{runtime-model-auth.runtime-BJVutp59.js ā runtime-model-auth.runtime-Eceghr0K.js} +0 -0
- /package/dist/{runtime-slack-ops.runtime-BHlRr1Yr.js ā runtime-slack-ops.runtime-BiNFnBIK.js} +0 -0
- /package/dist/{runtime-tts.runtime-CraALy-I.js ā runtime-tts.runtime-DucSlAZ7.js} +0 -0
- /package/dist/{server-constants-DYaJmd0J.js ā server-constants-DygisMJm.js} +0 -0
- /package/dist/{server-node-subscriptions-B0IJt_Ut.js ā server-node-subscriptions-k9pzvFjc.js} +0 -0
- /package/dist/{server-startup-memory-DVUV59tb.js ā server-startup-memory-BF7b6hV-.js} +0 -0
- /package/dist/{server-tailscale-YNZLPwK0.js ā server-tailscale-C4_57iBM.js} +0 -0
- /package/dist/{services-D-LPmYY2.js ā services-DGh2Nlk1.js} +0 -0
- /package/dist/{skill-scanner-CiGO-i2b.js ā skill-scanner-CQOOKx41.js} +0 -0
- /package/dist/{ssh-config-BeNW3BFI.js ā ssh-config-C0OJnSro.js} +0 -0
- /package/dist/{supervisor-log.runtime-C5wGw6pn.js ā supervisor-log.runtime-C7jNH-kn.js} +0 -0
- /package/dist/{system-presence-Dllq5OiL.js ā system-presence-Ctj0G23x.js} +0 -0
- /package/dist/{tts.runtime-DmgJozN5.js ā tts.runtime-BmZyMwz6.js} +0 -0
|
@@ -1,3708 +0,0 @@
|
|
|
1
|
-
import { i as clampInt, v as resolveUserPath } from "./utils-CN_F_3Qg.js";
|
|
2
|
-
import { d as normalizeUsageDisplay, p as resolveResponseUsageMode, s as normalizeFastMode } from "./thinking.shared-D6IkoLJU.js";
|
|
3
|
-
import { _ as normalizeAccountId, v as normalizeOptionalAccountId } from "./session-key-Do__tq1E.js";
|
|
4
|
-
import { r as logVerbose } from "./globals-CDtV0ht8.js";
|
|
5
|
-
import { r as normalizeStringEntries } from "./string-normalization-Ddc4JXRe.js";
|
|
6
|
-
import { v as resolveSessionAgentId } from "./agent-scope-rWWUivuC.js";
|
|
7
|
-
import { A as setConfigValueAtPath, D as unsetConfigOverride, E as setConfigOverride, O as getConfigValueAtPath, T as resetConfigOverrides, f as readConfigFileSnapshot, j as unsetConfigValueAtPath, k as parseConfigPath, w as getConfigOverrides, x as writeConfigFile } from "./io-8kNEV_ou.js";
|
|
8
|
-
import { a as validateConfigObjectWithPlugins } from "./validation-IqV6B-0y.js";
|
|
9
|
-
import { o as normalizeChannelId } from "./registry-mVzzlPf7.js";
|
|
10
|
-
import { t as clearPluginManifestRegistryCache } from "./manifest-registry-Kx5Z2lJL.js";
|
|
11
|
-
import { t as parseDurationMs } from "./parse-duration-D9q1V0xx.js";
|
|
12
|
-
import { t as resolveAccountEntry } from "./account-lookup-CLJxpfHr.js";
|
|
13
|
-
import "./config-D9-X_LMC.js";
|
|
14
|
-
import { i as GATEWAY_CLIENT_NAMES, r as GATEWAY_CLIENT_MODES } from "./client-info-DdJ6fTRw.js";
|
|
15
|
-
import { d as normalizeMessageChannel, o as isInternalMessageChannel } from "./message-channel-DGeThNst.js";
|
|
16
|
-
import { d as updateSessionStore, i as loadSessionStore } from "./store-BvP1FWCI.js";
|
|
17
|
-
import { t as getChannelPlugin } from "./registry-C1lRBMyS.js";
|
|
18
|
-
import { n as resolveChannelApprovalCapability } from "./plugins-Br3nS60A.js";
|
|
19
|
-
import "./sessions-CnolLDg0.js";
|
|
20
|
-
import { i as resolveSessionFilePathOptions, l as resolveStorePath, r as resolveSessionFilePath } from "./paths-BJziUb2E.js";
|
|
21
|
-
import { a as resolveFreshSessionTotalTokens } from "./types-K4m9JoyJ.js";
|
|
22
|
-
import { r as callGateway } from "./call-D8qr1xFm.js";
|
|
23
|
-
import { tn as ErrorCodes } from "./protocol-C3ke409J.js";
|
|
24
|
-
import { r as isRestartEnabled, t as isCommandFlagEnabled } from "./commands-DBiogh0E.js";
|
|
25
|
-
import { r as getSessionBindingService } from "./session-binding-service-B1JT9Vbs.js";
|
|
26
|
-
import { n as createInternalHookEvent, p as triggerInternalHook } from "./internal-hooks-Bvg2fUMX.js";
|
|
27
|
-
import { i as discoverModels, r as discoverAuthStorage } from "./pi-model-discovery-ppkaCftr.js";
|
|
28
|
-
import { B as resolveAcpThreadSessionDetailLines, Dr as stripToolMessages, Mr as createExecTool, P as spawnSubagentDirect, R as resolveAcpSessionCwd, S as stripToolResultDetails, _t as steerControlledSubagentRun, ar as sortSubagentRuns, cr as formatTaskStatusTitle, ct as listTasksForAgentIdForStatus, dt as killAllControlledSubagentRuns, ft as killControlledSubagentRun, g as compactEmbeddedPiSession, gt as sendControlledSubagentMessage, lr as sanitizeTaskStatusText, lt as listTasksForSessionKeyForStatus, mt as listControlledSubagentRuns, nr as formatRunLabel, nt as formatContextUsageShort, or as buildTaskStatusSnapshot, pn as readAcpSessionEntry, q as findTaskByRunIdForOwner, rt as formatTokenCount, s as EmbeddedBlockChunker, sr as formatTaskStatusDetail, ut as buildSubagentList, yt as countPendingDescendantRuns } from "./pi-embedded-B2zIKehU.js";
|
|
29
|
-
import { t as diag } from "./diagnostic-Do5bZ4Z3.js";
|
|
30
|
-
import { C as textToSpeech, _ as setSummarizationEnabled, a as getTtsMaxLength, b as setTtsMaxLength, c as isTtsEnabled, g as setLastTtsAttempt, i as getResolvedSpeechProviderConfig, l as isTtsProviderConfigured, m as resolveTtsPrefsPath, o as getTtsProvider, p as resolveTtsConfig, r as getLastTtsAttempt, s as isSummarizationEnabled, x as setTtsProvider, y as setTtsEnabled } from "./speech-runtime-B7Gb4Hk4.js";
|
|
31
|
-
import "./tts-DVG4IqTE.js";
|
|
32
|
-
import { n as resolveSandboxRuntimeStatus } from "./runtime-status-C5bvsPne.js";
|
|
33
|
-
import "./thinking-CEPUwkqY.js";
|
|
34
|
-
import { t as requireApiKey } from "./model-auth-runtime-shared-Bi3QYW1q.js";
|
|
35
|
-
import { r as getApiKeyForModel } from "./model-auth-DdVBBhcc.js";
|
|
36
|
-
import { t as ensureOpenClawModelsJson } from "./models-config-CMbP7C_L.js";
|
|
37
|
-
import { n as setPluginEnabledInConfig } from "./enable-CictOOws.js";
|
|
38
|
-
import { i as unsetConfiguredMcpServer, r as setConfiguredMcpServer, t as listConfiguredMcpServers } from "./mcp-config-A3HGpw9x.js";
|
|
39
|
-
import { O as getFinishedSession, k as getSession } from "./model-runtime-51DWArDE.js";
|
|
40
|
-
import { r as enqueueSystemEvent } from "./system-events-Di7LVrMk.js";
|
|
41
|
-
import "./sandbox-Doxawt8O.js";
|
|
42
|
-
import { t as formatDurationCompact } from "./format-duration-hPWe_x-V.js";
|
|
43
|
-
import { a as getActiveEmbeddedRunSnapshot, f as waitForEmbeddedPiRunEnd, o as isEmbeddedPiRunActive, t as abortEmbeddedPiRun, v as scheduleGatewaySigusr1Restart, x as triggerStableClawRestart } from "./runs-Cxb2Ah4W.js";
|
|
44
|
-
import { C as resolveFastModeState, i as clearSessionQueues } from "./queue-eLL6EbrW.js";
|
|
45
|
-
import { n as parseActivationCommand } from "./group-activation-BMy1Runq.js";
|
|
46
|
-
import { n as formatTimeAgo } from "./format-relative-Bze46KdH.js";
|
|
47
|
-
import { i as matchPluginCommand, n as executePluginCommand } from "./commands-HPhAzraF.js";
|
|
48
|
-
import { n as formatTokenCount$1, r as formatUsd } from "./usage-format-CXDESRWt.js";
|
|
49
|
-
import { p as normalizeCommandBody } from "./commands-registry-Dyv8XTRB.js";
|
|
50
|
-
import { n as stripInboundMetadata } from "./strip-inbound-meta-DxOLcC5n.js";
|
|
51
|
-
import { c as resolveThreadBindingIdleTimeoutMsForChannel, d as resolveThreadBindingMaxAgeMsForChannel, g as formatThreadBindingDurationLabel, i as formatThreadBindingSpawnDisabledError, p as resolveThreadBindingSpawnPolicy, r as formatThreadBindingDisabledError, v as resolveThreadBindingIntroText, y as resolveThreadBindingThreadName } from "./thread-bindings-policy-BlyUVG6S.js";
|
|
52
|
-
import { i as resolveModelWithRegistry } from "./anthropic-vertex-stream-Ch2HPrRn.js";
|
|
53
|
-
import { n as createPluginRuntime } from "./runtime-DpQadrfd.js";
|
|
54
|
-
import { i as setAbortMemory, r as isAbortTrigger } from "./abort-primitives-CoECHfZc.js";
|
|
55
|
-
import { o as stripMentions, s as stripStructuralPrefixes } from "./mentions-AMWjK6WR.js";
|
|
56
|
-
import { a as readChannelAllowFromStore, l as removeChannelAllowFromStoreEntry, t as addChannelAllowFromStoreEntry } from "./pairing-store-BZr880dY.js";
|
|
57
|
-
import { a as resolveArchiveKind } from "./archive-S-d03vhz.js";
|
|
58
|
-
import { r as formatElevatedUnavailableMessage } from "./reply-DMsC03Iw.js";
|
|
59
|
-
import { n as resolveSessionAuthProfileOverride } from "./session-override-BwLTMvlR.js";
|
|
60
|
-
import { a as shouldPersistAbortCutoff, i as resolveAbortCutoffFromContext, t as applyAbortCutoffToSessionEntry } from "./abort-cutoff-NkW4tAQJ.js";
|
|
61
|
-
import { n as resolveSessionEntryForKey, r as stopSubagentsForRequester, t as formatAbortReplyText } from "./abort-CuFxEr2t.js";
|
|
62
|
-
import { t as extractBtwQuestion } from "./btw-command-a7GDEcBZ.js";
|
|
63
|
-
import { n as getSpeechProvider, r as listSpeechProviders, t as canonicalizeSpeechProviderId } from "./provider-registry-TuqtXnqX.js";
|
|
64
|
-
import { a as handleHelpCommand, c as handleWhoamiCommand, i as handleExportSessionCommand, n as handleCommandsListCommand, o as handleStatusCommand, r as handleContextCommand, s as handleToolsCommand } from "./commands-info-CM-kPvq5.js";
|
|
65
|
-
import { c as rejectUnauthorizedCommand, l as requireCommandFlagEnabled, o as buildDisabledCommandReply, r as handleModelsCommand, s as rejectNonOwnerCommand, u as requireGatewayClientScopeForInternalChannel } from "./commands-models-B_KkCnYQ.js";
|
|
66
|
-
import { S as resolveCommandSurfaceChannel, _ as resolveTelegramConversationId, a as formatLogLines, b as isTelegramSurface, c as resolveCommandSubagentController, d as resolveFocusTargetSession, f as resolveHandledPrefix, g as stopWithText, h as resolveSubagentsAction, i as buildSubagentsHelp, l as resolveDiscordChannelIdForFocus, m as resolveSubagentEntryForToken, o as formatTimestampWithAge, p as resolveRequesterSessionKey, s as loadSubagentSessionEntry, u as resolveDisplayStatus, v as isDiscordSurface, x as resolveChannelAccountId, y as isMatrixSurface } from "./targets-BAsektUE.js";
|
|
67
|
-
import { t as handleAcpCommand } from "./commands-acp-_0Jt7bpI.js";
|
|
68
|
-
import { i as isTelegramExecApprovalClientEnabled, r as isTelegramExecApprovalAuthorizedSender } from "./exec-approvals-Lpud2QXU.js";
|
|
69
|
-
import "./api-DNiO8MKu.js";
|
|
70
|
-
import { n as incrementCompactionCount } from "./session-updates-BiofcJQ9.js";
|
|
71
|
-
import { t as parseConfigValue } from "./config-value-lHlRbgJ9.js";
|
|
72
|
-
import { i as buildNpmInstallRecordFields, n as persistPluginInstall } from "./plugins-install-persist-BVZkrB2-.js";
|
|
73
|
-
import { s as parseClawHubPluginSpec } from "./clawhub-CJATdspG.js";
|
|
74
|
-
import { i as installPluginFromPath, r as installPluginFromNpmSpec } from "./install-slQpgebI.js";
|
|
75
|
-
import { r as installPluginFromClawHub } from "./clawhub-UfARocx9.js";
|
|
76
|
-
import { a as buildPluginInspectReport, i as buildPluginDiagnosticsReport, o as buildPluginSnapshotReport, s as formatPluginCompatibilityNotice, t as buildAllPluginInspectReports } from "./status--woTQVM8.js";
|
|
77
|
-
import { a as decidePreferredClawHubFallback, f as resolveFileNpmSpecToLocalPath, i as createPluginInstallLogger, n as buildPreferredClawHubSpec } from "./plugins-command-helpers-2uhVdnBb.js";
|
|
78
|
-
import { n as loadCostUsageSummary, r as loadSessionCostSummary } from "./session-cost-usage-ByqIlg2V.js";
|
|
79
|
-
import fsSync from "node:fs";
|
|
80
|
-
import { streamSimple } from "@mariozechner/pi-ai";
|
|
81
|
-
import { SessionManager } from "@mariozechner/pi-coding-agent";
|
|
82
|
-
//#region src/channels/plugins/config-writes.ts
|
|
83
|
-
function resolveChannelConfigWrites(params) {
|
|
84
|
-
const channelConfig = resolveChannelConfig(params.cfg, params.channelId);
|
|
85
|
-
if (!channelConfig) return true;
|
|
86
|
-
return (resolveChannelAccountConfig(channelConfig, params.accountId)?.configWrites ?? channelConfig.configWrites) !== false;
|
|
87
|
-
}
|
|
88
|
-
function authorizeConfigWrite(params) {
|
|
89
|
-
if (params.allowBypass) return { allowed: true };
|
|
90
|
-
if (params.target?.kind === "ambiguous") return {
|
|
91
|
-
allowed: false,
|
|
92
|
-
reason: "ambiguous-target"
|
|
93
|
-
};
|
|
94
|
-
if (params.origin?.channelId && !resolveChannelConfigWrites({
|
|
95
|
-
cfg: params.cfg,
|
|
96
|
-
channelId: params.origin.channelId,
|
|
97
|
-
accountId: params.origin.accountId
|
|
98
|
-
})) return {
|
|
99
|
-
allowed: false,
|
|
100
|
-
reason: "origin-disabled",
|
|
101
|
-
blockedScope: {
|
|
102
|
-
kind: "origin",
|
|
103
|
-
scope: params.origin
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const seen = /* @__PURE__ */ new Set();
|
|
107
|
-
for (const target of listConfigWriteTargetScopes(params.target)) {
|
|
108
|
-
if (!target.channelId) continue;
|
|
109
|
-
const key = `${target.channelId}:${normalizeAccountId(target.accountId)}`;
|
|
110
|
-
if (seen.has(key)) continue;
|
|
111
|
-
seen.add(key);
|
|
112
|
-
if (!resolveChannelConfigWrites({
|
|
113
|
-
cfg: params.cfg,
|
|
114
|
-
channelId: target.channelId,
|
|
115
|
-
accountId: target.accountId
|
|
116
|
-
})) return {
|
|
117
|
-
allowed: false,
|
|
118
|
-
reason: "target-disabled",
|
|
119
|
-
blockedScope: {
|
|
120
|
-
kind: "target",
|
|
121
|
-
scope: target
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return { allowed: true };
|
|
126
|
-
}
|
|
127
|
-
function resolveExplicitConfigWriteTarget(scope) {
|
|
128
|
-
if (!scope.channelId) return { kind: "global" };
|
|
129
|
-
const accountId = normalizeAccountId(scope.accountId);
|
|
130
|
-
if (!accountId || accountId === "default") return {
|
|
131
|
-
kind: "channel",
|
|
132
|
-
scope: { channelId: scope.channelId }
|
|
133
|
-
};
|
|
134
|
-
return {
|
|
135
|
-
kind: "account",
|
|
136
|
-
scope: {
|
|
137
|
-
channelId: scope.channelId,
|
|
138
|
-
accountId
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function resolveConfigWriteTargetFromPath(path) {
|
|
143
|
-
if (path[0] !== "channels") return { kind: "global" };
|
|
144
|
-
if (path.length < 2) return {
|
|
145
|
-
kind: "ambiguous",
|
|
146
|
-
scopes: []
|
|
147
|
-
};
|
|
148
|
-
const channelId = path[1].trim().toLowerCase();
|
|
149
|
-
if (!channelId) return {
|
|
150
|
-
kind: "ambiguous",
|
|
151
|
-
scopes: []
|
|
152
|
-
};
|
|
153
|
-
if (path.length === 2) return {
|
|
154
|
-
kind: "ambiguous",
|
|
155
|
-
scopes: [{ channelId }]
|
|
156
|
-
};
|
|
157
|
-
if (path[2] !== "accounts") return {
|
|
158
|
-
kind: "channel",
|
|
159
|
-
scope: { channelId }
|
|
160
|
-
};
|
|
161
|
-
if (path.length < 4) return {
|
|
162
|
-
kind: "ambiguous",
|
|
163
|
-
scopes: [{ channelId }]
|
|
164
|
-
};
|
|
165
|
-
return resolveExplicitConfigWriteTarget({
|
|
166
|
-
channelId,
|
|
167
|
-
accountId: normalizeAccountId(path[3])
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
function canBypassConfigWritePolicy(params) {
|
|
171
|
-
return isInternalMessageChannel(params.channel) && params.gatewayClientScopes?.includes("operator.admin") === true;
|
|
172
|
-
}
|
|
173
|
-
function formatConfigWriteDeniedMessage(params) {
|
|
174
|
-
if (params.result.reason === "ambiguous-target") return "ā ļø Channel-initiated /config writes cannot replace channels, channel roots, or accounts collections. Use a more specific path or gateway operator.admin.";
|
|
175
|
-
const blocked = params.result.blockedScope?.scope;
|
|
176
|
-
return `ā ļø Config writes are disabled for ${blocked?.channelId ?? params.fallbackChannelId ?? "this channel"}. Set ${blocked?.channelId ? blocked.accountId ? `channels.${blocked.channelId}.accounts.${blocked.accountId}.configWrites=true` : `channels.${blocked.channelId}.configWrites=true` : params.fallbackChannelId ? `channels.${params.fallbackChannelId}.configWrites=true` : "channels.<channel>.configWrites=true"} to enable.`;
|
|
177
|
-
}
|
|
178
|
-
function listConfigWriteTargetScopes(target) {
|
|
179
|
-
if (!target || target.kind === "global") return [];
|
|
180
|
-
if (target.kind === "ambiguous") return target.scopes;
|
|
181
|
-
return [target.scope];
|
|
182
|
-
}
|
|
183
|
-
function resolveChannelConfig(cfg, channelId) {
|
|
184
|
-
if (!channelId) return;
|
|
185
|
-
return cfg.channels?.[channelId];
|
|
186
|
-
}
|
|
187
|
-
function resolveChannelAccountConfig(channelConfig, accountId) {
|
|
188
|
-
return resolveAccountEntry(channelConfig.accounts, normalizeAccountId(accountId));
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/auto-reply/reply/config-write-authorization.ts
|
|
192
|
-
function resolveConfigWriteDeniedText(params) {
|
|
193
|
-
const writeAuth = authorizeConfigWrite({
|
|
194
|
-
cfg: params.cfg,
|
|
195
|
-
origin: {
|
|
196
|
-
channelId: params.channelId,
|
|
197
|
-
accountId: params.accountId
|
|
198
|
-
},
|
|
199
|
-
target: params.target,
|
|
200
|
-
allowBypass: canBypassConfigWritePolicy({
|
|
201
|
-
channel: params.channel ?? "",
|
|
202
|
-
gatewayClientScopes: params.gatewayClientScopes
|
|
203
|
-
})
|
|
204
|
-
});
|
|
205
|
-
if (writeAuth.allowed) return null;
|
|
206
|
-
return formatConfigWriteDeniedMessage({
|
|
207
|
-
result: writeAuth,
|
|
208
|
-
fallbackChannelId: params.channelId
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/auto-reply/reply/commands-allowlist.ts
|
|
213
|
-
const ACTIONS = new Set([
|
|
214
|
-
"list",
|
|
215
|
-
"add",
|
|
216
|
-
"remove"
|
|
217
|
-
]);
|
|
218
|
-
const SCOPES = new Set([
|
|
219
|
-
"dm",
|
|
220
|
-
"group",
|
|
221
|
-
"all"
|
|
222
|
-
]);
|
|
223
|
-
function parseAllowlistCommand(raw) {
|
|
224
|
-
const trimmed = raw.trim();
|
|
225
|
-
if (!trimmed.toLowerCase().startsWith("/allowlist")) return null;
|
|
226
|
-
const rest = trimmed.slice(10).trim();
|
|
227
|
-
if (!rest) return {
|
|
228
|
-
action: "list",
|
|
229
|
-
scope: "dm"
|
|
230
|
-
};
|
|
231
|
-
const tokens = rest.split(/\s+/);
|
|
232
|
-
let action = "list";
|
|
233
|
-
let scope = "dm";
|
|
234
|
-
let resolve = false;
|
|
235
|
-
let target = "both";
|
|
236
|
-
let channel;
|
|
237
|
-
let account;
|
|
238
|
-
const entryTokens = [];
|
|
239
|
-
let i = 0;
|
|
240
|
-
if (tokens[i] && ACTIONS.has(tokens[i].toLowerCase())) {
|
|
241
|
-
action = tokens[i].toLowerCase();
|
|
242
|
-
i += 1;
|
|
243
|
-
}
|
|
244
|
-
if (tokens[i] && SCOPES.has(tokens[i].toLowerCase())) {
|
|
245
|
-
scope = tokens[i].toLowerCase();
|
|
246
|
-
i += 1;
|
|
247
|
-
}
|
|
248
|
-
for (; i < tokens.length; i += 1) {
|
|
249
|
-
const token = tokens[i];
|
|
250
|
-
const lowered = token.toLowerCase();
|
|
251
|
-
if (lowered === "--resolve" || lowered === "resolve") {
|
|
252
|
-
resolve = true;
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
if (lowered === "--config" || lowered === "config") {
|
|
256
|
-
target = "config";
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
if (lowered === "--store" || lowered === "store") {
|
|
260
|
-
target = "store";
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
if (lowered === "--channel" && tokens[i + 1]) {
|
|
264
|
-
channel = tokens[i + 1];
|
|
265
|
-
i += 1;
|
|
266
|
-
continue;
|
|
267
|
-
}
|
|
268
|
-
if (lowered === "--account" && tokens[i + 1]) {
|
|
269
|
-
account = tokens[i + 1];
|
|
270
|
-
i += 1;
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
const kv = token.split("=");
|
|
274
|
-
if (kv.length === 2) {
|
|
275
|
-
const key = kv[0]?.trim().toLowerCase();
|
|
276
|
-
const value = kv[1]?.trim();
|
|
277
|
-
if (key === "channel") {
|
|
278
|
-
if (value) channel = value;
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
if (key === "account") {
|
|
282
|
-
if (value) account = value;
|
|
283
|
-
continue;
|
|
284
|
-
}
|
|
285
|
-
if (key === "scope" && value && SCOPES.has(value.toLowerCase())) {
|
|
286
|
-
scope = value.toLowerCase();
|
|
287
|
-
continue;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
entryTokens.push(token);
|
|
291
|
-
}
|
|
292
|
-
if (action === "add" || action === "remove") {
|
|
293
|
-
const entry = entryTokens.join(" ").trim();
|
|
294
|
-
if (!entry) return {
|
|
295
|
-
action: "error",
|
|
296
|
-
message: "Usage: /allowlist add|remove <entry>"
|
|
297
|
-
};
|
|
298
|
-
return {
|
|
299
|
-
action,
|
|
300
|
-
scope,
|
|
301
|
-
entry,
|
|
302
|
-
channel,
|
|
303
|
-
account,
|
|
304
|
-
resolve,
|
|
305
|
-
target
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
return {
|
|
309
|
-
action: "list",
|
|
310
|
-
scope,
|
|
311
|
-
channel,
|
|
312
|
-
account,
|
|
313
|
-
resolve
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
function normalizeAllowFrom(params) {
|
|
317
|
-
const plugin = getChannelPlugin(params.channelId);
|
|
318
|
-
if (plugin?.config.formatAllowFrom) return plugin.config.formatAllowFrom({
|
|
319
|
-
cfg: params.cfg,
|
|
320
|
-
accountId: params.accountId,
|
|
321
|
-
allowFrom: params.values
|
|
322
|
-
});
|
|
323
|
-
return normalizeStringEntries(params.values);
|
|
324
|
-
}
|
|
325
|
-
function formatEntryList(entries, resolved) {
|
|
326
|
-
if (entries.length === 0) return "(none)";
|
|
327
|
-
return entries.map((entry) => {
|
|
328
|
-
const name = resolved?.get(entry);
|
|
329
|
-
return name ? `${entry} (${name})` : entry;
|
|
330
|
-
}).join(", ");
|
|
331
|
-
}
|
|
332
|
-
async function updatePairingStoreAllowlist(params) {
|
|
333
|
-
const storeEntry = {
|
|
334
|
-
channel: params.channelId,
|
|
335
|
-
entry: params.entry,
|
|
336
|
-
accountId: params.accountId
|
|
337
|
-
};
|
|
338
|
-
if (params.action === "add") {
|
|
339
|
-
await addChannelAllowFromStoreEntry(storeEntry);
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
await removeChannelAllowFromStoreEntry(storeEntry);
|
|
343
|
-
if (params.accountId === "default") await removeChannelAllowFromStoreEntry({
|
|
344
|
-
channel: params.channelId,
|
|
345
|
-
entry: params.entry
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
function mapResolvedAllowlistNames(entries) {
|
|
349
|
-
const map = /* @__PURE__ */ new Map();
|
|
350
|
-
for (const entry of entries) if (entry.resolved && entry.name) map.set(entry.input, entry.name);
|
|
351
|
-
return map;
|
|
352
|
-
}
|
|
353
|
-
async function resolveAllowlistNames(params) {
|
|
354
|
-
return mapResolvedAllowlistNames(await getChannelPlugin(params.channelId)?.allowlist?.resolveNames?.({
|
|
355
|
-
cfg: params.cfg,
|
|
356
|
-
accountId: params.accountId,
|
|
357
|
-
scope: params.scope,
|
|
358
|
-
entries: params.entries
|
|
359
|
-
}) ?? []);
|
|
360
|
-
}
|
|
361
|
-
async function readAllowlistConfig(params) {
|
|
362
|
-
return await getChannelPlugin(params.channelId)?.allowlist?.readConfig?.({
|
|
363
|
-
cfg: params.cfg,
|
|
364
|
-
accountId: params.accountId
|
|
365
|
-
}) ?? {};
|
|
366
|
-
}
|
|
367
|
-
const handleAllowlistCommand = async (params, allowTextCommands) => {
|
|
368
|
-
if (!allowTextCommands) return null;
|
|
369
|
-
const parsed = parseAllowlistCommand(params.command.commandBodyNormalized);
|
|
370
|
-
if (!parsed) return null;
|
|
371
|
-
if (parsed.action === "error") return {
|
|
372
|
-
shouldContinue: false,
|
|
373
|
-
reply: { text: `ā ļø ${parsed.message}` }
|
|
374
|
-
};
|
|
375
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/allowlist");
|
|
376
|
-
if (unauthorized) return unauthorized;
|
|
377
|
-
const channelId = normalizeChannelId(parsed.channel) ?? params.command.channelId ?? normalizeChannelId(params.command.channel);
|
|
378
|
-
if (!channelId) return {
|
|
379
|
-
shouldContinue: false,
|
|
380
|
-
reply: { text: "ā ļø Unknown channel. Add channel=<id> to the command." }
|
|
381
|
-
};
|
|
382
|
-
if (parsed.account?.trim() && !normalizeOptionalAccountId(parsed.account)) return {
|
|
383
|
-
shouldContinue: false,
|
|
384
|
-
reply: { text: "ā ļø Invalid account id. Reserved keys (__proto__, constructor, prototype) are blocked." }
|
|
385
|
-
};
|
|
386
|
-
const accountId = normalizeAccountId(parsed.account ?? params.ctx.AccountId);
|
|
387
|
-
const plugin = getChannelPlugin(channelId);
|
|
388
|
-
if (parsed.action === "list") {
|
|
389
|
-
const supportsStore = Boolean(plugin?.pairing);
|
|
390
|
-
if (!plugin?.allowlist?.readConfig && !supportsStore) return {
|
|
391
|
-
shouldContinue: false,
|
|
392
|
-
reply: { text: `ā ļø ${channelId} does not expose allowlist configuration.` }
|
|
393
|
-
};
|
|
394
|
-
const storeAllowFrom = supportsStore ? await readChannelAllowFromStore(channelId, process.env, accountId).catch(() => []) : [];
|
|
395
|
-
const configState = await readAllowlistConfig({
|
|
396
|
-
cfg: params.cfg,
|
|
397
|
-
channelId,
|
|
398
|
-
accountId
|
|
399
|
-
});
|
|
400
|
-
const dmAllowFrom = (configState.dmAllowFrom ?? []).map(String);
|
|
401
|
-
const groupAllowFrom = (configState.groupAllowFrom ?? []).map(String);
|
|
402
|
-
const groupOverrides = (configState.groupOverrides ?? []).map((entry) => ({
|
|
403
|
-
label: entry.label,
|
|
404
|
-
entries: entry.entries.map(String).filter(Boolean)
|
|
405
|
-
}));
|
|
406
|
-
const dmDisplay = normalizeAllowFrom({
|
|
407
|
-
cfg: params.cfg,
|
|
408
|
-
channelId,
|
|
409
|
-
accountId,
|
|
410
|
-
values: dmAllowFrom
|
|
411
|
-
});
|
|
412
|
-
const groupDisplay = normalizeAllowFrom({
|
|
413
|
-
cfg: params.cfg,
|
|
414
|
-
channelId,
|
|
415
|
-
accountId,
|
|
416
|
-
values: groupAllowFrom
|
|
417
|
-
});
|
|
418
|
-
const groupOverrideEntries = groupOverrides.flatMap((entry) => entry.entries);
|
|
419
|
-
const groupOverrideDisplay = normalizeAllowFrom({
|
|
420
|
-
cfg: params.cfg,
|
|
421
|
-
channelId,
|
|
422
|
-
accountId,
|
|
423
|
-
values: groupOverrideEntries
|
|
424
|
-
});
|
|
425
|
-
const resolvedDm = parsed.resolve && dmDisplay.length > 0 ? await resolveAllowlistNames({
|
|
426
|
-
cfg: params.cfg,
|
|
427
|
-
channelId,
|
|
428
|
-
accountId,
|
|
429
|
-
scope: "dm",
|
|
430
|
-
entries: dmDisplay
|
|
431
|
-
}) : void 0;
|
|
432
|
-
const resolvedGroup = parsed.resolve && groupOverrideDisplay.length > 0 ? await resolveAllowlistNames({
|
|
433
|
-
cfg: params.cfg,
|
|
434
|
-
channelId,
|
|
435
|
-
accountId,
|
|
436
|
-
scope: "group",
|
|
437
|
-
entries: groupOverrideDisplay
|
|
438
|
-
}) : void 0;
|
|
439
|
-
const lines = ["š§¾ Allowlist"];
|
|
440
|
-
lines.push(`Channel: ${channelId}${accountId ? ` (account ${accountId})` : ""}`);
|
|
441
|
-
if (configState.dmPolicy) lines.push(`DM policy: ${configState.dmPolicy}`);
|
|
442
|
-
if (configState.groupPolicy) lines.push(`Group policy: ${configState.groupPolicy}`);
|
|
443
|
-
const showDm = parsed.scope === "dm" || parsed.scope === "all";
|
|
444
|
-
const showGroup = parsed.scope === "group" || parsed.scope === "all";
|
|
445
|
-
if (showDm) lines.push(`DM allowFrom (config): ${formatEntryList(dmDisplay, resolvedDm)}`);
|
|
446
|
-
if (supportsStore && storeAllowFrom.length > 0) {
|
|
447
|
-
const storeLabel = normalizeAllowFrom({
|
|
448
|
-
cfg: params.cfg,
|
|
449
|
-
channelId,
|
|
450
|
-
accountId,
|
|
451
|
-
values: storeAllowFrom
|
|
452
|
-
});
|
|
453
|
-
lines.push(`Paired allowFrom (store): ${formatEntryList(storeLabel)}`);
|
|
454
|
-
}
|
|
455
|
-
if (showGroup) {
|
|
456
|
-
if (groupAllowFrom.length > 0) lines.push(`Group allowFrom (config): ${formatEntryList(groupDisplay, resolvedGroup)}`);
|
|
457
|
-
if (groupOverrides.length > 0) {
|
|
458
|
-
lines.push("Group overrides:");
|
|
459
|
-
for (const entry of groupOverrides) {
|
|
460
|
-
const normalized = normalizeAllowFrom({
|
|
461
|
-
cfg: params.cfg,
|
|
462
|
-
channelId,
|
|
463
|
-
accountId,
|
|
464
|
-
values: entry.entries
|
|
465
|
-
});
|
|
466
|
-
lines.push(`- ${entry.label}: ${formatEntryList(normalized, resolvedGroup)}`);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
return {
|
|
471
|
-
shouldContinue: false,
|
|
472
|
-
reply: { text: lines.join("\n") }
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
const missingAdminScope = requireGatewayClientScopeForInternalChannel(params, {
|
|
476
|
-
label: "/allowlist write",
|
|
477
|
-
allowedScopes: ["operator.admin"],
|
|
478
|
-
missingText: "ā /allowlist add|remove requires operator.admin for gateway clients."
|
|
479
|
-
});
|
|
480
|
-
if (missingAdminScope) return missingAdminScope;
|
|
481
|
-
const disabled = requireCommandFlagEnabled(params.cfg, {
|
|
482
|
-
label: "/allowlist edits",
|
|
483
|
-
configKey: "config",
|
|
484
|
-
disabledVerb: "are"
|
|
485
|
-
});
|
|
486
|
-
if (disabled) return disabled;
|
|
487
|
-
const shouldUpdateConfig = parsed.target !== "store";
|
|
488
|
-
const shouldTouchStore = parsed.target !== "config" && Boolean(plugin?.pairing);
|
|
489
|
-
if (shouldUpdateConfig) {
|
|
490
|
-
if (parsed.scope === "all") return {
|
|
491
|
-
shouldContinue: false,
|
|
492
|
-
reply: { text: "ā ļø /allowlist add|remove requires scope dm or group." }
|
|
493
|
-
};
|
|
494
|
-
if (!plugin?.allowlist?.applyConfigEdit) return {
|
|
495
|
-
shouldContinue: false,
|
|
496
|
-
reply: { text: `ā ļø ${channelId} does not support ${parsed.scope} allowlist edits via /allowlist.` }
|
|
497
|
-
};
|
|
498
|
-
const snapshot = await readConfigFileSnapshot();
|
|
499
|
-
if (!snapshot.valid || !snapshot.parsed || typeof snapshot.parsed !== "object") return {
|
|
500
|
-
shouldContinue: false,
|
|
501
|
-
reply: { text: "ā ļø Config file is invalid; fix it before using /allowlist." }
|
|
502
|
-
};
|
|
503
|
-
const parsedConfig = structuredClone(snapshot.parsed);
|
|
504
|
-
const editResult = await plugin.allowlist.applyConfigEdit({
|
|
505
|
-
cfg: params.cfg,
|
|
506
|
-
parsedConfig,
|
|
507
|
-
accountId,
|
|
508
|
-
scope: parsed.scope,
|
|
509
|
-
action: parsed.action,
|
|
510
|
-
entry: parsed.entry
|
|
511
|
-
});
|
|
512
|
-
if (!editResult) return {
|
|
513
|
-
shouldContinue: false,
|
|
514
|
-
reply: { text: `ā ļø ${channelId} does not support ${parsed.scope} allowlist edits via /allowlist.` }
|
|
515
|
-
};
|
|
516
|
-
if (editResult.kind === "invalid-entry") return {
|
|
517
|
-
shouldContinue: false,
|
|
518
|
-
reply: { text: "ā ļø Invalid allowlist entry." }
|
|
519
|
-
};
|
|
520
|
-
const deniedText = resolveConfigWriteDeniedText({
|
|
521
|
-
cfg: params.cfg,
|
|
522
|
-
channel: params.command.channel,
|
|
523
|
-
channelId,
|
|
524
|
-
accountId: params.ctx.AccountId,
|
|
525
|
-
gatewayClientScopes: params.ctx.GatewayClientScopes,
|
|
526
|
-
target: editResult.writeTarget
|
|
527
|
-
});
|
|
528
|
-
if (deniedText) return {
|
|
529
|
-
shouldContinue: false,
|
|
530
|
-
reply: { text: deniedText }
|
|
531
|
-
};
|
|
532
|
-
const configChanged = editResult.changed;
|
|
533
|
-
if (configChanged) {
|
|
534
|
-
const validated = validateConfigObjectWithPlugins(parsedConfig);
|
|
535
|
-
if (!validated.ok) {
|
|
536
|
-
const issue = validated.issues[0];
|
|
537
|
-
return {
|
|
538
|
-
shouldContinue: false,
|
|
539
|
-
reply: { text: `ā ļø Config invalid after update (${issue.path}: ${issue.message}).` }
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
await writeConfigFile(validated.config);
|
|
543
|
-
}
|
|
544
|
-
if (!configChanged && !shouldTouchStore) return {
|
|
545
|
-
shouldContinue: false,
|
|
546
|
-
reply: { text: parsed.action === "add" ? "ā
Already allowlisted." : "ā ļø Entry not found." }
|
|
547
|
-
};
|
|
548
|
-
if (shouldTouchStore) await updatePairingStoreAllowlist({
|
|
549
|
-
action: parsed.action,
|
|
550
|
-
channelId,
|
|
551
|
-
accountId,
|
|
552
|
-
entry: parsed.entry
|
|
553
|
-
});
|
|
554
|
-
const actionLabel = parsed.action === "add" ? "added" : "removed";
|
|
555
|
-
const scopeLabel = parsed.scope === "dm" ? "DM" : "group";
|
|
556
|
-
const locations = [];
|
|
557
|
-
if (configChanged) locations.push(editResult.pathLabel);
|
|
558
|
-
if (shouldTouchStore) locations.push("pairing store");
|
|
559
|
-
return {
|
|
560
|
-
shouldContinue: false,
|
|
561
|
-
reply: { text: `ā
${scopeLabel} allowlist ${actionLabel}: ${locations.length > 0 ? locations.join(" + ") : "no-op"}.` }
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
if (!shouldTouchStore) return {
|
|
565
|
-
shouldContinue: false,
|
|
566
|
-
reply: { text: "ā ļø This channel does not support allowlist storage." }
|
|
567
|
-
};
|
|
568
|
-
await updatePairingStoreAllowlist({
|
|
569
|
-
action: parsed.action,
|
|
570
|
-
channelId,
|
|
571
|
-
accountId,
|
|
572
|
-
entry: parsed.entry
|
|
573
|
-
});
|
|
574
|
-
const actionLabel = parsed.action === "add" ? "added" : "removed";
|
|
575
|
-
return {
|
|
576
|
-
shouldContinue: false,
|
|
577
|
-
reply: { text: `ā
${parsed.scope === "dm" ? "DM" : "group"} allowlist ${actionLabel} in pairing store.` }
|
|
578
|
-
};
|
|
579
|
-
};
|
|
580
|
-
//#endregion
|
|
581
|
-
//#region src/infra/channel-approval-auth.ts
|
|
582
|
-
function resolveApprovalCommandAuthorization(params) {
|
|
583
|
-
const channel = normalizeMessageChannel(params.channel);
|
|
584
|
-
if (!channel) return {
|
|
585
|
-
authorized: true,
|
|
586
|
-
explicit: false
|
|
587
|
-
};
|
|
588
|
-
const approvalCapability = resolveChannelApprovalCapability(getChannelPlugin(channel));
|
|
589
|
-
const resolved = approvalCapability?.authorizeActorAction?.({
|
|
590
|
-
cfg: params.cfg,
|
|
591
|
-
accountId: params.accountId,
|
|
592
|
-
senderId: params.senderId,
|
|
593
|
-
action: "approve",
|
|
594
|
-
approvalKind: params.kind
|
|
595
|
-
});
|
|
596
|
-
if (!resolved) return {
|
|
597
|
-
authorized: true,
|
|
598
|
-
explicit: false
|
|
599
|
-
};
|
|
600
|
-
const availability = approvalCapability?.getActionAvailabilityState?.({
|
|
601
|
-
cfg: params.cfg,
|
|
602
|
-
accountId: params.accountId,
|
|
603
|
-
action: "approve"
|
|
604
|
-
});
|
|
605
|
-
return {
|
|
606
|
-
authorized: resolved.authorized,
|
|
607
|
-
reason: resolved.reason,
|
|
608
|
-
explicit: resolved.authorized ? availability?.kind !== "disabled" : true
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
//#endregion
|
|
612
|
-
//#region src/auto-reply/reply/commands-approve.ts
|
|
613
|
-
const COMMAND_REGEX = /^\/?approve(?:\s|$)/i;
|
|
614
|
-
const FOREIGN_COMMAND_MENTION_REGEX = /^\/approve@([^\s]+)(?:\s|$)/i;
|
|
615
|
-
const DECISION_ALIASES = {
|
|
616
|
-
allow: "allow-once",
|
|
617
|
-
once: "allow-once",
|
|
618
|
-
"allow-once": "allow-once",
|
|
619
|
-
allowonce: "allow-once",
|
|
620
|
-
always: "allow-always",
|
|
621
|
-
"allow-always": "allow-always",
|
|
622
|
-
allowalways: "allow-always",
|
|
623
|
-
deny: "deny",
|
|
624
|
-
reject: "deny",
|
|
625
|
-
block: "deny"
|
|
626
|
-
};
|
|
627
|
-
const APPROVE_USAGE_TEXT = "Usage: /approve <id> <decision> (see the pending approval message for available decisions)";
|
|
628
|
-
function parseApproveCommand(raw) {
|
|
629
|
-
const trimmed = raw.trim();
|
|
630
|
-
if (FOREIGN_COMMAND_MENTION_REGEX.test(trimmed)) return {
|
|
631
|
-
ok: false,
|
|
632
|
-
error: "ā This /approve command targets a different Telegram bot."
|
|
633
|
-
};
|
|
634
|
-
const commandMatch = trimmed.match(COMMAND_REGEX);
|
|
635
|
-
if (!commandMatch) return null;
|
|
636
|
-
const rest = trimmed.slice(commandMatch[0].length).trim();
|
|
637
|
-
if (!rest) return {
|
|
638
|
-
ok: false,
|
|
639
|
-
error: APPROVE_USAGE_TEXT
|
|
640
|
-
};
|
|
641
|
-
const tokens = rest.split(/\s+/).filter(Boolean);
|
|
642
|
-
if (tokens.length < 2) return {
|
|
643
|
-
ok: false,
|
|
644
|
-
error: APPROVE_USAGE_TEXT
|
|
645
|
-
};
|
|
646
|
-
const first = tokens[0].toLowerCase();
|
|
647
|
-
const second = tokens[1].toLowerCase();
|
|
648
|
-
if (DECISION_ALIASES[first]) return {
|
|
649
|
-
ok: true,
|
|
650
|
-
decision: DECISION_ALIASES[first],
|
|
651
|
-
id: tokens.slice(1).join(" ").trim()
|
|
652
|
-
};
|
|
653
|
-
if (DECISION_ALIASES[second]) return {
|
|
654
|
-
ok: true,
|
|
655
|
-
decision: DECISION_ALIASES[second],
|
|
656
|
-
id: tokens[0]
|
|
657
|
-
};
|
|
658
|
-
return {
|
|
659
|
-
ok: false,
|
|
660
|
-
error: APPROVE_USAGE_TEXT
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
function buildResolvedByLabel(params) {
|
|
664
|
-
return `${params.command.channel}:${params.command.senderId ?? "unknown"}`;
|
|
665
|
-
}
|
|
666
|
-
function isAuthorizedTelegramExecSender(params) {
|
|
667
|
-
if (params.command.channel !== "telegram") return false;
|
|
668
|
-
return isTelegramExecApprovalAuthorizedSender({
|
|
669
|
-
cfg: params.cfg,
|
|
670
|
-
accountId: params.ctx.AccountId,
|
|
671
|
-
senderId: params.command.senderId
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
function readErrorCode(value) {
|
|
675
|
-
return typeof value === "string" && value.trim() ? value : null;
|
|
676
|
-
}
|
|
677
|
-
function readApprovalNotFoundDetailsReason(value) {
|
|
678
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
679
|
-
const reason = value.reason;
|
|
680
|
-
return typeof reason === "string" && reason.trim() ? reason : null;
|
|
681
|
-
}
|
|
682
|
-
function isApprovalNotFoundError(err) {
|
|
683
|
-
if (!(err instanceof Error)) return false;
|
|
684
|
-
const gatewayCode = readErrorCode(err.gatewayCode);
|
|
685
|
-
if (gatewayCode === ErrorCodes.APPROVAL_NOT_FOUND) return true;
|
|
686
|
-
const detailsReason = readApprovalNotFoundDetailsReason(err.details);
|
|
687
|
-
if (gatewayCode === ErrorCodes.INVALID_REQUEST && detailsReason === ErrorCodes.APPROVAL_NOT_FOUND) return true;
|
|
688
|
-
return /unknown or expired approval id/i.test(err.message);
|
|
689
|
-
}
|
|
690
|
-
function formatApprovalSubmitError(error) {
|
|
691
|
-
return error instanceof Error ? error.message : String(error);
|
|
692
|
-
}
|
|
693
|
-
function resolveApprovalMethods(params) {
|
|
694
|
-
if (params.approvalId.startsWith("plugin:")) return params.pluginAuthorization.authorized ? ["plugin.approval.resolve"] : [];
|
|
695
|
-
if (params.execAuthorization.authorized && params.pluginAuthorization.authorized) return ["exec.approval.resolve", "plugin.approval.resolve"];
|
|
696
|
-
if (params.execAuthorization.authorized) return ["exec.approval.resolve"];
|
|
697
|
-
if (params.pluginAuthorization.authorized) return ["plugin.approval.resolve"];
|
|
698
|
-
return [];
|
|
699
|
-
}
|
|
700
|
-
function resolveApprovalAuthorizationError(params) {
|
|
701
|
-
if (params.approvalId.startsWith("plugin:")) return params.pluginAuthorization.reason ?? "ā You are not authorized to approve this request.";
|
|
702
|
-
return params.execAuthorization.reason ?? params.pluginAuthorization.reason ?? "ā You are not authorized to approve this request.";
|
|
703
|
-
}
|
|
704
|
-
const handleApproveCommand = async (params, allowTextCommands) => {
|
|
705
|
-
if (!allowTextCommands) return null;
|
|
706
|
-
const normalized = params.command.commandBodyNormalized;
|
|
707
|
-
const parsed = parseApproveCommand(normalized);
|
|
708
|
-
if (!parsed) return null;
|
|
709
|
-
if (!parsed.ok) return {
|
|
710
|
-
shouldContinue: false,
|
|
711
|
-
reply: { text: parsed.error }
|
|
712
|
-
};
|
|
713
|
-
const isPluginId = parsed.id.startsWith("plugin:");
|
|
714
|
-
const telegramExecAuthorizedSender = isAuthorizedTelegramExecSender(params);
|
|
715
|
-
const execApprovalAuthorization = resolveApprovalCommandAuthorization({
|
|
716
|
-
cfg: params.cfg,
|
|
717
|
-
channel: params.command.channel,
|
|
718
|
-
accountId: params.ctx.AccountId,
|
|
719
|
-
senderId: params.command.senderId,
|
|
720
|
-
kind: "exec"
|
|
721
|
-
});
|
|
722
|
-
const pluginApprovalAuthorization = resolveApprovalCommandAuthorization({
|
|
723
|
-
cfg: params.cfg,
|
|
724
|
-
channel: params.command.channel,
|
|
725
|
-
accountId: params.ctx.AccountId,
|
|
726
|
-
senderId: params.command.senderId,
|
|
727
|
-
kind: "plugin"
|
|
728
|
-
});
|
|
729
|
-
const hasExplicitApprovalAuthorization = execApprovalAuthorization.explicit && execApprovalAuthorization.authorized || pluginApprovalAuthorization.explicit && pluginApprovalAuthorization.authorized;
|
|
730
|
-
if (!params.command.isAuthorizedSender && !hasExplicitApprovalAuthorization) {
|
|
731
|
-
logVerbose(`Ignoring /approve from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
732
|
-
return { shouldContinue: false };
|
|
733
|
-
}
|
|
734
|
-
if (params.command.channel === "telegram" && !isPluginId && !telegramExecAuthorizedSender && !isTelegramExecApprovalClientEnabled({
|
|
735
|
-
cfg: params.cfg,
|
|
736
|
-
accountId: params.ctx.AccountId
|
|
737
|
-
})) return {
|
|
738
|
-
shouldContinue: false,
|
|
739
|
-
reply: { text: "ā Telegram exec approvals are not enabled for this bot account." }
|
|
740
|
-
};
|
|
741
|
-
const missingScope = requireGatewayClientScopeForInternalChannel(params, {
|
|
742
|
-
label: "/approve",
|
|
743
|
-
allowedScopes: ["operator.approvals", "operator.admin"],
|
|
744
|
-
missingText: "ā /approve requires operator.approvals for gateway clients."
|
|
745
|
-
});
|
|
746
|
-
if (missingScope) return missingScope;
|
|
747
|
-
const resolvedBy = buildResolvedByLabel(params);
|
|
748
|
-
const callApprovalMethod = async (method) => {
|
|
749
|
-
await callGateway({
|
|
750
|
-
method,
|
|
751
|
-
params: {
|
|
752
|
-
id: parsed.id,
|
|
753
|
-
decision: parsed.decision
|
|
754
|
-
},
|
|
755
|
-
clientName: GATEWAY_CLIENT_NAMES.GATEWAY_CLIENT,
|
|
756
|
-
clientDisplayName: `Chat approval (${resolvedBy})`,
|
|
757
|
-
mode: GATEWAY_CLIENT_MODES.BACKEND
|
|
758
|
-
});
|
|
759
|
-
};
|
|
760
|
-
const methods = resolveApprovalMethods({
|
|
761
|
-
approvalId: parsed.id,
|
|
762
|
-
execAuthorization: execApprovalAuthorization,
|
|
763
|
-
pluginAuthorization: pluginApprovalAuthorization
|
|
764
|
-
});
|
|
765
|
-
if (methods.length === 0) return {
|
|
766
|
-
shouldContinue: false,
|
|
767
|
-
reply: { text: resolveApprovalAuthorizationError({
|
|
768
|
-
approvalId: parsed.id,
|
|
769
|
-
execAuthorization: execApprovalAuthorization,
|
|
770
|
-
pluginAuthorization: pluginApprovalAuthorization
|
|
771
|
-
}) }
|
|
772
|
-
};
|
|
773
|
-
let lastError = null;
|
|
774
|
-
for (const [index, method] of methods.entries()) try {
|
|
775
|
-
await callApprovalMethod(method);
|
|
776
|
-
lastError = null;
|
|
777
|
-
break;
|
|
778
|
-
} catch (error) {
|
|
779
|
-
lastError = error;
|
|
780
|
-
const isLastMethod = index === methods.length - 1;
|
|
781
|
-
if (!isApprovalNotFoundError(error) || isLastMethod) return {
|
|
782
|
-
shouldContinue: false,
|
|
783
|
-
reply: { text: `ā Failed to submit approval: ${formatApprovalSubmitError(error)}` }
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
if (lastError) return {
|
|
787
|
-
shouldContinue: false,
|
|
788
|
-
reply: { text: `ā Failed to submit approval: ${formatApprovalSubmitError(lastError)}` }
|
|
789
|
-
};
|
|
790
|
-
return {
|
|
791
|
-
shouldContinue: false,
|
|
792
|
-
reply: { text: `ā
Approval ${parsed.decision} submitted for ${parsed.id}.` }
|
|
793
|
-
};
|
|
794
|
-
};
|
|
795
|
-
//#endregion
|
|
796
|
-
//#region src/auto-reply/reply/bash-command.ts
|
|
797
|
-
const CHAT_BASH_SCOPE_KEY = "chat:bash";
|
|
798
|
-
const DEFAULT_FOREGROUND_MS = 2e3;
|
|
799
|
-
const MAX_FOREGROUND_MS = 3e4;
|
|
800
|
-
let activeJob = null;
|
|
801
|
-
function resolveForegroundMs(cfg) {
|
|
802
|
-
const raw = cfg.commands?.bashForegroundMs;
|
|
803
|
-
if (typeof raw !== "number" || Number.isNaN(raw)) return DEFAULT_FOREGROUND_MS;
|
|
804
|
-
return clampInt(raw, 0, MAX_FOREGROUND_MS);
|
|
805
|
-
}
|
|
806
|
-
function formatSessionSnippet(sessionId) {
|
|
807
|
-
const trimmed = sessionId.trim();
|
|
808
|
-
if (trimmed.length <= 12) return trimmed;
|
|
809
|
-
return `${trimmed.slice(0, 8)}ā¦`;
|
|
810
|
-
}
|
|
811
|
-
function formatOutputBlock(text) {
|
|
812
|
-
const trimmed = text.trim();
|
|
813
|
-
if (!trimmed) return "(no output)";
|
|
814
|
-
return `\`\`\`txt\n${trimmed}\n\`\`\``;
|
|
815
|
-
}
|
|
816
|
-
function parseBashRequest(raw) {
|
|
817
|
-
const trimmed = raw.trimStart();
|
|
818
|
-
let restSource = "";
|
|
819
|
-
if (trimmed.toLowerCase().startsWith("/bash")) {
|
|
820
|
-
const match = trimmed.match(/^\/bash(?:\s*:\s*|\s+|$)([\s\S]*)$/i);
|
|
821
|
-
if (!match) return null;
|
|
822
|
-
restSource = match[1] ?? "";
|
|
823
|
-
} else if (trimmed.startsWith("!")) {
|
|
824
|
-
restSource = trimmed.slice(1);
|
|
825
|
-
if (restSource.trimStart().startsWith(":")) restSource = restSource.trimStart().slice(1);
|
|
826
|
-
} else return null;
|
|
827
|
-
const rest = restSource.trimStart();
|
|
828
|
-
if (!rest) return { action: "help" };
|
|
829
|
-
const tokenMatch = rest.match(/^(\S+)(?:\s+([\s\S]+))?$/);
|
|
830
|
-
const token = tokenMatch?.[1]?.trim() ?? "";
|
|
831
|
-
const remainder = tokenMatch?.[2]?.trim() ?? "";
|
|
832
|
-
const lowered = token.toLowerCase();
|
|
833
|
-
if (lowered === "poll") return {
|
|
834
|
-
action: "poll",
|
|
835
|
-
sessionId: remainder || void 0
|
|
836
|
-
};
|
|
837
|
-
if (lowered === "stop") return {
|
|
838
|
-
action: "stop",
|
|
839
|
-
sessionId: remainder || void 0
|
|
840
|
-
};
|
|
841
|
-
if (lowered === "help") return { action: "help" };
|
|
842
|
-
return {
|
|
843
|
-
action: "run",
|
|
844
|
-
command: rest
|
|
845
|
-
};
|
|
846
|
-
}
|
|
847
|
-
function resolveRawCommandBody(params) {
|
|
848
|
-
const stripped = stripStructuralPrefixes(params.ctx.CommandBody ?? params.ctx.RawBody ?? params.ctx.Body ?? "");
|
|
849
|
-
return params.isGroup ? stripMentions(stripped, params.ctx, params.cfg, params.agentId) : stripped;
|
|
850
|
-
}
|
|
851
|
-
function getScopedSession(sessionId) {
|
|
852
|
-
const running = getSession(sessionId);
|
|
853
|
-
if (running && running.scopeKey === CHAT_BASH_SCOPE_KEY) return { running };
|
|
854
|
-
const finished = getFinishedSession(sessionId);
|
|
855
|
-
if (finished && finished.scopeKey === CHAT_BASH_SCOPE_KEY) return { finished };
|
|
856
|
-
return {};
|
|
857
|
-
}
|
|
858
|
-
function ensureActiveJobState() {
|
|
859
|
-
if (!activeJob) return null;
|
|
860
|
-
if (activeJob.state === "starting") return activeJob;
|
|
861
|
-
const { running, finished } = getScopedSession(activeJob.sessionId);
|
|
862
|
-
if (running) return activeJob;
|
|
863
|
-
if (finished) {
|
|
864
|
-
activeJob = null;
|
|
865
|
-
return null;
|
|
866
|
-
}
|
|
867
|
-
activeJob = null;
|
|
868
|
-
return null;
|
|
869
|
-
}
|
|
870
|
-
function attachActiveWatcher(sessionId) {
|
|
871
|
-
if (!activeJob || activeJob.state !== "running") return;
|
|
872
|
-
if (activeJob.sessionId !== sessionId) return;
|
|
873
|
-
if (activeJob.watcherAttached) return;
|
|
874
|
-
const { running } = getScopedSession(sessionId);
|
|
875
|
-
const child = running?.child;
|
|
876
|
-
if (!child) return;
|
|
877
|
-
activeJob.watcherAttached = true;
|
|
878
|
-
child.once("close", () => {
|
|
879
|
-
if (activeJob?.state === "running" && activeJob.sessionId === sessionId) activeJob = null;
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
function buildUsageReply() {
|
|
883
|
-
return { text: [
|
|
884
|
-
"āļø Usage:",
|
|
885
|
-
"- ! <command>",
|
|
886
|
-
"- !poll | ! poll",
|
|
887
|
-
"- !stop | ! stop",
|
|
888
|
-
"- /bash ... (alias; same subcommands as !)"
|
|
889
|
-
].join("\n") };
|
|
890
|
-
}
|
|
891
|
-
async function handleBashChatCommand(params) {
|
|
892
|
-
if (!isCommandFlagEnabled(params.cfg, "bash")) return buildDisabledCommandReply({
|
|
893
|
-
label: "bash",
|
|
894
|
-
configKey: "bash",
|
|
895
|
-
docsUrl: "https://docs.stableclaw.ai/tools/slash-commands#config"
|
|
896
|
-
});
|
|
897
|
-
const agentId = params.agentId ?? resolveSessionAgentId({
|
|
898
|
-
sessionKey: params.sessionKey,
|
|
899
|
-
config: params.cfg
|
|
900
|
-
});
|
|
901
|
-
if (!params.elevated.enabled || !params.elevated.allowed) {
|
|
902
|
-
const runtimeSandboxed = resolveSandboxRuntimeStatus({
|
|
903
|
-
cfg: params.cfg,
|
|
904
|
-
sessionKey: params.ctx.SessionKey
|
|
905
|
-
}).sandboxed;
|
|
906
|
-
return { text: formatElevatedUnavailableMessage({
|
|
907
|
-
runtimeSandboxed,
|
|
908
|
-
failures: params.elevated.failures,
|
|
909
|
-
sessionKey: params.ctx.SessionKey
|
|
910
|
-
}) };
|
|
911
|
-
}
|
|
912
|
-
const request = parseBashRequest(resolveRawCommandBody({
|
|
913
|
-
ctx: params.ctx,
|
|
914
|
-
cfg: params.cfg,
|
|
915
|
-
agentId,
|
|
916
|
-
isGroup: params.isGroup
|
|
917
|
-
}).trim());
|
|
918
|
-
if (!request) return { text: "ā ļø Unrecognized bash request." };
|
|
919
|
-
const liveJob = ensureActiveJobState();
|
|
920
|
-
if (request.action === "help") return buildUsageReply();
|
|
921
|
-
if (request.action === "poll") {
|
|
922
|
-
const sessionId = request.sessionId?.trim() || (liveJob?.state === "running" ? liveJob.sessionId : "");
|
|
923
|
-
if (!sessionId) return { text: "āļø No active bash job." };
|
|
924
|
-
const { running, finished } = getScopedSession(sessionId);
|
|
925
|
-
if (running) {
|
|
926
|
-
attachActiveWatcher(sessionId);
|
|
927
|
-
const runtimeSec = Math.max(0, Math.floor((Date.now() - running.startedAt) / 1e3));
|
|
928
|
-
const tail = running.tail || "(no output yet)";
|
|
929
|
-
return { text: [
|
|
930
|
-
`āļø bash still running (session ${formatSessionSnippet(sessionId)}, ${runtimeSec}s).`,
|
|
931
|
-
formatOutputBlock(tail),
|
|
932
|
-
"Hint: !stop (or /bash stop)"
|
|
933
|
-
].join("\n") };
|
|
934
|
-
}
|
|
935
|
-
if (finished) {
|
|
936
|
-
if (activeJob?.state === "running" && activeJob.sessionId === sessionId) activeJob = null;
|
|
937
|
-
const exitLabel = finished.exitSignal ? `signal ${String(finished.exitSignal)}` : `code ${String(finished.exitCode ?? 0)}`;
|
|
938
|
-
return { text: [
|
|
939
|
-
`${finished.status === "completed" ? "āļø" : "ā ļø"} bash finished (session ${formatSessionSnippet(sessionId)}).`,
|
|
940
|
-
`Exit: ${exitLabel}`,
|
|
941
|
-
formatOutputBlock(finished.aggregated || finished.tail)
|
|
942
|
-
].join("\n") };
|
|
943
|
-
}
|
|
944
|
-
if (activeJob?.state === "running" && activeJob.sessionId === sessionId) activeJob = null;
|
|
945
|
-
return { text: `āļø No bash session found for ${formatSessionSnippet(sessionId)}.` };
|
|
946
|
-
}
|
|
947
|
-
if (request.action === "stop") {
|
|
948
|
-
const sessionId = request.sessionId?.trim() || (liveJob?.state === "running" ? liveJob.sessionId : "");
|
|
949
|
-
if (!sessionId) return { text: "āļø No active bash job." };
|
|
950
|
-
const { running } = getScopedSession(sessionId);
|
|
951
|
-
if (!running) {
|
|
952
|
-
if (activeJob?.state === "running" && activeJob.sessionId === sessionId) activeJob = null;
|
|
953
|
-
return { text: `āļø No running bash job found for ${formatSessionSnippet(sessionId)}.` };
|
|
954
|
-
}
|
|
955
|
-
if (!running.backgrounded) return { text: `ā ļø Session ${formatSessionSnippet(sessionId)} is not backgrounded.` };
|
|
956
|
-
const pid = running.pid ?? running.child?.pid;
|
|
957
|
-
if (!pid) return { text: `ā ļø Unable to stop bash session ${formatSessionSnippet(sessionId)} because no process ID is available. Use !poll ${sessionId} to check whether it exits on its own.` };
|
|
958
|
-
const { killProcessTree } = await import("./kill-tree-CXrQfo5W.js");
|
|
959
|
-
killProcessTree(pid);
|
|
960
|
-
return { text: `āļø bash stopping (session ${formatSessionSnippet(sessionId)}). Use !poll ${sessionId} to confirm exit.` };
|
|
961
|
-
}
|
|
962
|
-
if (liveJob) return { text: `ā ļø A bash job is already running (${liveJob.state === "running" ? formatSessionSnippet(liveJob.sessionId) : "starting"}). Use !poll / !stop (or /bash poll / /bash stop).` };
|
|
963
|
-
const commandText = request.command.trim();
|
|
964
|
-
if (!commandText) return buildUsageReply();
|
|
965
|
-
activeJob = {
|
|
966
|
-
state: "starting",
|
|
967
|
-
startedAt: Date.now(),
|
|
968
|
-
command: commandText
|
|
969
|
-
};
|
|
970
|
-
try {
|
|
971
|
-
const foregroundMs = resolveForegroundMs(params.cfg);
|
|
972
|
-
const shouldBackgroundImmediately = foregroundMs <= 0;
|
|
973
|
-
const timeoutSec = params.cfg.tools?.exec?.timeoutSec;
|
|
974
|
-
const notifyOnExit = params.cfg.tools?.exec?.notifyOnExit;
|
|
975
|
-
const notifyOnExitEmptySuccess = params.cfg.tools?.exec?.notifyOnExitEmptySuccess;
|
|
976
|
-
const result = await createExecTool({
|
|
977
|
-
scopeKey: CHAT_BASH_SCOPE_KEY,
|
|
978
|
-
allowBackground: true,
|
|
979
|
-
timeoutSec,
|
|
980
|
-
sessionKey: params.sessionKey,
|
|
981
|
-
notifyOnExit,
|
|
982
|
-
notifyOnExitEmptySuccess,
|
|
983
|
-
elevated: {
|
|
984
|
-
enabled: params.elevated.enabled,
|
|
985
|
-
allowed: params.elevated.allowed,
|
|
986
|
-
defaultLevel: "on"
|
|
987
|
-
}
|
|
988
|
-
}).execute("chat-bash", {
|
|
989
|
-
command: commandText,
|
|
990
|
-
background: shouldBackgroundImmediately,
|
|
991
|
-
yieldMs: shouldBackgroundImmediately ? void 0 : foregroundMs,
|
|
992
|
-
timeout: timeoutSec,
|
|
993
|
-
elevated: true
|
|
994
|
-
});
|
|
995
|
-
if (result.details?.status === "running") {
|
|
996
|
-
const sessionId = result.details.sessionId;
|
|
997
|
-
activeJob = {
|
|
998
|
-
state: "running",
|
|
999
|
-
sessionId,
|
|
1000
|
-
startedAt: result.details.startedAt,
|
|
1001
|
-
command: commandText,
|
|
1002
|
-
watcherAttached: false
|
|
1003
|
-
};
|
|
1004
|
-
attachActiveWatcher(sessionId);
|
|
1005
|
-
logVerbose(`Started bash session ${formatSessionSnippet(sessionId)}: ${commandText}`);
|
|
1006
|
-
return { text: `āļø bash started (session ${sessionId}). Still running; use !poll / !stop (or /bash poll / /bash stop).` };
|
|
1007
|
-
}
|
|
1008
|
-
activeJob = null;
|
|
1009
|
-
const exitCode = result.details?.status === "completed" ? result.details.exitCode : 0;
|
|
1010
|
-
const output = result.details?.status === "completed" ? result.details.aggregated : result.content.map((chunk) => chunk.type === "text" ? chunk.text : "").join("\n");
|
|
1011
|
-
return { text: [
|
|
1012
|
-
`āļø bash: ${commandText}`,
|
|
1013
|
-
`Exit: ${exitCode}`,
|
|
1014
|
-
formatOutputBlock(output || "(no output)")
|
|
1015
|
-
].join("\n") };
|
|
1016
|
-
} catch (err) {
|
|
1017
|
-
activeJob = null;
|
|
1018
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
1019
|
-
return { text: [`ā ļø bash failed: ${commandText}`, formatOutputBlock(message)].join("\n") };
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
//#endregion
|
|
1023
|
-
//#region src/auto-reply/reply/commands-bash.ts
|
|
1024
|
-
const handleBashCommand = async (params, allowTextCommands) => {
|
|
1025
|
-
if (!allowTextCommands) return null;
|
|
1026
|
-
const { command } = params;
|
|
1027
|
-
const bashSlashRequested = command.commandBodyNormalized === "/bash" || command.commandBodyNormalized.startsWith("/bash ");
|
|
1028
|
-
const bashBangRequested = command.commandBodyNormalized.startsWith("!");
|
|
1029
|
-
if (!bashSlashRequested && !(bashBangRequested && command.isAuthorizedSender)) return null;
|
|
1030
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/bash");
|
|
1031
|
-
if (unauthorized) return unauthorized;
|
|
1032
|
-
return {
|
|
1033
|
-
shouldContinue: false,
|
|
1034
|
-
reply: await handleBashChatCommand({
|
|
1035
|
-
ctx: params.ctx,
|
|
1036
|
-
cfg: params.cfg,
|
|
1037
|
-
agentId: params.agentId,
|
|
1038
|
-
sessionKey: params.sessionKey,
|
|
1039
|
-
isGroup: params.isGroup,
|
|
1040
|
-
elevated: params.elevated
|
|
1041
|
-
})
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1044
|
-
//#endregion
|
|
1045
|
-
//#region src/agents/btw.ts
|
|
1046
|
-
function collectTextContent(content) {
|
|
1047
|
-
return content.filter((part) => part.type === "text").map((part) => part.text).join("");
|
|
1048
|
-
}
|
|
1049
|
-
function collectThinkingContent(content) {
|
|
1050
|
-
return content.filter((part) => part.type === "thinking").map((part) => part.thinking).join("");
|
|
1051
|
-
}
|
|
1052
|
-
function buildBtwSystemPrompt() {
|
|
1053
|
-
return [
|
|
1054
|
-
"You are answering an ephemeral /btw side question about the current conversation.",
|
|
1055
|
-
"Use the conversation only as background context.",
|
|
1056
|
-
"Answer only the side question in the last user message.",
|
|
1057
|
-
"Do not continue, resume, or complete any unfinished task from the conversation.",
|
|
1058
|
-
"Do not emit tool calls, pseudo-tool calls, shell commands, file writes, patches, or code unless the side question explicitly asks for them.",
|
|
1059
|
-
"Do not say you will continue the main task after answering.",
|
|
1060
|
-
"If the question can be answered briefly, answer briefly."
|
|
1061
|
-
].join("\n");
|
|
1062
|
-
}
|
|
1063
|
-
function buildBtwQuestionPrompt(question, inFlightPrompt) {
|
|
1064
|
-
const lines = ["Answer this side question only.", "Ignore any unfinished task in the conversation while answering it."];
|
|
1065
|
-
const trimmedPrompt = inFlightPrompt?.trim();
|
|
1066
|
-
if (trimmedPrompt) lines.push("", "Current in-flight main task request for background context only:", "<in_flight_main_task>", trimmedPrompt, "</in_flight_main_task>", "Do not continue or complete that task while answering the side question.");
|
|
1067
|
-
lines.push("", "<btw_side_question>", question.trim(), "</btw_side_question>");
|
|
1068
|
-
return lines.join("\n");
|
|
1069
|
-
}
|
|
1070
|
-
function toSimpleContextMessages(messages) {
|
|
1071
|
-
return stripToolResultDetails(messages.filter((message) => {
|
|
1072
|
-
if (!message || typeof message !== "object") return false;
|
|
1073
|
-
const role = message.role;
|
|
1074
|
-
return role === "user" || role === "assistant";
|
|
1075
|
-
}));
|
|
1076
|
-
}
|
|
1077
|
-
function resolveSessionTranscriptPath(params) {
|
|
1078
|
-
try {
|
|
1079
|
-
const agentId = params.sessionKey?.split(":")[1];
|
|
1080
|
-
const pathOpts = resolveSessionFilePathOptions({
|
|
1081
|
-
agentId,
|
|
1082
|
-
storePath: params.storePath
|
|
1083
|
-
});
|
|
1084
|
-
return resolveSessionFilePath(params.sessionId, params.sessionEntry, pathOpts);
|
|
1085
|
-
} catch (error) {
|
|
1086
|
-
diag.debug(`resolveSessionTranscriptPath failed: sessionId=${params.sessionId} err=${String(error)}`);
|
|
1087
|
-
return;
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
async function resolveRuntimeModel(params) {
|
|
1091
|
-
await ensureOpenClawModelsJson(params.cfg, params.agentDir);
|
|
1092
|
-
const modelRegistry = discoverModels(discoverAuthStorage(params.agentDir), params.agentDir);
|
|
1093
|
-
const model = resolveModelWithRegistry({
|
|
1094
|
-
provider: params.provider,
|
|
1095
|
-
modelId: params.model,
|
|
1096
|
-
modelRegistry,
|
|
1097
|
-
cfg: params.cfg
|
|
1098
|
-
});
|
|
1099
|
-
if (!model) throw new Error(`Unknown model: ${params.provider}/${params.model}`);
|
|
1100
|
-
return {
|
|
1101
|
-
model,
|
|
1102
|
-
authProfileId: await resolveSessionAuthProfileOverride({
|
|
1103
|
-
cfg: params.cfg,
|
|
1104
|
-
provider: params.provider,
|
|
1105
|
-
agentDir: params.agentDir,
|
|
1106
|
-
sessionEntry: params.sessionEntry,
|
|
1107
|
-
sessionStore: params.sessionStore,
|
|
1108
|
-
sessionKey: params.sessionKey,
|
|
1109
|
-
storePath: params.storePath,
|
|
1110
|
-
isNewSession: params.isNewSession
|
|
1111
|
-
}),
|
|
1112
|
-
authProfileIdSource: params.sessionEntry?.authProfileOverrideSource
|
|
1113
|
-
};
|
|
1114
|
-
}
|
|
1115
|
-
async function runBtwSideQuestion(params) {
|
|
1116
|
-
const sessionId = params.sessionEntry.sessionId?.trim();
|
|
1117
|
-
if (!sessionId) throw new Error("No active session context.");
|
|
1118
|
-
const sessionFile = resolveSessionTranscriptPath({
|
|
1119
|
-
sessionId,
|
|
1120
|
-
sessionEntry: params.sessionEntry,
|
|
1121
|
-
sessionKey: params.sessionKey,
|
|
1122
|
-
storePath: params.storePath
|
|
1123
|
-
});
|
|
1124
|
-
if (!sessionFile) throw new Error("No active session transcript.");
|
|
1125
|
-
const sessionManager = SessionManager.open(sessionFile);
|
|
1126
|
-
const activeRunSnapshot = getActiveEmbeddedRunSnapshot(sessionId);
|
|
1127
|
-
let messages = [];
|
|
1128
|
-
let inFlightPrompt;
|
|
1129
|
-
if (Array.isArray(activeRunSnapshot?.messages) && activeRunSnapshot.messages.length > 0) {
|
|
1130
|
-
messages = toSimpleContextMessages(activeRunSnapshot.messages);
|
|
1131
|
-
inFlightPrompt = activeRunSnapshot.inFlightPrompt;
|
|
1132
|
-
} else if (activeRunSnapshot) {
|
|
1133
|
-
inFlightPrompt = activeRunSnapshot.inFlightPrompt;
|
|
1134
|
-
if (activeRunSnapshot.transcriptLeafId && sessionManager.branch) try {
|
|
1135
|
-
sessionManager.branch(activeRunSnapshot.transcriptLeafId);
|
|
1136
|
-
} catch (error) {
|
|
1137
|
-
diag.debug(`btw snapshot leaf unavailable: sessionId=${sessionId} leaf=${activeRunSnapshot.transcriptLeafId} err=${String(error)}`);
|
|
1138
|
-
sessionManager.resetLeaf?.();
|
|
1139
|
-
}
|
|
1140
|
-
else sessionManager.resetLeaf?.();
|
|
1141
|
-
} else {
|
|
1142
|
-
const leafEntry = sessionManager.getLeafEntry?.();
|
|
1143
|
-
if (leafEntry?.type === "message" && leafEntry.message?.role === "user") if (leafEntry.parentId && sessionManager.branch) sessionManager.branch(leafEntry.parentId);
|
|
1144
|
-
else sessionManager.resetLeaf?.();
|
|
1145
|
-
}
|
|
1146
|
-
if (messages.length === 0) {
|
|
1147
|
-
const sessionContext = sessionManager.buildSessionContext();
|
|
1148
|
-
messages = toSimpleContextMessages(Array.isArray(sessionContext.messages) ? sessionContext.messages : []);
|
|
1149
|
-
}
|
|
1150
|
-
if (messages.length === 0 && !inFlightPrompt?.trim()) throw new Error("No active session context.");
|
|
1151
|
-
const { model, authProfileId } = await resolveRuntimeModel({
|
|
1152
|
-
cfg: params.cfg,
|
|
1153
|
-
provider: params.provider,
|
|
1154
|
-
model: params.model,
|
|
1155
|
-
agentDir: params.agentDir,
|
|
1156
|
-
sessionEntry: params.sessionEntry,
|
|
1157
|
-
sessionStore: params.sessionStore,
|
|
1158
|
-
sessionKey: params.sessionKey,
|
|
1159
|
-
storePath: params.storePath,
|
|
1160
|
-
isNewSession: params.isNewSession
|
|
1161
|
-
});
|
|
1162
|
-
const apiKey = requireApiKey(await getApiKeyForModel({
|
|
1163
|
-
model,
|
|
1164
|
-
cfg: params.cfg,
|
|
1165
|
-
profileId: authProfileId,
|
|
1166
|
-
agentDir: params.agentDir
|
|
1167
|
-
}), model.provider);
|
|
1168
|
-
const chunker = params.opts?.onBlockReply && params.blockReplyChunking ? new EmbeddedBlockChunker(params.blockReplyChunking) : void 0;
|
|
1169
|
-
let emittedBlocks = 0;
|
|
1170
|
-
let blockEmitChain = Promise.resolve();
|
|
1171
|
-
let answerText = "";
|
|
1172
|
-
let reasoningText = "";
|
|
1173
|
-
let assistantStarted = false;
|
|
1174
|
-
let sawTextEvent = false;
|
|
1175
|
-
const emitBlockChunk = async (text) => {
|
|
1176
|
-
if (!text.trim() || !params.opts?.onBlockReply) return;
|
|
1177
|
-
emittedBlocks += 1;
|
|
1178
|
-
blockEmitChain = blockEmitChain.then(async () => {
|
|
1179
|
-
await params.opts?.onBlockReply?.({
|
|
1180
|
-
text,
|
|
1181
|
-
btw: { question: params.question }
|
|
1182
|
-
});
|
|
1183
|
-
});
|
|
1184
|
-
await blockEmitChain;
|
|
1185
|
-
};
|
|
1186
|
-
const stream = streamSimple(model, {
|
|
1187
|
-
systemPrompt: buildBtwSystemPrompt(),
|
|
1188
|
-
messages: [...messages, {
|
|
1189
|
-
role: "user",
|
|
1190
|
-
content: [{
|
|
1191
|
-
type: "text",
|
|
1192
|
-
text: buildBtwQuestionPrompt(params.question, inFlightPrompt)
|
|
1193
|
-
}],
|
|
1194
|
-
timestamp: Date.now()
|
|
1195
|
-
}]
|
|
1196
|
-
}, {
|
|
1197
|
-
apiKey,
|
|
1198
|
-
reasoning: void 0,
|
|
1199
|
-
signal: params.opts?.abortSignal
|
|
1200
|
-
});
|
|
1201
|
-
let finalEvent;
|
|
1202
|
-
for await (const event of stream) {
|
|
1203
|
-
finalEvent = event.type === "done" || event.type === "error" ? event : finalEvent;
|
|
1204
|
-
if (!assistantStarted && (event.type === "text_start" || event.type === "start")) {
|
|
1205
|
-
assistantStarted = true;
|
|
1206
|
-
await params.opts?.onAssistantMessageStart?.();
|
|
1207
|
-
}
|
|
1208
|
-
if (event.type === "text_delta") {
|
|
1209
|
-
sawTextEvent = true;
|
|
1210
|
-
answerText += event.delta;
|
|
1211
|
-
chunker?.append(event.delta);
|
|
1212
|
-
if (chunker && params.resolvedBlockStreamingBreak === "text_end") chunker.drain({
|
|
1213
|
-
force: false,
|
|
1214
|
-
emit: (chunk) => void emitBlockChunk(chunk)
|
|
1215
|
-
});
|
|
1216
|
-
continue;
|
|
1217
|
-
}
|
|
1218
|
-
if (event.type === "text_end" && chunker && params.resolvedBlockStreamingBreak === "text_end") {
|
|
1219
|
-
chunker.drain({
|
|
1220
|
-
force: true,
|
|
1221
|
-
emit: (chunk) => void emitBlockChunk(chunk)
|
|
1222
|
-
});
|
|
1223
|
-
continue;
|
|
1224
|
-
}
|
|
1225
|
-
if (event.type === "thinking_delta") {
|
|
1226
|
-
reasoningText += event.delta;
|
|
1227
|
-
if (params.resolvedReasoningLevel !== "off") await params.opts?.onReasoningStream?.({
|
|
1228
|
-
text: reasoningText,
|
|
1229
|
-
isReasoning: true
|
|
1230
|
-
});
|
|
1231
|
-
continue;
|
|
1232
|
-
}
|
|
1233
|
-
if (event.type === "thinking_end" && params.resolvedReasoningLevel !== "off") await params.opts?.onReasoningEnd?.();
|
|
1234
|
-
}
|
|
1235
|
-
if (chunker && params.resolvedBlockStreamingBreak !== "text_end" && chunker.hasBuffered()) chunker.drain({
|
|
1236
|
-
force: true,
|
|
1237
|
-
emit: (chunk) => void emitBlockChunk(chunk)
|
|
1238
|
-
});
|
|
1239
|
-
await blockEmitChain;
|
|
1240
|
-
if (finalEvent?.type === "error") {
|
|
1241
|
-
const message = collectTextContent(finalEvent.error.content);
|
|
1242
|
-
throw new Error(message || finalEvent.error.errorMessage || "BTW failed.");
|
|
1243
|
-
}
|
|
1244
|
-
const finalMessage = finalEvent?.type === "done" ? finalEvent.message : void 0;
|
|
1245
|
-
if (finalMessage) {
|
|
1246
|
-
if (!sawTextEvent) answerText = collectTextContent(finalMessage.content);
|
|
1247
|
-
if (!reasoningText) reasoningText = collectThinkingContent(finalMessage.content);
|
|
1248
|
-
}
|
|
1249
|
-
const answer = answerText.trim();
|
|
1250
|
-
if (!answer) throw new Error("No BTW response generated.");
|
|
1251
|
-
if (emittedBlocks > 0) return;
|
|
1252
|
-
return { text: answer };
|
|
1253
|
-
}
|
|
1254
|
-
//#endregion
|
|
1255
|
-
//#region src/auto-reply/reply/commands-btw.ts
|
|
1256
|
-
const BTW_USAGE = "Usage: /btw <side question>";
|
|
1257
|
-
const handleBtwCommand = async (params, allowTextCommands) => {
|
|
1258
|
-
if (!allowTextCommands) return null;
|
|
1259
|
-
const question = extractBtwQuestion(params.command.commandBodyNormalized);
|
|
1260
|
-
if (question === null) return null;
|
|
1261
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/btw");
|
|
1262
|
-
if (unauthorized) return unauthorized;
|
|
1263
|
-
if (!question) return {
|
|
1264
|
-
shouldContinue: false,
|
|
1265
|
-
reply: { text: BTW_USAGE }
|
|
1266
|
-
};
|
|
1267
|
-
if (!params.sessionEntry?.sessionId) return {
|
|
1268
|
-
shouldContinue: false,
|
|
1269
|
-
reply: { text: "ā ļø /btw requires an active session with existing context." }
|
|
1270
|
-
};
|
|
1271
|
-
if (!params.agentDir) return {
|
|
1272
|
-
shouldContinue: false,
|
|
1273
|
-
reply: { text: "ā ļø /btw is unavailable because the active agent directory could not be resolved." }
|
|
1274
|
-
};
|
|
1275
|
-
try {
|
|
1276
|
-
await params.typing?.startTypingLoop();
|
|
1277
|
-
const reply = await runBtwSideQuestion({
|
|
1278
|
-
cfg: params.cfg,
|
|
1279
|
-
agentDir: params.agentDir,
|
|
1280
|
-
provider: params.provider,
|
|
1281
|
-
model: params.model,
|
|
1282
|
-
question,
|
|
1283
|
-
sessionEntry: params.sessionEntry,
|
|
1284
|
-
sessionStore: params.sessionStore,
|
|
1285
|
-
sessionKey: params.sessionKey,
|
|
1286
|
-
storePath: params.storePath,
|
|
1287
|
-
resolvedThinkLevel: "off",
|
|
1288
|
-
resolvedReasoningLevel: "off",
|
|
1289
|
-
blockReplyChunking: params.blockReplyChunking,
|
|
1290
|
-
resolvedBlockStreamingBreak: params.resolvedBlockStreamingBreak,
|
|
1291
|
-
opts: params.opts,
|
|
1292
|
-
isNewSession: false
|
|
1293
|
-
});
|
|
1294
|
-
return {
|
|
1295
|
-
shouldContinue: false,
|
|
1296
|
-
reply: reply ? {
|
|
1297
|
-
...reply,
|
|
1298
|
-
btw: { question }
|
|
1299
|
-
} : reply
|
|
1300
|
-
};
|
|
1301
|
-
} catch (error) {
|
|
1302
|
-
const message = error instanceof Error ? error.message.trim() : "";
|
|
1303
|
-
return {
|
|
1304
|
-
shouldContinue: false,
|
|
1305
|
-
reply: {
|
|
1306
|
-
text: `ā ļø /btw failed${message ? `: ${message}` : "."}`,
|
|
1307
|
-
btw: { question },
|
|
1308
|
-
isError: true
|
|
1309
|
-
}
|
|
1310
|
-
};
|
|
1311
|
-
}
|
|
1312
|
-
};
|
|
1313
|
-
//#endregion
|
|
1314
|
-
//#region src/auto-reply/reply/commands-compact.ts
|
|
1315
|
-
function extractCompactInstructions(params) {
|
|
1316
|
-
const raw = stripStructuralPrefixes(params.rawBody ?? "");
|
|
1317
|
-
const trimmed = (params.isGroup ? stripMentions(raw, params.ctx, params.cfg, params.agentId) : raw).trim();
|
|
1318
|
-
if (!trimmed) return;
|
|
1319
|
-
const prefix = trimmed.toLowerCase().startsWith("/compact") ? "/compact" : null;
|
|
1320
|
-
if (!prefix) return;
|
|
1321
|
-
let rest = trimmed.slice(prefix.length).trimStart();
|
|
1322
|
-
if (rest.startsWith(":")) rest = rest.slice(1).trimStart();
|
|
1323
|
-
return rest.length ? rest : void 0;
|
|
1324
|
-
}
|
|
1325
|
-
function isCompactionSkipReason(reason) {
|
|
1326
|
-
const text = reason?.trim().toLowerCase() ?? "";
|
|
1327
|
-
return text.includes("nothing to compact") || text.includes("below threshold") || text.includes("already compacted") || text.includes("no real conversation messages");
|
|
1328
|
-
}
|
|
1329
|
-
function formatCompactionReason(reason) {
|
|
1330
|
-
const text = reason?.trim();
|
|
1331
|
-
if (!text) return;
|
|
1332
|
-
const lower = text.toLowerCase();
|
|
1333
|
-
if (lower.includes("nothing to compact")) return "nothing compactable in this session yet";
|
|
1334
|
-
if (lower.includes("below threshold")) return "context is below the compaction threshold";
|
|
1335
|
-
if (lower.includes("already compacted")) return "session was already compacted recently";
|
|
1336
|
-
if (lower.includes("no real conversation messages")) return "no real conversation messages yet";
|
|
1337
|
-
return text;
|
|
1338
|
-
}
|
|
1339
|
-
const handleCompactCommand = async (params) => {
|
|
1340
|
-
if (!(params.command.commandBodyNormalized === "/compact" || params.command.commandBodyNormalized.startsWith("/compact "))) return null;
|
|
1341
|
-
if (!params.command.isAuthorizedSender) {
|
|
1342
|
-
logVerbose(`Ignoring /compact from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
1343
|
-
return { shouldContinue: false };
|
|
1344
|
-
}
|
|
1345
|
-
if (!params.sessionEntry?.sessionId) return {
|
|
1346
|
-
shouldContinue: false,
|
|
1347
|
-
reply: { text: "āļø Compaction unavailable (missing session id)." }
|
|
1348
|
-
};
|
|
1349
|
-
const sessionId = params.sessionEntry.sessionId;
|
|
1350
|
-
if (isEmbeddedPiRunActive(sessionId)) {
|
|
1351
|
-
abortEmbeddedPiRun(sessionId);
|
|
1352
|
-
await waitForEmbeddedPiRunEnd(sessionId, 15e3);
|
|
1353
|
-
}
|
|
1354
|
-
const customInstructions = extractCompactInstructions({
|
|
1355
|
-
rawBody: params.ctx.CommandBody ?? params.ctx.RawBody ?? params.ctx.Body,
|
|
1356
|
-
ctx: params.ctx,
|
|
1357
|
-
cfg: params.cfg,
|
|
1358
|
-
agentId: params.agentId,
|
|
1359
|
-
isGroup: params.isGroup
|
|
1360
|
-
});
|
|
1361
|
-
const result = await compactEmbeddedPiSession({
|
|
1362
|
-
sessionId,
|
|
1363
|
-
sessionKey: params.sessionKey,
|
|
1364
|
-
allowGatewaySubagentBinding: true,
|
|
1365
|
-
messageChannel: params.command.channel,
|
|
1366
|
-
groupId: params.sessionEntry.groupId,
|
|
1367
|
-
groupChannel: params.sessionEntry.groupChannel,
|
|
1368
|
-
groupSpace: params.sessionEntry.space,
|
|
1369
|
-
spawnedBy: params.sessionEntry.spawnedBy,
|
|
1370
|
-
sessionFile: resolveSessionFilePath(sessionId, params.sessionEntry, resolveSessionFilePathOptions({
|
|
1371
|
-
agentId: params.agentId,
|
|
1372
|
-
storePath: params.storePath
|
|
1373
|
-
})),
|
|
1374
|
-
workspaceDir: params.workspaceDir,
|
|
1375
|
-
agentDir: params.agentDir,
|
|
1376
|
-
config: params.cfg,
|
|
1377
|
-
skillsSnapshot: params.sessionEntry.skillsSnapshot,
|
|
1378
|
-
provider: params.provider,
|
|
1379
|
-
model: params.model,
|
|
1380
|
-
thinkLevel: params.resolvedThinkLevel ?? await params.resolveDefaultThinkingLevel(),
|
|
1381
|
-
bashElevated: {
|
|
1382
|
-
enabled: false,
|
|
1383
|
-
allowed: false,
|
|
1384
|
-
defaultLevel: "off"
|
|
1385
|
-
},
|
|
1386
|
-
customInstructions,
|
|
1387
|
-
trigger: "manual",
|
|
1388
|
-
senderIsOwner: params.command.senderIsOwner,
|
|
1389
|
-
ownerNumbers: params.command.ownerList.length > 0 ? params.command.ownerList : void 0
|
|
1390
|
-
});
|
|
1391
|
-
const compactLabel = result.ok || isCompactionSkipReason(result.reason) ? result.compacted ? result.result?.tokensBefore != null && result.result?.tokensAfter != null ? `Compacted (${formatTokenCount(result.result.tokensBefore)} ā ${formatTokenCount(result.result.tokensAfter)})` : result.result?.tokensBefore ? `Compacted (${formatTokenCount(result.result.tokensBefore)} before)` : "Compacted" : "Compaction skipped" : "Compaction failed";
|
|
1392
|
-
if (result.ok && result.compacted) await incrementCompactionCount({
|
|
1393
|
-
cfg: params.cfg,
|
|
1394
|
-
sessionEntry: params.sessionEntry,
|
|
1395
|
-
sessionStore: params.sessionStore,
|
|
1396
|
-
sessionKey: params.sessionKey,
|
|
1397
|
-
storePath: params.storePath,
|
|
1398
|
-
tokensAfter: result.result?.tokensAfter
|
|
1399
|
-
});
|
|
1400
|
-
const totalTokens = result.result?.tokensAfter ?? resolveFreshSessionTotalTokens(params.sessionEntry);
|
|
1401
|
-
const contextSummary = formatContextUsageShort(typeof totalTokens === "number" && totalTokens > 0 ? totalTokens : null, params.contextTokens ?? params.sessionEntry.contextTokens ?? null);
|
|
1402
|
-
const reason = formatCompactionReason(result.reason);
|
|
1403
|
-
const line = reason ? `${compactLabel}: ${reason} ⢠${contextSummary}` : `${compactLabel} ⢠${contextSummary}`;
|
|
1404
|
-
enqueueSystemEvent(line, { sessionKey: params.sessionKey });
|
|
1405
|
-
return {
|
|
1406
|
-
shouldContinue: false,
|
|
1407
|
-
reply: { text: `āļø ${line}` }
|
|
1408
|
-
};
|
|
1409
|
-
};
|
|
1410
|
-
//#endregion
|
|
1411
|
-
//#region src/auto-reply/reply/commands-slash-parse.ts
|
|
1412
|
-
function parseSlashCommandActionArgs(raw, slash) {
|
|
1413
|
-
const trimmed = raw.trim();
|
|
1414
|
-
const slashLower = slash.toLowerCase();
|
|
1415
|
-
if (!trimmed.toLowerCase().startsWith(slashLower)) return { kind: "no-match" };
|
|
1416
|
-
const rest = trimmed.slice(slash.length).trim();
|
|
1417
|
-
if (!rest) return { kind: "empty" };
|
|
1418
|
-
const match = rest.match(/^(\S+)(?:\s+([\s\S]+))?$/);
|
|
1419
|
-
if (!match) return { kind: "invalid" };
|
|
1420
|
-
return {
|
|
1421
|
-
kind: "parsed",
|
|
1422
|
-
action: match[1]?.toLowerCase() ?? "",
|
|
1423
|
-
args: (match[2] ?? "").trim()
|
|
1424
|
-
};
|
|
1425
|
-
}
|
|
1426
|
-
function parseSlashCommandOrNull(raw, slash, opts) {
|
|
1427
|
-
const parsed = parseSlashCommandActionArgs(raw, slash);
|
|
1428
|
-
if (parsed.kind === "no-match") return null;
|
|
1429
|
-
if (parsed.kind === "invalid") return {
|
|
1430
|
-
ok: false,
|
|
1431
|
-
message: opts.invalidMessage
|
|
1432
|
-
};
|
|
1433
|
-
if (parsed.kind === "empty") return {
|
|
1434
|
-
ok: true,
|
|
1435
|
-
action: opts.defaultAction ?? "show",
|
|
1436
|
-
args: ""
|
|
1437
|
-
};
|
|
1438
|
-
return {
|
|
1439
|
-
ok: true,
|
|
1440
|
-
action: parsed.action,
|
|
1441
|
-
args: parsed.args
|
|
1442
|
-
};
|
|
1443
|
-
}
|
|
1444
|
-
//#endregion
|
|
1445
|
-
//#region src/auto-reply/reply/commands-setunset.ts
|
|
1446
|
-
function parseSetUnsetCommand(params) {
|
|
1447
|
-
const action = params.action;
|
|
1448
|
-
const args = params.args.trim();
|
|
1449
|
-
if (action === "unset") {
|
|
1450
|
-
if (!args) return {
|
|
1451
|
-
kind: "error",
|
|
1452
|
-
message: `Usage: ${params.slash} unset path`
|
|
1453
|
-
};
|
|
1454
|
-
return {
|
|
1455
|
-
kind: "unset",
|
|
1456
|
-
path: args
|
|
1457
|
-
};
|
|
1458
|
-
}
|
|
1459
|
-
if (!args) return {
|
|
1460
|
-
kind: "error",
|
|
1461
|
-
message: `Usage: ${params.slash} set path=value`
|
|
1462
|
-
};
|
|
1463
|
-
const eqIndex = args.indexOf("=");
|
|
1464
|
-
if (eqIndex <= 0) return {
|
|
1465
|
-
kind: "error",
|
|
1466
|
-
message: `Usage: ${params.slash} set path=value`
|
|
1467
|
-
};
|
|
1468
|
-
const path = args.slice(0, eqIndex).trim();
|
|
1469
|
-
const rawValue = args.slice(eqIndex + 1);
|
|
1470
|
-
if (!path) return {
|
|
1471
|
-
kind: "error",
|
|
1472
|
-
message: `Usage: ${params.slash} set path=value`
|
|
1473
|
-
};
|
|
1474
|
-
const parsed = parseConfigValue(rawValue);
|
|
1475
|
-
if (parsed.error) return {
|
|
1476
|
-
kind: "error",
|
|
1477
|
-
message: parsed.error
|
|
1478
|
-
};
|
|
1479
|
-
return {
|
|
1480
|
-
kind: "set",
|
|
1481
|
-
path,
|
|
1482
|
-
value: parsed.value
|
|
1483
|
-
};
|
|
1484
|
-
}
|
|
1485
|
-
function parseSetUnsetCommandAction(params) {
|
|
1486
|
-
if (params.action !== "set" && params.action !== "unset") return null;
|
|
1487
|
-
const parsed = parseSetUnsetCommand({
|
|
1488
|
-
slash: params.slash,
|
|
1489
|
-
action: params.action,
|
|
1490
|
-
args: params.args
|
|
1491
|
-
});
|
|
1492
|
-
if (parsed.kind === "error") return params.onError(parsed.message);
|
|
1493
|
-
return parsed.kind === "set" ? params.onSet(parsed.path, parsed.value) : params.onUnset(parsed.path);
|
|
1494
|
-
}
|
|
1495
|
-
function parseSlashCommandWithSetUnset(params) {
|
|
1496
|
-
const parsed = parseSlashCommandOrNull(params.raw, params.slash, { invalidMessage: params.invalidMessage });
|
|
1497
|
-
if (!parsed) return null;
|
|
1498
|
-
if (!parsed.ok) return params.onError(parsed.message);
|
|
1499
|
-
const { action, args } = parsed;
|
|
1500
|
-
const setUnset = parseSetUnsetCommandAction({
|
|
1501
|
-
slash: params.slash,
|
|
1502
|
-
action,
|
|
1503
|
-
args,
|
|
1504
|
-
onSet: params.onSet,
|
|
1505
|
-
onUnset: params.onUnset,
|
|
1506
|
-
onError: params.onError
|
|
1507
|
-
});
|
|
1508
|
-
if (setUnset) return setUnset;
|
|
1509
|
-
const knownAction = params.onKnownAction(action, args);
|
|
1510
|
-
if (knownAction) return knownAction;
|
|
1511
|
-
return params.onError(params.usageMessage);
|
|
1512
|
-
}
|
|
1513
|
-
//#endregion
|
|
1514
|
-
//#region src/auto-reply/reply/commands-setunset-standard.ts
|
|
1515
|
-
function parseStandardSetUnsetSlashCommand(params) {
|
|
1516
|
-
return parseSlashCommandWithSetUnset({
|
|
1517
|
-
raw: params.raw,
|
|
1518
|
-
slash: params.slash,
|
|
1519
|
-
invalidMessage: params.invalidMessage,
|
|
1520
|
-
usageMessage: params.usageMessage,
|
|
1521
|
-
onKnownAction: params.onKnownAction,
|
|
1522
|
-
onSet: params.onSet ?? ((path, value) => ({
|
|
1523
|
-
action: "set",
|
|
1524
|
-
path,
|
|
1525
|
-
value
|
|
1526
|
-
})),
|
|
1527
|
-
onUnset: params.onUnset ?? ((path) => ({
|
|
1528
|
-
action: "unset",
|
|
1529
|
-
path
|
|
1530
|
-
})),
|
|
1531
|
-
onError: params.onError ?? ((message) => ({
|
|
1532
|
-
action: "error",
|
|
1533
|
-
message
|
|
1534
|
-
}))
|
|
1535
|
-
});
|
|
1536
|
-
}
|
|
1537
|
-
//#endregion
|
|
1538
|
-
//#region src/auto-reply/reply/config-commands.ts
|
|
1539
|
-
function parseConfigCommand(raw) {
|
|
1540
|
-
return parseStandardSetUnsetSlashCommand({
|
|
1541
|
-
raw,
|
|
1542
|
-
slash: "/config",
|
|
1543
|
-
invalidMessage: "Invalid /config syntax.",
|
|
1544
|
-
usageMessage: "Usage: /config show|set|unset",
|
|
1545
|
-
onKnownAction: (action, args) => {
|
|
1546
|
-
if (action === "show" || action === "get") return {
|
|
1547
|
-
action: "show",
|
|
1548
|
-
path: args || void 0
|
|
1549
|
-
};
|
|
1550
|
-
}
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
//#endregion
|
|
1554
|
-
//#region src/auto-reply/reply/debug-commands.ts
|
|
1555
|
-
function parseDebugCommand(raw) {
|
|
1556
|
-
return parseStandardSetUnsetSlashCommand({
|
|
1557
|
-
raw,
|
|
1558
|
-
slash: "/debug",
|
|
1559
|
-
invalidMessage: "Invalid /debug syntax.",
|
|
1560
|
-
usageMessage: "Usage: /debug show|set|unset|reset",
|
|
1561
|
-
onKnownAction: (action) => {
|
|
1562
|
-
if (action === "show") return { action: "show" };
|
|
1563
|
-
if (action === "reset") return { action: "reset" };
|
|
1564
|
-
}
|
|
1565
|
-
});
|
|
1566
|
-
}
|
|
1567
|
-
//#endregion
|
|
1568
|
-
//#region src/auto-reply/reply/commands-config.ts
|
|
1569
|
-
const handleConfigCommand = async (params, allowTextCommands) => {
|
|
1570
|
-
if (!allowTextCommands) return null;
|
|
1571
|
-
const configCommand = parseConfigCommand(params.command.commandBodyNormalized);
|
|
1572
|
-
if (!configCommand) return null;
|
|
1573
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/config");
|
|
1574
|
-
if (unauthorized) return unauthorized;
|
|
1575
|
-
const nonOwner = configCommand.action === "show" && isInternalMessageChannel(params.command.channel) ? null : rejectNonOwnerCommand(params, "/config");
|
|
1576
|
-
if (nonOwner) return nonOwner;
|
|
1577
|
-
const disabled = requireCommandFlagEnabled(params.cfg, {
|
|
1578
|
-
label: "/config",
|
|
1579
|
-
configKey: "config"
|
|
1580
|
-
});
|
|
1581
|
-
if (disabled) return disabled;
|
|
1582
|
-
if (configCommand.action === "error") return {
|
|
1583
|
-
shouldContinue: false,
|
|
1584
|
-
reply: { text: `ā ļø ${configCommand.message}` }
|
|
1585
|
-
};
|
|
1586
|
-
let parsedWritePath;
|
|
1587
|
-
if (configCommand.action === "set" || configCommand.action === "unset") {
|
|
1588
|
-
const missingAdminScope = requireGatewayClientScopeForInternalChannel(params, {
|
|
1589
|
-
label: "/config write",
|
|
1590
|
-
allowedScopes: ["operator.admin"],
|
|
1591
|
-
missingText: "ā /config set|unset requires operator.admin for gateway clients."
|
|
1592
|
-
});
|
|
1593
|
-
if (missingAdminScope) return missingAdminScope;
|
|
1594
|
-
const parsedPath = parseConfigPath(configCommand.path);
|
|
1595
|
-
if (!parsedPath.ok || !parsedPath.path) return {
|
|
1596
|
-
shouldContinue: false,
|
|
1597
|
-
reply: { text: `ā ļø ${parsedPath.error ?? "Invalid path."}` }
|
|
1598
|
-
};
|
|
1599
|
-
parsedWritePath = parsedPath.path;
|
|
1600
|
-
const channelId = params.command.channelId ?? normalizeChannelId(params.command.channel);
|
|
1601
|
-
const deniedText = resolveConfigWriteDeniedText({
|
|
1602
|
-
cfg: params.cfg,
|
|
1603
|
-
channel: params.command.channel,
|
|
1604
|
-
channelId,
|
|
1605
|
-
accountId: params.ctx.AccountId,
|
|
1606
|
-
gatewayClientScopes: params.ctx.GatewayClientScopes,
|
|
1607
|
-
target: resolveConfigWriteTargetFromPath(parsedWritePath)
|
|
1608
|
-
});
|
|
1609
|
-
if (deniedText) return {
|
|
1610
|
-
shouldContinue: false,
|
|
1611
|
-
reply: { text: deniedText }
|
|
1612
|
-
};
|
|
1613
|
-
}
|
|
1614
|
-
const snapshot = await readConfigFileSnapshot();
|
|
1615
|
-
if (!snapshot.valid || !snapshot.parsed || typeof snapshot.parsed !== "object") return {
|
|
1616
|
-
shouldContinue: false,
|
|
1617
|
-
reply: { text: "ā ļø Config file is invalid; fix it before using /config." }
|
|
1618
|
-
};
|
|
1619
|
-
const parsedBase = structuredClone(snapshot.parsed);
|
|
1620
|
-
if (configCommand.action === "show") {
|
|
1621
|
-
const pathRaw = configCommand.path?.trim();
|
|
1622
|
-
if (pathRaw) {
|
|
1623
|
-
const parsedPath = parseConfigPath(pathRaw);
|
|
1624
|
-
if (!parsedPath.ok || !parsedPath.path) return {
|
|
1625
|
-
shouldContinue: false,
|
|
1626
|
-
reply: { text: `ā ļø ${parsedPath.error ?? "Invalid path."}` }
|
|
1627
|
-
};
|
|
1628
|
-
const value = getConfigValueAtPath(parsedBase, parsedPath.path);
|
|
1629
|
-
return {
|
|
1630
|
-
shouldContinue: false,
|
|
1631
|
-
reply: { text: `āļø Config ${pathRaw}:\n\`\`\`json\n${JSON.stringify(value ?? null, null, 2)}\n\`\`\`` }
|
|
1632
|
-
};
|
|
1633
|
-
}
|
|
1634
|
-
return {
|
|
1635
|
-
shouldContinue: false,
|
|
1636
|
-
reply: { text: `āļø Config (raw):\n\`\`\`json\n${JSON.stringify(parsedBase, null, 2)}\n\`\`\`` }
|
|
1637
|
-
};
|
|
1638
|
-
}
|
|
1639
|
-
if (configCommand.action === "unset") {
|
|
1640
|
-
if (!unsetConfigValueAtPath(parsedBase, parsedWritePath ?? [])) return {
|
|
1641
|
-
shouldContinue: false,
|
|
1642
|
-
reply: { text: `āļø No config value found for ${configCommand.path}.` }
|
|
1643
|
-
};
|
|
1644
|
-
const validated = validateConfigObjectWithPlugins(parsedBase);
|
|
1645
|
-
if (!validated.ok) {
|
|
1646
|
-
const issue = validated.issues[0];
|
|
1647
|
-
return {
|
|
1648
|
-
shouldContinue: false,
|
|
1649
|
-
reply: { text: `ā ļø Config invalid after unset (${issue.path}: ${issue.message}).` }
|
|
1650
|
-
};
|
|
1651
|
-
}
|
|
1652
|
-
await writeConfigFile(validated.config);
|
|
1653
|
-
return {
|
|
1654
|
-
shouldContinue: false,
|
|
1655
|
-
reply: { text: `āļø Config updated: ${configCommand.path} removed.` }
|
|
1656
|
-
};
|
|
1657
|
-
}
|
|
1658
|
-
if (configCommand.action === "set") {
|
|
1659
|
-
setConfigValueAtPath(parsedBase, parsedWritePath ?? [], configCommand.value);
|
|
1660
|
-
const validated = validateConfigObjectWithPlugins(parsedBase);
|
|
1661
|
-
if (!validated.ok) {
|
|
1662
|
-
const issue = validated.issues[0];
|
|
1663
|
-
return {
|
|
1664
|
-
shouldContinue: false,
|
|
1665
|
-
reply: { text: `ā ļø Config invalid after set (${issue.path}: ${issue.message}).` }
|
|
1666
|
-
};
|
|
1667
|
-
}
|
|
1668
|
-
await writeConfigFile(validated.config);
|
|
1669
|
-
const valueLabel = typeof configCommand.value === "string" ? `"${configCommand.value}"` : JSON.stringify(configCommand.value);
|
|
1670
|
-
return {
|
|
1671
|
-
shouldContinue: false,
|
|
1672
|
-
reply: { text: `āļø Config updated: ${configCommand.path}=${valueLabel ?? "null"}` }
|
|
1673
|
-
};
|
|
1674
|
-
}
|
|
1675
|
-
return null;
|
|
1676
|
-
};
|
|
1677
|
-
const handleDebugCommand = async (params, allowTextCommands) => {
|
|
1678
|
-
if (!allowTextCommands) return null;
|
|
1679
|
-
const debugCommand = parseDebugCommand(params.command.commandBodyNormalized);
|
|
1680
|
-
if (!debugCommand) return null;
|
|
1681
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/debug");
|
|
1682
|
-
if (unauthorized) return unauthorized;
|
|
1683
|
-
const nonOwner = rejectNonOwnerCommand(params, "/debug");
|
|
1684
|
-
if (nonOwner) return nonOwner;
|
|
1685
|
-
const disabled = requireCommandFlagEnabled(params.cfg, {
|
|
1686
|
-
label: "/debug",
|
|
1687
|
-
configKey: "debug"
|
|
1688
|
-
});
|
|
1689
|
-
if (disabled) return disabled;
|
|
1690
|
-
if (debugCommand.action === "error") return {
|
|
1691
|
-
shouldContinue: false,
|
|
1692
|
-
reply: { text: `ā ļø ${debugCommand.message}` }
|
|
1693
|
-
};
|
|
1694
|
-
if (debugCommand.action === "show") {
|
|
1695
|
-
const overrides = getConfigOverrides();
|
|
1696
|
-
if (!(Object.keys(overrides).length > 0)) return {
|
|
1697
|
-
shouldContinue: false,
|
|
1698
|
-
reply: { text: "āļø Debug overrides: (none)" }
|
|
1699
|
-
};
|
|
1700
|
-
return {
|
|
1701
|
-
shouldContinue: false,
|
|
1702
|
-
reply: { text: `āļø Debug overrides (memory-only):\n\`\`\`json\n${JSON.stringify(overrides, null, 2)}\n\`\`\`` }
|
|
1703
|
-
};
|
|
1704
|
-
}
|
|
1705
|
-
if (debugCommand.action === "reset") {
|
|
1706
|
-
resetConfigOverrides();
|
|
1707
|
-
return {
|
|
1708
|
-
shouldContinue: false,
|
|
1709
|
-
reply: { text: "āļø Debug overrides cleared; using config on disk." }
|
|
1710
|
-
};
|
|
1711
|
-
}
|
|
1712
|
-
if (debugCommand.action === "unset") {
|
|
1713
|
-
const result = unsetConfigOverride(debugCommand.path);
|
|
1714
|
-
if (!result.ok) return {
|
|
1715
|
-
shouldContinue: false,
|
|
1716
|
-
reply: { text: `ā ļø ${result.error ?? "Invalid path."}` }
|
|
1717
|
-
};
|
|
1718
|
-
if (!result.removed) return {
|
|
1719
|
-
shouldContinue: false,
|
|
1720
|
-
reply: { text: `āļø No debug override found for ${debugCommand.path}.` }
|
|
1721
|
-
};
|
|
1722
|
-
return {
|
|
1723
|
-
shouldContinue: false,
|
|
1724
|
-
reply: { text: `āļø Debug override removed for ${debugCommand.path}.` }
|
|
1725
|
-
};
|
|
1726
|
-
}
|
|
1727
|
-
if (debugCommand.action === "set") {
|
|
1728
|
-
const result = setConfigOverride(debugCommand.path, debugCommand.value);
|
|
1729
|
-
if (!result.ok) return {
|
|
1730
|
-
shouldContinue: false,
|
|
1731
|
-
reply: { text: `ā ļø ${result.error ?? "Invalid override."}` }
|
|
1732
|
-
};
|
|
1733
|
-
const valueLabel = typeof debugCommand.value === "string" ? `"${debugCommand.value}"` : JSON.stringify(debugCommand.value);
|
|
1734
|
-
return {
|
|
1735
|
-
shouldContinue: false,
|
|
1736
|
-
reply: { text: `āļø Debug override set: ${debugCommand.path}=${valueLabel ?? "null"}` }
|
|
1737
|
-
};
|
|
1738
|
-
}
|
|
1739
|
-
return null;
|
|
1740
|
-
};
|
|
1741
|
-
//#endregion
|
|
1742
|
-
//#region src/auto-reply/reply/mcp-commands.ts
|
|
1743
|
-
function parseMcpCommand(raw) {
|
|
1744
|
-
return parseStandardSetUnsetSlashCommand({
|
|
1745
|
-
raw,
|
|
1746
|
-
slash: "/mcp",
|
|
1747
|
-
invalidMessage: "Invalid /mcp syntax.",
|
|
1748
|
-
usageMessage: "Usage: /mcp show|set|unset",
|
|
1749
|
-
onKnownAction: (action, args) => {
|
|
1750
|
-
if (action === "show" || action === "get") return {
|
|
1751
|
-
action: "show",
|
|
1752
|
-
name: args || void 0
|
|
1753
|
-
};
|
|
1754
|
-
},
|
|
1755
|
-
onSet: (name, value) => ({
|
|
1756
|
-
action: "set",
|
|
1757
|
-
name,
|
|
1758
|
-
value
|
|
1759
|
-
}),
|
|
1760
|
-
onUnset: (name) => ({
|
|
1761
|
-
action: "unset",
|
|
1762
|
-
name
|
|
1763
|
-
})
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
//#endregion
|
|
1767
|
-
//#region src/auto-reply/reply/commands-mcp.ts
|
|
1768
|
-
function renderJsonBlock$1(label, value) {
|
|
1769
|
-
return `${label}\n\`\`\`json\n${JSON.stringify(value, null, 2)}\n\`\`\``;
|
|
1770
|
-
}
|
|
1771
|
-
const handleMcpCommand = async (params, allowTextCommands) => {
|
|
1772
|
-
if (!allowTextCommands) return null;
|
|
1773
|
-
const mcpCommand = parseMcpCommand(params.command.commandBodyNormalized);
|
|
1774
|
-
if (!mcpCommand) return null;
|
|
1775
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/mcp");
|
|
1776
|
-
if (unauthorized) return unauthorized;
|
|
1777
|
-
const nonOwner = mcpCommand.action === "show" && isInternalMessageChannel(params.command.channel) ? null : rejectNonOwnerCommand(params, "/mcp");
|
|
1778
|
-
if (nonOwner) return nonOwner;
|
|
1779
|
-
const disabled = requireCommandFlagEnabled(params.cfg, {
|
|
1780
|
-
label: "/mcp",
|
|
1781
|
-
configKey: "mcp"
|
|
1782
|
-
});
|
|
1783
|
-
if (disabled) return disabled;
|
|
1784
|
-
if (mcpCommand.action === "error") return {
|
|
1785
|
-
shouldContinue: false,
|
|
1786
|
-
reply: { text: `ā ļø ${mcpCommand.message}` }
|
|
1787
|
-
};
|
|
1788
|
-
if (mcpCommand.action === "show") {
|
|
1789
|
-
const loaded = await listConfiguredMcpServers();
|
|
1790
|
-
if (!loaded.ok) return {
|
|
1791
|
-
shouldContinue: false,
|
|
1792
|
-
reply: { text: `ā ļø ${loaded.error}` }
|
|
1793
|
-
};
|
|
1794
|
-
if (mcpCommand.name) {
|
|
1795
|
-
const server = loaded.mcpServers[mcpCommand.name];
|
|
1796
|
-
if (!server) return {
|
|
1797
|
-
shouldContinue: false,
|
|
1798
|
-
reply: { text: `š No MCP server named "${mcpCommand.name}" in ${loaded.path}.` }
|
|
1799
|
-
};
|
|
1800
|
-
return {
|
|
1801
|
-
shouldContinue: false,
|
|
1802
|
-
reply: { text: renderJsonBlock$1(`š MCP server "${mcpCommand.name}" (${loaded.path})`, server) }
|
|
1803
|
-
};
|
|
1804
|
-
}
|
|
1805
|
-
if (Object.keys(loaded.mcpServers).length === 0) return {
|
|
1806
|
-
shouldContinue: false,
|
|
1807
|
-
reply: { text: `š No MCP servers configured in ${loaded.path}.` }
|
|
1808
|
-
};
|
|
1809
|
-
return {
|
|
1810
|
-
shouldContinue: false,
|
|
1811
|
-
reply: { text: renderJsonBlock$1(`š MCP servers (${loaded.path})`, loaded.mcpServers) }
|
|
1812
|
-
};
|
|
1813
|
-
}
|
|
1814
|
-
const missingAdminScope = requireGatewayClientScopeForInternalChannel(params, {
|
|
1815
|
-
label: "/mcp write",
|
|
1816
|
-
allowedScopes: ["operator.admin"],
|
|
1817
|
-
missingText: "ā /mcp set|unset requires operator.admin for gateway clients."
|
|
1818
|
-
});
|
|
1819
|
-
if (missingAdminScope) return missingAdminScope;
|
|
1820
|
-
if (mcpCommand.action === "set") {
|
|
1821
|
-
const result = await setConfiguredMcpServer({
|
|
1822
|
-
name: mcpCommand.name,
|
|
1823
|
-
server: mcpCommand.value
|
|
1824
|
-
});
|
|
1825
|
-
if (!result.ok) return {
|
|
1826
|
-
shouldContinue: false,
|
|
1827
|
-
reply: { text: `ā ļø ${result.error}` }
|
|
1828
|
-
};
|
|
1829
|
-
return {
|
|
1830
|
-
shouldContinue: false,
|
|
1831
|
-
reply: { text: `š MCP server "${mcpCommand.name}" saved to ${result.path}.` }
|
|
1832
|
-
};
|
|
1833
|
-
}
|
|
1834
|
-
const result = await unsetConfiguredMcpServer({ name: mcpCommand.name });
|
|
1835
|
-
if (!result.ok) return {
|
|
1836
|
-
shouldContinue: false,
|
|
1837
|
-
reply: { text: `ā ļø ${result.error}` }
|
|
1838
|
-
};
|
|
1839
|
-
if (!result.removed) return {
|
|
1840
|
-
shouldContinue: false,
|
|
1841
|
-
reply: { text: `š No MCP server named "${mcpCommand.name}" in ${result.path}.` }
|
|
1842
|
-
};
|
|
1843
|
-
return {
|
|
1844
|
-
shouldContinue: false,
|
|
1845
|
-
reply: { text: `š MCP server "${mcpCommand.name}" removed from ${result.path}.` }
|
|
1846
|
-
};
|
|
1847
|
-
};
|
|
1848
|
-
//#endregion
|
|
1849
|
-
//#region src/auto-reply/reply/commands-plugin.ts
|
|
1850
|
-
/**
|
|
1851
|
-
* Plugin Command Handler
|
|
1852
|
-
*
|
|
1853
|
-
* Handles commands registered by plugins, bypassing the LLM agent.
|
|
1854
|
-
* This handler is called before built-in command handlers.
|
|
1855
|
-
*/
|
|
1856
|
-
/**
|
|
1857
|
-
* Handle plugin-registered commands.
|
|
1858
|
-
* Returns a result if a plugin command was matched and executed,
|
|
1859
|
-
* or null to continue to the next handler.
|
|
1860
|
-
*/
|
|
1861
|
-
const handlePluginCommand = async (params, allowTextCommands) => {
|
|
1862
|
-
const { command, cfg } = params;
|
|
1863
|
-
if (!allowTextCommands) return null;
|
|
1864
|
-
const match = matchPluginCommand(command.commandBodyNormalized);
|
|
1865
|
-
if (!match) return null;
|
|
1866
|
-
return {
|
|
1867
|
-
shouldContinue: false,
|
|
1868
|
-
reply: await executePluginCommand({
|
|
1869
|
-
command: match.command,
|
|
1870
|
-
args: match.args,
|
|
1871
|
-
senderId: command.senderId,
|
|
1872
|
-
channel: command.channel,
|
|
1873
|
-
channelId: command.channelId,
|
|
1874
|
-
isAuthorizedSender: command.isAuthorizedSender,
|
|
1875
|
-
gatewayClientScopes: params.ctx.GatewayClientScopes,
|
|
1876
|
-
sessionKey: params.sessionKey,
|
|
1877
|
-
sessionId: params.sessionEntry?.sessionId,
|
|
1878
|
-
commandBody: command.commandBodyNormalized,
|
|
1879
|
-
config: cfg,
|
|
1880
|
-
from: command.from,
|
|
1881
|
-
to: command.to,
|
|
1882
|
-
accountId: params.ctx.AccountId ?? void 0,
|
|
1883
|
-
messageThreadId: typeof params.ctx.MessageThreadId === "string" || typeof params.ctx.MessageThreadId === "number" ? params.ctx.MessageThreadId : void 0,
|
|
1884
|
-
threadParentId: params.ctx.ThreadParentId?.trim() || void 0
|
|
1885
|
-
})
|
|
1886
|
-
};
|
|
1887
|
-
};
|
|
1888
|
-
//#endregion
|
|
1889
|
-
//#region src/auto-reply/reply/plugins-commands.ts
|
|
1890
|
-
function parsePluginsCommand(raw) {
|
|
1891
|
-
const match = raw.match(/^\/plugins?(?:\s+(.*))?$/i);
|
|
1892
|
-
if (!match) return null;
|
|
1893
|
-
const tail = match[1]?.trim() ?? "";
|
|
1894
|
-
if (!tail) return { action: "list" };
|
|
1895
|
-
const [rawAction, ...rest] = tail.split(/\s+/);
|
|
1896
|
-
const action = rawAction?.trim().toLowerCase();
|
|
1897
|
-
const name = rest.join(" ").trim();
|
|
1898
|
-
if (action === "list") return name ? {
|
|
1899
|
-
action: "error",
|
|
1900
|
-
message: "Usage: /plugins list|inspect|show|get|enable|disable [plugin]"
|
|
1901
|
-
} : { action: "list" };
|
|
1902
|
-
if (action === "inspect" || action === "show" || action === "get") return {
|
|
1903
|
-
action: "inspect",
|
|
1904
|
-
name: name || void 0
|
|
1905
|
-
};
|
|
1906
|
-
if (action === "install" || action === "add") {
|
|
1907
|
-
if (!name) return {
|
|
1908
|
-
action: "error",
|
|
1909
|
-
message: "Usage: /plugins install <path|archive|npm-spec|clawhub:pkg>"
|
|
1910
|
-
};
|
|
1911
|
-
return {
|
|
1912
|
-
action: "install",
|
|
1913
|
-
spec: name
|
|
1914
|
-
};
|
|
1915
|
-
}
|
|
1916
|
-
if (action === "enable" || action === "disable") {
|
|
1917
|
-
if (!name) return {
|
|
1918
|
-
action: "error",
|
|
1919
|
-
message: `Usage: /plugins ${action} <plugin-id-or-name>`
|
|
1920
|
-
};
|
|
1921
|
-
return {
|
|
1922
|
-
action,
|
|
1923
|
-
name
|
|
1924
|
-
};
|
|
1925
|
-
}
|
|
1926
|
-
return {
|
|
1927
|
-
action: "error",
|
|
1928
|
-
message: "Usage: /plugins list|inspect|show|get|install|enable|disable [plugin]"
|
|
1929
|
-
};
|
|
1930
|
-
}
|
|
1931
|
-
//#endregion
|
|
1932
|
-
//#region src/auto-reply/reply/commands-plugins.ts
|
|
1933
|
-
function renderJsonBlock(label, value) {
|
|
1934
|
-
return `${label}\n\`\`\`json\n${JSON.stringify(value, null, 2)}\n\`\`\``;
|
|
1935
|
-
}
|
|
1936
|
-
function buildPluginInspectJson(params) {
|
|
1937
|
-
const inspect = buildPluginInspectReport({
|
|
1938
|
-
id: params.id,
|
|
1939
|
-
config: params.config,
|
|
1940
|
-
report: params.report
|
|
1941
|
-
});
|
|
1942
|
-
if (!inspect) return null;
|
|
1943
|
-
return {
|
|
1944
|
-
inspect,
|
|
1945
|
-
compatibilityWarnings: inspect.compatibility.map((warning) => ({
|
|
1946
|
-
code: warning.code,
|
|
1947
|
-
severity: warning.severity,
|
|
1948
|
-
message: formatPluginCompatibilityNotice(warning)
|
|
1949
|
-
})),
|
|
1950
|
-
install: params.config.plugins?.installs?.[inspect.plugin.id] ?? null
|
|
1951
|
-
};
|
|
1952
|
-
}
|
|
1953
|
-
function buildAllPluginInspectJson(params) {
|
|
1954
|
-
return buildAllPluginInspectReports({
|
|
1955
|
-
config: params.config,
|
|
1956
|
-
report: params.report
|
|
1957
|
-
}).map((inspect) => ({
|
|
1958
|
-
inspect,
|
|
1959
|
-
compatibilityWarnings: inspect.compatibility.map((warning) => ({
|
|
1960
|
-
code: warning.code,
|
|
1961
|
-
severity: warning.severity,
|
|
1962
|
-
message: formatPluginCompatibilityNotice(warning)
|
|
1963
|
-
})),
|
|
1964
|
-
install: params.config.plugins?.installs?.[inspect.plugin.id] ?? null
|
|
1965
|
-
}));
|
|
1966
|
-
}
|
|
1967
|
-
function formatPluginLabel(plugin) {
|
|
1968
|
-
if (!plugin.name || plugin.name === plugin.id) return plugin.id;
|
|
1969
|
-
return `${plugin.name} (${plugin.id})`;
|
|
1970
|
-
}
|
|
1971
|
-
function formatPluginsList(report) {
|
|
1972
|
-
if (report.plugins.length === 0) return `š No plugins found for workspace ${report.workspaceDir ?? "(unknown workspace)"}.`;
|
|
1973
|
-
return [`š Plugins (${report.plugins.filter((plugin) => plugin.status === "loaded").length}/${report.plugins.length} loaded)`, ...report.plugins.map((plugin) => {
|
|
1974
|
-
const format = plugin.bundleFormat ? `${plugin.format ?? "openclaw"}/${plugin.bundleFormat}` : plugin.format ?? "openclaw";
|
|
1975
|
-
return `- ${formatPluginLabel(plugin)} [${plugin.status}] ${format}`;
|
|
1976
|
-
})].join("\n");
|
|
1977
|
-
}
|
|
1978
|
-
function findPlugin(report, rawName) {
|
|
1979
|
-
const target = rawName.trim().toLowerCase();
|
|
1980
|
-
if (!target) return;
|
|
1981
|
-
return report.plugins.find((plugin) => plugin.id.toLowerCase() === target || plugin.name.toLowerCase() === target);
|
|
1982
|
-
}
|
|
1983
|
-
function looksLikeLocalPluginInstallSpec(raw) {
|
|
1984
|
-
return raw.startsWith(".") || raw.startsWith("~") || raw.startsWith("/") || raw.endsWith(".ts") || raw.endsWith(".js") || raw.endsWith(".mjs") || raw.endsWith(".cjs") || raw.endsWith(".tgz") || raw.endsWith(".tar.gz") || raw.endsWith(".tar") || raw.endsWith(".zip");
|
|
1985
|
-
}
|
|
1986
|
-
async function installPluginFromPluginsCommand(params) {
|
|
1987
|
-
const fileSpec = resolveFileNpmSpecToLocalPath(params.raw);
|
|
1988
|
-
if (fileSpec && !fileSpec.ok) return {
|
|
1989
|
-
ok: false,
|
|
1990
|
-
error: fileSpec.error
|
|
1991
|
-
};
|
|
1992
|
-
const resolved = resolveUserPath(fileSpec && fileSpec.ok ? fileSpec.path : params.raw);
|
|
1993
|
-
if (fsSync.existsSync(resolved)) {
|
|
1994
|
-
const result = await installPluginFromPath({
|
|
1995
|
-
path: resolved,
|
|
1996
|
-
logger: createPluginInstallLogger()
|
|
1997
|
-
});
|
|
1998
|
-
if (!result.ok) return {
|
|
1999
|
-
ok: false,
|
|
2000
|
-
error: result.error
|
|
2001
|
-
};
|
|
2002
|
-
clearPluginManifestRegistryCache();
|
|
2003
|
-
const source = resolveArchiveKind(resolved) ? "archive" : "path";
|
|
2004
|
-
await persistPluginInstall({
|
|
2005
|
-
config: params.config,
|
|
2006
|
-
pluginId: result.pluginId,
|
|
2007
|
-
install: {
|
|
2008
|
-
source,
|
|
2009
|
-
sourcePath: resolved,
|
|
2010
|
-
installPath: result.targetDir,
|
|
2011
|
-
version: result.version
|
|
2012
|
-
}
|
|
2013
|
-
});
|
|
2014
|
-
return {
|
|
2015
|
-
ok: true,
|
|
2016
|
-
pluginId: result.pluginId
|
|
2017
|
-
};
|
|
2018
|
-
}
|
|
2019
|
-
if (looksLikeLocalPluginInstallSpec(params.raw)) return {
|
|
2020
|
-
ok: false,
|
|
2021
|
-
error: `Path not found: ${resolved}`
|
|
2022
|
-
};
|
|
2023
|
-
if (parseClawHubPluginSpec(params.raw)) {
|
|
2024
|
-
const result = await installPluginFromClawHub({
|
|
2025
|
-
spec: params.raw,
|
|
2026
|
-
logger: createPluginInstallLogger()
|
|
2027
|
-
});
|
|
2028
|
-
if (!result.ok) return {
|
|
2029
|
-
ok: false,
|
|
2030
|
-
error: result.error
|
|
2031
|
-
};
|
|
2032
|
-
clearPluginManifestRegistryCache();
|
|
2033
|
-
await persistPluginInstall({
|
|
2034
|
-
config: params.config,
|
|
2035
|
-
pluginId: result.pluginId,
|
|
2036
|
-
install: {
|
|
2037
|
-
source: "clawhub",
|
|
2038
|
-
spec: params.raw,
|
|
2039
|
-
installPath: result.targetDir,
|
|
2040
|
-
version: result.version,
|
|
2041
|
-
integrity: result.clawhub.integrity,
|
|
2042
|
-
resolvedAt: result.clawhub.resolvedAt,
|
|
2043
|
-
clawhubUrl: result.clawhub.clawhubUrl,
|
|
2044
|
-
clawhubPackage: result.clawhub.clawhubPackage,
|
|
2045
|
-
clawhubFamily: result.clawhub.clawhubFamily,
|
|
2046
|
-
clawhubChannel: result.clawhub.clawhubChannel
|
|
2047
|
-
}
|
|
2048
|
-
});
|
|
2049
|
-
return {
|
|
2050
|
-
ok: true,
|
|
2051
|
-
pluginId: result.pluginId
|
|
2052
|
-
};
|
|
2053
|
-
}
|
|
2054
|
-
const preferredClawHubSpec = buildPreferredClawHubSpec(params.raw);
|
|
2055
|
-
if (preferredClawHubSpec) {
|
|
2056
|
-
const clawhubResult = await installPluginFromClawHub({
|
|
2057
|
-
spec: preferredClawHubSpec,
|
|
2058
|
-
logger: createPluginInstallLogger()
|
|
2059
|
-
});
|
|
2060
|
-
if (clawhubResult.ok) {
|
|
2061
|
-
clearPluginManifestRegistryCache();
|
|
2062
|
-
await persistPluginInstall({
|
|
2063
|
-
config: params.config,
|
|
2064
|
-
pluginId: clawhubResult.pluginId,
|
|
2065
|
-
install: {
|
|
2066
|
-
source: "clawhub",
|
|
2067
|
-
spec: preferredClawHubSpec,
|
|
2068
|
-
installPath: clawhubResult.targetDir,
|
|
2069
|
-
version: clawhubResult.version,
|
|
2070
|
-
integrity: clawhubResult.clawhub.integrity,
|
|
2071
|
-
resolvedAt: clawhubResult.clawhub.resolvedAt,
|
|
2072
|
-
clawhubUrl: clawhubResult.clawhub.clawhubUrl,
|
|
2073
|
-
clawhubPackage: clawhubResult.clawhub.clawhubPackage,
|
|
2074
|
-
clawhubFamily: clawhubResult.clawhub.clawhubFamily,
|
|
2075
|
-
clawhubChannel: clawhubResult.clawhub.clawhubChannel
|
|
2076
|
-
}
|
|
2077
|
-
});
|
|
2078
|
-
return {
|
|
2079
|
-
ok: true,
|
|
2080
|
-
pluginId: clawhubResult.pluginId
|
|
2081
|
-
};
|
|
2082
|
-
}
|
|
2083
|
-
if (decidePreferredClawHubFallback(clawhubResult) !== "fallback_to_npm") return {
|
|
2084
|
-
ok: false,
|
|
2085
|
-
error: clawhubResult.error
|
|
2086
|
-
};
|
|
2087
|
-
}
|
|
2088
|
-
const result = await installPluginFromNpmSpec({
|
|
2089
|
-
spec: params.raw,
|
|
2090
|
-
logger: createPluginInstallLogger()
|
|
2091
|
-
});
|
|
2092
|
-
if (!result.ok) return {
|
|
2093
|
-
ok: false,
|
|
2094
|
-
error: result.error
|
|
2095
|
-
};
|
|
2096
|
-
clearPluginManifestRegistryCache();
|
|
2097
|
-
const installRecord = buildNpmInstallRecordFields({
|
|
2098
|
-
spec: params.raw,
|
|
2099
|
-
installPath: result.targetDir,
|
|
2100
|
-
version: result.version,
|
|
2101
|
-
resolution: result.npmResolution
|
|
2102
|
-
});
|
|
2103
|
-
await persistPluginInstall({
|
|
2104
|
-
config: params.config,
|
|
2105
|
-
pluginId: result.pluginId,
|
|
2106
|
-
install: installRecord
|
|
2107
|
-
});
|
|
2108
|
-
return {
|
|
2109
|
-
ok: true,
|
|
2110
|
-
pluginId: result.pluginId
|
|
2111
|
-
};
|
|
2112
|
-
}
|
|
2113
|
-
async function loadPluginCommandState(workspaceDir, options) {
|
|
2114
|
-
const snapshot = await readConfigFileSnapshot();
|
|
2115
|
-
if (!snapshot.valid) return {
|
|
2116
|
-
ok: false,
|
|
2117
|
-
path: snapshot.path,
|
|
2118
|
-
error: "Config file is invalid; fix it before using /plugins."
|
|
2119
|
-
};
|
|
2120
|
-
const config = structuredClone(snapshot.resolved);
|
|
2121
|
-
return {
|
|
2122
|
-
ok: true,
|
|
2123
|
-
path: snapshot.path,
|
|
2124
|
-
config,
|
|
2125
|
-
report: options?.loadModules === true ? buildPluginDiagnosticsReport({
|
|
2126
|
-
config,
|
|
2127
|
-
workspaceDir
|
|
2128
|
-
}) : buildPluginSnapshotReport({
|
|
2129
|
-
config,
|
|
2130
|
-
workspaceDir
|
|
2131
|
-
})
|
|
2132
|
-
};
|
|
2133
|
-
}
|
|
2134
|
-
const handlePluginsCommand = async (params, allowTextCommands) => {
|
|
2135
|
-
if (!allowTextCommands) return null;
|
|
2136
|
-
const pluginsCommand = parsePluginsCommand(params.command.commandBodyNormalized);
|
|
2137
|
-
if (!pluginsCommand) return null;
|
|
2138
|
-
const unauthorized = rejectUnauthorizedCommand(params, "/plugins");
|
|
2139
|
-
if (unauthorized) return unauthorized;
|
|
2140
|
-
const nonOwner = (pluginsCommand.action === "list" || pluginsCommand.action === "inspect") && isInternalMessageChannel(params.command.channel) ? null : rejectNonOwnerCommand(params, "/plugins");
|
|
2141
|
-
if (nonOwner) return nonOwner;
|
|
2142
|
-
const disabled = requireCommandFlagEnabled(params.cfg, {
|
|
2143
|
-
label: "/plugins",
|
|
2144
|
-
configKey: "plugins"
|
|
2145
|
-
});
|
|
2146
|
-
if (disabled) return disabled;
|
|
2147
|
-
if (pluginsCommand.action === "error") return {
|
|
2148
|
-
shouldContinue: false,
|
|
2149
|
-
reply: { text: `ā ļø ${pluginsCommand.message}` }
|
|
2150
|
-
};
|
|
2151
|
-
const loaded = await loadPluginCommandState(params.workspaceDir, { loadModules: pluginsCommand.action !== "list" });
|
|
2152
|
-
if (!loaded.ok) return {
|
|
2153
|
-
shouldContinue: false,
|
|
2154
|
-
reply: { text: `ā ļø ${loaded.error}` }
|
|
2155
|
-
};
|
|
2156
|
-
if (pluginsCommand.action === "list") return {
|
|
2157
|
-
shouldContinue: false,
|
|
2158
|
-
reply: { text: formatPluginsList(loaded.report) }
|
|
2159
|
-
};
|
|
2160
|
-
if (pluginsCommand.action === "inspect") {
|
|
2161
|
-
if (!pluginsCommand.name) return {
|
|
2162
|
-
shouldContinue: false,
|
|
2163
|
-
reply: { text: formatPluginsList(loaded.report) }
|
|
2164
|
-
};
|
|
2165
|
-
if (pluginsCommand.name.toLowerCase() === "all") return {
|
|
2166
|
-
shouldContinue: false,
|
|
2167
|
-
reply: { text: renderJsonBlock("š Plugins", buildAllPluginInspectJson(loaded)) }
|
|
2168
|
-
};
|
|
2169
|
-
const payload = buildPluginInspectJson({
|
|
2170
|
-
id: pluginsCommand.name,
|
|
2171
|
-
config: loaded.config,
|
|
2172
|
-
report: loaded.report
|
|
2173
|
-
});
|
|
2174
|
-
if (!payload) return {
|
|
2175
|
-
shouldContinue: false,
|
|
2176
|
-
reply: { text: `š No plugin named "${pluginsCommand.name}" found.` }
|
|
2177
|
-
};
|
|
2178
|
-
return {
|
|
2179
|
-
shouldContinue: false,
|
|
2180
|
-
reply: { text: renderJsonBlock(`š Plugin "${payload.inspect.plugin.id}"`, {
|
|
2181
|
-
...payload.inspect,
|
|
2182
|
-
compatibilityWarnings: payload.compatibilityWarnings,
|
|
2183
|
-
install: payload.install
|
|
2184
|
-
}) }
|
|
2185
|
-
};
|
|
2186
|
-
}
|
|
2187
|
-
const missingAdminScope = requireGatewayClientScopeForInternalChannel(params, {
|
|
2188
|
-
label: "/plugins write",
|
|
2189
|
-
allowedScopes: ["operator.admin"],
|
|
2190
|
-
missingText: "ā /plugins install|enable|disable requires operator.admin for gateway clients."
|
|
2191
|
-
});
|
|
2192
|
-
if (missingAdminScope) return missingAdminScope;
|
|
2193
|
-
if (pluginsCommand.action === "install") {
|
|
2194
|
-
const installed = await installPluginFromPluginsCommand({
|
|
2195
|
-
raw: pluginsCommand.spec,
|
|
2196
|
-
config: structuredClone(loaded.config)
|
|
2197
|
-
});
|
|
2198
|
-
if (!installed.ok) return {
|
|
2199
|
-
shouldContinue: false,
|
|
2200
|
-
reply: { text: `ā ļø ${installed.error}` }
|
|
2201
|
-
};
|
|
2202
|
-
return {
|
|
2203
|
-
shouldContinue: false,
|
|
2204
|
-
reply: { text: `š Installed plugin "${installed.pluginId}". Restart the gateway to load plugins.` }
|
|
2205
|
-
};
|
|
2206
|
-
}
|
|
2207
|
-
const plugin = findPlugin(loaded.report, pluginsCommand.name);
|
|
2208
|
-
if (!plugin) return {
|
|
2209
|
-
shouldContinue: false,
|
|
2210
|
-
reply: { text: `š No plugin named "${pluginsCommand.name}" found.` }
|
|
2211
|
-
};
|
|
2212
|
-
const validated = validateConfigObjectWithPlugins(setPluginEnabledInConfig(structuredClone(loaded.config), plugin.id, pluginsCommand.action === "enable"));
|
|
2213
|
-
if (!validated.ok) {
|
|
2214
|
-
const issue = validated.issues[0];
|
|
2215
|
-
return {
|
|
2216
|
-
shouldContinue: false,
|
|
2217
|
-
reply: { text: `ā ļø Config invalid after /plugins ${pluginsCommand.action} (${issue.path}: ${issue.message}).` }
|
|
2218
|
-
};
|
|
2219
|
-
}
|
|
2220
|
-
await writeConfigFile(validated.config);
|
|
2221
|
-
return {
|
|
2222
|
-
shouldContinue: false,
|
|
2223
|
-
reply: { text: `š Plugin "${plugin.id}" ${pluginsCommand.action}d in ${loaded.path}. Restart the gateway to apply.` }
|
|
2224
|
-
};
|
|
2225
|
-
};
|
|
2226
|
-
//#endregion
|
|
2227
|
-
//#region src/auto-reply/send-policy.ts
|
|
2228
|
-
function normalizeSendPolicyOverride(raw) {
|
|
2229
|
-
const value = raw?.trim().toLowerCase();
|
|
2230
|
-
if (!value) return;
|
|
2231
|
-
if (value === "allow" || value === "on") return "allow";
|
|
2232
|
-
if (value === "deny" || value === "off") return "deny";
|
|
2233
|
-
}
|
|
2234
|
-
function parseSendPolicyCommand(raw) {
|
|
2235
|
-
if (!raw) return { hasCommand: false };
|
|
2236
|
-
const trimmed = raw.trim();
|
|
2237
|
-
if (!trimmed) return { hasCommand: false };
|
|
2238
|
-
const match = normalizeCommandBody(stripInboundMetadata(trimmed)).match(/^\/send(?:\s+([a-zA-Z]+))?\s*$/i);
|
|
2239
|
-
if (!match) return { hasCommand: false };
|
|
2240
|
-
const token = match[1]?.trim().toLowerCase();
|
|
2241
|
-
if (!token) return { hasCommand: true };
|
|
2242
|
-
if (token === "inherit" || token === "default" || token === "reset") return {
|
|
2243
|
-
hasCommand: true,
|
|
2244
|
-
mode: "inherit"
|
|
2245
|
-
};
|
|
2246
|
-
return {
|
|
2247
|
-
hasCommand: true,
|
|
2248
|
-
mode: normalizeSendPolicyOverride(token)
|
|
2249
|
-
};
|
|
2250
|
-
}
|
|
2251
|
-
//#endregion
|
|
2252
|
-
//#region src/auto-reply/reply/commands-session-store.ts
|
|
2253
|
-
async function persistSessionEntry(params) {
|
|
2254
|
-
if (!params.sessionEntry || !params.sessionStore || !params.sessionKey) return false;
|
|
2255
|
-
params.sessionEntry.updatedAt = Date.now();
|
|
2256
|
-
params.sessionStore[params.sessionKey] = params.sessionEntry;
|
|
2257
|
-
if (params.storePath) await updateSessionStore(params.storePath, (store) => {
|
|
2258
|
-
store[params.sessionKey] = params.sessionEntry;
|
|
2259
|
-
});
|
|
2260
|
-
return true;
|
|
2261
|
-
}
|
|
2262
|
-
async function persistAbortTargetEntry(params) {
|
|
2263
|
-
const { entry, key, sessionStore, storePath, abortCutoff } = params;
|
|
2264
|
-
if (!entry || !key || !sessionStore) return false;
|
|
2265
|
-
entry.abortedLastRun = true;
|
|
2266
|
-
applyAbortCutoffToSessionEntry(entry, abortCutoff);
|
|
2267
|
-
entry.updatedAt = Date.now();
|
|
2268
|
-
sessionStore[key] = entry;
|
|
2269
|
-
if (storePath) await updateSessionStore(storePath, (store) => {
|
|
2270
|
-
const nextEntry = store[key] ?? entry;
|
|
2271
|
-
if (!nextEntry) return;
|
|
2272
|
-
nextEntry.abortedLastRun = true;
|
|
2273
|
-
applyAbortCutoffToSessionEntry(nextEntry, abortCutoff);
|
|
2274
|
-
nextEntry.updatedAt = Date.now();
|
|
2275
|
-
store[key] = nextEntry;
|
|
2276
|
-
});
|
|
2277
|
-
return true;
|
|
2278
|
-
}
|
|
2279
|
-
//#endregion
|
|
2280
|
-
//#region src/auto-reply/reply/commands-session-abort.ts
|
|
2281
|
-
function resolveAbortTarget(params) {
|
|
2282
|
-
const targetSessionKey = params.ctx.CommandTargetSessionKey?.trim() || params.sessionKey;
|
|
2283
|
-
const { entry, key } = resolveSessionEntryForKey(params.sessionStore, targetSessionKey);
|
|
2284
|
-
if (entry && key) return {
|
|
2285
|
-
entry,
|
|
2286
|
-
key,
|
|
2287
|
-
sessionId: entry.sessionId
|
|
2288
|
-
};
|
|
2289
|
-
if (params.sessionEntry && params.sessionKey) return {
|
|
2290
|
-
entry: params.sessionEntry,
|
|
2291
|
-
key: params.sessionKey,
|
|
2292
|
-
sessionId: params.sessionEntry.sessionId
|
|
2293
|
-
};
|
|
2294
|
-
return {
|
|
2295
|
-
entry: void 0,
|
|
2296
|
-
key: targetSessionKey,
|
|
2297
|
-
sessionId: void 0
|
|
2298
|
-
};
|
|
2299
|
-
}
|
|
2300
|
-
function resolveAbortCutoffForTarget(params) {
|
|
2301
|
-
if (!shouldPersistAbortCutoff({
|
|
2302
|
-
commandSessionKey: params.commandSessionKey,
|
|
2303
|
-
targetSessionKey: params.targetSessionKey
|
|
2304
|
-
})) return;
|
|
2305
|
-
return resolveAbortCutoffFromContext(params.ctx);
|
|
2306
|
-
}
|
|
2307
|
-
async function applyAbortTarget(params) {
|
|
2308
|
-
const { abortTarget } = params;
|
|
2309
|
-
if (abortTarget.sessionId) abortEmbeddedPiRun(abortTarget.sessionId);
|
|
2310
|
-
if (!await persistAbortTargetEntry({
|
|
2311
|
-
entry: abortTarget.entry,
|
|
2312
|
-
key: abortTarget.key,
|
|
2313
|
-
sessionStore: params.sessionStore,
|
|
2314
|
-
storePath: params.storePath,
|
|
2315
|
-
abortCutoff: params.abortCutoff
|
|
2316
|
-
}) && params.abortKey) setAbortMemory(params.abortKey, true);
|
|
2317
|
-
}
|
|
2318
|
-
function buildAbortTargetApplyParams(params, abortTarget) {
|
|
2319
|
-
return {
|
|
2320
|
-
abortTarget,
|
|
2321
|
-
sessionStore: params.sessionStore,
|
|
2322
|
-
storePath: params.storePath,
|
|
2323
|
-
abortKey: params.command.abortKey,
|
|
2324
|
-
abortCutoff: resolveAbortCutoffForTarget({
|
|
2325
|
-
ctx: params.ctx,
|
|
2326
|
-
commandSessionKey: params.sessionKey,
|
|
2327
|
-
targetSessionKey: abortTarget.key
|
|
2328
|
-
})
|
|
2329
|
-
};
|
|
2330
|
-
}
|
|
2331
|
-
const handleStopCommand = async (params, allowTextCommands) => {
|
|
2332
|
-
if (!allowTextCommands) return null;
|
|
2333
|
-
if (params.command.commandBodyNormalized !== "/stop") return null;
|
|
2334
|
-
const unauthorizedStop = rejectUnauthorizedCommand(params, "/stop");
|
|
2335
|
-
if (unauthorizedStop) return unauthorizedStop;
|
|
2336
|
-
const abortTarget = resolveAbortTarget({
|
|
2337
|
-
ctx: params.ctx,
|
|
2338
|
-
sessionKey: params.sessionKey,
|
|
2339
|
-
sessionEntry: params.sessionEntry,
|
|
2340
|
-
sessionStore: params.sessionStore
|
|
2341
|
-
});
|
|
2342
|
-
const cleared = clearSessionQueues([abortTarget.key, abortTarget.sessionId]);
|
|
2343
|
-
if (cleared.followupCleared > 0 || cleared.laneCleared > 0) logVerbose(`stop: cleared followups=${cleared.followupCleared} lane=${cleared.laneCleared} keys=${cleared.keys.join(",")}`);
|
|
2344
|
-
await applyAbortTarget(buildAbortTargetApplyParams(params, abortTarget));
|
|
2345
|
-
await triggerInternalHook(createInternalHookEvent("command", "stop", abortTarget.key ?? params.sessionKey ?? "", {
|
|
2346
|
-
sessionEntry: abortTarget.entry ?? params.sessionEntry,
|
|
2347
|
-
sessionId: abortTarget.sessionId,
|
|
2348
|
-
commandSource: params.command.surface,
|
|
2349
|
-
senderId: params.command.senderId
|
|
2350
|
-
}));
|
|
2351
|
-
const { stopped } = stopSubagentsForRequester({
|
|
2352
|
-
cfg: params.cfg,
|
|
2353
|
-
requesterSessionKey: abortTarget.key ?? params.sessionKey
|
|
2354
|
-
});
|
|
2355
|
-
return {
|
|
2356
|
-
shouldContinue: false,
|
|
2357
|
-
reply: { text: formatAbortReplyText(stopped) }
|
|
2358
|
-
};
|
|
2359
|
-
};
|
|
2360
|
-
const handleAbortTrigger = async (params, allowTextCommands) => {
|
|
2361
|
-
if (!allowTextCommands) return null;
|
|
2362
|
-
if (!isAbortTrigger(params.command.rawBodyNormalized)) return null;
|
|
2363
|
-
const unauthorizedAbortTrigger = rejectUnauthorizedCommand(params, "abort trigger");
|
|
2364
|
-
if (unauthorizedAbortTrigger) return unauthorizedAbortTrigger;
|
|
2365
|
-
await applyAbortTarget(buildAbortTargetApplyParams(params, resolveAbortTarget({
|
|
2366
|
-
ctx: params.ctx,
|
|
2367
|
-
sessionKey: params.sessionKey,
|
|
2368
|
-
sessionEntry: params.sessionEntry,
|
|
2369
|
-
sessionStore: params.sessionStore
|
|
2370
|
-
})));
|
|
2371
|
-
return {
|
|
2372
|
-
shouldContinue: false,
|
|
2373
|
-
reply: { text: "āļø Agent was aborted." }
|
|
2374
|
-
};
|
|
2375
|
-
};
|
|
2376
|
-
//#endregion
|
|
2377
|
-
//#region src/auto-reply/reply/matrix-context.ts
|
|
2378
|
-
function normalizeMatrixTarget(value) {
|
|
2379
|
-
return typeof value === "string" ? value.trim() : "";
|
|
2380
|
-
}
|
|
2381
|
-
function resolveMatrixRoomIdFromTarget(raw) {
|
|
2382
|
-
let target = normalizeMatrixTarget(raw);
|
|
2383
|
-
if (!target) return;
|
|
2384
|
-
if (target.toLowerCase().startsWith("matrix:")) target = target.slice(7).trim();
|
|
2385
|
-
if (/^(room|channel):/i.test(target)) return target.replace(/^(room|channel):/i, "").trim() || void 0;
|
|
2386
|
-
if (target.startsWith("!") || target.startsWith("#")) return target;
|
|
2387
|
-
}
|
|
2388
|
-
function resolveMatrixParentConversationId(params) {
|
|
2389
|
-
const targets = [
|
|
2390
|
-
params.ctx.OriginatingTo,
|
|
2391
|
-
params.command.to,
|
|
2392
|
-
params.ctx.To
|
|
2393
|
-
];
|
|
2394
|
-
for (const candidate of targets) {
|
|
2395
|
-
const roomId = resolveMatrixRoomIdFromTarget(candidate ?? "");
|
|
2396
|
-
if (roomId) return roomId;
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
function resolveMatrixConversationId(params) {
|
|
2400
|
-
const threadId = params.ctx.MessageThreadId != null ? String(params.ctx.MessageThreadId).trim() : "";
|
|
2401
|
-
if (threadId) return threadId;
|
|
2402
|
-
return resolveMatrixParentConversationId(params);
|
|
2403
|
-
}
|
|
2404
|
-
//#endregion
|
|
2405
|
-
//#region src/auto-reply/reply/commands-session.ts
|
|
2406
|
-
const SESSION_DURATION_OFF_VALUES = new Set([
|
|
2407
|
-
"off",
|
|
2408
|
-
"disable",
|
|
2409
|
-
"disabled",
|
|
2410
|
-
"none",
|
|
2411
|
-
"0"
|
|
2412
|
-
]);
|
|
2413
|
-
const SESSION_ACTION_IDLE = "idle";
|
|
2414
|
-
const SESSION_ACTION_MAX_AGE = "max-age";
|
|
2415
|
-
let cachedChannelRuntime;
|
|
2416
|
-
function getChannelRuntime() {
|
|
2417
|
-
cachedChannelRuntime ??= createPluginRuntime().channel;
|
|
2418
|
-
return cachedChannelRuntime;
|
|
2419
|
-
}
|
|
2420
|
-
function resolveSessionCommandUsage() {
|
|
2421
|
-
return "Usage: /session idle <duration|off> | /session max-age <duration|off> (example: /session idle 24h)";
|
|
2422
|
-
}
|
|
2423
|
-
function parseSessionDurationMs(raw) {
|
|
2424
|
-
const normalized = raw.trim().toLowerCase();
|
|
2425
|
-
if (!normalized) throw new Error("missing duration");
|
|
2426
|
-
if (SESSION_DURATION_OFF_VALUES.has(normalized)) return 0;
|
|
2427
|
-
if (/^\d+(?:\.\d+)?$/.test(normalized)) {
|
|
2428
|
-
const hours = Number(normalized);
|
|
2429
|
-
if (!Number.isFinite(hours) || hours < 0) throw new Error("invalid duration");
|
|
2430
|
-
return Math.round(hours * 60 * 60 * 1e3);
|
|
2431
|
-
}
|
|
2432
|
-
return parseDurationMs(normalized, { defaultUnit: "h" });
|
|
2433
|
-
}
|
|
2434
|
-
function formatSessionExpiry(expiresAt) {
|
|
2435
|
-
return new Date(expiresAt).toISOString();
|
|
2436
|
-
}
|
|
2437
|
-
function resolveSessionBindingDurationMs(binding, key, fallbackMs) {
|
|
2438
|
-
const raw = binding.metadata?.[key];
|
|
2439
|
-
if (typeof raw !== "number" || !Number.isFinite(raw)) return fallbackMs;
|
|
2440
|
-
return Math.max(0, Math.floor(raw));
|
|
2441
|
-
}
|
|
2442
|
-
function resolveSessionBindingLastActivityAt(binding) {
|
|
2443
|
-
const raw = binding.metadata?.lastActivityAt;
|
|
2444
|
-
if (typeof raw !== "number" || !Number.isFinite(raw)) return binding.boundAt;
|
|
2445
|
-
return Math.max(Math.floor(raw), binding.boundAt);
|
|
2446
|
-
}
|
|
2447
|
-
function resolveSessionBindingBoundBy(binding) {
|
|
2448
|
-
const raw = binding.metadata?.boundBy;
|
|
2449
|
-
return typeof raw === "string" ? raw.trim() : "";
|
|
2450
|
-
}
|
|
2451
|
-
function isSessionBindingRecord(binding) {
|
|
2452
|
-
return "bindingId" in binding;
|
|
2453
|
-
}
|
|
2454
|
-
function resolveUpdatedLifecycleDurationMs(binding, key) {
|
|
2455
|
-
if (!isSessionBindingRecord(binding)) {
|
|
2456
|
-
const raw = binding[key];
|
|
2457
|
-
if (typeof raw === "number" && Number.isFinite(raw)) return Math.max(0, Math.floor(raw));
|
|
2458
|
-
}
|
|
2459
|
-
if (!isSessionBindingRecord(binding)) return;
|
|
2460
|
-
const raw = binding.metadata?.[key];
|
|
2461
|
-
if (typeof raw !== "number" || !Number.isFinite(raw)) return;
|
|
2462
|
-
return Math.max(0, Math.floor(raw));
|
|
2463
|
-
}
|
|
2464
|
-
function toUpdatedLifecycleBinding(binding) {
|
|
2465
|
-
const lastActivityAt = isSessionBindingRecord(binding) ? resolveSessionBindingLastActivityAt(binding) : Math.max(Math.floor(binding.lastActivityAt), binding.boundAt);
|
|
2466
|
-
return {
|
|
2467
|
-
boundAt: binding.boundAt,
|
|
2468
|
-
lastActivityAt,
|
|
2469
|
-
idleTimeoutMs: resolveUpdatedLifecycleDurationMs(binding, "idleTimeoutMs"),
|
|
2470
|
-
maxAgeMs: resolveUpdatedLifecycleDurationMs(binding, "maxAgeMs")
|
|
2471
|
-
};
|
|
2472
|
-
}
|
|
2473
|
-
function resolveUpdatedBindingExpiry(params) {
|
|
2474
|
-
const expiries = params.bindings.map((binding) => {
|
|
2475
|
-
if (params.action === SESSION_ACTION_IDLE) {
|
|
2476
|
-
const idleTimeoutMs = typeof binding.idleTimeoutMs === "number" && Number.isFinite(binding.idleTimeoutMs) ? Math.max(0, Math.floor(binding.idleTimeoutMs)) : 0;
|
|
2477
|
-
if (idleTimeoutMs <= 0) return;
|
|
2478
|
-
return Math.max(binding.lastActivityAt, binding.boundAt) + idleTimeoutMs;
|
|
2479
|
-
}
|
|
2480
|
-
const maxAgeMs = typeof binding.maxAgeMs === "number" && Number.isFinite(binding.maxAgeMs) ? Math.max(0, Math.floor(binding.maxAgeMs)) : 0;
|
|
2481
|
-
if (maxAgeMs <= 0) return;
|
|
2482
|
-
return binding.boundAt + maxAgeMs;
|
|
2483
|
-
}).filter((expiresAt) => typeof expiresAt === "number");
|
|
2484
|
-
if (expiries.length === 0) return;
|
|
2485
|
-
return Math.min(...expiries);
|
|
2486
|
-
}
|
|
2487
|
-
const handleActivationCommand = async (params, allowTextCommands) => {
|
|
2488
|
-
if (!allowTextCommands) return null;
|
|
2489
|
-
const activationCommand = parseActivationCommand(params.command.commandBodyNormalized);
|
|
2490
|
-
if (!activationCommand.hasCommand) return null;
|
|
2491
|
-
if (!params.isGroup) return {
|
|
2492
|
-
shouldContinue: false,
|
|
2493
|
-
reply: { text: "āļø Group activation only applies to group chats." }
|
|
2494
|
-
};
|
|
2495
|
-
if (!params.command.isAuthorizedSender) {
|
|
2496
|
-
logVerbose(`Ignoring /activation from unauthorized sender in group: ${params.command.senderId || "<unknown>"}`);
|
|
2497
|
-
return { shouldContinue: false };
|
|
2498
|
-
}
|
|
2499
|
-
if (!activationCommand.mode) return {
|
|
2500
|
-
shouldContinue: false,
|
|
2501
|
-
reply: { text: "āļø Usage: /activation mention|always" }
|
|
2502
|
-
};
|
|
2503
|
-
if (params.sessionEntry && params.sessionStore && params.sessionKey) {
|
|
2504
|
-
params.sessionEntry.groupActivation = activationCommand.mode;
|
|
2505
|
-
params.sessionEntry.groupActivationNeedsSystemIntro = true;
|
|
2506
|
-
await persistSessionEntry(params);
|
|
2507
|
-
}
|
|
2508
|
-
return {
|
|
2509
|
-
shouldContinue: false,
|
|
2510
|
-
reply: { text: `āļø Group activation set to ${activationCommand.mode}.` }
|
|
2511
|
-
};
|
|
2512
|
-
};
|
|
2513
|
-
const handleSendPolicyCommand = async (params, allowTextCommands) => {
|
|
2514
|
-
if (!allowTextCommands) return null;
|
|
2515
|
-
const sendPolicyCommand = parseSendPolicyCommand(params.command.commandBodyNormalized);
|
|
2516
|
-
if (!sendPolicyCommand.hasCommand) return null;
|
|
2517
|
-
const unauthorizedResult = rejectUnauthorizedCommand(params, "/send");
|
|
2518
|
-
if (unauthorizedResult) return unauthorizedResult;
|
|
2519
|
-
const nonOwnerResult = rejectNonOwnerCommand(params, "/send");
|
|
2520
|
-
if (nonOwnerResult) return nonOwnerResult;
|
|
2521
|
-
if (!sendPolicyCommand.mode) return {
|
|
2522
|
-
shouldContinue: false,
|
|
2523
|
-
reply: { text: "āļø Usage: /send on|off|inherit" }
|
|
2524
|
-
};
|
|
2525
|
-
if (params.sessionEntry && params.sessionStore && params.sessionKey) {
|
|
2526
|
-
if (sendPolicyCommand.mode === "inherit") delete params.sessionEntry.sendPolicy;
|
|
2527
|
-
else params.sessionEntry.sendPolicy = sendPolicyCommand.mode;
|
|
2528
|
-
await persistSessionEntry(params);
|
|
2529
|
-
}
|
|
2530
|
-
return {
|
|
2531
|
-
shouldContinue: false,
|
|
2532
|
-
reply: { text: `āļø Send policy set to ${sendPolicyCommand.mode === "inherit" ? "inherit" : sendPolicyCommand.mode === "allow" ? "on" : "off"}.` }
|
|
2533
|
-
};
|
|
2534
|
-
};
|
|
2535
|
-
const handleUsageCommand = async (params, allowTextCommands) => {
|
|
2536
|
-
if (!allowTextCommands) return null;
|
|
2537
|
-
const normalized = params.command.commandBodyNormalized;
|
|
2538
|
-
if (normalized !== "/usage" && !normalized.startsWith("/usage ")) return null;
|
|
2539
|
-
if (!params.command.isAuthorizedSender) {
|
|
2540
|
-
logVerbose(`Ignoring /usage from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
2541
|
-
return { shouldContinue: false };
|
|
2542
|
-
}
|
|
2543
|
-
const rawArgs = normalized === "/usage" ? "" : normalized.slice(6).trim();
|
|
2544
|
-
const requested = rawArgs ? normalizeUsageDisplay(rawArgs) : void 0;
|
|
2545
|
-
if (rawArgs.toLowerCase().startsWith("cost")) {
|
|
2546
|
-
const sessionSummary = await loadSessionCostSummary({
|
|
2547
|
-
sessionId: params.sessionEntry?.sessionId,
|
|
2548
|
-
sessionEntry: params.sessionEntry,
|
|
2549
|
-
sessionFile: params.sessionEntry?.sessionFile,
|
|
2550
|
-
config: params.cfg,
|
|
2551
|
-
agentId: params.agentId
|
|
2552
|
-
});
|
|
2553
|
-
const summary = await loadCostUsageSummary({
|
|
2554
|
-
days: 30,
|
|
2555
|
-
config: params.cfg
|
|
2556
|
-
});
|
|
2557
|
-
const sessionCost = formatUsd(sessionSummary?.totalCost);
|
|
2558
|
-
const sessionTokens = sessionSummary?.totalTokens ? formatTokenCount$1(sessionSummary.totalTokens) : void 0;
|
|
2559
|
-
const sessionSuffix = (sessionSummary?.missingCostEntries ?? 0) > 0 ? " (partial)" : "";
|
|
2560
|
-
const sessionLine = sessionCost || sessionTokens ? `Session ${sessionCost ?? "n/a"}${sessionSuffix}${sessionTokens ? ` Ā· ${sessionTokens} tokens` : ""}` : "Session n/a";
|
|
2561
|
-
const todayKey = (/* @__PURE__ */ new Date()).toLocaleDateString("en-CA");
|
|
2562
|
-
const todayEntry = summary.daily.find((entry) => entry.date === todayKey);
|
|
2563
|
-
const todayCost = formatUsd(todayEntry?.totalCost);
|
|
2564
|
-
const todaySuffix = (todayEntry?.missingCostEntries ?? 0) > 0 ? " (partial)" : "";
|
|
2565
|
-
const todayLine = `Today ${todayCost ?? "n/a"}${todaySuffix}`;
|
|
2566
|
-
const last30Cost = formatUsd(summary.totals.totalCost);
|
|
2567
|
-
const last30Suffix = summary.totals.missingCostEntries > 0 ? " (partial)" : "";
|
|
2568
|
-
return {
|
|
2569
|
-
shouldContinue: false,
|
|
2570
|
-
reply: { text: `šø Usage cost\n${sessionLine}\n${todayLine}\n${`Last 30d ${last30Cost ?? "n/a"}${last30Suffix}`}` }
|
|
2571
|
-
};
|
|
2572
|
-
}
|
|
2573
|
-
if (rawArgs && !requested) return {
|
|
2574
|
-
shouldContinue: false,
|
|
2575
|
-
reply: { text: "āļø Usage: /usage off|tokens|full|cost" }
|
|
2576
|
-
};
|
|
2577
|
-
const current = resolveResponseUsageMode(params.sessionEntry?.responseUsage ?? (params.sessionKey ? params.sessionStore?.[params.sessionKey]?.responseUsage : void 0));
|
|
2578
|
-
const next = requested ?? (current === "off" ? "tokens" : current === "tokens" ? "full" : "off");
|
|
2579
|
-
if (params.sessionEntry && params.sessionStore && params.sessionKey) {
|
|
2580
|
-
if (next === "off") delete params.sessionEntry.responseUsage;
|
|
2581
|
-
else params.sessionEntry.responseUsage = next;
|
|
2582
|
-
await persistSessionEntry(params);
|
|
2583
|
-
}
|
|
2584
|
-
return {
|
|
2585
|
-
shouldContinue: false,
|
|
2586
|
-
reply: { text: `āļø Usage footer: ${next}.` }
|
|
2587
|
-
};
|
|
2588
|
-
};
|
|
2589
|
-
const handleFastCommand = async (params, allowTextCommands) => {
|
|
2590
|
-
if (!allowTextCommands) return null;
|
|
2591
|
-
const normalized = params.command.commandBodyNormalized;
|
|
2592
|
-
if (normalized !== "/fast" && !normalized.startsWith("/fast ")) return null;
|
|
2593
|
-
if (!params.command.isAuthorizedSender) {
|
|
2594
|
-
logVerbose(`Ignoring /fast from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
2595
|
-
return { shouldContinue: false };
|
|
2596
|
-
}
|
|
2597
|
-
const rawMode = (normalized === "/fast" ? "" : normalized.slice(5).trim()).toLowerCase();
|
|
2598
|
-
if (!rawMode || rawMode === "status") {
|
|
2599
|
-
const state = resolveFastModeState({
|
|
2600
|
-
cfg: params.cfg,
|
|
2601
|
-
provider: params.provider,
|
|
2602
|
-
model: params.model,
|
|
2603
|
-
agentId: params.agentId,
|
|
2604
|
-
sessionEntry: params.sessionEntry
|
|
2605
|
-
});
|
|
2606
|
-
const suffix = state.source === "agent" ? " (agent)" : state.source === "config" ? " (config)" : state.source === "default" ? " (default)" : "";
|
|
2607
|
-
return {
|
|
2608
|
-
shouldContinue: false,
|
|
2609
|
-
reply: { text: `āļø Current fast mode: ${state.enabled ? "on" : "off"}${suffix}.` }
|
|
2610
|
-
};
|
|
2611
|
-
}
|
|
2612
|
-
const nextMode = normalizeFastMode(rawMode);
|
|
2613
|
-
if (nextMode === void 0) return {
|
|
2614
|
-
shouldContinue: false,
|
|
2615
|
-
reply: { text: "āļø Usage: /fast status|on|off" }
|
|
2616
|
-
};
|
|
2617
|
-
if (params.sessionEntry && params.sessionStore && params.sessionKey) {
|
|
2618
|
-
params.sessionEntry.fastMode = nextMode;
|
|
2619
|
-
await persistSessionEntry(params);
|
|
2620
|
-
}
|
|
2621
|
-
return {
|
|
2622
|
-
shouldContinue: false,
|
|
2623
|
-
reply: { text: `āļø Fast mode ${nextMode ? "enabled" : "disabled"}.` }
|
|
2624
|
-
};
|
|
2625
|
-
};
|
|
2626
|
-
const handleSessionCommand = async (params, allowTextCommands) => {
|
|
2627
|
-
if (!allowTextCommands) return null;
|
|
2628
|
-
const normalized = params.command.commandBodyNormalized;
|
|
2629
|
-
if (!/^\/session(?:\s|$)/.test(normalized)) return null;
|
|
2630
|
-
if (!params.command.isAuthorizedSender) {
|
|
2631
|
-
logVerbose(`Ignoring /session from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
2632
|
-
return { shouldContinue: false };
|
|
2633
|
-
}
|
|
2634
|
-
const tokens = normalized.slice(8).trim().split(/\s+/).filter(Boolean);
|
|
2635
|
-
const action = tokens[0]?.toLowerCase();
|
|
2636
|
-
if (action !== SESSION_ACTION_IDLE && action !== SESSION_ACTION_MAX_AGE) return {
|
|
2637
|
-
shouldContinue: false,
|
|
2638
|
-
reply: { text: resolveSessionCommandUsage() }
|
|
2639
|
-
};
|
|
2640
|
-
const onDiscord = isDiscordSurface(params);
|
|
2641
|
-
const onMatrix = isMatrixSurface(params);
|
|
2642
|
-
const onTelegram = isTelegramSurface(params);
|
|
2643
|
-
if (!onDiscord && !onMatrix && !onTelegram) return {
|
|
2644
|
-
shouldContinue: false,
|
|
2645
|
-
reply: { text: "ā ļø /session idle and /session max-age are currently available for Discord, Matrix, and Telegram bound sessions." }
|
|
2646
|
-
};
|
|
2647
|
-
const accountId = resolveChannelAccountId(params);
|
|
2648
|
-
const sessionBindingService = getSessionBindingService();
|
|
2649
|
-
const threadId = params.ctx.MessageThreadId != null ? String(params.ctx.MessageThreadId).trim() : "";
|
|
2650
|
-
const matrixConversationId = onMatrix ? resolveMatrixConversationId({
|
|
2651
|
-
ctx: {
|
|
2652
|
-
MessageThreadId: params.ctx.MessageThreadId,
|
|
2653
|
-
OriginatingTo: params.ctx.OriginatingTo,
|
|
2654
|
-
To: params.ctx.To
|
|
2655
|
-
},
|
|
2656
|
-
command: { to: params.command.to }
|
|
2657
|
-
}) : void 0;
|
|
2658
|
-
const matrixParentConversationId = onMatrix ? resolveMatrixParentConversationId({
|
|
2659
|
-
ctx: {
|
|
2660
|
-
MessageThreadId: params.ctx.MessageThreadId,
|
|
2661
|
-
OriginatingTo: params.ctx.OriginatingTo,
|
|
2662
|
-
To: params.ctx.To
|
|
2663
|
-
},
|
|
2664
|
-
command: { to: params.command.to }
|
|
2665
|
-
}) : void 0;
|
|
2666
|
-
const telegramConversationId = onTelegram ? resolveTelegramConversationId(params) : void 0;
|
|
2667
|
-
const channelRuntime = getChannelRuntime();
|
|
2668
|
-
const discordManager = onDiscord ? channelRuntime.discord.threadBindings.getManager(accountId) : null;
|
|
2669
|
-
if (onDiscord && !discordManager) return {
|
|
2670
|
-
shouldContinue: false,
|
|
2671
|
-
reply: { text: "ā ļø Discord thread bindings are unavailable for this account." }
|
|
2672
|
-
};
|
|
2673
|
-
const discordBinding = onDiscord && threadId ? discordManager?.getByThreadId(threadId) : void 0;
|
|
2674
|
-
const telegramBinding = onTelegram && telegramConversationId ? sessionBindingService.resolveByConversation({
|
|
2675
|
-
channel: "telegram",
|
|
2676
|
-
accountId,
|
|
2677
|
-
conversationId: telegramConversationId
|
|
2678
|
-
}) : null;
|
|
2679
|
-
const matrixBinding = onMatrix && matrixConversationId ? sessionBindingService.resolveByConversation({
|
|
2680
|
-
channel: "matrix",
|
|
2681
|
-
accountId,
|
|
2682
|
-
conversationId: matrixConversationId,
|
|
2683
|
-
...matrixParentConversationId && matrixParentConversationId !== matrixConversationId ? { parentConversationId: matrixParentConversationId } : {}
|
|
2684
|
-
}) : null;
|
|
2685
|
-
if (onDiscord && !discordBinding) {
|
|
2686
|
-
if (onDiscord && !threadId) return {
|
|
2687
|
-
shouldContinue: false,
|
|
2688
|
-
reply: { text: "ā ļø /session idle and /session max-age must be run inside a focused Discord thread." }
|
|
2689
|
-
};
|
|
2690
|
-
return {
|
|
2691
|
-
shouldContinue: false,
|
|
2692
|
-
reply: { text: "ā¹ļø This thread is not currently focused." }
|
|
2693
|
-
};
|
|
2694
|
-
}
|
|
2695
|
-
if (onMatrix && !matrixBinding) {
|
|
2696
|
-
if (!threadId) return {
|
|
2697
|
-
shouldContinue: false,
|
|
2698
|
-
reply: { text: "ā ļø /session idle and /session max-age must be run inside a focused Matrix thread." }
|
|
2699
|
-
};
|
|
2700
|
-
return {
|
|
2701
|
-
shouldContinue: false,
|
|
2702
|
-
reply: { text: "ā¹ļø This thread is not currently focused." }
|
|
2703
|
-
};
|
|
2704
|
-
}
|
|
2705
|
-
if (onTelegram && !telegramBinding) {
|
|
2706
|
-
if (!telegramConversationId) return {
|
|
2707
|
-
shouldContinue: false,
|
|
2708
|
-
reply: { text: "ā ļø /session idle and /session max-age on Telegram require a topic context in groups, or a direct-message conversation." }
|
|
2709
|
-
};
|
|
2710
|
-
return {
|
|
2711
|
-
shouldContinue: false,
|
|
2712
|
-
reply: { text: "ā¹ļø This conversation is not currently focused." }
|
|
2713
|
-
};
|
|
2714
|
-
}
|
|
2715
|
-
const idleTimeoutMs = onDiscord ? channelRuntime.discord.threadBindings.resolveIdleTimeoutMs({
|
|
2716
|
-
record: discordBinding,
|
|
2717
|
-
defaultIdleTimeoutMs: discordManager.getIdleTimeoutMs()
|
|
2718
|
-
}) : resolveSessionBindingDurationMs(onMatrix ? matrixBinding : telegramBinding, "idleTimeoutMs", 1440 * 60 * 1e3);
|
|
2719
|
-
const idleExpiresAt = onDiscord ? channelRuntime.discord.threadBindings.resolveInactivityExpiresAt({
|
|
2720
|
-
record: discordBinding,
|
|
2721
|
-
defaultIdleTimeoutMs: discordManager.getIdleTimeoutMs()
|
|
2722
|
-
}) : idleTimeoutMs > 0 ? resolveSessionBindingLastActivityAt(onMatrix ? matrixBinding : telegramBinding) + idleTimeoutMs : void 0;
|
|
2723
|
-
const maxAgeMs = onDiscord ? channelRuntime.discord.threadBindings.resolveMaxAgeMs({
|
|
2724
|
-
record: discordBinding,
|
|
2725
|
-
defaultMaxAgeMs: discordManager.getMaxAgeMs()
|
|
2726
|
-
}) : resolveSessionBindingDurationMs(onMatrix ? matrixBinding : telegramBinding, "maxAgeMs", 0);
|
|
2727
|
-
const maxAgeExpiresAt = onDiscord ? channelRuntime.discord.threadBindings.resolveMaxAgeExpiresAt({
|
|
2728
|
-
record: discordBinding,
|
|
2729
|
-
defaultMaxAgeMs: discordManager.getMaxAgeMs()
|
|
2730
|
-
}) : maxAgeMs > 0 ? (onMatrix ? matrixBinding : telegramBinding).boundAt + maxAgeMs : void 0;
|
|
2731
|
-
const durationArgRaw = tokens.slice(1).join("");
|
|
2732
|
-
if (!durationArgRaw) {
|
|
2733
|
-
if (action === SESSION_ACTION_IDLE) {
|
|
2734
|
-
if (typeof idleExpiresAt === "number" && Number.isFinite(idleExpiresAt) && idleExpiresAt > Date.now()) return {
|
|
2735
|
-
shouldContinue: false,
|
|
2736
|
-
reply: { text: `ā¹ļø Idle timeout active (${formatThreadBindingDurationLabel(idleTimeoutMs)}, next auto-unfocus at ${formatSessionExpiry(idleExpiresAt)}).` }
|
|
2737
|
-
};
|
|
2738
|
-
return {
|
|
2739
|
-
shouldContinue: false,
|
|
2740
|
-
reply: { text: "ā¹ļø Idle timeout is currently disabled for this focused session." }
|
|
2741
|
-
};
|
|
2742
|
-
}
|
|
2743
|
-
if (typeof maxAgeExpiresAt === "number" && Number.isFinite(maxAgeExpiresAt) && maxAgeExpiresAt > Date.now()) return {
|
|
2744
|
-
shouldContinue: false,
|
|
2745
|
-
reply: { text: `ā¹ļø Max age active (${formatThreadBindingDurationLabel(maxAgeMs)}, hard auto-unfocus at ${formatSessionExpiry(maxAgeExpiresAt)}).` }
|
|
2746
|
-
};
|
|
2747
|
-
return {
|
|
2748
|
-
shouldContinue: false,
|
|
2749
|
-
reply: { text: "ā¹ļø Max age is currently disabled for this focused session." }
|
|
2750
|
-
};
|
|
2751
|
-
}
|
|
2752
|
-
const senderId = params.command.senderId?.trim() || "";
|
|
2753
|
-
const boundBy = onDiscord ? discordBinding.boundBy : resolveSessionBindingBoundBy(onMatrix ? matrixBinding : telegramBinding);
|
|
2754
|
-
if (boundBy && boundBy !== "system" && senderId && senderId !== boundBy) return {
|
|
2755
|
-
shouldContinue: false,
|
|
2756
|
-
reply: { text: onDiscord ? `ā ļø Only ${boundBy} can update session lifecycle settings for this thread.` : onMatrix ? `ā ļø Only ${boundBy} can update session lifecycle settings for this thread.` : `ā ļø Only ${boundBy} can update session lifecycle settings for this conversation.` }
|
|
2757
|
-
};
|
|
2758
|
-
let durationMs;
|
|
2759
|
-
try {
|
|
2760
|
-
durationMs = parseSessionDurationMs(durationArgRaw);
|
|
2761
|
-
} catch {
|
|
2762
|
-
return {
|
|
2763
|
-
shouldContinue: false,
|
|
2764
|
-
reply: { text: resolveSessionCommandUsage() }
|
|
2765
|
-
};
|
|
2766
|
-
}
|
|
2767
|
-
const updatedBindings = (() => {
|
|
2768
|
-
if (onDiscord) return action === SESSION_ACTION_IDLE ? channelRuntime.discord.threadBindings.setIdleTimeoutBySessionKey({
|
|
2769
|
-
targetSessionKey: discordBinding.targetSessionKey,
|
|
2770
|
-
accountId,
|
|
2771
|
-
idleTimeoutMs: durationMs
|
|
2772
|
-
}) : channelRuntime.discord.threadBindings.setMaxAgeBySessionKey({
|
|
2773
|
-
targetSessionKey: discordBinding.targetSessionKey,
|
|
2774
|
-
accountId,
|
|
2775
|
-
maxAgeMs: durationMs
|
|
2776
|
-
});
|
|
2777
|
-
if (onMatrix) return action === SESSION_ACTION_IDLE ? channelRuntime.matrix.threadBindings.setIdleTimeoutBySessionKey({
|
|
2778
|
-
targetSessionKey: matrixBinding.targetSessionKey,
|
|
2779
|
-
accountId,
|
|
2780
|
-
idleTimeoutMs: durationMs
|
|
2781
|
-
}) : channelRuntime.matrix.threadBindings.setMaxAgeBySessionKey({
|
|
2782
|
-
targetSessionKey: matrixBinding.targetSessionKey,
|
|
2783
|
-
accountId,
|
|
2784
|
-
maxAgeMs: durationMs
|
|
2785
|
-
});
|
|
2786
|
-
return action === SESSION_ACTION_IDLE ? channelRuntime.threadBindings.setIdleTimeoutBySessionKey({
|
|
2787
|
-
channelId: "telegram",
|
|
2788
|
-
targetSessionKey: telegramBinding.targetSessionKey,
|
|
2789
|
-
accountId,
|
|
2790
|
-
idleTimeoutMs: durationMs
|
|
2791
|
-
}) : channelRuntime.threadBindings.setMaxAgeBySessionKey({
|
|
2792
|
-
channelId: "telegram",
|
|
2793
|
-
targetSessionKey: telegramBinding.targetSessionKey,
|
|
2794
|
-
accountId,
|
|
2795
|
-
maxAgeMs: durationMs
|
|
2796
|
-
});
|
|
2797
|
-
})();
|
|
2798
|
-
if (updatedBindings.length === 0) return {
|
|
2799
|
-
shouldContinue: false,
|
|
2800
|
-
reply: { text: action === SESSION_ACTION_IDLE ? "ā ļø Failed to update idle timeout for the current binding." : "ā ļø Failed to update max age for the current binding." }
|
|
2801
|
-
};
|
|
2802
|
-
if (durationMs <= 0) return {
|
|
2803
|
-
shouldContinue: false,
|
|
2804
|
-
reply: { text: action === SESSION_ACTION_IDLE ? `ā
Idle timeout disabled for ${updatedBindings.length} binding${updatedBindings.length === 1 ? "" : "s"}.` : `ā
Max age disabled for ${updatedBindings.length} binding${updatedBindings.length === 1 ? "" : "s"}.` }
|
|
2805
|
-
};
|
|
2806
|
-
const nextExpiry = resolveUpdatedBindingExpiry({
|
|
2807
|
-
action,
|
|
2808
|
-
bindings: updatedBindings.map((binding) => toUpdatedLifecycleBinding(binding))
|
|
2809
|
-
});
|
|
2810
|
-
const expiryLabel = typeof nextExpiry === "number" && Number.isFinite(nextExpiry) ? formatSessionExpiry(nextExpiry) : "n/a";
|
|
2811
|
-
return {
|
|
2812
|
-
shouldContinue: false,
|
|
2813
|
-
reply: { text: action === SESSION_ACTION_IDLE ? `ā
Idle timeout set to ${formatThreadBindingDurationLabel(durationMs)} for ${updatedBindings.length} binding${updatedBindings.length === 1 ? "" : "s"} (next auto-unfocus at ${expiryLabel}).` : `ā
Max age set to ${formatThreadBindingDurationLabel(durationMs)} for ${updatedBindings.length} binding${updatedBindings.length === 1 ? "" : "s"} (hard auto-unfocus at ${expiryLabel}).` }
|
|
2814
|
-
};
|
|
2815
|
-
};
|
|
2816
|
-
const handleRestartCommand = async (params, allowTextCommands) => {
|
|
2817
|
-
if (!allowTextCommands) return null;
|
|
2818
|
-
if (params.command.commandBodyNormalized !== "/restart") return null;
|
|
2819
|
-
if (!params.command.isAuthorizedSender) {
|
|
2820
|
-
logVerbose(`Ignoring /restart from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
2821
|
-
return { shouldContinue: false };
|
|
2822
|
-
}
|
|
2823
|
-
if (!isRestartEnabled(params.cfg)) return {
|
|
2824
|
-
shouldContinue: false,
|
|
2825
|
-
reply: { text: "ā ļø /restart is disabled (commands.restart=false)." }
|
|
2826
|
-
};
|
|
2827
|
-
if (process.listenerCount("SIGUSR1") > 0) {
|
|
2828
|
-
scheduleGatewaySigusr1Restart({ reason: "/restart" });
|
|
2829
|
-
return {
|
|
2830
|
-
shouldContinue: false,
|
|
2831
|
-
reply: { text: "āļø Restarting StableClaw in-process (SIGUSR1); back in a few seconds." }
|
|
2832
|
-
};
|
|
2833
|
-
}
|
|
2834
|
-
const restartMethod = triggerStableClawRestart();
|
|
2835
|
-
if (!restartMethod.ok) {
|
|
2836
|
-
const detail = restartMethod.detail ? ` Details: ${restartMethod.detail}` : "";
|
|
2837
|
-
return {
|
|
2838
|
-
shouldContinue: false,
|
|
2839
|
-
reply: { text: `ā ļø Restart failed (${restartMethod.method}).${detail}` }
|
|
2840
|
-
};
|
|
2841
|
-
}
|
|
2842
|
-
return {
|
|
2843
|
-
shouldContinue: false,
|
|
2844
|
-
reply: { text: `āļø Restarting OpenClaw via ${restartMethod.method}; give me a few seconds to come back online.` }
|
|
2845
|
-
};
|
|
2846
|
-
};
|
|
2847
|
-
//#endregion
|
|
2848
|
-
//#region src/auto-reply/reply/commands-subagents/action-agents.ts
|
|
2849
|
-
function formatConversationBindingText(params) {
|
|
2850
|
-
if (params.channel === "discord" || params.channel === "matrix") return `thread:${params.conversationId}`;
|
|
2851
|
-
if (params.channel === "telegram") return `conversation:${params.conversationId}`;
|
|
2852
|
-
return `binding:${params.conversationId}`;
|
|
2853
|
-
}
|
|
2854
|
-
function handleSubagentsAgentsAction(ctx) {
|
|
2855
|
-
const { params, requesterKey, runs } = ctx;
|
|
2856
|
-
const channel = resolveCommandSurfaceChannel(params);
|
|
2857
|
-
const accountId = resolveChannelAccountId(params);
|
|
2858
|
-
const bindingService = getSessionBindingService();
|
|
2859
|
-
const bindingsBySession = /* @__PURE__ */ new Map();
|
|
2860
|
-
const resolveSessionBindings = (sessionKey) => {
|
|
2861
|
-
const cached = bindingsBySession.get(sessionKey);
|
|
2862
|
-
if (cached) return cached;
|
|
2863
|
-
const resolved = bindingService.listBySession(sessionKey).filter((entry) => entry.status === "active" && entry.conversation.channel === channel && entry.conversation.accountId === accountId);
|
|
2864
|
-
bindingsBySession.set(sessionKey, resolved);
|
|
2865
|
-
return resolved;
|
|
2866
|
-
};
|
|
2867
|
-
const dedupedRuns = [];
|
|
2868
|
-
const seenChildSessionKeys = /* @__PURE__ */ new Set();
|
|
2869
|
-
for (const entry of sortSubagentRuns(runs)) {
|
|
2870
|
-
if (seenChildSessionKeys.has(entry.childSessionKey)) continue;
|
|
2871
|
-
seenChildSessionKeys.add(entry.childSessionKey);
|
|
2872
|
-
dedupedRuns.push(entry);
|
|
2873
|
-
}
|
|
2874
|
-
const recentCutoff = Date.now() - 30 * 6e4;
|
|
2875
|
-
const numericOrder = [...dedupedRuns.filter((entry) => !entry.endedAt || countPendingDescendantRuns(entry.childSessionKey) > 0), ...dedupedRuns.filter((entry) => entry.endedAt && countPendingDescendantRuns(entry.childSessionKey) === 0 && entry.endedAt >= recentCutoff)];
|
|
2876
|
-
const indexByChildSessionKey = new Map(numericOrder.map((entry, idx) => [entry.childSessionKey, idx + 1]));
|
|
2877
|
-
const visibleRuns = [];
|
|
2878
|
-
for (const entry of dedupedRuns) {
|
|
2879
|
-
if (!(!entry.endedAt || countPendingDescendantRuns(entry.childSessionKey) > 0 || resolveSessionBindings(entry.childSessionKey).length > 0)) continue;
|
|
2880
|
-
visibleRuns.push(entry);
|
|
2881
|
-
}
|
|
2882
|
-
const lines = ["agents:", "-----"];
|
|
2883
|
-
if (visibleRuns.length === 0) lines.push("(none)");
|
|
2884
|
-
else for (const entry of visibleRuns) {
|
|
2885
|
-
const binding = resolveSessionBindings(entry.childSessionKey)[0];
|
|
2886
|
-
const bindingText = binding ? formatConversationBindingText({
|
|
2887
|
-
channel,
|
|
2888
|
-
conversationId: binding.conversation.conversationId
|
|
2889
|
-
}) : channel === "discord" || channel === "telegram" || channel === "matrix" ? "unbound" : "bindings available on discord/telegram";
|
|
2890
|
-
const resolvedIndex = indexByChildSessionKey.get(entry.childSessionKey);
|
|
2891
|
-
const prefix = resolvedIndex ? `${resolvedIndex}.` : "-";
|
|
2892
|
-
lines.push(`${prefix} ${formatRunLabel(entry)} (${bindingText})`);
|
|
2893
|
-
}
|
|
2894
|
-
const requesterBindings = resolveSessionBindings(requesterKey).filter((entry) => entry.targetKind === "session");
|
|
2895
|
-
if (requesterBindings.length > 0) {
|
|
2896
|
-
lines.push("", "acp/session bindings:", "-----");
|
|
2897
|
-
for (const binding of requesterBindings) {
|
|
2898
|
-
const label = typeof binding.metadata?.label === "string" && binding.metadata.label.trim() ? binding.metadata.label.trim() : binding.targetSessionKey;
|
|
2899
|
-
lines.push(`- ${label} (${formatConversationBindingText({
|
|
2900
|
-
channel,
|
|
2901
|
-
conversationId: binding.conversation.conversationId
|
|
2902
|
-
})}, session:${binding.targetSessionKey})`);
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
return stopWithText(lines.join("\n"));
|
|
2906
|
-
}
|
|
2907
|
-
//#endregion
|
|
2908
|
-
//#region src/auto-reply/reply/commands-subagents/action-focus.ts
|
|
2909
|
-
function resolveFocusBindingContext(params) {
|
|
2910
|
-
if (isDiscordSurface(params)) {
|
|
2911
|
-
const currentThreadId = params.ctx.MessageThreadId != null ? String(params.ctx.MessageThreadId).trim() : "";
|
|
2912
|
-
const parentChannelId = currentThreadId ? void 0 : resolveDiscordChannelIdForFocus(params);
|
|
2913
|
-
const conversationId = currentThreadId || parentChannelId;
|
|
2914
|
-
if (!conversationId) return null;
|
|
2915
|
-
return {
|
|
2916
|
-
channel: "discord",
|
|
2917
|
-
accountId: resolveChannelAccountId(params),
|
|
2918
|
-
conversationId,
|
|
2919
|
-
placement: currentThreadId ? "current" : "child",
|
|
2920
|
-
labelNoun: "thread"
|
|
2921
|
-
};
|
|
2922
|
-
}
|
|
2923
|
-
if (isTelegramSurface(params)) {
|
|
2924
|
-
const conversationId = resolveTelegramConversationId(params);
|
|
2925
|
-
if (!conversationId) return null;
|
|
2926
|
-
return {
|
|
2927
|
-
channel: "telegram",
|
|
2928
|
-
accountId: resolveChannelAccountId(params),
|
|
2929
|
-
conversationId,
|
|
2930
|
-
placement: "current",
|
|
2931
|
-
labelNoun: "conversation"
|
|
2932
|
-
};
|
|
2933
|
-
}
|
|
2934
|
-
if (isMatrixSurface(params)) {
|
|
2935
|
-
const conversationId = resolveMatrixConversationId({
|
|
2936
|
-
ctx: {
|
|
2937
|
-
MessageThreadId: params.ctx.MessageThreadId,
|
|
2938
|
-
OriginatingTo: params.ctx.OriginatingTo,
|
|
2939
|
-
To: params.ctx.To
|
|
2940
|
-
},
|
|
2941
|
-
command: { to: params.command.to }
|
|
2942
|
-
});
|
|
2943
|
-
if (!conversationId) return null;
|
|
2944
|
-
const parentConversationId = resolveMatrixParentConversationId({
|
|
2945
|
-
ctx: {
|
|
2946
|
-
MessageThreadId: params.ctx.MessageThreadId,
|
|
2947
|
-
OriginatingTo: params.ctx.OriginatingTo,
|
|
2948
|
-
To: params.ctx.To
|
|
2949
|
-
},
|
|
2950
|
-
command: { to: params.command.to }
|
|
2951
|
-
});
|
|
2952
|
-
const currentThreadId = params.ctx.MessageThreadId != null ? String(params.ctx.MessageThreadId).trim() : "";
|
|
2953
|
-
return {
|
|
2954
|
-
channel: "matrix",
|
|
2955
|
-
accountId: resolveChannelAccountId(params),
|
|
2956
|
-
conversationId,
|
|
2957
|
-
...parentConversationId ? { parentConversationId } : {},
|
|
2958
|
-
placement: currentThreadId ? "current" : "child",
|
|
2959
|
-
labelNoun: "thread"
|
|
2960
|
-
};
|
|
2961
|
-
}
|
|
2962
|
-
return null;
|
|
2963
|
-
}
|
|
2964
|
-
async function handleSubagentsFocusAction(ctx) {
|
|
2965
|
-
const { params, runs, restTokens } = ctx;
|
|
2966
|
-
const channel = resolveCommandSurfaceChannel(params);
|
|
2967
|
-
if (channel !== "discord" && channel !== "matrix" && channel !== "telegram") return stopWithText("ā ļø /focus is only available on Discord, Matrix, and Telegram.");
|
|
2968
|
-
const token = restTokens.join(" ").trim();
|
|
2969
|
-
if (!token) return stopWithText("Usage: /focus <subagent-label|session-key|session-id|session-label>");
|
|
2970
|
-
const accountId = resolveChannelAccountId(params);
|
|
2971
|
-
const bindingService = getSessionBindingService();
|
|
2972
|
-
const capabilities = bindingService.getCapabilities({
|
|
2973
|
-
channel,
|
|
2974
|
-
accountId
|
|
2975
|
-
});
|
|
2976
|
-
if (!capabilities.adapterAvailable || !capabilities.bindSupported) return stopWithText(`ā ļø ${channel === "discord" ? "Discord thread" : channel === "matrix" ? "Matrix thread" : "Telegram conversation"} bindings are unavailable for this account.`);
|
|
2977
|
-
const focusTarget = await resolveFocusTargetSession({
|
|
2978
|
-
runs,
|
|
2979
|
-
token
|
|
2980
|
-
});
|
|
2981
|
-
if (!focusTarget) return stopWithText(`ā ļø Unable to resolve focus target: ${token}`);
|
|
2982
|
-
const bindingContext = resolveFocusBindingContext(params);
|
|
2983
|
-
if (!bindingContext) {
|
|
2984
|
-
if (channel === "telegram") return stopWithText("ā ļø /focus on Telegram requires a topic context in groups, or a direct-message conversation.");
|
|
2985
|
-
if (channel === "matrix") return stopWithText("ā ļø Could not resolve a Matrix room for /focus.");
|
|
2986
|
-
return stopWithText("ā ļø Could not resolve a Discord channel for /focus.");
|
|
2987
|
-
}
|
|
2988
|
-
if (channel === "matrix") {
|
|
2989
|
-
const spawnPolicy = resolveThreadBindingSpawnPolicy({
|
|
2990
|
-
cfg: params.cfg,
|
|
2991
|
-
channel,
|
|
2992
|
-
accountId: bindingContext.accountId,
|
|
2993
|
-
kind: "subagent"
|
|
2994
|
-
});
|
|
2995
|
-
if (!spawnPolicy.enabled) return stopWithText(`ā ļø ${formatThreadBindingDisabledError({
|
|
2996
|
-
channel: spawnPolicy.channel,
|
|
2997
|
-
accountId: spawnPolicy.accountId,
|
|
2998
|
-
kind: "subagent"
|
|
2999
|
-
})}`);
|
|
3000
|
-
if (bindingContext.placement === "child" && !spawnPolicy.spawnEnabled) return stopWithText(`ā ļø ${formatThreadBindingSpawnDisabledError({
|
|
3001
|
-
channel: spawnPolicy.channel,
|
|
3002
|
-
accountId: spawnPolicy.accountId,
|
|
3003
|
-
kind: "subagent"
|
|
3004
|
-
})}`);
|
|
3005
|
-
}
|
|
3006
|
-
const senderId = params.command.senderId?.trim() || "";
|
|
3007
|
-
const existingBinding = bindingService.resolveByConversation({
|
|
3008
|
-
channel: bindingContext.channel,
|
|
3009
|
-
accountId: bindingContext.accountId,
|
|
3010
|
-
conversationId: bindingContext.conversationId,
|
|
3011
|
-
...bindingContext.parentConversationId && bindingContext.parentConversationId !== bindingContext.conversationId ? { parentConversationId: bindingContext.parentConversationId } : {}
|
|
3012
|
-
});
|
|
3013
|
-
const boundBy = typeof existingBinding?.metadata?.boundBy === "string" ? existingBinding.metadata.boundBy.trim() : "";
|
|
3014
|
-
if (existingBinding && boundBy && boundBy !== "system" && senderId && senderId !== boundBy) return stopWithText(`ā ļø Only ${boundBy} can refocus this ${bindingContext.labelNoun}.`);
|
|
3015
|
-
const label = focusTarget.label || token;
|
|
3016
|
-
const acpMeta = focusTarget.targetKind === "acp" ? readAcpSessionEntry({
|
|
3017
|
-
cfg: params.cfg,
|
|
3018
|
-
sessionKey: focusTarget.targetSessionKey
|
|
3019
|
-
})?.acp : void 0;
|
|
3020
|
-
if (!capabilities.placements.includes(bindingContext.placement)) return stopWithText(`ā ļø ${channel} bindings are unavailable for this account.`);
|
|
3021
|
-
let binding;
|
|
3022
|
-
try {
|
|
3023
|
-
binding = await bindingService.bind({
|
|
3024
|
-
targetSessionKey: focusTarget.targetSessionKey,
|
|
3025
|
-
targetKind: focusTarget.targetKind === "acp" ? "session" : "subagent",
|
|
3026
|
-
conversation: {
|
|
3027
|
-
channel: bindingContext.channel,
|
|
3028
|
-
accountId: bindingContext.accountId,
|
|
3029
|
-
conversationId: bindingContext.conversationId,
|
|
3030
|
-
...bindingContext.parentConversationId && bindingContext.parentConversationId !== bindingContext.conversationId ? { parentConversationId: bindingContext.parentConversationId } : {}
|
|
3031
|
-
},
|
|
3032
|
-
placement: bindingContext.placement,
|
|
3033
|
-
metadata: {
|
|
3034
|
-
threadName: resolveThreadBindingThreadName({
|
|
3035
|
-
agentId: focusTarget.agentId,
|
|
3036
|
-
label
|
|
3037
|
-
}),
|
|
3038
|
-
agentId: focusTarget.agentId,
|
|
3039
|
-
label,
|
|
3040
|
-
boundBy: senderId || "unknown",
|
|
3041
|
-
introText: resolveThreadBindingIntroText({
|
|
3042
|
-
agentId: focusTarget.agentId,
|
|
3043
|
-
label,
|
|
3044
|
-
idleTimeoutMs: resolveThreadBindingIdleTimeoutMsForChannel({
|
|
3045
|
-
cfg: params.cfg,
|
|
3046
|
-
channel: bindingContext.channel,
|
|
3047
|
-
accountId
|
|
3048
|
-
}),
|
|
3049
|
-
maxAgeMs: resolveThreadBindingMaxAgeMsForChannel({
|
|
3050
|
-
cfg: params.cfg,
|
|
3051
|
-
channel: bindingContext.channel,
|
|
3052
|
-
accountId
|
|
3053
|
-
}),
|
|
3054
|
-
sessionCwd: focusTarget.targetKind === "acp" ? resolveAcpSessionCwd(acpMeta) : void 0,
|
|
3055
|
-
sessionDetails: focusTarget.targetKind === "acp" ? resolveAcpThreadSessionDetailLines({
|
|
3056
|
-
sessionKey: focusTarget.targetSessionKey,
|
|
3057
|
-
meta: acpMeta
|
|
3058
|
-
}) : []
|
|
3059
|
-
})
|
|
3060
|
-
}
|
|
3061
|
-
});
|
|
3062
|
-
} catch {
|
|
3063
|
-
return stopWithText(`ā ļø Failed to bind this ${bindingContext.labelNoun} to the target session.`);
|
|
3064
|
-
}
|
|
3065
|
-
return stopWithText(`ā
${bindingContext.placement === "child" ? `created thread ${binding.conversation.conversationId} and bound it to ${binding.targetSessionKey}` : `bound this ${bindingContext.labelNoun} to ${binding.targetSessionKey}`} (${focusTarget.targetKind}).`);
|
|
3066
|
-
}
|
|
3067
|
-
//#endregion
|
|
3068
|
-
//#region src/auto-reply/reply/commands-subagents/action-help.ts
|
|
3069
|
-
function handleSubagentsHelpAction() {
|
|
3070
|
-
return stopWithText(buildSubagentsHelp());
|
|
3071
|
-
}
|
|
3072
|
-
//#endregion
|
|
3073
|
-
//#region src/auto-reply/reply/commands-subagents/action-info.ts
|
|
3074
|
-
function handleSubagentsInfoAction(ctx) {
|
|
3075
|
-
const { params, runs, restTokens } = ctx;
|
|
3076
|
-
const target = restTokens[0];
|
|
3077
|
-
if (!target) return stopWithText("ā¹ļø Usage: /subagents info <id|#>");
|
|
3078
|
-
const targetResolution = resolveSubagentEntryForToken(runs, target);
|
|
3079
|
-
if ("reply" in targetResolution) return targetResolution.reply;
|
|
3080
|
-
const run = targetResolution.entry;
|
|
3081
|
-
const { entry: sessionEntry } = loadSubagentSessionEntry(params, run.childSessionKey, {
|
|
3082
|
-
loadSessionStore,
|
|
3083
|
-
resolveStorePath
|
|
3084
|
-
});
|
|
3085
|
-
const runtime = run.startedAt && Number.isFinite(run.startedAt) ? formatDurationCompact((run.endedAt ?? Date.now()) - run.startedAt) ?? "n/a" : "n/a";
|
|
3086
|
-
const outcomeError = sanitizeTaskStatusText(run.outcome?.error, { errorContext: true });
|
|
3087
|
-
const outcome = run.outcome ? `${run.outcome.status}${outcomeError ? ` (${outcomeError})` : ""}` : "n/a";
|
|
3088
|
-
const linkedTask = findTaskByRunIdForOwner({
|
|
3089
|
-
runId: run.runId,
|
|
3090
|
-
callerOwnerKey: params.sessionKey
|
|
3091
|
-
});
|
|
3092
|
-
const taskText = sanitizeTaskStatusText(run.task) || "n/a";
|
|
3093
|
-
const progressText = sanitizeTaskStatusText(linkedTask?.progressSummary);
|
|
3094
|
-
const taskSummaryText = sanitizeTaskStatusText(linkedTask?.terminalSummary, { errorContext: true });
|
|
3095
|
-
const taskErrorText = sanitizeTaskStatusText(linkedTask?.error, { errorContext: true });
|
|
3096
|
-
return stopWithText([
|
|
3097
|
-
"ā¹ļø Subagent info",
|
|
3098
|
-
`Status: ${resolveDisplayStatus(run, { pendingDescendants: countPendingDescendantRuns(run.childSessionKey) })}`,
|
|
3099
|
-
`Label: ${formatRunLabel(run)}`,
|
|
3100
|
-
`Task: ${taskText}`,
|
|
3101
|
-
`Run: ${run.runId}`,
|
|
3102
|
-
linkedTask ? `TaskId: ${linkedTask.taskId}` : void 0,
|
|
3103
|
-
linkedTask ? `TaskStatus: ${linkedTask.status}` : void 0,
|
|
3104
|
-
`Session: ${run.childSessionKey}`,
|
|
3105
|
-
`SessionId: ${sessionEntry?.sessionId ?? "n/a"}`,
|
|
3106
|
-
`Transcript: ${sessionEntry?.sessionFile ?? "n/a"}`,
|
|
3107
|
-
`Runtime: ${runtime}`,
|
|
3108
|
-
`Created: ${formatTimestampWithAge(run.createdAt)}`,
|
|
3109
|
-
`Started: ${formatTimestampWithAge(run.startedAt)}`,
|
|
3110
|
-
`Ended: ${formatTimestampWithAge(run.endedAt)}`,
|
|
3111
|
-
`Cleanup: ${run.cleanup}`,
|
|
3112
|
-
run.archiveAtMs ? `Archive: ${formatTimestampWithAge(run.archiveAtMs)}` : void 0,
|
|
3113
|
-
run.cleanupHandled ? "Cleanup handled: yes" : void 0,
|
|
3114
|
-
`Outcome: ${outcome}`,
|
|
3115
|
-
progressText ? `Progress: ${progressText}` : void 0,
|
|
3116
|
-
taskSummaryText ? `Task summary: ${taskSummaryText}` : void 0,
|
|
3117
|
-
taskErrorText ? `Task error: ${taskErrorText}` : void 0,
|
|
3118
|
-
linkedTask ? `Delivery: ${linkedTask.deliveryStatus}` : void 0
|
|
3119
|
-
].filter(Boolean).join("\n"));
|
|
3120
|
-
}
|
|
3121
|
-
//#endregion
|
|
3122
|
-
//#region src/auto-reply/reply/commands-subagents/action-kill.ts
|
|
3123
|
-
async function handleSubagentsKillAction(ctx) {
|
|
3124
|
-
const { params, handledPrefix, requesterKey, runs, restTokens } = ctx;
|
|
3125
|
-
const target = restTokens[0];
|
|
3126
|
-
if (!target) return stopWithText(handledPrefix === "/subagents" ? "Usage: /subagents kill <id|#|all>" : "Usage: /kill <id|#|all>");
|
|
3127
|
-
if (target === "all" || target === "*") {
|
|
3128
|
-
const controller = resolveCommandSubagentController(params, requesterKey);
|
|
3129
|
-
const result = await killAllControlledSubagentRuns({
|
|
3130
|
-
cfg: params.cfg,
|
|
3131
|
-
controller,
|
|
3132
|
-
runs
|
|
3133
|
-
});
|
|
3134
|
-
if (result.status === "forbidden") return stopWithText(`ā ļø ${result.error}`);
|
|
3135
|
-
if (result.killed > 0) return { shouldContinue: false };
|
|
3136
|
-
return { shouldContinue: false };
|
|
3137
|
-
}
|
|
3138
|
-
const targetResolution = resolveSubagentEntryForToken(runs, target);
|
|
3139
|
-
if ("reply" in targetResolution) return targetResolution.reply;
|
|
3140
|
-
const controller = resolveCommandSubagentController(params, requesterKey);
|
|
3141
|
-
const result = await killControlledSubagentRun({
|
|
3142
|
-
cfg: params.cfg,
|
|
3143
|
-
controller,
|
|
3144
|
-
entry: targetResolution.entry
|
|
3145
|
-
});
|
|
3146
|
-
if (result.status === "forbidden") return stopWithText(`ā ļø ${result.error}`);
|
|
3147
|
-
if (result.status === "done") return stopWithText(result.text);
|
|
3148
|
-
return { shouldContinue: false };
|
|
3149
|
-
}
|
|
3150
|
-
//#endregion
|
|
3151
|
-
//#region src/auto-reply/reply/commands-subagents/action-list.ts
|
|
3152
|
-
function handleSubagentsListAction(ctx) {
|
|
3153
|
-
const { params, runs } = ctx;
|
|
3154
|
-
const list = buildSubagentList({
|
|
3155
|
-
cfg: params.cfg,
|
|
3156
|
-
runs,
|
|
3157
|
-
recentMinutes: 30,
|
|
3158
|
-
taskMaxChars: 110
|
|
3159
|
-
});
|
|
3160
|
-
const lines = ["active subagents:", "-----"];
|
|
3161
|
-
if (list.active.length === 0) lines.push("(none)");
|
|
3162
|
-
else lines.push(list.active.map((entry) => entry.line).join("\n"));
|
|
3163
|
-
lines.push("", `recent subagents (last 30m):`, "-----");
|
|
3164
|
-
if (list.recent.length === 0) lines.push("(none)");
|
|
3165
|
-
else lines.push(list.recent.map((entry) => entry.line).join("\n"));
|
|
3166
|
-
return stopWithText(lines.join("\n"));
|
|
3167
|
-
}
|
|
3168
|
-
//#endregion
|
|
3169
|
-
//#region src/auto-reply/reply/commands-subagents/action-log.ts
|
|
3170
|
-
async function handleSubagentsLogAction(ctx) {
|
|
3171
|
-
const { runs, restTokens } = ctx;
|
|
3172
|
-
const target = restTokens[0];
|
|
3173
|
-
if (!target) return stopWithText("š Usage: /subagents log <id|#> [limit]");
|
|
3174
|
-
const includeTools = restTokens.some((token) => token.toLowerCase() === "tools");
|
|
3175
|
-
const limitToken = restTokens.find((token) => /^\d+$/.test(token));
|
|
3176
|
-
const limit = limitToken ? Math.min(200, Math.max(1, Number.parseInt(limitToken, 10))) : 20;
|
|
3177
|
-
const targetResolution = resolveSubagentEntryForToken(runs, target);
|
|
3178
|
-
if ("reply" in targetResolution) return targetResolution.reply;
|
|
3179
|
-
const history = await callGateway({
|
|
3180
|
-
method: "chat.history",
|
|
3181
|
-
params: {
|
|
3182
|
-
sessionKey: targetResolution.entry.childSessionKey,
|
|
3183
|
-
limit
|
|
3184
|
-
}
|
|
3185
|
-
});
|
|
3186
|
-
const rawMessages = Array.isArray(history?.messages) ? history.messages : [];
|
|
3187
|
-
const lines = formatLogLines(includeTools ? rawMessages : stripToolMessages(rawMessages));
|
|
3188
|
-
const header = `š Subagent log: ${formatRunLabel(targetResolution.entry)}`;
|
|
3189
|
-
if (lines.length === 0) return stopWithText(`${header}\n(no messages)`);
|
|
3190
|
-
return stopWithText([header, ...lines].join("\n"));
|
|
3191
|
-
}
|
|
3192
|
-
//#endregion
|
|
3193
|
-
//#region src/auto-reply/reply/commands-subagents/action-send.ts
|
|
3194
|
-
async function handleSubagentsSendAction(ctx, steerRequested) {
|
|
3195
|
-
const { params, handledPrefix, runs, restTokens } = ctx;
|
|
3196
|
-
const target = restTokens[0];
|
|
3197
|
-
const message = restTokens.slice(1).join(" ").trim();
|
|
3198
|
-
if (!target || !message) return stopWithText(steerRequested ? handledPrefix === "/subagents" ? "Usage: /subagents steer <id|#> <message>" : `Usage: ${handledPrefix} <id|#> <message>` : "Usage: /subagents send <id|#> <message>");
|
|
3199
|
-
const targetResolution = resolveSubagentEntryForToken(runs, target);
|
|
3200
|
-
if ("reply" in targetResolution) return targetResolution.reply;
|
|
3201
|
-
const controller = resolveCommandSubagentController(params, ctx.requesterKey);
|
|
3202
|
-
if (steerRequested) {
|
|
3203
|
-
const result = await steerControlledSubagentRun({
|
|
3204
|
-
cfg: params.cfg,
|
|
3205
|
-
controller,
|
|
3206
|
-
entry: targetResolution.entry,
|
|
3207
|
-
message
|
|
3208
|
-
});
|
|
3209
|
-
if (result.status === "accepted") return stopWithText(`steered ${formatRunLabel(targetResolution.entry)} (run ${result.runId.slice(0, 8)}).`);
|
|
3210
|
-
if (result.status === "done" && result.text) return stopWithText(result.text);
|
|
3211
|
-
if (result.status === "error") return stopWithText(`send failed: ${result.error ?? "error"}`);
|
|
3212
|
-
return stopWithText(`ā ļø ${result.error ?? "send failed"}`);
|
|
3213
|
-
}
|
|
3214
|
-
const result = await sendControlledSubagentMessage({
|
|
3215
|
-
cfg: params.cfg,
|
|
3216
|
-
controller,
|
|
3217
|
-
entry: targetResolution.entry,
|
|
3218
|
-
message
|
|
3219
|
-
});
|
|
3220
|
-
if (result.status === "timeout") return stopWithText(`ā³ Subagent still running (run ${result.runId.slice(0, 8)}).`);
|
|
3221
|
-
if (result.status === "error") return stopWithText(`ā ļø Subagent error: ${result.error} (run ${result.runId.slice(0, 8)}).`);
|
|
3222
|
-
if (result.status === "forbidden") return stopWithText(`ā ļø ${result.error ?? "send failed"}`);
|
|
3223
|
-
if (result.status === "done") return stopWithText(result.text);
|
|
3224
|
-
return stopWithText(result.replyText ?? `ā
Sent to ${formatRunLabel(targetResolution.entry)} (run ${result.runId.slice(0, 8)}).`);
|
|
3225
|
-
}
|
|
3226
|
-
//#endregion
|
|
3227
|
-
//#region src/auto-reply/reply/commands-subagents/action-spawn.ts
|
|
3228
|
-
async function handleSubagentsSpawnAction(ctx) {
|
|
3229
|
-
const { params, requesterKey, restTokens } = ctx;
|
|
3230
|
-
const agentId = restTokens[0];
|
|
3231
|
-
const taskParts = [];
|
|
3232
|
-
let model;
|
|
3233
|
-
let thinking;
|
|
3234
|
-
for (let i = 1; i < restTokens.length; i++) if (restTokens[i] === "--model" && i + 1 < restTokens.length) {
|
|
3235
|
-
i += 1;
|
|
3236
|
-
model = restTokens[i];
|
|
3237
|
-
} else if (restTokens[i] === "--thinking" && i + 1 < restTokens.length) {
|
|
3238
|
-
i += 1;
|
|
3239
|
-
thinking = restTokens[i];
|
|
3240
|
-
} else taskParts.push(restTokens[i]);
|
|
3241
|
-
const task = taskParts.join(" ").trim();
|
|
3242
|
-
if (!agentId || !task) return stopWithText("Usage: /subagents spawn <agentId> <task> [--model <model>] [--thinking <level>]");
|
|
3243
|
-
const commandTo = typeof params.command.to === "string" ? params.command.to.trim() : "";
|
|
3244
|
-
const originatingTo = typeof params.ctx.OriginatingTo === "string" ? params.ctx.OriginatingTo.trim() : "";
|
|
3245
|
-
const fallbackTo = typeof params.ctx.To === "string" ? params.ctx.To.trim() : "";
|
|
3246
|
-
const normalizedTo = originatingTo || commandTo || fallbackTo || void 0;
|
|
3247
|
-
const result = await spawnSubagentDirect({
|
|
3248
|
-
task,
|
|
3249
|
-
agentId,
|
|
3250
|
-
model,
|
|
3251
|
-
thinking,
|
|
3252
|
-
mode: "run",
|
|
3253
|
-
cleanup: "keep",
|
|
3254
|
-
expectsCompletionMessage: true
|
|
3255
|
-
}, {
|
|
3256
|
-
agentSessionKey: requesterKey,
|
|
3257
|
-
agentChannel: params.ctx.OriginatingChannel ?? params.command.channel,
|
|
3258
|
-
agentAccountId: params.ctx.AccountId,
|
|
3259
|
-
agentTo: normalizedTo,
|
|
3260
|
-
agentThreadId: params.ctx.MessageThreadId,
|
|
3261
|
-
agentGroupId: params.sessionEntry?.groupId ?? null,
|
|
3262
|
-
agentGroupChannel: params.sessionEntry?.groupChannel ?? null,
|
|
3263
|
-
agentGroupSpace: params.sessionEntry?.space ?? null
|
|
3264
|
-
});
|
|
3265
|
-
if (result.status === "accepted") return stopWithText(`Spawned subagent ${agentId} (session ${result.childSessionKey}, run ${result.runId?.slice(0, 8)}).`);
|
|
3266
|
-
return stopWithText(`Spawn failed: ${result.error ?? result.status}`);
|
|
3267
|
-
}
|
|
3268
|
-
//#endregion
|
|
3269
|
-
//#region src/auto-reply/reply/commands-subagents/action-unfocus.ts
|
|
3270
|
-
async function handleSubagentsUnfocusAction(ctx) {
|
|
3271
|
-
const { params } = ctx;
|
|
3272
|
-
const channel = resolveCommandSurfaceChannel(params);
|
|
3273
|
-
if (channel !== "discord" && channel !== "matrix" && channel !== "telegram") return stopWithText("ā ļø /unfocus is only available on Discord, Matrix, and Telegram.");
|
|
3274
|
-
const accountId = resolveChannelAccountId(params);
|
|
3275
|
-
const bindingService = getSessionBindingService();
|
|
3276
|
-
const conversationId = (() => {
|
|
3277
|
-
if (isDiscordSurface(params)) return (params.ctx.MessageThreadId != null ? String(params.ctx.MessageThreadId) : "").trim() || void 0;
|
|
3278
|
-
if (isTelegramSurface(params)) return resolveTelegramConversationId(params);
|
|
3279
|
-
if (isMatrixSurface(params)) return resolveMatrixConversationId({
|
|
3280
|
-
ctx: {
|
|
3281
|
-
MessageThreadId: params.ctx.MessageThreadId,
|
|
3282
|
-
OriginatingTo: params.ctx.OriginatingTo,
|
|
3283
|
-
To: params.ctx.To
|
|
3284
|
-
},
|
|
3285
|
-
command: { to: params.command.to }
|
|
3286
|
-
});
|
|
3287
|
-
})();
|
|
3288
|
-
const parentConversationId = (() => {
|
|
3289
|
-
if (!isMatrixSurface(params)) return;
|
|
3290
|
-
return resolveMatrixParentConversationId({
|
|
3291
|
-
ctx: {
|
|
3292
|
-
MessageThreadId: params.ctx.MessageThreadId,
|
|
3293
|
-
OriginatingTo: params.ctx.OriginatingTo,
|
|
3294
|
-
To: params.ctx.To
|
|
3295
|
-
},
|
|
3296
|
-
command: { to: params.command.to }
|
|
3297
|
-
});
|
|
3298
|
-
})();
|
|
3299
|
-
if (!conversationId) {
|
|
3300
|
-
if (channel === "discord") return stopWithText("ā ļø /unfocus must be run inside a Discord thread.");
|
|
3301
|
-
if (channel === "matrix") return stopWithText("ā ļø /unfocus must be run inside a Matrix thread.");
|
|
3302
|
-
return stopWithText("ā ļø /unfocus on Telegram requires a topic context in groups, or a direct-message conversation.");
|
|
3303
|
-
}
|
|
3304
|
-
const binding = bindingService.resolveByConversation({
|
|
3305
|
-
channel,
|
|
3306
|
-
accountId,
|
|
3307
|
-
conversationId,
|
|
3308
|
-
...parentConversationId && parentConversationId !== conversationId ? { parentConversationId } : {}
|
|
3309
|
-
});
|
|
3310
|
-
if (!binding) return stopWithText(channel === "discord" ? "ā¹ļø This thread is not currently focused." : channel === "matrix" ? "ā¹ļø This thread is not currently focused." : "ā¹ļø This conversation is not currently focused.");
|
|
3311
|
-
const senderId = params.command.senderId?.trim() || "";
|
|
3312
|
-
const boundBy = typeof binding.metadata?.boundBy === "string" ? binding.metadata.boundBy.trim() : "";
|
|
3313
|
-
if (boundBy && boundBy !== "system" && senderId && senderId !== boundBy) return stopWithText(channel === "discord" ? `ā ļø Only ${boundBy} can unfocus this thread.` : channel === "matrix" ? `ā ļø Only ${boundBy} can unfocus this thread.` : `ā ļø Only ${boundBy} can unfocus this conversation.`);
|
|
3314
|
-
await bindingService.unbind({
|
|
3315
|
-
bindingId: binding.bindingId,
|
|
3316
|
-
reason: "manual"
|
|
3317
|
-
});
|
|
3318
|
-
return stopWithText(channel === "discord" || channel === "matrix" ? "ā
Thread unfocused." : "ā
Conversation unfocused.");
|
|
3319
|
-
}
|
|
3320
|
-
//#endregion
|
|
3321
|
-
//#region src/auto-reply/reply/commands-subagents.ts
|
|
3322
|
-
const handleSubagentsCommand = async (params, allowTextCommands) => {
|
|
3323
|
-
if (!allowTextCommands) return null;
|
|
3324
|
-
const normalized = params.command.commandBodyNormalized;
|
|
3325
|
-
const handledPrefix = resolveHandledPrefix(normalized);
|
|
3326
|
-
if (!handledPrefix) return null;
|
|
3327
|
-
if (!params.command.isAuthorizedSender) {
|
|
3328
|
-
logVerbose(`Ignoring ${handledPrefix} from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
3329
|
-
return { shouldContinue: false };
|
|
3330
|
-
}
|
|
3331
|
-
const restTokens = normalized.slice(handledPrefix.length).trim().split(/\s+/).filter(Boolean);
|
|
3332
|
-
const action = resolveSubagentsAction({
|
|
3333
|
-
handledPrefix,
|
|
3334
|
-
restTokens
|
|
3335
|
-
});
|
|
3336
|
-
if (!action) return handleSubagentsHelpAction();
|
|
3337
|
-
const requesterKey = action === "spawn" ? resolveRequesterSessionKey(params, { preferCommandTarget: true }) : resolveRequesterSessionKey(params);
|
|
3338
|
-
if (!requesterKey) return stopWithText("ā ļø Missing session key.");
|
|
3339
|
-
const ctx = {
|
|
3340
|
-
params,
|
|
3341
|
-
handledPrefix,
|
|
3342
|
-
requesterKey,
|
|
3343
|
-
runs: listControlledSubagentRuns(requesterKey),
|
|
3344
|
-
restTokens
|
|
3345
|
-
};
|
|
3346
|
-
switch (action) {
|
|
3347
|
-
case "help": return handleSubagentsHelpAction();
|
|
3348
|
-
case "agents": return handleSubagentsAgentsAction(ctx);
|
|
3349
|
-
case "focus": return await handleSubagentsFocusAction(ctx);
|
|
3350
|
-
case "unfocus": return await handleSubagentsUnfocusAction(ctx);
|
|
3351
|
-
case "list": return handleSubagentsListAction(ctx);
|
|
3352
|
-
case "kill": return await handleSubagentsKillAction(ctx);
|
|
3353
|
-
case "info": return handleSubagentsInfoAction(ctx);
|
|
3354
|
-
case "log": return await handleSubagentsLogAction(ctx);
|
|
3355
|
-
case "send": return await handleSubagentsSendAction(ctx, false);
|
|
3356
|
-
case "steer": return await handleSubagentsSendAction(ctx, true);
|
|
3357
|
-
case "spawn": return await handleSubagentsSpawnAction(ctx);
|
|
3358
|
-
default: return handleSubagentsHelpAction();
|
|
3359
|
-
}
|
|
3360
|
-
};
|
|
3361
|
-
//#endregion
|
|
3362
|
-
//#region src/auto-reply/reply/commands-tasks.ts
|
|
3363
|
-
const MAX_VISIBLE_TASKS = 5;
|
|
3364
|
-
const TASK_STATUS_ICONS = {
|
|
3365
|
-
queued: "š”",
|
|
3366
|
-
running: "š¢",
|
|
3367
|
-
succeeded: "ā
",
|
|
3368
|
-
failed: "š“",
|
|
3369
|
-
timed_out: "ā±ļø",
|
|
3370
|
-
cancelled: "āŖļø",
|
|
3371
|
-
lost: "ā ļø"
|
|
3372
|
-
};
|
|
3373
|
-
const TASK_RUNTIME_LABELS = {
|
|
3374
|
-
subagent: "Subagent",
|
|
3375
|
-
acp: "ACP",
|
|
3376
|
-
cli: "CLI",
|
|
3377
|
-
cron: "Cron"
|
|
3378
|
-
};
|
|
3379
|
-
function formatTaskHeadline(snapshot) {
|
|
3380
|
-
if (snapshot.totalCount === 0) return "All clear - nothing linked to this session right now.";
|
|
3381
|
-
return `Current session: ${snapshot.activeCount} active Ā· ${snapshot.totalCount} total`;
|
|
3382
|
-
}
|
|
3383
|
-
function formatAgentFallbackLine(agentId) {
|
|
3384
|
-
const snapshot = buildTaskStatusSnapshot(listTasksForAgentIdForStatus(agentId));
|
|
3385
|
-
if (snapshot.totalCount === 0) return;
|
|
3386
|
-
return `Agent-local: ${snapshot.activeCount} active Ā· ${snapshot.totalCount} total`;
|
|
3387
|
-
}
|
|
3388
|
-
function formatTaskTiming(task) {
|
|
3389
|
-
if (task.status === "running") {
|
|
3390
|
-
const startedAt = task.startedAt ?? task.createdAt;
|
|
3391
|
-
return `elapsed ${formatDurationCompact(Date.now() - startedAt, { spaced: true }) ?? "0s"}`;
|
|
3392
|
-
}
|
|
3393
|
-
if (task.status === "queued") return `queued ${formatTimeAgo(Date.now() - task.createdAt)}`;
|
|
3394
|
-
const endedAt = task.endedAt ?? task.lastEventAt ?? task.createdAt;
|
|
3395
|
-
return `finished ${formatTimeAgo(Date.now() - endedAt)}`;
|
|
3396
|
-
}
|
|
3397
|
-
function formatTaskDetail(task) {
|
|
3398
|
-
return formatTaskStatusDetail(task);
|
|
3399
|
-
}
|
|
3400
|
-
function formatVisibleTask(task, index) {
|
|
3401
|
-
const title = formatTaskStatusTitle(task);
|
|
3402
|
-
const status = task.status.replaceAll("_", " ");
|
|
3403
|
-
const timing = formatTaskTiming(task);
|
|
3404
|
-
const detail = formatTaskDetail(task);
|
|
3405
|
-
const meta = [
|
|
3406
|
-
TASK_RUNTIME_LABELS[task.runtime],
|
|
3407
|
-
status,
|
|
3408
|
-
timing
|
|
3409
|
-
].filter(Boolean).join(" Ā· ");
|
|
3410
|
-
const lines = [`${index + 1}. ${TASK_STATUS_ICONS[task.status]} ${title}`, ` ${meta}`];
|
|
3411
|
-
if (detail) lines.push(` ${detail}`);
|
|
3412
|
-
return lines.join("\n");
|
|
3413
|
-
}
|
|
3414
|
-
function buildTasksText(params) {
|
|
3415
|
-
const sessionSnapshot = buildTaskStatusSnapshot(listTasksForSessionKeyForStatus(params.sessionKey));
|
|
3416
|
-
const lines = ["š Tasks", formatTaskHeadline(sessionSnapshot)];
|
|
3417
|
-
if (sessionSnapshot.totalCount > 0) {
|
|
3418
|
-
const visible = sessionSnapshot.visible.slice(0, MAX_VISIBLE_TASKS);
|
|
3419
|
-
lines.push("");
|
|
3420
|
-
for (const [index, task] of visible.entries()) {
|
|
3421
|
-
lines.push(formatVisibleTask(task, index));
|
|
3422
|
-
if (index < visible.length - 1) lines.push("");
|
|
3423
|
-
}
|
|
3424
|
-
const hiddenCount = sessionSnapshot.visible.length - visible.length;
|
|
3425
|
-
if (hiddenCount > 0) lines.push("", `+${hiddenCount} more recent task${hiddenCount === 1 ? "" : "s"}`);
|
|
3426
|
-
return lines.join("\n");
|
|
3427
|
-
}
|
|
3428
|
-
const agentFallback = formatAgentFallbackLine(params.agentId);
|
|
3429
|
-
if (agentFallback) lines.push(agentFallback);
|
|
3430
|
-
return lines.join("\n");
|
|
3431
|
-
}
|
|
3432
|
-
async function buildTasksReply(params) {
|
|
3433
|
-
const agentId = params.agentId ?? resolveSessionAgentId({
|
|
3434
|
-
sessionKey: params.sessionKey,
|
|
3435
|
-
config: params.cfg
|
|
3436
|
-
});
|
|
3437
|
-
return { text: buildTasksText({
|
|
3438
|
-
sessionKey: params.sessionKey,
|
|
3439
|
-
agentId
|
|
3440
|
-
}) };
|
|
3441
|
-
}
|
|
3442
|
-
const handleTasksCommand = async (params, allowTextCommands) => {
|
|
3443
|
-
if (!allowTextCommands) return null;
|
|
3444
|
-
const normalized = params.command.commandBodyNormalized;
|
|
3445
|
-
if (normalized !== "/tasks" && !normalized.startsWith("/tasks ")) return null;
|
|
3446
|
-
if (!params.command.isAuthorizedSender) {
|
|
3447
|
-
logVerbose(`Ignoring /tasks from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
3448
|
-
return { shouldContinue: false };
|
|
3449
|
-
}
|
|
3450
|
-
if (normalized !== "/tasks") return {
|
|
3451
|
-
shouldContinue: false,
|
|
3452
|
-
reply: { text: "Usage: /tasks" }
|
|
3453
|
-
};
|
|
3454
|
-
return {
|
|
3455
|
-
shouldContinue: false,
|
|
3456
|
-
reply: await buildTasksReply(params)
|
|
3457
|
-
};
|
|
3458
|
-
};
|
|
3459
|
-
//#endregion
|
|
3460
|
-
//#region src/auto-reply/reply/commands-tts.ts
|
|
3461
|
-
function parseTtsCommand(normalized) {
|
|
3462
|
-
if (normalized === "/tts") return {
|
|
3463
|
-
action: "status",
|
|
3464
|
-
args: ""
|
|
3465
|
-
};
|
|
3466
|
-
if (!normalized.startsWith("/tts ")) return null;
|
|
3467
|
-
const rest = normalized.slice(5).trim();
|
|
3468
|
-
if (!rest) return {
|
|
3469
|
-
action: "status",
|
|
3470
|
-
args: ""
|
|
3471
|
-
};
|
|
3472
|
-
const [action, ...tail] = rest.split(/\s+/);
|
|
3473
|
-
return {
|
|
3474
|
-
action: action.toLowerCase(),
|
|
3475
|
-
args: tail.join(" ").trim()
|
|
3476
|
-
};
|
|
3477
|
-
}
|
|
3478
|
-
function formatAttemptDetails(attempts) {
|
|
3479
|
-
if (!attempts || attempts.length === 0) return;
|
|
3480
|
-
return attempts.map((attempt) => {
|
|
3481
|
-
const reason = attempt.reasonCode === "success" ? "ok" : attempt.reasonCode;
|
|
3482
|
-
const latency = Number.isFinite(attempt.latencyMs) ? ` ${attempt.latencyMs}ms` : "";
|
|
3483
|
-
return `${attempt.provider}:${attempt.outcome}(${reason})${latency}`;
|
|
3484
|
-
}).join(", ");
|
|
3485
|
-
}
|
|
3486
|
-
function ttsUsage() {
|
|
3487
|
-
return { text: "š **TTS (Text-to-Speech) Help**\n\n**Commands:**\n⢠/tts on ā Enable automatic TTS for replies\n⢠/tts off ā Disable TTS\n⢠/tts status ā Show current settings\n⢠/tts provider [name] ā View/change provider\n⢠/tts limit [number] ā View/change text limit\n⢠/tts summary [on|off] ā View/change auto-summary\n⢠/tts audio <text> ā Generate audio from text\n\n**Providers:**\nUse /tts provider to list the registered speech providers and their status.\n\n**Text Limit (default: 1500, max: 4096):**\nWhen text exceeds the limit:\n⢠Summary ON: AI summarizes, then generates audio\n⢠Summary OFF: Truncates text, then generates audio\n\n**Examples:**\n/tts provider <id>\n/tts limit 2000\n/tts audio Hello, this is a test!" };
|
|
3488
|
-
}
|
|
3489
|
-
const handleTtsCommands = async (params, allowTextCommands) => {
|
|
3490
|
-
if (!allowTextCommands) return null;
|
|
3491
|
-
const parsed = parseTtsCommand(params.command.commandBodyNormalized);
|
|
3492
|
-
if (!parsed) return null;
|
|
3493
|
-
if (!params.command.isAuthorizedSender) {
|
|
3494
|
-
logVerbose(`Ignoring TTS command from unauthorized sender: ${params.command.senderId || "<unknown>"}`);
|
|
3495
|
-
return { shouldContinue: false };
|
|
3496
|
-
}
|
|
3497
|
-
const config = resolveTtsConfig(params.cfg);
|
|
3498
|
-
const prefsPath = resolveTtsPrefsPath(config);
|
|
3499
|
-
const action = parsed.action;
|
|
3500
|
-
const args = parsed.args;
|
|
3501
|
-
if (action === "help") return {
|
|
3502
|
-
shouldContinue: false,
|
|
3503
|
-
reply: ttsUsage()
|
|
3504
|
-
};
|
|
3505
|
-
if (action === "on") {
|
|
3506
|
-
setTtsEnabled(prefsPath, true);
|
|
3507
|
-
return {
|
|
3508
|
-
shouldContinue: false,
|
|
3509
|
-
reply: { text: "š TTS enabled." }
|
|
3510
|
-
};
|
|
3511
|
-
}
|
|
3512
|
-
if (action === "off") {
|
|
3513
|
-
setTtsEnabled(prefsPath, false);
|
|
3514
|
-
return {
|
|
3515
|
-
shouldContinue: false,
|
|
3516
|
-
reply: { text: "š TTS disabled." }
|
|
3517
|
-
};
|
|
3518
|
-
}
|
|
3519
|
-
if (action === "audio") {
|
|
3520
|
-
if (!args.trim()) return {
|
|
3521
|
-
shouldContinue: false,
|
|
3522
|
-
reply: { text: "š¤ Generate audio from text.\n\nUsage: /tts audio <text>\nExample: /tts audio Hello, this is a test!" }
|
|
3523
|
-
};
|
|
3524
|
-
const start = Date.now();
|
|
3525
|
-
const result = await textToSpeech({
|
|
3526
|
-
text: args,
|
|
3527
|
-
cfg: params.cfg,
|
|
3528
|
-
channel: params.command.channel,
|
|
3529
|
-
prefsPath
|
|
3530
|
-
});
|
|
3531
|
-
if (result.success && result.audioPath) {
|
|
3532
|
-
setLastTtsAttempt({
|
|
3533
|
-
timestamp: Date.now(),
|
|
3534
|
-
success: true,
|
|
3535
|
-
textLength: args.length,
|
|
3536
|
-
summarized: false,
|
|
3537
|
-
provider: result.provider,
|
|
3538
|
-
fallbackFrom: result.fallbackFrom,
|
|
3539
|
-
attemptedProviders: result.attemptedProviders,
|
|
3540
|
-
attempts: result.attempts,
|
|
3541
|
-
latencyMs: result.latencyMs
|
|
3542
|
-
});
|
|
3543
|
-
return {
|
|
3544
|
-
shouldContinue: false,
|
|
3545
|
-
reply: {
|
|
3546
|
-
mediaUrl: result.audioPath,
|
|
3547
|
-
audioAsVoice: result.voiceCompatible === true
|
|
3548
|
-
}
|
|
3549
|
-
};
|
|
3550
|
-
}
|
|
3551
|
-
setLastTtsAttempt({
|
|
3552
|
-
timestamp: Date.now(),
|
|
3553
|
-
success: false,
|
|
3554
|
-
textLength: args.length,
|
|
3555
|
-
summarized: false,
|
|
3556
|
-
attemptedProviders: result.attemptedProviders,
|
|
3557
|
-
attempts: result.attempts,
|
|
3558
|
-
error: result.error,
|
|
3559
|
-
latencyMs: Date.now() - start
|
|
3560
|
-
});
|
|
3561
|
-
return {
|
|
3562
|
-
shouldContinue: false,
|
|
3563
|
-
reply: { text: `ā Error generating audio: ${result.error ?? "unknown error"}` }
|
|
3564
|
-
};
|
|
3565
|
-
}
|
|
3566
|
-
if (action === "provider") {
|
|
3567
|
-
const currentProvider = getTtsProvider(config, prefsPath);
|
|
3568
|
-
if (!args.trim()) {
|
|
3569
|
-
const providers = listSpeechProviders(params.cfg);
|
|
3570
|
-
return {
|
|
3571
|
-
shouldContinue: false,
|
|
3572
|
-
reply: { text: `šļø TTS provider\nPrimary: ${currentProvider}\n` + providers.map((provider) => `${provider.label}: ${provider.isConfigured({
|
|
3573
|
-
cfg: params.cfg,
|
|
3574
|
-
providerConfig: getResolvedSpeechProviderConfig(config, provider.id, params.cfg),
|
|
3575
|
-
timeoutMs: config.timeoutMs
|
|
3576
|
-
}) ? "ā
" : "ā"}`).join("\n") + `\nUsage: /tts provider <id>` }
|
|
3577
|
-
};
|
|
3578
|
-
}
|
|
3579
|
-
const requested = args.trim().toLowerCase();
|
|
3580
|
-
const resolvedProvider = getSpeechProvider(requested, params.cfg);
|
|
3581
|
-
if (!resolvedProvider) return {
|
|
3582
|
-
shouldContinue: false,
|
|
3583
|
-
reply: ttsUsage()
|
|
3584
|
-
};
|
|
3585
|
-
const nextProvider = canonicalizeSpeechProviderId(requested, params.cfg) ?? resolvedProvider.id;
|
|
3586
|
-
setTtsProvider(prefsPath, nextProvider);
|
|
3587
|
-
return {
|
|
3588
|
-
shouldContinue: false,
|
|
3589
|
-
reply: { text: `ā
TTS provider set to ${nextProvider}.` }
|
|
3590
|
-
};
|
|
3591
|
-
}
|
|
3592
|
-
if (action === "limit") {
|
|
3593
|
-
if (!args.trim()) return {
|
|
3594
|
-
shouldContinue: false,
|
|
3595
|
-
reply: { text: `š TTS limit: ${getTtsMaxLength(prefsPath)} characters.\n\nText longer than this triggers summary (if enabled).\nRange: 100-4096 chars (Telegram max).\n\nTo change: /tts limit <number>\nExample: /tts limit 2000` }
|
|
3596
|
-
};
|
|
3597
|
-
const next = Number.parseInt(args.trim(), 10);
|
|
3598
|
-
if (!Number.isFinite(next) || next < 100 || next > 4096) return {
|
|
3599
|
-
shouldContinue: false,
|
|
3600
|
-
reply: { text: "ā Limit must be between 100 and 4096 characters." }
|
|
3601
|
-
};
|
|
3602
|
-
setTtsMaxLength(prefsPath, next);
|
|
3603
|
-
return {
|
|
3604
|
-
shouldContinue: false,
|
|
3605
|
-
reply: { text: `ā
TTS limit set to ${next} characters.` }
|
|
3606
|
-
};
|
|
3607
|
-
}
|
|
3608
|
-
if (action === "summary") {
|
|
3609
|
-
if (!args.trim()) {
|
|
3610
|
-
const enabled = isSummarizationEnabled(prefsPath);
|
|
3611
|
-
const maxLen = getTtsMaxLength(prefsPath);
|
|
3612
|
-
return {
|
|
3613
|
-
shouldContinue: false,
|
|
3614
|
-
reply: { text: `š TTS auto-summary: ${enabled ? "on" : "off"}.\n\nWhen text exceeds ${maxLen} chars:\n⢠ON: summarizes text, then generates audio\n⢠OFF: truncates text, then generates audio\n\nTo change: /tts summary on | off` }
|
|
3615
|
-
};
|
|
3616
|
-
}
|
|
3617
|
-
const requested = args.trim().toLowerCase();
|
|
3618
|
-
if (requested !== "on" && requested !== "off") return {
|
|
3619
|
-
shouldContinue: false,
|
|
3620
|
-
reply: ttsUsage()
|
|
3621
|
-
};
|
|
3622
|
-
setSummarizationEnabled(prefsPath, requested === "on");
|
|
3623
|
-
return {
|
|
3624
|
-
shouldContinue: false,
|
|
3625
|
-
reply: { text: requested === "on" ? "ā
TTS auto-summary enabled." : "ā TTS auto-summary disabled." }
|
|
3626
|
-
};
|
|
3627
|
-
}
|
|
3628
|
-
if (action === "status") {
|
|
3629
|
-
const enabled = isTtsEnabled(config, prefsPath);
|
|
3630
|
-
const provider = getTtsProvider(config, prefsPath);
|
|
3631
|
-
const hasKey = isTtsProviderConfigured(config, provider, params.cfg);
|
|
3632
|
-
const maxLength = getTtsMaxLength(prefsPath);
|
|
3633
|
-
const summarize = isSummarizationEnabled(prefsPath);
|
|
3634
|
-
const last = getLastTtsAttempt();
|
|
3635
|
-
const lines = [
|
|
3636
|
-
"š TTS status",
|
|
3637
|
-
`State: ${enabled ? "ā
enabled" : "ā disabled"}`,
|
|
3638
|
-
`Provider: ${provider} (${hasKey ? "ā
configured" : "ā not configured"})`,
|
|
3639
|
-
`Text limit: ${maxLength} chars`,
|
|
3640
|
-
`Auto-summary: ${summarize ? "on" : "off"}`
|
|
3641
|
-
];
|
|
3642
|
-
if (last) {
|
|
3643
|
-
const timeAgo = Math.round((Date.now() - last.timestamp) / 1e3);
|
|
3644
|
-
lines.push("");
|
|
3645
|
-
lines.push(`Last attempt (${timeAgo}s ago): ${last.success ? "ā
" : "ā"}`);
|
|
3646
|
-
lines.push(`Text: ${last.textLength} chars${last.summarized ? " (summarized)" : ""}`);
|
|
3647
|
-
if (last.success) {
|
|
3648
|
-
lines.push(`Provider: ${last.provider ?? "unknown"}`);
|
|
3649
|
-
if (last.fallbackFrom && last.provider && last.fallbackFrom !== last.provider) lines.push(`Fallback: ${last.fallbackFrom} -> ${last.provider}`);
|
|
3650
|
-
if (last.attemptedProviders && last.attemptedProviders.length > 1) lines.push(`Attempts: ${last.attemptedProviders.join(" -> ")}`);
|
|
3651
|
-
const details = formatAttemptDetails(last.attempts);
|
|
3652
|
-
if (details) lines.push(`Attempt details: ${details}`);
|
|
3653
|
-
lines.push(`Latency: ${last.latencyMs ?? 0}ms`);
|
|
3654
|
-
} else if (last.error) {
|
|
3655
|
-
lines.push(`Error: ${last.error}`);
|
|
3656
|
-
if (last.attemptedProviders && last.attemptedProviders.length > 0) lines.push(`Attempts: ${last.attemptedProviders.join(" -> ")}`);
|
|
3657
|
-
const details = formatAttemptDetails(last.attempts);
|
|
3658
|
-
if (details) lines.push(`Attempt details: ${details}`);
|
|
3659
|
-
}
|
|
3660
|
-
}
|
|
3661
|
-
return {
|
|
3662
|
-
shouldContinue: false,
|
|
3663
|
-
reply: { text: lines.join("\n") }
|
|
3664
|
-
};
|
|
3665
|
-
}
|
|
3666
|
-
return {
|
|
3667
|
-
shouldContinue: false,
|
|
3668
|
-
reply: ttsUsage()
|
|
3669
|
-
};
|
|
3670
|
-
};
|
|
3671
|
-
//#endregion
|
|
3672
|
-
//#region src/auto-reply/reply/commands-handlers.runtime.ts
|
|
3673
|
-
function loadCommandHandlers() {
|
|
3674
|
-
return [
|
|
3675
|
-
handlePluginCommand,
|
|
3676
|
-
handleBtwCommand,
|
|
3677
|
-
handleBashCommand,
|
|
3678
|
-
handleActivationCommand,
|
|
3679
|
-
handleSendPolicyCommand,
|
|
3680
|
-
handleFastCommand,
|
|
3681
|
-
handleUsageCommand,
|
|
3682
|
-
handleSessionCommand,
|
|
3683
|
-
handleRestartCommand,
|
|
3684
|
-
handleTtsCommands,
|
|
3685
|
-
handleHelpCommand,
|
|
3686
|
-
handleCommandsListCommand,
|
|
3687
|
-
handleToolsCommand,
|
|
3688
|
-
handleStatusCommand,
|
|
3689
|
-
handleTasksCommand,
|
|
3690
|
-
handleAllowlistCommand,
|
|
3691
|
-
handleApproveCommand,
|
|
3692
|
-
handleContextCommand,
|
|
3693
|
-
handleExportSessionCommand,
|
|
3694
|
-
handleWhoamiCommand,
|
|
3695
|
-
handleSubagentsCommand,
|
|
3696
|
-
handleAcpCommand,
|
|
3697
|
-
handleMcpCommand,
|
|
3698
|
-
handlePluginsCommand,
|
|
3699
|
-
handleConfigCommand,
|
|
3700
|
-
handleDebugCommand,
|
|
3701
|
-
handleModelsCommand,
|
|
3702
|
-
handleStopCommand,
|
|
3703
|
-
handleCompactCommand,
|
|
3704
|
-
handleAbortTrigger
|
|
3705
|
-
];
|
|
3706
|
-
}
|
|
3707
|
-
//#endregion
|
|
3708
|
-
export { loadCommandHandlers };
|