@sns-myagent/cli 0.3.8 → 0.3.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 (68) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +63 -24
  3. package/bin/snsagent.js +3 -41
  4. package/dist/cli.js +3267 -3288
  5. package/package.json +4 -4
  6. package/src/adapters/telegram/handler.ts +1 -1
  7. package/src/agents/ensemble.ts +3 -4
  8. package/src/agents/executor.ts +129 -0
  9. package/src/async/notifier.ts +1 -1
  10. package/src/cli/config-cli.ts +1 -1
  11. package/src/cli/entry.ts +2 -2
  12. package/src/cli/gallery-fixtures/misc.ts +3 -3
  13. package/src/cli/grep-cli.ts +3 -3
  14. package/src/cli/grievances-cli.ts +2 -2
  15. package/src/cli/index.ts +186 -31
  16. package/src/cli/plugin-cli.ts +5 -5
  17. package/src/cli/setup-cli.ts +3 -3
  18. package/src/cli/setup-model-picker.ts +1 -1
  19. package/src/cli/shell-cli.ts +1 -1
  20. package/src/cli/ssh-cli.ts +1 -1
  21. package/src/cli/stats-cli.ts +1 -1
  22. package/src/cli/tiny-models-cli.ts +3 -3
  23. package/src/cli/ttsr-cli.ts +2 -2
  24. package/src/cli/update-cli.ts +3 -3
  25. package/src/cli/usage-cli.ts +1 -1
  26. package/src/cli-commands.ts +6 -6
  27. package/src/commands/acp.ts +2 -2
  28. package/src/commands/chat.ts +3 -3
  29. package/src/commands/install.ts +5 -5
  30. package/src/commands/say.ts +4 -4
  31. package/src/commands/setup.ts +1 -1
  32. package/src/config/settings-schema.ts +1 -1
  33. package/src/config/sns-config.ts +1 -1
  34. package/src/extensibility/plugins/loader.ts +1 -1
  35. package/src/extensibility/plugins/manager.ts +2 -2
  36. package/src/hindsight/client.ts +1 -1
  37. package/src/internal-urls/docs-index.generated.txt +2 -0
  38. package/src/main.ts +4 -0
  39. package/src/modes/acp/acp-agent.ts +3 -3
  40. package/src/modes/components/plugin-settings.ts +2 -2
  41. package/src/modes/components/welcome.ts +66 -160
  42. package/src/modes/interactive-mode.ts +2 -2
  43. package/src/modes/print-mode.ts +2 -2
  44. package/src/modes/setup-version.ts +1 -1
  45. package/src/modes/setup-wizard/scenes/byok-setup.ts +354 -0
  46. package/src/modes/setup-wizard/scenes/outro.ts +2 -2
  47. package/src/modes/setup-wizard/scenes/providers.ts +6 -5
  48. package/src/modes/setup-wizard/scenes/splash.ts +3 -3
  49. package/src/modes/setup-wizard/wizard-overlay.ts +2 -2
  50. package/src/modes/theme/dark.json +21 -20
  51. package/src/modes/theme/light.json +30 -29
  52. package/src/modes/utils/ui-helpers.ts +1 -1
  53. package/src/slash-commands/builtin-registry.ts +6 -3
  54. package/src/stt/recorder.ts +3 -3
  55. package/src/tts/player.ts +1 -1
  56. package/src/tts/tts-client.ts +1 -1
  57. package/src/tui/chat-blocks.ts +4 -4
  58. package/src/tui/chat-ui.ts +3 -3
  59. package/src/tui/code-cell.ts +3 -3
  60. package/src/tui/command-palette.ts +3 -3
  61. package/src/tui/splash.ts +12 -18
  62. package/src/ui/banner.ts +51 -66
  63. package/src/ui/chat-prompt.ts +2 -2
  64. package/src/ui/colors.ts +17 -14
  65. package/src/ui/error-display.ts +2 -2
  66. package/src/ui/gradient.ts +3 -3
  67. package/src/ui/memory-toast.ts +5 -5
  68. package/src/ui/status-bar.ts +1 -1
package/src/ui/banner.ts CHANGED
@@ -1,81 +1,66 @@
1
1
  /**
2
- * Premium ASCII art banner for SNS-MyAgent.
3
- *
4
- * Renders the branded logo + runtime info using chalk, gradient-string, and boxen.
5
- * Called at the start of `snscoder launch`.
2
+ * SNS Agent banner flat, no boxen, no gradient boxes.
3
+ * Orange accent + minimal info block. Completely different from OMP/Pi Agent.
6
4
  */
7
5
 
8
6
  import chalk from "chalk";
9
- import gradient from "gradient-string";
10
- import boxen from "boxen";
11
7
  import type { FullConfig } from "#src/config/index.js";
