@wix/himalaya-cli 0.1076.0 → 0.1077.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.
Binary file
@@ -765,7 +765,7 @@
765
765
  "severity": "category",
766
766
  "note": "`action_sheet`/`context` render as an always-open inline list; `itemsPath` does not bind items."
767
767
  },
768
- "propsSource": "export interface MenuProps {\n anchor?: Component;\n items?: MenuItem[];\n style?: \"dropdown\" | \"context\" | \"action_sheet\";\n /** \"$service:\" binding → MenuItem[]. */\n itemsPath?: string;\n /** The overlay traps focus and hides the rest of the tree from AT while\n * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA\n * `aria-modal`). TRI-STATE: absent keeps today's NON-modal behaviour (flipping this\n * component's default to modal is #2900); `true` opts in, an explicit `false` stays out. */\n modal?: boolean;\n}"
768
+ "propsSource": "export interface MenuProps {\n anchor?: Component;\n items?: MenuItem[];\n style?: \"dropdown\" | \"context\" | \"action_sheet\";\n /** \"$service:\" binding → MenuItem[]. */\n itemsPath?: string;\n /** The overlay traps focus and hides the rest of the tree from AT while\n * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA\n * `aria-modal`). TRI-STATE: absent takes the Menu's default — MODAL,\n * from the one shared overlay default table — and an explicit `false` opts out. */\n modal?: boolean;\n}"
769
769
  },
770
770
  {
771
771
  "name": "Tooltip",
@@ -790,21 +790,20 @@
790
790
  "name": "Popover",
791
791
  "category": "Overlays & menus",
792
792
  "propsType": "PopoverProps",
793
- "bindings": [],
793
+ "bindings": [
794
+ "presentedPath"
795
+ ],
794
796
  "notImplemented": {
795
797
  "props": [
796
- "edge",
797
- "presented",
798
- "presentedPath",
799
- "onDismiss"
798
+ "edge"
800
799
  ],
801
800
  "platforms": [
802
801
  "ios"
803
802
  ],
804
803
  "severity": "category",
805
- "note": "Not an overlay — renders always-expanded inline and is never dismissible."
804
+ "note": "Presentation follows `presented` / `presentedPath` (a gated popover shows its bubble only while presented, and is modal then), but the bubble is drawn in the screen's flow under its anchor, not floating over it: `edge` placement is not implemented. It closes when its gate closes, or on the VoiceOver escape gesture, which fires `onDismiss` so a worker can clear the gate."
806
805
  },
807
- "propsSource": "export interface PopoverProps {\n anchor?: Component;\n content?: Component;\n edge?: \"top\" | \"bottom\" | \"leading\" | \"trailing\" | \"auto\";\n presented?: boolean;\n presentedPath?: string;\n onDismiss?: Action;\n /** The overlay traps focus and hides the rest of the tree from AT while\n * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA\n * `aria-modal`). TRI-STATE: absent keeps today's NON-modal behaviour (flipping this\n * component's default to modal is #2900); `true` opts in, an explicit `false` stays out. */\n modal?: boolean;\n}"
806
+ "propsSource": "export interface PopoverProps {\n anchor?: Component;\n content?: Component;\n edge?: \"top\" | \"bottom\" | \"leading\" | \"trailing\" | \"auto\";\n presented?: boolean;\n presentedPath?: string;\n onDismiss?: Action;\n /** The overlay traps focus and hides the rest of the tree from AT while\n * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA\n * `aria-modal`). TRI-STATE: absent takes the Popover's default — MODAL,\n * from the one shared overlay default table — and an explicit `false` opts out. Applies to a\n * popover presented through `presented` / `presentedPath`; one with neither is an\n * inline callout, and never modal. */\n modal?: boolean;\n}"
808
807
  },
