Svrnty plugin for nesquena/hermes-webui — single repo for every backend + brand mod (per hermes/docs/SVRNTY-PLUGIN-PROTOCOL.md)
|
Some checks failed
plugin-tests / test (push) Failing after 6s
JP question: 'is there any way to see the generated images by the cmo inside the bte panel app'.
The Command Center PRD §5.4 specifies `/api/query/assetGrid` for the grid;
that endpoint isn't implemented yet on BTE. But `/api/query/assetDtos`
WORKS today and returns every brand-scoped asset including the ones CMO
just generated via bte_image_generate (asset ids 664787c4-... + dbe21e15-...).
Changes:
- routes/bte_proxy.py: allowlist /api/query/assetDtos + /api/assets/{id}/image
(the latter so panel can render real PNG thumbnails — not just /thumb stubs)
- static/bte.js: _refreshGrid now POSTs assetDtos with {pageSize:48, sortBy:createdAt desc}.
AssetDto rows normalized to panel's existing asset shape (id, thumbUrl,
lifecycle, scores, prompt, dims). thumbUrl points at the live image bytes
via the new proxy allowlist entry. _renderGrid stays untouched — same
shape it expected.
Result: BTE panel grid now shows every Plan B asset including freshly-
generated CMO images. Polling stops when no in-flight renders remain.
When BTE Command Center §5.4 ships the real assetGrid endpoint, swap
the path back — frontend won't need any other change.
Karpathy 4 rules: smallest possible adapter (normalize one shape to another,
no abstraction added), surgical (one new allowlist entry, one function body
rewritten, no other panel logic touched), verified via curl that assetDtos
returns 10 assets including the CMO-generated ones before committing.
|
||
|---|---|---|
| .github/workflows | ||
| routes | ||
| scripts | ||
| static | ||
| svrnty_hermes_webui_plugin | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CONNECTION-MAP.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| Makefile | ||
| manifest.yaml | ||
| plugin.py | ||
| pyproject.toml | ||
| README.md | ||
svrnty-hermes-webui-plugin
THE single repo holding every Svrnty modification to nesquena/hermes-webui. Loaded at runtime via the plugin loader hook patched into the fork.
Protocol contract: hermes/docs/SVRNTY-PLUGIN-PROTOCOL.md — read this before contributing.
Adding features? Read CONTRIBUTING.md for the 5 recipes + decision flowchart.
Install
# 1. Install the plugin in the same venv as hermes-webui
pip install -e ~/workspaces/hermes/svrnty-hermes-webui-plugin
# 2. Tell hermes-webui to load it
export HERMES_WEBUI_PYTHON_PLUGIN=svrnty_hermes_webui_plugin
# or set in docker-compose.override.yml under environment:
# 3. Restart hermes-webui — endpoints under /api/* + assets under /plugins/svrnty/* land
Without HERMES_WEBUI_PYTHON_PLUGIN, hermes-webui runs vanilla (no Svrnty mods).
What's in here
| Dir | What |
|---|---|
plugin.py |
Entry point — register(api) wires routes + static |
routes/ |
One file per Svrnty /api/* endpoint (transcribe, vault_status, …) |
static/ |
Brand skin: app.js, app.css, Montserrat fonts |
CONNECTION-MAP.md |
AST-generated map of every upstream symbol this plugin touches |
scripts/ |
Tooling — AST walker, upstream sync, boot smoke |
tests/ |
Unit · integration · evals (each upstream-sync runs evals) |
.github/workflows/ |
Plugin-tests · connection-map-check · upstream-drift CI |
Public extension API
The plugin loader (one fork commit in hermes-webui) exposes exactly 7 methods:
api.register_route(path, method, handler) # add /api/<path>
api.register_static(prefix, directory) # serve files under /plugins/<prefix>/...
api.inject_script(url) # add <script> to index.html
api.inject_stylesheet(url) # add <link> to index.html
api.config_get(key, default) # safe upstream config read
api.logger(name) # namespaced logger
api.register_audio_attachment_processor(fn) # hook STT/voice attachment pipeline
Touching anything else in hermes-webui = a Rule 2 violation per the protocol. Document the escape hatch in CONNECTION-MAP.md under "forced internal dependencies".
Hygiene
make sync-upstream— one-command rebase against latest upstream + reportpython scripts/ast-connection-map.py— regenerate the mappython scripts/boot-smoke.py— start + curl every plugin endpointpytest tests/— full suite (unit + integration + evals)
Status
| Component | State |
|---|---|
Loader hook in hermes-webui |
✓ live (lone fork commit, 7-method API) |
| Plugin scaffold | ✓ live (routes/static/tests/scripts/.github) |
| Migrated features (vault_status, transcribe, brand skin, voice-message mic) | ✓ live |
| Automation (drift CI, AST connection map, sync command, eval suite) | ✓ live (Gitea runner registered) |
| Upstream PR to nesquena/hermes-webui | deferred — gated on 2+ release smoke (PRD Phase 4) |
| Forced internal dependencies | 0 (plugin uses only public API) |
| Test suite | 26/26 PASS (unit + evals) |