lavish-axi 0.1.39 → 0.1.41
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/README.md +32 -26
- package/THIRD-PARTY-NOTICES.md +63 -0
- package/dist/chrome-client.js +509 -4
- package/dist/chrome.css +67 -0
- package/dist/cli.mjs +543 -83
- package/dist/whiteboard/Assistant-Bold-ZDZZ6JHA.woff2 +0 -0
- package/dist/whiteboard/Assistant-Medium-DZ25RZU3.woff2 +0 -0
- package/dist/whiteboard/Assistant-Regular-PLF2XOGW.woff2 +0 -0
- package/dist/whiteboard/Assistant-SemiBold-CZ5MX6FK.woff2 +0 -0
- package/dist/whiteboard/fonts/Assistant/Assistant-Bold.woff2 +0 -0
- package/dist/whiteboard/fonts/Assistant/Assistant-Medium.woff2 +0 -0
- package/dist/whiteboard/fonts/Assistant/Assistant-Regular.woff2 +0 -0
- package/dist/whiteboard/fonts/Assistant/Assistant-SemiBold.woff2 +0 -0
- package/dist/whiteboard/fonts/Cascadia/CascadiaCode-Regular.woff2 +0 -0
- package/dist/whiteboard/fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2 +0 -0
- package/dist/whiteboard/fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2 +0 -0
- package/dist/whiteboard/fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2 +0 -0
- package/dist/whiteboard/fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2 +0 -0
- package/dist/whiteboard/fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2 +0 -0
- package/dist/whiteboard/fonts/Liberation/LiberationSans-Regular.woff2 +0 -0
- package/dist/whiteboard/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2 +0 -0
- package/dist/whiteboard/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2 +0 -0
- package/dist/whiteboard/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2 +0 -0
- package/dist/whiteboard/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2 +0 -0
- package/dist/whiteboard/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2 +0 -0
- package/dist/whiteboard/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2 +0 -0
- package/dist/whiteboard/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2 +0 -0
- package/dist/whiteboard/fonts/Virgil/Virgil-Regular.woff2 +0 -0
- package/dist/whiteboard/whiteboard.css +1 -0
- package/dist/whiteboard/whiteboard.js +3561 -0
- package/package.json +9 -2
- package/skills/lavish/SKILL.md +5 -3
package/README.md
CHANGED
|
@@ -31,10 +31,10 @@ HTML is the new markdown. Lavish is the new editor for your HTML artifacts.
|
|
|
31
31
|
Agents are good at producing rich HTML artifacts, but the human-agent collaboration loop on such artifacts is lacking and falls back into screenshots and long responses for “tell me what to change.”
|
|
32
32
|
That loses the thing HTML is best at: interactivity.
|
|
33
33
|
|
|
34
|
-
Lavish Editor opens agent-generated HTML files in a local browser, lets you pinpoint elements
|
|
34
|
+
Lavish Editor opens agent-generated HTML files in a local browser, lets you pinpoint elements and selected text, edit rendered Mermaid diagrams as whiteboards, and send feedback to the agent to address.
|
|
35
35
|
|
|
36
36
|
- **Local-first** - Review local HTML artifacts with a local CLI and no cloud dependency in the core feedback loop; hosted sharing through third-party ht-ml.app is explicit and opt-in.
|
|
37
|
-
- **Human-AI collaboration** - Annotate elements
|
|
37
|
+
- **Human-AI collaboration** - Annotate elements and selected text ranges, edit Mermaid diagrams as whiteboards, and send messages to the agent without leaving Lavish Editor.
|
|
38
38
|
- **Battery included** - Lavish Editor teaches your agent good visualization for common use cases such as product or technical plans, design explorations and more out of the box.
|
|
39
39
|
|
|
40
40
|
Lavish Editor is an [AXI](https://axi.md), which means -
|
|
@@ -53,6 +53,7 @@ npx skills add kunchenguid/lavish-axi --skill lavish
|
|
|
53
53
|
|
|
54
54
|
That is the entire setup - no npm install needed.
|
|
55
55
|
The skill teaches your agent to run Lavish through `npx -y lavish-axi`, so the CLI comes along on demand.
|
|
56
|
+
In restricted subprocess sandboxes, CI, or agent harnesses where `npx -y` exits opaquely, the skill also documents direct installed-copy fallbacks through the local or global npm install path.
|
|
56
57
|
Its frontmatter also includes Hermes Agent metadata, so Hermes-compatible harnesses can categorize and surface it as a first-class productivity skill.
|
|
57
58
|
This installs the public `lavish` skill.
|
|
58
59
|
The repository also contains an internal `lavish-design` brand skill for maintainers; default `npx skills add ... --list` and skills.sh discovery hide it unless `INSTALL_INTERNAL_SKILLS=1` is set.
|
|
@@ -77,7 +78,7 @@ Lavish is an AXI, so any capable agent can run the CLI directly with nothing ins
|
|
|
77
78
|
Just tell your agent:
|
|
78
79
|
|
|
79
80
|
```
|
|
80
|
-
Use `npx lavish-axi` to write a product or technical plan for what we discussed.
|
|
81
|
+
Use `npx -y lavish-axi` to write a product or technical plan for what we discussed.
|
|
81
82
|
```
|
|
82
83
|
|
|
83
84
|
### Session hook
|
|
@@ -134,11 +135,7 @@ pnpm link
|
|
|
134
135
|
- **File-path identity** - Sessions are keyed by the canonical HTML file path, so agents do not need opaque IDs.
|
|
135
136
|
- **Portable artifacts** - The artifact runs in an iframe while Lavish injects a small SDK for annotations, snapshots, feedback controls, and render-time layout checks.
|
|
136
137
|
Lavish does not inject any design system, so the saved HTML file renders identically whether you open it through `lavish-axi` or directly in a browser.
|
|
137
|
-
|
|
138
|
-
If the artifact previews, proposes, or mocks a specific app's UI, render it in that app's own design system so it faithfully shows the product, even when you are running in a different repo.
|
|
139
|
-
Only when both come up empty, run `lavish-axi design` for a copy-pasteable Tailwind CSS v4 + DaisyUI v5 CDN fallback, a content-to-playbook router, and Mermaid diagram tooling.
|
|
140
|
-
That fallback guidance recommends DaisyUI's `luxury` theme by default, warns not to `@apply` DaisyUI classes inside Tailwind browser-runtime style blocks, includes an optional layout safety CSS snippet for dense nested grid/flex layouts, and provides a pinned, theme-aware Mermaid CDN snippet for flows, architecture, state, and sequence diagrams.
|
|
141
|
-
The Mermaid snippet waits for page styles, chooses its light or dark rendering from the effective page background, and keeps diagrams in sync with page-theme and OS appearance changes.
|
|
138
|
+
Run `lavish-axi design` for the single source of agent-facing design guidance and optional CDN or Mermaid snippets.
|
|
142
139
|
- **Open-time layout gate** - The browser chrome masks each artifact until the real in-iframe layout audit reports no error-severity findings.
|
|
143
140
|
Warning-only artifacts reveal normally; error findings notify the agent through the same `layout_warnings` poll path and keep the curtain up until a clean reload.
|
|
144
141
|
The user can click **Show anyway**, and a bounded safety timeout reveals with a persistent layout-issues banner so review is never blocked indefinitely.
|
|
@@ -163,38 +160,47 @@ pnpm link
|
|
|
163
160
|
- **Keyboard shortcuts** - In the chrome composer, Enter sends queued prompts and Shift+Enter inserts a newline.
|
|
164
161
|
In the annotation card, Enter queues the annotation, Shift+Enter inserts a newline, and Ctrl+Enter (Cmd+Enter on macOS) queues it and sends all queued prompts immediately.
|
|
165
162
|
Cmd+I or Ctrl+I toggles between annotate and explore mode from either the browser chrome or the artifact iframe, including while focus is in a textarea or control.
|
|
166
|
-
- **Agent presence** - The browser shows when no agent is listening, keeps queued feedback and fresh layout warnings for the next successful `lavish-axi poll` send even across reloads, and only blocks human sends while the agent is working on delivered feedback. The no-timeout poll writes an immediate stderr banner and periodic stderr heartbeats while stdout stays reserved for the final response; if the poll is interrupted or times out, re-run it because queued feedback is never lost.
|
|
167
|
-
- **Session end etiquette** - Lavish tracks who ended a session: a human clicking **End session** (or **Send &
|
|
163
|
+
- **Agent presence** - The browser shows when no agent is listening, keeps queued feedback and fresh layout warnings for the next successful `lavish-axi poll` send even across reloads, and only blocks human sends while the agent is working on delivered feedback. The no-timeout poll writes an immediate stderr banner and periodic stderr heartbeats while stdout stays reserved for the final response; if the poll is interrupted or times out, re-run it because queued feedback is never lost. Codex-specific guidance keeps that poll attached to the active turn instead of hiding it in a background task, because completed background tasks may not resume the agent.
|
|
164
|
+
- **Session end etiquette** - Lavish tracks who ended a session: a human clicking **End session** (or **Send & end session**) in the browser is a user-initiated end, while `lavish-axi end <html-file>` is agent-initiated.
|
|
168
165
|
A plain `lavish-axi <html-file>` after a user-initiated end refuses to reopen the browser and returns guidance instead; pass `--reopen` only when the user asks for further review or something important needs their visual attention.
|
|
169
166
|
Agent-initiated ends keep reopening normally, same as before.
|
|
170
167
|
`lavish-axi poll`'s `ended` response and the `feedback` response for the final batch before an end both carry `next_step` guidance telling the agent to stop polling and deliver remaining updates in chat instead of reopening.
|
|
171
168
|
- **Precise targets** - Text annotations include selected text plus range anchors, so agents are not limited to whole-element selectors.
|
|
172
|
-
- **Mermaid diagrams** -
|
|
169
|
+
- **Mermaid diagrams** - In the Lavish browser, every rendered Mermaid diagram in a `.mermaid` container becomes an embedded editable Excalidraw whiteboard.
|
|
170
|
+
Click a diagram to unlock editing, and use its Fullscreen action to edit it over the whole viewport.
|
|
171
|
+
Whiteboard scenes autosave locally.
|
|
172
|
+
If a live reload changes the Mermaid source, the whiteboard shows that its edits are stale; reopening it lets the reviewer re-convert and discard the saved edits or keep editing the saved scene.
|
|
173
|
+
Use **Queue feedback** to add a bounded edit summary plus local `.excalidraw` scene and PNG preview paths to the Conversation panel, then click **Send to Agent** to deliver it.
|
|
174
|
+
The agent updates the artifact's Mermaid source, which remains authoritative.
|
|
175
|
+
Flowchart, sequence, class, ER, and state diagrams convert to editable shapes; other diagram types are images that reviewers can draw and annotate.
|
|
176
|
+
Lavish changes only the browser view, so saved, standalone, and exported artifacts still render plain Mermaid.
|
|
173
177
|
- **Server cleanup** - The detached server stops after the last session ends when nothing is connected, or after `LAVISH_AXI_IDLE_TIMEOUT_MS` (default 30 minutes) with no browser or poll connections.
|
|
174
178
|
Set `LAVISH_AXI_IDLE_TIMEOUT_MS=0` or `off` to disable idle self-shutdown.
|
|
175
179
|
- **Local-first state** - Session state stays under `~/.lavish-axi/` by default, or `LAVISH_AXI_STATE_DIR` when set.
|
|
180
|
+
- **Server port** - Set `LAVISH_AXI_PORT` to choose the server port; it defaults to `4387`.
|
|
176
181
|
- **Network binding** - The server binds to loopback (`127.0.0.1`) by default. Set `LAVISH_AXI_HOST` to bind elsewhere; a wildcard (`0.0.0.0` or `::`) binds every interface. Binding beyond loopback exposes an unauthenticated server that can read and serve arbitrary local files to anything that can reach it, so only do so on a trusted network. Set `LAVISH_AXI_LINK_HOST` to control the hostname written into generated session links (defaults to the bind address, or loopback when bound to a wildcard).
|
|
182
|
+
- **Browser opening** - Set `LAVISH_AXI_NO_OPEN=1`, equivalent to `--no-open`, to create or resume a session without launching a browser window.
|
|
177
183
|
|
|
178
184
|
## CLI Reference
|
|
179
185
|
|
|
180
|
-
| Command | Description
|
|
181
|
-
| ------------------------------- |
|
|
182
|
-
| `lavish-axi` | Show current sessions and usage guidance.
|
|
183
|
-
| `lavish-axi update` | Check for or apply the latest npm release through the AXI SDK self-updater.
|
|
184
|
-
| `lavish-axi <html-file>` | Open or resume a Lavish Editor session, with the open-time layout gate enabled by default. Refuses to reopen a session the user explicitly ended from the browser unless `--reopen` is passed.
|
|
185
|
-
| `lavish-axi poll <html-file>` | Long-poll until the user sends feedback, ends the session, or the browser reports fresh `layout_warnings`; leave no-timeout polls running, or re-run them if interrupted. On `status: ended`, stop polling and do not reopen uninvited.
|
|
186
|
-
| `lavish-axi end <html-file>` | End a session as the agent; unlike a user-initiated end from the browser, this still allows a plain reopen later.
|
|
187
|
-
| `lavish-axi export <html-file>` | Write a portable copy of the artifact: one HTML file with its local assets inlined, so it opens with no server and no sibling files. Remote CDN/font references are left as links.
|
|
188
|
-
| `lavish-axi share <html-file>` | Publish the artifact (local assets inlined) to [ht-ml.app](https://ht-ml.app), a third-party host not part of Lavish, and print a visitable URL plus a secret update key; shares are public by default, and `--password` makes viewers enter the password before viewing.
|
|
189
|
-
| `lavish-axi stop` | Shut down the background server.
|
|
190
|
-
| `lavish-axi playbook [id]` | List focused artifact guidance or show one playbook; agents must open each matching playbook before writing HTML.
|
|
191
|
-
| `lavish-axi design` | Show
|
|
192
|
-
| `lavish-axi setup hooks` | Install or repair optional SessionStart hooks for Claude Code, Codex, OpenCode, and GitHub Copilot CLI; restart the agent session afterward.
|
|
193
|
-
| `lavish-axi server` | Run the local Lavish Editor server.
|
|
186
|
+
| Command | Description |
|
|
187
|
+
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
188
|
+
| `lavish-axi` | Show current sessions and usage guidance. |
|
|
189
|
+
| `lavish-axi update` | Check for or apply the latest npm release through the AXI SDK self-updater. |
|
|
190
|
+
| `lavish-axi <html-file>` | Open or resume a Lavish Editor session, with the open-time layout gate enabled by default. Refuses to reopen a session the user explicitly ended from the browser unless `--reopen` is passed. |
|
|
191
|
+
| `lavish-axi poll <html-file>` | Long-poll until the user sends feedback, ends the session, or the browser reports fresh `layout_warnings`; leave no-timeout polls running, or re-run them if interrupted. Codex guidance keeps polls attached to the active turn. On `status: ended`, stop polling and do not reopen uninvited. |
|
|
192
|
+
| `lavish-axi end <html-file>` | End a session as the agent; unlike a user-initiated end from the browser, this still allows a plain reopen later. |
|
|
193
|
+
| `lavish-axi export <html-file>` | Write a portable copy of the artifact: one HTML file with its local assets inlined, so it opens with no server and no sibling files. Remote CDN/font references are left as links. |
|
|
194
|
+
| `lavish-axi share <html-file>` | Publish the artifact (local assets inlined) to [ht-ml.app](https://ht-ml.app), a third-party host not part of Lavish, and print a visitable URL plus a secret update key; shares are public by default, and `--password` makes viewers enter the password before viewing. |
|
|
195
|
+
| `lavish-axi stop` | Shut down the background server. |
|
|
196
|
+
| `lavish-axi playbook [id]` | List focused artifact guidance or show one playbook; agents must open each matching playbook before writing HTML. |
|
|
197
|
+
| `lavish-axi design` | Show agent-facing design guidance, including optional CDN and Mermaid snippets. |
|
|
198
|
+
| `lavish-axi setup hooks` | Install or repair optional SessionStart hooks for Claude Code, Codex, OpenCode, and GitHub Copilot CLI; restart the agent session afterward. |
|
|
199
|
+
| `lavish-axi server` | Run the local Lavish Editor server. |
|
|
194
200
|
|
|
195
201
|
Known playbook IDs: `diagram`, `table`, `comparison`, `plan`, `code`, `input`, `slides`.
|
|
196
202
|
One artifact often combines several playbooks, such as a plan that includes a comparison and a diagram, so agents must match against each `use_when` trigger and open every matching playbook before writing HTML.
|
|
197
|
-
For flows, architecture, state, or sequence diagrams, open the diagram playbook
|
|
203
|
+
For flows, architecture, state, or sequence diagrams, open the diagram playbook for the recommended tooling and SVG guidance.
|
|
198
204
|
|
|
199
205
|
### Flags
|
|
200
206
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The published `lavish-axi` package vendors the following third-party software into `dist/`.
|
|
4
|
+
Each component remains under its own license; the notices below satisfy their attribution requirements.
|
|
5
|
+
The whiteboard bundle (`dist/whiteboard/`) is built from these packages by `scripts/build.js`.
|
|
6
|
+
|
|
7
|
+
## Bundled into `dist/whiteboard/whiteboard.js` and `whiteboard.css`
|
|
8
|
+
|
|
9
|
+
| Package | License | Copyright |
|
|
10
|
+
| ---------------------------------------------------- | ------- | ------------------------------------------------- |
|
|
11
|
+
| `@excalidraw/excalidraw` | MIT | Copyright (c) 2020 Excalidraw |
|
|
12
|
+
| `@excalidraw/mermaid-to-excalidraw` | MIT | Copyright (c) 2023 Excalidraw |
|
|
13
|
+
| `mermaid` (exact 11.12.1, bundled for the converter) | MIT | Copyright (c) 2014 - 2022 Knut Sveidqvist |
|
|
14
|
+
| `react`, `react-dom` | MIT | Copyright (c) Meta Platforms, Inc. and affiliates |
|
|
15
|
+
|
|
16
|
+
The full MIT license text applies to each of the packages above:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
20
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
21
|
+
in the Software without restriction, including without limitation the rights
|
|
22
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
23
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
24
|
+
furnished to do so, subject to the following conditions:
|
|
25
|
+
|
|
26
|
+
The above copyright notice and this permission notice shall be included in all
|
|
27
|
+
copies or substantial portions of the Software.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
32
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
33
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
34
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
|
+
SOFTWARE.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Fonts vendored into `dist/whiteboard/fonts/` (from `@excalidraw/excalidraw`)
|
|
39
|
+
|
|
40
|
+
| Family | License |
|
|
41
|
+
| --------------- | -------------------------------------------- |
|
|
42
|
+
| Excalifont | MIT (created for Excalidraw) |
|
|
43
|
+
| Virgil | MIT (created for Excalidraw by Ellinor Rapp) |
|
|
44
|
+
| Nunito | SIL Open Font License 1.1 |
|
|
45
|
+
| Assistant | SIL Open Font License 1.1 |
|
|
46
|
+
| Cascadia Code | SIL Open Font License 1.1 |
|
|
47
|
+
| Comic Shanns | MIT |
|
|
48
|
+
| Liberation Sans | SIL Open Font License 1.1 |
|
|
49
|
+
| Lilita One | SIL Open Font License 1.1 |
|
|
50
|
+
|
|
51
|
+
The Xiaolai family (CJK glyphs) is intentionally not vendored; Excalidraw falls back to its CDN or the system font for those glyphs.
|
|
52
|
+
|
|
53
|
+
## Bundled into `dist/design/` (pre-existing)
|
|
54
|
+
|
|
55
|
+
| Asset | License |
|
|
56
|
+
| ------------------------------------------------- | ------- |
|
|
57
|
+
| `daisyui.css`, `daisyui-themes.css` (daisyUI) | MIT |
|
|
58
|
+
| `tailwindcss-browser.js` (`@tailwindcss/browser`) | MIT |
|
|
59
|
+
|
|
60
|
+
## Pre-publication audit note
|
|
61
|
+
|
|
62
|
+
Font license attributions above were compiled from each family's upstream project.
|
|
63
|
+
Before any npm publication that changes the vendored font set, re-verify each family's license file upstream (the `@excalidraw/excalidraw` npm package does not ship per-font license files).
|