@skein-code/cli 0.2.0 → 0.2.1

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/cli.js CHANGED
@@ -220,7 +220,7 @@ function isSqliteBusy(error) {
220
220
  // package.json
221
221
  var package_default = {
222
222
  name: "@skein-code/cli",
223
- version: "0.2.0",
223
+ version: "0.2.1",
224
224
  description: "A context-first, model-agnostic coding agent with an auditable terminal workspace.",
225
225
  type: "module",
226
226
  license: "MIT",
@@ -1966,6 +1966,9 @@ var envKeysForProvider = {
1966
1966
  gemini: ["GEMINI_API_KEY"],
1967
1967
  compatible: ["SKEIN_API_KEY", "MOSAIC_API_KEY"]
1968
1968
  };
1969
+ function providerApiKeyEnv(provider) {
1970
+ return envKeysForProvider[provider][0];
1971
+ }
1969
1972
  var defaultPermissions = {
1970
1973
  read: "allow",
1971
1974
  write: "ask",
@@ -10420,8 +10423,9 @@ function command(name, description, usage, aliases) {
10420
10423
  import stringWidth from "string-width";
10421
10424
  import stripAnsi2 from "strip-ansi";
10422
10425
  var controlCharacters = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/gu;
10426
+ var escapeSequences = /[[\]][0-9;?=>!]*[ -/]*[@-~]|[[\]][?=>][0-9;?=>!]*[a-zA-Z~]/gu;
10423
10427
  function sanitizeTerminalText(value) {
10424
- return stripAnsi2(value).replace(/\r\n?/g, "\n").replace(controlCharacters, "");
10428
+ return stripAnsi2(value).replace(escapeSequences, "").replace(/\r\n?/g, "\n").replace(controlCharacters, "");
10425
10429
  }
10426
10430
  function terminalEllipsis() {
10427
10431
  return process.env.SKEIN_GLYPHS === "ascii" || process.env.MOSAIC_GLYPHS === "ascii" ? "..." : "\u2026";
@@ -11678,12 +11682,7 @@ function ThemePreview({ name, width, glyphs }) {
11678
11682
  function Banner({ model, engine, workspace, version, width, glyphs }) {
11679
11683
  const theme = useTheme();
11680
11684
  const innerWidth = Math.max(1, safeWidth(width) - 2);
11681
- const art = [
11682
- "\u2591\u2588\u2580\u2580\u2591\u2588\u2591\u2588\u2591\u2588\u2580\u2580\u2591\u2580\u2588\u2580\u2591\u2588\u2580\u2588",
11683
- "\u2591\u2580\u2580\u2588\u2591\u2588\u2580\u2584\u2591\u2588\u2580\u2580\u2591\u2591\u2588\u2591\u2591\u2588\u2591\u2588",
11684
- "\u2591\u2580\u2580\u2580\u2591\u2580\u2591\u2580\u2591\u2580\u2580\u2580\u2591\u2580\u2580\u2580\u2591\u2580\u2591\u2580"
11685
- ];
11686
- const wordmarkFits = safeWidth(width) >= 44 && glyphs.borderStyle !== "classic";
11685
+ const wordmark = `${glyphs.brand} ${PRODUCT_NAME.toUpperCase().split("").join(" ")}`;
11687
11686
  const meta = [
11688
11687
  `model ${sanitizeInlineTerminalText(model)}`,
11689
11688
  `engine ${sanitizeInlineTerminalText(engine)}`,
@@ -11691,8 +11690,8 @@ function Banner({ model, engine, workspace, version, width, glyphs }) {
11691
11690
  ].join(` ${glyphs.separator} `);
11692
11691
  const tagline = "a terminal coding agent you can see through";
11693
11692
  return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [
11694
- wordmarkFits ? /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: art.map((line, index) => /* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: line }, index)) }) : /* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: `${glyphs.brand} ${PRODUCT_NAME.toUpperCase()}` }),
11695
- /* @__PURE__ */ jsx(Text, { color: theme.muted, children: truncateDisplay(`${glyphs.brand} ${PRODUCT_NAME} v${version} ${glyphs.separator} ${tagline}`, innerWidth) }),
11693
+ /* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: truncateDisplay(wordmark, innerWidth) }),
11694
+ /* @__PURE__ */ jsx(Text, { color: theme.muted, children: truncateDisplay(`v${version} ${glyphs.separator} ${tagline}`, innerWidth) }),
11696
11695
  /* @__PURE__ */ jsx(Text, { color: theme.dim, children: truncateDisplay(meta, innerWidth) }),
11697
11696
  /* @__PURE__ */ jsx(Text, { color: theme.dim, children: truncateDisplay(`type a request ${glyphs.separator} /help for commands ${glyphs.separator} @ to attach files`, innerWidth) })
11698
11697
  ] });
@@ -12638,7 +12637,7 @@ function SkeinApp({ runner, config, extensions, initialPrompt, askMode = false,
12638
12637
  const separator = ` ${glyphs.separator} `;
12639
12638
  const ellipsis = terminalEllipsis();
12640
12639
  const initialSession = runner.getSession();
12641
- const setupProblem = config.model.provider !== "compatible" && !config.model.apiKey ? `No ${config.model.provider} API key configured. Run ${PRODUCT_COMMAND} doctor for setup guidance.` : config.model.provider === "compatible" && !config.model.baseUrl ? "No compatible model endpoint configured. Set model.baseUrl or pass --base-url." : void 0;
12640
+ const setupProblem = config.model.provider !== "compatible" && !config.model.apiKey ? `No ${config.model.provider} API key found. Set it and restart: export ${providerApiKeyEnv(config.model.provider)}=<your-key>${separator}then run ${PRODUCT_COMMAND} again. Use ${PRODUCT_COMMAND} doctor to verify, or --model to switch provider.` : config.model.provider === "compatible" && !config.model.baseUrl ? `No model endpoint configured. Set one and restart: export SKEIN_BASE_URL=<endpoint>${separator}or pass --base-url <endpoint>. Run ${PRODUCT_COMMAND} doctor to verify.` : void 0;
12642
12641
  const colorEnabled = config.ui.color && !process.env.NO_COLOR;
12643
12642
  const [theme, setTheme] = useState2(() => resolveThemeWithColor(config.ui.theme, colorEnabled));
12644
12643
  const [themeCatalogRevision, setThemeCatalogRevision] = useState2(0);