From fcb8629182fa1552e4a840ccd4ec0aa2b8042cc0 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 19 Dec 2025 21:54:54 -0500 Subject: feat(ava): add tool trace viewer mini-app - Add SQLite storage for tool traces (Omni/Ava/Trace.hs) - Add web server to serve trace viewer (Omni/Ava/Web.hs) - Add HTML/CSS/JS trace viewer UI (Omni/Ava/Web/trace.html) - Integrate trace storage into Engine.hs tool execution callback - Add trace links to Telegram responses when AVA_WEB_URL is set - Configure Tailscale Funnel for public access - Fix pre-push hook variable scope bug - Add direnv, bash, nix to Ava service PATH - Add mustache dep to Ava.hs for template rendering Epic: t-272 --- Omni/Agent/Memory.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Omni/Agent/Memory.hs') diff --git a/Omni/Agent/Memory.hs b/Omni/Agent/Memory.hs index d59104c..c869b26 100644 --- a/Omni/Agent/Memory.hs +++ b/Omni/Agent/Memory.hs @@ -795,6 +795,21 @@ initMemoryDb conn = do SQL.execute_ conn "CREATE INDEX IF NOT EXISTS idx_chat_history_time ON chat_history(created_at)" + SQL.execute_ + conn + "CREATE TABLE IF NOT EXISTS tool_traces (\ + \ id TEXT PRIMARY KEY,\ + \ created_at TEXT NOT NULL,\ + \ tool_name TEXT NOT NULL,\ + \ input TEXT NOT NULL,\ + \ output TEXT NOT NULL,\ + \ duration_ms INTEGER NOT NULL,\ + \ user_id TEXT,\ + \ chat_id TEXT\ + \)" + SQL.execute_ + conn + "CREATE INDEX IF NOT EXISTS idx_traces_created ON tool_traces(created_at)" -- | Migrate conversation_messages to add sender_name and thread_id columns. migrateConversationMessages :: SQL.Connection -> IO () -- cgit v1.2.3