@glasstrace/sdk 1.3.9 → 1.4.0

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 (58) hide show
  1. package/README.md +68 -0
  2. package/dist/capture-error-BmQz7xF6.d.cts +455 -0
  3. package/dist/capture-error-CTgSYxek.d.ts +455 -0
  4. package/dist/{chunk-XS5W3SPL.js → chunk-4WI7B5FQ.js} +91 -5
  5. package/dist/chunk-4WI7B5FQ.js.map +1 -0
  6. package/dist/{chunk-GYTCZSAV.js → chunk-MFYOQOD7.js} +2 -2
  7. package/dist/{chunk-4WUHMLMM.js → chunk-MMKFFF2L.js} +2 -2
  8. package/dist/{chunk-FKBCEOJ5.js → chunk-Q42BY5BA.js} +2 -2
  9. package/dist/{chunk-DBKG6SRI.js → chunk-QU26IKIJ.js} +2 -2
  10. package/dist/{chunk-ADUD4PEK.js → chunk-TANUWTFO.js} +3 -3
  11. package/dist/{chunk-LJMZXJ45.js → chunk-VJQIFY33.js} +3 -3
  12. package/dist/{chunk-JH7EGRC5.js → chunk-VQDYXXVS.js} +9 -9
  13. package/dist/cli/init.cjs +13 -2
  14. package/dist/cli/init.cjs.map +1 -1
  15. package/dist/cli/init.js +6 -6
  16. package/dist/cli/mcp-add.cjs +12 -1
  17. package/dist/cli/mcp-add.cjs.map +1 -1
  18. package/dist/cli/mcp-add.js +2 -2
  19. package/dist/cli/uninit.js +3 -3
  20. package/dist/cli/validate.cjs +12 -1
  21. package/dist/cli/validate.cjs.map +1 -1
  22. package/dist/cli/validate.js +2 -2
  23. package/dist/{edge-entry-BSKA1l_0.d.ts → edge-entry-AWO70gje.d.ts} +1 -1
  24. package/dist/{edge-entry-DyMWa6JK.d.cts → edge-entry-DaeG7D7S.d.cts} +1 -1
  25. package/dist/edge-entry.cjs +43 -2
  26. package/dist/edge-entry.cjs.map +1 -1
  27. package/dist/edge-entry.d.cts +2 -2
  28. package/dist/edge-entry.d.ts +2 -2
  29. package/dist/edge-entry.js +2 -2
  30. package/dist/index.cjs +369 -8
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/{index.d-Bo_Rxund.d.cts → index.d-Dq33YwFT.d.cts} +91 -1
  33. package/dist/{index.d-Bo_Rxund.d.ts → index.d-Dq33YwFT.d.ts} +91 -1
  34. package/dist/index.d.cts +91 -431
  35. package/dist/index.d.ts +91 -431
  36. package/dist/index.js +290 -6
  37. package/dist/index.js.map +1 -1
  38. package/dist/node-entry.cjs +49 -7
  39. package/dist/node-entry.cjs.map +1 -1
  40. package/dist/node-entry.d.cts +3 -3
  41. package/dist/node-entry.d.ts +3 -3
  42. package/dist/node-entry.js +7 -7
  43. package/dist/node-subpath.cjs +12 -1
  44. package/dist/node-subpath.cjs.map +1 -1
  45. package/dist/node-subpath.d.cts +1 -1
  46. package/dist/node-subpath.d.ts +1 -1
  47. package/dist/node-subpath.js +3 -3
  48. package/dist/{source-map-uploader-FSTHCYDR.js → source-map-uploader-PB3M4PPP.js} +3 -3
  49. package/package.json +1 -1
  50. package/dist/chunk-XS5W3SPL.js.map +0 -1
  51. /package/dist/{chunk-GYTCZSAV.js.map → chunk-MFYOQOD7.js.map} +0 -0
  52. /package/dist/{chunk-4WUHMLMM.js.map → chunk-MMKFFF2L.js.map} +0 -0
  53. /package/dist/{chunk-FKBCEOJ5.js.map → chunk-Q42BY5BA.js.map} +0 -0
  54. /package/dist/{chunk-DBKG6SRI.js.map → chunk-QU26IKIJ.js.map} +0 -0
  55. /package/dist/{chunk-ADUD4PEK.js.map → chunk-TANUWTFO.js.map} +0 -0
  56. /package/dist/{chunk-LJMZXJ45.js.map → chunk-VJQIFY33.js.map} +0 -0
  57. /package/dist/{chunk-JH7EGRC5.js.map → chunk-VQDYXXVS.js.map} +0 -0
  58. /package/dist/{source-map-uploader-FSTHCYDR.js.map → source-map-uploader-PB3M4PPP.js.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  AnonApiKeySchema,
3
3
  DevApiKeySchema,
4
4
  createAnonApiKey
5
- } from "./chunk-XS5W3SPL.js";
5
+ } from "./chunk-4WI7B5FQ.js";
6
6
  import {
7
7
  __require
8
8
  } from "./chunk-NSBPE2FW.js";
