@openclaw/matrix 2026.3.12 → 2026.5.9-beta.1
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/account-config-D2W-V1eQ.js +96 -0
- package/dist/account-selection-BWwIruri.js +158 -0
- package/dist/accounts-Bm90Rzvp.js +130 -0
- package/dist/active-client-uhlxdhEy.js +20 -0
- package/dist/allowlist-sTzpCn5d.js +68 -0
- package/dist/api.js +12 -0
- package/dist/approval-handler.runtime-DWTQfd4m.js +370 -0
- package/dist/approval-ids-DoC2z7tR.js +7 -0
- package/dist/approval-reaction-auth-DbcA1gGd.js +27 -0
- package/dist/approval-reactions-o2_tuH8D.js +162 -0
- package/dist/async-lock-uQfhfQIY.js +19 -0
- package/dist/auth-presence.js +26 -0
- package/dist/backup-health-Cabu_WQC.js +60 -0
- package/dist/channel-DJNir3Rb.js +1116 -0
- package/dist/channel-plugin-api.js +2 -0
- package/dist/channel.runtime-BQu0hTih.js +246 -0
- package/dist/cli-BmfTmg7x.js +1340 -0
- package/dist/cli-metadata-B-PCEzrA.js +22 -0
- package/dist/cli-metadata.js +2 -0
- package/dist/client-DkcXnm0X.js +25 -0
- package/dist/client-_hckQNGW.js +31 -0
- package/dist/client-bootstrap-Rb8oHvhH.js +114 -0
- package/dist/config--5-S2Akv.js +452 -0
- package/dist/config-paths-nsVaysCu.js +19 -0
- package/dist/config-schema-nPLpEgHl.js +200 -0
- package/dist/config-secret-input.runtime-DiKFehsE.js +2 -0
- package/dist/config-update-wZX-HLMn.js +143 -0
- package/dist/contract-api.js +9 -0
- package/dist/create-client-DCnqDaqd.js +64 -0
- package/dist/credentials-DV6fWXhC.js +56 -0
- package/dist/credentials-read-cmHgousK.js +112 -0
- package/dist/credentials-write.runtime-zniTq-Gr.js +17 -0
- package/dist/crypto-node.runtime-pihzdpY7.js +12 -0
- package/dist/crypto-runtime-ZI0zAtn3.js +1214 -0
- package/dist/deps-C6WqKY7m.js +235 -0
- package/dist/device-health-UVYpbA_W.js +16 -0
- package/dist/direct-management-DMMMgtTB.js +249 -0
- package/dist/direct-room-XkutHjES.js +76 -0
- package/dist/directory-live-DmOtMhyr.js +150 -0
- package/dist/doctor-C4__7c-U.js +153 -0
- package/dist/doctor-contract-D4-64QuJ.js +246 -0
- package/dist/doctor-contract-api.js +2 -0
- package/dist/draft-stream-BE2QevQQ.js +144 -0
- package/dist/encryption-guidance-BPi3A_m3.js +15 -0
- package/dist/env-auth-BJqGI8M6.js +63 -0
- package/dist/env-vars-C7uQCTKn.js +63 -0
- package/dist/errors-CTcpEDq-.js +17 -0
- package/dist/exec-approval-resolver-Bza9Dhlm.js +15 -0
- package/dist/exec-approvals-Crnh543m.js +196 -0
- package/dist/helper-api.js +4 -0
- package/dist/http-client-C7AeVJay.js +319 -0
- package/dist/index.js +46 -0
- package/dist/legacy-crypto-inspector-poDWldgy.js +41 -0
- package/dist/legacy-crypto-restore-Biw-w2ng.js +85 -0
- package/dist/logger-CnZRVrux.js +78 -0
- package/dist/logging-DZHSPP5N.js +99 -0
- package/dist/matrix-migration.runtime-WY6ffcrf.js +525 -0
- package/dist/media-text-DU6nWZuj.js +146 -0
- package/dist/messages-BpihMh82.js +140 -0
- package/dist/migration-snapshot-backup-DaCHTp8C.js +69 -0
- package/dist/migration-snapshot.runtime-CKHE3xF9.js +2 -0
- package/dist/monitor-C_81r_Ck.js +4125 -0
- package/dist/plugin-entry.handlers.runtime.js +51 -0
- package/dist/probe.runtime-BvAzYAIe.js +3 -0
- package/dist/profile-BlHu0wDX.js +111 -0
- package/dist/profile-update-DjeBNgIV.js +69 -0
- package/dist/reaction-common-ejrL19w-.js +71 -0
- package/dist/reaction-events-CiARZfjk.js +121 -0
- package/dist/record-shared-CHWJCTWf.js +2 -0
- package/dist/recovery-key-store-BTJ6jz5v.js +294 -0
- package/dist/resolve-targets-YtJnw1Tb.js +140 -0
- package/dist/resolver.runtime-D9piiGEl.js +5 -0
- package/dist/rolldown-runtime-DUslC3ob.js +14 -0
- package/dist/route-D6rg-iXN.js +161 -0
- package/dist/runtime-C6X4h_SJ.js +6 -0
- package/dist/runtime-Dog86njy.js +8 -0
- package/dist/runtime-api-BXWBFIqm.js +25 -0
- package/dist/runtime-api.js +25 -0
- package/dist/runtime-heavy-api.js +3 -0
- package/dist/runtime-setter-api.js +2 -0
- package/dist/sdk-B2vZA27-.js +1416 -0
- package/dist/secret-contract-DcrJWCQI.js +120 -0
- package/dist/secret-contract-api.js +2 -0
- package/dist/send-Bo0DU1ca.js +1200 -0
- package/dist/session-store-metadata-DI5SCofx.js +77 -0
- package/dist/setup-bootstrap-ImenBsMt.js +62 -0
- package/dist/setup-core-CfZy05oW.js +116 -0
- package/dist/setup-dm-policy-2-r1FrQh.js +194 -0
- package/dist/setup-entry.js +19 -0
- package/dist/setup-plugin-api.js +44 -0
- package/dist/setup-surface-CqT_o61M.js +540 -0
- package/dist/shared-CpMoYKm1.js +195 -0
- package/dist/startup-abort-56edvmbM.js +32 -0
- package/dist/startup-verification-Demyp0bP.js +132 -0
- package/dist/storage-paths-BJLdnCjV.js +52 -0
- package/dist/storage-tC3ujLiW.js +281 -0
- package/dist/subagent-hooks-DQbyqq9V.js +149 -0
- package/dist/subagent-hooks-api.js +23 -0
- package/dist/sync-state-C_beeevA.js +12 -0
- package/dist/target-ids-80nQ2gql.js +77 -0
- package/dist/test-api.js +4 -0
- package/dist/thread-binding-api-Cq_E-E1K.js +17 -0
- package/dist/thread-binding-api.js +2 -0
- package/dist/thread-bindings-B9mesxXk.js +352 -0
- package/dist/thread-bindings-runtime.js +2 -0
- package/dist/thread-bindings-shared-DK-d-oYX.js +97 -0
- package/dist/timeout-abort-signal-CtaIaP1v.js +2 -0
- package/dist/tool-actions.runtime-BIH49vRr.js +532 -0
- package/dist/url-validation-DiK9j7jz.js +36 -0
- package/dist/verification-CZ2rDeHL.js +345 -0
- package/openclaw.plugin.json +788 -1
- package/package.json +82 -16
- package/CHANGELOG.md +0 -98
- package/index.ts +0 -22
- package/src/actions.ts +0 -195
- package/src/channel.directory.test.ts +0 -154
- package/src/channel.ts +0 -461
- package/src/config-schema.test.ts +0 -26
- package/src/config-schema.ts +0 -62
- package/src/directory-live.test.ts +0 -85
- package/src/directory-live.ts +0 -209
- package/src/group-mentions.ts +0 -52
- package/src/matrix/accounts.test.ts +0 -131
- package/src/matrix/accounts.ts +0 -114
- package/src/matrix/actions/client.ts +0 -47
- package/src/matrix/actions/limits.test.ts +0 -15
- package/src/matrix/actions/limits.ts +0 -6
- package/src/matrix/actions/messages.ts +0 -126
- package/src/matrix/actions/pins.test.ts +0 -74
- package/src/matrix/actions/pins.ts +0 -84
- package/src/matrix/actions/reactions.test.ts +0 -109
- package/src/matrix/actions/reactions.ts +0 -102
- package/src/matrix/actions/room.ts +0 -85
- package/src/matrix/actions/summary.ts +0 -75
- package/src/matrix/actions/types.ts +0 -85
- package/src/matrix/actions.ts +0 -15
- package/src/matrix/active-client.ts +0 -32
- package/src/matrix/client/config.ts +0 -245
- package/src/matrix/client/create-client.ts +0 -125
- package/src/matrix/client/logging.ts +0 -46
- package/src/matrix/client/runtime.ts +0 -4
- package/src/matrix/client/shared.test.ts +0 -85
- package/src/matrix/client/shared.ts +0 -210
- package/src/matrix/client/startup.test.ts +0 -49
- package/src/matrix/client/startup.ts +0 -29
- package/src/matrix/client/storage.ts +0 -131
- package/src/matrix/client/types.ts +0 -34
- package/src/matrix/client-bootstrap.ts +0 -47
- package/src/matrix/client.test.ts +0 -56
- package/src/matrix/client.ts +0 -14
- package/src/matrix/credentials.ts +0 -125
- package/src/matrix/deps.test.ts +0 -74
- package/src/matrix/deps.ts +0 -126
- package/src/matrix/format.test.ts +0 -33
- package/src/matrix/format.ts +0 -22
- package/src/matrix/index.ts +0 -11
- package/src/matrix/monitor/access-policy.ts +0 -126
- package/src/matrix/monitor/allowlist.test.ts +0 -45
- package/src/matrix/monitor/allowlist.ts +0 -100
- package/src/matrix/monitor/auto-join.ts +0 -72
- package/src/matrix/monitor/direct.test.ts +0 -400
- package/src/matrix/monitor/direct.ts +0 -152
- package/src/matrix/monitor/events.test.ts +0 -172
- package/src/matrix/monitor/events.ts +0 -168
- package/src/matrix/monitor/handler.body-for-agent.test.ts +0 -196
- package/src/matrix/monitor/handler.ts +0 -767
- package/src/matrix/monitor/inbound-body.test.ts +0 -73
- package/src/matrix/monitor/inbound-body.ts +0 -28
- package/src/matrix/monitor/index.test.ts +0 -18
- package/src/matrix/monitor/index.ts +0 -414
- package/src/matrix/monitor/location.ts +0 -100
- package/src/matrix/monitor/media.test.ts +0 -86
- package/src/matrix/monitor/media.ts +0 -118
- package/src/matrix/monitor/mentions.test.ts +0 -154
- package/src/matrix/monitor/mentions.ts +0 -62
- package/src/matrix/monitor/replies.test.ts +0 -184
- package/src/matrix/monitor/replies.ts +0 -124
- package/src/matrix/monitor/room-info.ts +0 -55
- package/src/matrix/monitor/rooms.test.ts +0 -124
- package/src/matrix/monitor/rooms.ts +0 -47
- package/src/matrix/monitor/threads.ts +0 -68
- package/src/matrix/monitor/types.ts +0 -39
- package/src/matrix/poll-types.test.ts +0 -21
- package/src/matrix/poll-types.ts +0 -167
- package/src/matrix/probe.ts +0 -69
- package/src/matrix/sdk-runtime.ts +0 -18
- package/src/matrix/send/client.ts +0 -99
- package/src/matrix/send/formatting.ts +0 -93
- package/src/matrix/send/media.ts +0 -230
- package/src/matrix/send/targets.test.ts +0 -98
- package/src/matrix/send/targets.ts +0 -150
- package/src/matrix/send/types.ts +0 -110
- package/src/matrix/send-queue.test.ts +0 -154
- package/src/matrix/send-queue.ts +0 -28
- package/src/matrix/send.test.ts +0 -326
- package/src/matrix/send.ts +0 -267
- package/src/onboarding.ts +0 -462
- package/src/outbound.test.ts +0 -159
- package/src/outbound.ts +0 -58
- package/src/resolve-targets.test.ts +0 -67
- package/src/resolve-targets.ts +0 -125
- package/src/runtime.ts +0 -6
- package/src/secret-input.ts +0 -13
- package/src/tool-actions.ts +0 -164
- package/src/types.ts +0 -118
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { t as getMatrixScopedEnvVarNames } from "./env-vars-C7uQCTKn.js";
|
|
2
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
|
+
import { collectSecretInputAssignment, getChannelSurface, hasConfiguredSecretInputValue, hasOwnProperty, normalizeSecretStringValue } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
4
|
+
//#region extensions/matrix/src/secret-contract.ts
|
|
5
|
+
const secretTargetRegistryEntries = [
|
|
6
|
+
{
|
|
7
|
+
id: "channels.matrix.accounts.*.accessToken",
|
|
8
|
+
targetType: "channels.matrix.accounts.*.accessToken",
|
|
9
|
+
configFile: "openclaw.json",
|
|
10
|
+
pathPattern: "channels.matrix.accounts.*.accessToken",
|
|
11
|
+
secretShape: "secret_input",
|
|
12
|
+
expectedResolvedValue: "string",
|
|
13
|
+
includeInPlan: true,
|
|
14
|
+
includeInConfigure: true,
|
|
15
|
+
includeInAudit: true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "channels.matrix.accounts.*.password",
|
|
19
|
+
targetType: "channels.matrix.accounts.*.password",
|
|
20
|
+
configFile: "openclaw.json",
|
|
21
|
+
pathPattern: "channels.matrix.accounts.*.password",
|
|
22
|
+
secretShape: "secret_input",
|
|
23
|
+
expectedResolvedValue: "string",
|
|
24
|
+
includeInPlan: true,
|
|
25
|
+
includeInConfigure: true,
|
|
26
|
+
includeInAudit: true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "channels.matrix.accessToken",
|
|
30
|
+
targetType: "channels.matrix.accessToken",
|
|
31
|
+
configFile: "openclaw.json",
|
|
32
|
+
pathPattern: "channels.matrix.accessToken",
|
|
33
|
+
secretShape: "secret_input",
|
|
34
|
+
expectedResolvedValue: "string",
|
|
35
|
+
includeInPlan: true,
|
|
36
|
+
includeInConfigure: true,
|
|
37
|
+
includeInAudit: true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "channels.matrix.password",
|
|
41
|
+
targetType: "channels.matrix.password",
|
|
42
|
+
configFile: "openclaw.json",
|
|
43
|
+
pathPattern: "channels.matrix.password",
|
|
44
|
+
secretShape: "secret_input",
|
|
45
|
+
expectedResolvedValue: "string",
|
|
46
|
+
includeInPlan: true,
|
|
47
|
+
includeInConfigure: true,
|
|
48
|
+
includeInAudit: true
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
function collectRuntimeConfigAssignments(params) {
|
|
52
|
+
const resolved = getChannelSurface(params.config, "matrix");
|
|
53
|
+
if (!resolved) return;
|
|
54
|
+
const { channel: matrix, surface } = resolved;
|
|
55
|
+
const envAccessTokenConfigured = normalizeSecretStringValue(params.context.env.MATRIX_ACCESS_TOKEN).length > 0;
|
|
56
|
+
const defaultScopedAccessTokenConfigured = normalizeSecretStringValue(params.context.env[getMatrixScopedEnvVarNames("default").accessToken]).length > 0;
|
|
57
|
+
const defaultAccountAccessTokenConfigured = surface.accounts.some(({ accountId, account }) => normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID && hasConfiguredSecretInputValue(account.accessToken, params.defaults));
|
|
58
|
+
const baseAccessTokenConfigured = hasConfiguredSecretInputValue(matrix.accessToken, params.defaults);
|
|
59
|
+
collectSecretInputAssignment({
|
|
60
|
+
value: matrix.accessToken,
|
|
61
|
+
path: "channels.matrix.accessToken",
|
|
62
|
+
expected: "string",
|
|
63
|
+
defaults: params.defaults,
|
|
64
|
+
context: params.context,
|
|
65
|
+
active: surface.channelEnabled,
|
|
66
|
+
inactiveReason: "Matrix channel is disabled.",
|
|
67
|
+
apply: (value) => {
|
|
68
|
+
matrix.accessToken = value;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
collectSecretInputAssignment({
|
|
72
|
+
value: matrix.password,
|
|
73
|
+
path: "channels.matrix.password",
|
|
74
|
+
expected: "string",
|
|
75
|
+
defaults: params.defaults,
|
|
76
|
+
context: params.context,
|
|
77
|
+
active: surface.channelEnabled && !(baseAccessTokenConfigured || envAccessTokenConfigured || defaultScopedAccessTokenConfigured || defaultAccountAccessTokenConfigured),
|
|
78
|
+
inactiveReason: "Matrix channel is disabled or access-token auth is configured for the default Matrix account.",
|
|
79
|
+
apply: (value) => {
|
|
80
|
+
matrix.password = value;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
if (!surface.hasExplicitAccounts) return;
|
|
84
|
+
for (const { accountId, account, enabled } of surface.accounts) {
|
|
85
|
+
if (hasOwnProperty(account, "accessToken")) collectSecretInputAssignment({
|
|
86
|
+
value: account.accessToken,
|
|
87
|
+
path: `channels.matrix.accounts.${accountId}.accessToken`,
|
|
88
|
+
expected: "string",
|
|
89
|
+
defaults: params.defaults,
|
|
90
|
+
context: params.context,
|
|
91
|
+
active: enabled,
|
|
92
|
+
inactiveReason: "Matrix account is disabled.",
|
|
93
|
+
apply: (value) => {
|
|
94
|
+
account.accessToken = value;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
if (!hasOwnProperty(account, "password")) continue;
|
|
98
|
+
const accountAccessTokenConfigured = hasConfiguredSecretInputValue(account.accessToken, params.defaults);
|
|
99
|
+
const scopedEnvAccessTokenConfigured = normalizeSecretStringValue(params.context.env[getMatrixScopedEnvVarNames(accountId).accessToken]).length > 0;
|
|
100
|
+
const inheritedDefaultAccountAccessTokenConfigured = normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID && (baseAccessTokenConfigured || envAccessTokenConfigured);
|
|
101
|
+
collectSecretInputAssignment({
|
|
102
|
+
value: account.password,
|
|
103
|
+
path: `channels.matrix.accounts.${accountId}.password`,
|
|
104
|
+
expected: "string",
|
|
105
|
+
defaults: params.defaults,
|
|
106
|
+
context: params.context,
|
|
107
|
+
active: enabled && !(accountAccessTokenConfigured || scopedEnvAccessTokenConfigured || inheritedDefaultAccountAccessTokenConfigured),
|
|
108
|
+
inactiveReason: "Matrix account is disabled or this account has an accessToken configured.",
|
|
109
|
+
apply: (value) => {
|
|
110
|
+
account.password = value;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const channelSecrets = {
|
|
116
|
+
secretTargetRegistryEntries,
|
|
117
|
+
collectRuntimeConfigAssignments
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|