summaryrefslogtreecommitdiff
path: root/Omni
AgeCommit message (Collapse)Author
4 daysadd database layer for subagent job queueBen Sima
Phase 1 of subagent architecture redesign. Adds Jobs.hs with: - subagent_jobs table for persistent job queue - subagent_events table for lifecycle event log - Job CRUD: create, claim, complete, fail, cancel - Event logging for started, progress, tool_call, error, completed - Queries: pending jobs, running jobs, active summary for context - All tests passing This enables: - Jobs survive process restarts - Workers can claim and execute jobs independently - Events flow back to Ava's context for collaborative debugging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 daysfix UTF-8 encoding in deployed servicesBen Sima
- Systemd.hs: add LANG and LC_ALL defaults (en_US.utf8) to all generated unit files to ensure proper UTF-8 handling - Systemd.hs: add generateUnitWithLocale that reads LOCALE_ARCHIVE from the deployer's environment and injects it into generated units - Telegram.hs: add safePutText wrapper that catches encoding errors in logging to prevent them from killing message sends The root cause was NixOS systemd services not inheriting locale settings from the system, causing emoji characters to fail encoding. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 daysOmni/Agent/Telegram/IncomingQueue: add error handling to batcherBen Sima
Wrap processFn in try/catch so exceptions don't kill the batcher thread. Previously, if a message handler threw an exception, the batcher would die and subsequent messages would be received but not processed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 daysOmni/Agent/Subagent/Coder: fix direnv exec path handlingBen Sima
Use `cd <path> && direnv exec .` instead of `direnv exec <path>` since the latter doesn't work correctly with nix-direnv caching. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Agent/Subagent/Coder: always run in /home/ava/omniBen Sima
- Add omniRepoDir constant for the repo path - Use direnv exec with explicit path instead of "." - Update ava manifest workingDirectory to /home/ava This separates Ava's working directory from Coder's repo directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Deploy: add WorkingDirectory support and rename to deployerBen Sima
- Add execWorkingDirectory field to Exec type in Manifest.hs - Generate WorkingDirectory= in systemd unit files - Allow add-service to update existing services - Rename biz-deployer to deployer throughout - Fix Caddy.hs and Systemd.hs tests for new Exec constructor This fixes subagent stalls caused by Coder running direnv from wrong directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Deploy/Systemd: fix extractStorePath parsing bugBen Sima
The function was incorrectly extracting store paths from ExecStart lines. For "ExecStart=/nix/store/xxx/bin/ava" it would return "/nix/store/nix" instead of "/nix/store/xxx". This caused the deployer to think services needed redeployment on every cycle, restarting them every 5 minutes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Agent/Subagent: fix per-spawn guardrails for CoderBen Sima
The Coder subagent was ignoring per-spawn guardrails from subagentGuardrails and always using SubagentConfig defaults. Now uses getGuardrail helper to check SpawnGuardrails first, falling back to SubagentConfig defaults if not specified. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Deploy: rename biz-deployer to deployerBen Sima
Rename the service from biz-deployer to deployer for simplicity. Updates Deployer.nix, Beryllium.nix, and Biz.nix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Deploy: make Caddy optional in Deployer.nixBen Sima
Add enableCaddy option (default true) to allow hosts like beryllium that use Tailscale Funnel to disable Caddy reverse proxy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Dev: convert Ava to dynamic deploymentBen Sima
- Create Omni/Dev/Packages.nix with ava, deployer, deploy-manifest packages - Add biz-deployer service to Beryllium.nix - Remove static systemd service from Ava.nix (keep user/dirs setup) Ava is now deployed via the mini-PaaS system rather than being a static NixOS service. This enables fast Ava updates without full NixOS rebuilds - just build, push closure, update manifest. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Agent/Subagent: add General role and per-spawn customizationBen Sima
- Add SpawnGuardrails type for per-spawn resource limits - Extend SubagentConfig with toolsOverride, systemPrompt, guardrails - Add General role with balanced tools (file ops, bash, python, search) - Update spawn_subagent schema to expose general/custom roles and new params - Add subagent delegation guidance to Ava's system prompt 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 daysOmni/Bild: improve concurrent build loggingBen Sima
- Add per-namespace log files at _/var/bild-logs/<namespace>.log - Show log path on failure instead of dumping stderr - Use efficient single-line updates instead of full redraws - Use cursor save/restore for reliable positioning - Simplify status symbols (no brackets): * + ~ . x _ - Remove OutputMode distinction (no longer needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7 daysFix some build errorsBen Sima
7 daysOmni/Ci: fix extractErrorMessage functionBen Sima
Improve error message extraction to preserve meaningful error information instead of filtering everything out. Fixed fallback logic and ANSI escape sequence handling to prevent "Unknown error" messages in CI git notes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7 daysOmni/Ci: fix timeout and carriage return issuesBen Sima
- Add explicit --time 0 argument to bild test command - Add debug logging for BILD_ARGS environment variable - Strip ANSI escape sequences and carriage returns from error messages - Fixes ^M characters appearing in git notes - Ensures timeout is properly disabled for CI runs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7 daysOmni/Ci: improve error message extraction in git notesBen Sima
- Add extractErrorMessage function to filter meaningful errors - Extract only lines containing fail/error keywords - Filter out progress output and warnings - Limit to first 5 error lines for concise reporting - Fixes issue with unhelpful progress output in CI notes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7 daysOmni/Ci: add --rerun flag to bypass already verified checkBen Sima
- Add -r, --rerun option to run CI even when already verified - Allows re-running CI for testing or validation purposes - Fixes "verification failed" error when wanting to rerun CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7 daysOmni/Ci: optimize lint performance for faster CIBen Sima
- Use lint without arguments to leverage git diff instead of all files - Avoids passing 289 individual files as arguments to lint - Much faster for clean repos and smaller diffs - Resolves CI hanging issues during lint phase 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
8 daysOmni/Bild: add file filtering to prevent namespace parsing errorsHEADliveBen Sima
- Add isLikelySourceFile filter to exclude dotfiles and config files - Apply filter before namespaceFromPathOrDie to prevent crashes - Removes need to add every config file type to namespace system - Fixes CI failures from .dir-locals.el and similar files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
8 daysOmni/Namespace,Bild: add support for .ctags filesBen Sima
- Add Ctags extension type to Namespace.Ext - Allow dots in namespace path components for .ctags.d directories - Mark ctags files as non-buildable in bild - Fixes CI failure when processing .ctags.d/base.ctags 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
8 daysOmni/Ci: enhance error diagnostics and progress feedbackBen Sima
- Capture stderr from lint/test failures in git notes - Add progress logging showing file counts - Fix date format to use UTC - Include truncated error messages for easier debugging
9 daysOmni/Agent/Telegram: fix reminder leak to group chatsBen Sima
Only record user's chat_id for private chats, not group chats. Previously, interacting in a group would overwrite the user's chat_id, causing personal reminders to be sent to that group.
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.
10 daysMake Ci.hs executableBen Sima
10 daysAdd passBen Sima
10 daysRemove direnvBen Sima
10 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