@glasstrace/sdk 1.2.0 → 1.2.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 (42) hide show
  1. package/dist/{chunk-6RNBUUBR.js → chunk-2GCN27SI.js} +2 -2
  2. package/dist/{chunk-4EZ6JTDG.js → chunk-47B2G3FE.js} +2 -2
  3. package/dist/{chunk-6RIH6SFM.js → chunk-CTJO7PUZ.js} +23 -17
  4. package/dist/chunk-CTJO7PUZ.js.map +1 -0
  5. package/dist/{chunk-X5MAXP5T.js → chunk-EBYISKQP.js} +5 -3
  6. package/dist/{chunk-X5MAXP5T.js.map → chunk-EBYISKQP.js.map} +1 -1
  7. package/dist/{chunk-JKI4OCFV.js → chunk-HV5ID2WJ.js} +3 -3
  8. package/dist/{chunk-TWTWRJ25.js → chunk-MD5XPCTQ.js} +2 -2
  9. package/dist/{chunk-TWHCJKRS.js → chunk-NFPDYME5.js} +3 -3
  10. package/dist/{chunk-DST4UBXU.js → chunk-YMLMZCPR.js} +2 -2
  11. package/dist/cli/init.cjs +5 -3
  12. package/dist/cli/init.cjs.map +1 -1
  13. package/dist/cli/init.js +6 -6
  14. package/dist/cli/mcp-add.cjs +4 -2
  15. package/dist/cli/mcp-add.cjs.map +1 -1
  16. package/dist/cli/mcp-add.js +2 -2
  17. package/dist/cli/uninit.js +3 -3
  18. package/dist/cli/validate.cjs +4 -2
  19. package/dist/cli/validate.cjs.map +1 -1
  20. package/dist/cli/validate.js +2 -2
  21. package/dist/edge-entry.cjs +4 -2
  22. package/dist/edge-entry.cjs.map +1 -1
  23. package/dist/edge-entry.js +2 -2
  24. package/dist/index.cjs +22 -14
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.js +5 -5
  27. package/dist/node-entry.cjs +22 -14
  28. package/dist/node-entry.cjs.map +1 -1
  29. package/dist/node-entry.js +7 -7
  30. package/dist/node-subpath.cjs +4 -2
  31. package/dist/node-subpath.cjs.map +1 -1
  32. package/dist/node-subpath.js +3 -3
  33. package/dist/{source-map-uploader-DPUUCLNW.js → source-map-uploader-RA4Z7TWA.js} +3 -3
  34. package/package.json +1 -1
  35. package/dist/chunk-6RIH6SFM.js.map +0 -1
  36. /package/dist/{chunk-6RNBUUBR.js.map → chunk-2GCN27SI.js.map} +0 -0
  37. /package/dist/{chunk-4EZ6JTDG.js.map → chunk-47B2G3FE.js.map} +0 -0
  38. /package/dist/{chunk-JKI4OCFV.js.map → chunk-HV5ID2WJ.js.map} +0 -0
  39. /package/dist/{chunk-TWTWRJ25.js.map → chunk-MD5XPCTQ.js.map} +0 -0
  40. /package/dist/{chunk-TWHCJKRS.js.map → chunk-NFPDYME5.js.map} +0 -0
  41. /package/dist/{chunk-DST4UBXU.js.map → chunk-YMLMZCPR.js.map} +0 -0
  42. /package/dist/{source-map-uploader-DPUUCLNW.js.map → source-map-uploader-RA4Z7TWA.js.map} +0 -0
@@ -2,9 +2,9 @@ import {
2
2
  GlasstraceSpanProcessor,
3
3
  SdkError,
4
4
  captureCorrelationId
5
- } from "./chunk-6RNBUUBR.js";
5
+ } from "./chunk-2GCN27SI.js";
6
6
  import "./chunk-DQ25VOKK.js";
7
- import "./chunk-X5MAXP5T.js";
7
+ import "./chunk-EBYISKQP.js";
8
8
  import "./chunk-NSBPE2FW.js";
