@wix/himalaya-cli 0.1664.0 → 0.1666.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 (33) hide show
  1. package/dist/THIRD_PARTY_NOTICES +47 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/legacy-import.d.ts +15 -3
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +21 -2
  4. package/dist/cli.mjs +44335 -12424
  5. package/guides/himi-json-output.md +35 -0
  6. package/guides/himi-mcp.md +19 -3
  7. package/guides/index.json +6 -0
  8. package/guides/store-submission.md +171 -0
  9. package/package.json +11 -4
  10. package/templates/beauty-salon/l10n/en.json +1 -1
  11. package/templates/beauty-salon/l10n/he.json +4 -0
  12. package/templates/branded-lite/dev/index.ts +950 -170
  13. package/templates/branded-lite/l10n/en.json +36 -1
  14. package/templates/branded-lite/l10n/he.json +33 -0
  15. package/templates/branded-lite/tier5-src/wix-spaces-members/index.ts +50 -19
  16. package/templates/community-club/l10n/en.json +1 -1
  17. package/templates/community-club/l10n/he.json +4 -0
  18. package/templates/events-meetups/l10n/en.json +1 -1
  19. package/templates/events-meetups/l10n/he.json +4 -0
  20. package/templates/gym-fitness/l10n/en.json +1 -1
  21. package/templates/gym-fitness/l10n/he.json +4 -0
  22. package/templates/nonprofit-cause/l10n/en.json +1 -1
  23. package/templates/nonprofit-cause/l10n/he.json +4 -0
  24. package/templates/podcast-creator/l10n/en.json +1 -1
  25. package/templates/podcast-creator/l10n/he.json +4 -0
  26. package/templates/portfolio-creative/l10n/en.json +1 -1
  27. package/templates/portfolio-creative/l10n/he.json +4 -0
  28. package/templates/restaurant/l10n/en.json +1 -1
  29. package/templates/restaurant/l10n/he.json +4 -0
  30. package/templates/retail-store/l10n/en.json +1 -1
  31. package/templates/retail-store/l10n/he.json +4 -0
  32. package/templates/yoga-studio/l10n/en.json +1 -1
  33. package/templates/yoga-studio/l10n/he.json +4 -0
@@ -848,6 +848,41 @@ values on failures: `unauthorized`, `token_revoked`, `revocation_check_unavailab
848
848
  push setup holds the site; retry after it finishes. Responses have `Cache-Control:
