@morsehq-dev/sdk 0.5.1-rc.1 → 0.6.0-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 (139) hide show
  1. package/dist/anthropic/index.cjs +11 -11
  2. package/dist/anthropic/index.d.cts +1 -1
  3. package/dist/anthropic/index.d.ts +1 -1
  4. package/dist/anthropic/index.js +4 -4
  5. package/dist/anthropic-agent-sdk/index.cjs +44 -40
  6. package/dist/anthropic-agent-sdk/index.cjs.map +1 -1
  7. package/dist/anthropic-agent-sdk/index.d.cts +1 -1
  8. package/dist/anthropic-agent-sdk/index.d.ts +1 -1
  9. package/dist/anthropic-agent-sdk/index.js +10 -6
  10. package/dist/anthropic-agent-sdk/index.js.map +1 -1
  11. package/dist/browser/anthropic/index.cjs +11 -11
  12. package/dist/browser/anthropic/index.js +4 -4
  13. package/dist/browser/anthropic-agent-sdk/index.cjs +44 -40
  14. package/dist/browser/anthropic-agent-sdk/index.cjs.map +1 -1
  15. package/dist/browser/anthropic-agent-sdk/index.js +10 -6
  16. package/dist/browser/anthropic-agent-sdk/index.js.map +1 -1
  17. package/dist/browser/{chunk-ZOOYJTDT.cjs → chunk-33WDUUKZ.cjs} +18 -18
  18. package/dist/browser/{chunk-ZOOYJTDT.cjs.map → chunk-33WDUUKZ.cjs.map} +1 -1
  19. package/dist/browser/{chunk-E6WORBIU.cjs → chunk-3I7IGP3P.cjs} +5 -5
  20. package/dist/browser/chunk-3I7IGP3P.cjs.map +1 -0
  21. package/dist/{chunk-FHQGPQFR.js → browser/chunk-3OYHDDOJ.js} +27 -5
  22. package/dist/browser/chunk-3OYHDDOJ.js.map +1 -0
  23. package/dist/browser/{chunk-HJTUPXNE.cjs → chunk-4IUHXUCJ.cjs} +21 -4
  24. package/dist/browser/chunk-4IUHXUCJ.cjs.map +1 -0
  25. package/dist/browser/{chunk-AX6NEG6X.js → chunk-5TYTCLKA.js} +4 -4
  26. package/dist/browser/{chunk-AX6NEG6X.js.map → chunk-5TYTCLKA.js.map} +1 -1
  27. package/dist/browser/{chunk-5IMBYZUB.js → chunk-6JHMFFPE.js} +3 -3
  28. package/dist/browser/chunk-6JHMFFPE.js.map +1 -0
  29. package/dist/{chunk-2UFTRWUS.cjs → browser/chunk-FKYI3N5N.cjs} +7 -7
  30. package/dist/browser/{chunk-FYIQARMI.cjs.map → chunk-FKYI3N5N.cjs.map} +1 -1
  31. package/dist/browser/{chunk-TIMAH323.js → chunk-FPTUHYDJ.js} +3 -3
  32. package/dist/browser/{chunk-TIMAH323.js.map → chunk-FPTUHYDJ.js.map} +1 -1
  33. package/dist/browser/{chunk-YXCWAU36.cjs → chunk-IDKQZ4X5.cjs} +38 -15
  34. package/dist/browser/chunk-IDKQZ4X5.cjs.map +1 -0
  35. package/dist/browser/{chunk-HNOHWDK3.cjs → chunk-LIP3XCTK.cjs} +12 -12
  36. package/dist/browser/{chunk-HNOHWDK3.cjs.map → chunk-LIP3XCTK.cjs.map} +1 -1
  37. package/dist/browser/{chunk-RDNSY73W.js → chunk-OUQAH27A.js} +3 -3
  38. package/dist/browser/{chunk-RDNSY73W.js.map → chunk-OUQAH27A.js.map} +1 -1
  39. package/dist/browser/{chunk-Z26QGUMP.cjs → chunk-PSNZZBQJ.cjs} +6 -6
  40. package/dist/browser/{chunk-Z26QGUMP.cjs.map → chunk-PSNZZBQJ.cjs.map} +1 -1
  41. package/dist/browser/{chunk-7G266PKE.js → chunk-PXHTLCEU.js} +21 -5
  42. package/dist/browser/chunk-PXHTLCEU.js.map +1 -0
  43. package/dist/browser/{chunk-VSHCKROM.js → chunk-TRVACYUN.js} +5 -5
  44. package/dist/browser/{chunk-VSHCKROM.js.map → chunk-TRVACYUN.js.map} +1 -1
  45. package/dist/browser/index.cjs +99 -99
  46. package/dist/browser/index.js +8 -8
  47. package/dist/browser/integrations/pino.cjs +4 -4
  48. package/dist/browser/integrations/pino.js +3 -3
  49. package/dist/browser/langchain/index.cjs +28 -26
  50. package/dist/browser/langchain/index.cjs.map +1 -1
  51. package/dist/browser/langchain/index.js +13 -11
  52. package/dist/browser/langchain/index.js.map +1 -1
  53. package/dist/browser/langgraph/index.cjs +32 -30
  54. package/dist/browser/langgraph/index.cjs.map +1 -1
  55. package/dist/browser/langgraph/index.js +10 -8
  56. package/dist/browser/langgraph/index.js.map +1 -1
  57. package/dist/browser/openai/index.cjs +11 -11
  58. package/dist/browser/openai/index.js +2 -2
  59. package/dist/browser/openai-agents/index.cjs +63 -35
  60. package/dist/browser/openai-agents/index.cjs.map +1 -1
  61. package/dist/browser/openai-agents/index.js +33 -5
  62. package/dist/browser/openai-agents/index.js.map +1 -1
  63. package/dist/browser/vercel-ai/index.cjs +14 -14
  64. package/dist/browser/vercel-ai/index.js +3 -3
  65. package/dist/{chunk-ZTBAMSCC.cjs → chunk-7DALGJL2.cjs} +72 -20
  66. package/dist/chunk-7DALGJL2.cjs.map +1 -0
  67. package/dist/{chunk-KALB7HJ5.cjs → chunk-B7TGG62X.cjs} +12 -12
  68. package/dist/{chunk-KALB7HJ5.cjs.map → chunk-B7TGG62X.cjs.map} +1 -1
  69. package/dist/{chunk-GATTHW3X.cjs → chunk-COZFARLL.cjs} +5 -5
  70. package/dist/chunk-COZFARLL.cjs.map +1 -0
  71. package/dist/{chunk-XBI4AMCW.cjs → chunk-DXTNU2KT.cjs} +38 -15
  72. package/dist/chunk-DXTNU2KT.cjs.map +1 -0
  73. package/dist/{chunk-5MJS5ECA.js → chunk-ERH3TNXZ.js} +3 -3
  74. package/dist/{chunk-5MJS5ECA.js.map → chunk-ERH3TNXZ.js.map} +1 -1
  75. package/dist/{chunk-QLJAATBR.cjs → chunk-ESJJXXB6.cjs} +6 -6
  76. package/dist/{chunk-QLJAATBR.cjs.map → chunk-ESJJXXB6.cjs.map} +1 -1
  77. package/dist/{chunk-HCN6Z56N.cjs → chunk-ETRNCI5Z.cjs} +18 -18
  78. package/dist/{chunk-HCN6Z56N.cjs.map → chunk-ETRNCI5Z.cjs.map} +1 -1
  79. package/dist/{browser/chunk-PIZVCAW7.js → chunk-GULJAURY.js} +27 -5
  80. package/dist/chunk-GULJAURY.js.map +1 -0
  81. package/dist/{chunk-YGKEP2GY.js → chunk-HJV35HWL.js} +72 -21
  82. package/dist/chunk-HJV35HWL.js.map +1 -0
  83. package/dist/{chunk-ZMRXUZ5L.js → chunk-L7AD4KUD.js} +3 -3
  84. package/dist/chunk-L7AD4KUD.js.map +1 -0
  85. package/dist/{chunk-GQVNZPRF.js → chunk-QBDTQTMN.js} +3 -3
  86. package/dist/{chunk-GQVNZPRF.js.map → chunk-QBDTQTMN.js.map} +1 -1
  87. package/dist/{browser/chunk-FYIQARMI.cjs → chunk-WG4H5JC6.cjs} +7 -7
  88. package/dist/{chunk-2UFTRWUS.cjs.map → chunk-WG4H5JC6.cjs.map} +1 -1
  89. package/dist/{chunk-62FWHZXN.js → chunk-XS4P7XPV.js} +5 -5
  90. package/dist/{chunk-62FWHZXN.js.map → chunk-XS4P7XPV.js.map} +1 -1
  91. package/dist/{chunk-4WUG3RMJ.js → chunk-YVLEDBN7.js} +4 -4
  92. package/dist/{chunk-4WUG3RMJ.js.map → chunk-YVLEDBN7.js.map} +1 -1
  93. package/dist/index.cjs +106 -106
  94. package/dist/index.cjs.map +1 -1
  95. package/dist/index.d.cts +2 -2
  96. package/dist/index.d.ts +2 -2
  97. package/dist/index.js +9 -9
  98. package/dist/index.js.map +1 -1
  99. package/dist/integrations/pino.cjs +4 -4
  100. package/dist/integrations/pino.js +3 -3
  101. package/dist/langchain/index.cjs +28 -26
  102. package/dist/langchain/index.cjs.map +1 -1
  103. package/dist/langchain/index.d.cts +3 -3
  104. package/dist/langchain/index.d.ts +3 -3
  105. package/dist/langchain/index.js +13 -11
  106. package/dist/langchain/index.js.map +1 -1
  107. package/dist/langgraph/index.cjs +32 -30
  108. package/dist/langgraph/index.cjs.map +1 -1
  109. package/dist/langgraph/index.d.cts +3 -3
  110. package/dist/langgraph/index.d.ts +3 -3
  111. package/dist/langgraph/index.js +10 -8
  112. package/dist/langgraph/index.js.map +1 -1
  113. package/dist/openai/index.cjs +11 -11
  114. package/dist/openai/index.js +2 -2
  115. package/dist/openai-agents/index.cjs +63 -35
  116. package/dist/openai-agents/index.cjs.map +1 -1
  117. package/dist/openai-agents/index.d.cts +13 -4
  118. package/dist/openai-agents/index.d.ts +13 -4
  119. package/dist/openai-agents/index.js +33 -5
  120. package/dist/openai-agents/index.js.map +1 -1
  121. package/dist/{spans-DZtMuBvc.d.cts → spans-CBMWNg2C.d.cts} +1 -0
  122. package/dist/{spans-DZtMuBvc.d.ts → spans-CBMWNg2C.d.ts} +1 -0
  123. package/dist/{tracing-J8ZgxVzU.d.ts → tracing-BMWTyexr.d.ts} +1 -1
  124. package/dist/{tracing-CNlre8TK.d.cts → tracing-Bh-cbvr6.d.cts} +1 -1
  125. package/dist/vercel-ai/index.cjs +14 -14
  126. package/dist/vercel-ai/index.js +3 -3
  127. package/package.json +1 -1
  128. package/dist/browser/chunk-5IMBYZUB.js.map +0 -1
  129. package/dist/browser/chunk-7G266PKE.js.map +0 -1
  130. package/dist/browser/chunk-E6WORBIU.cjs.map +0 -1
  131. package/dist/browser/chunk-HJTUPXNE.cjs.map +0 -1
  132. package/dist/browser/chunk-PIZVCAW7.js.map +0 -1
  133. package/dist/browser/chunk-YXCWAU36.cjs.map +0 -1
  134. package/dist/chunk-FHQGPQFR.js.map +0 -1
  135. package/dist/chunk-GATTHW3X.cjs.map +0 -1
  136. package/dist/chunk-XBI4AMCW.cjs.map +0 -1
  137. package/dist/chunk-YGKEP2GY.js.map +0 -1
  138. package/dist/chunk-ZMRXUZ5L.js.map +0 -1
  139. package/dist/chunk-ZTBAMSCC.cjs.map +0 -1
