All checks were successful
plugin-tests / test (push) Successful in 6s
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>
43 lines
1.8 KiB
Markdown
43 lines
1.8 KiB
Markdown
# CONNECTION MAP — svrnty-hermes-webui-plugin → nesquena/hermes-webui
|
|
|
|
**Upstream version:** v0.51.117
|
|
**Plugin version:** 0.1.0
|
|
**Total dependencies:** 10 (9 public API · 0 forced internal · 1 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")` |
|
|
| `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/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/app.js` | 165 | `/api/vault/status` |
|
|
|