Repository navigation
feat(daemon): expose read view profile metadata (#1997) - #2041
Merged
Merged
Conversation
Add a read-only /api/read-view-profiles endpoint that serves the same SessionViewProfile payloads already used by CLI, Python API, and MCP. This gives the local web/workbench surface the shared view semantics #1997 asks for instead of inventing another view vocabulary. Verification: nix develop --command devtools test tests/unit/daemon/test_web_reader.py -k 'read_view_profiles or query_completions'; nix develop --command devtools verify --quick.
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.
Summary
Adds
GET /api/read-view-profiles, a read-only daemon/web endpoint over the existingSessionViewProfileregistry. The web/workbench surface can now inspect the same read-view semantics already exposed through CLI, Python API, and MCP.Problem
#1997 asks for read-view semantics to be shared across CLI, web/API, MCP/API, and exports. The registry and CLI/API/MCP surfaces already existed, but daemon HTTP did not expose the profile inventory, leaving future web workbench code one step away from duplicating view vocabulary.
Solution
/api/read-view-profilesthroughread_view_profile_payloads().{read_views, total}with the same profile fields as existing API/MCP surfaces.Verification
nix develop --command devtools test tests/unit/daemon/test_web_reader.py -k 'read_view_profiles or query_completions'— 3 passed.nix develop --command devtools verify --quick— exit_code 0.devtools verify --quickatafa34c63— exit_code 0.Ref #1997
Ref #1846