@contentful/experience-design-system-cli 2.32.0 → 2.32.1-dev-build-a0479a6.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.0",
3
+ "version": "2.32.1-dev-build-a0479a6.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/dist/src/index.js CHANGED
@@ -284,7 +284,8 @@ function resolveAgentModel(agent, explicit) {
284
284
  return DEFAULT_MODELS[agent];
285
285
  }
286
286
  function buildArgs(agent, prompt2, model, promptViaStdin = false) {
287
- const modelArg = ["--model", resolveAgentModel(agent, model)];
287
+ const resolvedModel = resolveAgentModel(agent, model);
288
+ const modelArg = resolvedModel ? ["--model", resolvedModel] : [];
288
289
  const promptArg = promptViaStdin ? [] : [prompt2];
289
290
  switch (agent) {
290
291
  case "claude":
@@ -297,7 +298,7 @@ function buildArgs(agent, prompt2, model, promptViaStdin = false) {
297
298
  return ["--print", ...modelArg, ...promptArg];
298
299
  case "copilot": {
299
300
  const copilotModel = resolveAgentModel("copilot", model);
300
- const copilotModelArg = copilotModel === "Auto" ? [] : ["--model", copilotModel];
301
+ const copilotModelArg = !copilotModel || copilotModel === "Auto" ? [] : ["--model", copilotModel];
301
302
  return ["-p", ...promptArg, ...copilotModelArg, "--allow-all-tools"];
302
303
  }
303
304
  }
@@ -455,8 +456,6 @@ var init_agent_runner = __esm({
455
456
  };
456
457
  DEFAULT_MODELS = {
457
458
  claude: "haiku",
458
- codex: "gpt-5.4-mini",
459
- // requires OPENAI_API_KEY; ChatGPT account users must pass --model
460
459
  opencode: "claude-haiku-4-5",
461
460
  cursor: "gpt-mini",
462
461
  // cursor alias for gpt-5.4-mini-medium; haiku not in cursor's catalog
@@ -36097,26 +36096,15 @@ function pick(items, defaultIdx = 0) {
36097
36096
  process.stdout.write(` \x1B[2m[s] Skip\x1B[0m
36098
36097
  `);
36099
36098
  }
36100
- async function promptCodexModel() {
36099
+ async function promptCodexModel(ask = prompt) {
36101
36100
  if (process.env["OPENAI_API_KEY"]) return void 0;
36102
36101
  info("");
36103
36102
  process.stdout.write(` \x1B[33m\u26A0\x1B[0m No OPENAI_API_KEY \u2014 using ChatGPT account authentication.
36104
36103
  `);
36105
- info(" Tip: run \x1B[1mcodex\x1B[0m then type \x1B[1m/model\x1B[0m to browse all available models.");
36106
- info("");
36107
- info(" Choose a model:");
36108
- info("");
36109
- pick([
36110
- { label: "gpt-5.4-mini", description: "fast, lower cost" },
36111
- { label: "gpt-5.5", description: "most capable" },
36112
- { label: "gpt-5.4" }
36113
- ]);
36114
- info("");
36115
- const choice = await prompt(" \x1B[2m\u203A\x1B[0m Your choice [1]: ");
36116
- if (choice === "1" || choice === "") return "gpt-5.4-mini";
36117
- if (choice === "2") return "gpt-5.5";
36118
- if (choice === "3") return "gpt-5.4";
36119
- return void 0;
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;
36120
36108
  }
36121
36109
  async function setupAgent() {
36122
36110
  section("Step 4: Coding agent (claude, codex, opencode, or copilot)", "[required]");
@@ -36143,7 +36131,6 @@ async function setupAgent() {
36143
36131
  const parsed = choice2 === "" ? 1 : parseInt(choice2, 10);
36144
36132
  const idx = Number.isNaN(parsed) || parsed < 1 || parsed > found.length ? 0 : parsed - 1;
36145
36133
  const selected = found[idx];
36146
- ok(`${selected.name} \x1B[2m(${selected.binary})\x1B[0m selected`);
36147
36134
  const agentModel = selected.binary === "codex" ? await promptCodexModel() : void 0;
36148
36135
  return { agent: selected.binary, agentModel };
36149
36136
  }
@@ -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.0",
3
+ "version": "2.32.1-dev-build-a0479a6.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.0",
43
- "@contentful/experience-design-system-cli-v2": "2.32.0"
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"
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.32.0",
56
- "@contentful/experience-design-system-extraction": "2.32.0",
57
- "@contentful/experience-design-system-generation": "2.32.0"
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"
58
58
  },
59
59
  "repository": {
60
60
  "type": "git",