-
feat(#2): consume GET /sessions/{id}/tools — Tools-pane inventory hydrate
released this
2026-06-30 22:50:12 -07:00 | 176 commits to main since this releasev1 coverage-audit Tier-2 quick win. The owner-scoped tool-inventory
endpoint (#183) had no caller; wire it into the TUI Tools pane.- sessions.py: get_session_tools (GET /sessions/{id}/tools) — owner-
scoped (consumer key, no admin scope), 200 -> parsed dict verbatim,
non-200 -> SessionApiFailed. Mirrors get_persona_state / get_me. - tui.py: _format_tool_inventory helper + _hydrate_session_tools
best-effort worker (mirrors _hydrate_persona), wired unconditionally
in on_mount. Writes the merged {agent_id, builtin_tools,
bifrost_tools} inventory the LLM saw at turn-fire into the Tools
pane + audits; never crashes on failure. - Covers the design-brief 5 "Tools widget" via the reachable owner
endpoint (the admin variant stays a gap only for cross-user debug). - Contract #2 amended (FN) + validated. TDD: 3 wrapper tests + 1
format-helper unit + 2 hydrate integration tests. Coverage: REST
10/40. Suite 544 green; touched code ruff-clean.
Downloads
- sessions.py: get_session_tools (GET /sessions/{id}/tools) — owner-