Adopt mx.api 0.3.0: typing indicator, token self-heal, startup E2EE scan#138
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three integrations of the 0.3.0 transport surface into the bot loop:
matrix_run_turn_in_cwd— visible sign of life during seconds-to-minutes turns. Best-effort, never blocks.M_UNKNOWN_TOKEN, re-logs in with the stored password (samedevice_id, preserving any E2EE identity), saves, retries once. Previously a dead token errored every poll.matrix_crypto_initqueries each joined room'sm.room.encryptionviamx_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.