opentui(v5b/item1): Ink-parity startup banner panel

Rebuilt the home screen to match hermes --tui: the HERMES-AGENT banner + tagline,
then a session info block (model · Nous Research / dir (branch) / Session: <id>),
then SEPARATE collapsible sections — Available Tools (enabled toolsets each as
'name: tool1, tool2', capped + '(and N more toolsets…)'), Available Skills (N) in
M categories, MCP Servers (N) connected — and a '… /help for commands' summary.
Previously it was one combined '▶ N tools · M skills · K MCP' dropdown that only
listed tools and showed no model/dir/session.

- gateway startup.catalog now returns per-toolset {enabled, tools} (resolved_tools,
  session-aware enabled set — mirrors tools.list); py_compile OK.
- store Catalog gains toolset.enabled/tools; new sessionId field + setSessionId,
  set on session create/resume (alongside the active-session-file write).
- homeHint takes the store, reads info (model/cwd/branch) + sessionId + catalog.
85 pass; verified live (model·Nous·dir·session + enabled toolsets w/ tools).
This commit is contained in:
alt-glitch
2026-06-09 05:19:21 +00:00
parent 06762a0f5e
commit fb04e85a14
7 changed files with 164 additions and 84 deletions
+15 -2
View File
@@ -8528,12 +8528,25 @@ def _(rid, params: dict) -> dict:
try:
from toolsets import get_all_toolsets, get_toolset_info
# enabled toolsets for THIS session (or the config default), mirroring tools.list
session = _sessions.get(params.get("session_id", ""))
enabled = (
set(getattr(session["agent"], "enabled_toolsets", []) or [])
if session
else set(_load_enabled_toolsets() or [])
)
for name in sorted(get_all_toolsets().keys()):
info = get_toolset_info(name)
if not info:
continue
tools["toolsets"].append({"name": name, "count": int(info["tool_count"])})
tools["total"] += int(info["tool_count"])
is_on = name in enabled if enabled else True
# the startup panel lists ENABLED toolsets with their tools (Ink parity)
tool_names = [str(t) for t in (info.get("resolved_tools") or [])]
tools["toolsets"].append(
{"name": name, "count": int(info["tool_count"]), "enabled": is_on, "tools": tool_names}
)
if is_on:
tools["total"] += int(info["tool_count"])
except Exception:
pass