@wix/himalaya-cli 0.981.0 → 0.982.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.
Binary file
@@ -246,24 +246,39 @@ errors** — a compile failure, a failed-to-build screen, a missing bundle, an e
246
246
  descriptor issue, or a worker that throws on boot. Fix them, or pass `--force`. Warnings never block.
247
247
 
248
248
  The push JSON includes:
249
- - `previewWeb` — live SPA eyes (`/preview/a/<app>?release=`)
250
- - `context` — agent brain (`/v1/preview/a/<app>?release=`) — one-shot ok/issues/screens/links
249
+ - `previewWeb` — live SPA eyes. On a plane with a shared store (prod/bo) this is a one-hop
250
+ HANDOVER link — `/preview/a/<app>?h=<code>` — an opaque, single-use code with **no credential
251
+ in it at all**: the plane holds the browser-preview token behind `sha256(code)` and delivers it
252
+ into the preview document the first time the link is opened. Only where there is no shared
253
+ store (the local dev loop) does it fall back to the old shape,
254
+ `/preview/a/<app>?release=<id>&pvt=<token>`, with the token riding the query string.
255
+ - `context` — agent brain (`/v1/preview/a/<app>?release=`) — one-shot ok/issues/screens/links.
256
+ This one always carries `?release=` and no bearer: it authenticates over a header, not a link
257
+ handed to a person, so it never had a credential in the URL to remove.
251
258
  - `screensUrl` / `deeplinksUrl` — catalog + nav map
252
259
  - `next` — suggested `himi context` / `himi screens` follow-ups
253
260
 
254
- The browser-preview token embedded in `previewWeb` is scoped to this app + draft release and
255
- expires after **45 minutes**. The JSON also includes `previewTokenExpiresAt` — read that rather
256
- than this number when you are talking to a plane you did not start. If review takes longer, run
257
- `himi preview --app my-app --release <id> --target wix`: it renews the browser token without
258
- promoting the draft. For header-only function calls against the same draft, pass the separately
259
- issued short-lived function token as `--preview-token <token>`.
260
-
261
- **When you hand `previewWeb` to a person, the expiry is theirs, not yours.** Renewing it needs
262
- this CLI and your credentials, so a link handed over near the end of a session leaves the
263
- recipient with a deadline and no way to extend it. Re-mint immediately before handing it over
264
- rather than passing on a link minted earlier, and say the expiry in their timezone. If they sign
265
- in to the Wix account that owns the app, its own owner page previews it for them
266
- without this CLI and without you — that, not the link, is the durable way back in.
261
+ The browser-preview token behind `previewWeb` is scoped to this app + draft release and expires
262
+ after **45 minutes** — the handover changes how the token TRAVELS, not how long it lives. What is
263
+ new is that the LINK is single-use regardless of the token's own remaining life: opening it once
264
+ redeems it, and that same browser tab can still reload (it re-reads what the page stashed on
265
+ first load) — but a different tab, a different browser, or anyone the link was forwarded to gets
266
+ a plain refusal, not the draft. The JSON also includes `previewTokenExpiresAt` — read that rather
267
+ than the 45-minute figure when you are talking to a plane you did not start. If review takes
268
+ longer, run `himi preview --app my-app --release <id> --target wix`: it mints a FRESH handover
269
+ (or renews the token directly, on a plane with no store) without promoting the draft. For
270
+ header-only function calls against the same draft, pass the separately issued short-lived
271
+ function token as `--preview-token <token>`.
272
+
273
+ **When you hand `previewWeb` to a person, both the expiry and the single use are theirs, not
274
+ yours.** Renewing it needs this CLI and your credentials, so a link handed over near the end of a
275
+ session leaves the recipient with a deadline and no way to extend it — and because a handover
276
+ code is spent on first open, re-sending the exact same link after someone has already opened it
277
+ once (even if their tab crashed) hands them a link that no longer works; mint again instead of
278
+ resending. Re-mint immediately before handing it over rather than passing on a link minted
279
+ earlier, and say the expiry in their timezone. If they sign in to the Wix account that owns the
280
+ app, its own owner page previews it for them without this CLI and without you — that, not the
281
+ link, is the durable way back in.
267
282
 
268
283
  ## 5b. Agent preview (machine-readable, no browser scrape)
269
284
 
@@ -2489,6 +2489,18 @@
2489
2489
  "kind": "const",
2490
2490
  "jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
2491
2491
  "decl": "export const version = 1;"
2492
+ },
2493
+ {
2494
+ "name": "NotificationEvent",
2495
+ "kind": "interface",
2496
+ "jsdoc": "/** One notification, as a worker sees it. Every field is always present; an\n * absent one reads as `\"\"` rather than `undefined`, so a `$service:` binding at\n * a field this payload omitted renders nothing instead of the text \"undefined\". */",
2497
+ "decl": "export interface NotificationEvent {\n /** Ping template that produced it, e.g. \"stores.order_shipped\". */\n templateId: string;\n /** Ping topic, e.g. \"stores\". */\n topic: string;\n /** The site the payload named, when it named one. */\n metaSiteId: string;\n /** Stable per-notification id — the key to deduplicate on. */\n notificationId: string;\n /** The link exactly as delivered, before any route translation. */\n link: string;\n /** What the route table translated `link` into, or `\"\"` when no route\n * matched. Empty is NOT an error: the notification still arrived, and a\n * worker may want to count one it cannot open. */\n resolvedLink: string;\n /** True only when the user TAPPED. A foreground receipt is `false` and must\n * not be treated as intent to navigate. */\n tapped: boolean;\n}"
2498
+ },
2499
+ {
2500
+ "name": "readNotificationEvent",
2501
+ "kind": "function",
2502
+ "jsdoc": "/**\n * Read the params a dispatched `observerAction` receives.\n *\n * Runs on the untrusted edge of the bridge, so it never throws whatever arrives.\n * `tapped` needs this reader more than the rest: the bridge stringifies every\n * param, so a worker testing `params.tapped` truthily would read the string\n * `\"false\"` as a tap.\n */",
2503
+ "decl": "export function readNotificationEvent(params: unknown): NotificationEvent;"
2492
2504
  }
2493
2505
  ]
2494
2506
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.981.0",
3
+ "version": "0.982.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": [
@@ -64,5 +64,5 @@
64
64
  "artifactId": "himalaya-cli"
65
65
  }
66
66
  },
67
- "falconPackageHash": "8c6c57df555495fb76153e6101f19971862f487629e302e57aa4fdc0"
67
+ "falconPackageHash": "2148a718160adaaf2dd1bf36a397e2015e080ba32885973148deee70"
68
68
  }