@contentful/experience-design-system-cli 2.32.1-dev-build-d5e6302.0 → 2.32.1-dev-build-f054f94.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 +1 -1
- package/dist/src/index.js +24 -12
- package/dist/src/setup/command.d.ts +0 -6
- package/package.json +6 -6
package/dist/package.json
CHANGED
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(
|
|
290
|
+
return withBedrockProviderPrefix(DEFAULT_MODELS.opencode);
|
|
291
291
|
return DEFAULT_MODELS[agent];
|
|
292
292
|
}
|
|
293
293
|
function withBedrockProviderPrefix(model) {
|
|
@@ -298,8 +298,7 @@ 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
|
|
302
|
-
const modelArg = resolvedModel ? ["--model", resolvedModel] : [];
|
|
301
|
+
const modelArg = ["--model", resolveAgentModel(agent, model, bedrock)];
|
|
303
302
|
const promptArg = promptViaStdin ? [] : [prompt2];
|
|
304
303
|
switch (agent) {
|
|
305
304
|
case "claude":
|
|
@@ -314,7 +313,7 @@ function buildArgs(agent, prompt2, model, promptViaStdin = false, bedrock = fals
|
|
|
314
313
|
return ["--print", ...modelArg, ...promptArg];
|
|
315
314
|
case "copilot": {
|
|
316
315
|
const copilotModel = resolveAgentModel("copilot", model);
|
|
317
|
-
const copilotModelArg =
|
|
316
|
+
const copilotModelArg = copilotModel === "Auto" ? [] : ["--model", copilotModel];
|
|
318
317
|
return ["-p", ...promptArg, ...copilotModelArg, "--allow-all-tools"];
|
|
319
318
|
}
|
|
320
319
|
}
|
|
@@ -457,7 +456,7 @@ function extractSentinelOutput(stdout) {
|
|
|
457
456
|
return "multiple";
|
|
458
457
|
return stdout.slice(startIdx + START.length, endIdx).trim();
|
|
459
458
|
}
|
|
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,
|
|
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;
|
|
461
460
|
var init_agent_runner = __esm({
|
|
462
461
|
"packages/experience-design-system-generation/dist/src/agent-runner.js"() {
|
|
463
462
|
"use strict";
|
|
@@ -479,10 +478,11 @@ var init_agent_runner = __esm({
|
|
|
479
478
|
};
|
|
480
479
|
BEDROCK_CAPABLE_AGENTS = /* @__PURE__ */ new Set(["claude", "codex", "opencode"]);
|
|
481
480
|
DEFAULT_CODEX_BEDROCK_REGION = "us-east-1";
|
|
482
|
-
DEFAULT_OPENCODE_MODEL = "claude-haiku-4-5";
|
|
483
481
|
DEFAULT_MODELS = {
|
|
484
482
|
claude: "haiku",
|
|
485
|
-
|
|
483
|
+
codex: "gpt-5.6-luna",
|
|
484
|
+
// requires OPENAI_API_KEY; ChatGPT account users must pass --model
|
|
485
|
+
opencode: "claude-haiku-4-5",
|
|
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,15 +36169,26 @@ 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() {
|
|
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
|
|
36178
|
-
|
|
36179
|
-
|
|
36180
|
-
|
|
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;
|
|
36181
36192
|
}
|
|
36182
36193
|
async function setupAgent() {
|
|
36183
36194
|
section("Step 4: Coding agent (claude, codex, opencode, or copilot)", "[required]");
|
|
@@ -36204,6 +36215,7 @@ async function setupAgent() {
|
|
|
36204
36215
|
const parsed = choice2 === "" ? 1 : parseInt(choice2, 10);
|
|
36205
36216
|
const idx = Number.isNaN(parsed) || parsed < 1 || parsed > found.length ? 0 : parsed - 1;
|
|
36206
36217
|
const selected = found[idx];
|
|
36218
|
+
ok(`${selected.name} \x1B[2m(${selected.binary})\x1B[0m selected`);
|
|
36207
36219
|
const agentModel = selected.binary === "codex" ? await promptCodexModel() : void 0;
|
|
36208
36220
|
return { agent: selected.binary, agentModel };
|
|
36209
36221
|
}
|
|
@@ -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-
|
|
3
|
+
"version": "2.32.1-dev-build-f054f94.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.32.1-dev-build-
|
|
43
|
-
"@contentful/experience-design-system-types": "2.32.1-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-f054f94.0",
|
|
43
|
+
"@contentful/experience-design-system-types": "2.32.1-dev-build-f054f94.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.1-dev-build-
|
|
56
|
-
"@contentful/experience-design-system-generation": "2.32.1-dev-build-
|
|
57
|
-
"@contentful/experience-design-system-extraction": "2.32.1-dev-build-
|
|
55
|
+
"@contentful/experience-design-system-client": "2.32.1-dev-build-f054f94.0",
|
|
56
|
+
"@contentful/experience-design-system-generation": "2.32.1-dev-build-f054f94.0",
|
|
57
|
+
"@contentful/experience-design-system-extraction": "2.32.1-dev-build-f054f94.0"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|