@kodelyth/matrix 2026.5.42 → 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.
Files changed (205) hide show
  1. package/klaw.plugin.json +891 -3
  2. package/package.json +16 -4
  3. package/CHANGELOG.md +0 -321
  4. package/SPEC-SUPPORT.md +0 -116
  5. package/api.ts +0 -38
  6. package/auth-presence.ts +0 -56
  7. package/channel-plugin-api.ts +0 -3
  8. package/cli-metadata.ts +0 -11
  9. package/contract-api.ts +0 -17
  10. package/doctor-contract-api.ts +0 -1
  11. package/helper-api.ts +0 -3
  12. package/index.ts +0 -55
  13. package/plugin-entry.handlers.runtime.ts +0 -1
  14. package/runtime-api.ts +0 -72
  15. package/runtime-heavy-api.ts +0 -1
  16. package/runtime-setter-api.ts +0 -3
  17. package/secret-contract-api.ts +0 -5
  18. package/setup-entry.ts +0 -17
  19. package/setup-plugin-api.ts +0 -3
  20. package/src/account-selection.ts +0 -223
  21. package/src/actions.ts +0 -346
  22. package/src/approval-auth.ts +0 -25
  23. package/src/approval-handler.runtime.ts +0 -592
  24. package/src/approval-ids.ts +0 -6
  25. package/src/approval-native.ts +0 -345
  26. package/src/approval-reaction-auth.ts +0 -45
  27. package/src/approval-reactions.ts +0 -313
  28. package/src/auth-precedence.ts +0 -61
  29. package/src/channel-account-paths.ts +0 -97
  30. package/src/channel.runtime.ts +0 -17
  31. package/src/channel.setup.ts +0 -48
  32. package/src/channel.ts +0 -667
  33. package/src/cli-metadata.ts +0 -19
  34. package/src/cli.ts +0 -2298
  35. package/src/config-adapter.ts +0 -41
  36. package/src/config-schema.ts +0 -159
  37. package/src/config-ui-hints.ts +0 -56
  38. package/src/directory-live.ts +0 -238
  39. package/src/doctor-contract.ts +0 -287
  40. package/src/doctor.ts +0 -262
  41. package/src/env-vars.ts +0 -92
  42. package/src/exec-approval-resolver.ts +0 -23
  43. package/src/exec-approvals.ts +0 -287
  44. package/src/group-mentions.ts +0 -41
  45. package/src/legacy-crypto-inspector-availability.ts +0 -60
  46. package/src/legacy-crypto.ts +0 -531
  47. package/src/legacy-state.ts +0 -156
  48. package/src/matrix/account-config.ts +0 -175
  49. package/src/matrix/accounts.ts +0 -194
  50. package/src/matrix/actions/client.ts +0 -31
  51. package/src/matrix/actions/devices.ts +0 -34
  52. package/src/matrix/actions/limits.ts +0 -6
  53. package/src/matrix/actions/messages.ts +0 -129
  54. package/src/matrix/actions/pins.ts +0 -63
  55. package/src/matrix/actions/polls.ts +0 -109
  56. package/src/matrix/actions/profile.ts +0 -37
  57. package/src/matrix/actions/reactions.ts +0 -59
  58. package/src/matrix/actions/room.ts +0 -71
  59. package/src/matrix/actions/summary.ts +0 -88
  60. package/src/matrix/actions/types.ts +0 -63
  61. package/src/matrix/actions/verification.ts +0 -589
  62. package/src/matrix/actions.ts +0 -37
  63. package/src/matrix/active-client.ts +0 -26
  64. package/src/matrix/async-lock.ts +0 -18
  65. package/src/matrix/backup-health.ts +0 -124
  66. package/src/matrix/client/config-runtime-api.ts +0 -9
  67. package/src/matrix/client/config-secret-input.runtime.ts +0 -1
  68. package/src/matrix/client/config.ts +0 -853
  69. package/src/matrix/client/create-client.ts +0 -105
  70. package/src/matrix/client/env-auth.ts +0 -95
  71. package/src/matrix/client/file-sync-store.ts +0 -289
  72. package/src/matrix/client/logging.ts +0 -140
  73. package/src/matrix/client/migration-snapshot.runtime.ts +0 -1
  74. package/src/matrix/client/private-network-host.ts +0 -1
  75. package/src/matrix/client/runtime.ts +0 -4
  76. package/src/matrix/client/shared.ts +0 -316
  77. package/src/matrix/client/storage.ts +0 -543
  78. package/src/matrix/client/types.ts +0 -50
  79. package/src/matrix/client/url-validation.ts +0 -73
  80. package/src/matrix/client-bootstrap.ts +0 -173
  81. package/src/matrix/client.ts +0 -23
  82. package/src/matrix/config-paths.ts +0 -31
  83. package/src/matrix/config-update.ts +0 -292
  84. package/src/matrix/credentials-read.ts +0 -208
  85. package/src/matrix/credentials-write.runtime.ts +0 -35
  86. package/src/matrix/credentials.ts +0 -95
  87. package/src/matrix/deps.ts +0 -309
  88. package/src/matrix/device-health.ts +0 -29
  89. package/src/matrix/direct-management.ts +0 -349
  90. package/src/matrix/direct-room.ts +0 -128
  91. package/src/matrix/draft-stream.ts +0 -225
  92. package/src/matrix/encryption-guidance.ts +0 -24
  93. package/src/matrix/errors.ts +0 -21
  94. package/src/matrix/format.ts +0 -426
  95. package/src/matrix/legacy-crypto-inspector.ts +0 -95
  96. package/src/matrix/media-errors.ts +0 -20
  97. package/src/matrix/media-text.ts +0 -162
  98. package/src/matrix/monitor/access-state.ts +0 -145
  99. package/src/matrix/monitor/ack-config.ts +0 -27
  100. package/src/matrix/monitor/allowlist.ts +0 -89
  101. package/src/matrix/monitor/auto-join.ts +0 -86
  102. package/src/matrix/monitor/config.ts +0 -569
  103. package/src/matrix/monitor/context-summary.ts +0 -43
  104. package/src/matrix/monitor/direct.ts +0 -296
  105. package/src/matrix/monitor/events.ts +0 -397
  106. package/src/matrix/monitor/handler.ts +0 -2266
  107. package/src/matrix/monitor/inbound-dedupe.ts +0 -267
  108. package/src/matrix/monitor/index.ts +0 -540
  109. package/src/matrix/monitor/legacy-crypto-restore.ts +0 -139
  110. package/src/matrix/monitor/location.ts +0 -108
  111. package/src/matrix/monitor/media.ts +0 -119
  112. package/src/matrix/monitor/mentions.ts +0 -256
  113. package/src/matrix/monitor/reaction-events.ts +0 -197
  114. package/src/matrix/monitor/recent-invite.ts +0 -30
  115. package/src/matrix/monitor/replies.ts +0 -136
  116. package/src/matrix/monitor/reply-context.ts +0 -92
  117. package/src/matrix/monitor/room-history.ts +0 -301
  118. package/src/matrix/monitor/room-info.ts +0 -126
  119. package/src/matrix/monitor/rooms.ts +0 -52
  120. package/src/matrix/monitor/route.ts +0 -179
  121. package/src/matrix/monitor/runtime-api.ts +0 -28
  122. package/src/matrix/monitor/startup-verification.ts +0 -237
  123. package/src/matrix/monitor/startup.ts +0 -218
  124. package/src/matrix/monitor/status.ts +0 -120
  125. package/src/matrix/monitor/sync-lifecycle.ts +0 -91
  126. package/src/matrix/monitor/task-runner.ts +0 -38
  127. package/src/matrix/monitor/test-events.ts +0 -21
  128. package/src/matrix/monitor/thread-context.ts +0 -108
  129. package/src/matrix/monitor/threads.ts +0 -85
  130. package/src/matrix/monitor/types.ts +0 -30
  131. package/src/matrix/monitor/verification-events.ts +0 -643
  132. package/src/matrix/monitor/verification-utils.ts +0 -46
  133. package/src/matrix/outbound-media-runtime.ts +0 -1
  134. package/src/matrix/poll-summary.ts +0 -110
  135. package/src/matrix/poll-types.ts +0 -429
  136. package/src/matrix/probe.runtime.ts +0 -4
  137. package/src/matrix/probe.ts +0 -97
  138. package/src/matrix/profile.ts +0 -184
  139. package/src/matrix/reaction-common.ts +0 -147
  140. package/src/matrix/sdk/crypto-bootstrap.ts +0 -438
  141. package/src/matrix/sdk/crypto-facade.ts +0 -242
  142. package/src/matrix/sdk/crypto-node.runtime.ts +0 -17
  143. package/src/matrix/sdk/crypto-runtime.ts +0 -14
  144. package/src/matrix/sdk/decrypt-bridge.ts +0 -410
  145. package/src/matrix/sdk/event-helpers.ts +0 -83
  146. package/src/matrix/sdk/http-client.ts +0 -87
  147. package/src/matrix/sdk/idb-persistence-lock.ts +0 -51
  148. package/src/matrix/sdk/idb-persistence.ts +0 -288
  149. package/src/matrix/sdk/logger.ts +0 -108
  150. package/src/matrix/sdk/read-response-with-limit.ts +0 -19
  151. package/src/matrix/sdk/recovery-key-store.ts +0 -453
  152. package/src/matrix/sdk/timeout-abort-signal.ts +0 -1
  153. package/src/matrix/sdk/transport-runtime-api.ts +0 -18
  154. package/src/matrix/sdk/transport.ts +0 -352
  155. package/src/matrix/sdk/types.ts +0 -245
  156. package/src/matrix/sdk/verification-manager.ts +0 -795
  157. package/src/matrix/sdk/verification-status.ts +0 -23
  158. package/src/matrix/sdk.ts +0 -2152
  159. package/src/matrix/send/client.ts +0 -93
  160. package/src/matrix/send/formatting.ts +0 -189
  161. package/src/matrix/send/media.ts +0 -244
  162. package/src/matrix/send/targets.ts +0 -104
  163. package/src/matrix/send/types.ts +0 -131
  164. package/src/matrix/send.ts +0 -660
  165. package/src/matrix/session-store-metadata.ts +0 -108
  166. package/src/matrix/startup-abort.ts +0 -44
  167. package/src/matrix/subagent-hooks.ts +0 -308
  168. package/src/matrix/sync-state.ts +0 -27
  169. package/src/matrix/target-ids.ts +0 -79
  170. package/src/matrix/thread-bindings-shared.ts +0 -206
  171. package/src/matrix/thread-bindings.ts +0 -580
  172. package/src/matrix-migration.runtime.ts +0 -9
  173. package/src/migration-config.ts +0 -243
  174. package/src/migration-snapshot-backup.ts +0 -116
  175. package/src/migration-snapshot.ts +0 -53
  176. package/src/onboarding.ts +0 -775
  177. package/src/outbound.ts +0 -248
  178. package/src/plugin-entry.runtime.js +0 -115
  179. package/src/plugin-entry.runtime.ts +0 -70
  180. package/src/profile-update.ts +0 -71
  181. package/src/record-shared.ts +0 -3
  182. package/src/resolve-targets.ts +0 -175
  183. package/src/resolver.runtime.ts +0 -5
  184. package/src/resolver.ts +0 -21
  185. package/src/runtime-api.ts +0 -106
  186. package/src/runtime.ts +0 -13
  187. package/src/secret-contract.ts +0 -174
  188. package/src/session-route.ts +0 -126
  189. package/src/setup-bootstrap.ts +0 -102
  190. package/src/setup-config.ts +0 -222
  191. package/src/setup-contract.ts +0 -90
  192. package/src/setup-core.ts +0 -146
  193. package/src/setup-dm-policy.ts +0 -15
  194. package/src/setup-surface.ts +0 -4
  195. package/src/startup-maintenance.ts +0 -114
  196. package/src/storage-paths.ts +0 -92
  197. package/src/thread-binding-api.ts +0 -23
  198. package/src/tool-actions.runtime.ts +0 -1
  199. package/src/tool-actions.ts +0 -498
  200. package/src/types.ts +0 -257
  201. package/subagent-hooks-api.ts +0 -31
  202. package/test-api.ts +0 -21
  203. package/thread-binding-api.ts +0 -4
  204. package/thread-bindings-runtime.ts +0 -4
  205. package/tsconfig.json +0 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodelyth/matrix",
