firegoat 0.9.1 → 0.9.2
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 +22 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ npx firegoat eval --var SHA=$(git rev-parse HEAD)
|
|
|
85
85
|
## What eval does
|
|
86
86
|
|
|
87
87
|
- 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.
|
|
88
|
-
- No sandbox: the agent's folder is inside `.firegoat/runs/`, and it can reach the rest of your machine. `.firegoat
|
|
88
|
+
- No sandbox: the agent's folder is inside `.firegoat/runs/`, and it can reach the rest of your machine. In `.firegoat/`, git ignores `runs/` and `.claude/`; keep test fixtures (scripts, sample data) in `.firegoat/fixtures/` and commit them with `firegoat.yaml`.
|
|
89
89
|
- Script checks run in the agent's folder afterwards and set the exit code. `end_goal` is not graded by firegoat: it's for you, or your coding agent, to judge from `run.json`, the session and the folder.
|
|
90
90
|
- Output per run, in `.firegoat/runs/<runId>/<test>/<n>/`: `run.json` (status, prompt, end_goal, check results, paths), `work/`, logs. `summary.json` covers the whole eval; `--json` prints it.
|
|
91
91
|
|
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.2",
|
|
6951
6951
|
repository: {
|
|
6952
6952
|
type: "git",
|
|
6953
6953
|
url: "git+https://github.com/firegoat-ai/firegoat-cli.git"
|
|
@@ -7167,7 +7167,7 @@ function loadConfig(dir) {
|
|
|
7167
7167
|
import { randomBytes } from "node:crypto";
|
|
7168
7168
|
import {
|
|
7169
7169
|
createWriteStream as createWriteStream2,
|
|
7170
|
-
existsSync as
|
|
7170
|
+
existsSync as existsSync2,
|
|
7171
7171
|
mkdirSync as mkdirSync2,
|
|
7172
7172
|
readdirSync,
|
|
7173
7173
|
writeFileSync as writeFileSync2
|
|
@@ -7328,15 +7328,15 @@ function checkLogin(opts) {
|
|
|
7328
7328
|
var EXIT = { pass: 0, fail: 1, notGraded: 2, usage: 3 };
|
|
7329
7329
|
|
|
7330
7330
|
// src/firegoat-dir.ts
|
|
7331
|
-
import {
|
|
7331
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
7332
7332
|
import { join } from "node:path";
|
|
7333
|
+
var GITIGNORE = `runs/
|
|
7334
|
+
.claude/
|
|
7335
|
+
`;
|
|
7333
7336
|
function ensureFiregoatDir(root) {
|
|
7334
7337
|
const dir = join(root, ".firegoat");
|
|
7335
7338
|
mkdirSync(dir, { recursive: true });
|
|
7336
|
-
|
|
7337
|
-
if (!existsSync2(ignore))
|
|
7338
|
-
writeFileSync(ignore, `*
|
|
7339
|
-
`);
|
|
7339
|
+
writeFileSync(join(dir, ".gitignore"), GITIGNORE);
|
|
7340
7340
|
return dir;
|
|
7341
7341
|
}
|
|
7342
7342
|
|
|
@@ -7367,10 +7367,11 @@ ${EXIT_CODES}`;
|
|
|
7367
7367
|
}
|
|
7368
7368
|
var INIT_HELP = `Usage: firegoat init [--force] [--no-skills]
|
|
7369
7369
|
|
|
7370
|
-
In the current folder: creates .firegoat/
|
|
7371
|
-
and
|
|
7372
|
-
|
|
7373
|
-
|
|
7370
|
+
In the current folder: creates .firegoat/ and a starter firegoat.yaml, installs the
|
|
7371
|
+
firegoat-onboarding and suggesting-eval-prompts skills into .claude/skills/ (npx skills
|
|
7372
|
+
add firegoat-ai/skills; asks first in a terminal), then prints a prompt to paste into
|
|
7373
|
+
your coding agent. In .firegoat/, git ignores runs/ and .claude/; keep test fixtures
|
|
7374
|
+
(helper scripts, sample data) in .firegoat/fixtures/ and commit them.
|
|
7374
7375
|
|
|
7375
7376
|
--force replace an existing firegoat.yaml
|
|
7376
7377
|
--no-skills don't install the skills
|
|
@@ -7391,7 +7392,8 @@ firegoat.yaml reference:
|
|
|
7391
7392
|
- run: ... afterwards; exit 0 = pass; they set eval's exit code
|
|
7392
7393
|
timeout: 600 optional, seconds
|
|
7393
7394
|
|
|
7394
|
-
Unknown keys are errors.
|
|
7395
|
+
Unknown keys are errors. Keep helper files out of firegoat.yaml: put them in
|
|
7396
|
+
.firegoat/fixtures/ and copy them in setup or workdir_setup. setup, workdir_setup and checks get the vars as env vars,
|
|
7395
7397
|
plus $FIREGOAT_OUT and $FIREGOAT_WORKDIR; checks also get $FIREGOAT_SESSION (the
|
|
7396
7398
|
claude session file, one JSON event per line).
|
|
7397
7399
|
|
|
@@ -7546,11 +7548,11 @@ function parseArgs(args) {
|
|
|
7546
7548
|
}
|
|
7547
7549
|
function findSession(configDir, sessionId) {
|
|
7548
7550
|
const projects = join3(configDir, "projects");
|
|
7549
|
-
if (!
|
|
7551
|
+
if (!existsSync2(projects))
|
|
7550
7552
|
return null;
|
|
7551
7553
|
for (const d of readdirSync(projects)) {
|
|
7552
7554
|
const f = join3(projects, d, `${sessionId}.jsonl`);
|
|
7553
|
-
if (
|
|
7555
|
+
if (existsSync2(f))
|
|
7554
7556
|
return f;
|
|
7555
7557
|
}
|
|
7556
7558
|
return null;
|
|
@@ -7749,7 +7751,7 @@ ${totals.pass} passed, ${totals.fail} failed, ${totals.error} not graded (${resu
|
|
|
7749
7751
|
|
|
7750
7752
|
// src/init.ts
|
|
7751
7753
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
7752
|
-
import { existsSync as
|
|
7754
|
+
import { existsSync as existsSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
7753
7755
|
import { basename, join as join4 } from "node:path";
|
|
7754
7756
|
import { createInterface } from "node:readline/promises";
|
|
7755
7757
|
var SKILLS_ARGV = [
|
|
@@ -7787,6 +7789,10 @@ runs: 1
|
|
|
7787
7789
|
#
|
|
7788
7790
|
# a CLI binary:
|
|
7789
7791
|
# setup: go build -o "$FIREGOAT_OUT/mycli" ./cmd/mycli
|
|
7792
|
+
#
|
|
7793
|
+
# Helper files (scripts, sample data) go in .firegoat/fixtures/ (committed), not inline here.
|
|
7794
|
+
# setup runs in this folder, so: setup: cp -R .firegoat/fixtures/. "$FIREGOAT_OUT"
|
|
7795
|
+
# then e.g. workdir_setup: cp "$FIREGOAT_OUT/wizard.mjs" .
|
|
7790
7796
|
|
|
7791
7797
|
tests:
|
|
7792
7798
|
- name: quickstart
|
|
@@ -7849,7 +7855,7 @@ ${INIT_HELP}`);
|
|
|
7849
7855
|
}
|
|
7850
7856
|
ensureFiregoatDir(cwd);
|
|
7851
7857
|
const configPath = join4(cwd, CONFIG_FILE);
|
|
7852
|
-
if (
|
|
7858
|
+
if (existsSync3(configPath) && !force)
|
|
7853
7859
|
console.log(`kept ${CONFIG_FILE} (--force replaces it)`);
|
|
7854
7860
|
else {
|
|
7855
7861
|
writeFileSync3(configPath, template(basename(cwd)));
|