Skip to content

feat(daemon): expose read view profile metadata (#1997) - #2041

Merged
Sinity merged 1 commit into
masterfrom
feature/feat/read-view-profile-web-api-1997
Jun 17, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/feat/read-view-profile-web-api-1997

Conversation

@Sinity

@Sinity Sinity commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds GET /api/read-view-profiles, a read-only daemon/web endpoint over the existing SessionViewProfile registry. 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

  • Route /api/read-view-profiles through read_view_profile_payloads().
  • Return {read_views, total} with the same profile fields as existing API/MCP surfaces.
  • Add a live HTTP test proving raw/recovery semantics survive through the daemon endpoint.

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.
  • Push hook reran devtools verify --quick at afa34c63 — exit_code 0.

Ref #1997
Ref #1846

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.
@Sinity
Sinity merged commit f2eb724 into master Jun 17, 2026
12 checks passed
@Sinity
Sinity deleted the feature/feat/read-view-profile-web-api-1997 branch June 17, 2026 09:46
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.

1 participant