mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
fix(dashboard): keep memory.provider in the config schema so Desktop's dropdown survives (#63886)
The dashboard's dedicated memory-provider UI (4b184cbe5) excluded
memory.provider from /api/config/schema server-side. Desktop's settings
page builds its field list from that schema, so the Memory Provider
dropdown silently vanished from Desktop after v0.18.1.
- web_server.py: restore memory.provider as a select in _SCHEMA_OVERRIDES,
with options built from plugins.memory discovery (was a stale hardcoded
[builtin, honcho] list before the removal)
- plugins/memory: add list_memory_provider_names() — directory-scan-only
name listing, safe at module import time (no provider imports)
- web ConfigPage: hide memory.provider client-side instead — the Plugins
page owns the dedicated provider-switching UI there
- tests: schema contract (select present, category memory, builtin
sentinel) + invariant that every discoverable provider is selectable
This commit is contained in:
parent
b663d50a6a
commit
861d69c7bb
4 changed files with 73 additions and 2 deletions
|
|
@ -143,6 +143,17 @@ def find_provider_dir(name: str) -> Optional[Path]:
|
|||
# Public API
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def list_memory_provider_names() -> List[str]:
|
||||
"""Cheap name-only listing of discoverable memory providers.
|
||||
|
||||
Unlike :func:`discover_memory_providers`, this does NOT import provider
|
||||
modules or run availability checks — it's a directory scan only, safe to
|
||||
call at module-import time (e.g. when building the dashboard config
|
||||
schema).
|
||||
"""
|
||||
return sorted({name for name, _ in _iter_provider_dirs()})
|
||||
|
||||
|
||||
def discover_memory_providers() -> List[Tuple[str, str, bool]]:
|
||||
"""Scan bundled and user-installed directories for available providers.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue