@gakr-gakr/matrix 0.1.0 → 0.1.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.
Files changed (301) hide show
  1. package/autobot.plugin.json +891 -3
  2. package/dist/account-selection-D4xDzY_1.js +158 -0
  3. package/dist/active-client-BXz0W1fG.js +20 -0
  4. package/dist/api.js +12 -0
  5. package/dist/approval-handler.runtime-XgtgHryy.js +377 -0
  6. package/dist/approval-ids-Bj1MSuK0.js +7 -0
  7. package/dist/approval-reaction-auth-CP8yUUiI.js +27 -0
  8. package/dist/approval-reactions-C7FrzFhD.js +162 -0
  9. package/dist/async-lock-SsmtFXtt.js +19 -0
  10. package/dist/auth-presence.js +26 -0
  11. package/dist/backup-health-3BHbHxyd.js +60 -0
  12. package/dist/channel-CVtvS1kS.js +1380 -0
  13. package/dist/channel-plugin-api.js +2 -0
  14. package/dist/channel.runtime-BCl9atvS.js +250 -0
  15. package/dist/cli-D1Fxo6zb.js +1338 -0
  16. package/dist/cli-metadata-lo35g_nH.js +22 -0
  17. package/dist/cli-metadata.js +2 -0
  18. package/dist/client-4JU3adE6.js +30 -0
  19. package/dist/client-DVbkO1fr.js +25 -0
  20. package/dist/client-bootstrap-mLJmDCv8.js +114 -0
  21. package/dist/config-paths-BRIwec9o.js +114 -0
  22. package/dist/config-schema-ON2KZjSH.js +308 -0
  23. package/dist/config-secret-input.runtime-BcE98Tab.js +2 -0
  24. package/dist/contract-api.js +8 -0
  25. package/dist/create-client-nSnXsRe0.js +64 -0
  26. package/dist/credentials-CLaeORZB.js +56 -0
  27. package/dist/credentials-read-lnekFDSy.js +112 -0
  28. package/dist/credentials-write.runtime-AcuXkIly.js +17 -0
  29. package/dist/crypto-node.runtime-D9qxgRPa.js +12 -0
  30. package/dist/crypto-runtime-D577JLjP.js +1214 -0
  31. package/dist/deps-CcgU6fF9.js +208 -0
  32. package/dist/device-health-BDJoK0GP.js +16 -0
  33. package/dist/directory-live-D5osmyPM.js +150 -0
  34. package/dist/doctor-contract-CRTZe22J.js +246 -0
  35. package/dist/doctor-contract-api.js +2 -0
  36. package/dist/doctor-k53ce7TR.js +153 -0
  37. package/dist/draft-stream-B81ki3aq.js +143 -0
  38. package/dist/encryption-guidance-C4UZO9P_.js +15 -0
  39. package/dist/env-auth-ZPNhil6w.js +63 -0
  40. package/dist/env-vars-Ch51id3Y.js +63 -0
  41. package/dist/errors-D8exgH7Z.js +17 -0
  42. package/dist/exec-approval-resolver-NR6hHp1P.js +15 -0
  43. package/dist/helper-api.js +4 -0
  44. package/dist/http-client-CLvnNzJZ.js +331 -0
  45. package/dist/index.js +46 -0
  46. package/dist/legacy-crypto-inspector-BXa-K6Qb.js +41 -0
  47. package/dist/legacy-crypto-restore-DmSdbVyW.js +85 -0
  48. package/dist/logging-BWx5aV5G.js +99 -0
  49. package/dist/matrix-migration.runtime-C5EAzuSF.js +525 -0
  50. package/dist/media-text-H2gCWr7p.js +146 -0
  51. package/dist/messages-BM8v2OhM.js +140 -0
  52. package/dist/migration-snapshot-backup-B4qRjmn2.js +69 -0
  53. package/dist/migration-snapshot.runtime-CEaEL8JK.js +2 -0
  54. package/dist/monitor-9_MYVUk0.js +4331 -0
  55. package/dist/plugin-entry.handlers.runtime.js +51 -0
  56. package/dist/probe.runtime-ARO_q_Zl.js +3 -0
  57. package/dist/profile-update-DgBXphvR.js +68 -0
  58. package/dist/reaction-common-Bx8mZPc9.js +71 -0
  59. package/dist/reaction-events-B2GhGktu.js +121 -0
  60. package/{src/record-shared.ts → dist/record-shared-D-PbvaZ7.js} +1 -2
  61. package/dist/resolve-targets-CFr6_x9K.js +140 -0
  62. package/dist/resolver.runtime-fPzzTZVJ.js +5 -0
  63. package/dist/rolldown-runtime-DUslC3ob.js +14 -0
  64. package/dist/route-m49kMiHx.js +161 -0
  65. package/dist/runtime-BfjP-NST.js +8 -0
  66. package/dist/runtime-api-D7plmCoC.js +24 -0
  67. package/dist/runtime-api.js +25 -0
  68. package/dist/runtime-heavy-api.js +3 -0
  69. package/dist/runtime-lwTSy9Yt.js +6 -0
  70. package/dist/runtime-setter-api.js +2 -0
  71. package/dist/sdk-CK0ON6Js.js +1704 -0
  72. package/dist/secret-contract-BKkC-9fa.js +120 -0
  73. package/dist/secret-contract-api.js +2 -0
  74. package/dist/send-CWOxcUMq.js +1517 -0
  75. package/dist/setup-bootstrap-VShXhiBJ.js +62 -0
  76. package/dist/setup-core-CmXNGvQt.js +677 -0
  77. package/dist/setup-entry.js +19 -0
  78. package/dist/setup-plugin-api.js +43 -0
  79. package/dist/setup-surface-zTLHNBns.js +537 -0
  80. package/dist/shared-BrKJkpx_.js +642 -0
  81. package/dist/startup-abort-D79WSeUh.js +109 -0
  82. package/dist/startup-verification-Dj34oWgb.js +132 -0
  83. package/dist/storage-DxbroIe0.js +281 -0
  84. package/dist/storage-paths-BcLg30GH.js +52 -0
  85. package/dist/subagent-hooks-api-CjHBfEoY.js +170 -0
  86. package/dist/subagent-hooks-api.js +2 -0
  87. package/dist/sync-state-Bx0gPaGA.js +12 -0
  88. package/dist/target-ids-iZwjCUZa.js +77 -0
  89. package/dist/test-api.js +4 -0
  90. package/dist/thread-binding-api-BWT96Ttd.js +17 -0
  91. package/dist/thread-binding-api.js +2 -0
  92. package/dist/thread-bindings-owbheXoV.js +352 -0
  93. package/dist/thread-bindings-runtime.js +2 -0
  94. package/dist/thread-bindings-shared-4nkBBftw.js +97 -0
  95. package/dist/timeout-abort-signal-CPD0PPNy.js +2 -0
  96. package/dist/tool-actions.runtime-DDh2EP6z.js +532 -0
  97. package/dist/url-validation-fQvf_pW_.js +36 -0
  98. package/dist/verification-BhMWyuAf.js +345 -0
  99. package/package.json +16 -4
  100. package/CHANGELOG.md +0 -285
  101. package/SPEC-SUPPORT.md +0 -116
  102. package/api.ts +0 -38
  103. package/auth-presence.ts +0 -56
  104. package/channel-plugin-api.ts +0 -3
  105. package/cli-metadata.ts +0 -11
  106. package/contract-api.ts +0 -17
  107. package/doctor-contract-api.ts +0 -1
  108. package/helper-api.ts +0 -3
  109. package/index.ts +0 -55
  110. package/plugin-entry.handlers.runtime.ts +0 -1
  111. package/runtime-api.ts +0 -72
  112. package/runtime-heavy-api.ts +0 -1
  113. package/runtime-setter-api.ts +0 -3
  114. package/secret-contract-api.ts +0 -5
  115. package/setup-entry.ts +0 -17
  116. package/setup-plugin-api.ts +0 -3
  117. package/src/account-selection.ts +0 -223
  118. package/src/actions.ts +0 -346
  119. package/src/approval-auth.ts +0 -25
  120. package/src/approval-handler.runtime.ts +0 -595
  121. package/src/approval-ids.ts +0 -6
  122. package/src/approval-native.ts +0 -348
  123. package/src/approval-reaction-auth.ts +0 -45
  124. package/src/approval-reactions.ts +0 -313
  125. package/src/auth-precedence.ts +0 -61
  126. package/src/channel-account-paths.ts +0 -97
  127. package/src/channel.runtime.ts +0 -17
  128. package/src/channel.setup.ts +0 -48
  129. package/src/channel.ts +0 -667
  130. package/src/cli-metadata.ts +0 -19
  131. package/src/cli.ts +0 -2298
  132. package/src/config-adapter.ts +0 -41
  133. package/src/config-schema.ts +0 -159
  134. package/src/config-ui-hints.ts +0 -56
  135. package/src/directory-live.ts +0 -238
  136. package/src/doctor-contract.ts +0 -287
  137. package/src/doctor.ts +0 -262
  138. package/src/env-vars.ts +0 -92
  139. package/src/exec-approval-resolver.ts +0 -23
  140. package/src/exec-approvals.ts +0 -293
  141. package/src/group-mentions.ts +0 -41
  142. package/src/legacy-crypto-inspector-availability.ts +0 -60
  143. package/src/legacy-crypto.ts +0 -531
  144. package/src/legacy-state.ts +0 -156
  145. package/src/matrix/account-config.ts +0 -175
  146. package/src/matrix/accounts.ts +0 -194
  147. package/src/matrix/actions/client.ts +0 -31
  148. package/src/matrix/actions/devices.ts +0 -34
  149. package/src/matrix/actions/limits.ts +0 -6
  150. package/src/matrix/actions/messages.ts +0 -129
  151. package/src/matrix/actions/pins.ts +0 -63
  152. package/src/matrix/actions/polls.ts +0 -109
  153. package/src/matrix/actions/profile.ts +0 -37
  154. package/src/matrix/actions/reactions.ts +0 -59
  155. package/src/matrix/actions/room.ts +0 -71
  156. package/src/matrix/actions/summary.ts +0 -88
  157. package/src/matrix/actions/types.ts +0 -63
  158. package/src/matrix/actions/verification.ts +0 -589
  159. package/src/matrix/actions.ts +0 -37
  160. package/src/matrix/active-client.ts +0 -26
  161. package/src/matrix/async-lock.ts +0 -18
  162. package/src/matrix/backup-health.ts +0 -124
  163. package/src/matrix/client/config-runtime-api.ts +0 -9
  164. package/src/matrix/client/config-secret-input.runtime.ts +0 -1
  165. package/src/matrix/client/config.ts +0 -853
  166. package/src/matrix/client/create-client.ts +0 -105
  167. package/src/matrix/client/env-auth.ts +0 -95
  168. package/src/matrix/client/file-sync-store.ts +0 -289
  169. package/src/matrix/client/logging.ts +0 -140
  170. package/src/matrix/client/migration-snapshot.runtime.ts +0 -1
  171. package/src/matrix/client/private-network-host.ts +0 -1
  172. package/src/matrix/client/runtime.ts +0 -4
  173. package/src/matrix/client/shared.ts +0 -316
  174. package/src/matrix/client/storage.ts +0 -543
  175. package/src/matrix/client/types.ts +0 -50
  176. package/src/matrix/client/url-validation.ts +0 -76
  177. package/src/matrix/client-bootstrap.ts +0 -173
  178. package/src/matrix/client.ts +0 -23
  179. package/src/matrix/config-paths.ts +0 -31
  180. package/src/matrix/config-update.ts +0 -292
  181. package/src/matrix/credentials-read.ts +0 -207
  182. package/src/matrix/credentials-write.runtime.ts +0 -35
  183. package/src/matrix/credentials.ts +0 -95
  184. package/src/matrix/deps.ts +0 -309
  185. package/src/matrix/device-health.ts +0 -31
  186. package/src/matrix/direct-management.ts +0 -349
  187. package/src/matrix/direct-room.ts +0 -128
  188. package/src/matrix/draft-stream.ts +0 -225
  189. package/src/matrix/encryption-guidance.ts +0 -24
  190. package/src/matrix/errors.ts +0 -21
  191. package/src/matrix/format.ts +0 -426
  192. package/src/matrix/legacy-crypto-inspector.ts +0 -95
  193. package/src/matrix/media-errors.ts +0 -20
  194. package/src/matrix/media-text.ts +0 -162
  195. package/src/matrix/monitor/access-state.ts +0 -145
  196. package/src/matrix/monitor/ack-config.ts +0 -27
  197. package/src/matrix/monitor/allowlist.ts +0 -92
  198. package/src/matrix/monitor/auto-join.ts +0 -86
  199. package/src/matrix/monitor/config.ts +0 -569
  200. package/src/matrix/monitor/context-summary.ts +0 -43
  201. package/src/matrix/monitor/direct.ts +0 -296
  202. package/src/matrix/monitor/events.ts +0 -397
  203. package/src/matrix/monitor/handler.ts +0 -2271
  204. package/src/matrix/monitor/inbound-dedupe.ts +0 -267
  205. package/src/matrix/monitor/index.ts +0 -540
  206. package/src/matrix/monitor/legacy-crypto-restore.ts +0 -139
  207. package/src/matrix/monitor/location.ts +0 -108
  208. package/src/matrix/monitor/media.ts +0 -119
  209. package/src/matrix/monitor/mentions.ts +0 -256
  210. package/src/matrix/monitor/reaction-events.ts +0 -197
  211. package/src/matrix/monitor/recent-invite.ts +0 -30
  212. package/src/matrix/monitor/replies.ts +0 -136
  213. package/src/matrix/monitor/reply-context.ts +0 -92
  214. package/src/matrix/monitor/room-history.ts +0 -301
  215. package/src/matrix/monitor/room-info.ts +0 -126
  216. package/src/matrix/monitor/rooms.ts +0 -52
  217. package/src/matrix/monitor/route.ts +0 -179
  218. package/src/matrix/monitor/runtime-api.ts +0 -28
  219. package/src/matrix/monitor/startup-verification.ts +0 -237
  220. package/src/matrix/monitor/startup.ts +0 -218
  221. package/src/matrix/monitor/status.ts +0 -120
  222. package/src/matrix/monitor/sync-lifecycle.ts +0 -91
  223. package/src/matrix/monitor/task-runner.ts +0 -38
  224. package/src/matrix/monitor/test-events.ts +0 -21
  225. package/src/matrix/monitor/thread-context.ts +0 -108
  226. package/src/matrix/monitor/threads.ts +0 -85
  227. package/src/matrix/monitor/types.ts +0 -30
  228. package/src/matrix/monitor/verification-events.ts +0 -643
  229. package/src/matrix/monitor/verification-utils.ts +0 -46
  230. package/src/matrix/outbound-media-runtime.ts +0 -1
  231. package/src/matrix/poll-summary.ts +0 -110
  232. package/src/matrix/poll-types.ts +0 -429
  233. package/src/matrix/probe.runtime.ts +0 -4
  234. package/src/matrix/probe.ts +0 -97
  235. package/src/matrix/profile.ts +0 -184
  236. package/src/matrix/reaction-common.ts +0 -147
  237. package/src/matrix/sdk/crypto-bootstrap.ts +0 -438
  238. package/src/matrix/sdk/crypto-facade.ts +0 -242
  239. package/src/matrix/sdk/crypto-node.runtime.ts +0 -17
  240. package/src/matrix/sdk/crypto-runtime.ts +0 -14
  241. package/src/matrix/sdk/decrypt-bridge.ts +0 -410
  242. package/src/matrix/sdk/event-helpers.ts +0 -83
  243. package/src/matrix/sdk/http-client.ts +0 -87
  244. package/src/matrix/sdk/idb-persistence-lock.ts +0 -51
  245. package/src/matrix/sdk/idb-persistence.ts +0 -286
  246. package/src/matrix/sdk/logger.ts +0 -108
  247. package/src/matrix/sdk/read-response-with-limit.ts +0 -19
  248. package/src/matrix/sdk/recovery-key-store.ts +0 -453
  249. package/src/matrix/sdk/timeout-abort-signal.ts +0 -1
  250. package/src/matrix/sdk/transport-runtime-api.ts +0 -18
  251. package/src/matrix/sdk/transport.ts +0 -352
  252. package/src/matrix/sdk/types.ts +0 -245
  253. package/src/matrix/sdk/verification-manager.ts +0 -795
  254. package/src/matrix/sdk/verification-status.ts +0 -23
  255. package/src/matrix/sdk.ts +0 -2152
  256. package/src/matrix/send/client.ts +0 -93
  257. package/src/matrix/send/formatting.ts +0 -189
  258. package/src/matrix/send/media.ts +0 -244
  259. package/src/matrix/send/targets.ts +0 -104
  260. package/src/matrix/send/types.ts +0 -131
  261. package/src/matrix/send.ts +0 -660
  262. package/src/matrix/session-store-metadata.ts +0 -108
  263. package/src/matrix/startup-abort.ts +0 -44
  264. package/src/matrix/subagent-hooks.ts +0 -308
  265. package/src/matrix/sync-state.ts +0 -27
  266. package/src/matrix/target-ids.ts +0 -79
  267. package/src/matrix/thread-bindings-shared.ts +0 -206
  268. package/src/matrix/thread-bindings.ts +0 -580
  269. package/src/matrix-migration.runtime.ts +0 -9
  270. package/src/migration-config.ts +0 -243
  271. package/src/migration-snapshot-backup.ts +0 -116
  272. package/src/migration-snapshot.ts +0 -53
  273. package/src/onboarding.ts +0 -775
  274. package/src/outbound.ts +0 -248
  275. package/src/plugin-entry.runtime.js +0 -115
  276. package/src/plugin-entry.runtime.ts +0 -70
  277. package/src/profile-update.ts +0 -71
  278. package/src/resolve-targets.ts +0 -175
  279. package/src/resolver.runtime.ts +0 -5
  280. package/src/resolver.ts +0 -21
  281. package/src/runtime-api.ts +0 -106
  282. package/src/runtime.ts +0 -13
  283. package/src/secret-contract.ts +0 -174
  284. package/src/session-route.ts +0 -126
  285. package/src/setup-bootstrap.ts +0 -102
  286. package/src/setup-config.ts +0 -222
  287. package/src/setup-contract.ts +0 -90
  288. package/src/setup-core.ts +0 -146
  289. package/src/setup-dm-policy.ts +0 -15
  290. package/src/setup-surface.ts +0 -4
  291. package/src/startup-maintenance.ts +0 -114
  292. package/src/storage-paths.ts +0 -92
  293. package/src/thread-binding-api.ts +0 -23
  294. package/src/tool-actions.runtime.ts +0 -1
  295. package/src/tool-actions.ts +0 -498
  296. package/src/types.ts +0 -257
  297. package/subagent-hooks-api.ts +0 -31
  298. package/test-api.ts +0 -21
  299. package/thread-binding-api.ts +0 -4
  300. package/thread-bindings-runtime.ts +0 -4
  301. package/tsconfig.json +0 -16
