summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-22 08:41:44 -0500
committerBen Sima <ben@bensima.com>2025-11-22 08:41:44 -0500
commit3256a913460e639072b7175b41a7ebb2b708d000 (patch)
tree58e721594a7bd242d3ee0a74189850b56ac6ebe8
parent8884fa245e70c1883e1a93ac8fe80eb9bbc8487b (diff)
Fix: Add LambdaCase extension and fix imports, and update tasks
-rw-r--r--.tasks/tasks.jsonl4
-rw-r--r--Omni/Agent/Log.hs3
-rw-r--r--Omni/Agent/Worker.hs7
3 files changed, 4 insertions, 10 deletions
diff --git a/.tasks/tasks.jsonl b/.tasks/tasks.jsonl
index 889ffca..e56f4e7 100644
--- a/.tasks/tasks.jsonl
+++ b/.tasks/tasks.jsonl
@@ -178,12 +178,12 @@
{"taskCreatedAt":"2025-11-22T10:09:23.249166289Z","taskDependencies":[],"taskDescription":null,"taskId":"t-rWck9sDOA","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Split Thread and Credits in Worker status bar","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:10:17.800528662Z"}
{"taskCreatedAt":"2025-11-22T10:12:35.129294132Z","taskDependencies":[{"depId":"t-rWck9sDOA","depType":"DiscoveredFrom"}],"taskDescription":null,"taskId":"t-rWckmrKBm","taskNamespace":null,"taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Fix Worker status bar activity not updating","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:14:43.612634394Z"}
{"taskCreatedAt":"2025-11-22T10:24:04.441689132Z","taskDependencies":[{"depId":"t-rWckmrKBm","depType":"DiscoveredFrom"}],"taskDescription":null,"taskId":"t-rWcl762fd","taskNamespace":null,"taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Fix credit calculation in Worker status bar","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:25:51.468062833Z"}
-{"taskCreatedAt":"2025-11-22T10:32:31.370216711Z","taskDependencies":[],"taskDescription":"Map raw Amp log messages to human-friendly status updates (e.g. 'READ: ...', 'TOOL: ...'), similar to monitor-worker.sh, but WITHOUT using emojis as they are unnecessary.","taskId":"t-rWclFp3vN","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Review","taskTitle":"Improve Worker status bar activity formatting (No Emojis)","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:52:00.768159587Z"}
+{"taskCreatedAt":"2025-11-22T10:32:31.370216711Z","taskDependencies":[],"taskDescription":"Map raw Amp log messages to human-friendly status updates (e.g. 'READ: ...', 'TOOL: ...'), similar to monitor-worker.sh, but WITHOUT using emojis as they are unnecessary.","taskId":"t-rWclFp3vN","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Improve Worker status bar activity formatting (No Emojis)","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T13:40:28.250551154Z"}
{"taskCreatedAt":"2025-11-22T10:35:13.559736706Z","taskDependencies":[{"depId":"t-rWcl762fd","depType":"DiscoveredFrom"}],"taskDescription":null,"taskId":"t-rWclQnApM","taskNamespace":null,"taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Verify credit units in amp logs","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:41:51.876980566Z"}
{"taskCreatedAt":"2025-11-22T10:41:55.215833393Z","taskDependencies":[],"taskDescription":"The credits in usage-ledger logs are in cents, but we display them as dollars. We need to divide by 100.","taskId":"t-rWcmhyTvV","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Divide usage-ledger credits by 100 to get dollars","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:42:42.156523503Z"}
{"taskCreatedAt":"2025-11-22T10:50:50.329217484Z","taskDependencies":[],"taskDescription":"Collection of tasks to improve the robustness of the codebase (builds), the usability of the 'task' tool, and the accuracy of the agent's status reporting.","taskId":"t-rWcmRMaWX","taskNamespace":"Omni.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Open","taskTitle":"Codebase Health and Tooling Improvements","taskType":"Epic","taskUpdatedAt":"2025-11-22T10:50:50.329217484Z"}
{"taskCreatedAt":"2025-11-22T10:50:57.552875891Z","taskDependencies":[],"taskDescription":"Implement a 'task edit <id>' command (or 'task update' extension) that allows modifying a task's title, description, priority, and other fields in-place. Currently 'task update' only changes status.","taskId":"t-rWcmRMaWX.1","taskNamespace":"Omni/Task.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Done","taskTitle":"Add 'task edit' command","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:16:49.365516683Z"}
-{"taskCreatedAt":"2025-11-22T10:51:01.309897479Z","taskDependencies":[],"taskDescription":"Update the Worker Agent status bar logic to round the displayed credit usage to 2 decimal places (nearest cent). Currently it may show long floating point numbers.","taskId":"t-rWcmRMaWX.2","taskNamespace":"Omni/Agent.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Review","taskTitle":"Round credits to nearest cent in Agent status","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:26:08.486852994Z"}
+{"taskCreatedAt":"2025-11-22T10:51:01.309897479Z","taskDependencies":[],"taskDescription":"Update the Worker Agent status bar logic to round the displayed credit usage to 2 decimal places (nearest cent). Currently it may show long floating point numbers.","taskId":"t-rWcmRMaWX.2","taskNamespace":"Omni/Agent.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Done","taskTitle":"Round credits to nearest cent in Agent status","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T13:40:28.332806178Z"}
{"taskCreatedAt":"2025-11-22T10:51:04.73629995Z","taskDependencies":[],"taskDescription":"Update Omni/Task/Core.hs to handle task IDs case-insensitively for lookups and normalize them to lowercase when storing/creating. This improves user experience when typing IDs manually.","taskId":"t-rWcmRMaWX.3","taskNamespace":"Omni/Task.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Done","taskTitle":"Case-insensitive task IDs","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:54:45.741575622Z"}
{"taskCreatedAt":"2025-11-22T10:51:08.813653444Z","taskDependencies":[],"taskDescription":"Create an agent or script that iterates through every namespace in the project and runs 'bild' (e.g. 'bild --time 0 **/*'). For every build failure encountered, it should automatically create a new task with the error details and link it to this epic (or the discovery context).","taskId":"t-rWcmRMaWX.4","taskNamespace":"Omni/Bild.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Done","taskTitle":"Audit codebase builds and file repair tasks","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:51:55.014259557Z"}
{"taskCreatedAt":"2025-11-22T11:27:59.621730567Z","taskDependencies":[],"taskDescription":"Update Omni/Agent/Worker.hs to read the content of AGENTS.md and include a relevant summary or the full content in the initial system prompt provided to the Amp agent. This ensures the worker knows about repository conventions, testing standards, and tool usage.","taskId":"t-rWcpiE3LO","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Include AGENTS.md context in Worker initial prompt","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:36:14.542146518Z"}
diff --git a/Omni/Agent/Log.hs b/Omni/Agent/Log.hs
index 0491568..dd66abc 100644
--- a/Omni/Agent/Log.hs
+++ b/Omni/Agent/Log.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
@@ -81,7 +82,7 @@ updateActivity msg = update (\s -> s {statusActivity = msg})
processLogLine :: Text -> IO ()
processLogLine line = do
let entry = parseLine line
- Data.Foldable.for_ (entry +> formatLogEntry) updateActivity
+ for_ (entry +> formatLogEntry) updateActivity
-- | Parse a JSON log line into a LogEntry
parseLine :: Text -> Maybe LogEntry
diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs
index c01a853..1cc0b8d 100644
--- a/Omni/Agent/Worker.hs
+++ b/Omni/Agent/Worker.hs
@@ -5,15 +5,8 @@
module Omni.Agent.Worker where
import Alpha
-import Control.Concurrent (forkIO, killThread, threadDelay)
-import Control.Monad (forever)
-import qualified Data.Aeson as Aeson
-import qualified Data.Aeson.KeyMap as KM
-import qualified Data.ByteString.Lazy as BL
-import qualified Data.Scientific as Scientific
import qualified Data.Text as Text
import qualified Data.Text.IO as TIO
-import qualified Data.Time as Time
import qualified Omni.Agent.Core as Core
import qualified Omni.Agent.Git as Git
import qualified Omni.Agent.Log as AgentLog