@contentful/experience-design-system-cli 2.27.5-dev-build-0c07643.0 → 2.27.5-dev-build-c49af6a.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
|
@@ -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[];
|
|
@@ -38,6 +40,7 @@ export type WizardAppProps = {
|
|
|
38
40
|
initialHost?: string;
|
|
39
41
|
initialAgent?: string;
|
|
40
42
|
initialModel?: string;
|
|
43
|
+
bedrock?: boolean;
|
|
41
44
|
initialProjectPath?: string;
|
|
42
45
|
host?: string;
|
|
43
46
|
autoAcceptScope?: boolean;
|
|
@@ -68,4 +71,4 @@ export type WizardAppProps = {
|
|
|
68
71
|
onRunPicked?: (selection: RunPickerSelection) => void;
|
|
69
72
|
allowDeletions?: boolean;
|
|
70
73
|
};
|
|
71
|
-
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, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
|
|
74
|
+
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, seedExtractSessionId, seedGenerateSessionId, seedTokenSessionId, seedTokensPath, initialStep, initialRawTokensPath, initialRuns, onRunPicked, allowDeletions, }?: WizardAppProps): React.ReactElement;
|
package/dist/src/index.js
CHANGED
|
@@ -231,6 +231,9 @@ function resolveBinary(agent) {
|
|
|
231
231
|
return override.trim();
|
|
232
232
|
return AGENT_BINARIES[agent];
|
|
233
233
|
}
|
|
234
|
+
function agentSupportsBedrock(agent) {
|
|
235
|
+
return agent in BEDROCK_ENV_BY_AGENT;
|
|
236
|
+
}
|
|
234
237
|
function resolveAgentModel(agent, explicit) {
|
|
235
238
|
if (explicit && explicit.trim())
|
|
236
239
|
return explicit.trim();
|
|
@@ -255,6 +258,7 @@ function buildArgs(agent, prompt2, model, promptViaStdin = false) {
|
|
|
255
258
|
}
|
|
256
259
|
async function runAgent(options) {
|
|
257
260
|
const { agent, prompt: prompt2, timeoutMs, model, onOutput, promptViaStdin, onDebugEvent } = options;
|
|
261
|
+
const bedrock = options.bedrock ?? process.env.EDS_BEDROCK === "1";
|
|
258
262
|
const binary = resolveBinary(agent);
|
|
259
263
|
const useStdin2 = !!promptViaStdin;
|
|
260
264
|
const args = buildArgs(agent, prompt2, model, useStdin2);
|
|
@@ -263,13 +267,16 @@ async function runAgent(options) {
|
|
|
263
267
|
agent,
|
|
264
268
|
binary,
|
|
265
269
|
model,
|
|
270
|
+
bedrock: !!bedrock,
|
|
266
271
|
timeoutMs,
|
|
267
272
|
promptLen: prompt2.length,
|
|
268
273
|
promptHead: prompt2.slice(0, 500)
|
|
269
274
|
});
|
|
270
275
|
return new Promise((resolve27) => {
|
|
276
|
+
const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
|
|
271
277
|
const child = spawn(binary, args, {
|
|
272
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
278
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
279
|
+
...bedrockEnv ? { env: { ...process.env, ...bedrockEnv } } : {}
|
|
273
280
|
});
|
|
274
281
|
if (useStdin2 && child.stdin) {
|
|
275
282
|
child.stdin.on("error", () => {
|
|
@@ -387,7 +394,7 @@ function extractSentinelOutput(stdout) {
|
|
|
387
394
|
return "multiple";
|
|
388
395
|
return stdout.slice(startIdx + START.length, endIdx).trim();
|
|
389
396
|
}
|
|
390
|
-
var VALID_SELECT_TOOL_NAMES, VALID_TOOL_NAMES, VALID_TOKEN_TOOL_NAMES, VALID_CDF_TYPES, VALID_CATEGORIES, AGENT_BINARIES, DEFAULT_MODELS;
|
|
397
|
+
var VALID_SELECT_TOOL_NAMES, VALID_TOOL_NAMES, VALID_TOKEN_TOOL_NAMES, VALID_CDF_TYPES, VALID_CATEGORIES, AGENT_BINARIES, BEDROCK_ENV_BY_AGENT, DEFAULT_MODELS;
|
|
391
398
|
var init_agent_runner = __esm({
|
|
392
399
|
"packages/experience-design-system-generation/dist/src/agent-runner.js"() {
|
|
393
400
|
"use strict";
|
|
@@ -403,6 +410,9 @@ var init_agent_runner = __esm({
|
|
|
403
410
|
opencode: "opencode",
|
|
404
411
|
cursor: "cursor-agent"
|
|
405
412
|
};
|
|
413
|
+
BEDROCK_ENV_BY_AGENT = {
|
|
414
|
+
claude: { CLAUDE_CODE_USE_BEDROCK: "1" }
|
|
415
|
+
};
|
|
406
416
|
DEFAULT_MODELS = {
|
|
407
417
|
claude: "haiku",
|
|
408
418
|
codex: "gpt-5.4-mini",
|
|
@@ -671,6 +681,7 @@ var src_exports = {};
|
|
|
671
681
|
__export(src_exports, {
|
|
672
682
|
AGENT_NAMES: () => AGENT_NAMES,
|
|
673
683
|
DEFAULT_AGENT_NAME: () => DEFAULT_AGENT_NAME,
|
|
684
|
+
agentSupportsBedrock: () => agentSupportsBedrock,
|
|
674
685
|
buildArgs: () => buildArgs,
|
|
675
686
|
buildPrompt: () => buildPrompt,
|
|
676
687
|
checkAgentAuth: () => checkAgentAuth,
|
|
@@ -26539,6 +26550,7 @@ import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
|
26539
26550
|
function buildSelectAgentArgs(opts) {
|
|
26540
26551
|
const args = ["analyze", "select-agent", "--agent", opts.agent, "--session", opts.sessionId, "--exclude-invalid"];
|
|
26541
26552
|
if (opts.model) args.push("--model", opts.model);
|
|
26553
|
+
if (opts.bedrock) args.push("--bedrock");
|
|
26542
26554
|
if (opts.selectPromptPath) args.push("--select-prompt-path", opts.selectPromptPath);
|
|
26543
26555
|
if (opts.noCache) args.push("--no-cache");
|
|
26544
26556
|
return args;
|
|
@@ -26574,6 +26586,7 @@ function buildGenerateComponentsArgs(opts) {
|
|
|
26574
26586
|
const args = ["generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
|
|
26575
26587
|
if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
|
|
26576
26588
|
if (opts.model) args.push("--model", opts.model);
|
|
26589
|
+
if (opts.bedrock) args.push("--bedrock");
|
|
26577
26590
|
if (opts.noCache) args.push("--no-cache");
|
|
26578
26591
|
if (opts.generatePromptPath) args.push("--generate-prompt-path", opts.generatePromptPath);
|
|
26579
26592
|
return args;
|
|
@@ -26606,6 +26619,7 @@ function WizardApp({
|
|
|
26606
26619
|
initialHost,
|
|
26607
26620
|
initialAgent,
|
|
26608
26621
|
initialModel,
|
|
26622
|
+
bedrock = false,
|
|
26609
26623
|
initialProjectPath,
|
|
26610
26624
|
host,
|
|
26611
26625
|
autoAcceptScope = false,
|
|
@@ -26666,6 +26680,7 @@ function WizardApp({
|
|
|
26666
26680
|
step: modifyEntryReady || rawTokensEntryReady || pushFromPickerReady ? initialStepResolved : initialRuns && initialRuns.length > 0 ? "run-picker" : initialStepResolved,
|
|
26667
26681
|
agent: initialAgent ?? "claude",
|
|
26668
26682
|
...initialModel ? { agentModel: initialModel } : {},
|
|
26683
|
+
...bedrock ? { bedrock: true } : {},
|
|
26669
26684
|
projectPath: initialProjectPath ?? "",
|
|
26670
26685
|
outDir: initialOutDir,
|
|
26671
26686
|
rawTokensPath: rawTokensEntryReady ? initialRawTokensPath : "",
|
|
@@ -26804,6 +26819,7 @@ If you are using AWS Bedrock, run:
|
|
|
26804
26819
|
const result = await new Promise((res) => {
|
|
26805
26820
|
const tokenArgs = [findCliPath(), "generate", "tokens", "--agent", state.agent, "--raw-tokens", rawTokensPath];
|
|
26806
26821
|
if (state.agentModel) tokenArgs.push("--model", state.agentModel);
|
|
26822
|
+
if (state.bedrock) tokenArgs.push("--bedrock");
|
|
26807
26823
|
const child = spawn4("node", tokenArgs);
|
|
26808
26824
|
let stdout2 = "";
|
|
26809
26825
|
let stderr = "";
|
|
@@ -26870,6 +26886,7 @@ If you are using AWS Bedrock, run:
|
|
|
26870
26886
|
if (generateMap) extractArgs.push("--generate-map", generateMap);
|
|
26871
26887
|
for (const p of promptOverrides ?? []) extractArgs.push("--prompt", p);
|
|
26872
26888
|
if (state.agent) extractArgs.push("--agent", state.agent);
|
|
26889
|
+
if (state.bedrock) extractArgs.push("--bedrock");
|
|
26873
26890
|
}
|
|
26874
26891
|
const child = spawn4("node", extractArgs);
|
|
26875
26892
|
let stdout2 = "";
|
|
@@ -26961,6 +26978,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
|
|
|
26961
26978
|
sessionId: sessionId2,
|
|
26962
26979
|
agent: state.agent,
|
|
26963
26980
|
...state.agentModel ? { model: state.agentModel } : {},
|
|
26981
|
+
...state.bedrock ? { bedrock: true } : {},
|
|
26964
26982
|
selectPromptPath,
|
|
26965
26983
|
noCache
|
|
26966
26984
|
});
|
|
@@ -27059,6 +27077,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
|
|
|
27059
27077
|
tokensPath,
|
|
27060
27078
|
agent: state.agent,
|
|
27061
27079
|
...state.agentModel ? { model: state.agentModel } : {},
|
|
27080
|
+
...state.bedrock ? { bedrock: true } : {},
|
|
27062
27081
|
noCache: effectiveNoCache
|
|
27063
27082
|
})
|
|
27064
27083
|
];
|
|
@@ -27128,6 +27147,7 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
|
|
|
27128
27147
|
tokensPath,
|
|
27129
27148
|
agent: state.agent,
|
|
27130
27149
|
...state.agentModel ? { model: state.agentModel } : {},
|
|
27150
|
+
...state.bedrock ? { bedrock: true } : {},
|
|
27131
27151
|
noCache: effectiveNoCache,
|
|
27132
27152
|
generatePromptPath
|
|
27133
27153
|
})
|
|
@@ -28616,12 +28636,15 @@ import { isAbsolute as isAbsolute4, join as join15, relative as relative3, resol
|
|
|
28616
28636
|
init_src();
|
|
28617
28637
|
var AGENT_DESCRIPTION = `Agent to use: ${AGENT_NAMES.join(", ")} (defaults to value saved by experiences setup)`;
|
|
28618
28638
|
var MODEL_DESCRIPTION = "Model to use (defaults to a lightweight per-agent model; override with EDS_AGENT_MODEL_<AGENT>)";
|
|
28639
|
+
var BEDROCK_AGENTS = AGENT_NAMES.filter((agent) => agentSupportsBedrock(agent)).join(", ");
|
|
28640
|
+
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}).`;
|
|
28619
28641
|
function addAgentModelOptions(cmd, config = {}) {
|
|
28620
28642
|
const { agentDescription = AGENT_DESCRIPTION, includeModel = true, modelDescription = MODEL_DESCRIPTION } = config;
|
|
28621
28643
|
cmd.option("--agent <name>", agentDescription);
|
|
28622
28644
|
if (includeModel) {
|
|
28623
28645
|
cmd.option("--model <name>", modelDescription);
|
|
28624
28646
|
}
|
|
28647
|
+
cmd.option("--bedrock", BEDROCK_DESCRIPTION);
|
|
28625
28648
|
return cmd;
|
|
28626
28649
|
}
|
|
28627
28650
|
|
|
@@ -29410,6 +29433,12 @@ function registerAnalyzeSelectAgentCommand(program) {
|
|
|
29410
29433
|
return;
|
|
29411
29434
|
}
|
|
29412
29435
|
const agent = agentName;
|
|
29436
|
+
if (opts.bedrock && !agentSupportsBedrock(agent)) {
|
|
29437
|
+
process.stderr.write(`Error: --bedrock is not supported for --agent ${agent}
|
|
29438
|
+
`);
|
|
29439
|
+
await exitWithAnalytics(1);
|
|
29440
|
+
return;
|
|
29441
|
+
}
|
|
29413
29442
|
const selectPromptPath = opts.selectPromptPath ?? savedCreds.selectPromptPath;
|
|
29414
29443
|
if (selectPromptPath) {
|
|
29415
29444
|
const resolvedPath = resolve12(selectPromptPath);
|
|
@@ -30653,6 +30682,14 @@ function registerAnalyzeCommand(program) {
|
|
|
30653
30682
|
}
|
|
30654
30683
|
return v;
|
|
30655
30684
|
})();
|
|
30685
|
+
if (opts.bedrock) {
|
|
30686
|
+
const bedrockAgent = resolveCompositionAgentName(opts.agent);
|
|
30687
|
+
if (!agentSupportsBedrock(bedrockAgent)) {
|
|
30688
|
+
process.stderr.write(`Error: --bedrock is not supported for --agent ${bedrockAgent}
|
|
30689
|
+
`);
|
|
30690
|
+
process.exit(1);
|
|
30691
|
+
}
|
|
30692
|
+
}
|
|
30656
30693
|
const projectRoot = resolve15(opts.project);
|
|
30657
30694
|
const outDir = join15(projectRoot, ".contentful");
|
|
30658
30695
|
let sourceDirectory;
|
|
@@ -31488,6 +31525,9 @@ async function runGenerateSkill(skill, opts, verbose = false) {
|
|
|
31488
31525
|
);
|
|
31489
31526
|
}
|
|
31490
31527
|
const agent = agentName;
|
|
31528
|
+
if (opts.bedrock && !agentSupportsBedrock(agent)) {
|
|
31529
|
+
die2(`Error: --bedrock is not supported for --agent ${agent}`);
|
|
31530
|
+
}
|
|
31491
31531
|
const generatePromptPath = skill === "components" ? opts.generatePromptPath ?? savedCreds.generatePromptPath : void 0;
|
|
31492
31532
|
if (generatePromptPath) {
|
|
31493
31533
|
if (!await pathExists3(resolve17(generatePromptPath))) {
|
|
@@ -32732,6 +32772,7 @@ function registerPrintCommand(program) {
|
|
|
32732
32772
|
}
|
|
32733
32773
|
|
|
32734
32774
|
// packages/experience-design-system-cli/src/import/command.ts
|
|
32775
|
+
init_src();
|
|
32735
32776
|
init_path_utils();
|
|
32736
32777
|
import { resolve as resolve25, join as join25 } from "node:path";
|
|
32737
32778
|
|
|
@@ -32886,6 +32927,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
|
|
|
32886
32927
|
if (opts.generateMap) analyzeArgs.push("--generate-map", opts.generateMap);
|
|
32887
32928
|
for (const p of opts.promptOverrides ?? []) analyzeArgs.push("--prompt", p);
|
|
32888
32929
|
if (opts.agent) analyzeArgs.push("--agent", opts.agent);
|
|
32930
|
+
if (opts.bedrock) analyzeArgs.push("--bedrock");
|
|
32889
32931
|
}
|
|
32890
32932
|
const r = await runStep(analyzeArgs, cliPath, sessionId2);
|
|
32891
32933
|
const durationMs = Date.now() - t0;
|
|
@@ -32936,6 +32978,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
|
|
|
32936
32978
|
if (useAgentSelect) {
|
|
32937
32979
|
editArgs = ["analyze", "select-agent", "--session", extractSessionId, "--agent", opts.agent];
|
|
32938
32980
|
if (opts.model) editArgs.push("--model", opts.model);
|
|
32981
|
+
if (opts.bedrock) editArgs.push("--bedrock");
|
|
32939
32982
|
if (opts.excludeInvalid) editArgs.push("--exclude-invalid");
|
|
32940
32983
|
if (opts.noCache) editArgs.push("--no-cache");
|
|
32941
32984
|
if (opts.selectPromptPath) editArgs.push("--select-prompt-path", opts.selectPromptPath);
|
|
@@ -32997,6 +33040,7 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
|
|
|
32997
33040
|
const generateLabel = stepLabel("Categorizing component props");
|
|
32998
33041
|
const generateArgs = ["generate", "components", "--agent", opts.agent];
|
|
32999
33042
|
if (opts.model) generateArgs.push("--model", opts.model);
|
|
33043
|
+
if (opts.bedrock) generateArgs.push("--bedrock");
|
|
33000
33044
|
if (extractSessionId) generateArgs.push("--session", extractSessionId);
|
|
33001
33045
|
if (opts.dryRun) generateArgs.push("--dry-run");
|
|
33002
33046
|
if (opts.verbose) generateArgs.push("--verbose");
|
|
@@ -33940,6 +33984,11 @@ function registerImportCommand(program) {
|
|
|
33940
33984
|
const resolvedAgent = resolveAgent(opts.agent, creds.agent);
|
|
33941
33985
|
const resolvedModel = resolveModel(opts.model, creds.agentModel);
|
|
33942
33986
|
const resolvedCompositionMode = resolveCompositionMode(opts, creds.compositionMode);
|
|
33987
|
+
if (opts.bedrock && !(isAgentName(resolvedAgent) && agentSupportsBedrock(resolvedAgent))) {
|
|
33988
|
+
process.stderr.write(`Error: --bedrock is not supported for --agent ${resolvedAgent}
|
|
33989
|
+
`);
|
|
33990
|
+
process.exit(1);
|
|
33991
|
+
}
|
|
33943
33992
|
const pickerDecision = await shouldShowRunPicker({
|
|
33944
33993
|
flags: {
|
|
33945
33994
|
...opts.pushFromRun !== void 0 ? { pushFromRun: opts.pushFromRun } : {},
|
|
@@ -33968,6 +34017,7 @@ function registerImportCommand(program) {
|
|
|
33968
34017
|
initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
|
|
33969
34018
|
initialAgent: resolvedAgent,
|
|
33970
34019
|
...resolvedModel ? { initialModel: resolvedModel } : {},
|
|
34020
|
+
...opts.bedrock ? { bedrock: true } : {},
|
|
33971
34021
|
initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
|
|
33972
34022
|
host: opts.host,
|
|
33973
34023
|
autoAcceptScope,
|
|
@@ -34030,6 +34080,11 @@ function registerImportCommand(program) {
|
|
|
34030
34080
|
const headlessAgent = resolveAgent(opts.agent, headlessCreds.agent);
|
|
34031
34081
|
const headlessModel = resolveModel(opts.model, headlessCreds.agentModel);
|
|
34032
34082
|
const headlessCompositionMode = resolveCompositionMode(opts, headlessCreds.compositionMode);
|
|
34083
|
+
if (opts.bedrock && !(isAgentName(headlessAgent) && agentSupportsBedrock(headlessAgent))) {
|
|
34084
|
+
process.stderr.write(`Error: --bedrock is not supported for --agent ${headlessAgent}
|
|
34085
|
+
`);
|
|
34086
|
+
process.exit(1);
|
|
34087
|
+
}
|
|
34033
34088
|
const result = await runPipeline(
|
|
34034
34089
|
{
|
|
34035
34090
|
project: projectRoot,
|
|
@@ -34039,6 +34094,7 @@ function registerImportCommand(program) {
|
|
|
34039
34094
|
cmaToken,
|
|
34040
34095
|
agent: headlessAgent,
|
|
34041
34096
|
model: headlessModel,
|
|
34097
|
+
...opts.bedrock ? { bedrock: true } : {},
|
|
34042
34098
|
tokens: opts.tokens,
|
|
34043
34099
|
selectAll: opts.selectAll,
|
|
34044
34100
|
select: opts.select.length > 0 ? opts.select : void 0,
|
|
@@ -35174,6 +35230,13 @@ async function runBuild(opts) {
|
|
|
35174
35230
|
child.on("exit", (code) => settle(code ?? 1));
|
|
35175
35231
|
});
|
|
35176
35232
|
}
|
|
35233
|
+
function resolveBedrockFromAncestors(actionCommand) {
|
|
35234
|
+
for (let c2 = actionCommand; c2; c2 = c2.parent) {
|
|
35235
|
+
const opts = c2.opts();
|
|
35236
|
+
if (opts.bedrock) return true;
|
|
35237
|
+
}
|
|
35238
|
+
return false;
|
|
35239
|
+
}
|
|
35177
35240
|
function registerBuildCommand(program) {
|
|
35178
35241
|
program.command("build").description("Rebuild from source and re-link exo/experiences binaries to this build").action(async () => {
|
|
35179
35242
|
const pkgRoot = resolve26(dirname14(fileURLToPath5(import.meta.url)), "..", "..");
|
|
@@ -35210,6 +35273,9 @@ function createProgram() {
|
|
|
35210
35273
|
break;
|
|
35211
35274
|
}
|
|
35212
35275
|
}
|
|
35276
|
+
if (resolveBedrockFromAncestors(actionCommand)) {
|
|
35277
|
+
process.env.EDS_BEDROCK = "1";
|
|
35278
|
+
}
|
|
35213
35279
|
const chain = [];
|
|
35214
35280
|
for (let c2 = actionCommand; c2 && c2.parent; c2 = c2.parent) chain.unshift(c2.name());
|
|
35215
35281
|
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
|
|
11
|
-
* Pass
|
|
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;
|
package/dist/src/program.d.ts
CHANGED
|
@@ -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.27.5-dev-build-
|
|
3
|
+
"version": "2.27.5-dev-build-c49af6a.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
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.27.5-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-types": "2.27.5-dev-build-c49af6a.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"ink-testing-library": "^4.0.0",
|
|
52
52
|
"typescript-eslint": "^8.67.0",
|
|
53
53
|
"vitest": "^4.0.16",
|
|
54
|
-
"@contentful/experience-design-system-client": "2.27.5-dev-build-
|
|
55
|
-
"@contentful/experience-design-system-extraction": "2.27.5-dev-build-
|
|
56
|
-
"@contentful/experience-design-system-generation": "2.27.5-dev-build-
|
|
54
|
+
"@contentful/experience-design-system-client": "2.27.5-dev-build-c49af6a.0",
|
|
55
|
+
"@contentful/experience-design-system-extraction": "2.27.5-dev-build-c49af6a.0",
|
|
56
|
+
"@contentful/experience-design-system-generation": "2.27.5-dev-build-c49af6a.0"
|
|
57
57
|
},
|
|
58
58
|
"repository": {
|
|
59
59
|
"type": "git",
|