firegoat 0.17.0 → 0.17.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/README.md +1 -1
- package/dist/cli.js +28 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ Setting `HOME`: on macOS claude reads its login from `$HOME/Library`, so with a
|
|
|
137
137
|
## What eval does
|
|
138
138
|
|
|
139
139
|
- claude runs on its own login (or `ANTHROPIC_API_KEY`, if set) with `CLAUDE_CONFIG_DIR=.firegoat/.claude` and `--setting-sources "" --strict-mcp-config --disable-slash-commands`: none of your settings, CLAUDE.md, plugins, skills or MCP servers. claude saves its session there, in its own format.
|
|
140
|
-
- No sandbox: the agent's folder is inside `.firegoat/runs/`, and it can reach the rest of your machine.
|
|
140
|
+
- No sandbox: the agent's folder is inside `.firegoat/runs/`, and it can reach the rest of your machine. Commit `.firegoat/` with `firegoat.yaml`: its `.gitignore` ignores only `runs/` and `.claude/`, test fixtures (scripts, sample data) go in `.firegoat/fixtures/`, and its `README.md` says what each folder is.
|
|
141
141
|
- In a linked git worktree (`git worktree add`), `.firegoat/runs/` and `.firegoat/.claude/` are in the main checkout, so runs (and their session files) survive `git worktree remove`; `firegoat.yaml`, fixtures and `build:` stay in the worktree. Each `summary.json` records `dir` (where eval ran) and `git: {branch, commit, dirty}`, and `.firegoat/runs/index.jsonl` gets one line per eval (`runId, startedAt, dir, branch, commit, passed, failed, notGraded, cost, uploaded, uploadFailed`) to tell runs from different branches apart.
|
|
142
142
|
- The agent gets your environment plus `env:`, never `vars:`. Vars that npm/npx set for firegoat itself (`npm_config_*`, `npm_lifecycle_*`, `npm_package_*`, `npm_execpath`, `npm_node_execpath`, `npm_command`, `INIT_CWD`) are removed from every env firegoat starts (agent, build, install, checks): `npx -y firegoat` sets `npm_config_yes=true`, which would make the agent's `npm init` / `npx create-*` skip their prompts. Set one under `env:` to keep it. Every `FIREGOAT_*` var firegoat was started with (`FIREGOAT_API_KEY` above all) is removed too.
|
|
143
143
|
- Runs (tests × models × `runs`) go 4 at a time, each in its own folder with its own session; `--parallel N` changes that, `--parallel 1` runs them one after another. `summary.json` lists them in `firegoat.yaml` order.
|
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.17.
|
|
6950
|
+
version: "0.17.1",
|
|
6951
6951
|
repository: {
|
|
6952
6952
|
type: "git",
|
|
6953
6953
|
url: "git+https://github.com/firegoat-ai/firegoat-cli.git"
|
|
@@ -7252,7 +7252,7 @@ import { randomBytes as randomBytes2 } from "node:crypto";
|
|
|
7252
7252
|
import {
|
|
7253
7253
|
appendFileSync,
|
|
7254
7254
|
createWriteStream as createWriteStream2,
|
|
7255
|
-
existsSync as
|
|
7255
|
+
existsSync as existsSync4,
|
|
7256
7256
|
mkdirSync as mkdirSync3,
|
|
7257
7257
|
readdirSync as readdirSync2,
|
|
7258
7258
|
writeFileSync as writeFileSync3
|
|
@@ -7732,17 +7732,28 @@ function resolveKey(base) {
|
|
|
7732
7732
|
var EXIT = { pass: 0, fail: 1, notGraded: 2, usage: 3 };
|
|
7733
7733
|
|
|
7734
7734
|
// src/firegoat-dir.ts
|
|
7735
|
-
import { mkdirSync as mkdirSync2, writeFileSync } from "node:fs";
|
|
7735
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, writeFileSync } from "node:fs";
|
|
7736
7736
|
import { join as join2 } from "node:path";
|
|
7737
|
-
var GITIGNORE =
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7737
|
+
var GITIGNORE = `runs/
|
|
7738
|
+
.claude/
|
|
7739
|
+
`;
|
|
7740
|
+
var README = `# .firegoat
|
|
7741
|
+
|
|
7742
|
+
Files for the evals in firegoat.yaml (run them with \`npx firegoat eval\`).
|
|
7743
|
+
|
|
7744
|
+
- \`fixtures/\`: test fixtures (helper scripts, sample data) for build:, install: and checks. Commit them.
|
|
7745
|
+
- \`runs/\`: one folder per eval (transcripts, sessions, check output). Ignored by git.
|
|
7746
|
+
- \`.claude/\`: the empty claude config eval runs the agent with. Ignored by git.
|
|
7747
|
+
|
|
7748
|
+
Reference: \`npx firegoat init --help\`.
|
|
7741
7749
|
`;
|
|
7742
7750
|
function ensureFiregoatDir(root) {
|
|
7743
7751
|
const dir = join2(root, ".firegoat");
|
|
7744
|
-
mkdirSync2(dir, { recursive: true });
|
|
7752
|
+
mkdirSync2(join2(dir, "fixtures"), { recursive: true });
|
|
7745
7753
|
writeFileSync(join2(dir, ".gitignore"), GITIGNORE);
|
|
7754
|
+
const readme = join2(dir, "README.md");
|
|
7755
|
+
if (!existsSync2(readme))
|
|
7756
|
+
writeFileSync(readme, README);
|
|
7746
7757
|
return dir;
|
|
7747
7758
|
}
|
|
7748
7759
|
|
|
@@ -7839,9 +7850,9 @@ In the current folder: creates .firegoat/ and a starter firegoat.yaml, installs
|
|
|
7839
7850
|
firegoat-onboarding skill globally, into ~/.claude/skills/ (npx skills add
|
|
7840
7851
|
firegoat-ai/skills -g; in a terminal it asks: global, this repo, or none), offers
|
|
7841
7852
|
firegoat login (in a terminal only; otherwise prints how), then prints a prompt to
|
|
7842
|
-
paste into your coding agent.
|
|
7843
|
-
and
|
|
7844
|
-
.firegoat/fixtures
|
|
7853
|
+
paste into your coding agent. Commit .firegoat/ with firegoat.yaml: its .gitignore
|
|
7854
|
+
ignores only runs/ and .claude/, and test fixtures (helper scripts, sample data)
|
|
7855
|
+
go in .firegoat/fixtures/. Its README.md says what each folder is.
|
|
7845
7856
|
|
|
7846
7857
|
--force Replace an existing firegoat.yaml
|
|
7847
7858
|
--local-skills Install the skill into this repo's .claude/skills/ instead
|
|
@@ -8448,7 +8459,7 @@ function ttyUI(out, opts) {
|
|
|
8448
8459
|
}
|
|
8449
8460
|
|
|
8450
8461
|
// src/upload.ts
|
|
8451
|
-
import { existsSync as
|
|
8462
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
8452
8463
|
import { basename as basename2 } from "node:path";
|
|
8453
8464
|
var MAX_FILE = 20 * 1024 * 1024;
|
|
8454
8465
|
var MAX_CHECKS = 200;
|
|
@@ -8524,7 +8535,7 @@ async function uploadRun(t, r) {
|
|
|
8524
8535
|
};
|
|
8525
8536
|
const bytes = {};
|
|
8526
8537
|
for (const name of FILES) {
|
|
8527
|
-
const b =
|
|
8538
|
+
const b = existsSync3(paths[name]) ? readFileSync3(paths[name]) : Buffer.alloc(0);
|
|
8528
8539
|
if (b.byteLength > MAX_FILE)
|
|
8529
8540
|
return {
|
|
8530
8541
|
status: "failed",
|
|
@@ -8693,11 +8704,11 @@ function parseArgs(args) {
|
|
|
8693
8704
|
}
|
|
8694
8705
|
function findSession(configDir, sessionId) {
|
|
8695
8706
|
const projects = join5(configDir, "projects");
|
|
8696
|
-
if (!
|
|
8707
|
+
if (!existsSync4(projects))
|
|
8697
8708
|
return null;
|
|
8698
8709
|
for (const d of readdirSync2(projects)) {
|
|
8699
8710
|
const f = join5(projects, d, `${sessionId}.jsonl`);
|
|
8700
|
-
if (
|
|
8711
|
+
if (existsSync4(f))
|
|
8701
8712
|
return f;
|
|
8702
8713
|
}
|
|
8703
8714
|
return null;
|
|
@@ -9341,7 +9352,7 @@ firegoat ${package_default.version}` : `firegoat ${package_default.version}`,
|
|
|
9341
9352
|
|
|
9342
9353
|
// src/init.ts
|
|
9343
9354
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
9344
|
-
import { existsSync as
|
|
9355
|
+
import { existsSync as existsSync5, writeFileSync as writeFileSync4 } from "node:fs";
|
|
9345
9356
|
import { basename as basename4, join as join6 } from "node:path";
|
|
9346
9357
|
import { createInterface } from "node:readline/promises";
|
|
9347
9358
|
|
|
@@ -9715,7 +9726,7 @@ ${INIT_HELP}`);
|
|
|
9715
9726
|
}
|
|
9716
9727
|
ensureFiregoatDir(cwd);
|
|
9717
9728
|
const configPath = join6(cwd, CONFIG_FILE);
|
|
9718
|
-
const keep =
|
|
9729
|
+
const keep = existsSync5(configPath) && !force;
|
|
9719
9730
|
if (!keep)
|
|
9720
9731
|
writeFileSync4(configPath, template(basename4(cwd)));
|
|
9721
9732
|
if (interactive) {
|