@@ -659,4 +659,4 @@ export {
659
659
  writeMcpMarker,
660
660
  refreshGenericMcpConfigAtRuntime
661
661
  };
662
- //# sourceMappingURL=chunk-GYTCZSAV.js.map
662
+ //# sourceMappingURL=chunk-MFYOQOD7.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createBuildHash
3
- } from "./chunk-XS5W3SPL.js";
3
+ } from "./chunk-4WI7B5FQ.js";
4
4
 
5
5
  // src/import-graph.ts
6
6
  import * as fs from "node:fs/promises";
@@ -175,4 +175,4 @@ export {
175
175
  extractImports,
176
176
  buildImportGraph
177
177
  };
178
- //# sourceMappingURL=chunk-4WUHMLMM.js.map
178
+ //# sourceMappingURL=chunk-MMKFFF2L.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DQ25VOKK.js";
4
4
  import {
5
5
  GLASSTRACE_ATTRIBUTE_NAMES
6
- } from "./chunk-XS5W3SPL.js";
6
+ } from "./chunk-4WI7B5FQ.js";
7
7
 
8
8
  // src/errors.ts
9
9
  var SdkError = class extends Error {
@@ -102,4 +102,4 @@ export {
102
102
  GlasstraceSpanProcessor,
103
103
  captureCorrelationId
104
104
  };
105
- //# sourceMappingURL=chunk-FKBCEOJ5.js.map
105
+ //# sourceMappingURL=chunk-Q42BY5BA.js.map
@@ -5,7 +5,7 @@ import {
5
5
  PresignedUploadResponseSchema,
6
6
  SourceMapManifestResponseSchema,
7
7
  SourceMapUploadResponseSchema
8
- } from "./chunk-XS5W3SPL.js";
8
+ } from "./chunk-4WI7B5FQ.js";
9
9
 
10
10
  // src/source-map-uploader.ts
11
11
  import * as fs from "node:fs/promises";
@@ -331,4 +331,4 @@ export {
331
331
  uploadSourceMapsPresigned,
332
332
  uploadSourceMapsAuto
333
333
  };
334
- //# sourceMappingURL=chunk-DBKG6SRI.js.map
334
+ //# sourceMappingURL=chunk-QU26IKIJ.js.map
@@ -2,12 +2,12 @@ import {
2
2
  atomicWriteFile,
3
3
  refreshGenericMcpConfigAtRuntime,
4
4
  resolveEffectiveMcpCredential
5
- } from "./chunk-GYTCZSAV.js";
5
+ } from "./chunk-MFYOQOD7.js";
6
6
  import {
7
7
  DEFAULT_CAPTURE_CONFIG,
8
8
  SdkCachedConfigSchema,
9
9
  SdkInitResponseSchema
10
- } from "./chunk-XS5W3SPL.js";
10
+ } from "./chunk-4WI7B5FQ.js";
11
11
  import {
12
12
  __require
13
13
  } from "./chunk-NSBPE2FW.js";
@@ -692,4 +692,4 @@ export {
692
692
  didLastInitSucceed,
693
693
  verifyInitReachable
694
694
  };
695
- //# sourceMappingURL=chunk-ADUD4PEK.js.map
695
+ //# sourceMappingURL=chunk-TANUWTFO.js.map
@@ -5,10 +5,10 @@ import {
5
5
  isDevApiKey,
6
6
  readEnvLocalApiKey,
7
7
  writeAndFsyncTempSync
8
- } from "./chunk-GYTCZSAV.js";
8
+ } from "./chunk-MFYOQOD7.js";
9
9
  import {
10
10
  AnonApiKeySchema
11
- } from "./chunk-XS5W3SPL.js";
11
+ } from "./chunk-4WI7B5FQ.js";
12
12
  import {
13
13
  NEXT_CONFIG_NAMES
14
14
  } from "./chunk-NB7GJE4S.js";
@@ -914,4 +914,4 @@ export {
914
914
  writeShutdownMarker,
915
915
  runUninit
916
916
  };
917
- //# sourceMappingURL=chunk-LJMZXJ45.js.map
917
+ //# sourceMappingURL=chunk-VJQIFY33.js.map
@@ -33,7 +33,7 @@ import {
33
33
  performInit,
34
34
  recordSpansDropped,
35
35
  recordSpansExported
36
- } from "./chunk-ADUD4PEK.js";
36
+ } from "./chunk-TANUWTFO.js";
37
37
  import {
38
38
  isAnonymousMode,
39
39
  isProductionDisabled,
@@ -44,11 +44,11 @@ import {
44
44
  getOrCreateAnonKey,
45
45
  isSyncFsAvailable,
46
46
  readAnonKey
47
- } from "./chunk-GYTCZSAV.js";
47
+ } from "./chunk-MFYOQOD7.js";
48
48
  import {
49
49
  GLASSTRACE_ATTRIBUTE_NAMES,
50
50
  deriveSessionId
51
- } from "./chunk-XS5W3SPL.js";
51
+ } from "./chunk-4WI7B5FQ.js";
52
52
  import {
53
53
  __require
54
54
  } from "./chunk-NSBPE2FW.js";
