@gaodefa/daocore 2026.5.29 → 2026.5.30
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/abort-DI3P6TIb.js +277 -0
- package/dist/abort.runtime-B6Z7lDEa.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/account-inspect-BFz7X0TX.js +173 -0
- package/dist/accounts-BoYYrY7x.js +107 -0
- package/dist/accounts-Busq29zW.js +107 -0
- package/dist/accounts-CuvH2tuN.js +119 -0
- package/dist/accounts-DkIcqvf7.js +2 -0
- package/dist/acp-runtime-BA8lzXzf.js +26 -0
- package/dist/acp-spawn-DPz2aX3A.js +2 -0
- package/dist/acp-spawn-DvVCsWYV.js +1275 -0
- package/dist/acp-stateful-target-driver-DcC76aZW.js +89 -0
- package/dist/action-kill-D-dVisIX.js +33 -0
- package/dist/action-runtime-BEiqwxDD.js +469 -0
- package/dist/action-runtime-api-1LzcGjcX.js +2 -0
- package/dist/action-send-c3CnDuPg.js +39 -0
- package/dist/action-spawn-Dj4kwpWs.js +47 -0
- package/dist/actions-qLccmQBc.js +161 -0
- package/dist/actions.runtime-B5vYAgNi.js +5 -0
- package/dist/agent-command-D6Ds198G.js +1367 -0
- package/dist/agent-components.runtime-xquK0B3L.js +10 -0
- package/dist/agent-components.runtime.js +1 -1
- package/dist/agent-harness-runtime-Dq1fCBOM.js +180 -0
- package/dist/agent-harness-task-runtime-DvSEqFkD.js +140 -0
- package/dist/agent-lm5ZYOFy.js +3 -0
- package/dist/agent-runner-execution-Dbh2pDhQ.js +1713 -0
- package/dist/agent-runner-utils-Di3r2T1T.js +266 -0
- package/dist/agent-runner.runtime-BW90EcGW.js +3455 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-BgIT5Ytc.js +229 -0
- package/dist/agent-via-gateway-DMMS8-hK.js +463 -0
- package/dist/agent-ylolD8-V.js +2 -0
- package/dist/api-BB4vXLtW.js +2 -0
- package/dist/api-CUhM3KNB.js +134 -0
- package/dist/api-CewRHSbT.js +6 -0
- package/dist/api-CfKjNJlW.js +2 -0
- package/dist/api-Rsnqui1u.js +3 -0
- package/dist/api-k7AvxwHr.js +639 -0
- package/dist/apply-DQ4TQNMA.js +54 -0
- package/dist/apply-S_75Py4Y.js +41 -0
- package/dist/approval-handler.runtime-Cthxrstu.js +130 -0
- package/dist/assistant-Cp9pGaBw.js +291 -0
- package/dist/attachment-normalize-5R0bLLOj.js +225 -0
- package/dist/attempt-execution-DuyyZYsU.js +558 -0
- package/dist/attempt-execution.runtime-DF2GPgNh.js +3 -0
- package/dist/attempt-execution.runtime.js +1 -1
- package/dist/attempt-execution.shared-CwdukA3t.js +38 -0
- package/dist/attempt.prompt-helpers-CUqKtIa5.js +475 -0
- package/dist/attempt.tool-run-context-BbN4_BYO.js +2094 -0
- package/dist/binding-routing-C6Ex2Blu.js +113 -0
- package/dist/binding-targets-BqREncSL.js +121 -0
- package/dist/bot-DGMEkaIJ.js +7894 -0
- package/dist/bot-deps-BltYjeMX.js +2 -0
- package/dist/bot-deps-XvGCor9f.js +747 -0
- package/dist/bot-message-context.runtime-kK-xvLV7.js +7 -0
- package/dist/bot-message-context.runtime.js +1 -1
- package/dist/bot-message-context.session.runtime-DpOIJUae.js +12 -0
- package/dist/bot-message-context.session.runtime.js +1 -1
- package/dist/bot-native-commands.delivery.runtime-D49p5Lc1.js +4 -0
- package/dist/bot-native-commands.delivery.runtime.js +1 -1
- package/dist/bot-native-commands.runtime-8XBdSpkQ.js +13 -0
- package/dist/bot-native-commands.runtime.js +1 -1
- package/dist/bridge-server-y_XGduPx.js +113 -0
- package/dist/browser-cli-B2jmmTT3.js +230 -0
- package/dist/browser-cli-actions-input-JQt5ZQcn.js +473 -0
- package/dist/browser-cli-actions-observe-CrfKh6AX.js +81 -0
- package/dist/browser-cli-debug-DQACWlvC.js +137 -0
- package/dist/browser-cli-inspect-DDnxx0Xw.js +104 -0
- package/dist/browser-cli-lEuOnZzs.js +2 -0
- package/dist/browser-cli-manage-DogmwtYt.js +443 -0
- package/dist/browser-cli-resize-BHuV71VZ.js +26 -0
- package/dist/browser-cli-shared-CidShgoF.js +50 -0
- package/dist/browser-cli-state-i8cCGbiQ.js +337 -0
- package/dist/browser-control-auth-CKfXdXWj.js +2 -0
- package/dist/browser-profiles-ATBTvUGh.js +2 -0
- package/dist/browser-runtime-KmCT6FuL.js +384 -0
- package/dist/build-DOOT6f62.js +257 -0
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/capability-cli-DwvrwB-g.js +1782 -0
- package/dist/channel-B-wgK1bK.js +481 -0
- package/dist/channel-B1e_k1P0.js +867 -0
- package/dist/channel-BRDfa5tc.js +1777 -0
- package/dist/channel-BVEO1O4p.js +376 -0
- package/dist/channel-BYlO5l1d.js +508 -0
- package/dist/channel-Bl0sPoNx.js +653 -0
- package/dist/channel-C84xtDBy.js +1134 -0
- package/dist/channel-CLgKq4Ds.js +1556 -0
- package/dist/channel-CZT0qxLh.js +1249 -0
- package/dist/channel-CffBHWkb.js +955 -0
- package/dist/channel-D34ZJvVB.js +2126 -0
- package/dist/channel-DcdXLo_W.js +238 -0
- package/dist/channel-DnK5TrXV.js +362 -0
- package/dist/channel-Dzj4RHY2.js +740 -0
- package/dist/channel-OhZzLZCj.js +562 -0
- package/dist/channel-actions.runtime-Cdvhqc9s.js +265 -0
- package/dist/channel-actions.runtime.js +1 -1
- package/dist/channel-core-Dz9I_R4j.js +5 -0
- package/dist/channel-inbound-COGoV_aS.js +80 -0
- package/dist/channel-mP6HCIMr.js +1496 -0
- package/dist/channel-plugin-runtime-C0R46KeG.js +998 -0
- package/dist/channel-quGdgWel.js +808 -0
- package/dist/channel-runtime-FvPQoIF9.js +408 -0
- package/dist/channel.runtime-2vUz3gij.js +109 -0
- package/dist/channel.runtime-BZLDSNuQ.js +254 -0
- package/dist/channel.runtime-Bo5jO0Hj.js +4 -0
- package/dist/channel.runtime-CDgvrjM2.js +652 -0
- package/dist/channel.runtime-COf8SDFn.js +88 -0
- package/dist/channel.runtime-C_C1f8lu.js +733 -0
- package/dist/channel.runtime-CqPbsg8t.js +2528 -0
- package/dist/channel.runtime-DtV85Khx.js +1008 -0
- package/dist/channel.runtime-Spt1ukGW.js +21009 -0
- package/dist/channel.setup-Bc0LUQS1.js +1098 -0
- package/dist/channel.setup-ChTkj2hq.js +343 -0
- package/dist/channel.setup-CpMD9F8i.js +10 -0
- package/dist/chat-mUsjD5YN.js +2666 -0
- package/dist/chrome-u314zcbM.js +1503 -0
- package/dist/cli/run-main.js +5 -5
- package/dist/cli-CJMoqXrc.js +1341 -0
- package/dist/cli-compaction-qGYB7suI.js +347 -0
- package/dist/cli-metadata-BBJFpNU9.js +22 -0
- package/dist/cli-runner-C0kcts0I.js +540 -0
- package/dist/cli-runner-CTm8K6s8.js +2 -0
- package/dist/cli-runner.runtime-C8deL5FL.js +3 -0
- package/dist/cli-runner.runtime-DDAg1D0L.js +4 -0
- package/dist/cli-runner.runtime.js +1 -1
- package/dist/cli-startup-metadata.json +8 -8
- package/dist/client-CPxpgs4m.js +650 -0
- package/dist/client-adapter-CLlqOqfu.js +897 -0
- package/dist/client-factory-R7Rr2jwn.js +9 -0
- package/dist/command-auth-CkQP1buP.js +135 -0
- package/dist/command-handlers-CJEjFyMk.js +1609 -0
- package/dist/command-registry-BDgyOqDw.js +4 -0
- package/dist/command-registry-BVi5Jn1S.js +9 -0
- package/dist/command-registry-core-JCfsVRtz.js +110 -0
- package/dist/command-status.runtime-CM1JLzi6.js +90 -0
- package/dist/command-status.runtime.js +1 -1
- package/dist/commands-acp-C1-I78U6.js +74 -0
- package/dist/commands-compact.runtime-DOsNavwp.js +10 -0
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/commands-handlers.runtime-BD1n2WGw.js +6154 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-status-DU_UTQz1.js +16 -0
- package/dist/commands-status-DejfTakp.js +3 -0
- package/dist/commands-status.runtime-DejfTakp.js +3 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands-subagents-control.runtime-D7vo_2Y_.js +3 -0
- package/dist/commands-subagents-control.runtime-DGybTjJ6.js +2 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/commands-system-prompt-BEBXAMea.js +2 -0
- package/dist/commands-system-prompt-gj3oQpQO.js +162 -0
- package/dist/commands.runtime-CgXX70IN.js +176 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/commitments/runtime.js +1 -1
- package/dist/compact-C41XxMDt.js +480 -0
- package/dist/compact-DUVAF9EC.js +1141 -0
- package/dist/compact.runtime-COMRg6s3.js +12 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-CmEYoB9a.js +315 -0
- package/dist/computer-use-BwJHu1QF.js +367 -0
- package/dist/config-ATBTvUGh.js +2 -0
- package/dist/config-DlNgjF8W.js +373 -0
- package/dist/config-mutations-tl_OqI6d.js +159 -0
- package/dist/context-engine-host-compat-BNPAIK9F.js +288 -0
- package/dist/context-engine-host-compat-C69CK7zS.js +2 -0
- package/dist/context-engine-lifecycle-iQ8f5a_-.js +1274 -0
- package/dist/control-auth-vVxyGKxY.js +114 -0
- package/dist/control-service-73nj79EW.js +145 -0
- package/dist/control-ui/assets/agents-DdWIz8Vk.js +1008 -0
- package/dist/control-ui/assets/channel-config-extras-C7ELhuDi.js +2 -0
- package/dist/control-ui/assets/channels-Bsoj-9BS.js +367 -0
- package/dist/control-ui/assets/cron-BRTEw1tT.js +1013 -0
- package/dist/control-ui/assets/debug-EKl_F8_L.js +97 -0
- package/dist/control-ui/assets/index-DSbSO7ys.js +7370 -0
- package/dist/control-ui/assets/instances-B1AoYwI5.js +57 -0
- package/dist/control-ui/assets/logs-BChOznzh.js +74 -0
- package/dist/control-ui/assets/nodes-5yebKh9k.js +436 -0
- package/dist/control-ui/assets/sessions-BlDYNThc.js +399 -0
- package/dist/control-ui/assets/skills-shared-CNFnf7KU.js +11 -0
- package/dist/control-ui/assets/skills-uxTDRmLx.js +314 -0
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/sw.js +1 -1
- package/dist/conversation-binding-runtime-CmoTKcY1.js +4 -0
- package/dist/conversation-runtime-BxOHxuin.js +31 -0
- package/dist/core-D0Y2H55f.js +282 -0
- package/dist/core-api-BKlJUtDt.js +5 -0
- package/dist/core-api-_fiftUHn.js +2 -0
- package/dist/crestodian/crestodian.js +1 -1
- package/dist/crestodian/rescue-message.js +1 -1
- package/dist/crestodian-BJifoQiR.js +55 -0
- package/dist/daocore-tools-BMdF8RwK.js +11727 -0
- package/dist/delivery-e2ci_bcX.js +1002 -0
- package/dist/dialogue-BXayGhnz.js +37 -0
- package/dist/dir-fetch-tool-Cara5mZh.js +565 -0
- package/dist/dir-list-tool-CQ8Bo5Ez.js +100 -0
- package/dist/direct-dm-CPk6Qm9D.js +64 -0
- package/dist/directive-handling.fast-lane-BQ9aXqk8.js +68 -0
- package/dist/directive-handling.impl--a5AGurq.js +818 -0
- package/dist/directive-handling.impl-C4JqMwle.js +2 -0
- package/dist/directive-handling.model-selection-pyTYMIXn.js +122 -0
- package/dist/directive-handling.persist.runtime-B7vWT1r9.js +263 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/dispatch-3Ru_eGq1.js +1640 -0
- package/dist/dispatch-acp-transcript.runtime-CYMP-5oE.js +40 -0
- package/dist/dispatch-acp-transcript.runtime.js +1 -1
- package/dist/dispatch-acp.runtime-BVCiklXk.js +18 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/doctor-B8mR3Sgr.js +2 -0
- package/dist/doctor-BJ6DuerV.js +6 -0
- package/dist/doctor-config-flow-BdOGs_zn.js +1741 -0
- package/dist/doctor-core-checks-CDf0stz-.js +2 -0
- package/dist/doctor-core-checks-Cpdnu2XI.js +573 -0
- package/dist/doctor-health-0qv_acBu.js +65 -0
- package/dist/doctor-health-contributions-Db1FQgFw.js +696 -0
- package/dist/doctor-lint-C1g4Llgl.js +94 -0
- package/dist/doctor-state-integrity-C8iXFLJ7.js +1231 -0
- package/dist/doctor-update-CsPu6p3d.js +58 -0
- package/dist/dynamic-tools-YQ0z0YKH.js +486 -0
- package/dist/embedded-backend-S0cahIZw.js +579 -0
- package/dist/embedded-gateway-stub.runtime-Cjw12ALm.js +12 -0
- package/dist/embedded-gateway-stub.runtime.js +1 -1
- package/dist/exec-approvals-ArHHjoE-.js +149 -0
- package/dist/extensionAPI.js +1 -1
- package/dist/extensions/active-memory/index.js +1 -1
- package/dist/extensions/admin-http-rpc/index.js +1 -1
- package/dist/extensions/browser/browser-bridge.js +1 -1
- package/dist/extensions/browser/browser-config.js +4 -4
- package/dist/extensions/browser/browser-control-auth.js +2 -2
- package/dist/extensions/browser/browser-doctor.js +2 -2
- package/dist/extensions/browser/browser-maintenance.js +1 -1
- package/dist/extensions/browser/browser-profiles.js +2 -2
- package/dist/extensions/browser/browser-runtime-api.js +11 -11
- package/dist/extensions/browser/cli-metadata.js +1 -1
- package/dist/extensions/browser/index.js +1 -1
- package/dist/extensions/browser/plugin-registration.js +1 -1
- package/dist/extensions/browser/register.runtime.js +4 -4
- package/dist/extensions/browser/runtime-api.js +13 -13
- package/dist/extensions/canvas/index.js +1 -1
- package/dist/extensions/clickclack/api.js +2 -2
- package/dist/extensions/clickclack/channel-plugin-api.js +1 -1
- package/dist/extensions/clickclack/runtime-api.js +2 -2
- package/dist/extensions/device-pair/api.js +1 -1
- package/dist/extensions/device-pair/pair-command-approve.js +1 -1
- package/dist/extensions/file-transfer/index.js +4 -4
- package/dist/extensions/imessage/api.js +2 -2
- package/dist/extensions/imessage/channel-plugin-api.js +1 -1
- package/dist/extensions/imessage/message-tool-api.d.ts +1 -1
- package/dist/extensions/imessage/runtime-api.js +3 -3
- package/dist/extensions/irc/api.js +2 -2
- package/dist/extensions/irc/channel-plugin-api.js +1 -1
- package/dist/extensions/llm-task/index.js +1 -1
- package/dist/extensions/mattermost/api.js +1 -1
- package/dist/extensions/mattermost/channel-plugin-api.js +1 -1
- package/dist/extensions/mattermost/channel-plugin-runtime.js +1 -1
- package/dist/extensions/mattermost/policy-api.js +1 -1
- package/dist/extensions/mattermost/runtime-api.js +2 -2
- package/dist/extensions/mattermost/slash-route-api.js +1 -1
- package/dist/extensions/memory-core/cli-metadata.js +1 -1
- package/dist/extensions/migrate-claude/apply.js +1 -1
- package/dist/extensions/migrate-claude/index.js +1 -1
- package/dist/extensions/migrate-claude/plan.js +1 -1
- package/dist/extensions/migrate-claude/provider.js +1 -1
- package/dist/extensions/migrate-claude/targets.js +1 -1
- package/dist/extensions/migrate-hermes/apply.js +1 -1
- package/dist/extensions/migrate-hermes/index.js +1 -1
- package/dist/extensions/migrate-hermes/model.js +1 -1
- package/dist/extensions/migrate-hermes/plan.js +1 -1
- package/dist/extensions/migrate-hermes/provider.js +1 -1
- package/dist/extensions/migrate-hermes/secrets.js +1 -1
- package/dist/extensions/migrate-hermes/targets.js +1 -1
- package/dist/extensions/policy/api.js +1 -1
- package/dist/extensions/policy/index.js +2 -2
- package/dist/extensions/signal/api.js +6 -6
- package/dist/extensions/signal/channel-plugin-api.js +1 -1
- package/dist/extensions/signal/reaction-runtime-api.js +1 -1
- package/dist/extensions/signal/runtime-api.js +7 -7
- package/dist/extensions/skill-workshop/api.js +1 -1
- package/dist/extensions/skill-workshop/index.js +2 -2
- package/dist/extensions/telegram/account-inspect-api.js +1 -1
- package/dist/extensions/telegram/api.js +11 -11
- package/dist/extensions/telegram/channel-plugin-api.js +2 -2
- package/dist/extensions/telegram/contract-api.js +3 -3
- package/dist/extensions/telegram/runtime-api.js +7 -7
- package/dist/extensions/telegram/security-audit-contract-api.js +1 -1
- package/dist/extensions/telegram/setup-plugin-api.js +1 -1
- package/dist/extensions/telegram/test-api.js +2 -2
- package/dist/extensions/webhooks/api.js +1 -1
- package/dist/extensions/webhooks/index.js +1 -1
- package/dist/extensions/xai/index.js +4 -4
- package/dist/extensions/xai/realtime-transcription-provider.js +1 -1
- package/dist/extensions/xai/speech-provider.js +1 -1
- package/dist/extensions/xai/test-api.js +1 -1
- package/dist/extensions/xai/tts.js +1 -1
- package/dist/extensions/xai/web-search.js +1 -1
- package/dist/extensions/xai/xai-oauth.js +1 -1
- package/dist/file-fetch-tool-DQpAtjX4.js +124 -0
- package/dist/file-write-tool-CkB0oYwe.js +127 -0
- package/dist/format-DUJUpMFQ.js +1145 -0
- package/dist/gateway-cli-CQo_E4Ka.js +435 -0
- package/dist/gateway-method-runtime-1QPgVJH7.js +21 -0
- package/dist/get-reply-DfUcsC-O.js +4689 -0
- package/dist/get-reply-from-config.runtime-C95MG73O.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/graph-users-DPJe0fPs.js +1419 -0
- package/dist/group-access-DefaNJ6L.js +112 -0
- package/dist/handle-action.guild-admin-C1sy1kGJ.js +288 -0
- package/dist/harness-BgPRdmNK.js +61 -0
- package/dist/health-DFR9A1YV.js +4 -0
- package/dist/heartbeat-runner-BiYVPs25.js +5 -0
- package/dist/heartbeat-runner.runtime-Bmaq8WUA.js +4 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/hooks-CNJDuJUm.js +534 -0
- package/dist/inbound-direct-dm-runtime-DFt58p71.js +2 -0
- package/dist/inbound-reply-dispatch-kgSDM8ax.js +148 -0
- package/dist/index.js +1 -1
- package/dist/init-B0zO_U4r.js +59 -0
- package/dist/inline-buttons-B6zgQW3J.js +40 -0
- package/dist/internal-events-C3Q5t6hg.js +90 -0
- package/dist/isolated-agent-CaSU5GCJ.js +2 -0
- package/dist/isolated-agent-CnsD2TmP.js +1118 -0
- package/dist/lifecycle-i3WZDaIn.js +571 -0
- package/dist/list.probe-g0rUiVXW.js +449 -0
- package/dist/list.status-command-DG3PrmeO.js +789 -0
- package/dist/llm-slug-generator-CHlf69FU.js +78 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/local-dispatch.runtime-CDeHUp_A.js +9 -0
- package/dist/local-dispatch.runtime.js +1 -1
- package/dist/manager.runtime-BlLMPUTq.js +2714 -0
- package/dist/manager.runtime.js +1 -1
- package/dist/markdown-to-line-r_mBHMdy.js +811 -0
- package/dist/mcp-http-C5UPIJGR.js +555 -0
- package/dist/mcp-http-CTy9gpfA.js +2 -0
- package/dist/media-understanding-provider-BT6TOuVa.js +339 -0
- package/dist/message-actions-BdcjjwFt.js +145 -0
- package/dist/message-handler-B29Tj2p2.js +1715 -0
- package/dist/message-handler-BhHb1FHI.js +384 -0
- package/dist/message-handler.preflight-ouZ_-3o8.js +1125 -0
- package/dist/message-handler.process-CrYiBx_F.js +1484 -0
- package/dist/model-CLbtocQX.js +74 -0
- package/dist/model-selection-BG_vU9Kl.js +272 -0
- package/dist/models-4KERn3ya.js +104 -0
- package/dist/models-BCa-ipxi.js +2 -0
- package/dist/models-cli-DtpGXEsf.js +256 -0
- package/dist/monitor-B-egsvmI.js +1657 -0
- package/dist/monitor-BJX9Yv7k.js +2 -0
- package/dist/monitor-BPrIy3pV.js +715 -0
- package/dist/monitor-BWknZZ7N.js +4377 -0
- package/dist/monitor-C3y_PtI1.js +60 -0
- package/dist/monitor-DCzfdqE4.js +1370 -0
- package/dist/monitor-P24epSwE.js +2788 -0
- package/dist/monitor-auth-CEG_xldE.js +179 -0
- package/dist/monitor-jEePJbbS.js +834 -0
- package/dist/monitor-polling.runtime-BzlHK11u.js +883 -0
- package/dist/monitor-polling.runtime.js +1 -1
- package/dist/monitor-webhook.runtime-vFEhk_Zj.js +387 -0
- package/dist/monitor-webhook.runtime.js +1 -1
- package/dist/monitor.account-BUIfgWXg.js +5233 -0
- package/dist/monitor.runtime-Cp7W4fhb.js +2 -0
- package/dist/monitor.runtime.js +1 -1
- package/dist/monitor.webhook-DzrbeR4T.js +180 -0
- package/dist/node-cli-sessions-CLbI14UA.js +1228 -0
- package/dist/openai-http-BM9BIA_g.js +824 -0
- package/dist/openresponses-http-CNoW9kk8.js +1173 -0
- package/dist/operations-DT4bsxV6.js +805 -0
- package/dist/outbound-adapter-CZRUOgY0.js +543 -0
- package/dist/outbound-session-route-DneMsGNx.js +45 -0
- package/dist/outbound.runtime-CHuoKJJI.js +2 -0
- package/dist/outbound.runtime.js +1 -1
- package/dist/pi-embedded-1-rsueO_.js +3796 -0
- package/dist/pi-embedded-BRfDncVO.js +4 -0
- package/dist/pi-embedded.runtime-DEYoa6bW.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/pi-tools-C0P3NgP5.js +2413 -0
- package/dist/plan-BQUkjBMY.js +81 -0
- package/dist/plan-CRO9_2_k.js +112 -0
- package/dist/plugin-BJCmWhnh.js +12396 -0
- package/dist/plugin-app-cache-key-CXAg0F7A.js +46 -0
- package/dist/plugin-enabled-D93Z9LSo.js +233 -0
- package/dist/plugin-registration-BBrTcZnf.js +88 -0
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/plugin-sdk/acp-runtime-backend.js +1 -1
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-harness-runtime.js +6 -6
- package/dist/plugin-sdk/agent-harness-task-runtime.js +1 -1
- package/dist/plugin-sdk/agent-harness.js +7 -7
- package/dist/plugin-sdk/agent-runtime.js +2 -2
- package/dist/plugin-sdk/channel-core.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +2 -2
- package/dist/plugin-sdk/channel-test-helpers.js +1 -1
- package/dist/plugin-sdk/command-auth.js +1 -1
- package/dist/plugin-sdk/command-status-runtime.js +1 -1
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/conversation-binding-runtime.js +2 -2
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +2 -2
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
- package/dist/plugin-sdk/health.js +2 -2
- package/dist/plugin-sdk/inbound-reply-dispatch.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/mattermost.js +1 -1
- package/dist/plugin-sdk/plugin-test-contracts.js +2 -2
- package/dist/plugin-sdk/provider-test-contracts.js +4 -4
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/testing.js +2 -2
- package/dist/plugin-sdk/zalouser.js +1 -1
- package/dist/plugin-service-DnZEPBEA.js +1229 -0
- package/dist/plugins/runtime/index.js +4 -4
- package/dist/policy-CMv5QMPG.js +138 -0
- package/dist/policy-CeoP4t9J.js +680 -0
- package/dist/prepare.runtime-DZ55JiTt.js +732 -0
- package/dist/prepare.runtime.js +1 -1
- package/dist/preview-warnings-O08PZRxu.js +392 -0
- package/dist/probe-C6w3bP8X.js +682 -0
- package/dist/probe-Cs1_X1NA.js +47 -0
- package/dist/probe-Cuee_jyM.js +2204 -0
- package/dist/probe-DZxCnDzn.js +2 -0
- package/dist/program-C2dT8VHB.js +131 -0
- package/dist/provider-C2_vSzYh.js +32 -0
- package/dist/provider-DSfTDQbj.js +152 -0
- package/dist/provider-U8hrm9h-.js +32 -0
- package/dist/provider-_v910H8y.js +8735 -0
- package/dist/provider-dispatcher-C3kmmIEC.js +22 -0
- package/dist/provider-dispatcher.runtime.js +1 -1
- package/dist/provider-session.runtime-Mg0fx5hH.js +9 -0
- package/dist/provider-session.runtime.js +1 -1
- package/dist/provider.runtime-pSTXuHrq.js +2 -0
- package/dist/provider.runtime.js +1 -1
- package/dist/public-surface-loader-09t4TTue.js +114 -0
- package/dist/pw-ai-DjNqHV3_.js +3029 -0
- package/dist/pw-role-snapshot-DoGefdv7.js +333 -0
- package/dist/reaction-level-C8Mqxizo.js +19 -0
- package/dist/reaction-runtime-api-DOP6xOsm.js +116 -0
- package/dist/realtime-transcription-provider-BTGEXXna.js +205 -0
- package/dist/register-CbZPpqI3.js +2178 -0
- package/dist/register.agent-DrBFuPKh.js +156 -0
- package/dist/register.crestodian-DwTbmaK8.js +24 -0
- package/dist/register.maintenance-BIeoYBub.js +83 -0
- package/dist/register.runtime-B5V9_Dwz.js +54 -0
- package/dist/register.subclis-CJE9ISZY.js +31 -0
- package/dist/register.subclis-YQsKas8N.js +3 -0
- package/dist/register.subclis-core-CjwdGeGU.js +273 -0
- package/dist/repair-sequencing-C0jrL5pw.js +640 -0
- package/dist/reply-delivery-B28mTIpb.js +196 -0
- package/dist/reply-runtime-BqQX7HHw.js +11 -0
- package/dist/reply.runtime-C95MG73O.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/request-BqoMvXxH.js +54 -0
- package/dist/resolve-allowlist-hbKKd_kq.js +220 -0
- package/dist/result-fallback-classifier-BrORPoxj.js +79 -0
- package/dist/route-HHRgSzVy.js +469 -0
- package/dist/route-resolution-C7bafjVc.js +274 -0
- package/dist/routes-86XGeo7a.js +2 -0
- package/dist/routes-BhVGr9ie.js +3602 -0
- package/dist/run-Bb5QP5JV.js +1162 -0
- package/dist/run-attempt-CLi0wV7j.js +7704 -0
- package/dist/run-command-Be6GAxiW.js +2 -0
- package/dist/run-command-Ds4hr3iU.js +23 -0
- package/dist/run-embedded.runtime-wX9ORojX.js +4 -0
- package/dist/run-embedded.runtime.js +1 -1
- package/dist/run-execution-cli.runtime-BmNZVB2N.js +4 -0
- package/dist/run-execution-cli.runtime.js +1 -1
- package/dist/run-executor.runtime.js +1 -1
- package/dist/run-subagent-registry.runtime-Uq5sjftu.js +2 -0
- package/dist/run-subagent-registry.runtime.js +1 -1
- package/dist/runtime-BktLQ75j.js +1287 -0
- package/dist/runtime-C9XdR62_.js +438 -0
- package/dist/runtime-CTvWDPx9.js +6179 -0
- package/dist/runtime-api-BojB3MUw.js +21 -0
- package/dist/runtime-api-C92MlAwp.js +13 -0
- package/dist/runtime-api-CFNZE9Xt.js +13 -0
- package/dist/runtime-api-Cimpgm5_.js +3 -0
- package/dist/runtime-api-D8qG_lUm.js +17 -0
- package/dist/runtime-api-DMDMnQEG.js +4 -0
- package/dist/runtime-api-DupQdIlE.js +24 -0
- package/dist/runtime-api.actions-B8i3elqu.js +3 -0
- package/dist/runtime-api.monitor-BntFzf_M.js +6 -0
- package/dist/runtime-api.send-CPlmi1jc.js +4 -0
- package/dist/runtime-api.threads-D-H_r_Nl.js +2 -0
- package/dist/runtime-channel-BGhTxnXZ.js +150 -0
- package/dist/runtime-channel-CPFxNapZ.js +2 -0
- package/dist/runtime-embedded-pi.runtime-BjnMTurB.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/sanitize-outbound-BMUv1NeS.js +127 -0
- package/dist/sdk-setup-tools-Do3DkQi_.js +8 -0
- package/dist/secrets-B8YVPHhk.js +113 -0
- package/dist/security-audit-7Gg_nL4o.js +122 -0
- package/dist/security-audit-Bk3CREj-.js +118 -0
- package/dist/security-audit.runtime-BmSJrdeq.js +2 -0
- package/dist/security-audit.runtime.js +1 -1
- package/dist/selection-BFGde9-_.js +3 -0
- package/dist/selection-DrLFlbgG.js +16157 -0
- package/dist/send-4dLa-BQo.js +1631 -0
- package/dist/send-CV6gCwYP.js +192 -0
- package/dist/send-aGiK3Efu.js +143 -0
- package/dist/send-dB3CehAN.js +2 -0
- package/dist/send.components-BcG9BlkC.js +2 -0
- package/dist/send.components-rLjDlfYU.js +500 -0
- package/dist/send.runtime-D20k2MSr.js +2 -0
- package/dist/send.runtime.js +1 -1
- package/dist/server-BTRx_U1s.js +73 -0
- package/dist/server-CY0ymhBg.js +24 -0
- package/dist/server-close.runtime.js +1 -1
- package/dist/server-context-BxGT8wbK.js +955 -0
- package/dist/server-context-DYlbhAaT.js +2 -0
- package/dist/server-cron-BB_15lcP.js +2 -0
- package/dist/server-cron-CfyJX_a4.js +2989 -0
- package/dist/server-methods-Ck2ab6TC.js +16494 -0
- package/dist/server-node-events-BdRizF-5.js +596 -0
- package/dist/server-plugin-bootstrap-CPUr8NFE.js +70 -0
- package/dist/server-plugins-__5AxjzH.js +432 -0
- package/dist/server-reload-handlers-BMl9Fx9b.js +714 -0
- package/dist/server-restart-sentinel-D11M_ZsH.js +747 -0
- package/dist/server-restart-sentinel-DGptQ27c.js +2 -0
- package/dist/server-runtime-services-BwtLs-8I.js +2 -0
- package/dist/server-runtime-services-aJydixRu.js +267 -0
- package/dist/server-startup-plugins-m_P3gY4m.js +113 -0
- package/dist/server-startup-post-attach-DuXQ1AXL.js +716 -0
- package/dist/server-ws-runtime-mXmxB1W8.js +349 -0
- package/dist/server.impl-fuV8aKSP.js +2586 -0
- package/dist/service-a8cTFka4.js +1446 -0
- package/dist/session-binding-BIycxo9u.js +2 -0
- package/dist/session-binding-xHwQr9vM.js +219 -0
- package/dist/session-kill-http-DiUZhcoN.js +121 -0
- package/dist/session-reset-service-DkepDoob.js +625 -0
- package/dist/session-route-Ba5u7ecb.js +93 -0
- package/dist/session-status.runtime-Cb1X69Rl.js +2 -0
- package/dist/session-status.runtime.js +1 -1
- package/dist/session-subagent-reactivation.runtime-rbqmto4G.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-tab-registry-DSKOoJta.js +521 -0
- package/dist/sessions-history-http-CWP88I_C.js +430 -0
- package/dist/sessions.runtime-1q1OwLn3.js +2 -0
- package/dist/sessions.runtime.js +1 -1
- package/dist/setup-api-DtrOOYeP.js +29 -0
- package/dist/setup-core-DMrJS6LP.js +174 -0
- package/dist/setup-surface-BFPNu1qA.js +405 -0
- package/dist/setup-surface-CedShqhO.js +288 -0
- package/dist/setup-surface-DLOBH1Vf.js +320 -0
- package/dist/setup-surface-MhCeEWSj.js +221 -0
- package/dist/shared-DamL-e8D.js +121 -0
- package/dist/shared-client-B48JoAsz.js +2 -0
- package/dist/shared-client-BoSiDnUo.js +629 -0
- package/dist/side-question-DQoQ_ETb.js +683 -0
- package/dist/skill-tool-dispatch.runtime-CWLloYA8.js +143 -0
- package/dist/skill-tool-dispatch.runtime.js +1 -1
- package/dist/slash-state-DrrWJQfv.js +2166 -0
- package/dist/speech-provider-8Hx1uw41.js +184 -0
- package/dist/src-BbUYOPwU.js +4256 -0
- package/dist/startup-context-opAJAamX.js +313 -0
- package/dist/status-subagents.runtime-DSo7ZK_Z.js +18 -0
- package/dist/status-subagents.runtime.js +1 -1
- package/dist/status-text-AyPuDzrO.js +296 -0
- package/dist/sticker-cache-91Tp8mLP.js +206 -0
- package/dist/sticker-vision.runtime-DjleFXi5.js +17 -0
- package/dist/sticker-vision.runtime.js +1 -1
- package/dist/subagent-announce-delivery-DS_2W9oZ.js +958 -0
- package/dist/subagent-announce-hatA_PZ2.js +354 -0
- package/dist/subagent-control-IyFIvc7T.js +508 -0
- package/dist/subagent-hooks-BCj5eB0Z.js +2 -0
- package/dist/subagent-hooks-BWjTBkox.js +146 -0
- package/dist/subagent-hooks-CdGLK9_3.js +230 -0
- package/dist/subagent-hooks-EH0tBkw9.js +2 -0
- package/dist/subagent-hooks-api-BhYaXQJV.js +23 -0
- package/dist/subagent-hooks-api-uGsV8Xn5.js +22 -0
- package/dist/subagent-hooks-api-wfJFKIPx.js +23 -0
- package/dist/subagent-hooks-l8Xd94dt.js +2 -0
- package/dist/subagent-hooks-m2eHUO_d.js +116 -0
- package/dist/subagent-orphan-recovery-Bq9zvX3L.js +352 -0
- package/dist/subagent-registry-Bcb3zy6b.js +3 -0
- package/dist/subagent-registry-CoZNTFx-.js +2351 -0
- package/dist/subagent-registry.runtime.js +1 -1
- package/dist/subagent-session-cleanup--00EjDLe.js +525 -0
- package/dist/subagent-spawn-ClJJkz3D.js +1164 -0
- package/dist/target-id-BsZLiF3x.js +107 -0
- package/dist/targets-CQMe4AZP.js +44 -0
- package/dist/targets-SmL1AU-H.js +19 -0
- package/dist/targets-Y-roiA47.js +19 -0
- package/dist/task-registry-control.runtime.js +1 -1
- package/dist/telegram/token.js +1 -1
- package/dist/testing-B5hNJDuF.js +267 -0
- package/dist/thread-bindings-BD3eE0kK.js +232 -0
- package/dist/thread-bindings-C9NNiv8K.js +571 -0
- package/dist/thread-bindings-Dl4PN1vZ.js +228 -0
- package/dist/thread-bindings-uK1LLAwy.js +8 -0
- package/dist/thread-bindings.discord-api-BHNEUbnk.js +187 -0
- package/dist/thread-bindings.manager-B0LXiH3F.js +2 -0
- package/dist/thread-bindings.manager-BTlH4XMG.js +536 -0
- package/dist/thread-lifecycle-DG8uyPHd.js +1614 -0
- package/dist/token-BbGCANnE.js +134 -0
- package/dist/tool-actions.runtime-oUUrD8HB.js +534 -0
- package/dist/tool-actions.runtime.js +1 -1
- package/dist/tool-bqg-_vYv.js +139 -0
- package/dist/tool-resolution-CSZsa3kP.js +149 -0
- package/dist/tools-effective-inventory-0CqFp-vq.js +204 -0
- package/dist/tools-invoke-http-DhYHY0Yh.js +67 -0
- package/dist/tools-invoke-shared-CbVJJUj7.js +200 -0
- package/dist/tts-C2qD-ad6.js +66 -0
- package/dist/tui-CzGY254f.js +4709 -0
- package/dist/tui-backend-fzoeoSN0.js +256 -0
- package/dist/tui-cli-B2RWb2gM.js +37 -0
- package/dist/tui-dgS8hdXU.js +2 -0
- package/dist/update-cli-BmiBDf3c.js +3664 -0
- package/dist/update-runner-CM7QVX6u.js +2379 -0
- package/dist/vision-tools-BzoBZnIc.js +1409 -0
- package/dist/web-search-DmfOd66S.js +62 -0
- package/dist/web-search-provider.runtime-3C5-pODD.js +328 -0
- package/dist/web-search-provider.runtime-Doh-Z9We.js +2 -0
- package/dist/web-search-provider.runtime.js +1 -1
- package/dist/xai-oauth-BLvQ43hx.js +479 -0
- package/dist/xai-user-agent-BdMQ_0_O.js +32 -0
- package/package.json +1 -1
- package/dist/abort-DeEb_wKd.js +0 -277
- package/dist/abort.runtime-CoYXQGPK.js +0 -2
- package/dist/account-inspect-D_06-CYS.js +0 -173
- package/dist/accounts-BCTqtj4Y.js +0 -107
- package/dist/accounts-BudLl8P2.js +0 -107
- package/dist/accounts-CUReBDA0.js +0 -2
- package/dist/accounts-PCioSzzr.js +0 -119
- package/dist/acp-runtime-B2t9_BHD.js +0 -26
- package/dist/acp-spawn-0x4Iiu1o.js +0 -2
- package/dist/acp-spawn-B2Ghe0jJ.js +0 -1275
- package/dist/acp-stateful-target-driver-C4VgcSyz.js +0 -89
- package/dist/action-kill-ClYsXEz7.js +0 -33
- package/dist/action-runtime-DrLPkNvU.js +0 -469
- package/dist/action-runtime-api-BqSflr9q.js +0 -2
- package/dist/action-send-CIy9cziD.js +0 -39
- package/dist/action-spawn-BjV6lFnX.js +0 -47
- package/dist/actions-D-QH7wq5.js +0 -161
- package/dist/actions.runtime-hzDtXQGU.js +0 -5
- package/dist/agent-Bb1DTBgv.js +0 -3
- package/dist/agent-Cnqj258q.js +0 -2
- package/dist/agent-command-BRx6ZNgJ.js +0 -1367
- package/dist/agent-components.runtime-D-g6xXJ0.js +0 -10
- package/dist/agent-harness-runtime-dKUQFuOc.js +0 -180
- package/dist/agent-harness-task-runtime-v2crUm3i.js +0 -140
- package/dist/agent-runner-execution-AOzdxvWR.js +0 -1713
- package/dist/agent-runner-utils-Byv50B4Z.js +0 -266
- package/dist/agent-runner.runtime-hhgRE0Z-.js +0 -3455
- package/dist/agent-runtime-BHmh3i0o.js +0 -229
- package/dist/agent-via-gateway-DnCqaK4a.js +0 -463
- package/dist/api-Bzyb8sFU.js +0 -3
- package/dist/api-CIEDFXZs.js +0 -2
- package/dist/api-D_dTQAu8.js +0 -2
- package/dist/api-DilBjZ9Q.js +0 -6
- package/dist/api-E5zoQMmh.js +0 -134
- package/dist/api-OJZug8gQ.js +0 -639
- package/dist/apply-C0eV5T0O.js +0 -41
- package/dist/apply-alsYvxLE.js +0 -54
- package/dist/approval-handler.runtime-C6jqZXSN.js +0 -130
- package/dist/assistant-DDXnAAB5.js +0 -291
- package/dist/attachment-normalize-Cv-_4DWU.js +0 -225
- package/dist/attempt-execution-DECEU59r.js +0 -558
- package/dist/attempt-execution.runtime-kasMxuER.js +0 -3
- package/dist/attempt-execution.shared-ClUxk52p.js +0 -38
- package/dist/attempt.prompt-helpers-Bxlv9VSu.js +0 -475
- package/dist/attempt.tool-run-context-CplQWX6g.js +0 -2094
- package/dist/binding-routing-0Obpp-Ij.js +0 -113
- package/dist/binding-targets-CZHQaZL4.js +0 -121
- package/dist/bot-BPbQ0840.js +0 -7894
- package/dist/bot-deps-Cs1M9USs.js +0 -2
- package/dist/bot-deps-xAcaOtTZ.js +0 -747
- package/dist/bot-message-context.runtime-Bji78Cbn.js +0 -7
- package/dist/bot-message-context.session.runtime-C3dyOIYH.js +0 -12
- package/dist/bot-native-commands.delivery.runtime-WshH99fy.js +0 -4
- package/dist/bot-native-commands.runtime-C1L364gU.js +0 -13
- package/dist/bridge-server-DPlM8_Lk.js +0 -113
- package/dist/browser-cli-DFNQE98N.js +0 -230
- package/dist/browser-cli-Drb5E5--.js +0 -2
- package/dist/browser-cli-actions-input-Dx-1OXmE.js +0 -473
- package/dist/browser-cli-actions-observe-BMDfE7xU.js +0 -81
- package/dist/browser-cli-debug-nu7Ih09g.js +0 -137
- package/dist/browser-cli-inspect-D5X2wohg.js +0 -104
- package/dist/browser-cli-manage-DkzYwph4.js +0 -443
- package/dist/browser-cli-resize-B30Avedl.js +0 -26
- package/dist/browser-cli-shared-cMgQoQzF.js +0 -50
- package/dist/browser-cli-state-CQLDvDy7.js +0 -337
- package/dist/browser-control-auth-D7ArmHUt.js +0 -2
- package/dist/browser-profiles-B39SIZNb.js +0 -2
- package/dist/browser-runtime-DUbSAOOS.js +0 -384
- package/dist/build-D25KqC92.js +0 -257
- package/dist/capability-cli-CuyXrlAB.js +0 -1782
- package/dist/channel-0N3YGMGg.js +0 -1496
- package/dist/channel-1UyKoLyp.js +0 -481
- package/dist/channel-BG87pSEW.js +0 -740
- package/dist/channel-BPGSaZW7.js +0 -1249
- package/dist/channel-BQMPh1J_.js +0 -376
- package/dist/channel-Bd_8V6zn.js +0 -1134
- package/dist/channel-BtBjh_ij.js +0 -362
- package/dist/channel-CpFBlVH6.js +0 -562
- package/dist/channel-CwuTrIrF.js +0 -508
- package/dist/channel-Cxl4sJA-.js +0 -1777
- package/dist/channel-D-VfU4Z2.js +0 -2126
- package/dist/channel-D9q8aYrN.js +0 -867
- package/dist/channel-DKSvVvZh.js +0 -238
- package/dist/channel-DvoFfWLx.js +0 -808
- package/dist/channel-GktTcGHm.js +0 -955
- package/dist/channel-actions.runtime-CKcRA0GW.js +0 -265
- package/dist/channel-core-nm8s1qFZ.js +0 -5
- package/dist/channel-d3t2ESlE.js +0 -653
- package/dist/channel-inbound-DKz40dq-.js +0 -80
- package/dist/channel-plugin-runtime-DKIGZWfW.js +0 -998
- package/dist/channel-runtime-Bh8_GY12.js +0 -408
- package/dist/channel-yQ8jCOb9.js +0 -1556
- package/dist/channel.runtime-BG4mM5cQ.js +0 -652
- package/dist/channel.runtime-BS6PyFFa.js +0 -1008
- package/dist/channel.runtime-CE_xECqN.js +0 -88
- package/dist/channel.runtime-Cd1Sw8U4.js +0 -254
- package/dist/channel.runtime-DIq3XOEe.js +0 -733
- package/dist/channel.runtime-Dy1cx35I.js +0 -21009
- package/dist/channel.runtime-NyIMjLnP.js +0 -109
- package/dist/channel.runtime-Zx5mfE2V.js +0 -4
- package/dist/channel.runtime-rJRibGfN.js +0 -2528
- package/dist/channel.setup--4ACadmF.js +0 -10
- package/dist/channel.setup-DzwqIlo3.js +0 -1098
- package/dist/channel.setup-FKYSJwXR.js +0 -343
- package/dist/chat-CKxSm7r1.js +0 -2666
- package/dist/chrome-rMubJwRG.js +0 -1503
- package/dist/cli-CbTod55I.js +0 -1341
- package/dist/cli-compaction-BbHgjJyW.js +0 -347
- package/dist/cli-metadata-DkOWLC_p.js +0 -22
- package/dist/cli-runner-Cwzv_RKf.js +0 -540
- package/dist/cli-runner-DdnUsgPl.js +0 -2
- package/dist/cli-runner.runtime-BlrSgbEW.js +0 -3
- package/dist/cli-runner.runtime-D8kVfvFH.js +0 -4
- package/dist/client-ClvxsWgL.js +0 -650
- package/dist/client-adapter-CsrIIjK1.js +0 -897
- package/dist/client-factory-DAYClhwm.js +0 -9
- package/dist/command-auth-CCha2ofd.js +0 -135
- package/dist/command-handlers-DCWJzHyB.js +0 -1609
- package/dist/command-registry-BIf61QNz.js +0 -9
- package/dist/command-registry-DJROBy4h.js +0 -4
- package/dist/command-registry-core-BQOWqi6S.js +0 -110
- package/dist/command-status.runtime-D88CUglL.js +0 -90
- package/dist/commands-acp-B-8dHX4Z.js +0 -74
- package/dist/commands-compact.runtime-ComX5mUk.js +0 -10
- package/dist/commands-handlers.runtime-DR3wjXHX.js +0 -6154
- package/dist/commands-status-CDyGrwsI.js +0 -3
- package/dist/commands-status-DV-i_ZIK.js +0 -16
- package/dist/commands-status.runtime-CDyGrwsI.js +0 -3
- package/dist/commands-subagents-control.runtime-B029cXAS.js +0 -3
- package/dist/commands-subagents-control.runtime-DR8Qspe0.js +0 -2
- package/dist/commands-system-prompt-C10ctsG3.js +0 -162
- package/dist/commands-system-prompt-DQlRWwnk.js +0 -2
- package/dist/commands.runtime-BYmIAuN0.js +0 -176
- package/dist/compact-14Ljaaeu.js +0 -480
- package/dist/compact-B--ovdkx.js +0 -1141
- package/dist/compact.runtime-E0Idf2Dq.js +0 -12
- package/dist/completion-cli-DMvvQGSk.js +0 -315
- package/dist/computer-use-CcLwX5SR.js +0 -367
- package/dist/config-B39SIZNb.js +0 -2
- package/dist/config-D4rsGOyV.js +0 -373
- package/dist/config-mutations-CsI3YJu7.js +0 -159
- package/dist/context-engine-host-compat-BZpDFiMJ.js +0 -2
- package/dist/context-engine-host-compat-runUdES5.js +0 -288
- package/dist/context-engine-lifecycle-D6odtNrn.js +0 -1274
- package/dist/control-auth-BPGpPtfz.js +0 -114
- package/dist/control-service-C-OmdPCe.js +0 -145
- package/dist/control-ui/assets/agents-GeyOHPuW.js +0 -1008
- package/dist/control-ui/assets/channel-config-extras-D7en6iUg.js +0 -2
- package/dist/control-ui/assets/channels-DkEyr1w5.js +0 -367
- package/dist/control-ui/assets/cron-C-wThQ1Q.js +0 -1013
- package/dist/control-ui/assets/debug-83AFRtIX.js +0 -97
- package/dist/control-ui/assets/index-CiGEhMOA.js +0 -7370
- package/dist/control-ui/assets/instances-CVl0t-1h.js +0 -57
- package/dist/control-ui/assets/logs-eybVEXxg.js +0 -74
- package/dist/control-ui/assets/nodes-C_A7eoU2.js +0 -436
- package/dist/control-ui/assets/sessions-Cq4Nc69u.js +0 -399
- package/dist/control-ui/assets/skills-ZN6hroIh.js +0 -314
- package/dist/control-ui/assets/skills-shared-DIWGwmdC.js +0 -11
- package/dist/conversation-binding-runtime-C2U1JElL.js +0 -4
- package/dist/conversation-runtime-NmIUd3Zu.js +0 -31
- package/dist/core-DGKJP1dm.js +0 -282
- package/dist/core-api-1fA4sNeC.js +0 -5
- package/dist/core-api-BY822Quq.js +0 -2
- package/dist/crestodian-Bp-NXiBC.js +0 -55
- package/dist/daocore-tools-Defpam0j.js +0 -11727
- package/dist/delivery-CEdVAUGB.js +0 -1002
- package/dist/dialogue-CZ69INPq.js +0 -37
- package/dist/dir-fetch-tool-BCicHhQE.js +0 -565
- package/dist/dir-list-tool-Cv_WktsJ.js +0 -100
- package/dist/direct-dm-Bz89rM8x.js +0 -64
- package/dist/directive-handling.fast-lane-DDnbcc5S.js +0 -68
- package/dist/directive-handling.impl-B0H52Ymr.js +0 -818
- package/dist/directive-handling.impl-CgKpwEW-.js +0 -2
- package/dist/directive-handling.model-selection-_cXAr0vt.js +0 -122
- package/dist/directive-handling.persist.runtime-Dw0mfzXT.js +0 -263
- package/dist/dispatch-C3AeYvyP.js +0 -1640
- package/dist/dispatch-acp-transcript.runtime-CP8pqBwS.js +0 -40
- package/dist/dispatch-acp.runtime-Cdap-AZI.js +0 -18
- package/dist/doctor-BZwVH97p.js +0 -2
- package/dist/doctor-BfkGBii1.js +0 -6
- package/dist/doctor-config-flow-D3JASGDt.js +0 -1741
- package/dist/doctor-core-checks-DH5AIT0Q.js +0 -573
- package/dist/doctor-core-checks-DiNu7VSh.js +0 -2
- package/dist/doctor-health-BDIJ-Nro.js +0 -65
- package/dist/doctor-health-contributions-BgmF7w8X.js +0 -696
- package/dist/doctor-lint-uIxkMUSO.js +0 -94
- package/dist/doctor-state-integrity-ws1b_BGk.js +0 -1231
- package/dist/doctor-update-Cx4CqxaX.js +0 -58
- package/dist/dynamic-tools-DiqOxhJh.js +0 -486
- package/dist/embedded-backend-C634irMl.js +0 -579
- package/dist/embedded-gateway-stub.runtime-CCfrTOeN.js +0 -12
- package/dist/exec-approvals-D85KThSg.js +0 -149
- package/dist/file-fetch-tool-BERaGYCT.js +0 -124
- package/dist/file-write-tool-BjHrMyfe.js +0 -127
- package/dist/format-DE9PuPg1.js +0 -1145
- package/dist/gateway-cli-B5hjhbUy.js +0 -435
- package/dist/gateway-method-runtime-Bu0E9Eki.js +0 -21
- package/dist/get-reply-6PtPz9hv.js +0 -4689
- package/dist/get-reply-from-config.runtime-CwprvhoR.js +0 -2
- package/dist/graph-users-DUp1kgnS.js +0 -1419
- package/dist/group-access-D5GBQ3w6.js +0 -112
- package/dist/handle-action.guild-admin-CA0Y-buD.js +0 -288
- package/dist/harness-B5nOFVfm.js +0 -61
- package/dist/health-D5heIDj3.js +0 -4
- package/dist/heartbeat-runner-BzFkIFHh.js +0 -5
- package/dist/heartbeat-runner.runtime-p6H1_xMV.js +0 -4
- package/dist/hooks-BvTyQ14X.js +0 -534
- package/dist/inbound-direct-dm-runtime-DwiDXi8L.js +0 -2
- package/dist/inbound-reply-dispatch-YoDUOC6C.js +0 -148
- package/dist/init-CPtcV5Xu.js +0 -59
- package/dist/inline-buttons-DeD5d42c.js +0 -40
- package/dist/internal-events-DEb50Sw3.js +0 -90
- package/dist/isolated-agent-CcxFFZ-Z.js +0 -1118
- package/dist/isolated-agent-CpHzq5qr.js +0 -2
- package/dist/lifecycle-DNel-oMe.js +0 -571
- package/dist/list.probe-DCa3N25d.js +0 -449
- package/dist/list.status-command-CyeAJmZW.js +0 -789
- package/dist/llm-slug-generator-CyqTY37Z.js +0 -78
- package/dist/local-dispatch.runtime-nE39kFIP.js +0 -9
- package/dist/manager.runtime-CpAPB8D5.js +0 -2714
- package/dist/markdown-to-line-Ci6TRmoZ.js +0 -811
- package/dist/mcp-http-BR0vmxFL.js +0 -2
- package/dist/mcp-http-C0oniA8h.js +0 -555
- package/dist/media-understanding-provider-BwA0XqC3.js +0 -339
- package/dist/message-actions-C9C_Ngkd.js +0 -145
- package/dist/message-handler-CUUKPC5n.js +0 -384
- package/dist/message-handler-xRTfIXWV.js +0 -1715
- package/dist/message-handler.preflight-Ch2Q7V3M.js +0 -1125
- package/dist/message-handler.process-HM3mK93q.js +0 -1484
- package/dist/model-CB8Ex5xS.js +0 -74
- package/dist/model-selection-2s0Dinux.js +0 -272
- package/dist/models-Cn-6DJ41.js +0 -2
- package/dist/models-CzszJD__.js +0 -104
- package/dist/models-cli-CbhElnA5.js +0 -256
- package/dist/monitor-7aprTsMV.js +0 -715
- package/dist/monitor-BuVhqwDS.js +0 -1370
- package/dist/monitor-C4H_YkgY.js +0 -2
- package/dist/monitor-CPQsMxgv.js +0 -1657
- package/dist/monitor-Ce0V1PiR.js +0 -4377
- package/dist/monitor-D0bcGJWI.js +0 -60
- package/dist/monitor-DEjlJqzh.js +0 -834
- package/dist/monitor-auth-DjJZsjgV.js +0 -179
- package/dist/monitor-ikSYagv3.js +0 -2788
- package/dist/monitor-polling.runtime-D7yEflMM.js +0 -883
- package/dist/monitor-webhook.runtime-CIZt-biI.js +0 -387
- package/dist/monitor.account-C2sMOBCS.js +0 -5233
- package/dist/monitor.runtime-BAi6zmcn.js +0 -2
- package/dist/monitor.webhook-BcjpfRCX.js +0 -180
- package/dist/node-cli-sessions-CIhkJRU4.js +0 -1228
- package/dist/openai-http-Dj21RwSj.js +0 -824
- package/dist/openresponses-http-COnnr1ox.js +0 -1173
- package/dist/operations-H3vUh0lM.js +0 -805
- package/dist/outbound-adapter-WLtWE7wv.js +0 -543
- package/dist/outbound-session-route-CZtd64EH.js +0 -45
- package/dist/outbound.runtime-D98P0sN1.js +0 -2
- package/dist/pi-embedded-BWJzd4mK.js +0 -4
- package/dist/pi-embedded-DeNsSqQQ.js +0 -3796
- package/dist/pi-embedded.runtime-CZnNwFpc.js +0 -4
- package/dist/pi-tools-CNHSpjBa.js +0 -2413
- package/dist/plan-B0reFFlM.js +0 -81
- package/dist/plan-CrfF-TH8.js +0 -112
- package/dist/plugin-DI_8eYOe.js +0 -12396
- package/dist/plugin-app-cache-key-WaTUD3e-.js +0 -46
- package/dist/plugin-enabled-aWLXgGGi.js +0 -233
- package/dist/plugin-registration-ByjRIVJm.js +0 -88
- package/dist/plugin-service-VQm_241d.js +0 -1229
- package/dist/policy-BmJH-swe.js +0 -680
- package/dist/policy-DE-bO1zn.js +0 -138
- package/dist/prepare.runtime-bSj3-res.js +0 -732
- package/dist/preview-warnings-CbuGYsF9.js +0 -392
- package/dist/probe-C_rWg7_m.js +0 -682
- package/dist/probe-CagOFfx6.js +0 -2
- package/dist/probe-thX1HqOh.js +0 -2204
- package/dist/probe-zU6B6gFt.js +0 -47
- package/dist/program-BtVdH743.js +0 -131
- package/dist/provider-CDoD7tO0.js +0 -8735
- package/dist/provider-CK1gMdJ2.js +0 -32
- package/dist/provider-DJqr9djy.js +0 -32
- package/dist/provider-DsOJp5bK.js +0 -152
- package/dist/provider-dispatcher-UNQ-LSx9.js +0 -22
- package/dist/provider-session.runtime-DMrkMb4x.js +0 -9
- package/dist/provider.runtime-C2-t3zm8.js +0 -2
- package/dist/public-surface-loader-hTeyyHcd.js +0 -114
- package/dist/pw-ai-BaL3eVYx.js +0 -3029
- package/dist/pw-role-snapshot-DKeBqhN1.js +0 -333
- package/dist/reaction-level-BV2potsD.js +0 -19
- package/dist/reaction-runtime-api-CCBxgM10.js +0 -116
- package/dist/realtime-transcription-provider-CHYtIXZm.js +0 -205
- package/dist/register-BJf28G9B.js +0 -2178
- package/dist/register.agent-oXAHwNQv.js +0 -156
- package/dist/register.crestodian-CQ0sqdV2.js +0 -24
- package/dist/register.maintenance-CylVRs5M.js +0 -83
- package/dist/register.runtime-CcDgwy0X.js +0 -54
- package/dist/register.subclis-CpBYNw2X.js +0 -3
- package/dist/register.subclis-N2CvieOL.js +0 -31
- package/dist/register.subclis-core-BHaGvbzg.js +0 -273
- package/dist/repair-sequencing-EBBnBdIB.js +0 -640
- package/dist/reply-delivery-BLoPALlI.js +0 -196
- package/dist/reply-runtime-D4asNTSa.js +0 -11
- package/dist/reply.runtime-CwprvhoR.js +0 -2
- package/dist/request-DlWPRUDt.js +0 -54
- package/dist/resolve-allowlist-BukQf58x.js +0 -220
- package/dist/result-fallback-classifier-DyHFnqfV.js +0 -79
- package/dist/route-BMf4keN5.js +0 -469
- package/dist/route-resolution-DWNi1QAu.js +0 -274
- package/dist/routes-C20LC8c4.js +0 -3602
- package/dist/routes-CkK7Vv_m.js +0 -2
- package/dist/run-KDF_AEza.js +0 -1162
- package/dist/run-attempt-JHYCfonU.js +0 -7704
- package/dist/run-command-3PVihYIy.js +0 -2
- package/dist/run-command-QHAXnyKY.js +0 -23
- package/dist/run-embedded.runtime-BJw-2vss.js +0 -4
- package/dist/run-execution-cli.runtime-GHClMn2g.js +0 -4
- package/dist/run-subagent-registry.runtime-BLLMrhtE.js +0 -2
- package/dist/runtime-C2u-dC1r.js +0 -1287
- package/dist/runtime-ClyfkDWT.js +0 -6179
- package/dist/runtime-WXCarlPc.js +0 -438
- package/dist/runtime-api-3QhGLpZf.js +0 -13
- package/dist/runtime-api-DRAu3mjv.js +0 -4
- package/dist/runtime-api-JE07pOem.js +0 -13
- package/dist/runtime-api-JuKylHvw.js +0 -24
- package/dist/runtime-api-bcbk4yax.js +0 -21
- package/dist/runtime-api-dDe9U2_V.js +0 -17
- package/dist/runtime-api-uMexLqGS.js +0 -3
- package/dist/runtime-api.actions-Bo7TLDFl.js +0 -3
- package/dist/runtime-api.monitor-7q78L1Em.js +0 -6
- package/dist/runtime-api.send-Bf9RR4nV.js +0 -4
- package/dist/runtime-api.threads-Dj2QuhHj.js +0 -2
- package/dist/runtime-channel-k1C0Satl.js +0 -2
- package/dist/runtime-channel-qt9t0J-J.js +0 -150
- package/dist/runtime-embedded-pi.runtime-BPB9NlTS.js +0 -2
- package/dist/sanitize-outbound-BLH_SQvg.js +0 -127
- package/dist/sdk-setup-tools-BshlBPau.js +0 -8
- package/dist/secrets-CsHXv7d3.js +0 -113
- package/dist/security-audit-CUXBQXNX.js +0 -122
- package/dist/security-audit-CzdXbRma.js +0 -118
- package/dist/security-audit.runtime-Ca0FMFJG.js +0 -2
- package/dist/selection-BmvQJlSD.js +0 -3
- package/dist/selection-BplDXc9w.js +0 -16157
- package/dist/send--qFg8a9v.js +0 -1631
- package/dist/send-BPdryPPA.js +0 -192
- package/dist/send-Bl4YaRkS.js +0 -143
- package/dist/send-Ccm7RMXC.js +0 -2
- package/dist/send.components-c3OUPSmR.js +0 -2
- package/dist/send.components-rhQJYoXs.js +0 -500
- package/dist/send.runtime-dfUkAp5d.js +0 -2
- package/dist/server-DRhyTMLe.js +0 -73
- package/dist/server-Dv4BzjGn.js +0 -24
- package/dist/server-context-4HRJy2vp.js +0 -955
- package/dist/server-context-DlxYb1G5.js +0 -2
- package/dist/server-cron-Bt8Pkc3i.js +0 -2989
- package/dist/server-cron-CtNWsa4Z.js +0 -2
- package/dist/server-methods-rye_okUW.js +0 -16494
- package/dist/server-node-events-C1yZ5a1u.js +0 -596
- package/dist/server-plugin-bootstrap-DUMyVtlP.js +0 -70
- package/dist/server-plugins-B5ZWWkRE.js +0 -432
- package/dist/server-reload-handlers-CTnMXNjT.js +0 -714
- package/dist/server-restart-sentinel-CAYxtwmY.js +0 -747
- package/dist/server-restart-sentinel-DqrtSIvy.js +0 -2
- package/dist/server-runtime-services-CuptQTe5.js +0 -2
- package/dist/server-runtime-services-aaS2IiW3.js +0 -267
- package/dist/server-startup-plugins-D0ymJgQT.js +0 -113
- package/dist/server-startup-post-attach-DlrN2uyt.js +0 -716
- package/dist/server-ws-runtime-CdpLbv4o.js +0 -349
- package/dist/server.impl-Cb4qcMTg.js +0 -2586
- package/dist/service-qxvDlMQE.js +0 -1446
- package/dist/session-binding-6bLobLHL.js +0 -219
- package/dist/session-binding-Bm6fCpoY.js +0 -2
- package/dist/session-kill-http-B6WjVo8V.js +0 -121
- package/dist/session-reset-service-GUVIhxp4.js +0 -625
- package/dist/session-route-BcRDnvzG.js +0 -93
- package/dist/session-status.runtime-BcjOunV4.js +0 -2
- package/dist/session-subagent-reactivation.runtime-BSmk_KYn.js +0 -2
- package/dist/session-tab-registry-BBYzbSOu.js +0 -521
- package/dist/sessions-history-http-bLJJfgLm.js +0 -430
- package/dist/sessions.runtime-DNRtQzCk.js +0 -2
- package/dist/setup-api-CcolVVJs.js +0 -29
- package/dist/setup-core-eJD18F3B.js +0 -174
- package/dist/setup-surface-B75C2Qtz.js +0 -221
- package/dist/setup-surface-CFuPfVHp.js +0 -405
- package/dist/setup-surface-Dyy-Mzyz.js +0 -288
- package/dist/setup-surface-ZsVF_g8W.js +0 -320
- package/dist/shared-BkCNrcLX.js +0 -121
- package/dist/shared-client-B7zqC9p2.js +0 -2
- package/dist/shared-client-yXjKgZBz.js +0 -629
- package/dist/side-question-DU3gESCb.js +0 -683
- package/dist/skill-tool-dispatch.runtime-CPBuqyvk.js +0 -143
- package/dist/slash-state-Do3bAahA.js +0 -2166
- package/dist/speech-provider-Bg9los3C.js +0 -184
- package/dist/src-D7LzUctH.js +0 -4256
- package/dist/startup-context-CCF2gIOl.js +0 -313
- package/dist/status-subagents.runtime-DX5FTymp.js +0 -18
- package/dist/status-text-B-1u5dSV.js +0 -296
- package/dist/sticker-cache-DwpU_9RJ.js +0 -206
- package/dist/sticker-vision.runtime-Bbldi_YL.js +0 -17
- package/dist/subagent-announce-BCo0VHVL.js +0 -354
- package/dist/subagent-announce-delivery-JcnuDN_N.js +0 -958
- package/dist/subagent-control-BzbA3Suz.js +0 -508
- package/dist/subagent-hooks-BIGZQWrG.js +0 -2
- package/dist/subagent-hooks-Bj4qYZfv.js +0 -230
- package/dist/subagent-hooks-C-rvhVBv.js +0 -2
- package/dist/subagent-hooks-P01_AFl5.js +0 -116
- package/dist/subagent-hooks-VEfak8nl.js +0 -2
- package/dist/subagent-hooks-api-BPnSxxN4.js +0 -23
- package/dist/subagent-hooks-api-DwIAvMoS.js +0 -22
- package/dist/subagent-hooks-api-kgyR9FOb.js +0 -23
- package/dist/subagent-hooks-oED56wqq.js +0 -146
- package/dist/subagent-orphan-recovery-D79ZzwKN.js +0 -352
- package/dist/subagent-registry-D0soBT5j.js +0 -2351
- package/dist/subagent-registry-DRJDkmty.js +0 -3
- package/dist/subagent-session-cleanup-9eAO1aJe.js +0 -525
- package/dist/subagent-spawn-D80vbogm.js +0 -1164
- package/dist/target-id-COLv5LsJ.js +0 -107
- package/dist/targets-CDW5IQ6a.js +0 -44
- package/dist/targets-Ci6O1ZdP.js +0 -19
- package/dist/targets-CsaWFBg1.js +0 -19
- package/dist/testing-BoJit-h1.js +0 -267
- package/dist/thread-bindings-CGCvw0KT.js +0 -571
- package/dist/thread-bindings-ClCTNacX.js +0 -228
- package/dist/thread-bindings-DRb7BMZ6.js +0 -8
- package/dist/thread-bindings-Xc6smav0.js +0 -232
- package/dist/thread-bindings.discord-api-DC467oeF.js +0 -187
- package/dist/thread-bindings.manager-C_mpTDIZ.js +0 -536
- package/dist/thread-bindings.manager-DkCRs612.js +0 -2
- package/dist/thread-lifecycle-DpqCXlx9.js +0 -1614
- package/dist/token-CI6HjbTA.js +0 -134
- package/dist/tool-BMe7hjBK.js +0 -139
- package/dist/tool-actions.runtime-D-h5PI_m.js +0 -534
- package/dist/tool-resolution-CnLx0CHe.js +0 -149
- package/dist/tools-effective-inventory-BR6MUMtE.js +0 -204
- package/dist/tools-invoke-http-CTTs2yMT.js +0 -67
- package/dist/tools-invoke-shared-9B1EjXWf.js +0 -200
- package/dist/tts-eGOviZ5c.js +0 -66
- package/dist/tui-Bw0HqKd7.js +0 -4709
- package/dist/tui-CIZJnPzj.js +0 -2
- package/dist/tui-backend-BJ_r7tcF.js +0 -256
- package/dist/tui-cli-BaSMBpuA.js +0 -37
- package/dist/update-cli-zuCybGNR.js +0 -3664
- package/dist/update-runner-Dek2BHmQ.js +0 -2379
- package/dist/vision-tools-1ps0BEE5.js +0 -1409
- package/dist/web-search-B7EziZXE.js +0 -62
- package/dist/web-search-provider.runtime-DGTCvGch.js +0 -328
- package/dist/web-search-provider.runtime-DWL5t39M.js +0 -2
- package/dist/xai-oauth-CRtsj2Gs.js +0 -479
- package/dist/xai-user-agent-Dndwzw2S.js +0 -32
- /package/dist/{acp-runtime-backend-DSDBcyh9.js → acp-runtime-backend-Cxo7eBHf.js} +0 -0
- /package/dist/{channel-actions-FV66JqtI.js → channel-actions-UDeVjgGz.js} +0 -0
- /package/dist/{command-status-runtime-BRWKSoG7.js → command-status-runtime-CoHd4Fws.js} +0 -0
- /package/dist/{delegate-DGqKhwB4.js → delegate-B-2xZ77o.js} +0 -0
- /package/dist/{dispatch-acp-Ceoxja_Z.js → dispatch-acp-DLPkmK7K.js} +0 -0
- /package/dist/{heartbeat-runner-CJHvr5pG.js → heartbeat-runner-D2j6JwOI.js} +0 -0
- /package/dist/{library-Bq3aDek_.js → library-DBT0cIPP.js} +0 -0
- /package/dist/{run-executor.runtime-DNJhGPbA.js → run-executor.runtime-DE4J7f4M.js} +0 -0
- /package/dist/{shared-CYxmRpq1.js → shared-xeo8Yh5n.js} +0 -0
|
@@ -0,0 +1,1341 @@
|
|
|
1
|
+
import { n as normalizeAccountId } from "./account-id-B32J-iNN.js";
|
|
2
|
+
import { n as formatZonedTimestamp } from "./format-datetime-DO2rqkXr.js";
|
|
3
|
+
import { a as resolveMatrixAccountConfig } from "./account-config-wMhN5mBi.js";
|
|
4
|
+
import { t as getMatrixRuntime } from "./runtime-ChnGj6Xz.js";
|
|
5
|
+
import { i as resolveMatrixAccount } from "./accounts-DQa5og50.js";
|
|
6
|
+
import { t as formatMatrixErrorMessage } from "./errors-BDE_mkHE.js";
|
|
7
|
+
import { n as updateMatrixAccountConfig, t as resolveMatrixConfigPath } from "./config-update-CQ1hi_q-.js";
|
|
8
|
+
import { n as matrixSetupAdapter } from "./setup-core-BJb6cOFe.js";
|
|
9
|
+
import { t as resolveMatrixRoomKeyBackupIssue } from "./backup-health-Dm_YMVFT.js";
|
|
10
|
+
import { i as setMatrixSdkLogMode, r as setMatrixSdkConsoleLogging } from "./logging-DtGGfp9-.js";
|
|
11
|
+
import { t as withResolvedActionClient } from "./client-DafOw3oF.js";
|
|
12
|
+
import { r as resolveMatrixAuthContext } from "./config-C1dtmXuT.js";
|
|
13
|
+
import "./client-XHdBH-Lw.js";
|
|
14
|
+
import "./runtime-api-D8qG_lUm.js";
|
|
15
|
+
import { n as summarizeMatrixDeviceHealth, t as isDaoCoreManagedMatrixDevice } from "./device-health-CSFhLntX.js";
|
|
16
|
+
import { n as updateMatrixOwnProfile, t as applyMatrixProfileUpdate } from "./profile-update-DTyqswkt.js";
|
|
17
|
+
import { a as confirmMatrixVerificationSas, c as getMatrixRoomKeyBackupStatus, d as listMatrixVerifications, f as mismatchMatrixVerificationSas, g as runMatrixSelfVerification, h as restoreMatrixRoomKeyBackup, l as getMatrixVerificationSas, m as resetMatrixRoomKeyBackup, n as bootstrapMatrixVerification, p as requestMatrixVerification, r as cancelMatrixVerification, t as acceptMatrixVerification, u as getMatrixVerificationStatus, v as startMatrixVerification, y as verifyMatrixRecoveryKey } from "./verification-DAcx8otJ.js";
|
|
18
|
+
//#region extensions/matrix/src/matrix/actions/devices.ts
|
|
19
|
+
async function listMatrixOwnDevices(opts = {}) {
|
|
20
|
+
return await withResolvedActionClient(opts, async (client) => await client.listOwnDevices());
|
|
21
|
+
}
|
|
22
|
+
async function pruneMatrixStaleGatewayDevices(opts = {}) {
|
|
23
|
+
return await withResolvedActionClient(opts, async (client) => {
|
|
24
|
+
const devices = await client.listOwnDevices();
|
|
25
|
+
const staleGatewayDeviceIds = summarizeMatrixDeviceHealth(devices).staleDaoCoreDevices.map((device) => device.deviceId);
|
|
26
|
+
return {
|
|
27
|
+
before: devices,
|
|
28
|
+
staleGatewayDeviceIds,
|
|
29
|
+
...staleGatewayDeviceIds.length > 0 ? await client.deleteOwnDevices(staleGatewayDeviceIds) : {
|
|
30
|
+
currentDeviceId: devices.find((device) => device.current)?.deviceId ?? null,
|
|
31
|
+
deletedDeviceIds: [],
|
|
32
|
+
remainingDevices: devices
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region extensions/matrix/src/cli.ts
|
|
39
|
+
let matrixCliExitScheduled = false;
|
|
40
|
+
let matrixActionClientModulePromise;
|
|
41
|
+
let matrixDirectManagementModulePromise;
|
|
42
|
+
function loadMatrixActionClientModule() {
|
|
43
|
+
matrixActionClientModulePromise ??= import("./client-VLyQk_pV.js");
|
|
44
|
+
return matrixActionClientModulePromise;
|
|
45
|
+
}
|
|
46
|
+
function loadMatrixDirectManagementModule() {
|
|
47
|
+
matrixDirectManagementModulePromise ??= import("./direct-management-COFmFhJf.js");
|
|
48
|
+
return matrixDirectManagementModulePromise;
|
|
49
|
+
}
|
|
50
|
+
function scheduleMatrixCliExit() {
|
|
51
|
+
if (matrixCliExitScheduled || process.env.VITEST) return;
|
|
52
|
+
matrixCliExitScheduled = true;
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
process.stdout.write("", () => {
|
|
55
|
+
process.stderr.write("", () => {
|
|
56
|
+
process.exit(process.exitCode ?? 0);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}, 0);
|
|
60
|
+
}
|
|
61
|
+
function markCliFailure() {
|
|
62
|
+
process.exitCode = 1;
|
|
63
|
+
}
|
|
64
|
+
async function readMatrixCliRecoveryKeyFromStdin() {
|
|
65
|
+
const chunks = [];
|
|
66
|
+
for await (const chunk of process.stdin) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));
|
|
67
|
+
const recoveryKey = Buffer.concat(chunks).toString("utf8").trim();
|
|
68
|
+
if (!recoveryKey) throw new Error("Matrix recovery key was requested from stdin, but stdin was empty.");
|
|
69
|
+
return recoveryKey;
|
|
70
|
+
}
|
|
71
|
+
async function resolveMatrixCliRecoveryKeyInput(options) {
|
|
72
|
+
if (options.recoveryKey && options.recoveryKeyStdin === true) throw new Error("Use either --recovery-key or --recovery-key-stdin, not both.");
|
|
73
|
+
if (options.recoveryKeyStdin === true) return await readMatrixCliRecoveryKeyFromStdin();
|
|
74
|
+
return options.recoveryKey;
|
|
75
|
+
}
|
|
76
|
+
async function requireMatrixCliRecoveryKeyInput(options) {
|
|
77
|
+
const recoveryKey = await resolveMatrixCliRecoveryKeyInput(options);
|
|
78
|
+
if (!recoveryKey) throw new Error("Matrix recovery key is required. Pass --recovery-key-stdin to read it from stdin.");
|
|
79
|
+
return recoveryKey;
|
|
80
|
+
}
|
|
81
|
+
function toErrorMessage(err) {
|
|
82
|
+
return formatMatrixErrorMessage(err);
|
|
83
|
+
}
|
|
84
|
+
function printJson(payload) {
|
|
85
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
86
|
+
}
|
|
87
|
+
function formatLocalTimestamp(value) {
|
|
88
|
+
if (!value) return null;
|
|
89
|
+
const parsed = new Date(value);
|
|
90
|
+
if (!Number.isFinite(parsed.getTime())) return value;
|
|
91
|
+
return formatZonedTimestamp(parsed, { displaySeconds: true }) ?? value;
|
|
92
|
+
}
|
|
93
|
+
function printTimestamp(label, value) {
|
|
94
|
+
const formatted = formatLocalTimestamp(value);
|
|
95
|
+
if (formatted) console.log(`${label}: ${formatMatrixCliText(formatted)}`);
|
|
96
|
+
}
|
|
97
|
+
function printAccountLabel(accountId) {
|
|
98
|
+
console.log(`Account: ${formatMatrixCliText(normalizeAccountId(accountId))}`);
|
|
99
|
+
}
|
|
100
|
+
function resolveMatrixCliAccountId(accountId) {
|
|
101
|
+
return resolveMatrixCliAccountContext(accountId).accountId;
|
|
102
|
+
}
|
|
103
|
+
function resolveMatrixCliAccountContext(accountId) {
|
|
104
|
+
const cfg = getMatrixRuntime().config.current();
|
|
105
|
+
return {
|
|
106
|
+
accountId: resolveMatrixAuthContext({
|
|
107
|
+
cfg,
|
|
108
|
+
accountId
|
|
109
|
+
}).accountId,
|
|
110
|
+
cfg
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function formatMatrixCliCommand(command, accountId) {
|
|
114
|
+
return formatMatrixCliCommandParts(command.split(" "), accountId);
|
|
115
|
+
}
|
|
116
|
+
function formatMatrixCliRecoveryKeyStdinCommand(command, accountId) {
|
|
117
|
+
const normalizedAccountId = normalizeAccountId(accountId);
|
|
118
|
+
return `printf '%s\\n' "$${normalizedAccountId === "default" ? "MATRIX_RECOVERY_KEY" : `MATRIX_RECOVERY_KEY_${normalizedAccountId.replace(/[^A-Za-z0-9]/g, "_").toUpperCase()}`}" | ${formatMatrixCliCommand(command, accountId)}`;
|
|
119
|
+
}
|
|
120
|
+
function formatMatrixCliCommandParts(parts, accountId) {
|
|
121
|
+
const normalizedAccountId = normalizeAccountId(accountId);
|
|
122
|
+
const command = [
|
|
123
|
+
"daocore",
|
|
124
|
+
"matrix",
|
|
125
|
+
...parts
|
|
126
|
+
];
|
|
127
|
+
if (normalizedAccountId !== "default") {
|
|
128
|
+
const optionTerminatorIndex = command.indexOf("--");
|
|
129
|
+
if (optionTerminatorIndex >= 0) command.splice(optionTerminatorIndex, 0, "--account", normalizedAccountId);
|
|
130
|
+
else command.push("--account", normalizedAccountId);
|
|
131
|
+
}
|
|
132
|
+
return command.map(formatMatrixCliShellArg).join(" ");
|
|
133
|
+
}
|
|
134
|
+
function formatMatrixCliShellArg(value) {
|
|
135
|
+
if (/^[A-Za-z0-9_./:=@%+-]+$/.test(value)) return value;
|
|
136
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
137
|
+
}
|
|
138
|
+
function formatMatrixCliText(value, fallback = "unknown") {
|
|
139
|
+
return sanitizeMatrixCliText(value ?? fallback);
|
|
140
|
+
}
|
|
141
|
+
function printMatrixOwnDevices(devices) {
|
|
142
|
+
if (devices.length === 0) {
|
|
143
|
+
console.log("Devices: none");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
for (const device of devices) {
|
|
147
|
+
const labels = [device.current ? "current" : null, device.displayName].filter((label) => Boolean(label)).map((label) => formatMatrixCliText(label));
|
|
148
|
+
console.log(`- ${formatMatrixCliText(device.deviceId)}${labels.length ? ` (${labels.join(", ")})` : ""}`);
|
|
149
|
+
if (device.lastSeenTs) printTimestamp(" Last seen", new Date(device.lastSeenTs).toISOString());
|
|
150
|
+
if (device.lastSeenIp) console.log(` Last IP: ${formatMatrixCliText(device.lastSeenIp)}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function configureCliLogMode(verbose) {
|
|
154
|
+
setMatrixSdkLogMode(verbose ? "default" : "quiet");
|
|
155
|
+
setMatrixSdkConsoleLogging(verbose);
|
|
156
|
+
}
|
|
157
|
+
function parseOptionalInt(value, fieldName) {
|
|
158
|
+
const trimmed = value?.trim();
|
|
159
|
+
if (!trimmed) return;
|
|
160
|
+
const parsed = Number.parseInt(trimmed, 10);
|
|
161
|
+
if (!Number.isFinite(parsed)) throw new Error(`${fieldName} must be an integer`);
|
|
162
|
+
return parsed;
|
|
163
|
+
}
|
|
164
|
+
async function addMatrixAccount(params) {
|
|
165
|
+
const runtime = getMatrixRuntime();
|
|
166
|
+
const cfg = runtime.config.current();
|
|
167
|
+
if (!matrixSetupAdapter.applyAccountConfig) throw new Error("Matrix account setup is unavailable.");
|
|
168
|
+
const input = {
|
|
169
|
+
name: params.name,
|
|
170
|
+
avatarUrl: params.avatarUrl,
|
|
171
|
+
homeserver: params.homeserver,
|
|
172
|
+
dangerouslyAllowPrivateNetwork: params.allowPrivateNetwork,
|
|
173
|
+
proxy: params.proxy,
|
|
174
|
+
userId: params.userId,
|
|
175
|
+
accessToken: params.accessToken,
|
|
176
|
+
password: params.password,
|
|
177
|
+
deviceName: params.deviceName,
|
|
178
|
+
initialSyncLimit: parseOptionalInt(params.initialSyncLimit, "--initial-sync-limit"),
|
|
179
|
+
useEnv: params.useEnv === true
|
|
180
|
+
};
|
|
181
|
+
const accountId = matrixSetupAdapter.resolveAccountId?.({
|
|
182
|
+
cfg,
|
|
183
|
+
accountId: params.account,
|
|
184
|
+
input
|
|
185
|
+
}) ?? normalizeAccountId(params.account?.trim() || params.name?.trim());
|
|
186
|
+
const validationError = matrixSetupAdapter.validateInput?.({
|
|
187
|
+
cfg,
|
|
188
|
+
accountId,
|
|
189
|
+
input
|
|
190
|
+
});
|
|
191
|
+
if (validationError) throw new Error(validationError);
|
|
192
|
+
let updated = matrixSetupAdapter.applyAccountConfig({
|
|
193
|
+
cfg,
|
|
194
|
+
accountId,
|
|
195
|
+
input
|
|
196
|
+
});
|
|
197
|
+
if (params.enableEncryption === true) updated = updateMatrixAccountConfig(updated, accountId, { encryption: true });
|
|
198
|
+
await runtime.config.replaceConfigFile({
|
|
199
|
+
nextConfig: updated,
|
|
200
|
+
afterWrite: { mode: "auto" }
|
|
201
|
+
});
|
|
202
|
+
const accountConfig = resolveMatrixAccountConfig({
|
|
203
|
+
cfg: updated,
|
|
204
|
+
accountId
|
|
205
|
+
});
|
|
206
|
+
let verificationBootstrap = {
|
|
207
|
+
attempted: false,
|
|
208
|
+
success: false,
|
|
209
|
+
recoveryKeyCreatedAt: null,
|
|
210
|
+
backupVersion: null
|
|
211
|
+
};
|
|
212
|
+
if (accountConfig.encryption === true) {
|
|
213
|
+
const { maybeBootstrapNewEncryptedMatrixAccount } = await import("./setup-bootstrap-Bg4kBQjO.js");
|
|
214
|
+
verificationBootstrap = await maybeBootstrapNewEncryptedMatrixAccount({
|
|
215
|
+
previousCfg: cfg,
|
|
216
|
+
cfg: updated,
|
|
217
|
+
accountId
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
const desiredDisplayName = input.name?.trim();
|
|
221
|
+
const desiredAvatarUrl = input.avatarUrl?.trim();
|
|
222
|
+
let profile = {
|
|
223
|
+
attempted: false,
|
|
224
|
+
displayNameUpdated: false,
|
|
225
|
+
avatarUpdated: false,
|
|
226
|
+
resolvedAvatarUrl: null,
|
|
227
|
+
convertedAvatarFromHttp: false
|
|
228
|
+
};
|
|
229
|
+
if (desiredDisplayName || desiredAvatarUrl) try {
|
|
230
|
+
const synced = await updateMatrixOwnProfile({
|
|
231
|
+
cfg: updated,
|
|
232
|
+
accountId,
|
|
233
|
+
displayName: desiredDisplayName,
|
|
234
|
+
avatarUrl: desiredAvatarUrl
|
|
235
|
+
});
|
|
236
|
+
let resolvedAvatarUrl = synced.resolvedAvatarUrl;
|
|
237
|
+
if (synced.convertedAvatarFromHttp && synced.resolvedAvatarUrl) {
|
|
238
|
+
const withAvatar = updateMatrixAccountConfig(runtime.config.current(), accountId, { avatarUrl: synced.resolvedAvatarUrl });
|
|
239
|
+
await runtime.config.replaceConfigFile({
|
|
240
|
+
nextConfig: withAvatar,
|
|
241
|
+
afterWrite: { mode: "auto" }
|
|
242
|
+
});
|
|
243
|
+
resolvedAvatarUrl = synced.resolvedAvatarUrl;
|
|
244
|
+
}
|
|
245
|
+
profile = {
|
|
246
|
+
attempted: true,
|
|
247
|
+
displayNameUpdated: synced.displayNameUpdated,
|
|
248
|
+
avatarUpdated: synced.avatarUpdated,
|
|
249
|
+
resolvedAvatarUrl,
|
|
250
|
+
convertedAvatarFromHttp: synced.convertedAvatarFromHttp
|
|
251
|
+
};
|
|
252
|
+
} catch (err) {
|
|
253
|
+
profile = {
|
|
254
|
+
attempted: true,
|
|
255
|
+
displayNameUpdated: false,
|
|
256
|
+
avatarUpdated: false,
|
|
257
|
+
resolvedAvatarUrl: null,
|
|
258
|
+
convertedAvatarFromHttp: false,
|
|
259
|
+
error: toErrorMessage(err)
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
let deviceHealth = {
|
|
263
|
+
currentDeviceId: null,
|
|
264
|
+
staleDaoCoreDeviceIds: []
|
|
265
|
+
};
|
|
266
|
+
try {
|
|
267
|
+
const addedDevices = await listMatrixOwnDevices({
|
|
268
|
+
accountId,
|
|
269
|
+
cfg: updated
|
|
270
|
+
});
|
|
271
|
+
deviceHealth = {
|
|
272
|
+
currentDeviceId: addedDevices.find((device) => device.current)?.deviceId ?? null,
|
|
273
|
+
staleDaoCoreDeviceIds: addedDevices.filter((device) => !device.current && isDaoCoreManagedMatrixDevice(device.displayName)).map((device) => device.deviceId)
|
|
274
|
+
};
|
|
275
|
+
} catch (err) {
|
|
276
|
+
deviceHealth = {
|
|
277
|
+
currentDeviceId: null,
|
|
278
|
+
staleDaoCoreDeviceIds: [],
|
|
279
|
+
error: toErrorMessage(err)
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
return {
|
|
283
|
+
accountId,
|
|
284
|
+
configPath: resolveMatrixConfigPath(updated, accountId),
|
|
285
|
+
useEnv: input.useEnv === true,
|
|
286
|
+
encryptionEnabled: accountConfig.encryption === true,
|
|
287
|
+
deviceHealth,
|
|
288
|
+
verificationBootstrap,
|
|
289
|
+
profile
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function printDirectRoomCandidate(room) {
|
|
293
|
+
const members = room.joinedMembers === null ? "unavailable" : room.joinedMembers.map((member) => formatMatrixCliText(member)).join(", ") || "none";
|
|
294
|
+
console.log(`- ${formatMatrixCliText(room.roomId)} [${room.source}] strict=${room.strict ? "yes" : "no"} joined=${members}`);
|
|
295
|
+
}
|
|
296
|
+
function printDirectRoomInspection(result) {
|
|
297
|
+
printAccountLabel(result.accountId);
|
|
298
|
+
console.log(`Peer: ${formatMatrixCliText(result.remoteUserId)}`);
|
|
299
|
+
console.log(`Self: ${formatMatrixCliText(result.selfUserId)}`);
|
|
300
|
+
console.log(`Active direct room: ${formatMatrixCliText(result.activeRoomId, "none")}`);
|
|
301
|
+
console.log(`Mapped rooms: ${result.mappedRoomIds.length ? result.mappedRoomIds.map((roomId) => formatMatrixCliText(roomId)).join(", ") : "none"}`);
|
|
302
|
+
console.log(`Discovered strict rooms: ${result.discoveredStrictRoomIds.length ? result.discoveredStrictRoomIds.map((roomId) => formatMatrixCliText(roomId)).join(", ") : "none"}`);
|
|
303
|
+
if (result.mappedRooms.length > 0) {
|
|
304
|
+
console.log("Mapped room details:");
|
|
305
|
+
for (const room of result.mappedRooms) printDirectRoomCandidate(room);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
async function inspectMatrixDirectRoom(params) {
|
|
309
|
+
const cfg = getMatrixRuntime().config.current();
|
|
310
|
+
const [{ withResolvedActionClient }, { inspectMatrixDirectRooms }] = await Promise.all([loadMatrixActionClientModule(), loadMatrixDirectManagementModule()]);
|
|
311
|
+
return await withResolvedActionClient({
|
|
312
|
+
accountId: params.accountId,
|
|
313
|
+
cfg
|
|
314
|
+
}, async (client) => {
|
|
315
|
+
const inspection = await inspectMatrixDirectRooms({
|
|
316
|
+
client,
|
|
317
|
+
remoteUserId: params.userId
|
|
318
|
+
});
|
|
319
|
+
return {
|
|
320
|
+
accountId: params.accountId,
|
|
321
|
+
remoteUserId: inspection.remoteUserId,
|
|
322
|
+
selfUserId: inspection.selfUserId,
|
|
323
|
+
mappedRoomIds: inspection.mappedRoomIds,
|
|
324
|
+
mappedRooms: inspection.mappedRooms.map(toCliDirectRoomCandidate),
|
|
325
|
+
discoveredStrictRoomIds: inspection.discoveredStrictRoomIds,
|
|
326
|
+
activeRoomId: inspection.activeRoomId
|
|
327
|
+
};
|
|
328
|
+
}, "persist");
|
|
329
|
+
}
|
|
330
|
+
async function repairMatrixDirectRoom(params) {
|
|
331
|
+
const cfg = getMatrixRuntime().config.current();
|
|
332
|
+
const account = resolveMatrixAccount({
|
|
333
|
+
cfg,
|
|
334
|
+
accountId: params.accountId
|
|
335
|
+
});
|
|
336
|
+
const [{ withStartedActionClient }, { repairMatrixDirectRooms }] = await Promise.all([loadMatrixActionClientModule(), loadMatrixDirectManagementModule()]);
|
|
337
|
+
return await withStartedActionClient({
|
|
338
|
+
accountId: params.accountId,
|
|
339
|
+
cfg
|
|
340
|
+
}, async (client) => {
|
|
341
|
+
const repaired = await repairMatrixDirectRooms({
|
|
342
|
+
client,
|
|
343
|
+
remoteUserId: params.userId,
|
|
344
|
+
encrypted: account.config.encryption === true
|
|
345
|
+
});
|
|
346
|
+
return {
|
|
347
|
+
accountId: params.accountId,
|
|
348
|
+
remoteUserId: repaired.remoteUserId,
|
|
349
|
+
selfUserId: repaired.selfUserId,
|
|
350
|
+
mappedRoomIds: repaired.mappedRoomIds,
|
|
351
|
+
mappedRooms: repaired.mappedRooms.map(toCliDirectRoomCandidate),
|
|
352
|
+
discoveredStrictRoomIds: repaired.discoveredStrictRoomIds,
|
|
353
|
+
activeRoomId: repaired.activeRoomId,
|
|
354
|
+
encrypted: account.config.encryption === true,
|
|
355
|
+
createdRoomId: repaired.createdRoomId,
|
|
356
|
+
changed: repaired.changed,
|
|
357
|
+
directContentBefore: repaired.directContentBefore,
|
|
358
|
+
directContentAfter: repaired.directContentAfter
|
|
359
|
+
};
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
async function setMatrixProfile(params) {
|
|
363
|
+
return await applyMatrixProfileUpdate({
|
|
364
|
+
account: params.account,
|
|
365
|
+
displayName: params.name,
|
|
366
|
+
avatarUrl: params.avatarUrl
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
async function runMatrixCliCommand(config) {
|
|
370
|
+
configureCliLogMode(config.verbose);
|
|
371
|
+
try {
|
|
372
|
+
const result = await config.run();
|
|
373
|
+
if (config.json) printJson(config.onJson ? config.onJson(result) : result);
|
|
374
|
+
else config.onText(result, config.verbose);
|
|
375
|
+
if (config.shouldFail?.(result)) markCliFailure();
|
|
376
|
+
} catch (err) {
|
|
377
|
+
const message = toErrorMessage(err);
|
|
378
|
+
if (config.json) printJson(config.onJsonError ? config.onJsonError(message) : { error: message });
|
|
379
|
+
else {
|
|
380
|
+
console.error(`${config.errorPrefix}: ${formatMatrixCliText(message)}`);
|
|
381
|
+
config.onTextError?.(message);
|
|
382
|
+
}
|
|
383
|
+
markCliFailure();
|
|
384
|
+
} finally {
|
|
385
|
+
scheduleMatrixCliExit();
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function isMatrixVerificationSetupComplete(status) {
|
|
389
|
+
return status.encryptionEnabled && status.verified && status.crossSigningVerified && status.signedByOwner && status.serverDeviceKnown === true && resolveMatrixRoomKeyBackupIssue(resolveBackupStatus(status)).code === "ok";
|
|
390
|
+
}
|
|
391
|
+
function buildNoopMatrixVerificationBootstrap(status) {
|
|
392
|
+
return {
|
|
393
|
+
success: true,
|
|
394
|
+
verification: {
|
|
395
|
+
...status,
|
|
396
|
+
backup: resolveBackupStatus(status),
|
|
397
|
+
serverDeviceKnown: status.serverDeviceKnown ?? null
|
|
398
|
+
},
|
|
399
|
+
crossSigning: {
|
|
400
|
+
userId: status.userId,
|
|
401
|
+
masterKeyPublished: status.crossSigningVerified,
|
|
402
|
+
selfSigningKeyPublished: status.signedByOwner,
|
|
403
|
+
userSigningKeyPublished: status.signedByOwner,
|
|
404
|
+
published: status.crossSigningVerified && status.signedByOwner
|
|
405
|
+
},
|
|
406
|
+
pendingVerifications: status.pendingVerifications,
|
|
407
|
+
cryptoBootstrap: null
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
async function setupMatrixEncryption(params) {
|
|
411
|
+
const runtime = getMatrixRuntime();
|
|
412
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(params.account);
|
|
413
|
+
if (!resolveMatrixAccount({
|
|
414
|
+
cfg,
|
|
415
|
+
accountId
|
|
416
|
+
}).configured) throw new Error(`Matrix account "${accountId}" is not configured; run ${formatMatrixCliCommand("account add", accountId)} first.`);
|
|
417
|
+
const encryptionChanged = resolveMatrixAccountConfig({
|
|
418
|
+
cfg,
|
|
419
|
+
accountId
|
|
420
|
+
}).encryption !== true;
|
|
421
|
+
const updated = encryptionChanged ? updateMatrixAccountConfig(cfg, accountId, { encryption: true }) : cfg;
|
|
422
|
+
if (encryptionChanged) await runtime.config.replaceConfigFile({
|
|
423
|
+
nextConfig: updated,
|
|
424
|
+
afterWrite: { mode: "auto" }
|
|
425
|
+
});
|
|
426
|
+
const existingStatus = !encryptionChanged && !params.recoveryKey && params.forceResetCrossSigning !== true ? await getMatrixVerificationStatus({
|
|
427
|
+
accountId,
|
|
428
|
+
cfg: updated,
|
|
429
|
+
readiness: "none"
|
|
430
|
+
}) : null;
|
|
431
|
+
if (existingStatus && isMatrixVerificationSetupComplete(existingStatus)) return {
|
|
432
|
+
accountId,
|
|
433
|
+
configPath: resolveMatrixConfigPath(updated, accountId),
|
|
434
|
+
encryptionChanged,
|
|
435
|
+
bootstrap: buildNoopMatrixVerificationBootstrap(existingStatus),
|
|
436
|
+
status: existingStatus
|
|
437
|
+
};
|
|
438
|
+
const bootstrap = await bootstrapMatrixVerification({
|
|
439
|
+
accountId,
|
|
440
|
+
cfg: updated,
|
|
441
|
+
recoveryKey: params.recoveryKey,
|
|
442
|
+
forceResetCrossSigning: params.forceResetCrossSigning === true
|
|
443
|
+
});
|
|
444
|
+
const status = await getMatrixVerificationStatus({
|
|
445
|
+
accountId,
|
|
446
|
+
cfg: updated
|
|
447
|
+
});
|
|
448
|
+
return {
|
|
449
|
+
accountId,
|
|
450
|
+
configPath: resolveMatrixConfigPath(updated, accountId),
|
|
451
|
+
encryptionChanged,
|
|
452
|
+
bootstrap,
|
|
453
|
+
status
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
function toCliDirectRoomCandidate(room) {
|
|
457
|
+
return {
|
|
458
|
+
roomId: room.roomId,
|
|
459
|
+
source: room.source,
|
|
460
|
+
strict: room.strict,
|
|
461
|
+
joinedMembers: room.joinedMembers
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
function resolveBackupStatus(status) {
|
|
465
|
+
return {
|
|
466
|
+
serverVersion: status.backup?.serverVersion ?? status.backupVersion ?? null,
|
|
467
|
+
activeVersion: status.backup?.activeVersion ?? null,
|
|
468
|
+
trusted: status.backup?.trusted ?? null,
|
|
469
|
+
matchesDecryptionKey: status.backup?.matchesDecryptionKey ?? null,
|
|
470
|
+
decryptionKeyCached: status.backup?.decryptionKeyCached ?? null,
|
|
471
|
+
keyLoadAttempted: status.backup?.keyLoadAttempted ?? false,
|
|
472
|
+
keyLoadError: status.backup?.keyLoadError ?? null
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
function yesNoUnknown(value) {
|
|
476
|
+
if (value === true) return "yes";
|
|
477
|
+
if (value === false) return "no";
|
|
478
|
+
return "unknown";
|
|
479
|
+
}
|
|
480
|
+
function printBackupStatus(backup) {
|
|
481
|
+
console.log(`Backup server version: ${formatMatrixCliText(backup.serverVersion, "none")}`);
|
|
482
|
+
console.log(`Backup active on this device: ${formatMatrixCliText(backup.activeVersion, "no")}`);
|
|
483
|
+
console.log(`Backup trusted by this device: ${yesNoUnknown(backup.trusted)}`);
|
|
484
|
+
console.log(`Backup matches local decryption key: ${yesNoUnknown(backup.matchesDecryptionKey)}`);
|
|
485
|
+
console.log(`Backup key cached locally: ${yesNoUnknown(backup.decryptionKeyCached)}`);
|
|
486
|
+
console.log(`Backup key load attempted: ${yesNoUnknown(backup.keyLoadAttempted)}`);
|
|
487
|
+
if (backup.keyLoadError) console.log(`Backup key load error: ${formatMatrixCliText(backup.keyLoadError)}`);
|
|
488
|
+
}
|
|
489
|
+
function printVerificationIdentity(status) {
|
|
490
|
+
console.log(`User: ${formatMatrixCliText(status.userId)}`);
|
|
491
|
+
console.log(`Device: ${formatMatrixCliText(status.deviceId)}`);
|
|
492
|
+
}
|
|
493
|
+
function printVerificationBackupSummary(status) {
|
|
494
|
+
printBackupSummary(resolveBackupStatus(status));
|
|
495
|
+
}
|
|
496
|
+
function printVerificationBackupStatus(status) {
|
|
497
|
+
printBackupStatus(resolveBackupStatus(status));
|
|
498
|
+
}
|
|
499
|
+
function printVerificationTrustDiagnostics(status) {
|
|
500
|
+
console.log(`Locally trusted: ${status.localVerified ? "yes" : "no"}`);
|
|
501
|
+
console.log(`Cross-signing verified: ${status.crossSigningVerified ? "yes" : "no"}`);
|
|
502
|
+
console.log(`Signed by owner: ${status.signedByOwner ? "yes" : "no"}`);
|
|
503
|
+
}
|
|
504
|
+
function sanitizeMatrixCliText(value) {
|
|
505
|
+
let withoutAnsi = "";
|
|
506
|
+
for (let index = 0; index < value.length; index++) {
|
|
507
|
+
const code = value.charCodeAt(index);
|
|
508
|
+
if (code === 155) {
|
|
509
|
+
index++;
|
|
510
|
+
while (index < value.length && !isAnsiFinalByte(value.charCodeAt(index))) index++;
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
if (code === 157) {
|
|
514
|
+
index++;
|
|
515
|
+
while (index < value.length) {
|
|
516
|
+
const current = value.charCodeAt(index);
|
|
517
|
+
if (current === 7 || current === 156) break;
|
|
518
|
+
if (current === 27 && value[index + 1] === "\\") {
|
|
519
|
+
index++;
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
index++;
|
|
523
|
+
}
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
if (code === 144 || code === 158 || code === 159) {
|
|
527
|
+
index++;
|
|
528
|
+
while (index < value.length) {
|
|
529
|
+
const current = value.charCodeAt(index);
|
|
530
|
+
if (current === 7 || current === 156) break;
|
|
531
|
+
if (current === 27 && value[index + 1] === "\\") {
|
|
532
|
+
index++;
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
index++;
|
|
536
|
+
}
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
if (code !== 27) {
|
|
540
|
+
withoutAnsi += value[index];
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
const marker = value[index + 1];
|
|
544
|
+
if (marker === "[") {
|
|
545
|
+
index += 2;
|
|
546
|
+
while (index < value.length && !isAnsiFinalByte(value.charCodeAt(index))) index++;
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
if (marker === "]") {
|
|
550
|
+
index += 2;
|
|
551
|
+
while (index < value.length) {
|
|
552
|
+
const current = value.charCodeAt(index);
|
|
553
|
+
if (current === 7) break;
|
|
554
|
+
if (current === 27 && value[index + 1] === "\\") {
|
|
555
|
+
index++;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
index++;
|
|
559
|
+
}
|
|
560
|
+
continue;
|
|
561
|
+
}
|
|
562
|
+
index++;
|
|
563
|
+
}
|
|
564
|
+
let sanitized = "";
|
|
565
|
+
for (const character of withoutAnsi) if (!isUnsafeMatrixCliTerminalCode(character.charCodeAt(0))) sanitized += character;
|
|
566
|
+
return sanitized;
|
|
567
|
+
}
|
|
568
|
+
function isUnsafeMatrixCliTerminalCode(code) {
|
|
569
|
+
return code < 32 || code === 127 || code >= 128 && code <= 159 || code >= 8234 && code <= 8238 || code >= 8294 && code <= 8297;
|
|
570
|
+
}
|
|
571
|
+
function isAnsiFinalByte(code) {
|
|
572
|
+
return code >= 64 && code <= 126;
|
|
573
|
+
}
|
|
574
|
+
function formatMatrixCliSasEmoji(emoji) {
|
|
575
|
+
return emoji.map(([emojiValue, label]) => `${sanitizeMatrixCliText(emojiValue)} ${sanitizeMatrixCliText(label)}`).join(" | ");
|
|
576
|
+
}
|
|
577
|
+
function printMatrixVerificationSummary(summary) {
|
|
578
|
+
console.log(`Verification id: ${sanitizeMatrixCliText(summary.id)}`);
|
|
579
|
+
if (summary.transactionId) console.log(`Transaction id: ${sanitizeMatrixCliText(summary.transactionId)}`);
|
|
580
|
+
if (summary.roomId) console.log(`Room id: ${sanitizeMatrixCliText(summary.roomId)}`);
|
|
581
|
+
console.log(`Other user: ${sanitizeMatrixCliText(summary.otherUserId)}`);
|
|
582
|
+
console.log(`Other device: ${sanitizeMatrixCliText(summary.otherDeviceId ?? "unknown")}`);
|
|
583
|
+
console.log(`Self-verification: ${summary.isSelfVerification ? "yes" : "no"}`);
|
|
584
|
+
console.log(`Initiated by DaoCore: ${summary.initiatedByMe ? "yes" : "no"}`);
|
|
585
|
+
console.log(`Phase: ${sanitizeMatrixCliText(summary.phaseName)}`);
|
|
586
|
+
console.log(`Pending: ${summary.pending ? "yes" : "no"}`);
|
|
587
|
+
console.log(`Completed: ${summary.completed ? "yes" : "no"}`);
|
|
588
|
+
console.log(`Methods: ${summary.methods.length ? summary.methods.map(sanitizeMatrixCliText).join(", ") : "none"}`);
|
|
589
|
+
if (summary.chosenMethod) console.log(`Chosen method: ${sanitizeMatrixCliText(summary.chosenMethod)}`);
|
|
590
|
+
if (summary.hasSas && summary.sas?.emoji?.length) console.log(`SAS emoji: ${formatMatrixCliSasEmoji(summary.sas.emoji)}`);
|
|
591
|
+
else if (summary.hasSas && summary.sas?.decimal) console.log(`SAS decimals: ${summary.sas.decimal.join(" ")}`);
|
|
592
|
+
if (summary.error) console.log(`Verification error: ${sanitizeMatrixCliText(summary.error)}`);
|
|
593
|
+
}
|
|
594
|
+
function printMatrixVerificationSummaries(summaries) {
|
|
595
|
+
if (summaries.length === 0) {
|
|
596
|
+
console.log("Verifications: none");
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
summaries.forEach((summary, index) => {
|
|
600
|
+
if (index > 0) console.log("");
|
|
601
|
+
printMatrixVerificationSummary(summary);
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
function printMatrixVerificationSas(sas) {
|
|
605
|
+
if (sas.emoji?.length) console.log(`SAS emoji: ${formatMatrixCliSasEmoji(sas.emoji)}`);
|
|
606
|
+
else if (sas.decimal) console.log(`SAS decimals: ${sas.decimal.join(" ")}`);
|
|
607
|
+
else console.log("SAS: unavailable");
|
|
608
|
+
}
|
|
609
|
+
function matrixCliVerificationDmLookupOptions(options) {
|
|
610
|
+
const lookup = {};
|
|
611
|
+
if (options.roomId !== void 0) lookup.verificationDmRoomId = options.roomId;
|
|
612
|
+
if (options.userId !== void 0) lookup.verificationDmUserId = options.userId;
|
|
613
|
+
return lookup;
|
|
614
|
+
}
|
|
615
|
+
function formatMatrixVerificationDmFollowupParts(params) {
|
|
616
|
+
if (!params.roomId || !params.userId) return [];
|
|
617
|
+
return [
|
|
618
|
+
"--user-id",
|
|
619
|
+
sanitizeMatrixCliText(params.userId),
|
|
620
|
+
"--room-id",
|
|
621
|
+
sanitizeMatrixCliText(params.roomId)
|
|
622
|
+
];
|
|
623
|
+
}
|
|
624
|
+
function formatMatrixVerificationSummaryDmFollowupParts(summary) {
|
|
625
|
+
return formatMatrixVerificationDmFollowupParts({
|
|
626
|
+
roomId: summary.roomId,
|
|
627
|
+
userId: summary.otherUserId
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
function formatMatrixVerificationOptionsDmFollowupParts(options) {
|
|
631
|
+
return formatMatrixVerificationDmFollowupParts({
|
|
632
|
+
roomId: options.roomId,
|
|
633
|
+
userId: options.userId
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
function formatMatrixVerificationPreferredDmFollowupParts(summary, options) {
|
|
637
|
+
const summaryParts = formatMatrixVerificationSummaryDmFollowupParts(summary);
|
|
638
|
+
return summaryParts.length ? summaryParts : formatMatrixVerificationOptionsDmFollowupParts(options);
|
|
639
|
+
}
|
|
640
|
+
function formatMatrixVerificationFollowupCommand(params) {
|
|
641
|
+
return formatMatrixCliCommandParts([
|
|
642
|
+
"verify",
|
|
643
|
+
params.action,
|
|
644
|
+
...params.dmParts ?? [],
|
|
645
|
+
"--",
|
|
646
|
+
params.requestId
|
|
647
|
+
], params.accountId);
|
|
648
|
+
}
|
|
649
|
+
function printMatrixVerificationSasGuidance(requestId, accountId, dmParts = []) {
|
|
650
|
+
printGuidance([
|
|
651
|
+
`Compare the emoji or decimals with the other Matrix client.`,
|
|
652
|
+
`If they match, run ${formatMatrixVerificationFollowupCommand({
|
|
653
|
+
action: "confirm-sas",
|
|
654
|
+
requestId,
|
|
655
|
+
accountId,
|
|
656
|
+
dmParts
|
|
657
|
+
})}.`,
|
|
658
|
+
`If they do not match, run ${formatMatrixVerificationFollowupCommand({
|
|
659
|
+
action: "mismatch-sas",
|
|
660
|
+
requestId,
|
|
661
|
+
accountId,
|
|
662
|
+
dmParts
|
|
663
|
+
})}.`
|
|
664
|
+
]);
|
|
665
|
+
}
|
|
666
|
+
function formatMatrixVerificationCommandId(summary) {
|
|
667
|
+
return sanitizeMatrixCliText(summary.transactionId ?? summary.id);
|
|
668
|
+
}
|
|
669
|
+
async function promptMatrixVerificationSasMatch() {
|
|
670
|
+
const { createInterface } = await import("node:readline/promises");
|
|
671
|
+
const prompt = createInterface({
|
|
672
|
+
input: process.stdin,
|
|
673
|
+
output: process.stdout
|
|
674
|
+
});
|
|
675
|
+
try {
|
|
676
|
+
const answer = await prompt.question("Do the emoji or decimals match? Type yes to confirm: ");
|
|
677
|
+
return /^(?:y|yes)$/i.test(answer.trim());
|
|
678
|
+
} finally {
|
|
679
|
+
prompt.close();
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
function printMatrixVerificationRequestGuidance(summary, accountId) {
|
|
683
|
+
const requestId = formatMatrixVerificationCommandId(summary);
|
|
684
|
+
const dmParts = formatMatrixVerificationSummaryDmFollowupParts(summary);
|
|
685
|
+
printGuidance([
|
|
686
|
+
`Accept the verification request in another Matrix client for this account.`,
|
|
687
|
+
`Then run ${formatMatrixVerificationFollowupCommand({
|
|
688
|
+
action: "start",
|
|
689
|
+
requestId,
|
|
690
|
+
accountId,
|
|
691
|
+
dmParts
|
|
692
|
+
})} to start SAS verification.`,
|
|
693
|
+
`Run ${formatMatrixVerificationFollowupCommand({
|
|
694
|
+
action: "sas",
|
|
695
|
+
requestId,
|
|
696
|
+
accountId,
|
|
697
|
+
dmParts
|
|
698
|
+
})} to display the SAS emoji or decimals.`,
|
|
699
|
+
`When the SAS matches, run ${formatMatrixVerificationFollowupCommand({
|
|
700
|
+
action: "confirm-sas",
|
|
701
|
+
requestId,
|
|
702
|
+
accountId,
|
|
703
|
+
dmParts
|
|
704
|
+
})}.`
|
|
705
|
+
]);
|
|
706
|
+
}
|
|
707
|
+
async function runMatrixCliVerificationSummaryCommand(params) {
|
|
708
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(params.options.account);
|
|
709
|
+
await runMatrixCliCommand({
|
|
710
|
+
verbose: params.options.verbose === true,
|
|
711
|
+
json: params.options.json === true,
|
|
712
|
+
run: async () => await params.run(accountId, cfg),
|
|
713
|
+
onText: (summary) => {
|
|
714
|
+
printAccountLabel(accountId);
|
|
715
|
+
printMatrixVerificationSummary(summary);
|
|
716
|
+
params.afterText?.(summary, accountId);
|
|
717
|
+
},
|
|
718
|
+
errorPrefix: params.errorPrefix
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
async function runMatrixCliSelfVerificationCommand(options) {
|
|
722
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
723
|
+
await runMatrixCliCommand({
|
|
724
|
+
verbose: options.verbose === true,
|
|
725
|
+
json: false,
|
|
726
|
+
run: async () => await runMatrixSelfVerification({
|
|
727
|
+
accountId,
|
|
728
|
+
cfg,
|
|
729
|
+
timeoutMs: parseOptionalInt(options.timeoutMs, "--timeout-ms"),
|
|
730
|
+
onRequested: (summary) => {
|
|
731
|
+
printAccountLabel(accountId);
|
|
732
|
+
printMatrixVerificationSummary(summary);
|
|
733
|
+
console.log("Accept this verification request in another Matrix client.");
|
|
734
|
+
},
|
|
735
|
+
onReady: (summary) => {
|
|
736
|
+
console.log("Verification request accepted.");
|
|
737
|
+
if (!summary.hasSas) console.log("Starting SAS verification...");
|
|
738
|
+
},
|
|
739
|
+
onSas: (summary) => {
|
|
740
|
+
printMatrixVerificationSas(summary.sas ?? {});
|
|
741
|
+
console.log("Compare this SAS with the other Matrix client.");
|
|
742
|
+
},
|
|
743
|
+
confirmSas: async () => await promptMatrixVerificationSasMatch()
|
|
744
|
+
}),
|
|
745
|
+
onText: (summary, verbose) => {
|
|
746
|
+
printMatrixVerificationSummary(summary);
|
|
747
|
+
console.log(`Device verified by owner: ${summary.deviceOwnerVerified ? "yes" : "no"}`);
|
|
748
|
+
printVerificationTrustDiagnostics(summary.ownerVerification);
|
|
749
|
+
printVerificationBackupSummary(summary.ownerVerification);
|
|
750
|
+
if (verbose) printVerificationBackupStatus(summary.ownerVerification);
|
|
751
|
+
console.log("Self-verification complete.");
|
|
752
|
+
},
|
|
753
|
+
onTextError: () => {
|
|
754
|
+
printGuidance([`Run ${formatMatrixCliCommand("verify self", accountId)} again and accept the request in another verified Matrix client for this account.`, `Then run ${formatMatrixCliCommand("verify status --verbose", accountId)} to confirm Cross-signing verified: yes and Signed by owner: yes.`]);
|
|
755
|
+
},
|
|
756
|
+
errorPrefix: "Self-verification failed"
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
function printVerificationGuidance(status, accountId) {
|
|
760
|
+
printGuidance(buildVerificationGuidance(status, accountId));
|
|
761
|
+
}
|
|
762
|
+
function printBackupGuidance(backup, accountId, options = {}) {
|
|
763
|
+
printGuidance(buildBackupGuidance(backup, accountId, options));
|
|
764
|
+
}
|
|
765
|
+
function printBackupSummary(backup) {
|
|
766
|
+
const issue = resolveMatrixRoomKeyBackupIssue(backup);
|
|
767
|
+
console.log(`Backup: ${issue.summary}`);
|
|
768
|
+
if (backup.serverVersion) console.log(`Backup version: ${formatMatrixCliText(backup.serverVersion)}`);
|
|
769
|
+
}
|
|
770
|
+
function buildVerificationGuidance(status, accountId) {
|
|
771
|
+
const backup = resolveBackupStatus(status);
|
|
772
|
+
const nextSteps = /* @__PURE__ */ new Set();
|
|
773
|
+
if (!status.verified) if (status.recoveryKeyAccepted === true && status.backupUsable === true) {
|
|
774
|
+
nextSteps.add(`Recovery key can unlock the room-key backup, but full Matrix identity trust is still incomplete. Run ${formatMatrixCliCommand("verify self", accountId)}, accept the request in another verified Matrix client, and confirm the SAS only if it matches.`);
|
|
775
|
+
nextSteps.add(`If you intend to replace the current cross-signing identity, run the shown printf pipeline with the Matrix recovery key env var for this account: ${formatMatrixCliRecoveryKeyStdinCommand("verify bootstrap --recovery-key-stdin --force-reset-cross-signing", accountId)}.`);
|
|
776
|
+
} else nextSteps.add(`Run the shown printf pipeline with the Matrix recovery key env var for this account: ${formatMatrixCliRecoveryKeyStdinCommand("verify device --recovery-key-stdin", accountId)}. If you do not have the recovery key but still have another verified Matrix client, run ${formatMatrixCliCommand("verify self", accountId)} instead.`);
|
|
777
|
+
if (status.serverDeviceKnown === false) nextSteps.add(`This Matrix device is no longer listed on the homeserver. Create a new DaoCore Matrix device with ${formatMatrixCliCommand("account add --homeserver <url> --user-id <@user:server> --password <password> --device-name DaoCore-Gateway", accountId)}. If you use token auth, create a fresh Matrix access token in your Matrix client or admin UI, then run ${formatMatrixCliCommand("account add --homeserver <url> --access-token <token>", accountId)}.`);
|
|
778
|
+
for (const step of buildBackupGuidance(backup, accountId, { recoveryKeyStored: status.recoveryKeyStored })) nextSteps.add(step);
|
|
779
|
+
if (status.pendingVerifications > 0) nextSteps.add(`Review pending verification requests with ${formatMatrixCliCommand("verify list", accountId)}. Complete each active request with ${formatMatrixCliCommand("verify sas <id>", accountId)} and ${formatMatrixCliCommand("verify confirm-sas <id>", accountId)}, or cancel stale requests with ${formatMatrixCliCommand("verify cancel <id>", accountId)}.`);
|
|
780
|
+
return Array.from(nextSteps);
|
|
781
|
+
}
|
|
782
|
+
function buildBackupGuidance(backup, accountId, options = {}) {
|
|
783
|
+
const backupIssue = resolveMatrixRoomKeyBackupIssue(backup);
|
|
784
|
+
const nextSteps = /* @__PURE__ */ new Set();
|
|
785
|
+
if (backupIssue.code === "missing-server-backup") nextSteps.add(`Run ${formatMatrixCliCommand("verify bootstrap", accountId)} to create a room key backup.`);
|
|
786
|
+
else if (backupIssue.code === "key-load-failed" || backupIssue.code === "key-not-loaded" || backupIssue.code === "inactive") if (options.recoveryKeyStored) nextSteps.add(`Backup key is not loaded on this device. Run ${formatMatrixCliCommand("verify backup restore", accountId)} to load it and restore old room keys. If restore still cannot load the key, run the shown printf pipeline with the Matrix recovery key env var for this account: ${formatMatrixCliRecoveryKeyStdinCommand("verify backup restore --recovery-key-stdin", accountId)}.`);
|
|
787
|
+
else nextSteps.add(`Run the shown printf pipeline with the Matrix recovery key env var for this account: ${formatMatrixCliRecoveryKeyStdinCommand("verify backup restore --recovery-key-stdin", accountId)} to load the server backup and store the key for future restores.`);
|
|
788
|
+
else if (backupIssue.code === "key-mismatch") {
|
|
789
|
+
nextSteps.add(`Backup key mismatch on this device. Run the shown printf pipeline with the active server backup recovery key env var for this account: ${formatMatrixCliRecoveryKeyStdinCommand("verify backup restore --recovery-key-stdin", accountId)}.`);
|
|
790
|
+
nextSteps.add(`If you want a fresh backup baseline and accept losing unrecoverable history, run ${formatMatrixCliCommand("verify backup reset --yes", accountId)}. Add --rotate-recovery-key only when the old recovery key should stop unlocking the fresh backup.`);
|
|
791
|
+
} else if (backupIssue.code === "untrusted-signature") {
|
|
792
|
+
nextSteps.add(`Backup trust chain is not verified on this device. Run the shown printf pipeline with the correct recovery key env var for this account: ${formatMatrixCliRecoveryKeyStdinCommand("verify device --recovery-key-stdin", accountId)}.`);
|
|
793
|
+
nextSteps.add(`If device identity trust remains incomplete after that, run ${formatMatrixCliCommand("verify self", accountId)} from another verified Matrix client.`);
|
|
794
|
+
nextSteps.add(`If you want a fresh backup baseline and accept losing unrecoverable history, run ${formatMatrixCliCommand("verify backup reset --yes", accountId)}. Add --rotate-recovery-key only when the old recovery key should stop unlocking the fresh backup.`);
|
|
795
|
+
} else if (backupIssue.code === "indeterminate") nextSteps.add(`Run ${formatMatrixCliCommand("verify status --verbose", accountId)} to inspect backup trust diagnostics.`);
|
|
796
|
+
return Array.from(nextSteps);
|
|
797
|
+
}
|
|
798
|
+
function printGuidance(lines) {
|
|
799
|
+
if (lines.length === 0) return;
|
|
800
|
+
console.log("Next steps:");
|
|
801
|
+
for (const line of lines) console.log(`- ${line}`);
|
|
802
|
+
}
|
|
803
|
+
function printVerificationStatus(status, verbose = false, accountId) {
|
|
804
|
+
console.log(`Verified by owner: ${status.verified ? "yes" : "no"}`);
|
|
805
|
+
if (status.serverDeviceKnown === false) console.log("Device issue: current Matrix device is missing from the homeserver device list");
|
|
806
|
+
const backupIssue = resolveMatrixRoomKeyBackupIssue(resolveBackupStatus(status));
|
|
807
|
+
printVerificationBackupSummary(status);
|
|
808
|
+
if (backupIssue.message) console.log(`Backup issue: ${backupIssue.message}`);
|
|
809
|
+
if (verbose) {
|
|
810
|
+
console.log("Diagnostics:");
|
|
811
|
+
printVerificationIdentity(status);
|
|
812
|
+
if (status.serverDeviceKnown !== void 0) console.log(`Device present on server: ${yesNoUnknown(status.serverDeviceKnown ?? null)}`);
|
|
813
|
+
printVerificationTrustDiagnostics(status);
|
|
814
|
+
printVerificationBackupStatus(status);
|
|
815
|
+
console.log(`Recovery key stored: ${status.recoveryKeyStored ? "yes" : "no"}`);
|
|
816
|
+
printTimestamp("Recovery key created at", status.recoveryKeyCreatedAt);
|
|
817
|
+
console.log(`Pending verifications: ${status.pendingVerifications}`);
|
|
818
|
+
} else console.log(`Recovery key stored: ${status.recoveryKeyStored ? "yes" : "no"}`);
|
|
819
|
+
printVerificationGuidance(status, accountId);
|
|
820
|
+
}
|
|
821
|
+
function printMatrixEncryptionSetupResult(result, verbose = false) {
|
|
822
|
+
printAccountLabel(result.accountId);
|
|
823
|
+
console.log(`Encryption config: ${result.encryptionChanged ? "enabled" : "already enabled"} at ${formatMatrixCliText(result.configPath)}`);
|
|
824
|
+
console.log(`Bootstrap success: ${result.bootstrap.success ? "yes" : "no"}`);
|
|
825
|
+
if (result.bootstrap.error) console.log(`Bootstrap error: ${formatMatrixCliText(result.bootstrap.error)}`);
|
|
826
|
+
console.log(`Verified by owner: ${result.status.verified ? "yes" : "no"}`);
|
|
827
|
+
printVerificationBackupSummary(result.status);
|
|
828
|
+
if (verbose) {
|
|
829
|
+
printVerificationIdentity(result.status);
|
|
830
|
+
printVerificationTrustDiagnostics(result.status);
|
|
831
|
+
printVerificationBackupStatus(result.status);
|
|
832
|
+
console.log(`Recovery key stored: ${result.status.recoveryKeyStored ? "yes" : "no"}`);
|
|
833
|
+
printTimestamp("Recovery key created at", result.status.recoveryKeyCreatedAt);
|
|
834
|
+
console.log(`Pending verifications: ${result.status.pendingVerifications}`);
|
|
835
|
+
}
|
|
836
|
+
printVerificationGuidance(result.status, result.accountId);
|
|
837
|
+
}
|
|
838
|
+
function registerMatrixCli(params) {
|
|
839
|
+
const root = params.program.command("matrix").description("Matrix channel utilities").addHelpText("after", () => "\nDocs: https://docs.openclaw.ai/channels/matrix\n");
|
|
840
|
+
root.command("account").description("Manage matrix channel accounts").command("add").description("Add or update a matrix account (wrapper around channel setup)").option("--account <id>", "Account ID (default: normalized --name, else default)").option("--name <name>", "Optional display name for this account").option("--avatar-url <url>", "Optional Matrix avatar URL (mxc:// or http(s) URL)").option("--homeserver <url>", "Matrix homeserver URL").option("--proxy <url>", "Optional HTTP(S) proxy URL for Matrix requests").option("--allow-private-network", "Allow Matrix homeserver traffic to private/internal hosts for this account").option("--user-id <id>", "Matrix user ID").option("--access-token <token>", "Matrix access token").option("--password <password>", "Matrix password").option("--device-name <name>", "Matrix device display name").option("--initial-sync-limit <n>", "Matrix initial sync limit").option("--enable-e2ee", "Enable Matrix end-to-end encryption and bootstrap verification").option("--encryption", "Alias for --enable-e2ee").option("--use-env", "Use MATRIX_* env vars (or MATRIX_<ACCOUNT_ID>_* for non-default accounts)").option("--verbose", "Show setup details").option("--json", "Output as JSON").action(async (options) => {
|
|
841
|
+
await runMatrixCliCommand({
|
|
842
|
+
verbose: options.verbose === true,
|
|
843
|
+
json: options.json === true,
|
|
844
|
+
run: async () => await addMatrixAccount({
|
|
845
|
+
account: options.account,
|
|
846
|
+
name: options.name,
|
|
847
|
+
avatarUrl: options.avatarUrl,
|
|
848
|
+
homeserver: options.homeserver,
|
|
849
|
+
proxy: options.proxy,
|
|
850
|
+
allowPrivateNetwork: options.allowPrivateNetwork === true,
|
|
851
|
+
userId: options.userId,
|
|
852
|
+
accessToken: options.accessToken,
|
|
853
|
+
password: options.password,
|
|
854
|
+
deviceName: options.deviceName,
|
|
855
|
+
initialSyncLimit: options.initialSyncLimit,
|
|
856
|
+
enableEncryption: options.enableE2ee === true || options.encryption === true,
|
|
857
|
+
useEnv: options.useEnv === true
|
|
858
|
+
}),
|
|
859
|
+
onText: (result) => {
|
|
860
|
+
console.log(`Saved matrix account: ${formatMatrixCliText(result.accountId)}`);
|
|
861
|
+
console.log(`Config path: ${formatMatrixCliText(result.configPath)}`);
|
|
862
|
+
console.log(`Credentials source: ${result.useEnv ? "MATRIX_* / MATRIX_<ACCOUNT_ID>_* env vars" : "inline config"}`);
|
|
863
|
+
console.log(`Encryption: ${result.encryptionEnabled ? "enabled" : "disabled"}`);
|
|
864
|
+
if (result.verificationBootstrap.attempted) if (result.verificationBootstrap.success) {
|
|
865
|
+
console.log("Matrix verification bootstrap: complete");
|
|
866
|
+
printTimestamp("Recovery key created at", result.verificationBootstrap.recoveryKeyCreatedAt);
|
|
867
|
+
if (result.verificationBootstrap.backupVersion) console.log(`Backup version: ${formatMatrixCliText(result.verificationBootstrap.backupVersion)}`);
|
|
868
|
+
} else console.error(`Matrix verification bootstrap warning: ${formatMatrixCliText(result.verificationBootstrap.error)}`);
|
|
869
|
+
if (result.deviceHealth.error) console.error(`Matrix device health warning: ${formatMatrixCliText(result.deviceHealth.error)}`);
|
|
870
|
+
else if (result.deviceHealth.staleDaoCoreDeviceIds.length > 0) {
|
|
871
|
+
const staleDeviceIds = result.deviceHealth.staleDaoCoreDeviceIds.map((deviceId) => formatMatrixCliText(deviceId)).join(", ");
|
|
872
|
+
console.log(`Matrix device hygiene warning: stale DaoCore devices detected (${staleDeviceIds}). Run ${formatMatrixCliCommand("devices prune-stale", result.accountId)}.`);
|
|
873
|
+
}
|
|
874
|
+
if (result.profile.attempted) if (result.profile.error) console.error(`Profile sync warning: ${formatMatrixCliText(result.profile.error)}`);
|
|
875
|
+
else {
|
|
876
|
+
console.log(`Profile sync: name ${result.profile.displayNameUpdated ? "updated" : "unchanged"}, avatar ${result.profile.avatarUpdated ? "updated" : "unchanged"}`);
|
|
877
|
+
if (result.profile.convertedAvatarFromHttp && result.profile.resolvedAvatarUrl) console.log(`Avatar converted and saved as: ${formatMatrixCliText(result.profile.resolvedAvatarUrl)}`);
|
|
878
|
+
}
|
|
879
|
+
const bindHint = `daocore agents bind --agent <id> --bind matrix:${result.accountId}`;
|
|
880
|
+
console.log(`Bind this account to an agent: ${bindHint}`);
|
|
881
|
+
},
|
|
882
|
+
errorPrefix: "Account setup failed"
|
|
883
|
+
});
|
|
884
|
+
});
|
|
885
|
+
root.command("profile").description("Manage Matrix bot profile").command("set").description("Update Matrix profile display name and/or avatar").option("--account <id>", "Account ID (for multi-account setups)").option("--name <name>", "Profile display name").option("--avatar-url <url>", "Profile avatar URL (mxc:// or http(s) URL)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
886
|
+
await runMatrixCliCommand({
|
|
887
|
+
verbose: options.verbose === true,
|
|
888
|
+
json: options.json === true,
|
|
889
|
+
run: async () => await setMatrixProfile({
|
|
890
|
+
account: options.account,
|
|
891
|
+
name: options.name,
|
|
892
|
+
avatarUrl: options.avatarUrl
|
|
893
|
+
}),
|
|
894
|
+
onText: (result) => {
|
|
895
|
+
printAccountLabel(result.accountId);
|
|
896
|
+
console.log(`Config path: ${result.configPath}`);
|
|
897
|
+
console.log(`Profile update: name ${result.profile.displayNameUpdated ? "updated" : "unchanged"}, avatar ${result.profile.avatarUpdated ? "updated" : "unchanged"}`);
|
|
898
|
+
if (result.profile.convertedAvatarFromHttp && result.avatarUrl) console.log(`Avatar converted and saved as: ${formatMatrixCliText(result.avatarUrl)}`);
|
|
899
|
+
},
|
|
900
|
+
errorPrefix: "Profile update failed"
|
|
901
|
+
});
|
|
902
|
+
});
|
|
903
|
+
const direct = root.command("direct").description("Inspect and repair Matrix direct-room state");
|
|
904
|
+
direct.command("inspect").description("Inspect direct-room mappings for a Matrix user").requiredOption("--user-id <id>", "Peer Matrix user ID").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
905
|
+
const accountId = resolveMatrixCliAccountId(options.account);
|
|
906
|
+
await runMatrixCliCommand({
|
|
907
|
+
verbose: options.verbose === true,
|
|
908
|
+
json: options.json === true,
|
|
909
|
+
run: async () => await inspectMatrixDirectRoom({
|
|
910
|
+
accountId,
|
|
911
|
+
userId: options.userId
|
|
912
|
+
}),
|
|
913
|
+
onText: (result) => {
|
|
914
|
+
printDirectRoomInspection(result);
|
|
915
|
+
},
|
|
916
|
+
errorPrefix: "Direct room inspection failed"
|
|
917
|
+
});
|
|
918
|
+
});
|
|
919
|
+
direct.command("repair").description("Repair Matrix direct-room mappings for a Matrix user").requiredOption("--user-id <id>", "Peer Matrix user ID").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
920
|
+
const accountId = resolveMatrixCliAccountId(options.account);
|
|
921
|
+
await runMatrixCliCommand({
|
|
922
|
+
verbose: options.verbose === true,
|
|
923
|
+
json: options.json === true,
|
|
924
|
+
run: async () => await repairMatrixDirectRoom({
|
|
925
|
+
accountId,
|
|
926
|
+
userId: options.userId
|
|
927
|
+
}),
|
|
928
|
+
onText: (result, verbose) => {
|
|
929
|
+
printDirectRoomInspection(result);
|
|
930
|
+
console.log(`Encrypted room creation: ${result.encrypted ? "enabled" : "disabled"}`);
|
|
931
|
+
console.log(`Created room: ${formatMatrixCliText(result.createdRoomId, "none")}`);
|
|
932
|
+
console.log(`m.direct updated: ${result.changed ? "yes" : "no"}`);
|
|
933
|
+
if (verbose) {
|
|
934
|
+
console.log(`m.direct before: ${formatMatrixCliText(JSON.stringify(result.directContentBefore[result.remoteUserId] ?? []))}`);
|
|
935
|
+
console.log(`m.direct after: ${formatMatrixCliText(JSON.stringify(result.directContentAfter[result.remoteUserId] ?? []))}`);
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
errorPrefix: "Direct room repair failed"
|
|
939
|
+
});
|
|
940
|
+
});
|
|
941
|
+
root.command("encryption").description("Set up Matrix end-to-end encryption").command("setup").description("Enable Matrix E2EE, bootstrap verification, and print next steps").option("--account <id>", "Account ID (for multi-account setups)").option("--recovery-key <key>", "Recovery key to apply before bootstrap").option("--force-reset-cross-signing", "Force reset cross-signing identity before bootstrap").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
942
|
+
await runMatrixCliCommand({
|
|
943
|
+
verbose: options.verbose === true,
|
|
944
|
+
json: options.json === true,
|
|
945
|
+
run: async () => await setupMatrixEncryption({
|
|
946
|
+
account: options.account,
|
|
947
|
+
recoveryKey: options.recoveryKey,
|
|
948
|
+
forceResetCrossSigning: options.forceResetCrossSigning === true
|
|
949
|
+
}),
|
|
950
|
+
onText: (result, verbose) => {
|
|
951
|
+
printMatrixEncryptionSetupResult(result, verbose);
|
|
952
|
+
},
|
|
953
|
+
onJson: (result) => ({
|
|
954
|
+
success: result.bootstrap.success,
|
|
955
|
+
...result
|
|
956
|
+
}),
|
|
957
|
+
shouldFail: (result) => !result.bootstrap.success,
|
|
958
|
+
errorPrefix: "Encryption setup failed",
|
|
959
|
+
onJsonError: (message) => ({
|
|
960
|
+
success: false,
|
|
961
|
+
error: message
|
|
962
|
+
})
|
|
963
|
+
});
|
|
964
|
+
});
|
|
965
|
+
const verify = root.command("verify").description("Device verification for Matrix E2EE");
|
|
966
|
+
verify.command("list").description("List pending Matrix verification requests").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
967
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
968
|
+
await runMatrixCliCommand({
|
|
969
|
+
verbose: options.verbose === true,
|
|
970
|
+
json: options.json === true,
|
|
971
|
+
run: async () => await listMatrixVerifications({
|
|
972
|
+
accountId,
|
|
973
|
+
cfg
|
|
974
|
+
}),
|
|
975
|
+
onText: (summaries) => {
|
|
976
|
+
printAccountLabel(accountId);
|
|
977
|
+
printMatrixVerificationSummaries(summaries);
|
|
978
|
+
},
|
|
979
|
+
errorPrefix: "Verification listing failed"
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
verify.command("self").description("Interactively self-verify this Matrix device").option("--account <id>", "Account ID (for multi-account setups)").option("--timeout-ms <ms>", "How long to wait for the other Matrix client").option("--verbose", "Show detailed diagnostics").action(async (options) => {
|
|
983
|
+
await runMatrixCliSelfVerificationCommand(options);
|
|
984
|
+
});
|
|
985
|
+
verify.command("request").description("Request Matrix device verification from another Matrix client").option("--account <id>", "Account ID (for multi-account setups)").option("--own-user", "Request self-verification for this Matrix account").option("--user-id <id>", "Matrix user ID to verify").option("--device-id <id>", "Matrix device ID to verify").option("--room-id <id>", "Matrix direct-message room ID for verification").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
986
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
987
|
+
await runMatrixCliCommand({
|
|
988
|
+
verbose: options.verbose === true,
|
|
989
|
+
json: options.json === true,
|
|
990
|
+
run: async () => {
|
|
991
|
+
if (options.ownUser === true && (options.userId || options.deviceId || options.roomId)) throw new Error("--own-user cannot be combined with --user-id, --device-id, or --room-id");
|
|
992
|
+
return await requestMatrixVerification({
|
|
993
|
+
accountId,
|
|
994
|
+
cfg,
|
|
995
|
+
ownUser: options.ownUser === true ? true : void 0,
|
|
996
|
+
userId: options.userId,
|
|
997
|
+
deviceId: options.deviceId,
|
|
998
|
+
roomId: options.roomId
|
|
999
|
+
});
|
|
1000
|
+
},
|
|
1001
|
+
onText: (summary) => {
|
|
1002
|
+
printAccountLabel(accountId);
|
|
1003
|
+
printMatrixVerificationSummary(summary);
|
|
1004
|
+
printMatrixVerificationRequestGuidance(summary, accountId);
|
|
1005
|
+
},
|
|
1006
|
+
errorPrefix: "Verification request failed"
|
|
1007
|
+
});
|
|
1008
|
+
});
|
|
1009
|
+
verify.command("accept <id>").description("Accept an inbound Matrix verification request").option("--account <id>", "Account ID (for multi-account setups)").option("--user-id <id>", "Matrix user ID for DM verification follow-up").option("--room-id <id>", "Matrix direct-message room ID for verification follow-up").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (id, options) => {
|
|
1010
|
+
await runMatrixCliVerificationSummaryCommand({
|
|
1011
|
+
options,
|
|
1012
|
+
run: async (accountId, cfg) => await acceptMatrixVerification(id, {
|
|
1013
|
+
accountId,
|
|
1014
|
+
cfg,
|
|
1015
|
+
...matrixCliVerificationDmLookupOptions(options)
|
|
1016
|
+
}),
|
|
1017
|
+
afterText: (summary, accountId) => {
|
|
1018
|
+
printGuidance([`Run ${formatMatrixVerificationFollowupCommand({
|
|
1019
|
+
action: "start",
|
|
1020
|
+
requestId: formatMatrixVerificationCommandId(summary),
|
|
1021
|
+
accountId,
|
|
1022
|
+
dmParts: formatMatrixVerificationPreferredDmFollowupParts(summary, options)
|
|
1023
|
+
})} to start SAS verification.`]);
|
|
1024
|
+
},
|
|
1025
|
+
errorPrefix: "Verification accept failed"
|
|
1026
|
+
});
|
|
1027
|
+
});
|
|
1028
|
+
verify.command("start <id>").description("Start SAS verification for a Matrix verification request").option("--account <id>", "Account ID (for multi-account setups)").option("--user-id <id>", "Matrix user ID for DM verification follow-up").option("--room-id <id>", "Matrix direct-message room ID for verification follow-up").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (id, options) => {
|
|
1029
|
+
await runMatrixCliVerificationSummaryCommand({
|
|
1030
|
+
options,
|
|
1031
|
+
run: async (accountId, cfg) => await startMatrixVerification(id, {
|
|
1032
|
+
accountId,
|
|
1033
|
+
cfg,
|
|
1034
|
+
method: "sas",
|
|
1035
|
+
...matrixCliVerificationDmLookupOptions(options)
|
|
1036
|
+
}),
|
|
1037
|
+
afterText: (summary, accountId) => printMatrixVerificationSasGuidance(formatMatrixVerificationCommandId(summary), accountId, formatMatrixVerificationPreferredDmFollowupParts(summary, options)),
|
|
1038
|
+
errorPrefix: "Verification start failed"
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
verify.command("sas <id>").description("Show SAS emoji or decimals for a Matrix verification request").option("--account <id>", "Account ID (for multi-account setups)").option("--user-id <id>", "Matrix user ID for DM verification follow-up").option("--room-id <id>", "Matrix direct-message room ID for verification follow-up").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (id, options) => {
|
|
1042
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1043
|
+
await runMatrixCliCommand({
|
|
1044
|
+
verbose: options.verbose === true,
|
|
1045
|
+
json: options.json === true,
|
|
1046
|
+
run: async () => await getMatrixVerificationSas(id, {
|
|
1047
|
+
accountId,
|
|
1048
|
+
cfg,
|
|
1049
|
+
...matrixCliVerificationDmLookupOptions(options)
|
|
1050
|
+
}),
|
|
1051
|
+
onText: (sas) => {
|
|
1052
|
+
const requestId = formatMatrixCliText(id);
|
|
1053
|
+
printAccountLabel(accountId);
|
|
1054
|
+
console.log(`Verification id: ${requestId}`);
|
|
1055
|
+
printMatrixVerificationSas(sas);
|
|
1056
|
+
printMatrixVerificationSasGuidance(requestId, accountId, formatMatrixVerificationOptionsDmFollowupParts(options));
|
|
1057
|
+
},
|
|
1058
|
+
errorPrefix: "Verification SAS lookup failed"
|
|
1059
|
+
});
|
|
1060
|
+
});
|
|
1061
|
+
verify.command("confirm-sas <id>").description("Confirm matching SAS emoji or decimals for a Matrix verification request").option("--account <id>", "Account ID (for multi-account setups)").option("--user-id <id>", "Matrix user ID for DM verification follow-up").option("--room-id <id>", "Matrix direct-message room ID for verification follow-up").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (id, options) => {
|
|
1062
|
+
await runMatrixCliVerificationSummaryCommand({
|
|
1063
|
+
options,
|
|
1064
|
+
run: async (accountId, cfg) => await confirmMatrixVerificationSas(id, {
|
|
1065
|
+
accountId,
|
|
1066
|
+
cfg,
|
|
1067
|
+
...matrixCliVerificationDmLookupOptions(options)
|
|
1068
|
+
}),
|
|
1069
|
+
errorPrefix: "Verification SAS confirm failed"
|
|
1070
|
+
});
|
|
1071
|
+
});
|
|
1072
|
+
verify.command("mismatch-sas <id>").description("Reject a Matrix SAS verification when the emoji or decimals do not match").option("--account <id>", "Account ID (for multi-account setups)").option("--user-id <id>", "Matrix user ID for DM verification follow-up").option("--room-id <id>", "Matrix direct-message room ID for verification follow-up").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (id, options) => {
|
|
1073
|
+
await runMatrixCliVerificationSummaryCommand({
|
|
1074
|
+
options,
|
|
1075
|
+
run: async (accountId, cfg) => await mismatchMatrixVerificationSas(id, {
|
|
1076
|
+
accountId,
|
|
1077
|
+
cfg,
|
|
1078
|
+
...matrixCliVerificationDmLookupOptions(options)
|
|
1079
|
+
}),
|
|
1080
|
+
errorPrefix: "Verification SAS mismatch failed"
|
|
1081
|
+
});
|
|
1082
|
+
});
|
|
1083
|
+
verify.command("cancel <id>").description("Cancel a Matrix verification request").option("--account <id>", "Account ID (for multi-account setups)").option("--user-id <id>", "Matrix user ID for DM verification follow-up").option("--room-id <id>", "Matrix direct-message room ID for verification follow-up").option("--reason <text>", "Cancellation reason").option("--code <code>", "Matrix cancellation code").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (id, options) => {
|
|
1084
|
+
await runMatrixCliVerificationSummaryCommand({
|
|
1085
|
+
options,
|
|
1086
|
+
run: async (accountId, cfg) => await cancelMatrixVerification(id, {
|
|
1087
|
+
accountId,
|
|
1088
|
+
cfg,
|
|
1089
|
+
reason: options.reason,
|
|
1090
|
+
code: options.code,
|
|
1091
|
+
...matrixCliVerificationDmLookupOptions(options)
|
|
1092
|
+
}),
|
|
1093
|
+
errorPrefix: "Verification cancel failed"
|
|
1094
|
+
});
|
|
1095
|
+
});
|
|
1096
|
+
verify.command("status").description("Check Matrix device verification status").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--include-recovery-key", "Include stored recovery key in output").option("--allow-degraded-local-state", "Return best-effort diagnostics without preparing the Matrix account").option("--json", "Output as JSON").action(async (options) => {
|
|
1097
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1098
|
+
await runMatrixCliCommand({
|
|
1099
|
+
verbose: options.verbose === true,
|
|
1100
|
+
json: options.json === true,
|
|
1101
|
+
run: async () => await getMatrixVerificationStatus({
|
|
1102
|
+
accountId,
|
|
1103
|
+
cfg,
|
|
1104
|
+
includeRecoveryKey: options.includeRecoveryKey === true,
|
|
1105
|
+
...options.allowDegradedLocalState === true ? { readiness: "none" } : {}
|
|
1106
|
+
}),
|
|
1107
|
+
onText: (status, verbose) => {
|
|
1108
|
+
printAccountLabel(accountId);
|
|
1109
|
+
printVerificationStatus(status, verbose, accountId);
|
|
1110
|
+
},
|
|
1111
|
+
shouldFail: (status) => status.serverDeviceKnown === false,
|
|
1112
|
+
errorPrefix: "Error"
|
|
1113
|
+
});
|
|
1114
|
+
});
|
|
1115
|
+
const backup = verify.command("backup").description("Matrix room-key backup health and restore");
|
|
1116
|
+
backup.command("status").description("Show Matrix room-key backup status for this device").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
1117
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1118
|
+
await runMatrixCliCommand({
|
|
1119
|
+
verbose: options.verbose === true,
|
|
1120
|
+
json: options.json === true,
|
|
1121
|
+
run: async () => await getMatrixRoomKeyBackupStatus({
|
|
1122
|
+
accountId,
|
|
1123
|
+
cfg
|
|
1124
|
+
}),
|
|
1125
|
+
onText: (status, verbose) => {
|
|
1126
|
+
printAccountLabel(accountId);
|
|
1127
|
+
printBackupSummary(status);
|
|
1128
|
+
if (verbose) printBackupStatus(status);
|
|
1129
|
+
printBackupGuidance(status, accountId);
|
|
1130
|
+
},
|
|
1131
|
+
errorPrefix: "Backup status failed"
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
backup.command("reset").description("Delete the current server backup and create a fresh room-key backup baseline, repairing secret storage if needed for a durable reset").option("--account <id>", "Account ID (for multi-account setups)").option("--yes", "Confirm destructive backup reset", false).option("--rotate-recovery-key", "Create a new Matrix recovery key for the fresh backup").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
1135
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1136
|
+
await runMatrixCliCommand({
|
|
1137
|
+
verbose: options.verbose === true,
|
|
1138
|
+
json: options.json === true,
|
|
1139
|
+
run: async () => {
|
|
1140
|
+
if (options.yes !== true) throw new Error(`Refusing to reset Matrix room-key backup without --yes. If you accept losing unrecoverable history, re-run ${formatMatrixCliCommand("verify backup reset --yes", accountId)}.`);
|
|
1141
|
+
return await resetMatrixRoomKeyBackup({
|
|
1142
|
+
accountId,
|
|
1143
|
+
cfg,
|
|
1144
|
+
rotateRecoveryKey: options.rotateRecoveryKey === true
|
|
1145
|
+
});
|
|
1146
|
+
},
|
|
1147
|
+
onText: (result, verbose) => {
|
|
1148
|
+
printAccountLabel(accountId);
|
|
1149
|
+
console.log(`Reset success: ${result.success ? "yes" : "no"}`);
|
|
1150
|
+
if (result.error) console.log(`Error: ${formatMatrixCliText(result.error)}`);
|
|
1151
|
+
console.log(`Previous backup version: ${formatMatrixCliText(result.previousVersion, "none")}`);
|
|
1152
|
+
console.log(`Deleted backup version: ${formatMatrixCliText(result.deletedVersion, "none")}`);
|
|
1153
|
+
console.log(`Current backup version: ${formatMatrixCliText(result.createdVersion, "none")}`);
|
|
1154
|
+
printBackupSummary(result.backup);
|
|
1155
|
+
if (verbose) {
|
|
1156
|
+
printTimestamp("Reset at", result.resetAt);
|
|
1157
|
+
printBackupStatus(result.backup);
|
|
1158
|
+
}
|
|
1159
|
+
printBackupGuidance(result.backup, accountId);
|
|
1160
|
+
},
|
|
1161
|
+
shouldFail: (result) => !result.success,
|
|
1162
|
+
errorPrefix: "Backup reset failed",
|
|
1163
|
+
onJsonError: (message) => ({
|
|
1164
|
+
success: false,
|
|
1165
|
+
error: message
|
|
1166
|
+
})
|
|
1167
|
+
});
|
|
1168
|
+
});
|
|
1169
|
+
backup.command("restore").description("Restore encrypted room keys from server backup").option("--account <id>", "Account ID (for multi-account setups)").option("--recovery-key <key>", "Optional recovery key to load before restoring (prefer --recovery-key-stdin)").option("--recovery-key-stdin", "Read the Matrix recovery key from stdin").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
1170
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1171
|
+
await runMatrixCliCommand({
|
|
1172
|
+
verbose: options.verbose === true,
|
|
1173
|
+
json: options.json === true,
|
|
1174
|
+
run: async () => await restoreMatrixRoomKeyBackup({
|
|
1175
|
+
accountId,
|
|
1176
|
+
cfg,
|
|
1177
|
+
recoveryKey: await resolveMatrixCliRecoveryKeyInput(options)
|
|
1178
|
+
}),
|
|
1179
|
+
onText: (result, verbose) => {
|
|
1180
|
+
printAccountLabel(accountId);
|
|
1181
|
+
console.log(`Restore success: ${result.success ? "yes" : "no"}`);
|
|
1182
|
+
if (result.error) console.log(`Error: ${formatMatrixCliText(result.error)}`);
|
|
1183
|
+
console.log(`Backup version: ${formatMatrixCliText(result.backupVersion, "none")}`);
|
|
1184
|
+
console.log(`Imported keys: ${result.imported}/${result.total}`);
|
|
1185
|
+
printBackupSummary(result.backup);
|
|
1186
|
+
if (verbose) {
|
|
1187
|
+
console.log(`Loaded key from secret storage: ${result.loadedFromSecretStorage ? "yes" : "no"}`);
|
|
1188
|
+
printTimestamp("Restored at", result.restoredAt);
|
|
1189
|
+
printBackupStatus(result.backup);
|
|
1190
|
+
}
|
|
1191
|
+
printBackupGuidance(result.backup, accountId, { recoveryKeyStored: result.loadedFromSecretStorage });
|
|
1192
|
+
},
|
|
1193
|
+
shouldFail: (result) => !result.success,
|
|
1194
|
+
errorPrefix: "Backup restore failed",
|
|
1195
|
+
onJsonError: (message) => ({
|
|
1196
|
+
success: false,
|
|
1197
|
+
error: message
|
|
1198
|
+
})
|
|
1199
|
+
});
|
|
1200
|
+
});
|
|
1201
|
+
verify.command("bootstrap").description("Bootstrap Matrix cross-signing and device verification state").option("--account <id>", "Account ID (for multi-account setups)").option("--recovery-key <key>", "Recovery key to apply before bootstrap (prefer --recovery-key-stdin)").option("--recovery-key-stdin", "Read the Matrix recovery key from stdin").option("--force-reset-cross-signing", "Force reset cross-signing identity before bootstrap").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
1202
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1203
|
+
await runMatrixCliCommand({
|
|
1204
|
+
verbose: options.verbose === true,
|
|
1205
|
+
json: options.json === true,
|
|
1206
|
+
run: async () => await bootstrapMatrixVerification({
|
|
1207
|
+
accountId,
|
|
1208
|
+
cfg,
|
|
1209
|
+
recoveryKey: await resolveMatrixCliRecoveryKeyInput(options),
|
|
1210
|
+
forceResetCrossSigning: options.forceResetCrossSigning === true
|
|
1211
|
+
}),
|
|
1212
|
+
onText: (result, verbose) => {
|
|
1213
|
+
printAccountLabel(accountId);
|
|
1214
|
+
console.log(`Bootstrap success: ${result.success ? "yes" : "no"}`);
|
|
1215
|
+
if (result.error) console.log(`Error: ${formatMatrixCliText(result.error)}`);
|
|
1216
|
+
console.log(`Verified by owner: ${result.verification.verified ? "yes" : "no"}`);
|
|
1217
|
+
printVerificationIdentity(result.verification);
|
|
1218
|
+
if (verbose) {
|
|
1219
|
+
printVerificationTrustDiagnostics(result.verification);
|
|
1220
|
+
console.log(`Cross-signing published: ${result.crossSigning.published ? "yes" : "no"} (master=${result.crossSigning.masterKeyPublished ? "yes" : "no"}, self=${result.crossSigning.selfSigningKeyPublished ? "yes" : "no"}, user=${result.crossSigning.userSigningKeyPublished ? "yes" : "no"})`);
|
|
1221
|
+
printVerificationBackupStatus(result.verification);
|
|
1222
|
+
printTimestamp("Recovery key created at", result.verification.recoveryKeyCreatedAt);
|
|
1223
|
+
console.log(`Pending verifications: ${result.pendingVerifications}`);
|
|
1224
|
+
} else {
|
|
1225
|
+
console.log(`Cross-signing published: ${result.crossSigning.published ? "yes" : "no"}`);
|
|
1226
|
+
printVerificationBackupSummary(result.verification);
|
|
1227
|
+
}
|
|
1228
|
+
printVerificationGuidance({
|
|
1229
|
+
...result.verification,
|
|
1230
|
+
pendingVerifications: result.pendingVerifications
|
|
1231
|
+
}, accountId);
|
|
1232
|
+
},
|
|
1233
|
+
shouldFail: (result) => !result.success,
|
|
1234
|
+
errorPrefix: "Verification bootstrap failed",
|
|
1235
|
+
onJsonError: (message) => ({
|
|
1236
|
+
success: false,
|
|
1237
|
+
error: message
|
|
1238
|
+
})
|
|
1239
|
+
});
|
|
1240
|
+
});
|
|
1241
|
+
verify.command("device [key]").description("Verify device using a Matrix recovery key").option("--account <id>", "Account ID (for multi-account setups)").option("--recovery-key-stdin", "Read the Matrix recovery key from stdin").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (key, options) => {
|
|
1242
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1243
|
+
await runMatrixCliCommand({
|
|
1244
|
+
verbose: options.verbose === true,
|
|
1245
|
+
json: options.json === true,
|
|
1246
|
+
run: async () => await verifyMatrixRecoveryKey(await requireMatrixCliRecoveryKeyInput({
|
|
1247
|
+
recoveryKey: key,
|
|
1248
|
+
recoveryKeyStdin: options.recoveryKeyStdin
|
|
1249
|
+
}), {
|
|
1250
|
+
accountId,
|
|
1251
|
+
cfg
|
|
1252
|
+
}),
|
|
1253
|
+
onText: (result, verbose) => {
|
|
1254
|
+
printAccountLabel(accountId);
|
|
1255
|
+
if (!result.success) {
|
|
1256
|
+
console.error(`Verification failed: ${formatMatrixCliText(result.error)}`);
|
|
1257
|
+
printVerificationIdentity(result);
|
|
1258
|
+
console.log(`Recovery key accepted: ${result.recoveryKeyAccepted ? "yes" : "no"}`);
|
|
1259
|
+
console.log(`Backup usable: ${result.backupUsable ? "yes" : "no"}`);
|
|
1260
|
+
console.log(`Device verified by owner: ${result.deviceOwnerVerified ? "yes" : "no"}`);
|
|
1261
|
+
printVerificationBackupSummary(result);
|
|
1262
|
+
if (verbose) {
|
|
1263
|
+
printVerificationTrustDiagnostics(result);
|
|
1264
|
+
printVerificationBackupStatus(result);
|
|
1265
|
+
printTimestamp("Recovery key created at", result.recoveryKeyCreatedAt);
|
|
1266
|
+
}
|
|
1267
|
+
printVerificationGuidance({
|
|
1268
|
+
...result,
|
|
1269
|
+
pendingVerifications: 0
|
|
1270
|
+
}, accountId);
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
console.log("Device verification completed successfully.");
|
|
1274
|
+
printVerificationIdentity(result);
|
|
1275
|
+
console.log(`Recovery key accepted: ${result.recoveryKeyAccepted ? "yes" : "no"}`);
|
|
1276
|
+
console.log(`Backup usable: ${result.backupUsable ? "yes" : "no"}`);
|
|
1277
|
+
console.log(`Device verified by owner: ${result.deviceOwnerVerified ? "yes" : "no"}`);
|
|
1278
|
+
printVerificationBackupSummary(result);
|
|
1279
|
+
if (verbose) {
|
|
1280
|
+
printVerificationTrustDiagnostics(result);
|
|
1281
|
+
printVerificationBackupStatus(result);
|
|
1282
|
+
printTimestamp("Recovery key created at", result.recoveryKeyCreatedAt);
|
|
1283
|
+
printTimestamp("Verified at", result.verifiedAt);
|
|
1284
|
+
}
|
|
1285
|
+
printVerificationGuidance({
|
|
1286
|
+
...result,
|
|
1287
|
+
pendingVerifications: 0
|
|
1288
|
+
}, accountId);
|
|
1289
|
+
},
|
|
1290
|
+
shouldFail: (result) => !result.success,
|
|
1291
|
+
errorPrefix: "Verification failed",
|
|
1292
|
+
onJsonError: (message) => ({
|
|
1293
|
+
success: false,
|
|
1294
|
+
error: message
|
|
1295
|
+
})
|
|
1296
|
+
});
|
|
1297
|
+
});
|
|
1298
|
+
const devices = root.command("devices").description("Inspect and clean up Matrix devices");
|
|
1299
|
+
devices.command("list").description("List server-side Matrix devices for this account").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
1300
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1301
|
+
await runMatrixCliCommand({
|
|
1302
|
+
verbose: options.verbose === true,
|
|
1303
|
+
json: options.json === true,
|
|
1304
|
+
run: async () => await listMatrixOwnDevices({
|
|
1305
|
+
accountId,
|
|
1306
|
+
cfg
|
|
1307
|
+
}),
|
|
1308
|
+
onText: (result) => {
|
|
1309
|
+
printAccountLabel(accountId);
|
|
1310
|
+
printMatrixOwnDevices(result);
|
|
1311
|
+
},
|
|
1312
|
+
errorPrefix: "Device listing failed"
|
|
1313
|
+
});
|
|
1314
|
+
});
|
|
1315
|
+
devices.command("prune-stale").description("Delete stale DaoCore-managed devices for this account").option("--account <id>", "Account ID (for multi-account setups)").option("--verbose", "Show detailed diagnostics").option("--json", "Output as JSON").action(async (options) => {
|
|
1316
|
+
const { accountId, cfg } = resolveMatrixCliAccountContext(options.account);
|
|
1317
|
+
await runMatrixCliCommand({
|
|
1318
|
+
verbose: options.verbose === true,
|
|
1319
|
+
json: options.json === true,
|
|
1320
|
+
run: async () => await pruneMatrixStaleGatewayDevices({
|
|
1321
|
+
accountId,
|
|
1322
|
+
cfg
|
|
1323
|
+
}),
|
|
1324
|
+
onText: (result, verbose) => {
|
|
1325
|
+
printAccountLabel(accountId);
|
|
1326
|
+
console.log(`Deleted stale DaoCore devices: ${result.deletedDeviceIds.length ? result.deletedDeviceIds.map((deviceId) => formatMatrixCliText(deviceId)).join(", ") : "none"}`);
|
|
1327
|
+
console.log(`Current device: ${formatMatrixCliText(result.currentDeviceId)}`);
|
|
1328
|
+
console.log(`Remaining devices: ${result.remainingDevices.length}`);
|
|
1329
|
+
if (verbose) {
|
|
1330
|
+
console.log("Devices before cleanup:");
|
|
1331
|
+
printMatrixOwnDevices(result.before);
|
|
1332
|
+
console.log("Devices after cleanup:");
|
|
1333
|
+
printMatrixOwnDevices(result.remainingDevices);
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
errorPrefix: "Device cleanup failed"
|
|
1337
|
+
});
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
//#endregion
|
|
1341
|
+
export { registerMatrixCli };
|