Skip to content

feat(memory): add a profile selector for built-in memory - #33

Merged
xraysight merged 2 commits into
xraysight:mainfrom
qwes98:feat/builtin-memory-profile-selector
Nov 18, 2026
Merged

xraysight merged 2 commits into
xraysight:mainfrom
qwes98:feat/builtin-memory-profile-selector

Conversation

@qwes98

@qwes98 qwes98 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The built-in memory view previously followed the host's active profile. This adds a dedicated selector so authorized users can inspect another bot's MEMORY.md and USER.md without changing the host profile.

  • Add profile selectors and refresh controls to Dashboard and Desktop, supporting the active profile and other profiles authorized by the host.
  • Add GET /builtin/profiles and an optional memory_profile parameter to GET /builtin, using Hermes' native profile discovery and context-local scope. Both listing and explicit reads enforce host access authorization and the target profile's plugin consent; native profile tickets cannot read another profile.
  • Display the selected profile's files and configured character limits. Provider, session, and summary views continue to follow the host's active profile.
  • Scope Desktop profile-list, selected-memory, and snapshot caches to the connection identity and active host profile. Hide previous data during scope changes and reject stale responses, obsolete retries, and reads with an unresolved connection identity.
  • Handle deleted profiles, refresh failures, and individual profile-discovery failures without displaying another profile's files or failing the entire profile list.
  • Update API documentation and add regression coverage.

Verification

  • Local automated test suite at 09ab748: 109 passed, with no skips.
  • Authorization regressions use Hermes' real native ticket authentication and plugin-consent checks with temporary profiles. They verify that a request scoped to one profile cannot read another profile's memory, and that disabled or unconsented targets are omitted and rejected.
  • Desktop regressions cover switching between connections with the same profile name, active host profile changes, previous data remaining hidden while new requests are pending, late responses, obsolete retries, and unresolved connections.
  • Existing coverage includes profile discovery, request scoping, per-profile files and limits, profile switching, and error recovery.
  • JavaScript syntax checks and git diff --check passed.

Limitations

  • Hosts unable to verify cross-profile authority retain the active-profile-only view and reject explicit cross-profile selection. This includes isolated plugin hosts that receive only an admission boolean rather than the original request's profile authority.
  • The authorization harness exercises real host policy functions through fixture middleware; it does not run the complete gateway middleware and secondary-profile forwarding stack.
  • Desktop profile selection was manually verified on the initial revision (e7967b1). Manual GUI verification was not repeated after the review fixes in 09ab748; the latest changes have automated coverage. Dashboard GUI behavior has not been manually verified.

@xraysight xraysight left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @qwes98, thanks for the PR! Being able to inspect a bot’s built-in memory without switching the active Hermes profile is useful. All 107 tests passed locally, but I’d like to see two changes before merging:

  1. Check access to the selected profile. A valid profile name tells us where its files are, not whether the request may read them. Please apply the host’s access and plugin-consent checks to the target profile, both when listing profiles and when reading memory. If the host can’t authorize cross-profile access, keep the selector limited to the active profile. Please add a regression test through the host’s auth layer that verifies a request scoped to one profile cannot read another profile’s memory.
  2. Scope the Desktop cache to the connection and active host profile. Two gateways can both have a profile called default. Please include the connection identity and active host profile in the cache keys for the profile list and selected memory. Add a regression test that switches between two connections with the same profile name and verifies that the previous connection’s memory is never displayed while the new request is pending.

Please ping me when the fixes are ready for another review.

qwes98 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi @xraysight, thanks for the detailed review. I've pushed commit 09ab748 addressing both requests:

  1. Profile listing and memory reads now enforce host authorization and the target profile’s plugin consent. When the host cannot verify cross-profile authority, including isolated plugin hosts, the selector stays limited to the active profile. Added regression coverage using Hermes’ native ticket authentication and consent checks.
  2. Desktop profile-list, selected-memory, and snapshot caches now include the connection identity and active host profile. Added regressions for connections sharing the same profile name, ensuring previous data stays hidden while new requests are pending.

All 109 tests passed locally, along with JavaScript syntax and whitespace checks.

Ready for another review when you have a chance. Thanks!

@xraysight xraysight left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick follow-up! I re-reviewed both fixes. Profile discovery and memory reads now respect the host’s authorization and target profile consent, and the Desktop cache is scoped to the connection and active profile. All 109 tests passed in an isolated local run, including both Hermes host integration tests. CI is green. Approved.

@xraysight
xraysight merged commit 2bfd268 into xraysight:main Nov 18, 2026
1 check passed
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.

2 participants