agent-inspect 6.31.30 → 6.31.31

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.31.31
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ca1c11: Oct 30 residuals: stricter saved-evidence verifiers, HTML attempt-preserving lifecycle presentation, Om beyond-budget readiness guard, Jan packed MCP SDK assertions, Roy path-scrubbed -003 packet and UNPROVABLE receipt fixtures, and status/docs reconcile.
8
+
3
9
  ## 6.31.30
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -213,7 +213,7 @@ The root package is enough for custom capture, the CLI, checks, and Evidence wor
213
213
 
214
214
  ## Status and documentation
215
215
 
216
- **Current published baseline:** **6.31.30** · persisted schema `1.0` · Node.js `>=20` · MIT.
216
+ **Current published baseline:** **6.31.31** · persisted schema `1.0` · Node.js `>=20` · MIT.
217
217
 
218
218
  Legacy v0.1 and v0.2 traces remain readable. Check the npm badge and [changelog](CHANGELOG.md) for the current published version.
219
219
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "6.31.30",
3
+ "version": "6.31.31",
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",
@@ -252,7 +252,7 @@
252
252
  "demo:verify": "node scripts/demo-verify.mjs",
253
253
  "compat:smoke": "node scripts/compat-smoke.mjs",
254
254
  "compat:ai-sdk-matrix": "node scripts/ai-sdk-peer-matrix.mjs",
255
- "fixtures:check": "node scripts/validate-fixtures.mjs",
255
+ "fixtures:check": "node scripts/validate-fixtures.mjs && node scripts/check-otlp-identity-003-shareable.mjs && node scripts/check-roy-437-unprovable.mjs",
256
256
  "recipes:check": "node scripts/validate-recipes.mjs",
257
257
  "test:integration-offline": "node --test examples/recipes/integration-fixtures/helpers.test.mjs examples/recipes/promptfoo-use-together/lib/matrix-interpret.test.mjs examples/reviewer-kits/promptfoo-trajectory/lib/matrix-interpret.test.mjs examples/recipes/elastic-otlp/live-controls.test.mjs examples/recipes/openai-node-chat-completions/openai-boundary.test.mjs && node examples/recipes/otel-collector-roundtrip/verify.mjs && node examples/recipes/elastic-otlp/verify.mjs",
258
258
  "perf:baseline": "node scripts/performance-baseline.mjs",
@@ -17304,7 +17304,7 @@ var init_src = __esm({
17304
17304
  });
17305
17305
 
17306
17306
  // package.json
17307
- var version = "6.31.30";
17307
+ var version = "6.31.31";
17308
17308
 
17309
17309
  // packages/cli/src/list.ts
17310
17310
  init_advanced();
@@ -19522,6 +19522,16 @@ function stepIdOf2(event) {
19522
19522
  const value = event.attributes?.stepId;
19523
19523
  return typeof value === "string" && value.trim() !== "" ? value : void 0;
19524
19524
  }
