svrnty-hermes-webui-plugin/CONNECTION-MAP.md
Svrnty 80420e0d01
Some checks failed
plugin-tests / test (push) Failing after 5s
feat(plugin): sidebar nav buttons for Adwright + BTE (v0.5.0)
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>
2026-05-24 12:45:01 -04:00

63 lines
3.5 KiB
Markdown

# CONNECTION MAP — svrnty-hermes-webui-plugin → nesquena/hermes-webui
**Upstream version:** v0.51.118
**Plugin version:** 0.5.0
**Total dependencies:** 30 (24 public API · 0 forced internal · 6 frontend)
> **Auto-generated by `scripts/ast-connection-map.py`. Do not hand-edit.**
> To change a justification, edit the `# CONNECTION:` comment above the
> relevant import and re-run the script.
---
## Public API dependencies (via loader-provided `api`)
| Plugin location | Upstream symbol | Snippet |
|---|---|---|
| `plugin.py:29` | `api.logger` | `log = api.logger("svrnty.plugin")` |
| `plugin.py:34` | `api.register_static` | `api.register_static(STATIC_PREFIX, str(STATIC_DIR))` |
| `plugin.py:35` | `api.inject_stylesheet` | `api.inject_stylesheet(f"/plugins/{STATIC_PREFIX}/app.css")` |
| `plugin.py:36` | `api.inject_script` | `api.inject_script(f"/plugins/{STATIC_PREFIX}/app.js")` |
| `plugin.py:39` | `api.inject_script` | `api.inject_script(f"/plugins/{STATIC_PREFIX}/svrnty_nav.js")` |
| `plugin.py:42` | `api.inject_stylesheet` | `api.inject_stylesheet(f"/plugins/{STATIC_PREFIX}/adwright.css")` |
| `plugin.py:43` | `api.inject_script` | `api.inject_script(f"/plugins/{STATIC_PREFIX}/adwright.js")` |
| `plugin.py:45` | `api.inject_stylesheet` | `api.inject_stylesheet(f"/plugins/{STATIC_PREFIX}/bte.css")` |
| `plugin.py:46` | `api.inject_script` | `api.inject_script(f"/plugins/{STATIC_PREFIX}/bte.js")` |
| `routes/adwright.py:68` | `api.logger` | `log = api.logger("svrnty.routes.adwright")` |
| `routes/adwright.py:69` | `api.register_route` | `api.register_route(` |
| `routes/adwright.py:71` | `api.register_route` | `api.register_route(` |
| `routes/bte_proxy.py:40` | `api.logger` | `log = api.logger("svrnty.routes.bte_proxy")` |
| `routes/bte_proxy.py:41` | `api.register_route` | `api.register_route("/api/bte/proxy", "GET", _handle_proxy)` |
| `routes/bte_proxy.py:42` | `api.register_route` | `api.register_route("/api/bte/proxy", "POST", _handle_proxy)` |
| `routes/transcribe.py:37` | `api.logger` | `log = api.logger("svrnty.routes.transcribe")` |
| `routes/transcribe.py:38` | `api.register_route` | `api.register_route("/api/transcribe", "POST", _handle_transcribe)` |
| `routes/transcribe.py:39` | `api.register_audio_attachment_processor` | `api.register_audio_attachment_processor(_transcribe_audio_attachments)` |
| `routes/umbrella.py:30` | `api.logger` | `log = api.logger("svrnty.routes.umbrella")` |
| `routes/umbrella.py:31` | `api.register_route` | `api.register_route("/umbrella", "GET", _handle_panel_html)` |
| `routes/umbrella.py:32` | `api.register_route` | `api.register_route("/api/umbrella", "GET", _handle_graph_json)` |
| `routes/umbrella.py:33` | `api.register_route` | `api.register_route("/api/umbrella/doc", "GET", _handle_doc_body)` |
| `routes/vault_status.py:19` | `api.logger` | `log = api.logger("svrnty.routes.vault_status")` |
| `routes/vault_status.py:20` | `api.register_route` | `api.register_route("/api/vault/status", "GET", _handle_vault_status)` |
---
## Forced internal dependencies (Rule 2 escape hatch)
Each row requires a `# CONNECTION: <reason>` comment in source.
_None. Plugin uses only the public API._
---
## Frontend dependencies (static/*.js → /api/* URLs)
| File | Line | URL |
|---|---|---|
| `static/bte.js` | 322 | `/api/command/requestPhotoshoot` |
| `static/bte.js` | 361 | `/api/query/assetGrid` |
| `static/bte.js` | 475 | `/api/command/rateAsset` |
| `static/adwright.js` | 484 | `/api/adwright/provision-creds` |
| `static/umbrella.js` | 41 | `/api/umbrella` |
| `static/app.js` | 165 | `/api/vault/status` |