849
849
  no-store`; both methods require app authority and current Wix site ownership.
850
850
 
851
+ ## `himi store connect` and `himi store submission` codes
852
+
853
+ `himi store connect` and `himi store submission status|plan|apply|rejection|reply` print one JSON envelope: the
854
+ result on stdout (`ok: true`), or a failure on stderr with one of these codes. `store connect` exits `8` when it
855
+ signed in but created no key (`keyCreated: false`, with the engine's `code` and `reason`).
856
+
857
+ | Code | Meaning |
858
+ |---|---|
859
+ | `invalid_usage` | A missing or malformed op or flag, or no Himi app in the folder (`reason: app_not_found`). Nothing ran. |
860
+ | `node_too_old` | App Store submission needs Node 24 or newer. Nothing ran. |
861
+ | `share_unavailable` | The app names a Wix site, and sharing the key with Wix for builds needs your `himi login`. Checked before the sign-in page opens, so no sign-in was spent. |
862
+ | `connect_refused` | Refused before the page opened: a key is already saved under that profile name (`reason: key_profile_conflict`, the error names the key), the secret store cannot keep a key (`key_store_unavailable`), or the profile name is invalid (`invalid_profile`). Nothing was created. |
863
+ | `connect_failed` | The connect page ended without a sign-in: closed, expired after 10 minutes, or refused by Apple; `reason` says which. Nothing was saved. |
864
+ | `store_tool_failed` | The App Store step failed or the app's `store/app-store.json` is missing or incomplete (`reason: store_facts_missing` / `store_facts_invalid`); `error` carries the engine's message. |
865
+
866
+ ## `himi store handoff` and `himi store relops request` codes
867
+
868
+ Both print one JSON envelope: the result on stdout (`ok: true`, with `handoffId` or `consentId`), or a failure on
869
+ stderr with one of these codes. A refusal from the publishing service keeps its own code in `planeCode` and its HTTP
870
+ `status`.
871
+
872
+ | Code | Meaning |
873
+ |---|---|
874
+ | `invalid_usage` | A missing or malformed op or flag. Nothing ran. |
875
+ | `node_too_old` | Needs Node 24 or newer. Nothing ran. |
876
+ | `owner_session_unavailable` | Sending to Wix needs your `himi login`. Checked before anything is read or asked. |
877
+ | `store_facts_missing` | The app's `store/app-store.json` or its Wix app and site are missing; pass `--app` and `--site`. |
878
+ | `store_state_unreadable` | The App Store state on this computer could not be read. Nothing was sent. |
879
+ | `nothing_to_hand_off` | This computer holds no App Store jobs or history for this app. Nothing was sent. |
880
+ | `bundle_too_large` | The handoff is over the size cap even after keeping only the newest entries. Nothing was sent. |
881
+ | `bundle_contains_secret` | Something secret-shaped survived the clean-up, so the bundle was not sent. |
882
+ | `confirmation_required` | `relops request` without a terminal needs `--yes`. Nothing was sent. |
883
+ | `consent_declined` | You did not confirm at the terminal. Nothing was sent. |
884
+ | `handoff_failed` / `consent_failed` | The publishing service refused or could not be reached; `planeCode` and `status` say which. |
885
+
851
886
  ## `himi store app` codes
852
887
 
853
888
  `himi store app set|show --app <id> --site <msid>` prints one envelope. A refusal from the publishing
@@ -140,9 +140,13 @@ no workspace, `HIMI_WORKSPACE` sets the folder. It is then a hard boundary for E
140
140
  publish and share tools, not only the file tools. Coding agents edit files themselves, so the flag is
141
141
  off by default.
142
142
 
143
- **What the tools will not do:** make a release live, build store binaries, touch secrets, write to a
144
- site's CMS, or create a Wix site. Those spend money, handle credentials, or change what real users
145
- see, so they stay commands a person runs. Publishing needs a sign-in first: `himi_login` opens the
143
+ **What the tools will not do:** make a release live, build store binaries, write to a site's CMS,
144
+ create a Wix site, or take a credential through a tool input or result. Those spend money, handle
145
+ credentials, or change what real users see, so they stay steps a person takes. App Store Connect
146
+ changes happen only through the `store_*` tools below (and the in-app purchase tools above), and each
147
+ `store_*` change waits for the person's own approval of the exact plan; the Apple password and
148
+ two-factor code are typed only on the sign-in page their own computer serves. The hosted Wix Native
149
+ App Builder connector cannot submit at all. Publishing needs a sign-in first: `himi_login` opens the
146
150
  browser sign-in for the user, or run `himi login --browser` in a terminal. Either way the server
147
151
  never asks for or sees a credential — the browser hands a scoped token to a separate `himi login`
148
152
  process, which stores it on this machine. On a server with no browser, `himi login --wix` is the
@@ -153,6 +157,18 @@ the token, so keep it a secret of the job, not of the MCP client. Started with `
153
157
  never passes through a tool input or result. A tool input that starts with `-` is refused, so nothing
154
158
  can be passed through to a flag no tool offers.
155
159
 
160
+ ## Submit to the App Store from your agent (`store_*`)
161
+
162
+ `himi mcp` also serves six App Store tools, run on your own computer under your own Apple account:
163
+ `store_connect` (opens a sign-in page in your browser: you type your Apple ID password and two-factor
164
+ code there, never in the chat, and it creates an App Store Connect API key for this computer),
165
+ `store_status`, `store_plan`, `store_apply`, `store_rejection` and `store_reply`. Every write asks you
166
+ itself, in a form your client shows or on a page in your browser, to approve the exact plan; the model
167
+ cannot answer that question, and a message saying "the user approved" approves nothing. They need
168
+ Node 24 or newer; on an older Node the server leaves them out and says so on stderr. The app's store
169
+ facts come from `store/app-store.json` beside its `config.ts` — see `himi docs store-submission`. The
170
+ same steps run in a terminal as `himi store connect` and `himi store submission status|plan|apply|rejection|reply`.
171
+
156
172
  ## See the app inside your IDE
157
173
 
158
174
  `himi_preview_start` keeps a live preview running on your machine (`himi run --watch` — every save
package/guides/index.json CHANGED
@@ -436,6 +436,12 @@
436
436
  "category": "CLI & Loop",
437
437
  "file": "qa-builds.md"
438
438
  },