19525
+ function attemptIdOf3(event) {
19526
+ const direct = event.attributes?.attemptId;
19527
+ if (typeof direct === "string" && direct.trim() !== "") return direct;
19528
+ const meta2 = event.attributes?.metadata;
19529
+ if (meta2 && typeof meta2 === "object" && !Array.isArray(meta2)) {
19530
+ const nested = meta2.attemptId;
19531
+ if (typeof nested === "string" && nested.trim() !== "") return nested;
19532
+ }
19533
+ return void 0;
19534
+ }
19525
19535
  function lifecycleKey(event) {
19526
19536
  if (event.kind === "RUN") return `run:${event.runId}`;
19527
19537
  const stepId = stepIdOf2(event);
@@ -19531,6 +19541,9 @@ function lifecycleKey(event) {
19531
19541
  function isTerminal(status) {
19532
19542
  return status === "ok" || status === "error";
19533
19543
  }
19544
+ function eventTime3(event) {
19545
+ return typeof event.timestamp === "number" ? event.timestamp : 0;
19546
+ }
19534
19547
  function cloneNode(node) {
19535
19548
  return {
19536
19549
  event: {
@@ -19541,37 +19554,87 @@ function cloneNode(node) {
19541
19554
  depth: node.depth
19542
19555
  };
19543
19556
  }
19557
+ function joinOnePair(start, terminal) {
19558
+ const childMap = /* @__PURE__ */ new Map();
19559
+ if (start) {
19560
+ for (const child of start.children) {
19561
+ childMap.set(child.event.eventId, child);
19562
+ }
19563
+ }
19564
+ for (const child of terminal.children) {
19565
+ childMap.set(child.event.eventId, child);
19566
+ }
19567
+ return {
19568
+ event: {
19569
+ ...terminal.event,
19570
+ name: start?.event.name ?? terminal.event.name,
19571
+ kind: start?.event.kind ?? terminal.event.kind,
19572
+ ...start && attemptIdOf3(terminal.event) === void 0 && attemptIdOf3(start.event) ? {
19573
+ attributes: {
19574
+ ...terminal.event.attributes,
19575
+ attemptId: attemptIdOf3(start.event)
19576
+ }
19577
+ } : {}
19578
+ },
19579
+ children: presentSiblingNodes([...childMap.values()]),
19580
+ depth: terminal.depth
19581
+ };
19582
+ }
19544
19583
  function joinSiblingGroup(group) {
19545
19584
  if (group.length <= 1) return group;
19546
- const terminals = group.filter((n) => isTerminal(n.event.status));
19547
- const runnings = group.filter((n) => n.event.status === "running");
19585
+ const terminals = group.filter((n) => isTerminal(n.event.status)).sort((a, b) => eventTime3(a.event) - eventTime3(b.event));
19586
+ const runnings = group.filter((n) => n.event.status === "running").sort((a, b) => eventTime3(a.event) - eventTime3(b.event));
19587
+ const others = group.filter(
19588
+ (n) => !isTerminal(n.event.status) && n.event.status !== "running"
19589
+ );
19548
19590
  const terminalStatuses = new Set(terminals.map((n) => n.event.status));
19549
19591
  if (terminalStatuses.size > 1) {
19550
19592
  return group;
19551
19593
  }
19552
- if (terminals.length >= 1) {
19553
- const terminal = terminals[terminals.length - 1];
19554
- const start = runnings[0];
19555
- const childMap = /* @__PURE__ */ new Map();
19556
- for (const n of group) {
19557
- for (const child of n.children) {
19558
- childMap.set(child.event.eventId, child);
19594
+ if (terminals.length > 1 && terminals.every((t) => attemptIdOf3(t.event) === void 0) && runnings.every((r) => attemptIdOf3(r.event) === void 0)) {
19595
+ return group;
19596
+ }
19597
+ const usedRunning = /* @__PURE__ */ new Set();
19598
+ const out = [];
19599
+ for (const terminal of terminals) {
19600
+ const terminalAttempt = attemptIdOf3(terminal.event);
19601
+ const terminalTs = eventTime3(terminal.event);
19602
+ const candidate = runnings.find((r) => {
19603
+ if (usedRunning.has(r.event.eventId)) return false;
19604
+ if (eventTime3(r.event) > terminalTs) return false;
19605
+ const runningAttempt = attemptIdOf3(r.event);
19606
+ if (terminalAttempt !== void 0) {
19607
+ return runningAttempt === terminalAttempt;
19608
+ }
19609
+ if (runningAttempt !== void 0) {
19610
+ return true;
19559
19611
  }
19612
+ return true;
19613
+ });
19614
+ if (candidate) {
19615
+ usedRunning.add(candidate.event.eventId);
19616
+ out.push(joinOnePair(candidate, terminal));
19617
+ } else {
19618
+ out.push({
19619
+ ...terminal,
19620
+ children: presentSiblingNodes(terminal.children)
19621
+ });
19560
19622
  }
19561
- return [
19562
- {
19563
- event: {
19564
- ...terminal.event,
19565
- name: start?.event.name ?? terminal.event.name,
19566
- kind: start?.event.kind ?? terminal.event.kind,
19567
- ...start?.event.timestamp !== void 0 && terminal.event.durationMs === void 0 ? {} : {}
19568
- },
19569
- children: presentSiblingNodes([...childMap.values()]),
19570
- depth: terminal.depth
19571
- }
19572
- ];
19573
19623
  }
19574
- return group;
19624
+ for (const running of runnings) {
19625
+ if (usedRunning.has(running.event.eventId)) continue;
19626
+ out.push({
19627
+ ...running,
19628
+ children: presentSiblingNodes(running.children)
19629
+ });
19630
+ }
19631
+ for (const other of others) {
19632
+ out.push({
19633
+ ...other,
19634
+ children: presentSiblingNodes(other.children)
19635
+ });
19636
+ }
19637
+ return out;
19575
19638
  }
19576
19639
  function presentSiblingNodes(nodes) {
19577
19640
  const prepared = nodes.map((n) => ({