@agent-inspect/vitest 6.26.0 → 6.27.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 +63 -1
- package/dist/index.d.ts +63 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -237,6 +237,61 @@ interface TraceContractControlRules {
|
|
|
237
237
|
}>;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Bounded safe recovery operation contracts (6.27).
|
|
242
|
+
*
|
|
243
|
+
* Additive `retry.operations[]` rules for read-first recovery oracles.
|
|
244
|
+
* AgentInspect evaluates traces; it does not perform retries.
|
|
245
|
+
*
|
|
246
|
+
* @experimental
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
/** How same-argument evidence may be compared across attempts. */
|
|
250
|
+
type RecoverySameArgumentsMode = "structured-or-digest";
|
|
251
|
+
/**
|
|
252
|
+
* Side-effect class for conservative write recovery semantics.
|
|
253
|
+
* Read-only tools may recover without write idempotency proof.
|
|
254
|
+
* Write tools treat timeout/unknown completion as fail/unevaluable
|
|
255
|
+
* unless authoritative idempotency evidence is present.
|
|
256
|
+
*/
|
|
257
|
+
type RecoverySideEffectClass = "read" | "write";
|
|
258
|
+
interface TraceContractRecoveryRetryableErrors {
|
|
259
|
+
/** Allowed error codes on failed attempts that precede a retry. */
|
|
260
|
+
codes?: readonly string[];
|
|
261
|
+
}
|
|
262
|
+
interface TraceContractRecoverySuccessfulResultDependency {
|
|
263
|
+
/** Consumer kind that must observe the successful tool result. */
|
|
264
|
+
consumerKind: "LLM";
|
|
265
|
+
/**
|
|
266
|
+
* When true, an LLM event must explicitly reference the successful tool
|
|
267
|
+
* event id (attributes / workflow metadata), not merely follow it in time.
|
|
268
|
+
*/
|
|
269
|
+
requireExplicitReference?: boolean;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Per-tool bounded recovery oracle (additive under `retry.operations`).
|
|
273
|
+
*
|
|
274
|
+
* @experimental Additive in 6.27.
|
|
275
|
+
*/
|
|
276
|
+
interface TraceContractRecoveryOperation {
|
|
277
|
+
tool: string;
|
|
278
|
+
maxAttempts?: number;
|
|
279
|
+
retryableErrors?: TraceContractRecoveryRetryableErrors;
|
|
280
|
+
requireFailureBeforeRetry?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* When true or `"structured-or-digest"`, retries must share structured
|
|
283
|
+
* arguments or matching digests. Missing evidence fails closed.
|
|
284
|
+
*/
|
|
285
|
+
requireSameArguments?: boolean | RecoverySameArgumentsMode;
|
|
286
|
+
requireTerminalSuccess?: boolean;
|
|
287
|
+
requireRecoveredFailureVisible?: boolean;
|
|
288
|
+
successfulResultDependency?: TraceContractRecoverySuccessfulResultDependency;
|
|
289
|
+
/**
|
|
290
|
+
* Defaults to `"read"`. Write tools apply conservative timeout/unknown rules.
|
|
291
|
+
*/
|
|
292
|
+
sideEffectClass?: RecoverySideEffectClass;
|
|
293
|
+
}
|
|
294
|
+
|
|
240
295
|
/**
|
|
241
296
|
* Retry / side-effect safety checks for TraceContract (6.23+; corrected in 6.25.1).
|
|
242
297
|
*
|
|
@@ -278,6 +333,12 @@ interface TraceContractRetryRules {
|
|
|
278
333
|
* same operation/retry chain (not merely coexistence of ok+error).
|
|
279
334
|
*/
|
|
280
335
|
requireRecoveredFailureVisible?: boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Per-tool bounded recovery oracles (read-first; write timeout/unknown fails closed).
|
|
338
|
+
*
|
|
339
|
+
* @experimental Additive in 6.27.
|
|
340
|
+
*/
|
|
341
|
+
operations?: readonly TraceContractRecoveryOperation[];
|
|
281
342
|
}
|
|
282
343
|
|
|
283
344
|
type ToolArgumentOperator = "exists" | "type" | "equals" | "oneOf";
|
|
@@ -450,8 +511,9 @@ type TraceContractBody = {
|
|
|
450
511
|
controls?: TraceContractControlRules;
|
|
451
512
|
/**
|
|
452
513
|
* Retry / side-effect safety using explicit attempt identity.
|
|
514
|
+
* Additive `retry.operations[]` recovery oracles land in 6.27.
|
|
453
515
|
*
|
|
454
|
-
* @experimental Additive in 6.23.
|
|
516
|
+
* @experimental Additive in 6.23; operations in 6.27.
|
|
455
517
|
*/
|
|
456
518
|
retry?: TraceContractRetryRules;
|
|
457
519
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -237,6 +237,61 @@ interface TraceContractControlRules {
|
|
|
237
237
|
}>;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Bounded safe recovery operation contracts (6.27).
|
|
242
|
+
*
|
|
243
|
+
* Additive `retry.operations[]` rules for read-first recovery oracles.
|
|
244
|
+
* AgentInspect evaluates traces; it does not perform retries.
|
|
245
|
+
*
|
|
246
|
+
* @experimental
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
/** How same-argument evidence may be compared across attempts. */
|
|
250
|
+
type RecoverySameArgumentsMode = "structured-or-digest";
|
|
251
|
+
/**
|
|
252
|
+
* Side-effect class for conservative write recovery semantics.
|
|
253
|
+
* Read-only tools may recover without write idempotency proof.
|
|
254
|
+
* Write tools treat timeout/unknown completion as fail/unevaluable
|
|
255
|
+
* unless authoritative idempotency evidence is present.
|
|
256
|
+
*/
|
|
257
|
+
type RecoverySideEffectClass = "read" | "write";
|
|
258
|
+
interface TraceContractRecoveryRetryableErrors {
|
|
259
|
+
/** Allowed error codes on failed attempts that precede a retry. */
|
|
260
|
+
codes?: readonly string[];
|
|
261
|
+
}
|
|
262
|
+
interface TraceContractRecoverySuccessfulResultDependency {
|
|
263
|
+
/** Consumer kind that must observe the successful tool result. */
|
|
264
|
+
consumerKind: "LLM";
|
|
265
|
+
/**
|
|
266
|
+
* When true, an LLM event must explicitly reference the successful tool
|
|
267
|
+
* event id (attributes / workflow metadata), not merely follow it in time.
|
|
268
|
+
*/
|
|
269
|
+
requireExplicitReference?: boolean;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Per-tool bounded recovery oracle (additive under `retry.operations`).
|
|
273
|
+
*
|
|
274
|
+
* @experimental Additive in 6.27.
|
|
275
|
+
*/
|
|
276
|
+
interface TraceContractRecoveryOperation {
|
|
277
|
+
tool: string;
|
|
278
|
+
maxAttempts?: number;
|
|
279
|
+
retryableErrors?: TraceContractRecoveryRetryableErrors;
|
|
280
|
+
requireFailureBeforeRetry?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* When true or `"structured-or-digest"`, retries must share structured
|
|
283
|
+
* arguments or matching digests. Missing evidence fails closed.
|
|
284
|
+
*/
|
|
285
|
+
requireSameArguments?: boolean | RecoverySameArgumentsMode;
|
|
286
|
+
requireTerminalSuccess?: boolean;
|
|
287
|
+
requireRecoveredFailureVisible?: boolean;
|
|
288
|
+
successfulResultDependency?: TraceContractRecoverySuccessfulResultDependency;
|
|
289
|
+
/**
|
|
290
|
+
* Defaults to `"read"`. Write tools apply conservative timeout/unknown rules.
|
|
291
|
+
*/
|
|
292
|
+
sideEffectClass?: RecoverySideEffectClass;
|
|
293
|
+
}
|
|
294
|
+
|
|
240
295
|
/**
|
|
241
296
|
* Retry / side-effect safety checks for TraceContract (6.23+; corrected in 6.25.1).
|
|
242
297
|
*
|
|
@@ -278,6 +333,12 @@ interface TraceContractRetryRules {
|
|
|
278
333
|
* same operation/retry chain (not merely coexistence of ok+error).
|
|
279
334
|
*/
|
|
280
335
|
requireRecoveredFailureVisible?: boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Per-tool bounded recovery oracles (read-first; write timeout/unknown fails closed).
|
|
338
|
+
*
|
|
339
|
+
* @experimental Additive in 6.27.
|
|
340
|
+
*/
|
|
341
|
+
operations?: readonly TraceContractRecoveryOperation[];
|
|
281
342
|
}
|
|
282
343
|
|
|
283
344
|
type ToolArgumentOperator = "exists" | "type" | "equals" | "oneOf";
|
|
@@ -450,8 +511,9 @@ type TraceContractBody = {
|
|
|
450
511
|
controls?: TraceContractControlRules;
|
|
451
512
|
/**
|
|
452
513
|
* Retry / side-effect safety using explicit attempt identity.
|
|
514
|
+
* Additive `retry.operations[]` recovery oracles land in 6.27.
|
|
453
515
|
*
|
|
454
|
-
* @experimental Additive in 6.23.
|
|
516
|
+
* @experimental Additive in 6.23; operations in 6.27.
|
|
455
517
|
*/
|
|
456
518
|
retry?: TraceContractRetryRules;
|
|
457
519
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-inspect/vitest",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.27.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Vitest reporter and experimental TraceContract matchers for AgentInspect local evidence",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vitest": "^2.1.0 || ^3.2.6"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"agent-inspect": "6.
|
|
40
|
+
"agent-inspect": "6.27.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"vitest": "^3.2.7"
|