12
8
  import { loadSnsConfig } from "#src/config/sns-config.js";
13
- import { BRAND_GRADIENT, ACCENT_GRADIENT } from "./colors.js";
14
9
 
15
- const LOGO = `
16
- ███╗ ██╗███████╗██╗ ██╗██╗ ██╗███████╗
17
- ████╗ ██║██╔════╝╚██╗██╔╝██║ ██║██╔════╝
18
- ██╔██╗ ██║█████╗ ╚███╔╝ ██║ ██║███████╗
19
- ██║╚██╗██║██╔══╝ ██╔██╗ ██║ ██║╚════██║
20
- ██║ ╚████║███████╗██╔╝ ╚██╗╚██████╔╝███████║
21
- ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝`;
10
+ const LOGO = [
11
+ " ███████╗",
12
+ " ██╔════╝",
13
+ " ███████╗",
14
+ " ╚════██║",
15
+ " ███████║",
16
+ " ╚══════╝",
17
+ ];
22
18
 
23
- const SUBTITLE = "My-Agent • SnsAgent CLI";
19
+ const LOGO_TEXT = [
20
+ " ███████╗███╗ ██╗███████╗ ██╗ ██╗██╗ ██╗",
21
+ " ██╔════╝████╗ ██║██╔════╝ ██║ ██║╚██╗ ██╔╝",
22
+ " ███████╗██╔██╗ ██║███████╗ ██║ ██║ ╚████╔╝ ",
23
+ " ╚════██║██║╚██╗██║╚════██║ ╚██╗ ██╔╝ ╚██╔╝ ",
24
+ " ███████║██║ ╚████║███████║ ╚████╔╝ ██║ ",
25
+ " ╚══════╝╚═╝ ╚═══╝╚══════╝ ╚═══╝ ╚═╝ ",
26
+ ];
24
27
 
