@litfamily/litclaude 1.0.52 → 1.0.53
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 +8 -8
- package/README_ko-KR.md +8 -8
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/hooks.md +76 -9
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +7 -1
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/hooks/lit-mod.mjs +81 -6
- package/plugins/litclaude/hooks/make-colors.d.ts +35 -0
- package/plugins/litclaude/hooks/make-colors.js +1016 -0
- package/plugins/litclaude/lib/mod/backdrop.mjs +675 -0
- package/plugins/litclaude/lib/mod/settings.mjs +5 -2
- package/plugins/litclaude/lib/mod/skills.mjs +10 -0
- package/plugins/litclaude/lib/mod/svg-card.mjs +34 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.53 - 2026-11-17
|
|
4
|
+
|
|
5
|
+
- The Claude desktop and mobile apps now wear the Ignition look: LitFamily colours in light and dark mode, and
|
|
6
|
+
a moving backdrop behind the chat that follows the LIT state. It rests on standby while idle, burns a fuse
|
|
7
|
+
while Claude works, sends a signal while it waits on you, and bursts when the work completes. Glyph
|
|
8
|
+
particles drift through it, a frame mounts the glass column the conversation sits in, and the panel powers
|
|
9
|
+
on when a run starts and powers down when it goes back to idle. A new option, `look`, sets it: `on` (the
|
|
10
|
+
default), `still` (the same look without motion) or `off` (the app's own look). Change it in `/config` under
|
|
11
|
+
LitClaude, or from a terminal with `litclaude-ai config look still`. The look needs Claude Code 2.1.325 or
|
|
12
|
+
later in the desktop app; an older app simply shows no look. The terminal draws no look, and the band there
|
|
13
|
+
is unchanged.
|
|
14
|
+
- The LIT card in the desktop app no longer blinks when it changes. It is now drawn as an image, and each new
|
|
15
|
+
drawing keeps the loop where the one before it had reached, so a change of tool does not jump the comet or
|
|
16
|
+
the breathing back to the start.
|
|
17
|
+
- The LIT card and the look now light when a LitFamily extension skill runs from its wjgoarxiv-skills plugin,
|
|
18
|
+
such as `design:visual-qa`. Before, only the LitClaude name of the skill lit them.
|
|
19
|
+
|
|
3
20
|
## 1.0.52 - 2026-11-16
|
|
4
21
|
|
|
5
22
|
- LitClaude now saves a handoff before every compaction, by default. A new `PreCompact` hook writes
|
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.53/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/docs/assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: seven armored robots power on one by one, the LitClaude robot wakes with glowing eyes and a lit frame, then LITFAMILY and KEEP THE WORK LIT. light up." /></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">A Claude Code plugin that helps every session plan the work, build it, check it, and leave a note the next session can pick up.</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.53/docs/assets/readme/badge-version.svg" alt="1.0.53" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/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.53/README_ko-KR.md">한국어</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
Add `lit` to a Claude Code prompt and Claude pins the goal, writes a failing test first,
|
|
@@ -77,7 +77,7 @@ the `/plugin` menu.
|
|
|
77
77
|
## More
|
|
78
78
|
|
|
79
79
|
- [Full guide and skills gallery on GitHub](https://github.com/wjgoarxiv/litclaude#readme)
|
|
80
|
-
- [Privacy and network behavior](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
81
|
-
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
82
|
-
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
83
|
-
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
80
|
+
- [Privacy and network behavior](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/docs/privacy.md)
|
|
81
|
+
- [Migration and ownership conflicts](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/docs/migration.md)
|
|
82
|
+
- [Release history](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/CHANGELOG.md)
|
|
83
|
+
- [MIT license](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/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.53/docs/assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/docs/assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 일곱 로봇 패널이 차례로 켜지고, LitClaude 로봇의 눈과 테두리가 빛난 뒤 LITFAMILY와 KEEP THE WORK LIT. 문구가 밝아지는 영상" /></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">Claude Code에서 세션마다 계획하고, 만들고, 확인한 뒤 다음 세션이 이어받을 기록을 남기게 돕는 플러그인입니다.</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.53/docs/assets/readme/badge-version.svg" alt="1.0.53" />
|
|
8
|
+
<a href="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/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.53/README.md">English</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
Claude Code 프롬프트에 `lit`을 붙이면 Claude가 목표를 고정하고, 실패하는 테스트를 먼저 쓰고,
|
|
@@ -75,7 +75,7 @@ npx @litfamily/litclaude@latest uninstall
|
|
|
75
75
|
## 더 보기
|
|
76
76
|
|
|
77
77
|
- [전체 안내와 스킬 갤러리 (GitHub)](https://github.com/wjgoarxiv/litclaude/blob/main/README_ko-KR.md)
|
|
78
|
-
- [개인정보와 네트워크 동작](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
79
|
-
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
80
|
-
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
81
|
-
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.
|
|
78
|
+
- [개인정보와 네트워크 동작](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/docs/privacy.md)
|
|
79
|
+
- [이전과 소유권 충돌](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/docs/migration.md)
|
|
80
|
+
- [변경 이력](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/CHANGELOG.md)
|
|
81
|
+
- [MIT 라이선스](https://cdn.jsdelivr.net/npm/@litfamily/litclaude@1.0.53/LICENSE)
|
|
@@ -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.53"><title>release: 1.0.53</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.53</text></g></svg>
|
package/docs/hooks.md
CHANGED
|
@@ -531,23 +531,25 @@ a proportional font and cut each span to the cells it was laid out for, so the c
|
|
|
531
531
|
apart there. On those surfaces the mod draws the same five rows as one `Svg` element instead
|
|
532
532
|
(`lib/mod/svg-card.mjs`): monospace text placed by counted cells, real pills and a rounded border.
|
|
533
533
|
It shows the settled state, with no entrances or crossfades. While LitClaude works it moves with
|
|
534
|
-
SMIL animation inside the drawing, which the
|
|
534
|
+
SMIL animation inside the drawing, which runs in the image the surface draws it as: the
|
|
535
535
|
pill and the border breathe and the step's spinner turns, and on `full` a light crosses the
|
|
536
536
|
current stage and the current chips, a head runs the rail leaving it, the count bar's head
|
|
537
|
-
shimmers and a comet runs around the border
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
537
|
+
shimmers and a comet runs around the border; what breathes, sweeps or shuttles eases in and out,
|
|
538
|
+
and the spinner, the comet and the drifting sparks keep an even pace. An idle card is a still
|
|
539
|
+
image. The app loads each new drawing from scratch and restarts its animation, so this card names
|
|
540
|
+
the running tool without its clock and shows the loop round without its countdown, and each new
|
|
541
|
+
drawing is composed at the session clock: every loop opens where the drawing before it had
|
|
542
|
+
reached, so a change of tool does not jump the comet or the breathing back to a start. The card is
|
|
543
|
+
not drawn with `isInteractive`: the desktop draws that as a sandboxed frame, which loads a whole
|
|
544
|
+
document for each new drawing and shows nothing meanwhile, so the card blinked on every change. An
|
|
545
|
+
image is up within a frame, and a redraw with nothing new keeps the very same source. It is redrawn only when something you would
|
|
544
546
|
notice changes, such as the stage, the tool, a skill, a usage figure or the goal. While the card
|
|
545
547
|
shows in a terminal and the app at once, the terminal's loop countdown waits for such
|
|
546
548
|
a change too; its step and lane clocks keep counting on their own.
|
|
547
549
|
|
|
548
550
|
Options, in `/config` under LitClaude (stored in `pluginConfigs` in `~/.claude/settings.json`,
|
|
549
551
|
which the terminal and the desktop app's Code tab both read). The installer writes each default
|
|
550
|
-
you have not set, so the desktop app, which has no editor for them, starts with all
|
|
552
|
+
you have not set, so the desktop app, which has no editor for them, starts with all six;
|
|
551
553
|
`litclaude-ai config` prints them and `litclaude-ai config <option> <value>` changes one.
|
|
552
554
|
Uninstall removes only the defaults it wrote that are still unchanged.
|
|
553
555
|
|
|
@@ -558,6 +560,7 @@ Uninstall removes only the defaults it wrote that are still unchanged.
|
|
|
558
560
|
| `band` | `always` (the whole session, idle included), `auto` (only while work is active or a skill of this request is lit), `off` | `always` |
|
|
559
561
|
| `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` |
|
|
560
562
|
| `club` | `on` (the idle card wears the club look once `lit invite` recorded an inviter), `off` (the plain ready card, byte for byte) | `on` |
|
|
563
|
+
| `look` | `on` (the Ignition look in the desktop and mobile apps, with a moving backdrop), `still` (the same look, one still frame), `off` (the app's own look) | `on` |
|
|
561
564
|
|
|
562
565
|
Unknown values fall back to the default. The fields are plain strings with no `options` list on
|
|
563
566
|
purpose: Claude Code 2.1.270 and older refuse to load a plugin whose `userConfig` has one, and
|
|
@@ -615,6 +618,70 @@ exactly where its path says, so a symlinked file or state folder is skipped. It
|
|
|
615
618
|
starts no process, uses no network and calls no model. Its pure parts live in
|
|
616
619
|
`plugins/litclaude/lib/mod/` and are tested under Node.
|
|
617
620
|
|
|
621
|
+
### The Ignition look (desktop and mobile apps)
|
|
622
|
+
|
|
623
|
+
With `look` on `on` or `still`, the mod calls `$.theme.set` once at `session.start` with the
|
|
624
|
+
Ignition colours (ignition orange, signal lime, ivory and carbon navy, built by an unchanged copy
|
|
625
|
+
of the host's `hooks/make-colors.js` into both light and dark mode) and a backdrop scene with
|
|
626
|
+
glass: blur 18, opacity 0.62 and no raw tint, so every panel keeps the look's own colour in each
|
|
627
|
+
mode. When that first set reports `isDrawn: false` (a desktop window can attach after the session
|
|
628
|
+
starts), the first prompt sets it once more; never again after that. A Claude Code build with no
|
|
629
|
+
`$.theme` gets no look and no error. The terminal and the editors draw no look; the band and the
|
|
630
|
+
spinner there are unchanged.
|
|
631
|
+
|
|
632
|
+
The scene (`lib/mod/backdrop.mjs`, drawn by the `ui.render` hook on `Backdrop` for the desktop
|
|
633
|
+
and mobile surfaces only) is an instrument panel with the conversation mounted in it. The desktop
|
|
634
|
+
draws the backdrop across the whole content frame and frosts a centred column over it: the column
|
|
635
|
+
is the transcript measure (768 px unless the transcript width is set wider), fully blurred, with
|
|
636
|
+
the blur ramping out over 48 px beyond it. The hook is given no pixel geometry, so the scene is
|
|
637
|
+
laid out in CSS pixels from the centre of its box and splits into two zones. The sharp gutters,
|
|
638
|
+
from 456 px out, hold the plan and verify cells of the fuse, a frame that mounts the column (a
|
|
639
|
+
ticked rule on each side with square brackets at its head and foot, the right one lit down to the
|
|
640
|
+
share of work done), small dim monospace readouts (`PLAN 1/1`, `BUILD 4/6` and `VERIFY 0/1`
|
|
641
|
+
stacked beside the left rule, a flat `STATE:` block beside the right one, the lit cells as bits
|
|
642
|
+
and hex and a `T+` second counter at the foot beside registration targets), embers and heat beds.
|
|
643
|
+
The diffuse zone behind the glass holds what reads through a blur: the fuse as a heat streak, a
|
|
644
|
+
soft bloom under each lit build cell, a low heat haze along the fuse. Nothing sits on the glass
|
|
645
|
+
edge. The particles are monospace glyphs drawn as SVG text in the platform's own
|
|
646
|
+
monospace font. A near ember spins `|` `/` `-` `\` on stepped frames over its own soft glow while
|
|
647
|
+
it rises on a smooth curve, cooling from lime (orange at rest) through orange to ember red; a spark
|
|
648
|
+
dripping from the fuse ages `*` `+` `·` `-`; the finish throws `*` and `×` that cool to `+` and
|
|
649
|
+
`·` as they fall. Far embers, the gentle fire at the foot of each gutter, the haze and the blooms
|
|
650
|
+
are soft light, radial gradients with no filter on anything that moves. While a run is on the
|
|
651
|
+
panel also makes a few machine gestures: a text spinner beside the state block, a dot-matrix ticker
|
|
652
|
+
under the stage counts that moves a row a step, registration marks that turn an eighth a step, and
|
|
653
|
+
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
|
|
654
|
+
the frame, the labels and the embers and move the plan and verify cells in behind the glass. It
|
|
655
|
+
is drawn like a measuring instrument throughout: graph paper and halftone, a ruler under the fuse,
|
|
656
|
+
square cells with a 2 px outline and a hard offset shadow.
|
|
657
|
+
|
|
658
|
+
Idle and a lit run look clearly different. Idle is a dormant panel: the burnt fuse cold and dim,
|
|
659
|
+
lit cells banked low, a few dim embers, low heat, a dim frame and `STATE: STANDBY`. A run powers it
|
|
660
|
+
up: the fuse hot with its heat streak behind the glass, the frame and the share on the right rule
|
|
661
|
+
lit in orange (lime while asking or done), the readouts warm, the embers and the heat beds up. The
|
|
662
|
+
change between them plays once: into a run the lit frame ignites on a spring in about 0.7 s, back
|
|
663
|
+
to idle it fades down over 1.6 s. Motion is physical: moves run on springs solved from a damping
|
|
664
|
+
ratio and written as CSS `linear()` curves, each declared after a cubic-bezier fitted to it for
|
|
665
|
+
engines without `linear()`; embers rise against drag and sparks fall under gravity; each kind of
|
|
666
|
+
part has its own curve, and parts that move together trail one another by 30 to 90 ms. It
|
|
667
|
+
follows the session: **idle**, the next cell smoulders; **working**, the spark runs the stretch
|
|
668
|
+
towards the next cell on a spring with a streak that stretches while it is fast, settles there,
|
|
669
|
+
and the cell kicks as it lands, while the cell it left recoils and embers fall from the stretch;
|
|
670
|
+
**asking** (the same YOUR TURN conditions as the card), a lime lamp breathes (a quick rise, a slow
|
|
671
|
+
fall) with square signal rings opening a second apart at the cell the work waits at; **done** (the
|
|
672
|
+
card's finish conditions), a sweep runs the fuse and kicks each cell as it passes, the verify
|
|
673
|
+
cell gathers and releases, and shockwaves and overlapping spark bursts open in the gutters below
|
|
674
|
+
the title strip, and the verify cell settles lime for nine seconds before the scene goes back to
|
|
675
|
+
the live state. Every loop shares one 24 s clock and the scene is drawn with the clock's phase as
|
|
676
|
+
a negative delay, so a new state continues each loop instead of restarting it; the power change
|
|
677
|
+
is drawn less the time since it began, so a scene composed during it does not start it again. The
|
|
678
|
+
scene is redrawn only when its state changes. Its media rules are the box width rules above,
|
|
679
|
+
`prefers-color-scheme` and `prefers-reduced-motion`, which holds a composed still frame; `still`,
|
|
680
|
+
or Claude Code's own reduce-motion setting, draws that frame with no animation. Each scene stays
|
|
681
|
+
well under the Svg cap of 131,072 characters. Tests do not paint, so check it in the Claude
|
|
682
|
+
desktop app in both modes, at a narrow and a wide window, with a long code block and a larger
|
|
683
|
+
text size.
|
|
684
|
+
|
|
618
685
|
On Claude Code releases before 2.1.287 the `modules` key is ignored and every settings hook runs
|
|
619
686
|
as before; there is no band.
|
|
620
687
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litfamily/litclaude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.53",
|
|
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
|
{
|
|
2
2
|
"name": "litclaude",
|
|
3
3
|
"description": "Claude Code-native workflow plugin with a bounded-authority start-work lifecycle.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.53",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LitClaude contributors"
|
|
7
7
|
},
|
|
@@ -50,6 +50,12 @@
|
|
|
50
50
|
"title": "LIT club look",
|
|
51
51
|
"description": "on: once you typed `lit invite @<github-id>`, the idle card wears the gold club look. off keeps the plain ready card. Nothing is sent anywhere.",
|
|
52
52
|
"default": "on"
|
|
53
|
+
},
|
|
54
|
+
"look": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"title": "LitFamily look",
|
|
57
|
+
"description": "How the Claude desktop and mobile apps look: on (the Ignition colours and a moving backdrop that follows the LIT state: embers while idle, a burning fuse while working, a signal while it waits on you, a burst when work completes), still (the same look with no motion) or off (the app's own look). The terminal draws no look.",
|
|
58
|
+
"default": "on"
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
// session stands in the LIT workflow, the tool the main loop is running and for how long, a chip
|
|
4
4
|
// for each LitFamily skill that fires. It adds the discipline and progress to the spinner, raises
|
|
5
5
|
// a toast when the LIT status changes (at most one each three seconds) and gate notices, serves /lit-evidence and, when the `notify` option asks, raises a notification
|
|
6
|
-
// when LIT work completes or a long LIT turn ends.
|
|
6
|
+
// when LIT work completes or a long LIT turn ends. Under the `look` option (on by default) it also
|
|
7
|
+
// sets the Ignition look once a session with `$.theme.set` and draws its backdrop scene, which the
|
|
8
|
+
// desktop and mobile apps show behind the conversation and which follows the LIT state
|
|
9
|
+
// (lib/mod/backdrop.mjs); the terminal draws no look. It is read-only: it reads LitClaude's own state
|
|
7
10
|
// files and the Git HEAD through lib/mod/state.mjs, the settings for the status line's accent, and
|
|
8
11
|
// the host's live figures, and never writes, spawns, fetches or calls a model. Of a tool call it
|
|
9
12
|
// keeps the tool's name and start time, never its arguments, with three exceptions that keep counts
|
|
@@ -15,6 +18,7 @@
|
|
|
15
18
|
// The mods loader only follows `$` into functions declared at the top of this file, so each helper
|
|
16
19
|
// below takes `$` and the per-load `live` record explicitly instead of closing over them.
|
|
17
20
|
|
|
21
|
+
import { BURST_MS, POWER_MS, SCENE, composeScene, lookArgs, lookColors, sceneKey, sceneStateOf } from "../lib/mod/backdrop.mjs";
|
|
18
22
|
import { composeBand, composeEvidence } from "../lib/mod/frame.mjs";
|
|
19
23
|
import { TIMINGS } from "../lib/mod/motion.mjs";
|
|
20
24
|
import { renderBand, renderRows } from "../lib/mod/render.mjs";
|
|
@@ -65,8 +69,21 @@ const createLive = (options) => ({
|
|
|
65
69
|
band: normalizeModSettings(options).band,
|
|
66
70
|
motion: normalizeModSettings(options).motion,
|
|
67
71
|
club: normalizeModSettings(options).club === "on",
|
|
72
|
+
look: normalizeModSettings(options).look,
|
|
73
|
+
// The first `$.theme.set` answer (null when none was sent), whether the first prompt set it again,
|
|
74
|
+
// the backdrop scene drawn last (`{ key, source, alt, animated }`), whether a desktop or mobile
|
|
75
|
+
// app asked for it, the finish whose burst the scene still plays, and the last power change
|
|
76
|
+
// (`{ dir, at }`: a lit run starting or ending, at the session clock).
|
|
77
|
+
lookSet: null,
|
|
78
|
+
lookRetried: false,
|
|
79
|
+
scene: null,
|
|
80
|
+
backdropDrawn: false,
|
|
81
|
+
burst: null,
|
|
82
|
+
power: null,
|
|
68
83
|
// The inviter `lit invite` recorded on this machine, or null (state.mjs readInvited).
|
|
69
84
|
invited: null,
|
|
85
|
+
// The desktop card drawn last: `{ key, source, alt }`, its key the card drawn at clock 0.
|
|
86
|
+
card: null,
|
|
70
87
|
drawnOn: {},
|
|
71
88
|
iconFont: { present: false, path: null, note: "basic: not checked yet" },
|
|
72
89
|
env: {},
|
|
@@ -186,6 +203,35 @@ async function endWaiting($, live, redraw = true) {
|
|
|
186
203
|
if (redraw) await rebuild($, live);
|
|
187
204
|
}
|
|
188
205
|
|
|
206
|
+
// The look, set once. The loader accepts `$` only in a full call at the call site, so an older
|
|
207
|
+
// Claude Code with no theme API is met by the catch; a failed set leaves the app's own look.
|
|
208
|
+
async function setLook($, live) {
|
|
209
|
+
if (live.look === "off") return null;
|
|
210
|
+
try {
|
|
211
|
+
return await $.theme.set(lookArgs(lookColors().theme));
|
|
212
|
+
} catch {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// The backdrop scene for the live state; a new source only when the scene's key changes, drawn with
|
|
218
|
+
// the clock's phase then (backdrop.mjs), so a swap continues every loop. A change between idle and a
|
|
219
|
+
// lit run is a power change: the scene composed for it plays the power-on or the power-down, less
|
|
220
|
+
// the time since the change began, so a scene composed later in it does not start it again. True
|
|
221
|
+
// when it changed.
|
|
222
|
+
function updateScene(live, now) {
|
|
223
|
+
const still = live.look === "still" || live.reducedMotion === true;
|
|
224
|
+
const state = sceneStateOf(live.model, { isWorking: live.isWorking, burst: live.burst !== null, waiting: waitingOf(live) });
|
|
225
|
+
const key = sceneKey(state, still);
|
|
226
|
+
if (live.scene?.key === key) return false;
|
|
227
|
+
const running = state.mood !== "idle";
|
|
228
|
+
const wasRunning = live.scene ? live.scene.running : false;
|
|
229
|
+
if (live.scene && running !== wasRunning) live.power = { dir: running ? "on" : "off", at: now };
|
|
230
|
+
const power = live.power && now - live.power.at < POWER_MS[live.power.dir] ? { dir: live.power.dir, ageMs: now - live.power.at } : null;
|
|
231
|
+
live.scene = { key, running, ...composeScene(state, { still, clockMs: now, power }) };
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
|
|
189
235
|
async function rebuild($, live) {
|
|
190
236
|
const now = await $.clock.now();
|
|
191
237
|
const previous = live.model;
|
|
@@ -229,7 +275,8 @@ async function rebuild($, live) {
|
|
|
229
275
|
$.ui.invalidate("ui.render");
|
|
230
276
|
});
|
|
231
277
|
}
|
|
232
|
-
|
|
278
|
+
const sceneMoved = live.backdropDrawn && updateScene(live, now);
|
|
279
|
+
if (sceneMoved || drawnKey(live, previous) !== drawnKey(live, next)) $.ui.invalidate("ui.render");
|
|
233
280
|
return next;
|
|
234
281
|
}
|
|
235
282
|
|
|
@@ -252,6 +299,13 @@ function celebrate($, live, finish, options) {
|
|
|
252
299
|
if (live.celebrated.has(finish.id)) return;
|
|
253
300
|
live.celebrated.add(finish.id);
|
|
254
301
|
live.completion = finish;
|
|
302
|
+
// The backdrop's burst outlasts the card's: it holds BURST_MS, then the scene settles.
|
|
303
|
+
live.burst = finish.id;
|
|
304
|
+
$.clock.after(BURST_MS, () => {
|
|
305
|
+
if (live.burst !== finish.id) return;
|
|
306
|
+
live.burst = null;
|
|
307
|
+
void rebuild($, live);
|
|
308
|
+
});
|
|
255
309
|
live.turnNotified = true;
|
|
256
310
|
notifyFinish($, options, `LIT complete · ${finish.detail}`);
|
|
257
311
|
$.clock.after(TIMINGS.completion + 200, () => {
|
|
@@ -373,6 +427,7 @@ export const register = (on, options) => {
|
|
|
373
427
|
live.noColor = Boolean(await $.env.get("NO_COLOR"));
|
|
374
428
|
live.reducedMotion = hostSettings?.prefersReducedMotion === true;
|
|
375
429
|
live.motion = effectiveMotion(live.motion, hostSettings);
|
|
430
|
+
live.lookSet = await setLook($, live);
|
|
376
431
|
await $.command.register({ name: PANE, description: "Show LitClaude goal criteria, evidence, lanes and gates in a pane" });
|
|
377
432
|
await refresh($, live, options);
|
|
378
433
|
$.clock.every(POLL_MS, () => {
|
|
@@ -473,8 +528,13 @@ export const register = (on, options) => {
|
|
|
473
528
|
return next(e);
|
|
474
529
|
}).catch(($, e, next) => next(e));
|
|
475
530
|
|
|
476
|
-
// A background task's notification ends its thread row: its text is read for ids alone.
|
|
531
|
+
// A background task's notification ends its thread row: its text is read for ids alone. The first
|
|
532
|
+
// prompt sets the look again when session.start found no app to draw it: a window can attach late.
|
|
477
533
|
on("prompt.submit", async ($, e, next) => {
|
|
534
|
+
if (live.lookSet?.isDrawn === false && !live.lookRetried) {
|
|
535
|
+
live.lookRetried = true;
|
|
536
|
+
live.lookSet = await setLook($, live);
|
|
537
|
+
}
|
|
478
538
|
if (e.origin?.kind === "task-notification") {
|
|
479
539
|
for (const id of endedTaskIds(e.text)) live.tasks = endBackgroundTask(live.tasks, id);
|
|
480
540
|
refreshSoon($, live, options);
|
|
@@ -535,10 +595,15 @@ export const register = (on, options) => {
|
|
|
535
595
|
live.drawnOn[e.surface] = e.surface !== "terminal" && elements.Svg ? "svg" : "cells";
|
|
536
596
|
if (e.surface !== "terminal" && elements.Svg) {
|
|
537
597
|
// A desktop or editor draws Text in a proportional font, so the cell-built card comes apart
|
|
538
|
-
// there; those surfaces get the card as one drawing instead.
|
|
598
|
+
// there; those surfaces get the card as one drawing instead. It is drawn as an image, where
|
|
599
|
+
// SMIL runs: the desktop puts a new image up within a frame, but a sandboxed frame (what
|
|
600
|
+
// `isInteractive` asks for) loads a whole document first and shows nothing meanwhile, which
|
|
601
|
+
// made the card blink on every change. A redraw with nothing new keeps the same source; a
|
|
602
|
+
// changed card is composed at the session clock, so its loops carry on where they were.
|
|
539
603
|
if (model.visible) {
|
|
540
|
-
const
|
|
541
|
-
|
|
604
|
+
const key = composeSvgCard(model, { motion, accent: live.accent }).source;
|
|
605
|
+
if (live.card?.key !== key) live.card = { key, ...composeSvgCard(model, { motion, accent: live.accent, clock: await $.clock.now() }) };
|
|
606
|
+
drawn = elements.Svg({ source: live.card.source, alt: live.card.alt });
|
|
542
607
|
}
|
|
543
608
|
} else if (!live.clientFailed) {
|
|
544
609
|
drawn = h("Client", { key: "lit-band", module: "./lit-band-client.mjs", props: { model, columns, glyphs, motion, accent: live.accent, color } });
|
|
@@ -550,6 +615,16 @@ export const register = (on, options) => {
|
|
|
550
615
|
return below ? elements.Box({ flexDirection: "column", children: [drawn, below] }) : drawn;
|
|
551
616
|
});
|
|
552
617
|
|
|
618
|
+
// The look's backdrop: drawn by the desktop and mobile apps alone, for this plugin's scene.
|
|
619
|
+
on("ui.render", { component: "Backdrop" }, async ($, e, next) => {
|
|
620
|
+
if ((e.surface !== "desktop" && e.surface !== "mobile") || e.props?.scene !== SCENE || live.look === "off") return next(e);
|
|
621
|
+
live.backdropDrawn = true;
|
|
622
|
+
updateScene(live, await $.clock.now());
|
|
623
|
+
const elements = $.ui.resolve(e);
|
|
624
|
+
const { source, alt, animated } = live.scene;
|
|
625
|
+
return elements.Svg({ source, alt, ...(animated ? { isInteractive: true } : {}) });
|
|
626
|
+
}).catch(($, e, next) => next(e));
|
|
627
|
+
|
|
553
628
|
on("ui.render", { component: "Spinner" }, async ($, e, next) => {
|
|
554
629
|
const suffix = spinnerSuffix(live.model, e.props.suffix);
|
|
555
630
|
return suffix ? next({ ...e, props: { ...e.props, suffix } }) : next(e);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ThemeColors } from 'claude-code'
|
|
2
|
+
|
|
3
|
+
type Hex = string
|
|
4
|
+
|
|
5
|
+
type Mode = {
|
|
6
|
+
gray?: {
|
|
7
|
+
anchors?: { 'surface-0': Hex; 'text-primary': Hex } & Partial<
|
|
8
|
+
Record<'surface-1' | 'surface-2' | 'surface-3' | 'text-secondary' | 'text-muted', Hex>
|
|
9
|
+
>
|
|
10
|
+
stops?: Record<number, Hex>
|
|
11
|
+
}
|
|
12
|
+
roles?: Roles
|
|
13
|
+
git?: Partial<
|
|
14
|
+
Record<'added' | 'removed' | 'modified' | 'merged' | 'closed' | 'conflicting' | 'draft', Hex>
|
|
15
|
+
>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type Role = Hex | { seed?: Hex; stops?: Record<number, Hex>; fillShade?: number }
|
|
19
|
+
|
|
20
|
+
type Roles = Partial<Record<'accent' | 'danger' | 'success' | 'warning' | 'pro', Role>>
|
|
21
|
+
|
|
22
|
+
/** A whole theme from a few colors, and what fails. Throws on a color it can't use. */
|
|
23
|
+
export function makeColors(definition: {
|
|
24
|
+
label: string
|
|
25
|
+
id?: string
|
|
26
|
+
roles?: Roles
|
|
27
|
+
light?: Mode
|
|
28
|
+
dark?: Mode
|
|
29
|
+
codeTheme?: { light?: string; dark?: string }
|
|
30
|
+
contrast?: 'more'
|
|
31
|
+
only?: 'light' | 'dark'
|
|
32
|
+
}): { theme: ThemeColors; problems: string[] }
|
|
33
|
+
|
|
34
|
+
/** What's wrong with a theme from anywhere, as plain lines. */
|
|
35
|
+
export function checkColors(colors: unknown): string[]
|