@contentful/experience-design-system-cli 2.27.1-dev-build-fd316dc.0 → 2.27.1-dev-build-7cd07de.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/analyze/select/tui/components/FieldEditor.d.ts +2 -0
- package/dist/src/import/orchestrator.d.ts +0 -1
- package/dist/src/import/tui/WizardApp.d.ts +1 -4
- package/dist/src/index.js +143 -155
- package/dist/src/lib/agent-model-options.d.ts +4 -2
- package/package.json +5 -5
package/dist/package.json
CHANGED
|
@@ -7,7 +7,6 @@ export declare function buildSelectAgentArgs(opts: {
|
|
|
7
7
|
sessionId: string;
|
|
8
8
|
agent: string;
|
|
9
9
|
model?: string;
|
|
10
|
-
bedrock?: boolean;
|
|
11
10
|
selectPromptPath?: string;
|
|
12
11
|
noCache?: boolean;
|
|
13
12
|
}): string[];
|
|
@@ -24,7 +23,6 @@ export declare function buildGenerateComponentsArgs(opts: {
|
|
|
24
23
|
tokensPath?: string;
|
|
25
24
|
agent: string;
|
|
26
25
|
model?: string;
|
|
27
|
-
bedrock?: boolean;
|
|
28
26
|
noCache?: boolean;
|
|
29
27
|
generatePromptPath?: string;
|
|
30
28
|
}): string[];
|
|
@@ -40,7 +38,6 @@ export type WizardAppProps = {
|
|
|
40
38
|
initialHost?: string;
|
|
41
39
|
initialAgent?: string;
|
|
42
40
|
initialModel?: string;
|
|
43
|
-
bedrock?: boolean;
|
|
44
41
|
initialProjectPath?: string;
|
|
45
42
|
host?: string;
|
|
46
43
|
autoAcceptScope?: boolean;
|
|
@@ -71,4 +68,4 @@ export type WizardAppProps = {
|
|
|
71
68
|
onRunPicked?: (selection: RunPickerSelection) => void;
|
|
72
69
|
allowDeletions?: boolean;
|
|
73
70
|
};
|
|
74
|
-
export declare function WizardApp({ initialSpaceId, initialEnvironmentId, initialCmaToken, initialHost, initialAgent, initialModel,
|
|
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;
|
package/dist/src/index.js
CHANGED
|
@@ -231,9 +231,6 @@ 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
|
-
}
|
|
237
234
|
function resolveAgentModel(agent, explicit) {
|
|
238
235
|
if (explicit && explicit.trim())
|
|
239
236
|
return explicit.trim();
|
|
@@ -257,7 +254,7 @@ function buildArgs(agent, prompt2, model, promptViaStdin = false) {
|
|
|
257
254
|
}
|
|
258
255
|
}
|
|
259
256
|
async function runAgent(options) {
|
|
260
|
-
const { agent, prompt: prompt2, timeoutMs, model,
|
|
257
|
+
const { agent, prompt: prompt2, timeoutMs, model, onOutput, promptViaStdin, onDebugEvent } = options;
|
|
261
258
|
const binary = resolveBinary(agent);
|
|
262
259
|
const useStdin2 = !!promptViaStdin;
|
|
263
260
|
const args = buildArgs(agent, prompt2, model, useStdin2);
|
|
@@ -266,16 +263,13 @@ async function runAgent(options) {
|
|
|
266
263
|
agent,
|
|
267
264
|
binary,
|
|
268
265
|
model,
|
|
269
|
-
bedrock: !!bedrock,
|
|
270
266
|
timeoutMs,
|
|
271
267
|
promptLen: prompt2.length,
|
|
272
268
|
promptHead: prompt2.slice(0, 500)
|
|
273
269
|
});
|
|
274
270
|
return new Promise((resolve27) => {
|
|
275
|
-
const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
|
|
276
271
|
const child = spawn(binary, args, {
|
|
277
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
278
|
-
...bedrockEnv ? { env: { ...process.env, ...bedrockEnv } } : {}
|
|
272
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
279
273
|
});
|
|
280
274
|
if (useStdin2 && child.stdin) {
|
|
281
275
|
child.stdin.on("error", () => {
|
|
@@ -393,7 +387,7 @@ function extractSentinelOutput(stdout) {
|
|
|
393
387
|
return "multiple";
|
|
394
388
|
return stdout.slice(startIdx + START.length, endIdx).trim();
|
|
395
389
|
}
|
|
396
|
-
var VALID_SELECT_TOOL_NAMES, VALID_TOOL_NAMES, VALID_TOKEN_TOOL_NAMES, VALID_CDF_TYPES, VALID_CATEGORIES, AGENT_BINARIES,
|
|
390
|
+
var VALID_SELECT_TOOL_NAMES, VALID_TOOL_NAMES, VALID_TOKEN_TOOL_NAMES, VALID_CDF_TYPES, VALID_CATEGORIES, AGENT_BINARIES, DEFAULT_MODELS;
|
|
397
391
|
var init_agent_runner = __esm({
|
|
398
392
|
"packages/experience-design-system-generation/dist/src/agent-runner.js"() {
|
|
399
393
|
"use strict";
|
|
@@ -409,9 +403,6 @@ var init_agent_runner = __esm({
|
|
|
409
403
|
opencode: "opencode",
|
|
410
404
|
cursor: "cursor-agent"
|
|
411
405
|
};
|
|
412
|
-
BEDROCK_ENV_BY_AGENT = {
|
|
413
|
-
claude: { CLAUDE_CODE_USE_BEDROCK: "1" }
|
|
414
|
-
};
|
|
415
406
|
DEFAULT_MODELS = {
|
|
416
407
|
claude: "haiku",
|
|
417
408
|
codex: "gpt-5.4-mini",
|
|
@@ -680,7 +671,6 @@ var src_exports = {};
|
|
|
680
671
|
__export(src_exports, {
|
|
681
672
|
AGENT_NAMES: () => AGENT_NAMES,
|
|
682
673
|
DEFAULT_AGENT_NAME: () => DEFAULT_AGENT_NAME,
|
|
683
|
-
agentSupportsBedrock: () => agentSupportsBedrock,
|
|
684
674
|
buildArgs: () => buildArgs,
|
|
685
675
|
buildPrompt: () => buildPrompt,
|
|
686
676
|
checkAgentAuth: () => checkAgentAuth,
|
|
@@ -21765,10 +21755,17 @@ function PropRow({
|
|
|
21765
21755
|
] }),
|
|
21766
21756
|
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "type:" }),
|
|
21767
21757
|
activeField === "type" ? /* @__PURE__ */ jsx44(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx44(Text43, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }),
|
|
21768
|
-
/* @__PURE__ */ jsx44(
|
|
21769
|
-
activeField === "category" ? /* @__PURE__ */ jsx44(Picker, { value: prop.category, active: true }) : /* @__PURE__ */ jsx44(Text43, { color: selected ? PALETTE.info : PALETTE.inverse, children: prop.category }),
|
|
21758
|
+
activeField === "category" && /* @__PURE__ */ jsx44(Picker, { value: prop.category, active: true }),
|
|
21770
21759
|
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "req:" }),
|
|
21771
21760
|
activeField === "required" ? /* @__PURE__ */ jsx44(Toggle, { value: prop.required, active: true }) : /* @__PURE__ */ jsx44(Toggle, { value: prop.required, active: false }),
|
|
21761
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs43(Fragment12, { children: [
|
|
21762
|
+
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "values:" }),
|
|
21763
|
+
/* @__PURE__ */ jsxs43(Text43, { color: selected ? PALETTE.warning : PALETTE.inverse, children: [
|
|
21764
|
+
"[",
|
|
21765
|
+
prop.values.join(", "),
|
|
21766
|
+
"]"
|
|
21767
|
+
] })
|
|
21768
|
+
] }),
|
|
21772
21769
|
prop.type === "token" && /* @__PURE__ */ jsxs43(Fragment12, { children: [
|
|
21773
21770
|
/* @__PURE__ */ jsx44(Text43, { dimColor: !selected, children: "kind:" }),
|
|
21774
21771
|
activeField === "tokenKind" ? /* @__PURE__ */ jsx44(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx44(Text43, { color: selected ? PALETTE.success : PALETTE.inverse, children: prop.tokenKind || "\u2014" })
|
|
@@ -21800,7 +21797,7 @@ function PropRow({
|
|
|
21800
21797
|
const text = `~ ${rationale}`;
|
|
21801
21798
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
21802
21799
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
21803
|
-
selected && prop.type === "enum" && /* @__PURE__ */ jsxs43(Box41, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21800
|
+
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs43(Box41, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21804
21801
|
/* @__PURE__ */ jsxs43(Box41, { children: [
|
|
21805
21802
|
/* @__PURE__ */ jsx44(Text43, { dimColor: true, children: "values:" }),
|
|
21806
21803
|
activeField === "values" && /* @__PURE__ */ jsx44(Text43, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
@@ -22024,31 +22021,40 @@ function FieldEditor({
|
|
|
22024
22021
|
const [editorState, setEditorState] = useState23(initialState);
|
|
22025
22022
|
const [parseErr] = useState23(parseError);
|
|
22026
22023
|
const initialFocus = (() => {
|
|
22027
|
-
if (initialFocusTarget) {
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
|
|
22040
|
-
|
|
22041
|
-
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
|
|
22047
|
-
|
|
22048
|
-
|
|
22049
|
-
|
|
22050
|
-
|
|
22051
|
-
|
|
22024
|
+
if (initialFocusTarget?.kind === "description") {
|
|
22025
|
+
return {
|
|
22026
|
+
focusLevel: "componentDescription",
|
|
22027
|
+
inSlots: false,
|
|
22028
|
+
propIdx: 0,
|
|
22029
|
+
slotIdx: 0,
|
|
22030
|
+
activeField: null,
|
|
22031
|
+
textCursor: 0
|
|
22032
|
+
};
|
|
22033
|
+
}
|
|
22034
|
+
if (initialFocusTarget?.kind === "prop") {
|
|
22035
|
+
const idx = initialState.props.findIndex((p) => p.name === initialFocusTarget.name);
|
|
22036
|
+
if (idx >= 0) {
|
|
22037
|
+
return {
|
|
22038
|
+
focusLevel: "prop",
|
|
22039
|
+
inSlots: false,
|
|
22040
|
+
propIdx: idx,
|
|
22041
|
+
slotIdx: 0,
|
|
22042
|
+
activeField: null,
|
|
22043
|
+
textCursor: 0
|
|
22044
|
+
};
|
|
22045
|
+
}
|
|
22046
|
+
}
|
|
22047
|
+
if (initialFocusTarget?.kind === "slot") {
|
|
22048
|
+
const idx = initialState.slots.findIndex((s) => s.name === initialFocusTarget.name);
|
|
22049
|
+
if (idx >= 0) {
|
|
22050
|
+
return {
|
|
22051
|
+
focusLevel: "slot",
|
|
22052
|
+
inSlots: true,
|
|
22053
|
+
propIdx: 0,
|
|
22054
|
+
slotIdx: idx,
|
|
22055
|
+
activeField: null,
|
|
22056
|
+
textCursor: 0
|
|
22057
|
+
};
|
|
22052
22058
|
}
|
|
22053
22059
|
}
|
|
22054
22060
|
if (initialState.props.length > 0) {
|
|
@@ -22084,7 +22090,7 @@ function FieldEditor({
|
|
|
22084
22090
|
const [propIdx, setPropIdx] = useState23(initialFocus.propIdx);
|
|
22085
22091
|
const [slotIdx, setSlotIdx] = useState23(initialFocus.slotIdx);
|
|
22086
22092
|
const [inSlots, setInSlots] = useState23(initialFocus.inSlots);
|
|
22087
|
-
const [inComponentDesc, setInComponentDesc] = useState23(
|
|
22093
|
+
const [inComponentDesc, setInComponentDesc] = useState23(initialFocus.focusLevel === "componentDescription");
|
|
22088
22094
|
const [activeField, setActiveField] = useState23(initialFocus.activeField);
|
|
22089
22095
|
const [textCursor, setTextCursor] = useState23(initialFocus.textCursor);
|
|
22090
22096
|
const [valueCursor, setValueCursor] = useState23(0);
|
|
@@ -22099,13 +22105,58 @@ function FieldEditor({
|
|
|
22099
22105
|
const [showHelp, setShowHelp] = useState23(false);
|
|
22100
22106
|
const props = editorState.props;
|
|
22101
22107
|
const slots = editorState.slots;
|
|
22102
|
-
const
|
|
22103
|
-
() => props.flatMap(
|
|
22104
|
-
|
|
22105
|
-
|
|
22108
|
+
const contentPropIndexes = React23.useMemo(
|
|
22109
|
+
() => props.flatMap((prop, index) => prop.category === "content" ? [index] : []),
|
|
22110
|
+
[props]
|
|
22111
|
+
);
|
|
22112
|
+
const designPropIndexes = React23.useMemo(
|
|
22113
|
+
() => props.flatMap((prop, index) => prop.category === "design" ? [index] : []),
|
|
22114
|
+
[props]
|
|
22115
|
+
);
|
|
22116
|
+
const hiddenPropIndexes = React23.useMemo(
|
|
22117
|
+
() => showHiddenProps ? props.flatMap((prop, index) => prop.category === "state" || prop.category === "unattached" ? [index] : []) : [],
|
|
22106
22118
|
[props, showHiddenProps]
|
|
22107
22119
|
);
|
|
22120
|
+
const visiblePropIndexes = React23.useMemo(
|
|
22121
|
+
() => [...contentPropIndexes, ...designPropIndexes, ...hiddenPropIndexes],
|
|
22122
|
+
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
22123
|
+
);
|
|
22124
|
+
const propGroups = React23.useMemo(
|
|
22125
|
+
() => [
|
|
22126
|
+
{ kind: "content", label: "\u2500\u2500 CONTENT PROPERTIES", indexes: contentPropIndexes },
|
|
22127
|
+
{ kind: "design", label: "\u2500\u2500 DESIGN PROPERTIES", indexes: designPropIndexes },
|
|
22128
|
+
{ kind: "hidden", label: "\u2500\u2500 OTHER / HIDDEN", indexes: hiddenPropIndexes }
|
|
22129
|
+
],
|
|
22130
|
+
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
22131
|
+
);
|
|
22132
|
+
const selectableRows = React23.useMemo(
|
|
22133
|
+
() => [
|
|
22134
|
+
...contentPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
22135
|
+
...designPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
22136
|
+
...slots.map((_, idx) => ({ kind: "slot", idx })),
|
|
22137
|
+
...hiddenPropIndexes.map((idx) => ({ kind: "prop", idx }))
|
|
22138
|
+
],
|
|
22139
|
+
[contentPropIndexes, designPropIndexes, hiddenPropIndexes, slots]
|
|
22140
|
+
);
|
|
22108
22141
|
const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
|
|
22142
|
+
const selectedSelectableIndex = React23.useMemo(
|
|
22143
|
+
() => selectableRows.findIndex(
|
|
22144
|
+
(row) => inSlots ? row.kind === "slot" && row.idx === slotIdx : row.kind === "prop" && row.idx === propIdx
|
|
22145
|
+
),
|
|
22146
|
+
[inSlots, propIdx, selectableRows, slotIdx]
|
|
22147
|
+
);
|
|
22148
|
+
const focusSelectableRow = (row) => {
|
|
22149
|
+
setInComponentDesc(false);
|
|
22150
|
+
if (row.kind === "prop") {
|
|
22151
|
+
setInSlots(false);
|
|
22152
|
+
setPropIdx(row.idx);
|
|
22153
|
+
setFocusLevel("prop");
|
|
22154
|
+
} else {
|
|
22155
|
+
setInSlots(true);
|
|
22156
|
+
setSlotIdx(row.idx);
|
|
22157
|
+
setFocusLevel("slot");
|
|
22158
|
+
}
|
|
22159
|
+
};
|
|
22109
22160
|
const textEntryActive = focusLevel === "field" && activeField === "description" || focusLevel === "field" && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
|
|
22110
22161
|
React23.useEffect(() => {
|
|
22111
22162
|
onTextEntryActiveChange?.(textEntryActive);
|
|
@@ -22326,51 +22377,13 @@ function FieldEditor({
|
|
|
22326
22377
|
}
|
|
22327
22378
|
return;
|
|
22328
22379
|
}
|
|
22329
|
-
if (focusLevel === "prop") {
|
|
22330
|
-
if (key.upArrow || input === "k") {
|
|
22331
|
-
if (visiblePropPosition > 0) {
|
|
22332
|
-
setPropIdx(visiblePropIndexes[visiblePropPosition - 1]);
|
|
22333
|
-
} else {
|
|
22334
|
-
setFocusLevel("componentDescription");
|
|
22335
|
-
setInSlots(false);
|
|
22336
|
-
setInComponentDesc(true);
|
|
22337
|
-
}
|
|
22338
|
-
return;
|
|
22339
|
-
}
|
|
22340
|
-
if (key.downArrow || input === "j") {
|
|
22341
|
-
if (visiblePropPosition >= 0 && visiblePropPosition < visiblePropIndexes.length - 1) {
|
|
22342
|
-
setPropIdx(visiblePropIndexes[visiblePropPosition + 1]);
|
|
22343
|
-
} else if (slots.length > 0) {
|
|
22344
|
-
setInSlots(true);
|
|
22345
|
-
setSlotIdx(0);
|
|
22346
|
-
setFocusLevel("slot");
|
|
22347
|
-
}
|
|
22348
|
-
return;
|
|
22349
|
-
}
|
|
22350
|
-
if (key.return && currentProp) {
|
|
22351
|
-
setFocusLevel("field");
|
|
22352
|
-
setActiveField(propFields(currentProp)[0] ?? null);
|
|
22353
|
-
setTextCursor(currentProp.description.length);
|
|
22354
|
-
return;
|
|
22355
|
-
}
|
|
22356
|
-
return;
|
|
22357
|
-
}
|
|
22358
22380
|
if (focusLevel === "componentDescription") {
|
|
22359
22381
|
if (key.upArrow || input === "k") {
|
|
22360
22382
|
return;
|
|
22361
22383
|
}
|
|
22362
22384
|
if (key.downArrow || input === "j") {
|
|
22363
|
-
|
|
22364
|
-
|
|
22365
|
-
setPropIdx(visiblePropIndexes[0]);
|
|
22366
|
-
setInSlots(false);
|
|
22367
|
-
setInComponentDesc(false);
|
|
22368
|
-
} else if (slots.length > 0) {
|
|
22369
|
-
setFocusLevel("slot");
|
|
22370
|
-
setSlotIdx(0);
|
|
22371
|
-
setInSlots(true);
|
|
22372
|
-
setInComponentDesc(false);
|
|
22373
|
-
}
|
|
22385
|
+
const firstSelectableRow = selectableRows[0];
|
|
22386
|
+
if (firstSelectableRow) focusSelectableRow(firstSelectableRow);
|
|
22374
22387
|
return;
|
|
22375
22388
|
}
|
|
22376
22389
|
if (key.return) {
|
|
@@ -22381,29 +22394,35 @@ function FieldEditor({
|
|
|
22381
22394
|
}
|
|
22382
22395
|
return;
|
|
22383
22396
|
}
|
|
22384
|
-
if (focusLevel === "slot") {
|
|
22397
|
+
if (focusLevel === "prop" || focusLevel === "slot") {
|
|
22385
22398
|
if (key.upArrow || input === "k") {
|
|
22386
|
-
if (
|
|
22387
|
-
|
|
22388
|
-
} else if (
|
|
22399
|
+
if (selectedSelectableIndex > 0) {
|
|
22400
|
+
focusSelectableRow(selectableRows[selectedSelectableIndex - 1]);
|
|
22401
|
+
} else if (selectedSelectableIndex === 0) {
|
|
22402
|
+
setFocusLevel("componentDescription");
|
|
22389
22403
|
setInSlots(false);
|
|
22390
|
-
|
|
22391
|
-
setFocusLevel("prop");
|
|
22404
|
+
setInComponentDesc(true);
|
|
22392
22405
|
}
|
|
22393
22406
|
return;
|
|
22394
22407
|
}
|
|
22395
22408
|
if (key.downArrow || input === "j") {
|
|
22396
|
-
if (
|
|
22397
|
-
|
|
22409
|
+
if (selectedSelectableIndex >= 0 && selectedSelectableIndex < selectableRows.length - 1) {
|
|
22410
|
+
focusSelectableRow(selectableRows[selectedSelectableIndex + 1]);
|
|
22398
22411
|
}
|
|
22399
22412
|
return;
|
|
22400
22413
|
}
|
|
22401
|
-
if (key.return && currentSlot) {
|
|
22414
|
+
if (focusLevel === "slot" && key.return && currentSlot) {
|
|
22402
22415
|
setFocusLevel("field");
|
|
22403
22416
|
setActiveField(SLOT_FIELDS[0] ?? null);
|
|
22404
22417
|
setTextCursor(currentSlot.description.length);
|
|
22405
22418
|
return;
|
|
22406
22419
|
}
|
|
22420
|
+
if (focusLevel === "prop" && key.return && currentProp) {
|
|
22421
|
+
setFocusLevel("field");
|
|
22422
|
+
setActiveField(propFields(currentProp)[0] ?? null);
|
|
22423
|
+
setTextCursor(currentProp.description.length);
|
|
22424
|
+
return;
|
|
22425
|
+
}
|
|
22407
22426
|
return;
|
|
22408
22427
|
}
|
|
22409
22428
|
if (focusLevel === "field") {
|
|
@@ -22732,14 +22751,24 @@ function FieldEditor({
|
|
|
22732
22751
|
})();
|
|
22733
22752
|
const rows = [];
|
|
22734
22753
|
rows.push({ kind: "component-description" });
|
|
22735
|
-
|
|
22736
|
-
|
|
22737
|
-
|
|
22754
|
+
for (const group of propGroups.filter((candidate) => candidate.kind !== "hidden")) {
|
|
22755
|
+
if (group.indexes.length === 0) continue;
|
|
22756
|
+
rows.push({ kind: "header", label: `${group.label} (${group.indexes.length}) `, section: group.kind });
|
|
22757
|
+
group.indexes.forEach((idx) => rows.push({ kind: "prop", idx }));
|
|
22738
22758
|
}
|
|
22739
22759
|
if (slots.length > 0) {
|
|
22740
22760
|
rows.push({ kind: "header", label: `\u2500\u2500 SLOTS (${slots.length}) `, section: "slots" });
|
|
22741
22761
|
slots.forEach((_, i) => rows.push({ kind: "slot", idx: i }));
|
|
22742
22762
|
}
|
|
22763
|
+
const hiddenGroup = propGroups.find((group) => group.kind === "hidden");
|
|
22764
|
+
if (hiddenGroup && hiddenGroup.indexes.length > 0) {
|
|
22765
|
+
rows.push({
|
|
22766
|
+
kind: "header",
|
|
22767
|
+
label: `${hiddenGroup.label} (${hiddenGroup.indexes.length}) `,
|
|
22768
|
+
section: "hidden"
|
|
22769
|
+
});
|
|
22770
|
+
hiddenGroup.indexes.forEach((idx) => rows.push({ kind: "prop", idx }));
|
|
22771
|
+
}
|
|
22743
22772
|
const selectedRowIdx = rows.findIndex(
|
|
22744
22773
|
(r) => r.kind === "prop" && !inSlots && !inComponentDesc && r.idx === propIdx || r.kind === "slot" && inSlots && r.idx === slotIdx || r.kind === "component-description" && inComponentDesc
|
|
22745
22774
|
);
|
|
@@ -22754,32 +22783,31 @@ function FieldEditor({
|
|
|
22754
22783
|
borderStyle: "single",
|
|
22755
22784
|
borderColor: hasEmptyProperties ? PALETTE.warning : PALETTE.info,
|
|
22756
22785
|
children: [
|
|
22757
|
-
/* @__PURE__ */ jsx44(Text43, { bold: true, color: hasEmptyProperties ? PALETTE.warning : PALETTE.info, children: "FIELDS [Ctrl+S save \xB7 Esc discard]" }),
|
|
22758
22786
|
hasEmptyProperties && /* @__PURE__ */ jsx44(Text43, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
|
|
22759
22787
|
/* @__PURE__ */ jsx44(Box41, { flexDirection: "column", width: innerWidth, children: visibleRowSlice.map((row, i) => {
|
|
22760
22788
|
if (row.kind === "header") {
|
|
22761
|
-
return /* @__PURE__ */ jsx44(Text43, { bold: true, color:
|
|
22789
|
+
return /* @__PURE__ */ jsx44(Text43, { bold: true, color: PALETTE.success, children: row.label }, `header-${i}`);
|
|
22762
22790
|
}
|
|
22763
22791
|
if (row.kind === "component-description") {
|
|
22764
22792
|
const isSelected2 = inComponentDesc;
|
|
22765
22793
|
const isEditing = isSelected2 && focusLevel === "field" && activeField === "description";
|
|
22766
22794
|
const desc = editorState.componentDescription;
|
|
22767
|
-
return /* @__PURE__ */
|
|
22768
|
-
/* @__PURE__ */ jsx44(
|
|
22795
|
+
return /* @__PURE__ */ jsx44(Box41, { flexDirection: "column", children: /* @__PURE__ */ jsxs43(Box41, { gap: 1, children: [
|
|
22796
|
+
/* @__PURE__ */ jsx44(
|
|
22769
22797
|
Text43,
|
|
22770
22798
|
{
|
|
22771
22799
|
color: isSelected2 ? PALETTE.inverse : PALETTE.info,
|
|
22772
22800
|
bold: isSelected2,
|
|
22773
22801
|
backgroundColor: isSelected2 ? "blue" : void 0,
|
|
22774
|
-
children: "
|
|
22802
|
+
children: " description: "
|
|
22775
22803
|
}
|
|
22776
|
-
)
|
|
22777
|
-
isEditing ? /* @__PURE__ */
|
|
22804
|
+
),
|
|
22805
|
+
isEditing ? /* @__PURE__ */ jsxs43(Box41, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
22778
22806
|
/* @__PURE__ */ jsx44(Text43, { children: desc.slice(0, textCursor) }),
|
|
22779
22807
|
/* @__PURE__ */ jsx44(Text43, { inverse: cursorVisible, children: desc[textCursor] ?? (cursorVisible ? "\u2588" : " ") }),
|
|
22780
22808
|
/* @__PURE__ */ jsx44(Text43, { children: desc.slice(textCursor + 1) })
|
|
22781
|
-
] })
|
|
22782
|
-
] }, `component-description-${i}`);
|
|
22809
|
+
] }) : /* @__PURE__ */ jsx44(Text43, { color: isSelected2 ? PALETTE.warning : PALETTE.inverse, dimColor: !desc, children: desc || "(none \u2014 Return to edit)" })
|
|
22810
|
+
] }) }, `component-description-${i}`);
|
|
22783
22811
|
}
|
|
22784
22812
|
if (row.kind === "prop") {
|
|
22785
22813
|
const p = props[row.idx];
|
|
@@ -25283,7 +25311,7 @@ function GenerateReviewStep({
|
|
|
25283
25311
|
currentComponentName: selected.key,
|
|
25284
25312
|
onDirtyChange: setEditorDirty,
|
|
25285
25313
|
discardTrigger,
|
|
25286
|
-
initialFocusTarget: pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? pendingEditorFocus.target :
|
|
25314
|
+
initialFocusTarget: pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? pendingEditorFocus.target : { kind: "description" }
|
|
25287
25315
|
},
|
|
25288
25316
|
pendingEditorFocus && pendingEditorFocus.componentName === selected.key ? `${selected.key}::${pendingEditorFocus.target.kind}:${pendingEditorFocus.target.name}` : selected.key
|
|
25289
25317
|
),
|
|
@@ -26186,7 +26214,8 @@ function AtomicGenerateReviewStep({
|
|
|
26186
26214
|
setPanelOpen("source");
|
|
26187
26215
|
setPanelScrollOffset(() => 0);
|
|
26188
26216
|
},
|
|
26189
|
-
onTextEntryActiveChange: setTextEntryActive
|
|
26217
|
+
onTextEntryActiveChange: setTextEntryActive,
|
|
26218
|
+
initialFocusTarget: { kind: "description" }
|
|
26190
26219
|
},
|
|
26191
26220
|
selected.key
|
|
26192
26221
|
),
|
|
@@ -26419,7 +26448,6 @@ import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
|
26419
26448
|
function buildSelectAgentArgs(opts) {
|
|
26420
26449
|
const args = ["analyze", "select-agent", "--agent", opts.agent, "--session", opts.sessionId, "--exclude-invalid"];
|
|
26421
26450
|
if (opts.model) args.push("--model", opts.model);
|
|
26422
|
-
if (opts.bedrock) args.push("--bedrock");
|
|
26423
26451
|
if (opts.selectPromptPath) args.push("--select-prompt-path", opts.selectPromptPath);
|
|
26424
26452
|
if (opts.noCache) args.push("--no-cache");
|
|
26425
26453
|
return args;
|
|
@@ -26455,7 +26483,6 @@ function buildGenerateComponentsArgs(opts) {
|
|
|
26455
26483
|
const args = ["generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
|
|
26456
26484
|
if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
|
|
26457
26485
|
if (opts.model) args.push("--model", opts.model);
|
|
26458
|
-
if (opts.bedrock) args.push("--bedrock");
|
|
26459
26486
|
if (opts.noCache) args.push("--no-cache");
|
|
26460
26487
|
if (opts.generatePromptPath) args.push("--generate-prompt-path", opts.generatePromptPath);
|
|
26461
26488
|
return args;
|
|
@@ -26488,7 +26515,6 @@ function WizardApp({
|
|
|
26488
26515
|
initialHost,
|
|
26489
26516
|
initialAgent,
|
|
26490
26517
|
initialModel,
|
|
26491
|
-
bedrock = false,
|
|
26492
26518
|
initialProjectPath,
|
|
26493
26519
|
host,
|
|
26494
26520
|
autoAcceptScope = false,
|
|
@@ -26549,7 +26575,6 @@ function WizardApp({
|
|
|
26549
26575
|
step: modifyEntryReady || rawTokensEntryReady || pushFromPickerReady ? initialStepResolved : initialRuns && initialRuns.length > 0 ? "run-picker" : initialStepResolved,
|
|
26550
26576
|
agent: initialAgent ?? "claude",
|
|
26551
26577
|
...initialModel ? { agentModel: initialModel } : {},
|
|
26552
|
-
...bedrock ? { bedrock: true } : {},
|
|
26553
26578
|
projectPath: initialProjectPath ?? "",
|
|
26554
26579
|
outDir: initialOutDir,
|
|
26555
26580
|
rawTokensPath: rawTokensEntryReady ? initialRawTokensPath : "",
|
|
@@ -26688,7 +26713,6 @@ If you are using AWS Bedrock, run:
|
|
|
26688
26713
|
const result = await new Promise((res) => {
|
|
26689
26714
|
const tokenArgs = [findCliPath(), "generate", "tokens", "--agent", state.agent, "--raw-tokens", rawTokensPath];
|
|
26690
26715
|
if (state.agentModel) tokenArgs.push("--model", state.agentModel);
|
|
26691
|
-
if (state.bedrock) tokenArgs.push("--bedrock");
|
|
26692
26716
|
const child = spawn4("node", tokenArgs);
|
|
26693
26717
|
let stdout2 = "";
|
|
26694
26718
|
let stderr = "";
|
|
@@ -26846,7 +26870,6 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
|
|
|
26846
26870
|
sessionId: sessionId2,
|
|
26847
26871
|
agent: state.agent,
|
|
26848
26872
|
...state.agentModel ? { model: state.agentModel } : {},
|
|
26849
|
-
...state.bedrock ? { bedrock: true } : {},
|
|
26850
26873
|
selectPromptPath,
|
|
26851
26874
|
noCache
|
|
26852
26875
|
});
|
|
@@ -26945,7 +26968,6 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
|
|
|
26945
26968
|
tokensPath,
|
|
26946
26969
|
agent: state.agent,
|
|
26947
26970
|
...state.agentModel ? { model: state.agentModel } : {},
|
|
26948
|
-
...state.bedrock ? { bedrock: true } : {},
|
|
26949
26971
|
noCache: effectiveNoCache
|
|
26950
26972
|
})
|
|
26951
26973
|
];
|
|
@@ -27015,7 +27037,6 @@ Make sure this path contains TypeScript/React/Vue component files (.tsx, .ts, .v
|
|
|
27015
27037
|
tokensPath,
|
|
27016
27038
|
agent: state.agent,
|
|
27017
27039
|
...state.agentModel ? { model: state.agentModel } : {},
|
|
27018
|
-
...state.bedrock ? { bedrock: true } : {},
|
|
27019
27040
|
noCache: effectiveNoCache,
|
|
27020
27041
|
generatePromptPath
|
|
27021
27042
|
})
|
|
@@ -28491,14 +28512,11 @@ import { isAbsolute as isAbsolute4, join as join15, relative as relative3, resol
|
|
|
28491
28512
|
init_src();
|
|
28492
28513
|
var AGENT_DESCRIPTION = `Agent to use: ${AGENT_NAMES.join(", ")} (defaults to value saved by experiences setup)`;
|
|
28493
28514
|
var MODEL_DESCRIPTION = "Model to use (defaults to a lightweight per-agent model; override with EDS_AGENT_MODEL_<AGENT>)";
|
|
28494
|
-
var BEDROCK_AGENTS = AGENT_NAMES.filter((agent) => agentSupportsBedrock(agent)).join(", ");
|
|
28495
|
-
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}).`;
|
|
28496
28515
|
function addAgentModelOptions(cmd, config = {}) {
|
|
28497
28516
|
const { agentDescription = AGENT_DESCRIPTION, includeModel = true, modelDescription = MODEL_DESCRIPTION } = config;
|
|
28498
28517
|
cmd.option("--agent <name>", agentDescription);
|
|
28499
28518
|
if (includeModel) {
|
|
28500
28519
|
cmd.option("--model <name>", modelDescription);
|
|
28501
|
-
cmd.option("--bedrock", BEDROCK_DESCRIPTION);
|
|
28502
28520
|
}
|
|
28503
28521
|
return cmd;
|
|
28504
28522
|
}
|
|
@@ -29051,7 +29069,7 @@ function resolveProjectRoot(sessionId2, projectRootFlag) {
|
|
|
29051
29069
|
db.close();
|
|
29052
29070
|
}
|
|
29053
29071
|
}
|
|
29054
|
-
async function selectBatch(agent, model,
|
|
29072
|
+
async function selectBatch(agent, model, batch, total, verbose, skillPathOverride) {
|
|
29055
29073
|
const prompt2 = await buildPrompt({
|
|
29056
29074
|
skill: "select",
|
|
29057
29075
|
mode: "autonomous",
|
|
@@ -29070,7 +29088,6 @@ async function selectBatch(agent, model, bedrock, batch, total, verbose, skillPa
|
|
|
29070
29088
|
const result = await invoker.invoke({
|
|
29071
29089
|
agent,
|
|
29072
29090
|
model,
|
|
29073
|
-
bedrock,
|
|
29074
29091
|
prompt: prompt2,
|
|
29075
29092
|
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
29076
29093
|
onOutput: (chunk) => formatter.push(chunk)
|
|
@@ -29157,7 +29174,7 @@ ${outputBuf}`);
|
|
|
29157
29174
|
}
|
|
29158
29175
|
return results;
|
|
29159
29176
|
}
|
|
29160
|
-
async function selectAllComponents(agent, model,
|
|
29177
|
+
async function selectAllComponents(agent, model, components, verbose, skillPathOverride, cacheConfig = { noCache: true }) {
|
|
29161
29178
|
const concurrency = Number(process.env.EDS_GENERATE_CONCURRENCY ?? DEFAULT_CONCURRENCY);
|
|
29162
29179
|
const batchSize = resolveBatchSize();
|
|
29163
29180
|
const total = components.length;
|
|
@@ -29222,7 +29239,7 @@ async function selectAllComponents(agent, model, bedrock, components, verbose, s
|
|
|
29222
29239
|
while (nextBatch < batches.length) {
|
|
29223
29240
|
const b = nextBatch++;
|
|
29224
29241
|
const batch = batches[b];
|
|
29225
|
-
const batchResults = await selectBatch(agent, model,
|
|
29242
|
+
const batchResults = await selectBatch(agent, model, batch, total, verbose, skillPathOverride);
|
|
29226
29243
|
for (let k = 0; k < batch.length; k++) {
|
|
29227
29244
|
results[batch[k].index] = batchResults[k];
|
|
29228
29245
|
}
|
|
@@ -29286,12 +29303,6 @@ function registerAnalyzeSelectAgentCommand(program) {
|
|
|
29286
29303
|
return;
|
|
29287
29304
|
}
|
|
29288
29305
|
const agent = agentName;
|
|
29289
|
-
if (opts.bedrock && !agentSupportsBedrock(agent)) {
|
|
29290
|
-
process.stderr.write(`Error: --bedrock is not supported for --agent ${agent}
|
|
29291
|
-
`);
|
|
29292
|
-
await exitWithAnalytics(1);
|
|
29293
|
-
return;
|
|
29294
|
-
}
|
|
29295
29306
|
const selectPromptPath = opts.selectPromptPath ?? savedCreds.selectPromptPath;
|
|
29296
29307
|
if (selectPromptPath) {
|
|
29297
29308
|
const resolvedPath = resolve12(selectPromptPath);
|
|
@@ -29390,7 +29401,6 @@ function registerAnalyzeSelectAgentCommand(program) {
|
|
|
29390
29401
|
const selectResults = await selectAllComponents(
|
|
29391
29402
|
agent,
|
|
29392
29403
|
model,
|
|
29393
|
-
opts.bedrock,
|
|
29394
29404
|
selectionCandidates,
|
|
29395
29405
|
opts.verbose ?? false,
|
|
29396
29406
|
selectPromptPath ? resolve12(selectPromptPath) : void 0,
|
|
@@ -31150,7 +31160,7 @@ function printFallbackInstructions(options) {
|
|
|
31150
31160
|
lines.push(` Re-run the generate command with the agent available, or use --dry-run to inspect the prompt.`);
|
|
31151
31161
|
process.stderr.write(lines.join("\n") + "\n");
|
|
31152
31162
|
}
|
|
31153
|
-
async function runOneComponent(agent, model,
|
|
31163
|
+
async function runOneComponent(agent, model, db, sessionId2, component, tokensInline, tokenMapInline, index, total, verbose, noCache, skillPathOverride, promptHash) {
|
|
31154
31164
|
const pos = c.dim(`[${index + 1}/${total}]`);
|
|
31155
31165
|
if (!noCache) {
|
|
31156
31166
|
const inputHash = computeComponentInputHash(component);
|
|
@@ -31235,7 +31245,6 @@ async function runOneComponent(agent, model, bedrock, db, sessionId2, component,
|
|
|
31235
31245
|
const result = await invoker2.invoke({
|
|
31236
31246
|
agent,
|
|
31237
31247
|
model,
|
|
31238
|
-
bedrock,
|
|
31239
31248
|
prompt: prompt2,
|
|
31240
31249
|
timeoutMs: DEFAULT_TIMEOUT_MS3,
|
|
31241
31250
|
onOutput: (chunk) => formatter.push(chunk)
|
|
@@ -31291,7 +31300,7 @@ ${outputBuf}`);
|
|
|
31291
31300
|
renamedSlotsCount: renames.length
|
|
31292
31301
|
};
|
|
31293
31302
|
}
|
|
31294
|
-
async function runAllComponents(agent, model,
|
|
31303
|
+
async function runAllComponents(agent, model, db, sessionId2, components, tokensInline, tokenMapInline, verbose, noCache, skillPathOverride, promptHash) {
|
|
31295
31304
|
const concurrency = Number(process.env.EDS_GENERATE_CONCURRENCY ?? DEFAULT_COMPONENT_CONCURRENCY);
|
|
31296
31305
|
process.stderr.write(
|
|
31297
31306
|
`Categorizing ${c.bold(String(components.length))} component${components.length === 1 ? "" : "s"}` + c.dim(` (concurrency: ${concurrency})`) + "\n"
|
|
@@ -31305,7 +31314,6 @@ async function runAllComponents(agent, model, bedrock, db, sessionId2, component
|
|
|
31305
31314
|
results[i] = await runOneComponent(
|
|
31306
31315
|
agent,
|
|
31307
31316
|
model,
|
|
31308
|
-
bedrock,
|
|
31309
31317
|
db,
|
|
31310
31318
|
sessionId2,
|
|
31311
31319
|
components[i],
|
|
@@ -31373,9 +31381,6 @@ async function runGenerateSkill(skill, opts, verbose = false) {
|
|
|
31373
31381
|
);
|
|
31374
31382
|
}
|
|
31375
31383
|
const agent = agentName;
|
|
31376
|
-
if (opts.bedrock && !agentSupportsBedrock(agent)) {
|
|
31377
|
-
die2(`Error: --bedrock is not supported for --agent ${agent}`);
|
|
31378
|
-
}
|
|
31379
31384
|
const generatePromptPath = skill === "components" ? opts.generatePromptPath ?? savedCreds.generatePromptPath : void 0;
|
|
31380
31385
|
if (generatePromptPath) {
|
|
31381
31386
|
if (!await pathExists3(resolve17(generatePromptPath))) {
|
|
@@ -31485,7 +31490,6 @@ async function runGenerateSkill(skill, opts, verbose = false) {
|
|
|
31485
31490
|
componentResults = await runAllComponents(
|
|
31486
31491
|
agent,
|
|
31487
31492
|
model,
|
|
31488
|
-
opts.bedrock,
|
|
31489
31493
|
db,
|
|
31490
31494
|
sessionId2,
|
|
31491
31495
|
allComponents,
|
|
@@ -31598,7 +31602,6 @@ session=${sessionId2 ?? ""}
|
|
|
31598
31602
|
const result = await invoker2.invoke({
|
|
31599
31603
|
agent,
|
|
31600
31604
|
model,
|
|
31601
|
-
bedrock: opts.bedrock,
|
|
31602
31605
|
prompt: prompt2,
|
|
31603
31606
|
timeoutMs: DEFAULT_TIMEOUT_MS3 * 5
|
|
31604
31607
|
});
|
|
@@ -32622,7 +32625,6 @@ function registerPrintCommand(program) {
|
|
|
32622
32625
|
}
|
|
32623
32626
|
|
|
32624
32627
|
// packages/experience-design-system-cli/src/import/command.ts
|
|
32625
|
-
init_src();
|
|
32626
32628
|
init_path_utils();
|
|
32627
32629
|
import { resolve as resolve25, join as join25 } from "node:path";
|
|
32628
32630
|
|
|
@@ -32827,7 +32829,6 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
|
|
|
32827
32829
|
if (useAgentSelect) {
|
|
32828
32830
|
editArgs = ["analyze", "select-agent", "--session", extractSessionId, "--agent", opts.agent];
|
|
32829
32831
|
if (opts.model) editArgs.push("--model", opts.model);
|
|
32830
|
-
if (opts.bedrock) editArgs.push("--bedrock");
|
|
32831
32832
|
if (opts.excludeInvalid) editArgs.push("--exclude-invalid");
|
|
32832
32833
|
if (opts.noCache) editArgs.push("--no-cache");
|
|
32833
32834
|
if (opts.selectPromptPath) editArgs.push("--select-prompt-path", opts.selectPromptPath);
|
|
@@ -32889,7 +32890,6 @@ async function runPipeline(opts, progressWriter, cliPathOverride) {
|
|
|
32889
32890
|
const generateLabel = stepLabel("Categorizing component props");
|
|
32890
32891
|
const generateArgs = ["generate", "components", "--agent", opts.agent];
|
|
32891
32892
|
if (opts.model) generateArgs.push("--model", opts.model);
|
|
32892
|
-
if (opts.bedrock) generateArgs.push("--bedrock");
|
|
32893
32893
|
if (extractSessionId) generateArgs.push("--session", extractSessionId);
|
|
32894
32894
|
if (opts.dryRun) generateArgs.push("--dry-run");
|
|
32895
32895
|
if (opts.verbose) generateArgs.push("--verbose");
|
|
@@ -33833,11 +33833,6 @@ function registerImportCommand(program) {
|
|
|
33833
33833
|
const resolvedAgent = resolveAgent(opts.agent, creds.agent);
|
|
33834
33834
|
const resolvedModel = resolveModel(opts.model, creds.agentModel);
|
|
33835
33835
|
const resolvedCompositionMode = resolveCompositionMode(opts, creds.compositionMode);
|
|
33836
|
-
if (opts.bedrock && !(isAgentName(resolvedAgent) && agentSupportsBedrock(resolvedAgent))) {
|
|
33837
|
-
process.stderr.write(`Error: --bedrock is not supported for --agent ${resolvedAgent}
|
|
33838
|
-
`);
|
|
33839
|
-
process.exit(1);
|
|
33840
|
-
}
|
|
33841
33836
|
const pickerDecision = await shouldShowRunPicker({
|
|
33842
33837
|
flags: {
|
|
33843
33838
|
...opts.pushFromRun !== void 0 ? { pushFromRun: opts.pushFromRun } : {},
|
|
@@ -33866,7 +33861,6 @@ function registerImportCommand(program) {
|
|
|
33866
33861
|
initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
|
|
33867
33862
|
initialAgent: resolvedAgent,
|
|
33868
33863
|
...resolvedModel ? { initialModel: resolvedModel } : {},
|
|
33869
|
-
...opts.bedrock ? { bedrock: true } : {},
|
|
33870
33864
|
initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
|
|
33871
33865
|
host: opts.host,
|
|
33872
33866
|
autoAcceptScope,
|
|
@@ -33929,11 +33923,6 @@ function registerImportCommand(program) {
|
|
|
33929
33923
|
const headlessAgent = resolveAgent(opts.agent, headlessCreds.agent);
|
|
33930
33924
|
const headlessModel = resolveModel(opts.model, headlessCreds.agentModel);
|
|
33931
33925
|
const headlessCompositionMode = resolveCompositionMode(opts, headlessCreds.compositionMode);
|
|
33932
|
-
if (opts.bedrock && !(isAgentName(headlessAgent) && agentSupportsBedrock(headlessAgent))) {
|
|
33933
|
-
process.stderr.write(`Error: --bedrock is not supported for --agent ${headlessAgent}
|
|
33934
|
-
`);
|
|
33935
|
-
process.exit(1);
|
|
33936
|
-
}
|
|
33937
33926
|
const result = await runPipeline(
|
|
33938
33927
|
{
|
|
33939
33928
|
project: projectRoot,
|
|
@@ -33943,7 +33932,6 @@ function registerImportCommand(program) {
|
|
|
33943
33932
|
cmaToken,
|
|
33944
33933
|
agent: headlessAgent,
|
|
33945
33934
|
model: headlessModel,
|
|
33946
|
-
...opts.bedrock ? { bedrock: true } : {},
|
|
33947
33935
|
tokens: opts.tokens,
|
|
33948
33936
|
selectAll: opts.selectAll,
|
|
33949
33937
|
select: opts.select.length > 0 ? opts.select : void 0,
|
|
@@ -1,11 +1,13 @@
|
|
|
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;
|
|
5
4
|
export interface AgentModelOptionsConfig {
|
|
6
5
|
agentDescription?: string;
|
|
7
6
|
includeModel?: boolean;
|
|
8
7
|
modelDescription?: string;
|
|
9
8
|
}
|
|
10
|
-
/**
|
|
9
|
+
/**
|
|
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).
|
|
12
|
+
*/
|
|
11
13
|
export declare function addAgentModelOptions(cmd: Command, config?: AgentModelOptionsConfig): Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.27.1-dev-build-
|
|
3
|
+
"version": "2.27.1-dev-build-7cd07de.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.1-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-types": "2.27.1-dev-build-7cd07de.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.1-dev-build-
|
|
55
|
-
"@contentful/experience-design-system-
|
|
56
|
-
"@contentful/experience-design-system-
|
|
54
|
+
"@contentful/experience-design-system-client": "2.27.1-dev-build-7cd07de.0",
|
|
55
|
+
"@contentful/experience-design-system-generation": "2.27.1-dev-build-7cd07de.0",
|
|
56
|
+
"@contentful/experience-design-system-extraction": "2.27.1-dev-build-7cd07de.0"
|
|
57
57
|
},
|
|
58
58
|
"repository": {
|
|
59
59
|
"type": "git",
|