feat(odin): Phase 2a read-only agentic assistant + tool-trace UI

- agentic chat loop (max 6 round-trips, budget re-checked between iterations)
  over 10 read-only, permission-delegated tools in src/services/ai-tools.ts
- persist assistant tool trace in ai_chat_messages.content_json (+ migration)
- consulted-tools chips in OdinThread; header now shows month spend only
  (budget cap hidden from the UI, server-side 402 guard unchanged)
- seed: ai.use permission; Settings exposes the ai permission module
- docs: REVIEW consolidation; deployment-guide.md superseded by docs/release.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-10 23:31:50 +02:00
parent 2dbacc3bec
commit 674b44d047
26 changed files with 13728 additions and 2935 deletions

View File

@@ -19,6 +19,20 @@ export const AiHistoryAppendSchema = z.object({
z.object({
role: z.enum(["user", "assistant"]),
content: z.string().min(1).max(8000),
// Structured per-message metadata (assistant tool trace) → content_json.
meta: z
.object({
tools: z
.array(
z.object({
name: z.string().max(100),
label: z.string().max(100),
ok: z.boolean(),
}),
)
.max(30),
})
.optional(),
}),
)
.min(1, "Žádné zprávy")