@contentful/experience-design-system-cli 2.37.1-dev-build-8affe270.0 → 2.37.1-dev-build-91ca3bb8.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
@@ -28735,7 +28735,9 @@ async function testAgent(name, binary, model) {
28735
28735
  })
28736
28736
  );
28737
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`)];
28738
+ if (result.timedOut) {
28739
+ return [...checks, { ...fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`), timedOut: true }];
28740
+ }
28739
28741
  if (result.exitCode !== 0) {
28740
28742
  const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
28741
28743
  return [...checks, fail3("prompt", reason)];
@@ -28747,25 +28749,39 @@ function statusFromChecks(name, checks, savedBinary) {
28747
28749
  if (checks.some((check) => check.step === "path" && !check.ok)) {
28748
28750
  return savedBinary.trim() ? "not-found" : "not-configured";
28749
28751
  }
28752
+ const prompt = checks.find((check) => check.step === "prompt");
28753
+ if (prompt) {
28754
+ if (prompt.ok) return "ready";
28755
+ return prompt.timedOut ? "timed-out" : "test-failed";
28756
+ }
28750
28757
  const login = checks.find((check) => check.step === "login");
28751
28758
  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
28759
  return name === "claude" ? "ready" : "unknown";
28755
28760
  }
28756
28761
  function setupHint(name, status) {
28757
28762
  if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set its command path in settings`;
28758
28763
  if (status === "not-found") return `${INSTALL_HINTS[name]}, or correct the command path in settings`;
28759
28764
  if (status === "not-logged-in") return LOGIN_HINTS[name];
28765
+ if (status === "test-failed") return `read the test message; if it is a login problem, ${LOGIN_HINTS[name]}`;
28766
+ if (status === "timed-out") return "it may be slow or waiting for input; run the test again, or try it in a terminal";
28760
28767
  if (status === "unknown") return "run a full test to confirm it is logged in";
28761
28768
  return "";
28762
28769
  }
28770
+ function testOutcome(checks) {
28771
+ const prompt = checks?.find((check) => check.step === "prompt");
28772
+ if (!prompt) return void 0;
28773
+ if (prompt.ok) return { ok: true, text: `Test passed: ${prompt.detail}` };
28774
+ if (prompt.timedOut) return { ok: false, text: `Test timed out: ${prompt.detail}` };
28775
+ return { ok: false, text: `Test failed: ${prompt.detail}` };
28776
+ }
28763
28777
  var LIST_STATUS = {
28764
28778
  checking: { symbol: "\u2026", text: "checking", tone: "muted" },
28765
28779
  ready: { symbol: "\u25CF", text: "ready", tone: "ok" },
28766
28780
  "not-configured": { symbol: "\u25CB", text: "not installed", tone: "muted" },
28767
28781
  "not-found": { symbol: "\u25CB", text: "not installed", tone: "bad" },
28768
28782
  "not-logged-in": { symbol: "\u25D0", text: "not logged in", tone: "bad" },
28783
+ "test-failed": { symbol: "\u2717", text: "test failed", tone: "bad" },
28784
+ "timed-out": { symbol: "\u2717", text: "test timed out", tone: "bad" },
28769
28785
  unknown: { symbol: "\u25D0", text: "installed, login unknown", tone: "muted" }
28770
28786
  };
28771
28787
  function modelLine(name, savedModel) {
@@ -28820,8 +28836,8 @@ function statusRows(_name, checks, savedBinary) {
28820
28836
  } else if (prompt) {
28821
28837
  rows.push({
28822
28838
  label: "Login",
28823
- value: prompt.ok ? "confirmed by the test" : "see the test result",
28824
- tone: prompt.ok ? "ok" : "bad"
28839
+ value: prompt.ok ? "confirmed by the test" : prompt.timedOut ? "unknown (the test timed out)" : "see the test result",
28840
+ tone: prompt.ok ? "ok" : prompt.timedOut ? "muted" : "bad"
28825
28841
  });
28826
28842
  } else {
28827
28843
  rows.push({ label: "Login", value: "not checked (use Run test)", tone: "muted" });
@@ -28882,12 +28898,26 @@ function applyBinaryOverrides(config) {
28882
28898
  }
28883
28899
 
28884
28900
  // 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";
28901
+ import { jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
28886
28902
  var FOCUS_ORDER = ["binary", "model", "test"];
28887
28903
  var FIELDS2 = ["binary", "model"];
28888
28904
  var FIELD_LABEL = { binary: "Command path", model: "Model" };
28889
28905
  var LABEL_WIDTH = "Command path".length;
28906
+ var LABEL_GAP = 2;
28907
+ var POINTER_WIDTH = 2;
28890
28908
  var fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
28909
+ function Row2({
28910
+ pointer,
28911
+ label,
28912
+ labelProps,
28913
+ children
28914
+ }) {
28915
+ return /* @__PURE__ */ jsxs45(Box44, { children: [
28916
+ /* @__PURE__ */ jsx56(Box44, { width: POINTER_WIDTH, flexShrink: 0, children: pointer }),
28917
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH + LABEL_GAP, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, ...labelProps, children: label }) }),
28918
+ children
28919
+ ] });
28920
+ }
28891
28921
  function Section2({
28892
28922
  title,
28893
28923
  note,
@@ -28933,17 +28963,22 @@ function AgentDetail({
28933
28963
  setNotice(null);
28934
28964
  writeAgentConfig(config).then(() => {
28935
28965
  applyBinaryOverrides(config);
28936
- setNotice({ kind: "success", text: `${AGENT_LABELS[name]} settings saved` });
28966
+ setNotice({ kind: "success", text: `Saved: ${AGENT_LABELS[name]} settings are written to config.json` });
28937
28967
  }).catch(
28938
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
28968
+ (err) => setNotice({ kind: "error", text: `Not saved: ${err instanceof Error ? err.message : String(err)}` })
28939
28969
  ).finally(() => setSaving(false));
28940
28970
  };
28941
28971
  const runTest = () => {
28942
28972
  setTesting(true);
28943
28973
  setNotice(null);
28944
- setChecks(void 0);
28945
- testAgent(name, settings.binary, settings.model).then(setChecks).catch(
28946
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "The test could not run" })
28974
+ testAgent(name, settings.binary, settings.model).then((result) => {
28975
+ setChecks(result);
28976
+ const outcome = testOutcome(result);
28977
+ setNotice(
28978
+ outcome ? { kind: outcome.ok ? "success" : "error", text: outcome.text } : { kind: "error", text: "Test not run: the agent could not be started (see Status)" }
28979
+ );
28980
+ }).catch(
28981
+ (err) => setNotice({ kind: "error", text: `Test could not run: ${err instanceof Error ? err.message : String(err)}` })
28947
28982
  ).finally(() => setTesting(false));
28948
28983
  };
28949
28984
  const focused = FOCUS_ORDER[focusIndex];
@@ -28992,47 +29027,40 @@ function AgentDetail({
28992
29027
  return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
28993
29028
  /* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
28994
29029
  /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
29030
+ (notice || testing || saving) && /* @__PURE__ */ jsx56(Box44, { marginTop: 1, children: testing || saving ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.accent, children: testing ? "\u2026 Running the test (up to 60s)" : "\u2026 Saving" }) : notice && /* @__PURE__ */ jsxs45(Text47, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29031
+ notice.kind === "success" ? "\u2713" : "\u2717",
29032
+ " ",
29033
+ notice.text
29034
+ ] }) }),
28995
29035
  /* @__PURE__ */ jsxs45(Section2, { title: "CONFIGURE", note: "you can change these", interactive: true, children: [
28996
29036
  FIELDS2.map((field) => {
28997
29037
  const isFocused = focused === field;
28998
29038
  const value = settings[field];
28999
- return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
29000
- pointer(isFocused),
29001
- /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
29002
- isFocused && editing ? /* @__PURE__ */ jsx56(
29003
- TextInput4,
29004
- {
29005
- value,
29006
- onChange: (next) => setField(field, next),
29007
- onSubmit: () => setEditing(false)
29008
- }
29009
- ) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
29010
- !value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
29011
- ] }, field);
29039
+ const display = isFocused && editing ? /* @__PURE__ */ jsx56(TextInput4, { value, onChange: (next) => setField(field, next), onSubmit: () => setEditing(false) }) : value ? /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }) : /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) });
29040
+ return /* @__PURE__ */ jsx56(
29041
+ Row2,
29042
+ {
29043
+ pointer: pointer(isFocused),
29044
+ label: FIELD_LABEL[field],
29045
+ labelProps: { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted },
29046
+ children: display
29047
+ },
29048
+ field
29049
+ );
29012
29050
  }),
29013
- /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
29014
- pointer(focused === "test"),
29015
- /* @__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" }) }),
29016
- /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
29017
- ] })
29051
+ /* @__PURE__ */ jsx56(
29052
+ Row2,
29053
+ {
29054
+ pointer: pointer(focused === "test"),
29055
+ label: "Run test",
29056
+ labelProps: { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted },
29057
+ children: /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
29058
+ }
29059
+ )
29018
29060
  ] }),
29019
29061
  /* @__PURE__ */ jsxs45(Section2, { title: "STATUS", note: "read only", children: [
29020
- statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
29021
- /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: row.label }) }),
29022
- /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value })
29023
- ] }, row.label)),
29024
- hint && /* @__PURE__ */ jsx56(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text47, { color: PALETTE.muted, children: [
29025
- "Setup: ",
29026
- hint
29027
- ] }) })
29028
- ] }),
29029
- notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
29030
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
29031
- /* @__PURE__ */ jsxs45(Text47, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29032
- notice.kind === "success" ? "\u2713" : "\u2717",
29033
- " ",
29034
- notice.text
29035
- ] })
29062
+ statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx56(Row2, { pointer: null, label: row.label, children: /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label)),
29063
+ hint && /* @__PURE__ */ jsx56(Row2, { pointer: null, label: "Setup", children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: hint }) })
29036
29064
  ] }),
29037
29065
  /* @__PURE__ */ jsx56(Text47, { children: " " }),
29038
29066
  /* @__PURE__ */ jsx56(
@@ -29056,7 +29084,7 @@ function AgentDetail({
29056
29084
  }
29057
29085
 
29058
29086
  // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
29059
- import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
29087
+ import { Fragment as Fragment17, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
29060
29088
  var NAME_WIDTH = 16;
29061
29089
  var PANEL_LABEL_WIDTH = "Command".length;
29062
29090
  function AgentsScreen({ onDone }) {
@@ -29064,6 +29092,7 @@ function AgentsScreen({ onDone }) {
29064
29092
  const [focus, setFocus] = useState30(0);
29065
29093
  const [open, setOpen] = useState30(null);
29066
29094
  const [notice, setNotice] = useState30(null);
29095
+ const [saving, setSaving] = useState30(false);
29067
29096
  const [checks, setChecks] = useState30({});
29068
29097
  const inspectAll = (loaded) => {
29069
29098
  for (const name of AGENT_NAMES) {
@@ -29085,19 +29114,25 @@ function AgentsScreen({ onDone }) {
29085
29114
  });
29086
29115
  }, []);
29087
29116
  const makeDefault = (name) => {
29088
- if (!config) return;
29117
+ if (!config || saving) return;
29089
29118
  if (name === config.defaultAgent) {
29090
29119
  setNotice({ kind: "success", text: `${AGENT_LABELS[name]} is already the default agent` });
29091
29120
  return;
29092
29121
  }
29093
- const next = { ...config, defaultAgent: name };
29094
- setConfig(next);
29095
- writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` })).catch(
29096
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
29097
- );
29122
+ setSaving(true);
29123
+ setNotice(null);
29124
+ writeAgentConfig({ ...config, defaultAgent: name }).then(() => {
29125
+ setConfig((current) => current ? { ...current, defaultAgent: name } : current);
29126
+ setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` });
29127
+ }).catch(
29128
+ (err) => setNotice({
29129
+ kind: "error",
29130
+ text: `Default agent not changed: ${err instanceof Error ? err.message : String(err)}`
29131
+ })
29132
+ ).finally(() => setSaving(false));
29098
29133
  };
29099
29134
  useInput12((input, key) => {
29100
- if (!config || open) return;
29135
+ if (!config || open || saving) return;
29101
29136
  const focused = AGENT_NAMES[focus];
29102
29137
  if (key.upArrow || key.downArrow || key.tab) setNotice(null);
29103
29138
  if (key.upArrow) {
@@ -29153,7 +29188,8 @@ function AgentsScreen({ onDone }) {
29153
29188
  /* @__PURE__ */ jsx57(Text48, { children: " " }),
29154
29189
  /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
29155
29190
  /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Default agent" }),
29156
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] })
29191
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
29192
+ saving && /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "\u2026 saving" })
29157
29193
  ] }),
29158
29194
  /* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
29159
29195
  /* @__PURE__ */ jsx57(Text48, { children: " " }),
@@ -29177,9 +29213,9 @@ function AgentsScreen({ onDone }) {
29177
29213
  /* @__PURE__ */ jsx57(Text48, { color: TONE_COLOR[row.tone], children: row.value })
29178
29214
  ] }, row.label))
29179
29215
  ] }),
29180
- notice && /* @__PURE__ */ jsxs46(Fragment18, { children: [
29216
+ notice && /* @__PURE__ */ jsxs46(Fragment17, { children: [
29181
29217
  /* @__PURE__ */ jsx57(Text48, { children: " " }),
29182
- /* @__PURE__ */ jsxs46(Text48, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29218
+ /* @__PURE__ */ jsxs46(Text48, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29183
29219
  notice.kind === "success" ? "\u2713" : "\u2717",
29184
29220
  " ",
29185
29221
  notice.text
@@ -29209,7 +29245,7 @@ init_debug_store();
29209
29245
  import { useState as useState31 } from "react";
29210
29246
  import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
29211
29247
  import TextInput5 from "ink-text-input";
29212
- import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
29248
+ import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
29213
29249
  function FieldForm({
29214
29250
  title,
29215
29251
  subtitle,
@@ -29284,7 +29320,7 @@ function FieldForm({
29284
29320
  field.hint && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: field.hint })
29285
29321
  ] }, field.key);
29286
29322
  }) }),
29287
- notice && /* @__PURE__ */ jsxs47(Fragment19, { children: [
29323
+ notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
29288
29324
  /* @__PURE__ */ jsx58(Text49, { children: " " }),
29289
29325
  /* @__PURE__ */ jsxs47(Text49, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
29290
29326
  notice.kind === "success" ? "\u2713" : "\u2717",
@@ -29496,7 +29532,7 @@ async function writeAnalyticsSetting(setting) {
29496
29532
 
29497
29533
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
29498
29534
  init_debug_store();
29499
- import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
29535
+ import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
29500
29536
  function OptInAnalyticsScreen({ onDone }) {
29501
29537
  const [loading, setLoading] = useState34(true);
29502
29538
  const [enabled, setEnabled] = useState34(true);
@@ -29530,7 +29566,7 @@ function OptInAnalyticsScreen({ onDone }) {
29530
29566
  return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
29531
29567
  /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
29532
29568
  /* @__PURE__ */ jsx61(Text52, { children: " " }),
29533
- loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
29569
+ loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment19, { children: [
29534
29570
  /* @__PURE__ */ jsxs50(Text52, { children: [
29535
29571
  "Share anonymous usage data:",
29536
29572
  " ",
@@ -29684,7 +29720,7 @@ function DebugModeScreen({ onDone }) {
29684
29720
  }
29685
29721
 
29686
29722
  // packages/experience-design-system-cli/app.tsx
29687
- import { Fragment as Fragment21, jsx as jsx64 } from "react/jsx-runtime";
29723
+ import { Fragment as Fragment20, jsx as jsx64 } from "react/jsx-runtime";
29688
29724
  function App({ importOptions, inkClear }) {
29689
29725
  const [screen, setScreen] = useState37("start");
29690
29726
  const [importExitCode, setImportExitCode] = useState37();
@@ -29853,7 +29889,7 @@ function App({ importOptions, inkClear }) {
29853
29889
  }
29854
29890
  );
29855
29891
  }
29856
- if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment21, {});
29892
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment20, {});
29857
29893
  if (projectPath === void 0) {
29858
29894
  return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
29859
29895
  }
@@ -29892,7 +29928,7 @@ function App({ importOptions, inkClear }) {
29892
29928
  }
29893
29929
  );
29894
29930
  }
29895
- return /* @__PURE__ */ jsx64(Fragment21, {});
29931
+ return /* @__PURE__ */ jsx64(Fragment20, {});
29896
29932
  }
29897
29933
  if (scopeRun && scopeFlow) {
29898
29934
  if (scopeFlow.status === "failed") {
@@ -29929,7 +29965,7 @@ function App({ importOptions, inkClear }) {
29929
29965
  }
29930
29966
  );
29931
29967
  }
29932
- return /* @__PURE__ */ jsx64(Fragment21, {});
29968
+ return /* @__PURE__ */ jsx64(Fragment20, {});
29933
29969
  }
29934
29970
  if (pendingLaunch?.cached) {
29935
29971
  return /* @__PURE__ */ jsx64(
package/dist/index.js CHANGED
@@ -33172,7 +33172,9 @@ async function testAgent(name, binary, model) {
33172
33172
  })
33173
33173
  );
33174
33174
  const seconds = ((Date.now() - started) / 1e3).toFixed(1);
33175
- if (result.timedOut) return [...checks, fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`)];
33175
+ if (result.timedOut) {
33176
+ return [...checks, { ...fail3("prompt", `no answer within ${PROMPT_TIMEOUT_MS / 1e3}s`), timedOut: true }];
33177
+ }
33176
33178
  if (result.exitCode !== 0) {
33177
33179
  const reason = result.stderr.trim().split("\n").pop()?.slice(0, 160) || `exited with code ${result.exitCode}`;
33178
33180
  return [...checks, fail3("prompt", reason)];
@@ -33184,19 +33186,31 @@ function statusFromChecks(name, checks, savedBinary) {
33184
33186
  if (checks.some((check) => check.step === "path" && !check.ok)) {
33185
33187
  return savedBinary.trim() ? "not-found" : "not-configured";
33186
33188
  }
33189
+ const prompt = checks.find((check) => check.step === "prompt");
33190
+ if (prompt) {
33191
+ if (prompt.ok) return "ready";
33192
+ return prompt.timedOut ? "timed-out" : "test-failed";
33193
+ }
33187
33194
  const login = checks.find((check) => check.step === "login");
33188
33195
  if (login) return login.ok ? "ready" : "not-logged-in";
33189
- const prompt = checks.find((check) => check.step === "prompt");
33190
- if (prompt) return prompt.ok ? "ready" : "not-logged-in";
33191
33196
  return name === "claude" ? "ready" : "unknown";
33192
33197
  }
33193
33198
  function setupHint(name, status) {
33194
33199
  if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set its command path in settings`;
33195
33200
  if (status === "not-found") return `${INSTALL_HINTS[name]}, or correct the command path in settings`;
33196
33201
  if (status === "not-logged-in") return LOGIN_HINTS[name];
33202
+ if (status === "test-failed") return `read the test message; if it is a login problem, ${LOGIN_HINTS[name]}`;
33203
+ if (status === "timed-out") return "it may be slow or waiting for input; run the test again, or try it in a terminal";
33197
33204
  if (status === "unknown") return "run a full test to confirm it is logged in";
33198
33205
  return "";
33199
33206
  }
33207
+ function testOutcome(checks) {
33208
+ const prompt = checks?.find((check) => check.step === "prompt");
33209
+ if (!prompt) return void 0;
33210
+ if (prompt.ok) return { ok: true, text: `Test passed: ${prompt.detail}` };
33211
+ if (prompt.timedOut) return { ok: false, text: `Test timed out: ${prompt.detail}` };
33212
+ return { ok: false, text: `Test failed: ${prompt.detail}` };
33213
+ }
33200
33214
  function modelLine(name, savedModel) {
33201
33215
  const model = savedModel.trim();
33202
33216
  return model ? model : `${defaultModelLabel(name)} (built-in default)`;
@@ -33249,8 +33263,8 @@ function statusRows(_name, checks, savedBinary) {
33249
33263
  } else if (prompt) {
33250
33264
  rows.push({
33251
33265
  label: "Login",
33252
- value: prompt.ok ? "confirmed by the test" : "see the test result",
33253
- tone: prompt.ok ? "ok" : "bad"
33266
+ value: prompt.ok ? "confirmed by the test" : prompt.timedOut ? "unknown (the test timed out)" : "see the test result",
33267
+ tone: prompt.ok ? "ok" : prompt.timedOut ? "muted" : "bad"
33254
33268
  });
33255
33269
  } else {
33256
33270
  rows.push({ label: "Login", value: "not checked (use Run test)", tone: "muted" });
@@ -33299,6 +33313,8 @@ var init_agent_status = __esm({
33299
33313
  "not-configured": { symbol: "\u25CB", text: "not installed", tone: "muted" },
33300
33314
  "not-found": { symbol: "\u25CB", text: "not installed", tone: "bad" },
33301
33315
  "not-logged-in": { symbol: "\u25D0", text: "not logged in", tone: "bad" },
33316
+ "test-failed": { symbol: "\u2717", text: "test failed", tone: "bad" },
33317
+ "timed-out": { symbol: "\u2717", text: "test timed out", tone: "bad" },
33302
33318
  unknown: { symbol: "\u25D0", text: "installed, login unknown", tone: "muted" }
33303
33319
  };
33304
33320
  }
@@ -33333,7 +33349,19 @@ var init_AgentStatusBadge = __esm({
33333
33349
  import { useEffect as useEffect22, useState as useState29 } from "react";
33334
33350
  import { Box as Box44, Text as Text47, useInput as useInput11 } from "ink";
33335
33351
  import TextInput4 from "ink-text-input";
33336
- import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
33352
+ import { jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
33353
+ function Row2({
33354
+ pointer,
33355
+ label,
33356
+ labelProps,
33357
+ children
33358
+ }) {
33359
+ return /* @__PURE__ */ jsxs45(Box44, { children: [
33360
+ /* @__PURE__ */ jsx56(Box44, { width: POINTER_WIDTH, flexShrink: 0, children: pointer }),
33361
+ /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH + LABEL_GAP, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, ...labelProps, children: label }) }),
33362
+ children
33363
+ ] });
33364
+ }
33337
33365
  function Section2({
33338
33366
  title,
33339
33367
  note,
@@ -33379,17 +33407,22 @@ function AgentDetail({
33379
33407
  setNotice(null);
33380
33408
  writeAgentConfig(config).then(() => {
33381
33409
  applyBinaryOverrides(config);
33382
- setNotice({ kind: "success", text: `${AGENT_LABELS[name]} settings saved` });
33410
+ setNotice({ kind: "success", text: `Saved: ${AGENT_LABELS[name]} settings are written to config.json` });
33383
33411
  }).catch(
33384
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
33412
+ (err) => setNotice({ kind: "error", text: `Not saved: ${err instanceof Error ? err.message : String(err)}` })
33385
33413
  ).finally(() => setSaving(false));
33386
33414
  };
33387
33415
  const runTest = () => {
33388
33416
  setTesting(true);
33389
33417
  setNotice(null);
33390
- setChecks(void 0);
33391
- testAgent(name, settings.binary, settings.model).then(setChecks).catch(
33392
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "The test could not run" })
33418
+ testAgent(name, settings.binary, settings.model).then((result) => {
33419
+ setChecks(result);
33420
+ const outcome = testOutcome(result);
33421
+ setNotice(
33422
+ outcome ? { kind: outcome.ok ? "success" : "error", text: outcome.text } : { kind: "error", text: "Test not run: the agent could not be started (see Status)" }
33423
+ );
33424
+ }).catch(
33425
+ (err) => setNotice({ kind: "error", text: `Test could not run: ${err instanceof Error ? err.message : String(err)}` })
33393
33426
  ).finally(() => setTesting(false));
33394
33427
  };
33395
33428
  const focused = FOCUS_ORDER[focusIndex];
@@ -33438,47 +33471,40 @@ function AgentDetail({
33438
33471
  return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
33439
33472
  /* @__PURE__ */ jsx56(Text47, { bold: true, children: AGENT_LABELS[name] }),
33440
33473
  /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_HINTS[name]}\` command.` }),
