@glasstrace/sdk 1.3.6 → 1.3.8
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 +23 -18
- package/dist/{chunk-QJVAKVQJ.js → chunk-4WUHMLMM.js} +2 -2
- package/dist/{chunk-3HWBR7XM.js → chunk-ADUD4PEK.js} +3 -3
- package/dist/{chunk-BQKPRFLF.js → chunk-DBKG6SRI.js} +2 -2
- package/dist/{chunk-IY6A6EXS.js → chunk-E23HN24Z.js} +9 -9
- package/dist/{chunk-IY6A6EXS.js.map → chunk-E23HN24Z.js.map} +1 -1
- package/dist/{chunk-WKOQJCFN.js → chunk-FKBCEOJ5.js} +2 -2
- package/dist/{chunk-LQKJ27LO.js → chunk-GYTCZSAV.js} +48 -3
- package/dist/chunk-GYTCZSAV.js.map +1 -0
- package/dist/{chunk-E62DL2H4.js → chunk-LJMZXJ45.js} +3 -3
- package/dist/{chunk-TZMYGEMB.js → chunk-NKRD3MKG.js} +2 -1
- package/dist/chunk-NKRD3MKG.js.map +1 -0
- package/dist/{chunk-M4ZI7J3N.js → chunk-XS5W3SPL.js} +1 -1
- package/dist/{chunk-M4ZI7J3N.js.map → chunk-XS5W3SPL.js.map} +1 -1
- package/dist/cli/init.cjs +3 -2
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +8 -8
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +1 -0
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +3 -3
- 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-shCc8_Y1.d.ts → edge-entry-BSKA1l_0.d.ts} +1 -1
- package/dist/{edge-entry-DT9OhPTC.d.cts → edge-entry-DyMWa6JK.d.cts} +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 +50 -5
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-DiI6uVEW.d.cts → index.d-Bo_Rxund.d.cts} +4 -1
- package/dist/{index.d-DiI6uVEW.d.ts → index.d-Bo_Rxund.d.ts} +4 -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 +50 -5
- 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-JAD3XM4F.js → source-map-uploader-FSTHCYDR.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-LQKJ27LO.js.map +0 -1
- package/dist/chunk-TZMYGEMB.js.map +0 -1
- /package/dist/{chunk-QJVAKVQJ.js.map → chunk-4WUHMLMM.js.map} +0 -0
- /package/dist/{chunk-3HWBR7XM.js.map → chunk-ADUD4PEK.js.map} +0 -0
- /package/dist/{chunk-BQKPRFLF.js.map → chunk-DBKG6SRI.js.map} +0 -0
- /package/dist/{chunk-WKOQJCFN.js.map → chunk-FKBCEOJ5.js.map} +0 -0
- /package/dist/{chunk-E62DL2H4.js.map → chunk-LJMZXJ45.js.map} +0 -0
- /package/dist/{source-map-uploader-JAD3XM4F.js.map → source-map-uploader-FSTHCYDR.js.map} +0 -0
package/dist/edge-entry.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-
|
|
2
|
-
import './index.d-
|
|
1
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-DyMWa6JK.cjs';
|
|
2
|
+
import './index.d-Bo_Rxund.cjs';
|
|
3
3
|
import './v4/classic/external.cjs';
|
|
4
4
|
import './export/ReadableSpan';
|
|
5
5
|
import './Span';
|
package/dist/edge-entry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-
|
|
2
|
-
import './index.d-
|
|
1
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, c as captureCorrelationId } from './edge-entry-BSKA1l_0.js';
|
|
2
|
+
import './index.d-Bo_Rxund.js';
|
|
3
3
|
import './v4/classic/external.cjs';
|
|
4
4
|
import './export/ReadableSpan';
|
|
5
5
|
import './Span';
|
package/dist/edge-entry.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
GlasstraceSpanProcessor,
|
|
3
3
|
SdkError,
|
|
4
4
|
captureCorrelationId
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FKBCEOJ5.js";
|
|
6
6
|
import "./chunk-DQ25VOKK.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-XS5W3SPL.js";
|
|
8
8
|
import "./chunk-NSBPE2FW.js";
|
|
9
9
|
export {
|
|
10
10
|
GlasstraceSpanProcessor,
|
package/dist/index.cjs
CHANGED
|
@@ -17678,6 +17678,50 @@ function mcpConfigMatches(existingContent, expectedContent) {
|
|
|
17678
17678
|
}
|
|
17679
17679
|
return existingContent.trim() === trimmedExpected;
|
|
17680
17680
|
}
|
|
17681
|
+
function genericMcpConfigOrLegacyShapeMatches(existingContent, expectedGenericContent) {
|
|
17682
|
+
if (mcpConfigMatches(existingContent, expectedGenericContent)) {
|
|
17683
|
+
return true;
|
|
17684
|
+
}
|
|
17685
|
+
try {
|
|
17686
|
+
const expectedParsed = JSON.parse(expectedGenericContent.trim());
|
|
17687
|
+
const expectedLegacy = stripTypeFromGlasstraceServer(expectedParsed);
|
|
17688
|
+
if (expectedLegacy === null) {
|
|
17689
|
+
return false;
|
|
17690
|
+
}
|
|
17691
|
+
const existingParsed = JSON.parse(existingContent);
|
|
17692
|
+
return JSON.stringify(canonicalize(existingParsed)) === JSON.stringify(canonicalize(expectedLegacy));
|
|
17693
|
+
} catch {
|
|
17694
|
+
return false;
|
|
17695
|
+
}
|
|
17696
|
+
}
|
|
17697
|
+
function stripTypeFromGlasstraceServer(value) {
|
|
17698
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
17699
|
+
return null;
|
|
17700
|
+
}
|
|
17701
|
+
const root = value;
|
|
17702
|
+
const servers = root["mcpServers"];
|
|
17703
|
+
if (servers === null || typeof servers !== "object" || Array.isArray(servers)) {
|
|
17704
|
+
return null;
|
|
17705
|
+
}
|
|
17706
|
+
const serversObj = servers;
|
|
17707
|
+
const server = serversObj["glasstrace"];
|
|
17708
|
+
if (server === null || typeof server !== "object" || Array.isArray(server)) {
|
|
17709
|
+
return null;
|
|
17710
|
+
}
|
|
17711
|
+
const serverObj = server;
|
|
17712
|
+
if (serverObj["type"] !== "http") {
|
|
17713
|
+
return null;
|
|
17714
|
+
}
|
|
17715
|
+
const { type: _omittedType, ...serverWithoutType } = serverObj;
|
|
17716
|
+
void _omittedType;
|
|
17717
|
+
return {
|
|
17718
|
+
...root,
|
|
17719
|
+
mcpServers: {
|
|
17720
|
+
...serversObj,
|
|
17721
|
+
glasstrace: serverWithoutType
|
|
17722
|
+
}
|
|
17723
|
+
};
|
|
17724
|
+
}
|
|
17681
17725
|
function canonicalize(value) {
|
|
17682
17726
|
if (Array.isArray(value)) {
|
|
17683
17727
|
return value.map(canonicalize);
|
|
@@ -17840,6 +17884,7 @@ function genericMcpConfigContent(endpoint, bearer) {
|
|
|
17840
17884
|
{
|
|
17841
17885
|
mcpServers: {
|
|
17842
17886
|
glasstrace: {
|
|
17887
|
+
type: "http",
|
|
17843
17888
|
url: endpoint,
|
|
17844
17889
|
headers: {
|
|
17845
17890
|
Authorization: `Bearer ${bearer}`
|
|
@@ -17873,7 +17918,7 @@ async function refreshGenericMcpConfigAtRuntime(projectRoot, effective, anonKeyO
|
|
|
17873
17918
|
return { action: "preserved" };
|
|
17874
17919
|
}
|
|
17875
17920
|
const expectedAnon = genericMcpConfigContent(MCP_ENDPOINT, anonKeyOnDisk);
|
|
17876
|
-
if (!
|
|
17921
|
+
if (!genericMcpConfigOrLegacyShapeMatches(existing, expectedAnon)) {
|
|
17877
17922
|
return { action: "preserved" };
|
|
17878
17923
|
}
|
|
17879
17924
|
const replacement = genericMcpConfigContent(MCP_ENDPOINT, effective.key);
|
|
@@ -22632,7 +22677,7 @@ function registerGlasstrace(options) {
|
|
|
22632
22677
|
setCoreState(CoreState.REGISTERING);
|
|
22633
22678
|
startRuntimeStateWriter({
|
|
22634
22679
|
projectRoot: process.cwd(),
|
|
22635
|
-
sdkVersion: "1.3.
|
|
22680
|
+
sdkVersion: "1.3.8"
|
|
22636
22681
|
});
|
|
22637
22682
|
const config2 = resolveConfig(options);
|
|
22638
22683
|
if (config2.verbose) {
|
|
@@ -22799,8 +22844,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
22799
22844
|
if (config2.verbose) {
|
|
22800
22845
|
console.info("[glasstrace] Background init firing.");
|
|
22801
22846
|
}
|
|
22802
|
-
const healthReport = collectHealthReport("1.3.
|
|
22803
|
-
const initResult = await performInit(config2, anonKeyForInit, "1.3.
|
|
22847
|
+
const healthReport = collectHealthReport("1.3.8");
|
|
22848
|
+
const initResult = await performInit(config2, anonKeyForInit, "1.3.8", healthReport);
|
|
22804
22849
|
if (generation !== registrationGeneration) return;
|
|
22805
22850
|
const currentState = getCoreState();
|
|
22806
22851
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -22823,7 +22868,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
22823
22868
|
}
|
|
22824
22869
|
maybeInstallConsoleCapture();
|
|
22825
22870
|
if (didLastInitSucceed()) {
|
|
22826
|
-
startHeartbeat(config2, anonKeyForInit, "1.3.
|
|
22871
|
+
startHeartbeat(config2, anonKeyForInit, "1.3.8", generation, (newApiKey, accountId) => {
|
|
22827
22872
|
setAuthState(AuthState.CLAIMING);
|
|
22828
22873
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
22829
22874
|
setResolvedApiKey(newApiKey);
|