@agent-inspect/jest 6.20.0 → 6.21.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/dist/index.d.cts +50 -0
- package/dist/index.d.ts +50 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -170,6 +170,24 @@ interface TraceReadResult {
|
|
|
170
170
|
sourceFiles: string[];
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Explicit actor/run projection for TraceContract evaluation (#320).
|
|
175
|
+
*
|
|
176
|
+
* Selectors use only declared metadata (or explicit event ids). Zero matches
|
|
177
|
+
* and singular-actor ambiguity fail closed. No timestamp or display-name
|
|
178
|
+
* inference.
|
|
179
|
+
*
|
|
180
|
+
* @experimental
|
|
181
|
+
*/
|
|
182
|
+
interface TraceContractScope {
|
|
183
|
+
runId?: string;
|
|
184
|
+
subAgentId?: string;
|
|
185
|
+
groupId?: string;
|
|
186
|
+
workflowStep?: string;
|
|
187
|
+
/** Explicit root event id; evaluation projects to that event and descendants. */
|
|
188
|
+
rootEventId?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
173
191
|
/**
|
|
174
192
|
* @experimental Typed trace contract input. Evolves during v6.5.x.
|
|
175
193
|
*/
|
|
@@ -230,9 +248,35 @@ interface TraceContractLlmRules {
|
|
|
230
248
|
maxTotalTokens?: number;
|
|
231
249
|
allowedModels?: string[];
|
|
232
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Structural provenance requirements for named observed outcomes (#321).
|
|
253
|
+
*
|
|
254
|
+
* These checks prove method/evidence linkage was recorded. They do **not**
|
|
255
|
+
* prove the claim is semantically true, authorized, complete, or externally
|
|
256
|
+
* trusted.
|
|
257
|
+
*
|
|
258
|
+
* @experimental
|
|
259
|
+
*/
|
|
260
|
+
interface TraceContractObservationProvenance {
|
|
261
|
+
/** Require a non-empty method from the bounded ObservedOutcomeMethod vocabulary. */
|
|
262
|
+
method?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Require bounded evidence references. Supported shapes:
|
|
265
|
+
* `string` event id, `{ eventId }`, or `{ eventIds: string[] }` (max 16 ids).
|
|
266
|
+
*/
|
|
267
|
+
evidence?: boolean;
|
|
268
|
+
/** When true with evidence, each referenced event id must exist in the same run. */
|
|
269
|
+
sameRunEventReference?: boolean;
|
|
270
|
+
}
|
|
233
271
|
interface TraceContractObservationRules {
|
|
234
272
|
required?: string[];
|
|
235
273
|
failOn?: Array<"failed" | "unknown" | "skipped">;
|
|
274
|
+
/**
|
|
275
|
+
* Structural provenance gates for `required` observation names.
|
|
276
|
+
*
|
|
277
|
+
* @experimental
|
|
278
|
+
*/
|
|
279
|
+
requireProvenance?: TraceContractObservationProvenance;
|
|
236
280
|
}
|
|
237
281
|
/**
|
|
238
282
|
* One deterministic alternate path. Branch contracts are one level only —
|
|
@@ -267,6 +311,12 @@ type TraceContractBody = {
|
|
|
267
311
|
observations?: TraceContractObservationRules;
|
|
268
312
|
};
|
|
269
313
|
interface TraceContractInput extends TraceContractBody {
|
|
314
|
+
/**
|
|
315
|
+
* Optional actor/run projection applied before evaluation (#320).
|
|
316
|
+
*
|
|
317
|
+
* @experimental
|
|
318
|
+
*/
|
|
319
|
+
scope?: TraceContractScope;
|
|
270
320
|
alternatives?: TraceContractAlternatives;
|
|
271
321
|
}
|
|
272
322
|
|
package/dist/index.d.ts
CHANGED
|
@@ -170,6 +170,24 @@ interface TraceReadResult {
|
|
|
170
170
|
sourceFiles: string[];
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Explicit actor/run projection for TraceContract evaluation (#320).
|
|
175
|
+
*
|
|
176
|
+
* Selectors use only declared metadata (or explicit event ids). Zero matches
|
|
177
|
+
* and singular-actor ambiguity fail closed. No timestamp or display-name
|
|
178
|
+
* inference.
|
|
179
|
+
*
|
|
180
|
+
* @experimental
|
|
181
|
+
*/
|
|
182
|
+
interface TraceContractScope {
|
|
183
|
+
runId?: string;
|
|
184
|
+
subAgentId?: string;
|
|
185
|
+
groupId?: string;
|
|
186
|
+
workflowStep?: string;
|
|
187
|
+
/** Explicit root event id; evaluation projects to that event and descendants. */
|
|
188
|
+
rootEventId?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
173
191
|
/**
|
|
174
192
|
* @experimental Typed trace contract input. Evolves during v6.5.x.
|
|
175
193
|
*/
|
|
@@ -230,9 +248,35 @@ interface TraceContractLlmRules {
|
|
|
230
248
|
maxTotalTokens?: number;
|
|
231
249
|
allowedModels?: string[];
|
|
232
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Structural provenance requirements for named observed outcomes (#321).
|
|
253
|
+
*
|
|
254
|
+
* These checks prove method/evidence linkage was recorded. They do **not**
|
|
255
|
+
* prove the claim is semantically true, authorized, complete, or externally
|
|
256
|
+
* trusted.
|
|
257
|
+
*
|
|
258
|
+
* @experimental
|
|
259
|
+
*/
|
|
260
|
+
interface TraceContractObservationProvenance {
|
|
261
|
+
/** Require a non-empty method from the bounded ObservedOutcomeMethod vocabulary. */
|
|
262
|
+
method?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Require bounded evidence references. Supported shapes:
|
|
265
|
+
* `string` event id, `{ eventId }`, or `{ eventIds: string[] }` (max 16 ids).
|
|
266
|
+
*/
|
|
267
|
+
evidence?: boolean;
|
|
268
|
+
/** When true with evidence, each referenced event id must exist in the same run. */
|
|
269
|
+
sameRunEventReference?: boolean;
|
|
270
|
+
}
|
|
233
271
|
interface TraceContractObservationRules {
|
|
234
272
|
required?: string[];
|
|
235
273
|
failOn?: Array<"failed" | "unknown" | "skipped">;
|
|
274
|
+
/**
|
|
275
|
+
* Structural provenance gates for `required` observation names.
|
|
276
|
+
*
|
|
277
|
+
* @experimental
|
|
278
|
+
*/
|
|
279
|
+
requireProvenance?: TraceContractObservationProvenance;
|
|
236
280
|
}
|
|
237
281
|
/**
|
|
238
282
|
* One deterministic alternate path. Branch contracts are one level only —
|
|
@@ -267,6 +311,12 @@ type TraceContractBody = {
|
|
|
267
311
|
observations?: TraceContractObservationRules;
|
|
268
312
|
};
|
|
269
313
|
interface TraceContractInput extends TraceContractBody {
|
|
314
|
+
/**
|
|
315
|
+
* Optional actor/run projection applied before evaluation (#320).
|
|
316
|
+
*
|
|
317
|
+
* @experimental
|
|
318
|
+
*/
|
|
319
|
+
scope?: TraceContractScope;
|
|
270
320
|
alternatives?: TraceContractAlternatives;
|
|
271
321
|
}
|
|
272
322
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-inspect/jest",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.21.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Jest reporter and experimental TraceContract matchers for AgentInspect local evidence",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"agent-inspect": "6.
|
|
45
|
+
"agent-inspect": "6.21.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"jest": "^30.2.0"
|