Bug: cycleCount: String(c.length || '—') turned 0 into '—' due to || falsy
coercion. Plan B DB starts empty → Overview KPIs all '—' even after a
successful refresh. Renders '0' now (the actually correct truthful value).
Karpathy 4 rules: smallest change (one expression), no shape change.
Bug: panel _ingestUpdate expected payload.connections array (mock shape).
Real adwright_get_connections_status returns {meta:{...}, woo:{...}}.
Resulted in connections tab always empty + Overview KPIs sourced from
empty arrays even though backend was returning real data.
Now ingest normalises both shapes (real + mock fallback) into the
[{id, name, ok, status, detail}, ...] shape the renderer already expects.
detail field plumbed through for future Connections card expansion.
Verified via curl /api/adwright/last-panel-update?tool=adwright_get_connections_status
returns real Plan B sandbox + Woo. Panel now displays them.
Karpathy 4 rules: surfaced shape mismatch via real backend probe, smallest
shim (one ingest branch), supports both old + new shape (no regression).
Browser console: 'Failed to load resource: ...%252Fb6078c89...%252Fimage:0'.
_refreshGrid normalized thumbUrl as a full proxy URL, then _renderGrid +
_renderDetail wrap it again with PROXY_BASE+encodeURIComponent → %2F →
%252F. Fix: store raw BTE path; let the existing renderer wrap it once.
Karpathy 4 rules: surface root cause (double-wrap, not the encoder),
smallest fix (one expression), surgical (no other shape change).
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.
JP feedback: panel says "switch to cmo profile" but offers no way to do so.
Also window.S.activeProfile may be empty on /session/* pages before boot.js
finishes initializing, so the banner showed unnecessarily.
This patch:
- Replaces vague text with a [Switch to CMO] button that POSTs to
/api/profile/switch {name: "cmo-planb"} and reloads on success
- Adds _fetchActiveProfile() that reads /api/profile/active directly
(defense against window.S race); cached in NS.state._fetchedProfile
- Background poll every 5s catches profile switches made from the upstream
Profiles panel — no hard reload needed to clear the banner
- Disabled-state refresh fires once on mount + on each poll
Karpathy 4 rules: smallest possible change (one button + one fetch helper),
no abstraction layer, no fallback "smart" detection — authoritative API only.
Panel's BTE Command Center posts {brandId(slug), recipeSlug, items[],
variantsPerScenario} which the current BTE backend doesn't accept (PRD §5.8
recipe-driven fan-out not shipped). Adapter intercepts POST
/api/command/requestPhotoshoot, resolves brand slug -> Guid via /api/query/brandDtos
(cached in-process), expands items × variants into per-shot entries, inlines the
StopgapFluxWorkflow FLUX.2 graph as workflowJson (LocalFluxImageProvider
rejects empty), parses mode from recipeLabel for rubricMode (polished|ugc;
photoreal/artistic fall back to polished per BTE validator). All other proxied
paths pass through unchanged. Stdlib-only.
Verified: real POST through adapter -> BTE returns 200 with saga-start envelope
(per-shot DB failure is BTE-internal, out of scope — adapter cleared schema).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JP reported (Chrome) after b43e649:
- Sidebar buttons render ✓
- Adwright: useless middle black panel between sidebar and right area
- BTE: entire left sidebar disappears, only close-X recovers it
ROOT CAUSES:
1. webui CSS has `main.main:not(.showing-X):not(.showing-Y)... > #mainChat
{ display:flex }` which still matches when our class is svrnty-showing-*
(not in webui's whitelist). Chat rendered alongside our panel → the
empty void = "middle black panel".
2. BTE overlay was `position:fixed; inset:0; z-index:9991` — covered the
whole viewport including sidebar + topbar.
FIXES:
- Adwright + BTE CSS now `main.main.svrnty-showing-<id> > .main-view
{ display:none !important }` — explicitly hides every native main-view
(mainChat, mainSkills, mainTasks, ...) when our panel is active.
- BTE.css: overlay no longer position:fixed. Becomes a normal flex child
of main when svrnty-showing-bte is active. Sidebar + topbar stay visible.
- bte.js: _openOverlay now appends to <main class="main"> instead of
document.body. Migrates existing body-mounted overlay on first open.
Karpathy 4 rules: root-caused via direct CSS inspection (not guessing),
two-line CSS change per panel, no new abstractions.
ROOT CAUSE of JP's "buttons not showing" report: hermes-webui has two nav
containers — `<nav class="rail">` (desktop ≥641px, rail-btn 20×20 stroke
1.5) and `.sidebar-nav` (mobile, nav-tab 18×18 stroke 2). My previous
injection only touched .sidebar-nav, so on desktop the buttons literally
didn't exist anywhere visible.
This patch:
- Defines per-container button templates (class list + svg size/stroke)
matching exactly how upstream renders its native rail-btn vs nav-tab
- Iterates both containers on init + retries
- MutationObserver re-injects into either if something re-renders it
- Tooltip modifier (--bottom) only applied for sidebar-nav (mobile pattern)
- SVG paths centralized so adding new tabs is one entry
Karpathy 4 rules: surfaced root cause via console logs + DOM inspection
instead of guessing, simplest fix (data-driven container list), surgical
(no other behavior changed).
JP feedback: floating BTE launcher + always-visible Adwright panel were
"very fucked up" UX. Replaced with proper hermes-webui sidebar integration.
New static/svrnty_nav.js:
- Injects 2 nav-tab buttons into .sidebar-nav matching the existing
data-panel + nav-tab + has-tooltip pattern
- Adwright: bullseye icon (marketing intelligence)
- BTE: sparkle/palette icon (creative studio)
- Wraps window.switchPanel to add main.svrnty-showing-{adwright,bte}
classes so our panels participate in the existing main-view show/hide
system without editing upstream panels.js
- Dispatches "svrnty:panel-switch" CustomEvent so panel modules can
lazy-init / open / close based on which panel is active
Adwright panel:
- adwright.css: hidden by default; shows only when main has
.svrnty-showing-adwright. When showing, occupies full main width
and hides all other main children (chat etc).
- adwright.js: no change to mount logic (already mounted inside <main>).
BTE panel:
- bte.js: removed _installLauncher (no more floating bottom-right button).
Init now listens for svrnty:panel-switch events to open/close the
overlay. Defensively removes any stale .svrnty-bte-launcher DOM nodes
from prior plugin versions.
- bte.css: launcher styles replaced with display:none !important.
manifest.yaml: bumped 0.4.0 → 0.5.0, svrnty_nav.js added to assets in
the correct load order (after app.js, before adwright.js + bte.js).
CONNECTION-MAP regenerated.
Karpathy 4 rules: no upstream edit, smallest possible wrap of switchPanel
to keep our panels coexisting with native panels (chat, tasks, kanban,
etc), CSS-only visibility (no DOM thrashing).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Header now shows ↗ BTE button next to the profile status pill. Click
invokes window.SvrntyBTE.open() to surface the BTE overlay, satisfying
the "Adwright pulls content from BTE panel" integration goal at the UX
level. Asset-URL-level integration follows automatically once cycles
contain BTE-rendered asset references (post Phase 8).
Themed via existing CSS vars (--accent, --border2, --accent-bg, etc) —
zero hardcoded colors. CONNECTION-MAP regenerated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
routes/adwright.py now lazy-imports adwright_core from adwright-mcp/ and
calls the 6 v1 tool functions directly. Real payloads flow through
last-panel-update; mock data remains as fallback if adwright_core import
fails (proto version mismatch, missing adwright-mcp dir, etc).
Verified in webui's hermes-agent venv (Python 3.11 + protobuf 6.x):
- get_connections_status → real Plan B sandbox act_967504505966162
- list_cycles / list_segments / list_recipes → real (empty) data
- refresh_cycles → real timestamp + cycle re-fetch
Workspace-internal dependency on adwright-mcp/ documented in
CONNECTION-MAP (regen).
Karpathy 4 rules: smallest possible change to lift mock→real (single
function add + handler tweak), no abstraction layer introduced, fallback
preserves uptime if adwright-mcp evolves incompatibly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- CLAUDE.md: drop Karpathy block, list all 7 loader methods incl
register_audio_attachment_processor
- README: extend "Public extension API" to 7 methods
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the documentation gap surfaced by the compliance audit. Plugin now
passes the "well organized + well documented" bar in addition to the
"protocol §10 compliant" bar.
Changes:
manifest.yaml bump plugin_version 0.1.0 → 0.2.0 · routes status: live ·
audio_processors section added · public_api adds
register_audio_attachment_processor · tested_versions
appended (v0.51.117, v0.51.118) · current_local synced
README.md Status table flipped from "TBD" to "live" everywhere ·
forced internal deps + test count surfaced
.env.example declares the 4 env vars the plugin reads at runtime
(HERMES_WEBUI_PYTHON_PLUGIN · HERMES_WEBUI_STT_URL/_KEY ·
BTE_BASE_URL · BTE_TENANT_ID)
CHANGELOG.md v0.1.0 (scaffold + vault + brand) · v0.2.0 (STT + mic +
loader API extension)
LICENSE proprietary, contact jp@svrnty.io; clarifies that runtime
integration with hermes-webui (MIT) is permitted
tests/integration/test_loader_contract.py
3 real assertions against the adjacent fork — 7-method
contract, register-our-plugin end-to-end, noop-when-env-unset
29/29 tests PASS (was 26; +3 integration).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CONTRIBUTING.md closes the "how do I add anything" gap: the protocol PRD
defines the CONTRACT (what's allowed, what's verified), but until now
recipes were implicit — readers had to reverse-engineer patterns from
existing routes/vault_status.py + static/app.js + the STT migration.
Five recipes, one decision flowchart:
A Add a new /api/* endpoint
B Add a new UI element (CSS/JS/asset)
C Extend the loader API (add an 8th method) — STT migration is the example
D Add a config value
E Forced-internal escape hatch (use sparingly, discipline at 5 rows)
Each recipe: numbered steps, file paths, commit message template, test
requirement. Plus a PR checklist + quick-reference index.
README.md gets a top-of-page pointer so a new contributor lands on the
recipes within one click.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Migrates the boot.js mic-button behavior change from reverted fork commit
014b9eef into plugin/static/app.js. Replaces vanilla dictation-to-textbox
mic flow with voice-message mode: tap to record, tap again to stop → audio
File attached + sent automatically. Server-side audio_attachment_processor
in routes/transcribe.py transcribes for text-only models.
Implementation strategy:
- Own #btnMic onclick (boot.js sets it during init; plugin overrides via
MutationObserver after DOM mutations + idempotent dataset.svrntyVm flag)
- MediaRecorder with same mime-type fallbacks as the original
(webm/opus → webm → ogg/opus → mp4)
- DataTransfer to set #fileInput.files programmatically (cross-browser path)
- Dispatch 'change' so boot.js's fileInput.onchange → addFiles() runs
- Click #btnSend after 50ms tick so attachment registers before submit
Filename convention: voice-message-${timestamp}.{webm|ogg|mp4} — matches the
audio processor's name-prefix detection in _transcribe_audio_attachments.
Tests: 6 new JS-static checks in tests/unit/test_app_js.py (idempotent
guard, voice-message prefix, DataTransfer pattern, vault URL pin, mic
override). 26 tests total, all PASS.
Connection map: now 9 public API · 0 forced internal · 1 frontend.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
static/app.js now injects the "Vault connections" panel into Settings → System
via DOM mutation observer + populates from GET /api/vault/status (already
served by routes/vault_status.py). Mirrors the original behavior from
hermes-webui fork commit 3e2c74f3 without needing any upstream HTML/JS edit.
routes/transcribe.py documents the STT migration design choice (streaming_hook
public-API method vs forced-internal entries) — implementation lands as a
follow-on. Plugin still loads cleanly without STT (route disabled in
_phase2_routes() until Phase 2.1).
CONNECTION-MAP.md regenerated: still 0 forced internals.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
THE single repo holding every Svrnty modification to nesquena/hermes-webui per
the SVRNTY-HERMES Plugin Protocol PRD (hermes/docs/SVRNTY-PLUGIN-PROTOCOL.md).
This scaffold is the empty vessel; Phase 2 migrates the existing fork
modifications (STT, vault status, brand skin) into it.
Contents:
plugin.py register(api) entry; reads 6-method
contract; wires static + routes
svrnty_hermes_webui_plugin/ package wrapper for pip install
manifest.yaml plugin name · version · upstream pin
pyproject.toml pip-installable
routes/__init__.py placeholder until Phase 2 migration
static/ placeholder for brand skin migration
CONNECTION-MAP.md AST-generated; 4 public API calls, 0 forced
scripts/ast-connection-map.py AST walker; modes: regen · --check · --diff
tests/{unit,integration,evals}/ skeleton for Phase 3 eval suite
.github/workflows/
plugin-tests.yml push: unit + integration + map check
connection-map-check.yml PR: regen + diff vs committed
upstream-drift.yml daily cron: detect new upstream tags +
run matrix (activates when Gitea runner
registered on Svrnty infra)
Karpathy 4 rules in CLAUDE.md; every subagent inherits them via the workspace
contract.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>