@contentful/experience-design-system-cli 2.30.2-dev-build-1d57a44.0 → 2.30.2-dev-build-2c13c19.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.30.2-dev-build-1d57a44.0",
3
+ "version": "2.30.2-dev-build-2c13c19.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,22 +275,38 @@ 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 modelArg = ["--model", resolveAgentModel(agent, model)];
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)];
288
302
  const promptArg = promptViaStdin ? [] : [prompt2];
289
303
  switch (agent) {
290
304
  case "claude":
291
305
  return ["--print", ...modelArg, ...promptArg];
292
- case "codex":
293
- 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
+ }
294
310
  case "opencode":
295
311
  return ["run", ...modelArg, ...promptArg];
296
312
  case "cursor":
@@ -304,21 +320,25 @@ function buildArgs(agent, prompt2, model, promptViaStdin = false) {
304
320
  }
305
321
  async function runAgent(options) {
306
322
  const { agent, prompt: prompt2, timeoutMs, model, onOutput, promptViaStdin, onDebugEvent } = options;
323
+ const bedrock = options.bedrock ?? process.env.EDS_BEDROCK === "1";
307
324
  const binary = resolveBinary(agent);
308
325
  const useStdin2 = !!promptViaStdin;
309
- const args = buildArgs(agent, prompt2, model, useStdin2);
326
+ const args = buildArgs(agent, prompt2, model, useStdin2, bedrock);
310
327
  const startedAt = Date.now();
311
328
  onDebugEvent?.("run.start", {
312
329
  agent,
313
330
  binary,
314
331
  model,
332
+ bedrock: !!bedrock,
315
333
  timeoutMs,
316
334
  promptLen: prompt2.length,
317
335
  promptHead: prompt2.slice(0, 500)
318
336
  });
319
337
  return new Promise((resolve27) => {
338
+ const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
320
339
  const child = spawn(binary, args, {
321
- stdio: ["pipe", "pipe", "pipe"]
340
+ stdio: ["pipe", "pipe", "pipe"],
341
+ ...bedrockEnv ? { env: { ...process.env, ...bedrockEnv } } : {}
322
342
  });
323
343
  if (useStdin2 && child.stdin) {
324
344
  child.stdin.on("error", () => {
@@ -436,7 +456,7 @@ function extractSentinelOutput(stdout) {
436
456
  return "multiple";
437
457
  return stdout.slice(startIdx + START.length, endIdx).trim();
438
458
  }
439
- 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;
440
460
  var init_agent_runner = __esm({
441
461
  "packages/experience-design-system-generation/dist/src/agent-runner.js"() {
442
462
  "use strict";
@@ -453,9 +473,14 @@ var init_agent_runner = __esm({
453
473
  cursor: "cursor-agent",
454
474
  copilot: "copilot"
455
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";
456
481
  DEFAULT_MODELS = {
457
482
  claude: "haiku",
458
- codex: "gpt-5.4-mini",
483
+ codex: "gpt-5.6-luna",
459
484
  // requires OPENAI_API_KEY; ChatGPT account users must pass --model
460
485
  opencode: "claude-haiku-4-5",
461
486
  cursor: "gpt-mini",
@@ -463,6 +488,7 @@ var init_agent_runner = __esm({
463
488
  copilot: "Auto"
464
489
  // the only model guaranteed on every Copilot plan (Free/Pro/Business/Enterprise); Pro+ users override via EDS_AGENT_MODEL_COPILOT
465
490
  };
491
+ DEFAULT_CODEX_BEDROCK_MODEL = "openai.gpt-5.6-luna";
466
492
  }
467
493
  });
468
494
 
@@ -852,6 +878,7 @@ var src_exports = {};
852
878
  __export(src_exports, {
853
879
  AGENT_NAMES: () => AGENT_NAMES,
854
880
  DEFAULT_AGENT_NAME: () => DEFAULT_AGENT_NAME,
881
+ agentSupportsBedrock: () => agentSupportsBedrock,
855
882
  buildArgs: () => buildArgs,
856
883
  buildPrompt: () => buildPrompt,
857
884
  checkAgentAuth: () => checkAgentAuth,
@@ -27591,6 +27618,7 @@ import { jsx as jsx52, jsxs as jsxs51 } from "react/jsx-runtime";
27591
27618
  function buildSelectAgentArgs(opts) {
27592
27619
  const args = ["analyze", "select-agent", "--agent", opts.agent, "--session", opts.sessionId, "--exclude-invalid"];
27593
27620
  if (opts.model) args.push("--model", opts.model);
27621
+ if (opts.bedrock) args.push("--bedrock");
27594
27622
  if (opts.selectPromptPath) args.push("--select-prompt-path", opts.selectPromptPath);
27595
27623
  if (opts.noCache) args.push("--no-cache");
27596
27624
  return args;
@@ -27626,6 +27654,7 @@ function buildGenerateComponentsArgs(opts) {
27626
27654
  const args = ["generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
27627
27655
  if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
27628
27656
  if (opts.model) args.push("--model", opts.model);
27657
+ if (opts.bedrock) args.push("--bedrock");
27629
27658
  if (opts.noCache) args.push("--no-cache");
27630
27659
  if (opts.generatePromptPath) args.push("--generate-prompt-path", opts.generatePromptPath);
27631
27660
  return args;
@@ -27668,6 +27697,7 @@ function WizardApp({
27668
27697
  initialHost,
27669
27698
  initialAgent,
27670
27699
  initialModel,
27700
+ bedrock = false,
27671
27701
  initialProjectPath,
27672
27702
  host,
27673
27703
  autoAcceptScope = false,
@@ -27729,6 +27759,7 @@ function WizardApp({
27729
27759
  step: modifyEntryReady || rawTokensEntryReady || pushFromPickerReady ? initialStepResolved : initialRuns && initialRuns.length > 0 ? "run-picker" : initialStepResolved,
27730
27760
  agent: initialAgent ?? "claude",
27731
27761
  ...initialModel ? { agentModel: initialModel } : {},
27762
+ ...bedrock ? { bedrock: true } : {},
27732
27763
  projectPath: initialProjectPath ?? "",
27733
27764
  outDir: initialOutDir,
27734
27765
  rawTokensPath: rawTokensEntryReady ? initialRawTokensPath : "",
@@ -27868,6 +27899,7 @@ If you are using AWS Bedrock, run:
27868
27899
  const result = await new Promise((res) => {
27869
27900
  const tokenArgs = [findCliPath(), "generate", "tokens", "--agent", state.agent, "--raw-tokens", rawTokensPath];
27870
27901
  if (state.agentModel) tokenArgs.push("--model", state.agentModel);
27902
+ if (state.bedrock) tokenArgs.push("--bedrock");
27871
27903
  const child = spawn4("node", tokenArgs);
27872
27904
  let stdout2 = "";
27873
27905
  let stderr = "";
@@ -27988,6 +28020,7 @@ If you are using AWS Bedrock, run:
27988
28020
  if (generateMap) extractArgs.push("--generate-map", generateMap);
27989
28021
  for (const p of promptOverrides ?? []) extractArgs.push("--prompt", p);
27990
28022
  if (state.agent) extractArgs.push("--agent", state.agent);
28023
+ if (state.bedrock) extractArgs.push("--bedrock");
27991
28024
  }
27992
28025
  const child = spawn4("node", extractArgs);
27993
28026
  let stdout2 = "";
@@ -28079,6 +28112,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28079
28112
  sessionId: sessionId2,
28080
28113
  agent: state.agent,
28081
28114
  ...state.agentModel ? { model: state.agentModel } : {},
28115
+ ...state.bedrock ? { bedrock: true } : {},
28082
28116
  selectPromptPath,
28083
28117
  noCache
28084
28118
  });
@@ -28177,6 +28211,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28177
28211
  tokensPath,
28178
28212
  agent: state.agent,
28179
28213
  ...state.agentModel ? { model: state.agentModel } : {},
28214
+ ...state.bedrock ? { bedrock: true } : {},
28180
28215
  noCache: effectiveNoCache
28181
28216
  })
28182
28217
  ];
@@ -28246,6 +28281,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
28246
28281
  tokensPath,
28247
28282
  agent: state.agent,
28248
28283
  ...state.agentModel ? { model: state.agentModel } : {},
28284
+ ...state.bedrock ? { bedrock: true } : {},
28249
28285
  noCache: effectiveNoCache,
28250
28286
  generatePromptPath
28251
28287
  })
@@ -29753,12 +29789,15 @@ import { isAbsolute as isAbsolute4, join as join15, relative as relative3, resol
29753
29789
  init_src();
29754
29790
  var AGENT_DESCRIPTION = `Agent to use: ${AGENT_NAMES.join(", ")} (defaults to value saved by experiences setup)`;
29755
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}).`;
29756
29794
  function addAgentModelOptions(cmd, config = {}) {
29757
29795
  const { agentDescription = AGENT_DESCRIPTION, includeModel = true, modelDescription = MODEL_DESCRIPTION } = config;
29758
29796
  cmd.option("--agent <name>", agentDescription);
29759
29797
  if (includeModel) {
29760
29798
  cmd.option("--model <name>", modelDescription);
29761
29799
  }
29800
+ cmd.option("--bedrock", BEDROCK_DESCRIPTION);
29762
29801
  return cmd;
29763
29802
  }
29764
29803
 
@@ -30547,6 +30586,12 @@ function registerAnalyzeSelectAgentCommand(program) {
30547
30586
  return;
30548
30587
  }
30549
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
+ }
30550
30595
  const selectPromptPath = opts.selectPromptPath ?? savedCreds.selectPromptPath;
30551
30596
  if (selectPromptPath) {
30552
30597
  const resolvedPath = resolve12(selectPromptPath);
@@ -31790,6 +31835,14 @@ function registerAnalyzeCommand(program) {
31790
31835
  }
31791
31836
  return v;
31792
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
+ }
31793
31846
  const projectRoot = resolve15(opts.project);
31794
31847
  const outDir = join15(projectRoot, ".contentful");
31795
31848
  let sourceDirectory;
@@ -32636,6 +32689,9 @@ async function runGenerateSkill(skill, opts, verbose = false) {
32636
32689
  );
32637
32690
  }
32638
32691
  const agent = agentName;
32692
+ if (opts.bedrock && !agentSupportsBedrock(agent)) {
32693
+ die2(`Error: --bedrock is not supported for --agent ${agent}`);
32694
+ }
32639
32695
  const generatePromptPath = skill === "components" ? opts.generatePromptPath ?? savedCreds.generatePromptPath : void 0;
32640
32696
  if (generatePromptPath) {
32641
32697
  if (!await pathExists3(resolve17(generatePromptPath))) {
@@ -34300,6 +34356,7 @@ function registerMapTokensCommand(program) {
34300
34356
  }
34301
34357
 
34302
34358
  // packages/experience-design-system-cli/src/import/command.ts
34359
+ init_src();
34303
34360
  init_path_utils();
34304
34361
  import { resolve as resolve25, join as join25 } from "node:path";
34305
34362
 
@@ -34455,6 +34512,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
34455
34512
  if (opts.generateMap) analyzeArgs.push("--generate-map", opts.generateMap);
34456
34513
  for (const p of opts.promptOverrides ?? []) analyzeArgs.push("--prompt", p);
34457
34514
  if (opts.agent) analyzeArgs.push("--agent", opts.agent);
34515
+ if (opts.bedrock) analyzeArgs.push("--bedrock");
34458
34516
  }
34459
34517
  const r = await runStep(analyzeArgs, cliPath, sessionId2);
34460
34518
  const durationMs = Date.now() - t0;
@@ -34505,6 +34563,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
34505
34563
  if (useAgentSelect) {
34506
34564
  editArgs = ["analyze", "select-agent", "--session", extractSessionId, "--agent", opts.agent];
34507
34565
  if (opts.model) editArgs.push("--model", opts.model);
34566
+ if (opts.bedrock) editArgs.push("--bedrock");
34508
34567
  if (opts.excludeInvalid) editArgs.push("--exclude-invalid");
34509
34568
  if (opts.noCache) editArgs.push("--no-cache");
34510
34569
  if (opts.selectPromptPath) editArgs.push("--select-prompt-path", opts.selectPromptPath);
@@ -34566,6 +34625,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
34566
34625
  const generateLabel = stepLabel("Categorizing component props");
34567
34626
  const generateArgs = ["generate", "components", "--agent", opts.agent];
34568
34627
  if (opts.model) generateArgs.push("--model", opts.model);
34628
+ if (opts.bedrock) generateArgs.push("--bedrock");
34569
34629
  if (extractSessionId) generateArgs.push("--session", extractSessionId);
34570
34630
  if (opts.dryRun) generateArgs.push("--dry-run");
34571
34631
  if (opts.verbose) generateArgs.push("--verbose");
@@ -35596,6 +35656,11 @@ function registerImportCommand(program) {
35596
35656
  const resolvedAgent = resolveAgent(opts.agent, creds.agent);
35597
35657
  const resolvedModel = resolveModel(opts.model, creds.agentModel);
35598
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
+ }
35599
35664
  const pickerDecision = await shouldShowRunPicker({
35600
35665
  flags: {
35601
35666
  ...opts.pushFromRun !== void 0 ? { pushFromRun: opts.pushFromRun } : {},
@@ -35624,6 +35689,7 @@ function registerImportCommand(program) {
35624
35689
  initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
35625
35690
  initialAgent: resolvedAgent,
35626
35691
  ...resolvedModel ? { initialModel: resolvedModel } : {},
35692
+ ...opts.bedrock ? { bedrock: true } : {},
35627
35693
  initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
35628
35694
  host: opts.host,
35629
35695
  autoAcceptScope,
@@ -35687,6 +35753,11 @@ function registerImportCommand(program) {
35687
35753
  const headlessAgent = resolveAgent(opts.agent, headlessCreds.agent);
35688
35754
  const headlessModel = resolveModel(opts.model, headlessCreds.agentModel);
35689
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
+ }
35690
35761
  const result = await runPipeline(
35691
35762
  {
35692
35763
  project: projectRoot,
@@ -35696,6 +35767,7 @@ function registerImportCommand(program) {
35696
35767
  cmaToken,
35697
35768
  agent: headlessAgent,
35698
35769
  model: headlessModel,
35770
+ ...opts.bedrock ? { bedrock: true } : {},
35699
35771
  tokens: opts.tokens,
35700
35772
  selectAll: opts.selectAll,
35701
35773
  select: opts.select.length > 0 ? opts.select : void 0,
@@ -36833,6 +36905,13 @@ async function runBuild(opts) {
36833
36905
  child.on("exit", (code) => settle(code ?? 1));
36834
36906
  });
36835
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
+ }
36836
36915
  function registerImportV2Command(program) {
36837
36916
  program.command("importv2").description("Launch the v2 import TUI (experience-design-system-cli-v2)").action(async () => {
36838
36917
  const { render: render7 } = await import("ink");
@@ -36880,6 +36959,9 @@ function createProgram() {
36880
36959
  break;
36881
36960
  }
36882
36961
  }
36962
+ if (resolveBedrockFromAncestors(actionCommand)) {
36963
+ process.env.EDS_BEDROCK = "1";
36964
+ }
36883
36965
  const chain = [];
36884
36966
  for (let c2 = actionCommand; c2 && c2.parent; c2 = c2.parent) chain.unshift(c2.name());
36885
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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.30.2-dev-build-1d57a44.0",
3
+ "version": "2.30.2-dev-build-2c13c19.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-cli-v2": "2.30.2-dev-build-1d57a44.0",
43
- "@contentful/experience-design-system-types": "2.30.2-dev-build-1d57a44.0"
42
+ "@contentful/experience-design-system-cli-v2": "2.30.2-dev-build-2c13c19.0",
43
+ "@contentful/experience-design-system-types": "2.30.2-dev-build-2c13c19.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-client": "2.30.2-dev-build-1d57a44.0",
56
- "@contentful/experience-design-system-extraction": "2.30.2-dev-build-1d57a44.0",
57
- "@contentful/experience-design-system-generation": "2.30.2-dev-build-1d57a44.0"
55
+ "@contentful/experience-design-system-client": "2.30.2-dev-build-2c13c19.0",
56
+ "@contentful/experience-design-system-extraction": "2.30.2-dev-build-2c13c19.0",
57
+ "@contentful/experience-design-system-generation": "2.30.2-dev-build-2c13c19.0"
58
58
  },
59
59
  "repository": {
60
60
  "type": "git",