Skip to content

Adopt mx.api 0.3.0: typing indicator, token self-heal, startup E2EE scan#138

Merged
TroyHernandez merged 2 commits into
mainfrom
feature/adopt-mxapi-030
Jun 10, 2026
Merged

Adopt mx.api 0.3.0: typing indicator, token self-heal, startup E2EE scan#138
TroyHernandez merged 2 commits into
mainfrom
feature/adopt-mxapi-030

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

Three integrations of the 0.3.0 transport surface into the bot loop:

  1. Typing indicator around matrix_run_turn_in_cwd — visible sign of life during seconds-to-minutes turns. Best-effort, never blocks.
  2. Token self-heal — the sync site catches the classed M_UNKNOWN_TOKEN, re-logs in with the stored password (same device_id, preserving any E2EE identity), saves, retries once. Previously a dead token errored every poll.
  3. Startup encrypted-room scanmatrix_crypto_init queries each joined room's m.room.encryption via mx_get_state() instead of waiting for sync mentions; sync-time detection stays as catch-all.

Live-validated (relogin + scan found all 4 encrypted rooms). Suite 2334/0.

…E2EE scan

Three small integrations of the new transport surface:

- matrix_poll() shows a typing indicator while the model generates
  (turns run seconds to minutes; this is the only sign of life the
  other side gets). Best-effort, never blocks the reply.
- An invalidated access token self-heals: the sync call catches the
  classed M_UNKNOWN_TOKEN condition, re-logs in with the stored
  password via matrix_relogin() (same device_id, so an E2EE identity
  survives), persists the refreshed config, and retries once. Before
  this, a dead token errored every poll until someone noticed.
- matrix_crypto_init() scans joined rooms' m.room.encryption state via
  mx_get_state() at startup instead of waiting for a sync to mention
  each room; sync-time detection still runs as a catch-all.

Live-validated: relogin rotated the token with device preserved; the
startup scan found all 4 encrypted rooms. Suite 2334/0.
@TroyHernandez TroyHernandez merged commit 6a50fda into main Jun 10, 2026
4 checks passed
@TroyHernandez TroyHernandez deleted the feature/adopt-mxapi-030 branch June 10, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant