@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/app.js CHANGED
@@ -837,7 +837,7 @@ async function runAgent(options) {
837
837
  promptLen: prompt.length,
838
838
  promptHead: prompt.slice(0, 500)
839
839
  });
840
- return new Promise((resolve27) => {
840
+ return new Promise((resolve28) => {
841
841
  const bedrockEnv = bedrock ? BEDROCK_ENV_BY_AGENT[agent] : void 0;
842
842
  const child = spawn(binary, args, {
843
843
  stdio: ["pipe", "pipe", "pipe"],
@@ -886,7 +886,7 @@ async function runAgent(options) {
886
886
  stderrLen: stderr.length,
887
887
  stderrTail: stderr.slice(-1e3)
888
888
  });
889
- resolve27(result);
889
+ resolve28(result);
890
890
  });
891
891
  });
892
892
  }
@@ -908,7 +908,7 @@ async function checkAgentAuth(agent) {
908
908
  return "not-found";
909
909
  if (agent !== "claude")
910
910
  return "ok";
911
- return new Promise((resolve27) => {
911
+ return new Promise((resolve28) => {
912
912
  const child = spawn2(binary, ["auth", "status", "--json"], { stdio: ["ignore", "pipe", "pipe"] });
913
913
  let stdout = "";
914
914
  let done = false;
@@ -917,7 +917,7 @@ async function checkAgentAuth(agent) {
917
917
  return;
918
918
  done = true;
919
919
  child.kill("SIGTERM");
920
- resolve27("unauthenticated");
920
+ resolve28("unauthenticated");
921
921
  }, 5e3);
922
922
  child.stdout?.on("data", (chunk) => {
923
923
  stdout += chunk.toString();
@@ -928,14 +928,14 @@ async function checkAgentAuth(agent) {
928
928
  done = true;
929
929
  clearTimeout(timer);
930
930
  if (code !== 0) {
931
- resolve27("unauthenticated");
931
+ resolve28("unauthenticated");
932
932
  return;
933
933
  }
934
934
  try {
935
935
  const status = JSON.parse(stdout);
936
- resolve27(status.loggedIn ? "ok" : "unauthenticated");
936
+ resolve28(status.loggedIn ? "ok" : "unauthenticated");
937
937
  } catch {
938
- resolve27("unauthenticated");
938
+ resolve28("unauthenticated");
939
939
  }
940
940
  });
941
941
  });
@@ -945,9 +945,9 @@ async function binaryIsOnPath(binary) {
945
945
  const fs = await import("node:fs/promises");
946
946
  return fs.access(binary).then(() => true, () => false);
947
947
  }
948
- return new Promise((resolve27) => {
948
+ return new Promise((resolve28) => {
949
949
  const child = spawn2(process.platform === "win32" ? "where" : "which", [binary], { stdio: "ignore" });
950
- child.on("close", (code) => resolve27(code === 0));
950
+ child.on("close", (code) => resolve28(code === 0));
951
951
  });
952
952
  }
953
953
  var init_check_agent_auth = __esm({
@@ -2329,55 +2329,32 @@ var init_debug_store = __esm({
2329
2329
  });
2330
2330
 
2331
2331
  // packages/experience-design-system-cli/app.tsx
2332
- import { join as join25 } from "node:path";
2333
- import { useEffect as useEffect26, useState as useState33 } from "react";
2332
+ import { join as join26 } from "node:path";
2333
+ import { useEffect as useEffect28, useState as useState37 } from "react";
2334
2334
 
2335
2335
  // packages/experience-design-system-cli/src/tui/home/home.tsx
2336
2336
  import { useEffect as useEffect2, useState as useState2 } from "react";
2337
2337
  import { Box, Text as Text2, useApp, useInput } from "ink";
2338
2338
 
2339
- // packages/experience-design-system-cli/src/tui/theme.ts
2340
- var DARK = {
2341
- text: "#f7f9fa",
2342
- // gray100
2343
- muted: "#aec1cc",
2344
- // gray400
2345
- border: "#aec1cc",
2346
- // gray400
2347
- accent: "#40a0ff",
2348
- // blue400
2349
- error: "#ff707d",
2350
- // red400
2351
- success: "#5DB057",
2352
- // green400
2353
- warning: "#FFC835"
2354
- // yellow500
2339
+ // packages/experience-design-system-cli/src/tui/home/home.theme.ts
2340
+ var BRAND = {
2341
+ blue: "#1773EB",
2342
+ green: "#00C459",
2343
+ orange: "#E44F20",
2344
+ yellow: "#FFDA00",
2345
+ white: "#FFFFFF",
2346
+ slate: "#8B8D91",
2347
+ steel: "#C4D1DE"
2355
2348
  };
2356
- var LIGHT = {
2357
- text: "#111b2b",
2358
- // gray900
2359
- muted: "#5a657c",
2360
- // gray600
2361
- border: "#5a657c",
2362
- // gray600
2363
- accent: "#0059c8",
2364
- // semantic primary
2365
- error: "#bd002a",
2366
- // semantic negative
2367
- success: "#006D23",
2368
- // semantic positive
2369
- warning: "#CC4500"
2370
- // semantic warning
2349
+ var PALETTE = {
2350
+ accent: BRAND.blue,
2351
+ success: BRAND.green,
2352
+ error: BRAND.orange,
2353
+ warning: BRAND.yellow,
2354
+ muted: BRAND.slate,
2355
+ border: BRAND.steel
2371
2356
  };
2372
- function detectColorMode(env = process.env) {
2373
- const bg = env.COLORFGBG?.split(";").pop();
2374
- if (bg === "7" || bg === "15") return "light";
2375
- return "dark";
2376
- }
2377
- var PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
2378
-
2379
- // packages/experience-design-system-cli/src/tui/home/home.theme.ts
2380
- var BRAND_RAMP = [PALETTE.accent, PALETTE.error, PALETTE.warning];
2357
+ var BRAND_RAMP = [BRAND.blue, BRAND.orange, BRAND.yellow];
2381
2358
  var BAR_CELL = "\u2501";
2382
2359
  function brandBar(width, ramp = BRAND_RAMP) {
2383
2360
  if (width <= 0 || ramp.length === 0) return [];
@@ -8454,10 +8431,10 @@ function extractVueSlotsFromSetup(options) {
8454
8431
  if (!body)
8455
8432
  return [];
8456
8433
  const slotsByName = /* @__PURE__ */ new Map();
8457
- for (const access6 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
8458
- if (access6.getExpression().getText() !== slotsName)
8434
+ for (const access7 of body.getDescendantsOfKind(SyntaxKind5.PropertyAccessExpression)) {
8435
+ if (access7.getExpression().getText() !== slotsName)
8459
8436
  continue;
8460
- const slotName = access6.getName();
8437
+ const slotName = access7.getName();
8461
8438
  if (!slotsByName.has(slotName)) {
8462
8439
  slotsByName.set(slotName, {
8463
8440
  name: slotName,
@@ -13847,7 +13824,7 @@ function errorMessage(error) {
13847
13824
  return error instanceof Error && error.message ? error.message : String(error);
13848
13825
  }
13849
13826
  function defaultSleep(delayMs) {
13850
- return new Promise((resolve27) => setTimeout(resolve27, delayMs));
13827
+ return new Promise((resolve28) => setTimeout(resolve28, delayMs));
13851
13828
  }
13852
13829
 
13853
13830
  // packages/experience-design-system-backend-pipeline/dist/src/steps/apply/src/helpers/sanitize-preview.js
@@ -14088,7 +14065,7 @@ var ApiClient = class {
14088
14065
  const progress = maxAttempts > 1 ? attempt / (maxAttempts - 1) : 0;
14089
14066
  const baseDelay = intervalMs + (maxIntervalMs - intervalMs) * progress;
14090
14067
  const jitter = Math.random() * baseDelay * 0.15;
14091
- await new Promise((resolve27) => setTimeout(resolve27, baseDelay + jitter));
14068
+ await new Promise((resolve28) => setTimeout(resolve28, baseDelay + jitter));
14092
14069
  }
14093
14070
  }
14094
14071
  throw new Error(`Operation ${operationId} timed out after ${maxAttempts} attempts`);
@@ -14573,6 +14550,7 @@ function readTokensFromPath2(request) {
14573
14550
  init_agents();
14574
14551
  init_agent_name();
14575
14552
  init_models();
14553
+ init_binaries();
14576
14554
  init_is_agent_name();
14577
14555
  init_agent_supports_bedrock();
14578
14556
  init_check_agent_auth();
@@ -16397,7 +16375,7 @@ async function retryDatabaseWrite(operation, attempts = 8) {
16397
16375
  const message = error instanceof Error ? error.message : String(error);
16398
16376
  if (!/database is locked|database is busy/i.test(message) || attempt >= attempts)
16399
16377
  throw error;
16400
- await new Promise((resolve27) => setTimeout(resolve27, Math.min(250 * attempt, 2e3)));
16378
+ await new Promise((resolve28) => setTimeout(resolve28, Math.min(250 * attempt, 2e3)));
16401
16379
  }
16402
16380
  }
16403
16381
  }
@@ -17512,7 +17490,7 @@ var PROGRESS_THEME = extendTheme(defaultTheme, {
17512
17490
  components: {
17513
17491
  ProgressBar: {
17514
17492
  styles: {
17515
- completed: () => ({ color: PALETTE.accent })
17493
+ completed: () => ({ color: "blue" })
17516
17494
  }
17517
17495
  }
17518
17496
  }
@@ -21493,6 +21471,17 @@ function PreviewValidationErrorScreen({
21493
21471
  import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef11, useState as useState22 } from "react";
21494
21472
  import figures7 from "figures";
21495
21473
 
21474
+ // packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
21475
+ var PALETTE3 = {
21476
+ info: PALETTE.accent,
21477
+ success: PALETTE.success,
21478
+ error: PALETTE.error,
21479
+ warning: PALETTE.warning,
21480
+ muted: PALETTE.muted,
21481
+ border: PALETTE.border,
21482
+ inverse: "#FFFFFF"
21483
+ };
21484
+
21496
21485
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
21497
21486
  var HIDDEN_PROP_CATEGORIES = /* @__PURE__ */ new Set(["state", "unattached"]);
21498
21487
  function getReviewJsonPanelValue(selected, showHiddenProps) {
@@ -21923,13 +21912,13 @@ function serializeState(state2, originalJson) {
21923
21912
  }
21924
21913
  function Picker({ value, active }) {
21925
21914
  return /* @__PURE__ */ jsxs22(Box21, { children: [
21926
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
21927
- /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
21928
- active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
21915
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u2039" }),
21916
+ /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : void 0, bold: active, children: value }),
21917
+ active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u203A" })
21929
21918
  ] });
21930
21919
  }
21931
21920
  function Toggle({ value, active }) {
21932
- return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
21921
+ return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : value ? PALETTE3.success : PALETTE3.border, children: value ? "[\u2713]" : "[ ]" }) });
21933
21922
  }
21934
21923
  function InlinePropField({
21935
21924
  label,
@@ -21939,7 +21928,7 @@ function InlinePropField({
21939
21928
  width
21940
21929
  }) {
21941
21930
  return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
21942
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
21931
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, wrap: "truncate-end", children: [
21943
21932
  focused ? "\u203A " : " ",
21944
21933
  label
21945
21934
  ] }),
@@ -21960,7 +21949,7 @@ function DefaultValueRow({
21960
21949
  focused
21961
21950
  }) {
21962
21951
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
21963
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
21952
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
21964
21953
  focused ? "\u203A " : " ",
21965
21954
  "default:"
21966
21955
  ] }),
@@ -21975,7 +21964,7 @@ function RowLabel({
21975
21964
  return /* @__PURE__ */ jsxs22(
21976
21965
  Text23,
21977
21966
  {
21978
- color: selected ? PALETTE.text : PALETTE.accent,
21967
+ color: selected ? PALETTE3.inverse : PALETTE3.info,
21979
21968
  bold: selected,
21980
21969
  backgroundColor: selected ? "blue" : void 0,
21981
21970
  wrap: "truncate-end",
@@ -21993,7 +21982,7 @@ function ValueInputRow({
21993
21982
  cursorVisible
21994
21983
  }) {
21995
21984
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
21996
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
21985
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
21997
21986
  /* @__PURE__ */ jsx27(Text23, { children: valueText }),
21998
21987
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
21999
21988
  ] });
@@ -22010,7 +21999,7 @@ function EditableListItem({
22010
21999
  if (isBeingEdited) {
22011
22000
  return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
22012
22001
  }
22013
- return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
22002
+ return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.info : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
22014
22003
  }
22015
22004
  function EditableValueList({
22016
22005
  values,
@@ -22024,7 +22013,7 @@ function EditableValueList({
22024
22013
  showAddInput
22025
22014
  }) {
22026
22015
  return /* @__PURE__ */ jsxs22(Fragment5, { children: [
22027
- 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 }) })),
22016
+ 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 }) })),
22028
22017
  values.map((value, index) => /* @__PURE__ */ jsx27(
22029
22018
  EditableListItem,
22030
22019
  {
@@ -22050,11 +22039,11 @@ function DefaultSubRow({
22050
22039
  const cursor = cursorVisible ? "\u2588" : " ";
22051
22040
  if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
22052
22041
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22053
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22042
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22054
22043
  focused ? "\u203A " : " ",
22055
22044
  "default:"
22056
22045
  ] }),
22057
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
22046
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
22058
22047
  ] });
22059
22048
  }
22060
22049
  if (prop.type === "boolean") {
@@ -22064,11 +22053,11 @@ function DefaultSubRow({
22064
22053
  if (prop.type === "enum") {
22065
22054
  if (prop.values.length === 0) {
22066
22055
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22067
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22056
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22068
22057
  focused ? "\u203A " : " ",
22069
22058
  "default:"
22070
22059
  ] }),
22071
- /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
22060
+ /* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
22072
22061
  ] });
22073
22062
  }
22074
22063
  const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
@@ -22077,11 +22066,11 @@ function DefaultSubRow({
22077
22066
  const value = typeof prop.default === "string" ? prop.default : "";
22078
22067
  if (active) {
22079
22068
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
22080
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22069
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22081
22070
  focused ? "\u203A " : " ",
22082
22071
  "default:"
22083
22072
  ] }),
22084
- /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
22073
+ /* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
22085
22074
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
22086
22075
  /* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
22087
22076
  /* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
@@ -22089,11 +22078,11 @@ function DefaultSubRow({
22089
22078
  ] });
22090
22079
  }
22091
22080
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
22092
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22081
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22093
22082
  focused ? "\u203A " : " ",
22094
22083
  "default:"
22095
22084
  ] }),
22096
- /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
22085
+ /* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
22097
22086
  ] });
22098
22087
  }
22099
22088
  function DescriptionField({
@@ -22109,15 +22098,15 @@ function DescriptionField({
22109
22098
  }) {
22110
22099
  if (compact) {
22111
22100
  return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22112
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22101
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22113
22102
  focused ? "\u203A " : " ",
22114
22103
  label
22115
22104
  ] }),
22116
- /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
22105
+ /* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
22117
22106
  ] });
22118
22107
  }
22119
22108
  return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
22120
- /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
22109
+ /* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
22121
22110
  focused ? "\u203A " : " ",
22122
22111
  label
22123
22112
  ] }),
@@ -22181,7 +22170,7 @@ function PropRow({
22181
22170
  ] }),
22182
22171
  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" }) }),
22183
22172
  prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22184
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
22173
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "values", children: [
22185
22174
  activeField === "values" ? "\u203A " : " ",
22186
22175
  "values:"
22187
22176
  ] }),
@@ -22202,27 +22191,27 @@ function PropRow({
22202
22191
  }
22203
22192
  ),
22204
22193
  prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
22205
- /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
22194
+ /* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "allowed", children: [
22206
22195
  activeField === "allowed" ? "\u203A " : " ",
22207
22196
  "allowed:"
22208
22197
  ] }),
22209
- 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(
22198
+ 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(
22210
22199
  Text23,
22211
22200
  {
22212
- color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
22201
+ color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
22213
22202
  wrap: "wrap",
22214
22203
  children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
22215
22204
  }
22216
22205
  )
22217
22206
  ] }),
22218
- selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
22207
+ selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
22219
22208
  const max = Math.max(8, width - 8);
22220
22209
  const text = `~ ${rationale}`;
22221
22210
  return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
22222
22211
  })() }) }, rowKey ? `rationale-${rowKey}` : void 0),
22223
22212
  selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
22224
22213
  /* @__PURE__ */ jsxs22(Box21, { children: [
22225
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
22214
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
22226
22215
  activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
22227
22216
  ] }),
22228
22217
  /* @__PURE__ */ jsx27(
@@ -22283,7 +22272,7 @@ function SlotRow({
22283
22272
  /* @__PURE__ */ jsxs22(
22284
22273
  Text23,
22285
22274
  {
22286
- color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
22275
+ color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
22287
22276
  bold: activeField === "allowedComponents",
22288
22277
  children: [
22289
22278
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -22291,14 +22280,14 @@ function SlotRow({
22291
22280
  ]
22292
22281
  }
22293
22282
  ),
22294
- slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22283
+ slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
22295
22284
  ] }),
22296
22285
  selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
22297
22286
  /* @__PURE__ */ jsxs22(Box21, { children: [
22298
22287
  /* @__PURE__ */ jsxs22(
22299
22288
  Text23,
22300
22289
  {
22301
- color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
22290
+ color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
22302
22291
  bold: activeField === "allowedComponents",
22303
22292
  children: [
22304
22293
  activeField === "allowedComponents" ? "\u203A " : " ",
@@ -22306,7 +22295,7 @@ function SlotRow({
22306
22295
  ]
22307
22296
  }
22308
22297
  ),
22309
- 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" })
22298
+ 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" })
22310
22299
  ] }),
22311
22300
  /* @__PURE__ */ jsx27(
22312
22301
  EditableValueList,
@@ -22322,21 +22311,21 @@ function SlotRow({
22322
22311
  showAddInput: editingField && activeField === "allowedComponents"
22323
22312
  }
22324
22313
  ),
22325
- 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)" }) : (() => {
22314
+ 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)" }) : (() => {
22326
22315
  const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
22327
22316
  if (filtered.length === 0) {
22328
- return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
22317
+ return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
22329
22318
  }
22330
22319
  const cursor = pickerCursor % filtered.length;
22331
22320
  const MAX_VISIBLE = 5;
22332
22321
  const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
22333
22322
  const slice = filtered.slice(start, start + MAX_VISIBLE);
22334
22323
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
22335
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22324
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
22336
22325
  slice.map((name, i) => {
22337
22326
  const absIdx = start + i;
22338
22327
  const isCursor = absIdx === cursor;
22339
- return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22328
+ return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
22340
22329
  })
22341
22330
  ] });
22342
22331
  })() })
@@ -23165,18 +23154,18 @@ function FieldEditor({
23165
23154
  });
23166
23155
  const innerWidth = Math.max(1, width - 2);
23167
23156
  if (parseErr) {
23168
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
23169
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
23170
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
23171
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
23157
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.error, children: [
23158
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.error, children: "FIELD EDITOR \u2014 parse error" }),
23159
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: parseErr }),
23160
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Cannot display structured editor. Fix the JSON first." })
23172
23161
  ] });
