lavish-axi 0.1.13 → 0.1.14
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 +10 -9
- package/dist/cli.mjs +32 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -105,15 +105,16 @@ pnpm link
|
|
|
105
105
|
|
|
106
106
|
## CLI Reference
|
|
107
107
|
|
|
108
|
-
| Command | Description
|
|
109
|
-
| ----------------------------- |
|
|
110
|
-
| `lavish-axi` | Show current sessions and usage guidance.
|
|
111
|
-
| `lavish-axi <html-file>` | Open or resume a Lavish Editor session.
|
|
112
|
-
| `lavish-axi poll <html-file>` | Long-poll until the user sends feedback or ends the session.
|
|
113
|
-
| `lavish-axi end <html-file>` | End a session.
|
|
114
|
-
| `lavish-axi playbook [id]` | List focused artifact guidance or show one playbook.
|
|
115
|
-
| `lavish-axi design` | Show CDN snippet + DaisyUI component reference (opt-in).
|
|
116
|
-
| `lavish-axi
|
|
108
|
+
| Command | Description |
|
|
109
|
+
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
110
|
+
| `lavish-axi` | Show current sessions and usage guidance. |
|
|
111
|
+
| `lavish-axi <html-file>` | Open or resume a Lavish Editor session. |
|
|
112
|
+
| `lavish-axi poll <html-file>` | Long-poll until the user sends feedback or ends the session. |
|
|
113
|
+
| `lavish-axi end <html-file>` | End a session. |
|
|
114
|
+
| `lavish-axi playbook [id]` | List focused artifact guidance or show one playbook. |
|
|
115
|
+
| `lavish-axi design` | Show CDN snippet + DaisyUI component reference (opt-in). |
|
|
116
|
+
| `lavish-axi setup hooks` | Install or repair optional SessionStart hooks for Claude Code, Codex, and OpenCode; restart the agent session afterward. |
|
|
117
|
+
| `lavish-axi server` | Run the local Lavish Editor server. |
|
|
117
118
|
|
|
118
119
|
Known playbook IDs: `diagram`, `table`, `comparison`, `plan`, `diff`, `input`, `slides`.
|
|
119
120
|
|
package/dist/cli.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { access } from "node:fs/promises";
|
|
|
7
7
|
import os2 from "node:os";
|
|
8
8
|
import path4 from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
|
-
import { AxiError, runAxiCli } from "axi-sdk-js";
|
|
10
|
+
import { AxiError, installSessionStartHooks, runAxiCli } from "axi-sdk-js";
|
|
11
11
|
|
|
12
12
|
// src/design-reference.js
|
|
13
13
|
var TAILWIND_BROWSER_VERSION = "4.2.4";
|
|
@@ -1820,9 +1820,9 @@ function normalizePagePath(path5) {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
|
|
1822
1822
|
// src/cli.js
|
|
1823
|
-
var COMMANDS = /* @__PURE__ */ new Set(["open", "poll", "end", "server", "playbook", "design"]);
|
|
1823
|
+
var COMMANDS = /* @__PURE__ */ new Set(["open", "poll", "end", "server", "playbook", "design", "setup"]);
|
|
1824
1824
|
var DESCRIPTION = "Lavish Editor helps agents turn rich HTML artifacts into collaborative human review surfaces. Whenever you are about to give user a complex response that will be easier to understand via a rich / interactive page, consider using Lavish Editor. First generate an interactive HTML artifact according to user request, then run `lavish-axi <html-file>` so the user can visually review it, annotate elements or selected text, queue prompts, and send feedback back through `lavish-axi poll`.";
|
|
1825
|
-
var VERSION = "0.1.
|
|
1825
|
+
var VERSION = "0.1.14";
|
|
1826
1826
|
async function run(argv) {
|
|
1827
1827
|
await ensureStateDir();
|
|
1828
1828
|
const normalizedArgv = normalizeArgv(argv);
|
|
@@ -1841,7 +1841,6 @@ async function run(argv) {
|
|
|
1841
1841
|
version: VERSION,
|
|
1842
1842
|
argv: isTopLevelHelp ? [] : normalizedArgv,
|
|
1843
1843
|
topLevelHelp: TOP_LEVEL_HELP,
|
|
1844
|
-
hooks: { binaryNames: ["lavish-axi"] },
|
|
1845
1844
|
home: async () => createHomeOutput({
|
|
1846
1845
|
bin: process.argv[1] || "lavish-axi",
|
|
1847
1846
|
sessions: isTopLevelHelp ? [] : await visibleSessions(),
|
|
@@ -1853,6 +1852,7 @@ async function run(argv) {
|
|
|
1853
1852
|
end: endCommand,
|
|
1854
1853
|
playbook: playbookCommand,
|
|
1855
1854
|
design: designCommand,
|
|
1855
|
+
setup: setupCommand,
|
|
1856
1856
|
server: serverCommand
|
|
1857
1857
|
},
|
|
1858
1858
|
getCommandHelp
|
|
@@ -2022,6 +2022,29 @@ async function playbookCommand(args) {
|
|
|
2022
2022
|
async function designCommand() {
|
|
2023
2023
|
return createDesignOutput();
|
|
2024
2024
|
}
|
|
2025
|
+
async function setupCommand(args) {
|
|
2026
|
+
if (args.length !== 1 || args[0] !== "hooks") {
|
|
2027
|
+
throw new AxiError("Unknown setup action", "VALIDATION_ERROR", ["Run `lavish-axi setup hooks`"]);
|
|
2028
|
+
}
|
|
2029
|
+
const errors = [];
|
|
2030
|
+
installSessionStartHooks({
|
|
2031
|
+
marker: "lavish-axi",
|
|
2032
|
+
binaryNames: ["lavish-axi"],
|
|
2033
|
+
distEntrypoints: ["dist/cli.mjs", "bin/lavish-axi.js"],
|
|
2034
|
+
homeDir: resolveHookHomeDir(),
|
|
2035
|
+
onError: (message) => errors.push(message)
|
|
2036
|
+
});
|
|
2037
|
+
if (errors.length > 0) {
|
|
2038
|
+
throw new AxiError("Failed to install lavish-axi agent hooks", "SERVER_ERROR", errors);
|
|
2039
|
+
}
|
|
2040
|
+
return {
|
|
2041
|
+
hooks: { status: "installed", integrations: "Claude Code, Codex, OpenCode" },
|
|
2042
|
+
help: ["Restart your agent session to receive lavish-axi ambient context"]
|
|
2043
|
+
};
|
|
2044
|
+
}
|
|
2045
|
+
function resolveHookHomeDir(env = process.env, fallback = os2.homedir()) {
|
|
2046
|
+
return env.HOME || fallback;
|
|
2047
|
+
}
|
|
2025
2048
|
async function serverCommand(args) {
|
|
2026
2049
|
const port = Number(flagValue(args, "--port") || defaultPort());
|
|
2027
2050
|
const debug = args.includes("--verbose") || process.env.LAVISH_AXI_DEBUG === "1";
|
|
@@ -2239,6 +2262,7 @@ Usage:
|
|
|
2239
2262
|
lavish-axi end <html-file>
|
|
2240
2263
|
lavish-axi playbook [playbook_id]
|
|
2241
2264
|
lavish-axi design
|
|
2265
|
+
lavish-axi setup hooks
|
|
2242
2266
|
|
|
2243
2267
|
${DESIGN_SYSTEM_HINT}
|
|
2244
2268
|
|
|
@@ -2270,6 +2294,10 @@ Examples:
|
|
|
2270
2294
|
design: `Usage: lavish-axi design
|
|
2271
2295
|
|
|
2272
2296
|
Show a copy-pasteable CDN snippet for Tailwind CSS browser runtime v4 + DaisyUI v5 + themes, plus technical reference for DaisyUI components. Lavish artifacts stay portable HTML. Prefer the CDN snippet over hand-writing styles unless explicitly instructed otherwise by the user. If the user asks for another design system or plain HTML, follow that request.
|
|
2297
|
+
`,
|
|
2298
|
+
setup: `Usage: lavish-axi setup hooks
|
|
2299
|
+
|
|
2300
|
+
Install or repair agent SessionStart hooks for lavish-axi ambient context in Claude Code, Codex, and OpenCode. Restart your agent session afterward to receive the context.
|
|
2273
2301
|
`,
|
|
2274
2302
|
server: `Usage: lavish-axi server [--port 4387] [--verbose]
|
|
2275
2303
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lavish-axi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"packageManager": "pnpm@11.1.1",
|
|
5
5
|
"description": "HTML is the new markdown. Lavish is the new editor for your HTML artifacts.",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@tailwindcss/browser": "4.2.4",
|
|
29
|
-
"axi-sdk-js": "^0.1.
|
|
29
|
+
"axi-sdk-js": "^0.1.7",
|
|
30
30
|
"chokidar": "^4.0.3",
|
|
31
31
|
"daisyui": "^5.5.19",
|
|
32
32
|
"express": "^5.2.1",
|