@kodelyth/matrix 2026.5.39 → 2026.6.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-selection-Y50DNJ2l.js +158 -0
- package/dist/active-client-CmFdvPdO.js +20 -0
- package/dist/api.js +12 -0
- package/dist/approval-handler.runtime-BIi4fL0R.js +377 -0
- package/dist/approval-ids-BGHK7PnZ.js +7 -0
- package/dist/approval-reaction-auth-CL0-nCNV.js +27 -0
- package/dist/approval-reactions-nDm2x-K5.js +162 -0
- package/dist/async-lock-SsmtFXtt.js +19 -0
- package/dist/auth-presence.js +26 -0
- package/dist/backup-health-3BHbHxyd.js +60 -0
- package/dist/channel-C0kCyTNB.js +1380 -0
- package/dist/channel-plugin-api.js +2 -0
- package/dist/channel.runtime-CdrdEN-0.js +250 -0
- package/dist/cli-FtY6Nuzw.js +1338 -0
- package/dist/cli-metadata-Dkwua7CB.js +22 -0
- package/dist/cli-metadata.js +2 -0
- package/dist/client-BnohYygh.js +25 -0
- package/dist/client-PhrTwuC4.js +30 -0
- package/dist/client-bootstrap-Mcj8ChJ5.js +114 -0
- package/dist/config-paths-DVvt6vM3.js +114 -0
- package/dist/config-schema-BMGOlhdI.js +308 -0
- package/dist/config-secret-input.runtime-Dv_4Br_f.js +2 -0
- package/dist/contract-api.js +8 -0
- package/dist/create-client-J0htTaRj.js +64 -0
- package/dist/credentials-B7GsBbgQ.js +56 -0
- package/dist/credentials-read-8fE4qoWs.js +112 -0
- package/dist/credentials-write.runtime-BibplB4Y.js +17 -0
- package/dist/crypto-node.runtime-D9qxgRPa.js +12 -0
- package/dist/crypto-runtime-1pKW4O2F.js +1214 -0
- package/dist/deps-DVpDS81G.js +208 -0
- package/dist/device-health-Ct2wDSPG.js +16 -0
- package/dist/directory-live-i3T8uORc.js +150 -0
- package/dist/doctor-contract-BLzYHl_9.js +246 -0
- package/dist/doctor-contract-api.js +2 -0
- package/dist/doctor-diR5gE7D.js +153 -0
- package/dist/draft-stream-HpPJ_VJt.js +143 -0
- package/dist/encryption-guidance-BNEgckrZ.js +15 -0
- package/dist/env-auth-UFiTGkDM.js +63 -0
- package/dist/env-vars-EQKQv-FE.js +63 -0
- package/dist/errors-BETj3zr9.js +17 -0
- package/dist/exec-approval-resolver-BxPorU_t.js +15 -0
- package/dist/helper-api.js +4 -0
- package/dist/http-client-DoQgbQsU.js +331 -0
- package/dist/index.js +46 -0
- package/dist/legacy-crypto-inspector-zK0hDCbt.js +41 -0
- package/dist/legacy-crypto-restore-DSFIXuDo.js +85 -0
- package/dist/logging-Df7aPD1z.js +99 -0
- package/dist/matrix-migration.runtime-BNoT1Prt.js +525 -0
- package/dist/media-text-ZhGA8Pcs.js +146 -0
- package/dist/messages-CRA9WGg0.js +140 -0
- package/dist/migration-snapshot-backup-BR-xD7Ew.js +69 -0
- package/dist/migration-snapshot.runtime-BLcy_Nvw.js +2 -0
- package/dist/monitor-DQm7_13y.js +4331 -0
- package/dist/plugin-entry.handlers.runtime.js +51 -0
- package/dist/probe.runtime-CjJS53Kz.js +3 -0
- package/dist/profile-update-DqkPgZ1P.js +68 -0
- package/dist/reaction-common-CmVLzP-u.js +71 -0
- package/dist/reaction-events-D0nUJuZV.js +121 -0
- package/dist/record-shared-DGvSFn5M.js +2 -0
- package/dist/resolve-targets-ChECUzD2.js +140 -0
- package/dist/resolver.runtime-hdY3n0GO.js +5 -0
- package/dist/rolldown-runtime-DUslC3ob.js +14 -0
- package/dist/route-xRKj_ESW.js +161 -0
- package/dist/runtime-B-Fyrmxo.js +8 -0
- package/dist/runtime-api-BYXXkxq2.js +24 -0
- package/dist/runtime-api.js +25 -0
- package/dist/runtime-heavy-api.js +3 -0
- package/dist/runtime-lwTSy9Yt.js +6 -0
- package/dist/runtime-setter-api.js +2 -0
- package/dist/sdk-Jhq7mLtD.js +1704 -0
- package/dist/secret-contract-DEMcDsjl.js +120 -0
- package/dist/secret-contract-api.js +2 -0
- package/dist/send-CJunc6QM.js +1517 -0
- package/dist/setup-bootstrap-rJ0qZWPe.js +62 -0
- package/dist/setup-core-BEYoXF3J.js +677 -0
- package/dist/setup-entry.js +19 -0
- package/dist/setup-plugin-api.js +43 -0
- package/dist/setup-surface-c28ON6jq.js +537 -0
- package/dist/shared-D6MFMnpG.js +642 -0
- package/dist/startup-abort-B2J3MU_h.js +109 -0
- package/dist/startup-verification-CkD4Cwce.js +132 -0
- package/dist/storage-nyO0DOFE.js +281 -0
- package/dist/storage-paths-BTAketfg.js +52 -0
- package/dist/subagent-hooks-api-Dr_xnMRG.js +170 -0
- package/dist/subagent-hooks-api.js +2 -0
- package/dist/sync-state-Bx0gPaGA.js +12 -0
- package/dist/target-ids-Bsazo8si.js +77 -0
- package/dist/test-api.js +4 -0
- package/dist/thread-binding-api-IGU0-L70.js +17 -0
- package/dist/thread-binding-api.js +2 -0
- package/dist/thread-bindings-FjAZmDUP.js +352 -0
- package/dist/thread-bindings-runtime.js +2 -0
- package/dist/thread-bindings-shared-fvfP7jVs.js +97 -0
- package/dist/timeout-abort-signal-DpSHDHhR.js +2 -0
- package/dist/tool-actions.runtime-Cbo7YcYZ.js +532 -0
- package/dist/url-validation-DlrXNjAE.js +36 -0
- package/dist/verification-7tDPRpJU.js +345 -0
- package/package.json +19 -7
- package/api.js +0 -7
- package/auth-presence.js +0 -7
- package/channel-plugin-api.js +0 -7
- package/cli-metadata.js +0 -7
- package/contract-api.js +0 -7
- package/doctor-contract-api.js +0 -7
- package/helper-api.js +0 -7
- package/index.js +0 -7
- package/plugin-entry.handlers.runtime.js +0 -7
- package/runtime-api.js +0 -7
- package/runtime-heavy-api.js +0 -7
- package/runtime-setter-api.js +0 -7
- package/secret-contract-api.js +0 -7
- package/setup-entry.js +0 -7
- package/setup-plugin-api.js +0 -7
- package/subagent-hooks-api.js +0 -7
- package/test-api.js +0 -7
- package/thread-binding-api.js +0 -7
- package/thread-bindings-runtime.js +0 -7
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { t as getMatrixScopedEnvVarNames } from "./env-vars-EQKQv-FE.js";
|
|
2
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "klaw/plugin-sdk/account-id";
|
|
3
|
+
import { collectSecretInputAssignment, getChannelSurface, hasConfiguredSecretInputValue, hasOwnProperty, normalizeSecretStringValue } from "klaw/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: "klaw.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: "klaw.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: "klaw.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: "klaw.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 };
|