@wix/himalaya-cli 0.1014.0 → 0.1016.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +67 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +45 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +18 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +51 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +21 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +79 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-genie-chat.mjs +23 -0
- package/dist/cli.mjs +1974 -919
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +25 -9
- package/guides/designing-himi-screens.md +6 -4
- package/guides/headless-loop.md +6 -1
- package/guides/sdk-reference.json +47 -5
- package/guides/tier-5-add-a-screen.md +40 -13
- package/guides/wix-api-usage.md +9 -0
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +252 -7
- package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +5 -2
- package/templates/beauty-salon-owner/config.ts +1 -1
- package/templates/beauty-salon-owner/dev/index.ts +419 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/branded-lite/dev/index.ts +487 -14
- package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +5 -2
- package/templates/community-club/dev/index.ts +196 -13
- package/templates/community-club-owner/config.ts +1 -1
- package/templates/community-club-owner/dev/index.ts +402 -2
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/community-club-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/events-meetups/dev/index.ts +196 -13
- package/templates/events-meetups-owner/config.ts +1 -1
- package/templates/events-meetups-owner/dev/index.ts +348 -2
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/events-meetups-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/gym-fitness/dev/index.ts +324 -12
- package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +5 -2
- package/templates/gym-fitness-owner/config.ts +1 -1
- package/templates/gym-fitness-owner/dev/index.ts +440 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/himi-chat/dev/index.ts +2 -2
- package/templates/nonprofit-cause/dev/index.ts +212 -13
- package/templates/nonprofit-cause-owner/config.ts +1 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +386 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/owner-lite/config.ts +1 -1
- package/templates/owner-lite/dev/index.ts +446 -2
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/owner-lite/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/podcast-creator/dev/index.ts +206 -13
- package/templates/podcast-creator-owner/config.ts +1 -1
- package/templates/podcast-creator-owner/dev/index.ts +402 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/portfolio-creative/dev/index.ts +249 -11
- package/templates/portfolio-creative-owner/config.ts +1 -1
- package/templates/portfolio-creative-owner/dev/index.ts +419 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/restaurant/dev/index.ts +219 -11
- package/templates/restaurant-owner/config.ts +1 -1
- package/templates/restaurant-owner/dev/index.ts +440 -2
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/restaurant-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/retail-store/dev/index.ts +159 -6
- package/templates/retail-store-owner/config.ts +1 -1
- package/templates/retail-store-owner/dev/index.ts +381 -2
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/retail-store-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
- package/templates/yoga-studio/dev/index.ts +284 -12
- package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +5 -2
- package/templates/yoga-studio-owner/config.ts +1 -1
- package/templates/yoga-studio-owner/dev/index.ts +386 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +226 -9
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-client-tools.ts +234 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -0
|
Binary file
|
|
@@ -950,7 +950,7 @@
|
|
|
950
950
|
]
|
|
951
951
|
}
|
|
952
952
|
],
|
|
953
|
-
"propsSource": "export interface RatingProps {\n value?: number;\n max?: number;\n interactive?: boolean;\n onChange?: Action;\n color?: TokenName;\n icon?: IconRef;\n valuePath?: string;\n}"
|
|
953
|
+
"propsSource": "export interface RatingProps {\n value?: number;\n max?: number;\n interactive?: boolean;\n onChange?: Action;\n color?: TokenName;\n icon?: IconRef;\n valuePath?: string;\n /** Star size. `\"sm\"` is the compact size for dense rows — a star tally sharing a row\n * with a tag and a meta line, where the default stars crowd the text into wrapping.\n * It draws 16pt cells with a 14pt glyph, 2pt apart, identically on every platform.\n * Leave it unset (or `\"md\"`) for the standard size, unchanged from before `size`\n * existed. `\"sm\"` is meant for display rows; an interactive rating still works at\n * it, but its tap targets shrink with it. */\n size?: \"sm\" | \"md\";\n}"
|
|
954
954
|
},
|
|
955
955
|
{
|
|
956
956
|
"name": "Chart",
|
|
@@ -1473,6 +1473,13 @@ export interface RatingProps {
|
|
|
1473
1473
|
color?: TokenName;
|
|
1474
1474
|
icon?: IconRef;
|
|
1475
1475
|
valuePath?: string;
|
|
1476
|
+
/** Star size. `"sm"` is the compact size for dense rows — a star tally sharing a row
|
|
1477
|
+
* with a tag and a meta line, where the default stars crowd the text into wrapping.
|
|
1478
|
+
* It draws 16pt cells with a 14pt glyph, 2pt apart, identically on every platform.
|
|
1479
|
+
* Leave it unset (or `"md"`) for the standard size, unchanged from before `size`
|
|
1480
|
+
* existed. `"sm"` is meant for display rows; an interactive rating still works at
|
|
1481
|
+
* it, but its tap targets shrink with it. */
|
|
1482
|
+
size?: "sm" | "md";
|
|
1476
1483
|
}
|
|
1477
1484
|
```
|
|
1478
1485
|
|
|
@@ -2509,12 +2516,21 @@ The verb decides what happens to the navigation stack. Where there is a target s
|
|
|
2509
2516
|
| `snackbar` | Show a transient message from `args`: `message` (required) and `tone`. No `screenId`. |
|
|
2510
2517
|
|
|
2511
2518
|
A Close or Done button is a descriptor action: `{ "actionId": "himi.open", "presentation": "dismiss" }`
|
|
2512
|
-
(or `"back"`).
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2519
|
+
(or `"back"`).
|
|
2520
|
+
|
|
2521
|
+
A worker moves the user by returning `_nav` from an action (`navigate()` from
|
|
2522
|
+
`@himalaya/state`, see `himi docs tier-5-add-a-screen`). `_nav` takes exactly one of three forms:
|
|
2523
|
+
|
|
2524
|
+
| `_nav` | Effect |
|
|
2525
|
+
|---|---|
|
|
2526
|
+
| `{ screenId, args?, presentation? }` | Open a linkable screen. `presentation` is `push` (the default), `replace`, `sheet` or `full_screen`, as in the table above. |
|
|
2527
|
+
| `{ presentation: "back" }` / `{ presentation: "dismiss" }` | As in the table above. No target. |
|
|
2528
|
+
| `{ tab: "<tabId>" }` | Switch to that tab: a `tabBar` item, or a sidebar-rail item on a wide layout. Any open sheet or cover closes first. An id the app is not showing (unknown, hidden, or no tab bar / rail at all) is ignored, and so is the tab the user is already on: its stack is kept, not popped to its root. |
|
|
2529
|
+
|
|
2530
|
+
A `_nav` that mixes forms (a `tab` with a `screenId`, `back` with a `screenId`) is ignored.
|
|
2531
|
+
|
|
2532
|
+
- **Switching tabs is a worker `_nav`.** A `himi.open` whose target is another tab's root
|
|
2533
|
+
screen does not select that tab: it PUSHES the screen onto the current tab's stack.
|
|
2534
|
+
- **A tab switch is not a stack step.** After one, `back` pops the new tab's stack; it does not
|
|
2535
|
+
return to the previous tab. On web the switch is also a browser-history entry, so the
|
|
2536
|
+
browser's own Back button returns to the previous tab.
|
|
@@ -243,9 +243,9 @@ scroll. *Reach for `SegmentedControl` for 2–4 in-content modes; `Tabs`/tab-bar
|
|
|
243
243
|
contextual actions/detail; `Tooltip`/`Popover` for a small anchored hint. *Reach for `Snackbar`, not
|
|
244
244
|
`AlertDialog`, to confirm a completed action — don't block on success.*
|
|
245
245
|
|
|
246
|
-
**Status & data-viz** — `Badge`/`Tag`/`Chip` for compact labels; `Rating` for stars
|
|
247
|
-
determinate progress, `ActivityIndicator` for indeterminate; `Gauge` for
|
|
248
|
-
`Badge` for a count, a `Tag` for a category — they aren't interchangeable.*
|
|
246
|
+
**Status & data-viz** — `Badge`/`Tag`/`Chip` for compact labels; `Rating` for stars (`size: "sm"` in a
|
|
247
|
+
dense row); `ProgressBar` for determinate progress, `ActivityIndicator` for indeterminate; `Gauge` for
|
|
248
|
+
a single dial metric. *Use a `Badge` for a count, a `Tag` for a category — they aren't interchangeable.*
|
|
249
249
|
|
|
250
250
|
**Media** — `Image` (`fillWidth`, `height`, always `contentDescription`); `Video`/`Lottie`/`Rive` for
|
|
251
251
|
motion media; `Map` for location; `Avatar` for a person; `WebView` only when native can't express it.
|
|
@@ -289,7 +289,9 @@ build/validate/render cycles because the failure looks like a content bug rather
|
|
|
289
289
|
`Card` rows, a `weight`ed `Text` can resolve to **zero width** on the web renderer and then wrap
|
|
290
290
|
**one character per line** — the same visual signature as a too-narrow column, so it reads as a
|
|
291
291
|
data problem. The reliable pattern is `fillMaxWidth: true` on the row *and* on the text inside it;
|
|
292
|
-
reach for `weight` only when two siblings must divide a row in a fixed ratio.
|
|
292
|
+
reach for `weight` only when two siblings must divide a row in a fixed ratio. When the row also
|
|
293
|
+
carries a star `Rating` next to a tag and a meta line, the full-size stars are often what squeezes
|
|
294
|
+
the text: give the `Rating` `size: "sm"` (16pt cells, 2pt apart) before dropping content from the row.
|
|
293
295
|
- **`Alignment` is `leading | center | trailing` — there are no corner values.** There is no
|
|
294
296
|
vertical axis and no `topTrailing`: an `HStack`'s cross-axis start is `leading`, which reads as
|
|
295
297
|
"top". A wishlist heart authored as a top-right overlay therefore lands **center-right**. For a
|
package/guides/headless-loop.md
CHANGED
|
@@ -79,15 +79,20 @@ loop already makes the pictures — send them, and journal each one:
|
|
|
79
79
|
```sh
|
|
80
80
|
himi render home --png shots/home.png --device iphone # the first picture, right after init
|
|
81
81
|
himi studio # the build board: opens once, keeps itself current
|
|
82
|
+
himi run --watch & # live preview: repaints the open tab on every save
|
|
82
83
|
himi progress "Starting from branded-lite" --step implement --image shots/home.png
|
|
83
84
|
himi render home --png shots/home-dark.png --device iphone --scheme dark
|
|
84
85
|
himi progress "Your brand, light and dark" --step brand --image shots/home.png --image shots/home-dark.png
|
|
85
86
|
himi progress # the journal: current step, elapsed, every postcard
|
|
87
|
+
himi studio reel # at handover: the making-of, one self-contained file
|
|
86
88
|
```
|
|
87
89
|
|
|
88
90
|
`himi studio` writes `.himi/studio/index.html` and opens it; from then on every render, test,
|
|
89
91
|
validate, push and progress entry refreshes it, and the page picks that up by itself — no server,
|
|
90
|
-
nothing to re-run (`--no-open` prints its path instead, for SSH). `himi
|
|
92
|
+
nothing to re-run (`--no-open` prints its path instead, for SSH). `himi run --watch` rebuilds on every
|
|
93
|
+
save and sends the open tab only what changed; a save that does not build keeps the last good preview
|
|
94
|
+
on screen and prints `build_failed` with the reason. It stays up until you stop it, so start it in the
|
|
95
|
+
background, and only after the template's startup requests are preflighted (step 4 of the entry skill). `himi test` writes one PNG per
|
|
91
96
|
screen to `.himi/shots/` on every run, so take the new screens from there instead of rendering each
|
|
92
97
|
one again; a bare `--png` on `himi render` writes `.himi/shots/<id>.png`. `himi progress` copies each image into `.himi/history/`
|
|
93
98
|
as it was when you journaled it, so a later render cannot change what the record says the owner saw;
|
|
@@ -36,14 +36,32 @@
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"name": "NavDirective",
|
|
39
|
+
"kind": "type",
|
|
40
|
+
"jsdoc": "/**\n * Navigation directive. An action may return its new state with a transient\n * `_nav` field; the runtime strips it from the stored state (so it never\n * persists or re-fires on the next spread) and surfaces it on the value\n * `__invokeAction` resolves to. The host reads it there and asks the app router\n * to move the user — to a screen ONLY if that screen is a linkable target, the same\n * check a `himi.open` action already gets.\n *\n * Three forms, one per kind of move: open a screen, go back / dismiss, or switch\n * tab. See {@link NavToScreen}, {@link NavBackOrDismiss} and {@link NavToTab}.\n *\n * WHY THIS EXISTS: all three hosts invoked a `tier5.*` action and threw the\n * result away, so a worker could change state but never move the user. A\n * generated (RFC 0046) row tap could therefore only *arm* an authored button —\n * two taps to open one record. The alternative was letting generated trees name\n * a screen, which would break the invariant that the model never names a screen,\n * a component or a token. With `_nav`, the model still only fires an allowlisted\n * `tier5.*` action id; the WORKER maps entity → screenId from its own table.\n */",
|
|
41
|
+
"decl": "export type NavDirective = NavToScreen | NavBackOrDismiss | NavToTab;"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "NavToScreen",
|
|
45
|
+
"kind": "interface",
|
|
46
|
+
"jsdoc": "/**\n * Open a screen. `presentation` picks how: `push` (the default) onto the current tab's\n * stack, `replace` to show it in place of the current screen, or present it as a\n * `sheet` / `full_screen` modal.\n */",
|
|
47
|
+
"decl": "export interface NavToScreen {\n /** Screen to open. Must be linkable, or the host ignores the directive. */\n screenId: string;\n /** Nav params for the target (e.g. the record `id`). Strings only. */\n args?: Record<string, string>;\n /** How to show it. Absent ⇒ `push`. */\n presentation?: \"push\" | \"replace\" | \"sheet\" | \"full_screen\";\n tab?: never;\n}"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "NavBackOrDismiss",
|
|
39
51
|
"kind": "interface",
|
|
40
|
-
"jsdoc": "/**\n *
|
|
41
|
-
"decl": "export interface
|
|
52
|
+
"jsdoc": "/**\n * Leave the current screen. `back` pops the current stack. On iOS and Android, inside an\n * open sheet or cover it pops the modal's own stack and closes the modal at its root; on\n * web it pops the tab's stack, so close a modal with `dismiss`. `dismiss` closes the open\n * sheet / full-screen cover. Both are no-ops with nothing to leave. No target: the host\n * already knows where \"back\" is.\n */",
|
|
53
|
+
"decl": "export interface NavBackOrDismiss {\n presentation: \"back\" | \"dismiss\";\n screenId?: never;\n args?: never;\n tab?: never;\n}"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "NavToTab",
|
|
57
|
+
"kind": "interface",
|
|
58
|
+
"jsdoc": "/**\n * Switch to the top-level destination with this id — a tab-bar item, or a sidebar-rail\n * item on a wide layout. The host closes any open sheet first. An id the app is not\n * showing right now (unknown, or hidden by the nav worker) is ignored, and so is the tab\n * the user is already on (their stack is kept — it is not a re-tap). A tab switch is not a\n * stack operation: a later `back` pops the NEW tab's stack, not the switch.\n */",
|
|
59
|
+
"decl": "export interface NavToTab {\n tab: string;\n screenId?: never;\n args?: never;\n presentation?: never;\n}"
|
|
42
60
|
},
|
|
43
61
|
{
|
|
44
62
|
"name": "navigate",
|
|
45
63
|
"kind": "function",
|
|
46
|
-
"jsdoc": "/**\n * Attach a {@link NavDirective} to a state object an action returns. Sugar for\n * `{ ...state, _nav: { screenId, args } }` that
|
|
64
|
+
"jsdoc": "/**\n * Attach a {@link NavDirective} to a state object an action returns. Sugar for\n * `{ ...state, _nav: target }` that keeps the field name in one place.\n *\n * `target` is exactly ONE of three forms — `{ screenId, args?, presentation? }`,\n * `{ presentation: \"back\" | \"dismiss\" }`, or `{ tab }`. A directive that mixes them\n * (a `tab` with a `screenId`, say) is dropped by every host.\n */",
|
|
47
65
|
"decl": "export function navigate<S extends object>(\n state: S,\n target: NavDirective,\n): S & { _nav: NavDirective };"
|
|
48
66
|
},
|
|
49
67
|
{
|
|
@@ -16730,7 +16748,19 @@
|
|
|
16730
16748
|
"name": "ConversationMessage",
|
|
16731
16749
|
"kind": "interface",
|
|
16732
16750
|
"jsdoc": "",
|
|
16733
|
-
"decl": "export interface ConversationMessage {\n id?: string;\n content?: string;\n role?: MessageRole;\n createdDate?: string;\n status?: MessageStatus;\n}"
|
|
16751
|
+
"decl": "export interface ConversationMessage {\n id?: string;\n content?: string;\n role?: MessageRole;\n createdDate?: string;\n status?: MessageStatus;\n /** Client tools this assistant turn asks the CALLER to run — see `FunctionCall`. */\n functionCalls?: FunctionCall[];\n}"
|
|
16752
|
+
},
|
|
16753
|
+
{
|
|
16754
|
+
"name": "FunctionCall",
|
|
16755
|
+
"kind": "interface",
|
|
16756
|
+
"jsdoc": "/** A client-side tool the assistant wants the caller to run before it can go on\n * — asking the owner for consent, say. It arrives on the `/user-message`\n * response and the agent then WAITS: nothing more is written until the result\n * comes back through `sendFunctionCallResults`.\n *\n * Shape from the chat-service's generated client (`wix.genie.v1` `FunctionCall`\n * / `FunctionCallResult`), which the native Aria app and the React Native\n * dashboard assistant both drive; NOT captured from this client's own traffic,\n * because no hermetic account can make the agent ask for a tool on demand. */",
|
|
16757
|
+
"decl": "export interface FunctionCall {\n /** Matches the result to the call. Copied back verbatim. */\n id?: string;\n /** The function's name. Also copied back. */\n name?: string;\n /** A JSON-ENCODED object — a string on the wire, not a nested object. */\n arguments?: string;\n}"
|
|
16758
|
+
},
|
|
16759
|
+
{
|
|
16760
|
+
"name": "FunctionCallResult",
|
|
16761
|
+
"kind": "interface",
|
|
16762
|
+
"jsdoc": "/** The answer to one `FunctionCall`. Note the wire spells the flag `success`. */",
|
|
16763
|
+
"decl": "export interface FunctionCallResult {\n id?: string;\n name?: string;\n /** Text for the model — the error text when `success` is false. */\n content?: string;\n success?: boolean;\n /** A JSON-ENCODED object carrying the tool's structured answer. */\n widgetResponse?: string;\n}"
|
|
16734
16764
|
},
|
|
16735
16765
|
{
|
|
16736
16766
|
"name": "AssistantConfig",
|
|
@@ -16766,7 +16796,7 @@
|
|
|
16766
16796
|
"name": "SendMessageResponse",
|
|
16767
16797
|
"kind": "interface",
|
|
16768
16798
|
"jsdoc": "",
|
|
16769
|
-
"decl": "export interface SendMessageResponse {\n assistantMessages?: ConversationMessage[];\n conversationMessage?: ConversationMessage;\n /** The user's own turn AS STORED by the service — present on step 1's reply\n * (`conversationUserMessage`), which is where the id actually comes from. */\n userMessage?: ConversationMessage;\n /** The id the owner's turn was stored under, carried out by `sendMessage`.\n *\n * The only handle the abort route accepts, and there is no route that looks\n * it up afterwards — so a caller that wants to stop the reply has to keep it\n * from the send. `sendMessage` resolves with step 2's response, which does\n * NOT carry `userMessage`, so this field is the one reliable source; read it\n * through `userMessageIdOf` rather than directly. */\n userMessageId?: string;\n}"
|
|
16799
|
+
"decl": "export interface SendMessageResponse {\n assistantMessages?: ConversationMessage[];\n conversationMessage?: ConversationMessage;\n /** The user's own turn AS STORED by the service — present on step 1's reply\n * (`conversationUserMessage`), which is where the id actually comes from. */\n userMessage?: ConversationMessage;\n /** The id the owner's turn was stored under, carried out by `sendMessage`.\n *\n * The only handle the abort route accepts, and there is no route that looks\n * it up afterwards — so a caller that wants to stop the reply has to keep it\n * from the send. `sendMessage` resolves with step 2's response, which does\n * NOT carry `userMessage`, so this field is the one reliable source; read it\n * through `userMessageIdOf` rather than directly. */\n userMessageId?: string;\n /** Client tools the agent is waiting on. Read through `functionCallsOf`: the\n * service can also nest them on the first assistant message. */\n functionCalls?: FunctionCall[];\n}"
|
|
16770
16800
|
},
|
|
16771
16801
|
{
|
|
16772
16802
|
"name": "AbortAssistantMessageGenerationResponse",
|
|
@@ -16828,6 +16858,12 @@
|
|
|
16828
16858
|
"jsdoc": "/** Step 2 of sending a turn on its own: ask the agent to answer a user message\n * that `conversationUserMessage` has ALREADY stored.\n *\n * Exported because it is the only safe retry when step 2 is the half that\n * failed — see `sendMessage`, which attaches the id to its error for exactly\n * this call. Carries no content: the turn it names is the content. */",
|
|
16829
16859
|
"decl": "export function triggerAssistantMessage(\n conversationId: string,\n userMessageId: string,\n opts: SendMessageOptions = {},\n): Promise<SendMessageResponse>;"
|
|
16830
16860
|
},
|
|
16861
|
+
{
|
|
16862
|
+
"name": "sendFunctionCallResults",
|
|
16863
|
+
"kind": "function",
|
|
16864
|
+
"jsdoc": "/** Answer the client tools a `/user-message` response asked for, and let the\n * agent carry on.\n *\n * The SAME route as the trigger, with a different body: no content and no\n * `userMessageId` — the results ARE the turn. The response has the shape of any\n * other send, so it can carry the NEXT round of `functionCalls`; a caller loops\n * until one comes back without any (see `functionCallsOf`).\n *\n * Nothing here decides what a tool does or whether the owner agreed to it. That\n * is the caller's, and it is the part that has to be right: a result that says\n * `userConsent: true` is the owner's signature on whatever the agent does next. */",
|
|
16865
|
+
"decl": "export function sendFunctionCallResults(\n conversationId: string,\n results: FunctionCallResult[],\n opts: SendMessageOptions = {},\n): Promise<SendMessageResponse>;"
|
|
16866
|
+
},
|
|
16831
16867
|
{
|
|
16832
16868
|
"name": "abortAssistantMessageGeneration",
|
|
16833
16869
|
"kind": "function",
|
|
@@ -16852,6 +16888,12 @@
|
|
|
16852
16888
|
"jsdoc": "/** The id of the user turn a send response stored, or \"\" when the service did\n * not name one. Empty is a real answer, not a parse failure: it means this turn\n * cannot be aborted, and a caller must degrade rather than send `undefined` to\n * the abort route. */",
|
|
16853
16889
|
"decl": "export function userMessageIdOf(res: SendMessageResponse | null | undefined): string;"
|
|
16854
16890
|
},
|
|
16891
|
+
{
|
|
16892
|
+
"name": "functionCallsOf",
|
|
16893
|
+
"kind": "function",
|
|
16894
|
+
"jsdoc": "/** The client tools a send response is waiting on, or `[]`.\n *\n * Under either of the two places the service puts them: nested on the FIRST\n * assistant message when that carries any, otherwise top-level. That order is\n * the one both native Aria clients read, and it matters when both are present —\n * the nested set is the one the agent is actually blocked on. */",
|
|
16895
|
+
"decl": "export function functionCallsOf(res: SendMessageResponse | null | undefined): FunctionCall[];"
|
|
16896
|
+
},
|
|
16855
16897
|
{
|
|
16856
16898
|
"name": "conversationIdOf",
|
|
16857
16899
|
"kind": "function",
|
|
@@ -675,29 +675,56 @@ save: async (s) => {
|
|
|
675
675
|
|
|
676
676
|
The runtime strips `_nav` before the state is stored, and the host opens `screenId` exactly as
|
|
677
677
|
a tapped `himi.open` would — including the `args` arriving as `himalaya.input` on the target.
|
|
678
|
+
|
|
679
|
+
`_nav` takes **exactly one** of three forms:
|
|
680
|
+
|
|
681
|
+
| `_nav` | What the host does |
|
|
682
|
+
|---|---|
|
|
683
|
+
| `{ screenId, args?, presentation? }` | Opens the screen. `presentation` is `push` (the default), `replace`, `sheet` or `full_screen` — the same verbs a descriptor action uses. |
|
|
684
|
+
| `{ presentation: "back" }` or `{ presentation: "dismiss" }` | `back` pops the current screen; `dismiss` closes the open sheet or full-screen cover. No target. |
|
|
685
|
+
| `{ tab: "<tabId>" }` | Switches to that tab — a `tabBar` item, or a sidebar-rail item on a wide layout. |
|
|
686
|
+
|
|
687
|
+
```ts
|
|
688
|
+
cancel: (s) => navigate({ ...s, draft: null }, { presentation: "dismiss" }),
|
|
689
|
+
viewOrders: (s) => navigate(s, { tab: "orders" }),
|
|
690
|
+
```
|
|
691
|
+
|
|
678
692
|
The rules:
|
|
679
693
|
|
|
680
694
|
- `screenId` must be a **linkable** screen (`navigation.linkableScreens`), or the host
|
|
681
695
|
ignores the directive.
|
|
682
696
|
- `args` values are **strings only**; anything else is dropped rather than coerced.
|
|
683
|
-
-
|
|
697
|
+
- A directive that mixes forms — a `tab` with a `screenId`, `back` with a `screenId`, `back`
|
|
698
|
+
with `args` — or names a verb outside its form (`alert`, `snackbar`) is **ignored** and
|
|
699
|
+
logged as `nav_verb_dropped`.
|
|
684
700
|
|
|
685
|
-
`_nav`
|
|
686
|
-
`
|
|
687
|
-
|
|
701
|
+
Return `_nav` rather than calling `dispatch("himi.open", …)` from a worker. Current runtimes
|
|
702
|
+
route a worker's `himi.open` dispatch on all three hosts, but older iOS and Android binaries
|
|
703
|
+
send it to the native action registry, which has no `himi.open` handler, so it does nothing
|
|
704
|
+
there; `_nav` works on every binary.
|
|
688
705
|
|
|
689
706
|
#### Back, dismiss, and tabs
|
|
690
707
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
708
|
+
A Close or Done button is a **descriptor** action with a `presentation` verb —
|
|
709
|
+
`{ "actionId": "himi.open", "presentation": "dismiss" }` (or `"back"`). The component reference
|
|
710
|
+
tabulates every verb (`himi components --json`, or the Actions section of
|
|
694
711
|
`himi docs component-reference`): `back` pops the current screen, `dismiss` closes a presented
|
|
695
|
-
sheet or cover.
|
|
696
|
-
|
|
697
|
-
**
|
|
698
|
-
tab's root screen
|
|
699
|
-
|
|
700
|
-
|
|
712
|
+
sheet or cover. From a worker, return the same verbs as `_nav` (above).
|
|
713
|
+
|
|
714
|
+
**Switching tabs is a worker `_nav`.** Return `_nav: { tab: "<tabId>" }`. A `himi.open` whose
|
|
715
|
+
target is another tab's root screen does not select that tab — it pushes the screen onto the
|
|
716
|
+
*current* tab's stack. How a tab switch behaves:
|
|
717
|
+
|
|
718
|
+
- Any open sheet or full-screen cover closes first, then the tab is selected, showing
|
|
719
|
+
whatever that tab's stack last held.
|
|
720
|
+
- An id the app is not showing right now — unknown, hidden by the nav worker, or any id when
|
|
721
|
+
the app has no tab bar or sidebar rail (`single` / `drawer` navigation) — is ignored and
|
|
722
|
+
logged as `nav_verb_dropped`. The user stays where they are.
|
|
723
|
+
- Asking for the tab the user is already on does nothing. It does **not** pop that tab to its
|
|
724
|
+
root the way a second tap on the tab bar does.
|
|
725
|
+
- A tab switch is not a step on a stack: a later `back` pops the **new** tab's stack and does
|
|
726
|
+
not return to the previous tab. On web the switch is also a browser-history entry, so the
|
|
727
|
+
browser's own Back button returns to the previous tab; iOS and Android have no equivalent.
|
|
701
728
|
|
|
702
729
|
### Enumerable variants with `FragmentSlot` (RFC 0045)
|
|
703
730
|
|
package/guides/wix-api-usage.md
CHANGED
|
@@ -7,6 +7,15 @@ endpoints without a generated client, the **raw `wixApi` chokepoint** (L0). Star
|
|
|
7
7
|
It's **platform-agnostic**: the worker JS is identical on iOS, Android, macOS, and web — each host installs the
|
|
8
8
|
same `globalThis.himalaya.wixApi.call(method, path, body)` bridge over `WixApiCapability`.
|
|
9
9
|
|
|
10
|
+
On web the host normally routes the call through a same-origin `/v1/__webwix/call` bridge, which attaches
|
|
11
|
+
the current visitor, member or owner credential. Keep `path`
|
|
12
|
+
**relative** — it resolves against `https://www.wixapis.com` on every surface. The published web app's bridge
|
|
13
|
+
refuses every absolute URL (an account host such as `users.wix.com` is reachable natively, not on web). The
|
|
14
|
+
local development bridge is looser on its visitor/member path: it accepts an absolute `https:` URL on a host
|
|
15
|
+
under `wix.com`, `wixapis.com` or `nownia.com` (subdomains included) and refuses any other host before a
|
|
16
|
+
request is sent — so an absolute URL that works in local preview can still fail once published. This bridge
|
|
17
|
+
is separate from the dev network gateway, which is the broader proxy/mock surface.
|
|
18
|
+
|
|
10
19
|
<!-- Heading kept free of `@`, `/` and `*`: GitHub's slugger DELETES those, md.mjs collapses each
|
|
11
20
|
run to a hyphen, so punctuation here makes the two anchors disagree and whichever surface the
|
|
12
21
|
author did not test gets a link to nowhere. That already happened — wix-sdk-overview.md cited
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1016.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": [
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"artifactId": "himalaya-cli"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
"falconPackageHash": "
|
|
68
|
+
"falconPackageHash": "8d9c295e5bb131686c4267b1ca8dee02e1722595723466ab792c6e83"
|
|
69
69
|
}
|