@contentful/experience-design-system-cli 2.37.1-dev-build-35e4cab1.0 → 2.37.1-dev-build-9afe163e.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/index.js CHANGED
@@ -1500,7 +1500,7 @@ async function runAgent(options) {
1500
1500
  promptLen: prompt.length,
1501
1501
  promptHead: prompt.slice(0, 500)
1502
1502
  });
1503
- return new Promise((resolve27) => {
1503
+ return new Promise((resolve28) => {
1504
1504
  const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
1505
1505
  const child = spawn(binary, args, {
1506
1506
  stdio: ["pipe", "pipe", "pipe"],
@@ -1549,7 +1549,7 @@ async function runAgent(options) {
1549
1549
  stderrLen: stderr.length,
1550
1550
  stderrTail: stderr.slice(-1e3)
1551
1551
  });
1552
- resolve27(result);
1552
+ resolve28(result);
1553
1553
  });
1554
1554
  });
1555
1555
  }
@@ -1571,7 +1571,7 @@ async function checkAgentAuth(agent) {
1571
1571
  return "not-found";
1572
1572
  if (agent !== "claude")
1573
1573
  return "ok";
1574
- return new Promise((resolve27) => {
1574
+ return new Promise((resolve28) => {
1575
1575
  const child = spawn2(binary, ["auth", "status", "--json"], { stdio: ["ignore", "pipe", "pipe"] });
1576
1576
  let stdout = "";
1577
1577
  let done = false;
@@ -1580,7 +1580,7 @@ async function checkAgentAuth(agent) {
1580
1580
  return;
1581
1581
  done = true;
1582
1582
  child.kill("SIGTERM");
1583
- resolve27("unauthenticated");
1583
+ resolve28("unauthenticated");
1584
1584
  }, 5e3);
1585
1585
  child.stdout?.on("data", (chunk) => {
1586
1586
  stdout += chunk.toString();
@@ -1591,14 +1591,14 @@ async function checkAgentAuth(agent) {
1591
1591
  done = true;
1592
1592
  clearTimeout(timer);
1593
1593
  if (code !== 0) {
1594
- resolve27("unauthenticated");
1594
+ resolve28("unauthenticated");
1595
1595
  return;
1596
1596
  }
1597
1597
  try {
1598
1598
  const status = JSON.parse(stdout);
1599
- resolve27(status.loggedIn ? "ok" : "unauthenticated");
1599
+ resolve28(status.loggedIn ? "ok" : "unauthenticated");
1600
1600
  } catch {
1601
- resolve27("unauthenticated");
1601
+ resolve28("unauthenticated");
1602
1602
  }
1603
1603
  });
1604
1604
  });
@@ -1608,9 +1608,9 @@ async function binaryIsOnPath(binary) {
1608
1608
  const fs = await import("node:fs/promises");
1609
1609
  return fs.access(binary).then(() => true, () => false);
1610
1610
  }
1611
- return new Promise((resolve27) => {
1611
+ return new Promise((resolve28) => {
1612
1612
  const child = spawn2(process.platform === "win32" ? "where" : "which", [binary], { stdio: "ignore" });
1613
- child.on("close", (code) => resolve27(code === 0));
1613
+ child.on("close", (code) => resolve28(code === 0));
1614
1614
  });
1615
1615
  }
1616
1616
  var init_check_agent_auth = __esm({
@@ -7916,10 +7916,10 @@ function extractVueSlotsFromSetup(options) {
7916
7916
  if (!body)
7917
7917
  return [];
7918
7918
  const slotsByName = /* @__PURE__ */ new Map();
7919
- for (const access6 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
7920
- if (access6.getExpression().getText() !== slotsName)
7919
+ for (const access7 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
7920
+ if (access7.getExpression().getText() !== slotsName)
7921
7921
  continue;
7922
- const slotName = access6.getName();
7922
+ const slotName = access7.getName();
7923
7923
  if (!slotsByName.has(slotName)) {
7924
7924
  slotsByName.set(slotName, {
7925
7925
  name: slotName,
@@ -14333,7 +14333,7 @@ function errorMessage(error) {
14333
14333
  return error instanceof Error && error.message ? error.message : String(error);
14334
14334
  }
14335
14335
  function defaultSleep(delayMs) {
14336
- return new Promise((resolve27) => setTimeout(resolve27, delayMs));
14336
+ return new Promise((resolve28) => setTimeout(resolve28, delayMs));
14337
14337
  }
14338
14338
  var MAX_RETRY_AFTER_MS;
14339
14339
  var init_http_utils = __esm({
@@ -14609,7 +14609,7 @@ var init_api_client = __esm({
14609
14609
  const progress = maxAttempts > 1 ? attempt / (maxAttempts - 1) : 0;
14610
14610
  const baseDelay = intervalMs + (maxIntervalMs - intervalMs) * progress;
14611
14611
  const jitter = Math.random() * baseDelay * 0.15;
14612
- await new Promise((resolve27) => setTimeout(resolve27, baseDelay + jitter));
14612
+ await new Promise((resolve28) => setTimeout(resolve28, baseDelay + jitter));
14613
14613
  }
14614
14614
  }
14615
14615
  throw new Error(`Operation ${operationId} timed out after ${maxAttempts} attempts`);
@@ -18527,7 +18527,7 @@ async function retryDatabaseWrite(operation, attempts = 8) {
18527
18527
  const message = error instanceof Error ? error.message : String(error);
18528
18528
  if (!/database is locked|database is busy/i.test(message) || attempt >= attempts)
18529
18529
  throw error;
18530
- await new Promise((resolve27) => setTimeout(resolve27, Math.min(250 * attempt, 2e3)));
18530
+ await new Promise((resolve28) => setTimeout(resolve28, Math.min(250 * attempt, 2e3)));
18531
18531
  }
18532
18532
  }
18533
18533
  }
@@ -19446,6 +19446,7 @@ var init_src4 = __esm({
19446
19446
  init_agents();
19447
19447
  init_agent_name();
19448
19448
  init_models();
19449
+ init_binaries();
19449
19450
  init_is_agent_name();
19450
19451
  init_agent_supports_bedrock();
19451
19452
  init_check_agent_auth();
@@ -19565,6 +19566,97 @@ var init_v1_store = __esm({
19565
19566
  }
19566
19567
  });
19567
19568
 
19569
+ // packages/experience-design-system-cli/src/tui/settings/agents/agent-store.ts
19570
+ function emptyAgents() {
19571
+ return Object.fromEntries(AGENT_NAMES.map((name) => [name, { model: "", binary: "" }]));
19572
+ }
19573
+ async function readAgentConfig() {
19574
+ const store = await readV1Store();
19575
+ const stored = asString(store["agent"]);
19576
+ const defaultAgent = isAgentName(stored) ? stored : DEFAULT_AGENT3;
19577
+ const agents = emptyAgents();
19578
+ const saved = store["agents"];
19579
+ if (saved && typeof saved === "object") {
19580
+ for (const name of AGENT_NAMES) {
19581
+ const entry = saved[name];
19582
+ if (entry && typeof entry === "object") {
19583
+ const fields = entry;
19584
+ agents[name] = { model: asString(fields["model"]), binary: asString(fields["binary"]) };
19585
+ }
19586
+ }
19587
+ }
19588
+ const legacyModel = asString(store["agentModel"]);
19589
+ if (legacyModel && !agents[defaultAgent].model)
19590
+ agents[defaultAgent] = { ...agents[defaultAgent], model: legacyModel };
19591
+ return { defaultAgent, agents };
19592
+ }
19593
+ async function writeAgentConfig(config) {
19594
+ const existing = await readV1Store();
19595
+ const merged = { ...existing };
19596
+ const agents = {};
19597
+ for (const name of AGENT_NAMES) {
19598
+ const model = config.agents[name].model.trim();
19599
+ const binary = config.agents[name].binary.trim();
19600
+ if (model || binary) agents[name] = { ...model ? { model } : {}, ...binary ? { binary } : {} };
19601
+ }
19602
+ merged["agent"] = config.defaultAgent;
19603
+ const defaultModel = agents[config.defaultAgent]?.model;
19604
+ if (defaultModel) merged["agentModel"] = defaultModel;
19605
+ else delete merged["agentModel"];
19606
+ if (Object.keys(agents).length > 0) merged["agents"] = agents;
19607
+ else delete merged["agents"];
19608
+ await writeV1Store(merged);
19609
+ }
19610
+ var DEFAULT_AGENT3, AGENT_LABELS, AGENT_HINTS, asString;
19611
+ var init_agent_store = __esm({
19612
+ "packages/experience-design-system-cli/src/tui/settings/agents/agent-store.ts"() {
19613
+ "use strict";
19614
+ init_src4();
19615
+ init_v1_store();
19616
+ DEFAULT_AGENT3 = "claude";
19617
+ AGENT_LABELS = {
19618
+ claude: "Claude Code",
19619
+ codex: "OpenAI Codex",
19620
+ opencode: "OpenCode",
19621
+ cursor: "Cursor",
19622
+ copilot: "GitHub Copilot"
19623
+ };
19624
+ AGENT_HINTS = {
19625
+ claude: "claude",
19626
+ codex: "codex",
19627
+ opencode: "opencode",
19628
+ cursor: "cursor-agent",
19629
+ copilot: "copilot"
19630
+ };
19631
+ asString = (value) => typeof value === "string" ? value : "";
19632
+ }
19633
+ });
19634
+
19635
+ // packages/experience-design-system-cli/src/tui/settings/agents/apply-binary-overrides.ts
19636
+ function applyBinaryOverrides(config) {
19637
+ for (const name of AGENT_NAMES) {
19638
+ const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
19639
+ const binary = config.agents[name].binary.trim();
19640
+ if (binary) {
19641
+ if (!shellValues.has(key)) shellValues.set(key, process.env[key]);
19642
+ process.env[key] = binary;
19643
+ } else if (shellValues.has(key)) {
19644
+ const shellValue = shellValues.get(key);
19645
+ if (shellValue === void 0) delete process.env[key];
19646
+ else process.env[key] = shellValue;
19647
+ shellValues.delete(key);
19648
+ }
19649
+ }
19650
+ }
19651
+ var shellValues;
19652
+ var init_apply_binary_overrides = __esm({
19653
+ "packages/experience-design-system-cli/src/tui/settings/agents/apply-binary-overrides.ts"() {
19654
+ "use strict";
19655
+ init_src4();
19656
+ shellValues = /* @__PURE__ */ new Map();
19657
+ }
19658
+ });
19659
+
19568
19660
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
19569
19661
  async function readAnalyticsSetting() {
19570
19662
  const store = await readV1Store();
@@ -19586,52 +19678,6 @@ var init_analytics_store = __esm({
19586
19678
  }
19587
19679
  });
19588
19680
 
19589
- // packages/experience-design-system-cli/src/tui/theme.ts
19590
- function detectColorMode(env = process.env) {
19591
- const bg = env.COLORFGBG?.split(";").pop();
19592
- if (bg === "7" || bg === "15") return "light";
19593
- return "dark";
19594
- }
19595
- var DARK, LIGHT, PALETTE;
19596
- var init_theme = __esm({
19597
- "packages/experience-design-system-cli/src/tui/theme.ts"() {
19598
- "use strict";
19599
- DARK = {
19600
- text: "#f7f9fa",
19601
- // gray100
19602
- muted: "#aec1cc",
19603
- // gray400
19604
- border: "#aec1cc",
19605
- // gray400
19606
- accent: "#40a0ff",
19607
- // blue400
19608
- error: "#ff707d",
19609
- // red400
19610
- success: "#5DB057",
19611
- // green400
19612
- warning: "#FFC835"
19613
- // yellow500
19614
- };
19615
- LIGHT = {
19616
- text: "#111b2b",
19617
- // gray900
19618
- muted: "#5a657c",
19619
- // gray600
19620
- border: "#5a657c",
19621
- // gray600
19622
- accent: "#0059c8",
19623
- // semantic primary
19624
- error: "#bd002a",
19625
- // semantic negative
19626
- success: "#006D23",
19627
- // semantic positive
19628
- warning: "#CC4500"
19629
- // semantic warning
19630
- };
19631
- PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
19632
- }
19633
- });
19634
-
19635
19681
  // packages/experience-design-system-cli/src/tui/home/home.theme.ts
19636
19682
  function brandBar(width, ramp = BRAND_RAMP) {
19637
19683
  if (width <= 0 || ramp.length === 0) return [];
@@ -19642,12 +19688,28 @@ function brandBar(width, ramp = BRAND_RAMP) {
19642
19688
  color
19643
19689
  })).filter((segment) => segment.text.length > 0);
19644
19690
  }
19645
- var BRAND_RAMP, BAR_CELL, FOCUS_MARKER;
19691
+ var BRAND, PALETTE, BRAND_RAMP, BAR_CELL, FOCUS_MARKER;
19646
19692
  var init_home_theme = __esm({
19647
19693
  "packages/experience-design-system-cli/src/tui/home/home.theme.ts"() {
19648
19694
  "use strict";
19649
- init_theme();
19650
- BRAND_RAMP = [PALETTE.accent, PALETTE.error, PALETTE.warning];
19695
+ BRAND = {
19696
+ blue: "#1773EB",
19697
+ green: "#00C459",
19698
+ orange: "#E44F20",
19699
+ yellow: "#FFDA00",
19700
+ white: "#FFFFFF",
19701
+ slate: "#8B8D91",
19702
+ steel: "#C4D1DE"
19703
+ };
19704
+ PALETTE = {
19705
+ accent: BRAND.blue,
19706
+ success: BRAND.green,
19707
+ error: BRAND.orange,
19708
+ warning: BRAND.yellow,
19709
+ muted: BRAND.slate,
19710
+ border: BRAND.steel
19711
+ };
19712
+ BRAND_RAMP = [BRAND.blue, BRAND.orange, BRAND.yellow];
19651
19713
  BAR_CELL = "\u2501";
19652
19714
  FOCUS_MARKER = "\u276F";
19653
19715
  }
@@ -19829,7 +19891,6 @@ var VERSION, HEADING, SUBTITLE, MIN_TERMINAL_WIDTH, START_ITEMS;
19829
19891
  var init_home = __esm({
19830
19892
  "packages/experience-design-system-cli/src/tui/home/home.tsx"() {
19831
19893
  "use strict";
19832
- init_theme();
19833
19894
  init_home_theme();
19834
19895
  init_version();
19835
19896
  init_use_terminal_width();
@@ -19870,7 +19931,7 @@ function ImportScreen({ exitCode, onDone }) {
19870
19931
  var init_PageContainer = __esm({
19871
19932
  "packages/experience-design-system-cli/src/tui/import/PageContainer.tsx"() {
19872
19933
  "use strict";
19873
- init_theme();
19934
+ init_home_theme();
19874
19935
  }
19875
19936
  });
19876
19937
 
@@ -19950,7 +20011,7 @@ var RULE, OVERVIEW;
19950
20011
  var init_screen = __esm({
19951
20012
  "packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
19952
20013
  "use strict";
19953
- init_theme();
20014
+ init_home_theme();
19954
20015
  init_controls();
19955
20016
  init_logic();
19956
20017
  RULE = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
@@ -20099,7 +20160,7 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
20099
20160
  var init_screen2 = __esm({
20100
20161
  "packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
20101
20162
  "use strict";
20102
- init_theme();
20163
+ init_home_theme();
20103
20164
  init_controls2();
20104
20165
  init_logic2();
20105
20166
  init_validate_path();
@@ -20320,7 +20381,7 @@ function PathValidationScreen({
20320
20381
  var init_screen3 = __esm({
20321
20382
  "packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx"() {
20322
20383
  "use strict";
20323
- init_theme();
20384
+ init_home_theme();
20324
20385
  init_resolve_user_path();
20325
20386
  init_controls3();
20326
20387
  init_scan_files();
@@ -20529,7 +20590,7 @@ var LABELS;
20529
20590
  var init_screen4 = __esm({
20530
20591
  "packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
20531
20592
  "use strict";
20532
- init_theme();
20593
+ init_home_theme();
20533
20594
  init_controls4();
20534
20595
  init_src4();
20535
20596
  init_logic4();
@@ -20616,7 +20677,7 @@ function ErrorStep({
20616
20677
  var init_error_step = __esm({
20617
20678
  "packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx"() {
20618
20679
  "use strict";
20619
- init_theme();
20680
+ init_home_theme();
20620
20681
  init_controls5();
20621
20682
  init_logic5();
20622
20683
  }
@@ -20696,7 +20757,7 @@ function GateStep({
20696
20757
  var init_gate_step = __esm({
20697
20758
  "packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx"() {
20698
20759
  "use strict";
20699
- init_theme();
20760
+ init_home_theme();
20700
20761
  init_controls6();
20701
20762
  init_logic6();
20702
20763
  }
@@ -20724,15 +20785,14 @@ var init_logic7 = __esm({
20724
20785
  // packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts
20725
20786
  import { defaultTheme, extendTheme } from "@inkjs/ui";
20726
20787
  var PROGRESS_THEME;
20727
- var init_theme2 = __esm({
20788
+ var init_theme = __esm({
20728
20789
  "packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts"() {
20729
20790
  "use strict";
20730
- init_theme();
20731
20791
  PROGRESS_THEME = extendTheme(defaultTheme, {
20732
20792
  components: {
20733
20793
  ProgressBar: {
20734
20794
  styles: {
20735
- completed: () => ({ color: PALETTE.accent })
20795
+ completed: () => ({ color: "blue" })
20736
20796
  }
20737
20797
  }
20738
20798
  }
@@ -20806,9 +20866,9 @@ var RULE2;
20806
20866
  var init_running_step = __esm({
20807
20867
  "packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx"() {
20808
20868
  "use strict";
20809
- init_theme();
20869
+ init_home_theme();
20810
20870
  init_logic7();
20811
- init_theme2();
20871
+ init_theme();
20812
20872
  init_use_elapsed();
20813
20873
  RULE2 = "\u2500".repeat(40);
20814
20874
  }
@@ -21355,10 +21415,10 @@ var init_use_extraction = __esm({
21355
21415
 
21356
21416
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts
21357
21417
  var PALETTE2;
21358
- var init_theme3 = __esm({
21418
+ var init_theme2 = __esm({
21359
21419
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts"() {
21360
21420
  "use strict";
21361
- init_theme();
21421
+ init_home_theme();
21362
21422
  PALETTE2 = {
21363
21423
  info: PALETTE.accent,
21364
21424
  success: PALETTE.success,
@@ -21470,7 +21530,7 @@ var TWO_COLUMN_MIN_WIDTH, SCOPE_GATE_MAIN_COLUMN_WIDTH, ACCEPTED_COMPONENTS_COLU
21470
21530
  var init_columns = __esm({
21471
21531
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/columns.ts"() {
21472
21532
  "use strict";
21473
- init_theme3();
21533
+ init_theme2();
21474
21534
  TWO_COLUMN_MIN_WIDTH = 100;
21475
21535
  SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
21476
21536
  ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
@@ -21550,7 +21610,7 @@ var MIN_TERMINAL_PANEL_HEIGHT;
21550
21610
  var init_windowed_panel = __esm({
21551
21611
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx"() {
21552
21612
  "use strict";
21553
- init_theme3();
21613
+ init_theme2();
21554
21614
  MIN_TERMINAL_PANEL_HEIGHT = 5;
21555
21615
  }
21556
21616
  });
@@ -21601,7 +21661,7 @@ var init_added_column = __esm({
21601
21661
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx"() {
21602
21662
  "use strict";
21603
21663
  init_columns();
21604
- init_theme3();
21664
+ init_theme2();
21605
21665
  init_windowed_panel();
21606
21666
  }
21607
21667
  });
@@ -21636,7 +21696,7 @@ function CyclesPanel({ cycles, cursor }) {
21636
21696
  var init_cycles_panel = __esm({
21637
21697
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx"() {
21638
21698
  "use strict";
21639
- init_theme3();
21699
+ init_theme2();
21640
21700
  }
21641
21701
  });
21642
21702
 
@@ -21654,7 +21714,7 @@ function RejectPrompt({ pending }) {
21654
21714
  var init_reject_prompt = __esm({
21655
21715
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx"() {
21656
21716
  "use strict";
21657
- init_theme3();
21717
+ init_theme2();
21658
21718
  }
21659
21719
  });
21660
21720
 
@@ -21670,7 +21730,7 @@ function legendEntry(keyBracket, label, active = false) {
21670
21730
  var init_LegendEntry = __esm({
21671
21731
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.tsx"() {
21672
21732
  "use strict";
21673
- init_theme3();
21733
+ init_theme2();
21674
21734
  }
21675
21735
  });
21676
21736
 
@@ -21691,7 +21751,7 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
21691
21751
  var init_CompactControlBar = __esm({
21692
21752
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx"() {
21693
21753
  "use strict";
21694
- init_theme3();
21754
+ init_theme2();
21695
21755
  init_LegendEntry();
21696
21756
  }
21697
21757
  });
@@ -21730,7 +21790,7 @@ function CounterStrip(props) {
21730
21790
  var init_CounterStrip = __esm({
21731
21791
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx"() {
21732
21792
  "use strict";
21733
- init_theme3();
21793
+ init_theme2();
21734
21794
  }
21735
21795
  });
21736
21796
 
@@ -21795,7 +21855,7 @@ var DEFAULT_MAX_ROWS;
21795
21855
  var init_GotoBanner = __esm({
21796
21856
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx"() {
21797
21857
  "use strict";
21798
- init_theme3();
21858
+ init_theme2();
21799
21859
  DEFAULT_MAX_ROWS = 15;
21800
21860
  }
21801
21861
  });
@@ -22174,7 +22234,7 @@ function PreviewBadge({
22174
22234
  var init_badge = __esm({
22175
22235
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
22176
22236
  "use strict";
22177
- init_theme3();
22237
+ init_theme2();
22178
22238
  }
22179
22239
  });
22180
22240
 
@@ -22669,7 +22729,7 @@ var init_GroupedSidebar = __esm({
22669
22729
  "use strict";
22670
22730
  init_composite_closure();
22671
22731
  init_badge();
22672
- init_theme3();
22732
+ init_theme2();
22673
22733
  init_windowed_panel();
22674
22734
  GLYPH_EXPAND_COLLAPSED = "\u25B8";
22675
22735
  GLYPH_EXPAND_EXPANDED = "\u25BE";
@@ -22964,7 +23024,7 @@ function SearchMatchSummary({
22964
23024
  var init_SearchMatchSummary = __esm({
22965
23025
  "packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx"() {
22966
23026
  "use strict";
22967
- init_theme3();
23027
+ init_theme2();
22968
23028
  init_sidebar_input();
22969
23029
  }
22970
23030
  });
@@ -24332,7 +24392,7 @@ var init_screen7 = __esm({
24332
24392
  init_HelpOverlay();
24333
24393
  init_SearchMatchSummary();
24334
24394
  init_sidebar_help();
24335
- init_theme3();
24395
+ init_theme2();
24336
24396
  init_use_scope_gate();
24337
24397
  HELP_SECTIONS = [
24338
24398
  {
@@ -25220,6 +25280,24 @@ var init_screen9 = __esm({
25220
25280
  }
25221
25281
  });
25222
25282
 
25283
+ // packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
25284
+ var PALETTE3;
25285
+ var init_theme3 = __esm({
25286
+ "packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts"() {
25287
+ "use strict";
25288
+ init_home_theme();
25289
+ PALETTE3 = {
25290
+ info: PALETTE.accent,
25291
+ success: PALETTE.success,
25292
+ error: PALETTE.error,
25293
+ warning: PALETTE.warning,
25294
+ muted: PALETTE.muted,
25295
+ border: PALETTE.border,
25296
+ inverse: "#FFFFFF"
25297
+ };
25298
+ }
25299
+ });
25300
+
25223
25301
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
25224
25302
  function getReviewJsonPanelValue(selected, showHiddenProps) {
25225
25303
  if (!selected) return "";
@@ -25711,13 +25789,13 @@ function serializeState(state2, originalJson) {
25711
25789
  }
25712
25790
  function Picker({ value, active }) {
25713
25791
  return /* @__PURE__ */ jsxs22(Box21, { children: [
25714
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
25715
- /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
25716
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
25792
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u2039" }),
25793
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : void 0, bold: active, children: value }),
25794
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u203A" })
25717
25795
  ] });
25718
25796
  }
25719
25797
  function Toggle({ value, active }) {
25720
- return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
25798
+ return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : value ? PALETTE3.success : PALETTE3.border, children: value ? "[\u2713]" : "[ ]" }) });
25721
25799
  }
25722
25800
  function InlinePropField({
25723
25801
  label,
@@ -25727,7 +25805,7 @@ function InlinePropField({
25727
25805
  width
25728
25806
  }) {
25729
25807
  return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
25730
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
25808
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, wrap: "truncate-end", children: [
25731
25809
  focused ? "\u203A " : " ",
25732
25810
  label
25733
25811
  ] }),
@@ -25748,7 +25826,7 @@ function DefaultValueRow({
25748
25826
  focused
25749
25827
  }) {
25750
25828
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
25751
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25829
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25752
25830
  focused ? "\u203A " : " ",
25753
25831
  "default:"
25754
25832
  ] }),
@@ -25763,7 +25841,7 @@ function RowLabel({
25763
25841
  return /* @__PURE__ */ jsxs22(
25764
25842
  Text23,
25765
25843
  {
25766
- color: selected ? PALETTE.text : PALETTE.accent,
25844
+ color: selected ? PALETTE3.inverse : PALETTE3.info,
25767
25845
  bold: selected,
25768
25846
  backgroundColor: selected ? "blue" : void 0,
25769
25847
  wrap: "truncate-end",
@@ -25781,7 +25859,7 @@ function ValueInputRow({
25781
25859
  cursorVisible
25782
25860
  }) {
25783
25861
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
25784
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
25862
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
25785
25863
  /* @__PURE__ */ jsx27(Text23, { children: valueText }),
25786
25864
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
25787
25865
  ] });
@@ -25798,7 +25876,7 @@ function EditableListItem({
25798
25876
  if (isBeingEdited) {
25799
25877
  return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
25800
25878
  }
25801
- return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
25879
+ return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.info : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
25802
25880
  }
25803
25881
  function EditableValueList({
25804
25882
  values,
@@ -25812,7 +25890,7 @@ function EditableValueList({
25812
25890
  showAddInput
25813
25891
  }) {
25814
25892
  return /* @__PURE__ */ jsxs22(Fragment5, { children: [
25815
- values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) })),
25893
+ values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: emptyMessage }) })),
25816
25894
  values.map((value, index) => /* @__PURE__ */ jsx27(
25817
25895
  EditableListItem,
25818
25896
  {
@@ -25838,11 +25916,11 @@ function DefaultSubRow({
25838
25916
  const cursor = cursorVisible ? "\u2588" : " ";
25839
25917
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
25840
25918
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25841
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25919
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25842
25920
  focused ? "\u203A " : " ",
25843
25921
  "default:"
25844
25922
  ] }),
25845
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
25923
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
25846
25924
  ] });
25847
25925
  }
25848
25926
  if (prop.type === "boolean") {
@@ -25852,11 +25930,11 @@ function DefaultSubRow({
25852
25930
  if (prop.type === "enum") {
25853
25931
  if (prop.values.length === 0) {
25854
25932
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25855
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25933
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25856
25934
  focused ? "\u203A " : " ",
25857
25935
  "default:"
25858
25936
  ] }),
25859
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
25937
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
25860
25938
  ] });
25861
25939
  }
25862
25940
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
@@ -25865,11 +25943,11 @@ function DefaultSubRow({
25865
25943
  const value = typeof prop.default === "string" ? prop.default : "";
25866
25944
  if (active) {
25867
25945
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
25868
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25946
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25869
25947
  focused ? "\u203A " : " ",
25870
25948
  "default:"
25871
25949
  ] }),
25872
- /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
25950
+ /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
25873
25951
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
25874
25952
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
25875
25953
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
@@ -25877,11 +25955,11 @@ function DefaultSubRow({
25877
25955
  ] });
25878
25956
  }
25879
25957
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
25880
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25958
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25881
25959
  focused ? "\u203A " : " ",
25882
25960
  "default:"
25883
25961
  ] }),
25884
- /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
25962
+ /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
25885
25963
  ] });
25886
25964
  }
25887
25965
  function DescriptionField({
@@ -25897,15 +25975,15 @@ function DescriptionField({
25897
25975
  }) {
25898
25976
  if (compact) {
25899
25977
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25900
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25978
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25901
25979
  focused ? "\u203A " : " ",
25902
25980
  label
25903
25981
  ] }),
25904
- /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
25982
+ /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
25905
25983
  ] });
25906
25984
  }
25907
25985
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
25908
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
25986
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
25909
25987
  focused ? "\u203A " : " ",
25910
25988
  label
25911
25989
  ] }),
@@ -25969,7 +26047,7 @@ function PropRow({
25969
26047
  ] }),
25970
26048
  prop.type === "token" && /* @__PURE__ */ jsx27(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx27(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
25971
26049
  prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25972
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
26050
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "values", children: [
25973
26051
  activeField === "values" ? "\u203A " : " ",
25974
26052
  "values:"
25975
26053
  ] }),
@@ -25990,27 +26068,27 @@ function PropRow({
25990
26068
  }
25991
26069
  ),
25992
26070
  prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
25993
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
26071
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "allowed", children: [
25994
26072
  activeField === "allowed" ? "\u203A " : " ",
25995
26073
  "allowed:"
25996
26074
  ] }),
25997
- editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
26075
+ editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
25998
26076
  Text23,
25999
26077
  {
26000
- color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
26078
+ color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
26001
26079
  wrap: "wrap",
26002
26080
  children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
26003
26081
  }
26004
26082
  )
26005
26083
  ] }),
26006
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
26084
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
26007
26085
  const max = Math.max(8, width - 8);
26008
26086
  const text = `~ ${rationale}`;
26009
26087
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
26010
26088
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
26011
26089
  selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
26012
26090
  /* @__PURE__ */ jsxs22(Box21, { children: [
26013
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
26091
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
26014
26092
  activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26015
26093
  ] }),
26016
26094
  /* @__PURE__ */ jsx27(
@@ -26071,7 +26149,7 @@ function SlotRow({
26071
26149
  /* @__PURE__ */ jsxs22(
26072
26150
  Text23,
26073
26151
  {
26074
- color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
26152
+ color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
26075
26153
  bold: activeField === "allowedComponents",
26076
26154
  children: [
26077
26155
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -26079,14 +26157,14 @@ function SlotRow({
26079
26157
  ]
26080
26158
  }
26081
26159
  ),
26082
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26160
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
26083
26161
  ] }),
26084
26162
  selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
26085
26163
  /* @__PURE__ */ jsxs22(Box21, { children: [
26086
26164
  /* @__PURE__ */ jsxs22(
26087
26165
  Text23,
26088
26166
  {
26089
- color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
26167
+ color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
26090
26168
  bold: activeField === "allowedComponents",
26091
26169
  children: [
26092
26170
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -26094,7 +26172,7 @@ function SlotRow({
26094
26172
  ]
26095
26173
  }
26096
26174
  ),
26097
- editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26175
+ editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
26098
26176
  ] }),
26099
26177
  /* @__PURE__ */ jsx27(
26100
26178
  EditableValueList,
@@ -26110,21 +26188,21 @@ function SlotRow({
26110
26188
  showAddInput: editingField && activeField === "allowedComponents"
26111
26189
  }
26112
26190
  ),
26113
- editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
26191
+ editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
26114
26192
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
26115
26193
  if (filtered.length === 0) {
26116
- return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26194
+ return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
26117
26195
  }
26118
26196
  const cursor = pickerCursor % filtered.length;
26119
26197
  const MAX_VISIBLE = 5;
26120
26198
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
26121
26199
  const slice = filtered.slice(start, start + MAX_VISIBLE);
26122
26200
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
26123
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26201
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26124
26202
  slice.map((name, i) => {
26125
26203
  const absIdx = start + i;
26126
26204
  const isCursor = absIdx === cursor;
26127
- return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
26205
+ return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
26128
26206
  })
26129
26207
  ] });
26130
26208
  })() })
@@ -26952,18 +27030,18 @@ function FieldEditor({
26952
27030
  });
26953
27031
  const innerWidth = Math.max(1, width - 2);
26954
27032
  if (parseErr) {
26955
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
26956
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
26957
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
26958
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
27033
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.error, children: [
27034
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.error, children: "FIELD EDITOR \u2014 parse error" }),
27035
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: parseErr }),
27036
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Cannot display structured editor. Fix the JSON first." })
26959
27037
  ] });
26960
27038
  }
26961
27039
  if (props.length === 0 && slots.length === 0) {
26962
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
26963
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
26964
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
26965
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
26966
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
27040
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.warning, children: [
27041
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.warning, children: "FIELD EDITOR \u2014 no fields" }),
27042
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
27043
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "You can add fields manually below or reject this component." }),
27044
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Enter to save \xB7 Esc to discard" })
26967
27045
  ] });
26968
27046
  }
26969
27047
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -27092,7 +27170,7 @@ function FieldEditor({
27092
27170
  const renderRow = (row, index) => {
27093
27171
  const key = rowKey(row, index);
27094
27172
  if (row.kind === "header") {
27095
- return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
27173
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.success, children: row.label }) }, key);
27096
27174
  }
27097
27175
  if (row.kind === "component-description") {
27098
27176
  const isSelected2 = inComponentDesc && active;
@@ -27174,9 +27252,9 @@ function FieldEditor({
27174
27252
  ...fixedHeight ? { height } : { minHeight: height },
27175
27253
  clipOverflow: fixedHeight,
27176
27254
  borderStyle: "single",
27177
- borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
27255
+ borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
27178
27256
  children: [
27179
- hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { 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." }),
27257
+ hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
27180
27258
  header,
27181
27259
  /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
27182
27260
  PropRow,
@@ -27227,7 +27305,7 @@ function FieldEditor({
27227
27305
  `visible-${key}`
27228
27306
  );
27229
27307
  }) }),
27230
- categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
27308
+ categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
27231
27309
  sourceOpen && !onToggleSourceExternal && (() => {
27232
27310
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
27233
27311
  const start = propMeta?.sourceStartLine ?? null;
@@ -27237,20 +27315,20 @@ function FieldEditor({
27237
27315
  const headerPath = path5 ?? "<unknown source path>";
27238
27316
  if (!start || !end2 || !src) {
27239
27317
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27240
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
27241
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
27318
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `source: ${headerPath}` }),
27319
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no source location captured for this prop)" }),
27242
27320
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
27243
27321
  ] });
27244
27322
  }
27245
27323
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
27246
27324
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
27247
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27248
- lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
27325
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
27326
+ lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: ln }, `source-line-${i}`)),
27249
27327
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
27250
27328
  ] });
27251
27329
  })(),
27252
- showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
27253
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
27330
+ showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.info, paddingX: 1, children: [
27331
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.info, children: "Keybindings" }),
27254
27332
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
27255
27333
  /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
27256
27334
  /* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
@@ -27275,10 +27353,10 @@ function FieldEditor({
27275
27353
  /* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
27276
27354
  /* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
27277
27355
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
27278
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
27356
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
27279
27357
  ] }),
27280
- validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
27281
- /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
27358
+ validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: "\u2717 " + validationError }),
27359
+ /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: modeLabel }) })
27282
27360
  ]
27283
27361
  }
27284
27362
  );
@@ -27287,7 +27365,7 @@ var SLOT_FIELDS;
27287
27365
  var init_FieldEditor = __esm({
27288
27366
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx"() {
27289
27367
  "use strict";
27290
- init_theme();
27368
+ init_theme3();
27291
27369
  init_src5();
27292
27370
  init_useImmediateInput();
27293
27371
  init_scroll_offset();
@@ -27342,21 +27420,21 @@ function RationaleLine({ line, active }) {
27342
27420
  return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
27343
27421
  }
27344
27422
  if (line.kind === "heading") {
27345
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
27423
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
27346
27424
  }
27347
27425
  if (line.kind === "label") {
27348
27426
  return /* @__PURE__ */ jsxs23(Box22, { children: [
27349
27427
  line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
27350
- /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
27351
- line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
27428
+ /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE3.muted, children: line.text }),
27429
+ line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE3.muted, children: line.suffix })
27352
27430
  ] });