33474
+ (notice || testing || saving) && /* @__PURE__ */ jsx56(Box44, { marginTop: 1, children: testing || saving ? /* @__PURE__ */ jsx56(Text47, { color: PALETTE.accent, children: testing ? "\u2026 Running the test (up to 60s)" : "\u2026 Saving" }) : notice && /* @__PURE__ */ jsxs45(Text47, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33475
+ notice.kind === "success" ? "\u2713" : "\u2717",
33476
+ " ",
33477
+ notice.text
33478
+ ] }) }),
33441
33479
  /* @__PURE__ */ jsxs45(Section2, { title: "CONFIGURE", note: "you can change these", interactive: true, children: [
33442
33480
  FIELDS2.map((field) => {
33443
33481
  const isFocused = focused === field;
33444
33482
  const value = settings[field];
33445
- return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33446
- pointer(isFocused),
33447
- /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted, children: FIELD_LABEL[field] }) }),
33448
- isFocused && editing ? /* @__PURE__ */ jsx56(
33449
- TextInput4,
33450
- {
33451
- value,
33452
- onChange: (next) => setField(field, next),
33453
- onSubmit: () => setEditing(false)
33454
- }
33455
- ) : /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }),
33456
- !value && /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) })
33457
- ] }, field);
33483
+ const display = isFocused && editing ? /* @__PURE__ */ jsx56(TextInput4, { value, onChange: (next) => setField(field, next), onSubmit: () => setEditing(false) }) : value ? /* @__PURE__ */ jsx56(Text47, { bold: true, children: value }) : /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: fieldHint(name, field) });
33484
+ return /* @__PURE__ */ jsx56(
33485
+ Row2,
33486
+ {
33487
+ pointer: pointer(isFocused),
33488
+ label: FIELD_LABEL[field],
33489
+ labelProps: { bold: isFocused, color: isFocused ? PALETTE.accent : PALETTE.muted },
33490
+ children: display
33491
+ },
33492
+ field
33493
+ );
33458
33494
  }),
