@spacebar_ai/moldclaw-core 2026.3.43 → 2026.3.45
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/accounts-5qY-dKca.d.ts +103 -0
- package/dist/accounts-CxV5zzzp.js +114 -0
- package/dist/acp-cli-2JoKJ0xt.js +2093 -0
- package/dist/actions.runtime-BJPd9nat.js +119 -0
- package/dist/actions.runtime-DVs4a2cB.js +133 -0
- package/dist/agent-scope-lZlwP1At.js +208 -0
- package/dist/agents-CmT3Jwvj.js +222 -0
- package/dist/agents-D7Pebhph.js +853 -0
- package/dist/agents.config-CX9CPNfP.js +17 -0
- package/dist/agents.config-DF9Zwn9n.js +121 -0
- package/dist/allow-list-B3f4EqAM.js +81 -0
- package/dist/allowlist-_YpK0-4h.js +142 -0
- package/dist/api-B44giplI.js +117 -0
- package/dist/audit-C3InXm7H.js +787 -0
- package/dist/audit-ChWS6RiF.js +54 -0
- package/dist/audit-channel.collect.runtime-DZzrS6v2.js +605 -0
- package/dist/audit-channel.runtime-B2XTOsSF.js +121 -0
- package/dist/audit-extra.async-C2G0mqmk.js +813 -0
- package/dist/audit-membership-runtime-DOv5-eHo.js +162 -0
- package/dist/audit.deep.runtime-DyL9O_sU.js +25 -0
- package/dist/audit.nondeep.runtime-C6jFgJfH.js +832 -0
- package/dist/audit.runtime-Cvh2wmWM.js +118 -0
- package/dist/auth-Ch3Rchm4.js +101 -0
- package/dist/auth-choice-Beq0dWPS.js +268 -0
- package/dist/auth-choice-DZYg94gS.js +122 -0
- package/dist/auth-choice-TVG_8lJj.js +507 -0
- package/dist/auth-choice-options-B_qxsjdj.js +123 -0
- package/dist/auth-choice-prompt-BayzDobT.js +115 -0
- package/dist/auth-choice-prompt-_UES859x.js +36 -0
- package/dist/auth-choice.apply-helpers-BhbNIV8X.js +66 -0
- package/dist/auth-choice.plugin-providers.runtime-CVC4Jzhp.js +119 -0
- package/dist/auth-profiles-C-Ul-Qkn.js +128139 -0
- package/dist/auth-profiles.runtime-Clyka_jV.js +116 -0
- package/dist/banner-CojBHPWr.js +342 -0
- package/dist/bluebubbles-BnLsj2Fy.d.ts +6 -0
- package/dist/bluebubbles-irYTGbfn.js +64 -0
- package/dist/bot-DdyrB2z9.d.ts +478 -0
- package/dist/brave-w4Fo8WZ3.js +24 -0
- package/dist/browser-cli-DWFs3P_i.js +1494 -0
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.d.ts +1 -1
- package/dist/bundled/boot-md/handler.js +35 -35
- package/dist/bundled/bootstrap-extra-files/handler.d.ts +1 -1
- package/dist/bundled/bootstrap-extra-files/handler.js +1 -1
- package/dist/bundled/command-logger/handler.d.ts +1 -1
- package/dist/bundled/session-memory/handler.d.ts +1 -1
- package/dist/bundled/session-memory/handler.js +36 -36
- package/dist/call-Do7wTSr7.js +39 -0
- package/dist/call-gdDAt07d.js +640 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/channel-34O87pvK.js +949 -0
- package/dist/channel-B3Xo_4d8.js +1598 -0
- package/dist/channel-BEqDvL49.js +397 -0
- package/dist/channel-BLOk9WRE.js +214 -0
- package/dist/channel-BY5H2cdy.js +803 -0
- package/dist/channel-BeOtzXIH.js +4681 -0
- package/dist/channel-Bt8x_5Kj.js +306 -0
- package/dist/channel-C3E8XWLF.js +1321 -0
- package/dist/channel-C6ngVfGr.js +943 -0
- package/dist/channel-CVDBca2b.js +226 -0
- package/dist/channel-Cctli72q.js +562 -0
- package/dist/channel-DEAbU9Dj2.js +316 -0
- package/dist/channel-DIULkrBN.js +575 -0
- package/dist/channel-DXb4gsSd.js +619 -0
- package/dist/channel-Dap9LY-9.js +352 -0
- package/dist/channel-DcJdUnab.js +538 -0
- package/dist/channel-ZYCQj3hP.js +207 -0
- package/dist/channel-account-context-Baszl3_B.js +103 -0
- package/dist/channel-hlzhFHDl.js +497 -0
- package/dist/channel-options-PwBzYYtq.js +50 -0
- package/dist/channel-plugin-ids-TZIY4hFs.js +26 -0
- package/dist/channel-summary-CCEAV13o.js +111 -0
- package/dist/channel-tY2Hg5ac.js +542 -0
- package/dist/channel-vMWcWq1U.js +920 -0
- package/dist/channel.runtime-8qWgkCxX.js +404 -0
- package/dist/channel.runtime-C4jtgrbI.js +179 -0
- package/dist/channel.runtime-CJ4ug6Mp.js +127 -0
- package/dist/channel.runtime-ChKRJAZ8.js +4011 -0
- package/dist/channel.runtime-Cj54LYU-.js +418 -0
- package/dist/channel.runtime-KH06-bu1.js +870 -0
- package/dist/channel.runtime-_GYnBh2X.js +199 -0
- package/dist/channel.runtime-go7Pzt6N.js +241 -0
- package/dist/channel.runtime-iypIZ0EU.js +171 -0
- package/dist/channel.runtime-mukTWpon.js +182 -0
- package/dist/channel.runtime-oNtF1sc3.js +218 -0
- package/dist/channel.setup-BZfok6kX.js +11 -0
- package/dist/channel.setup-CbXfZ2dq.js +9 -0
- package/dist/channel.setup-CfyM55np.js +8 -0
- package/dist/channel.setup-CoG-gJ6n.js +9 -0
- package/dist/channel.setup-Cp4PH_rc.js +57 -0
- package/dist/channel.setup-V2w9Jk9j.js +6 -0
- package/dist/channel.setup-t7F5WZE7.js +8 -0
- package/dist/channels/plugins/actions/discord.d.ts +2 -2
- package/dist/channels/plugins/actions/discord.js +35 -35
- package/dist/channels/plugins/actions/signal.d.ts +1 -1
- package/dist/channels/plugins/actions/signal.js +35 -35
- package/dist/channels/plugins/actions/telegram.d.ts +2 -2
- package/dist/channels/plugins/actions/telegram.js +35 -35
- package/dist/channels/plugins/agent-tools/whatsapp-login.d.ts +3 -3
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +35 -35
- package/dist/channels-H5ThmyG8.js +1118 -0
- package/dist/channels-cQ-6NFCQ.js +404 -0
- package/dist/channels-cli-TmchKLFS.js +291 -0
- package/dist/channels-status-issues-DXnkXEeJ.js +16 -0
- package/dist/clawbot-cli-Cpbxu8dD.js +118 -0
- package/dist/cleanup-utils-D0L17RsX.js +96 -0
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/cli--2bGSKdX.js +154 -0
- package/dist/command-registry-BaVPDmwn.js +242 -0
- package/dist/command-registry-DhLyeSbO.js +14 -0
- package/dist/command-secret-gateway-C5D_-jb0.js +111 -0
- package/dist/compact.runtime-C9a0kRAg.js +116 -0
- package/dist/completion-cli-Bg95upyk.js +17 -0
- package/dist/completion-cli-CrPdlnCH.js +445 -0
- package/dist/config-BbvDRSYp.js +31 -0
- package/dist/config-CwBv71QC.js +44 -0
- package/dist/config-cli-jsZsYhAl.js +678 -0
- package/dist/config-guard-DTaXXqly.js +118 -0
- package/dist/config-validation-Q6U1sP84.js +262 -0
- package/dist/config-value-DT3-5958.js +132 -0
- package/dist/configure-BJfMiVej.js +1100 -0
- package/dist/configure-Cist3Iza.js +243 -0
- package/dist/control-ui-assets-C1YDYi82.js +232 -0
- package/dist/control-ui-shared-Dm5Dh0Lo.js +29 -0
- package/dist/core-BwKq3krw.js +150 -0
- package/dist/core-hjBwfDsW.d.ts +87 -0
- package/dist/cron-cli-Bktbk7iP.js +639 -0
- package/dist/daemon-cli-BXyH8DBL.js +339 -0
- package/dist/daemon-install-mxcGYsRJ.js +180 -0
- package/dist/deliver-BPYUKaSp.js +111 -0
- package/dist/deliver-runtime-CwnLQZTN.js +111 -0
- package/dist/device-id-cli-XvwZbIyC.js +52 -0
- package/dist/device-identity-IG5DngWM.js +365 -0
- package/dist/devices-cli-DIsxj4xp.js +342 -0
- package/dist/diagnostic-DTPopFvh.js +310 -0
- package/dist/directory-cli-D253m0er.js +311 -0
- package/dist/directory-config-helpers-DpFcAbmo.d.ts +38 -0
- package/dist/directory.static-BXv9MXqm.js +44 -0
- package/dist/discord-DwFf1qp7.js +114 -0
- package/dist/discovery-DzRM1wzK.js +48 -0
- package/dist/dm-policy-shared-DKoGdUpY.d.ts +95 -0
- package/dist/dns-cli-BJiz6CLK.js +217 -0
- package/dist/docs-cli-Dq2Yi5qO.js +174 -0
- package/dist/doctor-completion-BPl6HiiZ.js +90 -0
- package/dist/doctor-config-flow-BHR1Ayyh.js +2437 -0
- package/dist/doctor-config-flow-PXVtrfkE.js +112 -0
- package/dist/enable-Cyagpq3b.js +24 -0
- package/dist/entry.js +4 -4
- package/dist/exec-approvals-cli-kLAev6bP.js +421 -0
- package/dist/extensions/acpx/index.d.ts +1 -1
- package/dist/extensions/amazon-bedrock/index.d.ts +1 -1
- package/dist/extensions/amazon-bedrock/index.js +4 -4
- package/dist/extensions/anthropic/index.d.ts +1 -1
- package/dist/extensions/anthropic/index.js +35 -35
- package/dist/extensions/bluebubbles/index.d.ts +1 -1
- package/dist/extensions/bluebubbles/index.js +39 -39
- package/dist/extensions/bluebubbles/setup-entry.d.ts +2 -2
- package/dist/extensions/bluebubbles/setup-entry.js +39 -39
- package/dist/extensions/brave/index.d.ts +1 -1
- package/dist/extensions/brave/index.js +5 -5
- package/dist/extensions/byteplus/index.d.ts +1 -1
- package/dist/extensions/byteplus/index.js +35 -35
- package/dist/extensions/cloudflare-ai-gateway/index.d.ts +1 -1
- package/dist/extensions/cloudflare-ai-gateway/index.js +36 -36
- package/dist/extensions/copilot-proxy/index.d.ts +1 -1
- package/dist/extensions/copilot-proxy/index.js +4 -4
- package/dist/extensions/device-pair/index.d.ts +1 -1
- package/dist/extensions/device-pair/index.js +4 -4
- package/dist/extensions/diagnostics-otel/index.d.ts +1 -1
- package/dist/extensions/diagnostics-otel/index.js +4 -4
- package/dist/extensions/diffs/index.d.ts +1 -1
- package/dist/extensions/discord/index.d.ts +1 -1
- package/dist/extensions/discord/index.js +40 -40
- package/dist/extensions/discord/setup-entry.d.ts +1 -1
- package/dist/extensions/discord/setup-entry.js +38 -38
- package/dist/extensions/elevenlabs/index.d.ts +1 -1
- package/dist/extensions/elevenlabs/index.js +35 -35
- package/dist/extensions/feishu/index.d.ts +2 -2
- package/dist/extensions/feishu/index.js +40 -40
- package/dist/extensions/feishu/setup-entry.d.ts +2 -2
- package/dist/extensions/feishu/setup-entry.js +37 -37
- package/dist/extensions/firecrawl/index.d.ts +1 -1
- package/dist/extensions/firecrawl/index.js +35 -35
- package/dist/extensions/github-copilot/index.d.ts +1 -1
- package/dist/extensions/github-copilot/index.js +35 -35
- package/dist/extensions/google/index.d.ts +1 -1
- package/dist/extensions/google/index.js +35 -35
- package/dist/extensions/googlechat/index.d.ts +1 -1
- package/dist/extensions/googlechat/index.js +38 -38
- package/dist/extensions/googlechat/setup-entry.d.ts +1 -1
- package/dist/extensions/googlechat/setup-entry.js +38 -38
- package/dist/extensions/huggingface/index.d.ts +1 -1
- package/dist/extensions/huggingface/index.js +35 -35
- package/dist/extensions/imessage/index.d.ts +1 -1
- package/dist/extensions/imessage/index.js +39 -39
- package/dist/extensions/imessage/setup-entry.d.ts +1 -1
- package/dist/extensions/imessage/setup-entry.js +39 -39
- package/dist/extensions/irc/index.d.ts +1 -1
- package/dist/extensions/irc/index.js +38 -38
- package/dist/extensions/irc/setup-entry.d.ts +2 -2
- package/dist/extensions/irc/setup-entry.js +38 -38
- package/dist/extensions/kakao-talkchannel/index.d.ts +1 -1
- package/dist/extensions/kakao-talkchannel/index.js +4 -4
- package/dist/extensions/kilocode/index.d.ts +1 -1
- package/dist/extensions/kilocode/index.js +35 -35
- package/dist/extensions/kimi-coding/index.d.ts +1 -1
- package/dist/extensions/kimi-coding/index.js +35 -35
- package/dist/extensions/line/index.d.ts +1 -1
- package/dist/extensions/line/index.js +37 -37
- package/dist/extensions/line/setup-entry.d.ts +1 -1
- package/dist/extensions/line/setup-entry.js +37 -37
- package/dist/extensions/llm-task/index.d.ts +1 -1
- package/dist/extensions/llm-task/index.js +35 -35
- package/dist/extensions/lobster/index.d.ts +1 -1
- package/dist/extensions/lobster/index.js +4 -4
- package/dist/extensions/matrix/index.d.ts +1 -1
- package/dist/extensions/matrix/index.js +40 -40
- package/dist/extensions/matrix/setup-entry.d.ts +2 -2
- package/dist/extensions/matrix/setup-entry.js +40 -40
- package/dist/extensions/mattermost/index.d.ts +1 -1
- package/dist/extensions/mattermost/index.js +37 -37
- package/dist/extensions/mattermost/setup-entry.d.ts +2 -2
- package/dist/extensions/mattermost/setup-entry.js +37 -37
- package/dist/extensions/memory-core/index.d.ts +1 -1
- package/dist/extensions/memory-core/index.js +4 -4
- package/dist/extensions/memory-lancedb/index.d.ts +1 -1
- package/dist/extensions/memory-lancedb/index.js +4 -4
- package/dist/extensions/microsoft/index.d.ts +1 -1
- package/dist/extensions/microsoft/index.js +35 -35
- package/dist/extensions/minimax/index.d.ts +1 -1
- package/dist/extensions/minimax/index.js +35 -35
- package/dist/extensions/mistral/index.d.ts +1 -1
- package/dist/extensions/mistral/index.js +35 -35
- package/dist/extensions/modelstudio/index.d.ts +1 -1
- package/dist/extensions/modelstudio/index.js +35 -35
- package/dist/extensions/moonshot/index.d.ts +1 -1
- package/dist/extensions/moonshot/index.js +35 -35
- package/dist/extensions/msteams/index.d.ts +1 -1
- package/dist/extensions/msteams/index.js +40 -40
- package/dist/extensions/msteams/setup-entry.d.ts +1 -1
- package/dist/extensions/msteams/setup-entry.js +40 -40
- package/dist/extensions/nextcloud-talk/index.d.ts +1 -1
- package/dist/extensions/nextcloud-talk/index.js +37 -37
- package/dist/extensions/nextcloud-talk/setup-entry.d.ts +2 -2
- package/dist/extensions/nextcloud-talk/setup-entry.js +37 -37
- package/dist/extensions/nostr/index.d.ts +1 -1
- package/dist/extensions/nostr/index.js +37 -37
- package/dist/extensions/nostr/setup-entry.d.ts +1 -1
- package/dist/extensions/nostr/setup-entry.js +37 -37
- package/dist/extensions/nvidia/index.d.ts +1 -1
- package/dist/extensions/nvidia/index.js +4 -4
- package/dist/extensions/ollama/index.d.ts +1 -1
- package/dist/extensions/ollama/index.js +7 -7
- package/dist/extensions/open-prose/index.d.ts +1 -1
- package/dist/extensions/open-prose/index.js +4 -4
- package/dist/extensions/openai/index.d.ts +1 -1
- package/dist/extensions/openai/index.js +35 -35
- package/dist/extensions/opencode/index.d.ts +1 -1
- package/dist/extensions/opencode/index.js +35 -35
- package/dist/extensions/opencode-go/index.d.ts +1 -1
- package/dist/extensions/opencode-go/index.js +35 -35
- package/dist/extensions/openrouter/index.d.ts +1 -1
- package/dist/extensions/openrouter/index.js +35 -35
- package/dist/extensions/openshell/index.d.ts +1 -1
- package/dist/extensions/openshell/index.js +35 -35
- package/dist/extensions/perplexity/index.d.ts +1 -1
- package/dist/extensions/perplexity/index.js +5 -5
- package/dist/extensions/phone-control/index.d.ts +1 -1
- package/dist/extensions/phone-control/index.js +4 -4
- package/dist/extensions/qianfan/index.d.ts +1 -1
- package/dist/extensions/qianfan/index.js +35 -35
- package/dist/extensions/qwen-portal-auth/index.d.ts +1 -1
- package/dist/extensions/qwen-portal-auth/index.js +35 -35
- package/dist/extensions/sglang/index.d.ts +1 -1
- package/dist/extensions/sglang/index.js +35 -35
- package/dist/extensions/signal/index.d.ts +1 -1
- package/dist/extensions/signal/index.js +38 -38
- package/dist/extensions/signal/setup-entry.d.ts +1 -1
- package/dist/extensions/signal/setup-entry.js +38 -38
- package/dist/extensions/slack/index.d.ts +1 -1
- package/dist/extensions/slack/index.js +39 -39
- package/dist/extensions/slack/setup-entry.d.ts +1 -1
- package/dist/extensions/slack/setup-entry.js +38 -38
- package/dist/extensions/synology-chat/index.d.ts +1 -1
- package/dist/extensions/synology-chat/index.js +37 -37
- package/dist/extensions/synology-chat/setup-entry.d.ts +1 -1
- package/dist/extensions/synology-chat/setup-entry.js +37 -37
- package/dist/extensions/synthetic/index.d.ts +1 -1
- package/dist/extensions/synthetic/index.js +35 -35
- package/dist/extensions/talk-voice/index.d.ts +1 -1
- package/dist/extensions/talk-voice/index.js +35 -35
- package/dist/extensions/telegram/index.d.ts +1 -1
- package/dist/extensions/telegram/index.js +38 -38
- package/dist/extensions/telegram/setup-entry.d.ts +1 -1
- package/dist/extensions/telegram/setup-entry.js +37 -37
- package/dist/extensions/thread-ownership/index.d.ts +1 -1
- package/dist/extensions/thread-ownership/index.js +4 -4
- package/dist/extensions/tlon/index.d.ts +1 -1
- package/dist/extensions/tlon/index.js +37 -37
- package/dist/extensions/tlon/setup-entry.d.ts +1 -1
- package/dist/extensions/tlon/setup-entry.js +37 -37
- package/dist/extensions/together/index.d.ts +1 -1
- package/dist/extensions/together/index.js +35 -35
- package/dist/extensions/twitch/index.d.ts +2 -2
- package/dist/extensions/twitch/index.js +37 -37
- package/dist/extensions/venice/index.d.ts +1 -1
- package/dist/extensions/venice/index.js +35 -35
- package/dist/extensions/vercel-ai-gateway/index.d.ts +1 -1
- package/dist/extensions/vercel-ai-gateway/index.js +36 -36
- package/dist/extensions/vllm/index.d.ts +1 -1
- package/dist/extensions/vllm/index.js +35 -35
- package/dist/extensions/voice-call/index.d.ts +1 -1
- package/dist/extensions/voice-call/index.js +35 -35
- package/dist/extensions/volcengine/index.d.ts +1 -1
- package/dist/extensions/volcengine/index.js +35 -35
- package/dist/extensions/whatsapp/index.d.ts +1 -1
- package/dist/extensions/whatsapp/index.js +38 -38
- package/dist/extensions/whatsapp/setup-entry.d.ts +1 -1
- package/dist/extensions/whatsapp/setup-entry.js +38 -38
- package/dist/extensions/xai/index.d.ts +1 -1
- package/dist/extensions/xai/index.js +35 -35
- package/dist/extensions/xiaomi/index.d.ts +1 -1
- package/dist/extensions/xiaomi/index.js +35 -35
- package/dist/extensions/zai/index.d.ts +1 -1
- package/dist/extensions/zai/index.js +35 -35
- package/dist/extensions/zalo/index.d.ts +1 -1
- package/dist/extensions/zalo/index.js +39 -39
- package/dist/extensions/zalo/setup-entry.d.ts +1 -1
- package/dist/extensions/zalo/setup-entry.js +39 -39
- package/dist/extensions/zalouser/index.d.ts +1 -1
- package/dist/extensions/zalouser/index.js +40 -40
- package/dist/extensions/zalouser/setup-entry.d.ts +1 -1
- package/dist/extensions/zalouser/setup-entry.js +40 -40
- package/dist/feishu-fIcnHDTd.d.ts +36 -0
- package/dist/gateway-cli-DofujQf3.js +26437 -0
- package/dist/gateway-install-token-vvtOvufH.js +163 -0
- package/dist/gateway-rpc-C0Vk51W7.js +26 -0
- package/dist/gateway-runtime-CBm3CCoA.js +69 -0
- package/dist/git-commit-BTWXFY41.js +177 -0
- package/dist/git-commit-D6GTN5Yt.js +2 -0
- package/dist/googlechat-BvwsCVKl.d.ts +12 -0
- package/dist/googlechat-DzoFLiDG.js +307 -0
- package/dist/group-access-DpiQnd-G.d.ts +61 -0
- package/dist/health-CqUU_ecm.js +570 -0
- package/dist/health-Dzn8BT5I.js +113 -0
- package/dist/heartbeat-summary-Dct2lqJj.js +57 -0
- package/dist/help-CtwSApfq.js +81 -0
- package/dist/hooks-9gokOxZ5.d.ts +6 -0
- package/dist/hooks-cli-DtBvd1lb.js +1000 -0
- package/dist/hooks-status-Bm_pGORf.js +78 -0
- package/dist/http-registry-D-S6a1Na.d.ts +20 -0
- package/dist/identity-file-Diub2a0t.js +60 -0
- package/dist/image-generation-CbIVzmAR.d.ts +9 -0
- package/dist/imessage-C7Z59nbV.js +31 -0
- package/dist/imessage-scXvYYHX.js +115 -0
- package/dist/inbound-reply-dispatch-gzPJFtkc.js +71 -0
- package/dist/inbound-reply-dispatch-n7U3qg15.d.ts +72 -0
- package/dist/index.js +2 -2
- package/dist/install-target-B4n74f_B.js +574 -0
- package/dist/installs-e1WEcS2x.js +532 -0
- package/dist/io-BaBxjB1v.js +9739 -0
- package/dist/io-CgHb1Jld.js +29 -0
- package/dist/irc-DxJ7uOKl.js +672 -0
- package/dist/library-DjjiKiBC.js +112 -0
- package/dist/lifecycle-core-Dn8PK6nk.js +382 -0
- package/dist/line/accounts.d.ts +2 -2
- package/dist/line/send.d.ts +1 -1
- package/dist/line/send.js +7 -7
- package/dist/line/template-messages.d.ts +1 -1
- package/dist/line-B5QFpgN_.d.ts +75 -0
- package/dist/line-BBiBiGgL.js +530 -0
- package/dist/llm-slug-generator-BQ09Fz6D.js +67 -0
- package/dist/llm-slug-generator.d.ts +1 -1
- package/dist/llm-slug-generator.js +36 -36
- package/dist/logging-CdisccbY.js +13 -0
- package/dist/logging-LKQSgX1d.js +30 -0
- package/dist/login-qr-B2ElPfmb.js +112 -0
- package/dist/login-qr-Di3uPIK1.js +233 -0
- package/dist/logs-cli-CNzOvZ2d.js +256 -0
- package/dist/manager-runtime-2RwW64dE.js +111 -0
- package/dist/manager.runtime-BacHmSFL.js +715 -0
- package/dist/manifest-registry-CS_p1OBQ.js +1329 -0
- package/dist/matrix-43_RGLZN.d.ts +68 -0
- package/dist/matrix-6-xpfQHf.js +1269 -0
- package/dist/matrix-DKYdZvGK.js +1495 -0
- package/dist/mcp-cli-Ci2jvv3s.js +87 -0
- package/dist/media-understanding.runtime-0668UZMb.js +116 -0
- package/dist/memory-cli-BGfRJOPh.js +111 -0
- package/dist/memory-search-BHhETk6u.js +17 -0
- package/dist/memory-search-tTD5o_rU.js +204 -0
- package/dist/method-scopes-B2ZKSsxQ.js +2452 -0
- package/dist/model-auth-markers-LqZ4qhrZ.d.ts +20 -0
- package/dist/model-picker-D9Gmg9vM.js +390 -0
- package/dist/model-picker-VOam6Dfa.js +112 -0
- package/dist/model-picker.runtime-B8h4yaGk.js +125 -0
- package/dist/model-selection-bBBxfXdb.js +653 -0
- package/dist/model-suppression.runtime-IpdzuuaW.js +116 -0
- package/dist/models-CEr8OkSA.js +118 -0
- package/dist/models-FgjlnyvT.js +2514 -0
- package/dist/models-cli-CdXULEZe.js +309 -0
- package/dist/models-config-UQxq76ac.js +111 -0
- package/dist/models-config.providers.discovery-puxTsH39.d.ts +18 -0
- package/dist/moldclaw-root-Cb6HRlUO.js +92 -0
- package/dist/monitor-BGAB5pZp.js +772 -0
- package/dist/monitor-C_1qA4q5.js +6823 -0
- package/dist/monitor-D8WcCUuA.js +782 -0
- package/dist/monitor-DesGoihT.js +113 -0
- package/dist/monitor-DhrUY3U6.js +3468 -0
- package/dist/monitor-DsDCIG87.js +3076 -0
- package/dist/monitor-dBB-luY7.js +115 -0
- package/dist/monitor-shared-CkicpwVc.js +444 -0
- package/dist/msteams-qmY7xMCK.js +852 -0
- package/dist/node-cli-B_2nTm80.js +2503 -0
- package/dist/node-resolve-BYC2FbO2.js +835 -0
- package/dist/nodes-cli-CBX71Wd_.js +1380 -0
- package/dist/nostr-BFKRoOlz.d.ts +7 -0
- package/dist/nostr-OB78XVlq.js +8744 -0
- package/dist/npm-resolution-DZJB3Hgh.js +60 -0
- package/dist/oauth-env-CLG8KOrz.js +10 -0
- package/dist/onboard-BON0C360.js +48 -0
- package/dist/onboard-DsKI17iq.js +25 -0
- package/dist/onboard-DyBwXVGT.js +589 -0
- package/dist/onboard-channels-BaVA02kK.js +1241 -0
- package/dist/onboard-channels-JJVMXpKl.js +205 -0
- package/dist/onboard-custom-D6YDrk9n.js +571 -0
- package/dist/onboard-custom-DqsNalL1.js +114 -0
- package/dist/onboard-helpers-DiSRTpZC.js +335 -0
- package/dist/onboard-helpers-DqZsjdb8.js +113 -0
- package/dist/onboard-hooks-pzEPZAvl.js +72 -0
- package/dist/onboard-remote-DFMLELsg.js +181 -0
- package/dist/onboard-remote-DmMYxY80.js +117 -0
- package/dist/onboard-search-B7FsNd7m.js +302 -0
- package/dist/onboard-skills-BJRdI-K3.js +133 -0
- package/dist/onboard-skills-Cg1YQAZa.js +117 -0
- package/dist/outbound-media-BHD4aJEX.d.ts +11 -0
- package/dist/outbound-media-CrraEXXv.js +11 -0
- package/dist/pairing-access-CzHpaM0R.d.ts +21 -0
- package/dist/pairing-cli-DSQTYgc0.js +217 -0
- package/dist/perplexity-CXwMDD3u.js +24 -0
- package/dist/persistent-dedupe-B9vrAf8t.d.ts +26 -0
- package/dist/pi-model-discovery-runtime-vSSbBDFG.js +111 -0
- package/dist/pi-tools.before-tool-call.runtime-C5yLUogH.js +381 -0
- package/dist/plugin-install-B1RfdrdV.js +117 -0
- package/dist/plugin-install-C9aaL42Y.js +184 -0
- package/dist/plugin-install-plan-BlfDt117.js +49 -0
- package/dist/plugin-registry-D2P9SYJ9.js +113 -0
- package/dist/plugin-registry-QtjVXmj3.js +49 -0
- package/dist/plugin-sdk/account-resolution.js +35 -35
- package/dist/plugin-sdk/acp-runtime.js +35 -35
- package/dist/plugin-sdk/agent-runtime.js +35 -35
- package/dist/plugin-sdk/bluebubbles.js +37 -37
- package/dist/plugin-sdk/channel-config-helpers.js +35 -35
- package/dist/plugin-sdk/channel-policy.js +35 -35
- package/dist/plugin-sdk/channel-runtime.js +35 -35
- package/dist/plugin-sdk/compat.js +36 -36
- package/dist/plugin-sdk/config-runtime.js +35 -35
- package/dist/plugin-sdk/conversation-runtime.js +35 -35
- package/dist/plugin-sdk/copilot-proxy.js +4 -4
- package/dist/plugin-sdk/core.js +4 -4
- package/dist/plugin-sdk/device-pair.js +4 -4
- package/dist/plugin-sdk/discord.js +35 -35
- package/dist/plugin-sdk/feishu.js +35 -35
- package/dist/plugin-sdk/gateway-runtime.js +10 -10
- package/dist/plugin-sdk/googlechat.js +37 -37
- package/dist/plugin-sdk/image-generation-runtime.js +35 -35
- package/dist/plugin-sdk/image-generation.js +35 -35
- package/dist/plugin-sdk/imessage.js +36 -36
- package/dist/plugin-sdk/index.js +35 -35
- package/dist/plugin-sdk/infra-runtime.js +35 -35
- package/dist/plugin-sdk/irc.js +37 -37
- package/dist/plugin-sdk/line.js +36 -36
- package/dist/plugin-sdk/llm-task.js +35 -35
- package/dist/plugin-sdk/lobster.js +4 -4
- package/dist/plugin-sdk/matrix.js +37 -37
- package/dist/plugin-sdk/mattermost.js +36 -36
- package/dist/plugin-sdk/media-runtime.js +35 -35
- package/dist/plugin-sdk/media-understanding-runtime.js +35 -35
- package/dist/plugin-sdk/media-understanding.js +35 -35
- package/dist/plugin-sdk/memory-lancedb.js +4 -4
- package/dist/plugin-sdk/minimax-portal-auth.js +4 -4
- package/dist/plugin-sdk/msteams.js +38 -38
- package/dist/plugin-sdk/nextcloud-talk.js +36 -36
- package/dist/plugin-sdk/nostr.js +36 -36
- package/dist/plugin-sdk/ollama-setup.js +9 -9
- package/dist/plugin-sdk/open-prose.js +4 -4
- package/dist/plugin-sdk/phone-control.js +4 -4
- package/dist/plugin-sdk/plugin-runtime.js +35 -35
- package/dist/plugin-sdk/provider-auth.js +35 -35
- package/dist/plugin-sdk/provider-models.js +5 -5
- package/dist/plugin-sdk/provider-onboard.js +4 -4
- package/dist/plugin-sdk/provider-setup.js +39 -39
- package/dist/plugin-sdk/provider-stream.js +4 -4
- package/dist/plugin-sdk/provider-usage.js +4 -4
- package/dist/plugin-sdk/qwen-portal-auth.js +35 -35
- package/dist/plugin-sdk/reply-history.js +35 -35
- package/dist/plugin-sdk/reply-runtime.js +35 -35
- package/dist/plugin-sdk/routing.js +3 -3
- package/dist/plugin-sdk/sandbox.js +35 -35
- package/dist/plugin-sdk/security-runtime.js +35 -35
- package/dist/plugin-sdk/self-hosted-provider-setup.js +37 -37
- package/dist/plugin-sdk/setup.js +35 -35
- package/dist/plugin-sdk/signal.js +35 -35
- package/dist/plugin-sdk/slack.js +35 -35
- package/dist/plugin-sdk/speech-runtime.js +35 -35
- package/dist/plugin-sdk/speech.js +35 -35
- package/dist/plugin-sdk/src/secrets/secure-file-store.d.ts +26 -0
- package/dist/plugin-sdk/src/subscription/provider.d.ts +5 -3
- package/dist/plugin-sdk/synology-chat.js +36 -36
- package/dist/plugin-sdk/talk-voice.js +4 -4
- package/dist/plugin-sdk/telegram.js +35 -35
- package/dist/plugin-sdk/text-runtime.js +7 -7
- package/dist/plugin-sdk/thread-ownership.js +4 -4
- package/dist/plugin-sdk/tlon.js +36 -36
- package/dist/plugin-sdk/twitch.js +35 -35
- package/dist/plugin-sdk/voice-call.js +35 -35
- package/dist/plugin-sdk/whatsapp.js +35 -35
- package/dist/plugin-sdk/zalo.js +38 -38
- package/dist/plugin-sdk/zalouser.js +38 -38
- package/dist/plugins/runtime/index.d.ts +1 -1
- package/dist/plugins/runtime/index.js +35 -35
- package/dist/plugins-CAULK-lt.js +111 -0
- package/dist/plugins-cli-BGAgYy3Z.js +917 -0
- package/dist/policy-WKZJ8cPK.js +143 -0
- package/dist/preflight-audio.runtime-Bc6Hv-u4.js +116 -0
- package/dist/probe-B7a_VBCB.js +47 -0
- package/dist/probe-BLioBOhT.js +6329 -0
- package/dist/probe-BkM5pykD.js +21 -0
- package/dist/probe-DOEaWez2.js +1793 -0
- package/dist/probe-DpcJ0WeP.js +129 -0
- package/dist/probe-auth-BcNjX8hy.js +40 -0
- package/dist/probe-auth-DhuAb8ls.js +48 -0
- package/dist/program-zG0CuBsn.js +253 -0
- package/dist/prompt-select-styled-B-D6NQFO.js +2673 -0
- package/dist/provider-api-key-auth.runtime-DgGM_pHf.js +121 -0
- package/dist/provider-auth-choice-BOQA0idb.js +126 -0
- package/dist/provider-auth-choice-helpers-hzDkh3f1.js +48 -0
- package/dist/provider-auth-choice-preference-BPcuoO9b.js +189 -0
- package/dist/provider-auth-choice.runtime-B4E0A4J8.js +123 -0
- package/dist/provider-auth-choices-0KaDNPBQ.js +57 -0
- package/dist/provider-auth-guidance-BxxMxMEt.js +34 -0
- package/dist/provider-auth-result-Bto1bYtS.d.ts +18 -0
- package/dist/provider-models-DxOmeToO.d.ts +867 -0
- package/dist/provider-models-xnyxy6mO.js +2113 -0
- package/dist/provider-ollama-setup-DBYK__ov.d.ts +32 -0
- package/dist/provider-ollama-setup-QzgCxj44.js +314 -0
- package/dist/provider-onboard-B9ionepI.js +139 -0
- package/dist/provider-onboard-CURxJ_UX.d.ts +40 -0
- package/dist/provider-runtime.runtime-DFAIaPZT.js +111 -0
- package/dist/provider-self-hosted-setup-CclMg3QB.js +182 -0
- package/dist/provider-self-hosted-setup-qeY8BYSy.d.ts +61 -0
- package/dist/provider-stream-Chz_EFw3.js +512 -0
- package/dist/provider-usage-Cn_OrdMP.js +111 -0
- package/dist/provider-usage-kxemdMp2.js +633 -0
- package/dist/provider-wizard-BMc1Dzks.js +152 -0
- package/dist/push-apns-CuIs_G0k.js +1038 -0
- package/dist/pw-ai-DUe4BbH2.js +1867 -0
- package/dist/qmd-manager-CAAFp7qK.js +1570 -0
- package/dist/qr-cli-9H9go9JE.js +113 -0
- package/dist/qr-cli-Bxxttvx3.js +369 -0
- package/dist/reactions-Dx2ypGlm.js +281 -0
- package/dist/read-only-account-inspect.discord.runtime-D_RVd1-r.js +116 -0
- package/dist/read-only-account-inspect.slack.runtime-Ckl92Rhy.js +116 -0
- package/dist/read-only-account-inspect.telegram.runtime-D97ssjQk.js +116 -0
- package/dist/redact-snapshot-ojhTflxp.js +2663 -0
- package/dist/register.agent-DlBmy_RL.js +439 -0
- package/dist/register.backup-8nOYtJqg.js +625 -0
- package/dist/register.configure-BV_GUQ5w.js +252 -0
- package/dist/register.maintenance-BafAHBum.js +574 -0
- package/dist/register.message-CHhfcEq2.js +709 -0
- package/dist/register.onboard-DjPNnlnr.js +192 -0
- package/dist/register.setup-BMGXI9PG.js +212 -0
- package/dist/register.status-health-sessions-BJMsh2AL.js +498 -0
- package/dist/register.subclis-B7nrik3-.js +315 -0
- package/dist/register.subclis-BCoAVyGn.js +13 -0
- package/dist/replies-BU4AvOyD.js +110 -0
- package/dist/resolve-channels-CDfj5NGq.js +226 -0
- package/dist/resolve-channels-Cz120Lvf.js +262 -0
- package/dist/resolve-route-DdX-HBVt.js +538 -0
- package/dist/resolve-users-Bc6nRqpb.js +143 -0
- package/dist/root-help-QAkoA7GD.js +32 -0
- package/dist/routes-CcJNnwTF.js +7097 -0
- package/dist/rpc-DDUAlBbH.js +67 -0
- package/dist/run-main-Cf8vXm6i.js +424 -0
- package/dist/runtime-Bitmi8Er.d.ts +26 -0
- package/dist/runtime-discord-ops.runtime-DWBnG-Hf.js +9078 -0
- package/dist/runtime-slack-ops.runtime-oYfbYvX4.js +4556 -0
- package/dist/runtime-telegram-ops.runtime-EPGDYN1f.js +133 -0
- package/dist/runtime-whatsapp-login.runtime-BGJoKM2h.js +114 -0
- package/dist/runtime-whatsapp-outbound.runtime-D3Sag6Bv.js +117 -0
- package/dist/sandbox-cli-waaYyhsC.js +535 -0
- package/dist/search-manager-BjDsOXzB.js +16 -0
- package/dist/search-manager-D-G9UaXe.js +386 -0
- package/dist/secrets-cli-BmeEhlzt.js +2070 -0
- package/dist/security-cli-CSsLnFuN.js +575 -0
- package/dist/send-6o7piqfv.js +100 -0
- package/dist/send-99FyFLgk.js +629 -0
- package/dist/send-B1pX9_Oc.js +283 -0
- package/dist/send-Dg5-AjXW.js +1025 -0
- package/dist/send-LdV9TRoN.js +631 -0
- package/dist/server-node-events-BAUUKNFW.js +506 -0
- package/dist/server-zI_K-D05.js +107 -0
- package/dist/sessions-DJGywtY2.js +112 -0
- package/dist/sessions-WR0GKdGl.js +218 -0
- package/dist/setup-2LvBON2J.js +387 -0
- package/dist/setup-CFIMq-Pz.d.ts +37 -0
- package/dist/setup-binary-CcAv8NXz.js +406 -0
- package/dist/setup-browser-C4eRV3h6.js +70 -0
- package/dist/setup-core-ByqF8Nvc.js +166 -0
- package/dist/setup-core-COkq8Zop.js +205 -0
- package/dist/setup-core-C_o77DVV.js +143 -0
- package/dist/setup-core-tAdHbqi9.js +47 -0
- package/dist/setup-surface-DMHtZByF.js +490 -0
- package/dist/setup-wizard-helpers-r0J6l8ST.d.ts +203 -0
- package/dist/setup.finalize-pTkXn8pV.js +522 -0
- package/dist/setup.gateway-config-D1wiUQe6.js +343 -0
- package/dist/shared-BaM_tMxk.js +102 -0
- package/dist/shared-BgUgXsM9.js +75 -0
- package/dist/shared-CezRuVfl.js +96 -0
- package/dist/shared-DQgf3R0B.js +298 -0
- package/dist/shared-RA6kxQfu.js +182 -0
- package/dist/signal-xxP4dGx7.js +114 -0
- package/dist/skills-Bio8GwTE.js +20 -0
- package/dist/skills-DE_MXFSN.js +853 -0
- package/dist/skills-cli-BGuW-tKw.js +292 -0
- package/dist/skills-install-BIlG41ei.js +763 -0
- package/dist/skills-status-B08PtBc_.js +21 -0
- package/dist/skills-status-CzM008aB.js +169 -0
- package/dist/slack-Bzt3M7d8.js +114 -0
- package/dist/slash-commands.runtime-EYqj8SbV.js +128 -0
- package/dist/slash-dispatch.runtime-vWH92PUY.js +141 -0
- package/dist/slash-skill-commands.runtime-sUTjM3J0.js +116 -0
- package/dist/src-Iso9-DPo.js +1701 -0
- package/dist/status-8S882KRO.js +43 -0
- package/dist/status-BF7h_jTB.js +126 -0
- package/dist/status-DxOIyRm9.js +131 -0
- package/dist/status-HlvixAOq.js +606 -0
- package/dist/status-json-CShBo8A6.js +288 -0
- package/dist/status-qhtgsJFd.js +1599 -0
- package/dist/status.link-channel-D3dLYZiH.js +143 -0
- package/dist/status.scan.deps.runtime-mCmOLzpG.js +126 -0
- package/dist/status.scan.runtime-CYuUlDeg.js +119 -0
- package/dist/status.summary-BjB1aTjV.js +592 -0
- package/dist/status.summary.runtime-DW4MOt1Z.js +118 -0
- package/dist/status.update-BxblMS7P.js +77 -0
- package/dist/subagent-orphan-recovery-CCVopsdP.js +307 -0
- package/dist/subagent-registry-runtime-oG47Fzvg.js +111 -0
- package/dist/subscription-CpFdxuFS.js +33 -0
- package/dist/subscription-DaA1urx-.js +102 -0
- package/dist/subscription-cli-Bvto9EmO.js +134 -0
- package/dist/synology-chat-CVy1tJGY.js +297 -0
- package/dist/system-cli-BvNps8sl.js +94 -0
- package/dist/telegram/audit.d.ts +1 -1
- package/dist/telegram/audit.js +1 -1
- package/dist/telegram/token.d.ts +1 -1
- package/dist/telegram/token.js +35 -35
- package/dist/telegram-Dug8pd82.js +114 -0
- package/dist/text-chunking-CQ6ttpWs.js +84 -0
- package/dist/text-chunking-DDUU_vAF.d.ts +79 -0
- package/dist/tlon-BnckVr_7.js +433 -0
- package/dist/tui-DXTge9Ac.js +3834 -0
- package/dist/tui-cli-BRUfLUTd.js +137 -0
- package/dist/types-2H_e7eWT.d.ts +45 -0
- package/dist/types-ZKnGUchG.d.ts +22692 -0
- package/dist/types.base-BFiQZ4J9.d.ts +188 -0
- package/dist/ui--iP08xRA.js +31 -0
- package/dist/update-CtxBD-Cf.js +1036 -0
- package/dist/update-cli-DPE3GCHJ.js +1503 -0
- package/dist/update-offset-store-BlBY7dWj.js +112 -0
- package/dist/update-runner-Cfcrhf2j.js +1496 -0
- package/dist/upsert-with-lock-BZU7Le8n.js +33 -0
- package/dist/usage-Czgwvg0h.js +115 -0
- package/dist/web-BGDXhunB.js +112 -0
- package/dist/web-shared-B5Q0mIJq.d.ts +45 -0
- package/dist/webhook-request-guards-CsKDhZJr.d.ts +76 -0
- package/dist/webhook-targets-CjxuEE9C.d.ts +106 -0
- package/dist/webhook-targets-Dtt6rH4N.js +181 -0
- package/dist/webhooks-cli-Wl9y6AWW.js +350 -0
- package/dist/whatsapp-D64cBQ_9.js +114 -0
- package/dist/whatsapp-actions-CVoTcagb.js +167 -0
- package/dist/workspace-DJ_S272u.js +484 -0
- package/dist/workspace-DbZSqjw0.js +289 -0
- package/dist/workspace-cli-D93DLmAh.js +154 -0
- package/dist/workspace-dirs-CGeIPpGN.js +2003 -0
- package/dist/zalo-CK2dlGmu.d.ts +9 -0
- package/dist/zalo-DxoY8M22.js +415 -0
- package/dist/zalouser-DTHIrPvs.js +30911 -0
- package/extensions/discord/src/monitor/allow-list.ts +8 -1
- package/extensions/discord/src/monitor/message-handler.preflight.ts +4 -1
- package/package.json +1 -1
- package/dist/accounts-CS8U4v8C.js +0 -114
- package/dist/accounts-gLr-Udmt.d.ts +0 -103
- package/dist/acp-cli-BGT0jXcC.js +0 -2093
- package/dist/actions.runtime-BfckTw6c.js +0 -119
- package/dist/actions.runtime-Cl9mBfqH.js +0 -133
- package/dist/agent-scope-C-YmLnnb.js +0 -208
- package/dist/agents-CydD54p8.js +0 -222
- package/dist/agents-DpQsZO6O.js +0 -853
- package/dist/agents.config-XU7IsYE-.js +0 -121
- package/dist/agents.config-ssoQXuvF.js +0 -17
- package/dist/allow-list-Cfn6lmMK.js +0 -81
- package/dist/allowlist-CCYXVpM9.js +0 -142
- package/dist/api-BoXoFKxy.js +0 -117
- package/dist/audit-Bv05N5o9.js +0 -787
- package/dist/audit-CIWW1Aqm.js +0 -54
- package/dist/audit-channel.collect.runtime-Bi7yrdcO.js +0 -605
- package/dist/audit-channel.runtime-C_NDweiW.js +0 -121
- package/dist/audit-extra.async-Dp7OKSXg.js +0 -813
- package/dist/audit-membership-runtime-B8FQ6VtN.js +0 -162
- package/dist/audit.deep.runtime-CXhobL6b.js +0 -25
- package/dist/audit.nondeep.runtime-CrEm3T16.js +0 -832
- package/dist/audit.runtime-CJPKj1Zg.js +0 -118
- package/dist/auth-Byfp0flq.js +0 -101
- package/dist/auth-choice-BgOjdeXN.js +0 -507
- package/dist/auth-choice-CD1Heq0M.js +0 -122
- package/dist/auth-choice-ePNfg0iQ.js +0 -268
- package/dist/auth-choice-options-BlewQWI0.js +0 -123
- package/dist/auth-choice-prompt-BP2b6aXz.js +0 -36
- package/dist/auth-choice-prompt-Cmwl4n97.js +0 -115
- package/dist/auth-choice.apply-helpers-Dq-nxuuX.js +0 -66
- package/dist/auth-choice.plugin-providers.runtime-B23kOUzQ.js +0 -119
- package/dist/auth-profiles-1kPLbBwI.js +0 -127823
- package/dist/auth-profiles.runtime-DAfSjku1.js +0 -116
- package/dist/banner-DeOsobLO.js +0 -342
- package/dist/bluebubbles-BsLGedBM.js +0 -64
- package/dist/bluebubbles-U2sAfO4_.d.ts +0 -6
- package/dist/bot-DW12K3bO.d.ts +0 -478
- package/dist/brave-BoWimrLe.js +0 -24
- package/dist/browser-cli-D_S3wEYE.js +0 -1494
- package/dist/call-ByEzDJ1_.js +0 -640
- package/dist/call-CHCWVg-O.js +0 -39
- package/dist/channel-3VC0oOMu.js +0 -214
- package/dist/channel-B9fCBPiS.js +0 -207
- package/dist/channel-B9q775cM.js +0 -562
- package/dist/channel-BG3UK54j.js +0 -803
- package/dist/channel-BRQAdMML.js +0 -352
- package/dist/channel-BmlLp933.js +0 -1321
- package/dist/channel-By6KvdTG.js +0 -920
- package/dist/channel-C8rRsdf6.js +0 -226
- package/dist/channel-CLEDBbXE.js +0 -943
- package/dist/channel-CMvBAG7o.js +0 -306
- package/dist/channel-CmlxxjHY.js +0 -1598
- package/dist/channel-CqG6_xN0.js +0 -949
- package/dist/channel-DNueHKs92.js +0 -316
- package/dist/channel-DUtyN7BX.js +0 -4681
- package/dist/channel-DWD6GrfZ.js +0 -538
- package/dist/channel-DaRYMYzj.js +0 -619
- package/dist/channel-Dj6BgLp8.js +0 -575
- package/dist/channel-account-context-Ba3u5D21.js +0 -103
- package/dist/channel-crabk6Em.js +0 -542
- package/dist/channel-i8uqQaK2.js +0 -497
- package/dist/channel-options-xljvwHS2.js +0 -50
- package/dist/channel-plugin-ids-DAgknSG4.js +0 -26
- package/dist/channel-summary-dHTMCG75.js +0 -111
- package/dist/channel-xVWQ96Ni.js +0 -397
- package/dist/channel.runtime-B6PoZ4BV.js +0 -182
- package/dist/channel.runtime-BPZmo57e.js +0 -404
- package/dist/channel.runtime-B_1uGR-U.js +0 -199
- package/dist/channel.runtime-BiXnPU0d.js +0 -218
- package/dist/channel.runtime-BpvDc9sv.js +0 -870
- package/dist/channel.runtime-CUua3W80.js +0 -418
- package/dist/channel.runtime-CaCBTd0A.js +0 -179
- package/dist/channel.runtime-D0FfYvUj.js +0 -4011
- package/dist/channel.runtime-DhoJtpvJ.js +0 -241
- package/dist/channel.runtime-Kj9EXNE0.js +0 -127
- package/dist/channel.runtime-r4tPuPyh.js +0 -171
- package/dist/channel.setup-B7d_grfe.js +0 -6
- package/dist/channel.setup-C0vu1fhi.js +0 -9
- package/dist/channel.setup-CAI0FNHj.js +0 -11
- package/dist/channel.setup-CkDVwv5R.js +0 -57
- package/dist/channel.setup-Cpd00YqQ.js +0 -8
- package/dist/channel.setup-DbBz1-WT.js +0 -9
- package/dist/channel.setup-GZnAvD9g.js +0 -8
- package/dist/channels-5H484RSw.js +0 -1118
- package/dist/channels-BnPudfyx.js +0 -404
- package/dist/channels-cli-WIC-QeH_.js +0 -291
- package/dist/channels-status-issues-RDmzovJU.js +0 -16
- package/dist/clawbot-cli-BgutNwf8.js +0 -118
- package/dist/cleanup-utils-DBl1Aij1.js +0 -96
- package/dist/cli-1P7u6zqu.js +0 -154
- package/dist/command-registry-B8jovrws.js +0 -232
- package/dist/command-registry-DtDl1FVm.js +0 -14
- package/dist/command-secret-gateway-BgUo3FxJ.js +0 -111
- package/dist/compact.runtime-CXbXM0AU.js +0 -116
- package/dist/completion-cli-Cik_owAE.js +0 -17
- package/dist/completion-cli-RU3P2RSl.js +0 -445
- package/dist/config-5HUpB1L1.js +0 -31
- package/dist/config-cli-QHaUHoZI.js +0 -433
- package/dist/config-guard-C9Sn3pE-.js +0 -118
- package/dist/config-sW57gztj.js +0 -44
- package/dist/config-validation-5LkjIKNt.js +0 -262
- package/dist/config-value-CtTWALxG.js +0 -132
- package/dist/configure-BmR2TPLf.js +0 -243
- package/dist/configure-DaLN-5xM.js +0 -1100
- package/dist/control-ui-assets-CH3MYmAo.js +0 -232
- package/dist/control-ui-shared-CA77PTml.js +0 -29
- package/dist/core-CvDzLs7B.js +0 -150
- package/dist/core-dPA4nFkn.d.ts +0 -87
- package/dist/cron-cli-tguLpzyq.js +0 -639
- package/dist/daemon-cli-ptosOkL8.js +0 -339
- package/dist/daemon-install-DzU4EnVa.js +0 -180
- package/dist/deliver-DwxFoHM3.js +0 -111
- package/dist/deliver-runtime-DOdDyaPI.js +0 -111
- package/dist/device-id-cli-GopvlxxZ.js +0 -52
- package/dist/device-identity-CRfhC3_s.js +0 -365
- package/dist/devices-cli-ain7ESqU.js +0 -342
- package/dist/diagnostic-D96Xaqrj.js +0 -310
- package/dist/directory-cli-fh1UxGgY.js +0 -311
- package/dist/directory-config-helpers-CpU1oflo.d.ts +0 -38
- package/dist/directory.static-CKjJUNGl.js +0 -44
- package/dist/discord-CflhwDEM.js +0 -114
- package/dist/discovery-x0ZqY4AB.js +0 -48
- package/dist/dm-policy-shared-73A52W6E.d.ts +0 -95
- package/dist/dns-cli-DCHyKjGf.js +0 -217
- package/dist/docs-cli-D3OoqYSP.js +0 -174
- package/dist/doctor-completion-Bq2eP87s.js +0 -90
- package/dist/doctor-config-flow-D8XRG9Ku.js +0 -2437
- package/dist/doctor-config-flow-DGiF1HGc.js +0 -112
- package/dist/enable-0QSF4YGH.js +0 -24
- package/dist/exec-approvals-cli-Bncym0Gd.js +0 -421
- package/dist/feishu-B5JDcyF9.d.ts +0 -36
- package/dist/gateway-cli-DYscsmA-.js +0 -26437
- package/dist/gateway-install-token-CNv17ac9.js +0 -163
- package/dist/gateway-rpc-BGC1Rxvg.js +0 -26
- package/dist/gateway-runtime-D89mSQPB.js +0 -69
- package/dist/git-commit-CeLH5Ozm.js +0 -2
- package/dist/git-commit-DUKRiCP-.js +0 -177
- package/dist/googlechat-BgXeXjd1.js +0 -307
- package/dist/googlechat-De-T7C31.d.ts +0 -12
- package/dist/group-access-Deh1tVNr.d.ts +0 -61
- package/dist/health-BEjzWwaB.js +0 -570
- package/dist/health-FjqrWQL6.js +0 -113
- package/dist/heartbeat-summary-CfdSA9M1.js +0 -57
- package/dist/help-BZeVprq1.js +0 -81
- package/dist/hooks-B5pYs_d7.d.ts +0 -6
- package/dist/hooks-cli-B7uGJs2O.js +0 -1000
- package/dist/hooks-status-CfceaUSg.js +0 -78
- package/dist/http-registry-C-KXqwnj.d.ts +0 -20
- package/dist/identity-file-sshkKKIr.js +0 -60
- package/dist/image-generation-CafM5hZh.d.ts +0 -9
- package/dist/imessage-BcV3WGx_.js +0 -31
- package/dist/imessage-Dhje7Ty-.js +0 -115
- package/dist/inbound-reply-dispatch-C73_7SOl.js +0 -71
- package/dist/inbound-reply-dispatch-DmL0KWLe.d.ts +0 -72
- package/dist/install-target-D7NRhfzc.js +0 -574
- package/dist/installs-Bj6jblqc.js +0 -532
- package/dist/io-CMfWWPXQ.js +0 -9738
- package/dist/io-CV844hAM.js +0 -29
- package/dist/irc-DKi1fDYI.js +0 -672
- package/dist/library-rygTG3oA.js +0 -112
- package/dist/lifecycle-core-BPlvShWY.js +0 -382
- package/dist/line-CGsemKWJ.js +0 -530
- package/dist/line-CKU3ER-n.d.ts +0 -75
- package/dist/llm-slug-generator-DlhVyMqT.js +0 -67
- package/dist/logging-5wu9k6w4.js +0 -30
- package/dist/logging-CxP9suT8.js +0 -13
- package/dist/login-qr-BcDsiwHs.js +0 -233
- package/dist/login-qr-Y8pJ5yV4.js +0 -112
- package/dist/logs-cli-XI9oVXpH.js +0 -256
- package/dist/manager-runtime-DkIlXBhD.js +0 -111
- package/dist/manager.runtime-Q0q2rJCC.js +0 -715
- package/dist/manifest-registry-DAd0SRAP.js +0 -1329
- package/dist/matrix-BI0DBBrG.js +0 -1495
- package/dist/matrix-DiABGjJR.js +0 -1269
- package/dist/matrix-fC6NrFM5.d.ts +0 -68
- package/dist/mcp-cli-BOyn_DLL.js +0 -87
- package/dist/media-understanding.runtime-DjUa7Dka.js +0 -116
- package/dist/memory-cli-CJd_vl-Y.js +0 -111
- package/dist/memory-search-CEEItIFR.js +0 -17
- package/dist/memory-search-Cv1SBrn7.js +0 -204
- package/dist/method-scopes-CQE7-bZ-.js +0 -2452
- package/dist/model-auth-markers-B1bbs9Qd.d.ts +0 -20
- package/dist/model-picker-D6_89XHg.js +0 -112
- package/dist/model-picker-Svaw-APs.js +0 -390
- package/dist/model-picker.runtime-Chi9nV7A.js +0 -125
- package/dist/model-selection-hL8i1Jbs.js +0 -653
- package/dist/model-suppression.runtime-DjWJZ0X-.js +0 -116
- package/dist/models-7qj1dG_W.js +0 -118
- package/dist/models-BPOB_xJF.js +0 -2514
- package/dist/models-cli-DdlOVUjS.js +0 -309
- package/dist/models-config-CBqUS-jX.js +0 -111
- package/dist/models-config.providers.discovery-BKB5JH9M.d.ts +0 -18
- package/dist/moldclaw-root-D6PbhbZk.js +0 -88
- package/dist/monitor-BPYhkEqF.js +0 -782
- package/dist/monitor-BuTcQ24j.js +0 -3468
- package/dist/monitor-CuXvNhFh.js +0 -113
- package/dist/monitor-D-TqSIHF.js +0 -6823
- package/dist/monitor-DRSgo9u2.js +0 -3076
- package/dist/monitor-DcHch39z.js +0 -772
- package/dist/monitor-DsHBMrXp.js +0 -115
- package/dist/monitor-shared-CL8T4gt1.js +0 -444
- package/dist/msteams-7FMwTvQG.js +0 -852
- package/dist/node-cli-BCjaSCZM.js +0 -2503
- package/dist/node-resolve-D5Hvcgyx.js +0 -835
- package/dist/nodes-cli-Dd_SNbkt.js +0 -1380
- package/dist/nostr-D8scBiYq.d.ts +0 -7
- package/dist/nostr-DBTFTxKs.js +0 -8744
- package/dist/npm-resolution-CYfb3MHG.js +0 -60
- package/dist/oauth-env-zPt5RywA.js +0 -10
- package/dist/onboard-BEFQQeig.js +0 -25
- package/dist/onboard-CJHNyxJh.js +0 -48
- package/dist/onboard-D_3UeLEN.js +0 -589
- package/dist/onboard-channels-B_JL0Djc.js +0 -1241
- package/dist/onboard-channels-CqZzHt2C.js +0 -205
- package/dist/onboard-custom-CER3Ggbq.js +0 -571
- package/dist/onboard-custom-bNRdGECb.js +0 -114
- package/dist/onboard-helpers-BK0Hsb7Y.js +0 -335
- package/dist/onboard-helpers-CXZ5RPoR.js +0 -113
- package/dist/onboard-hooks-1NsxEDjH.js +0 -72
- package/dist/onboard-remote-DuKhC_7W.js +0 -117
- package/dist/onboard-remote-OwRcDuB3.js +0 -181
- package/dist/onboard-search-Cy8dOq2W.js +0 -302
- package/dist/onboard-skills-D5phRa6r.js +0 -117
- package/dist/onboard-skills-c9qWCNe9.js +0 -133
- package/dist/outbound-media-CgNYEQWb.d.ts +0 -11
- package/dist/outbound-media-DYRO2vTD.js +0 -11
- package/dist/pairing-access-Dsiu5Mvl.d.ts +0 -21
- package/dist/pairing-cli-BOnv0TYn.js +0 -217
- package/dist/perplexity-EZwC3y2b.js +0 -24
- package/dist/persistent-dedupe-DMLOqJ23.d.ts +0 -26
- package/dist/pi-model-discovery-runtime-BToY3A6K.js +0 -111
- package/dist/pi-tools.before-tool-call.runtime-D_acPtld.js +0 -381
- package/dist/plugin-install-CgJpSjYd.js +0 -184
- package/dist/plugin-install-Cl1A4EF6.js +0 -117
- package/dist/plugin-install-plan-Dc2Z4DeU.js +0 -49
- package/dist/plugin-registry-B1UaWrQD.js +0 -49
- package/dist/plugin-registry-Cy8biwnn.js +0 -113
- package/dist/plugins-CXwvg50F.js +0 -111
- package/dist/plugins-cli-Uvzp2aYV.js +0 -917
- package/dist/policy-DsMBbEe7.js +0 -143
- package/dist/preflight-audio.runtime-hWsZIYvc.js +0 -116
- package/dist/probe-CNsSf1Uf.js +0 -6329
- package/dist/probe-CqOIrPhb.js +0 -47
- package/dist/probe-DH6gDw-h.js +0 -129
- package/dist/probe-DM16PLf4.js +0 -21
- package/dist/probe-DvAEEWYr.js +0 -1793
- package/dist/probe-auth-COfgCble.js +0 -48
- package/dist/probe-auth-I_5TX1Eh.js +0 -40
- package/dist/program-Dz80sgTU.js +0 -253
- package/dist/prompt-select-styled-wQehwFxK.js +0 -2673
- package/dist/provider-api-key-auth.runtime-BR9GU4ya.js +0 -121
- package/dist/provider-auth-choice-CdhA84kr.js +0 -126
- package/dist/provider-auth-choice-helpers-kabp_0zA.js +0 -48
- package/dist/provider-auth-choice-preference-se3zAM_2.js +0 -189
- package/dist/provider-auth-choice.runtime-BMc8-xNQ.js +0 -123
- package/dist/provider-auth-choices-CYsCViGi.js +0 -57
- package/dist/provider-auth-guidance-CMjUWlNf.js +0 -34
- package/dist/provider-auth-result-Cw6qIhO-.d.ts +0 -18
- package/dist/provider-models-BCId_Lfu.js +0 -2113
- package/dist/provider-models-Ok-DrSiY.d.ts +0 -867
- package/dist/provider-ollama-setup-B6XJZ0So.js +0 -314
- package/dist/provider-ollama-setup-lGDdTl0b.d.ts +0 -32
- package/dist/provider-onboard-CSPi7jOK.d.ts +0 -40
- package/dist/provider-onboard-Ca0TaNud.js +0 -139
- package/dist/provider-runtime.runtime-DwwkHw_7.js +0 -111
- package/dist/provider-self-hosted-setup-BEKLVGpj.js +0 -182
- package/dist/provider-self-hosted-setup-Df91By-J.d.ts +0 -61
- package/dist/provider-stream-DrUD69ai.js +0 -512
- package/dist/provider-usage-BgKHCnjr.js +0 -111
- package/dist/provider-usage-D8EZpFz9.js +0 -633
- package/dist/provider-wizard-DMdb-zj_.js +0 -152
- package/dist/push-apns-BPH6d4VV.js +0 -1038
- package/dist/pw-ai-DttfldtL.js +0 -1867
- package/dist/qmd-manager-CybcDUfk.js +0 -1570
- package/dist/qr-cli-8NcmJ8Ft.js +0 -369
- package/dist/qr-cli-DWe0Our3.js +0 -113
- package/dist/reactions-D6N0LR16.js +0 -281
- package/dist/read-only-account-inspect.discord.runtime-CqUWTRfl.js +0 -116
- package/dist/read-only-account-inspect.slack.runtime-9-jpln3q.js +0 -116
- package/dist/read-only-account-inspect.telegram.runtime-EKPI1D7n.js +0 -116
- package/dist/redact-snapshot-DwJEIVk9.js +0 -2663
- package/dist/register.agent-D3YdDirP.js +0 -439
- package/dist/register.backup-dR27qCuo.js +0 -625
- package/dist/register.configure-BjFhkkka.js +0 -252
- package/dist/register.maintenance-DiMQJIOa.js +0 -574
- package/dist/register.message-CdZsKYH1.js +0 -709
- package/dist/register.onboard-B0rV1eaO.js +0 -192
- package/dist/register.setup-wKMvohzo.js +0 -212
- package/dist/register.status-health-sessions-BJ68m6pt.js +0 -498
- package/dist/register.subclis-CnnrWt2a.js +0 -315
- package/dist/register.subclis-lSvTkC6z.js +0 -13
- package/dist/replies-BABt9b48.js +0 -110
- package/dist/resolve-channels-BqZFl2Ux.js +0 -262
- package/dist/resolve-channels-DjQLXb7B.js +0 -226
- package/dist/resolve-route-CSHDsa_m.js +0 -538
- package/dist/resolve-users-BG6HaSR5.js +0 -143
- package/dist/root-help-ohmaCyC_.js +0 -32
- package/dist/routes-4k2kpvoT.js +0 -7097
- package/dist/rpc-Cnwn4Q6L.js +0 -67
- package/dist/run-main-VYlacKA0.js +0 -424
- package/dist/runtime-D61jzMiI.d.ts +0 -26
- package/dist/runtime-discord-ops.runtime-DafrU-rI.js +0 -9078
- package/dist/runtime-slack-ops.runtime-CdXBKXwd.js +0 -4556
- package/dist/runtime-telegram-ops.runtime-B12sF7gE.js +0 -133
- package/dist/runtime-whatsapp-login.runtime-CqEudH37.js +0 -114
- package/dist/runtime-whatsapp-outbound.runtime-D5m2qyn-.js +0 -117
- package/dist/sandbox-cli-CHJiEWXB.js +0 -535
- package/dist/search-manager-BtNC3-i_.js +0 -16
- package/dist/search-manager-C7J7B3_a.js +0 -386
- package/dist/secrets-cli-C6yIWBbN.js +0 -2070
- package/dist/security-cli-BVu9BkjD.js +0 -575
- package/dist/send-BSreC7rr.js +0 -631
- package/dist/send-BsLHQG_B.js +0 -1025
- package/dist/send-BuNhp8PH.js +0 -283
- package/dist/send-DOCswVar.js +0 -100
- package/dist/send-Dl0LLErk.js +0 -629
- package/dist/server-node-events-Bq2067EG.js +0 -506
- package/dist/server-y38L7N5H.js +0 -107
- package/dist/sessions-BV8gXURR.js +0 -112
- package/dist/sessions-dl1Kc-Ci.js +0 -218
- package/dist/setup-BSPXdMuK.d.ts +0 -37
- package/dist/setup-DGszQH0_.js +0 -387
- package/dist/setup-binary-C17YnmA8.js +0 -406
- package/dist/setup-browser-CPx-nEsr.js +0 -70
- package/dist/setup-core-BByHN1ME.js +0 -143
- package/dist/setup-core-C0KPlBmL.js +0 -47
- package/dist/setup-core-Cq37G6of.js +0 -166
- package/dist/setup-core-uO84_Y75.js +0 -205
- package/dist/setup-surface-BEMi7Rmb.js +0 -490
- package/dist/setup-wizard-helpers-Ck9wDR0b.d.ts +0 -203
- package/dist/setup.finalize-BzPBa8zW.js +0 -522
- package/dist/setup.gateway-config-DdwkF-8e.js +0 -343
- package/dist/shared-BCw4SKjB.js +0 -96
- package/dist/shared-CjNzsULP.js +0 -75
- package/dist/shared-Cu1BE7ZE.js +0 -298
- package/dist/shared-DSClmyUn.js +0 -182
- package/dist/shared-DyJdGH6y.js +0 -102
- package/dist/signal-Dyv4NZsB.js +0 -114
- package/dist/skills-CbB5b27M.js +0 -853
- package/dist/skills-CnfI7Szw.js +0 -20
- package/dist/skills-cli-CavB1f_3.js +0 -292
- package/dist/skills-install-B1OBdgd0.js +0 -763
- package/dist/skills-status-B3gAmIbW.js +0 -169
- package/dist/skills-status-DrHhFgU9.js +0 -21
- package/dist/slack-BRzqnoAz.js +0 -114
- package/dist/slash-commands.runtime-BK88kgds.js +0 -128
- package/dist/slash-dispatch.runtime-COGywwJE.js +0 -141
- package/dist/slash-skill-commands.runtime-Ti4brxgh.js +0 -116
- package/dist/src-DUR6OQxI.js +0 -1701
- package/dist/status-C6dgQY9a.js +0 -131
- package/dist/status-CNK0Q7QH.js +0 -606
- package/dist/status-DBcX0DSC.js +0 -43
- package/dist/status-DKgFgbwv.js +0 -1599
- package/dist/status-Wn5lhNAc.js +0 -126
- package/dist/status-json-D2EkWqAl.js +0 -288
- package/dist/status.link-channel-D3ULIdEa.js +0 -143
- package/dist/status.scan.deps.runtime-BsjWTAm4.js +0 -126
- package/dist/status.scan.runtime-D4HbzROD.js +0 -119
- package/dist/status.summary-C3YxPrDK.js +0 -592
- package/dist/status.summary.runtime-DAkXPSaK.js +0 -118
- package/dist/status.update-B4NnN9P1.js +0 -77
- package/dist/subagent-orphan-recovery-QiQEBv36.js +0 -307
- package/dist/subagent-registry-runtime-BJatPQFK.js +0 -111
- package/dist/subscription-BhZORXN9.js +0 -100
- package/dist/subscription-QEUjQRMv.js +0 -33
- package/dist/subscription-cli-HrULlAgc.js +0 -134
- package/dist/synology-chat-DB76GWMN.js +0 -297
- package/dist/system-cli-D8jDwWuL.js +0 -94
- package/dist/telegram-BHiiqKkQ.js +0 -114
- package/dist/text-chunking-Baonm9Lu.js +0 -84
- package/dist/text-chunking-DzB11ONk.d.ts +0 -79
- package/dist/tlon-DLESxNgD.js +0 -433
- package/dist/tui-C75zi2Cl.js +0 -3834
- package/dist/tui-cli-DFwx5e6i.js +0 -137
- package/dist/types-BKldC9YN.d.ts +0 -22692
- package/dist/types-MeyueBE0.d.ts +0 -45
- package/dist/types.base-Cw0-zIvE.d.ts +0 -188
- package/dist/ui-B55NOIB6.js +0 -31
- package/dist/update--ojavYQ4.js +0 -1036
- package/dist/update-cli-Cvj5aWYM.js +0 -1503
- package/dist/update-offset-store-upatuWwX.js +0 -112
- package/dist/update-runner-DHkY_-76.js +0 -1496
- package/dist/upsert-with-lock-C171GLaR.js +0 -33
- package/dist/usage-N3bxnbmt.js +0 -115
- package/dist/web-RdvT7gKa.js +0 -112
- package/dist/web-shared-C2qHVxw1.d.ts +0 -45
- package/dist/webhook-request-guards-CosLyl01.d.ts +0 -76
- package/dist/webhook-targets-Bfnag-du.js +0 -181
- package/dist/webhook-targets-DP_EkQa4.d.ts +0 -106
- package/dist/webhooks-cli-ZpnXrq7G.js +0 -350
- package/dist/whatsapp-DNTAyZHt.js +0 -114
- package/dist/whatsapp-actions-o1zKQzKZ.js +0 -167
- package/dist/workspace-CpWi5wPr.js +0 -479
- package/dist/workspace-Ii7aRS7c.js +0 -289
- package/dist/workspace-dirs-x10McA9t.js +0 -2003
- package/dist/zalo-C9OQRYRw.d.ts +0 -9
- package/dist/zalo-zm_bYCKg.js +0 -415
- package/dist/zalouser-CvVEUvc5.js +0 -30911
- /package/dist/{account-id-B3YSn4hl.d.ts → account-id-B8ce6G_4.d.ts} +0 -0
- /package/dist/{acpx-CnNv70m2.d.ts → acpx-Ci50I9T2.d.ts} +0 -0
- /package/dist/{agent-media-payload-DE2pEcsz.d.ts → agent-media-payload-en-gS5p6.d.ts} +0 -0
- /package/dist/{allow-from-DPpHnT2A.d.ts → allow-from-cMeQ47Ot.d.ts} +0 -0
- /package/dist/{allowlist-resolution-CLFiZ6nE.d.ts → allowlist-resolution-DoAWbfXV.d.ts} +0 -0
- /package/dist/{bluebubbles-Duhu-Jer.d.ts → bluebubbles-C6yYmUl0.d.ts} +0 -0
- /package/dist/{boolean-param-BhFjB3gp.d.ts → boolean-param-CdO2TFTk.d.ts} +0 -0
- /package/dist/{channel-config-schema-DnnVMdjR.d.ts → channel-config-schema-Chp38wel.d.ts} +0 -0
- /package/dist/{channel-policy-Baq-Z06b.d.ts → channel-policy-g2h6AbYQ.d.ts} +0 -0
- /package/dist/{chat-type-DpiBgwuG.d.ts → chat-type-BLt59pPT.d.ts} +0 -0
- /package/dist/{command-format-vi4xq8e8.d.ts → command-format-BDJC05Jp.d.ts} +0 -0
- /package/dist/{diffs-DK7fVSDo.d.ts → diffs-D_iNKCyn.d.ts} +0 -0
- /package/dist/{directory-runtime-BTLPaysA.d.ts → directory-runtime-DhMex6HY.d.ts} +0 -0
- /package/dist/{exec-C01wtBHu.d.ts → exec-pjfUY4KM.d.ts} +0 -0
- /package/dist/{gaxios-fetch-compat-wZ38b3w3.js → gaxios-fetch-compat-B_vtINdV.js} +0 -0
- /package/dist/{history-CwXuP2TW.d.ts → history-aqSS5VGQ.d.ts} +0 -0
- /package/dist/{inbound-envelope-SggrBs9m.d.ts → inbound-envelope-C5hWuZod.d.ts} +0 -0
- /package/dist/{index-apAZHsDo.d.ts → index-DXVQFYGX.d.ts} +0 -0
- /package/dist/{json-store-r75IZGk9.d.ts → json-store-UnqQ5aV3.d.ts} +0 -0
- /package/dist/{keyed-async-queue-DHIr7yNe.d.ts → keyed-async-queue-guucpLw3.d.ts} +0 -0
- /package/dist/{links-HeQ3r_L0.d.ts → links-Bar0meEK.d.ts} +0 -0
- /package/dist/{markdown-to-line-CDb4Jy3V.d.ts → markdown-to-line-D8uH_KOj.d.ts} +0 -0
- /package/dist/{mattermost-DtCsxpgg.d.ts → mattermost-xl7jAFJL.d.ts} +0 -0
- /package/dist/{net-BATPDwdQ.d.ts → net-rGOKGds6.d.ts} +0 -0
- /package/dist/{nextcloud-talk-Bb2wHOwp.d.ts → nextcloud-talk-De2CZ9dV.d.ts} +0 -0
- /package/dist/{oauth-utils-u567CLT0.d.ts → oauth-utils-DzN1AlEH.d.ts} +0 -0
- /package/dist/{parse-finite-number-l3tNlrZh.d.ts → parse-finite-number-odgyqhi0.d.ts} +0 -0
- /package/dist/{provider-usage.types-C6061OVN.d.ts → provider-usage.types-EDE9o-H_.d.ts} +0 -0
- /package/dist/{reply-history-BDsFnZFl.d.ts → reply-history-CVuU31xe.d.ts} +0 -0
- /package/dist/{reply-payload-CCvM4W9u.d.ts → reply-payload-CHkpBYwL.d.ts} +0 -0
- /package/dist/{request-url-C54l4-xC.d.ts → request-url-DHisbiHY.d.ts} +0 -0
- /package/dist/{run-command-D3RqWcHu.d.ts → run-command-y0Cndsb1.d.ts} +0 -0
- /package/dist/{secret-input-schema-BLBt-NAP.d.ts → secret-input-schema-b1vpYDQN.d.ts} +0 -0
- /package/dist/{session-key-BQ2-bR-9.d.ts → session-key-DTHQl57f.d.ts} +0 -0
- /package/dist/{ssh-config-C4mcH9Ly.js → ssh-config-hEHBfU2_.js} +0 -0
- /package/dist/{testing-DLkhGsoz.d.ts → testing-DszuZXgK.d.ts} +0 -0
- /package/dist/{thinking-DRkjX18p.d.ts → thinking-IwXTGSeT.d.ts} +0 -0
- /package/dist/{tool-send-CMMD1uDu.d.ts → tool-send-DWHRmKpz.d.ts} +0 -0
- /package/dist/{vllm-defaults-CcGuf4hL.d.ts → vllm-defaults-CrxZgE6-.d.ts} +0 -0
- /package/dist/{wait-Daog8bxM.d.ts → wait-wDWw_MTI.d.ts} +0 -0
- /package/dist/{webhook-memory-guards-C5MrExwT.d.ts → webhook-memory-guards-DreORuJy.d.ts} +0 -0
- /package/dist/{windows-spawn-j2l-dqu8.d.ts → windows-spawn-BIzH92x2.d.ts} +0 -0
- /package/dist/{zod-schema.agent-runtime-krMrBnIn.d.ts → zod-schema.agent-runtime-CP2rmis3.d.ts} +0 -0
- /package/dist/{zod-schema.core-BNDieZDZ.d.ts → zod-schema.core-Foi1tYwi.d.ts} +0 -0
|
@@ -0,0 +1,1269 @@
|
|
|
1
|
+
import { o as __toESM } from "./chunk-DORXReHP.js";
|
|
2
|
+
import { t as formatDocsLink } from "./links-BcahUP5U.js";
|
|
3
|
+
import { HC as createAccountListHelpers, Mw as prepareScopedSetupConfig, Wh as formatResolvedUnresolvedNote, cg as addWildcardAllowFrom, jg as setTopLevelChannelGroupPolicy, lg as buildSingleChannelSecretPromptState, ug as mergeAllowFromEntries, xg as promptSingleChannelSecretInput } from "./auth-profiles-C-Ul-Qkn.js";
|
|
4
|
+
import { n as normalizeAccountId, t as DEFAULT_ACCOUNT_ID } from "./account-id-BuyZMNja.js";
|
|
5
|
+
import { a as hasConfiguredSecretInput, c as normalizeResolvedSecretInputString, l as normalizeSecretInputString } from "./types.secrets-Ca-9L8vU.js";
|
|
6
|
+
import { J as fetchWithSsrFGuard } from "./provider-web-search-CcUC9ktE.js";
|
|
7
|
+
import { t as mapAllowlistResolutionInputs } from "./allowlist-resolution-DouZrq28.js";
|
|
8
|
+
import { t as runPluginCommandWithTimeout } from "./run-command-uj_9ncR8.js";
|
|
9
|
+
import { n as loadMatrixCredentials, s as getMatrixRuntime, t as credentialsMatchConfig } from "./credentials-D1Ivi99Y.js";
|
|
10
|
+
import { createRequire } from "node:module";
|
|
11
|
+
import { fileURLToPath } from "node:url";
|
|
12
|
+
import fs from "node:fs";
|
|
13
|
+
import path from "node:path";
|
|
14
|
+
import os from "node:os";
|
|
15
|
+
import crypto from "node:crypto";
|
|
16
|
+
//#region extensions/matrix/src/matrix/client/runtime.ts
|
|
17
|
+
function isBunRuntime() {
|
|
18
|
+
return typeof process.versions.bun === "string";
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region extensions/matrix/src/matrix/sdk-runtime.ts
|
|
22
|
+
let cachedMatrixSdkRuntime = null;
|
|
23
|
+
function loadMatrixSdk() {
|
|
24
|
+
if (cachedMatrixSdkRuntime) return cachedMatrixSdkRuntime;
|
|
25
|
+
cachedMatrixSdkRuntime = createRequire(import.meta.url)("@vector-im/matrix-bot-sdk");
|
|
26
|
+
return cachedMatrixSdkRuntime;
|
|
27
|
+
}
|
|
28
|
+
function getMatrixLogService() {
|
|
29
|
+
return loadMatrixSdk().LogService;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region extensions/matrix/src/matrix/client/logging.ts
|
|
33
|
+
let matrixSdkLoggingConfigured = false;
|
|
34
|
+
let matrixSdkBaseLogger;
|
|
35
|
+
function shouldSuppressMatrixHttpNotFound(module, messageOrObject) {
|
|
36
|
+
if (module !== "MatrixHttpClient") return false;
|
|
37
|
+
return messageOrObject.some((entry) => {
|
|
38
|
+
if (!entry || typeof entry !== "object") return false;
|
|
39
|
+
return entry.errcode === "M_NOT_FOUND";
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function ensureMatrixSdkLoggingConfigured() {
|
|
43
|
+
if (matrixSdkLoggingConfigured) return;
|
|
44
|
+
const { ConsoleLogger, LogService } = loadMatrixSdk();
|
|
45
|
+
matrixSdkBaseLogger = new ConsoleLogger();
|
|
46
|
+
matrixSdkLoggingConfigured = true;
|
|
47
|
+
LogService.setLogger({
|
|
48
|
+
trace: (module, ...messageOrObject) => matrixSdkBaseLogger?.trace(module, ...messageOrObject),
|
|
49
|
+
debug: (module, ...messageOrObject) => matrixSdkBaseLogger?.debug(module, ...messageOrObject),
|
|
50
|
+
info: (module, ...messageOrObject) => matrixSdkBaseLogger?.info(module, ...messageOrObject),
|
|
51
|
+
warn: (module, ...messageOrObject) => matrixSdkBaseLogger?.warn(module, ...messageOrObject),
|
|
52
|
+
error: (module, ...messageOrObject) => {
|
|
53
|
+
if (shouldSuppressMatrixHttpNotFound(module, messageOrObject)) return;
|
|
54
|
+
matrixSdkBaseLogger?.error(module, ...messageOrObject);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region extensions/matrix/src/matrix/client/config.ts
|
|
60
|
+
function clean(value, path) {
|
|
61
|
+
return normalizeResolvedSecretInputString({
|
|
62
|
+
value,
|
|
63
|
+
path
|
|
64
|
+
}) ?? "";
|
|
65
|
+
}
|
|
66
|
+
/** Shallow-merge known nested config sub-objects so partial overrides inherit base values. */
|
|
67
|
+
function deepMergeConfig(base, override) {
|
|
68
|
+
const merged = {
|
|
69
|
+
...base,
|
|
70
|
+
...override
|
|
71
|
+
};
|
|
72
|
+
for (const key of ["dm", "actions"]) {
|
|
73
|
+
const b = base[key];
|
|
74
|
+
const o = override[key];
|
|
75
|
+
if (typeof b === "object" && b !== null && typeof o === "object" && o !== null) merged[key] = {
|
|
76
|
+
...b,
|
|
77
|
+
...o
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return merged;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Resolve Matrix config for a specific account, with fallback to top-level config.
|
|
84
|
+
* This supports both multi-account (channels.matrix.accounts.*) and
|
|
85
|
+
* single-account (channels.matrix.*) configurations.
|
|
86
|
+
*/
|
|
87
|
+
function resolveMatrixConfigForAccount(cfg = getMatrixRuntime().config.loadConfig(), accountId, env = process.env) {
|
|
88
|
+
const normalizedAccountId = normalizeAccountId(accountId);
|
|
89
|
+
const matrixBase = cfg.channels?.matrix ?? {};
|
|
90
|
+
const accounts = cfg.channels?.matrix?.accounts;
|
|
91
|
+
let accountConfig = accounts?.[normalizedAccountId];
|
|
92
|
+
if (!accountConfig && accounts) {
|
|
93
|
+
for (const key of Object.keys(accounts)) if (normalizeAccountId(key) === normalizedAccountId) {
|
|
94
|
+
accountConfig = accounts[key];
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const matrix = accountConfig ? deepMergeConfig(matrixBase, accountConfig) : matrixBase;
|
|
99
|
+
return {
|
|
100
|
+
homeserver: clean(matrix.homeserver, "channels.matrix.homeserver") || clean(env.MATRIX_HOMESERVER, "MATRIX_HOMESERVER"),
|
|
101
|
+
userId: clean(matrix.userId, "channels.matrix.userId") || clean(env.MATRIX_USER_ID, "MATRIX_USER_ID"),
|
|
102
|
+
accessToken: clean(matrix.accessToken, "channels.matrix.accessToken") || clean(env.MATRIX_ACCESS_TOKEN, "MATRIX_ACCESS_TOKEN") || void 0,
|
|
103
|
+
password: clean(matrix.password, "channels.matrix.password") || clean(env.MATRIX_PASSWORD, "MATRIX_PASSWORD") || void 0,
|
|
104
|
+
deviceName: clean(matrix.deviceName, "channels.matrix.deviceName") || clean(env.MATRIX_DEVICE_NAME, "MATRIX_DEVICE_NAME") || void 0,
|
|
105
|
+
initialSyncLimit: typeof matrix.initialSyncLimit === "number" ? Math.max(0, Math.floor(matrix.initialSyncLimit)) : void 0,
|
|
106
|
+
encryption: matrix.encryption ?? false
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
async function resolveMatrixAuth(params) {
|
|
110
|
+
const cfg = params?.cfg ?? getMatrixRuntime().config.loadConfig();
|
|
111
|
+
const env = params?.env ?? process.env;
|
|
112
|
+
const resolved = resolveMatrixConfigForAccount(cfg, params?.accountId, env);
|
|
113
|
+
if (!resolved.homeserver) throw new Error("Matrix homeserver is required (matrix.homeserver)");
|
|
114
|
+
const { loadMatrixCredentials, saveMatrixCredentials, credentialsMatchConfig, touchMatrixCredentials } = await import("./credentials-ZEqhYIcy.js");
|
|
115
|
+
const accountId = params?.accountId;
|
|
116
|
+
const cached = loadMatrixCredentials(env, accountId);
|
|
117
|
+
const cachedCredentials = cached && credentialsMatchConfig(cached, {
|
|
118
|
+
homeserver: resolved.homeserver,
|
|
119
|
+
userId: resolved.userId || ""
|
|
120
|
+
}) ? cached : null;
|
|
121
|
+
if (resolved.accessToken) {
|
|
122
|
+
let userId = resolved.userId;
|
|
123
|
+
if (!userId) {
|
|
124
|
+
ensureMatrixSdkLoggingConfigured();
|
|
125
|
+
const { MatrixClient } = loadMatrixSdk();
|
|
126
|
+
userId = await new MatrixClient(resolved.homeserver, resolved.accessToken).getUserId();
|
|
127
|
+
saveMatrixCredentials({
|
|
128
|
+
homeserver: resolved.homeserver,
|
|
129
|
+
userId,
|
|
130
|
+
accessToken: resolved.accessToken
|
|
131
|
+
}, env, accountId);
|
|
132
|
+
} else if (cachedCredentials && cachedCredentials.accessToken === resolved.accessToken) touchMatrixCredentials(env, accountId);
|
|
133
|
+
return {
|
|
134
|
+
homeserver: resolved.homeserver,
|
|
135
|
+
userId,
|
|
136
|
+
accessToken: resolved.accessToken,
|
|
137
|
+
deviceName: resolved.deviceName,
|
|
138
|
+
initialSyncLimit: resolved.initialSyncLimit,
|
|
139
|
+
encryption: resolved.encryption
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
if (cachedCredentials) {
|
|
143
|
+
touchMatrixCredentials(env, accountId);
|
|
144
|
+
return {
|
|
145
|
+
homeserver: cachedCredentials.homeserver,
|
|
146
|
+
userId: cachedCredentials.userId,
|
|
147
|
+
accessToken: cachedCredentials.accessToken,
|
|
148
|
+
deviceName: resolved.deviceName,
|
|
149
|
+
initialSyncLimit: resolved.initialSyncLimit,
|
|
150
|
+
encryption: resolved.encryption
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (!resolved.userId) throw new Error("Matrix userId is required when no access token is configured (matrix.userId)");
|
|
154
|
+
if (!resolved.password) throw new Error("Matrix password is required when no access token is configured (matrix.password)");
|
|
155
|
+
const { response: loginResponse, release: releaseLoginResponse } = await fetchWithSsrFGuard({
|
|
156
|
+
url: `${resolved.homeserver}/_matrix/client/v3/login`,
|
|
157
|
+
init: {
|
|
158
|
+
method: "POST",
|
|
159
|
+
headers: { "Content-Type": "application/json" },
|
|
160
|
+
body: JSON.stringify({
|
|
161
|
+
type: "m.login.password",
|
|
162
|
+
identifier: {
|
|
163
|
+
type: "m.id.user",
|
|
164
|
+
user: resolved.userId
|
|
165
|
+
},
|
|
166
|
+
password: resolved.password,
|
|
167
|
+
initial_device_display_name: resolved.deviceName ?? "MoldClaw Gateway"
|
|
168
|
+
})
|
|
169
|
+
},
|
|
170
|
+
auditContext: "matrix.login"
|
|
171
|
+
});
|
|
172
|
+
const login = await (async () => {
|
|
173
|
+
try {
|
|
174
|
+
if (!loginResponse.ok) {
|
|
175
|
+
const errorText = await loginResponse.text();
|
|
176
|
+
throw new Error(`Matrix login failed: ${errorText}`);
|
|
177
|
+
}
|
|
178
|
+
return await loginResponse.json();
|
|
179
|
+
} finally {
|
|
180
|
+
await releaseLoginResponse();
|
|
181
|
+
}
|
|
182
|
+
})();
|
|
183
|
+
const accessToken = login.access_token?.trim();
|
|
184
|
+
if (!accessToken) throw new Error("Matrix login did not return an access token");
|
|
185
|
+
const auth = {
|
|
186
|
+
homeserver: resolved.homeserver,
|
|
187
|
+
userId: login.user_id ?? resolved.userId,
|
|
188
|
+
accessToken,
|
|
189
|
+
deviceName: resolved.deviceName,
|
|
190
|
+
initialSyncLimit: resolved.initialSyncLimit,
|
|
191
|
+
encryption: resolved.encryption
|
|
192
|
+
};
|
|
193
|
+
saveMatrixCredentials({
|
|
194
|
+
homeserver: auth.homeserver,
|
|
195
|
+
userId: auth.userId,
|
|
196
|
+
accessToken: auth.accessToken,
|
|
197
|
+
deviceId: login.device_id
|
|
198
|
+
}, env, accountId);
|
|
199
|
+
return auth;
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region extensions/matrix/src/matrix/deps.ts
|
|
203
|
+
const MATRIX_SDK_PACKAGE = "@vector-im/matrix-bot-sdk";
|
|
204
|
+
const MATRIX_CRYPTO_DOWNLOAD_HELPER = "@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js";
|
|
205
|
+
function formatCommandError(result) {
|
|
206
|
+
const stderr = result.stderr.trim();
|
|
207
|
+
if (stderr) return stderr;
|
|
208
|
+
const stdout = result.stdout.trim();
|
|
209
|
+
if (stdout) return stdout;
|
|
210
|
+
return "unknown error";
|
|
211
|
+
}
|
|
212
|
+
function isMissingMatrixCryptoRuntimeError(err) {
|
|
213
|
+
const message = err instanceof Error ? err.message : String(err ?? "");
|
|
214
|
+
return message.includes("Cannot find module") && message.includes("@matrix-org/matrix-sdk-crypto-nodejs-");
|
|
215
|
+
}
|
|
216
|
+
function isMatrixSdkAvailable() {
|
|
217
|
+
try {
|
|
218
|
+
createRequire(import.meta.url).resolve(MATRIX_SDK_PACKAGE);
|
|
219
|
+
return true;
|
|
220
|
+
} catch {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function resolvePluginRoot() {
|
|
225
|
+
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
226
|
+
return path.resolve(currentDir, "..", "..");
|
|
227
|
+
}
|
|
228
|
+
async function ensureMatrixCryptoRuntime(params = {}) {
|
|
229
|
+
const req = createRequire(import.meta.url);
|
|
230
|
+
const requireFn = params.requireFn ?? ((id) => req(id));
|
|
231
|
+
const resolveFn = params.resolveFn ?? ((id) => req.resolve(id));
|
|
232
|
+
const runCommand = params.runCommand ?? runPluginCommandWithTimeout;
|
|
233
|
+
const nodeExecutable = params.nodeExecutable ?? process.execPath;
|
|
234
|
+
try {
|
|
235
|
+
requireFn(MATRIX_SDK_PACKAGE);
|
|
236
|
+
return;
|
|
237
|
+
} catch (err) {
|
|
238
|
+
if (!isMissingMatrixCryptoRuntimeError(err)) throw err;
|
|
239
|
+
}
|
|
240
|
+
const scriptPath = resolveFn(MATRIX_CRYPTO_DOWNLOAD_HELPER);
|
|
241
|
+
params.log?.("matrix: crypto runtime missing; downloading platform library…");
|
|
242
|
+
const result = await runCommand({
|
|
243
|
+
argv: [nodeExecutable, scriptPath],
|
|
244
|
+
cwd: path.dirname(scriptPath),
|
|
245
|
+
timeoutMs: 3e5,
|
|
246
|
+
env: { COREPACK_ENABLE_DOWNLOAD_PROMPT: "0" }
|
|
247
|
+
});
|
|
248
|
+
if (result.code !== 0) throw new Error(`Matrix crypto runtime bootstrap failed: ${formatCommandError(result)}`);
|
|
249
|
+
try {
|
|
250
|
+
requireFn(MATRIX_SDK_PACKAGE);
|
|
251
|
+
} catch (err) {
|
|
252
|
+
throw new Error(`Matrix crypto runtime remains unavailable after bootstrap: ${err instanceof Error ? err.message : String(err)}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async function ensureMatrixSdkInstalled(params) {
|
|
256
|
+
if (isMatrixSdkAvailable()) return;
|
|
257
|
+
const confirm = params.confirm;
|
|
258
|
+
if (confirm) {
|
|
259
|
+
if (!await confirm("Matrix requires @vector-im/matrix-bot-sdk. Install now?")) throw new Error("Matrix requires @vector-im/matrix-bot-sdk (install dependencies first).");
|
|
260
|
+
}
|
|
261
|
+
const root = resolvePluginRoot();
|
|
262
|
+
const command = fs.existsSync(path.join(root, "pnpm-lock.yaml")) ? ["pnpm", "install"] : [
|
|
263
|
+
"npm",
|
|
264
|
+
"install",
|
|
265
|
+
"--omit=dev",
|
|
266
|
+
"--silent"
|
|
267
|
+
];
|
|
268
|
+
params.runtime.log?.(`matrix: installing dependencies via ${command[0]} (${root})…`);
|
|
269
|
+
const result = await runPluginCommandWithTimeout({
|
|
270
|
+
argv: command,
|
|
271
|
+
cwd: root,
|
|
272
|
+
timeoutMs: 3e5,
|
|
273
|
+
env: { COREPACK_ENABLE_DOWNLOAD_PROMPT: "0" }
|
|
274
|
+
});
|
|
275
|
+
if (result.code !== 0) throw new Error(result.stderr.trim() || result.stdout.trim() || "Matrix dependency install failed.");
|
|
276
|
+
if (!isMatrixSdkAvailable()) throw new Error("Matrix dependency install completed but @vector-im/matrix-bot-sdk is still missing.");
|
|
277
|
+
}
|
|
278
|
+
const STORAGE_META_FILENAME = "storage-meta.json";
|
|
279
|
+
function sanitizePathSegment(value) {
|
|
280
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "") || "unknown";
|
|
281
|
+
}
|
|
282
|
+
function resolveHomeserverKey(homeserver) {
|
|
283
|
+
try {
|
|
284
|
+
const url = new URL(homeserver);
|
|
285
|
+
if (url.host) return sanitizePathSegment(url.host);
|
|
286
|
+
} catch {}
|
|
287
|
+
return sanitizePathSegment(homeserver);
|
|
288
|
+
}
|
|
289
|
+
function hashAccessToken(accessToken) {
|
|
290
|
+
return crypto.createHash("sha256").update(accessToken).digest("hex").slice(0, 16);
|
|
291
|
+
}
|
|
292
|
+
function resolveLegacyStoragePaths(env = process.env) {
|
|
293
|
+
const stateDir = getMatrixRuntime().state.resolveStateDir(env, os.homedir);
|
|
294
|
+
return {
|
|
295
|
+
storagePath: path.join(stateDir, "matrix", "bot-storage.json"),
|
|
296
|
+
cryptoPath: path.join(stateDir, "matrix", "crypto")
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function resolveMatrixStoragePaths(params) {
|
|
300
|
+
const env = params.env ?? process.env;
|
|
301
|
+
const stateDir = getMatrixRuntime().state.resolveStateDir(env, os.homedir);
|
|
302
|
+
const accountKey = sanitizePathSegment(params.accountId ?? "default");
|
|
303
|
+
const userKey = sanitizePathSegment(params.userId);
|
|
304
|
+
const serverKey = resolveHomeserverKey(params.homeserver);
|
|
305
|
+
const tokenHash = hashAccessToken(params.accessToken);
|
|
306
|
+
const rootDir = path.join(stateDir, "matrix", "accounts", accountKey, `${serverKey}__${userKey}`, tokenHash);
|
|
307
|
+
return {
|
|
308
|
+
rootDir,
|
|
309
|
+
storagePath: path.join(rootDir, "bot-storage.json"),
|
|
310
|
+
cryptoPath: path.join(rootDir, "crypto"),
|
|
311
|
+
metaPath: path.join(rootDir, STORAGE_META_FILENAME),
|
|
312
|
+
accountKey,
|
|
313
|
+
tokenHash
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function maybeMigrateLegacyStorage(params) {
|
|
317
|
+
const legacy = resolveLegacyStoragePaths(params.env);
|
|
318
|
+
const hasLegacyStorage = fs.existsSync(legacy.storagePath);
|
|
319
|
+
const hasLegacyCrypto = fs.existsSync(legacy.cryptoPath);
|
|
320
|
+
const hasNewStorage = fs.existsSync(params.storagePaths.storagePath) || fs.existsSync(params.storagePaths.cryptoPath);
|
|
321
|
+
if (!hasLegacyStorage && !hasLegacyCrypto) return;
|
|
322
|
+
if (hasNewStorage) return;
|
|
323
|
+
fs.mkdirSync(params.storagePaths.rootDir, { recursive: true });
|
|
324
|
+
if (hasLegacyStorage) try {
|
|
325
|
+
fs.renameSync(legacy.storagePath, params.storagePaths.storagePath);
|
|
326
|
+
} catch {}
|
|
327
|
+
if (hasLegacyCrypto) try {
|
|
328
|
+
fs.renameSync(legacy.cryptoPath, params.storagePaths.cryptoPath);
|
|
329
|
+
} catch {}
|
|
330
|
+
}
|
|
331
|
+
function writeStorageMeta(params) {
|
|
332
|
+
try {
|
|
333
|
+
const payload = {
|
|
334
|
+
homeserver: params.homeserver,
|
|
335
|
+
userId: params.userId,
|
|
336
|
+
accountId: params.accountId ?? "default",
|
|
337
|
+
accessTokenHash: params.storagePaths.tokenHash,
|
|
338
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
339
|
+
};
|
|
340
|
+
fs.mkdirSync(params.storagePaths.rootDir, { recursive: true });
|
|
341
|
+
fs.writeFileSync(params.storagePaths.metaPath, JSON.stringify(payload, null, 2), "utf-8");
|
|
342
|
+
} catch {}
|
|
343
|
+
}
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region extensions/matrix/src/matrix/client/create-client.ts
|
|
346
|
+
function sanitizeUserIdList(input, label) {
|
|
347
|
+
const LogService = loadMatrixSdk().LogService;
|
|
348
|
+
if (input == null) return [];
|
|
349
|
+
if (!Array.isArray(input)) {
|
|
350
|
+
LogService.warn("MatrixClientLite", `Expected ${label} list to be an array, got ${typeof input}`);
|
|
351
|
+
return [];
|
|
352
|
+
}
|
|
353
|
+
const filtered = input.filter((entry) => typeof entry === "string" && entry.trim().length > 0);
|
|
354
|
+
if (filtered.length !== input.length) LogService.warn("MatrixClientLite", `Dropping ${input.length - filtered.length} invalid ${label} entries from sync payload`);
|
|
355
|
+
return filtered;
|
|
356
|
+
}
|
|
357
|
+
async function createMatrixClient(params) {
|
|
358
|
+
await ensureMatrixCryptoRuntime();
|
|
359
|
+
const { MatrixClient, SimpleFsStorageProvider, RustSdkCryptoStorageProvider, LogService } = loadMatrixSdk();
|
|
360
|
+
ensureMatrixSdkLoggingConfigured();
|
|
361
|
+
const env = process.env;
|
|
362
|
+
const storagePaths = resolveMatrixStoragePaths({
|
|
363
|
+
homeserver: params.homeserver,
|
|
364
|
+
userId: params.userId,
|
|
365
|
+
accessToken: params.accessToken,
|
|
366
|
+
accountId: params.accountId,
|
|
367
|
+
env
|
|
368
|
+
});
|
|
369
|
+
maybeMigrateLegacyStorage({
|
|
370
|
+
storagePaths,
|
|
371
|
+
env
|
|
372
|
+
});
|
|
373
|
+
fs.mkdirSync(storagePaths.rootDir, { recursive: true });
|
|
374
|
+
const storage = new SimpleFsStorageProvider(storagePaths.storagePath);
|
|
375
|
+
let cryptoStorage;
|
|
376
|
+
if (params.encryption) {
|
|
377
|
+
fs.mkdirSync(storagePaths.cryptoPath, { recursive: true });
|
|
378
|
+
try {
|
|
379
|
+
const { StoreType } = await import("./matrix-sdk-crypto-nodejs-CuPhZJp5.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
|
|
380
|
+
cryptoStorage = new RustSdkCryptoStorageProvider(storagePaths.cryptoPath, StoreType.Sqlite);
|
|
381
|
+
} catch (err) {
|
|
382
|
+
LogService.warn("MatrixClientLite", "Failed to initialize crypto storage, E2EE disabled:", err);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
writeStorageMeta({
|
|
386
|
+
storagePaths,
|
|
387
|
+
homeserver: params.homeserver,
|
|
388
|
+
userId: params.userId,
|
|
389
|
+
accountId: params.accountId
|
|
390
|
+
});
|
|
391
|
+
const client = new MatrixClient(params.homeserver, params.accessToken, storage, cryptoStorage);
|
|
392
|
+
if (client.crypto) {
|
|
393
|
+
const originalUpdateSyncData = client.crypto.updateSyncData.bind(client.crypto);
|
|
394
|
+
client.crypto.updateSyncData = async (toDeviceMessages, otkCounts, unusedFallbackKeyAlgs, changedDeviceLists, leftDeviceLists) => {
|
|
395
|
+
const safeChanged = sanitizeUserIdList(changedDeviceLists, "changed device list");
|
|
396
|
+
const safeLeft = sanitizeUserIdList(leftDeviceLists, "left device list");
|
|
397
|
+
try {
|
|
398
|
+
return await originalUpdateSyncData(toDeviceMessages, otkCounts, unusedFallbackKeyAlgs, safeChanged, safeLeft);
|
|
399
|
+
} catch (err) {
|
|
400
|
+
const message = typeof err === "string" ? err : err instanceof Error ? err.message : "";
|
|
401
|
+
if (message.includes("Expect value to be String")) {
|
|
402
|
+
LogService.warn("MatrixClientLite", "Ignoring malformed device list entries during crypto sync", message);
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
throw err;
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
return client;
|
|
410
|
+
}
|
|
411
|
+
async function startMatrixClientWithGrace(params) {
|
|
412
|
+
const graceMs = params.graceMs ?? 2e3;
|
|
413
|
+
let startFailed = false;
|
|
414
|
+
let startError = void 0;
|
|
415
|
+
let startPromise;
|
|
416
|
+
try {
|
|
417
|
+
startPromise = params.client.start();
|
|
418
|
+
} catch (err) {
|
|
419
|
+
params.onError?.(err);
|
|
420
|
+
throw err;
|
|
421
|
+
}
|
|
422
|
+
startPromise.catch((err) => {
|
|
423
|
+
startFailed = true;
|
|
424
|
+
startError = err;
|
|
425
|
+
params.onError?.(err);
|
|
426
|
+
});
|
|
427
|
+
await new Promise((resolve) => setTimeout(resolve, graceMs));
|
|
428
|
+
if (startFailed) throw startError;
|
|
429
|
+
}
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region extensions/matrix/src/matrix/client/shared.ts
|
|
432
|
+
const sharedClientStates = /* @__PURE__ */ new Map();
|
|
433
|
+
const sharedClientPromises = /* @__PURE__ */ new Map();
|
|
434
|
+
const sharedClientStartPromises = /* @__PURE__ */ new Map();
|
|
435
|
+
function buildSharedClientKey(auth, accountId) {
|
|
436
|
+
const normalizedAccountId = normalizeAccountId(accountId);
|
|
437
|
+
return [
|
|
438
|
+
auth.homeserver,
|
|
439
|
+
auth.userId,
|
|
440
|
+
auth.accessToken,
|
|
441
|
+
auth.encryption ? "e2ee" : "plain",
|
|
442
|
+
normalizedAccountId || "default"
|
|
443
|
+
].join("|");
|
|
444
|
+
}
|
|
445
|
+
async function createSharedMatrixClient(params) {
|
|
446
|
+
return {
|
|
447
|
+
client: await createMatrixClient({
|
|
448
|
+
homeserver: params.auth.homeserver,
|
|
449
|
+
userId: params.auth.userId,
|
|
450
|
+
accessToken: params.auth.accessToken,
|
|
451
|
+
encryption: params.auth.encryption,
|
|
452
|
+
localTimeoutMs: params.timeoutMs,
|
|
453
|
+
accountId: params.accountId
|
|
454
|
+
}),
|
|
455
|
+
key: buildSharedClientKey(params.auth, params.accountId),
|
|
456
|
+
started: false,
|
|
457
|
+
cryptoReady: false
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
async function ensureSharedClientStarted(params) {
|
|
461
|
+
if (params.state.started) return;
|
|
462
|
+
const key = params.state.key;
|
|
463
|
+
const existingStartPromise = sharedClientStartPromises.get(key);
|
|
464
|
+
if (existingStartPromise) {
|
|
465
|
+
await existingStartPromise;
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
const startPromise = (async () => {
|
|
469
|
+
const client = params.state.client;
|
|
470
|
+
if (params.encryption && !params.state.cryptoReady) try {
|
|
471
|
+
const joinedRooms = await client.getJoinedRooms();
|
|
472
|
+
if (client.crypto) {
|
|
473
|
+
await client.crypto.prepare(joinedRooms);
|
|
474
|
+
params.state.cryptoReady = true;
|
|
475
|
+
}
|
|
476
|
+
} catch (err) {
|
|
477
|
+
getMatrixLogService().warn("MatrixClientLite", "Failed to prepare crypto:", err);
|
|
478
|
+
}
|
|
479
|
+
await startMatrixClientWithGrace({
|
|
480
|
+
client,
|
|
481
|
+
onError: (err) => {
|
|
482
|
+
params.state.started = false;
|
|
483
|
+
getMatrixLogService().error("MatrixClientLite", "client.start() error:", err);
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
params.state.started = true;
|
|
487
|
+
})();
|
|
488
|
+
sharedClientStartPromises.set(key, startPromise);
|
|
489
|
+
try {
|
|
490
|
+
await startPromise;
|
|
491
|
+
} finally {
|
|
492
|
+
sharedClientStartPromises.delete(key);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
async function resolveSharedMatrixClient(params = {}) {
|
|
496
|
+
const accountId = normalizeAccountId(params.accountId);
|
|
497
|
+
const auth = params.auth ?? await resolveMatrixAuth({
|
|
498
|
+
cfg: params.cfg,
|
|
499
|
+
env: params.env,
|
|
500
|
+
accountId
|
|
501
|
+
});
|
|
502
|
+
const key = buildSharedClientKey(auth, accountId);
|
|
503
|
+
const shouldStart = params.startClient !== false;
|
|
504
|
+
const existingState = sharedClientStates.get(key);
|
|
505
|
+
if (existingState) {
|
|
506
|
+
if (shouldStart) await ensureSharedClientStarted({
|
|
507
|
+
state: existingState,
|
|
508
|
+
timeoutMs: params.timeoutMs,
|
|
509
|
+
initialSyncLimit: auth.initialSyncLimit,
|
|
510
|
+
encryption: auth.encryption
|
|
511
|
+
});
|
|
512
|
+
return existingState.client;
|
|
513
|
+
}
|
|
514
|
+
const existingPromise = sharedClientPromises.get(key);
|
|
515
|
+
if (existingPromise) {
|
|
516
|
+
const pending = await existingPromise;
|
|
517
|
+
if (shouldStart) await ensureSharedClientStarted({
|
|
518
|
+
state: pending,
|
|
519
|
+
timeoutMs: params.timeoutMs,
|
|
520
|
+
initialSyncLimit: auth.initialSyncLimit,
|
|
521
|
+
encryption: auth.encryption
|
|
522
|
+
});
|
|
523
|
+
return pending.client;
|
|
524
|
+
}
|
|
525
|
+
const createPromise = createSharedMatrixClient({
|
|
526
|
+
auth,
|
|
527
|
+
timeoutMs: params.timeoutMs,
|
|
528
|
+
accountId
|
|
529
|
+
});
|
|
530
|
+
sharedClientPromises.set(key, createPromise);
|
|
531
|
+
try {
|
|
532
|
+
const created = await createPromise;
|
|
533
|
+
sharedClientStates.set(key, created);
|
|
534
|
+
if (shouldStart) await ensureSharedClientStarted({
|
|
535
|
+
state: created,
|
|
536
|
+
timeoutMs: params.timeoutMs,
|
|
537
|
+
initialSyncLimit: auth.initialSyncLimit,
|
|
538
|
+
encryption: auth.encryption
|
|
539
|
+
});
|
|
540
|
+
return created.client;
|
|
541
|
+
} finally {
|
|
542
|
+
sharedClientPromises.delete(key);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function stopSharedClient(key) {
|
|
546
|
+
if (key) {
|
|
547
|
+
const state = sharedClientStates.get(key);
|
|
548
|
+
if (state) {
|
|
549
|
+
state.client.stop();
|
|
550
|
+
sharedClientStates.delete(key);
|
|
551
|
+
}
|
|
552
|
+
} else {
|
|
553
|
+
for (const state of sharedClientStates.values()) state.client.stop();
|
|
554
|
+
sharedClientStates.clear();
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Stop the shared client for a specific account.
|
|
559
|
+
* Use this instead of stopSharedClient() when shutting down a single account
|
|
560
|
+
* to avoid stopping all accounts.
|
|
561
|
+
*/
|
|
562
|
+
function stopSharedClientForAccount(auth, accountId) {
|
|
563
|
+
stopSharedClient(buildSharedClientKey(auth, normalizeAccountId(accountId)));
|
|
564
|
+
}
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region extensions/matrix/src/directory-live.ts
|
|
567
|
+
async function fetchMatrixJson(params) {
|
|
568
|
+
const res = await fetch(`${params.homeserver}${params.path}`, {
|
|
569
|
+
method: params.method ?? "GET",
|
|
570
|
+
headers: {
|
|
571
|
+
Authorization: `Bearer ${params.accessToken}`,
|
|
572
|
+
"Content-Type": "application/json"
|
|
573
|
+
},
|
|
574
|
+
body: params.body ? JSON.stringify(params.body) : void 0
|
|
575
|
+
});
|
|
576
|
+
if (!res.ok) {
|
|
577
|
+
const text = await res.text().catch(() => "");
|
|
578
|
+
throw new Error(`Matrix API ${params.path} failed (${res.status}): ${text || "unknown error"}`);
|
|
579
|
+
}
|
|
580
|
+
return await res.json();
|
|
581
|
+
}
|
|
582
|
+
function normalizeQuery(value) {
|
|
583
|
+
return value?.trim().toLowerCase() ?? "";
|
|
584
|
+
}
|
|
585
|
+
function resolveMatrixDirectoryLimit(limit) {
|
|
586
|
+
return typeof limit === "number" && limit > 0 ? limit : 20;
|
|
587
|
+
}
|
|
588
|
+
async function resolveMatrixDirectoryContext(params) {
|
|
589
|
+
const query = normalizeQuery(params.query);
|
|
590
|
+
if (!query) return null;
|
|
591
|
+
return {
|
|
592
|
+
query,
|
|
593
|
+
auth: await resolveMatrixAuth({
|
|
594
|
+
cfg: params.cfg,
|
|
595
|
+
accountId: params.accountId
|
|
596
|
+
})
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
function createGroupDirectoryEntry(params) {
|
|
600
|
+
return {
|
|
601
|
+
kind: "group",
|
|
602
|
+
id: params.id,
|
|
603
|
+
name: params.name,
|
|
604
|
+
handle: params.handle
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
async function listMatrixDirectoryPeersLive(params) {
|
|
608
|
+
const context = await resolveMatrixDirectoryContext(params);
|
|
609
|
+
if (!context) return [];
|
|
610
|
+
const { query, auth } = context;
|
|
611
|
+
return ((await fetchMatrixJson({
|
|
612
|
+
homeserver: auth.homeserver,
|
|
613
|
+
accessToken: auth.accessToken,
|
|
614
|
+
path: "/_matrix/client/v3/user_directory/search",
|
|
615
|
+
method: "POST",
|
|
616
|
+
body: {
|
|
617
|
+
search_term: query,
|
|
618
|
+
limit: resolveMatrixDirectoryLimit(params.limit)
|
|
619
|
+
}
|
|
620
|
+
})).results ?? []).map((entry) => {
|
|
621
|
+
const userId = entry.user_id?.trim();
|
|
622
|
+
if (!userId) return null;
|
|
623
|
+
return {
|
|
624
|
+
kind: "user",
|
|
625
|
+
id: userId,
|
|
626
|
+
name: entry.display_name?.trim() || void 0,
|
|
627
|
+
handle: entry.display_name ? `@${entry.display_name.trim()}` : void 0,
|
|
628
|
+
raw: entry
|
|
629
|
+
};
|
|
630
|
+
}).filter(Boolean);
|
|
631
|
+
}
|
|
632
|
+
async function resolveMatrixRoomAlias(homeserver, accessToken, alias) {
|
|
633
|
+
try {
|
|
634
|
+
return (await fetchMatrixJson({
|
|
635
|
+
homeserver,
|
|
636
|
+
accessToken,
|
|
637
|
+
path: `/_matrix/client/v3/directory/room/${encodeURIComponent(alias)}`
|
|
638
|
+
})).room_id?.trim() || null;
|
|
639
|
+
} catch {
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
async function fetchMatrixRoomName(homeserver, accessToken, roomId) {
|
|
644
|
+
try {
|
|
645
|
+
return (await fetchMatrixJson({
|
|
646
|
+
homeserver,
|
|
647
|
+
accessToken,
|
|
648
|
+
path: `/_matrix/client/v3/rooms/${encodeURIComponent(roomId)}/state/m.room.name`
|
|
649
|
+
})).name?.trim() || null;
|
|
650
|
+
} catch {
|
|
651
|
+
return null;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
async function listMatrixDirectoryGroupsLive(params) {
|
|
655
|
+
const context = await resolveMatrixDirectoryContext(params);
|
|
656
|
+
if (!context) return [];
|
|
657
|
+
const { query, auth } = context;
|
|
658
|
+
const limit = resolveMatrixDirectoryLimit(params.limit);
|
|
659
|
+
if (query.startsWith("#")) {
|
|
660
|
+
const roomId = await resolveMatrixRoomAlias(auth.homeserver, auth.accessToken, query);
|
|
661
|
+
if (!roomId) return [];
|
|
662
|
+
return [createGroupDirectoryEntry({
|
|
663
|
+
id: roomId,
|
|
664
|
+
name: query,
|
|
665
|
+
handle: query
|
|
666
|
+
})];
|
|
667
|
+
}
|
|
668
|
+
if (query.startsWith("!")) {
|
|
669
|
+
const originalId = params.query?.trim() ?? query;
|
|
670
|
+
return [createGroupDirectoryEntry({
|
|
671
|
+
id: originalId,
|
|
672
|
+
name: originalId
|
|
673
|
+
})];
|
|
674
|
+
}
|
|
675
|
+
const rooms = (await fetchMatrixJson({
|
|
676
|
+
homeserver: auth.homeserver,
|
|
677
|
+
accessToken: auth.accessToken,
|
|
678
|
+
path: "/_matrix/client/v3/joined_rooms"
|
|
679
|
+
})).joined_rooms ?? [];
|
|
680
|
+
const results = [];
|
|
681
|
+
for (const roomId of rooms) {
|
|
682
|
+
const name = await fetchMatrixRoomName(auth.homeserver, auth.accessToken, roomId);
|
|
683
|
+
if (!name) continue;
|
|
684
|
+
if (!name.toLowerCase().includes(query)) continue;
|
|
685
|
+
results.push({
|
|
686
|
+
kind: "group",
|
|
687
|
+
id: roomId,
|
|
688
|
+
name,
|
|
689
|
+
handle: `#${name}`
|
|
690
|
+
});
|
|
691
|
+
if (results.length >= limit) break;
|
|
692
|
+
}
|
|
693
|
+
return results;
|
|
694
|
+
}
|
|
695
|
+
//#endregion
|
|
696
|
+
//#region extensions/matrix/src/matrix/accounts.ts
|
|
697
|
+
/** Merge account config with top-level defaults, preserving nested objects. */
|
|
698
|
+
function mergeAccountConfig(base, account) {
|
|
699
|
+
const merged = {
|
|
700
|
+
...base,
|
|
701
|
+
...account
|
|
702
|
+
};
|
|
703
|
+
for (const key of ["dm", "actions"]) {
|
|
704
|
+
const b = base[key];
|
|
705
|
+
const o = account[key];
|
|
706
|
+
if (typeof b === "object" && b != null && typeof o === "object" && o != null) merged[key] = {
|
|
707
|
+
...b,
|
|
708
|
+
...o
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
delete merged.accounts;
|
|
712
|
+
delete merged.defaultAccount;
|
|
713
|
+
return merged;
|
|
714
|
+
}
|
|
715
|
+
const { listAccountIds: listMatrixAccountIds, resolveDefaultAccountId: resolveDefaultMatrixAccountId } = createAccountListHelpers("matrix", { normalizeAccountId });
|
|
716
|
+
function resolveAccountConfig(cfg, accountId) {
|
|
717
|
+
const accounts = cfg.channels?.matrix?.accounts;
|
|
718
|
+
if (!accounts || typeof accounts !== "object") return;
|
|
719
|
+
if (accounts[accountId]) return accounts[accountId];
|
|
720
|
+
const normalized = normalizeAccountId(accountId);
|
|
721
|
+
for (const key of Object.keys(accounts)) if (normalizeAccountId(key) === normalized) return accounts[key];
|
|
722
|
+
}
|
|
723
|
+
function resolveMatrixAccount(params) {
|
|
724
|
+
const accountId = normalizeAccountId(params.accountId);
|
|
725
|
+
const matrixBase = params.cfg.channels?.matrix ?? {};
|
|
726
|
+
const base = resolveMatrixAccountConfig({
|
|
727
|
+
cfg: params.cfg,
|
|
728
|
+
accountId
|
|
729
|
+
});
|
|
730
|
+
const enabled = base.enabled !== false && matrixBase.enabled !== false;
|
|
731
|
+
const resolved = resolveMatrixConfigForAccount(params.cfg, accountId, process.env);
|
|
732
|
+
const hasHomeserver = Boolean(resolved.homeserver);
|
|
733
|
+
const hasUserId = Boolean(resolved.userId);
|
|
734
|
+
const hasAccessToken = Boolean(resolved.accessToken);
|
|
735
|
+
const hasPassword = Boolean(resolved.password);
|
|
736
|
+
const hasPasswordAuth = hasUserId && (hasPassword || hasConfiguredSecretInput(base.password));
|
|
737
|
+
const stored = loadMatrixCredentials(process.env, accountId);
|
|
738
|
+
const hasStored = stored && resolved.homeserver ? credentialsMatchConfig(stored, {
|
|
739
|
+
homeserver: resolved.homeserver,
|
|
740
|
+
userId: resolved.userId || ""
|
|
741
|
+
}) : false;
|
|
742
|
+
const configured = hasHomeserver && (hasAccessToken || hasPasswordAuth || Boolean(hasStored));
|
|
743
|
+
return {
|
|
744
|
+
accountId,
|
|
745
|
+
enabled,
|
|
746
|
+
name: base.name?.trim() || void 0,
|
|
747
|
+
configured,
|
|
748
|
+
homeserver: resolved.homeserver || void 0,
|
|
749
|
+
userId: resolved.userId || void 0,
|
|
750
|
+
config: base
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
function resolveMatrixAccountConfig(params) {
|
|
754
|
+
const accountId = normalizeAccountId(params.accountId);
|
|
755
|
+
const matrixBase = params.cfg.channels?.matrix ?? {};
|
|
756
|
+
const accountConfig = resolveAccountConfig(params.cfg, accountId);
|
|
757
|
+
if (!accountConfig) return matrixBase;
|
|
758
|
+
return mergeAccountConfig(matrixBase, accountConfig);
|
|
759
|
+
}
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region extensions/matrix/src/resolve-targets.ts
|
|
762
|
+
function findExactDirectoryMatches(matches, query) {
|
|
763
|
+
const normalized = query.trim().toLowerCase();
|
|
764
|
+
if (!normalized) return [];
|
|
765
|
+
return matches.filter((match) => {
|
|
766
|
+
const id = match.id.trim().toLowerCase();
|
|
767
|
+
const name = match.name?.trim().toLowerCase();
|
|
768
|
+
const handle = match.handle?.trim().toLowerCase();
|
|
769
|
+
return normalized === id || normalized === name || normalized === handle;
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
function pickBestGroupMatch(matches, query) {
|
|
773
|
+
if (matches.length === 0) return;
|
|
774
|
+
const [exact] = findExactDirectoryMatches(matches, query);
|
|
775
|
+
return exact ?? matches[0];
|
|
776
|
+
}
|
|
777
|
+
function pickBestUserMatch(matches, query) {
|
|
778
|
+
if (matches.length === 0) return;
|
|
779
|
+
const exact = findExactDirectoryMatches(matches, query);
|
|
780
|
+
if (exact.length === 1) return exact[0];
|
|
781
|
+
}
|
|
782
|
+
function describeUserMatchFailure(matches, query) {
|
|
783
|
+
if (matches.length === 0) return "no matches";
|
|
784
|
+
const normalized = query.trim().toLowerCase();
|
|
785
|
+
if (!normalized) return "empty input";
|
|
786
|
+
const exact = findExactDirectoryMatches(matches, normalized);
|
|
787
|
+
if (exact.length === 0) return "no exact match; use full Matrix ID";
|
|
788
|
+
if (exact.length > 1) return "multiple exact matches; use full Matrix ID";
|
|
789
|
+
return "no exact match; use full Matrix ID";
|
|
790
|
+
}
|
|
791
|
+
async function resolveMatrixTargets(params) {
|
|
792
|
+
return await mapAllowlistResolutionInputs({
|
|
793
|
+
inputs: params.inputs,
|
|
794
|
+
mapInput: async (input) => {
|
|
795
|
+
const trimmed = input.trim();
|
|
796
|
+
if (!trimmed) return {
|
|
797
|
+
input,
|
|
798
|
+
resolved: false,
|
|
799
|
+
note: "empty input"
|
|
800
|
+
};
|
|
801
|
+
if (params.kind === "user") {
|
|
802
|
+
if (trimmed.startsWith("@") && trimmed.includes(":")) return {
|
|
803
|
+
input,
|
|
804
|
+
resolved: true,
|
|
805
|
+
id: trimmed
|
|
806
|
+
};
|
|
807
|
+
try {
|
|
808
|
+
const matches = await listMatrixDirectoryPeersLive({
|
|
809
|
+
cfg: params.cfg,
|
|
810
|
+
query: trimmed,
|
|
811
|
+
limit: 5
|
|
812
|
+
});
|
|
813
|
+
const best = pickBestUserMatch(matches, trimmed);
|
|
814
|
+
return {
|
|
815
|
+
input,
|
|
816
|
+
resolved: Boolean(best?.id),
|
|
817
|
+
id: best?.id,
|
|
818
|
+
name: best?.name,
|
|
819
|
+
note: best ? void 0 : describeUserMatchFailure(matches, trimmed)
|
|
820
|
+
};
|
|
821
|
+
} catch (err) {
|
|
822
|
+
params.runtime?.error?.(`matrix resolve failed: ${String(err)}`);
|
|
823
|
+
return {
|
|
824
|
+
input,
|
|
825
|
+
resolved: false,
|
|
826
|
+
note: "lookup failed"
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
try {
|
|
831
|
+
const matches = await listMatrixDirectoryGroupsLive({
|
|
832
|
+
cfg: params.cfg,
|
|
833
|
+
query: trimmed,
|
|
834
|
+
limit: 5
|
|
835
|
+
});
|
|
836
|
+
const best = pickBestGroupMatch(matches, trimmed);
|
|
837
|
+
return {
|
|
838
|
+
input,
|
|
839
|
+
resolved: Boolean(best?.id),
|
|
840
|
+
id: best?.id,
|
|
841
|
+
name: best?.name,
|
|
842
|
+
note: matches.length > 1 ? "multiple matches; chose first" : void 0
|
|
843
|
+
};
|
|
844
|
+
} catch (err) {
|
|
845
|
+
params.runtime?.error?.(`matrix resolve failed: ${String(err)}`);
|
|
846
|
+
return {
|
|
847
|
+
input,
|
|
848
|
+
resolved: false,
|
|
849
|
+
note: "lookup failed"
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region extensions/matrix/src/setup-core.ts
|
|
857
|
+
const channel$1 = "matrix";
|
|
858
|
+
function buildMatrixConfigUpdate(cfg, input) {
|
|
859
|
+
const existing = cfg.channels?.matrix ?? {};
|
|
860
|
+
return {
|
|
861
|
+
...cfg,
|
|
862
|
+
channels: {
|
|
863
|
+
...cfg.channels,
|
|
864
|
+
matrix: {
|
|
865
|
+
...existing,
|
|
866
|
+
enabled: true,
|
|
867
|
+
...input.homeserver ? { homeserver: input.homeserver } : {},
|
|
868
|
+
...input.userId ? { userId: input.userId } : {},
|
|
869
|
+
...input.accessToken ? { accessToken: input.accessToken } : {},
|
|
870
|
+
...input.password ? { password: input.password } : {},
|
|
871
|
+
...input.deviceName ? { deviceName: input.deviceName } : {},
|
|
872
|
+
...typeof input.initialSyncLimit === "number" ? { initialSyncLimit: input.initialSyncLimit } : {}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
const matrixSetupAdapter = {
|
|
878
|
+
resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
|
|
879
|
+
applyAccountName: ({ cfg, accountId, name }) => prepareScopedSetupConfig({
|
|
880
|
+
cfg,
|
|
881
|
+
channelKey: channel$1,
|
|
882
|
+
accountId,
|
|
883
|
+
name
|
|
884
|
+
}),
|
|
885
|
+
validateInput: ({ input }) => {
|
|
886
|
+
if (input.useEnv) return null;
|
|
887
|
+
if (!input.homeserver?.trim()) return "Matrix requires --homeserver";
|
|
888
|
+
const accessToken = input.accessToken?.trim();
|
|
889
|
+
const password = normalizeSecretInputString(input.password);
|
|
890
|
+
const userId = input.userId?.trim();
|
|
891
|
+
if (!accessToken && !password) return "Matrix requires --access-token or --password";
|
|
892
|
+
if (!accessToken) {
|
|
893
|
+
if (!userId) return "Matrix requires --user-id when using --password";
|
|
894
|
+
if (!password) return "Matrix requires --password when using --user-id";
|
|
895
|
+
}
|
|
896
|
+
return null;
|
|
897
|
+
},
|
|
898
|
+
applyAccountConfig: ({ cfg, accountId, input }) => {
|
|
899
|
+
const next = prepareScopedSetupConfig({
|
|
900
|
+
cfg,
|
|
901
|
+
channelKey: channel$1,
|
|
902
|
+
accountId,
|
|
903
|
+
name: input.name,
|
|
904
|
+
migrateBaseName: true
|
|
905
|
+
});
|
|
906
|
+
if (input.useEnv) return {
|
|
907
|
+
...next,
|
|
908
|
+
channels: {
|
|
909
|
+
...next.channels,
|
|
910
|
+
matrix: {
|
|
911
|
+
...next.channels?.matrix,
|
|
912
|
+
enabled: true
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
return buildMatrixConfigUpdate(next, {
|
|
917
|
+
homeserver: input.homeserver?.trim(),
|
|
918
|
+
userId: input.userId?.trim(),
|
|
919
|
+
accessToken: input.accessToken?.trim(),
|
|
920
|
+
password: normalizeSecretInputString(input.password),
|
|
921
|
+
deviceName: input.deviceName?.trim(),
|
|
922
|
+
initialSyncLimit: input.initialSyncLimit
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
//#endregion
|
|
927
|
+
//#region extensions/matrix/src/setup-surface.ts
|
|
928
|
+
const channel = "matrix";
|
|
929
|
+
function setMatrixDmPolicy(cfg, policy) {
|
|
930
|
+
const allowFrom = policy === "open" ? addWildcardAllowFrom(cfg.channels?.matrix?.dm?.allowFrom) : void 0;
|
|
931
|
+
return {
|
|
932
|
+
...cfg,
|
|
933
|
+
channels: {
|
|
934
|
+
...cfg.channels,
|
|
935
|
+
matrix: {
|
|
936
|
+
...cfg.channels?.matrix,
|
|
937
|
+
dm: {
|
|
938
|
+
...cfg.channels?.matrix?.dm,
|
|
939
|
+
policy,
|
|
940
|
+
...allowFrom ? { allowFrom } : {}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
async function noteMatrixAuthHelp(prompter) {
|
|
947
|
+
await prompter.note([
|
|
948
|
+
"Matrix requires a homeserver URL.",
|
|
949
|
+
"Use an access token (recommended) or a password (logs in and stores a token).",
|
|
950
|
+
"With access token: user ID is fetched automatically.",
|
|
951
|
+
"Env vars supported: MATRIX_HOMESERVER, MATRIX_USER_ID, MATRIX_ACCESS_TOKEN, MATRIX_PASSWORD.",
|
|
952
|
+
`Docs: ${formatDocsLink("/channels/matrix", "channels/matrix")}`
|
|
953
|
+
].join("\n"), "Matrix setup");
|
|
954
|
+
}
|
|
955
|
+
async function promptMatrixAllowFrom(params) {
|
|
956
|
+
const { cfg, prompter } = params;
|
|
957
|
+
const existingAllowFrom = cfg.channels?.matrix?.dm?.allowFrom ?? [];
|
|
958
|
+
const account = resolveMatrixAccount({ cfg });
|
|
959
|
+
const canResolve = Boolean(account.configured);
|
|
960
|
+
const parseInput = (raw) => raw.split(/[\n,;]+/g).map((entry) => entry.trim()).filter(Boolean);
|
|
961
|
+
const isFullUserId = (value) => value.startsWith("@") && value.includes(":");
|
|
962
|
+
while (true) {
|
|
963
|
+
const entry = await prompter.text({
|
|
964
|
+
message: "Matrix allowFrom (full @user:server; display name only if unique)",
|
|
965
|
+
placeholder: "@user:server",
|
|
966
|
+
initialValue: existingAllowFrom[0] ? String(existingAllowFrom[0]) : void 0,
|
|
967
|
+
validate: (value) => String(value ?? "").trim() ? void 0 : "Required"
|
|
968
|
+
});
|
|
969
|
+
const parts = parseInput(String(entry));
|
|
970
|
+
const resolvedIds = [];
|
|
971
|
+
const pending = [];
|
|
972
|
+
const unresolved = [];
|
|
973
|
+
const unresolvedNotes = [];
|
|
974
|
+
for (const part of parts) {
|
|
975
|
+
if (isFullUserId(part)) {
|
|
976
|
+
resolvedIds.push(part);
|
|
977
|
+
continue;
|
|
978
|
+
}
|
|
979
|
+
if (!canResolve) {
|
|
980
|
+
unresolved.push(part);
|
|
981
|
+
continue;
|
|
982
|
+
}
|
|
983
|
+
pending.push(part);
|
|
984
|
+
}
|
|
985
|
+
if (pending.length > 0) {
|
|
986
|
+
const results = await resolveMatrixTargets({
|
|
987
|
+
cfg,
|
|
988
|
+
inputs: pending,
|
|
989
|
+
kind: "user"
|
|
990
|
+
}).catch(() => []);
|
|
991
|
+
for (const result of results) {
|
|
992
|
+
if (result?.resolved && result.id) {
|
|
993
|
+
resolvedIds.push(result.id);
|
|
994
|
+
continue;
|
|
995
|
+
}
|
|
996
|
+
if (result?.input) {
|
|
997
|
+
unresolved.push(result.input);
|
|
998
|
+
if (result.note) unresolvedNotes.push(`${result.input}: ${result.note}`);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
if (unresolved.length > 0) {
|
|
1003
|
+
const details = unresolvedNotes.length > 0 ? unresolvedNotes : unresolved;
|
|
1004
|
+
await prompter.note(`Could not resolve:\n${details.join("\n")}\nUse full @user:server IDs.`, "Matrix allowlist");
|
|
1005
|
+
continue;
|
|
1006
|
+
}
|
|
1007
|
+
const unique = mergeAllowFromEntries(existingAllowFrom, resolvedIds);
|
|
1008
|
+
return {
|
|
1009
|
+
...cfg,
|
|
1010
|
+
channels: {
|
|
1011
|
+
...cfg.channels,
|
|
1012
|
+
matrix: {
|
|
1013
|
+
...cfg.channels?.matrix,
|
|
1014
|
+
enabled: true,
|
|
1015
|
+
dm: {
|
|
1016
|
+
...cfg.channels?.matrix?.dm,
|
|
1017
|
+
policy: "allowlist",
|
|
1018
|
+
allowFrom: unique
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
function setMatrixGroupPolicy(cfg, groupPolicy) {
|
|
1026
|
+
return setTopLevelChannelGroupPolicy({
|
|
1027
|
+
cfg,
|
|
1028
|
+
channel: "matrix",
|
|
1029
|
+
groupPolicy,
|
|
1030
|
+
enabled: true
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
function setMatrixGroupRooms(cfg, roomKeys) {
|
|
1034
|
+
const groups = Object.fromEntries(roomKeys.map((key) => [key, { allow: true }]));
|
|
1035
|
+
return {
|
|
1036
|
+
...cfg,
|
|
1037
|
+
channels: {
|
|
1038
|
+
...cfg.channels,
|
|
1039
|
+
matrix: {
|
|
1040
|
+
...cfg.channels?.matrix,
|
|
1041
|
+
enabled: true,
|
|
1042
|
+
groups
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
async function resolveMatrixGroupRooms(params) {
|
|
1048
|
+
if (params.entries.length === 0) return [];
|
|
1049
|
+
try {
|
|
1050
|
+
const resolvedIds = [];
|
|
1051
|
+
const unresolved = [];
|
|
1052
|
+
for (const entry of params.entries) {
|
|
1053
|
+
const trimmed = entry.trim();
|
|
1054
|
+
if (!trimmed) continue;
|
|
1055
|
+
const cleaned = trimmed.replace(/^(room|channel):/i, "").trim();
|
|
1056
|
+
if (cleaned.startsWith("!") && cleaned.includes(":")) {
|
|
1057
|
+
resolvedIds.push(cleaned);
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
const matches = await listMatrixDirectoryGroupsLive({
|
|
1061
|
+
cfg: params.cfg,
|
|
1062
|
+
query: trimmed,
|
|
1063
|
+
limit: 10
|
|
1064
|
+
});
|
|
1065
|
+
const best = matches.find((match) => (match.name ?? "").toLowerCase() === trimmed.toLowerCase()) ?? matches[0];
|
|
1066
|
+
if (best?.id) resolvedIds.push(best.id);
|
|
1067
|
+
else unresolved.push(entry);
|
|
1068
|
+
}
|
|
1069
|
+
const roomKeys = [...resolvedIds, ...unresolved.map((entry) => entry.trim()).filter(Boolean)];
|
|
1070
|
+
const resolution = formatResolvedUnresolvedNote({
|
|
1071
|
+
resolved: resolvedIds,
|
|
1072
|
+
unresolved
|
|
1073
|
+
});
|
|
1074
|
+
if (resolution) await params.prompter.note(resolution, "Matrix rooms");
|
|
1075
|
+
return roomKeys;
|
|
1076
|
+
} catch (err) {
|
|
1077
|
+
await params.prompter.note(`Room lookup failed; keeping entries as typed. ${String(err)}`, "Matrix rooms");
|
|
1078
|
+
return params.entries.map((entry) => entry.trim()).filter(Boolean);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
const matrixSetupWizard = {
|
|
1082
|
+
channel,
|
|
1083
|
+
resolveAccountIdForConfigure: () => DEFAULT_ACCOUNT_ID,
|
|
1084
|
+
resolveShouldPromptAccountIds: () => false,
|
|
1085
|
+
status: {
|
|
1086
|
+
configuredLabel: "configured",
|
|
1087
|
+
unconfiguredLabel: "needs homeserver + access token or password",
|
|
1088
|
+
configuredHint: "configured",
|
|
1089
|
+
unconfiguredHint: "needs auth",
|
|
1090
|
+
resolveConfigured: ({ cfg }) => resolveMatrixAccount({ cfg }).configured,
|
|
1091
|
+
resolveStatusLines: ({ cfg }) => {
|
|
1092
|
+
return [`Matrix: ${resolveMatrixAccount({ cfg }).configured ? "configured" : "needs homeserver + access token or password"}`];
|
|
1093
|
+
},
|
|
1094
|
+
resolveSelectionHint: ({ cfg, configured }) => {
|
|
1095
|
+
if (!isMatrixSdkAvailable()) return "install @vector-im/matrix-bot-sdk";
|
|
1096
|
+
return configured ? "configured" : "needs auth";
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
credentials: [],
|
|
1100
|
+
finalize: async ({ cfg, runtime, prompter, forceAllowFrom }) => {
|
|
1101
|
+
let next = cfg;
|
|
1102
|
+
await ensureMatrixSdkInstalled({
|
|
1103
|
+
runtime,
|
|
1104
|
+
confirm: async (message) => await prompter.confirm({
|
|
1105
|
+
message,
|
|
1106
|
+
initialValue: true
|
|
1107
|
+
})
|
|
1108
|
+
});
|
|
1109
|
+
const existing = next.channels?.matrix ?? {};
|
|
1110
|
+
if (!resolveMatrixAccount({ cfg: next }).configured) await noteMatrixAuthHelp(prompter);
|
|
1111
|
+
const envHomeserver = process.env.MATRIX_HOMESERVER?.trim();
|
|
1112
|
+
const envUserId = process.env.MATRIX_USER_ID?.trim();
|
|
1113
|
+
const envAccessToken = process.env.MATRIX_ACCESS_TOKEN?.trim();
|
|
1114
|
+
const envPassword = process.env.MATRIX_PASSWORD?.trim();
|
|
1115
|
+
if (Boolean(envHomeserver && (envAccessToken || envUserId && envPassword)) && !existing.homeserver && !existing.userId && !existing.accessToken && !existing.password) {
|
|
1116
|
+
if (await prompter.confirm({
|
|
1117
|
+
message: "Matrix env vars detected. Use env values?",
|
|
1118
|
+
initialValue: true
|
|
1119
|
+
})) {
|
|
1120
|
+
next = matrixSetupAdapter.applyAccountConfig({
|
|
1121
|
+
cfg: next,
|
|
1122
|
+
accountId: DEFAULT_ACCOUNT_ID,
|
|
1123
|
+
input: { useEnv: true }
|
|
1124
|
+
});
|
|
1125
|
+
if (forceAllowFrom) next = await promptMatrixAllowFrom({
|
|
1126
|
+
cfg: next,
|
|
1127
|
+
prompter
|
|
1128
|
+
});
|
|
1129
|
+
return { cfg: next };
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
const homeserver = String(await prompter.text({
|
|
1133
|
+
message: "Matrix homeserver URL",
|
|
1134
|
+
initialValue: existing.homeserver ?? envHomeserver,
|
|
1135
|
+
validate: (value) => {
|
|
1136
|
+
const raw = String(value ?? "").trim();
|
|
1137
|
+
if (!raw) return "Required";
|
|
1138
|
+
if (!/^https?:\/\//i.test(raw)) return "Use a full URL (https://...)";
|
|
1139
|
+
}
|
|
1140
|
+
})).trim();
|
|
1141
|
+
let accessToken = existing.accessToken ?? "";
|
|
1142
|
+
let password = existing.password;
|
|
1143
|
+
let userId = existing.userId ?? "";
|
|
1144
|
+
const existingPasswordConfigured = hasConfiguredSecretInput(existing.password);
|
|
1145
|
+
const passwordConfigured = () => hasConfiguredSecretInput(password);
|
|
1146
|
+
if (accessToken || passwordConfigured()) {
|
|
1147
|
+
if (!await prompter.confirm({
|
|
1148
|
+
message: "Matrix credentials already configured. Keep them?",
|
|
1149
|
+
initialValue: true
|
|
1150
|
+
})) {
|
|
1151
|
+
accessToken = "";
|
|
1152
|
+
password = void 0;
|
|
1153
|
+
userId = "";
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
if (!accessToken && !passwordConfigured()) if (await prompter.select({
|
|
1157
|
+
message: "Matrix auth method",
|
|
1158
|
+
options: [{
|
|
1159
|
+
value: "token",
|
|
1160
|
+
label: "Access token (user ID fetched automatically)"
|
|
1161
|
+
}, {
|
|
1162
|
+
value: "password",
|
|
1163
|
+
label: "Password (requires user ID)"
|
|
1164
|
+
}]
|
|
1165
|
+
}) === "token") {
|
|
1166
|
+
accessToken = String(await prompter.text({
|
|
1167
|
+
message: "Matrix access token",
|
|
1168
|
+
validate: (value) => value?.trim() ? void 0 : "Required"
|
|
1169
|
+
})).trim();
|
|
1170
|
+
userId = "";
|
|
1171
|
+
} else {
|
|
1172
|
+
userId = String(await prompter.text({
|
|
1173
|
+
message: "Matrix user ID",
|
|
1174
|
+
initialValue: existing.userId ?? envUserId,
|
|
1175
|
+
validate: (value) => {
|
|
1176
|
+
const raw = String(value ?? "").trim();
|
|
1177
|
+
if (!raw) return "Required";
|
|
1178
|
+
if (!raw.startsWith("@")) return "Matrix user IDs should start with @";
|
|
1179
|
+
if (!raw.includes(":")) return "Matrix user IDs should include a server (:server)";
|
|
1180
|
+
}
|
|
1181
|
+
})).trim();
|
|
1182
|
+
const passwordPromptState = buildSingleChannelSecretPromptState({
|
|
1183
|
+
accountConfigured: Boolean(existingPasswordConfigured),
|
|
1184
|
+
hasConfigToken: existingPasswordConfigured,
|
|
1185
|
+
allowEnv: true,
|
|
1186
|
+
envValue: envPassword
|
|
1187
|
+
});
|
|
1188
|
+
const passwordResult = await promptSingleChannelSecretInput({
|
|
1189
|
+
cfg: next,
|
|
1190
|
+
prompter,
|
|
1191
|
+
providerHint: channel,
|
|
1192
|
+
credentialLabel: "password",
|
|
1193
|
+
accountConfigured: passwordPromptState.accountConfigured,
|
|
1194
|
+
canUseEnv: passwordPromptState.canUseEnv,
|
|
1195
|
+
hasConfigToken: passwordPromptState.hasConfigToken,
|
|
1196
|
+
envPrompt: "MATRIX_PASSWORD detected. Use env var?",
|
|
1197
|
+
keepPrompt: "Matrix password already configured. Keep it?",
|
|
1198
|
+
inputPrompt: "Matrix password",
|
|
1199
|
+
preferredEnvVar: "MATRIX_PASSWORD"
|
|
1200
|
+
});
|
|
1201
|
+
if (passwordResult.action === "set") password = passwordResult.value;
|
|
1202
|
+
if (passwordResult.action === "use-env") password = void 0;
|
|
1203
|
+
}
|
|
1204
|
+
const deviceName = String(await prompter.text({
|
|
1205
|
+
message: "Matrix device name (optional)",
|
|
1206
|
+
initialValue: existing.deviceName ?? "MoldClaw Gateway"
|
|
1207
|
+
})).trim();
|
|
1208
|
+
const enableEncryption = await prompter.confirm({
|
|
1209
|
+
message: "Enable end-to-end encryption (E2EE)?",
|
|
1210
|
+
initialValue: existing.encryption ?? false
|
|
1211
|
+
});
|
|
1212
|
+
next = {
|
|
1213
|
+
...next,
|
|
1214
|
+
channels: {
|
|
1215
|
+
...next.channels,
|
|
1216
|
+
matrix: {
|
|
1217
|
+
...next.channels?.matrix,
|
|
1218
|
+
enabled: true,
|
|
1219
|
+
homeserver,
|
|
1220
|
+
userId: userId || void 0,
|
|
1221
|
+
accessToken: accessToken || void 0,
|
|
1222
|
+
password,
|
|
1223
|
+
deviceName: deviceName || void 0,
|
|
1224
|
+
encryption: enableEncryption || void 0
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
};
|
|
1228
|
+
if (forceAllowFrom) next = await promptMatrixAllowFrom({
|
|
1229
|
+
cfg: next,
|
|
1230
|
+
prompter
|
|
1231
|
+
});
|
|
1232
|
+
return { cfg: next };
|
|
1233
|
+
},
|
|
1234
|
+
dmPolicy: {
|
|
1235
|
+
label: "Matrix",
|
|
1236
|
+
channel,
|
|
1237
|
+
policyKey: "channels.matrix.dm.policy",
|
|
1238
|
+
allowFromKey: "channels.matrix.dm.allowFrom",
|
|
1239
|
+
getCurrent: (cfg) => cfg.channels?.matrix?.dm?.policy ?? "pairing",
|
|
1240
|
+
setPolicy: (cfg, policy) => setMatrixDmPolicy(cfg, policy),
|
|
1241
|
+
promptAllowFrom: promptMatrixAllowFrom
|
|
1242
|
+
},
|
|
1243
|
+
groupAccess: {
|
|
1244
|
+
label: "Matrix rooms",
|
|
1245
|
+
placeholder: "!roomId:server, #alias:server, Project Room",
|
|
1246
|
+
currentPolicy: ({ cfg }) => cfg.channels?.matrix?.groupPolicy ?? "allowlist",
|
|
1247
|
+
currentEntries: ({ cfg }) => Object.keys(cfg.channels?.matrix?.groups ?? cfg.channels?.matrix?.rooms ?? {}),
|
|
1248
|
+
updatePrompt: ({ cfg }) => Boolean(cfg.channels?.matrix?.groups ?? cfg.channels?.matrix?.rooms),
|
|
1249
|
+
setPolicy: ({ cfg, policy }) => setMatrixGroupPolicy(cfg, policy),
|
|
1250
|
+
resolveAllowlist: async ({ cfg, entries, prompter }) => await resolveMatrixGroupRooms({
|
|
1251
|
+
cfg,
|
|
1252
|
+
entries,
|
|
1253
|
+
prompter
|
|
1254
|
+
}),
|
|
1255
|
+
applyAllowlist: ({ cfg, resolved }) => setMatrixGroupRooms(cfg, resolved)
|
|
1256
|
+
},
|
|
1257
|
+
disable: (cfg) => ({
|
|
1258
|
+
...cfg,
|
|
1259
|
+
channels: {
|
|
1260
|
+
...cfg.channels,
|
|
1261
|
+
matrix: {
|
|
1262
|
+
...cfg.channels?.matrix,
|
|
1263
|
+
enabled: false
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
})
|
|
1267
|
+
};
|
|
1268
|
+
//#endregion
|
|
1269
|
+
export { isBunRuntime as _, resolveDefaultMatrixAccountId as a, listMatrixDirectoryGroupsLive as c, stopSharedClientForAccount as d, startMatrixClientWithGrace as f, loadMatrixSdk as g, getMatrixLogService as h, listMatrixAccountIds as i, listMatrixDirectoryPeersLive as l, resolveMatrixAuth as m, matrixSetupAdapter as n, resolveMatrixAccount as o, createMatrixClient as p, resolveMatrixTargets as r, resolveMatrixAccountConfig as s, matrixSetupWizard as t, resolveSharedMatrixClient as u };
|