@@ -1,31 +1,31 @@
1
1
  'use strict';
2
2
 
3
- var chunkZOOYJTDT_cjs = require('./chunk-ZOOYJTDT.cjs');
4
- var chunkHNOHWDK3_cjs = require('./chunk-HNOHWDK3.cjs');
5
- require('./chunk-E6WORBIU.cjs');
6
- var chunkZ26QGUMP_cjs = require('./chunk-Z26QGUMP.cjs');
3
+ var chunk33WDUUKZ_cjs = require('./chunk-33WDUUKZ.cjs');
4
+ var chunkLIP3XCTK_cjs = require('./chunk-LIP3XCTK.cjs');
5
+ require('./chunk-3I7IGP3P.cjs');
6
+ var chunkPSNZZBQJ_cjs = require('./chunk-PSNZZBQJ.cjs');
7
7
  require('./chunk-SWQOPFE4.cjs');
8
8
  require('./chunk-RBNCTHK3.cjs');
9
- var chunkHJTUPXNE_cjs = require('./chunk-HJTUPXNE.cjs');
9
+ var chunk4IUHXUCJ_cjs = require('./chunk-4IUHXUCJ.cjs');
10
10
 
11
11
  // src/_internal/auto-detect.browser.ts
12
12
  async function installAdapters() {
13
13
  }
