agent-inspect 5.0.0 → 5.2.0
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/CHANGELOG.md +12 -0
- package/docs/CLI.md +65 -0
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-TB45H3QT.mjs → chunk-SJ5R2XBE.mjs} +1043 -31
- package/packages/cli/dist/chunk-SJ5R2XBE.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +1543 -312
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +276 -164
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-ZRFSYML6.mjs → src-PK22BBMH.mjs} +3 -3
- package/packages/cli/dist/{src-ZRFSYML6.mjs.map → src-PK22BBMH.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +944 -12
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +134 -1
- package/packages/core/dist/advanced.d.ts +134 -1
- package/packages/core/dist/advanced.mjs +921 -8
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/cli/dist/chunk-TB45H3QT.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 52c2539: Add CI quality gates: `agent-inspect gate` with suite/threshold checks, stable exit codes, and JUnit/GitHub step-summary artifacts.
|
|
8
|
+
|
|
9
|
+
## 5.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 44e9684: Add cohort analysis v2: baseline/candidate comparison, grouping, metrics, and `agent-inspect cohort` CLI with JSON/Markdown/HTML reports.
|
|
14
|
+
|
|
3
15
|
## 5.0.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/docs/CLI.md
CHANGED
|
@@ -930,6 +930,71 @@ npx agent-inspect suite run --config fixtures/configs/outcome-suite.suite.json -
|
|
|
930
930
|
|
|
931
931
|
Recipe: [trace-suite-basic](../examples/recipes/trace-suite-basic/README.md).
|
|
932
932
|
|
|
933
|
+
### 6.26 `cohort`
|
|
934
|
+
|
|
935
|
+
Compare **baseline vs candidate** trace cohorts for regressions (v5.1+). Reads local traces only — no agent replay, no model calls, no upload.
|
|
936
|
+
|
|
937
|
+
```bash
|
|
938
|
+
agent-inspect cohort --dir <path> --baseline <label> --candidate <label> [options]
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
Options:
|
|
942
|
+
|
|
943
|
+
- `--dir <path>` — trace directory (default: `.agent-inspect/traces`)
|
|
944
|
+
- `--baseline <label>` / `--candidate <label>` — cohort labels from `run_started.metadata`
|
|
945
|
+
- `--cohort-key <key>` — metadata key for labels (default: `cohort`)
|
|
946
|
+
- `--group-by <spec>` — `model`, `session`, `group`, or `metadata.<key>` (default: `model`)
|
|
947
|
+
- `--metric <list>` — comma-separated metrics (`errorRate`, `duration`, `toolChoice`, `observationFailure`, …)
|
|
948
|
+
- `--format <format>` — `markdown`, `json`, or `html` (default: `markdown`)
|
|
949
|
+
- `-o, --output <dir>` — write `cohort-results.json`, `cohort-summary.md`, `cohort-report.html`
|
|
950
|
+
- `--json` — print deterministic JSON result
|
|
951
|
+
|
|
952
|
+
Exit code **1** when any comparison flags a regression.
|
|
953
|
+
|
|
954
|
+
Example:
|
|
955
|
+
|
|
956
|
+
```bash
|
|
957
|
+
npx agent-inspect cohort \
|
|
958
|
+
--dir fixtures/cohorts/before-after \
|
|
959
|
+
--baseline before \
|
|
960
|
+
--candidate after \
|
|
961
|
+
--group-by model
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
Recipe: [cohort-baseline-candidate](../examples/recipes/cohort-baseline-candidate/README.md).
|
|
965
|
+
|
|
966
|
+
### 6.27 `gate`
|
|
967
|
+
|
|
968
|
+
Run **deterministic CI quality gates** over local traces or suite configs (v5.2+). No agent replay, no model calls, no upload.
|
|
969
|
+
|
|
970
|
+
```bash
|
|
971
|
+
agent-inspect gate --suite <path> [options]
|
|
972
|
+
agent-inspect gate --dir <path> --max-error-rate <percent> [options]
|
|
973
|
+
```
|
|
974
|
+
|
|
975
|
+
Options:
|
|
976
|
+
|
|
977
|
+
- `--dir <path>` — trace directory for threshold checks
|
|
978
|
+
- `--suite <path>` — suite config (`.json`, `.js`, `.mjs`, `.cjs`)
|
|
979
|
+
- `--max-error-rate <percent>` — maximum allowed error rate
|
|
980
|
+
- `--max-p95-duration <ms>` — maximum allowed p95 run duration
|
|
981
|
+
- `--forbid-tool <name>` — forbidden tool (repeatable or comma-separated)
|
|
982
|
+
- `--require-observation <name>` — required passed observation (repeatable or comma-separated)
|
|
983
|
+
- `--format <format>` — `markdown`, `json`, `html`, `junit`, or `github` (default: `markdown`)
|
|
984
|
+
- `-o, --output <dir>` — write `gate-results.json`, `gate-summary.md`, `gate-report.html`, `junit.xml`, `github-step-summary.md`
|
|
985
|
+
- `--json` — print deterministic JSON result
|
|
986
|
+
|
|
987
|
+
Exit codes: **0** pass, **1** gate failed, **2** invalid config, **3** trace read failure, **4** unsupported format.
|
|
988
|
+
|
|
989
|
+
Example:
|
|
990
|
+
|
|
991
|
+
```bash
|
|
992
|
+
npx agent-inspect gate --suite fixtures/configs/outcome-suite.suite.json --output ./gate-artifacts
|
|
993
|
+
npx agent-inspect gate --dir fixtures/cohorts/before-after --max-error-rate 5 --forbid-tool deleteAccount
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
Recipe: [github-actions-gate](../examples/recipes/github-actions-gate/README.md).
|
|
997
|
+
|
|
933
998
|
## 7. Optional TUI behavior
|
|
934
999
|
|
|
935
1000
|
`view --tui` delegates to `@agent-inspect/tui` and requires an interactive terminal. If the package is not installed, the CLI prints a short install hint.
|
package/package.json
CHANGED