agent-inspect 6.31.2 → 6.31.3

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.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 883f965: OTLP JSON export uses BigInt nanosecond timestamps (parity with OpenInference) so realistic epoch times keep exact precision beyond Number.MAX_SAFE_INTEGER.
8
+
3
9
  ## 6.31.2
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.2** · persisted schema `1.0` · Node.js `>=20` · MIT.
216
+ **Current published baseline:** **6.31.3** · 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.2",
3
+ "version": "6.31.3",
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",
@@ -16153,7 +16153,7 @@ var init_src = __esm({
16153
16153
  });
16154
16154
 
16155
16155
  // package.json
16156
- var version = "6.31.2";
16156
+ var version = "6.31.3";
16157
16157
 
16158
16158
  // packages/cli/src/list.ts
16159
16159
  init_advanced();
@@ -18588,6 +18588,11 @@ init_helpers();
18588
18588
  function hexFrom2(seed, byteLen) {
18589
18589
  return crypto__default.default.createHash("sha256").update(seed, "utf8").digest("hex").slice(0, byteLen * 2);
18590
18590
  }
18591
+ function unixNano2(ms) {
18592
+ const whole = Math.trunc(ms);
18593
+ const fractionNs = Math.round((ms - whole) * 1e6);
18594
+ return BigInt(whole) * 1000000n + BigInt(fractionNs);
18595
+ }
18591
18596
  function stringAttr2(key, value) {
18592
18597
  return { key, value: { stringValue: value } };
18593
18598
  }
@@ -18621,10 +18626,10 @@ function exportOtlpJson(tree, options) {
18621
18626
  const ev = n.event;
18622
18627
  const spanId = hexFrom2(`${tree.runId}:${ev.eventId}`, 8);
18623
18628
  const parentSpanId = ev.parentId ? hexFrom2(`${tree.runId}:${ev.parentId}`, 8) : void 0;
18624
- const startNs = String(Math.round(ev.timestamp * 1e6));
18629
+ const startNs = String(unixNano2(ev.timestamp));
18625
18630
  let endNs;
18626
18631
  if (ev.durationMs !== void 0 && Number.isFinite(ev.durationMs)) {
18627
- endNs = String(Math.round(ev.timestamp * 1e6 + ev.durationMs * 1e6));
18632
+ endNs = String(unixNano2(ev.timestamp) + unixNano2(ev.durationMs));
18628
18633
  }
18629
18634
  const attrs = [
18630
18635
  stringAttr2("agent_inspect.kind", ev.kind),