@cubis/foundry 0.3.65 → 0.3.67
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/CHANGELOG.md +12 -0
- package/README.md +2 -1
- package/dist/cli/core.js +78 -18
- package/dist/cli/core.js.map +1 -1
- package/dist/cli/init/execute.js +3 -2
- package/dist/cli/init/execute.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +105 -22
- package/src/cli/init/execute.ts +3 -3
package/dist/cli/init/execute.js
CHANGED
|
@@ -9,6 +9,7 @@ export function buildInitExecutionPlan({ selections, dryRun, overwrite, target,
|
|
|
9
9
|
for (const platform of selections.platforms) {
|
|
10
10
|
const stitchSupported = platform === "antigravity";
|
|
11
11
|
const stitchEnabled = wantsStitch && stitchSupported;
|
|
12
|
+
const hasAnyMcp = wantsPostman || stitchEnabled || wantsFoundry;
|
|
12
13
|
const warnings = [];
|
|
13
14
|
if (wantsStitch && !stitchSupported) {
|
|
14
15
|
warnings.push(`Stitch is not supported on '${platform}'. It will be skipped for this platform.`);
|
|
@@ -29,9 +30,9 @@ export function buildInitExecutionPlan({ selections, dryRun, overwrite, target,
|
|
|
29
30
|
mcpScope: selections.mcpScope,
|
|
30
31
|
foundryMcp: wantsFoundry,
|
|
31
32
|
mcpToolSync: wantsPostman || stitchEnabled,
|
|
32
|
-
mcpRuntime:
|
|
33
|
+
mcpRuntime: hasAnyMcp ? selections.mcpRuntime : "local",
|
|
33
34
|
mcpFallback: "local",
|
|
34
|
-
mcpBuildLocal:
|
|
35
|
+
mcpBuildLocal: hasAnyMcp ? selections.mcpBuildLocal : false,
|
|
35
36
|
postmanMode: wantsPostman ? selections.postmanMode : undefined,
|
|
36
37
|
postmanWorkspaceId: wantsPostman
|
|
37
38
|
? selections.postmanWorkspaceId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/cli/init/execute.ts"],"names":[],"mappings":"AAOA,SAA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AAE,EAAE;QACzJ,qBAAqB,UAAU,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzG,mBAAmB,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,EAAE;QAChF,wBAAwB,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,EAAE;KAC/I,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
package/src/cli/core.ts
CHANGED
|
@@ -4546,7 +4546,23 @@ function buildFoundryServeArgs({ scope = "auto" } = {}) {
|
|
|
4546
4546
|
return ["mcp", "serve", "--transport", "stdio", "--scope", normalizedScope];
|
|
4547
4547
|
}
|
|
4548
4548
|
|
|
4549
|
-
function
|
|
4549
|
+
function buildFoundryDockerUrl({ port = DEFAULT_MCP_DOCKER_HOST_PORT } = {}) {
|
|
4550
|
+
return `http://127.0.0.1:${normalizePortNumber(port, DEFAULT_MCP_DOCKER_HOST_PORT)}/mcp`;
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
function buildVsCodeFoundryServer({
|
|
4554
|
+
scope = "auto",
|
|
4555
|
+
runtime = "local",
|
|
4556
|
+
dockerPort = DEFAULT_MCP_DOCKER_HOST_PORT,
|
|
4557
|
+
} = {}) {
|
|
4558
|
+
if (runtime === "docker") {
|
|
4559
|
+
return {
|
|
4560
|
+
type: "http",
|
|
4561
|
+
url: buildFoundryDockerUrl({ port: dockerPort }),
|
|
4562
|
+
headers: {},
|
|
4563
|
+
};
|
|
4564
|
+
}
|
|
4565
|
+
|
|
4550
4566
|
return {
|
|
4551
4567
|
type: "stdio",
|
|
4552
4568
|
command: FOUNDRY_MCP_COMMAND,
|
|
@@ -4570,7 +4586,20 @@ function buildCopilotCliPostmanServer({
|
|
|
4570
4586
|
};
|
|
4571
4587
|
}
|
|
4572
4588
|
|
|
4573
|
-
function buildCopilotCliFoundryServer({
|
|
4589
|
+
function buildCopilotCliFoundryServer({
|
|
4590
|
+
scope = "auto",
|
|
4591
|
+
runtime = "local",
|
|
4592
|
+
dockerPort = DEFAULT_MCP_DOCKER_HOST_PORT,
|
|
4593
|
+
} = {}) {
|
|
4594
|
+
if (runtime === "docker") {
|
|
4595
|
+
return {
|
|
4596
|
+
type: "http",
|
|
4597
|
+
url: buildFoundryDockerUrl({ port: dockerPort }),
|
|
4598
|
+
headers: {},
|
|
4599
|
+
tools: ["*"],
|
|
4600
|
+
};
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4574
4603
|
return {
|
|
4575
4604
|
type: "stdio",
|
|
4576
4605
|
command: FOUNDRY_MCP_COMMAND,
|
|
@@ -4593,7 +4622,18 @@ function buildGeminiPostmanServer({
|
|
|
4593
4622
|
};
|
|
4594
4623
|
}
|
|
4595
4624
|
|
|
4596
|
-
function buildGeminiFoundryServer({
|
|
4625
|
+
function buildGeminiFoundryServer({
|
|
4626
|
+
scope = "auto",
|
|
4627
|
+
runtime = "local",
|
|
4628
|
+
dockerPort = DEFAULT_MCP_DOCKER_HOST_PORT,
|
|
4629
|
+
} = {}) {
|
|
4630
|
+
if (runtime === "docker") {
|
|
4631
|
+
return {
|
|
4632
|
+
httpUrl: buildFoundryDockerUrl({ port: dockerPort }),
|
|
4633
|
+
headers: {},
|
|
4634
|
+
};
|
|
4635
|
+
}
|
|
4636
|
+
|
|
4597
4637
|
return {
|
|
4598
4638
|
command: FOUNDRY_MCP_COMMAND,
|
|
4599
4639
|
args: buildFoundryServeArgs({ scope }),
|
|
@@ -5110,18 +5150,35 @@ async function applyPostmanMcpForPlatform({
|
|
|
5110
5150
|
stitchMcpUrl,
|
|
5111
5151
|
includeStitchMcp = false,
|
|
5112
5152
|
includeFoundryMcp = true,
|
|
5153
|
+
foundryRuntime = "local",
|
|
5113
5154
|
dryRun = false,
|
|
5114
5155
|
cwd = process.cwd(),
|
|
5115
5156
|
}) {
|
|
5116
5157
|
const workspaceRoot = findWorkspaceRoot(cwd);
|
|
5117
5158
|
const warnings = [];
|
|
5118
5159
|
const foundryScope = mcpScope === "global" ? "global" : "project";
|
|
5160
|
+
const normalizedFoundryRuntime = normalizeMcpRuntime(foundryRuntime, "local");
|
|
5119
5161
|
const resolvedPostmanApiKey = normalizePostmanApiKey(
|
|
5120
5162
|
process.env[apiKeyEnvVar || POSTMAN_API_KEY_ENV_VAR],
|
|
5121
5163
|
);
|
|
5122
5164
|
const resolvedStitchApiKey = normalizePostmanApiKey(
|
|
5123
5165
|
process.env[stitchApiKeyEnvVar || STITCH_API_KEY_ENV_VAR],
|
|
5124
5166
|
);
|
|
5167
|
+
let foundryDockerPort = DEFAULT_MCP_DOCKER_HOST_PORT;
|
|
5168
|
+
if (includeFoundryMcp && normalizedFoundryRuntime === "docker") {
|
|
5169
|
+
const runningPort = await resolveDockerContainerHostPort({
|
|
5170
|
+
name: DEFAULT_MCP_DOCKER_CONTAINER_NAME,
|
|
5171
|
+
containerPort: MCP_DOCKER_CONTAINER_PORT,
|
|
5172
|
+
cwd,
|
|
5173
|
+
});
|
|
5174
|
+
if (runningPort) {
|
|
5175
|
+
foundryDockerPort = runningPort;
|
|
5176
|
+
} else {
|
|
5177
|
+
warnings.push(
|
|
5178
|
+
`Foundry MCP is configured for Docker runtime at ${buildFoundryDockerUrl({ port: foundryDockerPort })}. Start it with 'cbx mcp runtime up --scope ${mcpScope}'.`,
|
|
5179
|
+
);
|
|
5180
|
+
}
|
|
5181
|
+
}
|
|
5125
5182
|
|
|
5126
5183
|
if (platform === "antigravity") {
|
|
5127
5184
|
const settingsPath =
|
|
@@ -5148,6 +5205,8 @@ async function applyPostmanMcpForPlatform({
|
|
|
5148
5205
|
if (includeFoundryMcp) {
|
|
5149
5206
|
mcpServers[FOUNDRY_MCP_SERVER_ID] = buildGeminiFoundryServer({
|
|
5150
5207
|
scope: foundryScope,
|
|
5208
|
+
runtime: normalizedFoundryRuntime,
|
|
5209
|
+
dockerPort: foundryDockerPort,
|
|
5151
5210
|
});
|
|
5152
5211
|
} else {
|
|
5153
5212
|
delete mcpServers[FOUNDRY_MCP_SERVER_ID];
|
|
@@ -5199,6 +5258,8 @@ async function applyPostmanMcpForPlatform({
|
|
|
5199
5258
|
if (includeFoundryMcp) {
|
|
5200
5259
|
mcpServers[FOUNDRY_MCP_SERVER_ID] = buildCopilotCliFoundryServer({
|
|
5201
5260
|
scope: foundryScope,
|
|
5261
|
+
runtime: normalizedFoundryRuntime,
|
|
5262
|
+
dockerPort: foundryDockerPort,
|
|
5202
5263
|
});
|
|
5203
5264
|
} else {
|
|
5204
5265
|
delete mcpServers[FOUNDRY_MCP_SERVER_ID];
|
|
@@ -5223,6 +5284,8 @@ async function applyPostmanMcpForPlatform({
|
|
|
5223
5284
|
if (includeFoundryMcp) {
|
|
5224
5285
|
servers[FOUNDRY_MCP_SERVER_ID] = buildVsCodeFoundryServer({
|
|
5225
5286
|
scope: foundryScope,
|
|
5287
|
+
runtime: normalizedFoundryRuntime,
|
|
5288
|
+
dockerPort: foundryDockerPort,
|
|
5226
5289
|
});
|
|
5227
5290
|
} else {
|
|
5228
5291
|
delete servers[FOUNDRY_MCP_SERVER_ID];
|
|
@@ -5272,6 +5335,8 @@ async function applyPostmanMcpForPlatform({
|
|
|
5272
5335
|
if (includeFoundryMcp) {
|
|
5273
5336
|
servers[FOUNDRY_MCP_SERVER_ID] = buildVsCodeFoundryServer({
|
|
5274
5337
|
scope: foundryScope,
|
|
5338
|
+
runtime: normalizedFoundryRuntime,
|
|
5339
|
+
dockerPort: foundryDockerPort,
|
|
5275
5340
|
});
|
|
5276
5341
|
} else {
|
|
5277
5342
|
delete servers[FOUNDRY_MCP_SERVER_ID];
|
|
@@ -5362,18 +5427,32 @@ async function applyPostmanMcpForPlatform({
|
|
|
5362
5427
|
|
|
5363
5428
|
if (includeFoundryMcp) {
|
|
5364
5429
|
try {
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5430
|
+
if (normalizedFoundryRuntime === "docker") {
|
|
5431
|
+
await execFile(
|
|
5432
|
+
"codex",
|
|
5433
|
+
[
|
|
5434
|
+
"mcp",
|
|
5435
|
+
"add",
|
|
5436
|
+
FOUNDRY_MCP_SERVER_ID,
|
|
5437
|
+
"--url",
|
|
5438
|
+
buildFoundryDockerUrl({ port: foundryDockerPort }),
|
|
5439
|
+
],
|
|
5440
|
+
{ cwd },
|
|
5441
|
+
);
|
|
5442
|
+
} else {
|
|
5443
|
+
await execFile(
|
|
5444
|
+
"codex",
|
|
5445
|
+
[
|
|
5446
|
+
"mcp",
|
|
5447
|
+
"add",
|
|
5448
|
+
FOUNDRY_MCP_SERVER_ID,
|
|
5449
|
+
"--",
|
|
5450
|
+
FOUNDRY_MCP_COMMAND,
|
|
5451
|
+
...buildFoundryServeArgs({ scope: foundryScope }),
|
|
5452
|
+
],
|
|
5453
|
+
{ cwd },
|
|
5454
|
+
);
|
|
5455
|
+
}
|
|
5377
5456
|
} catch (error) {
|
|
5378
5457
|
warnings.push(
|
|
5379
5458
|
`Failed to register ${FOUNDRY_MCP_SERVER_ID} MCP via Codex CLI. Ensure 'cbx' and 'codex' are installed and rerun. (${error.message})`,
|
|
@@ -5928,6 +6007,7 @@ async function configurePostmanInstallArtifacts({
|
|
|
5928
6007
|
stitchMcpUrl: effectiveStitchMcpUrl,
|
|
5929
6008
|
includeStitchMcp: shouldInstallStitch,
|
|
5930
6009
|
includeFoundryMcp: postmanSelection.foundryMcpEnabled,
|
|
6010
|
+
foundryRuntime: postmanSelection.effectiveMcpRuntime || "local",
|
|
5931
6011
|
dryRun,
|
|
5932
6012
|
cwd,
|
|
5933
6013
|
});
|
|
@@ -6040,6 +6120,10 @@ async function applyPostmanConfigArtifacts({
|
|
|
6040
6120
|
const stitchApiKeyEnvVar =
|
|
6041
6121
|
normalizePostmanApiKey(stitchState?.apiKeyEnvVar) || STITCH_API_KEY_ENV_VAR;
|
|
6042
6122
|
const stitchMcpUrl = stitchState?.mcpUrl || STITCH_MCP_URL;
|
|
6123
|
+
const foundryRuntime = normalizeMcpRuntime(
|
|
6124
|
+
configValue?.mcp?.effectiveRuntime || configValue?.mcp?.runtime,
|
|
6125
|
+
"local",
|
|
6126
|
+
);
|
|
6043
6127
|
const resolvedPostmanApiKey = normalizePostmanApiKey(
|
|
6044
6128
|
process.env[postmanApiKeyEnvVar],
|
|
6045
6129
|
);
|
|
@@ -6105,6 +6189,7 @@ async function applyPostmanConfigArtifacts({
|
|
|
6105
6189
|
stitchMcpUrl,
|
|
6106
6190
|
includeStitchMcp: stitchEnabled,
|
|
6107
6191
|
includeFoundryMcp: true,
|
|
6192
|
+
foundryRuntime,
|
|
6108
6193
|
dryRun,
|
|
6109
6194
|
cwd,
|
|
6110
6195
|
});
|
|
@@ -7106,7 +7191,7 @@ function printPostmanSetupSummary({ postmanSetup }) {
|
|
|
7106
7191
|
`- MCP tool sync: ${postmanSetup.mcpToolSync ? "enabled" : "disabled"}`,
|
|
7107
7192
|
);
|
|
7108
7193
|
console.log(
|
|
7109
|
-
`- Foundry MCP side-by-side: ${postmanSetup.foundryMcpEnabled ? "enabled" : "disabled"}`,
|
|
7194
|
+
`- Foundry MCP side-by-side: ${postmanSetup.foundryMcpEnabled ? postmanSetup.effectiveMcpRuntime === "docker" ? "enabled (docker endpoint)" : "enabled (cbx mcp serve)" : "disabled"}`,
|
|
7110
7195
|
);
|
|
7111
7196
|
if (postmanSetup.postmanEnabled) {
|
|
7112
7197
|
console.log(`- Postman API key source: ${postmanSetup.apiKeySource}`);
|
|
@@ -10205,7 +10290,7 @@ async function runWorkflowConfig(options) {
|
|
|
10205
10290
|
);
|
|
10206
10291
|
|
|
10207
10292
|
let postmanArtifacts = null;
|
|
10208
|
-
if (hasPostmanModeOption) {
|
|
10293
|
+
if (hasPostmanModeOption || hasMcpRuntimeOption) {
|
|
10209
10294
|
const mcpScope = resolveMcpScopeFromConfigDocument(next, scope);
|
|
10210
10295
|
let platform = null;
|
|
10211
10296
|
const explicitPlatform = normalizePlatform(opts.platform);
|
|
@@ -11695,18 +11780,16 @@ async function runInitWizard(options) {
|
|
|
11695
11780
|
throw new Error("No platforms selected.");
|
|
11696
11781
|
}
|
|
11697
11782
|
|
|
11698
|
-
const
|
|
11699
|
-
selections.selectedMcps.includes("postman") ||
|
|
11700
|
-
selections.selectedMcps.includes("stitch");
|
|
11783
|
+
const runtimeSelectableMcp = selections.selectedMcps.length > 0;
|
|
11701
11784
|
|
|
11702
|
-
if (
|
|
11785
|
+
if (runtimeSelectableMcp && isInteractive) {
|
|
11703
11786
|
const runtimeSelection = await promptInitMcpRuntime({
|
|
11704
11787
|
defaultRuntime: selections.mcpRuntime,
|
|
11705
11788
|
defaultBuildLocal: selections.mcpBuildLocal,
|
|
11706
11789
|
});
|
|
11707
11790
|
selections.mcpRuntime = runtimeSelection.mcpRuntime;
|
|
11708
11791
|
selections.mcpBuildLocal = runtimeSelection.mcpBuildLocal;
|
|
11709
|
-
} else if (!
|
|
11792
|
+
} else if (!runtimeSelectableMcp) {
|
|
11710
11793
|
selections.mcpRuntime = "local";
|
|
11711
11794
|
selections.mcpBuildLocal = false;
|
|
11712
11795
|
}
|
package/src/cli/init/execute.ts
CHANGED
|
@@ -28,6 +28,7 @@ export function buildInitExecutionPlan({
|
|
|
28
28
|
for (const platform of selections.platforms) {
|
|
29
29
|
const stitchSupported = platform === "antigravity";
|
|
30
30
|
const stitchEnabled = wantsStitch && stitchSupported;
|
|
31
|
+
const hasAnyMcp = wantsPostman || stitchEnabled || wantsFoundry;
|
|
31
32
|
const warnings: string[] = [];
|
|
32
33
|
if (wantsStitch && !stitchSupported) {
|
|
33
34
|
warnings.push(
|
|
@@ -51,10 +52,9 @@ export function buildInitExecutionPlan({
|
|
|
51
52
|
mcpScope: selections.mcpScope,
|
|
52
53
|
foundryMcp: wantsFoundry,
|
|
53
54
|
mcpToolSync: wantsPostman || stitchEnabled,
|
|
54
|
-
mcpRuntime:
|
|
55
|
+
mcpRuntime: hasAnyMcp ? selections.mcpRuntime : "local",
|
|
55
56
|
mcpFallback: "local",
|
|
56
|
-
mcpBuildLocal:
|
|
57
|
-
wantsPostman || stitchEnabled ? selections.mcpBuildLocal : false,
|
|
57
|
+
mcpBuildLocal: hasAnyMcp ? selections.mcpBuildLocal : false,
|
|
58
58
|
postmanMode: wantsPostman ? selections.postmanMode : undefined,
|
|
59
59
|
postmanWorkspaceId: wantsPostman
|
|
60
60
|
? selections.postmanWorkspaceId
|