@nbardy/oompa 0.3.0 → 0.3.1
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/agentnet/src/agentnet/cli.clj +30 -26
- package/package.json +1 -1
|
@@ -132,34 +132,38 @@
|
|
|
132
132
|
;; Commands
|
|
133
133
|
;; =============================================================================
|
|
134
134
|
|
|
135
|
+
(declare cmd-swarm)
|
|
136
|
+
|
|
135
137
|
(defn cmd-run
|
|
136
|
-
"Run orchestrator
|
|
138
|
+
"Run orchestrator — uses oompa.json if present, otherwise simple mode"
|
|
137
139
|
[opts args]
|
|
138
|
-
(
|
|
139
|
-
(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
(
|
|
145
|
-
(
|
|
146
|
-
(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
(if (.exists (io/file "oompa.json"))
|
|
141
|
+
(cmd-swarm opts (or (seq args) ["oompa.json"]))
|
|
142
|
+
(let [swarm-id (make-swarm-id)]
|
|
143
|
+
(if-let [specs (:worker-specs opts)]
|
|
144
|
+
;; Mixed worker specs: --workers claude:5 codex:4
|
|
145
|
+
(let [workers (mapcat
|
|
146
|
+
(fn [spec]
|
|
147
|
+
(let [{:keys [harness count]} spec]
|
|
148
|
+
(map-indexed
|
|
149
|
+
(fn [idx _]
|
|
150
|
+
(worker/create-worker
|
|
151
|
+
{:id (format "%s-%d" (name harness) idx)
|
|
152
|
+
:swarm-id swarm-id
|
|
153
|
+
:harness harness
|
|
154
|
+
:model (:model opts)
|
|
155
|
+
:iterations 1}))
|
|
156
|
+
(range count))))
|
|
157
|
+
specs)]
|
|
158
|
+
(println (format "Running once with mixed workers (swarm %s):" swarm-id))
|
|
159
|
+
(doseq [spec specs]
|
|
160
|
+
(println (format " %dx %s" (:count spec) (name (:harness spec)))))
|
|
161
|
+
(println)
|
|
162
|
+
(worker/run-workers! workers))
|
|
163
|
+
;; Simple mode
|
|
164
|
+
(do
|
|
165
|
+
(println (format "Swarm ID: %s" swarm-id))
|
|
166
|
+
(orchestrator/run-once! (assoc opts :swarm-id swarm-id)))))))
|
|
163
167
|
|
|
164
168
|
(defn cmd-loop
|
|
165
169
|
"Run orchestrator N times"
|