33459
- /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
33460
- pointer(focused === "test"),
33461
- /* @__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" }) }),
33462
- /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
33463
- ] })
33495
+ /* @__PURE__ */ jsx56(
33496
+ Row2,
33497
+ {
33498
+ pointer: pointer(focused === "test"),
33499
+ label: "Run test",
33500
+ labelProps: { bold: focused === "test", color: focused === "test" ? PALETTE.accent : PALETTE.muted },
33501
+ children: /* @__PURE__ */ jsx56(Text47, { color: testing ? PALETTE.accent : PALETTE.muted, children: testing ? "running..." : "sends one small prompt (uses a few tokens)" })
33502
+ }
33503
+ )
33464
33504
  ] }),
33465
33505
  /* @__PURE__ */ jsxs45(Section2, { title: "STATUS", note: "read only", children: [
33466
- statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsxs45(Box44, { gap: 1, paddingLeft: 2, children: [
33467
- /* @__PURE__ */ jsx56(Box44, { width: LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: row.label }) }),
33468
- /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value })
33469
- ] }, row.label)),
33470
- hint && /* @__PURE__ */ jsx56(Box44, { paddingLeft: 2, children: /* @__PURE__ */ jsxs45(Text47, { color: PALETTE.muted, children: [
33471
- "Setup: ",
33472
- hint
33473
- ] }) })
33474
- ] }),
33475
- notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
33476
- /* @__PURE__ */ jsx56(Text47, { children: " " }),
33477
- /* @__PURE__ */ jsxs45(Text47, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33478
- notice.kind === "success" ? "\u2713" : "\u2717",
33479
- " ",
33480
- notice.text
33481
- ] })
33506
+ statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx56(Row2, { pointer: null, label: row.label, children: /* @__PURE__ */ jsx56(Text47, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label)),
33507
+ hint && /* @__PURE__ */ jsx56(Row2, { pointer: null, label: "Setup", children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: hint }) })
33482
33508
  ] }),
