perchai-cli 2.4.7 → 2.4.9

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 +85 -28
  2. package/package.json +1 -1
package/dist/perch.mjs CHANGED
@@ -195243,7 +195243,6 @@ function dedupeEvidence(items) {
195243
195243
  var packetStore, ROLE_KIND_MAP, DOWNSTREAM_CONSUMERS, URL_PATTERN, MARKDOWN_LINK_PATTERN;
195244
195244
  var init_contextPackets = __esm({
195245
195245
  "features/perchTerminal/agentPlatform/contextPackets.ts"() {
195246
- "use strict";
195247
195246
  packetStore = /* @__PURE__ */ new Map();
195248
195247
  ROLE_KIND_MAP = {
195249
195248
  legal_source_scout: "research",
@@ -222494,7 +222493,8 @@ ${continuationIndent} `);
222494
222493
  function colorForLabel(label) {
222495
222494
  if (label === "need" || label === "stop") return "red";
222496
222495
  if (label === "tool" || label === "work" || label === "wait") return "muted";
222497
- return "orange";
222496
+ if (label === "you") return "bronze";
222497
+ return "accent";
222498
222498
  }
222499
222499
  function colorForBody(label) {
222500
222500
  if (label === "need" || label === "stop") return "red";
@@ -222510,7 +222510,8 @@ 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;47;94;67m",
222514
+ bronze: "\x1B[38;2;154;82;40m",
222514
222515
  cream: "\x1B[38;2;255;248;240m",
222515
222516
  muted: "\x1B[38;2;142;133;125m",
222516
222517
  green: "\x1B[38;2;110;191;130m",
@@ -277653,7 +277654,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277653
277654
  const prompt = raw.trim();
277654
277655
  if (!prompt || working) return;
277655
277656
  setDraft("");
277656
- addItem({ label: "you", text: prompt, tone: "accent" });
277657
+ addItem({ label: "you", text: prompt, tone: "touch" });
277657
277658
  if (prompt === "exit" || prompt === "quit" || prompt === "/exit") {
277658
277659
  connection.restore();
277659
277660
  app.exit();
@@ -277822,7 +277823,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277822
277823
  }
277823
277824
  if (input && !key.escape) setDraft((value) => value + input);
277824
277825
  });
277825
- const pulseColor = pulse % 2 === 0 ? "#c45000" : "#8e857d";
277826
+ const pulseColor = inkMotionColor(pulse);
277826
277827
  const spinnerGlyph = inkSpinnerFrame(pulse);
277827
277828
  const auth = renderCliAuthSummary(connection);
277828
277829
  const meta = `${state.personaId} \xB7 ${state.chatMode} \xB7 ${state.permissionMode}`;
@@ -277837,7 +277838,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277837
277838
  Ink2.Text,
277838
277839
  {
277839
277840
  color: colorForInkTone(tone),
277840
- bold: tone === "accent"
277841
+ bold: tone === "accent" || tone === "touch" || tone === "normal"
277841
277842
  },
277842
277843
  showLabel ? renderInkSpeakerLabel(label) : ""
277843
277844
  )
@@ -277859,7 +277860,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277859
277860
  Ink2.Box,
277860
277861
  null,
277861
277862
  React11.createElement(Ink2.Box, { width: INK_LABEL_WIDTH, flexShrink: 0 }),
277862
- React11.createElement(Ink2.Text, { color: "#2a211c" }, INK_DIVIDER)
277863
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.divider }, INK_DIVIDER)
277863
277864
  ) : null,
277864
277865
  lines.map((line, lineIndex) => renderTranscriptRow(
277865
277866
  `${item.id}-${lineIndex}`,
@@ -277888,7 +277889,7 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277888
277889
  { key: `field-${index}`, width: PERCH_SPLASH_WIDTH },
277889
277890
  React11.createElement(
277890
277891
  Ink2.Text,
277891
- { color: working && index === 11 ? pulseColor : "#c45000", bold: true },
277892
+ { color: inkSplashLineColor(index, working, pulse), bold: true },
277892
277893
  line
277893
277894
  )
277894
277895
  )
@@ -277896,13 +277897,13 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277896
277897
  React11.createElement(
277897
277898
  Ink2.Box,
277898
277899
  { 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))
277900
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.patinaActive, bold: true }, "perched"),
277901
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.muted }, " in "),
277902
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.cream, bold: true }, shortCwd(state.cwd))
277902
277903
  ),
277903
277904
  React11.createElement(
277904
277905
  Ink2.Text,
277905
- { color: "#8e857d", wrap: "truncate-middle" },
277906
+ { color: CLI_BRAND.muted, wrap: "truncate-middle" },
277906
277907
  `${auth} \xB7 ${meta}`
277907
277908
  ),
277908
277909
  React11.createElement(
@@ -277912,14 +277913,14 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277912
277913
  ([command, description]) => React11.createElement(
277913
277914
  Ink2.Box,
277914
277915
  { key: command },
277915
- React11.createElement(Ink2.Box, { width: 16 }, React11.createElement(Ink2.Text, { color: "#c45000" }, command)),
277916
- React11.createElement(Ink2.Text, { color: "#8e857d" }, description)
277916
+ React11.createElement(Ink2.Box, { width: 16 }, React11.createElement(Ink2.Text, { color: CLI_BRAND.bronze }, command)),
277917
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.muted }, description)
277917
277918
  )
277918
277919
  )
277919
277920
  ),
277920
277921
  React11.createElement(
277921
277922
  Ink2.Text,
277922
- { color: "#5e554d", wrap: "truncate-middle" },
277923
+ { color: "#5E554D", wrap: "truncate-middle" },
277923
277924
  route
277924
277925
  )
277925
277926
  ),
@@ -277938,17 +277939,18 @@ async function runInkInteractivePerchCli(writer, deps, options) {
277938
277939
  React11.createElement(Ink2.Text, { color: pulseColor, bold: true }, spinnerGlyph)
277939
277940
  ),
277940
277941
  React11.createElement(
277941
- Ink2.Text,
277942
- { color: "#8e857d" },
277943
- `${state.personaId} \xB7 ${workingText}\u2026`
277942
+ Ink2.Box,
277943
+ null,
277944
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.patinaActive, bold: true }, state.personaId),
277945
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.muted }, ` \xB7 ${workingText}\u2026`)
277944
277946
  )
277945
277947
  ) : null,
277946
277948
  React11.createElement(
277947
277949
  Ink2.Box,
277948
277950
  { key: "prompt", marginTop: 1 },
277949
- React11.createElement(Ink2.Text, { color: "#c45000", bold: true }, "you\u203A "),
277951
+ React11.createElement(Ink2.Text, { color: CLI_BRAND.bronze, bold: true }, "you\u203A "),
277950
277952
  React11.createElement(Ink2.Text, null, draft),
277951
- React11.createElement(Ink2.Text, { backgroundColor: "#c45000", color: "#100d0b" }, " ")
277953
+ React11.createElement(Ink2.Text, { backgroundColor: inkTouchColor(pulse), color: CLI_BRAND.graphite }, " ")
277952
277954
  )
277953
277955
  );
277954
277956
  }),
@@ -278130,14 +278132,14 @@ function renderInteractiveStartup(state, connection) {
278130
278132
  const auth = renderCliAuthSummary(connection);
278131
278133
  const route = connection.authenticated && connection.appUrl ? connection.appUrl.replace(/^https?:\/\//, "") : connection.appUrl ?? state.appUrl ?? "run /login";
278132
278134
  const commandLines = PERCH_SPLASH_COMMANDS.map(
278133
- ([command, description]) => ` ${paint(command.padEnd(13), "orange", color)}${paint(description, "muted", color)}`
278135
+ ([command, description]) => ` ${paint(command.padEnd(13), "bronze", color)}${paint(description, "muted", color)}`
278134
278136
  );
278135
278137
  return [
278136
278138
  `${paint("perch \xB7 field terminal", "muted", color)}${" ".repeat(24)}${paint(`v${CLI_PACKAGE_VERSION}`, "muted", color)}`,
278137
278139
  "",
278138
- ...PERCH_SPLASH_SCENE.map((line) => paint(line, "orange", color)),
278140
+ ...PERCH_SPLASH_SCENE.map((line, index) => paintSplashLine(line, index, color)),
278139
278141
  "",
278140
- ` ${paint("perched", "orange", color)} ${paint("in", "muted", color)} ${paint(shortCwd(state.cwd), "cream", color)}`,
278142
+ ` ${paint("perched", "accent", color)} ${paint("in", "muted", color)} ${paint(shortCwd(state.cwd), "cream", color)}`,
278141
278143
  ` ${paint([auth, state.personaId, state.chatMode, state.permissionMode].join(" \xB7 "), "muted", color)}`,
278142
278144
  "",
278143
278145
  ...commandLines,
@@ -278148,7 +278150,7 @@ function renderInteractiveStartup(state, connection) {
278148
278150
  }
278149
278151
  function renderInteractivePrompt(_state) {
278150
278152
  const color = shouldUseCliColor();
278151
- return `${paint("you", "orange", color)}${paint("\u203A", "orange", color)} `;
278153
+ return `${paint("you", "bronze", color)}${paint("\u203A", "glint", color)} `;
278152
278154
  }
278153
278155
  function writeModeLine(writer, key, value) {
278154
278156
  const color = shouldUseCliColor();
@@ -278158,6 +278160,42 @@ function writeModeLine(writer, key, value) {
278158
278160
  function inkSpinnerFrame(frame) {
278159
278161
  return PERCH_MOTION_FRAMES[Math.abs(frame) % PERCH_MOTION_FRAMES.length] ?? "P";
278160
278162
  }
278163
+ function inkMotionColor(frame) {
278164
+ const colors = [
278165
+ CLI_BRAND.patina,
278166
+ CLI_BRAND.patinaActive,
278167
+ CLI_BRAND.bronze,
278168
+ CLI_BRAND.bronzeGlint,
278169
+ CLI_BRAND.bronze,
278170
+ CLI_BRAND.patina,
278171
+ CLI_BRAND.patinaDeep
278172
+ ];
278173
+ return colors[Math.abs(frame) % colors.length] ?? CLI_BRAND.patina;
278174
+ }
278175
+ function inkTouchColor(frame) {
278176
+ const colors = [
278177
+ CLI_BRAND.bronze,
278178
+ CLI_BRAND.bronzeGlint,
278179
+ CLI_BRAND.bronze,
278180
+ CLI_BRAND.bronzeDeep
278181
+ ];
278182
+ return colors[Math.abs(frame) % colors.length] ?? CLI_BRAND.bronze;
278183
+ }
278184
+ function inkSplashLineColor(index, working, pulse) {
278185
+ if (working && index >= 11 && index <= 14) return inkMotionColor(pulse + index);
278186
+ if (index >= 11 && index <= 14) return index === 14 ? CLI_BRAND.bronzeDeep : CLI_BRAND.bronze;
278187
+ if (index <= 1 || index >= 2 && index <= 10 && PERCH_SPLASH_SCENE[index]?.trim().startsWith("\xB7")) {
278188
+ return CLI_BRAND.bronzeDeep;
278189
+ }
278190
+ return CLI_BRAND.patina;
278191
+ }
278192
+ function paintSplashLine(line, index, enabled) {
278193
+ if (index >= 11 && index <= 14) {
278194
+ return paint(line, index === 14 ? "bronzeDeep" : "bronze", enabled);
278195
+ }
278196
+ if (index <= 1) return paint(line, "bronzeDeep", enabled);
278197
+ return paint(line, "accent", enabled);
278198
+ }
278161
278199
  function renderInkSpeakerLabel(label) {
278162
278200
  if (!label.trim()) return "";
278163
278201
  if (label === "tool" || label === "status" || label === "system") return `${label}\xB7`;
@@ -278209,16 +278247,20 @@ function colorForInkTone(tone) {
278209
278247
  return "#6ebf82";
278210
278248
  case "muted":
278211
278249
  return "#8e857d";
278250
+ case "touch":
278251
+ return CLI_BRAND.bronze;
278212
278252
  case "accent":
278213
- return "#c45000";
278253
+ return CLI_BRAND.patinaActive;
278214
278254
  default:
278215
- return "#c45000";
278255
+ return CLI_BRAND.patina;
278216
278256
  }
278217
278257
  }
278218
278258
  function bodyColorForInkTone(tone) {
278219
278259
  switch (tone) {
278220
278260
  case "danger":
278221
278261
  return "#d06b55";
278262
+ case "touch":
278263
+ return "#fff8f0";
278222
278264
  case "success":
278223
278265
  case "muted":
278224
278266
  return "#8e857d";
@@ -278506,7 +278548,7 @@ function defaultWriter() {
278506
278548
  stderr: (text) => process.stderr.write(text)
278507
278549
  };
278508
278550
  }
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;
278551
+ 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
278552
  var init_perch_cli = __esm({
278511
278553
  "scripts/perch-cli.ts"() {
278512
278554
  "use strict";
@@ -278518,9 +278560,24 @@ var init_perch_cli = __esm({
278518
278560
  execFileAsync3 = promisify3(execFile3);
278519
278561
  DEFAULT_CLI_LOGIN_APP_URL = "https://app.perchai.app";
278520
278562
  CLI_PACKAGE_VERSION = readCliPackageVersion();
278563
+ CLI_BRAND = {
278564
+ patina: "#2F5E43",
278565
+ patinaActive: "#3D7A52",
278566
+ patinaDeep: "#1F3F31",
278567
+ bronze: "#9A5228",
278568
+ bronzeGlint: "#B5632F",
278569
+ bronzeDeep: "#6F351D",
278570
+ graphite: "#0F0D0B",
278571
+ divider: "#32251E",
278572
+ cream: "#FFF8F0",
278573
+ muted: "#8E857D"
278574
+ };
278521
278575
  ANSI2 = {
278522
278576
  reset: "\x1B[0m",
278523
- orange: "\x1B[38;2;196;80;0m",
278577
+ accent: "\x1B[38;2;47;94;67m",
278578
+ bronze: "\x1B[38;2;154;82;40m",
278579
+ bronzeDeep: "\x1B[38;2;111;53;29m",
278580
+ glint: "\x1B[38;2;181;99;47m",
278524
278581
  cream: "\x1B[38;2;255;248;240m",
278525
278582
  muted: "\x1B[38;2;142;133;125m",
278526
278583
  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.9",
4
4
  "description": "Perch AI command-line interface",
5
5
  "bin": {
6
6
  "perch": "bin/perch"