@agent-inspect/mcp-server 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.
@@ -7184,6 +7184,11 @@ function exportOpenInference(tree, options) {
7184
7184
  function hexFrom2(seed, byteLen) {
7185
7185
  return crypto.createHash("sha256").update(seed, "utf8").digest("hex").slice(0, byteLen * 2);
7186
7186
  }
7187
+ function unixNano2(ms) {
7188
+ const whole = Math.trunc(ms);
7189
+ const fractionNs = Math.round((ms - whole) * 1e6);
7190
+ return BigInt(whole) * 1000000n + BigInt(fractionNs);
7191
+ }
7187
7192
  function stringAttr2(key, value) {
7188
7193
  return { key, value: { stringValue: value } };
7189
7194
  }
@@ -7217,10 +7222,10 @@ function exportOtlpJson(tree, options) {
7217
7222
  const ev = n.event;
7218
7223
  const spanId = hexFrom2(`${tree.runId}:${ev.eventId}`, 8);
7219
7224
  const parentSpanId = ev.parentId ? hexFrom2(`${tree.runId}:${ev.parentId}`, 8) : void 0;
7220
- const startNs = String(Math.round(ev.timestamp * 1e6));
7225
+ const startNs = String(unixNano2(ev.timestamp));
7221
7226
  let endNs;
7222
7227
  if (ev.durationMs !== void 0 && Number.isFinite(ev.durationMs)) {
7223
- endNs = String(Math.round(ev.timestamp * 1e6 + ev.durationMs * 1e6));
7228
+ endNs = String(unixNano2(ev.timestamp) + unixNano2(ev.durationMs));
7224
7229
  }
7225
7230
  const attrs2 = [
7226
7231
  stringAttr2("agent_inspect.kind", ev.kind),
@@ -8745,5 +8750,5 @@ async function runReadOnlyMcpServer(options = {}) {
8745
8750
  }
8746
8751
 
8747
8752
  export { MCP_MAX_REQUEST_BYTES, MCP_PROTOCOL_VERSION, MCP_SERVER_INSTRUCTIONS, READ_ONLY_TOOLS, TRACE_DATA_UNTRUSTED_WARNING, callReadOnlyTool, createMcpServerContext, handleMcpProtocolLine, runReadOnlyMcpServer };
8748
- //# sourceMappingURL=chunk-YWFDV7U3.mjs.map
8749
- //# sourceMappingURL=chunk-YWFDV7U3.mjs.map
8753
+ //# sourceMappingURL=chunk-P2HSJJKS.mjs.map
8754
+ //# sourceMappingURL=chunk-P2HSJJKS.mjs.map