25
- /**
26
- * Show the premium banner with gradient logo + config info.
27
- * Called at the start of `snscoder launch`.
28
- */
29
- export function showBanner(config: FullConfig): void {
30
- const cols = process.stdout.columns ?? 80;
31
- const width = Math.min(cols - 2, 64);
32
-
33
- // Gradient logo
34
- const bannerLines = LOGO.split("\n").filter(l => l.trim().length > 0);
35
- const coloredLogo = bannerLines
36
- .map(l => gradient(BRAND_GRADIENT).multiline(l))
37
- .join("\n");
28
+ const SUBTITLE = "SNS · coding agent";
38
29
 
39
- // Subtitle
40
- const subtitle = gradient(ACCENT_GRADIENT)(SUBTITLE);
41
-
42
- // Info block
43
- const version = chalk.bold(`v${config.version}`);
44
- const provider = chalk.cyan(config.provider);
45
- const model = chalk.cyan(config.model);
46
- const hasKey = Boolean(loadSnsConfig().apiKey);
47
- const memStatus = hasKey
48
- ? chalk.green("✓ API key set")
49
- : chalk.yellow("⚠ no API key (BYOK)");
50
-
51
- const inner = Math.min(width - 4, 56);
52
- const sep = chalk.dim("─".repeat(inner));
53
- const kv = (k: string, v: string) =>
54
- ` ${chalk.dim(k.padEnd(12))}${chalk.white(v)}`;
30
+ export function showBanner(config: FullConfig): void {
31
+ const cols = process.stdout.columns || 80;
32
+ const width = Math.min(cols, 80);
55
33
 
56
- const info = [
57
- sep,
58
- kv("Version", version),
59
- kv("Provider", provider),
60
- kv("Model", model),
61
- kv("Memory", memStatus),
62
- sep,
63
- chalk.dim(" Type your message to start chatting."),
64
- chalk.dim(" /exit or Ctrl+C to quit."),
65
- ].join("\n");
34
+ const version = chalk.bold(`v${config.version}`);
35
+ const provider = chalk.hex("#F97316")(config.provider);
36
+ const model = chalk.hex("#F97316")(config.model);
37
+ const hasKey = Boolean(loadSnsConfig().apiKey);
38
+ const memStatus = hasKey
39
+ ? chalk.green("connected")
40
+ : chalk.yellow("no API key");
66
41
 
67
- // Wrap in boxen
68
- const content = `${coloredLogo}\n${subtitle}\n${info}`;
42
+ const inner = Math.min(width - 4, 56);
43
+ const sep = chalk.dim("─".repeat(inner));
44
+ const kv = (k: string, v: string) =>
45
+ ` ${chalk.dim(k.padEnd(12))}${v}`;
69
46
 
70
- const box = boxen(content, {
71
- padding: { top: 1, bottom: 1, left: 2, right: 2 },
72
- margin: { top: 1, bottom: 0, left: 0, right: 0 },
73
- borderStyle: "round",
74
- borderColor: "cyan",
75
- width,
76
- textAlignment: "center",
77
- });
47
+ const info = [
48
+ "",
49
+ ...LOGO_TEXT.map(l => chalk.hex("#F97316")(l)),
50
+ "",
51
+ chalk.hex("#F97316")(SUBTITLE),
52
+ "",
53
+ sep,
54
+ kv("version", version),
55
+ kv("provider", provider),
56
+ kv("model", model),
57
+ kv("memory", memStatus),
58
+ sep,
59
+ "",
60
+ chalk.dim(" start chatting to configure your agent"),
61
+ chalk.dim(" /help for commands · /exit to quit"),
62
+ "",
63
+ ].join("\n");
78
64
 
79
- console.log(box);
80
- console.log();
65
+ console.log(info);
81
66
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Styled chat input prompt for SNS-MyAgent.
3
3
  *
4
- * Provides the `snscoder >` prompt with accent coloring.
4
+ * Provides the `snsagent >` prompt with accent coloring.
5
5
  * Uses Node's readline for cross-platform input.
6
6
  */
7
7
 
@@ -20,7 +20,7 @@ export function createPrompt(): {
20
20
  const rl = readline.createInterface({
21
21
  input: process.stdin,
22
22
  output: process.stdout,
23
- prompt: accent("snscoder") + muted(" > "),
23
+ prompt: accent("snsagent") + muted(" > "),
24
24
  });
25
25
 
26
26
  return {
package/src/ui/colors.ts CHANGED
@@ -1,22 +1,25 @@
1
1
  /**
2
2
  * Brand color palette for SNS-MyAgent terminal UI.
3
3
  *
4
- * Uses picocolors for zero-dependency color output.
5
- * Brand gradient: #00d2ff #7b2ff7 #ff6b9d
4
+ * Orange (#F97316) is the primary brand color.
5
+ * Uses chalk for hex colors, picocolors for basic colors.
6
6
  */
7
7
 
8
8
  import pc from "picocolors";
9
+ import chalk from "chalk";
9
10
 
10
11
  // ── Brand identity colors ──
11
12
 
13
+ const ORANGE = "#F97316";
14
+
12
15
  /** Primary brand color — used for headers and highlights. */
13
- export const primary = pc.cyan;
16
+ export const primary = chalk.hex(ORANGE);
14
17
 
15
18
  /** Accent color — used for prompts and decorative elements. */
16
- export const accent = pc.magenta;
19
+ export const accent = chalk.hex(ORANGE);
17
20
 
18
21
  /** User input text color. */
19
- export const user = pc.blue;
22
+ export const user = pc.white;
20
23
 
21
24
  /** Agent output text color. */
22
25
  export const agent = pc.white;
@@ -41,21 +44,21 @@ export const bold = pc.bold;
41
44
 
42
45
  // ── Brand gradient constants (for gradient-string) ──
43
46
 
44
- /** Full brand gradient: cyan → purple → pink. */
45
- export const BRAND_GRADIENT = ["#00d2ff", "#7b2ff7", "#ff6b9d"];
47
+ /** Full brand gradient: orange shades. */
48
+ export const BRAND_GRADIENT = ["#F97316", "#EA580C", "#FF8C32"];
46
49
 
47
- /** Accent gradient: purplecyan. */
48
- export const ACCENT_GRADIENT = ["#7b2ff7", "#00d2ff"];
50
+ /** Accent gradient: dark orange light orange. */
51
+ export const ACCENT_GRADIENT = ["#EA580C", "#F97316"];
49
52
 
50
- /** Subtle gradient: cyanpurple. */
51
- export const SUBTLE_GRADIENT = ["#00d2ff", "#7b2ff7"];
53
+ /** Subtle gradient: orangeamber. */
54
+ export const SUBTLE_GRADIENT = ["#F97316", "#F59E0B"];
52
55
 
53
56
  // ── Role-specific border colors (hex for gradient-string) ──
54
57
 
55
58
  export const ROLE_HEX = {
56
- user: "#00d2ff",
57
- assistant: "#7b2ff7",
58
- tool: "#ffd700",
59
+ user: "#F97316",
60
+ assistant: "#EA580C",
61
+ tool: "#FFD700",
59
62
  system: "#666666",
60
63
  error: "#ff4444",
61
64
  } as const;
@@ -24,7 +24,7 @@ function getSeverityMeta(severity: ErrorSeverity) {
24
24
  case "warning":
25
25
  return { icon: chalk.yellow("●"), label: "WARNING" };
26
26
  case "info":
27
- return { icon: chalk.cyan("●"), label: "INFO" };
27
+ return { icon: chalk.hex("#F97316")("●"), label: "INFO" };
28
28
  }
29
29
  }
30
30
 
@@ -61,7 +61,7 @@ export function renderErrorDisplay(opts: ErrorDisplayOptions): string {
61
61
  // Suggestion
62
62
  if (opts.suggestion) {
63
63
  lines.push("");
64
- lines.push(` ${chalk.cyan("→")} ${chalk.bold("suggestion:")}`);
64
+ lines.push(` ${chalk.hex("#F97316")("→")} ${chalk.bold("suggestion:")}`);
65
65
  lines.push(` ${opts.suggestion}`);
66
66
  }
67
67
 
@@ -9,10 +9,10 @@
9
9
  import chalk from "chalk";
10
10
 
11
11
  /** Single accent for prompts, brand, and focus. */
12
- export const accent = chalk.cyan;
12
+ export const accent = chalk.hex("#F97316");
13
13
 
14
14
  /** Brand text — bold cyan, no rainbow. */
15
- export const brand = (s: string) => chalk.cyan.bold(s);
15
+ export const brand = (s: string) => chalk.hex("#F97316").bold(s);
16
16
 
17
17
  /** Subtle / dimmed text. */
18
18
  export const subtle = chalk.dim;
@@ -21,4 +21,4 @@ export const subtle = chalk.dim;
21
21
  export const muted = chalk.gray;
22
22
 
23
23
  /** Accent for inline emphasis (e.g. file paths, ids). */
24
- export const inline = chalk.cyan;
24
+ export const inline = chalk.hex("#F97316");
@@ -22,7 +22,7 @@ const TOAST_LABEL: Record<ToastType, string> = {
22
22
  };
23
23
 
24
24
  export function renderMemoryToast(opts: MemoryToastOptions): string {
25
- const label = chalk.cyan(`● ${TOAST_LABEL[opts.type]}`);
25
+ const label = chalk.hex("#F97316")(`● ${TOAST_LABEL[opts.type]}`);
26
26
  const msg = opts.message;
27
27
  const parts = [label, msg];
28
28
 
@@ -32,20 +32,20 @@ export function renderMemoryToast(opts: MemoryToastOptions): string {
32
32
 
33
33
  if (opts.relevance !== undefined) {
34
34
  const score = Math.round(opts.relevance * 100);
35
- parts.push(chalk.cyan(`(${score}%)`));
35
+ parts.push(chalk.hex("#F97316")(`(${score}%)`));
36
36
  }
37
37
 
38
38
  return ` ${parts.join(" ")}`;
39
39
  }
40
40
 
41
41
  export function renderMemoryRecall(query: string, snippet: string, relevance?: number): string {
42
- const queryStr = chalk.cyan(`"${query}"`);
42
+ const queryStr = chalk.hex("#F97316")(`"${query}"`);
43
43
  const scoreStr = relevance !== undefined
44
44
  ? chalk.dim(` ${Math.round(relevance * 100)}% match`)
45
45
  : "";
46
46
 
47
47
  const lines = [
48
- ` ${chalk.cyan("● memory")} ${queryStr}${scoreStr}`,
48
+ ` ${chalk.hex("#F97316")("● memory")} ${queryStr}${scoreStr}`,
49
49
  ` ${chalk.dim(snippet.slice(0, 120))}${snippet.length > 120 ? chalk.dim("...") : ""}`,
50
50
  ];
51
51
 
@@ -55,7 +55,7 @@ export function renderMemoryRecall(query: string, snippet: string, relevance?: n
55
55
  export function renderMemorySave(content: string, scope?: string): string {
56
56
  const scopeStr = scope ? chalk.dim(` [${scope}]`) : "";
57
57
  const preview = content.length > 80 ? content.slice(0, 80) + "..." : content;
58
- return ` ${chalk.cyan("● saved")}${scopeStr} ${chalk.dim(preview)}`;
58
+ return ` ${chalk.hex("#F97316")("● saved")}${scopeStr} ${chalk.dim(preview)}`;
59
59
  }
60
60
 
61
61
  export function clearToastLine(): void {
@@ -27,7 +27,7 @@ export function renderStatusBar(state: StatusBarState): void {
27
27
  : String(state.tokensUsed);
28
28
 
29
29
  const k = (s: string) => chalk.dim(s);
30
- const v = (s: string) => chalk.cyan(s);
30
+ const v = (s: string) => chalk.hex("#F97316")(s);
31
31
  const sep = chalk.dim(" · ");
32
32
 
33
33
  const bar = ` ${k("model")} ${v(state.model)}${sep}${k("tokens")} ${v(tokens)}${sep}${k("time")} ${v(elapsed)}${sep}${k("mem")} ${v(String(state.memoryHits))}`;