14
14
 
15
15
  // src/index.ts
16
- chunkHJTUPXNE_cjs.init_env();
16
+ chunk4IUHXUCJ_cjs.init_env();
17
17
 
18
18
  // src/_internal/db-capture.browser.ts
19
19
  function maybeEnableDbCaptureFromEnv() {
20
20
  }
21
21
 
22
22
  // src/index.ts
23
- chunkHJTUPXNE_cjs.init_otel_provider_browser();
24
- chunkHJTUPXNE_cjs.init_redaction();
23
+ chunk4IUHXUCJ_cjs.init_otel_provider_browser();
24
+ chunk4IUHXUCJ_cjs.init_redaction();
25
25
 
26
26
  // src/_internal/transport.ts
27
- chunkHJTUPXNE_cjs.init_diagnostics();
28
- var SDK_VERSION = "0.5.1-rc.1" ;
27
+ chunk4IUHXUCJ_cjs.init_diagnostics();
28
+ var SDK_VERSION = "0.6.0-rc.1" ;
29
29
  var RETRY_AFTER_CAP_SECONDS = 30;
30
30
  var MAX_SEND_ATTEMPTS = 3;
31
31
  var BACKOFF_BASE_MS = 500;
@@ -36,9 +36,9 @@ function backoffDelayMs(attempt) {
36
36
  return base * (0.5 + Math.random());
37
37
  }
38
38
  function dropReasonFor(attempt, closed, deadline) {
39
- if (closed) return chunkHJTUPXNE_cjs.REASON_SHUTDOWN_DROP;
40
- if (attempt === 1 && Date.now() >= deadline) return chunkHJTUPXNE_cjs.REASON_SEND_FAILED;
41
- return chunkHJTUPXNE_cjs.REASON_RETRY_EXHAUSTED;
39
+ if (closed) return chunk4IUHXUCJ_cjs.REASON_SHUTDOWN_DROP;
40
+ if (attempt === 1 && Date.now() >= deadline) return chunk4IUHXUCJ_cjs.REASON_SEND_FAILED;
41
+ return chunk4IUHXUCJ_cjs.REASON_RETRY_EXHAUSTED;
42
42
  }
