feat(plugin:codebase-memory): dashboard plugin embedding local codebase-memory-mcp UI#5
Merged
Conversation
…se-memory-mcp UI
Adds a new dashboard plugin 'codebase-memory' under plugins/codebase-memory/
that embeds the local codebase-memory-mcp graph UI (DeusData) inside the
existing Hermes dashboard via an iframe. The plugin is intentionally thin:
it draws the chrome (status pill, project picker, open-in-new-tab) and
delegates all graph rendering to the locally running binary at :9749.
Why iframe:
- The codebase-memory-mcp binary ships its own WebGL/canvas renderer;
reimplementing it would couple the plugin to DeusData's release cadence.
- CORS on :9749 already allows the dashboard origin, so no proxy needed.
- Updates to the upstream UI flow into the dashboard automatically.
Endpoints (auto-mounted at /api/plugins/codebase-memory/):
/health, /projects, /project/{name}/health, /iframe-url, /open
Config (optional, all keys optional):
plugins:
codebase_memory:
binary_path: ~/.local/bin/codebase-memory-mcp
ui_port: 9749
ui_host: 127.0.0.1
Tests: 3 embedded pytests verify imports + endpoint shapes.
Closes #7
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.
What this is
A new dashboard plugin
codebase-memoryunderplugins/codebase-memory/that embeds the local
codebase-memory-mcpgraph UI (DeusData) inside the existing Hermes dashboard via an iframe.
Browse, search and explore indexed code repositories without leaving
the dashboard.
It follows the same native plugin pattern as
plugins/knowledge-graph/(PR #4): FastAPI
plugin_api.pyauto-mounted at/api/plugins/codebase-memory/…, plus a plain IIFE consumingwindow.__HERMES_PLUGIN_SDK__. Zero changes tohermes-agentcore, nonew model tools, no entry in the core tree.
Why an iframe, not a reimplementation
codebase-memory-mcpships a fast WebGL/canvas renderer and asophisticated graph UI of its own (already serving 2 084 nodes / 2 201
edges for the
codigosinsiestarepo on the local instance).Reimplementing it would couple the plugin to DeusData's release cadence
and bury us in code we don't own.
The dashboard's iframe approach:
dashboard reflects them automatically.
allows the dashboard origin (
Access-Control-Allow-Origin: http://127.0.0.1:9119).library, no build step.
What's in this PR
Plugin scaffold (commit
2c145850c4)plugins/codebase-memory/dashboard/manifest.json— registers/codebase-memorytab afterknowledge-graph, iconGitBranch.plugins/codebase-memory/dashboard/plugin_api.py— single FastAPIAPIRouter(354 lines) exposing/health,/projects,/project/{name}/health,/iframe-url,/open. Proxies thecodebase-memory-mcpCLI for project enumeration and per-projecthealth, falls back gracefully when the binary is missing.
plugins/codebase-memory/dashboard/dist/index.js— IIFE (494 lines)implementing
CodebaseMemoryPage. Defensive registration,structured state (loading / ok / error) per endpoint with explicit
retry button when the plugin backend can't be reached. The embedded
iframe carries a
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"attribute (no
allow-top-navigation, noallow-modals).plugins/codebase-memory/dashboard/dist/style.css— scoped.hermes-cbm-*classes using the dashboard's semantic tokens(
var(--bg-card),var(--text-primary), etc.).plugin_api.py:test_plugin_self_check,test_health_endpoint_shape,test_iframe_url_endpoint_shape.Verified state
pytest plugins/codebase-memory/dashboard/plugin_api.py— 3/3 greenhttp://127.0.0.1:9119/dashboard-plugins/codebase-memory/dist/index.jsKANBANandACHIEVEMENTS,label "Codebase Memory", icon
GitBranch.pane embeds the upstream UI; explicit "dashboard error" + Retry
button on auth failures (when the host dashboard rotates its
session token after a restart).
Configuration
All keys are optional. The plugin probes
~/.local/bin/codebase-memory-mcpand port 9749 by default and surfaces helpful empty-state cards when
either is missing.
Operational setup
Roadmap
without reload (the upstream UI already keeps
?project=as aforward-compatible hint).
mcp_gbrain_*catalog so the codebase graph shows up alongside the Obsidian vault
the
knowledge-graphplugin already exposes.Out of scope
"Why an iframe").
plugin reads both at runtime from the locally running binary).
HERMES_*env vars — the existingconfig.yamlblock is thesingle source of truth.
cc @TellMeAlex