27353
27431
  }
27354
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
27432
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
27355
27433
  }
27356
27434
  var init_RationaleLine = __esm({
27357
27435
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
27358
27436
  "use strict";
27359
- init_theme();
27437
+ init_theme3();
27360
27438
  }
27361
27439
  });
27362
27440
 
@@ -27436,9 +27514,9 @@ function ComponentRationalePanel({
27436
27514
  width,
27437
27515
  height: height + 2,
27438
27516
  borderStyle: "single",
27439
- borderColor: active ? PALETTE.text : void 0,
27517
+ borderColor: active ? PALETTE3.inverse : void 0,
27440
27518
  children: [
27441
- /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
27519
+ /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
27442
27520
  visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
27443
27521
  /* @__PURE__ */ jsx29(Box23, { children: overflowed ? /* @__PURE__ */ jsx29(Text25, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx29(Text25, { children: "[I/Esc] close" }) })
27444
27522
  ]
@@ -27449,7 +27527,7 @@ var PLACEHOLDER;
27449
27527
  var init_ComponentRationalePanel = __esm({
27450
27528
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx"() {
27451
27529
  "use strict";
27452
- init_theme();
27530
+ init_theme3();
27453
27531
  init_wrap_text();
27454
27532
  init_RationaleLine();
27455
27533
  PLACEHOLDER = "(no rationale captured)";
@@ -27460,12 +27538,12 @@ var init_ComponentRationalePanel = __esm({
27460
27538
  import { Text as Text26 } from "ink";
27461
27539
  import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
27462
27540
  function HighlightedLine({ parts }) {
27463
- return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
27541
+ return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE3.muted : part.color, children: part.text }, i)) });
27464
27542
  }
27465
27543
  var init_HighlightedLine = __esm({
27466
27544
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
27467
27545
  "use strict";
27468
- init_theme();
27546
+ init_theme3();
27469
27547
  }
27470
27548
  });
27471
27549
 
@@ -27486,10 +27564,10 @@ function ScrollablePanel({
27486
27564
  const overflowed = totalLines > height;
27487
27565
  return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
27488
27566
  /* @__PURE__ */ jsxs25(Box24, { children: [
27489
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
27567
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
27490
27568
  overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
27491
27569
  /* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
27492
- /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27570
+ /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
27493
27571
  ] })
27494
27572
  ] }),
27495
27573
  children
@@ -27498,7 +27576,7 @@ function ScrollablePanel({
27498
27576
  var init_ScrollablePanel = __esm({
27499
27577
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx"() {
27500
27578
  "use strict";
27501
- init_theme();
27579
+ init_theme3();
27502
27580
  }
27503
27581
  });
27504
27582
 
@@ -27589,7 +27667,7 @@ function renderRationaleLines(rows, innerWidth) {
27589
27667
  out.push({
27590
27668
  kind: "label",
27591
27669
  text: row.name,
27592
- color: PALETTE.accent,
27670
+ color: PALETTE3.info,
27593
27671
  suffix: row.kind === "slot" ? " (slot)" : void 0
27594
27672
  });
27595
27673
  for (const line of wrapText(row.rationale, innerWidth)) {
@@ -27625,7 +27703,7 @@ function RationalePanel({
27625
27703
  totalLines,
27626
27704
  visibleStart,
27627
27705
  visibleEnd,
27628
- borderColor: active ? PALETTE.text : void 0,
27706
+ borderColor: active ? PALETTE3.inverse : void 0,
27629
27707
  children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
27630
27708
  }
27631
27709
  );
@@ -27633,7 +27711,7 @@ function RationalePanel({
27633
27711
  var init_RationalePanel = __esm({
27634
27712
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx"() {
27635
27713
  "use strict";
27636
- init_theme();
27714
+ init_theme3();
27637
27715
  init_wrap_text();
27638
27716
  init_RationaleLine();
27639
27717
  init_ScrollablePanel();
@@ -27669,29 +27747,21 @@ function TokenReviewPanel({
27669
27747
  width,
27670
27748
  height: height + 2,
27671
27749
  borderStyle: "single",
27672
- borderColor: active ? PALETTE.text : void 0,
27750
+ borderColor: active ? PALETTE3.inverse : void 0,
27673
27751
  children: [
27674
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27675
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27752
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
27753
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
27676
27754
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
27677
- current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
27755
+ current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
27678
27756
  visiblePaths.map((path5, i) => {
27679
27757
  const pathIndex = scrollStart + i;
27680
27758
  const checked = editSelection.has(path5);
27681
27759
  const focused = pathIndex === editCursor;
27682
- return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
27683
- Text28,
27684
- {
27685
- color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
27686
- bold: focused,
27687
- wrap: "truncate",
27688
- children: ` [${checked ? "x" : " "}] ${path5}`
27689
- }
27690
- ) }, path5);
27760
+ return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path5}` }) }, path5);
27691
27761
  }),
27692
27762
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
27693
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27694
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27763
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
27764
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
27695
27765
  ]
27696
27766
  }
27697
27767
  );
@@ -27703,16 +27773,16 @@ function TokenReviewPanel({
27703
27773
  width,
27704
27774
  height: height + 2,
27705
27775
  borderStyle: "single",
27706
- borderColor: active ? PALETTE.text : void 0,
27776
+ borderColor: active ? PALETTE3.inverse : void 0,
27707
27777
  children: [
27708
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27709
- suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
27778
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
27779
+ suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no token suggestions for this component)" }),
27710
27780
  suggestions.map((s, i) => {
27711
27781
  const focused = i === selectedRow;
27712
27782
  return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
27713
- /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
27714
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27715
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27783
+ /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
27784
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
27785
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` allowed: ${s.allowed.join(", ")}` })
27716
27786
  ] }, s.propName);
27717
27787
  }),
27718
27788
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
@@ -27724,7 +27794,7 @@ function TokenReviewPanel({
27724
27794
  var init_TokenReviewPanel = __esm({
27725
27795
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx"() {
27726
27796
  "use strict";
27727
- init_theme();
27797
+ init_theme3();
27728
27798
  }
27729
27799
  });
27730
27800
 
@@ -27804,9 +27874,9 @@ function ReviewDetailsPanel({
27804
27874
  const sourceLineCount = Math.max(1, height - 4);
27805
27875
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
27806
27876
  return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
27807
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27808
- source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, children: "(no source captured)" }),
27809
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27877
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
27878
+ source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, children: "(no source captured)" }),
27879
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: "[s/Esc] close" })
27810
27880
  ] });
27811
27881
  }
27812
27882
  if (panelOpen === "token-review") {
@@ -27848,7 +27918,7 @@ var init_review_details_panel = __esm({
27848
27918
  init_RationalePanel();
27849
27919
  init_TokenReviewPanel();
27850
27920
  init_windowed_panel();
27851
- init_theme();
27921
+ init_theme3();
27852
27922
  }
27853
27923
  });
27854
27924
 
@@ -27975,17 +28045,17 @@ function ReviewEmptyComponentsWarning({
27975
28045
  hidden
27976
28046
  }) {
27977
28047
  if (hidden || count === 0) return null;
27978
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
28048
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
27979
28049
  }
27980
28050
  function ReviewNoSelection() {
27981
- return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
28051
+ return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
27982
28052
  }
27983
28053
  function ReviewFinalizeError({
27984
28054
  message,
27985
28055
  hidden
27986
28056
  }) {
27987
28057
  if (hidden || !message) return null;
27988
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
28058
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
27989
28059
  }
27990
28060
  function ReviewPanelFooter({
27991
28061
  reviewEditor,
@@ -28009,7 +28079,7 @@ function ReviewComponentTitle({
28009
28079
  return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
28010
28080
  /* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
28011
28081
  /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
28012
- /* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
28082
+ /* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
28013
28083
  propCount,
28014
28084
  " prop",
28015
28085
  propCount !== 1 ? "s" : "",
@@ -28065,8 +28135,8 @@ function ReviewComponentPanel({
28065
28135
  )
28066
28136
  }
28067
28137
  ) }),
28068
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
28069
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
28138
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE3.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
28139
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
28070
28140
  ReviewPanelFooter,
28071
28141
  {
28072
28142
  reviewEditor,
@@ -28081,7 +28151,7 @@ function ReviewComponentPanel({
28081
28151
  var init_ReviewComponentPanel = __esm({
28082
28152
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx"() {
28083
28153
  "use strict";
28084
- init_theme();
28154
+ init_theme3();
28085
28155
  init_review_json_panel();
28086
28156
  init_ReviewDetailsEditor();
28087
28157
  init_windowed_panel();
@@ -28103,11 +28173,11 @@ function countReviewStatuses(entries) {
28103
28173
  );
28104
28174
  }
28105
28175
  function ReviewLoadingState() {
28106
- return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
28176
+ return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
28107
28177
  }
28108
28178
  function ReviewLoadError({ message }) {
28109
28179
  return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28110
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
28180
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
28111
28181
  /* @__PURE__ */ jsx38(Text31, { children: " " }),
28112
28182
  /* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
28113
28183
  ] });
@@ -28115,7 +28185,7 @@ function ReviewLoadError({ message }) {
28115
28185
  var init_ReviewStatus = __esm({
28116
28186
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx"() {
28117
28187
  "use strict";
28118
- init_theme();
28188
+ init_theme3();
28119
28189
  }
28120
28190
  });
28121
28191
 
@@ -28365,41 +28435,41 @@ function FinalizeDialog({
28365
28435
  /* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
28366
28436
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
28367
28437
  /* @__PURE__ */ jsxs30(Text32, { children: [
28368
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
28438
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
28369
28439
  accepted,
28370
28440
  " accepted"
28371
28441
  ] }),
28372
28442
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
28373
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
28443
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
28374
28444
  rejected,
28375
28445
  " rejected"
28376
28446
  ] }),
28377
28447
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
28378
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
28448
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
28379
28449
  needsReview,
28380
28450
  " unresolved"
28381
28451
  ] })
