@nbardy/oompa 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/agentnet/src/agentnet/cli.clj +13 -10
- package/agentnet/src/agentnet/worker.clj +1 -1
- package/oompa.example.json +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,24 +82,22 @@ This repo has a fleshed out version of the idea. The oompa loompas are organized
|
|
|
82
82
|
**oompa.json** — the only file you need:
|
|
83
83
|
```json
|
|
84
84
|
{
|
|
85
|
-
"review_model": "codex:codex-5.2",
|
|
86
85
|
"workers": [
|
|
87
|
-
{"model": "claude:opus
|
|
88
|
-
{"model": "codex:
|
|
86
|
+
{"model": "claude:opus", "prompt": ["config/prompts/planner.md"], "iterations": 5, "count": 1},
|
|
87
|
+
{"model": "codex:gpt-5.3-codex:medium", "prompt": ["config/prompts/executor.md"], "iterations": 10, "count": 3, "can_plan": false}
|
|
89
88
|
]
|
|
90
89
|
}
|
|
91
90
|
```
|
|
92
91
|
|
|
93
92
|
This spawns:
|
|
94
93
|
- **1 planner** (opus) — reads spec, explores codebase, creates/refines tasks
|
|
95
|
-
- **3 executors** (
|
|
96
|
-
- **Reviews** done by codex-5.2 before any merge
|
|
94
|
+
- **3 executors** (gpt-5.3-codex, medium reasoning) — claims and executes tasks fast
|
|
97
95
|
|
|
98
96
|
#### Worker fields
|
|
99
97
|
|
|
100
98
|
| Field | Required | Description |
|
|
101
99
|
|-------|----------|-------------|
|
|
102
|
-
| `model` | yes | `harness:model` or `harness:model:reasoning` (e.g. `codex:
|
|
100
|
+
| `model` | yes | `harness:model` or `harness:model:reasoning` (e.g. `codex:gpt-5.3-codex:medium`, `claude:opus`) |
|
|
103
101
|
| `prompt` | no | String or array of paths — concatenated into one prompt |
|
|
104
102
|
| `iterations` | no | Max iterations per worker (default: 10) |
|
|
105
103
|
| `count` | no | Number of workers with this config (default: 1) |
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
[agentnet.worker :as worker]
|
|
17
17
|
[agentnet.tasks :as tasks]
|
|
18
18
|
[agentnet.agent :as agent]
|
|
19
|
+
[babashka.process :as process]
|
|
19
20
|
[clojure.string :as str]
|
|
20
21
|
[clojure.java.io :as io]
|
|
21
22
|
[cheshire.core :as json]))
|
|
@@ -132,7 +133,7 @@
|
|
|
132
133
|
;; Commands
|
|
133
134
|
;; =============================================================================
|
|
134
135
|
|
|
135
|
-
(declare cmd-swarm)
|
|
136
|
+
(declare cmd-swarm parse-model-string)
|
|
136
137
|
|
|
137
138
|
(defn- probe-model
|
|
138
139
|
"Send 'say ok' to a model via its harness CLI. Returns true if model responds."
|
|
@@ -140,7 +141,7 @@
|
|
|
140
141
|
(try
|
|
141
142
|
(let [cmd (case harness
|
|
142
143
|
:claude ["claude" "--model" model "-p" "say ok" "--max-turns" "1"]
|
|
143
|
-
:codex ["codex" "exec" "--model" model "--" "say ok"])
|
|
144
|
+
:codex ["codex" "exec" "--dangerously-bypass-approvals-and-sandbox" "--skip-git-repo-check" "--model" model "--" "say ok"])
|
|
144
145
|
result (process/sh cmd {:out :string :err :string :timeout 30000})]
|
|
145
146
|
(zero? (:exit result)))
|
|
146
147
|
(catch Exception _ false)))
|
|
@@ -148,10 +149,13 @@
|
|
|
148
149
|
(defn- validate-models!
|
|
149
150
|
"Probe each unique harness:model pair. Prints results and exits if any fail."
|
|
150
151
|
[worker-configs review-model]
|
|
151
|
-
(let [
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
(let [;; Deduplicate by harness:model only (ignore reasoning level)
|
|
153
|
+
models (cond-> (->> worker-configs
|
|
154
|
+
(map (fn [wc]
|
|
155
|
+
(let [{:keys [harness model]} (parse-model-string (:model wc))]
|
|
156
|
+
{:harness harness :model model})))
|
|
157
|
+
set)
|
|
158
|
+
review-model (conj (select-keys review-model [:harness :model])))
|
|
155
159
|
_ (println "Validating models...")
|
|
156
160
|
results (pmap (fn [{:keys [harness model]}]
|
|
157
161
|
(let [ok (probe-model harness model)]
|
|
@@ -343,10 +347,9 @@
|
|
|
343
347
|
(println)
|
|
344
348
|
(println "Create oompa.json with format:")
|
|
345
349
|
(println "{")
|
|
346
|
-
(println " \"review_model\": \"codex:codex-5.2\",")
|
|
347
350
|
(println " \"workers\": [")
|
|
348
|
-
(println " {\"model\": \"codex:
|
|
349
|
-
(println " {\"model\": \"claude:opus
|
|
351
|
+
(println " {\"model\": \"codex:gpt-5.3-codex:medium\", \"prompt\": \"prompts/executor.md\", \"iterations\": 10, \"count\": 3, \"can_plan\": false},")
|
|
352
|
+
(println " {\"model\": \"claude:opus\", \"prompt\": [\"prompts/base.md\", \"prompts/planner.md\"], \"count\": 1}")
|
|
350
353
|
(println " ]")
|
|
351
354
|
(println "}")
|
|
352
355
|
(println)
|
|
@@ -449,7 +452,7 @@
|
|
|
449
452
|
(println " --keep-worktrees Don't cleanup worktrees after run")
|
|
450
453
|
(println)
|
|
451
454
|
(println "Examples:")
|
|
452
|
-
(println " ./swarm.bb loop 10 --harness codex --model
|
|
455
|
+
(println " ./swarm.bb loop 10 --harness codex --model gpt-5.3-codex --workers 3")
|
|
453
456
|
(println " ./swarm.bb loop --workers claude:5 codex:4 --iterations 20")
|
|
454
457
|
(println " ./swarm.bb swarm oompa.json # Run multi-model config"))
|
|
455
458
|
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"--skip-git-repo-check"
|
|
178
178
|
"-C" abs-worktree]
|
|
179
179
|
model (into ["--model" model])
|
|
180
|
-
reasoning (into ["-c" (str "
|
|
180
|
+
reasoning (into ["-c" (str "model_reasoning_effort=\"" reasoning "\"")])
|
|
181
181
|
true (conj "--" full-prompt))
|
|
182
182
|
:claude (cond-> ["claude" "-p" "--dangerously-skip-permissions"
|
|
183
183
|
"--session-id" session-id]
|
package/oompa.example.json
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"review_model": "codex:codex-5.2",
|
|
3
|
-
|
|
4
2
|
"workers": [
|
|
5
3
|
{
|
|
6
|
-
"model": "claude:opus
|
|
4
|
+
"model": "claude:opus",
|
|
7
5
|
"prompt": ["config/prompts/planner.md"],
|
|
8
6
|
"iterations": 5,
|
|
9
7
|
"count": 1
|
|
10
8
|
},
|
|
11
9
|
{
|
|
12
|
-
"model": "codex:
|
|
10
|
+
"model": "codex:gpt-5.3-codex:medium",
|
|
13
11
|
"prompt": ["config/prompts/executor.md"],
|
|
14
12
|
"iterations": 10,
|
|
15
13
|
"count": 3,
|