@agent-inspect/mcp-server 6.7.2 → 6.7.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/dist/index.cjs CHANGED
@@ -4628,6 +4628,10 @@ function manualTraceEventsToComparableRun(events) {
4628
4628
  meta = { ...meta ?? {}, agent_inspect_diff_parent_missing: true };
4629
4629
  }
4630
4630
  const outputPreview = extractOutputPreview(meta);
4631
+ if (meta !== void 0 && ("outputPreview" in meta || "resultPreview" in meta)) {
4632
+ delete meta.outputPreview;
4633
+ delete meta.resultPreview;
4634
+ }
4631
4635
  const sc = {
4632
4636
  id: acc.id,
4633
4637
  name: acc.name,
@@ -5321,6 +5325,11 @@ function exportMarkdown(tree, options) {
5321
5325
  function hexFrom(seed, byteLen) {
5322
5326
  return crypto__default.default.createHash("sha256").update(seed, "utf8").digest("hex").slice(0, byteLen * 2);
5323
5327
  }
5328
+ function unixNano(ms) {
5329
+ const whole = Math.trunc(ms);
5330
+ const fractionNs = Math.round((ms - whole) * 1e6);
5331
+ return BigInt(whole) * 1000000n + BigInt(fractionNs);
5332
+ }
5324
5333
  function mapInspectKindToOI(kind, warnings) {
5325
5334
  switch (kind) {
5326
5335
  case "LLM":
@@ -5370,10 +5379,10 @@ function exportOpenInference(tree, options) {
5370
5379
  const ev = n.event;
5371
5380
  const spanId = hexFrom(`${tree.runId}:${ev.eventId}`, 8);
5372
5381
  const parentSpanHex = ev.parentId ? hexFrom(`${tree.runId}:${ev.parentId}`, 8) : void 0;
5373
- const startNs = Math.round(ev.timestamp * 1e6);
5382
+ const startNs = unixNano(ev.timestamp);
5374
5383
  let endNs;
5375
5384
  if (ev.durationMs !== void 0 && Number.isFinite(ev.durationMs)) {
5376
- endNs = startNs + Math.round(ev.durationMs * 1e6);
5385
+ endNs = startNs + unixNano(ev.durationMs);
5377
5386
  }
5378
5387
  const { openInferenceKind } = mapInspectKindToOI(ev.kind, warnings);
5379
5388
  const attrs = {
@@ -5421,8 +5430,8 @@ function exportOpenInference(tree, options) {
5421
5430
  span_id: spanId,
5422
5431
  parent_span_id: parentSpanHex,
5423
5432
  name: ev.name,
5424
- start_time_unix_nano: startNs,
5425
- end_time_unix_nano: endNs,
5433
+ start_time_unix_nano: startNs.toString(),
5434
+ end_time_unix_nano: endNs?.toString(),
5426
5435
  attributes: attrs,
5427
5436
  status
5428
5437
  });