@wix/himalaya-cli 0.1114.0 → 0.1116.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.
- package/dist/cli.mjs +847 -653
- package/guides/himi-mcp.md +8 -0
- package/guides/wix-business-context.md +4 -2
- package/package.json +2 -2
- package/template-icons/brandy.png +0 -0
- package/templates/brandy/README.md +60 -0
- package/templates/brandy/config.ts +76 -0
- package/templates/brandy/dev/index.ts +25 -0
- package/templates/brandy/himalaya.content.json +5 -0
- package/templates/brandy/himalaya.template.json +6 -0
- package/templates/brandy/icon.png +0 -0
- package/templates/brandy/platforms.json +1 -0
- package/templates/brandy/provisioning.json +12 -0
- package/templates/brandy/tokens.json +128 -0
package/guides/himi-mcp.md
CHANGED
|
@@ -80,6 +80,14 @@ runs a session with it.
|
|
|
80
80
|
|
|
81
81
|
Each tool acts on the agent's workspace folder unless it is given a `dir`.
|
|
82
82
|
|
|
83
|
+
**File tools, for hosts that cannot edit files.** `himi mcp --with-files` adds `himi_list_apps`,
|
|
84
|
+
`himi_list_files`, `himi_read_file`, `himi_write_files` and `himi_delete_files`. The Claude Desktop
|
|
85
|
+
Extension uses them, because Claude Desktop chat has no file editing of its own. They follow the
|
|
86
|
+
hosted connector's shapes, act only inside the workspace folder (checked on the real path, so a
|
|
87
|
+
symlink cannot lead out of it), and never touch `.git`, `node_modules` or `dist`. When the host names
|
|
88
|
+
no workspace, `HIMI_WORKSPACE` sets the folder. Coding agents edit files themselves, so the flag is
|
|
89
|
+
off by default.
|
|
90
|
+
|
|
83
91
|
**What the tools will not do:** make a release live, build store binaries, touch secrets, write to a
|
|
84
92
|
site's CMS, or create a Wix site. Those spend money, handle credentials, or change what real users
|
|
85
93
|
see, so they stay commands a person runs. Publishing needs a sign-in first: `himi_login` opens the
|
|
@@ -161,11 +161,13 @@ The plane has no headless browser (`look.unavailable: no_browser_on_plane`). Own
|
|
|
161
161
|
`himi-brandy`, the site shell, opens the customer's live website as native-framed tabs, so its contract is a `site` block: which website, and which of its pages are tabs, drawer rows or overflow rows. `--shell brandy` derives that block into `provisioning.overlay.json`:
|
|
162
162
|
|
|
163
163
|
```bash
|
|
164
|
-
himi site analyze --url https://owner.wixsite.com/site --
|
|
164
|
+
himi site analyze --url https://owner.wixsite.com/site --shell brandy # writes site.pages
|
|
165
165
|
# edit site.pages in .himi/business-book/provisioning.overlay.json if the map needs it
|
|
166
|
-
himi site analyze --url https://owner.wixsite.com/site --
|
|
166
|
+
himi site analyze --url https://owner.wixsite.com/site --shell brandy --apply
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
+
No `--client-id` is needed here: a site shell is visitor-only, its pages are the site itself, and its contract binds no Headless client. For an off-repo brandy app (`himi init --template brandy`), run the `--apply` inside the app folder: it writes the derived `site` block into the package's own `provisioning.json`, which the template's `config.ts` builds every tab and screen from.
|
|
170
|
+
|
|
169
171
|
The map comes from what the analysis already reads without owner credentials, because Wix has no public menu API: the published page list (`look.sitePages`), the header menu the crawl saw (`look.navLinks`, label and href), and each page's role.
|
|
170
172
|
|
|
171
173
|
- **Order and labels** follow the site's own menu. Links to other hosts, and repeat links to the same page, are dropped.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1116.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": [
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"artifactId": "himalaya-cli"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"falconPackageHash": "
|
|
70
|
+
"falconPackageHash": "6d8f58d4b9f65728efd1d2728c9c1567bbe8ea1cb014bda9ee1afc50"
|
|
71
71
|
}
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# __HIMI_APP_NAME__ — your website as an app
|
|
2
|
+
|
|
3
|
+
A **site shell**: your live Wix website, framed as a native app. Every tab and drawer row is one of
|
|
4
|
+
your site's own pages, shown in a WebView under a native tab bar, drawer and splash in your brand
|
|
5
|
+
colours. The site's own header, footer and Wix ads are hidden. It is the fastest way to ship an
|
|
6
|
+
existing website as an app, and each tab can later be replaced by a native screen.
|
|
7
|
+
|
|
8
|
+
## Point it at your site
|
|
9
|
+
|
|
10
|
+
The whole app is the `site` block in `provisioning.json`:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"site": {
|
|
15
|
+
"origin": "https://your-account.wixsite.com/your-site",
|
|
16
|
+
"kind": "wix",
|
|
17
|
+
"pages": [
|
|
18
|
+
{ "id": "home", "title": "Home", "path": "/", "icon": "home" },
|
|
19
|
+
{ "id": "blog", "title": "Blog", "path": "/blog", "icon": "newspaper" },
|
|
20
|
+
{ "id": "contact", "title": "Contact", "path": "/contact", "icon": "mail", "placement": "drawer" }
|
|
21
|
+
],
|
|
22
|
+
"chrome": { "hideSiteHeader": true, "hideSiteFooter": true, "hideWixAds": true }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The placeholder origin above is not a real site. Replace it by deriving the block from your site's
|
|
28
|
+
own menu, from inside this folder:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
himi site analyze --url https://your-account.wixsite.com/your-site --shell brandy --apply
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
That writes the derived `site` block into this `provisioning.json` and your site's colours into
|
|
35
|
+
`tokens.json`. No `--client-id` is needed, because a site shell reads nothing through a Wix client.
|
|
36
|
+
To review the map first, leave out `--apply`: the block is then only written to
|
|
37
|
+
`.himi/business-book/provisioning.overlay.json`. You can always edit the block by hand.
|
|
38
|
+
|
|
39
|
+
- **`origin`** is your published site, `https` only. A free site's path (`/your-site`) is part of it.
|
|
40
|
+
- **`pages`** are paths relative to the origin. Each needs a unique `id` (`a-z`, `0-9`, `_`) and must
|
|
41
|
+
not use `page`, which is reserved.
|
|
42
|
+
- **`placement`** is `tab` (the default), `drawer` or `overflow`. At most four tabs are shown, and
|
|
43
|
+
`home` must be the first of them: the app opens on its first tab.
|
|
44
|
+
- **`icon`** is a design-system icon name (`home`, `bag`, `calendar`, `ticket`, `newspaper`, `mail`,
|
|
45
|
+
`info`, `tag`, `photo`, `person`, `globe`, …).
|
|
46
|
+
- **`chrome`** hides the site's own header (on inner pages), its footer and the Wix ads banner.
|
|
47
|
+
Every flag defaults to hidden.
|
|
48
|
+
|
|
49
|
+
`config.ts` validates the block whenever the app loads, so an `http` origin, a duplicate id or a map
|
|
50
|
+
with no tab fails `himi validate`, `himi render` and `himi push` rather than shipping.
|
|
51
|
+
|
|
52
|
+
## Loop
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
himi build && himi validate --strict # derive the screens and check them
|
|
56
|
+
himi render site_home # the home tab (a WebView: headless render reports it, it does not paint it)
|
|
57
|
+
himi push --draft # publish a draft release and open the web preview
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Your colours live in `tokens.json` and your name in `config.ts`.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Your app's configuration — a SITE SHELL. Your live website is the app: every tab and drawer
|
|
2
|
+
// row is one of its pages, shown in a native-framed WebView under a native tab bar and drawer.
|
|
3
|
+
//
|
|
4
|
+
// Nothing here names a page. The pages come from the `site` block of ./provisioning.json, so you
|
|
5
|
+
// change the app by changing that block — by hand, or with
|
|
6
|
+
// himi site analyze --url https://<your-site> --shell brandy
|
|
7
|
+
// which derives it from your site's own menu. Inspect the live values any time with
|
|
8
|
+
// `himi context`; see `himi docs app-config`.
|
|
9
|
+
import {
|
|
10
|
+
assertSiteShellConfig,
|
|
11
|
+
defineApp,
|
|
12
|
+
siteLinkableScreens,
|
|
13
|
+
siteNav,
|
|
14
|
+
siteNavConfig,
|
|
15
|
+
type SiteShellConfig,
|
|
16
|
+
} from "@himalaya/core";
|
|
17
|
+
import { ConsoleTelemetrySink } from "@himalaya/telemetry-console";
|
|
18
|
+
import provisioning from "./provisioning.json" with { type: "json" };
|
|
19
|
+
|
|
20
|
+
/** Your website and its page map. Validated here, so a mistake in provisioning.json (an http
|
|
21
|
+
* origin, a duplicate page id, no tab) fails `himi validate`, `render` and `push` instead of
|
|
22
|
+
* shipping a broken app. */
|
|
23
|
+
export const site = provisioning.site as SiteShellConfig;
|
|
24
|
+
assertSiteShellConfig(site);
|
|
25
|
+
const nav = siteNav(site);
|
|
26
|
+
// The app opens on its first tab, and everything that names the home screen (`himi init`,
|
|
27
|
+
// `himi render`, agent tooling) names `site_home` — so the `home` page must BE the first tab.
|
|
28
|
+
if (nav.tabs[0]?.screenId !== "site_home") {
|
|
29
|
+
throw new Error('provisioning.json: the "home" page must be the first tab — list it first in site.pages');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default defineApp({
|
|
33
|
+
id: "__HIMI_APP_DOTID__",
|
|
34
|
+
name: "__HIMI_APP_NAME__",
|
|
35
|
+
bundleId: "__HIMI_APP_DOTID__",
|
|
36
|
+
applicationId: "__HIMI_APP_DOTID__",
|
|
37
|
+
// Placeholders — an over-the-air app never consumes these. Leave as-is.
|
|
38
|
+
schemaPackage: "@example/__HIMI_APP_SLUG__-schema",
|
|
39
|
+
schemaPackageRange: { min: 9900, max: 9909 },
|
|
40
|
+
// Placeholders — only a local server would read these. Leave as-is.
|
|
41
|
+
ports: { devServer: 8190, web: 5390 },
|
|
42
|
+
// Visitor-only: your site's own pages handle anything a visitor does.
|
|
43
|
+
auth: { providerId: "none", config: {} },
|
|
44
|
+
telemetry: ConsoleTelemetrySink(),
|
|
45
|
+
serverUrls: {
|
|
46
|
+
screen: "http://localhost:8190/v1",
|
|
47
|
+
actions: "http://localhost:8190/v1/actions",
|
|
48
|
+
sync: "http://localhost:8190/v1/sync",
|
|
49
|
+
},
|
|
50
|
+
capabilities: [],
|
|
51
|
+
// Your brand colours paint the NATIVE chrome (tabs, drawer, splash); the site paints its pages.
|
|
52
|
+
designTokensPath: "./tokens.json",
|
|
53
|
+
// "Ready" means the first page has painted, not just the app shell — otherwise the splash
|
|
54
|
+
// fades into a blank WebView. It still dismisses after 5s on a slow link.
|
|
55
|
+
splash: {
|
|
56
|
+
enabled: true,
|
|
57
|
+
backgroundColor: "accentPrimary",
|
|
58
|
+
caption: "__HIMI_APP_NAME__",
|
|
59
|
+
minVisibleMs: 400,
|
|
60
|
+
maxHoldMs: 5000,
|
|
61
|
+
readySignal: "first_content",
|
|
62
|
+
},
|
|
63
|
+
navigation: {
|
|
64
|
+
// Bottom tabs on a phone, a sidebar on a larger screen; the drawer lists every page that is
|
|
65
|
+
// not `overflow`. At most four tabs — each keeps its page loaded while you switch.
|
|
66
|
+
navKind: "responsive",
|
|
67
|
+
scheme: "himalaya-__HIMI_APP_SLUG__",
|
|
68
|
+
deepLinkPatterns: [],
|
|
69
|
+
linkableScreens: siteLinkableScreens(site),
|
|
70
|
+
// A notification or app link carrying one of your site's URLs opens that page's tab.
|
|
71
|
+
site: siteNavConfig(site),
|
|
72
|
+
tabBar: { items: nav.tabs },
|
|
73
|
+
drawer: { items: nav.drawer },
|
|
74
|
+
},
|
|
75
|
+
entities: {},
|
|
76
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Your app's screens. Each one is a page of your website — a WebView screen built from the
|
|
2
|
+
// `site` block of ../provisioning.json — so this file holds no screen of its own. Change the
|
|
3
|
+
// pages by changing that block, never this file.
|
|
4
|
+
import { siteScreens } from "@himalaya/core";
|
|
5
|
+
import config, { site } from "../config.js";
|
|
6
|
+
|
|
7
|
+
const SCREENS = siteScreens(site);
|
|
8
|
+
// The home screen is always the `home` page's: `site_home`. A literal on purpose — `himi init`
|
|
9
|
+
// and the agent tooling read `homeScreenId` from this file as written; config.ts refuses a map
|
|
10
|
+
// whose first tab is anything else, so the literal and the tab bar cannot disagree.
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
config,
|
|
14
|
+
homeScreenId: "site_home",
|
|
15
|
+
screens: {
|
|
16
|
+
// A fresh copy per build: descriptors are pure functions of the site block.
|
|
17
|
+
exact: Object.fromEntries(Object.keys(SCREENS).map((id) => [id, () => structuredClone(SCREENS[id])])),
|
|
18
|
+
templated: [],
|
|
19
|
+
},
|
|
20
|
+
actions: [],
|
|
21
|
+
createStore: () => ({}),
|
|
22
|
+
// Every page is seeded, so the whole tab bar and drawer work on a cold offline start (each
|
|
23
|
+
// WebView then shows its own offline state until the network returns).
|
|
24
|
+
seed: { screens: SCREENS, data: {} },
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Brandy — your website as an app",
|
|
3
|
+
"description": "A site shell: the customer's live Wix website as a native app. Every tab and drawer row is one of the site's own pages in a native-framed WebView, with a native tab bar, drawer, splash and brand colours; the site's header, footer and Wix ads are hidden. The page map lives in provisioning.json (`site`), and `himi site analyze --url <site> --shell brandy` derives it from the site's own menu. Start here to ship an existing website as an app today and move tabs to native screens later.",
|
|
4
|
+
"tags": ["wix", "website", "site-shell", "webview", "tabs", "drawer", "no-code", "day-zero", "consumer"],
|
|
5
|
+
"category": "consumer"
|
|
6
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"macos":false}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"site": {
|
|
3
|
+
"origin": "https://your-account.wixsite.com/your-site",
|
|
4
|
+
"kind": "wix",
|
|
5
|
+
"pages": [
|
|
6
|
+
{ "id": "home", "title": "Home", "path": "/", "icon": "home" },
|
|
7
|
+
{ "id": "blog", "title": "Blog", "path": "/blog", "icon": "newspaper" },
|
|
8
|
+
{ "id": "contact", "title": "Contact", "path": "/contact", "icon": "mail", "placement": "drawer" }
|
|
9
|
+
],
|
|
10
|
+
"chrome": { "hideSiteHeader": true, "hideSiteFooter": true, "hideWixAds": true }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"colors": {
|
|
3
|
+
"surfacePrimary": {
|
|
4
|
+
"light": "#FFFFFF",
|
|
5
|
+
"dark": "#0D1117",
|
|
6
|
+
"highContrast": "#000000"
|
|
7
|
+
},
|
|
8
|
+
"surfaceSecondary": {
|
|
9
|
+
"light": "#F4F7F8",
|
|
10
|
+
"dark": "#161B22",
|
|
11
|
+
"highContrast": "#111111"
|
|
12
|
+
},
|
|
13
|
+
"surfaceElevated": {
|
|
14
|
+
"light": "#FFFFFF",
|
|
15
|
+
"dark": "#1D2228",
|
|
16
|
+
"highContrast": "#111111"
|
|
17
|
+
},
|
|
18
|
+
"surfaceSubtle": {
|
|
19
|
+
"light": "#F8FAF9",
|
|
20
|
+
"dark": "#121821",
|
|
21
|
+
"highContrast": "#111111"
|
|
22
|
+
},
|
|
23
|
+
"surfaceTertiary": {
|
|
24
|
+
"light": "#E9EEF0",
|
|
25
|
+
"dark": "#232A32",
|
|
26
|
+
"highContrast": "#1A1A1A"
|
|
27
|
+
},
|
|
28
|
+
"textPrimary": {
|
|
29
|
+
"light": "#1F2328",
|
|
30
|
+
"dark": "#E6EDF3",
|
|
31
|
+
"highContrast": "#FFFFFF"
|
|
32
|
+
},
|
|
33
|
+
"textSecondary": {
|
|
34
|
+
"light": "#59636E",
|
|
35
|
+
"dark": "#848D98",
|
|
36
|
+
"highContrast": "#CCCCCC"
|
|
37
|
+
},
|
|
38
|
+
"textTertiary": {
|
|
39
|
+
"light": "#7D8791",
|
|
40
|
+
"dark": "#6E7681",
|
|
41
|
+
"highContrast": "#CCCCCC"
|
|
42
|
+
},
|
|
43
|
+
"textOnAccent": {
|
|
44
|
+
"light": "#FFFFFF",
|
|
45
|
+
"dark": "#FFFFFF",
|
|
46
|
+
"highContrast": "#000000"
|
|
47
|
+
},
|
|
48
|
+
"accentPrimary": {
|
|
49
|
+
"light": "#0969DA",
|
|
50
|
+
"dark": "#1E72C7",
|
|
51
|
+
"highContrast": "#58A6FF"
|
|
52
|
+
},
|
|
53
|
+
"accentSecondary": {
|
|
54
|
+
"light": "#087F5B",
|
|
55
|
+
"dark": "#1C8968",
|
|
56
|
+
"highContrast": "#FFFFFF"
|
|
57
|
+
},
|
|
58
|
+
"accentSurface": {
|
|
59
|
+
"light": "#E2EDF8",
|
|
60
|
+
"dark": "#0C2540",
|
|
61
|
+
"highContrast": "#FFFFFF"
|
|
62
|
+
},
|
|
63
|
+
"success": {
|
|
64
|
+
"light": "#1A7F37",
|
|
65
|
+
"dark": "#3FB950",
|
|
66
|
+
"highContrast": "#3FB950"
|
|
67
|
+
},
|
|
68
|
+
"successSurface": {
|
|
69
|
+
"light": "#E9F8EC",
|
|
70
|
+
"dark": "#12331B",
|
|
71
|
+
"highContrast": "#FFFFFF"
|
|
72
|
+
},
|
|
73
|
+
"warning": {
|
|
74
|
+
"light": "#9A6700",
|
|
75
|
+
"dark": "#D29922",
|
|
76
|
+
"highContrast": "#D29922"
|
|
77
|
+
},
|
|
78
|
+
"warningSurface": {
|
|
79
|
+
"light": "#FFF5D8",
|
|
80
|
+
"dark": "#3A2C0A",
|
|
81
|
+
"highContrast": "#FFFFFF"
|
|
82
|
+
},
|
|
83
|
+
"danger": {
|
|
84
|
+
"light": "#CF222E",
|
|
85
|
+
"dark": "#F85149",
|
|
86
|
+
"highContrast": "#FF5555"
|
|
87
|
+
},
|
|
88
|
+
"dangerSurface": {
|
|
89
|
+
"light": "#FFEDEA",
|
|
90
|
+
"dark": "#3A1513",
|
|
91
|
+
"highContrast": "#FFFFFF"
|
|
92
|
+
},
|
|
93
|
+
"border": {
|
|
94
|
+
"light": "#D8DEE4",
|
|
95
|
+
"dark": "#30363D",
|
|
96
|
+
"highContrast": "#FFFFFF"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"spacing": {
|
|
100
|
+
"xs": 4,
|
|
101
|
+
"sm": 8,
|
|
102
|
+
"md": 12,
|
|
103
|
+
"lg": 16,
|
|
104
|
+
"xl": 24
|
|
105
|
+
},
|
|
106
|
+
"typography": {
|
|
107
|
+
"title1": {
|
|
108
|
+
"size": 28,
|
|
109
|
+
"weight": 700,
|
|
110
|
+
"line": 1.2
|
|
111
|
+
},
|
|
112
|
+
"body": {
|
|
113
|
+
"size": 16,
|
|
114
|
+
"weight": 400,
|
|
115
|
+
"line": 1.5
|
|
116
|
+
},
|
|
117
|
+
"caption": {
|
|
118
|
+
"size": 13,
|
|
119
|
+
"weight": 400,
|
|
120
|
+
"line": 1.4
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"radius": {
|
|
124
|
+
"sm": 4,
|
|
125
|
+
"md": 8,
|
|
126
|
+
"lg": 12
|
|
127
|
+
}
|
|
128
|
+
}
|