9
9
  export {
10
10
  GlasstraceSpanProcessor,
package/dist/index.cjs CHANGED
@@ -14667,13 +14667,15 @@ var init_dist = __esm({
14667
14667
  });
14668
14668
  PresignedUploadResponseSchema = external_exports.object({
14669
14669
  uploadId: external_exports.string().uuid(),
14670
- expiresAt: external_exports.number().int().positive(),
14670
+ expiresAt: external_exports.number().int().nonnegative(),
14671
14671
  files: external_exports.array(
14672
14672
  external_exports.object({
14673
14673
  filePath: external_exports.string().min(1),
14674
14674
  clientToken: external_exports.string().min(1),
14675
14675
  pathname: external_exports.string().min(1),
14676
- maxBytes: external_exports.number().int().positive()
14676
+ maxBytes: external_exports.number().int().positive(),
14677
+ /** Vercel Blob access mode — explicit in the contract per DISC-756. */
14678
+ access: external_exports.enum(["public"])
14677
14679
  })
14678
14680
  ).min(1).max(100)
14679
14681
  });
@@ -18224,16 +18226,22 @@ var ERROR_RESPONSE_BODY_TRUNCATION_MARKER = "...[truncated]";
18224
18226
  var REDACTED = "[REDACTED]";
18225
18227
  var ERROR_STATUS_MIN = 400;
18226
18228
  var ERROR_STATUS_MAX = 599;
18227
- function isHttpErrorStatus(status) {
18229
+ function coerceHttpStatus(value) {
18228
18230
  let numeric;
18229
- if (typeof status === "number") {
18230
- numeric = status;
18231
- } else if (typeof status === "string" && status.length > 0) {
18232
- numeric = Number(status);
18231
+ if (typeof value === "number") {
18232
+ numeric = value;
18233
+ } else if (typeof value === "string") {
18234
+ const trimmed = value.trim();
18235
+ if (trimmed.length === 0) return void 0;
18236
+ numeric = Number(trimmed);
18233
18237
  } else {
18234
- return false;
18238
+ return void 0;
18235
18239
  }
18236
- if (!Number.isFinite(numeric)) return false;
18240
+ return Number.isFinite(numeric) ? numeric : void 0;
18241
+ }
18242
+ function isHttpErrorStatus(status) {
18243
+ const numeric = coerceHttpStatus(status);
18244
+ if (numeric === void 0) return false;
18237
18245
  return numeric >= ERROR_STATUS_MIN && numeric <= ERROR_STATUS_MAX;
18238
18246
  }
18239
18247
  var REDACTION_PATTERNS = [
@@ -18493,7 +18501,7 @@ var GlasstraceExporter = class {
18493
18501
  }
18494
18502
  }
18495
18503
  }
18496
- const statusCode = attrs["http.status_code"] ?? attrs["http.response.status_code"];
18504
+ const statusCode = coerceHttpStatus(attrs["http.status_code"]) ?? coerceHttpStatus(attrs["http.response.status_code"]);
18497
18505
  if (statusCode !== void 0) {
18498
18506
  extra[ATTR.HTTP_STATUS_CODE] = statusCode;
18499
18507
  }
@@ -22485,7 +22493,7 @@ function registerGlasstrace(options) {
22485
22493
  setCoreState(CoreState.REGISTERING);
22486
22494
  startRuntimeStateWriter({
22487
22495
  projectRoot: process.cwd(),
22488
- sdkVersion: "1.2.0"
22496
+ sdkVersion: "1.2.1"
22489
22497
  });
22490
22498
  const config2 = resolveConfig(options);
22491
22499
  if (config2.verbose) {
@@ -22651,8 +22659,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
22651
22659
  if (config2.verbose) {
22652
22660
  console.info("[glasstrace] Background init firing.");
22653
22661
  }
22654
- const healthReport = collectHealthReport("1.2.0");
22655
- const initResult = await performInit(config2, anonKeyForInit, "1.2.0", healthReport);
22662
+ const healthReport = collectHealthReport("1.2.1");
22663
+ const initResult = await performInit(config2, anonKeyForInit, "1.2.1", healthReport);
22656
22664
  if (generation !== registrationGeneration) return;
22657
22665
  const currentState = getCoreState();
22658
22666
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -22675,7 +22683,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
22675
22683
  }
22676
22684
  maybeInstallConsoleCapture();
22677
22685
  if (didLastInitSucceed()) {
22678
- startHeartbeat(config2, anonKeyForInit, "1.2.0", generation, (newApiKey, accountId) => {
22686
+ startHeartbeat(config2, anonKeyForInit, "1.2.1", generation, (newApiKey, accountId) => {
22679
22687
  setAuthState(AuthState.CLAIMING);
22680
22688
  emitLifecycleEvent("auth:claim_started", { accountId });
22681
22689
  setResolvedApiKey(newApiKey);