@agent-inspect/jest 6.14.0 → 6.14.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 CHANGED
@@ -1,9 +1,9 @@
1
1
  # @agent-inspect/jest
2
2
 
3
- Jest reporter local trace artifacts on failed tests.
3
+ Jest reporter for local AgentInspect failure artifacts, plus **experimental** TraceContract matchers.
4
4
 
5
5
 
6
- **Support level:** Supported — see [SUPPORT-LEVELS.md](https://github.com/rajudandigam/agent-inspect/blob/main/docs/SUPPORT-LEVELS.md).
6
+ **Support level:** Supported (reporter) · Experimental (matchers) — see [SUPPORT-LEVELS.md](https://github.com/rajudandigam/agent-inspect/blob/main/docs/SUPPORT-LEVELS.md).
7
7
 
8
8
  ## When to use
9
9
 
@@ -79,6 +79,7 @@ expect.extend({
79
79
 
80
80
  - `createAgentInspectJestReporter` / `AgentInspectJestReporter`
81
81
  - `withAgentInspectJestTrace` — explicit association helper (no automatic capture)
82
+ - `agentInspectJestMatchers` — Experimental (`toPassTraceContract`, `toHaveRequiredTool`)
82
83
 
83
84
  ## CLI
84
85
 
@@ -86,8 +87,21 @@ expect.extend({
86
87
 
87
88
  ## Limitations
88
89
 
89
- - This package is a **reporter** (failure artifacts). It does **not** ship Jest TraceContract matchers.
90
- - Use `agent-inspect check` / TraceContract APIs for trajectory assertions.
90
+ - Primary surface is a **reporter** (failure artifacts) plus **experimental** matchers.
91
+ - Experimental matchers:
92
+
93
+ ```js
94
+ const { expect } = require("@jest/globals");
95
+ const { agentInspectJestMatchers } = require("@agent-inspect/jest");
96
+
97
+ expect.extend(agentInspectJestMatchers);
98
+
99
+ expect(read).toPassTraceContract(contract);
100
+ expect(read).toHaveRequiredTool("lookup_orders");
101
+ ```
102
+
103
+ - There is no `expectTrace(...).toSatisfyTraceContract` helper.
104
+ - Use `agent-inspect check` / TraceContract APIs for deep CI gates when matchers are insufficient.
91
105
 
92
106
  ## Docs
93
107
 
package/dist/index.d.cts CHANGED
@@ -76,6 +76,14 @@ interface InspectNode {
76
76
  children: InspectNode[];
77
77
  depth: number;
78
78
  }
79
+ /** Bounded parent/cycle summary for visibility-first tree building (6.14.2+). */
80
+ interface RelationshipSummary {
81
+ rootCount: number;
82
+ selfParentCount: number;
83
+ cycleCount: number;
84
+ unresolvedParentCount: number;
85
+ normalizedEdgeCount: number;
86
+ }
79
87
  interface InspectRunTree {
80
88
  runId: string;
81
89
  name?: string;
@@ -88,6 +96,7 @@ interface InspectRunTree {
88
96
  totalEvents: number;
89
97
  confidenceBreakdown: Record<AttributionConfidence, number>;
90
98
  kinds: Record<InspectKind, number>;
99
+ relationshipSummary?: RelationshipSummary;
91
100
  };
92
101
  }
93
102
 
package/dist/index.d.ts CHANGED
@@ -76,6 +76,14 @@ interface InspectNode {
76
76
  children: InspectNode[];
77
77
  depth: number;
78
78
  }
79
+ /** Bounded parent/cycle summary for visibility-first tree building (6.14.2+). */
80
+ interface RelationshipSummary {
81
+ rootCount: number;
82
+ selfParentCount: number;
83
+ cycleCount: number;
84
+ unresolvedParentCount: number;
85
+ normalizedEdgeCount: number;
86
+ }
79
87
  interface InspectRunTree {
80
88
  runId: string;
81
89
  name?: string;
@@ -88,6 +96,7 @@ interface InspectRunTree {
88
96
  totalEvents: number;
89
97
  confidenceBreakdown: Record<AttributionConfidence, number>;
90
98
  kinds: Record<InspectKind, number>;
99
+ relationshipSummary?: RelationshipSummary;
91
100
  };
92
101
  }
93
102
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@agent-inspect/jest",
3
- "version": "6.14.0",
3
+ "version": "6.14.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "description": "Optional Jest reporter for AgentInspect local trace artifacts",
6
+ "description": "Jest reporter and experimental TraceContract matchers for AgentInspect local evidence",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/rajudandigam/agent-inspect.git",
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "agent-inspect": "6.14.0"
45
+ "agent-inspect": "6.14.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "jest": "^30.2.0"
@@ -50,6 +50,14 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
+ "keywords": [
54
+ "jest",
55
+ "agent-inspect",
56
+ "tracecontract",
57
+ "trajectory-testing",
58
+ "typescript",
59
+ "ai-agents"
60
+ ],
53
61
  "scripts": {
54
62
  "build": "pnpm --workspace-root exec tsup --config tsup.jest.config.ts",
55
63
  "test": "vitest run -c ../../vitest.config.ts"