feat(mcp): Phase 4.5 — knowtation://prime regenerated from Muse commit graph
Adds _fetchMusePrimeContext() async helper to mcp/resources/register.mjs. When KNOWTATION_MUSE_ENABLED=true, calls `muse log --json --max 100` as a subprocess and extracts last_consolidation and hot_notes from commit records, mirroring the Python prime_context.py module (Phase 4.5, gabriel-muse).
The knowtation://prime resource payload now includes: muse_context: { schema_version: "1.0.0", source: "muse-commit-graph", commits_scanned: N, last_consolidation: { commit_id, committed_at, message, agent_id, model_id }, hot_notes: [{ path, edits }, ...] }
muse_context is null when KNOWTATION_MUSE_ENABLED is unset (default) or when the `muse` CLI is unreachable — non-fatal, falls back gracefully.
Phase 5 upgrade path: replace _fetchMusePrimeContext() subprocess with a JSON-RPC call to the `knowtation/prime-context` Muse MCP tool once Phase 5 ships in gabriel-muse.
Security: subprocess invoked with a fixed argument list; no user input enters the command. Output length bounded by maxBuffer: 2 MiB.
0 comments
muse hub commit comment sha256:174a0e6b56914a4972452f9a1e4388243b61699ac766894b125d6ccaa827c109 --body "your comment"
No comments yet. Be the first to start the discussion.