23173
23162
  }
23174
23163
  if (props.length === 0 && slots.length === 0) {
23175
- return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
23176
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
23177
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23178
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
23179
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
23164
+ return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.warning, children: [
23165
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.warning, children: "FIELD EDITOR \u2014 no fields" }),
23166
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
23167
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "You can add fields manually below or reject this component." }),
23168
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Enter to save \xB7 Esc to discard" })
23180
23169
  ] });
23181
23170
  }
23182
23171
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
@@ -23305,7 +23294,7 @@ function FieldEditor({
23305
23294
  const renderRow = (row, index) => {
23306
23295
  const key = rowKey(row, index);
23307
23296
  if (row.kind === "header") {
23308
- return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
23297
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.success, children: row.label }) }, key);
23309
23298
  }
23310
23299
  if (row.kind === "component-description") {
23311
23300
  const isSelected2 = inComponentDesc && active;
@@ -23387,9 +23376,9 @@ function FieldEditor({
23387
23376
  ...fixedHeight ? { height } : { minHeight: height },
23388
23377
  clipOverflow: fixedHeight,
23389
23378
  borderStyle: "single",
23390
- borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
23379
+ borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
23391
23380
  children: [
23392
- 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." }),
23381
+ 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." }),
23393
23382
  header,
23394
23383
  /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
23395
23384
  PropRow,
@@ -23440,7 +23429,7 @@ function FieldEditor({
23440
23429
  `visible-${key}`
23441
23430
  );
23442
23431
  }) }),
23443
- categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
23432
+ categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
23444
23433
  sourceOpen && !onToggleSourceExternal && (() => {
23445
23434
  const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
23446
23435
  const start = propMeta?.sourceStartLine ?? null;
@@ -23450,20 +23439,20 @@ function FieldEditor({
23450
23439
  const headerPath = path5 ?? "<unknown source path>";
23451
23440
  if (!start || !end2 || !src) {
23452
23441
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23453
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
23454
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
23442
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `source: ${headerPath}` }),
23443
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no source location captured for this prop)" }),
23455
23444
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
23456
23445
  ] });
23457
23446
  }
23458
23447
  const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
23459
23448
  return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
23460
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23461
- lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
23449
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
23450
+ lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: ln }, `source-line-${i}`)),
23462
23451
  /* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
23463
23452
  ] });
23464
23453
  })(),
23465
- showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
23466
- /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
23454
+ showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.info, paddingX: 1, children: [
23455
+ /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.info, children: "Keybindings" }),
23467
23456
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
23468
23457
  /* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
23469
23458
  /* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
@@ -23488,10 +23477,10 @@ function FieldEditor({
23488
23477
  /* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
23489
23478
  /* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
23490
23479
  /* @__PURE__ */ jsx27(Text23, { children: " " }),
23491
- /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
23480
+ /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
23492
23481
  ] }),
23493
- validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
23494
- /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
23482
+ validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: "\u2717 " + validationError }),
23483
+ /* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: modeLabel }) })
23495
23484
  ]
23496
23485
  }
23497
23486
  );
@@ -23543,16 +23532,16 @@ function RationaleLine({ line, active }) {
23543
23532
  return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
23544
23533
  }
23545
23534
  if (line.kind === "heading") {
23546
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
23535
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
23547
23536
  }
23548
23537
  if (line.kind === "label") {
23549
23538
  return /* @__PURE__ */ jsxs23(Box22, { children: [
23550
23539
  line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
23551
- /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
23552
- line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
23540
+ /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE3.muted, children: line.text }),
23541
+ line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE3.muted, children: line.suffix })
23553
23542
  ] });
23554
23543
  }
23555
- return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
23544
+ return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
23556
23545
  }
23557
23546
 
23558
23547
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
@@ -23631,9 +23620,9 @@ function ComponentRationalePanel({
23631
23620
  width,
23632
23621
  height: height + 2,
23633
23622
  borderStyle: "single",
23634
- borderColor: active ? PALETTE.text : void 0,
23623
+ borderColor: active ? PALETTE3.inverse : void 0,
23635
23624
  children: [
23636
- /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
23625
+ /* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
23637
23626
  visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
23638
23627
  /* @__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" }) })
23639
23628
  ]
@@ -23648,7 +23637,7 @@ import { Box as Box25 } from "ink";
23648
23637
  import { Text as Text26 } from "ink";
23649
23638
  import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
23650
23639
  function HighlightedLine({ parts }) {
23651
- return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
23640
+ return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE3.muted : part.color, children: part.text }, i)) });
23652
23641
  }
23653
23642
 
23654
23643
  // packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
@@ -23668,10 +23657,10 @@ function ScrollablePanel({
23668
23657
  const overflowed = totalLines > height;
23669
23658
  return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
23670
23659
  /* @__PURE__ */ jsxs25(Box24, { children: [
23671
- /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
23660
+ /* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
23672
23661
  overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
23673
23662
  /* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
23674
- /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23663
+ /* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
23675
23664
  ] })
23676
23665
  ] }),
23677
23666
  children
@@ -23757,7 +23746,7 @@ function renderRationaleLines(rows, innerWidth) {
23757
23746
  out.push({
23758
23747
  kind: "label",
23759
23748
  text: row.name,
23760
- color: PALETTE.accent,
23749
+ color: PALETTE3.info,
23761
23750
  suffix: row.kind === "slot" ? " (slot)" : void 0
23762
23751
  });
23763
23752
  for (const line of wrapText(row.rationale, innerWidth)) {
@@ -23793,7 +23782,7 @@ function RationalePanel({
23793
23782
  totalLines,
23794
23783
  visibleStart,
23795
23784
  visibleEnd,
23796
- borderColor: active ? PALETTE.text : void 0,
23785
+ borderColor: active ? PALETTE3.inverse : void 0,
23797
23786
  children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
23798
23787
  }
23799
23788
  );
@@ -23828,29 +23817,21 @@ function TokenReviewPanel({
23828
23817
  width,
23829
23818
  height: height + 2,
23830
23819
  borderStyle: "single",
23831
- borderColor: active ? PALETTE.text : void 0,
23820
+ borderColor: active ? PALETTE3.inverse : void 0,
23832
23821
  children: [
23833
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23834
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23822
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
23823
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
23835
23824
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
23836
- current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
23825
+ current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
23837
23826
  visiblePaths.map((path5, i) => {
23838
23827
  const pathIndex = scrollStart + i;
23839
23828
  const checked = editSelection.has(path5);
23840
23829
  const focused = pathIndex === editCursor;
23841
- return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
23842
- Text28,
23843
- {
23844
- color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
23845
- bold: focused,
23846
- wrap: "truncate",
23847
- children: ` [${checked ? "x" : " "}] ${path5}`
23848
- }
23849
- ) }, path5);
23830
+ 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);
23850
23831
  }),
23851
23832
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
23852
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23853
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23833
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
23834
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
23854
23835
  ]
23855
23836
  }
23856
23837
  );
@@ -23862,16 +23843,16 @@ function TokenReviewPanel({
23862
23843
  width,
23863
23844
  height: height + 2,
23864
23845
  borderStyle: "single",
23865
- borderColor: active ? PALETTE.text : void 0,
23846
+ borderColor: active ? PALETTE3.inverse : void 0,
23866
23847
  children: [
23867
- /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23868
- suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
23848
+ /* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
23849
+ suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no token suggestions for this component)" }),
23869
23850
  suggestions.map((s, i) => {
23870
23851
  const focused = i === selectedRow;
23871
23852
  return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
23872
- /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23873
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
23874
- /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
23853
+ /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
23854
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
23855
+ /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` allowed: ${s.allowed.join(", ")}` })
23875
23856
  ] }, s.propName);
23876
23857
  }),
23877
23858
  /* @__PURE__ */ jsx34(Text28, { children: " " }),
@@ -23956,9 +23937,9 @@ function ReviewDetailsPanel({
23956
23937
  const sourceLineCount = Math.max(1, height - 4);
23957
23938
  const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
23958
23939
  return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
23959
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
23960
- 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)" }),
23961
- /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
23940
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
23941
+ 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)" }),
23942
+ /* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: "[s/Esc] close" })
23962
23943
  ] });
23963
23944
  }
23964
23945
  if (panelOpen === "token-review") {
@@ -24108,17 +24089,17 @@ function ReviewEmptyComponentsWarning({
24108
24089
  hidden
24109
24090
  }) {
24110
24091
  if (hidden || count === 0) return null;
24111
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24092
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
24112
24093
  }
24113
24094
  function ReviewNoSelection() {
24114
- return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
24095
+ return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
24115
24096
  }
24116
24097
  function ReviewFinalizeError({
24117
24098
  message,
24118
24099
  hidden
24119
24100
  }) {
24120
24101
  if (hidden || !message) return null;
24121
- return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
24102
+ return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
24122
24103
  }
24123
24104
  function ReviewPanelFooter({
24124
24105
  reviewEditor,
@@ -24142,7 +24123,7 @@ function ReviewComponentTitle({
24142
24123
  return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
24143
24124
  /* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
24144
24125
  /* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
24145
- /* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
24126
+ /* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
24146
24127
  propCount,
24147
24128
  " prop",
24148
24129
  propCount !== 1 ? "s" : "",
@@ -24198,8 +24179,8 @@ function ReviewComponentPanel({
24198
24179
  )
24199
24180
  }
24200
24181
  ) }),
24201
- /* @__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 : " " }) }),
24202
- /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
24182
+ /* @__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 : " " }) }),
24183
+ /* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
24203
24184
  ReviewPanelFooter,
24204
24185
  {
24205
24186
  reviewEditor,
@@ -24227,11 +24208,11 @@ function countReviewStatuses(entries) {
24227
24208
  );
24228
24209
  }
24229
24210
  function ReviewLoadingState() {
24230
- return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
24211
+ return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
24231
24212
  }
24232
24213
  function ReviewLoadError({ message }) {
24233
24214
  return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
24234
- /* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
24215
+ /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
24235
24216
  /* @__PURE__ */ jsx38(Text31, { children: " " }),
24236
24217
  /* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
24237
24218
  ] });
@@ -24467,41 +24448,41 @@ function FinalizeDialog({
24467
24448
  /* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
24468
24449
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
24469
24450
  /* @__PURE__ */ jsxs30(Text32, { children: [
24470
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
24451
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
24471
24452
  accepted,
24472
24453
  " accepted"
24473
24454
  ] }),
24474
24455
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
24475
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
24456
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
24476
24457
  rejected,
24477
24458
  " rejected"
24478
24459
  ] }),
24479
24460
  /* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
24480
- /* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
24461
+ /* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
24481
24462
  needsReview,
24482
24463
  " unresolved"
24483
24464
  ] })
24484
24465
  ] }),
24485
24466
  /* @__PURE__ */ jsx39(Text32, { children: " " }),
24486
24467
  noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24487
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24488
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24468
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
24469
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
24489
24470
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24490
24471
  ] }),
