@glasstrace/sdk 1.3.0 → 1.3.2
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.
- package/dist/{chunk-AGCYKZFY.js → chunk-CRM3EYOL.js} +2 -2
- package/dist/{chunk-JMYKR5Z3.js → chunk-DQGNUENK.js} +14 -9
- package/dist/chunk-DQGNUENK.js.map +1 -0
- package/dist/{chunk-FVHVDBGX.js → chunk-GCFOY7T2.js} +3 -3
- package/dist/{chunk-FVHVDBGX.js.map → chunk-GCFOY7T2.js.map} +1 -1
- package/dist/{chunk-FMEWG3FY.js → chunk-JFR42QG5.js} +2 -2
- package/dist/{chunk-GTPTKN5A.js → chunk-MQHLWSIX.js} +1 -1
- package/dist/{chunk-GTPTKN5A.js.map → chunk-MQHLWSIX.js.map} +1 -1
- package/dist/{chunk-A63WX7NR.js → chunk-REEU6CNO.js} +3 -3
- package/dist/{chunk-AYUL5QMZ.js → chunk-UFZEISZB.js} +11 -2
- package/dist/chunk-UFZEISZB.js.map +1 -0
- package/dist/{chunk-AKZGMT33.js → chunk-XS3BO7RY.js} +2 -2
- package/dist/cli/init.cjs +1 -1
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +6 -6
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +2 -2
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{edge-entry-DYl05SJ-.d.cts → edge-entry-DT9OhPTC.d.cts} +1 -1
- package/dist/{edge-entry-CFq085RZ.d.ts → edge-entry-shCc8_Y1.d.ts} +1 -1
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +2 -2
- package/dist/index.cjs +16 -4
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-CYYe3PxB.d.ts → index.d-DiI6uVEW.d.cts} +1 -1
- package/dist/{index.d-CYYe3PxB.d.cts → index.d-DiI6uVEW.d.ts} +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/node-entry.cjs +16 -4
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +2 -2
- package/dist/node-entry.d.ts +2 -2
- package/dist/node-entry.js +7 -7
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +1 -1
- package/dist/node-subpath.d.ts +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-M2P5CDOB.js → source-map-uploader-LACAGKIW.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-AYUL5QMZ.js.map +0 -1
- package/dist/chunk-JMYKR5Z3.js.map +0 -1
- /package/dist/{chunk-AGCYKZFY.js.map → chunk-CRM3EYOL.js.map} +0 -0
- /package/dist/{chunk-FMEWG3FY.js.map → chunk-JFR42QG5.js.map} +0 -0
- /package/dist/{chunk-A63WX7NR.js.map → chunk-REEU6CNO.js.map} +0 -0
- /package/dist/{chunk-AKZGMT33.js.map → chunk-XS3BO7RY.js.map} +0 -0
- /package/dist/{source-map-uploader-M2P5CDOB.js.map → source-map-uploader-LACAGKIW.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import * as z from './v4/classic/external.cjs';
|
|
|
3
3
|
/**
|
|
4
4
|
* Anonymous API key: `gt_anon_` + 48 hex chars.
|
|
5
5
|
*
|
|
6
|
-
* @drift-check ../glasstrace-product/docs/component-designs/sdk-
|
|
6
|
+
* @drift-check ../glasstrace-product/docs/component-designs/sdk-architecture.md §1.2 Lens B — SDK-Facing Security Primitives (row `Anon API key gt_anon_[a-f0-9]{48}`)
|
|
7
7
|
*/
|
|
8
8
|
declare const AnonApiKeySchema: z.core.$ZodBranded<z.ZodString, "AnonApiKey", "out">;
|
|
9
9
|
type AnonApiKey = z.infer<typeof AnonApiKeySchema>;
|
|
@@ -3,7 +3,7 @@ import * as z from './v4/classic/external.cjs';
|
|
|
3
3
|
/**
|
|
4
4
|
* Anonymous API key: `gt_anon_` + 48 hex chars.
|
|
5
5
|
*
|
|
6
|
-
* @drift-check ../glasstrace-product/docs/component-designs/sdk-
|
|
6
|
+
* @drift-check ../glasstrace-product/docs/component-designs/sdk-architecture.md §1.2 Lens B — SDK-Facing Security Primitives (row `Anon API key gt_anon_[a-f0-9]{48}`)
|
|
7
7
|
*/
|
|
8
8
|
declare const AnonApiKeySchema: z.core.$ZodBranded<z.ZodString, "AnonApiKey", "out">;
|
|
9
9
|
type AnonApiKey = z.infer<typeof AnonApiKeySchema>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SessionManager } from './edge-entry-
|
|
2
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId, g as getDateString, b as getOrigin } from './edge-entry-
|
|
3
|
-
import { G as GlasstraceEnvVars, a as GlasstraceOptions, A as AnonApiKey, S as SdkInitResponse, C as CaptureConfig, b as SdkHealthReport, I as ImportGraphPayload, c as SdkDiagnosticCode } from './index.d-
|
|
4
|
-
export { d as deriveSessionId } from './index.d-
|
|
1
|
+
import { a as SessionManager } from './edge-entry-DT9OhPTC.cjs';
|
|
2
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId, g as getDateString, b as getOrigin } from './edge-entry-DT9OhPTC.cjs';
|
|
3
|
+
import { G as GlasstraceEnvVars, a as GlasstraceOptions, A as AnonApiKey, S as SdkInitResponse, C as CaptureConfig, b as SdkHealthReport, I as ImportGraphPayload, c as SdkDiagnosticCode } from './index.d-DiI6uVEW.cjs';
|
|
4
|
+
export { d as deriveSessionId } from './index.d-DiI6uVEW.cjs';
|
|
5
5
|
import { ReadableSpan } from './export/ReadableSpan';
|
|
6
6
|
import { SpanExporter } from './export/SpanExporter';
|
|
7
7
|
import { ExportResult } from './ExportResult';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SessionManager } from './edge-entry-
|
|
2
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId, g as getDateString, b as getOrigin } from './edge-entry-
|
|
3
|
-
import { G as GlasstraceEnvVars, a as GlasstraceOptions, A as AnonApiKey, S as SdkInitResponse, C as CaptureConfig, b as SdkHealthReport, I as ImportGraphPayload, c as SdkDiagnosticCode } from './index.d-
|
|
4
|
-
export { d as deriveSessionId } from './index.d-
|
|
1
|
+
import { a as SessionManager } from './edge-entry-shCc8_Y1.js';
|
|
2
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId, g as getDateString, b as getOrigin } from './edge-entry-shCc8_Y1.js';
|
|
3
|
+
import { G as GlasstraceEnvVars, a as GlasstraceOptions, A as AnonApiKey, S as SdkInitResponse, C as CaptureConfig, b as SdkHealthReport, I as ImportGraphPayload, c as SdkDiagnosticCode } from './index.d-DiI6uVEW.js';
|
|
4
|
+
export { d as deriveSessionId } from './index.d-DiI6uVEW.js';
|
|
5
5
|
import { ReadableSpan } from './export/ReadableSpan';
|
|
6
6
|
import { SpanExporter } from './export/SpanExporter';
|
|
7
7
|
import { ExportResult } from './ExportResult';
|
package/dist/index.js
CHANGED
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
registerGlasstrace,
|
|
13
13
|
waitForReady,
|
|
14
14
|
withGlasstraceConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DQGNUENK.js";
|
|
16
16
|
import {
|
|
17
17
|
GlasstraceSpanProcessor,
|
|
18
18
|
SdkError,
|
|
19
19
|
captureCorrelationId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CRM3EYOL.js";
|
|
21
21
|
import "./chunk-DQ25VOKK.js";
|
|
22
22
|
import "./chunk-3TU62WD6.js";
|
|
23
23
|
import {
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
performInit,
|
|
28
28
|
saveCachedConfig,
|
|
29
29
|
sendInitRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-REEU6CNO.js";
|
|
31
31
|
import {
|
|
32
32
|
isAnonymousMode,
|
|
33
33
|
isProductionDisabled,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
getOrCreateAnonKey,
|
|
39
39
|
readAnonKey
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UFZEISZB.js";
|
|
41
41
|
import {
|
|
42
42
|
deriveSessionId
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-MQHLWSIX.js";
|
|
44
44
|
import "./chunk-NSBPE2FW.js";
|
|
45
45
|
export {
|
|
46
46
|
GlasstraceExporter,
|
package/dist/node-entry.cjs
CHANGED
|
@@ -17698,6 +17698,14 @@ function fsyncParentDirSyncWithFs(targetPath, fs4) {
|
|
|
17698
17698
|
}
|
|
17699
17699
|
}
|
|
17700
17700
|
}
|
|
17701
|
+
function isSyncFsAvailable() {
|
|
17702
|
+
try {
|
|
17703
|
+
loadFsSync();
|
|
17704
|
+
return true;
|
|
17705
|
+
} catch {
|
|
17706
|
+
return false;
|
|
17707
|
+
}
|
|
17708
|
+
}
|
|
17701
17709
|
|
|
17702
17710
|
// src/mcp-runtime.ts
|
|
17703
17711
|
var MCP_ENDPOINT = "https://api.glasstrace.dev/mcp";
|
|
@@ -22502,6 +22510,10 @@ var _debounceTimer = null;
|
|
|
22502
22510
|
var _started = false;
|
|
22503
22511
|
function startRuntimeStateWriter(options) {
|
|
22504
22512
|
if (_started) return;
|
|
22513
|
+
if (!isSyncFsAvailable()) {
|
|
22514
|
+
_started = true;
|
|
22515
|
+
return;
|
|
22516
|
+
}
|
|
22505
22517
|
_started = true;
|
|
22506
22518
|
_projectRoot = options.projectRoot;
|
|
22507
22519
|
_sdkVersion = options.sdkVersion;
|
|
@@ -22587,7 +22599,7 @@ function registerGlasstrace(options) {
|
|
|
22587
22599
|
setCoreState(CoreState.REGISTERING);
|
|
22588
22600
|
startRuntimeStateWriter({
|
|
22589
22601
|
projectRoot: process.cwd(),
|
|
22590
|
-
sdkVersion: "1.3.
|
|
22602
|
+
sdkVersion: "1.3.2"
|
|
22591
22603
|
});
|
|
22592
22604
|
const config2 = resolveConfig(options);
|
|
22593
22605
|
if (config2.verbose) {
|
|
@@ -22753,8 +22765,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
22753
22765
|
if (config2.verbose) {
|
|
22754
22766
|
console.info("[glasstrace] Background init firing.");
|
|
22755
22767
|
}
|
|
22756
|
-
const healthReport = collectHealthReport("1.3.
|
|
22757
|
-
const initResult = await performInit(config2, anonKeyForInit, "1.3.
|
|
22768
|
+
const healthReport = collectHealthReport("1.3.2");
|
|
22769
|
+
const initResult = await performInit(config2, anonKeyForInit, "1.3.2", healthReport);
|
|
22758
22770
|
if (generation !== registrationGeneration) return;
|
|
22759
22771
|
const currentState = getCoreState();
|
|
22760
22772
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -22777,7 +22789,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
22777
22789
|
}
|
|
22778
22790
|
maybeInstallConsoleCapture();
|
|
22779
22791
|
if (didLastInitSucceed()) {
|
|
22780
|
-
startHeartbeat(config2, anonKeyForInit, "1.3.
|
|
22792
|
+
startHeartbeat(config2, anonKeyForInit, "1.3.2", generation, (newApiKey, accountId) => {
|
|
22781
22793
|
setAuthState(AuthState.CLAIMING);
|
|
22782
22794
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
22783
22795
|
setResolvedApiKey(newApiKey);
|