summaryrefslogtreecommitdiff
path: root/Omni/Jr.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-17 13:29:40 -0500
committerBen Sima <ben@bensima.com>2025-12-17 13:29:40 -0500
commitab01b34bf563990e0f491ada646472aaade97610 (patch)
tree5e46a1a157bb846b0c3a090a83153c788da2b977 /Omni/Jr.hs
parente112d3ce07fa24f31a281e521a554cc881a76c7b (diff)
parent337648981cc5a55935116141341521f4fce83214 (diff)
Merge Ava deployment changes
Diffstat (limited to 'Omni/Jr.hs')
-rwxr-xr-xOmni/Jr.hs15
1 files changed, 12 insertions, 3 deletions
diff --git a/Omni/Jr.hs b/Omni/Jr.hs
index b60a029..48dbf90 100755
--- a/Omni/Jr.hs
+++ b/Omni/Jr.hs
@@ -53,7 +53,7 @@ jr
Usage:
jr task [<args>...]
- jr work [<task-id>]
+ jr work [<task-id>] [--engine=ENGINE]
jr prompt <task-id>
jr web [--port=PORT]
jr review [<task-id>] [--auto]
@@ -77,6 +77,7 @@ Commands:
Options:
-h --help Show this help
--port=PORT Port for web server [default: 8080]
+ --engine=ENGINE LLM engine: openrouter, ollama, amp [default: openrouter]
--auto Auto-review: accept if tests pass, reject if they fail
--delay=SECONDS Delay between loop iterations [default: 5]
--project=PROJECT Filter facts by project
@@ -119,13 +120,20 @@ move args
absPath <- Directory.getCurrentDirectory
let name = Text.pack (takeFileName absPath)
+ -- Parse engine flag
+ let engineType = case Cli.getArg args (Cli.longOption "engine") of
+ Just "ollama" -> AgentCore.EngineOllama
+ Just "amp" -> AgentCore.EngineAmp
+ _ -> AgentCore.EngineOpenRouter
+
let worker =
AgentCore.Worker
{ AgentCore.workerName = name,
AgentCore.workerPid = Nothing,
AgentCore.workerStatus = AgentCore.Idle,
AgentCore.workerPath = path,
- AgentCore.workerQuiet = False -- Show ANSI status bar for manual work
+ AgentCore.workerQuiet = False, -- Show ANSI status bar for manual work
+ AgentCore.workerEngine = engineType
}
let taskId = fmap Text.pack (Cli.getArg args (Cli.argument "task-id"))
@@ -183,7 +191,8 @@ runLoop delaySec = do
AgentCore.workerPid = Nothing,
AgentCore.workerStatus = AgentCore.Idle,
AgentCore.workerPath = ".",
- AgentCore.workerQuiet = True -- No ANSI status bar in loop mode
+ AgentCore.workerQuiet = True, -- No ANSI status bar in loop mode
+ AgentCore.workerEngine = AgentCore.EngineOpenRouter -- Default for loop
}
putText "[loop] Starting worker..."
AgentWorker.start worker (Just (TaskCore.taskId task))