liteagents 2.6.0 → 2.8.0

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE +202 -21
  3. package/README.md +6 -4
  4. package/installer/cli.js +4 -1
  5. package/package.json +2 -2
  6. package/packages/ampcode/commands/live-canvas/README.md +38 -47
  7. package/packages/{claude/skills/live-canvas/templates/demo → ampcode/commands/live-canvas/dev}/post-variants.html +8 -3
  8. package/packages/ampcode/commands/live-canvas/templates/lab-banner.html +6 -0
  9. package/packages/ampcode/commands/live-canvas/templates/overlay-vanilla.js +64 -6
  10. package/packages/ampcode/commands/live-canvas.md +140 -161
  11. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/.claude-plugin/plugin.json +1 -1
  12. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/README.md +2 -2
  13. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package-lock.json +13 -13
  14. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package.json +1 -1
  15. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/schema.json +1 -1
  16. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/server.js +320 -27
  17. package/packages/claude/plugins/live-canvas-marketplace/setup.sh +83 -24
  18. package/packages/claude/skills/live-canvas/README.md +53 -57
  19. package/packages/claude/skills/live-canvas/SKILL.md +122 -158
  20. package/packages/{ampcode/commands/live-canvas/templates/demo → claude/skills/live-canvas/dev}/post-variants.html +8 -3
  21. package/packages/claude/skills/live-canvas/templates/lab-banner.html +6 -0
  22. package/packages/claude/skills/live-canvas/templates/overlay-vanilla.js +64 -6
  23. package/packages/droid/commands/live-canvas/README.md +38 -47
  24. package/packages/droid/commands/live-canvas/{templates/demo → dev}/post-variants.html +8 -3
  25. package/packages/droid/commands/live-canvas/templates/lab-banner.html +6 -0
  26. package/packages/droid/commands/live-canvas/templates/overlay-vanilla.js +64 -6
  27. package/packages/droid/commands/live-canvas.md +140 -161
  28. package/packages/opencode/command/live-canvas/README.md +38 -47
  29. package/packages/opencode/command/live-canvas/{templates/demo → dev}/post-variants.html +8 -3
  30. package/packages/opencode/command/live-canvas/templates/lab-banner.html +6 -0
  31. package/packages/opencode/command/live-canvas/templates/overlay-vanilla.js +64 -6
  32. package/packages/opencode/command/live-canvas.md +140 -161
  33. package/packages/ampcode/commands/live-canvas/templates/.claude/settings.local.json +0 -8
  34. package/packages/ampcode/commands/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +0 -1299
  35. package/packages/ampcode/commands/live-canvas/templates/feedback-react/format-utils.ts +0 -283
  36. package/packages/ampcode/commands/live-canvas/templates/feedback-react/index.ts +0 -62
  37. package/packages/ampcode/commands/live-canvas/templates/feedback-react/selector-utils.ts +0 -423
  38. package/packages/ampcode/commands/live-canvas/templates/feedback-react/types.ts +0 -118
  39. package/packages/claude/skills/live-canvas/INTEGRATION_NOTES.md +0 -210
  40. package/packages/claude/skills/live-canvas/templates/.claude/settings.local.json +0 -8
  41. package/packages/claude/skills/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +0 -1299
  42. package/packages/claude/skills/live-canvas/templates/feedback-react/format-utils.ts +0 -283
  43. package/packages/claude/skills/live-canvas/templates/feedback-react/index.ts +0 -62
  44. package/packages/claude/skills/live-canvas/templates/feedback-react/selector-utils.ts +0 -423
  45. package/packages/claude/skills/live-canvas/templates/feedback-react/types.ts +0 -118
  46. package/packages/droid/commands/live-canvas/templates/.claude/settings.local.json +0 -8
  47. package/packages/droid/commands/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +0 -1299
  48. package/packages/droid/commands/live-canvas/templates/feedback-react/format-utils.ts +0 -283
  49. package/packages/droid/commands/live-canvas/templates/feedback-react/index.ts +0 -62
  50. package/packages/droid/commands/live-canvas/templates/feedback-react/selector-utils.ts +0 -423
  51. package/packages/droid/commands/live-canvas/templates/feedback-react/types.ts +0 -118
  52. package/packages/opencode/command/live-canvas/templates/.claude/settings.local.json +0 -8
  53. package/packages/opencode/command/live-canvas/templates/feedback-react/FeedbackOverlay.tsx +0 -1299
  54. package/packages/opencode/command/live-canvas/templates/feedback-react/format-utils.ts +0 -283
  55. package/packages/opencode/command/live-canvas/templates/feedback-react/index.ts +0 -62
  56. package/packages/opencode/command/live-canvas/templates/feedback-react/selector-utils.ts +0 -423
  57. package/packages/opencode/command/live-canvas/templates/feedback-react/types.ts +0 -118
