@glasstrace/sdk 1.3.8 → 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 (61) 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-NKRD3MKG.js → chunk-JZ475QRH.js} +2 -1
  7. package/dist/chunk-JZ475QRH.js.map +1 -0
  8. package/dist/{chunk-GYTCZSAV.js → chunk-MFYOQOD7.js} +2 -2
  9. package/dist/{chunk-4WUHMLMM.js → chunk-MMKFFF2L.js} +2 -2
  10. package/dist/{chunk-FKBCEOJ5.js → chunk-Q42BY5BA.js} +2 -2
  11. package/dist/{chunk-DBKG6SRI.js → chunk-QU26IKIJ.js} +2 -2
  12. package/dist/{chunk-ADUD4PEK.js → chunk-TANUWTFO.js} +3 -3
  13. package/dist/{chunk-LJMZXJ45.js → chunk-VJQIFY33.js} +3 -3
  14. package/dist/{chunk-E23HN24Z.js → chunk-VQDYXXVS.js} +9 -9
  15. package/dist/cli/init.cjs +14 -2
  16. package/dist/cli/init.cjs.map +1 -1
  17. package/dist/cli/init.js +7 -7
  18. package/dist/cli/mcp-add.cjs +13 -1
  19. package/dist/cli/mcp-add.cjs.map +1 -1
  20. package/dist/cli/mcp-add.js +3 -3
  21. package/dist/cli/uninit.js +3 -3
  22. package/dist/cli/validate.cjs +12 -1
  23. package/dist/cli/validate.cjs.map +1 -1
  24. package/dist/cli/validate.js +2 -2
  25. package/dist/{edge-entry-BSKA1l_0.d.ts → edge-entry-AWO70gje.d.ts} +1 -1
  26. package/dist/{edge-entry-DyMWa6JK.d.cts → edge-entry-DaeG7D7S.d.cts} +1 -1
  27. package/dist/edge-entry.cjs +43 -2
  28. package/dist/edge-entry.cjs.map +1 -1
  29. package/dist/edge-entry.d.cts +2 -2
  30. package/dist/edge-entry.d.ts +2 -2
  31. package/dist/edge-entry.js +2 -2
  32. package/dist/index.cjs +369 -8
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/{index.d-Bo_Rxund.d.cts → index.d-Dq33YwFT.d.cts} +91 -1
  35. package/dist/{index.d-Bo_Rxund.d.ts → index.d-Dq33YwFT.d.ts} +91 -1
  36. package/dist/index.d.cts +91 -431
  37. package/dist/index.d.ts +91 -431
  38. package/dist/index.js +290 -6
  39. package/dist/index.js.map +1 -1
  40. package/dist/node-entry.cjs +49 -7
  41. package/dist/node-entry.cjs.map +1 -1
  42. package/dist/node-entry.d.cts +3 -3
  43. package/dist/node-entry.d.ts +3 -3
  44. package/dist/node-entry.js +7 -7
  45. package/dist/node-subpath.cjs +12 -1
  46. package/dist/node-subpath.cjs.map +1 -1
  47. package/dist/node-subpath.d.cts +1 -1
  48. package/dist/node-subpath.d.ts +1 -1
  49. package/dist/node-subpath.js +3 -3
  50. package/dist/{source-map-uploader-FSTHCYDR.js → source-map-uploader-PB3M4PPP.js} +3 -3
  51. package/package.json +1 -1
  52. package/dist/chunk-NKRD3MKG.js.map +0 -1
  53. package/dist/chunk-XS5W3SPL.js.map +0 -1
  54. /package/dist/{chunk-GYTCZSAV.js.map → chunk-MFYOQOD7.js.map} +0 -0
  55. /package/dist/{chunk-4WUHMLMM.js.map → chunk-MMKFFF2L.js.map} +0 -0
  56. /package/dist/{chunk-FKBCEOJ5.js.map → chunk-Q42BY5BA.js.map} +0 -0
  57. /package/dist/{chunk-DBKG6SRI.js.map → chunk-QU26IKIJ.js.map} +0 -0
  58. /package/dist/{chunk-ADUD4PEK.js.map → chunk-TANUWTFO.js.map} +0 -0
  59. /package/dist/{chunk-LJMZXJ45.js.map → chunk-VJQIFY33.js.map} +0 -0
  60. /package/dist/{chunk-E23HN24Z.js.map → chunk-VQDYXXVS.js.map} +0 -0
  61. /package/dist/{source-map-uploader-FSTHCYDR.js.map → source-map-uploader-PB3M4PPP.js.map} +0 -0
