@morsehq-dev/sdk 0.4.0 → 0.4.1-rc.1

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.
Files changed (93) hide show
  1. package/dist/anthropic/index.cjs +10 -10
  2. package/dist/anthropic/index.js +3 -3
  3. package/dist/anthropic-agent-sdk/index.cjs +32 -32
  4. package/dist/anthropic-agent-sdk/index.js +5 -5
  5. package/dist/browser/anthropic/index.cjs +10 -10
  6. package/dist/browser/anthropic/index.js +3 -3
  7. package/dist/browser/anthropic-agent-sdk/index.cjs +32 -32
  8. package/dist/browser/anthropic-agent-sdk/index.js +5 -5
  9. package/dist/{chunk-7EO7MQBA.cjs → browser/chunk-3BGG7GH3.cjs} +6 -6
  10. package/dist/browser/{chunk-KRBADE6R.cjs.map → chunk-3BGG7GH3.cjs.map} +1 -1
  11. package/dist/browser/{chunk-JBOYFQSB.js → chunk-AYNX24P5.js} +3 -3
  12. package/dist/browser/{chunk-JBOYFQSB.js.map → chunk-AYNX24P5.js.map} +1 -1
  13. package/dist/{chunk-ME5JALGT.js → browser/chunk-DOLWR7LD.js} +4 -4
  14. package/dist/browser/{chunk-7MSXWGAH.js.map → chunk-DOLWR7LD.js.map} +1 -1
  15. package/dist/browser/{chunk-O4HG3OSK.cjs → chunk-DXWHT3HK.cjs} +13 -4
  16. package/dist/browser/chunk-DXWHT3HK.cjs.map +1 -0
  17. package/dist/browser/{chunk-B7DEUDP6.cjs → chunk-EFUQVASI.cjs} +15 -15
  18. package/dist/browser/{chunk-B7DEUDP6.cjs.map → chunk-EFUQVASI.cjs.map} +1 -1
  19. package/dist/browser/{chunk-5J2QBK75.js → chunk-F3B4UR64.js} +13 -4
  20. package/dist/browser/chunk-F3B4UR64.js.map +1 -0
  21. package/dist/{chunk-HDAFUKQ3.js → browser/chunk-F7BGQ26H.js} +4 -4
  22. package/dist/browser/{chunk-TYDG747E.js.map → chunk-F7BGQ26H.js.map} +1 -1
  23. package/dist/browser/{chunk-YAOBFRKP.js → chunk-GWJYOQNC.js} +4 -4
  24. package/dist/browser/{chunk-YAOBFRKP.js.map → chunk-GWJYOQNC.js.map} +1 -1
  25. package/dist/browser/{chunk-TZRSDDFP.cjs → chunk-HGN7J3EU.cjs} +12 -12
  26. package/dist/browser/{chunk-TZRSDDFP.cjs.map → chunk-HGN7J3EU.cjs.map} +1 -1
  27. package/dist/browser/{chunk-Z22Q2ONC.cjs → chunk-M2GZJ3RS.cjs} +14 -14
  28. package/dist/browser/{chunk-Z22Q2ONC.cjs.map → chunk-M2GZJ3RS.cjs.map} +1 -1
  29. package/dist/browser/{chunk-NQG2IAQS.js → chunk-YHV5GL32.js} +3 -3
  30. package/dist/browser/{chunk-NQG2IAQS.js.map → chunk-YHV5GL32.js.map} +1 -1
  31. package/dist/{chunk-VXDBDPDR.cjs → browser/chunk-YNUZGKUA.cjs} +7 -7
  32. package/dist/browser/{chunk-MCJYZH6W.cjs.map → chunk-YNUZGKUA.cjs.map} +1 -1
  33. package/dist/browser/index.cjs +80 -80
  34. package/dist/browser/index.cjs.map +1 -1
  35. package/dist/browser/index.js +7 -7
  36. package/dist/browser/index.js.map +1 -1
  37. package/dist/browser/integrations/pino.cjs +4 -4
  38. package/dist/browser/integrations/pino.js +3 -3
  39. package/dist/browser/langchain/index.cjs +17 -17
  40. package/dist/browser/langchain/index.js +2 -2
  41. package/dist/browser/langgraph/index.cjs +21 -21
  42. package/dist/browser/langgraph/index.js +4 -4
  43. package/dist/browser/openai/index.cjs +5 -5
  44. package/dist/browser/openai/index.js +1 -1
  45. package/dist/browser/openai-agents/index.cjs +32 -32
  46. package/dist/browser/openai-agents/index.js +4 -4
  47. package/dist/browser/vercel-ai/index.cjs +14 -14
  48. package/dist/browser/vercel-ai/index.js +3 -3
  49. package/dist/{chunk-KZBCOZIQ.cjs → chunk-5D6SBSEI.cjs} +15 -15
  50. package/dist/{chunk-KZBCOZIQ.cjs.map → chunk-5D6SBSEI.cjs.map} +1 -1
  51. package/dist/{chunk-ZKUGOWER.js → chunk-AEFUXEKV.js} +3 -3
  52. package/dist/{chunk-ZKUGOWER.js.map → chunk-AEFUXEKV.js.map} +1 -1
  53. package/dist/{chunk-FJUNILZT.cjs → chunk-HNCWTENX.cjs} +13 -4
  54. package/dist/chunk-HNCWTENX.cjs.map +1 -0
  55. package/dist/{chunk-7YCENA54.cjs → chunk-LQI63FHF.cjs} +14 -14
  56. package/dist/{chunk-7YCENA54.cjs.map → chunk-LQI63FHF.cjs.map} +1 -1
  57. package/dist/{chunk-TQWI4UYO.js → chunk-LTKGLXAE.js} +13 -4
  58. package/dist/chunk-LTKGLXAE.js.map +1 -0
  59. package/dist/{chunk-RTL23YOQ.js → chunk-POCQNSVD.js} +3 -3
  60. package/dist/{chunk-RTL23YOQ.js.map → chunk-POCQNSVD.js.map} +1 -1
  61. package/dist/{chunk-PVHDEPRE.cjs → chunk-QXRJUPDP.cjs} +12 -12
  62. package/dist/{chunk-PVHDEPRE.cjs.map → chunk-QXRJUPDP.cjs.map} +1 -1
  63. package/dist/{browser/chunk-TYDG747E.js → chunk-SBGY5NS4.js} +4 -4
  64. package/dist/{chunk-HDAFUKQ3.js.map → chunk-SBGY5NS4.js.map} +1 -1
  65. package/dist/{chunk-CKFOGDUF.js → chunk-STK4KJQ6.js} +4 -4
  66. package/dist/{chunk-CKFOGDUF.js.map → chunk-STK4KJQ6.js.map} +1 -1
  67. package/dist/{browser/chunk-KRBADE6R.cjs → chunk-T2KW3P23.cjs} +6 -6
  68. package/dist/{chunk-7EO7MQBA.cjs.map → chunk-T2KW3P23.cjs.map} +1 -1
  69. package/dist/{browser/chunk-7MSXWGAH.js → chunk-V5J6J4ZR.js} +4 -4
  70. package/dist/{chunk-ME5JALGT.js.map → chunk-V5J6J4ZR.js.map} +1 -1
  71. package/dist/{browser/chunk-MCJYZH6W.cjs → chunk-Y7SVGUKY.cjs} +7 -7
  72. package/dist/{chunk-VXDBDPDR.cjs.map → chunk-Y7SVGUKY.cjs.map} +1 -1
  73. package/dist/index.cjs +87 -87
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.js +8 -8
  76. package/dist/index.js.map +1 -1
  77. package/dist/integrations/pino.cjs +4 -4
  78. package/dist/integrations/pino.js +3 -3
  79. package/dist/langchain/index.cjs +17 -17
  80. package/dist/langchain/index.js +2 -2
  81. package/dist/langgraph/index.cjs +21 -21
  82. package/dist/langgraph/index.js +4 -4
  83. package/dist/openai/index.cjs +5 -5
  84. package/dist/openai/index.js +1 -1
  85. package/dist/openai-agents/index.cjs +32 -32
  86. package/dist/openai-agents/index.js +4 -4
  87. package/dist/vercel-ai/index.cjs +14 -14
  88. package/dist/vercel-ai/index.js +3 -3
  89. package/package.json +1 -1
  90. package/dist/browser/chunk-5J2QBK75.js.map +0 -1
  91. package/dist/browser/chunk-O4HG3OSK.cjs.map +0 -1
  92. package/dist/chunk-FJUNILZT.cjs.map +0 -1
  93. package/dist/chunk-TQWI4UYO.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunk7YCENA54_cjs = require('./chunk-7YCENA54.cjs');
