klyro 0.1.19 → 0.1.21

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.
@@ -1,88 +1,102 @@
1
1
  /**
2
- * Design Tokens — TUI_DESIGN.md §4
3
- * Semantic colors, glyphs, spacing for Klyro TUI
2
+ * §2.1 Color tokens + §2.2 Glyph set — TUI_DESIGN.md
3
+ * Accent is Orange #E8843C (256:209, 16: yellow bold), one accent ≤5%
4
+ * No backgrounds except diff viewer. fg.dim ≥4.5:1 on near-black.
4
5
  */
5
6
  export const tokens = {
6
7
  colors: {
7
- accent: '#8B7CF6',
8
+ accent: '#E8843C',
8
9
  fg: '#E6E6E6',
9
- muted: '#7A7A7A',
10
- success: '#4ADE80',
11
- error: '#F87171',
12
- warning: '#FBBF24',
13
- info: '#60A5FA',
14
- diffAddBg: '#12351F',
15
- diffDelBg: '#3B1519',
16
- border: '#3A3A3A',
17
- codeBg: '#1E1E1E',
18
- thinking: '#7A7A7A',
10
+ soft: '#B3B3B3',
11
+ dim: '#6F6F6F',
12
+ guide: '#3A3A3A',
13
+ ok: '#6BBF6B',
14
+ err: '#E06C6C',
15
+ warn: '#D9A441',
16
+ info: '#6FA8DC',
17
+ diffAddBg: '#12250F',
18
+ diffDelBg: '#2A1212',
19
19
  },
20
- // For Ink, map to closest ANSI names
21
20
  ansi: {
22
- accent: 'magenta',
21
+ accent: 'yellow',
22
+ accentBold: 'yellowBright',
23
23
  fg: undefined,
24
+ soft: 'white',
25
+ dim: 'gray',
26
+ guide: 'gray',
27
+ ok: 'green',
28
+ err: 'red',
29
+ warn: 'yellow',
30
+ info: 'blue',
31
+ border: 'gray',
32
+ // compat aliases for older components (TUI_DESIGN §24 Don'ts still happy — no boxes)
24
33
  muted: 'gray',
25
34
  success: 'green',
26
35
  error: 'red',
27
36
  warning: 'yellow',
28
- info: 'blue',
29
- border: 'gray',
30
37
  },
31
38
  };
32
39
  export const glyphs = {
33
- prompt: '',
34
- promptAscii: '>',
35
- toolRunning: '',
36
- toolDone: '',
37
- connector: '',
38
- connectorAscii: '\\',
39
- success: '',
40
- successAscii: '[ok]',
41
- failure: '',
42
- failureAscii: '[x]',
43
- warning: '',
44
- warningAscii: '[!]',
45
- spinner: ['', '✽', '✶', '✳', '✢', '·'],
46
- spinnerAscii: ['-', '\\', '|', '/'],
47
- pending: '○',
48
- pendingAscii: 'o',
49
- checkboxDone: '☒',
50
- checkboxTodo: '☐',
40
+ prompt: '>',
41
+ agentBullet: '',
42
+ collapsed: '',
43
+ expanded: '',
44
+ guide: '',
45
+ branch: '',
46
+ end: '',
47
+ rule: '',
48
+ treeBranch: '├──',
49
+ treeEnd: '└──',
50
+ success: '',
51
+ failure: '',
52
+ warning: '!',
51
53
  repair: '↻',
52
- repairAscii: '~',
53
- compaction: '',
54
- compactionAscii: '~~',
55
- expand: '',
56
- selected: '',
57
- contextBar: '',
58
- contextBarEmpty: '',
54
+ todoPending: '',
55
+ todoActive: '',
56
+ todoDone: '',
57
+ todoPlan: '',
58
+ modeAccept: '',
59
+ modePlan: '',
60
+ modeAuto: '',
61
+ editsBadge: '✎',
62
+ dot: '·',
63
+ ellipsis: '…',
64
+ meterFilled: '▰',
65
+ meterEmpty: '▱',
66
+ continuation: '↪',
67
+ // compat
59
68
  brand: '◆',
60
- brandAscii: '*',
69
+ compaction: '',
70
+ };
71
+ export const glyphAscii = {
72
+ prompt: '>',
73
+ agentBullet: '*',
74
+ collapsed: '>',
75
+ expanded: 'v',
76
+ guide: '|',
77
+ branch: '|',
78
+ end: '\\',
79
+ rule: '-',
80
+ treeBranch: '|--',
81
+ treeEnd: '`--',
82
+ success: 'ok',
83
+ failure: 'x',
84
+ warning: '!',
85
+ repair: '~',
86
+ todoPending: '[ ]',
87
+ todoActive: '[>]',
88
+ todoDone: '[x]',
89
+ todoPlan: '#',
61
90
  };
62
91
  export function isAsciiMode() {
63
92
  return (process.env.TERM === 'dumb' ||
64
93
  process.env.KLYRO_ASCII === '1' ||
65
94
  (process.env.LANG !== undefined && !process.env.LANG.toLowerCase().includes('utf-8')) ||
66
- process.platform === 'win32' // legacy console fallback check could be more precise
67
- );
95
+ false);
68
96
  }
69
- export function glyph(name) {
70
- if (isAsciiMode()) {
71
- const asciiKey = `${String(name)}Ascii`;
72
- const val = glyphs[asciiKey];
73
- if (typeof val === 'string')
74
- return val;
75
- if (Array.isArray(val))
76
- return val[0] ?? '>';
77
- return '>';
78
- }
79
- const val = glyphs[name];
80
- if (Array.isArray(val))
81
- return val[0] ?? '●';
82
- return val;
97
+ export function g(name) {
98
+ if (isAsciiMode())
99
+ return glyphAscii[name] ?? glyphs[name];
100
+ return glyphs[name];
83
101
  }
84
- export const spacing = {
85
- maxWidth: 120,
86
- indent: 2,
87
- gap: 1,
88
- };
102
+ export const spacing = { maxWidth: 120, indent: 2, gap: 1 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "klyro",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Klyro — autonomous coding harness CLI that streams from any OpenAI-compatible or Anthropic LLM endpoint.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",