summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
9 daysOmni/Ava: improve trace viewer and subagent notificationsBen Sima
- Add subagent completion callback to notify user when subagent finishes - Show tool name in 'view trace' link (e.g. 'view web_search trace') - Pretty-print JSON on trace web page using aeson-pretty Amp-Thread-ID: https://ampcode.com/threads/T-019b3a13-bc75-7368-9ec9-362d462a022c Co-authored-by: Amp <amp@ampcode.com>
10 daysOmni/Ava/Web: refactor to use Servant and LucidBen Sima
Matches the patterns used in Omni/Jr/Web.
10 daysOmni/Ava/Web: embed trace template, remove CODEROOT dependencyBen Sima
Also added HTML escaping for input/output JSON.
10 daysOmni/Agent: make token explosion impossibleBen Sima
Tools.hs: - run_bash now uses mkSuccess (applies truncation) - read_file requires line ranges for files >500 lines - read_file rejects ranges >400 lines Engine.hs: - Added engine-level truncateToolResult (10k char cap) - Fixed test detection: bash -> run_bash
10 daysOmni/Agent/Subagent/Coder: improve token efficiencyBen Sima
- Rewrote system prompt with TOKEN EFFICIENCY section - Reduced defaults: timeout 600s, maxCost 50ยข, maxTokens 100k - Added output truncation (8000 char cap) to all tools - Tightened search limits (30 results, 5 context lines)
10 daysfix(ava): use Memory database path for trace web serverBen Sima
Traces are inserted via Memory.withMemoryDb but web server was using a different path (AVA_DATA_ROOT/ava.db). Now both use getMemoryDbPath.
11 daysMake Ci.hs executableBen Sima
11 daysAdd passBen Sima
11 daysRemove direnvBen Sima
11 daysfix(ava): initialize tool_traces table on web server startupBen Sima
The table creation was in Memory.initMemoryDb but Web.hs opened the database directly without calling it. Now Trace.hs has its own initTraceDb function that Web.startWebServer calls on startup.
11 daysRemove direnv from dev shellBen Sima
11 daysfeat(ava): add tool trace viewer mini-appBen Sima
- 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
11 daysOmni/Agent: wire prompt templating system to agentsBen Sima
- Telegram.hs: add loadTelegramSystemPrompt with fallback - Subagent.hs: add loadSystemPromptForRole with fallback - Coder.hs: add loadCoderSystemPrompt with fallback - Ava.nix: add tmpfiles rules for /home/ava/prompts/ - Prompts.hs: fix test to expect .mustache extension Templates loaded at runtime from $AVA_DATA_ROOT/prompts/. Falls back to hardcoded prompts if templates not found. Amp-Thread-ID: https://ampcode.com/threads/T-019b3878-73be-77ec-97cc-d092a28d211e Co-authored-by: Amp <amp@ampcode.com>
11 daysAdd prompt templating system with mustacheBen Sima
- Add promptsDir to Paths.hs for $AVA_DATA_ROOT/prompts/ - Create Omni.Agent.Prompts module with: - Mustache template loading and rendering - Automatic partial resolution via automaticCompile - Frontmatter/metadata parsing for list command - Create omni-agent-prompt CLI for previewing prompts: - list: show all available prompts - render: render prompt with --var and --json context - Prompts use .mustache extension for automaticCompile compatibility - Partials referenced with full extension: {{> shared/memory.mustache}}
11 daysWire up writeAvaLog to actually write audit logsBen Sima
- Add AuditLog import to Telegram.hs - Call writeAvaLog for user messages in both handleEngagement paths - Call writeAvaLog for assistant responses - Add logs directories to Ava.nix tmpfiles rules
11 daysAdd direnv to ava user configBen Sima
- Add direnv to ava's PATH via wrapper - Create .bashrc with direnv hook on activation
11 daysAdd direnv and pass to dev shellBen Sima
11 daysDrop unused guix depBen Sima
11 daysUpdate cgit dep URLBen Sima
11 daysAdd semantic search for chat historyBen Sima
- Add chat_history table with embeddings in memory.db - Add saveChatHistoryEntry for live message ingestion - Add searchChatHistorySemantic for vector similarity search - Update search_chat_history tool to use semantic search - Add backfill command: run.sh Omni/Agent/Memory.hs backfill - Add stats command: run.sh Omni/Agent/Memory.hs stats - Change default memory.db path to ~/memory.db - Wire Telegram message handling to save to chat_history async
11 daysAdd search_chat_history tool for AvaBen Sima
Allows Ava to search her conversation logs for past discussions. Searches UserMessage/AssistantMessage events with case-insensitive matching, configurable days_back (default 7) and max_results (default 20).
12 daysCoder: git pull --ff-only in init phaseBen Sima
12 daysfix: actually restart services on deploymentBen Sima
Previously used 'enable --now' which only starts stopped services. Now explicitly calls 'restart' to ensure running services pick up new versions.
12 daysSubagent: clarify context is required for coder roleBen Sima
12 daysSubagent: remove task_id from spawn_subagent tool schemaBen Sima
The coder role no longer requires task_id, only namespace.
12 dayspush.sh: fix hostname extraction from pathBen Sima
12 daysTelegram formatting + push.sh Tailscale supportBen Sima
- Strengthen Telegram MarkdownV2 formatting guidance in Ava's system prompt - Add DNS record beryl.bensima.com -> 100.127.197.132 (Tailscale IP) - Modify push.sh to detect local deploys and skip SSH - Add Tailscale hostname fallback when domain is unreachable
12 daysOmni/Agent/Subagent/Coder: decouple from jr task systemBen Sima
Remove task_id requirement and all jr task CLI calls. The Coder subagent now only requires namespace and task description - no external task tracking needed. Changes: - Remove coderTaskId from CoderConfig - Remove jr task show/update/comment calls - Commit message uses namespace prefix instead of task ID - Recovery phase just reverts git, no task comment - Subagent.hs only validates namespace for Coder role
12 daysAdd Telegram button confirmation for subagent spawningBen Sima
Security improvement: subagents now require explicit user confirmation via Telegram inline buttons, preventing the agent from bypassing approval. Changes: - Add InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery types - Add parseCallbackQuery for handling button presses - Add sendMessageWithKeyboard and answerCallbackQuery API functions - Add PendingSpawn registry for tracking unconfirmed spawn requests - Add spawnSubagentToolWithApproval that sends approval buttons - Add handleCallbackQuery to process approve/reject button clicks - Add approveAndSpawnSubagent and rejectPendingSpawn functions Flow: 1. Agent calls spawn_subagent โ†’ creates pending request 2. User receives message with โœ… Approve / โŒ Reject buttons 3. Button click (outside agent loop) spawns or cancels 4. Pending requests expire after 10 minutes
12 daysfeat: redesign home page with audio sample, problem/solution, FAQBen Sima
- Add audio player to preview episode quality - Restructure pricing and signup as side-by-side hero - Add 'Sound Familiar?' problem statement section - Add FAQ section answering common questions - Remove redundant social proof section - Improve visual hierarchy and call-to-action flow
12 daysMake subagents non-blocking with async spawningBen Sima
- Add global subagent registry to track running handles by ID - Modify executeSpawnSubagent to use spawnSubagentAsync and return immediately - Add check_subagent tool for querying status or getting results - Export subagentTools convenience function with both tools - Update Telegram.hs to use subagentTools instead of just spawnSubagentTool Ava can now spawn subagents in the background and continue conversations while checking on progress via check_subagent.
13 daysfix: update goatcounter tracking URL to stats.podcastitlater.bensima.comBen Sima
13 daysfeat: add goatcounter analytics to PodcastItLaterBen Sima
- Add goatcounter NixOS service to Biz.nix (SQLite backend, port 8081) - Add tracking script to UI.py PageLayout component - Configure for proxy mode (behind Caddy)
13 daysfeat(ava): subagent hardening with audit loggingBen Sima
Based on Anthropic's effective harnesses research. New modules: - Omni/Agent/AuditLog.hs: JSONL audit logging with SubagentId linking - Omni/Agent/Tools/AvaLogs.hs: Tool for Ava to query her own logs - Omni/Agent/Subagent/HARDENING.md: Design documentation Key features: - SubagentHandle with TVar status for async execution and polling - spawnSubagentAsync, querySubagentStatus, waitSubagent, cancelSubagent - User confirmation: spawn_subagent requires confirmed=true after approval - Audit logs stored in $AVA_DATA_ROOT/logs/{ava,subagents}/ - CLI: ava logs [--last=N] [<subagent_id>] - read_ava_logs tool for Ava self-diagnosis Tasks: t-267, t-268, t-269, t-270, t-271
13 daysava: add Python/CLI tools and local whisper fallbackBen Sima
- Wrap ava binary with Python (requests, httpx, pandas, etc.) - Add CLI tools: curl, pandoc, ffmpeg, imagemagick, csvkit - Add local whisper-cli fallback when OPENAI_API_KEY unavailable Amp-Thread-ID: https://ampcode.com/threads/T-019b2dc2-36e0-75e1-90c1-622901fc9847 Co-authored-by: Amp <amp@ampcode.com>
13 daysava: wrap binary with Python and CLI toolsBen Sima
13 daysFix Ava log buffering for journaldBen Sima
- Add LineBuffering to stdout/stderr in Ava.hs - Add StandardOutput/StandardError=journal to systemd service
13 daysMerge Ava deployment changesBen Sima
13 daysAdd Ava systemd deployment with dedicated user and workspaceBen Sima
- Add Omni.Agent.Paths module for configurable AVA_DATA_ROOT - Create ava Linux user in Users.nix with SSH key - Add systemd service in Beryllium/Ava.nix with graceful shutdown - Update Skills.hs and Outreach.hs to use configurable paths - Add startup logging of resolved paths in Telegram.hs - Create migration script for moving data from _/var/ava to /home/ava - Add deployment documentation in Beryllium/AVA.md In dev: AVA_DATA_ROOT unset uses _/var/ava/ In prod: AVA_DATA_ROOT=/home/ava via systemd Amp-Thread-ID: https://ampcode.com/threads/T-019b2d7e-bd88-7355-8133-275c65157aaf Co-authored-by: Amp <amp@ampcode.com>
13 daysAdd subagent system for AvaBen Sima
Enables orchestrator to spawn specialized subagents for focused tasks: - WebCrawler: web search + page reading (haiku, fast) - CodeReviewer: code analysis tools (sonnet, thorough) - DataExtractor: structured data extraction (haiku) - Researcher: combined web + codebase research (sonnet) Key features: - spawn_subagent tool with role-based tool selection - Per-subagent resource limits (timeout, cost, tokens) - Structured output with citations (claim, source_url, quote) - Separate API keys for OpenRouter vs Kagi - Efficiency-focused system prompts Defaults: 200k tokens, $1.00 cost cap, 600s timeout, 20 iterations
13 daysImprove PodcastItLater homepage and dark mode supportBen Sima
Homepage changes: - New marketing-focused landing page for logged-out users - Hero: 'Your Reading List, as a Podcast' with clear value prop - How It Works: 3-step process cards (paste URL, convert, listen) - Social proof: 'Join others' section with public feed - Login form moved below social proof for better conversion flow Dark mode fixes: - Remove bg-light from Current Plan card on /account page - Remove bg-white from metrics card headers on /admin/metrics Layout improvements: - Stack metrics tables vertically (full-width) instead of horizontal - Add spacing between metric cards for better readability
13 daysFix Manifest.hs FromJSON parsersBen Sima
Wrap parser chains in parentheses to fix compilation errors from incorrect use of </ operator.
13 daysFix deployer checking stale state instead of actual running servicesBen Sima
The deployer compared its in-memory stateServices map to decide if a service needed restarting. When the deployer restarted, this state was lost, causing it to think services were 'already at' the desired path when they were actually running old code. Changes: - Add getRunningStorePath to Systemd module to read actual store path - Update deployService to query systemd instead of stale in-memory state - Add DerivingStrategies extension to Deployer.hs
14 daysUpdate homepage with marketing copy and fix push.shBen Sima
14 daysFix hlint errors in Deploy modulesBen Sima
- Systemd: use list comprehension instead of if-then-else - Manifest: use </> operator, replace case with maybe - Deployer: use newtype, use flip removeService - Caddy: use newtype for single-field types
14 daysAdd skills system for avaBen Sima
- Create Omni/Agent/Skills.hs with skill loader and tools - Skills follow Claude Skills format (SKILL.md + scripts/references/assets) - Directory structure: _/var/ava/skills/{shared,<user>}/ - Three tools: skill, list_skills, publish_skill - Users can publish private skills to shared - Integrate skills tools into Telegram bot - Create skill-creator meta-skill at _/var/ava/skills/shared/skill-creator/
14 daysBatch web_reader tool, much fasterBen Sima
Added retry with backoff, parallel proccessing, editing pages down to main content, summarization with haiku. It's so much faster and more reliable now. Plus improved the logging system and distangled the status UI bar from the logging module.
2025-12-16refactor: Rename Bot to Ava, remove cost guardrailBen Sima
- Rename Omni/Bot.hs to Omni/Ava.hs - Delete Omni/Bot.scm (unused Guile version) - Remove cost limit (was 10 cents, now 0) - Increase max iterations from 10 to 50
2025-12-16feat(deploy): Complete mini-PaaS deployment system (t-266)Ben Sima
- Add Omni/Deploy/ with Manifest, Deployer, Systemd, Caddy modules - Manifest CLI: show, update, add-service, list, rollback commands - Deployer: polls S3 manifest, pulls closures, manages systemd units - Caddy integration for dynamic reverse proxy routes - bild: auto-cache to S3, outputs STORE_PATH for push.sh - push.sh: supports both NixOS and service deploys - Biz.nix: simplified to base OS + deployer only - Services (podcastitlater-web/worker) now deployer-managed - Documentation: README.md with operations guide
2025-12-15Restrict new tools to Ben onlyBen Sima
python_exec, http_get/post, outreach_*, feedback_list, and read_file now require isBenAuthorized check, matching email/hledger pattern.