28382
28452
  ] }),
28383
28453
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
28384
28454
  noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
28385
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28386
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28455
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
28456
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
28387
28457
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28388
28458
  ] }),
28389
28459
  !allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
28390
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28391
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
28460
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
28461
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Only explicitly accepted components ship." }),
28392
28462
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28393
28463
  ] }),
28394
28464
  /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
28395
- previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
28465
+ previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
28396
28466
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28397
28467
  ] }),
28398
28468
  previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
28399
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
28400
- hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
28401
- windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
28402
- hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
28469
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removed.length, false) }),
28470
+ hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2191 more above" }),
28471
+ windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.error, children: removedComponentLine(rc) }, rc.id)),
28472
+ hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2193 more below" }),
28403
28473
  removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
28404
28474
  /* @__PURE__ */ jsx39(Text32, { children: " " })
28405
28475
  ] }),
@@ -28412,7 +28482,7 @@ var FINALIZE_REMOVED_WINDOW;
28412
28482
  var init_FinalizeDialog = __esm({
28413
28483
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx"() {
28414
28484
  "use strict";
28415
- init_theme();
28485
+ init_theme3();
28416
28486
  init_useImmediateInput();
28417
28487
  init_removed_components_text();
28418
28488
  FINALIZE_REMOVED_WINDOW = 6;
@@ -28940,8 +29010,8 @@ function ReviewStepDialogs({
28940
29010
  }
28941
29011
  function ReviewReloadDialog({ open }) {
28942
29012
  if (!open) return null;
28943
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
28944
- /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
29013
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
29014
+ /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE3.warning, children: "Reload from saved state?" }),
28945
29015
  /* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
28946
29016
  /* @__PURE__ */ jsx41(Text34, { children: " " }),
28947
29017
  /* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
@@ -28951,7 +29021,7 @@ function ReviewReloadDialog({ open }) {
28951
29021
  var init_ReviewDialogs = __esm({
28952
29022
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx"() {
28953
29023
  "use strict";
28954
- init_theme();
29024
+ init_theme3();
28955
29025
  init_FinalizeDialog();
28956
29026
  init_QuitDialog();
28957
29027
  init_ReviewStatus();
@@ -29362,25 +29432,25 @@ function LivePreviewSummary({
29362
29432
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
29363
29433
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
29364
29434
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
29365
- if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
29366
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
29435
+ if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: "Preview: disabled (creds rejected)" });
29436
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `Preview: ${spinner} running...` });
29367
29437
  if (!hasCounts) return null;
29368
29438
  return /* @__PURE__ */ jsxs33(Box32, { children: [
29369
29439
  /* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
29370
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
29440
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
29371
29441
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29372
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
29442
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
29373
29443
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29374
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
29444
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
29375
29445
  showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
29376
29446
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
29377
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
29447
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
29378
29448
  ] });
29379
29449
  }
29380
29450
  var init_LivePreviewSummary = __esm({
29381
29451
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx"() {
29382
29452
  "use strict";
29383
- init_theme();
29453
+ init_theme3();
29384
29454
  }
29385
29455
  });
29386
29456
 
@@ -29429,10 +29499,10 @@ function CyclePathLine({
29429
29499
  highlightComponents = false,
29430
29500
  highlightLine = false
29431
29501
  }) {
29432
- return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
29502
+ return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
29433
29503
  prefix,
29434
29504
  segments.map(
29435
- (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
29505
+ (segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE3.warning : void 0, children: segment.text }, index)
29436
29506
  )
29437
29507
  ] });
29438
29508
  }
@@ -29444,9 +29514,9 @@ function CycleDetailPanel({
29444
29514
  height
29445
29515
  }) {
29446
29516
  const lines = [
29447
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29448
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29449
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29517
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
29518
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
29519
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
29450
29520
  /* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
29451
29521
  ];
29452
29522
  cycles.forEach((cycle, index) => {
@@ -29458,7 +29528,7 @@ function CycleDetailPanel({
29458
29528
  );
29459
29529
  if (cycle.suggestedBreak) {
29460
29530
  lines.push(
29461
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29531
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
29462
29532
  );
29463
29533
  }
29464
29534
  lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
@@ -29466,9 +29536,9 @@ function CycleDetailPanel({
29466
29536
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
29467
29537
  const viewportHeight = Math.max(1, height - 3);
29468
29538
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
29469
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29539
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
29470
29540
  visible,
29471
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
29541
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
29472
29542
  ] });
29473
29543
  }
29474
29544
  function BreakCyclePanel({
@@ -29479,14 +29549,14 @@ function BreakCyclePanel({
29479
29549
  width,
29480
29550
  height
29481
29551
  }) {
29482
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
29483
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29552
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
29553
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
29484
29554
  cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
29485
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29555
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
29486
29556
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
29487
- edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
29557
+ edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
29488
29558
  edges.map((edge, index) => /* @__PURE__ */ jsx43(Text36, { inverse: index === cursor, children: `${index === cursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
29489
- confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
29559
+ confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
29490
29560
  ] });
29491
29561
  }
29492
29562
  function buildBreakingRows(breakingChanges) {
@@ -29532,7 +29602,7 @@ function deriveBreakingChanges(response) {
29532
29602
  }
29533
29603
  function GenerateReviewStep(props) {
29534
29604
  if (!props.extractSessionId) {
29535
- return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
29605
+ return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
29536
29606
  }
29537
29607
  return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
29538
29608
  }
@@ -30449,8 +30519,8 @@ function GenerateReviewStepView({
30449
30519
  }
30450
30520
  ),
30451
30521
  /* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
30452
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
30453
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
30522
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.error, paddingX: 1, children: [
30523
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removedComponents.length, true) }),
30454
30524
  !removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
30455
30525
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
30456
30526
  removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
@@ -30459,7 +30529,7 @@ function GenerateReviewStepView({
30459
30529
  breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
30460
30530
  Text36,
30461
30531
  {
30462
- color: PALETTE.warning,
30532
+ color: PALETTE3.warning,
30463
30533
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
30464
30534
  }
30465
30535
  ) }),
@@ -30467,10 +30537,10 @@ function GenerateReviewStepView({
30467
30537
  const row = breakingRows[breakingCursor];
30468
30538
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
30469
30539
  if (!comp) return null;
30470
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
30471
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30472
- comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
30473
- comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
30540
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
30541
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
30542
+ comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
30543
+ comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
30474
30544
  /* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
30475
30545
  ] });
30476
30546
  })(),
@@ -30493,11 +30563,11 @@ function GenerateReviewStepView({
30493
30563
  const participantSet = cycleView.structural;
30494
30564
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
30495
30565
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
30496
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
30497
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30498
- members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
30499
- ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30500
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
30566
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE3.error, paddingX: 1, children: [
30567
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
30568
+ members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Cycle members: ${members.join(", ")}` }),
30569
+ ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
30570
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
30501
30571
  ] });
30502
30572
  })(),
