@contentful/experience-design-system-cli 2.32.1-dev-build-a0479a6.0 → 2.32.1-dev-build-3e401c3.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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.32.1-dev-build-a0479a6.0",
3
+ "version": "2.32.1-dev-build-3e401c3.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -7,6 +7,7 @@ export interface PipelineOptions {
7
7
  cmaToken?: string;
8
8
  agent: string;
9
9
  model?: string;
10
+ bedrock?: boolean;
10
11
  skipAnalyze: boolean;
11
12
  skipGenerate: boolean;
12
13
  print: boolean;
@@ -7,6 +7,7 @@ export declare function buildSelectAgentArgs(opts: {
7
7
  sessionId: string;
8
8
  agent: string;
9
9
  model?: string;
10
+ bedrock?: boolean;
10
11
  selectPromptPath?: string;
11
12
  noCache?: boolean;
12
13
  }): string[];
@@ -23,6 +24,7 @@ export declare function buildGenerateComponentsArgs(opts: {
23
24
  tokensPath?: string;
24
25
  agent: string;
25
26
  model?: string;
27
+ bedrock?: boolean;
26
28
  noCache?: boolean;
27
29
  generatePromptPath?: string;
28
30
  }): string[];
@@ -49,6 +51,7 @@ export type WizardAppProps = {
49
51
  initialHost?: string;
50
52
  initialAgent?: string;
51
53
  initialModel?: string;
54
+ bedrock?: boolean;
52
55
  initialProjectPath?: string;
53
56
  host?: string;
54
57
  autoAcceptScope?: boolean;
@@ -80,4 +83,4 @@ export type WizardAppProps = {
80
83
  onRunPicked?: (selection: RunPickerSelection) => void;
81
84
  allowDeletions?: boolean;
82
85
  };
83
- export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, initialProjectPath, host, autoAcceptScope, autoRejectCycles, compositionMode, compositionMap, compositionAgent, compositionAgentMode, compositionRefresh, generateMap, promptOverrides, noCache, autoFilter, livePreview, noPush, noSave, outDirOverride, onConflictMode, selectPromptPath, generatePromptPath, skipMapTokens, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
86
+ export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel, bedrock, initialProjectPath, host, autoAcceptScope, autoRejectCycles, compositionMode, compositionMap, compositionAgent, compositionAgentMode, compositionRefresh, generateMap, promptOverrides, noCache, autoFilter, livePreview, noPush, noSave, outDirOverride, onConflictMode, selectPromptPath, generatePromptPath, skipMapTokens, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
package/dist/src/index.js CHANGED
@@ -275,51 +275,70 @@ function resolveBinary(agent) {
275
275
  return override.trim();
276
276
  return AGENT_BINARIES[agent];
277
277
  }
278
- function resolveAgentModel(agent, explicit) {
278
+ function agentSupportsBedrock(agent) {
279
+ return BEDROCK_CAPABLE_AGENTS.has(agent);
280
+ }
281
+ function resolveAgentModel(agent, explicit, bedrock = false) {
279
282
  if (explicit && explicit.trim())
280
283
  return explicit.trim();
281
284
  const override = process.env[`EDS_AGENT_MODEL_${agent.toUpperCase()}`];
282
285
  if (override && override.trim())
283
286
  return override.trim();
287
+ if (bedrock && agent === "codex")
288
+ return DEFAULT_CODEX_BEDROCK_MODEL;
289
+ if (bedrock && agent === "opencode")
290
+ return withBedrockProviderPrefix(DEFAULT_MODELS.opencode);
284
291
  return DEFAULT_MODELS[agent];
285
292
  }
286
- function buildArgs(agent, prompt2, model, promptViaStdin = false) {
287
- const resolvedModel = resolveAgentModel(agent, model);
288
- const modelArg = resolvedModel ? ["--model", resolvedModel] : [];
293
+ function withBedrockProviderPrefix(model) {
294
+ return model.includes("/") ? model : `amazon-bedrock/${model}`;
295
+ }
296
+ function codexBedrockConfigArgs() {
297
+ const region = process.env.AWS_REGION?.trim() || process.env.AWS_DEFAULT_REGION?.trim() || DEFAULT_CODEX_BEDROCK_REGION;
298
+ return ["-c", "model_provider=amazon-bedrock", "-c", `model_providers.amazon-bedrock.region=${region}`];
299
+ }
300
+ function buildArgs(agent, prompt2, model, promptViaStdin = false, bedrock = false) {
301
+ const modelArg = ["--model", resolveAgentModel(agent, model, bedrock)];
289
302
  const promptArg = promptViaStdin ? [] : [prompt2];
290
303
  switch (agent) {
291
304
  case "claude":
292
305
  return ["--print", ...modelArg, ...promptArg];
293
- case "codex":
294
- return ["exec", ...modelArg, "--dangerously-bypass-approvals-and-sandbox", ...promptArg];
306
+ case "codex": {
307
+ const bedrockArgs = bedrock ? codexBedrockConfigArgs() : [];
308
+ return ["exec", ...bedrockArgs, ...modelArg, "--dangerously-bypass-approvals-and-sandbox", ...promptArg];
309
+ }
295
310
  case "opencode":
296
311
  return ["run", ...modelArg, ...promptArg];
297
312
  case "cursor":
298
313
  return ["--print", ...modelArg, ...promptArg];
299
314
  case "copilot": {
300
315
  const copilotModel = resolveAgentModel("copilot", model);
301
- const copilotModelArg = !copilotModel || copilotModel === "Auto" ? [] : ["--model", copilotModel];
316
+ const copilotModelArg = copilotModel === "Auto" ? [] : ["--model", copilotModel];
302
317
  return ["-p", ...promptArg, ...copilotModelArg, "--allow-all-tools"];
303
318
  }
304
319
  }
305
320
  }
306
321
  async function runAgent(options) {
307
322
  const { agent, prompt: prompt2, timeoutMs, model, onOutput, promptViaStdin, onDebugEvent } = options;
323
+ const bedrock = options.bedrock ?? process.env.EDS_BEDROCK === "1";
308
324
  const binary = resolveBinary(agent);
309
325
  const useStdin2 = !!promptViaStdin;
310
- const args = buildArgs(agent, prompt2, model, useStdin2);
326
+ const args = buildArgs(agent, prompt2, model, useStdin2, bedrock);
311
327
  const startedAt = Date.now();
312
328
  onDebugEvent?.("run.start", {
313
329
  agent,
314
330
  binary,
315
331
  model,
332
+ bedrock: !!bedrock,
316
333
  timeoutMs,
317
334
  promptLen: prompt2.length,
318
335
  promptHead: prompt2.slice(0, 500)
319
336
  });
320
337
  return new Promise((resolve27) => {
338
+ const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
321
339
  const child = spawn(binary, args, {
322
- stdio: ["pipe", "pipe", "pipe"]
340
+ stdio: ["pipe", "pipe", "pipe"],
341
+ ...bedrockEnv ? { env: { ...process.env, ...bedrockEnv } } : {}
323
342
  });
324
343
  if (useStdin2 && child.stdin) {
325
344
  child.stdin.on("error", () => {
@@ -437,7 +456,7 @@ function extractSentinelOutput(stdout) {
437
456
  return "multiple";
438
457
  return stdout.slice(startIdx + START.length, endIdx).trim();
439
458
  }
440
- var VALID_SELECT_TOOL_NAMES, VALID_TOOL_NAMES, VALID_TOKEN_TOOL_NAMES, VALID_CDF_TYPES, VALID_CATEGORIES, AGENT_BINARIES, DEFAULT_MODELS;
459
+ var VALID_SELECT_TOOL_NAMES, VALID_TOOL_NAMES, VALID_TOKEN_TOOL_NAMES, VALID_CDF_TYPES, VALID_CATEGORIES, AGENT_BINARIES, BEDROCK_ENV_BY_AGENT, BEDROCK_CAPABLE_AGENTS, DEFAULT_CODEX_BEDROCK_REGION, DEFAULT_MODELS, DEFAULT_CODEX_BEDROCK_MODEL;
441
460
  var init_agent_runner = __esm({
442
461
  "packages/experience-design-system-generation/dist/src/agent-runner.js"() {
443
462
  "use strict";
@@ -454,14 +473,22 @@ var init_agent_runner = __esm({
454
473
  cursor: "cursor-agent",
455
474
  copilot: "copilot"
456
475
  };
476
+ BEDROCK_ENV_BY_AGENT = {
477
+ claude: { CLAUDE_CODE_USE_BEDROCK: "1" }
478
+ };
479
+ BEDROCK_CAPABLE_AGENTS = /* @__PURE__ */ new Set(["claude", "codex", "opencode"]);
480
+ DEFAULT_CODEX_BEDROCK_REGION = "us-east-1";
457
481
  DEFAULT_MODELS = {
458
482
  claude: "haiku",
483
+ codex: "gpt-5.6-luna",
484
+ // requires OPENAI_API_KEY; ChatGPT account users must pass --model
459
485
  opencode: "claude-haiku-4-5",
460
486
  cursor: "gpt-mini",
461
487
  // cursor alias for gpt-5.4-mini-medium; haiku not in cursor's catalog
462
488
  copilot: "Auto"
463
489
  // the only model guaranteed on every Copilot plan (Free/Pro/Business/Enterprise); Pro+ users override via EDS_AGENT_MODEL_COPILOT
464
490
  };
491
+ DEFAULT_CODEX_BEDROCK_MODEL = "openai.gpt-5.6-luna";
465
492
  }
466
493
  });
467
494
 
@@ -851,6 +878,7 @@ var src_exports = {};
851
878
  __export(src_exports, {
852
879
  AGENT_NAMES: () => AGENT_NAMES,
853
880
  DEFAULT_AGENT_NAME: () => DEFAULT_AGENT_NAME,
881
+ agentSupportsBedrock: () => agentSupportsBedrock,
854
882
  buildArgs: () => buildArgs,
855
883
  buildPrompt: () => buildPrompt,
856
884
  checkAgentAuth: () => checkAgentAuth,
@@ -27590,6 +27618,7 @@ import { jsx as jsx52, jsxs as jsxs51 } from "react/jsx-runtime";
27590
27618
  function buildSelectAgentArgs(opts) {
27591
27619
  const args = ["analyze", "select-agent", "--agent", opts.agent, "--session", opts.sessionId, "--exclude-invalid"];
27592
27620
  if (opts.model) args.push("--model", opts.model);
27621
+ if (opts.bedrock) args.push("--bedrock");
27593
27622
  if (opts.selectPromptPath) args.push("--select-prompt-path", opts.selectPromptPath);
27594
27623
  if (opts.noCache) args.push("--no-cache");
27595
27624
  return args;
@@ -27625,6 +27654,7 @@ function buildGenerateComponentsArgs(opts) {
27625
27654
  const args = ["generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
27626
27655
  if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
27627
27656
  if (opts.model) args.push("--model", opts.model);
27657
+ if (opts.bedrock) args.push("--bedrock");
27628
27658
  if (opts.noCache) args.push("--no-cache");
27629
27659
  if (opts.generatePromptPath) args.push("--generate-prompt-path", opts.generatePromptPath);
27630
27660
  return args;
@@ -27667,6 +27697,7 @@ function WizardApp({
27667
27697
  initialHost,
27668
27698
  initialAgent,
27669
27699
  initialModel,
27700
+ bedrock = false,
27670
27701
  initialProjectPath,
27671
27702
  host,
27672
27703
  autoAcceptScope = false,
@@ -27728,6 +27759,7 @@ function WizardApp({
27728
27759
  step: modifyEntryReady || rawTokensEntryReady || pushFromPickerReady ? initialStepResolved : initialRuns && initialRuns.length > 0 ? "run-picker" : initialStepResolved,
27729
27760
  agent: initialAgent ?? "claude",
27730
27761
  ...initialModel ? { agentModel: initialModel } : {},
27762
+ ...bedrock ? { bedrock: true } : {},
27731
27763
  projectPath: initialProjectPath ?? "",
27732
27764
  outDir: initialOutDir,
27733
27765
  rawTokensPath: rawTokensEntryReady ? initialRawTokensPath : "",
@@ -27867,6 +27899,7 @@ If you are using AWS Bedrock, run:
27867
27899
  const result = await new Promise((res) => {
27868
27900
  const tokenArgs = [findCliPath(), "generate", "tokens", "--agent", state.agent, "--raw-tokens", rawTokensPath];
27869
27901
  if (state.agentModel) tokenArgs.push("--model", state.agentModel);
27902
+ if (state.bedrock) tokenArgs.push("--bedrock");
27870
27903
  const child = spawn4("node", tokenArgs);
27871
27904
  let stdout2 = "";
27872
27905
  let stderr = "";
@@ -27987,6 +28020,7 @@ If you are using AWS Bedrock, run:
27987
28020
  if (generateMap) extractArgs.push("--generate-map", generateMap);
27988
28021
  for (const p of promptOverrides ?? []) extractArgs.push("--prompt", p);
27989
28022
  if (state.agent) extractArgs.push("--agent", state.agent);
28023
+ if (state.bedrock) extractArgs.push("--bedrock");
27990
28024
  }
27991
28025
  const child = spawn4("node", extractArgs);
27992
28026
  let stdout2 = "";
@@ -28078,6 +28112,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28078
28112
  sessionId: sessionId2,
28079
28113
  agent: state.agent,
28080
28114
  ...state.agentModel ? { model: state.agentModel } : {},
28115
+ ...state.bedrock ? { bedrock: true } : {},
28081
28116
  selectPromptPath,
28082
28117
  noCache
28083
28118
  });
@@ -28176,6 +28211,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28176
28211
  tokensPath,
28177
28212
  agent: state.agent,
28178
28213
  ...state.agentModel ? { model: state.agentModel } : {},
28214
+ ...state.bedrock ? { bedrock: true } : {},
28179
28215
  noCache: effectiveNoCache
28180
28216
  })
28181
28217
  ];
@@ -28245,6 +28281,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28245
28281
  tokensPath,
28246
28282
  agent: state.agent,
28247
28283
  ...state.agentModel ? { model: state.agentModel } : {},
28284
+ ...state.bedrock ? { bedrock: true } : {},
28248
28285
  noCache: effectiveNoCache,
28249
28286
  generatePromptPath
28250
28287
  })
@@ -29752,12 +29789,15 @@ import { isAbsolute as isAbsolute4, join as join15, relative as relative3, resol
29752
29789
  init_src();
29753
29790
  var AGENT_DESCRIPTION = `Agent to use: ${AGENT_NAMES.join(", ")} (defaults to value saved by experiences setup)`;
29754
29791
  var MODEL_DESCRIPTION = "Model to use (defaults to a lightweight per-agent model; override with EDS_AGENT_MODEL_<AGENT>)";
29792
+ var BEDROCK_AGENTS = AGENT_NAMES.filter((agent) => agentSupportsBedrock(agent)).join(", ");
29793
+ var BEDROCK_DESCRIPTION = `Route the selected agent through AWS Bedrock instead of its default model provider (requires AWS credentials in the environment: AWS_PROFILE, or AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN, plus AWS_REGION). Only supported by agents with a Bedrock routing mechanism (currently: ${BEDROCK_AGENTS}).`;
29755
29794
  function addAgentModelOptions(cmd, config = {}) {
29756
29795
  const { agentDescription = AGENT_DESCRIPTION, includeModel = true, modelDescription = MODEL_DESCRIPTION } = config;
29757
29796
  cmd.option("--agent <name>", agentDescription);
29758
29797
  if (includeModel) {
29759
29798
  cmd.option("--model <name>", modelDescription);
29760
29799
  }
29800
+ cmd.option("--bedrock", BEDROCK_DESCRIPTION);
29761
29801
  return cmd;
29762
29802
  }
29763
29803
 
@@ -30546,6 +30586,12 @@ function registerAnalyzeSelectAgentCommand(program) {
30546
30586
  return;
30547
30587
  }
30548
30588
  const agent = agentName;
30589
+ if (opts.bedrock && !agentSupportsBedrock(agent)) {
30590
+ process.stderr.write(`Error: --bedrock is not supported for --agent ${agent}
30591
+ `);
30592
+ await exitWithAnalytics(1);
30593
+ return;
30594
+ }
30549
30595
  const selectPromptPath = opts.selectPromptPath ?? savedCreds.selectPromptPath;
30550
30596
  if (selectPromptPath) {
30551
30597
  const resolvedPath = resolve12(selectPromptPath);
@@ -31789,6 +31835,14 @@ function registerAnalyzeCommand(program) {
31789
31835
  }
31790
31836
  return v;
31791
31837
  })();
31838
+ if (opts.bedrock) {
31839
+ const bedrockAgent = resolveCompositionAgentName(opts.agent);
31840
+ if (!agentSupportsBedrock(bedrockAgent)) {
31841
+ process.stderr.write(`Error: --bedrock is not supported for --agent ${bedrockAgent}
31842
+ `);
31843
+ process.exit(1);
31844
+ }
31845
+ }
31792
31846
  const projectRoot = resolve15(opts.project);
31793
31847
  const outDir = join15(projectRoot, ".contentful");
31794
31848
  let sourceDirectory;
@@ -32635,6 +32689,9 @@ async function runGenerateSkill(skill, opts, verbose = false) {
32635
32689
  );
32636
32690
  }
32637
32691
  const agent = agentName;
32692
+ if (opts.bedrock && !agentSupportsBedrock(agent)) {
32693
+ die2(`Error: --bedrock is not supported for --agent ${agent}`);
32694
+ }
32638
32695
  const generatePromptPath = skill === "components" ? opts.generatePromptPath ?? savedCreds.generatePromptPath : void 0;
32639
32696
  if (generatePromptPath) {
32640
32697
  if (!await pathExists3(resolve17(generatePromptPath))) {
@@ -34299,6 +34356,7 @@ function registerMapTokensCommand(program) {
34299
34356
  }
34300
34357
 
34301
34358
  // packages/experience-design-system-cli/src/import/command.ts
34359
+ init_src();
34302
34360
  init_path_utils();
34303
34361
  import { resolve as resolve25, join as join25 } from "node:path";
34304
34362
 
@@ -34454,6 +34512,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
34454
34512
  if (opts.generateMap) analyzeArgs.push("--generate-map", opts.generateMap);
34455
34513
  for (const p of opts.promptOverrides ?? []) analyzeArgs.push("--prompt", p);
34456
34514
  if (opts.agent) analyzeArgs.push("--agent", opts.agent);
34515
+ if (opts.bedrock) analyzeArgs.push("--bedrock");
34457
34516
  }
34458
34517
  const r = await runStep(analyzeArgs, cliPath, sessionId2);
34459
34518
  const durationMs = Date.now() - t0;
@@ -34504,6 +34563,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
34504
34563
  if (useAgentSelect) {
34505
34564
  editArgs = ["analyze", "select-agent", "--session", extractSessionId, "--agent", opts.agent];
34506
34565
  if (opts.model) editArgs.push("--model", opts.model);
34566
+ if (opts.bedrock) editArgs.push("--bedrock");
34507
34567
  if (opts.excludeInvalid) editArgs.push("--exclude-invalid");
34508
34568
  if (opts.noCache) editArgs.push("--no-cache");
34509
34569
  if (opts.selectPromptPath) editArgs.push("--select-prompt-path", opts.selectPromptPath);
@@ -34565,6 +34625,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
34565
34625
  const generateLabel = stepLabel("Categorizing component props");
34566
34626
  const generateArgs = ["generate", "components", "--agent", opts.agent];
34567
34627
  if (opts.model) generateArgs.push("--model", opts.model);
34628
+ if (opts.bedrock) generateArgs.push("--bedrock");
34568
34629
  if (extractSessionId) generateArgs.push("--session", extractSessionId);
34569
34630
  if (opts.dryRun) generateArgs.push("--dry-run");
34570
34631
  if (opts.verbose) generateArgs.push("--verbose");
@@ -35595,6 +35656,11 @@ function registerImportCommand(program) {
35595
35656
  const resolvedAgent = resolveAgent(opts.agent, creds.agent);
35596
35657
  const resolvedModel = resolveModel(opts.model, creds.agentModel);
35597
35658
  const resolvedCompositionMode = resolveCompositionMode(opts, creds.compositionMode);
35659
+ if (opts.bedrock && !(isAgentName(resolvedAgent) && agentSupportsBedrock(resolvedAgent))) {
35660
+ process.stderr.write(`Error: --bedrock is not supported for --agent ${resolvedAgent}
35661
+ `);
35662
+ process.exit(1);
35663
+ }
35598
35664
  const pickerDecision = await shouldShowRunPicker({
35599
35665
  flags: {
35600
35666
  ...opts.pushFromRun !== void 0 ? { pushFromRun: opts.pushFromRun } : {},
@@ -35623,6 +35689,7 @@ function registerImportCommand(program) {
35623
35689
  initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
35624
35690
  initialAgent: resolvedAgent,
35625
35691
  ...resolvedModel ? { initialModel: resolvedModel } : {},
35692
+ ...opts.bedrock ? { bedrock: true } : {},
35626
35693
  initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
35627
35694
  host: opts.host,
35628
35695
  autoAcceptScope,
@@ -35686,6 +35753,11 @@ function registerImportCommand(program) {
35686
35753
  const headlessAgent = resolveAgent(opts.agent, headlessCreds.agent);
35687
35754
  const headlessModel = resolveModel(opts.model, headlessCreds.agentModel);
35688
35755
  const headlessCompositionMode = resolveCompositionMode(opts, headlessCreds.compositionMode);
35756
+ if (opts.bedrock && !(isAgentName(headlessAgent) && agentSupportsBedrock(headlessAgent))) {
35757
+ process.stderr.write(`Error: --bedrock is not supported for --agent ${headlessAgent}
35758
+ `);
35759
+ process.exit(1);
35760
+ }
35689
35761
  const result = await runPipeline(
35690
35762
  {
35691
35763
  project: projectRoot,
@@ -35695,6 +35767,7 @@ function registerImportCommand(program) {
35695
35767
  cmaToken,
35696
35768
  agent: headlessAgent,
35697
35769
  model: headlessModel,
35770
+ ...opts.bedrock ? { bedrock: true } : {},
35698
35771
  tokens: opts.tokens,
35699
35772
  selectAll: opts.selectAll,
35700
35773
  select: opts.select.length > 0 ? opts.select : void 0,
@@ -36096,15 +36169,26 @@ function pick(items, defaultIdx = 0) {
36096
36169
  process.stdout.write(` \x1B[2m[s] Skip\x1B[0m
36097
36170
  `);
36098
36171
  }
36099
- async function promptCodexModel(ask = prompt) {
36172
+ async function promptCodexModel() {
36100
36173
  if (process.env["OPENAI_API_KEY"]) return void 0;
36101
36174
  info("");
36102
36175
  process.stdout.write(` \x1B[33m\u26A0\x1B[0m No OPENAI_API_KEY \u2014 using ChatGPT account authentication.
36103
36176
  `);
36104
- info(" Tip: run \x1B[1mcodex\x1B[0m then type \x1B[1m/model\x1B[0m to browse the models available to your account.");
36105
- const model = await ask(" Model name (optional - press Enter for Codex default): ");
36106
- const trimmed = model.trim();
36107
- return trimmed || void 0;
36177
+ info(" Tip: run \x1B[1mcodex\x1B[0m then type \x1B[1m/model\x1B[0m to browse all available models.");
36178
+ info("");
36179
+ info(" Choose a model:");
36180
+ info("");
36181
+ pick([
36182
+ { label: "gpt-5.4-mini", description: "fast, lower cost" },
36183
+ { label: "gpt-5.5", description: "most capable" },
36184
+ { label: "gpt-5.4" }
36185
+ ]);
36186
+ info("");
36187
+ const choice = await prompt(" \x1B[2m\u203A\x1B[0m Your choice [1]: ");
36188
+ if (choice === "1" || choice === "") return "gpt-5.4-mini";
36189
+ if (choice === "2") return "gpt-5.5";
36190
+ if (choice === "3") return "gpt-5.4";
36191
+ return void 0;
36108
36192
  }
36109
36193
  async function setupAgent() {
36110
36194
  section("Step 4: Coding agent (claude, codex, opencode, or copilot)", "[required]");
@@ -36131,6 +36215,7 @@ async function setupAgent() {
36131
36215
  const parsed = choice2 === "" ? 1 : parseInt(choice2, 10);
36132
36216
  const idx = Number.isNaN(parsed) || parsed < 1 || parsed > found.length ? 0 : parsed - 1;
36133
36217
  const selected = found[idx];
36218
+ ok(`${selected.name} \x1B[2m(${selected.binary})\x1B[0m selected`);
36134
36219
  const agentModel = selected.binary === "codex" ? await promptCodexModel() : void 0;
36135
36220
  return { agent: selected.binary, agentModel };
36136
36221
  }
@@ -36820,6 +36905,13 @@ async function runBuild(opts) {
36820
36905
  child.on("exit", (code) => settle(code ?? 1));
36821
36906
  });
36822
36907
  }
36908
+ function resolveBedrockFromAncestors(actionCommand) {
36909
+ for (let c2 = actionCommand; c2; c2 = c2.parent) {
36910
+ const opts = c2.opts();
36911
+ if (opts.bedrock) return true;
36912
+ }
36913
+ return false;
36914
+ }
36823
36915
  function registerImportV2Command(program) {
36824
36916
  program.command("importv2").description("Launch the v2 import TUI (experience-design-system-cli-v2)").action(async () => {
36825
36917
  const { render: render7 } = await import("ink");
@@ -36867,6 +36959,9 @@ function createProgram() {
36867
36959
  break;
36868
36960
  }
36869
36961
  }
36962
+ if (resolveBedrockFromAncestors(actionCommand)) {
36963
+ process.env.EDS_BEDROCK = "1";
36964
+ }
36870
36965
  const chain = [];
36871
36966
  for (let c2 = actionCommand; c2 && c2.parent; c2 = c2.parent) chain.unshift(c2.name());
36872
36967
  const commandChain = chain.join(" ") || actionCommand.name();
@@ -1,13 +1,16 @@
1
1
  import type { Command } from 'commander';
2
2
  export declare const AGENT_DESCRIPTION: string;
3
3
  export declare const MODEL_DESCRIPTION = "Model to use (defaults to a lightweight per-agent model; override with EDS_AGENT_MODEL_<AGENT>)";
4
+ export declare const BEDROCK_DESCRIPTION: string;
4
5
  export interface AgentModelOptionsConfig {
5
6
  agentDescription?: string;
6
7
  includeModel?: boolean;
7
8
  modelDescription?: string;
8
9
  }
9
10
  /**
10
- * Register --agent and optionally --model flags to a Commander command, with customizable descriptions.
11
- * Pass `includeModel: false` for commands where the model dimension is not applicable (e.g., mapping-resolution agents that select an agent for logic, not model choice).
11
+ * Register --agent, --bedrock, and optional --model flags with a Commander
12
+ * command. Pass includeModel: false to omit --model only — --bedrock is
13
+ * independent of model selection (it's a routing switch, not a model choice)
14
+ * and is always registered alongside --agent.
12
15
  */
13
16
  export declare function addAgentModelOptions(cmd: Command, config?: AgentModelOptionsConfig): Command;
@@ -15,5 +15,11 @@ export declare function runBuild(opts: {
15
15
  }): Promise<{
16
16
  exitCode: number;
17
17
  }>;
18
+ /**
19
+ * Walks `actionCommand` and its ancestors for a truthy `--bedrock`. --bedrock
20
+ * is registered per-subcommand (not at program scope, unlike --debug), so a
21
+ * root-level or subcommand-level setting can each carry it.
22
+ */
23
+ export declare function resolveBedrockFromAncestors(actionCommand: Command): boolean;
18
24
  export declare function createProgram(): Command;
19
25
  export {};
@@ -1,10 +1,4 @@
1
1
  import type { Command } from 'commander';
2
- import type { AgentName } from '@contentful/experience-design-system-generation';
3
- export declare function promptCodexModel(ask?: (q: string) => Promise<string>): Promise<string | undefined>;
4
- export declare function setupAgent(): Promise<{
5
- agent: AgentName | undefined;
6
- agentModel: string | undefined;
7
- }>;
8
2
  export type SkillPromptKind = 'select' | 'generate';
9
3
  /**
10
4
  * Prompt the operator for a custom skill prompt path. Returns the resolved
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.32.1-dev-build-a0479a6.0",
3
+ "version": "2.32.1-dev-build-3e401c3.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -39,8 +39,8 @@
39
39
  "svelte": "^5.56.4",
40
40
  "ts-morph": "^27.0.2",
41
41
  "typescript": "^5.9.3",
42
- "@contentful/experience-design-system-types": "2.32.1-dev-build-a0479a6.0",
43
- "@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-a0479a6.0"
42
+ "@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-3e401c3.0",
43
+ "@contentful/experience-design-system-types": "2.32.1-dev-build-3e401c3.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@tsconfig/node24": "^24.0.4",
@@ -52,9 +52,9 @@
52
52
  "ink-testing-library": "^4.0.0",
53
53
  "typescript-eslint": "^8.67.0",
54
54
  "vitest": "^4.0.16",
55
- "@contentful/experience-design-system-extraction": "2.32.1-dev-build-a0479a6.0",
56
- "@contentful/experience-design-system-client": "2.32.1-dev-build-a0479a6.0",
57
- "@contentful/experience-design-system-generation": "2.32.1-dev-build-a0479a6.0"
55
+ "@contentful/experience-design-system-client": "2.32.1-dev-build-3e401c3.0",
56
+ "@contentful/experience-design-system-generation": "2.32.1-dev-build-3e401c3.0",
57
+ "@contentful/experience-design-system-extraction": "2.32.1-dev-build-3e401c3.0"
58
58
  },
59
59
  "repository": {
60
60
  "type": "git",