4
- var chunkPVHDEPRE_cjs = require('./chunk-PVHDEPRE.cjs');
5
- var chunk7EO7MQBA_cjs = require('./chunk-7EO7MQBA.cjs');
3
+ var chunkLQI63FHF_cjs = require('./chunk-LQI63FHF.cjs');
4
+ var chunkQXRJUPDP_cjs = require('./chunk-QXRJUPDP.cjs');
5
+ var chunkT2KW3P23_cjs = require('./chunk-T2KW3P23.cjs');
6
6
  require('./chunk-KBWPNIH4.cjs');
7
- var chunkFJUNILZT_cjs = require('./chunk-FJUNILZT.cjs');
7
+ var chunkHNCWTENX_cjs = require('./chunk-HNCWTENX.cjs');
8
8
  var module$1 = require('module');
9
9
  var instrumentationPg = require('@opentelemetry/instrumentation-pg');
10
10
  var instrumentationMysql2 = require('@opentelemetry/instrumentation-mysql2');
@@ -12,10 +12,10 @@ var instrumentation = require('@opentelemetry/instrumentation');
12
12
  var api = require('@opentelemetry/api');
13
13
 
14
14
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
15
- chunkFJUNILZT_cjs.init_env();
15
+ chunkHNCWTENX_cjs.init_env();
16
16
  var FULL_INSTALL_TARGETS = {
17
17
  "@anthropic-ai/sdk": {
18
- install: (mod) => chunk7YCENA54_cjs.instrumentAnthropic({ anthropicModule: mod })
18
+ install: (mod) => chunkLQI63FHF_cjs.instrumentAnthropic({ anthropicModule: mod })
19
19
  }
20
20
  };
