Repository navigation
feat: recall across personal memory and Data Rooms - #49
Merged
Merged
Conversation
memory_recall now also reads the Data Rooms configured for recall (`rooms add`), through the user's VTA (rooms/keys/browse + read), and ranks room records with personal memories on one scale. Each result names its source, author, status and basis. A sealed room record's in-body signature is checked here by the rules pnm uses: proof verifies, author is the signer, signed location (at the sealed version) is where it was read, author matches what the host recorded. A record failing any of them is refused and reported. Open-room records are marked hostReported. Deprecated records are demoted; retracted and expired ones left out. An unreadable room is reported as unavailable without failing recall. Recall never writes to a room; the session-start hook stays personal-only. Closes #34 Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This was referenced Nov 11, 2026
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.
Closes #34.
What it does
vta-agent-memory rooms add --room <did> --host <did> [--member <did>] [--label L](plusrooms removeandrooms list) adds a room to the config for recall to read. The host has to be named because nothing maps a room to its host (rooms/keys/browse: "nothing maps a room to its host").memory_recallreads personal memory and every configured room, then ranks them together. Room records use the samerecord::relevance× basis weight × status weight scale, so a personal memory and a room record that match equally well score equally.sourcesoption narrows where recall looks:personal,rooms, or a room's id or label.source(personalwithcontextId, orroomwithroomIdandlabel),author,statusandbasis/confidence.unavailablelists rooms that couldn't be read. Recall carries on without them.memory_getwithroom: <roomId>reads one room record in full.doctorreports, for each room, how many records are recallable and how many are refused, or why the room is unavailable.Checking room records
rooms/keys/readreports what the VTA checked about the host. The author's in-body signature is the reader's job, sorooms::verify_bodyapplies the rules ofvtc_client::rooms::body::verify_record_body, which is whatpnm rooms readuses:assertionMethod, usingeddsa-jcs-2022orecdsa-jcs-2019;authoris the signer;ext.org.openvtc.rooms.sealedAt, because a curation moves a record's version past its body;authoris the author the host recorded.A record that fails any of these is left out and reported in
refused, the same way a personal memory with a bad signature is. Checks 3 and 4 run before the author's DID is resolved.An open room's records have no in-body signature. They are recalled, but their
authoris markedhostReported.Status works as follows:
validUntilare left out.Tests (
tests/rooms_recall.rs, 5, plus one server test and two unit tests)The fake VTA now answers
rooms/keys/browse/0.4androoms/keys/read/0.2.Acceptance: one recall across personal memory, a sealed room and an open room. It checks the interleaved ranking,
source/author/status/basison each result, that recall returns no bodies, and that recall only ever sends browse and read to rooms.Acceptance: a room record whose signature fails is excluded and reported, in three forms:
This holds with a query and with none. A mutation check confirmed the test fails if signature verification is removed.
Standing:
An unreachable room is reported as
unavailable, and personal recall still answers.sources: ["personal"]makes no room calls. A memorytypeleaves rooms out, since room records have no type.Server: an unknown source or room is
invalid_paramsbefore any VTA call.cargo clippy --all-targetsis clean, all existing tests pass, and the eval's hard checks all pass with no metric change: personal ranking moved only by refactoringrelevanceout ofrank.Decisions worth a look
did:key-only. Room members are oftendid:webvh, so room records are checked with the SDK's shared resolver (PNM_RESOLVER_URLif set), as pnm does. The DIDs it resolves are those of room members, since the VTA wouldn't open the record otherwise, and resolution happens only after the location and host-author checks. A recall that reads no rooms never builds the resolver.kind: "unstated". The issue asks for it "from the in-body signature", butSealedRecordBodycarries only the signing DID. data-rooms.md §6.1 plans to carry it through attenuated VACs. I'd rather say "unstated" than guess.thisMembersays whether the configured member wrote the record.recall. Every room adds a browse plus batch reads with up-to-30-second host timeouts, and a slow host must never delay a session. Rooms are recalled through the MCP tool.Not covered
rooms/keys/*from anapplication-role agent identity has been tried; that grant may need adding at enrolment.Version 0.7.0 → 0.8.0.