@wix/himalaya-cli 0.1440.0 → 0.1442.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 (54) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +30 -3
  2. package/dist/cli.mjs +689 -400
  3. package/dist/preview-assets.generated.bin +0 -0
  4. package/guides/hhp.md +4 -0
  5. package/guides/himi-json-output.md +1 -1
  6. package/guides/himi-mcp.md +21 -11
  7. package/guides/himi-test.md +3 -2
  8. package/guides/skill.md +1 -1
  9. package/guides/trim-a-template.md +4 -1
  10. package/package.json +2 -2
  11. package/templates/beauty-salon/config.ts +14 -0
  12. package/templates/beauty-salon/dev/index.ts +1385 -1382
  13. package/templates/beauty-salon/himalaya.content.json +3 -0
  14. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +322 -27
  15. package/templates/branded-lite/config.ts +14 -0
  16. package/templates/branded-lite/dev/index.ts +1479 -1511
  17. package/templates/branded-lite/himalaya.content.json +3 -0
  18. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +322 -27
  19. package/templates/community-club/config.ts +14 -0
  20. package/templates/community-club/dev/index.ts +1253 -1068
  21. package/templates/community-club/himalaya.content.json +3 -0
  22. package/templates/community-club/tier5-src/himi-store-account/index.ts +322 -27
  23. package/templates/events-meetups/config.ts +14 -0
  24. package/templates/events-meetups/dev/index.ts +1222 -1037
  25. package/templates/events-meetups/himalaya.content.json +3 -0
  26. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +322 -27
  27. package/templates/gym-fitness/config.ts +14 -0
  28. package/templates/gym-fitness/dev/index.ts +1296 -1300
  29. package/templates/gym-fitness/himalaya.content.json +3 -0
  30. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +322 -27
  31. package/templates/nonprofit-cause/config.ts +14 -0
  32. package/templates/nonprofit-cause/dev/index.ts +1276 -1193
  33. package/templates/nonprofit-cause/himalaya.content.json +3 -0
  34. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +322 -27
  35. package/templates/podcast-creator/config.ts +14 -0
  36. package/templates/podcast-creator/dev/index.ts +1271 -1188
  37. package/templates/podcast-creator/himalaya.content.json +3 -0
  38. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +322 -27
  39. package/templates/portfolio-creative/config.ts +14 -0
  40. package/templates/portfolio-creative/dev/index.ts +1371 -1273
  41. package/templates/portfolio-creative/himalaya.content.json +3 -0
  42. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +322 -27
  43. package/templates/restaurant/config.ts +14 -0
  44. package/templates/restaurant/dev/index.ts +1334 -1168
  45. package/templates/restaurant/himalaya.content.json +3 -0
  46. package/templates/restaurant/tier5-src/himi-store-account/index.ts +322 -27
  47. package/templates/retail-store/config.ts +14 -0
  48. package/templates/retail-store/dev/index.ts +1399 -1294
  49. package/templates/retail-store/himalaya.content.json +3 -0
  50. package/templates/retail-store/tier5-src/himi-store-account/index.ts +322 -27
  51. package/templates/yoga-studio/config.ts +14 -0
  52. package/templates/yoga-studio/dev/index.ts +1367 -1291
  53. package/templates/yoga-studio/himalaya.content.json +3 -0
  54. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +322 -27
Binary file
package/guides/hhp.md CHANGED
@@ -15,6 +15,10 @@ himi hhp init home --content .
15
15
  himi run --watch --content .
