@contentful/experience-design-system-cli 2.32.1-dev-build-07d2d75.0 → 2.32.1-dev-build-4663267.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-07d2d75.0",
3
+ "version": "2.32.1-dev-build-4663267.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -47,7 +47,7 @@
47
47
  "react": "^18.3.1",
48
48
  "react-devtools-core": "^4.19.1",
49
49
  "react-dom": "^18.3.1",
50
- "svelte": "^5.57.0",
50
+ "svelte": "^5.56.4",
51
51
  "ts-morph": "^27.0.2",
52
52
  "typescript": "^5.9.3"
53
53
  },
package/dist/src/index.js CHANGED
@@ -287,7 +287,7 @@ function resolveAgentModel(agent, explicit, bedrock = false) {
287
287
  if (bedrock && agent === "codex")
288
288
  return DEFAULT_CODEX_BEDROCK_MODEL;
289
289
  if (bedrock && agent === "opencode")
290
- return withBedrockProviderPrefix(DEFAULT_MODELS.opencode);
290
+ return withBedrockProviderPrefix(DEFAULT_OPENCODE_MODEL);
291
291
  return DEFAULT_MODELS[agent];
292
292
  }
293
293
  function withBedrockProviderPrefix(model) {
@@ -298,7 +298,8 @@ function codexBedrockConfigArgs() {
298
298
  return ["-c", "model_provider=amazon-bedrock", "-c", `model_providers.amazon-bedrock.region=${region}`];
299
299
  }
300
300
  function buildArgs(agent, prompt2, model, promptViaStdin = false, bedrock = false) {
301
- const modelArg = ["--model", resolveAgentModel(agent, model, bedrock)];
301
+ const resolvedModel = resolveAgentModel(agent, model, bedrock);
302
+ const modelArg = resolvedModel ? ["--model", resolvedModel] : [];
302
303
  const promptArg = promptViaStdin ? [] : [prompt2];
303
304
  switch (agent) {
304
305
  case "claude":
@@ -313,7 +314,7 @@ function buildArgs(agent, prompt2, model, promptViaStdin = false, bedrock = fals
313
314
  return ["--print", ...modelArg, ...promptArg];
314
315
  case "copilot": {
315
316
  const copilotModel = resolveAgentModel("copilot", model);
316
- const copilotModelArg = copilotModel === "Auto" ? [] : ["--model", copilotModel];
317
+ const copilotModelArg = !copilotModel || copilotModel === "Auto" ? [] : ["--model", copilotModel];
317
318
  return ["-p", ...promptArg, ...copilotModelArg, "--allow-all-tools"];
318
319
  }
319
320
  }
@@ -456,7 +457,7 @@ function extractSentinelOutput(stdout) {
456
457
  return "multiple";
457
458
  return stdout.slice(startIdx + START.length, endIdx).trim();
458
459
  }
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;
460
+ 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_OPENCODE_MODEL, DEFAULT_MODELS, DEFAULT_CODEX_BEDROCK_MODEL;
460
461
  var init_agent_runner = __esm({
461
462
  "packages/experience-design-system-generation/dist/src/agent-runner.js"() {
462
463
  "use strict";
@@ -478,11 +479,10 @@ var init_agent_runner = __esm({
478
479
  };
479
480
  BEDROCK_CAPABLE_AGENTS = /* @__PURE__ */ new Set(["claude", "codex", "opencode"]);
480
481
  DEFAULT_CODEX_BEDROCK_REGION = "us-east-1";
482
+ DEFAULT_OPENCODE_MODEL = "claude-haiku-4-5";
481
483
  DEFAULT_MODELS = {
482
484
  claude: "haiku",
483
- codex: "gpt-5.6-luna",
484
- // requires OPENAI_API_KEY; ChatGPT account users must pass --model
485
- opencode: "claude-haiku-4-5",
485
+ opencode: DEFAULT_OPENCODE_MODEL,
486
486
  cursor: "gpt-mini",
487
487
  // cursor alias for gpt-5.4-mini-medium; haiku not in cursor's catalog
488
488
  copilot: "Auto"
@@ -36169,26 +36169,15 @@ function pick(items, defaultIdx = 0) {
36169
36169
  process.stdout.write(` \x1B[2m[s] Skip\x1B[0m
36170
36170
  `);
36171
36171
  }
36172
- async function promptCodexModel() {
36172
+ async function promptCodexModel(ask = prompt) {
36173
36173
  if (process.env["OPENAI_API_KEY"]) return void 0;
36174
36174
  info("");
36175
36175
  process.stdout.write(` \x1B[33m\u26A0\x1B[0m No OPENAI_API_KEY \u2014 using ChatGPT account authentication.
36176
36176
  `);
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;
36177
+ info(" Tip: run \x1B[1mcodex\x1B[0m then type \x1B[1m/model\x1B[0m to browse the models available to your account.");
36178
+ const model = await ask(" Model name (optional - press Enter for Codex default): ");
36179
+ const trimmed = model.trim();
36180
+ return trimmed || void 0;
36192
36181
  }
36193
36182
  async function setupAgent() {
36194
36183
  section("Step 4: Coding agent (claude, codex, opencode, or copilot)", "[required]");
@@ -36215,7 +36204,6 @@ async function setupAgent() {
36215
36204
  const parsed = choice2 === "" ? 1 : parseInt(choice2, 10);
36216
36205
  const idx = Number.isNaN(parsed) || parsed < 1 || parsed > found.length ? 0 : parsed - 1;
36217
36206
  const selected = found[idx];
36218
- ok(`${selected.name} \x1B[2m(${selected.binary})\x1B[0m selected`);
36219
36207
  const agentModel = selected.binary === "codex" ? await promptCodexModel() : void 0;
36220
36208
  return { agent: selected.binary, agentModel };
36221
36209
  }
@@ -1,4 +1,10 @@
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
+ }>;
2
8
  export type SkillPromptKind = 'select' | 'generate';
3
9
  /**
4
10
  * 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-07d2d75.0",
3
+ "version": "2.32.1-dev-build-4663267.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,11 +36,11 @@
36
36
  "react": "^18.3.1",
37
37
  "react-devtools-core": "^4.19.1",
38
38
  "react-dom": "^18.3.1",
39
- "svelte": "^5.57.0",
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-07d2d75.0",
43
- "@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-07d2d75.0"
42
+ "@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-4663267.0",
43
+ "@contentful/experience-design-system-types": "2.32.1-dev-build-4663267.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-07d2d75.0",
56
- "@contentful/experience-design-system-generation": "2.32.1-dev-build-07d2d75.0",
57
- "@contentful/experience-design-system-client": "2.32.1-dev-build-07d2d75.0"
55
+ "@contentful/experience-design-system-client": "2.32.1-dev-build-4663267.0",
56
+ "@contentful/experience-design-system-generation": "2.32.1-dev-build-4663267.0",
57
+ "@contentful/experience-design-system-extraction": "2.32.1-dev-build-4663267.0"
58
58
  },
59
59
  "repository": {
60
60
  "type": "git",