@kolisachint/hoocode-agent 0.5.4 → 0.5.6

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.
package/docs/themes.md CHANGED
@@ -7,6 +7,7 @@ Themes are JSON files that define colors for the TUI.
7
7
  ## Table of Contents
8
8
 
9
9
  - [Locations](#locations)
10
+ - [Built-in Themes](#built-in-themes)
10
11
  - [Selecting a Theme](#selecting-a-theme)
11
12
  - [Creating a Custom Theme](#creating-a-custom-theme)
12
13
  - [Theme Format](#theme-format)
@@ -18,7 +19,7 @@ Themes are JSON files that define colors for the TUI.
18
19
 
19
20
  HooCode loads themes from:
20
21
 
21
- - Built-in: `dark`, `light`
22
+ - Built-in: every `*.json` in the shipped theme directory (see [Built-in Themes](#built-in-themes))
22
23
  - Global: `~/.hoocode/agent/themes/*.json`
23
24
  - Project: `.hoocode/themes/*.json`
24
25
  - Packages: `themes/` directories or `pi.themes` entries in `package.json`
@@ -27,6 +28,39 @@ HooCode loads themes from:
27
28
 
28
29
  Disable discovery with `--no-themes`.
29
30
 
31
+ ## Built-in Themes
32
+
33
+ | Theme | Background | Notes |
34
+ |-------|------------|-------|
35
+ | `dark` | dark | Default dark theme |
36
+ | `light` | light | Default light theme |
37
+ | `high-contrast-dark` | black | Maximum contrast, bright saturated hues |
38
+ | `high-contrast-light` | white | Maximum contrast, deep saturated hues |
39
+ | `warm-dark` | warm near-black | Low-glare amber/sand palette, no harsh blues |
40
+ | `warm-light` | warm paper | Dark ink on cream, less glare than pure white |
41
+ | `colorsafe-dark` | dark | Okabe-Ito hues, no red/green pairs |
42
+ | `colorsafe-light` | white | Okabe-Ito hues, no red/green pairs |
43
+
44
+ The six themes after `dark`/`light` are built for low vision. Every color they
45
+ draw clears **WCAG AAA (7:1)** against every surface the TUI paints behind it —
46
+ the page, selected rows, user messages, and all three tool-box states — and none
47
+ of them defer to the terminal's default foreground, so contrast does not depend
48
+ on your terminal's own palette. `test/theme-contrast.test.ts` enforces this, so
49
+ a future edit cannot quietly wash one of them out.
50
+
51
+ Picking between them:
52
+
53
+ - **Contrast above all** → `high-contrast-dark` / `high-contrast-light`.
54
+ - **Bright screens hurt, or you read for long stretches** → `warm-dark` /
55
+ `warm-light`. Same 7:1 floor, warmer and less glaring.
56
+ - **Red/green are hard to tell apart** → `colorsafe-dark` / `colorsafe-light`.
57
+ Success and error are teal and orange, and no pair of tokens relies on a
58
+ red-versus-green distinction.
59
+
60
+ Set the matching terminal background for the theme you pick (black-ish for the
61
+ dark themes, white-ish for the light ones) — hoocode colors the text, but the
62
+ canvas behind it belongs to your terminal.
63
+
30
64
  ## Selecting a Theme
31
65
 
32
66
  Select a theme via `/settings` or in `settings.json`:
@@ -124,6 +158,7 @@ vim ~/.hoocode/agent/themes/my-theme.json
124
158
  {
125
159
  "$schema": "https://raw.githubusercontent.com/kolisachint/hoocode/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
126
160
  "name": "my-theme",
161
+ "description": "One line shown next to the name in the theme picker",
127
162
  "vars": {
128
163
  "blue": "#0066cc",
129
164
  "gray": 242
@@ -138,6 +173,7 @@ vim ~/.hoocode/agent/themes/my-theme.json
138
173
  ```
139
174
 
140
175
  - `name` is required and must be unique.
176
+ - `description` is optional. `/settings` shows it beside the theme name.
141
177
  - `vars` is optional. Define reusable colors here, then reference them in `colors`.
142
178
  - `colors` must define all 51 required tokens.
143
179
 
@@ -280,7 +316,14 @@ echo $COLORTERM # Should output "truecolor" or "24bit"
280
316
 
281
317
  **Dark terminals:** Use bright, saturated colors with higher contrast.
282
318
 
283
- **Light terminals:** Use darker, muted colors with lower contrast.
319
+ **Light terminals:** Use dark, saturated colors. Muting them costs contrast; if
320
+ you want a softer look, warm the background rather than lightening the text.
321
+
322
+ **Contrast:** Aim for 4.5:1 against your terminal background, or 7:1 if the
323
+ theme has to stay readable for low vision. Check every token against the
324
+ selected-row and tool-box backgrounds too, not just the page — those are where
325
+ themes usually lose contrast. `test/theme-contrast.test.ts` shows how the
326
+ built-in accessible themes are verified.
284
327
 
285
328
  **Color harmony:** Start with a base palette (Nord, Gruvbox, Tokyo Night), define it in `vars`, and reference consistently.
286
329
 
@@ -293,3 +336,15 @@ echo $COLORTERM # Should output "truecolor" or "24bit"
293
336
  See the built-in themes:
294
337
  - [dark.json](../src/modes/interactive/theme/dark.json)
295
338
  - [light.json](../src/modes/interactive/theme/light.json)
339
+ - [high-contrast-dark.json](../src/modes/interactive/theme/high-contrast-dark.json)
340
+ - [high-contrast-light.json](../src/modes/interactive/theme/high-contrast-light.json)
341
+ - [warm-dark.json](../src/modes/interactive/theme/warm-dark.json)
342
+ - [warm-light.json](../src/modes/interactive/theme/warm-light.json)
343
+ - [colorsafe-dark.json](../src/modes/interactive/theme/colorsafe-dark.json)
344
+ - [colorsafe-light.json](../src/modes/interactive/theme/colorsafe-light.json)
345
+
346
+ Preview any of them, with per-token contrast ratios:
347
+
348
+ ```bash
349
+ npx tsx test/test-theme-colors.ts theme warm-dark
350
+ ```
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-sandbox",
3
3
  "private": true,
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "bun": ">=1.0.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode-agent",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "hoocodeConfig": {
@@ -49,9 +49,9 @@
49
49
  "prepublishOnly": "npm run clean && npm run build"
50
50
  },
51
51
  "dependencies": {
52
- "@kolisachint/hoocode-agent-core": "^0.5.4",
53
- "@kolisachint/hoocode-ai": "^0.5.4",
54
- "@kolisachint/hoocode-tui": "^0.5.4",
52
+ "@kolisachint/hoocode-agent-core": "^0.5.6",
53
+ "@kolisachint/hoocode-ai": "^0.5.6",
54
+ "@kolisachint/hoocode-tui": "^0.5.6",
55
55
  "@silvia-odwyer/photon-node": "^0.3.4",
56
56
  "chalk": "^5.5.0",
57
57
  "cli-highlight": "^2.1.11",