wrolpi/modules
Roland 84883c36f6
ai: the /api/chat agent loop — SSE streaming, modes, tool execution
Tool definitions are generated in-process from the /api/ai blueprint's
own OpenAPI operations (operationId = tool name, description = tool
description, dataclass bodies + declared parameters = one flat JSON
schema) — the spec IS the catalog, nothing to drift.  Manage endpoints
never become tools.  A mode is a server-enforced system prompt + tool
allowlist (Help / Research / System per ai.md); the executor can only
reach allowlisted /api/ai endpoints, path parameters are encoded and
traversal-rejected so a crafted argument cannot escape an endpoint.

POST /api/chat streams SSE (status/token/tool_call/tool_result/done/
error), starts llama-server on demand, validates tool args server-side
with instructive errors the model can retry on, caps tool results with
a paging hint, and bounds the loop by ai.yaml max_tool_calls plus a
hard timeout.  Caddy passes the stream unbuffered (flush_interval -1)
in both deployments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-13 20:10:16 -06:00
..
ai ai: the /api/chat agent loop — SSE streaming, modes, tool execution 2026-09-13 20:10:16 -06:00
archive search: don't COUNT(*) OVER() the page query (#702) 2026-09-12 14:44:30 -06:00
docs docs: browse walks the file_group date index instead of probing every doc (#707) 2026-09-13 12:39:05 -06:00
flasher Flasher: chip-mismatch guard, WROLPi firmware table, colorblind chip colors 2026-07-02 17:26:37 -06:00
inventory Strip whitespace from inventory item string values on save 2026-07-30 17:34:46 -06:00
map Map previews that never drew, and a Docker map with no world under it (#658) 2026-08-11 20:37:23 -06:00
videos search: don't COUNT(*) OVER() the page query (#702) 2026-09-12 14:44:30 -06:00
zim zim: recompute the outdated-Zims flag after startup and on Delete (#706) 2026-09-12 15:19:36 -06:00
__init__.py Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00