@glasstrace/sdk 1.10.1 → 1.11.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.
- package/README.md +43 -5
- package/dist/{chunk-WQF7ZQOM.js → chunk-DQFGNX3H.js} +13 -8
- package/dist/{chunk-WQF7ZQOM.js.map → chunk-DQFGNX3H.js.map} +1 -1
- package/dist/{chunk-UMGZJYC4.js → chunk-FQ4SEG6Y.js} +8 -3
- package/dist/chunk-FQ4SEG6Y.js.map +1 -0
- package/dist/chunk-KOYZJN6G.js +651 -0
- package/dist/chunk-KOYZJN6G.js.map +1 -0
- package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
- package/dist/chunk-YIEXKQYP.js.map +1 -0
- package/dist/cli/init.cjs +460 -127
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +29 -16
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +346 -98
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +32 -14
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +6 -1
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.js +7 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +6 -1
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +2 -2
- package/dist/cli/upgrade-instructions.cjs +390 -113
- package/dist/cli/upgrade-instructions.cjs.map +1 -1
- package/dist/cli/upgrade-instructions.js +70 -18
- package/dist/cli/upgrade-instructions.js.map +1 -1
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/node-entry.cjs +11 -6
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-TJ46YOGJ.js +0 -355
- package/dist/chunk-TJ46YOGJ.js.map +0 -1
- package/dist/chunk-UMGZJYC4.js.map +0 -1
- package/dist/chunk-ZBQQXVHD.js.map +0 -1
package/dist/cli/init.js
CHANGED
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
unwrapCJSExport,
|
|
22
22
|
unwrapExport,
|
|
23
23
|
writeDiscoveryFile
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-FQ4SEG6Y.js";
|
|
25
25
|
import {
|
|
26
26
|
detectAgents,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from "../chunk-
|
|
27
|
+
generateMcpConfig,
|
|
28
|
+
injectAllTargets
|
|
29
|
+
} from "../chunk-KOYZJN6G.js";
|
|
30
30
|
import {
|
|
31
31
|
MCP_ENDPOINT,
|
|
32
32
|
getOrCreateAnonKey,
|
|
@@ -44,10 +44,9 @@ import {
|
|
|
44
44
|
formatAgentName
|
|
45
45
|
} from "../chunk-NB7GJE4S.js";
|
|
46
46
|
import {
|
|
47
|
-
injectInfoSection,
|
|
48
47
|
updateGitignore,
|
|
49
48
|
writeMcpConfig
|
|
50
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-YIEXKQYP.js";
|
|
51
50
|
import "../chunk-NSBPE2FW.js";
|
|
52
51
|
|
|
53
52
|
// src/cli/init.ts
|
|
@@ -877,6 +876,7 @@ Then add this as the first statement in your register() function:
|
|
|
877
876
|
agents = [];
|
|
878
877
|
}
|
|
879
878
|
const configuredNames = [];
|
|
879
|
+
const agentsWithMcpReady = [];
|
|
880
880
|
for (const agent of agents) {
|
|
881
881
|
try {
|
|
882
882
|
const configContent = generateMcpConfig(agent, MCP_ENDPOINT, bearer);
|
|
@@ -891,6 +891,7 @@ Then add this as the first statement in your register() function:
|
|
|
891
891
|
);
|
|
892
892
|
if (agent.mcpConfigPath !== null && fs2.existsSync(agent.mcpConfigPath)) {
|
|
893
893
|
anyConfigWritten = true;
|
|
894
|
+
agentsWithMcpReady.push(agent);
|
|
894
895
|
}
|
|
895
896
|
continue;
|
|
896
897
|
}
|
|
@@ -901,15 +902,7 @@ Then add this as the first statement in your register() function:
|
|
|
901
902
|
}
|
|
902
903
|
anyConfigWritten = true;
|
|
903
904
|
anyConfigRewrittenWithBearer = true;
|
|
904
|
-
|
|
905
|
-
const infoContent = generateInfoSection(
|
|
906
|
-
agent,
|
|
907
|
-
MCP_ENDPOINT,
|
|
908
|
-
sdkVersionForInject
|
|
909
|
-
);
|
|
910
|
-
if (infoContent !== "") {
|
|
911
|
-
await injectInfoSection(agent, infoContent, projectRoot);
|
|
912
|
-
}
|
|
905
|
+
agentsWithMcpReady.push(agent);
|
|
913
906
|
if (agent.name !== "generic") {
|
|
914
907
|
configuredNames.push(formatAgentName(agent.name));
|
|
915
908
|
}
|
|
@@ -919,6 +912,26 @@ Then add this as the first statement in your register() function:
|
|
|
919
912
|
);
|
|
920
913
|
}
|
|
921
914
|
}
|
|
915
|
+
const detectedNonGeneric = agents.filter((a) => a.name !== "generic");
|
|
916
|
+
const nonGenericReady = agentsWithMcpReady.filter(
|
|
917
|
+
(a) => a.name !== "generic"
|
|
918
|
+
);
|
|
919
|
+
const dispatchSet = detectedNonGeneric.length === 0 ? agentsWithMcpReady : nonGenericReady;
|
|
920
|
+
if (dispatchSet.length > 0) {
|
|
921
|
+
const sdkVersionForInject = true ? "1.11.0" : "0.0.0-dev";
|
|
922
|
+
try {
|
|
923
|
+
await injectAllTargets(
|
|
924
|
+
dispatchSet,
|
|
925
|
+
MCP_ENDPOINT,
|
|
926
|
+
sdkVersionForInject,
|
|
927
|
+
projectRoot
|
|
928
|
+
);
|
|
929
|
+
} catch (injectErr) {
|
|
930
|
+
warnings.push(
|
|
931
|
+
`Failed to write agent-instruction files: ${injectErr instanceof Error ? injectErr.message : String(injectErr)}`
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
922
935
|
if (configuredNames.length > 0) {
|
|
923
936
|
summary.push(`Configured MCP for: ${configuredNames.join(", ")}`);
|
|
924
937
|
} else if (anyConfigWritten) {
|
|
@@ -1007,7 +1020,7 @@ async function verifyAnonKeyRegistration(projectRoot) {
|
|
|
1007
1020
|
}
|
|
1008
1021
|
const baseConfig = resolveConfig({ apiKey: devKey });
|
|
1009
1022
|
const config = { ...baseConfig, apiKey: devKey };
|
|
1010
|
-
const sdkVersion = true ? "1.
|
|
1023
|
+
const sdkVersion = true ? "1.11.0" : "0.0.0-dev";
|
|
1011
1024
|
const result = await verifyInitReachable(config, anonKey, sdkVersion);
|
|
1012
1025
|
if (result.ok) {
|
|
1013
1026
|
return { outcome: "verified" };
|