33483
33509
  /* @__PURE__ */ jsx56(Text47, { children: " " }),
33484
33510
  /* @__PURE__ */ jsx56(
@@ -33500,7 +33526,7 @@ function AgentDetail({
33500
33526
  )
33501
33527
  ] });
33502
33528
  }
33503
- var FOCUS_ORDER, FIELDS2, FIELD_LABEL, LABEL_WIDTH, fieldHint;
33529
+ var FOCUS_ORDER, FIELDS2, FIELD_LABEL, LABEL_WIDTH, LABEL_GAP, POINTER_WIDTH, fieldHint;
33504
33530
  var init_AgentDetail = __esm({
33505
33531
  "packages/experience-design-system-cli/src/tui/settings/agents/AgentDetail.tsx"() {
33506
33532
  "use strict";
@@ -33514,6 +33540,8 @@ var init_AgentDetail = __esm({
33514
33540
  FIELDS2 = ["binary", "model"];
33515
33541
  FIELD_LABEL = { binary: "Command path", model: "Model" };
33516
33542
  LABEL_WIDTH = "Command path".length;
33543
+ LABEL_GAP = 2;
33544
+ POINTER_WIDTH = 2;
33517
33545
  fieldHint = (name, field) => field === "binary" ? `(empty: \`${AGENT_HINTS[name]}\` from the PATH)` : `(empty: ${defaultModelLabel(name)})`;
33518
33546
  }
33519
33547
  });
@@ -33521,12 +33549,13 @@ var init_AgentDetail = __esm({
33521
33549
  // packages/experience-design-system-cli/src/tui/settings/agents/AgentScreens.tsx
33522
33550
  import { useEffect as useEffect23, useState as useState30 } from "react";
33523
33551
  import { Box as Box45, Text as Text48, useInput as useInput12 } from "ink";
33524
- import { Fragment as Fragment18, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33552
+ import { Fragment as Fragment17, jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
33525
33553
  function AgentsScreen({ onDone }) {
33526
33554
  const [config, setConfig] = useState30(null);
33527
33555
  const [focus, setFocus] = useState30(0);
33528
33556
  const [open, setOpen] = useState30(null);
33529
33557
  const [notice, setNotice] = useState30(null);
33558
+ const [saving, setSaving] = useState30(false);
33530
33559
  const [checks, setChecks] = useState30({});
33531
33560
  const inspectAll = (loaded) => {
33532
33561
  for (const name of AGENT_NAMES) {
@@ -33548,19 +33577,25 @@ function AgentsScreen({ onDone }) {
33548
33577
  });
33549
33578
  }, []);
33550
33579
  const makeDefault = (name) => {
33551
- if (!config) return;
33580
+ if (!config || saving) return;
33552
33581
  if (name === config.defaultAgent) {
33553
33582
  setNotice({ kind: "success", text: `${AGENT_LABELS[name]} is already the default agent` });
33554
33583
  return;
33555
33584
  }
33556
- const next = { ...config, defaultAgent: name };
33557
- setConfig(next);
33558
- writeAgentConfig(next).then(() => setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` })).catch(
33559
- (err) => setNotice({ kind: "error", text: err instanceof Error ? err.message : "Failed to save" })
33560
- );
33585
+ setSaving(true);
33586
+ setNotice(null);
33587
+ writeAgentConfig({ ...config, defaultAgent: name }).then(() => {
33588
+ setConfig((current) => current ? { ...current, defaultAgent: name } : current);
33589
+ setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` });
33590
+ }).catch(
33591
+ (err) => setNotice({
33592
+ kind: "error",
33593
+ text: `Default agent not changed: ${err instanceof Error ? err.message : String(err)}`
33594
+ })
33595
+ ).finally(() => setSaving(false));
33561
33596
  };
33562
33597
  useInput12((input, key) => {
33563
- if (!config || open) return;
33598
+ if (!config || open || saving) return;
33564
33599
  const focused = AGENT_NAMES[focus];
33565
33600
  if (key.upArrow || key.downArrow || key.tab) setNotice(null);
33566
33601
  if (key.upArrow) {
@@ -33616,7 +33651,8 @@ function AgentsScreen({ onDone }) {
33616
33651
  /* @__PURE__ */ jsx57(Text48, { children: " " }),
33617
33652
  /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
33618
33653
  /* @__PURE__ */ jsx57(Text48, { color: PALETTE.muted, children: "Default agent" }),
33619
- /* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] })
33654
+ /* @__PURE__ */ jsx57(Text48, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
33655
+ saving && /* @__PURE__ */ jsx57(Text48, { color: PALETTE.accent, children: "\u2026 saving" })
33620
33656
  ] }),
33621
33657
  /* @__PURE__ */ jsxs46(Box45, { marginTop: 1, gap: 1, children: [
33622
33658
  /* @__PURE__ */ jsx57(Text48, { children: " " }),
@@ -33640,9 +33676,9 @@ function AgentsScreen({ onDone }) {
33640
33676
  /* @__PURE__ */ jsx57(Text48, { color: TONE_COLOR[row.tone], children: row.value })
33641
33677
  ] }, row.label))
33642
33678
  ] }),
33643
- notice && /* @__PURE__ */ jsxs46(Fragment18, { children: [
33679
+ notice && /* @__PURE__ */ jsxs46(Fragment17, { children: [
33644
33680
  /* @__PURE__ */ jsx57(Text48, { children: " " }),
33645
- /* @__PURE__ */ jsxs46(Text48, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33681
+ /* @__PURE__ */ jsxs46(Text48, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33646
33682
  notice.kind === "success" ? "\u2713" : "\u2717",
33647
33683
  " ",
33648
33684
  notice.text
@@ -33683,7 +33719,7 @@ var init_AgentScreens = __esm({
33683
33719
  import { useState as useState31 } from "react";
33684
33720
  import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
33685
33721
  import TextInput5 from "ink-text-input";
33686
- import { Fragment as Fragment19, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
33722
+ import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
33687
33723
  function FieldForm({
33688
33724
  title,
33689
33725
  subtitle,
@@ -33758,7 +33794,7 @@ function FieldForm({
33758
33794
  field.hint && /* @__PURE__ */ jsx58(Text49, { color: PALETTE.muted, children: field.hint })
33759
33795
  ] }, field.key);
33760
33796
  }) }),
33761
- notice && /* @__PURE__ */ jsxs47(Fragment19, { children: [
33797
+ notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
33762
33798
  /* @__PURE__ */ jsx58(Text49, { children: " " }),
33763
33799
  /* @__PURE__ */ jsxs47(Text49, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
33764
33800
  notice.kind === "success" ? "\u2713" : "\u2717",
@@ -33989,7 +34025,7 @@ var init_ContentfulConfigScreen = __esm({
33989
34025
  // packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
33990
34026
  import { useEffect as useEffect25, useState as useState34 } from "react";
33991
34027
  import { Box as Box49, Text as Text52, useInput as useInput15 } from "ink";
33992
- import { Fragment as Fragment20, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
34028
+ import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
33993
34029
  function OptInAnalyticsScreen({ onDone }) {
33994
34030
  const [loading, setLoading] = useState34(true);
33995
34031
  const [enabled, setEnabled] = useState34(true);
@@ -34023,7 +34059,7 @@ function OptInAnalyticsScreen({ onDone }) {
34023
34059
  return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
34024
34060
  /* @__PURE__ */ jsx61(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
34025
34061
  /* @__PURE__ */ jsx61(Text52, { children: " " }),
34026
- loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
34062
+ loading ? /* @__PURE__ */ jsx61(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment19, { children: [
34027
34063
  /* @__PURE__ */ jsxs50(Text52, { children: [
34028
34064
  "Share anonymous usage data:",
34029
34065
  " ",
@@ -34206,7 +34242,7 @@ __export(app_exports, {
34206
34242
  });
34207
34243
  import { join as join28 } from "node:path";
34208
34244
  import { useEffect as useEffect28, useState as useState37 } from "react";
34209
- import { Fragment as Fragment21, jsx as jsx64 } from "react/jsx-runtime";
34245
+ import { Fragment as Fragment20, jsx as jsx64 } from "react/jsx-runtime";
34210
34246
  function App({ importOptions, inkClear }) {
34211
34247
  const [screen, setScreen] = useState37("start");
34212
34248
  const [importExitCode, setImportExitCode] = useState37();
@@ -34375,7 +34411,7 @@ function App({ importOptions, inkClear }) {
34375
34411
  }
34376
34412
  );
34377
34413
  }
34378
- if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment21, {});
34414
+ if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment20, {});
34379
34415
  if (projectPath === void 0) {
34380
34416
  return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
34381
34417
  }
@@ -34414,7 +34450,7 @@ function App({ importOptions, inkClear }) {
34414
34450
  }
34415
34451
  );
34416
34452
  }
34417
- return /* @__PURE__ */ jsx64(Fragment21, {});
34453
+ return /* @__PURE__ */ jsx64(Fragment20, {});
34418
34454
  }
34419
34455
  if (scopeRun && scopeFlow) {
34420
34456
  if (scopeFlow.status === "failed") {
@@ -34451,7 +34487,7 @@ function App({ importOptions, inkClear }) {
34451
34487
  }
34452
34488
  );
34453
34489
  }
34454
- return /* @__PURE__ */ jsx64(Fragment21, {});
34490
+ return /* @__PURE__ */ jsx64(Fragment20, {});
34455
34491
  }
34456
34492
  if (pendingLaunch?.cached) {
34457
34493
  return /* @__PURE__ */ jsx64(
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-8affe270.0",
3
+ "version": "2.37.1-dev-build-91ca3bb8.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -5,12 +5,14 @@ export type AgentCheck = {
5
5
  ok: boolean;
6
6
  /** One line for the user: the version string, the reason it failed, or what to run next. */
7
7
  detail: string;
8
+ /** Only on the prompt step: the agent did not answer in time. That is not the same as a failure or a missing login. */
9
+ timedOut?: boolean;
8
10
  };
9
11
  /**
10
12
  * The one-word state shown on an agent's row. `not-configured` means no path is saved and the command is not on the
11
13
  * PATH; `not-found` means a saved path does not work. `unknown` means it runs but its login cannot be checked.
12
14
  */
13
- export type AgentStatus = 'checking' | 'ready' | 'not-configured' | 'not-found' | 'not-logged-in' | 'unknown';
15
+ export type AgentStatus = 'checking' | 'ready' | 'not-configured' | 'not-found' | 'not-logged-in' | 'test-failed' | 'timed-out' | 'unknown';
14
16
  /**
15
17
  * The binary the import will actually run for this agent: the saved path if there is one, otherwise the built-in
16
18
  * command name. Shown in the form so the user sees what is used when the field is empty.
@@ -38,6 +40,14 @@ export type StatusRow = {
38
40
  value: string;
39
41
  tone: 'ok' | 'bad' | 'muted';
40
42
  };
43
+ /**
44
+ * How a full test went, in one line for a banner on the agent's screen. Undefined when no test has run (the quick checks
45
+ * alone are not a test), so the banner only appears after the user asked for one.
46
+ */
47
+ export declare function testOutcome(checks: readonly AgentCheck[] | undefined): {
48
+ ok: boolean;
49
+ text: string;
50
+ } | undefined;
41
51
  /**
42
52
  * The short form of a status for the list, where every row has to be scannable at a glance. The wording is plainer than
43
53
  * the detail panel's: "not installed" covers both "nothing saved" and "saved path broken", which the panel tells apart.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-8affe270.0",
3
+ "version": "2.37.1-dev-build-91ca3bb8.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-8affe270.0",
3
+ "version": "2.37.1-dev-build-91ca3bb8.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,8 +45,8 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-8affe270.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-8affe270.0"
48
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-91ca3bb8.0",
49
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-91ca3bb8.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",