docs(matrix): fix invite-wake mechanism and todo message format

This commit is contained in:
iris 2026-08-15 12:17:32 +02:00 committed by mara
commit 3e9d7c68d8

View file

@ -114,17 +114,21 @@ The same per-room breakdown is included in the `UnreadMatrix` entry
returned by `get_loose_ends` so unread rooms surface in the
loose-ends list between turns.
**Invite wakes**: when the daemon's sync loop receives an
`m.room.member` invite event, it upserts a todo (keyed `invite:<room>`)
on the harness's in-agent socket, which drives a turn. The daemon does
**not** auto-join — the agent calls `list_invites` to see pending
invites and `resolve_invite` to accept or reject them.
**Invite wakes**: the daemon sweeps `invited_rooms()` after every sync
callback (deliberately not a one-shot `m.room.member` event handler —
a one-shot signal that raced a socket-down window was dropped with no
retry, leaving the agent deaf until manually prompted) and upserts a
todo (keyed `invite:<room>`) for each pending invite on the harness's
in-agent socket, which drives a turn. The daemon does **not**
auto-join — the agent calls `list_invites` to see pending invites and
`resolve_invite` to accept or reject them.
**Pending invites as loose ends**: pending invites are upserted as
keyed todos and appear in `get_loose_ends` output as
`[matrix] pending invite: <room> — use list_invites to see,
resolve_invite to accept or reject`. The keyed todo is cleared when a
`resolve_invite` (or `join_room`) call resolves the invite.
`[matrix] invited to <room> (<room_id>) — use list_invites to see
pending invites, resolve_invite to accept or reject`. The keyed todo
is cleared when a `resolve_invite` (or `join_room`) call resolves the
invite.
See [`docs/matrix.md`](../matrix.md) for the homeserver setup,
provisioning flow, and federation config.