@@ -1,210 +0,0 @@
1
- # Design Lab — integration notes
2
-
3
- **Status:** draft for later revision
4
- **Context:** These are notes from a real design-lab session on vanilla-Node gitdone.
5
- Capture what worked, what needs adaptation, and the path to a truly live feedback
6
- loop. Rewrite properly when you sit down to tidy this.
7
-
8
- ---
9
-
10
- ## What Design Lab is (and what it isn't)
11
-
12
- **Is:** a Claude Code skill that generates N UI variations side-by-side with an
13
- in-page `FeedbackOverlay`, collects click-to-annotate feedback on elements,
14
- synthesizes a winner, finalizes with `DESIGN_PLAN.md` + cleanup.
15
-
16
- **Isn't:** a live push bridge. The overlay writes feedback to disk. Claude only
17
- sees that file when the user types a message — it can't be woken by a Save click.
18
-
19
- ---
20
-
21
- ## Adaptation points (upstream assumes React)
22
-
23
- The shipped skill (`SKILL.md`) generates React/Next.js/Vite templates and uses
24
- `FeedbackOverlay.tsx` (React + portals). Any project not in that stack needs
25
- adaptation. Patterns observed:
26
-
27
- ### Vanilla Node http / template-literal projects
28
-
29
- - **Variants:** CommonJS modules at `.claude-design/lab/variants/variant-[a-f].js`
30
- - Each exports `{ id, rationale, render(stepsCount) }`
31
- - `render()` returns an HTML string; root element carries `data-variant-root="X"`
32
- - Inline `<style>` per variant, CSS class prefix per variant (`.va-`, `.vb-`, etc.)
33
- to avoid cross-variant bleed
34
-
35
- - **Overlay:** port `FeedbackOverlay.tsx` → vanilla JS. A working port exists
36
- from the gitdone session — consider moving it to
37
- `design-lab/templates/overlay-vanilla.js` upstream so it's reusable.
38
-
39
- - **Server integration:** a `/__design_lab` GET route that loads all variant
40
- modules and renders them in a CSS grid + injects the vanilla overlay as an
41
- inline `<script>`. Feedback POSTs to `/__design_lab/feedback` → appends JSONL
42
- to `.claude-design/feedback.jsonl`. Echo a highlighted summary to stderr.
43
-
44
- ### Other stacks
45
-
46
- - **Next.js App Router** — skill's default; no adaptation needed
47
- - **Vite React** — skill's default; minor route wiring
48
- - **Plain HTML static** — variants served from filesystem; small fetch POST for
49
- feedback; no server integration (no real-time auto-reload)
50
- - **Server-rendered (Rails, Django, Phoenix)** — one route that concatenates
51
- rendered variants; overlay via CDN / inline script
52
-
53
- ---
54
-
55
- ## The live-feedback problem
56
-
57
- Design Lab today: batched feedback. User collects comments + writes overall
58
- direction + clicks "Submit all" → one JSONL entry with the batch. Fine for
59
- first-pass iteration; slow for rapid tweaks.
60
-
61
- Ideal (what user described as "rapid miniscule changes"):
62
-
63
- 1. User clicks element
64
- 2. Types comment
65
- 3. Save → Claude is pushed the event AT THAT MOMENT
66
- 4. Claude edits the source file
67
- 5. Browser auto-reloads via SSE (already working via our dev HUD)
68
- 6. User sees the change without ever leaving the browser
69
-
70
- Step 3 is the missing piece. Design Lab can't do it today because skills don't
71
- push events — channels do.
72
-
73
- ---
74
-
75
- ## Three integration paths (cheapest → proper)
76
-
77
- ### Path 1: Poll-on-next-message (today's behavior)
78
-
79
- - Overlay writes JSONL on Submit
80
- - Claude reads JSONL on next user message
81
- - User says "check" / "k" / anything to trigger
82
-
83
- **Cost:** 0 min. **UX:** one message per feedback batch. **Good for:**
84
- thoughtful batched feedback, not rapid tweaks.
85
-
86
- ### Path 2: Fakechat bridge (15 min, runs on top of the skill)
87
-
88
- Modify `overlay.js` to add a "live mode" toggle:
89
-
90
- - When ON, each individual **Save** (not just batch Submit) POSTs to
91
- `http://localhost:8787/api/send` formatted as a Fakechat-compatible message:
92
-
93
- ```json
94
- {"text": "[DESIGN-LAB F / button \"Create event\"] too cramped\n\nselector: section:nth-of-type(1) > form > button\noutline_html: <button class=\"vf-submit\">Create event</button>"}
95
- ```
96
-
97
- - Launch Claude with:
98
-
99
- ```bash
100
- claude --channels plugin:fakechat@claude-plugins-official
101
- ```
102
-
103
- - Each Save pushes the payload into the live Claude session as a channel event
104
- - Claude reacts immediately (edit file, confirm back in Fakechat UI)
105
- - SSE reload in the dev HUD shows the change in the design-lab page
106
-
107
- **Tradeoff:** Fakechat expects plain chat text. We embed the structured
108
- feedback as a preformatted string. Slightly janky — good for "does push work?"
109
- proof-of-concept, not production.
110
-
111
- **Bonus:** with Fakechat open at localhost:8787 you also get a chat back-channel
112
- for non-UI notes ("also fix X unrelated thing").
113
-
114
- ### Path 3: Custom `design-channel` plugin (2-3 hours, the right way)
115
-
116
- Dedicated channel plugin that bundles with design-lab:
117
-
118
- - Speaks channel protocol to Claude (stdio subprocess like other channels)
119
- - Exposes a local HTTP port (configurable; default 8788)
120
- - Overlay POSTs directly to that port — no Fakechat detour
121
- - Payload shape is the native structured feedback, not wrapped chat text
122
- - Optional back-reply tool so Claude can post comments/confirmations to
123
- specific pins in the overlay ("done — added padding")
124
-
125
- **Implementation sketch:**
126
-
127
- ```
128
- design-plugin/
129
- ├── design-and-refine/
130
- │ ├── skills/design-lab/ # existing
131
- │ └── channels/design-channel/ # NEW
132
- │ ├── manifest.json # declares claude/channel capability
133
- │ ├── server.js # HTTP server + stdio channel
134
- │ └── schema.json # payload schema
135
- ```
136
-
137
- - `manifest.json` declares channel capability + stdio subprocess entry
138
- - `server.js` runs an HTTP listener AND a stdio channel protocol handler;
139
- POSTs to HTTP translate to channel.notify events with the payload
140
- - Can either be launched separately (`claude --channels plugin:design-channel`)
141
- or bundled so Design Lab auto-launches it when active
142
-
143
- **Reusable upstream:** this belongs as a PR to
144
- [0xdesign/design-plugin](https://github.com/0xdesign/design-plugin). Benefits
145
- every Design Lab user, not just this project.
146
-
147
- ### Path 4 (considered, rejected): auto-poll without a channel
148
-
149
- Cannot work. Claude Code sessions are turn-based; no mechanism exists to
150
- spontaneously check files between user turns. Hooks fire on Claude Code
151
- events (user-prompt-submit, tool-use, etc.), not on external file changes.
152
- Background tasks complete-notify but don't re-enter mid-generation. Path 2
153
- or 3 are the only real "push" options.
154
-
155
- ---
156
-
157
- ## Files that matter
158
-
159
- From the gitdone session, preserve these:
160
-
161
- | File | Purpose | Reusable |
162
- |---|---|---|
163
- | `overlay.js` (vanilla port) | Click-to-annotate HUD | ✅ save to `design-lab/templates/overlay-vanilla.js` |
164
- | Variant `render()` module pattern | Works for any server-rendered stack | ✅ document in skill |
165
- | `/__design_lab` route shape | Server integration pattern | ✅ document per-stack |
166
- | CSS prefix-per-variant | Prevents cross-variant style bleed | ✅ convention |
167
-
168
- ---
169
-
170
- ## Recommended next steps (when you sit down)
171
-
172
- 1. **Copy** the vanilla `overlay.js` from the gitdone `.claude-design/lab/`
173
- into `design-lab/templates/overlay-vanilla.js` so future sessions don't
174
- re-port it.
175
-
176
- 2. **Append to `SKILL.md`** a "Vanilla adaptation" section right after the
177
- framework-detection phase: if no React/Vue/Svelte detected → use the
178
- vanilla templates and CommonJS module pattern.
179
-
180
- 3. **Decide on channel path:**
181
- - Path 2 (Fakechat bridge) for the quick win
182
- - Path 3 (custom channel) for the proper PR upstream
183
-
184
- 4. **Liteagents bundling:** `./install.sh` already copies skills to
185
- `~/.claude/skills/`. Consider having it also install Fakechat from
186
- the plugin registry if the user opts in:
187
-
188
- ```bash
189
- read -p "Install Fakechat channel (for live Design Lab)? [y/N] " ans
190
- [[ $ans =~ ^[Yy] ]] && claude /plugin install fakechat@claude-plugins-official
191
- ```
192
-
193
- 5. **Open questions worth thinking through:**
194
- - Should Design Lab auto-launch its channel when active? Or require
195
- user to pass `--channels` flag at session start?
196
- - How should channel-received feedback interact with the batch flow?
197
- (Auto-synthesize after N comments? Synthesize only on explicit request?)
198
- - Should the overlay show "Claude is editing..." state via a back-reply
199
- from the channel?
200
-
201
- ---
202
-
203
- ## References
204
-
205
- - Skill: `~/.claude/skills/design-lab/SKILL.md`
206
- - Upstream: <https://github.com/0xdesign/design-plugin>
207
- - Channels reference: <https://code.claude.com/docs/en/channels-reference>
208
- - Fakechat: `claude /plugin install fakechat@claude-plugins-official`
209
- - Vanilla overlay port (today's session):
210
- `/home/hamr/PycharmProjects/gitdone/.claude-design/lab/overlay.js`
@@ -1,8 +0,0 @@
1
- {
2
- "enabledMcpjsonServers": [
3
- "aurora-lsp-poc",
4
- "cclsp",
5
- "baremobile",
6
- "barebrowse"
7
- ]
8
- }