439
+ {
440
+ "id": "store-submission",
441
+ "title": "App Store submission — from your own computer, under your own Apple account",
442
+ "category": "CLI & Loop",
443
+ "file": "store-submission.md"
444
+ },
439
445
  {
440
446
  "id": "push-cli-onboarding",
441
447
  "title": "Push notifications — optional setup and readiness checks",
@@ -0,0 +1,171 @@
1
+ # Submitting your app to the App Store
2
+
3
+ You can take a Himi app from "built" to "Waiting for Review" from your own computer, under **your own Apple
4
+ developer account**, either by chatting with your coding agent (the `store_*` tools of `himi mcp`) or with
5
+ `himi store connect` and `himi store submission …` in a terminal. Both run the same steps.
6
+
7
+ Three rules hold everywhere:
8
+
9
+ - **Your Apple password and two-factor code are typed only on the connect page**, a page your own computer serves
10
+ on `127.0.0.1` and opens in your browser. No command flag, tool input or chat message takes them. Never paste them
11
+ into a chat.
12
+ - **Every change in App Store Connect waits for your yes**, given in a form your agent's app shows you or on a page
13
+ in your browser, for the exact plan you were shown. Your agent cannot answer for you: a message from the model
14
+ saying "the user approved" approves nothing.
15
+ - **Nothing secret leaves your computer except to Apple and, for builds, to Wix.** The API key the connect page
16
+ creates is saved in your system's secret store (the macOS keychain, the Windows user's protected storage, or the
17
+ Linux keyring). When your app names its Wix site (below), the key is also stored with Wix, because App Store
18
+ builds of your app are signed with it.
19
+
20
+ Requirements: Node 24 or newer, an Apple Developer Program membership, and the Account Holder or Admin role on the
21
+ team you submit under.
22
+
23
+ ## 1. Describe the app for the store: `store/app-store.json`
24
+
25
+ Beside your app's `config.ts`, create `store/app-store.json`. The bundle ID and name come from `config.ts`; the file
26
+ holds the rest:
27
+
28
+ ```json
29
+ {
30
+ "primaryLocale": "en-US",
31
+ "category": "HEALTH_AND_FITNESS",
32
+ "version": "1.0",
33
+ "price": "free",
34
+ "medicalDevice": false,
35
+ "ipaPath": "build/App.ipa",
36
+ "metadataFile": "store/metadata.json",
37
+ "screenshotsDir": "store/screenshots",
38
+ "reviewDetailsFile": "store/review.json",
39
+ "privacyAnswersFile": "store/privacy.json",
40
+ "wix": { "app": "<your app id>", "site": "<your site's metaSiteId>" }
41
+ }
42
+ ```
43
+
44
+ | Field | Required | What it is |
45
+ |---|---|---|
46
+ | `primaryLocale` | yes | The App Store primary language, e.g. `en-US`. |
47
+ | `category` | yes | Apple's primary category ID, e.g. `HEALTH_AND_FITNESS`, `LIFESTYLE`, `PRODUCTIVITY`. |
48
+ | `version` | yes | The App Store version string, e.g. `1.0`. |
49
+ | `price` | yes | `"free"`, or a price in US dollars, e.g. `"0.99"`. |
50
+ | `medicalDevice` | yes | Whether the app is a regulated medical device. Apple asks every app; answer truthfully. |
51
+ | `name`, `sku`, `buildNumber` | no | Override the name from `config.ts`; the SKU (default: the bundle ID; it can never be reused); the build to submit. |
52
+ | `ipaPath` | no | The signed IPA to upload, if not already uploaded. Leave it out when `himi dist` uploaded the build (below). |
53
+ | `metadataFile` | no | JSON: description, keywords, subtitle, privacy policy URL… per locale. |
54
+ | `screenshotsDir` | no | `DIR/<locale>/<displayType>/*.png`. |
55
+ | `reviewDetailsFile` | no | JSON: App Review contact and notes. Never a password: a demo account's password is read from an environment variable. |
56
+ | `privacyAnswersFile` | no | JSON: your App Privacy declaration (see App Privacy below). |
57
+ | `privacyShellOnly` | no | `true` when your app collects nothing beyond what the Himi app itself does (see App Privacy below). |
58
+ | `privacyChecked` | no | Ids of SDKs in the Himi app that have no ready answer, which you checked and covered, e.g. `["recaptcha-enterprise"]` (see App Privacy below). |
59
+ | `wix.app`, `wix.site` | no | The Himi app ID and the Wix site its App Store builds use. With them, the key is shared with Wix for builds. |
60
+
61
+ Paths are relative to the app folder and must stay inside it.
62
+
63
+ ### The build
64
+
65
+ With neither `ipaPath` nor `buildNumber` in the file, the build is found for you, without building anything:
66
+
67
+ 1. If your last `himi dist --signing byo --destination testflight` for this app (run from the app folder) shows its
68
+ upload to your App Store Connect as done, that build number is used, and its version too when the file names none.
69
+ If the file's `version` differs from the uploaded build's, or the record is for another app, the build is not used
70
+ and you are told why.
71
+ 2. Otherwise the newest `.ipa` in the app's `build/` folder is uploaded.
72
+ 3. Otherwise `status` names the gap and the command that makes a build. A build still uploading is named with its job,
73
+ so you can check it with `himi dist status <jobId>`.
74
+
75
+ ### App Privacy
76
+
77
+ Every App Store build of a Himi app collects some data itself: crash and performance data and diagnostics (crash
78
+ reporting) and a device ID (push notifications), none of it linked to the user or used for tracking. Your app may add
79
+ more (sign-in, analytics, data your screens collect or send), and only you know what.
80
+
81
+ - **Without `privacyAnswersFile`, App Privacy stays to do** in `status`. The runtime's own answers are written to
82
+ `.himi/store-privacy-shell.json` as a starting point: copy it to your own file (for example `store/privacy.json`),
83
+ add what your app collects, and name it as `privacyAnswersFile`.
84
+ - If your app collects nothing beyond the runtime, set `"privacyShellOnly": true` in `store/app-store.json` instead,
85
+ and the runtime's answers are sent as they are.
86
+ - One SDK in every App Store build, Google reCAPTCHA Enterprise (used on member sign-in), has no ready answer, because
87
+ Himi does not know what it collects. Check Google's disclosure for it, add what applies to your answers, then add
88
+ `"privacyChecked": ["recaptcha-enterprise"]` to `store/app-store.json`. Until you do, App Privacy stays to do, with
89
+ `privacyShellOnly` or your own file alike.
90
+ - When you write `privacyAnswersFile`, the runtime's answers are kept: any you left out are added back, and you are told
91
+ which. A file that says "no data collected" is replaced by the runtime's answers, because the app does send them. If
92
+ you mark a data type as linked to the user, it is declared linked. A row that gives Apple no answer (data collected
93
+ with no purpose, or no protection) is refused rather than dropped. The file must be inside the app folder. The
94
+ answers sent to Apple are written to `.himi/store-privacy.json`.
95
+
96
+ ## 2. Connect your Apple account
97
+
98
+ In a chat, ask your agent to connect to App Store Connect (it calls `store_connect`). In a terminal:
99
+
100
+ ```
101
+ himi store connect --dir <app folder>
102
+ ```
103
+
104
+ A page opens in your browser. Sign in with your Apple ID, approve the two-factor prompt on your own device, pick
105
+ the team if your Apple ID has several, then press **Create a key for this computer**. That creates an App Store
106
+ Connect API key named `himi-<computer>-<date>` with the Admin role (App Store builds and certificates need it) and
107
+ saves it on this computer. You can see and revoke it in App Store Connect → Users and Access → Integrations.
108
+
109
+ - `--no-key` signs in without creating a key.
110
+ - `--profile <name>` saves the key under another name. A second connect never overwrites a saved key: it stops and
111
+ names the key already saved.
112
+ - `--app <id> --site <msid>` override the `wix` block of the facts file. Sharing needs your `himi login`; without it
113
+ the command stops before the page opens, so it never costs you a sign-in.
114
+ - If another app on the site already holds its App Store slot, no key is created: a Wix site has one App Store app.
115
+ If your app is not linked to the site yet (`himi store app set`), no key is created either, because Wix cannot
116
+ tell who holds the slot until it is.
117
+ - A second connect on the same day keeps the key the first one saved and only signs you in again.
118
+ - Closing the page, or letting it sit for 10 minutes, ends the connect with nothing saved.
119
+
120
+ Exit codes: `0` connected (with a key unless `--no-key`), `8` signed in but no key was created (the reason says
121
+ why), `1` failed, `2` usage.
122
+
123
+ ## 3. Plan, approve, submit
124
+
125
+ ```
126
+ himi store submission status --dir <app> # where the app stands and what is missing
127
+ himi store submission plan --dir <app> # the next ordered batch of changes, with its plan hash
128
+ himi store submission apply --batch <id> --plan-hash <hash>
129
+ ```
130
+
131
+ Or, in a chat: `store_status`, `store_plan`, `store_apply`. A first submission takes several batches (the app
132
+ record, the listing, privacy, the build, then the submit, always last): after each apply, plan again until nothing
133
+ is left. `apply` asks you to approve the exact plan: at a terminal, type the first 8 characters of the plan hash; in
134
+ a chat, approve in the form your agent's app shows, or on the page that opens in your browser.
135
+
136
+ Two answers only the Apple ID web session can see — the medical-device declaration and the published App Privacy
137
+ details — show as gaps in `status` until they are done.
138
+
139
+ ## 4. After App Review
140
+
141
+ ```
142
+ himi store submission status --dir <app>
143
+ himi store submission rejection --dir <app> # App Review's latest message
144
+ himi store submission reply --dir <app> --text "<your reply>" [--attach demo.mp4]
145
+ ```
146
+
147
+ `reply` sends your reply and resubmits, after you approve the reply's exact words. A reply cannot be unsent.
148
+
149
+ ## 5. Getting help from Wix
150
+
151
+ If you want Wix to look at where your submission stands, two commands send what Wix needs, and nothing else:
152
+
153
+ ```
154
+ himi store handoff --dir <app> # send this app's App Store steps and their history to Wix
155
+ himi store relops request --dir <app> # let Wix's release team see this app's store state
156
+ ```
157
+
158
+ - `handoff` collects the App Store jobs and their history for this app from this computer, keeps only ids, statuses,
159
+ dates and step names (no file contents, free text, Apple's raw replies, passwords, codes, keys or cookies), and
160
+ sends them to Wix for the app's site. Wix refuses a bundle with any other field. `--out <file>` or `--dry-run` writes or prints the bundle instead of sending
161
+ it, so you can see exactly what would go. If the app's App Store record was created on another computer, name it
162
+ with `--apple-app-id <id>`.
163
+ - `relops request` records your consent for the app on its site, by default to **read** its store state
164
+ (`--scope read,submit` also lets Wix submit for you). At a terminal you confirm by typing the app ID or `yes`;
165
+ without one, pass `--yes`.
166
+ - Both need your `himi login`, and only the owner of the app's Wix site can send them.
167
+
168
+ ## Errors
169
+
170
+ Every failure prints one JSON envelope on stderr with a `code` (see "`himi store connect` and `himi store
171
+ submission` codes" in `himi-json-output.md`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1664.0",
3
+ "version": "0.1666.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": [
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@jitl/quickjs-wasmfile-release-sync": "^0.32.0",
38
- "@modelcontextprotocol/server": "^2.0.0",
38
+ "@modelcontextprotocol/server": "^2.3.1",
39
39
  "@rive-app/canvas": "2.38.3",
40
40
  "ajv": "^8.17.1",
41
41
  "ajv-formats": "^3.0.1",
@@ -51,7 +51,8 @@
51
51
  "typescript": "^5.6.3",
52
52
  "unicode-case-folding": "1.1.1",
53
53
  "wawoff2": "^2.0.1",
54
- "zod": "^4.2.0"
54
+ "yaml": "^2.9.1",
55
+ "zod": "^4.6.7"
55
56
  },
56
57
  "optionalDependencies": {
57
58
  "playwright": "1.61.1",
@@ -60,6 +61,12 @@
60
61
  "devDependencies": {
61
62
  "@himalaya/data-resources": "0.0.0",
62
63
  "@types/wawoff2": "^1.0.2",
64
+ "@wix/asc": "0.3.5",
65
+ "@wix/asc-api": "0.3.5",
66
+ "@wix/asc-core": "0.3.5",
67
+ "@wix/asc-jobs": "0.3.5",
68
+ "@wix/asc-mcp": "0.3.5",
69
+ "@wix/asc-web": "0.3.5",
63
70
  "@wix/himalaya": "0.1.0"
64
71
  },
65
72
  "publishConfig": {
@@ -72,5 +79,5 @@
72
79
  "artifactId": "himalaya-cli"
73
80
  }
74
81
  },
75
- "falconPackageHash": "3a4ff81dda3bb37e8c0b80b2e739c4cadbfabc1dee0b3c84fc65f394"
82
+ "falconPackageHash": "6486d3e97cf49ddb1e2276d0e2510d568a7a0c7f4307ff4caccb98a1"
76
83
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$source": "en",
3
- "$generated": "2026-11-11T20:18:46.092Z",
3
+ "$generated": "2026-11-11T22:30:17.102Z",
4
4
  "messages": {
5
5
  "h_0028d743eb44": {
6
6
  "source": "Sale",
@@ -2766,6 +2766,10 @@
2766
2766
  "source": "{n, plural, one {# view} other {# views}}",
2767
2767
  "translation": "{n, plural, one {צפייה אחת} other {# צפיות}}"
2768
2768
  },
2769
+ "h_972017cb7471": {
2770
+ "source": "1 member",
2771
+ "translation": "חבר אחד"
2772
+ },
2769
2773
  "h_19b27b0fd751": {
2770
2774
  "source": "You’re offline — nothing was saved. Try again when you reconnect.",
2771
2775
  "translation": "אין חיבור — דבר לא נשמר. נסו שוב כשהחיבור יחזור."