@@ -4297,7 +4297,7 @@ function registerGlasstrace(options) {
4297
4297
  setCoreState(CoreState.REGISTERING);
4298
4298
  startRuntimeStateWriter({
4299
4299
  projectRoot: process.cwd(),
4300
- sdkVersion: "1.3.9"
4300
+ sdkVersion: "1.4.0"
4301
4301
  });
4302
4302
  const config = resolveConfig(options);
4303
4303
  if (config.verbose) {
@@ -4464,8 +4464,8 @@ async function backgroundInit(config, anonKeyForInit, generation) {
4464
4464
  if (config.verbose) {
4465
4465
  console.info("[glasstrace] Background init firing.");
4466
4466
  }
4467
- const healthReport = collectHealthReport("1.3.9");
4468
- const initResult = await performInit(config, anonKeyForInit, "1.3.9", healthReport);
4467
+ const healthReport = collectHealthReport("1.4.0");
4468
+ const initResult = await performInit(config, anonKeyForInit, "1.4.0", healthReport);
4469
4469
  if (generation !== registrationGeneration) return;
4470
4470
  const currentState = getCoreState();
4471
4471
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -4488,7 +4488,7 @@ async function backgroundInit(config, anonKeyForInit, generation) {
4488
4488
  }
4489
4489
  maybeInstallConsoleCapture();
4490
4490
  if (didLastInitSucceed()) {
4491
- startHeartbeat(config, anonKeyForInit, "1.3.9", generation, (newApiKey, accountId) => {
4491
+ startHeartbeat(config, anonKeyForInit, "1.4.0", generation, (newApiKey, accountId) => {
4492
4492
  setAuthState(AuthState.CLAIMING);
4493
4493
  emitLifecycleEvent("auth:claim_started", { accountId });
4494
4494
  setResolvedApiKey(newApiKey);
@@ -4785,7 +4785,7 @@ async function handleSourceMapUpload(distDir) {
4785
4785
  );
4786
4786
  return;
4787
4787
  }
4788
- const { discoverSourceMapFiles, computeBuildHash, uploadSourceMaps } = await import("./source-map-uploader-FSTHCYDR.js");
4788
+ const { discoverSourceMapFiles, computeBuildHash, uploadSourceMaps } = await import("./source-map-uploader-PB3M4PPP.js");
4789
4789
  const files = await discoverSourceMapFiles(distDir);
4790
4790
  if (files.length === 0) {
4791
4791
  console.info("[glasstrace] No source map files found. Skipping upload.");
@@ -4888,4 +4888,4 @@ export {
4888
4888
  withGlasstraceConfig,
4889
4889
  captureError
4890
4890
  };
4891
- //# sourceMappingURL=chunk-JH7EGRC5.js.map
4891
+ //# sourceMappingURL=chunk-VQDYXXVS.js.map
package/dist/cli/init.cjs CHANGED
@@ -14482,7 +14482,18 @@ var init_dist = __esm({
14482
14482
  fullConsoleOutput: external_exports.boolean(),
14483
14483
  importGraph: external_exports.boolean(),
14484
14484
  consoleErrors: external_exports.boolean().optional().default(false),
14485
- errorResponseBodies: external_exports.boolean().optional().default(false)
14485
+ errorResponseBodies: external_exports.boolean().optional().default(false),
14486
+ /**
14487
+ * Account opt-in for side-effect evidence emission (SDK-049).
14488
+ *
14489
+ * When `false` (default), `recordSideEffect()` is a silent no-op:
14490
+ * no allowlist evaluation runs and no `glasstrace.side_effect.*`
14491
+ * attribute reaches the wire. When `true`, allowlisted side-effect
14492
+ * metadata is attached to the active OTel span subject to the
14493
+ * client-side allowlist enforcement layered with the product's
14494
+ * storage-time filter as defense-in-depth.
14495
+ */
14496
+ sideEffectEvidence: external_exports.boolean().optional().default(false)
14486
14497
  });
14487
14498
  SdkCachedConfigSchema = external_exports.object({
14488
14499
  response: external_exports.record(external_exports.string(), external_exports.unknown()),
@@ -18868,7 +18879,7 @@ async function verifyAnonKeyRegistration(projectRoot) {
18868
18879
  }
18869
18880
  const baseConfig = resolveConfig({ apiKey: devKey });
18870
18881
  const config2 = { ...baseConfig, apiKey: devKey };
18871
- const sdkVersion = true ? "1.3.9" : "0.0.0-dev";
18882
+ const sdkVersion = true ? "1.4.0" : "0.0.0-dev";
18872
18883
  const result = await verifyInitReachable(config2, anonKey, sdkVersion);
18873
18884
  if (result.ok) {
18874
18885
  return { outcome: "verified" };