@nbardy/oompa 0.4.3 → 0.4.4
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.
|
@@ -136,14 +136,19 @@
|
|
|
136
136
|
(declare cmd-swarm parse-model-string)
|
|
137
137
|
|
|
138
138
|
(defn- probe-model
|
|
139
|
-
"Send 'say ok' to a model via its harness CLI. Returns true if model responds.
|
|
139
|
+
"Send 'say ok' to a model via its harness CLI. Returns true if model responds.
|
|
140
|
+
Claude hangs without /dev/null stdin when spawned from bb."
|
|
140
141
|
[harness model]
|
|
141
142
|
(try
|
|
142
143
|
(let [cmd (case harness
|
|
143
144
|
:claude ["claude" "--model" model "-p" "say ok" "--max-turns" "1"]
|
|
144
145
|
:codex ["codex" "exec" "--dangerously-bypass-approvals-and-sandbox" "--skip-git-repo-check" "--model" model "--" "say ok"])
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
null-in (io/input-stream (io/file "/dev/null"))
|
|
147
|
+
proc (process/process cmd {:out :string :err :string :in null-in})
|
|
148
|
+
result (deref proc 30000 :timeout)]
|
|
149
|
+
(if (= result :timeout)
|
|
150
|
+
(do (.destroyForcibly (:proc proc)) false)
|
|
151
|
+
(zero? (:exit result))))
|
|
147
152
|
(catch Exception _ false)))
|
|
148
153
|
|
|
149
154
|
(defn- validate-models!
|