3
- "version": "2026.5.42",
3
+ "version": "2026.6.1",
4
4
  "description": "Klaw Matrix channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,11 +22,15 @@
22
22
  "@kodelyth/klaw": "2026.5.42"
23
23
  },
24
24
  "peerDependencies": {
25
- "@kodelyth/klaw": ">=2026.5.19"
25
+ "@kodelyth/klaw": ">=2026.5.19",
26
+ "klaw": ">=2026.5.39"
26
27
  },
27
28
  "peerDependenciesMeta": {
28
29
  "@kodelyth/klaw": {
29
30
  "optional": true
31
+ },
32
+ "klaw": {
33
+ "optional": true
30
34
  }
31
35
  },
32
36
  "klaw": {
@@ -95,6 +99,14 @@
95
99
  "release": {
96
100
  "publishToClawHub": true,
97
101
  "publishToNpm": true
98
- }
99
- }
102
+ },
103
+ "runtimeExtensions": [
104
+ "./dist/index.js"
105
+ ],
106
+ "runtimeSetupEntry": "./dist/setup-entry.js"
107
+ },
108
+ "files": [
109
+ "dist/**",
110
+ "klaw.plugin.json"
111
+ ]
100
112
  }
package/CHANGELOG.md DELETED
@@ -1,321 +0,0 @@
1
- # Changelog
2
-
3
- ## 2026.5.39
4
-
5
- ### Changes
6
-
7
- - Version alignment with core Klaw release numbers.
8
-
9
- ## 2026.5.38
10
-
11
- ### Changes
12
-
13
- - Version alignment with core Klaw release numbers.
14
-
15
- ## 2026.5.37
16
-
17
- ### Changes
18
-
19
- - Version alignment with core Klaw release numbers.
20
-
21
- ## 2026.5.36
22
-
23
- ### Changes
24
-
25
- - Version alignment with core Klaw release numbers.
26
-
27
- ## 2026.5.35
28
-
29
- ### Changes
30
-
31
- - Version alignment with core Klaw release numbers.
32
-
33
- ## 2026.5.34
34
-
35
- ### Changes
36
-
37
- - Version alignment with core Klaw release numbers.
38
-
39
- ## 2026.5.19
40
-
41
- ### Changes
42
-
43
- - Version alignment with core Klaw release numbers.
44
-
45
- ## 2026.5.17
46
-
47
- ### Changes
48
-
49
- - Version alignment with core Klaw release numbers.
50
-
51
- ### Fixes
52
-
53
- - Matrix/E2EE: stop requesting MSC4222 `state_after` sync responses so homeservers with incomplete state-after data do not leave fresh encrypted rooms without outbound room encryptors. Fixes #82515. Thanks @nickdecooman.
54
-
55
- ## 2026.5.16
56
-
57
- ### Changes
58
-
59
- - Version alignment with core Klaw release numbers.
60
-
61
- ## 2026.5.14
62
-
63
- ### Changes
64
-
65
- - Version alignment with core Klaw release numbers.
66
-
67
- ## 2026.5.12
68
-
69
- ### Changes
70
-
71
- - Version alignment with core Klaw release numbers.
72
-
73
- ## 2026.5.10
74
-
75
- ### Changes
76
-
77
- - Version alignment with core Klaw release numbers.
78
-
79
- ## 2026.5.8
80
-
81
- ### Changes
82
-
83
- - Version alignment with core Klaw release numbers.
84
-
85
- ## 2026.5.6
86
-
87
- ### Changes
88
-
89
- - Version alignment with core Klaw release numbers.
90
-
91
- ## 2026.5.4
92
-
93
- ### Changes
94
-
95
- - Version alignment with core Klaw release numbers.
96
-
97
- ## 2026.5.3
98
-
99
- ### Changes
100
-
101
- - Version alignment with core Klaw release numbers.
102
-
103
- ## 2026.5.2
104
-
105
- ### Changes
106
-
107
- - Version alignment with core Klaw release numbers.
108
-
109
- ## Unreleased
110
-
111
- ### Changes
112
-
113
- - Matrix/E2EE: add `klaw matrix encryption setup` to enable Matrix encryption, bootstrap recovery, and print verification status from one setup flow. Thanks @gumadeiras.
114
-
115
- ### Fixes
116
-
117
- - Matrix/E2EE: close the owner-side device verification loop when SAS lands via the CLI. `verify confirm-sas` now (1) awaits the rust-crypto verifier promise so the done-exchange and any cross-signing uploads triggered by `crossSignDevice` settle before the verb returns, (2) cross-signs the bot device on the auto-confirmed inbound SAS path (previously skipped), and (3) calls `trustOwnIdentityAfterSelfVerification` from the standalone `confirmMatrixVerificationSas` action so the operator's Element X clears the "Verify" prompt without waiting for a passive sync tick [AI-assisted]. Thanks @nklock.
118
- - Matrix/E2EE: stabilize recovery and broken-device QA flows while avoiding device-cleanup sync races that could leave shutdown-time crypto work running. Thanks @gumadeiras.
119
-
120
- ## 2026.4.25
121
-
122
- ### Changes
123
-
124
- - Version alignment with core Klaw release numbers.
125
-
126
- ## 2026.4.20
127
-
128
- ### Changes
129
-
130
- - Version alignment with core Klaw release numbers.
131
-
132
- ## 2026.4.19-beta.1
133
-
134
- ### Changes
135
-
136
- - Version alignment with core Klaw release numbers.
137
-
138
- This file tracks Matrix-related release notes for the local `@klaw/matrix`
139
- plugin since the `matrix-js-sdk` migration. Source release notes live in
140
- `../../changelog.md`; exact repeated entries inside the same version are
141
- collapsed here.
142
-
143
- ## 2026.4.15-beta.2
144
-
145
- ### Fixes
146
-
147
- - Matrix/pairing: block DM pairing-store entries from authorizing room control commands [AI-assisted]. (#67294) Thanks @pgondhi987.
148
- - Docker/build: verify `@matrix-org/matrix-sdk-crypto-nodejs` native bindings with `find` under `node_modules` instead of a hardcoded `.pnpm/...` path so pnpm v10+ virtual-store layouts no longer fail the image build. (#67143) thanks @ly85206559.
149
- - Matrix/E2EE: keep startup bootstrap conservative for passwordless token-auth bots, still attempt the guarded repair pass without requiring `channels.matrix.password`, and document the remaining password-UIA limitation. (#66228) Thanks @SARAMALI15792.
150
- - Matrix/commands: skip DM pairing-store reads on room traffic now that room control-command authorization ignores pairing-store entries, keeping the room path narrower without changing room auth behavior. (#67325) Thanks @gumadeiras.
151
-
152
- ## 2026.4.15-beta.1
153
-
154
- ### Changes
155
-
156
- - QA/Matrix: split Matrix live QA into a source-linked `qa-matrix` runner and keep repo-private `qa-*` surfaces out of packaged and published builds. (#66723) Thanks @gumadeiras.
157
-
158
- ### Fixes
159
-
160
- - Matrix/security: normalize sandboxed profile avatar params, preserve `mxc://` avatar URLs, and surface gmail watcher stop failures during reload. (#64701) Thanks @slepybear.
161
- - Docker/build: verify `@matrix-org/matrix-sdk-crypto-nodejs` native bindings with `find` under `node_modules` instead of a hardcoded `.pnpm/...` path so pnpm v10+ virtual-store layouts no longer fail the image build. (#67143) Thanks @ly85206559.
162
- - Matrix/E2EE: keep startup bootstrap conservative for passwordless token-auth bots, still attempt the guarded repair pass without requiring `channels.matrix.password`, and document the remaining password-UIA limitation. (#66228) Thanks @SARAMALI15792.
163
- - Matrix/commands: skip DM pairing-store reads on room traffic now that room control-command authorization ignores pairing-store entries, keeping the room path narrower without changing room auth behavior. (#67325) Thanks @gumadeiras.
164
- - Matrix/security: block DM pairing-store entries from authorizing room control commands. (#67294) Thanks @pgondhi987.
165
-
166
- ## 2026.4.12
167
-
168
- ### Changes
169
-
170
- - Matrix/partial streaming: add MSC4357 live markers to draft preview sends and edits so supporting Matrix clients can render a live/typewriter animation and stop it when the final edit lands. (#63513) Thanks @TigerInYourDream.
171
-
172
- ### Fixes
173
-
174
- - Matrix/mentions: keep room mention gating strict while accepting visible `@displayName` Matrix URI labels, so `requireMention` works for non-Klaw Matrix clients again. (#64796) Thanks @hclsys.
175
- - Channels/replay dedupe: standardize replay claims, retryable-failure release, and post-success commit behavior across Telegram, Discord, Slack, Mattermost, WhatsApp, Matrix, LINE, Feishu, Zalo, Nextcloud Talk, TLON, Nostr, Voice Call, and shared plugin interactive callbacks so duplicate deliveries stay reply-once after success but retry cleanly after pre-delivery failures. Thanks @vincentkoc.
176
-
177
- ## 2026.4.10
178
-
179
- ### Changes
180
-
181
- - QA/Matrix: add a live `klaw qa matrix` lane backed by a disposable Matrix homeserver, shared live-transport seams, and Matrix-specific transport coverage for threading, reactions, restart, and allowlist behavior. (#64489) Thanks @gumadeiras.
182
- - Matrix/partial streaming: add MSC4357 live markers to draft preview sends and edits so supporting Matrix clients can render a live/typewriter animation and stop it when the final edit lands. (#63513) Thanks @TigerInYourDream.
183
-
184
- ### Fixes
185
-
186
- - Gateway/thread routing: preserve Slack, Telegram, Mattermost, Matrix, ACP, restart-sentinel, and agent announce delivery targets so subagent, cron, stream-relay, session fallback, and restart messages land back in the originating thread, topic, or room casing. (#54840, #57056, #63143, #63228, #63506, #64343, #64391)
187
- - Matrix: keep multi-account room scoping consistent, keep packaged crypto migrations warning-only when appropriate, preserve ordered block streaming, add explicit Matrix block-streaming opt-in, and resolve verification/bootstrap from the packaged runtime entry. (#58449, #59249, #59266, #64373) Thanks @gumadeiras.
188
- - Matrix/migration: keep packaged warning-only crypto migrations from being misclassified as actionable when only helper chunks are present, so startup and doctor stay on the warning-only path instead of creating unnecessary migration snapshots. (#64373) Thanks @gumadeiras.
189
- - Matrix/ACP thread bindings: preserve canonical room casing and parent conversation routing during ACP session spawn so mixed-case room ids bind correctly from top-level rooms and existing Matrix threads. (#64343) Thanks @gumadeiras.
190
-
191
- ## 2026.4.9
192
-
193
- ### Fixes
194
-
195
- - Matrix/gateway: wait for Matrix sync readiness before marking startup successful, keep Matrix background handler failures contained, and route fatal Matrix sync stops through channel-level restart handling instead of crashing the whole gateway. (#62779) Thanks @gumadeiras.
196
- - Matrix/doctor: migrate legacy `channels.matrix.dm.policy: "trusted"` configs back to compatible DM policies during `klaw doctor --fix`, preserving explicit `allowFrom` boundaries as `allowlist` and defaulting empty legacy configs to `pairing`. (#62942) Thanks @lukeboyett.
197
-
198
- ## 2026.4.8
199
-
200
- ### Fixes
201
-
202
- - Bundled channels/setup: load shared secret contracts through packaged top-level sidecars across Feishu, Google Chat, IRC, Matrix, Mattermost, Microsoft Teams, Nextcloud Talk, Slack, and Zalo so installed npm builds no longer rely on missing `dist/extensions/*/src/*` files during gateway startup.
203
-
204
- ## 2026.4.7
205
-
206
- ### Fixes
207
-
208
- - Matrix/onboarding: add an invite auto-join setup step with explicit off warnings and strict stable-target validation so new Matrix accounts stop silently ignoring invited rooms and fresh DM-style invites unless operators opt in. (#62168) Thanks @gumadeiras.
209
- - Matrix/formatting: preserve multi-paragraph and loose-list rendering in Element so numbered and bulleted Markdown keeps their content attached to the correct list item. (#60997) Thanks @gucasbrg.
210
- - Matrix/agents: hide owner-only `set-profile` from embedded agent channel-action discovery so non-owner runs stop advertising profile updates they cannot execute. (#62662) Thanks @eleqtrizit.
211
-
212
- ## 2026.4.5
213
-
214
- ### Changes
215
-
216
- - Matrix/exec approvals: add Matrix-native exec approval prompts with account-scoped approvers, channel-or-DM delivery, and room-thread aware resolution handling. (#58635) Thanks @gumadeiras.
217
- - Matrix/exec approvals: clarify unavailable-approval replies so Matrix no longer claims chat approvals are unsupported when native exec approvals are merely unconfigured. (#61424) Thanks @gumadeiras.
218
-
219
- ### Fixes
220
-
221
- - Matrix/exec approvals: anchor seeded approval reactions to the primary Matrix prompt event, resolve them from event metadata instead of prompt text, and clean up chunked approval prompts correctly. (#60931) Thanks @gumadeiras.
222
- - Matrix: recover more reliably when secret storage or recovery keys are missing by recreating secret storage during repair and backup reset, hold crypto snapshot locks during persistence, and surface explicit too-large attachment markers. (#59846, #59851, #60599, #60289) Thanks @al3mart, @emonty, and @efe-arv.
223
- - Matrix/DM sessions: add `channels.matrix.dm.sessionScope`, shared-session collision notices, and aligned outbound session reuse so separate Matrix DM rooms can keep distinct context when configured. (#61373) Thanks @gumadeiras.
224
- - Matrix: move legacy top-level `avatarUrl` into the default account during multi-account promotion and keep env-backed account setup avatar config persisted. (#61437) Thanks @gumadeiras.
225
- - Matrix/streaming: add a quiet preview mode for streamed Matrix replies, keep legacy `partial` preview-first behavior, and finalize quiet media captions correctly so previews stop notifying early without dropping final text semantics. (#61450) Thanks @gumadeiras.
226
- - Matrix: keep direct transport requests on the pinned dispatcher by routing them through undici runtime fetch, so Matrix clients resume syncing on newer runtimes without dropping the validated address binding. (#61595) Thanks @gumadeiras.
227
- - Matrix: avoid failing startup when token auth already knows the user ID but still needs optional device metadata, retry transient auth bootstrap requests, and backfill missing device IDs after startup while keeping unknown-device storage reuse conservative until metadata is repaired. (#61383) Thanks @gumadeiras.
228
- - Matrix: pass configured `deviceId` through health probes and keep probe-only client setup out of durable Matrix storage, so health checks preserve the correct device identity without rewriting `storage-meta.json` or related probe state on disk. (#61581) Thanks @MoerAI.
229
- - Matrix/plugin loading: ship and source-load the crypto bootstrap runtime sidecar correctly so current `main` stops warning about failed Matrix bootstrap loads and `matrix/index` plugin-id mismatches on every invocation. (#53298) thanks @keithce.
230
- - Plugins/Matrix: mirror the Matrix crypto WASM runtime dependency into the root packaged install and enforce root/plugin dependency parity so bundled Matrix E2EE crypto resolves correctly in shipped builds. (#57163) Thanks @gumadeiras.
231
- - Plugins/CLI: add descriptor-backed lazy plugin CLI registration so Matrix can keep its CLI module lazy-loaded without dropping `klaw matrix ...` from parse-time command registration. (#57165) Thanks @gumadeiras.
232
- - Matrix/delivery recovery: treat Synapse `User not in room` replay failures as permanent during startup recovery so poisoned queued messages move to `failed/` instead of crash-looping Matrix after restart. (#57426) thanks @dlardo.
233
- - Doctor/plugins: skip false Matrix legacy-helper warnings when no migration plans exist, and keep bundled `enabledByDefault` plugins in the gateway startup set. (#57931) Thanks @dinakars777.
234
- - Matrix/CLI send: start one-off Matrix send clients before outbound delivery so `klaw message send --channel matrix` restores E2EE in encrypted rooms instead of sending plain events. (#57936) Thanks @gumadeiras.
235
- - Matrix/direct rooms: stop trusting remote `is_direct`, honor explicit local `is_direct: false` for discovered DM candidates, and avoid extra member-state lookups for shared rooms so DM routing and repair stay aligned. (#57124) Thanks @w-sss.
236
- - Matrix/direct rooms: recover fresh auto-joined 1:1 DMs without eagerly persisting invite-only `m.direct` mappings, while keeping named, aliased, and explicitly configured rooms on the room path. (#58024) Thanks @gumadeiras.
237
-
238
- ## 2026.4.2
239
-
240
- ### Changes
241
-
242
- - Matrix/plugin: emit spec-compliant `m.mentions` metadata across text sends, media captions, edits, poll fallback text, and action-driven edits so Matrix mentions notify reliably in clients like Element. (#59323) Thanks @gumadeiras.
243
-
244
- ## 2026.4.1-beta.1
245
-
246
- ### Notes
247
-
248
- - Matrix/onboarding: restore guided setup in `klaw channels add` and `klaw configure --section channels`, while keeping custom plugin wizards on the shared `setupWizard` seam. (#59462) Thanks @gumadeiras.
249
- - Matrix/streaming: keep live partial previews for the current assistant block while preserving completed block updates as separate messages when `channels.matrix.blockStreaming` is enabled. (#59384) Thanks @gumadeiras.
250
-
251
- ## 2026.3.31
252
-
253
- ### Changes
254
-
255
- - Matrix/history: add optional room history context for Matrix group triggers via `channels.matrix.historyLimit`, with per-agent watermarks and retry-safe snapshots so failed trigger retries do not drift into newer room messages. (#57022) thanks @chain710.
256
- - Matrix/network: add explicit `channels.matrix.proxy` config for routing Matrix traffic through an HTTP(S) proxy, including account-level overrides and matching probe/runtime behavior. (#56931) thanks @patrick-yingxi-pan.
257
- - Matrix/streaming: add draft streaming so partial Matrix replies update the same message in place instead of sending a new message for each chunk. (#56387) Thanks @jrusz.
258
- - Matrix/threads: add per-DM `threadReplies` overrides and keep thread session isolation aligned with the effective room or DM thread policy from the triggering message onward. (#57995) thanks @teconomix.
259
-
260
- ### Fixes
261
-
262
- - Doctor/plugins: skip false Matrix legacy-helper warnings when no migration plans exist, and keep bundled `enabledByDefault` plugins in the gateway startup set. (#57931) Thanks @dinakars777.
263
-
264
- ## 2026.3.31-beta.1
265
-
266
- ### Fixes
267
-
268
- - Matrix/CLI send: start one-off Matrix send clients before outbound delivery so `klaw message send --channel matrix` restores E2EE in encrypted rooms instead of sending plain events. (#57936) Thanks @gumadeiras.
269
- - Matrix/context: filter fetched room context by sender allowlists so reply and thread context lookup no longer pulls non-allowlisted messages into agent context. (#58376) Thanks @jacobtomlinson.
270
- - Matrix/delivery recovery: treat Synapse `User not in room` replay failures as permanent during startup recovery so poisoned queued messages move to `failed/` instead of crash-looping Matrix after restart. (#57426) thanks @dlardo.
271
- - Matrix/direct rooms: recover fresh auto-joined 1:1 DMs without eagerly persisting invite-only `m.direct` mappings, while keeping named, aliased, and explicitly configured rooms on the room path. (#58024) Thanks @gumadeiras.
272
- - Matrix/direct rooms: stop trusting remote `is_direct`, honor explicit local `is_direct: false` for discovered DM candidates, and avoid extra member-state lookups for shared rooms so DM routing and repair stay aligned. (#57124) Thanks @w-sss.
273
- - Matrix/DM threads: keep strict unnamed fresh-invite rooms promotable even when Matrix omits the optional direct hint, preserve repair-failed local DM promotions while still revalidating later room metadata, and keep both bound and thread-isolated Matrix sessions reporting the correct route policy. (#58099) Thanks @gumadeiras.
274
- - Matrix/plugin loading: ship and source-load the crypto bootstrap runtime sidecar correctly so current `main` stops warning about failed Matrix bootstrap loads and `matrix/index` plugin-id mismatches on every invocation. (#53298) thanks @keithce.
275
- - Plugins/CLI: add descriptor-backed lazy plugin CLI registration so Matrix can keep its CLI module lazy-loaded without dropping `klaw matrix ...` from parse-time command registration. (#57165) Thanks @gumadeiras.
276
- - Plugins/Matrix: mirror the Matrix crypto WASM runtime dependency into the root packaged install and enforce root/plugin dependency parity so bundled Matrix E2EE crypto resolves correctly in shipped builds. (#57163) Thanks @gumadeiras.
277
-
278
- ## 2026.3.28
279
-
280
- ### Changes
281
-
282
- - Plugins/Matrix TTS: send auto-TTS replies as native Matrix voice bubbles instead of generic audio attachments. (#37080) thanks @Matthew19990919.
283
-
284
- ### Fixes
285
-
286
- - Matrix/replies: include quoted poll question/options in inbound reply context so the agent sees the original poll content when users reply to Matrix poll messages. (#55056) Thanks @alberthild.
287
- - Matrix/plugins: keep plugin bootstrap from crashing when built runtime mixes bare and deep `matrix-js-sdk` entrypoints, so unrelated channels do not get taken down during plugin load. (#56273) Thanks @aquaright1.
288
- - Matrix: keep separate 2-person rooms out of DM routing after `m.direct` seeds successfully, while still honoring explicit `is_direct` state and startup fallback recovery. (#54890) thanks @private-peter
289
- - Plugins/Matrix: preserve sender filenames for inbound media by forwarding `originalFilename` to `saveMediaBuffer`. (#55692) thanks @esrehmki.
290
- - Matrix/mentions: recognize `matrix.to` mentions whose visible label uses the bot's room display name, so `requireMention: true` rooms respond correctly in modern Matrix clients. (#55393) thanks @nickludlam.
291
- - Plugins/Matrix: prefer explicit DM signals when choosing outbound direct rooms and routing unmapped verification summaries, so strict 2-person fallback rooms do not outrank the real DM. (#56076) thanks @gumadeiras
292
- - Plugins/Matrix: resolve env-backed `accessToken` and `password` SecretRefs against the active Matrix config env path during startup, and officially accept SecretRef `accessToken` config values. (#54980) thanks @kakahu2015.
293
- - Plugins/Matrix: load bundled `@matrix-org/matrix-sdk-crypto-nodejs` through `createRequire(...)` so E2EE media send and receive keep the package-local native binding lookup working in packaged ESM builds. (#54566) thanks @joelnishanth.
294
- - Plugins/Matrix: encrypt E2EE image thumbnails with `thumbnail_file` while keeping unencrypted-room previews on `thumbnail_url`, so encrypted Matrix image events keep thumbnail metadata without leaking plaintext previews. (#54711) thanks @frischeDaten.
295
-
296
- ## 2026.3.23
297
-
298
- ### Fixes
299
-
300
- - Plugins/bundled runtimes: ship bundled plugin runtime sidecars like WhatsApp `light-runtime-api.js`, Matrix `runtime-api.js`, and other plugin runtime entry files in the npm package again, so global installs stop failing on missing bundled plugin runtime surfaces.
301
- - Plugins/Matrix: avoid duplicate `resolveMatrixAccountStringValues` runtime-api exports under source loaders so bundled Matrix installs no longer crash at startup with `Cannot redefine property: resolveMatrixAccountStringValues`. Fixes #52909 and #52891. Thanks @vincentkoc.
302
-
303
- ## 2026.3.22
304
-
305
- ### Breaking
306
-
307
- - Plugins/Matrix: add a new Matrix plugin backed by the official `matrix-js-sdk`. If you are upgrading from the previous public Matrix plugin, follow the migration guide: https://klaw.kodelyth.com/install/migrating-matrix Thanks @gumadeiras.
308
- - Plugins/Matrix: stop mention-gated or otherwise dropped room chatter from refreshing focused thread bindings before the message is actually routed, so idle ACP and session bindings can still expire normally in mention-required rooms. Thanks @vincentkoc, @dinakars777 and @mvanhorn.
309
- - Plugins/Matrix: durably dedupe inbound room events across gateway restarts so previously handled Matrix messages are not replayed as new, while preserving clean-restart backlog delivery for unseen events. (#50922) thanks @gumadeiras
310
-
311
- ### Changes
312
-
313
- - Plugins/Matrix: add `allowBots` room policy so configured Matrix bot accounts can talk to each other, with optional mention-only gating. Thanks @gumadeiras.
314
- - Plugins/Matrix: add per-account `allowPrivateNetwork` opt-in for private/internal homeservers, while keeping public cleartext homeservers blocked. Thanks @gumadeiras.
315
-
316
- ### Fixes
317
-
318
- - Plugins/Matrix: move bundled plugin `KeyedAsyncQueue` imports onto the stable `plugin-sdk/core` surface so Matrix Docker/runtime builds do not depend on the brittle keyed-async-queue subpath. Thanks @ecohash-co and @vincentkoc.
319
- - Doctor/extensions: keep Matrix DM `allowFrom` repairs on the canonical `dm.allowFrom` path and stop treating Zalouser group sender gating as if it fell back to `allowFrom`, so doctor warnings and `--fix` stay aligned with runtime access control. Thanks @vincentkoc.
320
- - Matrix: make onboarding status runtime-safe (#49995) Thanks @joshavant.
321
- - Plugins/Matrix: accept shared send-tool media aliases (`mediaUrl`, `filePath`, `path`) and preserve `asVoice` / `audioAsVoice` through Matrix action dispatch so media-only sends and voice-message intents reach the plugin send layer correctly. Thanks @psacc and @vincentkoc.
package/SPEC-SUPPORT.md DELETED
@@ -1,116 +0,0 @@
1
- # Matrix Spec Support
2
-
3
- Current Matrix spec/event support tracked for the bundled Matrix plugin.
4
-
5
- Scope:
6
-
7
- - code-backed today-state only
8
- - plugin behavior only; not a claim of full Matrix spec coverage
9
- - update this file when adding or removing Matrix event/spec support
10
-
11
- Legend:
12
-
13
- - `in`: inbound handling
14
- - `out`: outbound send/edit/emit
15
- - `tools`: CLI/action/runtime tooling built on that surface
16
-
17
- ## Support Matrix
18
-
19
- | Surface | Spec / event ids | Support | Notes | Evidence |
20
- | ------------------------ | -------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
21
- | Core messages | `m.room.message` | in/out/tools | base text/media message surface | `src/matrix/send/types.ts`, `src/matrix/actions/messages.ts` |
22
- | Rich text | `org.matrix.custom.html` | out | Markdown rendered to Matrix HTML | `src/matrix/send/formatting.ts` |
23
- | Replies | `m.in_reply_to` | in/out | reply relation support | `src/matrix/send/formatting.ts` |
24
- | Edits | `m.replace` | in/out/tools | Matrix edit flow; edit body uses `* <text>` fallback format | `src/matrix/send/types.ts`, `src/matrix/draft-stream.test.ts` |
25
- | Threads | `m.thread` | in/out/tools | thread send, routing, session/thread policy | `src/matrix/send/types.ts`, `src/matrix/monitor/types.ts`, `src/matrix/monitor/threads.test.ts` |
26
- | Direct rooms | `m.direct` | in/out/tools | DM routing, cache, repair, outbound target selection | `src/matrix/send/types.ts`, `src/matrix/sdk.ts`, `src/matrix/send/targets.test.ts`, `src/matrix/direct-management.test.ts` |
27
- | Reactions | `m.reaction`, `m.annotation` | in/out/tools | send, summarize, inbound reaction routing | `src/matrix/reaction-common.ts`, `src/matrix/monitor/reaction-events.test.ts` |
28
- | Read receipts | `m.read` | out | sent on inbound message receipt | `src/matrix/sdk.ts`, `src/matrix/monitor/handler.ts` |
29
- | Typing | typing API | out | typing keepalive while reply runs | `src/matrix/sdk.ts`, `src/matrix/send.ts`, `src/matrix/monitor/handler.ts` |
30
- | Mentions | `m.mentions` | in/out/tools | stable mention metadata on sends/edits/media captions/poll fallback text | `src/matrix/send/formatting.ts`, `src/matrix/monitor/mentions.ts`, `src/matrix/send.test.ts` |
31
- | Mention link compat | `https://matrix.to/#/...` | in/out | emit + validate visible-label mentions in formatted HTML | `src/matrix/format.ts`, `src/matrix/monitor/mentions.ts` |
32
- | Polls | `m.poll.start`, `m.poll.response`, `m.poll.end` | in/out/tools | stable poll create/read/vote/summary flow | `src/matrix/poll-types.ts`, `src/matrix/actions/polls.ts`, `src/matrix/poll-summary.ts` |
33
- | Poll compat | `org.matrix.msc3381.poll.start`, `org.matrix.msc3381.poll.response`, `org.matrix.msc3381.poll.end` | in/out | unstable poll compat still emitted/parsed where needed | `src/matrix/poll-types.ts`, `src/matrix/send.test.ts` |
34
- | Poll relations | `m.reference` | in/out/tools | poll votes/results linked to root poll event | `src/matrix/poll-types.ts`, `src/matrix/actions/polls.ts`, `src/matrix/poll-summary.ts` |
35
- | Extensible text fallback | `org.matrix.msc1767.text` | in/out | poll text fallback/compat | `src/matrix/poll-types.ts` |
36
- | Voice messages | `org.matrix.msc3245.voice` | out | voice-bubble marker on compatible audio sends | `src/matrix/send/media.ts`, `src/matrix/send/types.ts` |
37
- | Voice audio metadata | `org.matrix.msc1767.audio` | out | duration metadata for voice sends | `src/matrix/send/media.ts`, `src/matrix/send/types.ts` |
38
- | Location | `m.location`, `geo:` | in | inbound parse to text/context; no outbound location send tracked here | `src/matrix/monitor/types.ts`, `src/matrix/monitor/location.ts`, `src/matrix/monitor/handler.ts` |
39
- | E2EE room events | `m.room.encrypted` | in/out/tools | encrypted event hydration, decrypt, encrypted media send | `src/matrix/monitor/types.ts`, `src/matrix/sdk.ts`, `docs/channels/matrix.md` |
40
- | Encrypted media previews | `file`, `thumbnail_file` | out | encrypted thumbnails for encrypted image events | `src/matrix/send/media.ts`, `docs/channels/matrix.md` |
41
- | Device verification | `m.key.verification.*`, `m.key.verification.request` | in/tools | request/ready/start/SAS/done/cancel notices and CLI flows | `src/matrix/monitor/verification-utils.ts`, `src/matrix/monitor/events.test.ts`, `docs/channels/matrix.md` |
42
- | Streaming/live markers | `org.matrix.msc4357.live` | out | live draft/edit markers for partial streaming | `src/matrix/send/types.ts`, `src/matrix/send.ts`, `src/matrix/draft-stream.ts` |
43
-
44
- ## Explicit MSCs In Use
45
-
46
- These MSCs are explicitly referenced in the plugin today:
47
-
48
- - `MSC3381`: polls
49
- - `MSC1767`: extensible-events fallback fields used for polls and voice metadata
50
- - `MSC3245`: voice message marker
51
- - `MSC4357`: live streaming marker
52
-
53
- Evidence:
54
-
55
- - `src/matrix/poll-types.ts`
56
- - `src/matrix/send/media.ts`
57
- - `src/matrix/send/types.ts`
58
- - `src/matrix/draft-stream.ts`
59
-
60
- ## Non-goals
61
-
62
- This file does not claim:
63
-
64
- - full client-server API coverage
65
- - full room-state/event coverage inherited from `matrix-js-sdk`
66
- - outbound support for any surface not listed above
67
-
68
- If a new Matrix feature lands, add a row with:
69
-
70
- 1. exact event/spec id
71
- 2. support shape (`in`, `out`, `tools`)
72
- 3. at least one code path proving it
73
-
74
- ## Missing / Candidate Specs
75
-
76
- Recommended next additions, prioritized by user-visible value and closeness to current code:
77
-
78
- | Priority | Surface | Spec / event ids | Why add it | Current gap |
79
- | -------- | ----------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
80
- | high | Sticker messages | `m.sticker` | stable spec; common client surface; we already classify sticker attachments on read paths | no explicit inbound `m.sticker` event handling and no outbound sticker send path |
81
- | high | Outbound location messages | `m.location`, `geo_uri` | stable spec; docs already say Matrix supports location, but current implementation is inbound-only | no outbound location send/action API |
82
- | medium | Private + richer read markers | `m.read.private`, `m.fully_read` | stable spec; better privacy and cleaner read-state behavior than public-only `m.read` | current code only sends public `m.read` receipts |
83
- | medium | Thread-aware receipts | `m.read` with `thread_id` | stable spec; better alignment with Matrix thread UX | current receipt send path has no `thread_id` support |
84
- | medium | Unread markers | `m.marked_unread` | stable spec; useful for operator workflows and room triage tooling | no room account-data support for unread markers |
85
- | low | Emote messages | `m.emote` | stable spec; easy parity win for bots/action tools | no explicit send/action support |
86
- | low | Poll close parity | `m.poll.end`, `org.matrix.msc3381.poll.end` | completes the poll lifecycle on a surface we already parse | plugin parses poll-end events but does not expose an outbound close flow |
87
- | low | Animated media metadata | `info.is_animated` on `m.image` / `m.sticker` | newer stable metadata; helps clients decide whether to fetch/render animated originals | media info builders do not populate animation metadata |
88
-
89
- ### Why these are listed
90
-
91
- - `m.sticker` is a stable spec surface in the latest Matrix Client-Server API, and the plugin already has partial sticker awareness in message summarization.
92
- - `m.location` is a stable spec surface in the latest Matrix Client-Server API. The plugin currently parses inbound location events from `geo_uri`, but does not send them.
93
- - `m.read.private`, `m.fully_read`, and threaded receipts are stable read-marker/read-receipt surfaces in the latest Matrix Client-Server API. The plugin currently posts plain `m.read` receipts only.
94
- - `m.marked_unread` is a stable room account-data surface in the latest Matrix Client-Server API and would be useful if Matrix actions grow more operator/client-like room triage controls.
95
- - `m.emote` is a stable message type and a relatively small addition compared with the items above.
96
- - `m.poll.end` is already represented in local poll types, so exposing a close-poll send/tool flow is a contained follow-up.
97
- - `info.is_animated` is a smaller metadata-parity item, but easy to miss once sticker support exists.
98
-
99
- ### Probably not worth prioritizing here
100
-
101
- - VoIP / `m.call.*`: valid Matrix spec area and a plausible future direction here, just not a near-term priority relative to messaging, receipt, and room-state gaps.
102
-
103
- ### Gap Evidence
104
-
105
- - sticker partial only: `src/matrix/media-text.ts`
106
- - location inbound only: `src/matrix/monitor/location.ts`, `src/matrix/monitor/handler.ts`
107
- - public receipt only: `src/matrix/sdk.ts`, `src/matrix/send.ts`, `src/matrix/monitor/handler.ts`
108
- - poll-end constants only: `src/matrix/poll-types.ts`
109
- - no animation metadata emit: `src/matrix/send/media.ts`
110
-
111
- ### External Spec References
112
-
113
- - latest Matrix Client-Server API: <https://spec.matrix.org/latest/client-server-api/index.html>
114
- - `m.sticker`: <https://spec.matrix.org/latest/client-server-api/#msticker>
115
- - `m.location`: <https://spec.matrix.org/latest/client-server-api/#mlocation>
116
- - receipts and read markers (`m.read.private`, `m.fully_read`, `m.marked_unread`): <https://spec.matrix.org/latest/client-server-api/#receipts>
package/api.ts DELETED
@@ -1,38 +0,0 @@
1
- export { matrixPlugin } from "./src/channel.js";
2
- export { createMatrixSetupWizardProxy, matrixSetupAdapter } from "./src/setup-core.js";
3
- export { matrixOnboardingAdapter } from "./src/setup-surface.js";
4
- export {
5
- findMatrixAccountEntry,
6
- requiresExplicitMatrixDefaultAccount,
7
- resolveConfiguredMatrixAccountIds,
8
- resolveMatrixChannelConfig,
9
- resolveMatrixDefaultOrOnlyAccountId,
10
- } from "./src/account-selection.js";
11
- export {
12
- getMatrixScopedEnvVarNames,
13
- listMatrixEnvAccountIds,
14
- resolveMatrixEnvAccountToken,
15
- } from "./src/env-vars.js";
16
- export {
17
- hashMatrixAccessToken,
18
- resolveMatrixAccountStorageRoot,
19
- resolveMatrixCredentialsDir,
20
- resolveMatrixCredentialsFilename,
21
- resolveMatrixCredentialsPath,
22
- resolveMatrixHomeserverKey,
23
- resolveMatrixLegacyFlatStoragePaths,
24
- resolveMatrixLegacyFlatStoreRoot,
25
- sanitizeMatrixPathSegment,
26
- } from "./src/storage-paths.js";
27
- export {
28
- createMatrixThreadBindingManager,
29
- getMatrixThreadBindingManager,
30
- resetMatrixThreadBindingsForTests,
31
- } from "./src/matrix/thread-bindings.js";
32
- export {
33
- setMatrixThreadBindingIdleTimeoutBySessionKey,
34
- setMatrixThreadBindingMaxAgeBySessionKey,
35
- } from "./src/matrix/thread-bindings-shared.js";
36
- export { matrixOnboardingAdapter as matrixSetupWizard } from "./src/onboarding.js";
37
-
38
- export const matrixSessionBindingAdapterChannels = ["matrix"] as const;
package/auth-presence.ts DELETED
@@ -1,56 +0,0 @@
1
- import fs from "node:fs";
2
- import os from "node:os";
3
- import path from "node:path";
4
- import type { KlawConfig } from "klaw/plugin-sdk/config-contracts";
5
- import { resolveStateDir } from "klaw/plugin-sdk/state-paths";
6
- import {
7
- resolveMatrixCredentialsDir,
8
- resolveMatrixCredentialsFilename,
9
- } from "./src/storage-paths.js";
10
-
11
- type MatrixAuthPresenceParams =
12
- | {
13
- cfg: KlawConfig;
14
- env?: NodeJS.ProcessEnv;
15
- }
16
- | KlawConfig;
17
-
18
- function listMatrixCredentialPaths(
19
- _cfg: KlawConfig,
20
- env: NodeJS.ProcessEnv = process.env,
21
- ): readonly string[] {
22
- const credentialsDir = resolveMatrixCredentialsDir(resolveStateDir(env, os.homedir));
23
- const paths = new Set<string>([
24
- resolveMatrixCredentialsFilename(),
25
- resolveMatrixCredentialsFilename("default"),
26
- ]);
27
-
28
- try {
29
- const entries = fs.readdirSync(credentialsDir, { withFileTypes: true });
30
- for (const entry of entries) {
31
- if (entry.isFile() && /^credentials(?:-[a-z0-9._-]+)?\.json$/i.test(entry.name)) {
32
- paths.add(entry.name);
33
- }
34
- }
35
- } catch {
36
- // Missing credentials directories mean no persisted Matrix auth state.
37
- }
38
-
39
- return [...paths].map((filename) => path.join(credentialsDir, filename));
40
- }
41
-
42
- export function hasAnyMatrixAuth(
43
- params: MatrixAuthPresenceParams,
44
- env: NodeJS.ProcessEnv = process.env,
45
- ): boolean {
46
- const cfg = params && typeof params === "object" && "cfg" in params ? params.cfg : params;
47
- const resolvedEnv =
48
- params && typeof params === "object" && "cfg" in params ? (params.env ?? env) : env;
49
- return listMatrixCredentialPaths(cfg, resolvedEnv).some((filePath) => {
50
- try {
51
- return fs.existsSync(filePath);
52
- } catch {
53
- return false;
54
- }
55
- });
56
- }
@@ -1,3 +0,0 @@
1
- // Keep bundled channel entry imports narrow so bootstrap/discovery paths do
2
- // not pull the broad Matrix API barrel into lightweight plugin loads.
3
- export { matrixPlugin } from "./src/channel.js";
package/cli-metadata.ts DELETED
@@ -1,11 +0,0 @@
1
- import { definePluginEntry } from "klaw/plugin-sdk/plugin-entry";
2
- import { registerMatrixCliMetadata } from "./src/cli-metadata.js";
3
-
4
- export { registerMatrixCliMetadata } from "./src/cli-metadata.js";
5
-
6
- export default definePluginEntry({
7
- id: "matrix",
8
- name: "Matrix",
9
- description: "Matrix channel plugin (matrix-js-sdk)",
10
- register: registerMatrixCliMetadata,
11
- });
package/contract-api.ts DELETED
@@ -1,17 +0,0 @@
1
- export {
2
- createMatrixThreadBindingManager,
3
- resetMatrixThreadBindingsForTests,
4
- } from "./src/matrix/thread-bindings.js";
5
- export { setMatrixRuntime } from "./src/runtime.js";
6
- export { normalizeCompatibilityConfig, legacyConfigRules } from "./src/doctor-contract.js";
7
- export {
8
- namedAccountPromotionKeys,
9
- resolveSingleAccountPromotionTarget,
10
- singleAccountKeysToMove,
11
- } from "./src/setup-contract.js";
12
- export {
13
- collectRuntimeConfigAssignments,
14
- secretTargetRegistryEntries,
15
- } from "./src/secret-contract.js";
16
- export { matrixSetupAdapter } from "./src/setup-core.js";
17
- export { matrixSetupWizard } from "./src/setup-surface.js";
@@ -1 +0,0 @@
1
- export { normalizeCompatibilityConfig, legacyConfigRules } from "./src/doctor-contract.js";
package/helper-api.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./src/account-selection.js";
2
- export * from "./src/env-vars.js";
3
- export * from "./src/storage-paths.js";