21
21
  var DETECT_ONLY_TARGETS = {
@@ -89,7 +89,7 @@ function uninstallLazyHook() {
89
89
  originalRequire = null;
90
90
  }
91
91
  async function installAdapters() {
92
- if (chunkFJUNILZT_cjs.isAutoDetectDisabled()) return;
92
+ if (chunkHNCWTENX_cjs.isAutoDetectDisabled()) return;
93
93
  const nodeRequire = getNodeRequire();
94
94
  if (!nodeRequire) return;
95
95
  const installPromises = [];
@@ -127,11 +127,11 @@ function _resetForTesting3() {
127
127
  }
128
128
 
129
129
  // src/index.ts
130
- chunkFJUNILZT_cjs.init_env();
130
+ chunkHNCWTENX_cjs.init_env();
131
131
 
132
132
  // src/_internal/db-capture.ts
133
- chunkFJUNILZT_cjs.init_env();
134
- chunkFJUNILZT_cjs.init_otel_provider();
133
+ chunkHNCWTENX_cjs.init_env();
134
+ chunkHNCWTENX_cjs.init_otel_provider();
135
135
  var SEMCONV_DB_SYSTEM_NAME = "db.system.name";
136
136
  var SEMCONV_DB_QUERY_TEXT = "db.query.text";
137
137
  var DB_SYSTEM_NAME_SQLITE = "sqlite";
@@ -245,7 +245,7 @@ function registerDbInstrumentation() {
245
245
  disableDbCapture();
246
246
  try {
247
247
  const instrumentations = buildDbInstrumentations();
248
- const off = chunkFJUNILZT_cjs.getEngine().registerInstrumentations(instrumentations);
248
+ const off = chunkHNCWTENX_cjs.getEngine().registerInstrumentations(instrumentations);
249
249
  if (off === null) return false;
250
250
  unregister = off;
251
251
  registeredInstrumentations = instrumentations;
@@ -267,17 +267,17 @@ function disableDbCapture() {
267
267
  registeredInstrumentations = null;
268
268
  }
269
269
  function maybeEnableDbCaptureFromEnv() {
270
- if (chunkFJUNILZT_cjs.isDbCaptureEnabled()) {
270
+ if (chunkHNCWTENX_cjs.isDbCaptureEnabled()) {
271
271
  registerDbInstrumentation();
272
272
  }
273
273
  }
274
274
 
275
275
  // src/index.ts
276
- chunkFJUNILZT_cjs.init_otel_provider();
277
- chunkFJUNILZT_cjs.init_redaction();
276
+ chunkHNCWTENX_cjs.init_otel_provider();
277
+ chunkHNCWTENX_cjs.init_redaction();
278
278
 
279
279
  // src/_internal/transport.ts
280
- var SDK_VERSION = "0.4.0" ;
280
+ var SDK_VERSION = "0.4.1-rc.1" ;
281
281
  var RETRY_AFTER_CAP_SECONDS = 30;
282
282
  function parseRetryAfter(value) {
283
283
  if (!value) return null;
@@ -477,7 +477,7 @@ var BatchTransport = class {
477
477
  bodySnippet = text.slice(0, 200);
478
478
  } catch {
479
479
  }
480
- chunk7EO7MQBA_cjs.report(new Error(`morse: batch POST returned ${resp.status} ${bodySnippet}`), {
480
+ chunkT2KW3P23_cjs.report(new Error(`morse: batch POST returned ${resp.status} ${bodySnippet}`), {
481
481
  fingerprint: "morse.transport.post.non_2xx",
482
482
  extra: {
483
483
  endpoint_host: hostnameOf(url),
@@ -486,7 +486,7 @@ var BatchTransport = class {
486
486
  });
487
487
  }
488
488
  } catch (err) {
489
- chunk7EO7MQBA_cjs.report(err, {
489
+ chunkT2KW3P23_cjs.report(err, {
490
490
  fingerprint: "morse.transport.post.network",
491
491
  extra: {
492
492
  endpoint_host: hostnameOf(url),
@@ -518,9 +518,9 @@ function deriveLogsEndpoint(tracesEndpoint) {
518
518
  }
519
519
 
520
520
  // src/index.ts
521
- chunkFJUNILZT_cjs.init_tracing();
522
- chunkFJUNILZT_cjs.init_spans();
523
- chunkFJUNILZT_cjs.init_propagation();
521
+ chunkHNCWTENX_cjs.init_tracing();
522
+ chunkHNCWTENX_cjs.init_spans();
523
+ chunkHNCWTENX_cjs.init_propagation();
524
524
  var version = SDK_VERSION;
525
525
  var singleton = null;
526
526
  var transportFactory = (opts) => new BatchTransport(opts);
@@ -540,9 +540,9 @@ function logDestinationOnce(endpoint) {
540
540
  }
541
541
  function resolveEndpoint(explicit) {
542
542
  if (explicit && explicit.length > 0) return explicit;
543
- const fromEnv = chunkFJUNILZT_cjs.getEndpoint();
543
+ const fromEnv = chunkHNCWTENX_cjs.getEndpoint();
544
544
  if (fromEnv) return fromEnv;
545
- return chunkFJUNILZT_cjs.DEFAULT_ENDPOINT;
545
+ return chunkHNCWTENX_cjs.DEFAULT_ENDPOINT;
546
546
  }
547
547
  var OTLP_TRACES_PATH = "/api/v1/otlp/v1/traces";
548
548
  function deriveOtlpEndpoint(tracesEndpoint) {
@@ -557,10 +557,10 @@ function deriveOtlpEndpoint(tracesEndpoint) {
557
557
  }
558
558
  }
559
559
  function buildSingleton(opts, redaction) {
560
- if (chunkFJUNILZT_cjs.isDisabled()) {
560
+ if (chunkHNCWTENX_cjs.isDisabled()) {
561
561
  return null;
562
562
  }
563
- const apiKey = opts.apiKey ?? chunkFJUNILZT_cjs.getApiKey();
563
+ const apiKey = opts.apiKey ?? chunkHNCWTENX_cjs.getApiKey();
564
564
  if (!apiKey) {
565
565
  if (!noApiKeyWarningEmitted) {
566
566
  logger2(
@@ -572,23 +572,23 @@ function buildSingleton(opts, redaction) {
572
572
  return null;
573
573
  }
574
574
  const endpoint = resolveEndpoint(opts.endpoint);
575
- const flushIntervalSeconds = opts.flushIntervalSeconds ?? chunkFJUNILZT_cjs.getFlushIntervalSeconds();
575
+ const flushIntervalSeconds = opts.flushIntervalSeconds ?? chunkHNCWTENX_cjs.getFlushIntervalSeconds();
576
576
  const transport = transportFactory({ apiKey, endpoint, flushIntervalSeconds });
577
- chunkFJUNILZT_cjs.setTransport(transport);
578
- chunkFJUNILZT_cjs.setRedactionConfig(redaction);
579
- const explicitSource = chunkFJUNILZT_cjs.isValidInternalSource(opts.source) ? opts.source : void 0;
580
- const resolvedSource = explicitSource ?? chunkFJUNILZT_cjs.getInternalSource() ?? null;
581
- chunkFJUNILZT_cjs.setSource(resolvedSource);
577
+ chunkHNCWTENX_cjs.setTransport(transport);
578
+ chunkHNCWTENX_cjs.setRedactionConfig(redaction);
579
+ const explicitSource = chunkHNCWTENX_cjs.isValidInternalSource(opts.source) ? opts.source : void 0;
580
+ const resolvedSource = explicitSource ?? chunkHNCWTENX_cjs.getInternalSource() ?? null;
581
+ chunkHNCWTENX_cjs.setSource(resolvedSource);
582
582
  logDestinationOnce(endpoint);
583
583
  try {
584
- chunkFJUNILZT_cjs.getEngine().configure({
584
+ chunkHNCWTENX_cjs.getEngine().configure({
585
585
  endpoint: deriveOtlpEndpoint(endpoint),
586
586
  apiKey,
587
- sampleRate: chunkFJUNILZT_cjs.getSampleRate(),
587
+ sampleRate: chunkHNCWTENX_cjs.getSampleRate(),
588
588
  scheduleDelayMillis: flushIntervalSeconds * 1e3,
589
- maxQueueSize: chunkFJUNILZT_cjs.getMaxQueueSize(),
590
- maxExportBatchSize: chunkFJUNILZT_cjs.getMaxBatchSize(),
591
- maxFieldBytes: chunkFJUNILZT_cjs.getMaxFieldBytes(),
589
+ maxQueueSize: chunkHNCWTENX_cjs.getMaxQueueSize(),
590
+ maxExportBatchSize: chunkHNCWTENX_cjs.getMaxBatchSize(),
591
+ maxFieldBytes: chunkHNCWTENX_cjs.getMaxFieldBytes(),
592
592
  // 10s (not the exporter's un-overridden 30s ceiling): a genuine
593
593
  // network blip still gets several retries with backoff; a fully dead
594
594
  // endpoint fails within a bounded, shutdown-friendly window instead
@@ -597,32 +597,32 @@ function buildSingleton(opts, redaction) {
597
597
  redactionConfig: redaction
598
598
  });
599
599
  } catch (err) {
600
- chunk7EO7MQBA_cjs.report(err, { fingerprint: "morse.otel_provider.configure" });
600
+ chunkT2KW3P23_cjs.report(err, { fingerprint: "morse.otel_provider.configure" });
601
601
  }
602
602
  void installAdapters().catch(() => {
603
603
  });
604
604
  try {
605
605
  maybeEnableDbCaptureFromEnv();
606
606
  } catch (err) {
607
- chunk7EO7MQBA_cjs.report(err, { fingerprint: "morse.db_capture.register" });
607
+ chunkT2KW3P23_cjs.report(err, { fingerprint: "morse.db_capture.register" });
608
608
  }
609
609
  return { apiKey, endpoint, transport, redaction };
610
610
  }
611
611
  function ensureInitialized() {
612
- if (chunkFJUNILZT_cjs.isDisabled()) return null;
612
+ if (chunkHNCWTENX_cjs.isDisabled()) return null;
613
613
  if (singleton !== null) return singleton;
614
- singleton = buildSingleton({}, chunkFJUNILZT_cjs.buildRedactionConfig());
614
+ singleton = buildSingleton({}, chunkHNCWTENX_cjs.buildRedactionConfig());
615
615
  return singleton;
616
616
  }
617
- chunkPVHDEPRE_cjs._setEnsureInitialized(() => {
617
+ chunkQXRJUPDP_cjs._setEnsureInitialized(() => {
618
618
  ensureInitialized();
619
619
  });
620
620
  function init(options = {}) {
621
- if (chunkFJUNILZT_cjs.isDisabled()) {
621
+ if (chunkHNCWTENX_cjs.isDisabled()) {
622
622
  logger2("info", "morse: MORSE_DISABLED=1 \u2014 SDK is a no-op");
623
623
  return;
624
624
  }
625
- const redaction = chunkFJUNILZT_cjs.buildRedactionConfig(options.redaction);
625
+ const redaction = chunkHNCWTENX_cjs.buildRedactionConfig(options.redaction);
626
626
  try {
627
627
  if (singleton !== null) {
628
628
  void singleton.transport.shutdown();
@@ -630,10 +630,10 @@ function init(options = {}) {
630
630
  }
631
631
  singleton = buildSingleton(options, redaction);
632
632
  } catch (err) {
633
- chunk7EO7MQBA_cjs.report(err, { fingerprint: "morse.init" });
633
+ chunkT2KW3P23_cjs.report(err, { fingerprint: "morse.init" });
634
634
  }
635
635
  }
636
- var track = chunk7EO7MQBA_cjs.absorbErrorsSync(
636
+ var track = chunkT2KW3P23_cjs.absorbErrorsSync(
637
637
  (options) => {
638
638
  const state = ensureInitialized();
639
639
  if (!state) return;
@@ -641,33 +641,33 @@ var track = chunk7EO7MQBA_cjs.absorbErrorsSync(
641
641
  agent_id: options.agentId,
642
642
  ...options.runData
643
643
  };
644
- const redacted = chunkFJUNILZT_cjs.redactValue(payload, state.redaction);
644
+ const redacted = chunkHNCWTENX_cjs.redactValue(payload, state.redaction);
645
645
  state.transport.track(redacted);
646
646
  },
647
647
  { fingerprint: "morse.track" }
648
648
  );
649
- var batchTrack = chunk7EO7MQBA_cjs.absorbErrorsSync(
649
+ var batchTrack = chunkT2KW3P23_cjs.absorbErrorsSync(
650
650
  (runs) => {
651
651
  const state = ensureInitialized();
652
652
  if (!state) return;
653
653
  for (const run2 of runs) {
654
- const redacted = chunkFJUNILZT_cjs.redactValue(run2, state.redaction);
654
+ const redacted = chunkHNCWTENX_cjs.redactValue(run2, state.redaction);
655
655
  state.transport.track(redacted);
656
656
  }
657
657
  },
658
658
  { fingerprint: "morse.batch_track" }
659
659
  );
660
- var record = chunk7EO7MQBA_cjs.absorbErrorsSync(
660
+ var record = chunkT2KW3P23_cjs.absorbErrorsSync(
661
661
  (rec) => {
662
662
  const state = ensureInitialized();
663
663
  if (!state) return;
664
- const traceId = chunkFJUNILZT_cjs.generateTraceId();
665
- const now = chunkFJUNILZT_cjs.nowIso();
664
+ const traceId = chunkHNCWTENX_cjs.generateTraceId();
665
+ const now = chunkHNCWTENX_cjs.nowIso();
666
666
  const resolvedStatus = rec.errorMessage ? "failed" : rec.status ?? "completed";
667
667
  const span2 = {
668
668
  trace_id: traceId,
669
- span_id: chunkFJUNILZT_cjs.generateSpanId(),
670
- type: chunkFJUNILZT_cjs.SpanType.AGENT,
669
+ span_id: chunkHNCWTENX_cjs.generateSpanId(),
670
+ type: chunkHNCWTENX_cjs.SpanType.AGENT,
671
671
  name: rec.agent,
672
672
  started_at: now,
673
673
  ended_at: now,
@@ -692,57 +692,57 @@ var record = chunk7EO7MQBA_cjs.absorbErrorsSync(
692
692
  success: rec.success,
693
693
  outcome: rec.outcome
694
694
  };
695
- const entry = chunkFJUNILZT_cjs.buildTraceEntry(traceFields, [span2]);
696
- const redacted = chunkFJUNILZT_cjs.redactValue(entry, state.redaction);
697
- chunkFJUNILZT_cjs.sendTrace(redacted);
695
+ const entry = chunkHNCWTENX_cjs.buildTraceEntry(traceFields, [span2]);
696
+ const redacted = chunkHNCWTENX_cjs.redactValue(entry, state.redaction);
697
+ chunkHNCWTENX_cjs.sendTrace(redacted);
698
698
  },
699
699
  { fingerprint: "morse.record" }
700
700
  );
701
701
  function run(nameOrOpts, fn) {
702
702
  const opts = typeof nameOrOpts === "string" ? { agentName: nameOrOpts } : nameOrOpts;
703
703
  ensureInitialized();
704
- return chunkFJUNILZT_cjs.runSync(opts, fn);
704
+ return chunkHNCWTENX_cjs.runSync(opts, fn);
705
705
  }
706
706
  function runTraced(options, fn) {
707
707
  ensureInitialized();
708
- return chunkFJUNILZT_cjs.runAsync(options, fn);
708
+ return chunkHNCWTENX_cjs.runAsync(options, fn);
709
709
  }
710
710
  function setContext2(dims) {
711
- chunkFJUNILZT_cjs.setContext(dims);
711
+ chunkHNCWTENX_cjs.setContext(dims);
712
712
  }
713
713
  function startSpan2(options) {
714
- return chunkFJUNILZT_cjs.startSpan(options);
714
+ return chunkHNCWTENX_cjs.startSpan(options);
715
715
  }
716
716
  function span(options, fn) {
717
- return chunkFJUNILZT_cjs.spanSync(options, fn);
717
+ return chunkHNCWTENX_cjs.spanSync(options, fn);
718
718
  }
719
719
  function spanAsync2(options, fn) {
720
- return chunkFJUNILZT_cjs.spanAsync(options, fn);
720
+ return chunkHNCWTENX_cjs.spanAsync(options, fn);
721
721
  }
722
- var flush = chunk7EO7MQBA_cjs.absorbErrorsAsync(
722
+ var flush = chunkT2KW3P23_cjs.absorbErrorsAsync(
723
723
  async () => {
724
724
  if (singleton !== null) {
725
725
  await singleton.transport.flush();
726
- await chunkFJUNILZT_cjs.getEngine().flush();
726
+ await chunkHNCWTENX_cjs.getEngine().flush();
727
727
  }
728
728
  },
729
729
  { fingerprint: "morse.flush" }
730
730
  );
731
- var quotaState2 = chunk7EO7MQBA_cjs.absorbErrorsSync(
731
+ var quotaState2 = chunkT2KW3P23_cjs.absorbErrorsSync(
732
732
  () => {
733
733
  if (singleton === null) return null;
734
734
  return getQuotaState();
735
735
  },
736
736
  { fingerprint: "morse.quota_state" }
737
737
  );
738
- var shutdown = chunk7EO7MQBA_cjs.absorbErrorsAsync(
738
+ var shutdown = chunkT2KW3P23_cjs.absorbErrorsAsync(
739
739
  async () => {
740
740
  if (singleton !== null) {
741
741
  await singleton.transport.shutdown();
742
- await chunkFJUNILZT_cjs.getEngine().flush();
743
- chunkFJUNILZT_cjs.getEngine().shutdown();
742
+ await chunkHNCWTENX_cjs.getEngine().flush();
743
+ chunkHNCWTENX_cjs.getEngine().shutdown();
744
744
  singleton = null;
745
- chunkFJUNILZT_cjs.setTransport(null);
745
+ chunkHNCWTENX_cjs.setTransport(null);
746
746
  }
747
747
  },
748
748
  { fingerprint: "morse.shutdown" }
@@ -751,14 +751,14 @@ function _resetForTesting4() {
751
751
  if (singleton !== null) {
752
752
  void singleton.transport.shutdown();
753
753
  singleton = null;
754
- chunkFJUNILZT_cjs.setTransport(null);
754
+ chunkHNCWTENX_cjs.setTransport(null);
755
755
  }
756
- chunkFJUNILZT_cjs.getEngine().resetForTesting();
756
+ chunkHNCWTENX_cjs.getEngine().resetForTesting();
757
757
  noApiKeyWarningEmitted = false;
758
758
  lastLoggedEndpoint = null;
759
- chunkFJUNILZT_cjs.setSource(null);
760
- chunkFJUNILZT_cjs._resetForTesting();
761
- chunk7EO7MQBA_cjs._resetForTesting();
759
+ chunkHNCWTENX_cjs.setSource(null);
760
+ chunkHNCWTENX_cjs._resetForTesting();
761
+ chunkT2KW3P23_cjs._resetForTesting();
762
762
  _resetForTesting3();
763
763
  _resetQuotaStateForTesting();
764
764
  transportFactory = (opts) => new BatchTransport(opts);
@@ -767,59 +767,59 @@ function _setTransportFactoryForTesting(factory) {
767
767
  transportFactory = factory;
768
768
  }
769
769
  function _getLastTraceForTesting() {
770
- return chunkFJUNILZT_cjs.getLastTrace();
770
+ return chunkHNCWTENX_cjs.getLastTrace();
771
771
  }
772
772
  function _getActiveTraceStateForTesting() {
773
- return chunkFJUNILZT_cjs.getActiveTraceState();
773
+ return chunkHNCWTENX_cjs.getActiveTraceState();
774
774
  }
775
775
 
776
776
  Object.defineProperty(exports, "MAX_SEGMENT_CONTENT_BYTES", {
777
777
  enumerable: true,
778
- get: function () { return chunk7YCENA54_cjs.MAX_SEGMENT_CONTENT_BYTES; }
778
+ get: function () { return chunkLQI63FHF_cjs.MAX_SEGMENT_CONTENT_BYTES; }
779
779
  });
780
780
  Object.defineProperty(exports, "extractAnthropicSegments", {
781
781
  enumerable: true,
782
- get: function () { return chunk7YCENA54_cjs.extractAnthropicSegments; }
782
+ get: function () { return chunkLQI63FHF_cjs.extractAnthropicSegments; }
783
783
  });
784
784
  Object.defineProperty(exports, "instrumentAnthropic", {
785
785
  enumerable: true,
786
- get: function () { return chunk7YCENA54_cjs.instrumentAnthropic; }
786
+ get: function () { return chunkLQI63FHF_cjs.instrumentAnthropic; }
787
787
  });
788
788
  Object.defineProperty(exports, "isAnthropicWrapped", {
789
789
  enumerable: true,
790
- get: function () { return chunk7YCENA54_cjs.isAnthropicWrapped; }
790
+ get: function () { return chunkLQI63FHF_cjs.isAnthropicWrapped; }
791
791
  });
792
792
  Object.defineProperty(exports, "uninstallAnthropic", {
793
793
  enumerable: true,
794
- get: function () { return chunk7YCENA54_cjs.uninstallAnthropic; }
794
+ get: function () { return chunkLQI63FHF_cjs.uninstallAnthropic; }
795
795
  });
796
796
  Object.defineProperty(exports, "wrapAnthropic", {
797
797
  enumerable: true,
798
- get: function () { return chunk7YCENA54_cjs.wrapAnthropic; }
798
+ get: function () { return chunkLQI63FHF_cjs.wrapAnthropic; }
799
799
  });
800
800
  Object.defineProperty(exports, "log", {
801
801
  enumerable: true,
802
- get: function () { return chunkPVHDEPRE_cjs.log; }
802
+ get: function () { return chunkQXRJUPDP_cjs.log; }
803
803
  });
804
804
  Object.defineProperty(exports, "W3C_TRACEPARENT_HEADER", {
805
805
  enumerable: true,
806
- get: function () { return chunkFJUNILZT_cjs.W3C_TRACEPARENT_HEADER; }
806
+ get: function () { return chunkHNCWTENX_cjs.W3C_TRACEPARENT_HEADER; }
807
807
  });
808
808
  Object.defineProperty(exports, "extractTraceparent", {
809
809
  enumerable: true,
810
- get: function () { return chunkFJUNILZT_cjs.extractTraceparent; }
810
+ get: function () { return chunkHNCWTENX_cjs.extractTraceparent; }
811
811
  });
812
812
  Object.defineProperty(exports, "formatTraceparent", {
813
813
  enumerable: true,
814
- get: function () { return chunkFJUNILZT_cjs.formatTraceparent; }
814
+ get: function () { return chunkHNCWTENX_cjs.formatTraceparent; }
815
815
  });
816
816
  Object.defineProperty(exports, "injectIntoRequestInit", {
817
817
  enumerable: true,
818
- get: function () { return chunkFJUNILZT_cjs.injectIntoRequestInit; }
818
+ get: function () { return chunkHNCWTENX_cjs.injectIntoRequestInit; }
819
819
  });
820
820
  Object.defineProperty(exports, "injectTraceparent", {
821
821
  enumerable: true,
822
- get: function () { return chunkFJUNILZT_cjs.injectTraceparent; }
822
+ get: function () { return chunkHNCWTENX_cjs.injectTraceparent; }
823
823
  });
824
824
  exports._getActiveTraceStateForTesting = _getActiveTraceStateForTesting;
825
825
  exports._getLastTraceForTesting = _getLastTraceForTesting;