809
808
  {
810
809
  "name": "Chip",
@@ -78,7 +78,7 @@ See also **[Modifiers](#modifiers)** (the `modifiers` block) and **[Actions](#ac
78
78
  | `BottomSheet` | Overlays & menus | — |
79
79
  | `Menu` | Overlays & menus | — |
80
80
  | `Tooltip` | Overlays & menus | — |
81
- | `Popover` | Overlays & menus | — |
81
+ | `Popover` | Overlays & menus | `presentedPath` |
82
82
  | `Chip` | Chips & selection | `selectedPath`, `tokenPath` |
83
83
  | `ChipsInput` | Chips & selection | `valuesPath` |
84
84
  | `Section` | Structure & disclosure | — |
@@ -131,7 +131,7 @@ These props are accepted by the schema and pass validation, but the named platfo
131
131
  | `BottomSheet` | `detents`, `dismissible`, `onDismiss`, `presented`, `presentedPath`, `edge` | ios | category | Presentation is not implemented — BottomSheet renders as an always-visible inline surface, never a dismissible sheet. All six presentation props are dead. Use the WORKING alternative instead: present the content as its own screen with `presentation: "sheet"` on the navigating `Action` — that is a real dismissible sheet on every platform. Reach for BottomSheet only when an always-visible inline surface is what you actually want. |
132
132
  | `Menu` | `style`, `itemsPath` | ios | category | `action_sheet`/`context` render as an always-open inline list; `itemsPath` does not bind items. |
133
133
  | `Tooltip` | `edge`, `trigger`, `onDismiss` | ios | category | Not an overlay — renders always-expanded inline; `trigger` and dismissal are inert. |
134
- | `Popover` | `edge`, `presented`, `presentedPath`, `onDismiss` | ios | category | Not an overlay — renders always-expanded inline and is never dismissible. |
134
+ | `Popover` | `edge` | ios | category | Presentation follows `presented` / `presentedPath` (a gated popover shows its bubble only while presented, and is modal then), but the bubble is drawn in the screen's flow under its anchor, not floating over it: `edge` placement is not implemented. It closes when its gate closes, or on the VoiceOver escape gesture, which fires `onDismiss` so a worker can clear the gate. |
135
135
  | `ChipsInput` | `onAdd` | ios | styling | `onAdd` never dispatches. |
136
136
  | `OtpInput` | `onChange`, `onComplete` | ios | styling | Neither callback dispatches. |
137
137
  | `Video` | `poster` | ios | styling | `poster` (pre-play frame) is not shown. |
@@ -1304,8 +1304,8 @@ export interface MenuProps {
1304
1304
  itemsPath?: string;
1305
1305
  /** The overlay traps focus and hides the rest of the tree from AT while
1306
1306
  * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA
1307
- * `aria-modal`). TRI-STATE: absent keeps today's NON-modal behaviour (flipping this
1308
- * component's default to modal is #2900); `true` opts in, an explicit `false` stays out. */
1307
+ * `aria-modal`). TRI-STATE: absent takes the Menu's default — MODAL,
1308
+ * from the one shared overlay default table — and an explicit `false` opts out. */
1309
1309
  modal?: boolean;
1310
1310
  }
1311
1311
  ```
@@ -1340,13 +1340,15 @@ export interface PopoverProps {
1340
1340
  onDismiss?: Action;
1341
1341
  /** The overlay traps focus and hides the rest of the tree from AT while
1342
1342
  * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA
1343
- * `aria-modal`). TRI-STATE: absent keeps today's NON-modal behaviour (flipping this
1344
- * component's default to modal is #2900); `true` opts in, an explicit `false` stays out. */
1343
+ * `aria-modal`). TRI-STATE: absent takes the Popover's default — MODAL,
1344
+ * from the one shared overlay default table — and an explicit `false` opts out. Applies to a
1345
+ * popover presented through `presented` / `presentedPath`; one with neither is an
1346
+ * inline callout, and never modal. */
1345
1347
  modal?: boolean;
1346
1348
  }
1347
1349
  ```
1348
1350
 
1349
- > ⚠️ **Not implemented on ios:** `edge`, `presented`, `presentedPath`, `onDismiss` — Not an overlay — renders always-expanded inline and is never dismissible.
1351
+ > ⚠️ **Not implemented on ios:** `edge` — Presentation follows `presented` / `presentedPath` (a gated popover shows its bubble only while presented, and is modal then), but the bubble is drawn in the screen's flow under its anchor, not floating over it: `edge` placement is not implemented. It closes when its gate closes, or on the VoiceOver escape gesture, which fires `onDismiss` so a worker can clear the gate.
1350
1352
 
1351
1353
  ### Chips & selection
1352
1354
 
@@ -77,10 +77,11 @@ The customer entry skill asks for a picture at every milestone (**Keep the owner
77
77
  loop already makes the pictures — send them, and journal each one:
78
78
 
79
79
  ```sh
80
- himi render home --png shots/home.png --device iphone # the first picture, right after init
81
- himi studio # the build board (init made it): opens it, keeps itself current
82
- himi run --watch & # live preview: repaints the open tab on every save
80
+ himi render home --png shots/home.png --device iphone # the first picture, right after init (offline: no request)
83
81
  himi progress "Starting from branded-lite" --step implement --image shots/home.png
82
+ himi studio # the build board (init made it): opens it, keeps itself current
83
+ # consent preflight (skill: "Consent preflight before a template preview"): authorize or mock any Wix or external startup request; with none, go on
84
+ himi run --watch & # live preview, after the preflight: repaints the open tab on every save
84
85
  himi render home --png shots/home-dark.png --device iphone --scheme dark
85
86
  himi progress "Your brand, light and dark" --step brand --image shots/home.png --image shots/home-dark.png
86
87
  himi progress # the journal: current step, elapsed, every postcard
@@ -88,8 +89,9 @@ himi studio reel # at ha
88
89
  ```
89
90
 
90
91
  `himi init` already writes the board (`.himi/studio/index.html`) without opening anything, and its
91
- `next[]` starts with this session's first steps — the live preview, the first picture, its postcard —
92
- so run those before anything else. `himi studio` writes the board and opens it; from then on every
92
+ `next[]` starts with this session's first steps — the first picture and its postcard,
93
+ the consent preflight, then the live preview — so run those, in order, before anything else. The preflight costs nothing on an app with
94
+ no startup request; with one, authorize or mock it before the live preview boots the workers. `himi studio` writes the board and opens it; from then on every
93
95
  render, test, validate, push and progress entry refreshes it, and the page picks that up by itself — no
94
96
  server, nothing to re-run (`--no-open` prints its path instead, for SSH). The CLI journals three
95
97
  milestones by itself: the first PNG of the home screen, every completed `himi test` crawl, and every
@@ -0,0 +1,120 @@
1
+ # himi in your coding agent (MCP)
2
+
3
+ `himi mcp` runs the himi tools as a local **Model Context Protocol** server, so a coding agent —
4
+ Claude Code, Cursor, Codex, VS Code — calls them as tools instead of remembering commands. Every
5
+ tool runs the same `himi` command you would type, on the app folder already on your disk.
6
+
7
+ ## Set it up
8
+
9
+ **Nothing to do for a new app.** `himi init` (and `himi agent-init` in an existing app) writes the
10
+ server into each agent's config, beside any servers you already have — only the `himi` entry is
11
+ touched:
12
+
13
+ | Agent | File | Notes |
14
+ | --- | --- | --- |
15
+ | Claude Code | `.mcp.json` | Claude Code asks once before using a project server. |
16
+ | Cursor | `.cursor/mcp.json` | |
17
+ | VS Code (Copilot) | `.vscode/mcp.json` | |
18
+ | Codex | `.codex/config.toml` | Written only if the file does not exist yet — an existing one is never edited; `himi agent-init` prints the command to add it instead. Codex reads project config only for trusted projects. |
19
+
20
+ Every entry starts the server the same way:
21
+
22
+ ```bash
23
+ npx -y @wix/himalaya-cli mcp
24
+ ```
25
+
26
+ `npx` rather than a global `himi`, because desktop apps often do not see the shell `PATH` a global
27
+ install lives on, and `npx` always runs the current CLI. The first start downloads it, so it can
28
+ take a minute; later starts come from the npx cache.
29
+
30
+ **Adding it by hand:**
31
+
32
+ ```bash
33
+ claude mcp add himi -- npx -y @wix/himalaya-cli mcp
34
+ ```
35
+
36
+ ```bash
37
+ codex mcp add himi -- npx -y @wix/himalaya-cli mcp
38
+ ```
39
+
40
+ For Cursor, add `{"command": "npx", "args": ["-y", "@wix/himalaya-cli", "mcp"]}` under `mcpServers`
41
+ in `~/.cursor/mcp.json`, or open this one-click install link:
42
+
43
+ ```text
44
+ cursor://anysphere.cursor-deeplink/mcp/install?name=himi&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3aXgvaGltYWxheWEtY2xpIiwibWNwIl19
45
+ ```
46
+
47
+ ### The Claude Code plugin
48
+
49
+ The plugin bundles the himi skill with the MCP server, so a Claude Code session knows how to guide a
50
+ business from an idea to a preview and has the tools to do it. In a Claude Code session:
51
+
52
+ ```text
53
+ /plugin marketplace add https://apps.wix.com/_api/himi-serve/.claude-plugin/marketplace.json
54
+ /plugin install himi@wix-himi
55
+ ```
56
+
57
+ The marketplace hands the plugin out as a zip archive, which needs Claude Code 2.1.224 or later;
58
+ an older Claude Code refuses the entry — update it first (`claude update`).
59
+
60
+ To look at it before installing, `himi mcp plugin --out ./himi-plugin` writes the same plugin as a
61
+ folder: `claude plugin validate ./himi-plugin` checks it, and `claude --plugin-dir ./himi-plugin`
62
+ runs a session with it.
63
+
64
+ ## The tools
65
+
66
+ | Tool | What it does |
67
+ | --- | --- |
68
+ | `himi_docs`, `himi_components`, `himi_sdk`, `himi_icons` | Read the guides and the component, SDK and icon references. Offline. |
69
+ | `himi_init` | Create a new app (optionally from a template), with these configs already written. |
70
+ | `himi_build` | Compile the app's worker bundles. |
71
+ | `himi_validate` | Lint the app without publishing anything. |
72
+ | `himi_test` | The behavioral crawl — every action each screen declares, against the app's mocked network. Never reaches live data. |
73
+ | `himi_render` | Render one screen and return the PNG to the agent (needs Playwright's Chromium: `npx playwright install chromium`). |
74
+ | `himi_progress` | Read or add to the build journal the owner follows. |
75
+ | `himi_preview_start` / `_status` / `_stop` | The live preview — see below. |
76
+ | `himi_whoami` | Which account the stored sign-in belongs to. |
77
+ | `himi_push` | Publish a **draft**: private to the owner, viewable by preview link and in Himi Player, not live. |
78
+ | `himi_share`, `himi_preview_links` | Share links for a published release. |
79
+
80
+ Each tool acts on the agent's workspace folder unless it is given a `dir`.
81
+
82
+ **What the tools will not do:** sign in, make a release live, build store binaries, touch secrets,
83
+ write to a site's CMS, or create a Wix site. Those spend money, handle credentials, or change what
84
+ real users see, so they stay commands a person runs. Publishing needs a sign-in first — run
85
+ `himi login --browser` in a terminal; the server never asks for or handles a credential. A tool
86
+ input that starts with `-` is refused, so nothing can be passed through to a flag no tool offers.
87
+
88
+ ## See the app inside your IDE
89
+
90
+ `himi_preview_start` keeps a live preview running on your machine (`himi run --watch` — every save
91
+ rebuilds and repaints) and returns its URL. Each app gets its own stable port between 5400 and 5499.
92
+
93
+ | Agent | Where the preview shows |
94
+ | --- | --- |
95
+ | Claude Code (desktop app) | The browser pane beside the chat. With no preview running yet, starting the **`himi-preview`** launch configuration (`.claude/launch.json`, written by `himi init`) starts one on the same port — so use one or the other, not both. |
96
+ | Cursor | The agent opens the URL with Cursor's Browser tool. |
97
+ | Codex in the ChatGPT desktop app | Its built-in Browser. |
98
+ | VS Code | The integrated browser. |
99
+ | A terminal-only agent | `himi_render` PNGs — the agent shows you the picture. |
100
+
101
+ Claude Code's browser pane shows the layout and repaints it on every save, but it blocks the frame
102
+ a screen's worker runs in — so a tap that needs the worker does nothing there. To click through a
103
+ worker-backed flow, open the same URL in your regular browser.
104
+
105
+ When `himi studio` has written the build board, the preview also serves it at `/__himi/studio/` on
106
+ the same origin, and `himi_preview_start` returns that URL as `board`.
107
+
108
+ To see the app **on your phone**, `himi_push` publishes a draft and returns a link that opens it in
109
+ Himi Player.
110
+
111
+ ## Good to know
112
+
113
+ - **The MCP configs never leave your machine.** `.mcp.json`, `.cursor/mcp.json`,
114
+ `.vscode/mcp.json` and `.codex/config.toml` are left out of every source archive `himi push`
115
+ uploads, because they usually list your other servers and their keys. The rest of `.cursor/`
116
+ and `.vscode/` (rules, settings) is archived as before.
117
+ - **One command at a time.** The server runs tool calls one after another in a single process; an
118
+ agent that asks for two at once gets them in order.
119
+ - **It never updates itself.** A server's output is its conversation with the agent; `npx` picks up
120
+ new CLI versions the next time the agent starts it.
package/guides/index.json CHANGED
@@ -52,6 +52,12 @@
52
52
  "category": "CLI & Loop",
53
53
  "file": "headless-loop.md"
54
54
  },
55
+ {
56
+ "id": "himi-mcp",
57
+ "title": "himi in your coding agent (MCP)",
58
+ "category": "CLI & Loop",
59
+ "file": "himi-mcp.md"
60
+ },
55
61
  {
56
62
  "id": "templates",
57
63
  "title": "Starter templates — list, scaffold, publish",
package/guides/skill.md CHANGED
@@ -49,6 +49,7 @@ A build takes most of an hour. An owner who sees nothing for that long assumes n
49
49
  - **Journal every postcard** with `himi progress "<what changed>" --step <n> --image <png>` when the installed CLI lists `progress` (`himi --help`). It keeps a copy of each image exactly as it was when you sent it, and a bare `himi progress` prints the journal with the current step — the quickest way back to your place. The CLI also journals the first picture of the home screen, every `himi test` crawl and every draft push by itself; your postcards are the ones that say why.
50
50
  - **Give them a board to leave open.** When the installed CLI lists `studio`, run `himi studio` once, right after that first picture, and tell the owner it is there (a current `himi init` has already made the board; this opens it). It opens a local page in their browser that fills itself in — every screen as it renders, the journey step and your latest postcard, each check as it runs — so they can watch between your messages. It is a view of your local work, not the preview of step 7.
51
51
  - **Let them click around while you work.** Once step 4's startup preflight says the app may boot locally, and when the installed CLI's `himi run` accepts `--watch`, keep `himi run --watch` running in the background: it serves the app on this machine, opens it in their browser (no `--browser` flag — that is a different mode, and `--watch` refuses it), and repaints that tab every time you save — and the board frames the same live app. Once the app is bound to their site, the watch preview shows that site's live data, fetched by their own browser as an anonymous visitor. It is a local preview of your working copy, never the owner-private preview, and a save that does not build leaves the last good version on screen while you fix it.
52
+ - **Inside a coding agent, prefer the `himi_*` tools.** When your tool list has them (`himi init` configures the `himi` MCP server for Claude Code, Cursor, Codex and VS Code), call them instead of shelling out: `himi_render` hands you the PNG to show, and `himi_preview_start` returns the live preview's URL. Open that URL in your own built-in browser — Claude Code desktop: start the `himi-preview` launch configuration; Cursor: its Browser tool; Codex in the ChatGPT desktop app: its Browser; VS Code: the integrated browser — so the owner watches the app take shape beside the chat.
52
53
  - **Hand over the story too.** At the handover in step 7, when `himi --help` lists `himi studio reel` (an older CLI can have `studio` without it), run `himi studio reel` and offer the owner the file it writes: one self-contained page of their app taking shape, version by version, with your postcards. It shows how the app was built; it is never a substitute for the preview URL, and it carries the same sample-data captions the postcards did.
53
54
 
54
55
  ## Approval gates
@@ -113,9 +114,9 @@ If a gate is not implied (no credentials, no draft instruction, no site URL for
113
114
 
114
115
  **Keep the owner watching, headless too.** Whoever watches the board while you work, or reads the run afterwards, sees only what reached the journal. Do these in the session that builds the app — not at the end, and not in a later session — each one when `himi --help` lists the command:
115
116
 
116
- 1. **The board opens at init.** `himi init` creates the build board (`.himi/studio/index.html`) and its `next[]` starts with this session's first steps: run them now. When the installed `init` prints no `board`, run `himi studio --no-open` once in the app folder.
117
- 2. **Keep the live preview running.** Once journey step 4's startup preflight clears the app to boot locally, start `himi run --watch &` in the app folder and leave it up until the handover: it repaints on every save and serves the board at `<url>/__himi/studio/`.
118
- 3. **Make the first picture right after init:** `himi render <homeScreenId> --png --device iphone`. The CLI journals that first look itself.
117
+ 1. **The board opens at init.** `himi init` creates the build board (`.himi/studio/index.html`) and its `next[]` starts with this session's first steps: run them now, in order: the first picture and its postcard, the consent preflight, then the live preview — for every template. The preflight costs nothing on an app that makes no startup request: if no worker or config can make a Wix or external request at boot, go straight on. When the installed `init` prints no `board`, run `himi studio --no-open` once in the app folder.
118
+ 2. **Make the first picture right after init:** `himi render <homeScreenId> --png --device iphone`. It is offline — it never calls Wix — so it needs no preflight. The CLI journals that first look itself.
119
+ 3. **Then keep the live preview running.** Only once the consent preflight (journey step 4) clears the app to boot locally, start `himi run --watch &` in the app folder and leave it up until the handover: it repaints on every save and serves the board at `<url>/__himi/studio/`.
119
120
  4. **A postcard with a picture at every journey step:** `himi progress "<what changed>" --step <n> --image .himi/shots/<screenId>.png`. `himi test` and `himi push --draft` journal their own results too; your postcards say what changed and why it matters.
120
121
  5. **At the handover, the making-of:** run `himi studio reel` and name the file it writes in your final report.
121
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1076.0",
3
+ "version": "0.1077.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -34,6 +34,7 @@
34
34
  "test": "node ../../tools/ci/run-tests.mjs --package tools/himi-cli"
35
35
  },
36
36
  "dependencies": {
37
+ "@modelcontextprotocol/server": "^2.0.0",
37
38
  "@rive-app/canvas": "^2.21.0",
38
39
  "ajv": "^8.17.1",
39
40
  "ajv-formats": "^3.0.1",
@@ -45,7 +46,8 @@
45
46
  "react-dom": "^18.2.0",
46
47
  "tough-cookie": "^6.0.1",
47
48
  "typescript": "^5.6.3",
48
- "wawoff2": "^2.0.1"
49
+ "wawoff2": "^2.0.1",
50
+ "zod": "^4.2.0"
49
51
  },
50
52
  "optionalDependencies": {
51
53
  "playwright": "^1.40.0",
@@ -65,5 +67,5 @@
65
67
  "artifactId": "himalaya-cli"
66
68
  }
67
69
  },
68
- "falconPackageHash": "3123c984ed5fe0542e00a7944eefd04225a131e1fcdd210717328c3b"
70
+ "falconPackageHash": "f05f26ed8fab307cde555efea47651788f996fd6d20bb908d209e946"
69
71
  }