agent-inspect 6.31.20 → 6.31.21
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 +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-EVSIYDB2.mjs → chunk-N5JN26MW.mjs} +30 -10
- package/packages/cli/dist/chunk-N5JN26MW.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +29 -9
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +4 -4
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-NWDDK72G.mjs → src-VMGRSTG7.mjs} +3 -3
- package/packages/cli/dist/{src-NWDDK72G.mjs.map → src-VMGRSTG7.mjs.map} +1 -1
- package/packages/core/dist/advanced.mjs +2 -2
- package/packages/core/dist/checks.cjs +28 -8
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.mjs +1 -1
- package/packages/core/dist/{chunk-GFQPPNSF.mjs → chunk-4CDX5GDS.mjs} +30 -10
- package/packages/core/dist/chunk-4CDX5GDS.mjs.map +1 -0
- package/packages/cli/dist/chunk-EVSIYDB2.mjs.map +0 -1
- package/packages/core/dist/chunk-GFQPPNSF.mjs.map +0 -1
|
@@ -8246,13 +8246,33 @@ function classifyRetryAttempt(event, priorOrdered, allMembers) {
|
|
|
8246
8246
|
}
|
|
8247
8247
|
return { kind: "unknown", reason: "ambiguous attempt identity" };
|
|
8248
8248
|
}
|
|
8249
|
-
function
|
|
8250
|
-
const
|
|
8249
|
+
function redeliveryFingerprint(event) {
|
|
8250
|
+
const workflow = workflowFor(event);
|
|
8251
|
+
const stableEventId = (event.eventId ?? "").replace(/:\d+$/, "");
|
|
8252
|
+
return JSON.stringify({
|
|
8253
|
+
stableEventId,
|
|
8254
|
+
runId: event.runId,
|
|
8255
|
+
kind: event.kind,
|
|
8256
|
+
name: event.name,
|
|
8257
|
+
status: event.status,
|
|
8258
|
+
operationId: workflow.operationId ?? null,
|
|
8259
|
+
attemptId: workflow.attemptId ?? null,
|
|
8260
|
+
attemptNumber: workflow.attemptNumber ?? null,
|
|
8261
|
+
retryOf: workflow.retryOf ?? null
|
|
8262
|
+
});
|
|
8263
|
+
}
|
|
8264
|
+
function hasConflictingAttemptIdReuse(members) {
|
|
8265
|
+
const byAttempt = /* @__PURE__ */ new Map();
|
|
8251
8266
|
for (const event of members) {
|
|
8267
|
+
if (event.kind !== "TOOL" && event.kind !== "LLM") continue;
|
|
8252
8268
|
const id = attemptIdOf(event);
|
|
8253
8269
|
if (!id) continue;
|
|
8254
|
-
|
|
8255
|
-
|
|
8270
|
+
const fingerprints = byAttempt.get(id) ?? /* @__PURE__ */ new Set();
|
|
8271
|
+
fingerprints.add(redeliveryFingerprint(event));
|
|
8272
|
+
byAttempt.set(id, fingerprints);
|
|
8273
|
+
}
|
|
8274
|
+
for (const fingerprints of byAttempt.values()) {
|
|
8275
|
+
if (fingerprints.size > 1) return true;
|
|
8256
8276
|
}
|
|
8257
8277
|
return false;
|
|
8258
8278
|
}
|
|
@@ -8269,11 +8289,11 @@ function evaluateRetrySafetyRules(events, rules, _runEvidence) {
|
|
|
8269
8289
|
}
|
|
8270
8290
|
if (rules.maxAttempts !== void 0) {
|
|
8271
8291
|
for (const [operationId, members] of byOperation) {
|
|
8272
|
-
if (
|
|
8292
|
+
if (hasConflictingAttemptIdReuse(members)) {
|
|
8273
8293
|
findings.push(
|
|
8274
8294
|
fail2(
|
|
8275
8295
|
"contract.retry.duplicate-attempt-id",
|
|
8276
|
-
`Operation ${operationId} has
|
|
8296
|
+
`Operation ${operationId} has conflicting attemptId reuse (distinct executions).`,
|
|
8277
8297
|
members.slice(0, 4).map(eventEvidence2),
|
|
8278
8298
|
"unique attemptId",
|
|
8279
8299
|
"duplicate"
|
|
@@ -8658,7 +8678,7 @@ function attemptIdOf2(event) {
|
|
|
8658
8678
|
const value = workflowFor2(event).attemptId;
|
|
8659
8679
|
return typeof value === "string" && value.trim() !== "" ? value.trim() : void 0;
|
|
8660
8680
|
}
|
|
8661
|
-
function
|
|
8681
|
+
function hasDuplicateAttemptIds(members) {
|
|
8662
8682
|
const seen = /* @__PURE__ */ new Set();
|
|
8663
8683
|
for (const event of members) {
|
|
8664
8684
|
const id = attemptIdOf2(event);
|
|
@@ -8754,7 +8774,7 @@ function evaluateRecoveryOperations(events, operations) {
|
|
|
8754
8774
|
}
|
|
8755
8775
|
for (const [operationKey, members] of groups) {
|
|
8756
8776
|
const ordered = sortByTime2(members);
|
|
8757
|
-
if (
|
|
8777
|
+
if (hasDuplicateAttemptIds(members)) {
|
|
8758
8778
|
findings.push(
|
|
8759
8779
|
fail3(
|
|
8760
8780
|
"contract.retry.operations.duplicate-attempt-id",
|
|
@@ -16960,7 +16980,7 @@ var init_src = __esm({
|
|
|
16960
16980
|
});
|
|
16961
16981
|
|
|
16962
16982
|
// package.json
|
|
16963
|
-
var version = "6.31.
|
|
16983
|
+
var version = "6.31.21";
|
|
16964
16984
|
|
|
16965
16985
|
// packages/cli/src/list.ts
|
|
16966
16986
|
init_advanced();
|