perchai-cli 2.4.7 → 2.4.8

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.
Files changed (2) hide show
  1. package/dist/perch.mjs +60 -22
  2. package/package.json +1 -1
package/dist/perch.mjs CHANGED
@@ -222494,7 +222494,7 @@ ${continuationIndent} `);
222494
222494
  function colorForLabel(label) {
222495
222495
  if (label === "need" || label === "stop") return "red";
222496
222496
  if (label === "tool" || label === "work" || label === "wait") return "muted";
222497
- return "orange";
222497
+ return "accent";
222498
222498
  }
222499
222499
  function colorForBody(label) {
222500
222500
  if (label === "need" || label === "stop") return "red";
@@ -222510,7 +222510,7 @@ var init_renderCliTurn = __esm({
222510
222510
  "use strict";
222511
222511
  ANSI = {
222512
222512
  reset: "\x1B[0m",
222513
- orange: "\x1B[38;2;196;80;0m",
222513
+ accent: "\x1B[38;2;61;122;82m",
222514
222514
  cream: "\x1B[38;2;255;248;240m",
222515
222515
  muted: "\x1B[38;2;142;133;125m",
222516
222516
  green: "\x1B[38;2;110;191;130m",
@@ -277822,7 +277822,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277822
277822
  }
277823
277823
  if (input && !key.escape) setDraft((value) => value + input);
277824
277824
  });
277825
- const pulseColor = pulse % 2 === 0 ? "#c45000" : "#8e857d";
277825
+ const pulseColor = inkMotionColor(pulse);
277826
277826
  const spinnerGlyph = inkSpinnerFrame(pulse);
277827
277827
  const auth = renderCliAuthSummary(connection);
277828
277828
  const meta = `${state.personaId} \xB7 ${state.chatMode} \xB7 ${state.permissionMode}`;
@@ -277859,7 +277859,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277859
277859
  Ink2.Box,
277860
277860
  null,
277861
277861
  React11.createElement(Ink2.Box, { width: INK_LABEL_WIDTH, flexShrink: 0 }),
277862
- React11.createElement(Ink2.Text, { color: "#2a211c" }, INK_DIVIDER)
277862
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.divider }, INK_DIVIDER)
277863
277863
  ) : null,
277864
277864
  lines.map((line, lineIndex) => renderTranscriptRow(
277865
277865
  `${item.id}-${lineIndex}`,
@@ -277888,7 +277888,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277888
277888
  { key: `field-${index}`, width: PERCH_SPLASH_WIDTH },
277889
277889
  React11.createElement(
277890
277890
  Ink2.Text,
277891
- { color: working && index === 11 ? pulseColor : "#c45000", bold: true },
277891
+ { color: inkSplashLineColor(index, working, pulse), bold: true },
277892
277892
  line
277893
277893
  )
277894
277894
  )
@@ -277896,13 +277896,13 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277896
277896
  React11.createElement(
277897
277897
  Ink2.Box,
277898
277898
  { marginTop: 1 },
277899
- React11.createElement(Ink2.Text, { color: "#c45000" }, "perched"),
277900
- React11.createElement(Ink2.Text, { color: "#8e857d" }, " in "),
277901
- React11.createElement(Ink2.Text, { color: "#fff8f0", bold: true }, shortCwd(state.cwd))
277899
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.patina }, "perched"),
277900
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.muted }, " in "),
277901
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.cream, bold: true }, shortCwd(state.cwd))
277902
277902
  ),
277903
277903
  React11.createElement(
277904
277904
  Ink2.Text,
277905
- { color: "#8e857d", wrap: "truncate-middle" },
277905
+ { color: CLI_BRAND.muted, wrap: "truncate-middle" },
277906
277906
  `${auth} \xB7 ${meta}`
277907
277907
  ),
277908
277908
  React11.createElement(
@@ -277912,14 +277912,14 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277912
277912
  ([command, description]) => React11.createElement(
277913
277913
  Ink2.Box,
277914
277914
  { key: command },
277915
- React11.createElement(Ink2.Box, { width: 16 }, React11.createElement(Ink2.Text, { color: "#c45000" }, command)),
277916
- React11.createElement(Ink2.Text, { color: "#8e857d" }, description)
277915
+ React11.createElement(Ink2.Box, { width: 16 }, React11.createElement(Ink2.Text, { color: CLI_BRAND.patina }, command)),
277916
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.muted }, description)
277917
277917
  )
277918
277918
  )
277919
277919
  ),
277920
277920
  React11.createElement(
277921
277921
  Ink2.Text,
277922
- { color: "#5e554d", wrap: "truncate-middle" },
277922
+ { color: "#5E554D", wrap: "truncate-middle" },
277923
277923
  route
277924
277924
  )
277925
277925
  ),
@@ -277946,9 +277946,9 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277946
277946
  React11.createElement(
277947
277947
  Ink2.Box,
277948
277948
  { key: "prompt", marginTop: 1 },
277949
- React11.createElement(Ink2.Text, { color: "#c45000", bold: true }, "you\u203A "),
277949
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.patina, bold: true }, "you\u203A "),
277950
277950
  React11.createElement(Ink2.Text, null, draft),
277951
- React11.createElement(Ink2.Text, { backgroundColor: "#c45000", color: "#100d0b" }, " ")
277951
+ React11.createElement(Ink2.Text, { backgroundColor: inkMotionColor(pulse), color: CLI_BRAND.graphite }, " ")
277952
277952
  )
277953
277953
  );
277954
277954
  }),
@@ -278130,14 +278130,14 @@ function renderInteractiveStartup(state, connection) {
278130
278130
  const auth = renderCliAuthSummary(connection);
278131
278131
  const route = connection.authenticated && connection.appUrl ? connection.appUrl.replace(/^https?:\/\//, "") : connection.appUrl ?? state.appUrl ?? "run /login";
278132
278132
  const commandLines = PERCH_SPLASH_COMMANDS.map(
278133
- ([command, description]) => ` ${paint(command.padEnd(13), "orange", color)}${paint(description, "muted", color)}`
278133
+ ([command, description]) => ` ${paint(command.padEnd(13), "accent", color)}${paint(description, "muted", color)}`
278134
278134
  );
278135
278135
  return [
278136
278136
  `${paint("perch \xB7 field terminal", "muted", color)}${" ".repeat(24)}${paint(`v${CLI_PACKAGE_VERSION}`, "muted", color)}`,
278137
278137
  "",
278138
- ...PERCH_SPLASH_SCENE.map((line) => paint(line, "orange", color)),
278138
+ ...PERCH_SPLASH_SCENE.map((line, index) => paintSplashLine(line, index, color)),
278139
278139
  "",
278140
- ` ${paint("perched", "orange", color)} ${paint("in", "muted", color)} ${paint(shortCwd(state.cwd), "cream", color)}`,
278140
+ ` ${paint("perched", "accent", color)} ${paint("in", "muted", color)} ${paint(shortCwd(state.cwd), "cream", color)}`,
278141
278141
  ` ${paint([auth, state.personaId, state.chatMode, state.permissionMode].join(" \xB7 "), "muted", color)}`,
278142
278142
  "",
278143
278143
  ...commandLines,
@@ -278148,7 +278148,7 @@ function renderInteractiveStartup(state, connection) {
278148
278148
  }
278149
278149
  function renderInteractivePrompt(_state) {
278150
278150
  const color = shouldUseCliColor();
278151
- return `${paint("you", "orange", color)}${paint("\u203A", "orange", color)} `;
278151
+ return `${paint("you", "accent", color)}${paint("\u203A", "accent", color)} `;
278152
278152
  }
278153
278153
  function writeModeLine(writer, key, value) {
278154
278154
  const color = shouldUseCliColor();
@@ -278158,6 +278158,32 @@ function writeModeLine(writer, key, value) {
278158
278158
  function inkSpinnerFrame(frame) {
278159
278159
  return PERCH_MOTION_FRAMES[Math.abs(frame) % PERCH_MOTION_FRAMES.length] ?? "P";
278160
278160
  }
278161
+ function inkMotionColor(frame) {
278162
+ const colors = [
278163
+ CLI_BRAND.patina,
278164
+ CLI_BRAND.bronze,
278165
+ CLI_BRAND.bronzeGlint,
278166
+ CLI_BRAND.bronze,
278167
+ CLI_BRAND.patina,
278168
+ CLI_BRAND.patinaDeep
278169
+ ];
278170
+ return colors[Math.abs(frame) % colors.length] ?? CLI_BRAND.patina;
278171
+ }
278172
+ function inkSplashLineColor(index, working, pulse) {
278173
+ if (working && index >= 11 && index <= 14) return inkMotionColor(pulse + index);
278174
+ if (index >= 11 && index <= 14) return index === 14 ? CLI_BRAND.bronze : CLI_BRAND.bronzeGlint;
278175
+ if (index <= 1 || index >= 2 && index <= 10 && PERCH_SPLASH_SCENE[index]?.trim().startsWith("\xB7")) {
278176
+ return CLI_BRAND.bronze;
278177
+ }
278178
+ return CLI_BRAND.patina;
278179
+ }
278180
+ function paintSplashLine(line, index, enabled) {
278181
+ if (index >= 11 && index <= 14) {
278182
+ return paint(line, index === 14 ? "bronze" : "glint", enabled);
278183
+ }
278184
+ if (index <= 1) return paint(line, "bronze", enabled);
278185
+ return paint(line, "accent", enabled);
278186
+ }
278161
278187
  function renderInkSpeakerLabel(label) {
278162
278188
  if (!label.trim()) return "";
278163
278189
  if (label === "tool" || label === "status" || label === "system") return `${label}\xB7`;
@@ -278210,9 +278236,9 @@ function colorForInkTone(tone) {
278210
278236
  case "muted":
278211
278237
  return "#8e857d";
278212
278238
  case "accent":
278213
- return "#c45000";
278239
+ return CLI_BRAND.patina;
278214
278240
  default:
278215
- return "#c45000";
278241
+ return CLI_BRAND.patina;
278216
278242
  }
278217
278243
  }
278218
278244
  function bodyColorForInkTone(tone) {
@@ -278506,7 +278532,7 @@ function defaultWriter() {
278506
278532
  stderr: (text) => process.stderr.write(text)
278507
278533
  };
278508
278534
  }
278509
- var execFileAsync3, DEFAULT_CLI_LOGIN_APP_URL, CLI_PACKAGE_VERSION, ANSI2, HELP_TEXT, INTERACTIVE_HELP_TEXT, INK_LABEL_WIDTH, INK_ROW_LIMIT, INK_DIVIDER, PERCH_MOTION_FRAMES, PERCH_SPLASH_WIDTH, PERCH_SPLASH_SCENE, PERCH_SPLASH_COMMANDS;
278535
+ var execFileAsync3, DEFAULT_CLI_LOGIN_APP_URL, CLI_PACKAGE_VERSION, CLI_BRAND, ANSI2, HELP_TEXT, INTERACTIVE_HELP_TEXT, INK_LABEL_WIDTH, INK_ROW_LIMIT, INK_DIVIDER, PERCH_MOTION_FRAMES, PERCH_SPLASH_WIDTH, PERCH_SPLASH_SCENE, PERCH_SPLASH_COMMANDS;
278510
278536
  var init_perch_cli = __esm({
278511
278537
  "scripts/perch-cli.ts"() {
278512
278538
  "use strict";
@@ -278518,9 +278544,21 @@ var init_perch_cli = __esm({
278518
278544
  execFileAsync3 = promisify3(execFile3);
278519
278545
  DEFAULT_CLI_LOGIN_APP_URL = "https://app.perchai.app";
278520
278546
  CLI_PACKAGE_VERSION = readCliPackageVersion();
278547
+ CLI_BRAND = {
278548
+ patina: "#3D7A52",
278549
+ patinaDeep: "#234A36",
278550
+ bronze: "#A36A2A",
278551
+ bronzeGlint: "#C08A3E",
278552
+ graphite: "#100D0B",
278553
+ divider: "#2A211C",
278554
+ cream: "#FFF8F0",
278555
+ muted: "#8E857D"
278556
+ };
278521
278557
  ANSI2 = {
278522
278558
  reset: "\x1B[0m",
278523
- orange: "\x1B[38;2;196;80;0m",
278559
+ accent: "\x1B[38;2;61;122;82m",
278560
+ bronze: "\x1B[38;2;163;106;42m",
278561
+ glint: "\x1B[38;2;192;138;62m",
278524
278562
  cream: "\x1B[38;2;255;248;240m",
278525
278563
  muted: "\x1B[38;2;142;133;125m",
278526
278564
  green: "\x1B[38;2;110;191;130m",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perchai-cli",
3
- "version": "2.4.7",
3
+ "version": "2.4.8",
4
4
  "description": "Perch AI command-line interface",
5
5
  "bin": {
6
6
  "perch": "bin/perch"