agent-inspect 6.29.6 → 6.30.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.30.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 094854f: Strict CLI TraceContract JSON for `agent-inspect check --config`:
8
+
9
+ - Top-level `contract` evaluates through `defineTraceContract` / `evaluateTraceContract`.
10
+ - Strict nested validation for run/tools/llm/observations/scope/alternatives/controls/retry (unknown keys fail closed).
11
+ - Mutually exclusive with an effective top-level `checks` block.
12
+ - `--evidence-on` binds the resolved contract (`contract.resolved.json` + check-results digests).
13
+
3
14
  ## 6.29.6
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -212,7 +212,7 @@ The root package is enough for custom capture, the CLI, checks, and Evidence wor
212
212
 
213
213
  ## Status and documentation
214
214
 
215
- **Current published baseline:** **6.29.6** · persisted schema `1.0` · Node.js `>=20` · MIT.
215
+ **Current published baseline:** **6.30.0** · persisted schema `1.0` · Node.js `>=20` · MIT.
216
216
 
217
217
  Legacy v0.1 and v0.2 traces remain readable. Check the npm badge and [changelog](CHANGELOG.md) for the current published version.
218
218
 
package/docs/CLI.md CHANGED
@@ -58,9 +58,9 @@ No new CLI commands were added for branching paths.
58
58
  | ---- | ------ |
59
59
  | One tool must always run | CLI `--required-tool` / contract `tools.required` |
60
60
  | Tool must never run | CLI `--forbidden-tool` / contract `tools.forbidden` |
61
- | Legitimate alternate paths (OR) | TraceContract `alternatives.anyOf` (not CLI flags) |
62
- | Causal order between tools | TraceContract `requiredOrder` + `requiredOrderMode` |
63
- | Read recovery vs write fail-closed | TraceContract `retry.operations` + `sideEffectClass` |
61
+ | Legitimate alternate paths (OR) | TraceContract `alternatives.anyOf` via `--config` `contract` (or TS API) |
62
+ | Causal order between tools | TraceContract `requiredOrder` + `requiredOrderMode` via `--config` `contract` |
63
+ | Read recovery vs write fail-closed | TraceContract `retry.operations` + `sideEffectClass` via `--config` `contract` |
64
64
  | Sensitive expected literals in Evidence | Contract binding safety (`unavailable` on credential-like expected); never silent complete packaging |
65
65
  | Share-safe offline review package | CLI `bundle` / Evidence CI helpers |
66
66
 
@@ -351,7 +351,8 @@ Options:
351
351
 
352
352
  By default, `check` runs `run.status`. Additional built-in rules can be selected with `--rule` or config when their options are available. Prefer `--preset trajectory` in CI, then `verify-safe` before sharing.
353
353
 
354
- Config files use this shape:
354
+ Config files use either `checks` (flat rule options) or top-level `contract`
355
+ (TraceContract vocabulary). Do not combine both in one file.
355
356
 
356
357
  ```json
357
358
  {
@@ -364,6 +365,27 @@ Config files use this shape:
364
365
  }
365
366
  ```
366
367
 
368
+ Rich TraceContract JSON (6.30+):
369
+
370
+ ```json
371
+ {
372
+ "contract": {
373
+ "tools": {
374
+ "required": ["retrieve_policy"],
375
+ "forbidden": ["send_email"],
376
+ "requiredOrder": ["retrieve_policy", "generate_answer"],
377
+ "requiredOrderMode": "first-occurrence"
378
+ },
379
+ "observations": { "failOn": ["failed"] },
380
+ "scope": { "runId": "optional-run-id" }
381
+ }
382
+ }
383
+ ```
384
+
385
+ Supported `contract` fields: `run`, `tools` (including `arguments`, `orderRules`),
386
+ `llm`, `observations` (including `requireProvenance`), `scope`, `alternatives.anyOf`,
387
+ `controls`, and `retry`. Unknown keys fail closed (exit 2). With `--evidence-on`,
388
+ contract mode writes `contract.resolved.json` and binds digests into check-results.
367
389
  YAML is not supported. TypeScript config files (`.ts`, `.mts`, `.cts`) fail clearly unless a future explicit loader strategy is added; use precompiled JavaScript config instead.
368
390
 
369
391
  Examples:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "6.29.6",
3
+ "version": "6.30.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Local evidence debugger and trajectory-test toolkit for TypeScript AI agents — execution trees, TraceContract checks, Evidence v2, and read-only MCP",