16
16
  ```
17
17
 
18
+ To see the compiled screens on an iOS Simulator or Android emulator, build Himi Player
19
+ against your machine and open the package with `himi run --content . --port <port>`; the
20
+ four-step recipe is in [View your package on a device](himi-player-implementation.md#view-your-package-on-a-device).
21
+
18
22
  Choose a new screen id if `home` is already registered. Repo targets accept
19
23
  `--app <name>` instead. The scaffold contains `screens/home.html`, `home.css`, and
20
24
  `home.controller.ts`. `hhp.json` declares sources:
@@ -72,7 +72,7 @@ keeps its existing fields and adds the code:
72
72
  | `invalid_patch` | The selection cannot produce a valid patch. The existing `error` and plan details are preserved. |
73
73
  | `would_regress` | A partial push would revert unselected live changes. |
74
74
  | `not_carried_by_patch` | The package changed dependencies that a partial push cannot carry. |
75
- | `authoring_unavailable` | The bundled authoring runtime failed to load. |
75
+ | `authoring_unavailable` | The bundled authoring runtime failed to load. Carries `cause` (the underlying error's message) and `module` (the import specifier that failed) when known, and `sourceCheckout`: when run from a source checkout the advice is `fix: "yarn install"` (stale dependencies), off-repo it is `upgrade` (an out-of-date CLI). |
76
76
  | `push_failed` | An otherwise unclassified exception stopped push (for example unreadable content). The original error is preserved. |
77
77
 
78
78
  The `ux_evidence_*` codes map to the existing typed `uxEvidence.state`; a successful
@@ -135,24 +135,34 @@ the same origin, and `himi_preview_start` returns that URL as `board`.
135
135
  `himi-studio` is the marketplace's second, optional plugin, a Claude Code *mod*. It adds a pane
136
136
  beside the conversation with four views:
137
137
 
138
- - **Now:** the screen being worked on, in a phone frame, with the live build's state and what the
139
- last rebuild changed.
138
+ - **Now:** the screen being worked on, in a phone frame, with its controls under it. ‹ › step
139
+ through screens, ☾ Dark and ▭ iPad ask for those renders, **Open live** opens the app, and **On my
140
+ phone** shows the LAN preview's QR code. To the right are the live build's state and what the last
141
+ rebuild changed.
140
142
  - **Screens:** every rendered screen.
141
- - **Checks:** the journey step, and validate, test, the UX audit and the last push.
142
- - **Activity:** the progress postcards.
143
+ - **Checks:** the journey step, then validate, test, the UX audit and the last push, with the
144
+ progress postcards below them.
145
+ - **Ship:** the steps to a phone and the stores, in order: preview on a phone, share a draft, test
146
+ builds, download, and store planning.
143
147
 
144
- When the last rebuild failed, a band above the prompt says so and offers **Fix it**. The agent gets
145
- two tools: `studio_focus` shows you the screen it just changed, and `studio_snapshot` reads the
146
- status.
148
+ Under every view a **Next →** strip offers the one most useful step. When the last rebuild failed, a
149
+ band above the prompt says so and offers **Fix it**. Pushing a draft and building test apps ask for
150
+ a second press in the pane, and the prompt that press sends is the owner's approval of that gate.
151
+ The agent gets two tools: `studio_focus` shows the person the screen it just changed, and
152
+ `studio_snapshot` reads the status.
147
153
 
148
154
  ```
149
155
  /plugin install himi-studio@wix-himi