24491
24472
  !allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24492
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24493
- /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
24473
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
24474
+ /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Only explicitly accepted components ship." }),
24494
24475
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24495
24476
  ] }),
24496
24477
  /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
24497
- 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: " " }),
24478
+ 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: " " }),
24498
24479
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24499
24480
  ] }),
24500
24481
  previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
24501
- /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
24502
- hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
24503
- windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
24504
- hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
24482
+ /* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removed.length, false) }),
24483
+ hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2191 more above" }),
24484
+ windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.error, children: removedComponentLine(rc) }, rc.id)),
24485
+ hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2193 more below" }),
24505
24486
  removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
24506
24487
  /* @__PURE__ */ jsx39(Text32, { children: " " })
24507
24488
  ] }),
@@ -24995,8 +24976,8 @@ function ReviewStepDialogs({
24995
24976
  }
24996
24977
  function ReviewReloadDialog({ open }) {
24997
24978
  if (!open) return null;
24998
- return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
24999
- /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
24979
+ return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
24980
+ /* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE3.warning, children: "Reload from saved state?" }),
25000
24981
  /* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
25001
24982
  /* @__PURE__ */ jsx41(Text34, { children: " " }),
25002
24983
  /* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
@@ -25382,19 +25363,19 @@ function LivePreviewSummary({
25382
25363
  const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
25383
25364
  for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
25384
25365
  const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
25385
- if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
25386
- if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
25366
+ if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: "Preview: disabled (creds rejected)" });
25367
+ if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `Preview: ${spinner} running...` });
25387
25368
  if (!hasCounts) return null;
25388
25369
  return /* @__PURE__ */ jsxs33(Box32, { children: [
25389
25370
  /* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
25390
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
25371
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
25391
25372
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25392
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
25373
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
25393
25374
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25394
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
25375
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
25395
25376
  showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
25396
25377
  /* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
25397
- /* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
25378
+ /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
25398
25379
  ] });
25399
25380
  }
25400
25381
 
@@ -25440,10 +25421,10 @@ function CyclePathLine({
25440
25421
  highlightComponents = false,
25441
25422
  highlightLine = false
25442
25423
  }) {
25443
- return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
25424
+ return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
25444
25425
  prefix,
25445
25426
  segments.map(
25446
- (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)
25427
+ (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)
25447
25428
  )
25448
25429
  ] });
25449
25430
  }
@@ -25455,9 +25436,9 @@ function CycleDetailPanel({
25455
25436
  height
25456
25437
  }) {
25457
25438
  const lines = [
25458
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25459
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
25460
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25439
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
25440
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
25441
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
25461
25442
  /* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
25462
25443
  ];
25463
25444
  cycles.forEach((cycle, index) => {
@@ -25469,7 +25450,7 @@ function CycleDetailPanel({
25469
25450
  );
25470
25451
  if (cycle.suggestedBreak) {
25471
25452
  lines.push(
25472
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25453
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
25473
25454
  );
25474
25455
  }
25475
25456
  lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
@@ -25477,9 +25458,9 @@ function CycleDetailPanel({
25477
25458
  const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
25478
25459
  const viewportHeight = Math.max(1, height - 3);
25479
25460
  const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
25480
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25461
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
25481
25462
  visible,
25482
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
25463
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
25483
25464
  ] });
25484
25465
  }
25485
25466
  function BreakCyclePanel({
@@ -25490,14 +25471,14 @@ function BreakCyclePanel({
25490
25471
  width,
25491
25472
  height
25492
25473
  }) {
25493
- return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
25494
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25474
+ return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
25475
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
25495
25476
  cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
25496
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25477
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
25497
25478
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
25498
- edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
25479
+ edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
25499
25480
  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}`)),
25500
- 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" })
25481
+ 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" })
25501
25482
  ] });
25502
25483
  }
25503
25484
  var HELP_SECTIONS2 = [
@@ -25603,7 +25584,7 @@ function deriveBreakingChanges(response) {
25603
25584
  }
25604
25585
  function GenerateReviewStep(props) {
25605
25586
  if (!props.extractSessionId) {
25606
- 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." }) });
25587
+ 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." }) });
25607
25588
  }
25608
25589
  return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
25609
25590
  }
@@ -26520,8 +26501,8 @@ function GenerateReviewStepView({
26520
26501
  }
26521
26502
  ),
26522
26503
  /* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
26523
- removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
26524
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
26504
+ removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.error, paddingX: 1, children: [
26505
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removedComponents.length, true) }),
26525
26506
  !removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
26526
26507
  /* @__PURE__ */ jsx43(Text36, { children: " " }),
26527
26508
  removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
@@ -26530,7 +26511,7 @@ function GenerateReviewStepView({
26530
26511
  breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
26531
26512
  Text36,
26532
26513
  {
26533
- color: PALETTE.warning,
26514
+ color: PALETTE3.warning,
26534
26515
  children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
26535
26516
  }
26536
26517
  ) }),
@@ -26538,10 +26519,10 @@ function GenerateReviewStepView({
26538
26519
  const row = breakingRows[breakingCursor];
26539
26520
  const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
26540
26521
  if (!comp) return null;
26541
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
26542
- /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26543
- 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"}` }),
26544
- 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}`)),
26522
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
26523
+ /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
26524
+ 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"}` }),
26525
+ 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}`)),
26545
26526
  /* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
26546
26527
  ] });
26547
26528
  })(),
@@ -26564,11 +26545,11 @@ function GenerateReviewStepView({
26564
26545
  const participantSet = cycleView.structural;
26565
26546
  const members = stillRejected.filter((n) => participantSet.has(n)).sort();
26566
26547
  const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
26567
- return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
26568
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26569
- members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
26570
- ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26571
- /* @__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" })
26548
+ return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE3.error, paddingX: 1, children: [
26549
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
26550
+ members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Cycle members: ${members.join(", ")}` }),
26551
+ ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
26552
+ /* @__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" })
26572
26553
  ] });
26573
26554
  })(),
26574
26555
  /* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
@@ -26684,7 +26665,7 @@ function GenerateReviewStepView({
26684
26665
  ) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
26685
26666
  ] }),
26686
26667
  !dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
26687
- /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26668
+ /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
26688
26669
  cycleRows.slice(0, 3).map((cycle, idx) => {
26689
26670
  return /* @__PURE__ */ jsx43(
26690
26671
  CyclePathLine,
@@ -26697,7 +26678,7 @@ function GenerateReviewStepView({
26697
26678
  `cyc-banner-${idx}`
26698
26679
  );
26699
26680
  }),
26700
- cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
26681
+ cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
26701
26682
  /* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
26702
26683
  ] }),
26703
26684
  /* @__PURE__ */ jsx43(
@@ -26720,8 +26701,8 @@ import { Box as Box34, Text as Text37 } from "ink";
26720
26701
 
26721
26702
  // packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
26722
26703
  import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
26723
- var PALETTE3 = {
26724
- ...PALETTE,
26704
+ var PALETTE4 = {
26705
+ ...PALETTE3,
26725
26706
  link: "#58A6FF"
26726
26707
  };
26727
26708
  var INK_UI_THEME = extendTheme2(defaultTheme2, {
@@ -26729,7 +26710,7 @@ var INK_UI_THEME = extendTheme2(defaultTheme2, {
26729
26710
  ProgressBar: {
26730
26711
  styles: {
26731
26712
  completed: () => ({
26732
- color: PALETTE3.accent
26713
+ color: "blue"
26733
26714
  })
26734
26715
  }
26735
26716
  }
@@ -26740,13 +26721,13 @@ var INK_UI_THEME = extendTheme2(defaultTheme2, {
26740
26721
  import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
26741
26722
  function CustomPromptBanner({ generatePromptPath }) {
26742
26723
  if (!generatePromptPath) return null;
26743
- return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
26744
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, bold: true, children: "WARNING: Custom prompt active" }),
26745
- generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE3.warning, children: [
26724
+ return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE4.warning, paddingX: 1, children: [
26725
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, bold: true, children: "WARNING: Custom prompt active" }),
26726
+ generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE4.warning, children: [
26746
26727
  "components: ",
26747
26728
  generatePromptPath
26748
26729
  ] }) : null,
26749
- /* @__PURE__ */ jsx44(Text37, { color: PALETTE3.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
26730
+ /* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
26750
26731
  ] });
26751
26732
  }
26752
26733
 
@@ -26771,10 +26752,10 @@ import { Box as Box35, Text as Text38 } from "ink";
26771
26752
  import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
26772
26753
  function SpaceEnvironment({ spaceId, environmentId }) {
26773
26754
  return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
26774
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Space:" }),
26755
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
26775
26756
  /* @__PURE__ */ jsx45(Text38, { children: spaceId }),
26776
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "/" }),
26777
- /* @__PURE__ */ jsx45(Text38, { color: PALETTE3.muted, children: "Environment:" }),
26757
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
26758
+ /* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
26778
26759
  /* @__PURE__ */ jsx45(Text38, { children: environmentId })
26779
26760
  ] });
26780
26761
  }
@@ -26786,13 +26767,13 @@ function EntityRows({ entity, label }) {
26786
26767
  const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
26787
26768
  return /* @__PURE__ */ jsxs37(Fragment14, { children: [
26788
26769
  ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
26789
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "\u2713" }),
26770
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
26790
26771
  " ",
26791
26772
  plural3(entity[action]),
26792
26773
  " ",
26793
26774
  action
26794
26775
  ] }, action)),
26795
- entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
26776
+ entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26796
26777
  "\u2717 ",
26797
26778
  plural3(entity.failed),
26798
26779
  " failed \u2014 check logs above"
@@ -26801,8 +26782,8 @@ function EntityRows({ entity, label }) {
26801
26782
  }
26802
26783
  function LinkRow({ title, url }) {
26803
26784
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26804
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.muted, children: title }),
26805
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.link, children: url })
26785
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: title }),
26786
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.link, children: url })
26806
26787
  ] });
26807
26788
  }
26808
26789
  function DoneStep({
@@ -26825,17 +26806,17 @@ function DoneStep({
26825
26806
  const success = totalFailed === 0;
26826
26807
  const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
26827
26808
  return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
26828
- success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.warning, children: "\u26A0 Finished with errors" }),
26829
- 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: [
26809
+ success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.warning, children: "\u26A0 Finished with errors" }),
26810
+ 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: [
26830
26811
  /* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
26831
26812
  /* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
26832
- summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.muted, children: [
26813
+ summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
26833
26814
  "Push result: ",
26834
26815
  summary.succeeded,
26835
26816
  "/",
26836
26817
  summary.total,
26837
26818
  " succeeded",
26838
- summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
26819
+ summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26839
26820
  ", ",
26840
26821
  summary.failed,
26841
26822
  " failed"
@@ -26843,8 +26824,8 @@ function DoneStep({
26843
26824
  ] }) })
26844
26825
  ] }),
26845
26826
  failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
26846
- /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE3.error, children: "Failure details" }),
26847
- failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE3.error, children: [
26827
+ /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.error, children: "Failure details" }),
26828
+ failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
26848
26829
  failure.entityType,
26849
26830
  " ",
26850
26831
  failure.entityId,
@@ -26854,7 +26835,7 @@ function DoneStep({
26854
26835
  ] }),
26855
26836
  /* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
26856
26837
  success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
26857
- /* @__PURE__ */ jsx46(Text39, { color: PALETTE3.success, children: "Your design system is now in Contentful Experiences." }),
26838
+ /* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "Your design system is now in Contentful Experiences." }),
26858
26839
  /* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
26859
26840
  /* @__PURE__ */ jsx46(
26860
26841
  LinkRow,
@@ -26968,7 +26949,7 @@ function PathPrompt({
26968
26949
  label,
26969
26950
  ":"
26970
26951
  ] }),
26971
- /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE3.muted : void 0, children: shown }),
26952
+ /* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
26972
26953
  /* @__PURE__ */ jsx47(Text40, { children: cursor })
26973
26954
  ] }),
26974
26955
  /* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
@@ -27034,12 +27015,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
27034
27015
  /* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
27035
27016
  /* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
27036
27017
  operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
27037
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Operation:" }),
27018
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
27038
27019
  /* @__PURE__ */ jsx50(Text42, { children: operationId })
27039
27020
  ] }),
27040
27021
  showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
27041
27022
  /* @__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) }) }) }),
27042
- /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
27023
+ /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
27043
27024
  progress.processed,
27044
27025
  "/",
27045
27026
  progress.total,
@@ -27047,10 +27028,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
27047
27028
  ] })
27048
27029
  ] }) }),
27049
27030
  showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
27050
- /* @__PURE__ */ jsx50(Text42, { color: PALETTE3.muted, children: "Now processing:" }),
27031
+ /* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
27051
27032
  /* @__PURE__ */ jsx50(Text42, { children: showCurrent })
27052
27033
  ] }),
