@glasstrace/sdk 0.17.0 → 0.17.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/README.md +12 -0
- package/dist/{chunk-CTJI2YKA.js → chunk-HAU66QBQ.js} +2 -1
- package/dist/chunk-HAU66QBQ.js.map +1 -0
- package/dist/{chunk-UUUKI65I.js → chunk-IOPCSX6C.js} +12 -4
- package/dist/chunk-IOPCSX6C.js.map +1 -0
- package/dist/cli/init.cjs +2 -1
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +3 -3
- package/dist/cli/mcp-add.cjs +1 -0
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +1 -1
- package/dist/index.cjs +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/package.json +4 -3
- package/dist/chunk-CTJI2YKA.js.map +0 -1
- package/dist/chunk-UUUKI65I.js.map +0 -1
package/dist/cli/mcp-add.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -17507,6 +17507,7 @@ async function performInit(config2, anonKey, sdkVersion, healthReport) {
|
|
|
17507
17507
|
rateLimitBackoff = false;
|
|
17508
17508
|
return null;
|
|
17509
17509
|
}
|
|
17510
|
+
let failureRecorded = false;
|
|
17510
17511
|
try {
|
|
17511
17512
|
const effectiveKey = config2.apiKey || anonKey;
|
|
17512
17513
|
if (!effectiveKey) {
|
|
@@ -17539,6 +17540,7 @@ async function performInit(config2, anonKey, sdkVersion, healthReport) {
|
|
|
17539
17540
|
return null;
|
|
17540
17541
|
} catch (err) {
|
|
17541
17542
|
recordInitFailure();
|
|
17543
|
+
failureRecorded = true;
|
|
17542
17544
|
if (err instanceof HttpsTransportError) {
|
|
17543
17545
|
if (/timed out|aborted/i.test(err.message)) {
|
|
17544
17546
|
console.warn("[glasstrace] ingestion_unreachable: Init request timed out.");
|
|
@@ -17577,9 +17579,15 @@ async function performInit(config2, anonKey, sdkVersion, healthReport) {
|
|
|
17577
17579
|
return null;
|
|
17578
17580
|
}
|
|
17579
17581
|
} catch (err) {
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17582
|
+
if (!failureRecorded) {
|
|
17583
|
+
recordInitFailure();
|
|
17584
|
+
}
|
|
17585
|
+
try {
|
|
17586
|
+
console.warn(
|
|
17587
|
+
`[glasstrace] Unexpected init error: ${err instanceof Error ? err.message : String(err)}`
|
|
17588
|
+
);
|
|
17589
|
+
} catch {
|
|
17590
|
+
}
|
|
17583
17591
|
}
|
|
17584
17592
|
return null;
|
|
17585
17593
|
}
|
|
@@ -21681,7 +21689,7 @@ function registerGlasstrace(options) {
|
|
|
21681
21689
|
setCoreState(CoreState.REGISTERING);
|
|
21682
21690
|
startRuntimeStateWriter({
|
|
21683
21691
|
projectRoot: process.cwd(),
|
|
21684
|
-
sdkVersion: "0.17.
|
|
21692
|
+
sdkVersion: "0.17.2"
|
|
21685
21693
|
});
|
|
21686
21694
|
const config2 = resolveConfig(options);
|
|
21687
21695
|
if (config2.verbose) {
|
|
@@ -21846,8 +21854,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
21846
21854
|
if (config2.verbose) {
|
|
21847
21855
|
console.info("[glasstrace] Background init firing.");
|
|
21848
21856
|
}
|
|
21849
|
-
const healthReport = collectHealthReport("0.17.
|
|
21850
|
-
const initResult = await performInit(config2, anonKeyForInit, "0.17.
|
|
21857
|
+
const healthReport = collectHealthReport("0.17.2");
|
|
21858
|
+
const initResult = await performInit(config2, anonKeyForInit, "0.17.2", healthReport);
|
|
21851
21859
|
if (generation !== registrationGeneration) return;
|
|
21852
21860
|
const currentState = getCoreState();
|
|
21853
21861
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -21870,7 +21878,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
21870
21878
|
}
|
|
21871
21879
|
maybeInstallConsoleCapture();
|
|
21872
21880
|
if (didLastInitSucceed()) {
|
|
21873
|
-
startHeartbeat(config2, anonKeyForInit, "0.17.
|
|
21881
|
+
startHeartbeat(config2, anonKeyForInit, "0.17.2", generation, (newApiKey, accountId) => {
|
|
21874
21882
|
setAuthState(AuthState.CLAIMING);
|
|
21875
21883
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
21876
21884
|
setResolvedApiKey(newApiKey);
|