Skip to content

The agent that grows with you

fix: build and startup integration fallout from the Sep-11 main merge

teknium17f6e658323f4
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index 322196af46c..09632bae537 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -276,7 +276,7 @@ import { registerMcpOauthCallbackIpc } from './mcp-oauth-callback-ipc'
import { createMediaProtocolHandler, MEDIA_PROTOCOL } from './media-protocol'
import { fetchLocalMedia } from './media-range'
import { createNativeAccessTokenCoordinator, NativeAuthChangedError } from './native-access-token'
-import { oauthSessionIsLive, resolveJsonBody, resolveReadinessProbeAuth } from './native-auth-decisions'
+import { oauthSessionIsLive, resolveJsonBody, resolveOauthRestAuth, resolveReadinessProbeAuth } from './native-auth-decisions'
import {
nativeRefreshUrl,
type NativeTokenSet,
@@ -292,7 +292,6 @@ import { LEGACY_OAUTH_PARTITION, resolveOauthPartition } from './oauth-partition
import { mintGatewayWsTicket as mintOauthGatewayWsTicket, requestWithOauthFallback } from './oauth-rest-request'
import { wireOauthSessionResponse } from './oauth-session-response'
import { createParentStartMarkerResolver, parentWatchdogEnv } from './parent-process-identity'
-import { createParentStartMarkerResolver } from './parent-process-identity'
import { registerPetOverlayIpc } from './pet-overlay-ipc'
import {
pendingNotice as pendingPluginCompatNotice,
@@ -7984,17 +7983,17 @@ async function saveGatewayFile(payload: GatewayFileSavePayload = {}) {
const url = `${connection.baseUrl}${requestPaths.download}`
try {
- const auth = await gatedFileAuth(connection)
-
- if (auth.kind === 'bearer') {
- return await downloadViaTokenToFile(url, auth.token, ctx, finalizeGatewayDownload, { bearer: auth.token })
- }
-
- if (auth.kind === 'cookie') {
- return await downloadViaOauthSessionToFile(url, ctx)
+ if (connection.authMode === 'oauth') {
+ return await requestWithOauthFallback(connection.baseUrl, {
+ ensureNativeAccessToken,
+ requestWithBearer: bearer => downloadViaTokenToFile(url, null, ctx, finalizeGatewayDownload, { bearer }),
+ requestWithCookie: () => downloadViaOauthSessionToFile(url, ctx)
+ })
}
- return await downloadViaTokenToFile(url, auth.token, ctx, finalizeGatewayDownload, { gatewayDescriptor: connection.gatewayEndpoint ? connection : undefined })
+ return await downloadViaTokenToFile(url, connection.token, ctx, finalizeGatewayDownload, {
+ gatewayDescriptor: connection.gatewayEndpoint ? connection : undefined
+ })
} catch (error) {
// Desktop and the remote gateway update independently. A gateway predating
// /api/fs/download 404s here; fall back (ONLY on 404) to the older capped
@@ -8016,17 +8015,7 @@ async function saveGatewayFileViaDataUrl(
requestPath: string,
ctx: GatewayFileSaveContext
) {
- const url = `${connection.baseUrl}${requestPath}`
- const auth = await gatedFileAuth(connection)
- let json: unknown
-
- if (auth.kind === 'bearer') {
- json = await fetchJson(url, null, { bearer: auth.token })
- } else if (auth.kind === 'cookie') {
- json = await fetchJsonViaOauthSession(url)
- } else {
- json = await fetchJson(url, auth.token, { gatewayDescriptor: connection.gatewayEndpoint ? connection : undefined })
- }
+ const json = await fetchJsonForBackend(connection, requestPath)
const dataUrl =
json && typeof json === 'object' && 'dataUrl' in json && typeof json.dataUrl === 'string' ? json.dataUrl : ''
@@ -10795,19 +10784,7 @@ async function fetchJsonForProfile(profile, path) {
async function requestJsonForProfile(profile: string, path: string, method: string, body?: string) {
const conn = await ensureBackend(profile)
- if (conn.authMode === 'oauth') {
- // Native RFC 8252 flow: authenticate with the bearer token (cookieless)
- // when we hold one for this gateway; otherwise use the cookie partition.
- const nativeAt = await ensureNativeAccessToken(conn.baseUrl).catch(() => null)
-
- if (nativeAt) {
- return fetchJson(url, null, { ...opts, bearer: nativeAt, headers: conn.headers })
- }
-
- return fetchJsonViaOauthSession(url, { ...opts, headers: conn.headers })
- }
-
- return fetchJson(url, conn.token, { ...opts, headers: conn.headers, gatewayDescriptor: conn.gatewayEndpoint ? conn : undefined })
+ return fetchJsonForBackend(conn, path, { method, body, timeoutMs: DEFAULT_FETCH_TIMEOUT_MS })
}
async function probeRemoteAuthMode(rawUrl) {
@@ -17445,7 +17422,6 @@ app.on('before-quit', event => {
const backendNeedsWait = backendQuitNeedsWait({
connectionPending: backendConnectionState.getPendingPromise() !== null || localBackendLifecycle.hasPending(),
- poolPending: poolStopper.hasPending(),
processAttached: backendConnectionState.getProcess() !== null,
shutdownPending: backendShutdown.isPending()
})
diff --git a/apps/desktop/electron/quit-teardown.test.ts b/apps/desktop/electron/quit-teardown.test.ts
index eee3072e3d7..f7c8ad1e28c 100644
--- a/apps/desktop/electron/quit-teardown.test.ts
+++ b/apps/desktop/electron/quit-teardown.test.ts
@@ -30,19 +30,17 @@ test('a settled remote descriptor is not backend work that requires a deferred q
assert.equal(
backendQuitNeedsWait({
connectionPending: false,
- poolPending: false,
processAttached: false,
shutdownPending: false
}),
false
)
- for (const key of ['connectionPending', 'poolPending', 'processAttached', 'shutdownPending'] as const) {
+ for (const key of ['connectionPending', 'processAttached', 'shutdownPending'] as const) {
assert.equal(
backendQuitNeedsWait({
connectionPending: false,
- poolPending: false,
- processAttached: false,
+ processAttached: false,
shutdownPending: false,
[key]: true
}),
diff --git a/apps/desktop/electron/quit-teardown.ts b/apps/desktop/electron/quit-teardown.ts
index eef68fb6646..51f63fd808c 100644
--- a/apps/desktop/electron/quit-teardown.ts
+++ b/apps/desktop/electron/quit-teardown.ts
@@ -16,13 +16,12 @@ export interface QuitTeardownCoordinator {
export interface BackendQuitActivity {
connectionPending: boolean
- poolPending: boolean
processAttached: boolean
shutdownPending: boolean
}
export function backendQuitNeedsWait(activity: BackendQuitActivity): boolean {
- return activity.shutdownPending || activity.processAttached || activity.connectionPending || activity.poolPending
+ return activity.shutdownPending || activity.processAttached || activity.connectionPending
}
function runTask(task: QuitTeardownTask): Promise<unknown> {
diff --git a/apps/desktop/electron/terminal-ipc.ts b/apps/desktop/electron/terminal-ipc.ts
index 9dc7e2851f6..92f2560c32a 100644
--- a/apps/desktop/electron/terminal-ipc.ts
+++ b/apps/desktop/electron/terminal-ipc.ts
@@ -31,6 +31,21 @@ export interface TerminalIpcApi {
disposeAllTerminalSessions: () => void
}
+// macOS accepts the bare charset name "UTF-8" as a locale; glibc does not, so
+// every Linux pane would print `bash: warning: setlocale: LC_CTYPE: cannot
+// change locale (UTF-8)`. Reuse the user's LANG there, else the glibc-guaranteed
+// C.UTF-8. Pure: the platform arrives as data so tests need not fake the host.
+export function terminalLcCtype(
+ env: { LANG?: string; LC_CTYPE?: string },
+ platform: NodeJS.Platform = process.platform
+): string {
+ if (env.LC_CTYPE) {
+ return env.LC_CTYPE
+ }
+
+ return platform === 'darwin' ? 'UTF-8' : env.LANG || 'C.UTF-8'
+}
+
export function registerTerminalIpc({
isWindows,
findOnPath,
@@ -156,7 +171,7 @@ export function registerTerminalIpc({
delete env.COLORFGBG
env.COLORTERM = 'truecolor'
- env.LC_CTYPE = env.LC_CTYPE || 'UTF-8'
+ env.LC_CTYPE = terminalLcCtype(env)
env.TERM = 'xterm-256color'
env.TERM_PROGRAM = 'Hermes'
env.TERM_PROGRAM_VERSION = app.getVersion()
diff --git a/apps/desktop/src/sdk/index.test.ts b/apps/desktop/src/sdk/index.test.ts
index 32c02bcffbe..ed2c9f75e5c 100644
--- a/apps/desktop/src/sdk/index.test.ts
+++ b/apps/desktop/src/sdk/index.test.ts
@@ -5,66 +5,38 @@ import { host } from '@/sdk'
import { setActiveSessionId, setAwaitingResponse, setBusy } from '@/store/session'
import { clearAllSessionStates, publishSessionState } from '@/store/session-states'
-// The warm path must route through the guarded prewarm resolver, not dial the
-// gateway directly: gateway.ts's openSecondaryCount and pool-limits' cap atom
-// are the two signals prewarmProfileBackend consults, so mocking them lets the
-// tests observe the guard's decision through the ONLY side effect that matters
-// — whether openGatewayForProfile was dialed.
+// The warm path must route through the guarded prewarm resolver (hover dwell,
+// per-profile throttle), not dial the gateway directly: mocking the store's
+// dialers lets the tests observe the ONLY side effect that matters — whether
+// openGatewayForProfile was dialed.
const warmMocks = vi.hoisted(() => ({
openGatewayForAgent: vi.fn(async (_connectionId: null | string, _profile: string) => undefined),
- openGatewayForProfile: vi.fn(async (_profile: string) => undefined),
- openSecondaryCount: vi.fn(() => 0)
+ openGatewayForProfile: vi.fn(async (_profile: string) => undefined)
}))
vi.mock('@/store/gateway', async importOriginal => ({
...((await importOriginal()) as Record<string, unknown>),
openGatewayForAgent: warmMocks.openGatewayForAgent,
- openGatewayForProfile: warmMocks.openGatewayForProfile,
- openSecondaryCount: warmMocks.openSecondaryCount
+ openGatewayForProfile: warmMocks.openGatewayForProfile
}))
-vi.mock('@/store/pool-limits', async () => {
- const { atom } = await import('nanostores')
-
- return { $poolLimits: atom({ idleMs: 600_000, maxBackends: 3 }) }
-})
-
-describe('host.warmProfile pool-saturation contract', () => {
+describe('host.warmProfile routing contract', () => {
beforeEach(() => {
warmMocks.openGatewayForProfile.mockClear()
- warmMocks.openSecondaryCount.mockReturnValue(0)
+ warmMocks.openGatewayForAgent.mockClear()
})
- it('dials through the guarded path when a pool slot is free', () => {
- warmMocks.openSecondaryCount.mockReturnValue(2)
-
+ it('dials the profile through the guarded prewarm path', () => {
host.warmProfile('warm-free-slot')
expect(warmMocks.openGatewayForProfile).toHaveBeenCalledWith('warm-free-slot')
})
- it('skips the speculative spawn when every pool slot is occupied', () => {
- warmMocks.openSecondaryCount.mockReturnValue(3)
-
- host.warmProfile('warm-saturated')
+ it('ignores an empty profile name', () => {
+ host.warmProfile(' ')
expect(warmMocks.openGatewayForProfile).not.toHaveBeenCalled()
})
-
- it('warmAgent (multi-source rows) honours the same saturation guard', () => {
- warmMocks.openGatewayForAgent.mockClear()
- warmMocks.openSecondaryCount.mockReturnValue(3)
-
- host.warmAgent('conn-vps', 'warm-agent-saturated')
-
- expect(warmMocks.openGatewayForAgent).not.toHaveBeenCalled()
-
- warmMocks.openSecondaryCount.mockReturnValue(2)
-
- host.warmAgent('conn-vps', 'warm-agent-free')
-
- expect(warmMocks.openGatewayForAgent).toHaveBeenCalledWith('conn-vps', 'warm-agent-free')
- })
})
describe('host.state turn flags', () => {
diff --git a/gateway/run_turn_prepare.py b/gateway/run_turn_prepare.py
index 06a498488e3..77df6cf5193 100644
--- a/gateway/run_turn_prepare.py
+++ b/gateway/run_turn_prepare.py
@@ -298,16 +298,6 @@ class GatewayTurnPrepareMixin:
return
session_entry = resolved_entry
self._cache_session_source(session_key, source)
- if not bool(getattr(event, "internal", False)):
- try:
- from gateway.wisdom_mediation import schedule as observe_wisdom_session
-
- await observe_wisdom_session(
- self, self._adapter_for_source(source), source,
- str(session_entry.session_id), observe_only=True,
- )
- except Exception:
- logger.debug("Wisdom session activity unavailable", exc_info=True)
if await asyncio.to_thread(self._is_telegram_topic_lane, source):
session_entry = await self._hmwa_heal_telegram_topic_binding(source, session_entry, session_key)
from gateway.run_heartbeat_acceptance import resolve_heartbeat_owner
diff --git a/hermes_cli/web_server_app.py b/hermes_cli/web_server_app.py
index ec5a15abca4..d7d14f222db 100644
--- a/hermes_cli/web_server_app.py
+++ b/hermes_cli/web_server_app.py
@@ -17,7 +17,7 @@ async def standalone_lifespan(app: "FastAPI"):
from hermes_cli.web_server import (
_eager_reconcile_own_session_db, _warm_gateway_module,
_start_desktop_cron_ticker, _dashboard_selftest_loop,
- _auto_archive_ticker_loop, _terminate_desktop_managed_gateway, _wisdom_checker_loop,
+ _auto_archive_ticker_loop, _terminate_desktop_managed_gateway,
)
from hermes_cli.web_server_chat import PTY_REGISTRY
@@ -109,7 +109,6 @@ async def standalone_lifespan(app: "FastAPI"):
selftest_task = asyncio.create_task(_dashboard_selftest_loop())
# Live auto-archive timer, independent of list requests.
auto_archive_task = asyncio.create_task(_auto_archive_ticker_loop())
- wisdom_checker_task = asyncio.create_task(_wisdom_checker_loop())
# Managed local runtime (local_runtime.enabled): bring llama-server back so a
# restart doesn't strand a llamacpp main model. Off-thread and best-effort;
@@ -141,7 +140,6 @@ async def standalone_lifespan(app: "FastAPI"):
pty_reaper_task.cancel()
selftest_task.cancel()
auto_archive_task.cancel()
- wisdom_checker_task.cancel()
await PTY_REGISTRY.close_all()
# Stop the managed llama-server with its parent (an orphan pins VRAM).
try:
diff --git a/tests/hermes_cli/test_main_merge_lifecycle.py b/tests/hermes_cli/test_main_merge_lifecycle.py
index 17505b26f96..1227a2fc3ae 100644
--- a/tests/hermes_cli/test_main_merge_lifecycle.py
+++ b/tests/hermes_cli/test_main_merge_lifecycle.py
@@ -29,37 +29,3 @@ def test_local_launch_bootstraps_before_provider_guard(monkeypatch):
lambda: events.append('inventory') or True)
assert ensure_launch_provider(SimpleNamespace())
assert events == [('boot', {'announce': False}), 'inventory']
-
-
[email protected]('owned', [False, True])
-async def test_wisdom_and_identity_have_one_lifespan_owner(monkeypatch, owned):
- from fastapi import FastAPI
- from hermes_cli import web_server as web, web_server_app, free_tier_bootstrap
- from tui_gateway import methods_groups
- events = []
- boot = Mock()
- monkeypatch.setattr(free_tier_bootstrap, 'start_background_bootstrap', boot)
- monkeypatch.delenv('HERMES_DESKTOP', raising=False)
- for name in ('_warm_gateway_module', '_eager_reconcile_own_session_db'):
- monkeypatch.setattr(web, name, lambda: None)
- for name in ('start_hosted_room_service', 'stop_hosted_room_service'):
- monkeypatch.setattr(methods_groups, name, lambda **kw: None)
- for name in ('ensure_local_runtime', 'shutdown_local_runtime'):
- monkeypatch.setattr('hermes_cli.local_runtime.bootstrap.' + name, lambda *a: None)
- async def checker():
- events.append('started')
- try:
- await asyncio.Event().wait()
- finally:
- events.append('cancelled')
- monkeypatch.setattr(web, '_wisdom_checker_loop', checker)
- app = FastAPI()
- if owned:
- app.state.gateway_runner = object()
- async with web_server_app.app_lifespan(app):
- await asyncio.sleep(0)
- assert events == ([] if owned else ['started'])
- assert boot.call_count == (0 if owned else 1)
- await asyncio.sleep(0)
- assert events == ([] if owned else ['started', 'cancelled'])
diff --git a/tests/tui_gateway/test_bot_live_owner_delivery.py b/tests/tui_gateway/test_bot_live_owner_delivery.py
index 09d7b5297cc..bf611763c06 100644
--- a/tests/tui_gateway/test_bot_live_owner_delivery.py
+++ b/tests/tui_gateway/test_bot_live_owner_delivery.py
@@ -75,7 +75,6 @@ def test_viewer_poller_never_discovers_or_claims_bot_execution(monkeypatch, tmp_
delivered = []
poll = rebind(session_notifications._notification_poller_loop, {
'time': time, '_LOOP_POLL_SECONDS': 0, '_KANBAN_POLL_SECONDS': 0,
- '_WISDOM_POLL_SECONDS': 0, '_sync_wisdom_activity_notice': lambda *a: None,
'_poll_bot_live_delivery_once': lambda *a: calls.append('legacy-claim'),
'_maybe_fire_tui_loop_tick': lambda *a: None,
'_maybe_fire_tui_heartbeat_tick': lambda *a: None,
diff --git a/tests/tui_gateway/test_main_merge_projections.py b/tests/tui_gateway/test_main_merge_projections.py
index ad70fd6cbbf..4cb9e081b68 100644
--- a/tests/tui_gateway/test_main_merge_projections.py
+++ b/tests/tui_gateway/test_main_merge_projections.py
@@ -2,21 +2,6 @@
import threading
from contextlib import nullcontext
-import pytest
-
-
[email protected]('entitled', [False, True])
-def test_catalog_filters_all_wisdom_projections(monkeypatch, entitled):
- from tui_gateway.command_discovery import command_catalog
- monkeypatch.setattr('hermes_wisdom.entitlement.is_entitled', lambda: entitled)
- monkeypatch.setattr('hermes_cli.plugins.get_plugin_commands', lambda: {})
- monkeypatch.setattr('agent.skill_commands.scan_skill_commands', lambda: {})
- catalog = command_catalog(load_cfg=lambda: {})
- for projection in ('commands', 'canon', 'sub'):
- assert ('/wisdom' in catalog[projection]) is entitled
- assert any(key == '/wisdom' for key, _ in catalog['pairs']) is entitled
-
-
def test_live_message_count_tracks_serialized_projection(monkeypatch):
from tui_gateway import server
monkeypatch.setattr(server, '_session_db', lambda session: nullcontext(None))
diff --git a/tui_gateway/command_discovery.py b/tui_gateway/command_discovery.py
index 79612fe143b..8e00db90e6e 100644
--- a/tui_gateway/command_discovery.py
+++ b/tui_gateway/command_discovery.py
@@ -128,8 +128,6 @@ class _Catalog:
def _catalog_registry(cat: _Catalog, module_loader) -> None:
commands = module_loader("hermes_cli.commands")
for cmd in commands.COMMAND_REGISTRY:
- if not commands.command_available(cmd):
- continue
meta = commands.command_desktop_meta(cmd)
cat.commands.update({f"/{key}": dict(meta) for key in (cmd.name, *cmd.aliases)})
if cmd.name in _TUI_HIDDEN or cmd.gateway_only:
@@ -204,10 +202,7 @@ def command_catalog(load_cfg=None, module_loader=import_module) -> dict:
except Exception as e:
warning = f"skill discovery unavailable: {e}"
return {
- "pairs": cat.pairs, "sub": {
- k: v[:] for k, v in module_loader("hermes_cli.commands").SUBCOMMANDS.items()
- if module_loader("hermes_cli.commands").command_available(k)
- },
+ "pairs": cat.pairs, "sub": {k: v[:] for k, v in module_loader("hermes_cli.commands").SUBCOMMANDS.items()},
"canon": cat.canon,
"commands": cat.commands,
"categories": [{"name": c, "pairs": rows} for c, rows in cat.cat_map.items()],
diff --git a/tui_gateway/methods_tools.py b/tui_gateway/methods_tools.py
index f067041883d..d1219b54c45 100644
--- a/tui_gateway/methods_tools.py
+++ b/tui_gateway/methods_tools.py
@@ -330,102 +330,11 @@ def _(rid, params: dict) -> dict:
# ─── Command catalog / dispatch ──────────────────────────────────────────────
-class _Catalog:
- """Accumulator for commands.catalog: ``pairs`` (every [key, desc]), ``canon`` (lowercase
- key/alias → canonical key), ``commands`` (key → desktop meta) and ordered categories."""
-
- def __init__(self) -> None:
- self.pairs: list[list[str]] = []
- self.canon: dict[str, str] = {}
- self.commands: dict[str, dict[str, str | None]] = {}
- self.cat_map: dict[str, list[list[str]]] = {} # insertion order = category order
-
- def add(self, key: str, desc: str, cat: str) -> None:
- self.canon[key.lower()] = key
- self.pairs.append([key, desc])
- self.cat_map.setdefault(cat, []).append([key, desc])
-
-
-def _catalog_registry(cat: _Catalog) -> None:
- commands = _tools_mod("hermes_cli.commands")
- for cmd in commands.COMMAND_REGISTRY:
- meta = commands.command_desktop_meta(cmd)
- cat.commands.update({f"/{key}": dict(meta) for key in (cmd.name, *cmd.aliases)})
- if cmd.name in _TUI_HIDDEN or cmd.gateway_only:
- continue
- cat.add(f"/{cmd.name}", commands._build_description(cmd), cmd.category)
- for a in cmd.aliases:
- cat.canon[f"/{a}".lower()] = f"/{cmd.name}"
- for name, desc, category in _TUI_EXTRA:
- # Registry command/alias wins over a colliding TUI extra (e.g. /compact, /sessions).
- if name.lower() not in cat.canon:
- cat.add(name, desc, category)
-
-
-def _catalog_quick_commands(cat: _Catalog) -> None:
- qcmds = _load_cfg().get("quick_commands", {}) or {}
- if not (isinstance(qcmds, dict) and qcmds):
- return
- cat.cat_map.setdefault("User commands", []) # category exists even when every entry is malformed
- for qname, qc in sorted(qcmds.items()):
- if not isinstance(qc, dict):
- continue
- qtype = qc.get("type", "")
- default_desc = {"exec": f"exec: {qc.get('command', '')}", "alias": f"alias → {qc.get('target', '')}"}
- desc = str(qc.get("description") or default_desc.get(qtype, qtype or "quick command"))
- cat.add(f"/{qname}", desc, "User commands")
-
-
-def _catalog_plugin_commands(cat: _Catalog) -> None:
- plugin_cmds = _tools_mod("hermes_cli.plugins").get_plugin_commands() or {}
- if plugin_cmds:
- cat.cat_map.setdefault("Plugin commands", [])
- for pname, info in sorted(plugin_cmds.items()):
- key = f"/{pname}"
- if not isinstance(info, dict) or key.lower() in cat.canon:
- continue
- cat.add(key, str(info.get("description") or "Plugin command"), "Plugin commands")
- mode = info.get("argument_mode")
- if mode not in {"options", "text", "mixed"}:
- mode = "text" if str(info.get("args_hint") or "").strip() else None
- cat.commands[key] = {"argument_mode": mode, "desktop": None}
-
-
-def _catalog_skills(cat: _Catalog, skills: dict[str, dict]) -> None:
- """Append skill pairs and fill ``skills`` = ``{key: {usage, origin}}`` (every consumer ranks by them)."""
- usage, origin_of = _skill_usage_lookup()
- for k, info in sorted(_tools_mod("agent.skill_commands").scan_skill_commands().items()):
- cat.pairs.append([k, str(info.get("description", "Skill"))])
- name = str(info.get("name") or k.lstrip("/"))
- skills[k] = {"usage": usage(name), "origin": origin_of(name)}
-
-
@_rpc("commands.catalog", 5020)
def _(rid, params: dict) -> dict:
- """Registry-backed slash metadata, categorized, no aliases. Discovery failures land in ``warning``
- (skills' message wins, then quick commands', then plugins')."""
- cat = _Catalog()
- _catalog_registry(cat)
- warning = ""
- try:
- _catalog_quick_commands(cat)
- except Exception as e:
- warning = f"quick_commands discovery unavailable: {e}"
- try:
- _catalog_plugin_commands(cat)
- except Exception as e:
- warning = warning or f"plugin command discovery unavailable: {e}"
- skills: dict[str, dict] = {}
- try:
- _catalog_skills(cat, skills)
- except Exception as e:
- warning = f"skill discovery unavailable: {e}"
- return _ok(rid, {
- "pairs": cat.pairs, "sub": {k: v[:] for k, v in _tools_mod("hermes_cli.commands").SUBCOMMANDS.items()},
- "canon": cat.canon,
- "commands": cat.commands,
- "categories": [{"name": c, "pairs": rows} for c, rows in cat.cat_map.items()],
- "skills": skills, "skill_count": len(skills), "warning": warning})
+ """Registry-backed slash metadata, categorized, no aliases (shared builder in command_discovery)."""
+ from tui_gateway.command_discovery import command_catalog
+ return _ok(rid, command_catalog(load_cfg=_load_cfg, module_loader=_tools_mod))
@method("cli.exec")
diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts
index 12c7ec7c658..b7b651ae058 100644
--- a/web/src/lib/api.ts
+++ b/web/src/lib/api.ts
@@ -2,7 +2,6 @@ import { buildHermesWebSocketUrl } from "@hermes/shared";
import { createDashboardSessionMutations } from "./session-mutations";
const mutateSessionHttp = createDashboardSessionMutations(fetchJSON);
-import type { WisdomMuteControl, WisdomMuteDuration, WisdomMuteSnapshot, WisdomSyncSnapshot } from '@hermes/shared'
// The dashboard can be served either at the root of its host (e.g.
// https://kanban.tilos.com/) or under a URL prefix when reverse-proxied