firegoat 0.9.3 → 0.9.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.
- package/dist/cli.js +8 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6947,7 +6947,7 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6947
6947
|
// package.json
|
|
6948
6948
|
var package_default = {
|
|
6949
6949
|
name: "firegoat",
|
|
6950
|
-
version: "0.9.
|
|
6950
|
+
version: "0.9.4",
|
|
6951
6951
|
repository: {
|
|
6952
6952
|
type: "git",
|
|
6953
6953
|
url: "git+https://github.com/firegoat-ai/firegoat-cli.git"
|
|
@@ -7250,12 +7250,15 @@ async function runClaude(opts) {
|
|
|
7250
7250
|
return;
|
|
7251
7251
|
}
|
|
7252
7252
|
});
|
|
7253
|
-
const init = events
|
|
7254
|
-
if (init
|
|
7253
|
+
const init = events.find((e) => e?.type === "system" && e.subtype === "init");
|
|
7254
|
+
if (!init) {
|
|
7255
|
+
const said = stdout.trim().split(`
|
|
7256
|
+
`)[0]?.slice(0, 300);
|
|
7255
7257
|
return {
|
|
7256
7258
|
ok: false,
|
|
7257
|
-
reason: `claude did not start a session (exit ${exited.code ?? "by signal"}), see stderr.txt`
|
|
7259
|
+
reason: `claude did not start a session (exit ${exited.code ?? "by signal"})${said ? `: ${said}` : ", see stderr.txt"}`
|
|
7258
7260
|
};
|
|
7261
|
+
}
|
|
7259
7262
|
const sessionId = String(init.session_id);
|
|
7260
7263
|
const result = events.findLast((e) => e?.type === "result");
|
|
7261
7264
|
if (exited.timedOut)
|
|
@@ -7274,7 +7277,7 @@ async function runClaude(opts) {
|
|
|
7274
7277
|
if (result.is_error === true || result.subtype !== "success")
|
|
7275
7278
|
return {
|
|
7276
7279
|
ok: false,
|
|
7277
|
-
reason: `claude result is an error (subtype=${result.subtype})`,
|
|
7280
|
+
reason: `claude result is an error (subtype=${result.subtype})${result.result ? `: ${result.result.slice(0, 300)}` : ""}`,
|
|
7278
7281
|
result,
|
|
7279
7282
|
sessionId
|
|
7280
7283
|
};
|