@@ -0,0 +1,22 @@
1
+ import { definePluginEntry } from "autobot/plugin-sdk/plugin-entry";
2
+ //#region extensions/matrix/src/cli-metadata.ts
3
+ function registerMatrixCliMetadata(api) {
4
+ api.registerCli(async ({ program }) => {
5
+ const { registerMatrixCli } = await import("./cli-D1Fxo6zb.js");
6
+ registerMatrixCli({ program });
7
+ }, { descriptors: [{
8
+ name: "matrix",
9
+ description: "Manage Matrix accounts, verification, devices, and profile state",
10
+ hasSubcommands: true
11
+ }] });
12
+ }
13
+ //#endregion
14
+ //#region extensions/matrix/cli-metadata.ts
15
+ var cli_metadata_default = definePluginEntry({
16
+ id: "matrix",
17
+ name: "Matrix",
18
+ description: "Matrix channel plugin (matrix-js-sdk)",
19
+ register: registerMatrixCliMetadata
20
+ });
21
+ //#endregion
22
+ export { registerMatrixCliMetadata as n, cli_metadata_default as t };
@@ -0,0 +1,2 @@
1
+ import { n as registerMatrixCliMetadata, t as cli_metadata_default } from "./cli-metadata-lo35g_nH.js";
2
+ export { cli_metadata_default as default, registerMatrixCliMetadata };
@@ -0,0 +1,30 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
+ import { t as getMatrixScopedEnvVarNames } from "./env-vars-Ch51id3Y.js";
3
+ import { i as resolveScopedMatrixEnvConfig, r as resolveMatrixEnvAuthReadiness, t as hasReadyMatrixEnvAuth } from "./env-auth-ZPNhil6w.js";
4
+ import { n as validateMatrixHomeserverUrl, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-fQvf_pW_.js";
5
+ import { t as isBunRuntime } from "./runtime-lwTSy9Yt.js";
6
+ import { c as backfillMatrixAuthDeviceIdAfterStartup, d as resolveMatrixConfigForAccount, i as resolveSharedMatrixClient, l as resolveMatrixAuth, n as releaseSharedClientInstance, o as stopSharedClientForAccount, r as removeSharedClientInstance, s as stopSharedClientInstance, t as acquireSharedMatrixClient, u as resolveMatrixAuthContext } from "./shared-BrKJkpx_.js";
7
+ import { t as createMatrixClient } from "./create-client-nSnXsRe0.js";
8
+ //#region extensions/matrix/src/matrix/client.ts
9
+ var client_exports = /* @__PURE__ */ __exportAll({
10
+ acquireSharedMatrixClient: () => acquireSharedMatrixClient,
11
+ backfillMatrixAuthDeviceIdAfterStartup: () => backfillMatrixAuthDeviceIdAfterStartup,
12
+ createMatrixClient: () => createMatrixClient,
13
+ getMatrixScopedEnvVarNames: () => getMatrixScopedEnvVarNames,
14
+ hasReadyMatrixEnvAuth: () => hasReadyMatrixEnvAuth,
15
+ isBunRuntime: () => isBunRuntime,
16
+ releaseSharedClientInstance: () => releaseSharedClientInstance,
17
+ removeSharedClientInstance: () => removeSharedClientInstance,
18
+ resolveMatrixAuth: () => resolveMatrixAuth,
19
+ resolveMatrixAuthContext: () => resolveMatrixAuthContext,
20
+ resolveMatrixConfigForAccount: () => resolveMatrixConfigForAccount,
21
+ resolveMatrixEnvAuthReadiness: () => resolveMatrixEnvAuthReadiness,
22
+ resolveScopedMatrixEnvConfig: () => resolveScopedMatrixEnvConfig,
23
+ resolveSharedMatrixClient: () => resolveSharedMatrixClient,
24
+ resolveValidatedMatrixHomeserverUrl: () => resolveValidatedMatrixHomeserverUrl,
25
+ stopSharedClientForAccount: () => stopSharedClientForAccount,
26
+ stopSharedClientInstance: () => stopSharedClientInstance,
27
+ validateMatrixHomeserverUrl: () => validateMatrixHomeserverUrl
28
+ });
29
+ //#endregion
30
+ export { client_exports as t };
@@ -0,0 +1,25 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
+ import { u as resolveMatrixRoomId } from "./send-CWOxcUMq.js";
3
+ import { n as withResolvedRuntimeMatrixClient } from "./client-bootstrap-mLJmDCv8.js";
4
+ //#region extensions/matrix/src/matrix/actions/client.ts
5
+ var client_exports = /* @__PURE__ */ __exportAll({
6
+ withResolvedActionClient: () => withResolvedActionClient,
7
+ withResolvedRoomAction: () => withResolvedRoomAction,
8
+ withStartedActionClient: () => withStartedActionClient
9
+ });
10
+ async function withResolvedActionClient(opts, run, mode = "stop") {
11
+ return await withResolvedRuntimeMatrixClient(opts, run, mode);
12
+ }
13
+ async function withStartedActionClient(opts, run) {
14
+ return await withResolvedActionClient({
15
+ ...opts,
16
+ readiness: "started"
17
+ }, run, "persist");
18
+ }
19
+ async function withResolvedRoomAction(roomId, opts, run) {
20
+ return await withResolvedActionClient(opts, async (client) => {
21
+ return await run(client, await resolveMatrixRoomId(client, roomId));
22
+ });
23
+ }
24
+ //#endregion
25
+ export { withStartedActionClient as i, withResolvedActionClient as n, withResolvedRoomAction as r, client_exports as t };
@@ -0,0 +1,114 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
+ import { t as getActiveMatrixClient } from "./active-client-BXz0W1fG.js";
3
+ import { t as isBunRuntime } from "./runtime-lwTSy9Yt.js";
4
+ import { requireRuntimeConfig } from "autobot/plugin-sdk/plugin-config-runtime";
5
+ //#region extensions/matrix/src/matrix/client-bootstrap.ts
6
+ var client_bootstrap_exports = /* @__PURE__ */ __exportAll({
7
+ resolveRuntimeMatrixClientWithReadiness: () => resolveRuntimeMatrixClientWithReadiness,
8
+ stopResolvedRuntimeMatrixClient: () => stopResolvedRuntimeMatrixClient,
9
+ withResolvedRuntimeMatrixClient: () => withResolvedRuntimeMatrixClient
10
+ });
11
+ let matrixSharedClientRuntimeDepsPromise;
12
+ async function loadMatrixSharedClientRuntimeDeps() {
13
+ matrixSharedClientRuntimeDepsPromise ??= Promise.all([import("./client-4JU3adE6.js").then((n) => n.t), import("./shared-BrKJkpx_.js").then((n) => n.a)]).then(([clientModule, sharedModule]) => ({
14
+ acquireSharedMatrixClient: clientModule.acquireSharedMatrixClient,
15
+ resolveMatrixAuthContext: clientModule.resolveMatrixAuthContext,
16
+ releaseSharedClientInstance: sharedModule.releaseSharedClientInstance
17
+ }));
18
+ return await matrixSharedClientRuntimeDepsPromise;
19
+ }
20
+ async function ensureResolvedClientReadiness(params) {
21
+ if (params.readiness === "started") {
22
+ await params.client.start();
23
+ return;
24
+ }
25
+ if (params.readiness === "prepared" || !params.readiness && params.preparedByDefault) await params.client.prepareForOneOff();
26
+ }
27
+ function ensureMatrixNodeRuntime() {
28
+ if (isBunRuntime()) throw new Error("Matrix support requires Node (bun runtime not supported)");
29
+ }
30
+ async function resolveRuntimeMatrixClient(opts) {
31
+ ensureMatrixNodeRuntime();
32
+ if (opts.client) {
33
+ await opts.onResolved?.(opts.client, { preparedByDefault: false });
34
+ return {
35
+ client: opts.client,
36
+ stopOnDone: false
37
+ };
38
+ }
39
+ if (!opts.cfg) throw new Error("Matrix runtime client requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
40
+ const cfg = requireRuntimeConfig(opts.cfg, "Matrix runtime client");
41
+ const { acquireSharedMatrixClient, releaseSharedClientInstance, resolveMatrixAuthContext } = await loadMatrixSharedClientRuntimeDeps();
42
+ const authContext = resolveMatrixAuthContext({
43
+ cfg,
44
+ accountId: opts.accountId
45
+ });
46
+ const active = getActiveMatrixClient(authContext.accountId);
47
+ if (active) {
48
+ await opts.onResolved?.(active, { preparedByDefault: false });
49
+ return {
50
+ client: active,
51
+ stopOnDone: false
52
+ };
53
+ }
54
+ const client = await acquireSharedMatrixClient({
55
+ cfg,
56
+ timeoutMs: opts.timeoutMs,
57
+ accountId: authContext.accountId,
58
+ startClient: false
59
+ });
60
+ try {
61
+ await opts.onResolved?.(client, { preparedByDefault: true });
62
+ } catch (err) {
63
+ await releaseSharedClientInstance(client, "stop");
64
+ throw err;
65
+ }
66
+ return {
67
+ client,
68
+ stopOnDone: true,
69
+ cleanup: async (mode) => {
70
+ await releaseSharedClientInstance(client, mode);
71
+ }
72
+ };
73
+ }
74
+ async function resolveRuntimeMatrixClientWithReadiness(opts) {
75
+ return await resolveRuntimeMatrixClient({
76
+ client: opts.client,
77
+ cfg: opts.cfg,
78
+ timeoutMs: opts.timeoutMs,
79
+ accountId: opts.accountId,
80
+ onResolved: async (client, context) => {
81
+ await ensureResolvedClientReadiness({
82
+ client,
83
+ readiness: opts.readiness,
84
+ preparedByDefault: context.preparedByDefault
85
+ });
86
+ }
87
+ });
88
+ }
89
+ async function stopResolvedRuntimeMatrixClient(resolved, mode = "stop") {
90
+ if (!resolved.stopOnDone) return;
91
+ if (resolved.cleanup) {
92
+ await resolved.cleanup(mode);
93
+ return;
94
+ }
95
+ if (mode === "persist") {
96
+ await resolved.client.stopAndPersist();
97
+ return;
98
+ }
99
+ if (mode === "discard") {
100
+ resolved.client.stopWithoutPersist();
101
+ return;
102
+ }
103
+ resolved.client.stop();
104
+ }
105
+ async function withResolvedRuntimeMatrixClient(opts, run, stopMode = "stop") {
106
+ const resolved = await resolveRuntimeMatrixClientWithReadiness(opts);
107
+ try {
108
+ return await run(resolved.client);
109
+ } finally {
110
+ await stopResolvedRuntimeMatrixClient(resolved, stopMode);
111
+ }
112
+ }
113
+ //#endregion
114
+ export { withResolvedRuntimeMatrixClient as n, client_bootstrap_exports as t };
@@ -0,0 +1,114 @@
1
+ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "autobot/plugin-sdk/account-id";
2
+ import { hasConfiguredSecretInput } from "autobot/plugin-sdk/secret-input-runtime";
3
+ import { listConfiguredAccountIds, resolveMergedAccountConfig, resolveNormalizedAccountEntry } from "autobot/plugin-sdk/account-resolution-runtime";
4
+ //#region extensions/matrix/src/matrix/account-config.ts
5
+ function resolveMatrixBaseConfig(cfg) {
6
+ return cfg.channels?.matrix ?? {};
7
+ }
8
+ function resolveMatrixAccountsMap(cfg) {
9
+ const accounts = resolveMatrixBaseConfig(cfg).accounts;
10
+ if (!accounts || typeof accounts !== "object") return {};
11
+ return accounts;
12
+ }
13
+ function selectInheritedMatrixRoomEntries(params) {
14
+ const entries = params.entries;
15
+ if (!entries) return;
16
+ const selected = Object.fromEntries(Object.entries(entries).filter(([, value]) => {
17
+ const scopedAccount = typeof value?.account === "string" ? normalizeAccountId(value.account) : void 0;
18
+ return scopedAccount === void 0 || scopedAccount === params.accountId;
19
+ }));
20
+ return Object.keys(selected).length > 0 ? selected : void 0;
21
+ }
22
+ function mergeMatrixRoomEntries(inherited, accountEntries, hasAccountOverride) {
23
+ if (!inherited && !accountEntries) return;
24
+ if (hasAccountOverride && Object.keys(accountEntries ?? {}).length === 0) return;
25
+ const merged = { ...inherited };
26
+ for (const [key, value] of Object.entries(accountEntries ?? {})) {
27
+ const inheritedValue = merged[key];
28
+ merged[key] = inheritedValue && value ? {
29
+ ...inheritedValue,
30
+ ...value
31
+ } : value ?? inheritedValue;
32
+ }
33
+ return Object.keys(merged).length > 0 ? merged : void 0;
34
+ }
35
+ function listNormalizedMatrixAccountIds(cfg) {
36
+ return listConfiguredAccountIds({
37
+ accounts: resolveMatrixAccountsMap(cfg),
38
+ normalizeAccountId
39
+ });
40
+ }
41
+ function findMatrixAccountConfig(cfg, accountId) {
42
+ return resolveNormalizedAccountEntry(resolveMatrixAccountsMap(cfg), accountId, normalizeAccountId);
43
+ }
44
+ function hasExplicitMatrixAccountConfig(cfg, accountId) {
45
+ const normalized = normalizeAccountId(accountId);
46
+ if (findMatrixAccountConfig(cfg, normalized)) return true;
47
+ if (normalized !== DEFAULT_ACCOUNT_ID) return false;
48
+ const matrix = resolveMatrixBaseConfig(cfg);
49
+ return typeof matrix.enabled === "boolean" || typeof matrix.name === "string" || typeof matrix.homeserver === "string" || typeof matrix.userId === "string" || hasConfiguredSecretInput(matrix.accessToken) || hasConfiguredSecretInput(matrix.password) || typeof matrix.deviceId === "string" || typeof matrix.deviceName === "string" || typeof matrix.avatarUrl === "string";
50
+ }
51
+ function resolveMatrixAccountConfig(params) {
52
+ const accountId = normalizeAccountId(params.accountId);
53
+ const base = resolveMatrixBaseConfig(params.cfg);
54
+ const merged = resolveMergedAccountConfig({
55
+ channelConfig: base,
56
+ accounts: params.cfg.channels?.matrix?.accounts,
57
+ accountId,
58
+ normalizeAccountId,
59
+ nestedObjectKeys: [
60
+ "dm",
61
+ "actions",
62
+ "execApprovals",
63
+ "botLoopProtection"
64
+ ]
65
+ });
66
+ const accountConfig = findMatrixAccountConfig(params.cfg, accountId);
67
+ const groups = mergeMatrixRoomEntries(selectInheritedMatrixRoomEntries({
68
+ entries: base.groups,
69
+ accountId
70
+ }), accountConfig?.groups, Boolean(accountConfig && Object.hasOwn(accountConfig, "groups")));
71
+ const rooms = mergeMatrixRoomEntries(selectInheritedMatrixRoomEntries({
72
+ entries: base.rooms,
73
+ accountId
74
+ }), accountConfig?.rooms, Boolean(accountConfig && Object.hasOwn(accountConfig, "rooms")));
75
+ const { groups: _ignoredGroups, rooms: _ignoredRooms, ...rest } = merged;
76
+ return {
77
+ ...rest,
78
+ ...groups ? { groups } : {},
79
+ ...rooms ? { rooms } : {}
80
+ };
81
+ }
82
+ function resolveMatrixAccountAllowlistConfig(params) {
83
+ const accountId = normalizeAccountId(params.accountId);
84
+ const base = resolveMatrixBaseConfig(params.cfg);
85
+ const accountConfig = findMatrixAccountConfig(params.cfg, accountId);
86
+ const accountDm = accountConfig?.dm;
87
+ let dmAllowFrom = base.dm?.allowFrom;
88
+ if (accountDm && Object.hasOwn(accountDm, "allowFrom")) dmAllowFrom = accountDm.allowFrom;
89
+ let groupAllowFrom = base.groupAllowFrom;
90
+ if (accountConfig && Object.hasOwn(accountConfig, "groupAllowFrom")) groupAllowFrom = accountConfig.groupAllowFrom;
91
+ return {
92
+ dmAllowFrom,
93
+ groupAllowFrom
94
+ };
95
+ }
96
+ //#endregion
97
+ //#region extensions/matrix/src/matrix/config-paths.ts
98
+ function shouldStoreMatrixAccountAtTopLevel(cfg, accountId) {
99
+ if (normalizeAccountId(accountId) !== DEFAULT_ACCOUNT_ID) return false;
100
+ const accounts = cfg.channels?.matrix?.accounts;
101
+ return !accounts || Object.keys(accounts).length === 0;
102
+ }
103
+ function resolveMatrixConfigPath(cfg, accountId) {
104
+ const normalizedAccountId = normalizeAccountId(accountId);
105
+ if (shouldStoreMatrixAccountAtTopLevel(cfg, normalizedAccountId)) return "channels.matrix";
106
+ return `channels.matrix.accounts.${normalizedAccountId}`;
107
+ }
108
+ function resolveMatrixConfigFieldPath(cfg, accountId, fieldPath) {
109
+ const suffix = fieldPath.trim().replace(/^\.+/, "");
110
+ if (!suffix) return resolveMatrixConfigPath(cfg, accountId);
111
+ return `${resolveMatrixConfigPath(cfg, accountId)}.${suffix}`;
112
+ }
113
+ //#endregion
114
+ export { hasExplicitMatrixAccountConfig as a, resolveMatrixAccountConfig as c, findMatrixAccountConfig as i, resolveMatrixBaseConfig as l, resolveMatrixConfigPath as n, listNormalizedMatrixAccountIds as o, shouldStoreMatrixAccountAtTopLevel as r, resolveMatrixAccountAllowlistConfig as s, resolveMatrixConfigFieldPath as t };
@@ -0,0 +1,308 @@
1
+ import { c as resolveMatrixAccountConfig } from "./config-paths-BRIwec9o.js";
2
+ import { g as resolveMatrixAccount, h as resolveDefaultMatrixAccountId, p as listMatrixAccountIds } from "./setup-core-CmXNGvQt.js";
3
+ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "autobot/plugin-sdk/account-id";
4
+ import { normalizeLowercaseStringOrEmpty } from "autobot/plugin-sdk/string-coerce-runtime";
5
+ import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "autobot/plugin-sdk/channel-config-helpers";
6
+ import { resolveAllowlistMatchByCandidates } from "autobot/plugin-sdk/allow-from";
7
+ import { normalizeStringEntries } from "autobot/plugin-sdk/string-normalization-runtime";
8
+ import { buildChannelConfigSchema } from "autobot/plugin-sdk/channel-config-primitives";
9
+ import { AllowFromListSchema, ContextVisibilityModeSchema, GroupPolicySchema, MarkdownConfigSchema, ToolPolicySchema, buildNestedDmConfigSchema } from "autobot/plugin-sdk/channel-config-schema";
10
+ import { buildSecretInputSchema } from "autobot/plugin-sdk/secret-input";
11
+ import { z } from "zod";
12
+ //#region extensions/matrix/src/matrix/monitor/allowlist.ts
13
+ function normalizeAllowList(list) {
14
+ return normalizeStringEntries(list);
15
+ }
16
+ function normalizeMatrixUser(raw) {
17
+ const value = (raw ?? "").trim();
18
+ if (!value) return "";
19
+ if (!value.startsWith("@") || !value.includes(":")) return normalizeLowercaseStringOrEmpty(value);
20
+ const withoutAt = value.slice(1);
21
+ const splitIndex = withoutAt.indexOf(":");
22
+ if (splitIndex === -1) return normalizeLowercaseStringOrEmpty(value);
23
+ const localpart = normalizeLowercaseStringOrEmpty(withoutAt.slice(0, splitIndex));
24
+ const server = normalizeLowercaseStringOrEmpty(withoutAt.slice(splitIndex + 1));
25
+ if (!server) return normalizeLowercaseStringOrEmpty(value);
26
+ return `@${localpart}:${server}`;
27
+ }
28
+ function normalizeMatrixUserId(raw) {
29
+ const trimmed = (raw ?? "").trim();
30
+ if (!trimmed) return "";
31
+ const lowered = normalizeLowercaseStringOrEmpty(trimmed);
32
+ if (lowered.startsWith("matrix:")) return normalizeMatrixUser(trimmed.slice(7));
33
+ if (lowered.startsWith("user:")) return normalizeMatrixUser(trimmed.slice(5));
34
+ return normalizeMatrixUser(trimmed);
35
+ }
36
+ function normalizeMatrixAllowListEntry(raw) {
37
+ const trimmed = raw.trim();
38
+ if (!trimmed) return "";
39
+ if (trimmed === "*") return trimmed;
40
+ const lowered = normalizeLowercaseStringOrEmpty(trimmed);
41
+ if (lowered.startsWith("matrix:")) return `matrix:${normalizeMatrixUser(trimmed.slice(7))}`;
42
+ if (lowered.startsWith("user:")) return `user:${normalizeMatrixUser(trimmed.slice(5))}`;
43
+ return normalizeMatrixUser(trimmed);
44
+ }
45
+ function normalizeMatrixAllowList(list) {
46
+ return normalizeAllowList(list).map((entry) => normalizeMatrixAllowListEntry(entry));
47
+ }
48
+ function resolveMatrixAllowListMatch(params) {
49
+ const allowList = params.allowList;
50
+ if (allowList.length === 0) return { allowed: false };
51
+ if (allowList.includes("*")) return {
52
+ allowed: true,
53
+ matchKey: "*",
54
+ matchSource: "wildcard"
55
+ };
56
+ const userId = normalizeMatrixUser(params.userId);
57
+ return resolveAllowlistMatchByCandidates({
58
+ allowList,
59
+ candidates: [
60
+ {
61
+ value: userId,
62
+ source: "id"
63
+ },
64
+ {
65
+ value: userId ? `matrix:${userId}` : "",
66
+ source: "prefixed-id"
67
+ },
68
+ {
69
+ value: userId ? `user:${userId}` : "",
70
+ source: "prefixed-user"
71
+ }
72
+ ]
73
+ });
74
+ }
75
+ //#endregion
76
+ //#region extensions/matrix/src/config-adapter.ts
77
+ const matrixConfigAdapter = createScopedChannelConfigAdapter({
78
+ sectionKey: "matrix",
79
+ listAccountIds: listMatrixAccountIds,
80
+ resolveAccount: adaptScopedAccountAccessor(resolveMatrixAccount),
81
+ resolveAccessorAccount: ({ cfg, accountId }) => resolveMatrixAccountConfig({
82
+ cfg,
83
+ accountId
84
+ }),
85
+ defaultAccountId: resolveDefaultMatrixAccountId,
86
+ clearBaseFields: [
87
+ "name",
88
+ "homeserver",
89
+ "network",
90
+ "proxy",
91
+ "userId",
92
+ "accessToken",
93
+ "password",
94
+ "deviceId",
95
+ "deviceName",
96
+ "avatarUrl",
97
+ "initialSyncLimit"
98
+ ],
99
+ resolveAllowFrom: (account) => account.dm?.allowFrom,
100
+ formatAllowFrom: (allowFrom) => normalizeMatrixAllowList(allowFrom)
101
+ });
102
+ //#endregion
103
+ //#region extensions/matrix/src/config-ui-hints.ts
104
+ const matrixChannelConfigUiHints = {
105
+ allowBots: {
106
+ label: "Matrix Allow Bot Messages",
107
+ help: "Allow messages from other configured Matrix bot accounts to trigger replies (default: false). Set \"mentions\" to require a visible room mention."
108
+ },
109
+ botLoopProtection: {
110
+ label: "Matrix Bot Loop Protection",
111
+ help: "Sliding-window guard for accepted Matrix configured-bot loops. Default is enabled whenever allowBots lets configured bot messages reach dispatch."
112
+ },
113
+ "botLoopProtection.enabled": {
114
+ label: "Matrix Bot Loop Protection Enabled",
115
+ help: "Enable the bot-pair loop guard. Defaults to true when allowBots is true or \"mentions\", and false when configured bot messages are ignored."
116
+ },
117
+ "botLoopProtection.maxEventsPerWindow": {
118
+ label: "Matrix Bot Loop Events per Window",
119
+ help: "Maximum accepted bot-pair messages within the sliding window before suppression starts. Default: 20."
120
+ },
121
+ "botLoopProtection.windowSeconds": {
122
+ label: "Matrix Bot Loop Window Seconds",
123
+ help: "Sliding window length for counting bot-pair messages. Default: 60."
124
+ },
125
+ "botLoopProtection.cooldownSeconds": {
126
+ label: "Matrix Bot Loop Cooldown Seconds",
127
+ help: "How long to suppress the bot pair after it exceeds the budget. Default: 60."
128
+ },
129
+ dangerouslyAllowNameMatching: {
130
+ label: "Matrix Display Name Matching",
131
+ help: "Compatibility opt-in for resolving Matrix display names and joined room names in allowlists. Prefer full @user:server IDs and room IDs or aliases because names are mutable."
132
+ },
133
+ "streaming.progress.label": {
134
+ label: "Matrix Progress Label",
135
+ help: "Initial progress draft title. Use \"auto\" for built-in single-word labels, a custom string, or false to hide the title."
136
+ },
137
+ "streaming.progress.labels": {
138
+ label: "Matrix Progress Label Pool",
139
+ help: "Candidate labels for streaming.progress.label=\"auto\". Leave unset to use AutoBot built-in progress labels."
140
+ },
141
+ "streaming.progress.maxLines": {
142
+ label: "Matrix Progress Max Lines",
143
+ help: "Maximum number of compact progress lines to keep below the draft label (default: 8)."
144
+ },
145
+ "streaming.progress.maxLineChars": {
146
+ label: "Matrix Progress Max Line Chars",
147
+ help: "Maximum characters per compact progress line before truncation (default: 120). Prose cuts at word boundaries; commands and paths keep useful suffixes."
148
+ },
149
+ "streaming.progress.toolProgress": {
150
+ label: "Matrix Progress Tool Lines",
151
+ help: "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery."
152
+ },
153
+ "streaming.progress.commandText": {
154
+ label: "Matrix Progress Command Text",
155
+ help: "Command/exec detail in progress draft lines: \"raw\" preserves released behavior; \"status\" shows only the tool label."
156
+ }
157
+ };
158
+ //#endregion
159
+ //#region extensions/matrix/src/config-schema.ts
160
+ const matrixActionSchema = z.object({
161
+ reactions: z.boolean().optional(),
162
+ messages: z.boolean().optional(),
163
+ pins: z.boolean().optional(),
164
+ profile: z.boolean().optional(),
165
+ memberInfo: z.boolean().optional(),
166
+ channelInfo: z.boolean().optional(),
167
+ verification: z.boolean().optional()
168
+ }).optional();
169
+ const matrixThreadBindingsSchema = z.object({
170
+ enabled: z.boolean().optional(),
171
+ idleHours: z.number().nonnegative().optional(),
172
+ maxAgeHours: z.number().nonnegative().optional(),
173
+ spawnSessions: z.boolean().optional(),
174
+ defaultSpawnContext: z.enum(["isolated", "fork"]).optional(),
175
+ spawnSubagentSessions: z.boolean().optional(),
176
+ spawnAcpSessions: z.boolean().optional()
177
+ }).optional();
178
+ const matrixExecApprovalsSchema = z.object({
179
+ enabled: z.boolean().optional(),
180
+ approvers: AllowFromListSchema,
181
+ agentFilter: z.array(z.string()).optional(),
182
+ sessionFilter: z.array(z.string()).optional(),
183
+ target: z.enum([
184
+ "dm",
185
+ "channel",
186
+ "both"
187
+ ]).optional()
188
+ }).optional();
189
+ const botLoopProtectionSchema = z.object({
190
+ enabled: z.boolean().optional(),
191
+ maxEventsPerWindow: z.number().int().positive().optional(),
192
+ windowSeconds: z.number().int().positive().optional(),
193
+ cooldownSeconds: z.number().int().positive().optional()
194
+ }).strict().optional();
195
+ const matrixRoomSchema = z.object({
196
+ account: z.string().optional(),
197
+ enabled: z.boolean().optional(),
198
+ requireMention: z.boolean().optional(),
199
+ allowBots: z.union([z.boolean(), z.literal("mentions")]).optional(),
200
+ botLoopProtection: botLoopProtectionSchema,
201
+ tools: ToolPolicySchema,
202
+ autoReply: z.boolean().optional(),
203
+ users: AllowFromListSchema,
204
+ skills: z.array(z.string()).optional(),
205
+ systemPrompt: z.string().optional()
206
+ }).optional();
207
+ const matrixNetworkSchema = z.object({ dangerouslyAllowPrivateNetwork: z.boolean().optional() }).strict().optional();
208
+ const matrixStreamingSchema = z.object({
209
+ mode: z.enum([
210
+ "partial",
211
+ "quiet",
212
+ "progress",
213
+ "off"
214
+ ]).optional(),
215
+ progress: z.object({
216
+ label: z.union([z.string(), z.literal(false)]).optional(),
217
+ labels: z.array(z.string()).optional(),
218
+ maxLines: z.number().int().positive().optional(),
219
+ maxLineChars: z.number().int().positive().optional(),
220
+ toolProgress: z.boolean().optional()
221
+ }).strict().optional(),
222
+ preview: z.object({ toolProgress: z.boolean().optional() }).strict().optional()
223
+ }).strict();
224
+ const MatrixChannelConfigSchema = buildChannelConfigSchema(z.object({
225
+ name: z.string().optional(),
226
+ enabled: z.boolean().optional(),
227
+ defaultAccount: z.string().optional(),
228
+ accounts: z.record(z.string(), z.unknown()).optional(),
229
+ markdown: MarkdownConfigSchema,
230
+ homeserver: z.string().optional(),
231
+ network: matrixNetworkSchema,
232
+ proxy: z.string().optional(),
233
+ userId: z.string().optional(),
234
+ accessToken: buildSecretInputSchema().optional(),
235
+ password: buildSecretInputSchema().optional(),
236
+ deviceId: z.string().optional(),
237
+ deviceName: z.string().optional(),
238
+ avatarUrl: z.string().optional(),
239
+ initialSyncLimit: z.number().optional(),
240
+ encryption: z.boolean().optional(),
241
+ allowlistOnly: z.boolean().optional(),
242
+ dangerouslyAllowNameMatching: z.boolean().optional(),
243
+ allowBots: z.union([z.boolean(), z.literal("mentions")]).optional(),
244
+ botLoopProtection: botLoopProtectionSchema,
245
+ groupPolicy: GroupPolicySchema.optional(),
246
+ contextVisibility: ContextVisibilityModeSchema.optional(),
247
+ blockStreaming: z.boolean().optional(),
248
+ streaming: z.union([
249
+ z.enum([
250
+ "partial",
251
+ "quiet",
252
+ "progress",
253
+ "off"
254
+ ]),
255
+ z.boolean(),
256
+ matrixStreamingSchema
257
+ ]).optional(),
258
+ replyToMode: z.enum([
259
+ "off",
260
+ "first",
261
+ "all",
262
+ "batched"
263
+ ]).optional(),
264
+ threadReplies: z.enum([
265
+ "off",
266
+ "inbound",
267
+ "always"
268
+ ]).optional(),
269
+ textChunkLimit: z.number().optional(),
270
+ chunkMode: z.enum(["length", "newline"]).optional(),
271
+ responsePrefix: z.string().optional(),
272
+ ackReaction: z.string().optional(),
273
+ ackReactionScope: z.enum([
274
+ "group-mentions",
275
+ "group-all",
276
+ "direct",
277
+ "all",
278
+ "none",
279
+ "off"
280
+ ]).optional(),
281
+ reactionNotifications: z.enum(["off", "own"]).optional(),
282
+ threadBindings: matrixThreadBindingsSchema,
283
+ startupVerification: z.enum(["off", "if-unverified"]).optional(),
284
+ startupVerificationCooldownHours: z.number().optional(),
285
+ mediaMaxMb: z.number().optional(),
286
+ historyLimit: z.number().int().min(0).optional(),
287
+ autoJoin: z.enum([
288
+ "always",
289
+ "allowlist",
290
+ "off"
291
+ ]).optional(),
292
+ autoJoinAllowlist: AllowFromListSchema,
293
+ groupAllowFrom: AllowFromListSchema,
294
+ dm: buildNestedDmConfigSchema({
295
+ sessionScope: z.enum(["per-user", "per-room"]).optional(),
296
+ threadReplies: z.enum([
297
+ "off",
298
+ "inbound",
299
+ "always"
300
+ ]).optional()
301
+ }),
302
+ execApprovals: matrixExecApprovalsSchema,
303
+ groups: z.object({}).catchall(matrixRoomSchema).optional(),
304
+ rooms: z.object({}).catchall(matrixRoomSchema).optional(),
305
+ actions: matrixActionSchema
306
+ }), { uiHints: matrixChannelConfigUiHints });
307
+ //#endregion
308
+ export { normalizeMatrixUserId as a, normalizeMatrixAllowList as i, DEFAULT_ACCOUNT_ID$1 as n, resolveMatrixAllowListMatch as o, matrixConfigAdapter as r, MatrixChannelConfigSchema as t };
@@ -0,0 +1,2 @@
1
+ import { resolveConfiguredSecretInputString } from "autobot/plugin-sdk/secret-input-runtime";
2
+ export { resolveConfiguredSecretInputString };
@@ -0,0 +1,8 @@
1
+ import { s as resetMatrixThreadBindingsForTests } from "./thread-bindings-shared-4nkBBftw.js";
2
+ import { r as setMatrixRuntime } from "./runtime-BfjP-NST.js";
3
+ import { d as resolveSingleAccountPromotionTarget, f as singleAccountKeysToMove, n as matrixSetupAdapter, u as namedAccountPromotionKeys } from "./setup-core-CmXNGvQt.js";
4
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CRTZe22J.js";
5
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-BKkC-9fa.js";
6
+ import { n as matrixOnboardingAdapter } from "./setup-surface-zTLHNBns.js";
7
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-owbheXoV.js";
8
+ export { collectRuntimeConfigAssignments, createMatrixThreadBindingManager, legacyConfigRules, matrixSetupAdapter, matrixOnboardingAdapter as matrixSetupWizard, namedAccountPromotionKeys, normalizeCompatibilityConfig, resetMatrixThreadBindingsForTests, resolveSingleAccountPromotionTarget, secretTargetRegistryEntries, setMatrixRuntime, singleAccountKeysToMove };