package/dist/cli/init.js CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  } from "../chunk-2M57EO6U.js";
5
5
  import {
6
6
  verifyInitReachable
7
- } from "../chunk-ADUD4PEK.js";
7
+ } from "../chunk-TANUWTFO.js";
8
8
  import {
9
9
  buildImportGraph
10
- } from "../chunk-4WUHMLMM.js";
10
+ } from "../chunk-MMKFFF2L.js";
11
11
  import {
12
12
  resolveConfig
13
13
  } from "../chunk-VUZCLMIX.js";
@@ -21,7 +21,7 @@ import {
21
21
  unwrapCJSExport,
22
22
  unwrapExport,
23
23
  writeDiscoveryFile
24
- } from "../chunk-LJMZXJ45.js";
24
+ } from "../chunk-VJQIFY33.js";
25
25
  import {
26
26
  detectAgents,
27
27
  generateInfoSection,
@@ -29,7 +29,7 @@ import {
29
29
  injectInfoSection,
30
30
  updateGitignore,
31
31
  writeMcpConfig
32
- } from "../chunk-NKRD3MKG.js";
32
+ } from "../chunk-JZ475QRH.js";
33
33
  import {
34
34
  MCP_ENDPOINT,
35
35
  getOrCreateAnonKey,
@@ -40,8 +40,8 @@ import {
40
40
  readEnvLocalApiKey,
41
41
  resolveEffectiveMcpCredential,
42
42
  writeMcpMarker
43
- } from "../chunk-GYTCZSAV.js";
44
- import "../chunk-XS5W3SPL.js";
43
+ } from "../chunk-MFYOQOD7.js";
44
+ import "../chunk-4WI7B5FQ.js";
45
45
  import {
46
46
  NEXT_CONFIG_NAMES,
47
47
  formatAgentName
@@ -994,7 +994,7 @@ async function verifyAnonKeyRegistration(projectRoot) {
994
994
  }
995
995
  const baseConfig = resolveConfig({ apiKey: devKey });
996
996
  const config = { ...baseConfig, apiKey: devKey };
997
- const sdkVersion = true ? "1.3.8" : "0.0.0-dev";
997
+ const sdkVersion = true ? "1.4.0" : "0.0.0-dev";
998
998
  const result = await verifyInitReachable(config, anonKey, sdkVersion);
999
999
  if (result.ok) {
1000
1000
  return { outcome: "verified" };
@@ -13831,7 +13831,18 @@ var CaptureConfigSchema = external_exports.object({
13831
13831
  fullConsoleOutput: external_exports.boolean(),
13832
13832
  importGraph: external_exports.boolean(),
13833
13833
  consoleErrors: external_exports.boolean().optional().default(false),
13834
- errorResponseBodies: external_exports.boolean().optional().default(false)
13834
+ errorResponseBodies: external_exports.boolean().optional().default(false),
13835
+ /**
13836
+ * Account opt-in for side-effect evidence emission (SDK-049).
13837
+ *
13838
+ * When `false` (default), `recordSideEffect()` is a silent no-op:
13839
+ * no allowlist evaluation runs and no `glasstrace.side_effect.*`
13840
+ * attribute reaches the wire. When `true`, allowlisted side-effect
13841
+ * metadata is attached to the active OTel span subject to the
13842
+ * client-side allowlist enforcement layered with the product's
13843
+ * storage-time filter as defense-in-depth.
13844
+ */
13845
+ sideEffectEvidence: external_exports.boolean().optional().default(false)
13835
13846
  });
13836
13847
  var SdkCachedConfigSchema = external_exports.object({
13837
13848
  response: external_exports.record(external_exports.string(), external_exports.unknown()),
@@ -14527,6 +14538,7 @@ function generateInfoSection(agent, endpoint) {
14527
14538
  "",
14528
14539
  "Available tools:",
14529
14540
  "- `get_latest_error` - Get the most recent error trace from the current session",
14541
+ "- `find_trace_candidates` - First-contact route/procedure/URL candidate selection when you have a route fragment, tRPC procedure, method, status, or rough recent activity window but not the exact trace ID. Returns candidate traces plus suggested `get_trace` / `get_root_cause` follow-up call arguments. Candidate discovery, not root-cause proof.",
14530
14542
  "- `get_error_list` - List recent errors with filtering and pagination",
14531
14543
  "- `get_trace` - Get a specific trace by ID or URL pattern",
14532
14544
  "- `get_root_cause` - Get the root cause analysis for a specific error trace (requires a `traceId` from `get_latest_error`, `get_error_list`, or `get_trace`)",