43
43
  function withDeadline(promise, deadline) {
44
44
  const remaining = Math.max(0, deadline - Date.now());
@@ -159,11 +159,11 @@ var BatchTransport = class {
159
159
  /** Enqueue an event. Non-blocking. Returns false if the queue is full. */
160
160
  track(event) {
161
161
  if (this.closed) {
162
- chunkHJTUPXNE_cjs.recordDrop(chunkHJTUPXNE_cjs.REASON_SHUTDOWN_DROP, "trace");
162
+ chunk4IUHXUCJ_cjs.recordDrop(chunk4IUHXUCJ_cjs.REASON_SHUTDOWN_DROP, "trace");
163
163
  return false;
164
164
  }
165
165
  if (this.queue.length >= this.maxQueueSize) {
166
- chunkHJTUPXNE_cjs.recordDrop(chunkHJTUPXNE_cjs.REASON_QUEUE_FULL, "trace");
166
+ chunk4IUHXUCJ_cjs.recordDrop(chunk4IUHXUCJ_cjs.REASON_QUEUE_FULL, "trace");
167
167
  return false;
168
168
  }
169
169
  this.queue.push(event);
@@ -241,8 +241,8 @@ var BatchTransport = class {
241
241
  try {
242
242
  body = JSON.stringify(payload);
243
243
  } catch (err) {
244
- chunkHJTUPXNE_cjs.recordDrop(chunkHJTUPXNE_cjs.REASON_ENCODE_FAILED, categoryOf(payload), countPayloadEntries(payload));
245
- chunkHJTUPXNE_cjs.report(err, {
244
+ chunk4IUHXUCJ_cjs.recordDrop(chunk4IUHXUCJ_cjs.REASON_ENCODE_FAILED, categoryOf(payload), countPayloadEntries(payload));
245
+ chunk4IUHXUCJ_cjs.report(err, {
246
246
  fingerprint: "morse.transport.post.encode",
247
247
  extra: { endpoint_host: hostnameOf(url), sdk_version: SDK_VERSION }
248
248
  });
@@ -254,7 +254,7 @@ var BatchTransport = class {
254
254
  const lastAttempt = attempt >= MAX_SEND_ATTEMPTS;
255
255
  const outOfTime = Date.now() >= deadline;
256
256
  if (outOfTime && attempt > 1) {
257
- chunkHJTUPXNE_cjs.recordDrop(chunkHJTUPXNE_cjs.REASON_RETRY_EXHAUSTED, droppedCategory, droppedCount);
257
+ chunk4IUHXUCJ_cjs.recordDrop(chunk4IUHXUCJ_cjs.REASON_RETRY_EXHAUSTED, droppedCategory, droppedCount);
258
258
  return;
259
259
  }
260
260
  const controller = new AbortController();
@@ -273,7 +273,7 @@ var BatchTransport = class {
273
273
  }),
274
274
  deadline
275
275
  );
276
- chunkHJTUPXNE_cjs.setLevel(resp.headers.get("X-Morse-Diagnostics"));
276
+ chunk4IUHXUCJ_cjs.setLevel(resp.headers.get("X-Morse-Diagnostics"));
277
277
  if (resp.ok) return;
278
278
  if (resp.status === 429) await recordQuotaState(resp);
279
279
  let bodySnippet = "";
@@ -281,13 +281,13 @@ var BatchTransport = class {
281
281
  bodySnippet = (await resp.text()).slice(0, 200);
282
282
  } catch {
283
283
  }
284
- chunkHJTUPXNE_cjs.report(new Error(`morse: batch POST returned ${resp.status} ${bodySnippet}`), {
284
+ chunk4IUHXUCJ_cjs.report(new Error(`morse: batch POST returned ${resp.status} ${bodySnippet}`), {
285
285
  fingerprint: "morse.transport.post.non_2xx",
286
286
  extra: { endpoint_host: hostnameOf(url), sdk_version: SDK_VERSION }
287
287
  });
288
288
  if (resp.status === 429) {
289
289
  if (lastAttempt) {
290
- chunkHJTUPXNE_cjs.recordDrop(chunkHJTUPXNE_cjs.REASON_QUOTA_REJECTED, droppedCategory, droppedCount);
290
+ chunk4IUHXUCJ_cjs.recordDrop(chunk4IUHXUCJ_cjs.REASON_QUOTA_REJECTED, droppedCategory, droppedCount);
291
291
  return;
292
292
  }
293
293
  const retryAfter = parseRetryAfter(resp.headers.get("Retry-After"));
@@ -295,26 +295,26 @@ var BatchTransport = class {
295
295
  continue;
296
296
  }
297
297
  if (resp.status < 500) {
298
- chunkHJTUPXNE_cjs.recordDrop(
299
- resp.status === 401 || resp.status === 403 ? chunkHJTUPXNE_cjs.REASON_AUTH_REJECTED : chunkHJTUPXNE_cjs.REASON_ENDPOINT_REJECTED,
298
+ chunk4IUHXUCJ_cjs.recordDrop(
299
+ resp.status === 401 || resp.status === 403 ? chunk4IUHXUCJ_cjs.REASON_AUTH_REJECTED : chunk4IUHXUCJ_cjs.REASON_ENDPOINT_REJECTED,
300
300
  droppedCategory,
301
301
  droppedCount
302
302
  );
303
303
  return;
304
304
  }
305
305
  if (lastAttempt || this.closed || Date.now() >= deadline) {
306
- chunkHJTUPXNE_cjs.recordDrop(dropReasonFor(attempt, this.closed, deadline), droppedCategory, droppedCount);
306
+ chunk4IUHXUCJ_cjs.recordDrop(dropReasonFor(attempt, this.closed, deadline), droppedCategory, droppedCount);
307
307
  return;
308
308
  }
309
309
  await sleepUntil(backoffDelayMs(attempt), deadline);
310
310
  continue;
311
311
  } catch (err) {
312
- chunkHJTUPXNE_cjs.report(err, {
312
+ chunk4IUHXUCJ_cjs.report(err, {
313
313
  fingerprint: "morse.transport.post.network",
314
314
  extra: { endpoint_host: hostnameOf(url), sdk_version: SDK_VERSION }
315
315
  });
316
316
  if (lastAttempt || this.closed || Date.now() >= deadline) {
317
- chunkHJTUPXNE_cjs.recordDrop(dropReasonFor(attempt, this.closed, deadline), droppedCategory, droppedCount);
317
+ chunk4IUHXUCJ_cjs.recordDrop(dropReasonFor(attempt, this.closed, deadline), droppedCategory, droppedCount);
318
318
  return;
319
319
  }
320
320
  await sleepUntil(backoffDelayMs(attempt), deadline);
@@ -357,10 +357,10 @@ function categoryOf(payload) {
357
357
  }
358
358
 
359
359
  // src/index.ts
360
- chunkHJTUPXNE_cjs.init_tracing();
361
- chunkHJTUPXNE_cjs.init_diagnostics();
362
- chunkHJTUPXNE_cjs.init_spans();
363
- chunkHJTUPXNE_cjs.init_propagation();
360
+ chunk4IUHXUCJ_cjs.init_tracing();
361
+ chunk4IUHXUCJ_cjs.init_diagnostics();
362
+ chunk4IUHXUCJ_cjs.init_spans();
363
+ chunk4IUHXUCJ_cjs.init_propagation();
364
364
  var version = SDK_VERSION;
365
365
  var singleton = null;
366
366
  var transportFactory = (opts) => new BatchTransport(opts);
@@ -380,9 +380,9 @@ function logDestinationOnce(endpoint) {
380
380
  }
381
381
  function resolveEndpoint(explicit) {
382
382
  if (explicit && explicit.length > 0) return explicit;
383
- const fromEnv = chunkHJTUPXNE_cjs.getEndpoint();
383
+ const fromEnv = chunk4IUHXUCJ_cjs.getEndpoint();
384
384
  if (fromEnv) return fromEnv;
385
- return chunkHJTUPXNE_cjs.DEFAULT_ENDPOINT;
385
+ return chunk4IUHXUCJ_cjs.DEFAULT_ENDPOINT;
386
386
  }
387
387
  var OTLP_TRACES_PATH = "/api/v1/otlp/v1/traces";
388
388
  function deriveOtlpEndpoint(tracesEndpoint) {
@@ -397,10 +397,10 @@ function deriveOtlpEndpoint(tracesEndpoint) {
397
397
  }
398
398
  }
399
399
  function buildSingleton(opts, redaction) {
400
- if (chunkHJTUPXNE_cjs.isDisabled()) {
400
+ if (chunk4IUHXUCJ_cjs.isDisabled()) {
401
401
  return null;
402
402
  }
403
- const apiKey = opts.apiKey ?? chunkHJTUPXNE_cjs.getApiKey();
403
+ const apiKey = opts.apiKey ?? chunk4IUHXUCJ_cjs.getApiKey();
404
404
  if (!apiKey) {
405
405
  if (!noApiKeyWarningEmitted) {
406
406
  logger(
@@ -412,24 +412,24 @@ function buildSingleton(opts, redaction) {
412
412
  return null;
413
413
  }
414
414
  const endpoint = resolveEndpoint(opts.endpoint);
415
- const flushIntervalSeconds = opts.flushIntervalSeconds ?? chunkHJTUPXNE_cjs.getFlushIntervalSeconds();
415
+ const flushIntervalSeconds = opts.flushIntervalSeconds ?? chunk4IUHXUCJ_cjs.getFlushIntervalSeconds();
416
416
  const transport = transportFactory({ apiKey, endpoint, flushIntervalSeconds });
417
- chunkHJTUPXNE_cjs.setTransport(transport);
418
- chunkHJTUPXNE_cjs.setRedactionConfig(redaction);
419
- chunkHJTUPXNE_cjs.setDiagnosticsClientConfig({ apiKey, endpoint });
420
- const explicitSource = chunkHJTUPXNE_cjs.isValidInternalSource(opts.source) ? opts.source : void 0;
421
- const resolvedSource = explicitSource ?? chunkHJTUPXNE_cjs.getInternalSource() ?? null;
422
- chunkHJTUPXNE_cjs.setSource(resolvedSource);
417
+ chunk4IUHXUCJ_cjs.setTransport(transport);
418
+ chunk4IUHXUCJ_cjs.setRedactionConfig(redaction);
419
+ chunk4IUHXUCJ_cjs.setDiagnosticsClientConfig({ apiKey, endpoint });
420
+ const explicitSource = chunk4IUHXUCJ_cjs.isValidInternalSource(opts.source) ? opts.source : void 0;
421
+ const resolvedSource = explicitSource ?? chunk4IUHXUCJ_cjs.getInternalSource() ?? null;
422
+ chunk4IUHXUCJ_cjs.setSource(resolvedSource);
423
423
  logDestinationOnce(endpoint);
424
424
  try {
425
- chunkHJTUPXNE_cjs.getEngine().configure({
425
+ chunk4IUHXUCJ_cjs.getEngine().configure({
426
426
  endpoint: deriveOtlpEndpoint(endpoint),
427
427
  apiKey,
428
- sampleRate: chunkHJTUPXNE_cjs.getSampleRate(),
428
+ sampleRate: chunk4IUHXUCJ_cjs.getSampleRate(),
429
429
  scheduleDelayMillis: flushIntervalSeconds * 1e3,
430
- maxQueueSize: chunkHJTUPXNE_cjs.getMaxQueueSize(),
431
- maxExportBatchSize: chunkHJTUPXNE_cjs.getMaxBatchSize(),
432
- maxFieldBytes: chunkHJTUPXNE_cjs.getMaxFieldBytes(),
430
+ maxQueueSize: chunk4IUHXUCJ_cjs.getMaxQueueSize(),
431
+ maxExportBatchSize: chunk4IUHXUCJ_cjs.getMaxBatchSize(),
432
+ maxFieldBytes: chunk4IUHXUCJ_cjs.getMaxFieldBytes(),
433
433
  // 10s (not the exporter's un-overridden 30s ceiling): a genuine
434
434
  // network blip still gets several retries with backoff; a fully dead
435
435
  // endpoint fails within a bounded, shutdown-friendly window instead
@@ -438,32 +438,32 @@ function buildSingleton(opts, redaction) {
438
438
  redactionConfig: redaction
439
439
  });
440
440
  } catch (err) {
441
- chunkHJTUPXNE_cjs.report(err, { fingerprint: "morse.otel_provider.configure" });
441
+ chunk4IUHXUCJ_cjs.report(err, { fingerprint: "morse.otel_provider.configure" });
442
442
  }
443
443
  void installAdapters().catch(() => {
444
444
  });
445
445
  try {
446
446
  maybeEnableDbCaptureFromEnv();
447
447
  } catch (err) {
448
- chunkHJTUPXNE_cjs.report(err, { fingerprint: "morse.db_capture.register" });
448
+ chunk4IUHXUCJ_cjs.report(err, { fingerprint: "morse.db_capture.register" });
449
449
  }
450
450
  return { apiKey, endpoint, transport, redaction };
451
451
  }
452
452
  function ensureInitialized() {
453
- if (chunkHJTUPXNE_cjs.isDisabled()) return null;
453
+ if (chunk4IUHXUCJ_cjs.isDisabled()) return null;
454
454
  if (singleton !== null) return singleton;
455
- singleton = buildSingleton({}, chunkHJTUPXNE_cjs.buildRedactionConfig());
455
+ singleton = buildSingleton({}, chunk4IUHXUCJ_cjs.buildRedactionConfig());
456
456
  return singleton;
457
457
  }
458
- chunkHNOHWDK3_cjs._setEnsureInitialized(() => {
458
+ chunkLIP3XCTK_cjs._setEnsureInitialized(() => {
459
459
  ensureInitialized();
460
460
  });
461
461
  function init(options = {}) {
462
- if (chunkHJTUPXNE_cjs.isDisabled()) {
462
+ if (chunk4IUHXUCJ_cjs.isDisabled()) {
463
463
  logger("info", "morse: MORSE_DISABLED=1 \u2014 SDK is a no-op");
464
464
  return;
465
465
  }
466
- const redaction = chunkHJTUPXNE_cjs.buildRedactionConfig(options.redaction);
466
+ const redaction = chunk4IUHXUCJ_cjs.buildRedactionConfig(options.redaction);
467
467
  try {
468
468
  if (singleton !== null) {
469
469
  void singleton.transport.shutdown();
@@ -471,10 +471,10 @@ function init(options = {}) {
471
471
  }
472
472
  singleton = buildSingleton(options, redaction);
473
473
  } catch (err) {
474
- chunkHJTUPXNE_cjs.report(err, { fingerprint: "morse.init" });
474
+ chunk4IUHXUCJ_cjs.report(err, { fingerprint: "morse.init" });
475
475
  }
476
476
  }
477
- var track = chunkZ26QGUMP_cjs.absorbErrorsSync(
477
+ var track = chunkPSNZZBQJ_cjs.absorbErrorsSync(
478
478
  (options) => {
479
479
  const state = ensureInitialized();
480
480
  if (!state) return;
@@ -482,33 +482,33 @@ var track = chunkZ26QGUMP_cjs.absorbErrorsSync(
482
482
  agent_id: options.agentId,
483
483
  ...options.runData
484
484
  };
485
- const redacted = chunkHJTUPXNE_cjs.redactValue(payload, state.redaction);
485
+ const redacted = chunk4IUHXUCJ_cjs.redactValue(payload, state.redaction);
486
486
  state.transport.track(redacted);
487
487
  },
488
488
  { fingerprint: "morse.track" }
489
489
  );
490
- var batchTrack = chunkZ26QGUMP_cjs.absorbErrorsSync(
490
+ var batchTrack = chunkPSNZZBQJ_cjs.absorbErrorsSync(
491
491
  (runs) => {
492
492
  const state = ensureInitialized();
493
493
  if (!state) return;
494
494
  for (const run2 of runs) {
495
- const redacted = chunkHJTUPXNE_cjs.redactValue(run2, state.redaction);
495
+ const redacted = chunk4IUHXUCJ_cjs.redactValue(run2, state.redaction);
496
496
  state.transport.track(redacted);
497
497
  }
498
498
  },
499
499
  { fingerprint: "morse.batch_track" }
500
500
  );
501
- var record = chunkZ26QGUMP_cjs.absorbErrorsSync(
501
+ var record = chunkPSNZZBQJ_cjs.absorbErrorsSync(
502
502
  (rec) => {
503
503
  const state = ensureInitialized();
504
504
  if (!state) return;
505
- const traceId = chunkHJTUPXNE_cjs.generateTraceId();
506
- const now = chunkHJTUPXNE_cjs.nowIso();
505
+ const traceId = chunk4IUHXUCJ_cjs.generateTraceId();
506
+ const now = chunk4IUHXUCJ_cjs.nowIso();
507
507
  const resolvedStatus = rec.errorMessage ? "failed" : rec.status ?? "completed";
508
508
  const span2 = {
509
509
  trace_id: traceId,
510
- span_id: chunkHJTUPXNE_cjs.generateSpanId(),
511
- type: chunkHJTUPXNE_cjs.SpanType.AGENT,
510
+ span_id: chunk4IUHXUCJ_cjs.generateSpanId(),
511
+ type: chunk4IUHXUCJ_cjs.SpanType.AGENT,
512
512
  name: rec.agent,
513
513
  started_at: now,
514
514
  ended_at: now,
@@ -533,58 +533,58 @@ var record = chunkZ26QGUMP_cjs.absorbErrorsSync(
533
533
  success: rec.success,
534
534
  outcome: rec.outcome
535
535
  };
536
- const entry = chunkHJTUPXNE_cjs.buildTraceEntry(traceFields, [span2]);
537
- const redacted = chunkHJTUPXNE_cjs.redactValue(entry, state.redaction);
538
- chunkHJTUPXNE_cjs.sendTrace(redacted);
536
+ const entry = chunk4IUHXUCJ_cjs.buildTraceEntry(traceFields, [span2]);
537
+ const redacted = chunk4IUHXUCJ_cjs.redactValue(entry, state.redaction);
538
+ chunk4IUHXUCJ_cjs.sendTrace(redacted);
539
539
  },
540
540
  { fingerprint: "morse.record" }
541
541
  );
542
542
  function run(nameOrOpts, fn) {
543
543
  const opts = typeof nameOrOpts === "string" ? { agentName: nameOrOpts } : nameOrOpts;
544
544
  ensureInitialized();
545
- return chunkHJTUPXNE_cjs.runSync(opts, fn);
545
+ return chunk4IUHXUCJ_cjs.runSync(opts, fn);
546
546
  }
547
547
  function runTraced(options, fn) {
548
548
  ensureInitialized();
549
- return chunkHJTUPXNE_cjs.runAsync(options, fn);
549
+ return chunk4IUHXUCJ_cjs.runAsync(options, fn);
550
550
  }
551
551
  function setContext2(dims) {
552
- chunkHJTUPXNE_cjs.setContext(dims);
552
+ chunk4IUHXUCJ_cjs.setContext(dims);
553
553
  }
554
554
  function startSpan2(options) {
555
- return chunkHJTUPXNE_cjs.startSpan(options);
555
+ return chunk4IUHXUCJ_cjs.startSpan(options);
556
556
  }
557
557
  function span(options, fn) {
558
- return chunkHJTUPXNE_cjs.spanSync(options, fn);
558
+ return chunk4IUHXUCJ_cjs.spanSync(options, fn);
559
559
  }
560
560
  function spanAsync2(options, fn) {
561
- return chunkHJTUPXNE_cjs.spanAsync(options, fn);
561
+ return chunk4IUHXUCJ_cjs.spanAsync(options, fn);
562
562
  }
563
- var flush = chunkZ26QGUMP_cjs.absorbErrorsAsync(
563
+ var flush = chunkPSNZZBQJ_cjs.absorbErrorsAsync(
564
564
  async () => {
565
565
  if (singleton !== null) {
566
566
  await singleton.transport.flush();
567
- await chunkHJTUPXNE_cjs.getEngine().flush();
567
+ await chunk4IUHXUCJ_cjs.getEngine().flush();
568
568
  }
569
569
  },
570
570
  { fingerprint: "morse.flush" }
571
571
  );
572
- var quotaState2 = chunkZ26QGUMP_cjs.absorbErrorsSync(
572
+ var quotaState2 = chunkPSNZZBQJ_cjs.absorbErrorsSync(
573
573
  () => {
574
574
  if (singleton === null) return null;
575
575
  return getQuotaState();
576
576
  },
577
577
  { fingerprint: "morse.quota_state" }
578
578
  );
579
- var shutdown = chunkZ26QGUMP_cjs.absorbErrorsAsync(
579
+ var shutdown = chunkPSNZZBQJ_cjs.absorbErrorsAsync(
580
580
  async () => {
581
581
  if (singleton !== null) {
582
582
  await singleton.transport.shutdown();
583
- await chunkHJTUPXNE_cjs.getEngine().flush();
584
- chunkHJTUPXNE_cjs.getEngine().shutdown();
585
- await chunkHJTUPXNE_cjs.flushOnce();
583
+ await chunk4IUHXUCJ_cjs.getEngine().flush();
584
+ chunk4IUHXUCJ_cjs.getEngine().shutdown();
585
+ await chunk4IUHXUCJ_cjs.flushOnce();
586
586
  singleton = null;
587
- chunkHJTUPXNE_cjs.setTransport(null);
587
+ chunk4IUHXUCJ_cjs.setTransport(null);
588
588
  }
589
589
  },
590
590
  { fingerprint: "morse.shutdown" }
@@ -593,14 +593,14 @@ function _resetForTesting4() {
593
593
  if (singleton !== null) {
594
594
  void singleton.transport.shutdown();
595
595
  singleton = null;
596
- chunkHJTUPXNE_cjs.setTransport(null);
596
+ chunk4IUHXUCJ_cjs.setTransport(null);
597
597
  }
598
- chunkHJTUPXNE_cjs.getEngine().resetForTesting();
598
+ chunk4IUHXUCJ_cjs.getEngine().resetForTesting();
599
599
  noApiKeyWarningEmitted = false;
600
600
  lastLoggedEndpoint = null;
601
- chunkHJTUPXNE_cjs.setSource(null);
602
- chunkHJTUPXNE_cjs._resetForTesting2();
603
- chunkHJTUPXNE_cjs._resetForTesting();
601
+ chunk4IUHXUCJ_cjs.setSource(null);
602
+ chunk4IUHXUCJ_cjs._resetForTesting2();
603
+ chunk4IUHXUCJ_cjs._resetForTesting();
604
604
  _resetQuotaStateForTesting();
605
605
  transportFactory = (opts) => new BatchTransport(opts);
606
606
  }
@@ -608,59 +608,59 @@ function _setTransportFactoryForTesting(factory) {
608
608
  transportFactory = factory;
609
609
  }
610
610
  function _getLastTraceForTesting() {
611
- return chunkHJTUPXNE_cjs.getLastTrace();
611
+ return chunk4IUHXUCJ_cjs.getLastTrace();
612
612
  }
613
613
  function _getActiveTraceStateForTesting() {
614
- return chunkHJTUPXNE_cjs.getActiveTraceState();
614
+ return chunk4IUHXUCJ_cjs.getActiveTraceState();
615
615
  }
616
616
 
617
617
  Object.defineProperty(exports, "MAX_SEGMENT_CONTENT_BYTES", {
618
618
  enumerable: true,
619
- get: function () { return chunkZOOYJTDT_cjs.MAX_SEGMENT_CONTENT_BYTES; }
619
+ get: function () { return chunk33WDUUKZ_cjs.MAX_SEGMENT_CONTENT_BYTES; }
620
620
  });
621
621
  Object.defineProperty(exports, "extractAnthropicSegments", {
622
622
  enumerable: true,
623
- get: function () { return chunkZOOYJTDT_cjs.extractAnthropicSegments; }
623
+ get: function () { return chunk33WDUUKZ_cjs.extractAnthropicSegments; }
624
624
  });
625
625
  Object.defineProperty(exports, "instrumentAnthropic", {
626
626
  enumerable: true,
627
- get: function () { return chunkZOOYJTDT_cjs.instrumentAnthropic; }
627
+ get: function () { return chunk33WDUUKZ_cjs.instrumentAnthropic; }
628
628
  });
629
629
  Object.defineProperty(exports, "isAnthropicWrapped", {
630
630
  enumerable: true,
631
- get: function () { return chunkZOOYJTDT_cjs.isAnthropicWrapped; }
631
+ get: function () { return chunk33WDUUKZ_cjs.isAnthropicWrapped; }
632
632
  });
633
633
  Object.defineProperty(exports, "uninstallAnthropic", {
634
634
  enumerable: true,
635
- get: function () { return chunkZOOYJTDT_cjs.uninstallAnthropic; }
635
+ get: function () { return chunk33WDUUKZ_cjs.uninstallAnthropic; }
636
636
  });
637
637
  Object.defineProperty(exports, "wrapAnthropic", {
638
638
  enumerable: true,
639
- get: function () { return chunkZOOYJTDT_cjs.wrapAnthropic; }
639
+ get: function () { return chunk33WDUUKZ_cjs.wrapAnthropic; }
640
640
  });
641
641
  Object.defineProperty(exports, "log", {
642
642
  enumerable: true,
643
- get: function () { return chunkHNOHWDK3_cjs.log; }
643
+ get: function () { return chunkLIP3XCTK_cjs.log; }
644
644
  });
645
645
  Object.defineProperty(exports, "W3C_TRACEPARENT_HEADER", {
646
646
  enumerable: true,
647
- get: function () { return chunkHJTUPXNE_cjs.W3C_TRACEPARENT_HEADER; }
647
+ get: function () { return chunk4IUHXUCJ_cjs.W3C_TRACEPARENT_HEADER; }
648
648
  });
649
649
  Object.defineProperty(exports, "extractTraceparent", {
650
650
  enumerable: true,
651
- get: function () { return chunkHJTUPXNE_cjs.extractTraceparent; }
651
+ get: function () { return chunk4IUHXUCJ_cjs.extractTraceparent; }
652
652
  });
653
653
  Object.defineProperty(exports, "formatTraceparent", {
654
654
  enumerable: true,
655
- get: function () { return chunkHJTUPXNE_cjs.formatTraceparent; }
655
+ get: function () { return chunk4IUHXUCJ_cjs.formatTraceparent; }
656
656
  });
657
657
  Object.defineProperty(exports, "injectIntoRequestInit", {
658
658
  enumerable: true,
659
- get: function () { return chunkHJTUPXNE_cjs.injectIntoRequestInit; }
659
+ get: function () { return chunk4IUHXUCJ_cjs.injectIntoRequestInit; }
660
660
  });
661
661
  Object.defineProperty(exports, "injectTraceparent", {
662
662
  enumerable: true,
663
- get: function () { return chunkHJTUPXNE_cjs.injectTraceparent; }
663
+ get: function () { return chunk4IUHXUCJ_cjs.injectTraceparent; }
664
664
  });
665
665
  exports._getActiveTraceStateForTesting = _getActiveTraceStateForTesting;
666
666
  exports._getLastTraceForTesting = _getLastTraceForTesting;
@@ -1,12 +1,12 @@
1
- export { MAX_SEGMENT_CONTENT_BYTES, extractAnthropicSegments, instrumentAnthropic, isAnthropicWrapped, uninstallAnthropic, wrapAnthropic } from './chunk-VSHCKROM.js';
2
- import { _setEnsureInitialized } from './chunk-AX6NEG6X.js';
3
- export { log } from './chunk-AX6NEG6X.js';
4
- import './chunk-5IMBYZUB.js';
5
- import { absorbErrorsSync, absorbErrorsAsync } from './chunk-RDNSY73W.js';
1
+ export { MAX_SEGMENT_CONTENT_BYTES, extractAnthropicSegments, instrumentAnthropic, isAnthropicWrapped, uninstallAnthropic, wrapAnthropic } from './chunk-TRVACYUN.js';
2
+ import { _setEnsureInitialized } from './chunk-5TYTCLKA.js';
3
+ export { log } from './chunk-5TYTCLKA.js';
4
+ import './chunk-6JHMFFPE.js';
5
+ import { absorbErrorsSync, absorbErrorsAsync } from './chunk-OUQAH27A.js';
6
6
  import './chunk-4FALQMOZ.js';
7
7
  import './chunk-MLDVXMQD.js';
8
- import { init_env, init_otel_provider_browser, init_redaction, init_diagnostics, init_tracing, init_spans, init_propagation, redactValue, generateTraceId, nowIso, SpanType, generateSpanId, buildTraceEntry, sendTrace, isDisabled, buildRedactionConfig, getApiKey, getFlushIntervalSeconds, setTransport, setRedactionConfig, setDiagnosticsClientConfig, isValidInternalSource, getInternalSource, setSource, getEngine, getMaxFieldBytes, getMaxBatchSize, getMaxQueueSize, getSampleRate, report, getEndpoint, DEFAULT_ENDPOINT, recordDrop, REASON_SHUTDOWN_DROP, REASON_QUEUE_FULL, REASON_ENCODE_FAILED, REASON_RETRY_EXHAUSTED, setLevel, REASON_QUOTA_REJECTED, REASON_AUTH_REJECTED, REASON_ENDPOINT_REJECTED, REASON_SEND_FAILED, runSync, runAsync, setContext, startSpan, spanSync, spanAsync, flushOnce, _resetForTesting2, _resetForTesting, getLastTrace, getActiveTraceState } from './chunk-7G266PKE.js';
9
- export { W3C_TRACEPARENT_HEADER, extractTraceparent, formatTraceparent, injectIntoRequestInit, injectTraceparent } from './chunk-7G266PKE.js';
8
+ import { init_env, init_otel_provider_browser, init_redaction, init_diagnostics, init_tracing, init_spans, init_propagation, redactValue, generateTraceId, nowIso, SpanType, generateSpanId, buildTraceEntry, sendTrace, isDisabled, buildRedactionConfig, getApiKey, getFlushIntervalSeconds, setTransport, setRedactionConfig, setDiagnosticsClientConfig, isValidInternalSource, getInternalSource, setSource, getEngine, getMaxFieldBytes, getMaxBatchSize, getMaxQueueSize, getSampleRate, report, getEndpoint, DEFAULT_ENDPOINT, recordDrop, REASON_SHUTDOWN_DROP, REASON_QUEUE_FULL, REASON_ENCODE_FAILED, REASON_RETRY_EXHAUSTED, setLevel, REASON_QUOTA_REJECTED, REASON_AUTH_REJECTED, REASON_ENDPOINT_REJECTED, REASON_SEND_FAILED, runSync, runAsync, setContext, startSpan, spanSync, spanAsync, flushOnce, _resetForTesting2, _resetForTesting, getLastTrace, getActiveTraceState } from './chunk-PXHTLCEU.js';
9
+ export { W3C_TRACEPARENT_HEADER, extractTraceparent, formatTraceparent, injectIntoRequestInit, injectTraceparent } from './chunk-PXHTLCEU.js';
10
10
 
11
11
  // src/_internal/auto-detect.browser.ts
12
12
  async function installAdapters() {
@@ -25,7 +25,7 @@ init_redaction();
25
25
 
26
26
  // src/_internal/transport.ts
27
27
  init_diagnostics();
28
- var SDK_VERSION = "0.5.1-rc.1" ;
28
+ var SDK_VERSION = "0.6.0-rc.1" ;
29
29
  var RETRY_AFTER_CAP_SECONDS = 30;
30
30
  var MAX_SEND_ATTEMPTS = 3;
31
31
  var BACKOFF_BASE_MS = 500;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkHNOHWDK3_cjs = require('../chunk-HNOHWDK3.cjs');
4
- require('../chunk-Z26QGUMP.cjs');
5
- require('../chunk-HJTUPXNE.cjs');
3
+ var chunkLIP3XCTK_cjs = require('../chunk-LIP3XCTK.cjs');
4
+ require('../chunk-PSNZZBQJ.cjs');
5
+ require('../chunk-4IUHXUCJ.cjs');
6
6
  var stream = require('stream');
7
7
 
8
8
  function pinoLevelToSeverity(level) {
@@ -36,7 +36,7 @@ function forwardPinoRecord(record) {
36
36
  const msg = typeof record.msg === "string" ? record.msg : "";
37
37
  const serviceName = typeof record.name === "string" && record.name.length > 0 ? record.name : void 0;
38
38
  const attributes = pickAttributes(record);
39
- chunkHNOHWDK3_cjs.log(msg, {
39
+ chunkLIP3XCTK_cjs.log(msg, {
40
40
  severity,
41
41
  attributes,
42
42
  ...serviceName ? { serviceName } : {}
@@ -1,6 +1,6 @@
1
- import { log } from '../chunk-AX6NEG6X.js';
2
- import '../chunk-RDNSY73W.js';
3
- import '../chunk-7G266PKE.js';
1
+ import { log } from '../chunk-5TYTCLKA.js';
2
+ import '../chunk-OUQAH27A.js';
3
+ import '../chunk-PXHTLCEU.js';
4
4
  import { Writable } from 'stream';
5
5
 
6
6
  function pinoLevelToSeverity(level) {