@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.
@@ -132,34 +132,38 @@
132
132
  ;; Commands
133
133
  ;; =============================================================================
134
134
 
135
+ (declare cmd-swarm)
136
+
135
137
  (defn cmd-run
136
- "Run orchestrator once"
138
+ "Run orchestrator — uses oompa.json if present, otherwise simple mode"
137
139
  [opts args]
138
- (let [swarm-id (make-swarm-id)]
139
- (if-let [specs (:worker-specs opts)]
140
- ;; Mixed worker specs: --workers claude:5 codex:4
141
- (let [workers (mapcat
142
- (fn [spec]
143
- (let [{:keys [harness count]} spec]
144
- (map-indexed
145
- (fn [idx _]
146
- (worker/create-worker
147
- {:id (format "%s-%d" (name harness) idx)
148
- :swarm-id swarm-id
149
- :harness harness
150
- :model (:model opts)
151
- :iterations 1}))
152
- (range count))))
153
- specs)]
154
- (println (format "Running once with mixed workers (swarm %s):" swarm-id))
155
- (doseq [spec specs]
156
- (println (format " %dx %s" (:count spec) (name (:harness spec)))))
157
- (println)
158
- (worker/run-workers! workers))
159
- ;; Simple mode
160
- (do
161
- (println (format "Swarm ID: %s" swarm-id))
162
- (orchestrator/run-once! (assoc opts :swarm-id swarm-id))))))
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbardy/oompa",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Git-worktree multi-agent swarm orchestrator for Codex and Claude",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",