Commit Graph

278 Commits

Author SHA1 Message Date
Gustavo Madeira Santana
57787eec97 Matrix: share started action client helper 2026-03-12 16:47:16 +00:00
Gustavo Madeira Santana
d6b12a3835 Matrix: share config field path helpers 2026-03-12 16:47:15 +00:00
Gustavo Madeira Santana
26da307dc0 Matrix: scope encryption guidance by account 2026-03-12 16:47:15 +00:00
Gustavo Madeira Santana
8aa0044860 Matrix: honor action gates per resolved account 2026-03-12 16:47:15 +00:00
Gustavo Madeira Santana
a9adf774d1 Matrix: share room config normalization 2026-03-12 16:47:15 +00:00
Gustavo Madeira Santana
c69e73de75 Matrix: point room warnings at active config path 2026-03-12 16:47:15 +00:00
Gustavo Madeira Santana
6a53c583e4 Matrix: show account-scoped onboarding paths 2026-03-12 16:47:14 +00:00
Gustavo Madeira Santana
6bfbc4a3ff Matrix: scope onboarding config to selected account 2026-03-12 16:47:14 +00:00
Gustavo Madeira Santana
61260f0b73 Matrix: harden thread binding persistence 2026-03-12 16:47:14 +00:00
Gustavo Madeira Santana
de4d36dc22 Matrix: align reaction routing with thread bindings 2026-03-12 16:47:14 +00:00
Gustavo Madeira Santana
8aed5cae0a Matrix: extract startup maintenance flow 2026-03-12 16:47:13 +00:00
Gustavo Madeira Santana
6ec66d4d0f Matrix: split monitor verification event routing 2026-03-12 16:47:13 +00:00
Gustavo Madeira Santana
5d3a61027a Matrix: remove orphaned inbound body helpers 2026-03-12 16:47:13 +00:00
Gustavo Madeira Santana
6de0456738 Matrix: extract inbound route resolution 2026-03-12 16:47:13 +00:00
Gustavo Madeira Santana
cc5ade5893 Matrix: dedupe monitor handler tests 2026-03-12 16:47:12 +00:00
Gustavo Madeira Santana
fd1d5555ad Matrix: centralize monitor config normalization 2026-03-12 16:47:12 +00:00
Gustavo Madeira Santana
54966deca1 Matrix: extract monitor access state 2026-03-12 16:47:12 +00:00
Gustavo Madeira Santana
0669abdda5 Matrix: remove orphaned send queue 2026-03-12 16:47:12 +00:00
Gustavo Madeira Santana
93114f8918 Matrix: dedupe resolver test harness 2026-03-12 16:47:11 +00:00
Gustavo Madeira Santana
3e3bb5f6f7 Matrix: remove unused internal helpers 2026-03-12 16:47:11 +00:00
Gustavo Madeira Santana
504ce688e5 Matrix: share reusable client bootstrap 2026-03-12 16:47:11 +00:00
Gustavo Madeira Santana
b758666867 Matrix: register thread bindings before client sync 2026-03-12 16:47:11 +00:00
Gustavo Madeira Santana
3541b6f9ea Matrix: harden live directory lookups 2026-03-12 16:47:11 +00:00
Gustavo Madeira Santana
5613ad679d Matrix: centralize target normalization 2026-03-12 16:47:11 +00:00
Gustavo Madeira Santana
9878b4743f Matrix: centralize account config helpers 2026-03-12 16:47:10 +00:00
Gustavo Madeira Santana
4c4b2ba571 Matrix: warn and clean stale managed devices 2026-03-12 16:47:10 +00:00
Gustavo Madeira Santana
df6b6762c0 Matrix: fix verification client lifecycle and quiet CLI noise 2026-03-12 16:47:10 +00:00
Gustavo Madeira Santana
a3573ac71f Matrix: retry cross-signing after secret storage repair 2026-03-12 16:47:10 +00:00
Gustavo Madeira Santana
46cd37bc0d Matrix: repair explicit secret storage bootstrap 2026-03-12 16:47:10 +00:00
Gustavo Madeira Santana
fdf7953226 Matrix: preserve owner-signed verification state 2026-03-12 16:47:09 +00:00
Gustavo Madeira Santana
21f1e903a4 Plugins: scope SDK imports and harden Matrix routing 2026-03-12 16:47:09 +00:00
Gustavo Madeira Santana
e80483ff00 poll and profile fixes 2026-03-12 16:47:09 +00:00
Gustavo Madeira Santana
50568f29d5 Matrix: tighten verification trust and expose profile updates 2026-03-12 16:47:09 +00:00
Gustavo Madeira Santana
0fdc404a2b Matrix: keep default account device fields scoped 2026-03-12 16:47:08 +00:00
Gustavo Madeira Santana
8e962668ce Matrix: replace legacy plugin with new implementation 2026-03-12 16:47:08 +00:00
Peter Steinberger
ce5dd742f8 build: sync versions to 2026.3.11 2026-03-12 04:01:57 +00:00
Peter Steinberger
0e397e62b7 chore: bump version to 2026.3.10 2026-03-11 23:29:53 +00:00
Peter Steinberger
f4a4b50cd5 refactor: compile allowlist matchers 2026-03-11 00:07:47 +00:00
Peter Steinberger
50ded5052f refactor: share channel config schema fragments 2026-03-10 22:18:04 +00:00
Peter Steinberger
4a8e039a5f refactor: share channel config security scaffolding 2026-03-10 22:18:04 +00:00
Peter Steinberger
f6d0712f50 build: sync plugin versions for 2026.3.9 2026-03-09 08:39:52 +00:00
Peter Steinberger
5fca4c0de0 chore: prepare 2026.3.8-beta.1 release 2026-03-09 07:09:37 +00:00
Peter Steinberger
2e79d82198 build: update app deps except carbon 2026-03-09 06:09:33 +00:00
Bronko
d4a960fcca fix(matrix): restore robust DM routing without the memberCount heuristic (#19736)
* fix(matrix): remove memberCount heuristic from DM detection

The memberCount === 2 check in isDirectMessage() misclassifies 2-person
group rooms (admin channels, monitoring rooms) as DMs, routing them to
the main session instead of their room-specific session.

Matrix already distinguishes DMs from groups at the protocol level via
m.direct account data and is_direct member state flags. Both are already
checked by client.dms.isDm() and hasDirectFlag(). The memberCount
heuristic only adds false positives for 2-person groups.

Move resolveMemberCount() below the protocol-level checks so it is only
reached for rooms not matched by m.direct or is_direct. This narrows its
role to diagnostic logging for confirmed group rooms.

Refs: #19739

* fix(matrix): add conservative fallback for broken DM flags

Some homeservers (notably Continuwuity) have broken m.direct account
data or never set is_direct on invite events. With the memberCount
heuristic removed, these DMs are no longer detected.

Add a conservative fallback that requires two signals before classifying
as DM: memberCount === 2 AND no explicit m.room.name. Group rooms almost
always have explicit names; DMs almost never do.

Error handling distinguishes M_NOT_FOUND (missing state event, expected
for unnamed rooms) from network/auth errors. Non-404 errors fall through
to group classification rather than guessing.

This is independently revertable — removing this commit restores pure
protocol-based detection without any heuristic fallback.

* fix(matrix): add parentPeer for DM room binding support

Add parentPeer to DM routes so conversations are bindable by room ID
while preserving DM trust semantics (secure 1:1, no group restrictions).

Suggested by @KirillShchetinin.

* fix(matrix): override DM detection for explicitly configured rooms

Builds on @robertcorreiro's config-driven approach from #9106.

Move resolveMatrixRoomConfig() before the DM check. If a room matches
a non-wildcard config entry (matchSource === "direct") and was
classified as DM, override the classification to group. This gives users
a deterministic escape hatch for misclassified rooms.

Wildcards are excluded from the override to avoid breaking DM routing
when a "*" catch-all exists. roomConfig is gated behind isRoom so DMs
never inherit group settings (skills, systemPrompt, autoReply).

This commit is independently droppable if the scope is too broad.

* test(matrix): add DM detection and config override tests

- 15 unit tests for direct.ts: all detection paths, priority order,
  M_NOT_FOUND vs network error handling, edge cases (whitespace names,
  API failures)
- 8 unit tests for rooms.ts: matchSource classification, wildcard
  safety for DM override, direct match priority over wildcard

* Changelog: note matrix DM routing follow-up

* fix(matrix): preserve DM fallback and room bindings

---------

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-08 23:26:48 -05:00
Peter Steinberger
141738f717 refactor: harden browser runtime profile handling 2026-03-09 00:25:43 +00:00
Peter Steinberger
8d7778d1d6 refactor: dedupe plugin runtime stores 2026-03-08 23:38:24 +00:00
Peter Steinberger
64d4d9aabb refactor: move bundled extension gap allowlists into manifests 2026-03-08 18:26:35 +00:00
Peter Steinberger
05217845a7 build: bump version to 2026.3.8 2026-03-08 05:59:04 +00:00
Vincent Koc
4b0d55dadf Matrix: use scoped plugin SDK resolve-target imports 2026-03-07 16:26:59 -08:00
Vincent Koc
4b02a4eacf Matrix: use scoped plugin SDK channel imports 2026-03-07 16:26:59 -08:00