27053
- /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE3.muted, children: [
27034
+ /* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
27054
27035
  "Elapsed: ",
27055
27036
  elapsed
27056
27037
  ] }) })
@@ -27240,25 +27221,25 @@ function buildPreviewSummaryLines(preview) {
27240
27221
  if (components.new.length > 0) {
27241
27222
  lines.push({
27242
27223
  key: "summary-components-new",
27243
- color: PALETTE3.success,
27224
+ color: PALETTE4.success,
27244
27225
  text: ` \uFF0B ${components.new.length} components will be created`
27245
27226
  });
27246
27227
  for (const [index, item] of components.new.entries()) {
27247
27228
  const name = item.key ?? item.$name ?? "unknown";
27248
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE3.success, text: ` + ${name}` });
27229
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
27249
27230
  }
27250
27231
  }
27251
27232
  if (components.changed.length > 0) {
27252
27233
  lines.push({
27253
27234
  key: "summary-components-changed",
27254
- color: PALETTE3.warning,
27235
+ color: PALETTE4.warning,
27255
27236
  text: ` \uFF5E ${components.changed.length} components will be updated`
27256
27237
  });
27257
27238
  for (const [index, item] of components.changed.entries()) {
27258
27239
  const isBreaking = item.changeClassification?.classification === "breaking";
27259
27240
  lines.push({
27260
27241
  key: `summary-components-changed-${index}`,
27261
- color: isBreaking ? PALETTE3.error : PALETTE3.warning,
27242
+ color: isBreaking ? PALETTE4.error : PALETTE4.warning,
27262
27243
  text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
27263
27244
  });
27264
27245
  }
@@ -27266,11 +27247,11 @@ function buildPreviewSummaryLines(preview) {
27266
27247
  if (components.removed.length > 0) {
27267
27248
  lines.push({
27268
27249
  key: "summary-components-removed",
27269
- color: PALETTE3.warning,
27250
+ color: PALETTE4.warning,
27270
27251
  text: ` \u2298 ${components.removed.length} components will be skipped`
27271
27252
  });
27272
27253
  for (const [index, item] of components.removed.entries()) {
27273
- lines.push({ key: `summary-components-removed-${index}`, color: PALETTE3.warning, text: ` \u2298 ${item.name}` });
27254
+ lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
27274
27255
  }
27275
27256
  }
27276
27257
  if (components.unchanged.length > 0) {
@@ -27283,21 +27264,21 @@ function buildPreviewSummaryLines(preview) {
27283
27264
  if (tokens.new.length > 0) {
27284
27265
  lines.push({
27285
27266
  key: "summary-tokens-new",
27286
- color: PALETTE3.success,
27267
+ color: PALETTE4.success,
27287
27268
  text: ` \uFF0B ${tokens.new.length} design tokens will be created`
27288
27269
  });
27289
27270
  }
27290
27271
  if (tokens.changed.length > 0) {
27291
27272
  lines.push({
27292
27273
  key: "summary-tokens-changed",
27293
- color: PALETTE3.warning,
27274
+ color: PALETTE4.warning,
27294
27275
  text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
27295
27276
  });
27296
27277
  }
27297
27278
  if (tokens.removed.length > 0) {
27298
27279
  lines.push({
27299
27280
  key: "summary-tokens-removed",
27300
- color: PALETTE3.warning,
27281
+ color: PALETTE4.warning,
27301
27282
  text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
27302
27283
  });
27303
27284
  }
@@ -27341,12 +27322,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
27341
27322
  function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
27342
27323
  lines.push({
27343
27324
  key: `${keyPrefix}-h-${name}`,
27344
- color: PALETTE3.warning,
27325
+ color: PALETTE4.warning,
27345
27326
  text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
27346
27327
  });
27347
27328
  if (changeClassification?.classification !== "breaking") return;
27348
27329
  const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
27349
- lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE3.error, text: ` \u26A0 BREAKING: ${reasons}` });
27330
+ lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE4.error, text: ` \u26A0 BREAKING: ${reasons}` });
27350
27331
  }
27351
27332
  function buildPreviewDiffLines(preview) {
27352
27333
  const lines = [];
@@ -27354,12 +27335,12 @@ function buildPreviewDiffLines(preview) {
27354
27335
  for (const item of components.new) {
27355
27336
  const raw = item;
27356
27337
  const name = raw.key ?? raw.$name ?? "unknown";
27357
- lines.push({ key: `comp-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
27338
+ lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
27358
27339
  const slots = raw.$slots ?? {};
27359
27340
  for (const slotName of Object.keys(slots).sort()) {
27360
27341
  lines.push({
27361
27342
  key: `comp-new-${name}-slot-${slotName}`,
27362
- color: PALETTE3.success,
27343
+ color: PALETTE4.success,
27363
27344
  text: ` slot: ${slotName}`
27364
27345
  });
27365
27346
  const allowed = slots[slotName]?.["$allowedComponents"];
@@ -27367,14 +27348,14 @@ function buildPreviewDiffLines(preview) {
27367
27348
  const names = allowed.filter((n) => typeof n === "string");
27368
27349
  lines.push({
27369
27350
  key: `comp-new-${name}-slot-${slotName}-allow`,
27370
- color: PALETTE3.success,
27351
+ color: PALETTE4.success,
27371
27352
  text: ` allowedComponents: [${names.join(", ")}]`
27372
27353
  });
27373
27354
  }
27374
27355
  }
27375
27356
  }
27376
27357
  for (const item of components.removed) {
27377
- lines.push({ key: `comp-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
27358
+ lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
27378
27359
  }
27379
27360
  for (const item of components.changed) {
27380
27361
  appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
@@ -27405,10 +27386,10 @@ function buildPreviewDiffLines(preview) {
27405
27386
  for (const item of tokens.new) {
27406
27387
  const raw = item;
27407
27388
  const name = raw.name ?? raw.path ?? "unknown";
27408
- lines.push({ key: `tok-new-${name}`, color: PALETTE3.success, text: ` + ${name}` });
27389
+ lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
27409
27390
  }
27410
27391
  for (const item of tokens.removed) {
27411
- lines.push({ key: `tok-rm-${item.name}`, color: PALETTE3.error, text: ` - ${item.name}` });
27392
+ lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
27412
27393
  }
27413
27394
  for (const item of tokens.changed) {
27414
27395
  const tokenName = item.current.name;
@@ -27499,13 +27480,13 @@ function WizardPreviewStep({
27499
27480
  title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
27500
27481
  focused: false,
27501
27482
  children: [
27502
- 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)),
27503
- /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
27483
+ 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)),
27484
+ /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
27504
27485
  ]
27505
27486
  }
27506
27487
  )
27507
- ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE3.muted, children: "Nothing to push \u2014 everything is already up to date." }),
27508
- 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." }) }),
27488
+ ] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, children: "Nothing to push \u2014 everything is already up to date." }),
27489
+ 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." }) }),
27509
27490
  /* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
27510
27491
  /* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
27511
27492
  /* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
@@ -28051,7 +28032,7 @@ var realSaveDeps = () => ({
28051
28032
  writeFile: (path5, contents) => writeFile7(path5, contents),
28052
28033
  appendRun,
28053
28034
  buildSourceFingerprint,
28054
- sleep: (ms) => new Promise((resolve27) => setTimeout(resolve27, ms)),
28035
+ sleep: (ms) => new Promise((resolve28) => setTimeout(resolve28, ms)),
28055
28036
  warn: (message) => process.stderr.write(message)
28056
28037
  });
28057
28038
  async function runPrintFiles(input, deps, onPatch) {
@@ -28441,12 +28422,44 @@ init_config();
28441
28422
  init_debug_store();
28442
28423
  init_debug_mode_store();
28443
28424
  init_version();
28425
+
28426
+ // packages/experience-design-system-cli/src/tui/help/file-locations.ts
28427
+ import { join as join25, resolve as resolve27 } from "node:path";
28428
+ function describeFileLocations({
28429
+ contentfulBaseDir,
28430
+ debugModeEnabled,
28431
+ currentSessionDir: currentSessionDir2
28432
+ }) {
28433
+ if (!debugModeEnabled) {
28434
+ return {
28435
+ debugLogs: "none while Debug Mode is off",
28436
+ importFiles: `${join25("<project>", ".contentful")}/ (tokens.json, components.json)`
28437
+ };
28438
+ }
28439
+ const base = contentfulBaseDir ? resolve27(contentfulBaseDir) : "<project>";
28440
+ const session = currentSessionDir2 ?? join25(base, ".contentful", "<date>-session-<n>");
28441
+ return {
28442
+ debugLogs: join25(session, "debug"),
28443
+ importFiles: `${join25(session, "dsi-import-<n>")}/ (tokens.json, components.json)`
28444
+ };
28445
+ }
28446
+
28447
+ // packages/experience-design-system-cli/src/tui/help/help-info.ts
28444
28448
  async function readHelpInfo() {
28445
- const debugMode = await readDebugModeSetting();
28449
+ const [debugMode, settings] = await Promise.all([readDebugModeSetting(), readSettings2()]);
28450
+ const base = settings["contentfulBaseDir"];
28451
+ const locations = describeFileLocations({
28452
+ contentfulBaseDir: typeof base === "string" ? base : "",
28453
+ debugModeEnabled: debugMode.enabled,
28454
+ currentSessionDir: currentSessionDir()
28455
+ });
28446
28456
  return {
28447
28457
  storage: [
28448
28458
  { label: "Config folder", value: configRoot2() },
28449
- { label: "Settings file", value: configFilePath2() }
28459
+ { label: "Settings file", value: configFilePath2() },
28460
+ { label: "Agent settings", value: `${configFilePath2()} (keys: agent, agentModel, agents)` },
28461
+ { label: "Debug logs", value: locations.debugLogs },
28462
+ { label: "Import files", value: locations.importFiles }
28450
28463
  ],
28451
28464
  troubleshooting: [
28452
28465
  { label: "CLI version", value: readPackageVersion() },
@@ -28467,7 +28480,7 @@ function Section({ title, rows }) {
28467
28480
  return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
28468
28481
  /* @__PURE__ */ jsx53(Text44, { bold: true, color: PALETTE.accent, children: title }),
28469
28482
  rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
28470
- /* @__PURE__ */ jsx53(Box42, { width: 14, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
28483
+ /* @__PURE__ */ jsx53(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: row.label }) }),
28471
28484
  /* @__PURE__ */ jsx53(Text44, { children: row.value })
28472
28485
  ] }, row.label))
28473
28486
  ] });
