klyro 0.1.7 → 0.1.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.
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Design Tokens — TUI_DESIGN.md §4
3
+ * Semantic colors, glyphs, spacing for Klyro TUI
4
+ */
5
+ export const tokens = {
6
+ colors: {
7
+ accent: '#8B7CF6',
8
+ 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',
19
+ },
20
+ // For Ink, map to closest ANSI names
21
+ ansi: {
22
+ accent: 'magenta',
23
+ fg: undefined,
24
+ muted: 'gray',
25
+ success: 'green',
26
+ error: 'red',
27
+ warning: 'yellow',
28
+ info: 'blue',
29
+ border: 'gray',
30
+ },
31
+ };
32
+ 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: '☐',
51
+ repair: '↻',
52
+ repairAscii: '~',
53
+ compaction: '⟲',
54
+ compactionAscii: '~~',
55
+ expand: '▸',
56
+ selected: '❯',
57
+ contextBar: '▰',
58
+ contextBarEmpty: '▱',
59
+ brand: '◆',
60
+ brandAscii: '*',
61
+ };
62
+ export function isAsciiMode() {
63
+ return (process.env.TERM === 'dumb' ||
64
+ process.env.KLYRO_ASCII === '1' ||
65
+ (process.env.LANG !== undefined && !process.env.LANG.toLowerCase().includes('utf-8')) ||
66
+ process.platform === 'win32' // legacy console fallback check could be more precise
67
+ );
68
+ }
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;
83
+ }
84
+ export const spacing = {
85
+ maxWidth: 120,
86
+ indent: 2,
87
+ gap: 1,
88
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "klyro",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
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",