30503
30573
  /* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
@@ -30613,7 +30683,7 @@ function GenerateReviewStepView({
30613
30683
  ) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
30614
30684
  ] }),
30615
30685
  !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
30616
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30686
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
30617
30687
  cycleRows.slice(0, 3).map((cycle, idx) => {
30618
30688
  return /* @__PURE__ */ jsx43(
30619
30689
  CyclePathLine,
@@ -30626,7 +30696,7 @@ function GenerateReviewStepView({
30626
30696
  `cyc-banner-${idx}`
30627
30697
  );
30628
30698
  }),
30629
- cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30699
+ cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
30630
30700
  /* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
30631
30701
  ] }),
30632
30702
  /* @__PURE__ */ jsx43(
@@ -30647,7 +30717,7 @@ var HELP_SECTIONS2;
30647
30717
  var init_generate_review_step = __esm({
30648
30718
  "packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx"() {
30649
30719
  "use strict";
30650
- init_theme();
30720
+ init_theme3();
30651
30721
  init_review_json_panel();
30652
30722
  init_GroupedSidebar();
30653
30723
  init_composite_closure();
@@ -30756,13 +30826,13 @@ var init_generate_review_step = __esm({
30756
30826
 
30757
30827
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
30758
30828
  import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
30759
- var PALETTE3, INK_UI_THEME;
30829
+ var PALETTE4, INK_UI_THEME;
30760
30830
  var init_theme4 = __esm({
30761
30831
  "packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts"() {
30762
30832
  "use strict";
30763
- init_theme();
30764
- PALETTE3 = {
30765
- ...PALETTE,
30833
+ init_theme3();
30834
+ PALETTE4 = {
30835
+ ...PALETTE3,
30766
30836
  link: "#58A6FF"
30767
30837
  };
30768
30838
  INK_UI_THEME = extendTheme2(defaultTheme2, {
@@ -30770,7 +30840,7 @@ var init_theme4 = __esm({
30770
30840
  ProgressBar: {
30771
30841
  styles: {
30772
30842
  completed: () => ({
30773
- color: PALETTE3.accent
30843
+ color: "blue"
30774
30844
  })
30775
30845
  }
30776
30846
  }
@@ -30784,13 +30854,13 @@ import { Box as Box34, Text as Text37 } from "ink";
30784
30854
  import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
30785
30855
  function CustomPromptBanner({ generatePromptPath }) {
30786
30856
  if (!generatePromptPath) return null;
30787
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
30788
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, bold: true, children: "WARNING: Custom prompt active" }),
30789
- generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE3.warning, children: [
30857
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE4.warning, paddingX: 1, children: [
30858
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, bold: true, children: "WARNING: Custom prompt active" }),
30859
+ generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE4.warning, children: [
30790
30860
  "components: ",
30791
30861
  generatePromptPath
30792
30862
  ] }) : null,
30793
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30863
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
30794
30864
  ] });
30795
30865
  }
30796
30866
  var init_CustomPromptBanner = __esm({
@@ -30823,10 +30893,10 @@ import { Box as Box35, Text as Text38 } from "ink";
30823
30893
  import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
30824
30894
  function SpaceEnvironment({ spaceId, environmentId }) {
30825
30895
  return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
30826
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Space:" }),
30896
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
30827
30897
  /* @__PURE__ */ jsx45(Text38, { children: spaceId }),
30828
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "/" }),
30829
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Environment:" }),
30898
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
30899
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
30830
30900
  /* @__PURE__ */ jsx45(Text38, { children: environmentId })
30831
30901
  ] });
30832
30902
  }
@@ -30844,13 +30914,13 @@ function EntityRows({ entity, label }) {
30844
30914
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
30845
30915
  return /* @__PURE__ */ jsxs37(Fragment14, { children: [
30846
30916
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
30847
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "\u2713" }),
30917
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
30848
30918
  " ",
30849
30919
  plural3(entity[action]),
30850
30920
  " ",
30851
30921
  action
30852
30922
  ] }, action)),
30853
- entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
30923
+ entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30854
30924
  "\u2717 ",
30855
30925
  plural3(entity.failed),
30856
30926
  " failed \u2014 check logs above"
@@ -30859,8 +30929,8 @@ function EntityRows({ entity, label }) {
30859
30929
  }
30860
30930
  function LinkRow({ title, url }) {
30861
30931
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30862
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: title }),
30863
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.link, children: url })
30932
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: title }),
30933
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.link, children: url })
30864
30934
  ] });
30865
30935
  }
30866
30936
  function DoneStep({
@@ -30883,17 +30953,17 @@ function DoneStep({
30883
30953
  const success = totalFailed === 0;
30884
30954
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
30885
30955
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
30886
- success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.warning, children: "\u26A0 Finished with errors" }),
30887
- totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30956
+ success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.warning, children: "\u26A0 Finished with errors" }),
30957
+ totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30888
30958
  /* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
30889
30959
  /* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
30890
- summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.muted, children: [
30960
+ summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
30891
30961
  "Push result: ",
30892
30962
  summary.succeeded,
30893
30963
  "/",
30894
30964
  summary.total,
30895
30965
  " succeeded",
30896
- summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
30966
+ summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30897
30967
  ", ",
30898
30968
  summary.failed,
30899
30969
  " failed"
@@ -30901,8 +30971,8 @@ function DoneStep({
30901
30971
  ] }) })
30902
30972
  ] }),
30903
30973
  failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
30904
- /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.error, children: "Failure details" }),
30905
- failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
30974
+ /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.error, children: "Failure details" }),
30975
+ failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
30906
30976
  failure.entityType,
30907
30977
  " ",
30908
30978
  failure.entityId,
@@ -30912,7 +30982,7 @@ function DoneStep({
30912
30982
  ] }),
30913
30983
  /* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
30914
30984
  success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
30915
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "Your design system is now in Contentful Experiences." }),
30985
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "Your design system is now in Contentful Experiences." }),
30916
30986
  /* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
30917
30987
  /* @__PURE__ */ jsx46(
30918
30988
  LinkRow,
@@ -31045,7 +31115,7 @@ function PathPrompt({
31045
31115
  label,
31046
31116
  ":"
31047
31117
  ] }),
31048
- /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE3.muted : void 0, children: shown }),
31118
+ /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
31049
31119
  /* @__PURE__ */ jsx47(Text40, { children: cursor })
31050
31120
  ] }),
31051
31121
  /* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
@@ -31128,12 +31198,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
31128
31198
  /* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
31129
31199
  /* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
31130
31200
  operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
31131
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Operation:" }),
31201
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
31132
31202
  /* @__PURE__ */ jsx50(Text42, { children: operationId })
31133
31203
  ] }),
31134
31204
  showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
31135
31205
  /* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx50(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
31136
- /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
31206
+ /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
31137
31207
  progress.processed,
31138
31208
  "/",
31139
31209
  progress.total,
@@ -31141,10 +31211,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
31141
31211
  ] })
31142
31212
  ] }) }),
31143
31213
  showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
31144
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Now processing:" }),
31214
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
31145
31215
  /* @__PURE__ */ jsx50(Text42, { children: showCurrent })
31146
31216
  ] }),
31147
- /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
31217
+ /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
31148
31218
  "Elapsed: ",
31149
31219
  elapsed
31150
31220
  ] }) })
@@ -31351,25 +31421,25 @@ function buildPreviewSummaryLines(preview) {
31351
31421
  if (components.new.length > 0) {
31352
31422
  lines.push({
31353
31423
  key: "summary-components-new",
31354
- color: PALETTE3.success,
31424
+ color: PALETTE4.success,
31355
31425
  text: ` \uFF0B ${components.new.length} components will be created`
31356
31426
  });
31357
31427
  for (const [index, item] of components.new.entries()) {
31358
31428
  const name = item.key ?? item.$name ?? "unknown";
31359
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE3.success, text: ` + ${name}` });
31429
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
31360
31430
  }
31361
31431
  }
31362
31432
  if (components.changed.length > 0) {
31363
31433
  lines.push({
31364
31434
  key: "summary-components-changed",
31365
- color: PALETTE3.warning,
31435
+ color: PALETTE4.warning,
31366
31436
  text: ` \uFF5E ${components.changed.length} components will be updated`
31367
31437
  });
31368
31438
  for (const [index, item] of components.changed.entries()) {
31369
31439
  const isBreaking = item.changeClassification?.classification === "breaking";
31370
31440
  lines.push({
31371
31441
  key: `summary-components-changed-${index}`,
31372
- color: isBreaking ? PALETTE3.error : PALETTE3.warning,
31442
+ color: isBreaking ? PALETTE4.error : PALETTE4.warning,
31373
31443
  text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
31374
31444
  });
31375
31445
  }
@@ -31377,11 +31447,11 @@ function buildPreviewSummaryLines(preview) {
31377
31447
  if (components.removed.length > 0) {
31378
31448
  lines.push({
31379
31449
  key: "summary-components-removed",
31380
- color: PALETTE3.warning,
31450
+ color: PALETTE4.warning,
31381
31451
  text: ` \u2298 ${components.removed.length} components will be skipped`
31382
31452
  });
31383
31453
  for (const [index, item] of components.removed.entries()) {
31384
- lines.push({ key: `summary-components-removed-${index}`, color: PALETTE3.warning, text: ` \u2298 ${item.name}` });
31454
+ lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
31385
31455
  }
31386
31456
  }
31387
31457
  if (components.unchanged.length > 0) {
@@ -31394,21 +31464,21 @@ function buildPreviewSummaryLines(preview) {
31394
31464
  if (tokens.new.length > 0) {
31395
31465
  lines.push({
31396
31466
  key: "summary-tokens-new",
31397
- color: PALETTE3.success,
31467
+ color: PALETTE4.success,
31398
31468
  text: ` \uFF0B ${tokens.new.length} design tokens will be created`
31399
31469
  });
31400
31470
  }
31401
31471
  if (tokens.changed.length > 0) {
31402
31472
  lines.push({
31403
31473
  key: "summary-tokens-changed",
31404
- color: PALETTE3.warning,
31474
+ color: PALETTE4.warning,
31405
31475
  text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
31406
31476
  });
31407
31477
  }
31408
31478
  if (tokens.removed.length > 0) {
31409
31479
  lines.push({
31410
31480
  key: "summary-tokens-removed",
31411
- color: PALETTE3.warning,
31481
+ color: PALETTE4.warning,
31412
31482
  text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
31413
31483
  });
31414
31484
  }
@@ -31452,12 +31522,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
31452
31522
  function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
31453
31523
  lines.push({
31454
31524
  key: `${keyPrefix}-h-${name}`,
31455
- color: PALETTE3.warning,
31525
+ color: PALETTE4.warning,
31456
31526
  text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
31457
31527
  });
31458
31528
  if (changeClassification?.classification !== "breaking") return;
31459
31529
  const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
31460
- lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE3.error, text: ` \u26A0 BREAKING: ${reasons}` });
31530
+ lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE4.error, text: ` \u26A0 BREAKING: ${reasons}` });
31461
31531
  }