150
156
  ```
151
157
 
152
- The pane shows screenshots, not the live app: a mod cannot host a web page. For the interactive
153
- app, use its **Open live preview** button or the `himi-preview` launch configuration. The pane reads
154
- only what the CLI already writes under `.himi/` (the board's `state.json` and its screenshots). It
155
- opens by itself in an app folder; elsewhere, run `/himi <app folder>`.
158
+ The pane shows screenshots, not the live app: a mod cannot host a web page. Ghostty, kitty, WezTerm
159
+ and iTerm2 show the real image, cropped to the app; Claude Code Desktop shows the whole screenshot in
160
+ a phone frame. macOS Terminal shows no
161
+ picture: **View picture ↗** opens the screenshot in Preview, and **On my phone** opens the QR code
162
+ the same way. Other terminals without images (tmux, for one) show a coloured-block version that
163
+ says it is one. For the interactive app, use **Open live** or the `himi-preview` launch
164
+ configuration. The pane reads only what the CLI already writes under `.himi/`. It opens by itself in
165
+ an app folder; elsewhere, run `/himi <app folder>`.
156
166
 
157
167
  To see the app **on your phone**, `himi_push` publishes a draft and returns a link that opens it in
158
168
  Himi Player.
@@ -124,7 +124,8 @@ Only **unambiguous** defects, so a green run stays worth trusting:
124
124
  | `nav-target-missing` | **warning** | A `himi.open` whose target is neither a baked screen, nor one of the app's declared `linkableScreens`, nor an instance of one (`course_detail_c1` under the base `course_detail`) — the tap opens nothing. Only judged when the caller supplies the app's exact linkable set; an absent set means no opinion, never a guess. A target still carrying an **unresolved** `$` token is dropped before it becomes an edge and is never judged — but one that RESOLVED to a concrete id is judged, which is the point: `$item.detailScreenId` resolving to `course_detail_c1` against the first row is exactly the case the instance rule exists for. |
125
125
  | `poll-action-missing` | error | A `_poll` directive every host will silently ignore — an action the bundle never declares, a malformed `action`, a missing `id`, or a non-positive `intervalMs`. Each ends the same way: a screen that never refreshes, with nothing saying why. Nothing in the descriptor names the polled action, so no static check can see it. (A merely too-small interval is legal — the host clamps it.) |
126
126
  | `no-request-issued` | **warning** | A worker that uses the Wix transport but never fetches — "the screen loaded with sample data." A warning: a conditional or tap-triggered fetch is legitimate. |
127
- | `native-decode-failed` | error | Under `--native`, the real Swift/Kotlin decoder rejected the baked descriptor bytes (one bad enum blanks the whole screen on device). |
127
+ | `native-decode-failed` | error | Under `--native`, the real Swift/Kotlin decoder rejected the baked descriptor bytes (one bad enum blanks the whole screen on device) — or the release's `tokens.json`, reported with `screen: "tokens.json"`: both natives decode it in one strict pass, so a single fractional `typography.*.size` or a `motions.*.duration` written in seconds drops the whole theme. A token finding fails the run but never counts as a failed screen. |
128
+ | `token-type-invalid` | error | The package's tokens file holds a value a native `Int` field rejects — `typography.<k>.size` or `.weight`, `motions.<k>.duration` (milliseconds: `0.3` → `300`), or a `spacing` / `radius` entry — in the base document or any `idiom.<overlay>`. Both natives decode tokens.json in one strict pass, so one such value drops the WHOLE theme (iOS "Theme unavailable"; Android default palette and fonts) while the web preview looks right. Reported with `screen: "tokens.json"`, never counted as a failed screen; `himi validate` reports the same finding. |
128
129
  | `capability-undeclared` | error | A `capability.<id>.<verb>` call the screen's gate denied — reported from the gate itself, so it is raised **even when the worker catches the rejection** (which on device leaves a control that silently does nothing). Fix: declare the id on that screen's `logicBundle.declaredCapabilities` and in `config.ts` `capabilities`. One per capability per screen. See [Capabilities](#capabilities). |
129
130
  | `journey-failed` | error | A `himi-test.json` journey named an action the screen lacks, threw, or never rendered its `expectText`. |
130
131
  | `inverse-pair-diverges` | **warning** | An action and the action that undoes it do not return to the state the boot settled on — `add` then `remove` leaving a different list, or a counter it forgot to put back. |
@@ -396,7 +397,7 @@ browser.
396
397
  | `--no-shots` | Skip the per-screen PNGs written to `.himi/shots/`. |
397
398
  | `--net <file>` | Use an explicit net-mocks file instead of the app's own. |
398
399
  | `--budget <ms>` | Per-action settle budget (default 2000). |
399
- | `--native` | Also decode every baked descriptor with the real native decoders; bare `--native` runs whichever toolchains are present, and `--native ios` or `--native android` selects one. **Source-checkout only** — the decoder oracles are that tree's own HimalayaCore Swift package and Gradle harness, which a published install does not ship, so it cannot run this at all (and its coverage ledger stays silent about native decoding rather than suggesting it). |
400
+ | `--native` | Also decode every baked descriptor, and the release's `tokens.json`, with the real native decoders; bare `--native` runs whichever toolchains are present and names each one it could NOT check in a top-level `skippedPlatforms: [{ platform, reason }]` (never a pass), while `--native ios` or `--native android` selects one and exits 2 when it is unavailable. The Android SDK is found from `ANDROID_HOME`, then `ANDROID_SDK_ROOT`, then `sdk.dir` in the source checkout's Android test harness `local.properties`, then the default install path (`~/Library/Android/sdk` on macOS, `~/Android/Sdk` on Linux). **Source-checkout only** — the decoder oracles are that tree's own HimalayaCore Swift package and Gradle harness, which a published install does not ship, so it cannot run this at all (and its coverage ledger stays silent about native decoding rather than suggesting it). |
400
401
  | `--all-screens` | Crawl every templated instance instead of one representative per structure. |
401
402
  | `--browser` / `--no-open` / `--timeout <ms>` | Run the loop in your own browser tab (one screen per run; refuses record/net/offline/hostile/deep/budget/shots/native). |
402
403
  | `himi test <screenId>…` | Focus one or more screens — the record and shots passes scope with them. |
package/guides/skill.md CHANGED
@@ -74,7 +74,7 @@ A build takes most of an hour. An owner who sees nothing for that long assumes n
74
74
  - **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.
75
75
  - **Let them click around while you work — the live preview runs from init on.** A current `himi init` started it (`watch.url` in its output); if it isn't running (`--remote`, CI), start it once step 4's startup preflight says the app may boot locally, when the installed CLI's `himi run` accepts `--watch`: run `himi run --watch --content <dir> &` at once and leave it running until the handover; do not wait for a `reminder` to ask. Give the owner its url, and open it only after the preflight. `himi run --watch` serves the app on this machine, opens it in their browser when you start it yourself (no `--browser` flag — that is a different mode, and `--watch` refuses it; the one init starts opens nothing), 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.
76
76
  - **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.
77
- - **When the Himi Studio pane is open, show the work there.** In Claude Code, a tool list with `mcp__himi-studio__studio_focus` means the owner has the Himi Studio pane beside the chat. It shows each screen as it renders, the live build and every check, and it keeps itself current. Right after you change or render a screen, call `studio_focus` with its screen id rather than pasting the picture into the chat. For the build status, read `studio_snapshot` rather than re-running status commands. Postcards still go in the chat and the journal. Without the pane, in Claude Code you may offer it once: `/plugin install himi-studio@wix-himi`.
77
+ - **When the Himi Studio pane is open, show the work there.** In Claude Code, a tool list with `mcp__himi-studio__studio_focus` means the owner has the Himi Studio pane beside the chat. It shows each screen as it renders, the live build and every check, and it keeps itself current. Right after you change or render a screen, call `studio_focus` with its screen id rather than pasting the picture into the chat. For the build status, read `studio_snapshot` rather than re-running status commands. Postcards still go in the chat and the journal. The pane's buttons send you fixed prompts. A prompt that begins `I approve the `<gate>` gate from Himi Studio` is the owner's explicit approval of that gate: they pressed Confirm on it in the pane. Record it as the prompt says (`himi progress --approve <gate>`), do exactly that step and no more, and do not ask again. Without the pane, in Claude Code you may offer it once: `/plugin install himi-studio@wix-himi`.
78
78
  - **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 (a current CLI rebuilds it for you: your `--step review` postcard names it as `makingOf`, and every `himi push --draft` as `reel` — `.himi/making-of.html`, so name that file): 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.
79
79
 
80
80
  ## Approval gates
@@ -66,7 +66,10 @@ template itself, which it refuses. `--keep` takes `SCREENS` ids and templated ro
66
66
  part before the brackets: `himi_product` for `himi_product[_{id}]`). The home screen is always
67
67
  kept, and so is any screen the navigation pins — a drawer or sidebar body
68
68
  (`contentScreenId`, which is how the owner templates draw their menu) or a drawer header's or
69
- footer's target; both are listed under `implicit`. It prints one JSON report and:
69
+ footer's target; both are listed under `implicit`. So is a screen a kept screen hands to its
70
+ worker by name: Account's `signInScreen` (`himi_sign_in`), where its worker sends a guest to
71
+ sign in. No tap names that screen, so without this rule `--links drop` would keep Account and
72
+ drop its only way to sign in. It prints one JSON report and:
70
73
 
71
74
  - **deletes** every other `SCREENS` and `TEMPLATED` entry whole, so the blocks you keep stay
72
75
  byte for byte as they were;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1440.0",
3
+ "version": "0.1442.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "99935bae3ae7704f52450cbbbd84c04eb179c2bc315f759898441180"
74
+ "falconPackageHash": "a9410b54858e369de3dc999ca67e799366424e27e7a49022ff34cdbf"
75
75
  }
@@ -291,6 +291,20 @@ export default defineApp({
291
291
  ],
292
292
  "parentScreenId": "",
293
293
  "tabId": "profile"
294
+ },
295
+ {
296
+ "screenId": "himi_sign_in",
297
+ "isPublic": true,
298
+ "paramKeys": [
299
+ "mode",
300
+ "intent",
301
+ "contextName",
302
+ "returnScreenId",
303
+ "returnId",
304
+ "returnChannelId"
305
+ ],
306
+ "parentScreenId": "himi_account",
307
+ "tabId": "profile"
294
308
  }
295
309
  ],
296
310
  "tabBar": {