feat(rooms): read and browse a room's records through this wallet's own agent - #222
Merged
Conversation
…wn agent
`rooms/records/*` is served by the room's **host**, and this console cannot
address one: `carrierParams` passes `{type, payload}` and the offscreen document
supplies its own agent as the recipient, so a `service` naming a host is dropped
and the call lands somewhere that does not serve it. That narrowing is
deliberate — the offscreen document mints and signs rather than counter-signing
a document composed in a page — so the answer is the one `roomsKeysBackfill`
already took: ask the agent to do it.
`roomsKeysRead` and `roomsKeysBrowse` (dtgwg-trust-tasks-tf#426,
`@openvtc/trust-tasks` 0.18.3) are that ask.
**The agent verifies; this renders.** The check is deliberately not
re-implemented here. The epoch key never leaves the agent, so it is the only
party that can open a record, and the only party on the member's side that
remembers what this host said last time — `verification` is its account of both
and a second verifier here would be a second thing to keep in step.
**`verification` is a verdict, never a failure**, and the doc comments say so
where a caller will read them. An adverse value still returns the record: a
member's own agent refusing because the *host* misbehaved would punish them for
somebody else's act and lock them out of the room holding the records that would
show what happened. A surface that treats it as an error has inverted the
design.
`limit` is documented as the page size to ask the host for, never a cap: the
agent follows the cursor and reports `complete`, and `verification.count` means
something only on a complete unfiltered listing.
**Resyncing the task surface exposed a break this library already had.**
`vta-sdk` cut `rooms/keys/present` and `rooms/owner/issue-authority` over to
`0.2` (VTI#1365) and nothing here followed, so both calls named versions the
agent no longer serves — and `present` is the load-bearing one, since every host
task takes a presentation and nothing else produces one. Cut over here, with
`validUntil` unchanged and the two members `present/0.2` removed now absent:
`audience` at the task layer names the document's *destination*, which is the
agent being asked rather than the host it is later shown to, and a room
presentation needs no `nonce` because a host binds it to whoever signed the
envelope.
The test that asserted `nonce` was sent now asserts it is **not**, which is the
same test doing the same job against the shape that exists.
`npm run build` clean; 1,188 tests, 0 failures.
Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
stormer78
force-pushed
the
feat/rooms-read-browse-client
branch
from
September 10, 2026 12:59
ef86c8d to
0a12347
Compare
🛡️ AI Agentic Security Code Review🔎 A manual security review is recommended before merging. Please contact the Security team for specifics and remediation guidance.
|
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.
rooms/records/*is served by the room's host, and this console cannot address one.carrierParamspasses{type, payload}and the offscreen document supplies its own agent as the recipient, so aservicenaming a host is silently dropped and the call lands somewhere that does not serve it.That narrowing is deliberate — the offscreen document mints and signs rather than counter-signing a document composed in a page — so the answer is the one
roomsKeysBackfillalready took: ask the agent to do it.roomsKeysReadandroomsKeysBrowse(tt#426,@openvtc/trust-tasks0.18.3) are that ask.The agent verifies; this renders
The check is deliberately not re-implemented here. The epoch key never leaves the agent, so it is the only party that can open a record — and the only party on the member's side that remembers what this host said last time.
verificationis its account of both, and a second verifier here would be a second thing to keep in step.verificationis a verdict, never a failure, and the doc comments say so where a caller will read them. An adverse value still returns the record: a member's own agent refusing because the host misbehaved would punish them for somebody else's act, and lock them out of the room holding the records that would show what happened. The consequence belongs on the write path. A surface that treats an adverse verdict as an error has inverted the design.Two things documented at the call site because they are easy to get wrong:
limitis the page size to ask the host for, never a cap on the result. The agent follows the cursor and reportscomplete.verification.countis narrow. It means something only whencompleteis true and neitherprefixnorsinceVersionwas set. Anything else isnotComparable, which will be the common answer and is not a fault.Resyncing the task surface exposed a break this library already had
Not part of the plan, and worth flagging rather than folding in quietly.
vta-sdkcutrooms/keys/presentandrooms/owner/issue-authorityover to 0.2 (VTI#1365) and nothing here followed. Both calls named versions the agent no longer serves — andpresentis the load-bearing one, since every host task takes a presentation and nothing else produces one. The rooms panes' host calls were broken against current VTI and nothing said so, because the task-surface snapshot was stale enough not to notice.Cut over here.
issue-authority/0.2is shape-identical (validUntilbecame REQUIRED, which this always sent).present/0.2removedaudienceandnonce, and neither was doing what its name suggested:audienceat the task layer names the document's destination — the agent being asked — not the host the presentation is later shown to.nonce: a host binds it to whoever signed the envelope, not to a challenge it issued.The payload is
additionalProperties: false, so a caller still sending either is refused. The test that assertednoncewas sent now asserts it is not — the same test doing the same job against the shape that exists.Checks
npm run build— cleannpm test— 1,188 tests, 0 failures across all four workspacesvta-sdk0.34.1;expectedmoved 201 → 204 with the reason recorded inlineDepends on VTI serving the two tasks (in flight) — this is the client half, and nothing calls it yet.