@litfamily/litclaude 1.0.64 → 1.0.65
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/CHANGELOG.md +17 -0
- package/README.md +9 -9
- package/README_ko-KR.md +9 -9
- package/bin/install-ui.mjs +43 -23
- package/bin/litclaude-ai.js +38 -6
- package/docs/assets/cover-motion-still.webp +0 -0
- package/docs/assets/cover-motion.webp +0 -0
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/hooks.md +32 -9
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/bin/litclaude-hud.js +6 -14
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/hooks/lit-mod.mjs +32 -4
- package/plugins/litclaude/lib/mod/backdrop.mjs +95 -29
- package/plugins/litclaude/lib/mod/frame.mjs +7 -4
- package/plugins/litclaude/lib/mod/round.mjs +61 -0
- package/plugins/litclaude/lib/mod/settings.mjs +3 -6
- package/plugins/litclaude/lib/mod/svg-card.mjs +66 -26
- package/plugins/litclaude/lib/mod/svg-sunset.mjs +154 -0
- package/plugins/litclaude/lib/round-caps.mjs +60 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.65 - 2026-11-25
|
|
4
|
+
|
|
5
|
+
- The README cover is a new loop: a terminal in the sunset look with the LIT card, a pixel LITFAMILY wordmark and a striped half-sunk sun, in place of the seven robot panels. The still for reduced motion is its first frame; both files are smaller.
|
|
6
|
+
- The README demo is a new silent loop of one request (the hook, the sunset LIT card with its map, three lanes, the failing then passing test, COMPLETE), with a Korean copy for the Korean page; the Claude Code chat around the card is redrawn.
|
|
7
|
+
- The installer's cards are round where the terminal can draw it: step pills, highlighted rows, buttons, swatches and
|
|
8
|
+
the status-line previews, with one blank row between blocks and every value in one column. Other terminals get the
|
|
9
|
+
same rows square; pipes, CI, `--yes` and `TERM=dumb` are unchanged.
|
|
10
|
+
- The status line, the LIT card and the installer decide round or square by one rule: `LITCLAUDE_HUD_GLYPHS` or the
|
|
11
|
+
`glyphs` option, then the terminal (Windows Terminal, VS Code, WezTerm, Ghostty, kitty), square over SSH, then any
|
|
12
|
+
installed Nerd Font by file name. The card's context gauge is round too, in the same five cells.
|
|
13
|
+
- The Claude desktop and mobile apps wear the sunset too. The LIT card is drawn with a half-sunk sun, its reflection,
|
|
14
|
+
a layered sea, stars and a neon border, only where no words are; rows, words and size stay as they were. `subtle`
|
|
15
|
+
and an idle card hold the sunset still.
|
|
16
|
+
- The Ignition look is a synthwave sunset: a starry sky, a slit sun that rises when a run starts and sinks when it
|
|
17
|
+
ends, hills, a neon floor and a neon frame. Every state, the fuse, the embers, the finish, light mode and
|
|
18
|
+
`look still|off` work as before, and the conversation column stays calm.
|
|
19
|
+
|
|
3
20
|
## 1.0.64 - 2026-11-25
|
|
4
21
|
|
|
5
22
|
- The installer asks its questions on cards in a real terminal: the step, a title, one sentence on what the answer
|
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: a terminal in a sunset look. LitClaude's round-cornered LIT card frames the screen with its stage map, task gauge, skill pills, lanes and context gauge, a pixel LITFAMILY wordmark and a striped half-sunk sun fill the middle, the row of seven product names lights LITCLAUDE, and a Claude Code prompt types a request at the bottom." /></picture></p>
|
|
2
2
|
|
|
3
3
|
<h1 align="center">LitClaude</h1>
|
|
4
4
|
<p align="center"><strong>Keep the work lit.</strong></p>
|
|
5
5
|
<p align="center">LitClaude is an add-on for Claude Code. It makes Claude check its own work before it says "done", and leaves a note so the next session starts where this one stopped.</p>
|
|
6
6
|
<p align="center">
|
|
7
|
-
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
8
|
-
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
7
|
+
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/readme/badge-version.svg" alt="1.0.65" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/readme/badge-license.svg" alt="MIT license" /></a>
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
|
-
<a href="https://github.com/wjgoarxiv/litclaude#readme">Full guide and skills gallery on GitHub</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
11
|
+
<a href="https://github.com/wjgoarxiv/litclaude#readme">Full guide and skills gallery on GitHub</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/README_ko-KR.md">한국어</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
You ask Claude for a feature. It writes the code and says it is finished, and a day later you find the tests
|
|
@@ -92,7 +92,7 @@ Then open the file and try the three actions yourself. That is how you find out
|
|
|
92
92
|
| `lit adhd` (or `lit rewind`), then `go` | A six-line card with the one thing to do now, then that step |
|
|
93
93
|
|
|
94
94
|
In the Claude desktop and mobile apps (Claude Code 2.1.325 or later), LitClaude also dresses the app in the
|
|
95
|
-
Ignition look: LitFamily colours and a
|
|
95
|
+
Ignition look: LitFamily colours and a synthwave sunset backdrop that rests, burns, signals and bursts with the LIT state.
|
|
96
96
|
`npx @litfamily/litclaude@latest config look still` keeps it without motion; `look off` gives the app its own look back.
|
|
97
97
|
|
|
98
98
|
## Check, update and remove
|
|
@@ -119,7 +119,7 @@ the lock folder the message names.
|
|
|
119
119
|
## More
|
|
120
120
|
|
|
121
121
|
- [Full guide and skills gallery on GitHub](https://github.com/wjgoarxiv/litclaude#readme)
|
|
122
|
-
- [Privacy and network behavior](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
123
|
-
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
124
|
-
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
125
|
-
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
122
|
+
- [Privacy and network behavior](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/privacy.md)
|
|
123
|
+
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/migration.md)
|
|
124
|
+
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/CHANGELOG.md)
|
|
125
|
+
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/LICENSE)
|
package/README_ko-KR.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 노을빛 터미널 화면입니다. LitClaude의 모서리가 둥근 LIT 카드가 단계 지도, 작업 게이지, 스킬 알약, 레인, 컨텍스트 게이지와 함께 화면을 두르고, 가운데는 픽셀 글자 LITFAMILY와 줄무늬 해가 채우며, 일곱 제품 이름 줄에서 LITCLAUDE가 켜지고, 아래에서는 Claude Code 프롬프트에 요청이 입력됩니다." /></picture></p>
|
|
2
2
|
|
|
3
3
|
<h1 align="center">LitClaude</h1>
|
|
4
4
|
<p align="center"><strong>Keep the work lit.</strong></p>
|
|
5
5
|
<p align="center">LitClaude는 Claude Code에 붙이는 추가 기능입니다. Claude가 "다 됐어요"라고 말하기 전에 자기 작업을 직접 확인하게 하고, 다음 세션이 이어서 시작할 수 있도록 기록을 남기게 합니다.</p>
|
|
6
6
|
<p align="center">
|
|
7
|
-
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
8
|
-
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
7
|
+
<img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/readme/badge-version.svg" alt="1.0.65" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/assets/readme/badge-license.svg" alt="MIT license" /></a>
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
|
-
<a href="https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md">전체 안내와 스킬 갤러리는 GitHub에서</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
11
|
+
<a href="https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md">전체 안내와 스킬 갤러리는 GitHub에서</a> · <a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/README.md">English</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
Claude에게 기능을 하나 부탁하면 코드를 쓰고 끝났다고 말합니다. 그런데 다음 날 보니 테스트는 한 번도 돌지 않았습니다. 새 세션을 열면 프로젝트 설명을 처음부터 다시 해야 합니다.
|
|
@@ -85,7 +85,7 @@ Claude Code를 다시 시작하세요.
|
|
|
85
85
|
| `lit adhd`(또는 `lit rewind`), 이어서 `go` | 지금 할 한 가지를 담은 여섯 줄 카드, 그리고 그 일 |
|
|
86
86
|
|
|
87
87
|
Claude 데스크톱 앱과 모바일 앱(Claude Code 2.1.325 이상)에서는 LitClaude가 앱에 Ignition 룩도 입힙니다. LitFamily 색과
|
|
88
|
-
LIT 상태를 따라 쉬고, 타오르고, 신호를 보내고, 터지는 배경입니다. `npx @litfamily/litclaude@latest config look still`은
|
|
88
|
+
LIT 상태를 따라 쉬고, 타오르고, 신호를 보내고, 터지는 신스웨이브 노을 배경입니다. `npx @litfamily/litclaude@latest config look still`은
|
|
89
89
|
움직임만 끄고, `look off`는 앱 본래의 모습으로 되돌립니다.
|
|
90
90
|
|
|
91
91
|
## 확인, 업데이트, 제거
|
|
@@ -109,7 +109,7 @@ npx @litfamily/litclaude@latest uninstall
|
|
|
109
109
|
## 더 보기
|
|
110
110
|
|
|
111
111
|
- [전체 안내와 스킬 갤러리 (GitHub)](https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md)
|
|
112
|
-
- [개인정보와 네트워크 동작](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
113
|
-
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
114
|
-
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
115
|
-
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
112
|
+
- [개인정보와 네트워크 동작](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/privacy.md)
|
|
113
|
+
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/docs/migration.md)
|
|
114
|
+
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/CHANGELOG.md)
|
|
115
|
+
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.65/LICENSE)
|
package/bin/install-ui.mjs
CHANGED
|
@@ -13,6 +13,10 @@ const MAX_WIDTH = 100;
|
|
|
13
13
|
// `y` and then Enter is a habit: the letter already answered, so an Enter this soon after it belongs to it.
|
|
14
14
|
const LETTER_ENTER_MS = 400;
|
|
15
15
|
const SETTLE_MS = 30;
|
|
16
|
+
const CAP_LEFT = "\ue0b6";
|
|
17
|
+
const CAP_RIGHT = "\ue0b4";
|
|
18
|
+
// A folded answer, a step and a closing-card row all put their value in this column of the window.
|
|
19
|
+
const VALUE_COL = 24;
|
|
16
20
|
|
|
17
21
|
const asciiLocale = (env) => {
|
|
18
22
|
const locale = env.LC_ALL || env.LC_CTYPE || env.LANG || "";
|
|
@@ -93,10 +97,12 @@ const ASCII = {
|
|
|
93
97
|
const ASCII_TEXT = { "—": "-", "·": "-", "…": "...", "→": "->", "한국어": "Korean" };
|
|
94
98
|
|
|
95
99
|
// ---- the cards ---------------------------------------------------------------------------------
|
|
96
|
-
export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs = SETTLE_MS, now = Date.now, proc = process }) => {
|
|
100
|
+
export const createInstallUi = ({ stdin, stdout, env, round: wantsRound = false, animate = true, settleMs = SETTLE_MS, now = Date.now, proc = process }) => {
|
|
97
101
|
const depth = hudColorDepth(env);
|
|
98
102
|
const ascii = asciiLocale(env);
|
|
99
103
|
const glyph = ascii ? ASCII : UNICODE;
|
|
104
|
+
// One form for the whole run: round needs truecolor, like the status line's own round gauges.
|
|
105
|
+
const round = wantsRound && depth === "truecolor" && !ascii;
|
|
100
106
|
let accent = "cyan";
|
|
101
107
|
let letterAnsweredAt = -Infinity;
|
|
102
108
|
|
|
@@ -122,16 +128,21 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
122
128
|
const heading = (text) => paint(plainText(text), { bold: true });
|
|
123
129
|
const quiet = (text) => paint(plainText(text), { dim: true });
|
|
124
130
|
|
|
125
|
-
|
|
131
|
+
// A filled chip: one padding cell at each end, which the round form gives to its caps.
|
|
132
|
+
const chip = (text, stops) => {
|
|
133
|
+
const fill = (part, from) => ramp(part, stops, (bg) => ({ fg: INK, bg, bold: true }), from, cells(text) + 2);
|
|
134
|
+
return round ? paint(CAP_LEFT, { fg: stops[0] }) + fill(text, 1) + paint(CAP_RIGHT, { fg: stops.at(-1) }) : fill(` ${text} `, 0);
|
|
135
|
+
};
|
|
136
|
+
const pill = (text) => (depth === "plain" ? `[${text}]` : chip(text, [ORANGE, PINK]));
|
|
126
137
|
const frame = ({ tag = "LIT", title, body, tone }) => {
|
|
127
138
|
const width = cardWidth();
|
|
128
139
|
const inner = width - 4;
|
|
129
140
|
const stops = tone === "bad" ? [RED, RED] : [PINK, VIOLET, accentToken(accent)];
|
|
130
141
|
const line = (text, from) => ramp(text, stops, (fg) => ({ fg }), from, width);
|
|
131
142
|
const badge = pill(tag);
|
|
132
|
-
const inEdge = cells(badge) + cells(plainText(title)) +
|
|
133
|
-
const used =
|
|
134
|
-
const top = line(glyph.tl + glyph.h, 0)
|
|
143
|
+
const inEdge = cells(badge) + cells(plainText(title)) + 9 <= width;
|
|
144
|
+
const used = 4 + cells(badge) + (inEdge ? cells(plainText(title)) + 3 : 0);
|
|
145
|
+
const top = `${line(glyph.tl + glyph.h, 0)} ${badge}${inEdge ? ` ${quiet(glyph.dot)} ${heading(title)}` : ""} ` + line(glyph.h.repeat(width - used - 1) + glyph.tr, used);
|
|
135
146
|
const rows = [...(inEdge ? [] : wrap(plainText(title), inner).map((text) => paint(text, { bold: true }))), ...body];
|
|
136
147
|
return [
|
|
137
148
|
top,
|
|
@@ -159,8 +170,10 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
159
170
|
drawn = [];
|
|
160
171
|
draw(rows);
|
|
161
172
|
};
|
|
173
|
+
let folded = false;
|
|
162
174
|
const replaceWith = (row) => {
|
|
163
|
-
stdout.write(`${lift(drawn.length)}\r\x1b[J${row}\r\n`);
|
|
175
|
+
stdout.write(`${lift(drawn.length)}\r\x1b[J${folded ? "" : "\r\n"}${row}\r\n`);
|
|
176
|
+
folded = true;
|
|
164
177
|
drawn = [];
|
|
165
178
|
};
|
|
166
179
|
|
|
@@ -260,7 +273,7 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
260
273
|
|
|
261
274
|
const foldRow = (mark, color, title, value) => {
|
|
262
275
|
const room = size().cols;
|
|
263
|
-
const label = cells(title) + cells(value) + 8 + cells(mark) > room ? `${plainText(title)} ` : pad(plainText(title), Math.min(28, Math.max(
|
|
276
|
+
const label = cells(title) + cells(value) + 8 + cells(mark) > room ? `${plainText(title)} ` : pad(plainText(title), Math.min(28, Math.max(VALUE_COL - 4, cells(title))));
|
|
264
277
|
return ` ${paint(mark, { fg: color, bold: true })} ${label} ${value}`;
|
|
265
278
|
};
|
|
266
279
|
const answered = (title, value) => foldRow(glyph.done, GREEN, title, paint(plainText(value), { bold: true }));
|
|
@@ -291,12 +304,12 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
291
304
|
let at = first;
|
|
292
305
|
const render = () => {
|
|
293
306
|
const inner = cardWidth() - 4;
|
|
294
|
-
const swatch = ({ color }) => (color && depth !== "plain" ? `${paint(ascii ? "##" : "██", { fg: accentToken(color) })} ` : "");
|
|
307
|
+
const swatch = ({ color }) => (color && depth !== "plain" ? `${paint(ascii ? "##" : round ? CAP_LEFT + CAP_RIGHT : "██", { fg: accentToken(color) })} ` : "");
|
|
295
308
|
const labels = choices.map((choice) => swatch(choice) + plainText(choice.label));
|
|
296
309
|
const labelWidth = Math.max(...labels.map(cells));
|
|
297
|
-
const tagText = [depth === "plain" ? `(${initialTag})` : initialTag, "*"].find((t, i) => i === 1 ||
|
|
310
|
+
const tagText = [depth === "plain" ? `(${initialTag})` : initialTag, "*"].find((t, i) => i === 1 || 8 + labelWidth + cells(t) <= inner);
|
|
298
311
|
const tagWidth = cells(tagText) + 2;
|
|
299
|
-
const room = inner -
|
|
312
|
+
const room = inner - 6 - labelWidth - 2 - tagWidth;
|
|
300
313
|
const views = choices[0].views ?? [];
|
|
301
314
|
const shown = views.findIndex((_, i) => choices.every((choice) => cells(choice.views[i]) <= room));
|
|
302
315
|
const details = !views.length && choices.every(({ detail = "" }) => cells(plainText(detail)) <= room);
|
|
@@ -306,9 +319,11 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
306
319
|
const extra = shown >= 0 ? pad(choice.views[shown], viewWidth) : details ? (on ? plainText(choice.detail ?? "") : quiet(choice.detail ?? "")) : "";
|
|
307
320
|
const mark = i === first ? paint(tagText, on ? { bold: true } : { fg: PINK, bold: true }) : "";
|
|
308
321
|
const row = `${on ? glyph.pointer : " "} ${choice.key} ${pad(labels[i], labelWidth)}${extra ? ` ${extra}` : ""}${mark ? ` ${mark}` : ""}`;
|
|
309
|
-
if (!on || depth === "plain") return row
|
|
322
|
+
if (!on || depth === "plain") return ` ${row}`;
|
|
310
323
|
const bar = `\x1b[${sgr(IVORY, false, depth)};${sgr(BAR, true, depth)}m`;
|
|
311
|
-
|
|
324
|
+
const filled = (text) => `${bar}${text.replace(/\x1b\[(?:0|39)m/gu, (reset) => reset + bar)}\x1b[0m`;
|
|
325
|
+
const body = pad(row, inner - 2);
|
|
326
|
+
return round ? paint(CAP_LEFT, { fg: BAR }) + filled(body) + paint(CAP_RIGHT, { fg: BAR }) : filled(` ${body} `);
|
|
312
327
|
});
|
|
313
328
|
const noteRows = wrap(plainText(note), inner);
|
|
314
329
|
const last = choices.at(-1).key;
|
|
@@ -356,15 +371,17 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
356
371
|
const width = Math.max(...["Yes", "No"].map((w) => w.length)) + (inner >= 44 ? 10 : 8) + 2;
|
|
357
372
|
const text = pad(label, width);
|
|
358
373
|
const set = on ? glyph.on : glyph.off;
|
|
359
|
-
|
|
360
|
-
if (on
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
374
|
+
const filled = on && depth !== "plain";
|
|
375
|
+
if (small) return [filled ? chip(text, [PINK, VIOLET]) : on ? `[${text}]` : ` ${paint(text, { dim: true })} `];
|
|
376
|
+
if (filled && !ascii) {
|
|
377
|
+
// A neon outline with the filled chip inside it.
|
|
378
|
+
const edge = (part, from = 0) => ramp(part, [PINK, VIOLET], (fg) => ({ fg }), from, width + 6);
|
|
379
|
+
const rule = glyph.h.repeat(width + 4);
|
|
380
|
+
return [edge(glyph.tl + rule + glyph.tr), `${edge(glyph.v)} ${chip(text, [PINK, VIOLET])} ${edge(glyph.v, width + 5)}`, edge(glyph.bl + rule + glyph.br)];
|
|
364
381
|
}
|
|
365
382
|
const style = on ? (t) => paint(t, { fg: PINK, bold: true }) : quiet;
|
|
366
|
-
const
|
|
367
|
-
return [style(
|
|
383
|
+
const rule = set[1].repeat(width + 4);
|
|
384
|
+
return [style(set[0] + rule + set[2]), `${style(set[3])} ${on ? paint(text, { bold: true }) : text} ${style(set[3])}`, style(set[4] + rule + set[5])];
|
|
368
385
|
});
|
|
369
386
|
return each[0].map((left, i) => `${left} ${each[1][i]}`).filter((row) => cells(row) <= inner || small);
|
|
370
387
|
};
|
|
@@ -415,14 +432,16 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
415
432
|
const letGo = hold();
|
|
416
433
|
const render = () => {
|
|
417
434
|
const inner = cardWidth() - 4;
|
|
418
|
-
const
|
|
435
|
+
const longest = Math.max(...steps.map(({ name }) => name.length));
|
|
436
|
+
const column = VALUE_COL - 7;
|
|
437
|
+
const nameWidth = steps.every(({ text }) => column + cells(text) + cells(glyph.done) + 3 <= inner) ? Math.max(column, longest) : longest;
|
|
419
438
|
const body = steps.map(({ name, text }, i) => {
|
|
420
439
|
const mark = { wait: quiet(glyph.dot), run: paint(glyph.spin[spin % glyph.spin.length], { fg: accentToken(accent), bold: true }), done: paint(glyph.done, { fg: GREEN, bold: true }), fail: paint(glyph.fail, { fg: RED, bold: true }) }[state[i]];
|
|
421
440
|
const label = pad(name, nameWidth);
|
|
422
441
|
const row = `${pad(mark, cells(glyph.done))} ${state[i] === "run" ? paint(label, { bold: true }) : state[i] === "wait" ? quiet(label) : label}`;
|
|
423
442
|
return cells(row) + 2 + cells(text) <= inner ? `${row} ${quiet(text)}` : row;
|
|
424
443
|
});
|
|
425
|
-
return ["", ...frame({ tag, title, body, tone: state.includes("fail") ? "bad" : undefined })];
|
|
444
|
+
return ["", ...frame({ tag, title, body: ["", ...body], tone: state.includes("fail") ? "bad" : undefined })];
|
|
426
445
|
};
|
|
427
446
|
const onResize = () => redraw(render());
|
|
428
447
|
stdout.on("resize", onResize);
|
|
@@ -454,7 +473,7 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
454
473
|
const panel = ({ tag, title, sections, tone }) => {
|
|
455
474
|
const inner = cardWidth() - 4;
|
|
456
475
|
const marks = { done: [glyph.done, GREEN], warn: [glyph.warn, AMBER], fail: [glyph.fail, RED], note: [glyph.dot, VIOLET] };
|
|
457
|
-
const labelWidth = Math.max(
|
|
476
|
+
const labelWidth = Math.max(VALUE_COL - 5, ...sections.flatMap(({ rows }) => rows.map(({ label = "" }) => cells(label) + 2)));
|
|
458
477
|
const stacked = inner < 56;
|
|
459
478
|
const markWidth = cells(glyph.done) + 1;
|
|
460
479
|
const body = sections.flatMap(({ head, rows }) => [
|
|
@@ -478,8 +497,9 @@ export const createInstallUi = ({ stdin, stdout, env, animate = true, settleMs =
|
|
|
478
497
|
};
|
|
479
498
|
|
|
480
499
|
return {
|
|
481
|
-
depth, ascii, choose, confirm, progress, panel, paint, plainText, heading,
|
|
500
|
+
depth, ascii, round, choose, confirm, progress, panel, paint, plainText, heading,
|
|
482
501
|
setAccent: (name) => { accent = name; },
|
|
483
502
|
cols: () => size().cols,
|
|
503
|
+
cardWidth,
|
|
484
504
|
};
|
|
485
505
|
};
|
package/bin/litclaude-ai.js
CHANGED
|
@@ -75,6 +75,9 @@ import { runUpdateNotifier } from "./update-notifier.mjs";
|
|
|
75
75
|
import { assertInstallPath, assertOwnedTree, assertOwnedPluginTree, assertCurrentPointer, assertOwnedRegistrations, migrateLegacyVendorPaths, planModifiedLegacySkill, preserveModifiedLegacySkill, registeredPluginInstallation, writeOwnershipReceipt, removeEmptyDirectory, clearOwnedTree } from "./install-ownership.mjs";
|
|
76
76
|
import { createInstallUi, richTerminal, wrap } from "./install-ui.mjs";
|
|
77
77
|
import { colorMode, supportsBlocks } from "./litfamily-banner.mjs";
|
|
78
|
+
import { textWidth } from "../plugins/litclaude/lib/mod/layout.mjs";
|
|
79
|
+
import { xterm256Hex } from "../plugins/litclaude/lib/mod/settings.mjs";
|
|
80
|
+
import { roundCapsHere } from "../plugins/litclaude/lib/round-caps.mjs";
|
|
78
81
|
import { SIZES, pickSize, synthwaveRows } from "../plugins/litclaude/lib/synthwave-mark.mjs";
|
|
79
82
|
import {
|
|
80
83
|
ICON_FONT,
|
|
@@ -592,6 +595,10 @@ const createCardProgress = () => {
|
|
|
592
595
|
};
|
|
593
596
|
};
|
|
594
597
|
|
|
598
|
+
// The same answer the status line gets (lib/mod/round.mjs).
|
|
599
|
+
const installerRoundCaps = async () => normalizeHudAppearance(process.env.LITCLAUDE_HUD_APPEARANCE) === "dark"
|
|
600
|
+
&& roundCapsHere({ settings: readClaudeSettings() });
|
|
601
|
+
|
|
595
602
|
const homeRelative = (path) => (path.startsWith(`${homedir()}${sep}`) ? `~${path.slice(homedir().length)}` : path);
|
|
596
603
|
|
|
597
604
|
// The opening of a card install: the mark, then where the files go.
|
|
@@ -600,8 +607,12 @@ const writeInstallOpening = () => {
|
|
|
600
607
|
// A short window gets a smaller mark, so the first card and the mark are on screen together.
|
|
601
608
|
const height = process.stdout.rows || 24;
|
|
602
609
|
const cols = Math.min(terminalColumns(), height >= 48 ? Infinity : height >= 34 ? 75 : 43);
|
|
603
|
-
|
|
604
|
-
|
|
610
|
+
const mark = renderLitClaudeWordmark({ cols });
|
|
611
|
+
// The mark stands over the middle of the cards.
|
|
612
|
+
const width = Math.max(...mark.map((row) => textWidth(row.replace(/\x1b\[[0-9;]*m/gu, ""))));
|
|
613
|
+
const indent = " ".repeat(Math.max(0, 1 + Math.floor((installUi.cardWidth() - width) / 2)));
|
|
614
|
+
process.stdout.write(asciiFrame(`\n${mark.map((row) => indent + row).join("\n")}\n`));
|
|
615
|
+
process.stdout.write(`\n${wrap(where, installUi.cardWidth()).map((line) => ` ${installUi.paint(line, { dim: true })}\n`).join("")}`);
|
|
605
616
|
};
|
|
606
617
|
|
|
607
618
|
const currentExists = (home = claudeHome()) => existsSync(claudePluginRoot(home));
|
|
@@ -635,10 +646,31 @@ const writeClaudeSettings = (settings, home = claudeHome()) => {
|
|
|
635
646
|
writeFileSync(settingsPath, `${JSON.stringify(settings, null, 2)}\n`);
|
|
636
647
|
};
|
|
637
648
|
|
|
649
|
+
const PREVIEW_TRACK = "#2a2340";
|
|
650
|
+
const hexSgr = (hex, kind = 38) => `\x1b[${kind};2;${[1, 3, 5].map((i) => Number.parseInt(hex.slice(i, i + 2), 16)).join(";")}m`;
|
|
651
|
+
// The status line's round gauge and colours, as bin/litclaude-hud.js draws them.
|
|
652
|
+
const previewGauge = (percent, width, [from, to]) => {
|
|
653
|
+
const eighths = Math.max(percent > 0 ? 1 : 0, Math.round((percent * width * 8) / 100));
|
|
654
|
+
const mix = (t) => `#${[1, 3, 5].map((i) => [from, to].map((hex) => Number.parseInt(hex.slice(i, i + 2), 16))).map(([a, b]) => Math.round(a + (b - a) * t).toString(16).padStart(2, "0")).join("")}`;
|
|
655
|
+
const cellsDrawn = Array.from({ length: width }, (_, i) => `${hexSgr(mix(i / (width - 1)))}${" ▏▎▍▌▋▊▉█"[Math.max(0, Math.min(8, eighths - i * 8))]}`);
|
|
656
|
+
return `${hexSgr(percent > 0 ? from : PREVIEW_TRACK)}\ue0b6${hexSgr(PREVIEW_TRACK, 48)}${cellsDrawn.join("")}\x1b[0m${hexSgr(eighths >= width * 8 ? to : PREVIEW_TRACK)}\ue0b4\x1b[0m`;
|
|
657
|
+
};
|
|
658
|
+
const roundAccentViews = (theme) => {
|
|
659
|
+
const tint = (text) => `\x1b[38;5;${theme.code}m${text}\x1b[0m`;
|
|
660
|
+
const line = (hex) => ` ${hexSgr(hex)}│\x1b[0m `;
|
|
661
|
+
const brand = litBrandPrefix(version, { depth: "truecolor", roundCaps: true });
|
|
662
|
+
const gauge = previewGauge(18, 3, ["#b48cff", xterm256Hex(theme.code)]);
|
|
663
|
+
const context = `${tint("ctx")} ${gauge} ${tint("18%/1m")}`;
|
|
664
|
+
const five = `${tint("5h")} ${previewGauge(4, 2, ["#2fd6a0", "#6bf0c8"])}${hexSgr("#2fd6a0")}4%\x1b[0m`;
|
|
665
|
+
const full = `${brand} ${tint("|")} ${tint("O4.8")}${line("#ff2d95")}${context}${line("#ff66bb")}${five}`;
|
|
666
|
+
return [`${full} ${theme.mood.replace(" default", "'s own")}`, full, `${brand}${line("#ff2d95")}${context}${line("#ff66bb")}${five}`, `${brand}${line("#ff2d95")}${tint("ctx")} ${gauge} ${tint("18%")}`, context, gauge];
|
|
667
|
+
};
|
|
668
|
+
|
|
638
669
|
// The same preview at falling widths, for the colour card's rows.
|
|
639
670
|
const hudAccentViews = (theme) => {
|
|
640
|
-
const { depth, ascii } = installUi;
|
|
671
|
+
const { depth, ascii, round } = installUi;
|
|
641
672
|
const plain = depth === "plain";
|
|
673
|
+
if (round) return roundAccentViews(theme);
|
|
642
674
|
const tint = (text) => plain ? text : depth === "16" ? `\x1b[${ansi16CodeForAccent(theme.name)}m${text}\x1b[0m` : `\x1b[38;5;${theme.code}m${text}\x1b[0m`;
|
|
643
675
|
const brand = ascii ? `[LIT v${version}]` : litBrandPrefix(version, { noColor: plain, depth, appearance: normalizeHudAppearance(process.env.LITCLAUDE_HUD_APPEARANCE) });
|
|
644
676
|
const bar = `[${tint(ascii ? "#" : "▌")}${ascii ? "--" : "░░"}]`;
|
|
@@ -787,7 +819,7 @@ const chooseIconFont = async ({ iconFont, assumeYes, tag }) => {
|
|
|
787
819
|
title: "Icon font",
|
|
788
820
|
note: `${planIconFontInstall(iconFontPaths()).supported
|
|
789
821
|
? "Downloads the symbols-only Nerd Font (MIT) into your user font folder"
|
|
790
|
-
: "Shows how to install the symbols-only Nerd Font (MIT) by hand"}
|
|
822
|
+
: "Shows how to install the symbols-only Nerd Font (MIT) by hand"} for the status band's icons and round pills; No leaves your fonts as they are.`,
|
|
791
823
|
initial: false,
|
|
792
824
|
});
|
|
793
825
|
}
|
|
@@ -1739,7 +1771,7 @@ const writeInstallSummary = ({ home, hudAccent, hudManaged, permissionMode, loca
|
|
|
1739
1771
|
{ mark: "note", label: "Models", value: "host-owned (Claude Code exposes no native route surface)" },
|
|
1740
1772
|
] },
|
|
1741
1773
|
{ head: "Next", rows: [
|
|
1742
|
-
{ mark: "note", label: "Terminal", value: "quit Claude Code if it is open
|
|
1774
|
+
{ mark: "note", label: "Terminal", value: "quit Claude Code if it is open; launch with: claude" },
|
|
1743
1775
|
{ mark: "note", label: "Desktop app", value: "ready — the Code tab reads these same settings; open a new session there" },
|
|
1744
1776
|
] },
|
|
1745
1777
|
],
|
|
@@ -1815,7 +1847,7 @@ const install = async ({ dryRun, rest }) => {
|
|
|
1815
1847
|
}
|
|
1816
1848
|
|
|
1817
1849
|
if (!assumeYes && richTerminal({ stdin: process.stdin, stdout: process.stdout, env: process.env })) {
|
|
1818
|
-
installUi = createInstallUi({ stdin: process.stdin, stdout: process.stdout, env: process.env, animate: shouldAnimateInstall() });
|
|
1850
|
+
installUi = createInstallUi({ stdin: process.stdin, stdout: process.stdout, env: process.env, round: await installerRoundCaps(), animate: shouldAnimateInstall() });
|
|
1819
1851
|
installUi.setAccent(requestedHudAccent);
|
|
1820
1852
|
}
|
|
1821
1853
|
const progress = createInstallProgress();
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="146" height="20" role="img" aria-label="release: 1.0.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="146" height="20" role="img" aria-label="release: 1.0.65"><title>release: 1.0.65</title><g shape-rendering="crispEdges"><rect width="49" height="20" fill="#080d14"/><rect x="49" width="97" height="20" fill="#ff6337"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text x="255" y="140" textLength="390" transform="scale(.1)">release</text><text x="965" y="140" textLength="870" transform="scale(.1)" fill="#080D14">1.0.65</text></g></svg>
|
package/docs/hooks.md
CHANGED
|
@@ -371,8 +371,8 @@ status line read as one family:
|
|
|
371
371
|
╰─ ctx 42% ▰▰▱▱▱ · 5h 31% · 1w 12% · git main ─────────────────────╯
|
|
372
372
|
```
|
|
373
373
|
|
|
374
|
-
The brackets stand for the ends of filled pills: rounded caps
|
|
375
|
-
|
|
374
|
+
The brackets stand for the ends of filled pills: rounded caps where the terminal can draw
|
|
375
|
+
them, with the context gauge rounded in the same five cells, and one cell of the pill's colour with `basic`. The brand is a pill from orange to pink, the
|
|
376
376
|
current stage runs from violet to the accent, the skills of this request are pills on the accent with dark text, and skills from earlier
|
|
377
377
|
requests are muted grey pills.
|
|
378
378
|
|
|
@@ -534,12 +534,18 @@ step's spinner (`- \ | /`) and clock are ASCII, and a glyph swaps only together
|
|
|
534
534
|
The desktop app's Code tab, and the other surfaces that are not a terminal, draw a mod's `Text` in
|
|
535
535
|
a proportional font and cut each span to the cells it was laid out for, so the card above comes
|
|
536
536
|
apart there. On those surfaces the mod draws the same five rows as one `Svg` element instead
|
|
537
|
-
(`lib/mod/svg-card.mjs`): monospace text placed by counted cells, real pills and a rounded border
|
|
538
|
-
|
|
537
|
+
(`lib/mod/svg-card.mjs`): monospace text placed by counted cells, real pills and a rounded border
|
|
538
|
+
that runs from pink through violet to the accent (amber while it waits on you, red or amber for a
|
|
539
|
+
warning). `lib/mod/svg-sunset.mjs` draws the sunset behind the words: a half-sunk sun with dark
|
|
540
|
+
slits and a soft glow, its reflection on a layered sea, stars, and the border lit under the sun.
|
|
541
|
+
Every word and pill is measured first; a sun, star or wave is drawn only where none of them is, and
|
|
542
|
+
on a crowded card the sun gets smaller, steps aside, sinks to its rim or is left out. Gauges have
|
|
543
|
+
round ends. It shows the settled state, with no entrances or crossfades. While LitClaude works it moves with
|
|
539
544
|
SMIL animation inside the drawing, which runs in the image the surface draws it as: the
|
|
540
545
|
pill and the border breathe and the step's spinner turns, and on `full` a light crosses the
|
|
541
546
|
current stage and the current chips, a head runs the rail leaving it, the count bar's head
|
|
542
|
-
shimmers
|
|
547
|
+
shimmers, a comet runs around the border, the sea and the reflection move, the stars twinkle and a
|
|
548
|
+
shooting star passes; `subtle` and an idle card hold the sunset still; what breathes, sweeps or shuttles eases in and out,
|
|
543
549
|
and the spinner, the comet and the drifting sparks keep an even pace. An idle card is a still
|
|
544
550
|
image. The app loads each new drawing from scratch and restarts its animation, so this card names
|
|
545
551
|
the running tool without its clock and shows the loop round without its countdown, and each new
|
|
@@ -561,7 +567,7 @@ Uninstall removes only the defaults it wrote that are still unchanged.
|
|
|
561
567
|
| Option | Values | Default |
|
|
562
568
|
| --- | --- | --- |
|
|
563
569
|
| `motion` | `full`, `subtle` (no overshoot, shimmer, embers, sweep or comet, shorter; the LIT pill still breathes during work and the sunset holds still), `off` (final frames only) | `full` |
|
|
564
|
-
| `glyphs` | `auto` (Nerd glyphs when the icon font is installed; otherwise the basic symbols, with round pills
|
|
570
|
+
| `glyphs` | `auto` (Nerd glyphs when the icon font is installed; otherwise the basic symbols, with round pills where the terminal draws the caps: Windows Terminal 1.21 or later, VS Code, WezTerm, Ghostty, kitty, or any other terminal outside SSH with a Nerd Font installed), `nerd`, or `basic` | `auto` |
|
|
565
571
|
| `band` | `always` (the whole session, idle included), `auto` (only while work is active or a skill of this request is lit), `off` | `always` |
|
|
566
572
|
| `notify` | `off`, `finish` (a notification through your own notification channel, `$.ui.notify`, when LIT work completes or a LIT turn longer than three minutes ends), `finish+sound` (the same; a sound is added once LitClaude ships one, and none ships yet) | `off` |
|
|
567
573
|
| `club` | `on` (the idle card wears the club look once `lit invite` recorded an inviter), `off` (the plain ready card, byte for byte) | `on` |
|
|
@@ -596,7 +602,8 @@ between passes the card draws no frames. With `subtle` or `off` motion the ring
|
|
|
596
602
|
never makes a band show that `band: auto` would hide. No look flips more than a quarter of the card's brightness more than three
|
|
597
603
|
times a second; with `motion` off or reduced motion each look is one still frame, and with
|
|
598
604
|
`NO_COLOR` set the card keeps its labels and draws no colour (basic glyphs, no motion). The desktop
|
|
599
|
-
drawing shows the labels of these looks
|
|
605
|
+
drawing shows the labels of these looks and its own sunset (`svg-sunset.mjs`), not the lane
|
|
606
|
+
segments or the embers.
|
|
600
607
|
|
|
601
608
|
The icons on `nerd` (the rounded pill caps U+E0B6 and U+E0B4, the chip bolt and the branch mark)
|
|
602
609
|
come from a Nerd Font. `litclaude-ai install
|
|
@@ -612,8 +619,15 @@ records the two files, `uninstall` removes only those (and only while unchanged)
|
|
|
612
619
|
prints `ICON_FONT:`. With `glyphs` on `auto`, the band checks those font folders by stat at session
|
|
613
620
|
start and says what it decided on the `/lit-evidence` gates tab.
|
|
614
621
|
|
|
622
|
+
Round caps follow one rule (`lib/mod/round.mjs`) on the status line, the card and the installer.
|
|
623
|
+
`LITCLAUDE_HUD_GLYPHS` (`nerd`, `round` or `basic`) wins, then the `glyphs` option, then a terminal that
|
|
624
|
+
draws the caps itself; over SSH the answer is no, and otherwise a Nerd Font's file name in a font folder
|
|
625
|
+
decides. The look through the folders opens no font and stops at 4,000 names, 200 folders or three levels.
|
|
626
|
+
The card asks once a session; the status line keeps its answer in the per-user temp folder for a day, or
|
|
627
|
+
until a font folder changes.
|
|
628
|
+
|
|
615
629
|
The mod is read-only. It reads LitClaude's own state, the Git `HEAD` of the working directory and
|
|
616
|
-
the merged settings (for the status line's accent) and nothing else: the ignition record in the
|
|
630
|
+
the merged settings (for the status line's accent), the names in the font folders, and nothing else: the ignition record in the
|
|
617
631
|
per-user temp folder, `.litclaude/boulder.json` (found the way the hooks find it, across a
|
|
618
632
|
linked worktree), and under the outermost Git root's `.litclaude/` the litgoal goal, autoloop
|
|
619
633
|
counter and ledger, the lit-plan and interface-probe turn records, the auto-handoff
|
|
@@ -657,9 +671,18 @@ panel also makes a few machine gestures: a text spinner beside the state block,
|
|
|
657
671
|
under the stage counts that moves a row a step, registration marks that turn an eighth a step, and
|
|
658
672
|
at the power-on a row of slashes that wipes out along the rail from the column. The scene's own width media rules drop the readouts below 1240 px; below 1040 px they drop
|
|
659
673
|
the frame, the labels and the embers and move the plan and verify cells in behind the glass. It
|
|
660
|
-
is drawn like a measuring instrument throughout:
|
|
674
|
+
is drawn like a measuring instrument throughout: a halftone at both edges, a ruler under the fuse,
|
|
661
675
|
square cells with a 2 px outline and a hard offset shadow.
|
|
662
676
|
|
|
677
|
+
Behind the instruments lies a synthwave sunset: a violet-to-pink sky with twinkling stars and a
|
|
678
|
+
shooting star now and then, a slit sun low behind the column, a ridge of hills and a neon floor
|
|
679
|
+
that runs to the horizon in perspective. A calm column, gutter to gutter, lies over it where the
|
|
680
|
+
conversation is, so the sun reads through the glass as a faint warmth. The sun stands low at rest, up
|
|
681
|
+
in a run and after it, and a little lower while the work waits on you; it rises with the power-on
|
|
682
|
+
(1 s) and sinks with the power-down (1.8 s). The floor rolls only in a run. The frame is a neon
|
|
683
|
+
line from orange through pink and violet to cyan (it starts lime while asking or done). Light mode is
|
|
684
|
+
a pale dawn in the same shapes; a narrow box dims the sun.
|
|
685
|
+
|
|
663
686
|
Idle and a lit run look clearly different. Idle is a dormant panel: the burnt fuse cold and dim,
|
|
664
687
|
lit cells banked low, a few dim embers, low heat, a dim frame and `STATE: STANDBY`. A run powers it
|
|
665
688
|
up: the fuse hot with its heat streak behind the glass, the frame and the share on the right rule
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litfamily/litclaude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Claude Code plugin: add lit to a prompt and Claude plans, tests, checks and reviews the work, then leaves a handoff for the next session.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { execFileSync } from "node:child_process";
|
|
4
|
-
import { existsSync, readFileSync
|
|
4
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { basename, dirname, join } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import {
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
normalizeHudAppearance,
|
|
13
13
|
} from "../lib/hud-accent-palette.mjs";
|
|
14
14
|
import { latestUsageTokensCached } from "../lib/cache-measurement.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { xterm256Hex } from "../lib/mod/settings.mjs";
|
|
16
16
|
import { lerpColor } from "../lib/mod/motion.mjs";
|
|
17
|
-
import {
|
|
17
|
+
import { roundCapsHere } from "../lib/round-caps.mjs";
|
|
18
18
|
import { ignitionStatePath } from "../lib/hud-ignition.mjs";
|
|
19
19
|
import { resolveProjectStateRoot } from "../lib/project-state-root.mjs";
|
|
20
20
|
import { recordContextUsage, resolveAutoHandoff } from "../lib/auto-handoff.mjs";
|
|
@@ -49,17 +49,9 @@ const colors = plainOutput
|
|
|
49
49
|
|
|
50
50
|
const accent = (text) => `${colors.accent}${text}${colors.reset}`;
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} catch {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
// Round gauges and badge on a dark truecolor terminal that can draw round caps: the icon font is
|
|
60
|
-
// installed, or the terminal draws them itself. LITCLAUDE_HUD_GLYPHS=basic keeps the square bars.
|
|
61
|
-
const round = colorDepth === "truecolor" && appearance === "dark" && process.env.LITCLAUDE_HUD_GLYPHS !== "basic"
|
|
62
|
-
&& (process.env.LITCLAUDE_HUD_GLYPHS === "nerd" || drawsRoundCaps(process.env) || hasIconFont());
|
|
52
|
+
// Round gauges and badge on a dark truecolor terminal that can draw round caps (lib/mod/round.mjs).
|
|
53
|
+
// LITCLAUDE_HUD_GLYPHS=basic keeps the square bars.
|
|
54
|
+
const round = colorDepth === "truecolor" && appearance === "dark" && await roundCapsHere({ cached: true });
|
|
63
55
|
const rgb = (hex) => [1, 3, 5].map((i) => Number.parseInt(hex.slice(i, i + 2), 16));
|
|
64
56
|
const fg = (hex) => `\x1b[38;2;${rgb(hex).join(";")}m`;
|
|
65
57
|
const bg = (hex) => `\x1b[48;2;${rgb(hex).join(";")}m`;
|