wrolpi/modules/ai
Roland 6d48e3cdb0
ai: wrolpi_mcp becomes a thin proxy over /api/ai
Every MCP tool is now one /api/ai call with minimal text rendering;
the formatting, link building, and truncation logic it used to carry
untested lives (tested) in modules/ai.  Tool names are unchanged for
external clients; a source-scan test guards the names and that the
proxy only reaches /api/ai.  New lean blueprint endpoints back the two
tools that had no equivalent: GET archives/{id} (detail + snapshot
history) and GET videos/{id}/comments (paged author lines).  Paged
content is read up to the old 50k-char bound.  get_inventory_items now
takes the inventory slug (inventories are config-only; the old
numeric-id endpoint no longer exists).  This also brings wrolpi_mcp
into version control (venv/ is already gitignored).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-13 20:10:16 -06:00
..
test ai: wrolpi_mcp becomes a thin proxy over /api/ai 2026-09-13 20:10:16 -06:00
__init__.py ai: package llama-server for all three deployments, with idle unload 2026-09-13 20:10:16 -06:00
agent.py ai: the /api/chat agent loop — SSE streaming, modes, tool execution 2026-09-13 20:10:16 -06:00
api.py ai: wrolpi_mcp becomes a thin proxy over /api/ai 2026-09-13 20:10:16 -06:00
catalog.py ai: ai.yaml config, model catalog, and the GGUF downloader 2026-09-13 20:10:15 -06:00
chat.py ai: the /api/chat agent loop — SSE streaming, modes, tool execution 2026-09-13 20:10:16 -06:00
config.py ai: ai.yaml config, model catalog, and the GGUF downloader 2026-09-13 20:10:15 -06:00
conftest.py ai: ai.yaml config, model catalog, and the GGUF downloader 2026-09-13 20:10:15 -06:00
controller_client.py ai: package llama-server for all three deployments, with idle unload 2026-09-13 20:10:16 -06:00
downloader.py ai: ai.yaml config, model catalog, and the GGUF downloader 2026-09-13 20:10:15 -06:00
errors.py ai: system endpoints — aggregate status, services, logs, disks 2026-09-13 20:10:15 -06:00
help_docs.py ai: help-docs search — Help mode tools 2026-09-13 20:10:15 -06:00
lib.py ai: add the /api/ai blueprint, the read-only LLM tool catalog 2026-09-13 20:10:15 -06:00
modes.py ai: the /api/chat agent loop — SSE streaming, modes, tool execution 2026-09-13 20:10:16 -06:00
schema.py ai: the /api/chat agent loop — SSE streaming, modes, tool execution 2026-09-13 20:10:16 -06:00
service.py ai: package llama-server for all three deployments, with idle unload 2026-09-13 20:10:16 -06:00