@@ -28567,200 +28580,725 @@ function SettingsScreen({
28567
28580
  }
28568
28581
 
28569
28582
  // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
28570
- import { useEffect as useEffect22, useState as useState29 } from "react";
28571
- import { Box as Box44, Text as Text46, useInput as useInput11 } from "ink";
28572
- import TextInput4 from "ink-text-input";
28583
+ import { useState as useState33 } from "react";
28584
+ import { Box as Box48, Text as Text51, useInput as useInput14 } from "ink";
28585
+
28586
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
28587
+ import { useEffect as useEffect23, useState as useState30 } from "react";
28588
+ import { Box as Box45, Text as Text48, useInput as useInput12 } from "ink";
28589
+ init_debug_store();
28573
28590
 
28574
28591
  // packages/experience-design-system-cli/src/tui/settings/utils/v1-store.ts
28575
28592
  init_config();
28576
28593
  var readV1Store = readSettings2;
28577
28594
  var writeV1Store = writeSettings2;
28578
28595
 
28579
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
28580
- async function readCredentials() {
28596
+ // packages/experience-design-system-cli/src/tui/settings/agents/agent-store.ts
28597
+ var DEFAULT_AGENT3 = "claude";
28598
+ var AGENT_LABELS = {
28599
+ claude: "Claude Code",
28600
+ codex: "OpenAI Codex",
28601
+ opencode: "OpenCode",
28602
+ cursor: "Cursor",
28603
+ copilot: "GitHub Copilot"
28604
+ };
28605
+ var AGENT_HINTS = {
28606
+ claude: "claude",
28607
+ codex: "codex",
28608
+ opencode: "opencode",
28609
+ cursor: "cursor-agent",
28610
+ copilot: "copilot"
28611
+ };
28612
+ var asString = (value) => typeof value === "string" ? value : "";
28613
+ function emptyAgents() {
28614
+ return Object.fromEntries(AGENT_NAMES.map((name) => [name, { model: "", binary: "" }]));
28615
+ }
28616
+ async function readAgentConfig() {
28581
28617
  const store = await readV1Store();
28582
- return {
28583
- spaceId: store.spaceId || "",
28584
- environmentId: store.environmentId || "",
28585
- cmaToken: store.cmaToken || "",
28586
- host: store.host || "",
28587
- defaultComponentDir: store.defaultComponentDir || "",
28588
- defaultTokenFile: store.defaultTokenFile || "",
28589
- contentfulBaseDir: store.contentfulBaseDir || ""
28590
- };
28618
+ const stored = asString(store["agent"]);
28619
+ const defaultAgent = isAgentName(stored) ? stored : DEFAULT_AGENT3;
28620
+ const agents = emptyAgents();
28621
+ const saved = store["agents"];
28622
+ if (saved && typeof saved === "object") {
28623
+ for (const name of AGENT_NAMES) {
28624
+ const entry = saved[name];
28625
+ if (entry && typeof entry === "object") {
28626
+ const fields = entry;
28627
+ agents[name] = { model: asString(fields["model"]), binary: asString(fields["binary"]) };
28628
+ }
28629
+ }
28630
+ }
28631
+ const legacyModel = asString(store["agentModel"]);
28632
+ if (legacyModel && !agents[defaultAgent].model)
28633
+ agents[defaultAgent] = { ...agents[defaultAgent], model: legacyModel };
28634
+ return { defaultAgent, agents };
28591
28635
  }
28592
- async function writeCredentials(config) {
28636
+ async function writeAgentConfig(config) {
28593
28637
  const existing = await readV1Store();
28594
- const merged = {
28595
- ...existing,
28596
- ...config
28597
- };
28598
- Object.keys(merged).forEach((k) => {
28599
- if (!merged[k]) delete merged[k];
28600
- });
28638
+ const merged = { ...existing };
28639
+ const agents = {};
28640
+ for (const name of AGENT_NAMES) {
28641
+ const model = config.agents[name].model.trim();
28642
+ const binary = config.agents[name].binary.trim();
28643
+ if (model || binary) agents[name] = { ...model ? { model } : {}, ...binary ? { binary } : {} };
28644
+ }
28645
+ merged["agent"] = config.defaultAgent;
28646
+ const defaultModel = agents[config.defaultAgent]?.model;
28647
+ if (defaultModel) merged["agentModel"] = defaultModel;
28648
+ else delete merged["agentModel"];
28649
+ if (Object.keys(agents).length > 0) merged["agents"] = agents;
28650
+ else delete merged["agents"];
28601
28651
  await writeV1Store(merged);
28602
28652
  }
28603
28653
 
28604
- // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
28605
- init_debug_store();
28606
- import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
28607
- var FIELD_ORDER = [
28608
- "spaceId",
28609
- "environmentId",
28610
- "cmaToken",
28611
- "host",
28612
- "defaultComponentDir",
28613
- "defaultTokenFile",
28614
- "contentfulBaseDir"
28615
- ];
28616
- function debugFields(config) {
28617
- return {
28618
- space_id: config?.spaceId ?? "",
28619
- environment_id: config?.environmentId ?? "",
28620
- cma_token: config?.cmaToken ?? "",
28621
- host: config?.host ?? "",
28622
- default_component_dir: config?.defaultComponentDir ?? "",
28623
- default_token_file: config?.defaultTokenFile ?? "",
28624
- contentful_base_dir: config?.contentfulBaseDir ?? ""
28625
- };
28654
+ // packages/experience-design-system-cli/src/tui/settings/agents/agent-status.ts
28655
+ import { execFile as execFile2 } from "node:child_process";
28656
+ import { access as access6, constants } from "node:fs/promises";
28657
+ var VERSION_TIMEOUT_MS = 5e3;
28658
+ var PROMPT_TIMEOUT_MS = 6e4;
28659
+ var TEST_PROMPT = "Reply with the single word: ok";
28660
+ var INSTALL_HINTS = {
28661
+ claude: "npm install -g @anthropic-ai/claude-code",
28662
+ codex: "npm install -g @openai/codex",
28663
+ opencode: "npm install -g opencode-ai",
28664
+ cursor: "install Cursor\u2019s `cursor-agent` command",
28665
+ copilot: "npm install -g @github/copilot"
28666
+ };
28667
+ var LOGIN_HINTS = {
28668
+ claude: "run `claude login`",
28669
+ codex: "set OPENAI_API_KEY, or sign in with a ChatGPT account",
28670
+ opencode: "run `opencode auth`",
28671
+ cursor: "sign in from Cursor",
28672
+ copilot: "run `copilot` and sign in"
28673
+ };
28674
+ function effectiveBinary(name, savedBinary) {
28675
+ return savedBinary.trim() || AGENT_BINARIES[name];
28676
+ }
28677
+ function defaultModelLabel(name) {
28678
+ const model = DEFAULT_MODELS[name];
28679
+ return model && model !== "Auto" ? model : "chosen by the agent";
28680
+ }
28681
+ var fail3 = (step, detail) => ({ step, ok: false, detail });
28682
+ var pass = (step, detail) => ({ step, ok: true, detail });
28683
+ function resolveOnPath(binary) {
28684
+ if (binary.includes("/")) {
28685
+ return access6(binary, constants.X_OK).then(
28686
+ () => binary,
28687
+ () => null
28688
+ );
28689
+ }
28690
+ return new Promise((resolve28) => {
28691
+ execFile2(
28692
+ process.platform === "win32" ? "where" : "which",
28693
+ [binary],
28694
+ (error, stdout) => resolve28(error ? null : stdout.split("\n")[0]?.trim() ?? null)
28695
+ );
28696
+ });
28626
28697
  }
28627
- var FIELD_LABELS = {
28628
- spaceId: "Space ID",
28629
- environmentId: "Environment ID",
28630
- cmaToken: "CMA Token",
28631
- host: "API Host",
28632
- defaultComponentDir: "Default component directory",
28633
- defaultTokenFile: "Default token file",
28634
- contentfulBaseDir: "Root Project Directory"
28698
+ function readVersion(binary) {
28699
+ return new Promise((resolve28) => {
28700
+ execFile2(binary, ["--version"], { timeout: VERSION_TIMEOUT_MS }, (error, stdout) => {
28701
+ const line = stdout.split("\n")[0]?.trim() ?? "";
28702
+ if (!error && line) resolve28(pass("version", line));
28703
+ else resolve28(fail3("version", "runs, but did not report a version"));
28704
+ });
28705
+ });
28706
+ }
28707
+ async function inspectAgent(name, binary) {
28708
+ const target = effectiveBinary(name, binary);
28709
+ const found = await resolveOnPath(target);
28710
+ if (!found) return [fail3("path", `\`${target}\` was not found or is not executable`)];
28711
+ const checks = [pass("path", found)];
28712
+ checks.push(await readVersion(found));
28713
+ if (name === "claude") {
28714
+ const auth = await withBinaryEnv(name, found, () => checkAgentAuth(name));
28715
+ checks.push(
28716
+ auth === "ok" ? pass("login", "logged in") : fail3("login", auth === "not-found" ? "binary not found" : `not logged in: ${LOGIN_HINTS.claude}`)
28717
+ );
28718
+ }
28719
+ return checks;
28720
+ }
28721
+ async function testAgent(name, binary, model) {
28722
+ const checks = await inspectAgent(name, binary);
28723
+ if (!checks.every((check) => check.step === "version" || check.ok)) return checks;
28724
+ const target = effectiveBinary(name, binary);
28725
+ const found = await resolveOnPath(target) ?? target;
28726
+ const started = Date.now();
28727
+ const result = await withBinaryEnv(
28728
+ name,
28729
+ found,
28730
+ () => createLocalCliAgentInvoker().invoke({
28731
+ agent: name,
28732
+ ...model.trim() ? { model: model.trim() } : {},
28733
+ prompt: TEST_PROMPT,
28734
+ timeoutMs: PROMPT_TIMEOUT_MS
28735
+ })
28736
+ );
28737
+ const seconds = ((Date.now() - started) / 1e3).toFixed(1);
28738
+ if (result.timedOut) return [...checks, fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`)];
28739
+ if (result.exitCode !== 0) {
28740
+ const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
28741
+ return [...checks, fail3("prompt", reason)];
28742
+ }
28743
+ return [...checks, pass("prompt", `answered in ${seconds}s`)];
28744
+ }
28745
+ function statusFromChecks(name, checks, savedBinary) {
28746
+ if (checks.length === 0) return "checking";
28747
+ if (checks.some((check) => check.step === "path" && !check.ok)) {
28748
+ return savedBinary.trim() ? "not-found" : "not-configured";
28749
+ }
28750
+ const login = checks.find((check) => check.step === "login");
28751
+ if (login) return login.ok ? "ready" : "not-logged-in";
28752
+ const prompt = checks.find((check) => check.step === "prompt");
28753
+ if (prompt) return prompt.ok ? "ready" : "not-logged-in";
28754
+ return name === "claude" ? "ready" : "unknown";
28755
+ }
28756
+ function nextStepHint(name, status) {
28757
+ if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set the command path below`;
28758
+ if (status === "not-found") return `${INSTALL_HINTS[name]}, or fix the command path`;
28759
+ if (status === "not-logged-in") return LOGIN_HINTS[name];
28760
+ if (status === "unknown") return "run a full test to confirm it is logged in";
28761
+ return "";
28762
+ }
28763
+ var LIST_STATUS = {
28764
+ checking: { symbol: "\u2026", text: "checking", tone: "muted" },
28765
+ ready: { symbol: "\u25CF", text: "ready", tone: "ok" },
28766
+ "not-configured": { symbol: "\u25CB", text: "not installed", tone: "muted" },
28767
+ "not-found": { symbol: "\u25CB", text: "not installed", tone: "bad" },
28768
+ "not-logged-in": { symbol: "\u25D0", text: "not logged in", tone: "bad" },
28769
+ unknown: { symbol: "\u25D0", text: "installed, login unknown", tone: "muted" }
28635
28770
  };
28636
- var FIELD_HINTS = {
28637
- contentfulBaseDir: "(where .contentful goes)"
28771
+ function modelLine(name, savedModel) {
28772
+ const model = savedModel.trim();
28773
+ return model ? model : `${defaultModelLabel(name)} (built-in default)`;
28774
+ }
28775
+ function panelRows(name, checks, settings) {
28776
+ if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
28777
+ const status = statusFromChecks(name, checks, settings.binary);
28778
+ const path5 = checks.find((check) => check.step === "path");
28779
+ if (!path5?.ok) {
28780
+ const rows2 = [
28781
+ {
28782
+ label: "Command",
28783
+ value: settings.binary.trim() ? path5?.detail ?? "not found" : "not found on your PATH",
28784
+ tone: settings.binary.trim() ? "bad" : "muted"
28785
+ }
28786
+ ];
28787
+ const hint2 = nextStepHint(name, status);
28788
+ if (hint2) rows2.push({ label: "Next", value: hint2, tone: "muted" });
28789
+ return rows2;
28790
+ }
28791
+ const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
28792
+ const version = checks.find((check) => check.step === "version");
28793
+ if (version?.ok) rows.push({ label: "Version", value: version.detail, tone: "ok" });
28794
+ rows.push({ label: "Model", value: modelLine(name, settings.model), tone: "muted" });
28795
+ const hint = nextStepHint(name, status);
28796
+ if (hint) rows.push({ label: "Next", value: hint, tone: "muted" });
28797
+ return rows;
28798
+ }
28799
+ function statusRows(_name, checks, savedBinary) {
28800
+ if (!checks) return [{ label: "Command", value: "checking...", tone: "muted" }];
28801
+ const find = (step) => checks.find((check) => check.step === step);
28802
+ const path5 = find("path");
28803
+ if (!path5?.ok) {
28804
+ if (savedBinary.trim()) return [{ label: "Command", value: path5?.detail ?? "not found", tone: "bad" }];
28805
+ return [{ label: "Command", value: "not configured (not on the PATH)", tone: "muted" }];
28806
+ }
28807
+ const rows = [{ label: "Command", value: path5.detail, tone: "ok" }];
28808
+ const version = find("version");
28809
+ if (version) {
28810
+ rows.push({
28811
+ label: "Version",
28812
+ value: version.ok ? version.detail : "could not be read",
28813
+ tone: version.ok ? "ok" : "muted"
28814
+ });
28815
+ }
28816
+ const login = find("login");
28817
+ const prompt = find("prompt");
28818
+ if (login) {
28819
+ rows.push({ label: "Login", value: login.detail, tone: login.ok ? "ok" : "bad" });
28820
+ } else if (prompt) {
28821
+ rows.push({
28822
+ label: "Login",
28823
+ value: prompt.ok ? "confirmed by the test" : "see the test result",
28824
+ tone: prompt.ok ? "ok" : "bad"
28825
+ });
28826
+ } else {
28827
+ rows.push({ label: "Login", value: "not checked (use Run test)", tone: "muted" });
28828
+ }
28829
+ if (prompt) rows.push({ label: "Test", value: prompt.detail, tone: prompt.ok ? "ok" : "bad" });
28830
+ return rows;
28831
+ }
28832
+ async function withBinaryEnv(name, binary, run) {
28833
+ const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
28834
+ const previous = process.env[key];
28835
+ process.env[key] = binary;
28836
+ try {
28837
+ return await run();
28838
+ } finally {
28839
+ if (previous === void 0) delete process.env[key];
28840
+ else process.env[key] = previous;
28841
+ }
28842
+ }
28843
+
28844
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx
28845
+ import { useEffect as useEffect22, useState as useState29 } from "react";
28846
+ import { Box as Box44, Text as Text47, useInput as useInput11 } from "ink";
28847
+ import TextInput4 from "ink-text-input";
28848
+
28849
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentStatusBadge.tsx
28850
+ import { Text as Text46 } from "ink";
28851
+ import { jsx as jsx55 } from "react/jsx-runtime";
28852
+ var TONE_COLOR = {
28853
+ ok: PALETTE.success,
28854
+ bad: PALETTE.error,
28855
+ muted: PALETTE.muted
28638
28856
  };
28639
- var LABEL_WIDTH = Math.max(...Object.values(FIELD_LABELS).map((label) => label.length));
28640
- function ConfigurationScreen({ onDone }) {
28641
- const [stage, setStage] = useState29("loading");
28642
- const [config, setConfig] = useState29(null);
28643
- const [activeField, setActiveField] = useState29("spaceId");
28644
- const [notice, setNotice] = useState29(null);
28645
- const [lastSaved, setLastSaved] = useState29(null);
28857
+ function AgentStatusBadge({
28858
+ name,
28859
+ checks,
28860
+ binary
28861
+ }) {
28862
+ const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
28863
+ return /* @__PURE__ */ jsx55(Text46, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
28864
+ }
28865
+
28866
+ // packages/experience-design-system-cli/src/tui/settings/agents/apply-binary-overrides.ts
28867
+ var shellValues = /* @__PURE__ */ new Map();
28868
+ function applyBinaryOverrides(config) {
28869
+ for (const name of AGENT_NAMES) {
28870
+ const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
28871
+ const binary = config.agents[name].binary.trim();
28872
+ if (binary) {
28873
+ if (!shellValues.has(key)) shellValues.set(key, process.env[key]);
28874
+ process.env[key] = binary;
28875
+ } else if (shellValues.has(key)) {
28876
+ const shellValue = shellValues.get(key);
28877
+ if (shellValue === void 0) delete process.env[key];
28878
+ else process.env[key] = shellValue;
28879
+ shellValues.delete(key);
28880
+ }
28881
+ }
28882
+ }
28883
+
28884
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx
28885
+ import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
28886
+ var FOCUS_ORDER = ["binary", "model", "test"];
28887
+ var FIELDS2 = ["binary", "model"];
28888
+ var FIELD_LABEL = { binary: "Command path", model: "Model" };
28889
+ var LABEL_WIDTH = "Command path".length;
28890
+ var fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
28891
+ function Section2({ title, children }) {
28892
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", marginTop: 1, children: [
28893
+ /* @__PURE__ */ jsx56(Text47, { bold: true, color: PALETTE.muted, children: title }),
28894
+ children
28895
+ ] });
28896
+ }
28897
+ function AgentDetail({
28898
+ name,
28899
+ config,
28900
+ setConfig,
28901
+ onBack
28902
+ }) {
28903
+ const settings = config.agents[name];
28904
+ const [focusIndex, setFocusIndex] = useState29(0);
28646
28905
  const [editing, setEditing] = useState29(false);
28647
28906
  const [valueBeforeEdit, setValueBeforeEdit] = useState29("");
28907
+ const [saving, setSaving] = useState29(false);
28908
+ const [testing, setTesting] = useState29(false);
28909
+ const [notice, setNotice] = useState29(null);
28910
+ const [checks, setChecks] = useState29(void 0);
28648
28911
  useEffect22(() => {
28649
- readCredentials().then((cfg) => {
28650
- setConfig(cfg);
28651
- setStage("form");
28912
+ let active = true;
28913
+ setChecks(void 0);
28914
+ void inspectAgent(name, settings.binary).then((result) => active && setChecks(result));
28915
+ return () => {
28916
+ active = false;
28917
+ };
28918
+ }, [name, settings.binary]);
28919
+ const setField = (field, value) => {
28920
+ setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [field]: value } } });
28921
+ setNotice(null);
28922
+ };
28923
+ const save = () => {
28924
+ setSaving(true);
28925
+ setNotice(null);
28926
+ writeAgentConfig(config).then(() => {
28927
+ applyBinaryOverrides(config);
28928
+ setNotice({ kind: "success", text: `${AGENT_LABELS[name]} settings saved` });
28929
+ }).catch(
28930
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
28931
+ ).finally(() => setSaving(false));
28932
+ };
28933
+ const runTest = () => {
28934
+ setTesting(true);
28935
+ setNotice(null);
28936
+ setChecks(void 0);
28937
+ testAgent(name, settings.binary, settings.model).then(setChecks).catch(
28938
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "The test could not run" })
28939
+ ).finally(() => setTesting(false));
28940
+ };
28941
+ const focused = FOCUS_ORDER[focusIndex];
28942
+ const focusedField = focused === "test" ? null : focused;
28943
+ useInput11((input, key) => {
28944
+ if (saving || testing) return;
28945
+ if (editing) {
28946
+ if (key.escape && focusedField) {
28947
+ setField(focusedField, valueBeforeEdit);
28948
+ setEditing(false);
28949
+ }
28950
+ return;
28951
+ }
28952
+ if (key.escape || input === "q") {
28953
+ onBack();
28954
+ return;
28955
+ }
28956
+ if (input === "s") {
28957
+ save();
28958
+ return;
28959
+ }
28960
+ if (key.upArrow) {
28961
+ setFocusIndex((i) => (i - 1 + FOCUS_ORDER.length) % FOCUS_ORDER.length);
28962
+ return;
28963
+ }
28964
+ if (key.downArrow || key.tab) {
28965
+ setFocusIndex((i) => (i + 1) % FOCUS_ORDER.length);
28966
+ return;
28967
+ }
28968
+ if (input === "c" && focusedField) {
28969
+ setField(focusedField, "");
28970
+ return;
28971
+ }
28972
+ if (key.return) {
28973
+ if (focusedField) {
28974
+ setValueBeforeEdit(settings[focusedField]);
28975
+ setEditing(true);
28976
+ } else {
28977
+ runTest();
28978
+ }
28979
+ }
28980
+ });
28981
+ const status = checks ? statusFromChecks(name, checks, settings.binary) : "checking";
28982
+ const hint = nextStepHint(name, status);
28983
+ const pointer = (isFocused) => /* @__PURE__ */ jsx56(Text47, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " });
28984
+ return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28985
+ /* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
28986
+ /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
28987
+ /* @__PURE__ */ jsxs45(Section2, { title: "STATUS", children: [
28988
+ statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
28989
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: row.label }) }),
28990
+ /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value })
28991
+ ] }, row.label)),
28992
+ hint && /* @__PURE__ */ jsx56(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text47, { color: PALETTE.muted, children: [
28993
+ "Next: ",
28994
+ hint
28995
+ ] }) })
28996
+ ] }),
28997
+ /* @__PURE__ */ jsx56(Section2, { title: "SETTINGS", children: FIELDS2.map((field) => {
28998
+ const isFocused = focused === field;
28999
+ const value = settings[field];
29000
+ return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
29001
+ pointer(isFocused),
29002
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
29003
+ isFocused && editing ? /* @__PURE__ */ jsx56(
29004
+ TextInput4,
29005
+ {
29006
+ value,
29007
+ onChange: (next) => setField(field, next),
29008
+ onSubmit: () => setEditing(false)
29009
+ }
29010
+ ) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
29011
+ !value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
29012
+ ] }, field);
29013
+ }) }),
29014
+ /* @__PURE__ */ jsx56(Section2, { title: "ACTIONS", children: /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
29015
+ pointer(focused === "test"),
29016
+ /* @__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" }) }),
29017
+ /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
29018
+ ] }) }),
29019
+ notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
29020
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
29021
+ /* @__PURE__ */ jsxs45(Text47, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29022
+ notice.kind === "success" ? "\u2713" : "\u2717",
29023
+ " ",
29024
+ notice.text
29025
+ ] })
29026
+ ] }),
29027
+ /* @__PURE__ */ jsx56(Text47, { children: " " }),
29028
+ /* @__PURE__ */ jsx56(
29029
+ ControlHints,
29030
+ {
29031
+ hints: editing ? [
29032
+ { keys: "type", label: "edit" },
29033
+ { keys: "\u2190/\u2192", label: "move cursor" },
29034
+ { keys: "\u23CE", label: "done" },
29035
+ { keys: "Esc", label: "cancel edit" }
29036
+ ] : [
29037
+ { keys: "\u2191/\u2193", label: "move" },
29038
+ { keys: "\u23CE", label: focusedField ? "edit" : "run test" },
29039
+ ...focusedField ? [{ keys: "c", label: "clear" }] : [],
29040
+ { keys: "s", label: "save" },
29041
+ { keys: "Esc/q", label: "back without saving" }
29042
+ ]
29043
+ }
29044
+ )
29045
+ ] });
29046
+ }
29047
+
29048
+ // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
29049
+ import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
29050
+ var ROWS = [{ kind: "default" }, ...AGENT_NAMES.map((name) => ({ kind: "agent", name }))];
29051
+ var NAME_WIDTH = 16;
29052
+ var PANEL_LABEL_WIDTH = "Command".length;
29053
+ function AgentsScreen({ onDone }) {
29054
+ const [config, setConfig] = useState30(null);
29055
+ const [focus, setFocus] = useState30(0);
29056
+ const [open, setOpen] = useState30(null);
29057
+ const [notice, setNotice] = useState30(null);
29058
+ const [checks, setChecks] = useState30({});
29059
+ const inspectAll = (loaded) => {
29060
+ for (const name of AGENT_NAMES) {
29061
+ void inspectAgent(name, loaded.agents[name].binary).then(
29062
+ (result) => setChecks((previous) => ({ ...previous, [name]: result }))
29063
+ );
29064
+ }
29065
+ };
29066
+ useEffect23(() => {
29067
+ void readAgentConfig().then((loaded) => {
29068
+ setConfig(loaded);
29069
+ inspectAll(loaded);
28652
29070
  startDebugRun({
28653
- flow: "settings/contentful-configuration",
28654
- step: "01-configuration",
28655
- menuOption: "Configuration",
28656
- inputs: debugFields(cfg)
29071
+ flow: "settings/agents",
29072
+ step: "01-agents",
29073
+ menuOption: "Configuration > Agents",
29074
+ inputs: { default_agent: loaded.defaultAgent }
28657
29075
  });
28658
29076
  });
28659
29077
  }, []);
28660
- function fieldValue(field) {
28661
- if (!config) return "";
28662
- return config[field] || "";
28663
- }
28664
- function setFieldValue(field, value) {
28665
- if (!config) return;
28666
- setConfig({ ...config, [field]: value });
28667
- setNotice(null);
28668
- }
28669
- function handleSave() {
29078
+ const cycleDefault = (step) => {
28670
29079
  if (!config) return;
28671
- setStage("saving");
28672
- setNotice(null);
28673
- writeCredentials(config).then(() => {
28674
- setLastSaved(config);
28675
- if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
28676
- setNotice({ kind: "success", text: "Configuration saved" });
28677
- setStage("form");
28678
- }).catch((err) => {
28679
- setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
28680
- setStage("form");
28681
- });
29080
+ const index = AGENT_NAMES.indexOf(config.defaultAgent);
29081
+ const next = { ...config, defaultAgent: AGENT_NAMES[(index + step + AGENT_NAMES.length) % AGENT_NAMES.length] };
29082
+ setConfig(next);
29083
+ writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[next.defaultAgent]}` })).catch(
29084
+ (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
29085
+ );
29086
+ };
29087
+ useInput12((input, key) => {
29088
+ if (!config || open) return;
29089
+ const row = ROWS[focus];
29090
+ if (key.upArrow || key.downArrow || key.tab) setNotice(null);
29091
+ if (key.upArrow) {
29092
+ setFocus((i) => (i - 1 + ROWS.length) % ROWS.length);
29093
+ return;
29094
+ }
29095
+ if (key.downArrow || key.tab) {
29096
+ setFocus((i) => (i + 1) % ROWS.length);
29097
+ return;
29098
+ }
29099
+ if (row.kind === "default" && key.leftArrow) {
29100
+ cycleDefault(-1);
29101
+ return;
29102
+ }
29103
+ if (row.kind === "default" && key.rightArrow) {
29104
+ cycleDefault(1);
29105
+ return;
29106
+ }
29107
+ if (key.return) {
29108
+ if (row.kind === "default") cycleDefault(1);
29109
+ else setOpen(row.name);
29110
+ return;
29111
+ }
29112
+ if (key.escape || input === "q") {
29113
+ void finishDebugRun({ outputs: { default_agent: config.defaultAgent }, status: "success", exitMethod: "saved" });
29114
+ onDone();
29115
+ }
29116
+ });
29117
+ if (!config) {
29118
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29119
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
29120
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29121
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "Loading..." })
29122
+ ] });
28682
29123
  }
28683
- function quit() {
28684
- void finishDebugRun(
28685
- lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
29124
+ if (open) {
29125
+ return /* @__PURE__ */ jsx57(
29126
+ AgentDetail,
29127
+ {
29128
+ name: open,
29129
+ config,
29130
+ setConfig,
29131
+ onBack: () => {
29132
+ setOpen(null);
29133
+ void readAgentConfig().then((saved) => {
29134
+ setConfig(saved);
29135
+ inspectAll(saved);
29136
+ });
29137
+ }
29138
+ }
28686
29139
  );
28687
- onDone();
28688
29140
  }
28689
- useInput11((input, key) => {
28690
- if (stage === "loading" || stage === "saving") return;
29141
+ const focusedRow = ROWS[focus];
29142
+ const focusedAgent = focusedRow.kind === "agent" ? focusedRow.name : null;
29143
+ return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29144
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Agents" }),
29145
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
29146
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29147
+ /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
29148
+ /* @__PURE__ */ jsx57(Text48, { color: focusedRow.kind === "default" ? PALETTE.accent : void 0, children: focusedRow.kind === "default" ? "\u276F" : " " }),
29149
+ /* @__PURE__ */ jsx57(
29150
+ Text48,
29151
+ {
29152
+ bold: focusedRow.kind === "default",
29153
+ color: focusedRow.kind === "default" ? PALETTE.accent : PALETTE.muted,
29154
+ children: "Default agent"
29155
+ }
29156
+ ),
29157
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: `\u2039 ${AGENT_LABELS[config.defaultAgent]} \u203A` })
29158
+ ] }),
29159
+ /* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
29160
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29161
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29162
+ /* @__PURE__ */ jsx57(Box45, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "AGENT" }) }),
29163
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "STATUS" })
29164
+ ] }),
29165
+ AGENT_NAMES.map((name) => {
29166
+ const isFocused = focusedAgent === name;
29167
+ return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
29168
+ /* @__PURE__ */ jsx57(Text48, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
29169
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
29170
+ /* @__PURE__ */ jsx57(Box45, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
29171
+ /* @__PURE__ */ jsx57(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
29172
+ ] }, name);
29173
+ }),
29174
+ focusedAgent && /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
29175
+ /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
29176
+ panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs46(Box45, { gap: 1, paddingLeft: 1, children: [
29177
+ /* @__PURE__ */ jsx57(Box45, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: row.label }) }),
29178
+ /* @__PURE__ */ jsx57(Text48, { color: TONE_COLOR[row.tone], children: row.value })
29179
+ ] }, row.label))
29180
+ ] }),
29181
+ notice && /* @__PURE__ */ jsxs46(Fragment18, { children: [
29182
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29183
+ /* @__PURE__ */ jsxs46(Text48, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29184
+ notice.kind === "success" ? "\u2713" : "\u2717",
29185
+ " ",
29186
+ notice.text
29187
+ ] })
29188
+ ] }),
29189
+ /* @__PURE__ */ jsx57(Text48, { children: " " }),
29190
+ /* @__PURE__ */ jsx57(
29191
+ ControlHints,
29192
+ {
29193
+ hints: focusedRow.kind === "default" ? [
29194
+ { keys: "\u2191/\u2193", label: "move" },
29195
+ { keys: "\u2190/\u2192", label: "change default agent" },
29196
+ { keys: "Esc/q", label: "back" }
29197
+ ] : [
29198
+ { keys: "\u2191/\u2193", label: "move" },
29199
+ { keys: "\u23CE", label: "settings and test" },
29200
+ { keys: "Esc/q", label: "back" }
29201
+ ]
29202
+ }
29203
+ )
29204
+ ] });
29205
+ }
29206
+
29207
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
29208
+ import { useEffect as useEffect24, useState as useState32 } from "react";
29209
+ import { Box as Box47, Text as Text50 } from "ink";
29210
+ init_debug_store();
29211
+
29212
+ // packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
29213
+ import { useState as useState31 } from "react";
29214
+ import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
29215
+ import TextInput5 from "ink-text-input";
29216
+ import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
29217
+ function FieldForm({
29218
+ title,
29219
+ subtitle,
29220
+ fields,
29221
+ values,
29222
+ onChange,
29223
+ onSave,
29224
+ onQuit,
29225
+ notice,
29226
+ busy = false,
29227
+ footer
29228
+ }) {
29229
+ const [active, setActive] = useState31(0);
29230
+ const [editing, setEditing] = useState31(false);
29231
+ const [valueBeforeEdit, setValueBeforeEdit] = useState31("");
29232
+ const labelWidth = Math.max(...fields.map((field) => field.label.length));
29233
+ const current = fields[active];
29234
+ useInput13((input, key) => {
29235
+ if (busy) return;
28691
29236
  if (editing) {
28692
29237
  if (key.escape) {
28693
- setFieldValue(activeField, valueBeforeEdit);
29238
+ onChange(current.key, valueBeforeEdit);
28694
29239
  setEditing(false);
28695
29240
  }
28696
29241
  return;
28697
29242
  }
28698
29243
  if (key.escape || input === "q") {
28699
- quit();
29244
+ onQuit();
28700
29245
  return;
28701
29246
  }
28702
29247
  if (input === "s") {
28703
- handleSave();
29248
+ onSave();
28704
29249
  return;
28705
29250
  }
28706
29251
  if (input === "c") {
28707
- setFieldValue(activeField, "");
29252
+ onChange(current.key, "");
28708
29253
  return;
28709
29254
  }
28710
29255
  if (key.tab || key.downArrow) {
28711
- const idx = FIELD_ORDER.indexOf(activeField);
28712
- setActiveField(FIELD_ORDER[(idx + 1) % FIELD_ORDER.length]);
29256
+ setActive((i) => (i + 1) % fields.length);
28713
29257
  return;
28714
29258
  }
28715
29259
  if (key.upArrow) {
28716
- const idx = FIELD_ORDER.indexOf(activeField);
28717
- setActiveField(FIELD_ORDER[(idx - 1 + FIELD_ORDER.length) % FIELD_ORDER.length]);
29260
+ setActive((i) => (i - 1 + fields.length) % fields.length);
28718
29261
  return;
28719
29262
  }
28720
29263
  if (key.return) {
28721
- setValueBeforeEdit(fieldValue(activeField));
29264
+ setValueBeforeEdit(values[current.key]);
28722
29265
  setEditing(true);
28723
29266
  }
28724
29267
  });
28725
- if (stage === "loading") {
28726
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28727
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
28728
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28729
- /* @__PURE__ */ jsx55(Text46, { color: PALETTE.accent, children: "Loading..." })
28730
- ] });
28731
- }
28732
- return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28733
- /* @__PURE__ */ jsx55(Text46, { bold: true, children: "Configuration" }),
28734
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28735
- /* @__PURE__ */ jsx55(Box44, { flexDirection: "column", children: FIELD_ORDER.map((field) => {
28736
- const isActive = activeField === field;
28737
- const value = fieldValue(field);
28738
- const display = field === "cmaToken" ? "\u2022".repeat(value.length) : value;
28739
- return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
28740
- /* @__PURE__ */ jsx55(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
28741
- /* @__PURE__ */ jsx55(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx55(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: FIELD_LABELS[field] }) }),
28742
- isActive && editing ? /* @__PURE__ */ jsx55(
28743
- TextInput4,
29268
+ return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29269
+ /* @__PURE__ */ jsx58(Text49, { bold: true, children: title }),
29270
+ subtitle && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: subtitle }),
29271
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
29272
+ /* @__PURE__ */ jsx58(Box46, { flexDirection: "column", children: fields.map((field, index) => {
29273
+ const isActive = index === active;
29274
+ const value = values[field.key];
29275
+ const display = field.masked ? "\u2022".repeat(value.length) : value;
29276
+ return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
29277
+ /* @__PURE__ */ jsx58(Text49, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " }),
29278
+ /* @__PURE__ */ jsx58(Box46, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text49, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
29279
+ isActive && editing ? /* @__PURE__ */ jsx58(
29280
+ TextInput5,
28744
29281
  {
28745
29282
  value,
28746
- onChange: (next) => setFieldValue(field, next),
29283
+ onChange: (next) => onChange(field.key, next),
28747
29284
  onSubmit: () => setEditing(false),
28748
- mask: field === "cmaToken" ? "\u2022" : void 0
29285
+ mask: field.masked ? "\u2022" : void 0
28749
29286
  }
28750
- ) : /* @__PURE__ */ jsx55(Text46, { bold: !!display, children: display || (FIELD_HINTS[field] ? "" : /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "(empty)" })) }),
28751
- FIELD_HINTS[field] && /* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: FIELD_HINTS[field] })
28752
- ] }, field);
29287
+ ) : /* @__PURE__ */ jsx58(Text49, { bold: !!display, children: display || (field.hint ? "" : /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "(empty)" })) }),
29288
+ field.hint && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: field.hint })
29289
+ ] }, field.key);
28753
29290
  }) }),
28754
- notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
28755
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28756
- /* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29291
+ notice && /* @__PURE__ */ jsxs47(Fragment19, { children: [
29292
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
29293
+ /* @__PURE__ */ jsxs47(Text49, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
28757
29294
  notice.kind === "success" ? "\u2713" : "\u2717",
28758
29295
  " ",
28759
29296
  notice.text
28760
29297
  ] })
28761
29298
  ] }),
28762
- /* @__PURE__ */ jsx55(Text46, { children: " " }),
28763
- /* @__PURE__ */ jsx55(
29299
+ footer,
29300
+ /* @__PURE__ */ jsx58(Text49, { children: " " }),
29301
+ /* @__PURE__ */ jsx58(
28764
29302
  ControlHints,
28765
29303
  {
28766
29304
  hints: editing ? [
@@ -28773,7 +29311,168 @@ function ConfigurationScreen({ onDone }) {
28773
29311
  { keys: "\u23CE", label: "edit" },
28774
29312
  { keys: "c", label: "clear" },
28775
29313
  { keys: "s", label: "save" },
28776
- { keys: "Esc/q", label: "quit without saving" }
29314
+ { keys: "Esc/q", label: "back without saving" }
29315
+ ]
29316
+ }
29317
+ )
29318
+ ] });
29319
+ }
29320
+
29321
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/config-store.ts
29322
+ async function readCredentials() {
29323
+ const store = await readV1Store();
29324
+ return {
29325
+ spaceId: store.spaceId || "",
29326
+ environmentId: store.environmentId || "",
29327
+ cmaToken: store.cmaToken || "",
29328
+ host: store.host || "",
29329
+ defaultComponentDir: store.defaultComponentDir || "",
29330
+ defaultTokenFile: store.defaultTokenFile || "",
29331
+ contentfulBaseDir: store.contentfulBaseDir || ""
29332
+ };
29333
+ }
29334
+ async function writeCredentials(config) {
29335
+ const existing = await readV1Store();
29336
+ const merged = {
29337
+ ...existing,
29338
+ ...config
29339
+ };
29340
+ Object.keys(merged).forEach((k) => {
29341
+ if (!merged[k]) delete merged[k];
29342
+ });
29343
+ await writeV1Store(merged);
29344
+ }
29345
+
29346
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ProjectConfigScreen.tsx
29347
+ import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
29348
+ var FIELDS3 = [
29349
+ { key: "spaceId", label: "Space ID" },
29350
+ { key: "environmentId", label: "Environment ID" },
29351
+ { key: "cmaToken", label: "CMA Token", masked: true },
29352
+ { key: "host", label: "API Host" },
29353
+ { key: "defaultComponentDir", label: "Default component directory" },
29354
+ { key: "defaultTokenFile", label: "Default token file" },
29355
+ { key: "contentfulBaseDir", label: "Root Project Directory", hint: "(where .contentful goes)" }
29356
+ ];
29357
+ function debugFields(config) {
29358
+ return {
29359
+ space_id: config?.spaceId ?? "",
29360
+ environment_id: config?.environmentId ?? "",
29361
+ cma_token: config?.cmaToken ?? "",
29362
+ host: config?.host ?? "",
29363
+ default_component_dir: config?.defaultComponentDir ?? "",
29364
+ default_token_file: config?.defaultTokenFile ?? "",
29365
+ contentful_base_dir: config?.contentfulBaseDir ?? ""
29366
+ };
29367
+ }
29368
+ var valuesOf = (config) => Object.fromEntries(FIELDS3.map(({ key }) => [key, config[key] || ""]));
29369
+ function ProjectConfigScreen({ onDone }) {
29370
+ const [config, setConfig] = useState32(null);
29371
+ const [saving, setSaving] = useState32(false);
29372
+ const [notice, setNotice] = useState32(null);
29373
+ const [lastSaved, setLastSaved] = useState32(null);
29374
+ useEffect24(() => {
29375
+ void readCredentials().then((cfg) => {
29376
+ setConfig(cfg);
29377
+ startDebugRun({
29378
+ flow: "settings/contentful-configuration",
29379
+ step: "01-configuration",
29380
+ menuOption: "Configuration > Project",
29381
+ inputs: debugFields(cfg)
29382
+ });
29383
+ });
29384
+ }, []);
29385
+ if (!config) {
29386
+ return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29387
+ /* @__PURE__ */ jsx59(Text50, { bold: true, children: "Project" }),
29388
+ /* @__PURE__ */ jsx59(Text50, { children: " " }),
29389
+ /* @__PURE__ */ jsx59(Text50, { color: PALETTE.accent, children: "Loading..." })
29390
+ ] });
29391
+ }
29392
+ const save = () => {
29393
+ setSaving(true);
29394
+ setNotice(null);
29395
+ writeCredentials(config).then(() => {
29396
+ setLastSaved(config);
29397
+ if (config.contentfulBaseDir) void startDebugSessionIn(config.contentfulBaseDir, { replace: true });
29398
+ setNotice({ kind: "success", text: "Project settings saved" });
29399
+ }).catch((err) => {
29400
+ setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" });
29401
+ }).finally(() => setSaving(false));
29402
+ };
29403
+ const quit = () => {
29404
+ void finishDebugRun(
29405
+ lastSaved ? { outputs: debugFields(lastSaved), status: "success", exitMethod: "saved" } : { outputs: {}, status: "success", exitMethod: "discarded" }
29406
+ );
29407
+ onDone();
29408
+ };
29409
+ return /* @__PURE__ */ jsx59(
29410
+ FieldForm,
29411
+ {
29412
+ title: "Project",
29413
+ subtitle: "The Contentful space and where the CLI keeps its files.",
29414
+ fields: FIELDS3,
29415
+ values: valuesOf(config),
29416
+ onChange: (key, value) => {
29417
+ setConfig({ ...config, [key]: value });
29418
+ setNotice(null);
29419
+ },
29420
+ onSave: save,
29421
+ onQuit: quit,
29422
+ notice,
29423
+ busy: saving
29424
+ }
29425
+ );
29426
+ }
29427
+
29428
+ // packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx
29429
+ import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
29430
+ var SECTIONS = [
29431
+ {
29432
+ id: "project",
29433
+ label: "Project",
29434
+ description: "Contentful space, credentials, defaults and where .contentful goes"
29435
+ },
29436
+ { id: "agents", label: "Agents", description: "Which coding agent the CLI uses, and each agent\u2019s settings" }
29437
+ ];
29438
+ function ConfigurationScreen({ onDone }) {
29439
+ const [focus, setFocus] = useState33(0);
29440
+ const [open, setOpen] = useState33(null);
29441
+ const close = () => setOpen(null);
29442
+ useInput14((input, key) => {
29443
+ if (open) return;
29444
+ if (key.upArrow) {
29445
+ setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
29446
+ return;
29447
+ }
29448
+ if (key.downArrow || key.tab) {
29449
+ setFocus((i) => (i + 1) % SECTIONS.length);
29450
+ return;
29451
+ }
29452
+ if (key.return) {
29453
+ setOpen(SECTIONS[focus].id);
29454
+ return;
29455
+ }
29456
+ if (key.escape || input === "q") onDone();
29457
+ });
29458
+ if (open === "project") return /* @__PURE__ */ jsx60(ProjectConfigScreen, { onDone: close });
29459
+ if (open === "agents") return /* @__PURE__ */ jsx60(AgentsScreen, { onDone: close });
29460
+ return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29461
+ /* @__PURE__ */ jsx60(Text51, { bold: true, children: "Configuration" }),
29462
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
29463
+ SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
29464
+ /* @__PURE__ */ jsx60(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
29465
+ /* @__PURE__ */ jsx60(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
29466
+ /* @__PURE__ */ jsx60(Text51, { color: PALETTE.muted, children: section.description })
29467
+ ] }, section.id)),
29468
+ /* @__PURE__ */ jsx60(Text51, { children: " " }),
29469
+ /* @__PURE__ */ jsx60(
29470
+ ControlHints,
29471
+ {
29472
+ hints: [
29473
+ { keys: "\u2191/\u2193", label: "move" },
29474
+ { keys: "\u23CE", label: "open" },
29475
+ { keys: "Esc/q", label: "back" }
28777
29476
  ]
28778
29477
  }
28779
29478
  )
@@ -28781,8 +29480,8 @@ function ConfigurationScreen({ onDone }) {
28781
29480
  }
28782
29481
 
28783
29482
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
28784
- import { useEffect as useEffect23, useState as useState30 } from "react";
28785
- import { Box as Box45, Text as Text47, useInput as useInput12 } from "ink";
29483
+ import { useEffect as useEffect25, useState as useState34 } from "react";
29484
+ import { Box as Box49, Text as Text52, useInput as useInput15 } from "ink";
28786
29485
 
28787
29486
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
28788
29487
  async function readAnalyticsSetting() {
@@ -28801,11 +29500,11 @@ async function writeAnalyticsSetting(setting) {
28801
29500
 
28802
29501
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
28803
29502
  init_debug_store();
28804
- import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
29503
+ import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
28805
29504
  function OptInAnalyticsScreen({ onDone }) {
28806
- const [loading, setLoading] = useState30(true);
28807
- const [enabled, setEnabled] = useState30(true);
28808
- useEffect23(() => {
29505
+ const [loading, setLoading] = useState34(true);
29506
+ const [enabled, setEnabled] = useState34(true);
29507
+ useEffect25(() => {
28809
29508
  readAnalyticsSetting().then((setting) => {
28810
29509
  setEnabled(setting.enabled);
28811
29510
  setLoading(false);
@@ -28817,7 +29516,7 @@ function OptInAnalyticsScreen({ onDone }) {
28817
29516
  });
28818
29517
  });
28819
29518
  }, []);
28820
- useInput12((input, key) => {
29519
+ useInput15((input, key) => {
28821
29520
  if (loading) return;
28822
29521
  if (key.return || input === " ") {
28823
29522
  setEnabled((current) => {
@@ -28832,21 +29531,21 @@ function OptInAnalyticsScreen({ onDone }) {
28832
29531
  onDone();
28833
29532
  }
28834
29533
  });
28835
- return /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28836
- /* @__PURE__ */ jsx56(Text47, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
28837
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
28838
- loading ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs46(Fragment18, { children: [
28839
- /* @__PURE__ */ jsxs46(Text47, { children: [
29534
+ return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29535
+ /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
29536
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
29537
+ loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
29538
+ /* @__PURE__ */ jsxs50(Text52, { children: [
28840
29539
  "Share anonymous usage data:",
28841
29540
  " ",
28842
- /* @__PURE__ */ jsx56(Text47, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
29541
+ /* @__PURE__ */ jsx61(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
28843
29542
  ] }),
28844
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
28845
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
28846
- /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
29543
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
29544
+ /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
29545
+ /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
28847
29546
  ] }),
28848
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
28849
- /* @__PURE__ */ jsx56(
29547
+ /* @__PURE__ */ jsx61(Text52, { children: " " }),
29548
+ /* @__PURE__ */ jsx61(
28850
29549
  ControlHints,
28851
29550
  {
28852
29551
  hints: [
@@ -28859,15 +29558,15 @@ function OptInAnalyticsScreen({ onDone }) {
28859
29558
  }
28860
29559
 
28861
29560
  // packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx
28862
- import { useEffect as useEffect24, useState as useState31 } from "react";
28863
- import { Box as Box46, Text as Text48, useInput as useInput13 } from "ink";
29561
+ import { useEffect as useEffect26, useState as useState35 } from "react";
29562
+ import { Box as Box50, Text as Text53, useInput as useInput16 } from "ink";
28864
29563
  init_version();
28865
29564
  init_debug_store();
28866
- import { jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
29565
+ import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
28867
29566
  var UPGRADE_COMMANDS = ["git pull", "pnpm install", "pnpm build"];
28868
29567
  function UpgradeScreen({ onDone }) {
28869
- const [upgradeCheck, setUpgradeCheck] = useState31();
28870
- useEffect24(() => {
29568
+ const [upgradeCheck, setUpgradeCheck] = useState35();
29569
+ useEffect26(() => {
28871
29570
  startDebugRun({
28872
29571
  flow: "upgrade",
28873
29572
  step: "01-upgrade",
@@ -28876,7 +29575,7 @@ function UpgradeScreen({ onDone }) {
28876
29575
  });
28877
29576
  checkForUpgrade().then(setUpgradeCheck).catch(() => setUpgradeCheck({ status: "error" }));
28878
29577
  }, []);
28879
- useInput13((_input, key) => {
29578
+ useInput16((_input, key) => {
28880
29579
  if (key.return) {
28881
29580
  void finishDebugRun({
28882
29581
  outputs: upgradeCheck ?? {},
@@ -28887,12 +29586,12 @@ function UpgradeScreen({ onDone }) {
28887
29586
  return;
28888
29587
  }
28889
29588
  });
28890
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28891
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: "Upgrade" }),
28892
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
29589
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29590
+ /* @__PURE__ */ jsx62(Text53, { bold: true, children: "Upgrade" }),
29591
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
28893
29592
  renderBody(upgradeCheck),
28894
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
28895
- /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.accent, children: [
29593
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
29594
+ /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.accent, children: [
28896
29595
  FOCUS_MARKER,
28897
29596
  " Go Back"
28898
29597
  ] })
@@ -28900,47 +29599,47 @@ function UpgradeScreen({ onDone }) {
28900
29599
  }
28901
29600
  function renderBody(upgradeCheck) {
28902
29601
  if (!upgradeCheck) {
28903
- return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Checking for updates\u2026" });
29602
+ return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.muted, children: "Checking for updates\u2026" });
28904
29603
  }
28905
29604
  if (upgradeCheck.status === "error") {
28906
- return /* @__PURE__ */ jsx57(Text48, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
29605
+ return /* @__PURE__ */ jsx62(Text53, { color: PALETTE.warning, children: "Couldn't check for updates \u2014 check your network connection and try again." });
28907
29606
  }
28908
29607
  if (upgradeCheck.status === "up-to-date") {
28909
- return /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.success, children: [
29608
+ return /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.success, children: [
28910
29609
  "You're already on the latest version (v",
28911
29610
  upgradeCheck.current,
28912
29611
  ")."
28913
29612
  ] });
28914
29613
  }
28915
- return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
28916
- /* @__PURE__ */ jsxs47(Text48, { color: PALETTE.muted, children: [
28917
- /* @__PURE__ */ jsxs47(Text48, { bold: true, color: PALETTE.success, children: [
29614
+ return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", children: [
29615
+ /* @__PURE__ */ jsxs51(Text53, { color: PALETTE.muted, children: [
29616
+ /* @__PURE__ */ jsxs51(Text53, { bold: true, color: PALETTE.success, children: [
28918
29617
  "v",
28919
29618
  upgradeCheck.latest
28920
29619
  ] }),
28921
29620
  " ",
28922
29621
  "is available (you're on ",
28923
- /* @__PURE__ */ jsxs47(Text48, { bold: true, children: [
29622
+ /* @__PURE__ */ jsxs51(Text53, { bold: true, children: [
28924
29623
  "v",
28925
29624
  upgradeCheck.current
28926
29625
  ] }),
28927
29626
  "). Exit this program, cd into the root of your local clone of contentful/experience-design-system-sdk-public, then run:"
28928
29627
  ] }),
28929
- /* @__PURE__ */ jsx57(Text48, { children: " " }),
28930
- /* @__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)) })
29628
+ /* @__PURE__ */ jsx62(Text53, { children: " " }),
29629
+ /* @__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)) })
28931
29630
  ] });
28932
29631
  }
28933
29632
 
28934
29633
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
28935
- import { useEffect as useEffect25, useState as useState32 } from "react";
28936
- import { Box as Box47, Text as Text49, useInput as useInput14 } from "ink";
29634
+ import { useEffect as useEffect27, useState as useState36 } from "react";
29635
+ import { Box as Box51, Text as Text54, useInput as useInput17 } from "ink";
28937
29636
  init_debug_mode_store();
28938
29637
  init_debug_store();
28939
- import { jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
29638
+ import { jsx as jsx63, jsxs as jsxs52 } from "react/jsx-runtime";
28940
29639
  function DebugModeScreen({ onDone }) {
28941
- const [loading, setLoading] = useState32(true);
28942
- const [enabled, setEnabled] = useState32(true);
28943
- useEffect25(() => {
29640
+ const [loading, setLoading] = useState36(true);
29641
+ const [enabled, setEnabled] = useState36(true);
29642
+ useEffect27(() => {
28944
29643
  readDebugModeSetting().then((setting) => {
28945
29644
  setEnabled(setting.enabled);
28946
29645
  setLoading(false);
@@ -28952,7 +29651,7 @@ function DebugModeScreen({ onDone }) {
28952
29651
  });
28953
29652
  });
28954
29653
  }, []);
28955
- useInput14((input, key) => {
29654
+ useInput17((input, key) => {
28956
29655
  if (loading) return;
28957
29656
  if (key.return || input === " ") {
28958
29657
  setEnabled((current) => {
@@ -28967,16 +29666,16 @@ function DebugModeScreen({ onDone }) {
28967
29666
  onDone();
28968
29667
  }
28969
29668
  });
28970
- return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28971
- /* @__PURE__ */ jsx58(Text49, { bold: true, children: "Settings \u203A Debug Mode" }),
28972
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
28973
- loading ? /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs48(Text49, { children: [
29669
+ return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29670
+ /* @__PURE__ */ jsx63(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
29671
+ /* @__PURE__ */ jsx63(Text54, { children: " " }),
29672
+ loading ? /* @__PURE__ */ jsx63(Text54, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs52(Text54, { children: [
28974
29673
  "Debug logging:",
28975
29674
  " ",
28976
- /* @__PURE__ */ jsx58(Text49, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
29675
+ /* @__PURE__ */ jsx63(Text54, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
28977
29676
  ] }),
28978
- /* @__PURE__ */ jsx58(Text49, { children: " " }),
28979
- /* @__PURE__ */ jsx58(
29677
+ /* @__PURE__ */ jsx63(Text54, { children: " " }),
29678
+ /* @__PURE__ */ jsx63(
28980
29679
  ControlHints,
28981
29680
  {
28982
29681
  hints: [
@@ -28989,18 +29688,18 @@ function DebugModeScreen({ onDone }) {
28989
29688
  }
28990
29689
 
28991
29690
  // packages/experience-design-system-cli/app.tsx
28992
- import { Fragment as Fragment19, jsx as jsx59 } from "react/jsx-runtime";
29691
+ import { Fragment as Fragment21, jsx as jsx64 } from "react/jsx-runtime";
28993
29692
  function App({ importOptions, inkClear }) {
28994
- const [screen, setScreen] = useState33("start");
28995
- const [importExitCode, setImportExitCode] = useState33();
29693
+ const [screen, setScreen] = useState37("start");
29694
+ const [importExitCode, setImportExitCode] = useState37();
28996
29695
  const showImportResult = importExitCode !== void 0;
28997
- const [projectPath, setProjectPath] = useState33();
28998
- const [tokensPath, setTokensPath] = useState33();
28999
- const [scannedFiles, setScannedFiles] = useState33();
29000
- const [pendingLaunch, setPendingLaunch] = useState33();
29001
- const [extractionRun, setExtractionRun] = useState33();
29696
+ const [projectPath, setProjectPath] = useState37();
29697
+ const [tokensPath, setTokensPath] = useState37();
29698
+ const [scannedFiles, setScannedFiles] = useState37();
29699
+ const [pendingLaunch, setPendingLaunch] = useState37();
29700
+ const [extractionRun, setExtractionRun] = useState37();
29002
29701
  const extraction = useExtraction(extractionRun?.input);
29003
- const [scopeRun, setScopeRun] = useState33();
29702
+ const [scopeRun, setScopeRun] = useState37();
29004
29703
  const scopeFlow = useScopeGateFlow(
29005
29704
  scopeRun && {
29006
29705
  sessionId: scopeRun.extraction.sessionId,
@@ -29015,12 +29714,12 @@ function App({ importOptions, inkClear }) {
29015
29714
  }
29016
29715
  }
29017
29716
  );
29018
- const [generationInput, setGenerationInput] = useState33();
29717
+ const [generationInput, setGenerationInput] = useState37();
29019
29718
  const generation = useGeneration(generationInput);
29020
- const [flowStart, setFlowStart] = useState33();
29719
+ const [flowStart, setFlowStart] = useState37();
29021
29720
  const flow = useFlow(flowStart, { beforeStepChange: inkClear });
29022
- const [importDefaults, setImportDefaults] = useState33();
29023
- useEffect26(() => {
29721
+ const [importDefaults, setImportDefaults] = useState37();
29722
+ useEffect28(() => {
29024
29723
  if (screen !== "import") {
29025
29724
  setImportDefaults(void 0);
29026
29725
  return;
@@ -29038,7 +29737,7 @@ function App({ importOptions, inkClear }) {
29038
29737
  const launch = { projectPath: projectPath2, tokens, filePaths, ...importOptions };
29039
29738
  const state2 = await inspectTokens({
29040
29739
  rawTokensPath: tokens,
29041
- contentfulDir: join25(resolveUserPath(projectPath2), ".contentful"),
29740
+ contentfulDir: join26(resolveUserPath(projectPath2), ".contentful"),
29042
29741
  cache: importOptions.cache
29043
29742
  });
29044
29743
  if (state2.kind === "cached") {
@@ -29080,12 +29779,12 @@ function App({ importOptions, inkClear }) {
29080
29779
  }
29081
29780
  });
29082
29781
  };
29083
- useEffect26(() => {
29782
+ useEffect28(() => {
29084
29783
  if (!extractionRun || extraction?.status !== "done" || !extraction.result.ok) return;
29085
29784
  setExtractionRun(void 0);
29086
29785
  setScopeRun({ ...extractionRun, extraction: extraction.result.extraction });
29087
29786
  }, [extraction, extractionRun]);
29088
- useEffect26(() => {
29787
+ useEffect28(() => {
29089
29788
  if (!scopeRun || scopeFlow?.status !== "confirmed" || generationInput) return;
29090
29789
  const { extraction: produced, input, generatePromptPath } = scopeRun;
29091
29790
  setGenerationInput({
@@ -29103,7 +29802,7 @@ function App({ importOptions, inkClear }) {
29103
29802
  ...generatePromptPath ? { generatePromptPath } : {}
29104
29803
  });
29105
29804
  }, [scopeFlow, scopeRun, generationInput]);
29106
- useEffect26(() => {
29805
+ useEffect28(() => {
29107
29806
  if (!scopeRun || generation?.status !== "done" || !generation.result.ok) return;
29108
29807
  const { credentialsSkipped, tokenStrategy, extraction: produced, input, generatePromptPath } = scopeRun;
29109
29808
  inkClear();
@@ -29146,9 +29845,9 @@ function App({ importOptions, inkClear }) {
29146
29845
  };
29147
29846
  switch (screen) {
29148
29847
  case "import":
29149
- if (showImportResult) return /* @__PURE__ */ jsx59(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
29848
+ if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
29150
29849
  if (flow && flowStart) {
29151
- return /* @__PURE__ */ jsx59(
29850
+ return /* @__PURE__ */ jsx64(
29152
29851
  FlowScreen,
29153
29852
  {
29154
29853
  state: flow.state,
@@ -29158,12 +29857,12 @@ function App({ importOptions, inkClear }) {
29158
29857
  }
29159
29858
  );
29160
29859
  }
29161
- if (importDefaults === void 0) return /* @__PURE__ */ jsx59(Fragment19, {});
29860
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment21, {});
29162
29861
  if (projectPath === void 0) {
29163
- return /* @__PURE__ */ jsx59(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
29862
+ return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
29164
29863
  }
29165
29864
  if (tokensPath === void 0) {
29166
- return /* @__PURE__ */ jsx59(
29865
+ return /* @__PURE__ */ jsx64(
29167
29866
  TokenInputScreen,
29168
29867
  {
29169
29868
  initialPath: importDefaults.tokenFile,
@@ -29173,7 +29872,7 @@ function App({ importOptions, inkClear }) {
29173
29872
  );
29174
29873
  }
29175
29874
  if (scannedFiles === void 0) {
29176
- return /* @__PURE__ */ jsx59(
29875
+ return /* @__PURE__ */ jsx64(
29177
29876
  PathValidationScreen,
29178
29877
  {
29179
29878
  projectPath,
@@ -29185,10 +29884,10 @@ function App({ importOptions, inkClear }) {
29185
29884
  }
29186
29885
  if (extractionRun) {
29187
29886
  if (extraction?.status === "done" && !extraction.result.ok) {
29188
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
29887
+ return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
29189
29888
  }
29190
29889
  if (extraction?.status === "running") {
29191
- return /* @__PURE__ */ jsx59(
29890
+ return /* @__PURE__ */ jsx64(
29192
29891
  ExtractionScreen,
29193
29892
  {
29194
29893
  progress: extraction.progress,
@@ -29197,14 +29896,14 @@ function App({ importOptions, inkClear }) {
29197
29896
  }
29198
29897
  );
29199
29898
  }
29200
- return /* @__PURE__ */ jsx59(Fragment19, {});
29899
+ return /* @__PURE__ */ jsx64(Fragment21, {});
29201
29900
  }
29202
29901
  if (scopeRun && scopeFlow) {
29203
29902
  if (scopeFlow.status === "failed") {
29204
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
29903
+ return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
29205
29904
  }
29206
29905
  if (scopeFlow.status === "deciding") {
29207
- return /* @__PURE__ */ jsx59(
29906
+ return /* @__PURE__ */ jsx64(
29208
29907
  ScopeGateScreen,
29209
29908
  {
29210
29909
  components: scopeFlow.load.components,
@@ -29214,7 +29913,7 @@ function App({ importOptions, inkClear }) {
29214
29913
  );
29215
29914
  }
29216
29915
  if (generation?.status === "done" && !generation.result.ok) {
29217
- return /* @__PURE__ */ jsx59(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
29916
+ return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
29218
29917
  }
29219
29918
  if (generation?.status === "running") {
29220
29919
  const hasRawTokens = scopeRun.input.rawTokensPath !== "";
@@ -29222,7 +29921,7 @@ function App({ importOptions, inkClear }) {
29222
29921
  hasRawTokens,
29223
29922
  mapTokensEligible: generation.progress.mapTokensEligible
29224
29923
  });
29225
- return /* @__PURE__ */ jsx59(
29924
+ return /* @__PURE__ */ jsx64(
29226
29925
  GenerationScreen,
29227
29926
  {
29228
29927
  progress: generation.progress,
@@ -29234,10 +29933,10 @@ function App({ importOptions, inkClear }) {
29234
29933
  }
29235
29934
  );
29236
29935
  }
29237
- return /* @__PURE__ */ jsx59(Fragment19, {});
29936
+ return /* @__PURE__ */ jsx64(Fragment21, {});
29238
29937
  }
29239
29938
  if (pendingLaunch?.cached) {
29240
- return /* @__PURE__ */ jsx59(
29939
+ return /* @__PURE__ */ jsx64(
29241
29940
  TokenReuseScreen,
29242
29941
  {
29243
29942
  tokensPath: pendingLaunch.cached.tokensPath,
@@ -29248,7 +29947,7 @@ function App({ importOptions, inkClear }) {
29248
29947
  }
29249
29948
  );
29250
29949
  }
29251
- return /* @__PURE__ */ jsx59(
29950
+ return /* @__PURE__ */ jsx64(
29252
29951
  CredentialsScreen,
29253
29952
  {
29254
29953
  initial: importDefaults.credentials,
@@ -29257,19 +29956,19 @@ function App({ importOptions, inkClear }) {
29257
29956
  }
29258
29957
  );
29259
29958
  case "help":
29260
- return /* @__PURE__ */ jsx59(HelpScreen, { onDone: goToStart });
29959
+ return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
29261
29960
  case "upgrade":
29262
- return /* @__PURE__ */ jsx59(UpgradeScreen, { onDone: goToStart });
29961
+ return /* @__PURE__ */ jsx64(UpgradeScreen, { onDone: goToStart });
29263
29962
  case "settings":
29264
- return /* @__PURE__ */ jsx59(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
29963
+ return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
29265
29964
  case "settings-configuration":
29266
- return /* @__PURE__ */ jsx59(ConfigurationScreen, { onDone: goToSettings });
29965
+ return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
29267
29966
  case "settings-opt-in-analytics":
29268
- return /* @__PURE__ */ jsx59(OptInAnalyticsScreen, { onDone: goToSettings });
29967
+ return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
29269
29968
  case "settings-debug-mode":
29270
- return /* @__PURE__ */ jsx59(DebugModeScreen, { onDone: goToSettings });
29969
+ return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
29271
29970
  case "start":
29272
- return /* @__PURE__ */ jsx59(HomeScreen, { onNavigate: setScreen });
29971
+ return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
29273
29972
  }
29274
29973
  }
29275
29974
  async function runApp(renderApp, importOptions) {
@@ -29277,7 +29976,7 @@ async function runApp(renderApp, importOptions) {
29277
29976
  instance.clear?.();
29278
29977
  process.stdout.write("\x1B[H\x1B[0J");
29279
29978
  };
29280
- const instance = renderApp(/* @__PURE__ */ jsx59(App, { importOptions, inkClear }));
29979
+ const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
29281
29980
  await instance.waitUntilExit();
29282
29981
  }
29283
29982
  export {