@wix/himalaya-cli 0.1075.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.
Files changed (41) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -2
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +6 -4
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +1 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +27 -10
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +243 -3
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +151 -19
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +10 -17
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +136 -20
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +39 -28
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +28 -17
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +2 -7
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +0 -6
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +5 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +9 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +53 -5
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +40 -0
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +9 -0
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +90 -0
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +10 -0
  21. package/dist/cli.mjs +4320 -3210
  22. package/dist/preview-assets.generated.bin +0 -0
  23. package/guides/component-reference.json +7 -8
  24. package/guides/component-reference.md +9 -7
  25. package/guides/headless-loop.md +7 -5
  26. package/guides/himi-mcp.md +120 -0
  27. package/guides/index.json +6 -0
  28. package/guides/sdk-reference.json +744 -391
  29. package/guides/skill.md +4 -3
  30. package/package.json +5 -3
  31. package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  32. package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  33. package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  34. package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  35. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  36. package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +6 -2
  37. package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  38. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  39. package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  40. package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +6 -2
  41. package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +6 -2
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",