31462
31532
  function buildPreviewDiffLines(preview) {
31463
31533
  const lines = [];
@@ -31465,12 +31535,12 @@ function buildPreviewDiffLines(preview) {
31465
31535
  for (const item of components.new) {
31466
31536
  const raw = item;
31467
31537
  const name = raw.key ?? raw.$name ?? "unknown";
31468
- lines.push({ key: `comp-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
31538
+ lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
31469
31539
  const slots = raw.$slots ?? {};
31470
31540
  for (const slotName of Object.keys(slots).sort()) {
31471
31541
  lines.push({
31472
31542
  key: `comp-new-${name}-slot-${slotName}`,
31473
- color: PALETTE3.success,
31543
+ color: PALETTE4.success,
31474
31544
  text: ` slot: ${slotName}`
31475
31545
  });
31476
31546
  const allowed = slots[slotName]?.["$allowedComponents"];
@@ -31478,14 +31548,14 @@ function buildPreviewDiffLines(preview) {
31478
31548
  const names = allowed.filter((n) => typeof n === "string");
31479
31549
  lines.push({
31480
31550
  key: `comp-new-${name}-slot-${slotName}-allow`,
31481
- color: PALETTE3.success,
31551
+ color: PALETTE4.success,
31482
31552
  text: ` allowedComponents: [${names.join(", ")}]`
31483
31553
  });
31484
31554
  }
31485
31555
  }
31486
31556
  }
31487
31557
  for (const item of components.removed) {
31488
- lines.push({ key: `comp-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
31558
+ lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
31489
31559
  }
31490
31560
  for (const item of components.changed) {
31491
31561
  appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
@@ -31516,10 +31586,10 @@ function buildPreviewDiffLines(preview) {
31516
31586
  for (const item of tokens.new) {
31517
31587
  const raw = item;
31518
31588
  const name = raw.name ?? raw.path ?? "unknown";
31519
- lines.push({ key: `tok-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
31589
+ lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
31520
31590
  }
31521
31591
  for (const item of tokens.removed) {
31522
- lines.push({ key: `tok-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
31592
+ lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
31523
31593
  }
31524
31594
  for (const item of tokens.changed) {
31525
31595
  const tokenName = item.current.name;
@@ -31610,13 +31680,13 @@ function WizardPreviewStep({
31610
31680
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
31611
31681
  focused: false,
31612
31682
  children: [
31613
- activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE3.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
31614
- /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31683
+ activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE4.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
31684
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
31615
31685
  ]
31616
31686
  }
31617
31687
  )
31618
- ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31619
- breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31688
+ ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, children: "Nothing to push \u2014 everything is already up to date." }),
31689
+ breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
31620
31690
  /* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
31621
31691
  /* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
31622
31692
  /* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
@@ -32298,7 +32368,7 @@ var init_save = __esm({
32298
32368
  writeFile: (path5, contents) => writeFile7(path5, contents),
32299
32369
  appendRun,
32300
32370
  buildSourceFingerprint,
32301
- sleep: (ms) => new Promise((resolve27) => setTimeout(resolve27, ms)),
32371
+ sleep: (ms) => new Promise((resolve28) => setTimeout(resolve28, ms)),
32302
32372
  warn: (message) => process.stderr.write(message)
32303
32373
  });
32304
32374
  }
@@ -32849,13 +32919,48 @@ var init_debug_store = __esm({
32849
32919
  }
32850
32920
  });
32851
32921
 
32922
+ // packages/experience-design-system-cli/src/tui/help/file-locations.ts
32923
+ import { join as join27, resolve as resolve27 } from "node:path";
32924
+ function describeFileLocations({
32925
+ contentfulBaseDir,
32926
+ debugModeEnabled,
32927
+ currentSessionDir: currentSessionDir2
32928
+ }) {
32929
+ if (!debugModeEnabled) {
32930
+ return {
32931
+ debugLogs: "none while Debug Mode is off",
32932
+ importFiles: `${join27("<project>", ".contentful")}/ (tokens.json, components.json)`
32933
+ };
32934
+ }
32935
+ const base = contentfulBaseDir ? resolve27(contentfulBaseDir) : "<project>";
32936
+ const session = currentSessionDir2 ?? join27(base, ".contentful", "<date>-session-<n>");
32937
+ return {
32938
+ debugLogs: join27(session, "debug"),
32939
+ importFiles: `${join27(session, "dsi-import-<n>")}/ (tokens.json, components.json)`
32940
+ };
32941
+ }
32942
+ var init_file_locations = __esm({
32943
+ "packages/experience-design-system-cli/src/tui/help/file-locations.ts"() {
32944
+ "use strict";
32945
+ }
32946
+ });
32947
+
32852
32948
  // packages/experience-design-system-cli/src/tui/help/help-info.ts
32853
32949
  async function readHelpInfo() {
32854
- const debugMode = await readDebugModeSetting();
32950
+ const [debugMode, settings] = await Promise.all([readDebugModeSetting(), readSettings2()]);
32951
+ const base = settings["contentfulBaseDir"];
32952
+ const locations = describeFileLocations({
32953
+ contentfulBaseDir: typeof base === "string" ? base : "",
32954
+ debugModeEnabled: debugMode.enabled,
32955
+ currentSessionDir: currentSessionDir()
32956
+ });
32855
32957
  return {
32856
32958
  storage: [
32857
32959
  { label: "Config folder", value: configRoot2() },
32858
- { label: "Settings file", value: configFilePath2() }
32960
+ { label: "Settings file", value: configFilePath2() },
32961
+ { label: "Agent settings", value: `${configFilePath2()} (keys: agent, agentModel, agents)` },
32962
+ { label: "Debug logs", value: locations.debugLogs },
32963
+ { label: "Import files", value: locations.importFiles }
32859
32964
  ],
32860
32965
  troubleshooting: [
32861
32966
  { label: "CLI version", value: readPackageVersion() },
@@ -32876,6 +32981,7 @@ var init_help_info = __esm({
32876
32981
  init_debug_store();
32877
32982
  init_debug_mode_store();
32878
32983
  init_version();
32984
+ init_file_locations();
32879
32985
  }
32880
32986
  });
32881
32987
 
@@ -32887,7 +32993,7 @@ function Section({ title, rows }) {
32887
32993
  return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
32888
32994
  /* @__PURE__ */ jsx53(Text44, { bold: true, color: PALETTE.accent, children: title }),
32889
32995
  rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
32890
- /* @__PURE__ */ jsx53(Box42, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
32996
+ /* @__PURE__ */ jsx53(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
32891
32997
  /* @__PURE__ */ jsx53(Text44, { children: row.value })
32892
32998
  ] }, row.label))
32893
32999
  ] });
@@ -32933,7 +33039,7 @@ function HelpScreen({ onDone }) {
32933
33039
  var init_PageContainer2 = __esm({
32934
33040
  "packages/experience-design-system-cli/src/tui/help/PageContainer.tsx"() {
32935
33041
  "use strict";
32936
- init_theme();
33042
+ init_home_theme();
32937
33043
  init_debug_store();
32938
33044
  init_control_hints();
32939
33045
  init_help_info();
@@ -33001,177 +33107,672 @@ var init_PageContainer3 = __esm({
33001
33107
  }
33002
33108
  });
33003
33109
 
33004
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
33005
- async function readCredentials() {
33006
- const store = await readV1Store();
33007
- return {
33008
- spaceId: store.spaceId || "",
33009
- environmentId: store.environmentId || "",
33010
- cmaToken: store.cmaToken || "",
33011
- host: store.host || "",
33012
- defaultComponentDir: store.defaultComponentDir || "",
33013
- defaultTokenFile: store.defaultTokenFile || "",
33014
- contentfulBaseDir: store.contentfulBaseDir || ""
33015
- };
33110
+ // packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts
33111
+ import { execFile as execFile2 } from "node:child_process";
33112
+ import { access as access6, constants } from "node:fs/promises";
33113
+ function effectiveBinary(name, savedBinary) {
33114
+ return savedBinary.trim() || AGENT_BINARIES[name];
33016
33115
  }
33017
- async function writeCredentials(config) {
33018
- const existing = await readV1Store();
33019
- const merged = {
33020
- ...existing,
33021
- ...config
33022
- };
33023
- Object.keys(merged).forEach((k) => {
33024
- if (!merged[k]) delete merged[k];
33116
+ function defaultModelLabel(name) {
33117
+ const model = DEFAULT_MODELS[name];
33118
+ return model && model !== "Auto" ? model : "chosen by the agent";
33119
+ }
33120
+ function resolveOnPath(binary) {
33121
+ if (binary.includes("/")) {
33122
+ return access6(binary, constants.X_OK).then(
33123
+ () => binary,
33124
+ () => null
33125
+ );
33126
+ }
33127
+ return new Promise((resolve28) => {
33128
+ execFile2(
33129
+ process.platform === "win32" ? "where" : "which",
33130
+ [binary],
33131
+ (error, stdout) => resolve28(error ? null : stdout.split("\n")[0]?.trim() ?? null)
33132
+ );
33025
33133
  });
33026
- await writeV1Store(merged);
33027
33134
  }
33028
- var init_config_store = __esm({
33029
- "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts"() {
33135
+ function readVersion(binary) {
33136
+ return new Promise((resolve28) => {
33137
+ execFile2(binary, ["--version"], { timeout: VERSION_TIMEOUT_MS }, (error, stdout) => {
33138
+ const line = stdout.split("\n")[0]?.trim() ?? "";
33139
+ if (!error && line) resolve28(pass("version", line));
33140
+ else resolve28(fail3("version", "runs, but did not report a version"));
33141
+ });
33142
+ });
33143
+ }
33144
+ async function inspectAgent(name, binary) {
33145
+ const target = effectiveBinary(name, binary);
33146
+ const found = await resolveOnPath(target);
33147
+ if (!found) return [fail3("path", `\`${target}\` was not found or is not executable`)];
33148
+ const checks = [pass("path", found)];
33149
+ checks.push(await readVersion(found));
33150
+ if (name === "claude") {
33151
+ const auth = await withBinaryEnv(name, found, () => checkAgentAuth(name));
33152
+ checks.push(
33153
+ auth === "ok" ? pass("login", "logged in") : fail3("login", auth === "not-found" ? "binary not found" : `not logged in: ${LOGIN_HINTS.claude}`)
33154
+ );
33155
+ }
33156
+ return checks;
33157
+ }
33158
+ async function testAgent(name, binary, model) {
33159
+ const checks = await inspectAgent(name, binary);
33160
+ if (!checks.every((check) => check.step === "version" || check.ok)) return checks;
33161
+ const target = effectiveBinary(name, binary);
33162
+ const found = await resolveOnPath(target) ?? target;
33163
+ const started = Date.now();
33164
+ const result = await withBinaryEnv(
33165
+ name,
33166
+ found,
33167
+ () => createLocalCliAgentInvoker().invoke({
33168
+ agent: name,
33169
+ ...model.trim() ? { model: model.trim() } : {},
33170
+ prompt: TEST_PROMPT,
33171
+ timeoutMs: PROMPT_TIMEOUT_MS
33172
+ })
33173
+ );
33174
+ const seconds = ((Date.now() - started) / 1e3).toFixed(1);
33175
+ if (result.timedOut) return [...checks, fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`)];
33176
+ if (result.exitCode !== 0) {
33177
+ const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
33178
+ return [...checks, fail3("prompt", reason)];
33179
+ }
33180
+ return [...checks, pass("prompt", `answered in ${seconds}s`)];
33181
+ }
33182
+ function statusFromChecks(name, checks, savedBinary) {
33183
+ if (checks.length === 0) return "checking";
33184
+ if (checks.some((check) => check.step === "path" && !check.ok)) {
33185
+ return savedBinary.trim() ? "not-found" : "not-configured";
33186
+ }
33187
+ const login = checks.find((check) => check.step === "login");
33188
+ if (login) return login.ok ? "ready" : "not-logged-in";
33189
+ const prompt = checks.find((check) => check.step === "prompt");
33190
+ if (prompt) return prompt.ok ? "ready" : "not-logged-in";
33191
+ return name === "claude" ? "ready" : "unknown";
33192
+ }
33193
+ function nextStepHint(name, status) {
33194
+ if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set the command path below`;
33195
+ if (status === "not-found") return `${INSTALL_HINTS[name]}, or fix the command path`;
33196
+ if (status === "not-logged-in") return LOGIN_HINTS[name];
33197
+ if (status === "unknown") return "run a full test to confirm it is logged in";
33198
+ return "";
33199
+ }
33200
+ function modelLine(name, savedModel) {
33201
+ const model = savedModel.trim();
33202
+ return model ? model : `${defaultModelLabel(name)} (built-in default)`;
33203
+ }
33204
+ function panelRows(name, checks, settings) {
33205
+ if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
33206
+ const status = statusFromChecks(name, checks, settings.binary);
33207
+ const path5 = checks.find((check) => check.step === "path");
33208
+ if (!path5?.ok) {
33209
+ const rows2 = [
33210
+ {
33211
+ label: "Command",
33212
+ value: settings.binary.trim() ? path5?.detail ?? "not found" : "not found on your PATH",
33213
+ tone: settings.binary.trim() ? "bad" : "muted"
33214
+ }
33215
+ ];
33216
+ const hint2 = nextStepHint(name, status);
33217
+ if (hint2) rows2.push({ label: "Next", value: hint2, tone: "muted" });
33218
+ return rows2;
33219
+ }
33220
+ const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
33221
+ const version = checks.find((check) => check.step === "version");
33222
+ if (version?.ok) rows.push({ label: "Version", value: version.detail, tone: "ok" });
33223
+ rows.push({ label: "Model", value: modelLine(name, settings.model), tone: "muted" });
33224
+ const hint = nextStepHint(name, status);
33225
+ if (hint) rows.push({ label: "Next", value: hint, tone: "muted" });
33226
+ return rows;
33227
+ }
33228
+ function statusRows(_name, checks, savedBinary) {
33229
+ if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
33230
+ const find = (step) => checks.find((check) => check.step === step);
33231
+ const path5 = find("path");
33232
+ if (!path5?.ok) {
33233
+ if (savedBinary.trim()) return [{ label: "Command", value: path5?.detail ?? "not found", tone: "bad" }];
33234
+ return [{ label: "Command", value: "not configured (not on the PATH)", tone: "muted" }];
33235
+ }
33236
+ const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
33237
+ const version = find("version");
33238
+ if (version) {
33239
+ rows.push({
33240
+ label: "Version",
33241
+ value: version.ok ? version.detail : "could not be read",
33242
+ tone: version.ok ? "ok" : "muted"
33243
+ });
33244
+ }
33245
+ const login = find("login");
33246
+ const prompt = find("prompt");
33247
+ if (login) {
33248
+ rows.push({ label: "Login", value: login.detail, tone: login.ok ? "ok" : "bad" });
33249
+ } else if (prompt) {
33250
+ rows.push({
33251
+ label: "Login",
33252
+ value: prompt.ok ? "confirmed by the test" : "see the test result",
33253
+ tone: prompt.ok ? "ok" : "bad"
33254
+ });
33255
+ } else {
33256
+ rows.push({ label: "Login", value: "not checked (use Run test)", tone: "muted" });
33257
+ }
33258
+ if (prompt) rows.push({ label: "Test", value: prompt.detail, tone: prompt.ok ? "ok" : "bad" });
33259
+ return rows;
33260
+ }
33261
+ async function withBinaryEnv(name, binary, run) {
33262
+ const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
33263
+ const previous = process.env[key];
33264
+ process.env[key] = binary;
33265
+ try {
33266
+ return await run();
33267
+ } finally {
33268
+ if (previous === void 0) delete process.env[key];
33269
+ else process.env[key] = previous;
33270
+ }
33271
+ }
33272
+ var VERSION_TIMEOUT_MS, PROMPT_TIMEOUT_MS, TEST_PROMPT, INSTALL_HINTS, LOGIN_HINTS, fail3, pass, LIST_STATUS;
33273
+ var init_agent_status = __esm({
33274
+ "packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts"() {
33030
33275
  "use strict";
33031
- init_v1_store();
33276
+ init_src4();
33277
+ VERSION_TIMEOUT_MS = 5e3;
33278
+ PROMPT_TIMEOUT_MS = 6e4;
33279
+ TEST_PROMPT = "Reply with the single word: ok";
33280
+ INSTALL_HINTS = {
33281
+ claude: "npm install -g @anthropic-ai/claude-code",
33282
+ codex: "npm install -g @openai/codex",
33283
+ opencode: "npm install -g opencode-ai",
33284
+ cursor: "install Cursor\u2019s `cursor-agent` command",
33285
+ copilot: "npm install -g @github/copilot"
33286
+ };
33287
+ LOGIN_HINTS = {
33288
+ claude: "run `claude login`",
33289
+ codex: "set OPENAI_API_KEY, or sign in with a ChatGPT account",
33290
+ opencode: "run `opencode auth`",
33291
+ cursor: "sign in from Cursor",
33292
+ copilot: "run `copilot` and sign in"
33293
+ };
33294
+ fail3 = (step, detail) => ({ step, ok: false, detail });
33295
+ pass = (step, detail) => ({ step, ok: true, detail });
33296
+ LIST_STATUS = {
33297
+ checking: { symbol: "\u2026", text: "checking", tone: "muted" },
33298
+ ready: { symbol: "\u25CF", text: "ready", tone: "ok" },
33299
+ "not-configured": { symbol: "\u25CB", text: "not installed", tone: "muted" },
33300
+ "not-found": { symbol: "\u25CB", text: "not installed", tone: "bad" },
33301
+ "not-logged-in": { symbol: "\u25D0", text: "not logged in", tone: "bad" },
33302
+ unknown: { symbol: "\u25D0", text: "installed, login unknown", tone: "muted" }
33303
+ };
33032
33304
  }
33033
33305
  });
33034
33306
 
33035
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
33307
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx
33308
+ import { Text as Text46 } from "ink";
33309
+ import { jsx as jsx55 } from "react/jsx-runtime";
33310
+ function AgentStatusBadge({
33311
+ name,
33312
+ checks,
33313
+ binary
33314
+ }) {
33315
+ const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
33316
+ return /* @__PURE__ */ jsx55(Text46, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33317
+ }
33318
+ var TONE_COLOR;
33319
+ var init_AgentStatusBadge = __esm({
33320
+ "packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx"() {
33321
+ "use strict";
33322
+ init_home_theme();
33323
+ init_agent_status();
33324
+ TONE_COLOR = {
33325
+ ok: PALETTE.success,
33326
+ bad: PALETTE.error,
33327
+ muted: PALETTE.muted
33328
+ };
33329
+ }
33330
+ });
33331
+
33332
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx
33036
33333
  import { useEffect as useEffect22, useState as useState29 } from "react";
33037
- import { Box as Box44, Text as Text46, useInput as useInput11 } from "ink";
33334
+ import { Box as Box44, Text as Text47, useInput as useInput11 } from "ink";
33038
33335
  import TextInput4 from "ink-text-input";
33039
- import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
33040
- function debugFields(config) {
33041
- return {
33042
- space_id: config?.spaceId ?? "",
33043
- environment_id: config?.environmentId ?? "",
33044
- cma_token: config?.cmaToken ?? "",
33045
- host: config?.host ?? "",
33046
- default_component_dir: config?.defaultComponentDir ?? "",
33047
- default_token_file: config?.defaultTokenFile ?? "",
33048
- contentful_base_dir: config?.contentfulBaseDir ?? ""
33049
- };
33336
+ import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
33337
+ function Section2({ title, children }) {
33338
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", marginTop: 1, children: [
33339
+ /* @__PURE__ */ jsx56(Text47, { bold: true, color: PALETTE.muted, children: title }),
33340
+ children
33341
+ ] });
33050
33342
  }
33051
- function ConfigurationScreen({ onDone }) {
33052
- const [stage, setStage] = useState29("loading");
33053
- const [config, setConfig] = useState29(null);
33054
- const [activeField, setActiveField] = useState29("spaceId");
33055
- const [notice, setNotice] = useState29(null);
33056
- const [lastSaved, setLastSaved] = useState29(null);
33343
+ function AgentDetail({
33344
+ name,
33345
+ config,
33346
+ setConfig,
33347
+ onBack
33348
+ }) {
33349
+ const settings = config.agents[name];
33350
+ const [focusIndex, setFocusIndex] = useState29(0);
33057
33351
  const [editing, setEditing] = useState29(false);
33058
33352
  const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
33353
+ const [saving, setSaving] = useState29(false);
33354
+ const [testing, setTesting] = useState29(false);
33355
+ const [notice, setNotice] = useState29(null);
33356
+ const [checks, setChecks] = useState29(void 0);
33059
33357
  useEffect22(() => {
33060
- readCredentials().then((cfg) => {
33061
- setConfig(cfg);
33062
- setStage("form");
33063
- startDebugRun({
33064
- flow: "settings/contentful-configuration",
33065
- step: "01-configuration",
33066
- menuOption: "Configuration",
33067
- inputs: debugFields(cfg)
33068
- });
33069
- });
33070
- }, []);
33071
- function fieldValue(field) {
33072
- if (!config) return "";
33073
- return config[field] || "";
33074
- }
33075
- function setFieldValue(field, value) {
33076
- if (!config) return;
33077
- setConfig({ ...config, [field]: value });
33358
+ let active = true;
33359
+ setChecks(void 0);
33360
+ void inspectAgent(name, settings.binary).then((result) => active && setChecks(result));
33361
+ return () => {
33362
+ active = false;
33363
+ };
33364
+ }, [name, settings.binary]);
33365
+ const setField = (field, value) => {
33366
+ setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [field]: value } } });
33078
33367
  setNotice(null);
33079
- }
33080
- function handleSave() {
33081
- if (!config) return;
33082
- setStage("saving");
33368
+ };
33369
+ const save = () => {
33370
+ setSaving(true);
33083
33371
  setNotice(null);
33084
- writeCredentials(config).then(() => {
33085
- setLastSaved(config);
33086
- if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
33087
- setNotice({ kind: "success", text: "Configuration saved" });
33088
- setStage("form");
33089
- }).catch((err) => {
33090
- setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
33091
- setStage("form");
33372
+ writeAgentConfig(config).then(() => {
33373
+ applyBinaryOverrides(config);
33374
+ setNotice({ kind: "success", text: `${AGENT_LABELS[name]} settings saved` });
33375
+ }).catch(
33376
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
33377
+ ).finally(() => setSaving(false));
33378
+ };
33379
+ const runTest = () => {
33380
+ setTesting(true);
33381
+ setNotice(null);
33382
+ setChecks(void 0);
33383
+ testAgent(name, settings.binary, settings.model).then(setChecks).catch(
33384
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "The test could not run" })
33385
+ ).finally(() => setTesting(false));
33386
+ };
33387
+ const focused = FOCUS_ORDER[focusIndex];
33388
+ const focusedField = focused === "test" ? null : focused;
33389
+ useInput11((input, key) => {
33390
+ if (saving || testing) return;
33391
+ if (editing) {
33392
+ if (key.escape && focusedField) {
33393
+ setField(focusedField, valueBeforeEdit);
33394
+ setEditing(false);
33395
+ }
33396
+ return;
33397
+ }
33398
+ if (key.escape || input === "q") {
33399
+ onBack();
33400
+ return;
33401
+ }
33402
+ if (input === "s") {
33403
+ save();
33404
+ return;
33405
+ }
33406
+ if (key.upArrow) {
33407
+ setFocusIndex((i) => (i - 1 + FOCUS_ORDER.length) % FOCUS_ORDER.length);
33408
+ return;
33409
+ }
33410
+ if (key.downArrow || key.tab) {
33411
+ setFocusIndex((i) => (i + 1) % FOCUS_ORDER.length);
33412
+ return;
33413
+ }
33414
+ if (input === "c" && focusedField) {
33415
+ setField(focusedField, "");
33416
+ return;
33417
+ }
33418
+ if (key.return) {
33419
+ if (focusedField) {
33420
+ setValueBeforeEdit(settings[focusedField]);
33421
+ setEditing(true);
33422
+ } else {
33423
+ runTest();
33424
+ }
33425
+ }
33426
+ });
33427
+ const status = checks ? statusFromChecks(name, checks, settings.binary) : "checking";
33428
+ const hint = nextStepHint(name, status);
33429
+ const pointer = (isFocused) => /* @__PURE__ */ jsx56(Text47, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
33430
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33431
+ /* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
33432
+ /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
33433
+ /* @__PURE__ */ jsxs45(Section2, { title: "STATUS", children: [
33434
+ statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
33435
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: row.label }) }),
33436
+ /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value })
33437
+ ] }, row.label)),
33438
+ hint && /* @__PURE__ */ jsx56(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text47, { color: PALETTE.muted, children: [
33439
+ "Next: ",
33440
+ hint
33441
+ ] }) })
33442
+ ] }),
33443
+ /* @__PURE__ */ jsx56(Section2, { title: "SETTINGS", children: FIELDS2.map((field) => {
33444
+ const isFocused = focused === field;
33445
+ const value = settings[field];
33446
+ return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33447
+ pointer(isFocused),
33448
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
33449
+ isFocused && editing ? /* @__PURE__ */ jsx56(
33450
+ TextInput4,
33451
+ {
33452
+ value,
33453
+ onChange: (next) => setField(field, next),
33454
+ onSubmit: () => setEditing(false)
33455
+ }
33456
+ ) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
33457
+ !value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
33458
+ ] }, field);
33459
+ }) }),
33460
+ /* @__PURE__ */ jsx56(Section2, { title: "ACTIONS", children: /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33461
+ pointer(focused === "test"),
33462
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted, children: "Run test" }) }),
33463
+ /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
33464
+ ] }) }),
33465
+ notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
33466
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33467
+ /* @__PURE__ */ jsxs45(Text47, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33468
+ notice.kind === "success" ? "\u2713" : "\u2717",
33469
+ " ",
33470
+ notice.text
33471
+ ] })
33472
+ ] }),
33473
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
33474
+ /* @__PURE__ */ jsx56(
33475
+ ControlHints,
33476
+ {
33477
+ hints: editing ? [
33478
+ { keys: "type", label: "edit" },
33479
+ { keys: "\u2190/\u2192", label: "move cursor" },
33480
+ { keys: "\u23CE", label: "done" },
33481
+ { keys: "Esc", label: "cancel edit" }
33482
+ ] : [
33483
+ { keys: "\u2191/\u2193", label: "move" },
33484
+ { keys: "\u23CE", label: focusedField ? "edit" : "run test" },
33485
+ ...focusedField ? [{ keys: "c", label: "clear" }] : [],
33486
+ { keys: "s", label: "save" },
33487
+ { keys: "Esc/q", label: "back without saving" }
33488
+ ]
33489
+ }
33490
+ )
33491
+ ] });
33492
+ }
33493
+ var FOCUS_ORDER, FIELDS2, FIELD_LABEL, LABEL_WIDTH, fieldHint;
33494
+ var init_AgentDetail = __esm({
33495
+ "packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx"() {
33496
+ "use strict";
33497
+ init_home_theme();
33498
+ init_control_hints();
33499
+ init_agent_store();
33500
+ init_agent_status();
33501
+ init_AgentStatusBadge();
33502
+ init_apply_binary_overrides();
33503
+ FOCUS_ORDER = ["binary", "model", "test"];
33504
+ FIELDS2 = ["binary", "model"];
33505
+ FIELD_LABEL = { binary: "Command path", model: "Model" };
33506
+ LABEL_WIDTH = "Command path".length;
33507
+ fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
33508
+ }
33509
+ });
33510
+
33511
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
33512
+ import { useEffect as useEffect23, useState as useState30 } from "react";
33513
+ import { Box as Box45, Text as Text48, useInput as useInput12 } from "ink";
33514
+ import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33515
+ function AgentsScreen({ onDone }) {
33516
+ const [config, setConfig] = useState30(null);
33517
+ const [focus, setFocus] = useState30(0);
33518
+ const [open, setOpen] = useState30(null);
33519
+ const [notice, setNotice] = useState30(null);
33520
+ const [checks, setChecks] = useState30({});
33521
+ const inspectAll = (loaded) => {
33522
+ for (const name of AGENT_NAMES) {
33523
+ void inspectAgent(name, loaded.agents[name].binary).then(
33524
+ (result) => setChecks((previous) => ({ ...previous, [name]: result }))
33525
+ );
33526
+ }
33527
+ };
33528
+ useEffect23(() => {
33529
+ void readAgentConfig().then((loaded) => {
33530
+ setConfig(loaded);
33531
+ inspectAll(loaded);
33532
+ startDebugRun({
33533
+ flow: "settings/agents",
33534
+ step: "01-agents",
33535
+ menuOption: "Configuration > Agents",
33536
+ inputs: { default_agent: loaded.defaultAgent }
33537
+ });
33092
33538
  });
33539
+ }, []);
33540
+ const cycleDefault = (step) => {
33541
+ if (!config) return;
33542
+ const index = AGENT_NAMES.indexOf(config.defaultAgent);
33543
+ const next = { ...config, defaultAgent: AGENT_NAMES[(index + step + AGENT_NAMES.length) % AGENT_NAMES.length] };
33544
+ setConfig(next);
33545
+ writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[next.defaultAgent]}` })).catch(
33546
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
33547
+ );
33548
+ };
33549
+ useInput12((input, key) => {
33550
+ if (!config || open) return;
33551
+ const row = ROWS[focus];
33552
+ if (key.upArrow || key.downArrow || key.tab) setNotice(null);
33553
+ if (key.upArrow) {
33554
+ setFocus((i) => (i - 1 + ROWS.length) % ROWS.length);
33555
+ return;
33556
+ }
33557
+ if (key.downArrow || key.tab) {
33558
+ setFocus((i) => (i + 1) % ROWS.length);
33559
+ return;
33560
+ }
33561
+ if (row.kind === "default" && key.leftArrow) {
33562
+ cycleDefault(-1);
33563
+ return;
33564
+ }
33565
+ if (row.kind === "default" && key.rightArrow) {
33566
+ cycleDefault(1);
33567
+ return;
33568
+ }
33569
+ if (key.return) {
33570
+ if (row.kind === "default") cycleDefault(1);
33571
+ else setOpen(row.name);
33572
+ return;
33573
+ }
33574
+ if (key.escape || input === "q") {
33575
+ void finishDebugRun({ outputs: { default_agent: config.defaultAgent }, status: "success", exitMethod: "saved" });
33576
+ onDone();
33577
+ }
33578
+ });
33579
+ if (!config) {
33580
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33581
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
33582
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33583
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "Loading..." })
33584
+ ] });
33093
33585
  }
33094
- function quit() {
33095
- void finishDebugRun(
33096
- lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
33586
+ if (open) {
33587
+ return /* @__PURE__ */ jsx57(
33588
+ AgentDetail,
33589
+ {
33590
+ name: open,
33591
+ config,
33592
+ setConfig,
33593
+ onBack: () => {
33594
+ setOpen(null);
33595
+ void readAgentConfig().then((saved) => {
33596
+ setConfig(saved);
33597
+ inspectAll(saved);
33598
+ });
33599
+ }
33600
+ }
33097
33601
  );
33098
- onDone();
33099
33602
  }
33100
- useInput11((input, key) => {
33101
- if (stage === "loading" || stage === "saving") return;
33603
+ const focusedRow = ROWS[focus];
33604
+ const focusedAgent = focusedRow.kind === "agent" ? focusedRow.name : null;
33605
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33606
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
33607
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
33608
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33609
+ /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33610
+ /* @__PURE__ */ jsx57(Text48, { color: focusedRow.kind === "default" ? PALETTE.accent : void 0, children: focusedRow.kind === "default" ? "\u276F" : " " }),
33611
+ /* @__PURE__ */ jsx57(
33612
+ Text48,
33613
+ {
33614
+ bold: focusedRow.kind === "default",
33615
+ color: focusedRow.kind === "default" ? PALETTE.accent : PALETTE.muted,
33616
+ children: "Default agent"
33617
+ }
33618
+ ),
33619
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: `\u2039 ${AGENT_LABELS[config.defaultAgent]} \u203A` })
33620
+ ] }),
33621
+ /* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
33622
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33623
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33624
+ /* @__PURE__ */ jsx57(Box45, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "AGENT" }) }),
33625
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "STATUS" })
33626
+ ] }),
33627
+ AGENT_NAMES.map((name) => {
33628
+ const isFocused = focusedAgent === name;
33629
+ return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33630
+ /* @__PURE__ */ jsx57(Text48, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
33631
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
33632
+ /* @__PURE__ */ jsx57(Box45, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
33633
+ /* @__PURE__ */ jsx57(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
33634
+ ] }, name);
33635
+ }),
33636
+ focusedAgent && /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
33637
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
33638
+ panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs46(Box45, { gap: 1, paddingLeft: 1, children: [
33639
+ /* @__PURE__ */ jsx57(Box45, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: row.label }) }),
33640
+ /* @__PURE__ */ jsx57(Text48, { color: TONE_COLOR[row.tone], children: row.value })
33641
+ ] }, row.label))
33642
+ ] }),
33643
+ notice && /* @__PURE__ */ jsxs46(Fragment18, { children: [
33644
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33645
+ /* @__PURE__ */ jsxs46(Text48, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33646
+ notice.kind === "success" ? "\u2713" : "\u2717",
33647
+ " ",
33648
+ notice.text
33649
+ ] })
33650
+ ] }),
33651
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
33652
+ /* @__PURE__ */ jsx57(
33653
+ ControlHints,
33654
+ {
33655
+ hints: focusedRow.kind === "default" ? [
33656
+ { keys: "\u2191/\u2193", label: "move" },
33657
+ { keys: "\u2190/\u2192", label: "change default agent" },
33658
+ { keys: "Esc/q", label: "back" }
33659
+ ] : [
33660
+ { keys: "\u2191/\u2193", label: "move" },
33661
+ { keys: "\u23CE", label: "settings and test" },
33662
+ { keys: "Esc/q", label: "back" }
33663
+ ]
33664
+ }
33665
+ )
33666
+ ] });
33667
+ }
33668
+ var ROWS, NAME_WIDTH, PANEL_LABEL_WIDTH;
33669
+ var init_AgentScreens = __esm({
33670
+ "packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx"() {
33671
+ "use strict";
33672
+ init_src4();
33673
+ init_home_theme();
33674
+ init_control_hints();
33675
+ init_debug_store();
33676
+ init_agent_store();
33677
+ init_agent_status();
33678
+ init_AgentDetail();
33679
+ init_AgentStatusBadge();
33680
+ ROWS = [{ kind: "default" }, ...AGENT_NAMES.map((name) => ({ kind: "agent", name }))];
33681
+ NAME_WIDTH = 16;
33682
+ PANEL_LABEL_WIDTH = "Command".length;
33683
+ }
33684
+ });
33685
+
33686
+ // packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
33687
+ import { useState as useState31 } from "react";
33688
+ import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
33689
+ import TextInput5 from "ink-text-input";
33690
+ import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
33691
+ function FieldForm({
33692
+ title,
33693
+ subtitle,
33694
+ fields,
33695
+ values,
33696
+ onChange,
33697
+ onSave,
33698
+ onQuit,
33699
+ notice,
33700
+ busy = false,
33701
+ footer
33702
+ }) {
33703
+ const [active, setActive] = useState31(0);
33704
+ const [editing, setEditing] = useState31(false);
33705
+ const [valueBeforeEdit, setValueBeforeEdit] = useState31("");
33706
+ const labelWidth = Math.max(...fields.map((field) => field.label.length));
33707
+ const current = fields[active];
33708
+ useInput13((input, key) => {
33709
+ if (busy) return;
33102
33710
  if (editing) {
33103
33711
  if (key.escape) {
33104
- setFieldValue(activeField, valueBeforeEdit);
33712
+ onChange(current.key, valueBeforeEdit);
33105
33713
  setEditing(false);
33106
33714
  }
33107
33715
  return;
33108
33716
  }
33109
33717
  if (key.escape || input === "q") {
33110
- quit();
33718
+ onQuit();
33111
33719
  return;
33112
33720
  }
33113
33721
  if (input === "s") {
33114
- handleSave();
33722
+ onSave();
33115
33723
  return;
33116
33724
  }
33117
33725
  if (input === "c") {
33118
- setFieldValue(activeField, "");
33726
+ onChange(current.key, "");
33119
33727
  return;
33120
33728
  }
33121
33729
  if (key.tab || key.downArrow) {
33122
- const idx = FIELD_ORDER.indexOf(activeField);
33123
- setActiveField(FIELD_ORDER[(idx + 1) % FIELD_ORDER.length]);
33730
+ setActive((i) => (i + 1) % fields.length);
33124
33731
  return;
33125
33732
  }
33126
33733
  if (key.upArrow) {
33127
- const idx = FIELD_ORDER.indexOf(activeField);
33128
- setActiveField(FIELD_ORDER[(idx - 1 + FIELD_ORDER.length) % FIELD_ORDER.length]);
33734
+ setActive((i) => (i - 1 + fields.length) % fields.length);
33129
33735
  return;
33130
33736
  }
33131
33737
  if (key.return) {
33132
- setValueBeforeEdit(fieldValue(activeField));
33738
+ setValueBeforeEdit(values[current.key]);
33133
33739
  setEditing(true);
33134
33740
  }
33135
33741
  });
33136
- if (stage === "loading") {
33137
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33138
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
33139
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
33140
- /* @__PURE__ */ jsx55(Text46, { color: PALETTE.accent, children: "Loading..." })
33141
- ] });
33142
- }
33143
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33144
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
33145
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
33146
- /* @__PURE__ */ jsx55(Box44, { flexDirection: "column", children: FIELD_ORDER.map((field) => {
33147
- const isActive = activeField === field;
33148
- const value = fieldValue(field);
33149
- const display = field === "cmaToken" ? "\u2022".repeat(value.length) : value;
33150
- return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33151
- /* @__PURE__ */ jsx55(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
33152
- /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: FIELD_LABELS[field] }) }),
33153
- isActive && editing ? /* @__PURE__ */ jsx55(
33154
- TextInput4,
33742
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33743
+ /* @__PURE__ */ jsx58(Text49, { bold: true, children: title }),
33744
+ subtitle && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: subtitle }),
33745
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33746
+ /* @__PURE__ */ jsx58(Box46, { flexDirection: "column", children: fields.map((field, index) => {
33747
+ const isActive = index === active;
33748
+ const value = values[field.key];
33749
+ const display = field.masked ? "\u2022".repeat(value.length) : value;
33750
+ return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
33751
+ /* @__PURE__ */ jsx58(Text49, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
33752
+ /* @__PURE__ */ jsx58(Box46, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text49, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
33753
+ isActive && editing ? /* @__PURE__ */ jsx58(
33754
+ TextInput5,
33155
33755
  {
33156
33756
  value,
33157
- onChange: (next) => setFieldValue(field, next),
33757
+ onChange: (next) => onChange(field.key, next),
33158
33758
  onSubmit: () => setEditing(false),
33159
- mask: field === "cmaToken" ? "\u2022" : void 0
33759
+ mask: field.masked ? "\u2022" : void 0
33160
33760
  }
33161
- ) : /* @__PURE__ */ jsx55(Text46, { bold: !!display, children: display || (FIELD_HINTS[field] ? "" : /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "(empty)" })) }),
33162
- FIELD_HINTS[field] && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: FIELD_HINTS[field] })
33163
- ] }, field);
33761
+ ) : /* @__PURE__ */ jsx58(Text49, { bold: !!display, children: display || (field.hint ? "" : /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "(empty)" })) }),
33762
+ field.hint && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: field.hint })
33763
+ ] }, field.key);
33164
33764
  }) }),
33165
- notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
33166
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
33167
- /* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33765
+ notice && /* @__PURE__ */ jsxs47(Fragment19, { children: [
33766
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33767
+ /* @__PURE__ */ jsxs47(Text49, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33168
33768
  notice.kind === "success" ? "\u2713" : "\u2717",
33169
33769
  " ",
33170
33770
  notice.text
33171
33771
  ] })
33172
33772
  ] }),
33173
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
33174
- /* @__PURE__ */ jsx55(
33773
+ footer,
33774
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
33775
+ /* @__PURE__ */ jsx58(
33175
33776
  ControlHints,
33176
33777
  {
33177
33778
  hints: editing ? [
@@ -33184,53 +33785,219 @@ function ConfigurationScreen({ onDone }) {
33184
33785
  { keys: "\u23CE", label: "edit" },
33185
33786
  { keys: "c", label: "clear" },
33186
33787
  { keys: "s", label: "save" },
33187
- { keys: "Esc/q", label: "quit without saving" }
33788
+ { keys: "Esc/q", label: "back without saving" }
33188
33789
  ]
33189
33790
  }
33190
33791
  )
33191
33792
  ] });
33192
33793
  }
33193
- var FIELD_ORDER, FIELD_LABELS, FIELD_HINTS, LABEL_WIDTH;
33794
+ var init_FieldForm = __esm({
33795
+ "packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx"() {
33796
+ "use strict";
33797
+ init_home_theme();
33798
+ init_control_hints();
33799
+ }
33800
+ });
33801
+
33802
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
33803
+ async function readCredentials() {
33804
+ const store = await readV1Store();
33805
+ return {
33806
+ spaceId: store.spaceId || "",
33807
+ environmentId: store.environmentId || "",
33808
+ cmaToken: store.cmaToken || "",
33809
+ host: store.host || "",
33810
+ defaultComponentDir: store.defaultComponentDir || "",
33811
+ defaultTokenFile: store.defaultTokenFile || "",
33812
+ contentfulBaseDir: store.contentfulBaseDir || ""
33813
+ };
33814
+ }
33815
+ async function writeCredentials(config) {
33816
+ const existing = await readV1Store();
33817
+ const merged = {
33818
+ ...existing,
33819
+ ...config
33820
+ };
33821
+ Object.keys(merged).forEach((k) => {
33822
+ if (!merged[k]) delete merged[k];
33823
+ });
33824
+ await writeV1Store(merged);
33825
+ }
33826
+ var init_config_store = __esm({
33827
+ "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts"() {
33828
+ "use strict";
33829
+ init_v1_store();
33830
+ }
33831
+ });
33832
+
33833
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
33834
+ import { useEffect as useEffect24, useState as useState32 } from "react";
33835
+ import { Box as Box47, Text as Text50 } from "ink";
33836
+ import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
33837
+ function debugFields(config) {
33838
+ return {
33839
+ space_id: config?.spaceId ?? "",
33840
+ environment_id: config?.environmentId ?? "",
33841
+ cma_token: config?.cmaToken ?? "",
33842
+ host: config?.host ?? "",
33843
+ default_component_dir: config?.defaultComponentDir ?? "",
33844
+ default_token_file: config?.defaultTokenFile ?? "",
33845
+ contentful_base_dir: config?.contentfulBaseDir ?? ""
33846
+ };
33847
+ }
33848
+ function ProjectConfigScreen({ onDone }) {
33849
+ const [config, setConfig] = useState32(null);
33850
+ const [saving, setSaving] = useState32(false);
33851
+ const [notice, setNotice] = useState32(null);
33852
+ const [lastSaved, setLastSaved] = useState32(null);
33853
+ useEffect24(() => {
33854
+ void readCredentials().then((cfg) => {
33855
+ setConfig(cfg);
33856
+ startDebugRun({
33857
+ flow: "settings/contentful-configuration",
33858
+ step: "01-configuration",
33859
+ menuOption: "Configuration > Project",
33860
+ inputs: debugFields(cfg)
33861
+ });
33862
+ });
33863
+ }, []);
33864
+ if (!config) {
33865
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33866
+ /* @__PURE__ */ jsx59(Text50, { bold: true, children: "Project" }),
33867
+ /* @__PURE__ */ jsx59(Text50, { children: " " }),
33868
+ /* @__PURE__ */ jsx59(Text50, { color: PALETTE.accent, children: "Loading..." })
33869
+ ] });
33870
+ }
33871
+ const save = () => {
33872
+ setSaving(true);
33873
+ setNotice(null);
33874
+ writeCredentials(config).then(() => {
33875
+ setLastSaved(config);
33876
+ if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
33877
+ setNotice({ kind: "success", text: "Project settings saved" });
33878
+ }).catch((err) => {
33879
+ setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
33880
+ }).finally(() => setSaving(false));
33881
+ };
33882
+ const quit = () => {
33883
+ void finishDebugRun(
33884
+ lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
33885
+ );
33886
+ onDone();
33887
+ };
33888
+ return /* @__PURE__ */ jsx59(
33889
+ FieldForm,
33890
+ {
33891
+ title: "Project",
33892
+ subtitle: "The Contentful space and where the CLI keeps its files.",
33893
+ fields: FIELDS3,
33894
+ values: valuesOf(config),
33895
+ onChange: (key, value) => {
33896
+ setConfig({ ...config, [key]: value });
33897
+ setNotice(null);
33898
+ },
33899
+ onSave: save,
33900
+ onQuit: quit,
33901
+ notice,
33902
+ busy: saving
33903
+ }
33904
+ );
33905
+ }
33906
+ var FIELDS3, valuesOf;
33907
+ var init_ProjectConfigScreen = __esm({
33908
+ "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx"() {
33909
+ "use strict";
33910
+ init_home_theme();
33911
+ init_debug_store();
33912
+ init_FieldForm();
33913
+ init_config_store();
33914
+ FIELDS3 = [
33915
+ { key: "spaceId", label: "Space ID" },
33916
+ { key: "environmentId", label: "Environment ID" },
33917
+ { key: "cmaToken", label: "CMA Token", masked: true },
33918
+ { key: "host", label: "API Host" },
33919
+ { key: "defaultComponentDir", label: "Default component directory" },
33920
+ { key: "defaultTokenFile", label: "Default token file" },
33921
+ { key: "contentfulBaseDir", label: "Root Project Directory", hint: "(where .contentful goes)" }
33922
+ ];
33923
+ valuesOf = (config) => Object.fromEntries(FIELDS3.map(({ key }) => [key, config[key] || ""]));
33924
+ }
33925
+ });
33926
+
33927
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
33928
+ import { useState as useState33 } from "react";
33929
+ import { Box as Box48, Text as Text51, useInput as useInput14 } from "ink";
33930
+ import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
33931
+ function ConfigurationScreen({ onDone }) {
33932
+ const [focus, setFocus] = useState33(0);
33933
+ const [open, setOpen] = useState33(null);
33934
+ const close = () => setOpen(null);
33935
+ useInput14((input, key) => {
33936
+ if (open) return;
33937
+ if (key.upArrow) {
33938
+ setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
33939
+ return;
33940
+ }
33941
+ if (key.downArrow || key.tab) {
33942
+ setFocus((i) => (i + 1) % SECTIONS.length);
33943
+ return;
33944
+ }
33945
+ if (key.return) {
33946
+ setOpen(SECTIONS[focus].id);
33947
+ return;
33948
+ }
33949
+ if (key.escape || input === "q") onDone();
33950
+ });
33951
+ if (open === "project") return /* @__PURE__ */ jsx60(ProjectConfigScreen, { onDone: close });
33952
+ if (open === "agents") return /* @__PURE__ */ jsx60(AgentsScreen, { onDone: close });
33953
+ return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33954
+ /* @__PURE__ */ jsx60(Text51, { bold: true, children: "Configuration" }),
33955
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
33956
+ SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
33957
+ /* @__PURE__ */ jsx60(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
33958
+ /* @__PURE__ */ jsx60(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
33959
+ /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: section.description })
33960
+ ] }, section.id)),
33961
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
33962
+ /* @__PURE__ */ jsx60(
33963
+ ControlHints,
33964
+ {
33965
+ hints: [
33966
+ { keys: "\u2191/\u2193", label: "move" },
33967
+ { keys: "\u23CE", label: "open" },
33968
+ { keys: "Esc/q", label: "back" }
33969
+ ]
33970
+ }
33971
+ )
33972
+ ] });
33973
+ }
33974
+ var SECTIONS;
33194
33975
  var init_ContentfulConfigScreen = __esm({
33195
33976
  "packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx"() {
33196
33977
  "use strict";
33197
- init_theme();
33198
- init_config_store();
33199
- init_debug_store();
33978
+ init_home_theme();
33200
33979
  init_control_hints();
33201
- FIELD_ORDER = [
33202
- "spaceId",
33203
- "environmentId",
33204
- "cmaToken",
33205
- "host",
33206
- "defaultComponentDir",
33207
- "defaultTokenFile",
33208
- "contentfulBaseDir"
33980
+ init_AgentScreens();
33981
+ init_ProjectConfigScreen();
33982
+ SECTIONS = [
33983
+ {
33984
+ id: "project",
33985
+ label: "Project",
33986
+ description: "Contentful space, credentials, defaults and where .contentful goes"
33987
+ },
33988
+ { id: "agents", label: "Agents", description: "Which coding agent the CLI uses, and each agent\u2019s settings" }
33209
33989
  ];
33210
- FIELD_LABELS = {
33211
- spaceId: "Space ID",
33212
- environmentId: "Environment ID",
33213
- cmaToken: "CMA Token",
33214
- host: "API Host",
33215
- defaultComponentDir: "Default component directory",
33216
- defaultTokenFile: "Default token file",
33217
- contentfulBaseDir: "Root Project Directory"
33218
- };
33219
- FIELD_HINTS = {
33220
- contentfulBaseDir: "(where .contentful goes)"
33221
- };
33222
- LABEL_WIDTH = Math.max(...Object.values(FIELD_LABELS).map((label) => label.length));
33223
33990
  }
33224
33991
  });
33225
33992
 
33226
33993
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
33227
- import { useEffect as useEffect23, useState as useState30 } from "react";
33228
- import { Box as Box45, Text as Text47, useInput as useInput12 } from "ink";
33229
- import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
33994
+ import { useEffect as useEffect25, useState as useState34 } from "react";
33995
+ import { Box as Box49, Text as Text52, useInput as useInput15 } from "ink";
33996
+ import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
33230
33997
  function OptInAnalyticsScreen({ onDone }) {
33231
- const [loading, setLoading] = useState30(true);
33232
- const [enabled, setEnabled] = useState30(true);
33233
- useEffect23(() => {
33998
+ const [loading, setLoading] = useState34(true);
33999
+ const [enabled, setEnabled] = useState34(true);
34000
+ useEffect25(() => {
33234
34001
  readAnalyticsSetting().then((setting) => {
33235
34002
  setEnabled(setting.enabled);
33236
34003
  setLoading(false);
@@ -33242,7 +34009,7 @@ function OptInAnalyticsScreen({ onDone }) {
33242
34009
  });
33243
34010
  });
33244
34011
  }, []);
33245
- useInput12((input, key) => {
34012
+ useInput15((input, key) => {
33246
34013
  if (loading) return;
33247
34014
  if (key.return || input === " ") {
33248
34015
  setEnabled((current) => {
@@ -33257,21 +34024,21 @@ function OptInAnalyticsScreen({ onDone }) {
33257
34024
  onDone();
33258
34025
  }
33259
34026
  });
33260
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33261
- /* @__PURE__ */ jsx56(Text47, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
33262
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
33263
- loading ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs46(Fragment18, { children: [
33264
- /* @__PURE__ */ jsxs46(Text47, { children: [
34027
+ return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34028
+ /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34029
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
34030
+ loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
34031
+ /* @__PURE__ */ jsxs50(Text52, { children: [
33265
34032
  "Share anonymous usage data:",
33266
34033
  " ",
33267
- /* @__PURE__ */ jsx56(Text47, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34034
+ /* @__PURE__ */ jsx61(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
33268
34035
  ] }),
33269
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
33270
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
33271
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
34036
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
34037
+ /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
34038
+ /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
33272
34039
  ] }),
33273
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
33274
- /* @__PURE__ */ jsx56(
34040
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
34041
+ /* @__PURE__ */ jsx61(
33275
34042
  ControlHints,
33276
34043
  {
33277
34044
  hints: [
@@ -33285,7 +34052,7 @@ function OptInAnalyticsScreen({ onDone }) {
33285
34052
  var init_screen11 = __esm({
33286
34053
  "packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx"() {
33287
34054
  "use strict";
33288
- init_theme();
34055
+ init_home_theme();
33289
34056
  init_analytics_store();
33290
34057
  init_debug_store();
33291
34058
  init_control_hints();
@@ -33293,12 +34060,12 @@ var init_screen11 = __esm({
33293
34060
  });
33294
34061
 
33295
34062
  // packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
33296
- import { useEffect as useEffect24, useState as useState31 } from "react";
33297
- import { Box as Box46, Text as Text48, useInput as useInput13 } from "ink";
33298
- import { jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
34063
+ import { useEffect as useEffect26, useState as useState35 } from "react";
34064
+ import { Box as Box50, Text as Text53, useInput as useInput16 } from "ink";
34065
+ import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
33299
34066
  function UpgradeScreen({ onDone }) {
33300
- const [upgradeCheck, setUpgradeCheck] = useState31();
33301
- useEffect24(() => {
34067
+ const [upgradeCheck, setUpgradeCheck] = useState35();
34068
+ useEffect26(() => {
33302
34069
  startDebugRun({
33303
34070
  flow: "upgrade",
33304
34071
  step: "01-upgrade",
@@ -33307,7 +34074,7 @@ function UpgradeScreen({ onDone }) {
33307
34074
  });
33308
34075
  checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
33309
34076
  }, []);
33310
- useInput13((_input, key) => {
34077
+ useInput16((_input, key) => {
33311
34078
  if (key.return) {
33312
34079
  void finishDebugRun({
33313
34080
  outputs: upgradeCheck ?? {},
@@ -33318,12 +34085,12 @@ function UpgradeScreen({ onDone }) {
33318
34085
  return;
33319
34086
  }
33320
34087
  });
33321
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33322
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Upgrade" }),
33323
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
34088
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34089
+ /* @__PURE__ */ jsx62(Text53, { bold: true, children: "Upgrade" }),
34090
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
33324
34091
  renderBody(upgradeCheck),
33325
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33326
- /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.accent, children: [
34092
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
34093
+ /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.accent, children: [
33327
34094
  FOCUS_MARKER,
33328
34095
  " Go Back"
33329
34096
  ] })
@@ -33331,41 +34098,40 @@ function UpgradeScreen({ onDone }) {
33331
34098
  }
33332
34099
  function renderBody(upgradeCheck) {
33333
34100
  if (!upgradeCheck) {
33334
- return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Checking for updates\u2026" });
34101
+ return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Checking for updates\u2026" });
33335
34102
  }
33336
34103
  if (upgradeCheck.status === "error") {
33337
- return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
34104
+ return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
33338
34105
  }
33339
34106
  if (upgradeCheck.status === "up-to-date") {
33340
- return /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.success, children: [
34107
+ return /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.success, children: [
33341
34108
  "You're already on the latest version (v",
33342
34109
  upgradeCheck.current,
33343
34110
  ")."
33344
34111
  ] });
33345
34112
  }
33346
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
33347
- /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.muted, children: [
33348
- /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.success, children: [
34113
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", children: [
34114
+ /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.muted, children: [
34115
+ /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.success, children: [
33349
34116
  "v",
33350
34117
  upgradeCheck.latest
33351
34118
  ] }),
33352
34119
  " ",
33353
34120
  "is available (you're on ",
33354
- /* @__PURE__ */ jsxs47(Text48, { bold: true, children: [
34121
+ /* @__PURE__ */ jsxs51(Text53, { bold: true, children: [
33355
34122
  "v",
33356
34123
  upgradeCheck.current
33357
34124
  ] }),
33358
34125
  "). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
33359
34126
  ] }),
33360
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
33361
- /* @__PURE__ */ jsx57(Box46, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx57(Text48, { bold: true, children: cmd }, cmd)) })
34127
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
34128
+ /* @__PURE__ */ jsx62(Box50, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.border, paddingX: 1, children: UPGRADE_COMMANDS.map((cmd) => /* @__PURE__ */ jsx62(Text53, { bold: true, children: cmd }, cmd)) })
33362
34129
  ] });
33363
34130
  }
33364
34131
  var UPGRADE_COMMANDS;
33365
34132
  var init_PageContainer4 = __esm({
33366
34133
  "packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx"() {
33367
34134
  "use strict";
33368
- init_theme();
33369
34135
  init_home_theme();
33370
34136
  init_version();
33371
34137
  init_debug_store();
@@ -33374,13 +34140,13 @@ var init_PageContainer4 = __esm({
33374
34140
  });
33375
34141
 
33376
34142
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
33377
- import { useEffect as useEffect25, useState as useState32 } from "react";
33378
- import { Box as Box47, Text as Text49, useInput as useInput14 } from "ink";
33379
- import { jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
34143
+ import { useEffect as useEffect27, useState as useState36 } from "react";
34144
+ import { Box as Box51, Text as Text54, useInput as useInput17 } from "ink";
34145
+ import { jsx as jsx63, jsxs as jsxs52 } from "react/jsx-runtime";
33380
34146
  function DebugModeScreen({ onDone }) {
33381
- const [loading, setLoading] = useState32(true);
33382
- const [enabled, setEnabled] = useState32(true);
33383
- useEffect25(() => {
34147
+ const [loading, setLoading] = useState36(true);
34148
+ const [enabled, setEnabled] = useState36(true);
34149
+ useEffect27(() => {
33384
34150
  readDebugModeSetting().then((setting) => {
33385
34151
  setEnabled(setting.enabled);
33386
34152
  setLoading(false);
@@ -33392,7 +34158,7 @@ function DebugModeScreen({ onDone }) {
33392
34158
  });
33393
34159
  });
33394
34160
  }, []);
33395
- useInput14((input, key) => {
34161
+ useInput17((input, key) => {
33396
34162
  if (loading) return;
33397
34163
  if (key.return || input === " ") {
33398
34164
  setEnabled((current) => {
@@ -33407,16 +34173,16 @@ function DebugModeScreen({ onDone }) {
33407
34173
  onDone();
33408
34174
  }
33409
34175
  });
33410
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33411
- /* @__PURE__ */ jsx58(Text49, { bold: true, children: "Settings \u203A Debug Mode" }),
33412
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33413
- loading ? /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs48(Text49, { children: [
34176
+ return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34177
+ /* @__PURE__ */ jsx63(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
34178
+ /* @__PURE__ */ jsx63(Text54, { children: " " }),
34179
+ loading ? /* @__PURE__ */ jsx63(Text54, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs52(Text54, { children: [
33414
34180
  "Debug logging:",
33415
34181
  " ",
33416
- /* @__PURE__ */ jsx58(Text49, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
34182
+ /* @__PURE__ */ jsx63(Text54, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
33417
34183
  ] }),
33418
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
33419
- /* @__PURE__ */ jsx58(
34184
+ /* @__PURE__ */ jsx63(Text54, { children: " " }),
34185
+ /* @__PURE__ */ jsx63(
33420
34186
  ControlHints,
33421
34187
  {
33422
34188
  hints: [
@@ -33430,7 +34196,7 @@ function DebugModeScreen({ onDone }) {
33430
34196
  var init_screen12 = __esm({
33431
34197
  "packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx"() {
33432
34198
  "use strict";
33433
- init_theme();
34199
+ init_home_theme();
33434
34200
  init_debug_mode_store();
33435
34201
  init_debug_store();
33436
34202
  init_control_hints();
@@ -33442,20 +34208,20 @@ var app_exports = {};
33442
34208
  __export(app_exports, {
33443
34209
  runApp: () => runApp
33444
34210
  });
33445
- import { join as join27 } from "node:path";
33446
- import { useEffect as useEffect26, useState as useState33 } from "react";
33447
- import { Fragment as Fragment19, jsx as jsx59 } from "react/jsx-runtime";
34211
+ import { join as join28 } from "node:path";
34212
+ import { useEffect as useEffect28, useState as useState37 } from "react";
34213
+ import { Fragment as Fragment21, jsx as jsx64 } from "react/jsx-runtime";
33448
34214
  function App({ importOptions, inkClear }) {
33449
- const [screen, setScreen] = useState33("start");
33450
- const [importExitCode, setImportExitCode] = useState33();
34215
+ const [screen, setScreen] = useState37("start");
34216
+ const [importExitCode, setImportExitCode] = useState37();
33451
34217
  const showImportResult = importExitCode !== void 0;
33452
- const [projectPath, setProjectPath] = useState33();
33453
- const [tokensPath, setTokensPath] = useState33();
33454
- const [scannedFiles, setScannedFiles] = useState33();
33455
- const [pendingLaunch, setPendingLaunch] = useState33();
33456
- const [extractionRun, setExtractionRun] = useState33();
34218
+ const [projectPath, setProjectPath] = useState37();
34219
+ const [tokensPath, setTokensPath] = useState37();
34220
+ const [scannedFiles, setScannedFiles] = useState37();
34221
+ const [pendingLaunch, setPendingLaunch] = useState37();
34222
+ const [extractionRun, setExtractionRun] = useState37();
33457
34223
  const extraction = useExtraction(extractionRun?.input);
33458
- const [scopeRun, setScopeRun] = useState33();
34224
+ const [scopeRun, setScopeRun] = useState37();
33459
34225
  const scopeFlow = useScopeGateFlow(
33460
34226
  scopeRun && {
33461
34227
  sessionId: scopeRun.extraction.sessionId,
@@ -33470,12 +34236,12 @@ function App({ importOptions, inkClear }) {
33470
34236
  }
33471
34237
  }
33472
34238
  );
33473
- const [generationInput, setGenerationInput] = useState33();
34239
+ const [generationInput, setGenerationInput] = useState37();
33474
34240
  const generation = useGeneration(generationInput);
33475
- const [flowStart, setFlowStart] = useState33();
34241
+ const [flowStart, setFlowStart] = useState37();
33476
34242
  const flow = useFlow(flowStart, { beforeStepChange: inkClear });
33477
- const [importDefaults, setImportDefaults] = useState33();
33478
- useEffect26(() => {
34243
+ const [importDefaults, setImportDefaults] = useState37();
34244
+ useEffect28(() => {
33479
34245
  if (screen !== "import") {
33480
34246
  setImportDefaults(void 0);
33481
34247
  return;
@@ -33493,7 +34259,7 @@ function App({ importOptions, inkClear }) {
33493
34259
  const launch = { projectPath: projectPath2, tokens, filePaths, ...importOptions };
33494
34260
  const state2 = await inspectTokens({
33495
34261
  rawTokensPath: tokens,
33496
- contentfulDir: join27(resolveUserPath(projectPath2), ".contentful"),
34262
+ contentfulDir: join28(resolveUserPath(projectPath2), ".contentful"),
33497
34263
  cache: importOptions.cache
33498
34264
  });
33499
34265
  if (state2.kind === "cached") {
@@ -33535,12 +34301,12 @@ function App({ importOptions, inkClear }) {
33535
34301
  }
33536
34302
  });
33537
34303
  };
33538
- useEffect26(() => {
34304
+ useEffect28(() => {
33539
34305
  if (!extractionRun || extraction?.status !== "done" || !extraction.result.ok) return;
33540
34306
  setExtractionRun(void 0);
33541
34307
  setScopeRun({ ...extractionRun, extraction: extraction.result.extraction });
33542
34308
  }, [extraction, extractionRun]);
33543
- useEffect26(() => {
34309
+ useEffect28(() => {
33544
34310
  if (!scopeRun || scopeFlow?.status !== "confirmed" || generationInput) return;
33545
34311
  const { extraction: produced, input, generatePromptPath } = scopeRun;
33546
34312
  setGenerationInput({
@@ -33558,7 +34324,7 @@ function App({ importOptions, inkClear }) {
33558
34324
  ...generatePromptPath ? { generatePromptPath } : {}
33559
34325
  });
33560
34326
  }, [scopeFlow, scopeRun, generationInput]);
33561
- useEffect26(() => {
34327
+ useEffect28(() => {
33562
34328
  if (!scopeRun || generation?.status !== "done" || !generation.result.ok) return;
33563
34329
  const { credentialsSkipped, tokenStrategy, extraction: produced, input, generatePromptPath } = scopeRun;
33564
34330
  inkClear();
@@ -33601,9 +34367,9 @@ function App({ importOptions, inkClear }) {
33601
34367
  };
33602
34368
  switch (screen) {
33603
34369
  case "import":
33604
- if (showImportResult) return /* @__PURE__ */ jsx59(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
34370
+ if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
33605
34371
  if (flow && flowStart) {
33606
- return /* @__PURE__ */ jsx59(
34372
+ return /* @__PURE__ */ jsx64(
33607
34373
  FlowScreen,
33608
34374
  {
33609
34375
  state: flow.state,
@@ -33613,12 +34379,12 @@ function App({ importOptions, inkClear }) {
33613
34379
  }
33614
34380
  );
33615
34381
  }
33616
- if (importDefaults === void 0) return /* @__PURE__ */ jsx59(Fragment19, {});
34382
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment21, {});
33617
34383
  if (projectPath === void 0) {
33618
- return /* @__PURE__ */ jsx59(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
34384
+ return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
33619
34385
  }
33620
34386
  if (tokensPath === void 0) {
33621
- return /* @__PURE__ */ jsx59(
34387
+ return /* @__PURE__ */ jsx64(
33622
34388
  TokenInputScreen,
33623
34389
  {
33624
34390
  initialPath: importDefaults.tokenFile,
@@ -33628,7 +34394,7 @@ function App({ importOptions, inkClear }) {
33628
34394
  );
33629
34395
  }
33630
34396
  if (scannedFiles === void 0) {
33631
- return /* @__PURE__ */ jsx59(
34397
+ return /* @__PURE__ */ jsx64(
33632
34398
  PathValidationScreen,
33633
34399
  {
33634
34400
  projectPath,
@@ -33640,10 +34406,10 @@ function App({ importOptions, inkClear }) {
33640
34406
  }
33641
34407
  if (extractionRun) {
33642
34408
  if (extraction?.status === "done" && !extraction.result.ok) {
33643
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
34409
+ return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
33644
34410
  }
33645
34411
  if (extraction?.status === "running") {
33646
- return /* @__PURE__ */ jsx59(
34412
+ return /* @__PURE__ */ jsx64(
33647
34413
  ExtractionScreen,
33648
34414
  {
33649
34415
  progress: extraction.progress,
@@ -33652,14 +34418,14 @@ function App({ importOptions, inkClear }) {
33652
34418
  }
33653
34419
  );
33654
34420
  }
33655
- return /* @__PURE__ */ jsx59(Fragment19, {});
34421
+ return /* @__PURE__ */ jsx64(Fragment21, {});
33656
34422
  }
33657
34423
  if (scopeRun && scopeFlow) {
33658
34424
  if (scopeFlow.status === "failed") {
33659
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
34425
+ return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
33660
34426
  }
33661
34427
  if (scopeFlow.status === "deciding") {
33662
- return /* @__PURE__ */ jsx59(
34428
+ return /* @__PURE__ */ jsx64(
33663
34429
  ScopeGateScreen,
33664
34430
  {
33665
34431
  components: scopeFlow.load.components,
@@ -33669,7 +34435,7 @@ function App({ importOptions, inkClear }) {
33669
34435
  );
33670
34436
  }
33671
34437
  if (generation?.status === "done" && !generation.result.ok) {
33672
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
34438
+ return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
33673
34439
  }
33674
34440
  if (generation?.status === "running") {
33675
34441
  const hasRawTokens = scopeRun.input.rawTokensPath !== "";
@@ -33677,7 +34443,7 @@ function App({ importOptions, inkClear }) {
33677
34443
  hasRawTokens,
33678
34444
  mapTokensEligible: generation.progress.mapTokensEligible
33679
34445
  });
33680
- return /* @__PURE__ */ jsx59(
34446
+ return /* @__PURE__ */ jsx64(
33681
34447
  GenerationScreen,
33682
34448
  {
33683
34449
  progress: generation.progress,
@@ -33689,10 +34455,10 @@ function App({ importOptions, inkClear }) {
33689
34455
  }
33690
34456
  );
33691
34457
  }
33692
- return /* @__PURE__ */ jsx59(Fragment19, {});
34458
+ return /* @__PURE__ */ jsx64(Fragment21, {});
33693
34459
  }
33694
34460
  if (pendingLaunch?.cached) {
33695
- return /* @__PURE__ */ jsx59(
34461
+ return /* @__PURE__ */ jsx64(
33696
34462
  TokenReuseScreen,
33697
34463
  {
33698
34464
  tokensPath: pendingLaunch.cached.tokensPath,
@@ -33703,7 +34469,7 @@ function App({ importOptions, inkClear }) {
33703
34469
  }
33704
34470
  );
33705
34471
  }
33706
- return /* @__PURE__ */ jsx59(
34472
+ return /* @__PURE__ */ jsx64(
33707
34473
  CredentialsScreen,
33708
34474
  {
33709
34475
  initial: importDefaults.credentials,
@@ -33712,19 +34478,19 @@ function App({ importOptions, inkClear }) {
33712
34478
  }
33713
34479
  );
33714
34480
  case "help":
33715
- return /* @__PURE__ */ jsx59(HelpScreen, { onDone: goToStart });
34481
+ return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
33716
34482
  case "upgrade":
33717
- return /* @__PURE__ */ jsx59(UpgradeScreen, { onDone: goToStart });
34483
+ return /* @__PURE__ */ jsx64(UpgradeScreen, { onDone: goToStart });
33718
34484
  case "settings":
33719
- return /* @__PURE__ */ jsx59(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
34485
+ return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
33720
34486
  case "settings-configuration":
33721
- return /* @__PURE__ */ jsx59(ConfigurationScreen, { onDone: goToSettings });
34487
+ return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
33722
34488
  case "settings-opt-in-analytics":
33723
- return /* @__PURE__ */ jsx59(OptInAnalyticsScreen, { onDone: goToSettings });
34489
+ return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
33724
34490
  case "settings-debug-mode":
33725
- return /* @__PURE__ */ jsx59(DebugModeScreen, { onDone: goToSettings });
34491
+ return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
33726
34492
  case "start":
33727
- return /* @__PURE__ */ jsx59(HomeScreen, { onNavigate: setScreen });
34493
+ return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
33728
34494
  }
33729
34495
  }
33730
34496
  async function runApp(renderApp, importOptions) {
@@ -33732,7 +34498,7 @@ async function runApp(renderApp, importOptions) {
33732
34498
  instance.clear?.();
33733
34499
  process.stdout.write("\x1B[H\x1B[0J");
33734
34500
  };
33735
- const instance = renderApp(/* @__PURE__ */ jsx59(App, { importOptions, inkClear }));
34501
+ const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
33736
34502
  await instance.waitUntilExit();
33737
34503
  }
33738
34504
  var init_app = __esm({
@@ -33767,7 +34533,7 @@ var init_app = __esm({
33767
34533
  // packages/experience-design-system-cli/program.ts
33768
34534
  init_src4();
33769
34535
  import { readFileSync as readFileSync9 } from "node:fs";
33770
- import { join as join28 } from "node:path";
34536
+ import { join as join29 } from "node:path";
33771
34537
  import { Command } from "commander";
33772
34538
 
33773
34539
  // packages/experience-design-system-cli/src/legacy/run-legacy.ts
@@ -33871,14 +34637,14 @@ function runDevWatch(args) {
33871
34637
  process.stderr.write("--watch only works from a checkout of the repo (scripts/dev.mjs is not in the package).\n");
33872
34638
  return Promise.resolve(1);
33873
34639
  }
33874
- return new Promise((resolve27) => {
34640
+ return new Promise((resolve28) => {
33875
34641
  const child = spawn4(process.execPath, [script, ...args], { stdio: "inherit" });
33876
34642
  process.on("SIGINT", () => void 0);
33877
- child.on("exit", (code) => resolve27(code ?? 0));
34643
+ child.on("exit", (code) => resolve28(code ?? 0));
33878
34644
  child.on("error", (err) => {
33879
34645
  process.stderr.write(`${err.message}
33880
34646
  `);
33881
- resolve27(1);
34647
+ resolve28(1);
33882
34648
  });
33883
34649
  });
33884
34650
  }
@@ -33900,11 +34666,13 @@ function registerImportCommand(program, openTui) {
33900
34666
  }
33901
34667
 
33902
34668
  // packages/experience-design-system-cli/program.ts
34669
+ init_agent_store();
34670
+ init_apply_binary_overrides();
33903
34671
  init_analytics_store();
33904
34672
  init_package_root();
33905
34673
  var pkg = JSON.parse(
33906
34674
  readFileSync9(
33907
- join28(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
34675
+ join29(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
33908
34676
  "utf8"
33909
34677
  )
33910
34678
  );
@@ -33922,6 +34690,7 @@ function createProgram() {
33922
34690
  const commandChain = chain.join(" ") || actionCommand.name();
33923
34691
  const { enabled } = await readAnalyticsSetting();
33924
34692
  setPersistedAnalyticsDisabled(!enabled);
34693
+ await readAgentConfig().then(applyBinaryOverrides, () => void 0);
33925
34694
  setCliVersion(pkg.version);
33926
34695
  noteCommandStart(commandChain);
33927
34696
  });
@@ -33945,7 +34714,7 @@ init_config();
33945
34714
  init_package_root();
33946
34715
  import { existsSync as existsSync12 } from "node:fs";
33947
34716
  import { mkdir as mkdir10, readFile as readFile19, rename as rename3, rmdir, unlink } from "node:fs/promises";
33948
- import { dirname as dirname16, join as join29 } from "node:path";
34717
+ import { dirname as dirname16, join as join30 } from "node:path";
33949
34718
  var PACKAGE_NAME4 = "@contentful/experience-design-system-cli";
33950
34719
  async function readJson(path5) {
33951
34720
  try {
@@ -33956,9 +34725,9 @@ async function readJson(path5) {
33956
34725
  }
33957
34726
  async function migrateOldConfig() {
33958
34727
  try {
33959
- const oldCredentials = join29(oldConfigDir2(), "credentials.json");
33960
- const oldRuns = join29(oldConfigDir2(), "runs.json");
33961
- const oldDebugMode = join29(
34728
+ const oldCredentials = join30(oldConfigDir2(), "credentials.json");
34729
+ const oldRuns = join30(oldConfigDir2(), "runs.json");
34730
+ const oldDebugMode = join30(
33962
34731
  findPackageRoot(import.meta.url, PACKAGE_NAME4),
33963
34732
  ".contentful",
33964
34733
  "config",