summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
6 daysAdd sender_name to conversation messages for group chat supportBen Sima
- Add sender_name column to conversation_messages table - Migrate existing messages to set sender_name='bensima' - Show sender names in conversation context (e.g., 'bensima: hello') - Pass userName when saving user messages in Telegram bot
6 daysAdd current user name to Telegram bot system promptBen Sima
6 daysShow calendar name in events and add optional calendar filterBen Sima
6 daysInstruct bot to always include text response after tool callsBen Sima
6 daysAdd current date/time to Telegram bot system promptBen Sima
6 daysFilter calendar to BenSimaShared and Kate onlyBen Sima
6 daysAdd calendar tools using khal CLIBen Sima
- Omni/Agent/Tools/Calendar.hs: calendar_list, calendar_add, calendar_search - Wire into Telegram bot alongside other tools - Integrates with local CalDAV via khal
6 daysAdd PDF and Notes tools to Telegram botBen Sima
- Omni/Agent/Tools/Pdf.hs: Extract text from PDFs using pdftotext - Omni/Agent/Tools/Notes.hs: Quick notes CRUD with topics - Add notes table schema to Memory.hs initMemoryDb - Wire both tools into Telegram bot with logging callbacks
6 daysTelegram bot: Kagi web search toolBen Sima
- Add Omni/Agent/Tools/WebSearch.hs with Kagi Search API integration - webSearchTool for agents to search the web - kagiSearch function for direct API access - Load KAGI_API_KEY from environment - Wire web search into Telegram bot tools - Results formatted with title, URL, and snippet Closes t-252
6 daysTelegram bot: user whitelist access controlBen Sima
- Add tgAllowedUserIds field to TelegramConfig - Load ALLOWED_TELEGRAM_USER_IDS from environment (comma-separated) - Check isUserAllowed before processing messages - Reject unauthorized users with friendly message - Empty whitelist or '*' allows all users - Add tests for whitelist behavior
6 daysTelegram bot: conversation history and summariesBen Sima
- Add sendTypingAction to show typing indicator when processing - Add conversation_messages and conversation_summaries tables - Implement conversation history with token counting - Auto-summarize when context exceeds threshold (3000 tokens) - Save user/assistant messages for multi-turn context - Add ConversationMessage, ConversationSummary, MessageRole types Tasks created: t-252 (web search), t-253 (calendar), t-254 (PDF), t-255 (knowledge graph), t-256 (notes)
6 daysFix telegram bot timeout and sendMessage 400 errorBen Sima
- Set response timeout to polling timeout + 10s for long polling - Remove Markdown parse_mode to avoid 400 errors on special chars
6 daysMerge telegram bot system prompt with user's preferred styleBen Sima
7 daysAdd Telegram bot agent (t-251)Ben Sima
- Omni/Agent/Telegram.hs: Telegram API client with getUpdates/sendMessage - Omni/Bot.hs: Standalone CLI for running the bot - User identification via Memory.getOrCreateUserByTelegramId - Memory-enhanced agent with remember/recall tools - Run with: bot --token=XXX or TELEGRAM_BOT_TOKEN env var
7 daysAdd cross-agent memory system (t-248)Ben Sima
- User management with Telegram ID identification - Memory storage with Ollama embeddings (nomic-embed-text) - Semantic similarity search via cosine similarity - remember/recall tools for agents - runAgentWithMemory wrapper for memory-enhanced agents - Separate memory.db database for user privacy
7 dayst-247: Add Provider abstraction for multi-backend LLM supportBen Sima
- Create Omni/Agent/Provider.hs with unified Provider interface - Support OpenRouter (cloud), Ollama (local), Amp (subprocess stub) - Add runAgentWithProvider to Engine.hs for Provider-based execution - Add EngineType to Core.hs (EngineOpenRouter, EngineOllama, EngineAmp) - Add --engine flag to 'jr work' command - Worker.hs dispatches to appropriate provider based on engine type Usage: jr work <task-id> # OpenRouter (default) jr work <task-id> --engine=ollama # Local Ollama jr work <task-id> --engine=amp # Amp CLI (stub)
7 daysAdd Omni/Agent/PLAN.md - agent infrastructure roadmapBen Sima
Defines architecture for multi-agent system with: - Provider abstraction (OpenRouter, Ollama, Amp backends) - Shared memory system (sqlite-vss, multi-user, cross-agent) - Tool registry for pluggable tool sets - Evals framework for regression testing - Telegram bot as first concrete agent Tasks: t-247 through t-251
2025-12-02Remove pyproject=true, use format=setuptools, add toggle_episode_publicBen Sima
2025-12-02Fix Admin.py imports for bild local dep detectionBen Sima
- Change 'from Biz.X import Y' to 'import Biz.X as X' style - bild only recognizes 'import X as Y' for local dep detection - Add setuptools to Python deps (required by newer nixpkgs) Amp-Thread-ID: https://ampcode.com/threads/T-fe8328a9-7709-4544-9d31-b099f04aa120 Co-authored-by: Amp <amp@ampcode.com>
2025-12-02Add setuptools to Python deps for pyproject buildsBen Sima
Amp-Thread-ID: https://ampcode.com/threads/T-fe8328a9-7709-4544-9d31-b099f04aa120 Co-authored-by: Amp <amp@ampcode.com>
2025-12-02Improve agent system prompt for better token efficiencyBen Sima
Add explicit guidance on: - Reading files with large ranges (500+ lines) instead of many small chunks - Using read_file directly when target file is known vs search_and_read - Cost awareness: planning refactors, avoiding redundant reads - Tool call limits for complex tasks
2025-12-02Ignore PLC0415 in ruff (late imports for circular deps)Ben Sima
2025-12-02Remove duplicate prompt contentBen Sima
The task was being added to the prompt twice, once in the base prompt and once in the user prompt.
2025-12-02System prompt improvementsBen Sima
Worked with Gemini and Opus to improve the system prompt with learnings from the Amp prompt. Removed reference to Omni/Task/README.md because it is deprecated in favor of `jr task`.
2025-12-02jr: add 'prompt' command to inspect agent system promptBen Sima
jr prompt <task-id> constructs and prints the full system prompt that would be sent to the agent, including: - Agent configuration (model, cost budget) - Base instructions - AGENTS.md content - Relevant facts from knowledge base - Retry/progress context if applicable Useful for debugging agent behavior and token usage.
2025-12-01fix: lint Admin.py after refactorBen Sima
2025-12-01Compact amp-style timeline rendering and targeted file readingBen Sima
Timeline tool display: - Grep/search: ✓ Grep pattern in filepath - Read file: ✓ Read filepath @start-end - Edit file: ✓ Edit filepath - Bash: ϟ command (lightning bolt prompt) - Tool results only shown for meaningful output New search_and_read tool: - Combines search + read in one operation - Uses ripgrep --context for surrounding lines - More efficient than separate search then read Worker prompt updated to prefer search_and_read over separate search + read_file calls
2025-12-01Fix autoscroll toggle not being respectedBen Sima
timelineScrollScript now checks autoscrollEnabled before scrolling
2025-12-01Make complexity badge editable on task detail pageBen Sima
- Add ComplexityForm and ComplexityBadgePartial types - Add /tasks/:id/complexity POST endpoint - Add complexityBadgeWithForm component with dropdown - Add complexity dropdown JS for keyboard navigation - Add CSS styles for complexity dropdown - Always show complexity badge (Set Complexity if none) Task-Id: t-219
2025-12-01Fix lint and build errors in Web componentsBen Sima
- Components.hs: Fix escaped quotes in renderFormattedJson - Style.hs: Use overflowWrap instead of wordBreak for breakWord value
2025-12-01Fix build errors in Jr modulesBen Sima
- Fix Worker.hs to use EngineError instead of tuple - Fix Types.hs imports for LazyText.encodeUtf8 and dayOfWeek - Remove duplicate SortOrder from Components.hs (import from Types.hs) - Add orphan instance pragmas to Pages.hs and Partials.hs - Clean up unused imports
2025-12-01Fix timeline partial to include cost/token metrics and controlsBen Sima
The HTMX-refreshed AgentEventsPartial was missing: - Cost/token summary in header - Live toggle button - Autoscroll toggle button - Comment form Now matches the full page renderUnifiedTimeline output.
2025-12-01Add lint warning for large files (>1000 lines)Ben Sima
Large files cause agent token bloat and edit_file failures. This adds a warning (not error) to encourage splitting. Task-Id: t-228
2025-12-01Refactor Web.hs into smaller modulesBen Sima
Split 3231-line Web.hs into focused submodules: - Types.hs (346 lines): Data types, forms, API definition - Components.hs (1464 lines): Reusable UI components - Pages.hs (866 lines): Full page ToHtml instances - Partials.hs (247 lines): HTMX partial ToHtml instances - Handlers.hs (642 lines): Servant handler implementations - Web.hs (39 lines): Main module with run function Reduces main file by 99%, preventing agent token bloat. Task-Id: t-226 Amp-Thread-ID: https://ampcode.com/threads/T-355fae3a-03e9-4bdb-a1c7-6132576bf601 Co-authored-by: Amp <amp@ampcode.com>
2025-12-01Strengthen prompt to stop immediately after tests passBen Sima
Jr was completing tasks but then going into verification loops, re-reading files and 'tracing through logic' after tests passed. This burned ~4 cents of extra cost on t-221. Made instructions more emphatic: - 'STOP IMMEDIATELY' with explicit list of what NOT to do - 'ANY further tool calls are wasted money' - Repeated in BUILD SYSTEM NOTES section Task-Id: t-227
2025-12-01Fix Recent Activity duplicating tasks on refreshBen Sima
Changed taskToUnixTs from round to ceiling to prevent sub-second timing issues where a task updated at e.g. 10:00:00.3 would round down to 10:00:00, causing the next poll with since=10:00:00 to include it again. Task-Id: t-221
2025-12-01Sort ready queue by priorityBen Sima
getReadyTasks now returns tasks sorted by: 1. Priority (P0 first, then P1, P2, etc.) 2. Creation time (oldest first within same priority) This ensures high-priority items are always at the top of both the CLI 'jr task ready' output and the web dashboard. Task-Id: t-220
2025-12-01Add prompt guidance for large file editingBen Sima
Instructs the agent to: - Use line ranges when reading large files (>500 lines) - Use minimal context for edit_file old_str matching - Re-read exact lines after failed edits - Stop after 2-3 failed edits to reconsider approach - Flag very large files (>2000 lines) for refactoring Task-Id: t-225
2025-12-01Add guardrail for repeated edit_file failuresBen Sima
Tracks 'old_str not found' errors from edit_file tool calls. After 5 consecutive failures, stops the agent to prevent burning tokens on impossible edits. This catches the pattern where the agent repeatedly tries to edit a large file with incorrect old_str matches, which was the root cause of t-222 exceeding its cost budget. Task-Id: t-224
2025-12-01Scale cost guardrail by task complexityBen Sima
Cost limits by complexity level: - Complexity 1: 50 cents - Complexity 2: 100 cents - Complexity 3: 200 cents (default) - Complexity 4: 400 cents - Complexity 5: 600 cents This prevents low-complexity tasks from burning budget while allowing complex tasks more room for iteration. Task-Id: t-223
2025-12-01Add --complexity flag to task update commandBen Sima
Allows updating complexity along with status in a single command: jr task update t-123 in-progress --complexity=3 Task-Id: t-222
2025-12-01Add autoscroll toggle button for timelineBen Sima
Adds a toggle button next to the LIVE indicator that controls whether the timeline auto-scrolls to new events. Default is ON. - renderAutoscrollToggle button with ⬇ icon - toggleAutoscroll() JS function tracks state - htmx:afterSettle checks autoscrollEnabled before scrolling - Blue styling to differentiate from green LIVE button Task-Id: t-222
2025-12-01Consolidate cost display in timeline header, remove Execution DetailsBen Sima
- Add cost/token summary to timeline header - Filter Cost events from timeline display - Remove Execution Details section (cost info now in header) - Remove unused renderExecutionDetails function Task-Id: t-216
2025-12-01Clicking LIVE label toggles live updates on/offBen Sima
- Add clickable LIVE toggle button that pauses/resumes timeline polling - Green pulsing when active, grey when paused - Uses htmx:beforeRequest event to cancel requests when paused - Increase duplicate tool call guardrail from 20 to 30 Task-Id: t-211
2025-12-01Remove timeouts from branchless test commandsBen Sima
2025-12-01Revert "Agent log box auto-scrolls to bottom on updates"Ben Sima
This reverts commit 9c3034853c3cacea8a77358467acf46e75c982f5.
2025-12-01Show tool call arguments inline instead of JSON blobBen Sima
- Add formatToolCallSummary to extract key argument from JSON - Shows run_bash command, file paths for read/edit/write, patterns for search - Display summary inline in tool call header (e.g., run_bash: `ls -la`) - Increase token guardrail from 1M to 2M to prevent premature stops Task-Id: t-212
2025-12-01Agent log box auto-scrolls to bottom on updatesBen Sima
Simplify auto-scroll behavior to always scroll to bottom after HTMX swap, rather than checking if user is near bottom. This ensures latest messages are always visible as they come in. Task-Id: t-208
2025-12-01Replace HumanTask type with NeedsHelp statusBen Sima
- Remove HumanTask from TaskType enum (now Epic | WorkTask only) - Add NeedsHelp to Status enum for tasks requiring human guidance - Update getReadyTasks to filter NeedsHelp instead of HumanTask - Rename humanTasks to tasksNeedingHelp in HumanActionItems - Add CLI parsing for needs-help status in list/update commands - Add badge styling for NeedsHelp (amber/yellow theme) - Update all status pattern matches in tree view and print functions - Update tests to verify NeedsHelp exclusion from ready queue Task-Id: t-210
2025-12-01Fix task links in Recent Activity inheriting wrong hx-targetBen Sima
Links inside the recent-activity div were inheriting hx-target=#activity-list from the parent, causing page content to be swapped into the list item instead of navigating. Explicitly set hx-target=body on list group items.