@ai4b-team/fsaos-gateway-sdk 5.1.0 → 5.2.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/README.md CHANGED
@@ -204,8 +204,8 @@ while the component is mounted. To run a tool from a component, call `callTool`.
204
204
  `usePublishedComponent(item)` loads the in-app version of a component a RevDev
205
205
  project published. Pass the component item as read with `useItem` (null until
206
206
  it is known). The hook reads the release the item names as live, then the
207
- script and stylesheet that release's build sealed (`embed/bundle.js`,
208
- `embed/bundle.css`), through the kernel as the signed-in person: they are
207
+ script and stylesheet that release's build sealed (`embed/bundle-<hash>.js`,
208
+ `embed/bundle-<hash>.css`), through the kernel as the signed-in person: they are
209
209
  ordinary `file` items, so whoever may read them may load the bundle, and no
210
210
  public address serves them. Bytes that are not the ones the release sealed are
211
211
  never run. It returns `{ Component, status, error, version }`, where `status` is
@@ -333,6 +333,26 @@ Use `initializeFsaos({ tracking: false })` when consent or product policy
333
333
  requires tracking to remain disabled. Published FSAOS IIFE pages call the same
334
334
  bootstrap automatically.
335
335
 
336
+ ### A host that holds the session
337
+
338
+ A host that serves the page and forwards its kernel calls to the gateway itself
339
+ sets `hostSession`, with `gatewayUrl` pointing at its own forwarding address. A
340
+ RevDev desk preview does this: the preview host attaches the identity of
341
+ whoever asked for the preview, so the page never holds a credential.
342
+
343
+ ```ts
344
+ window.__FSAOS_CONFIG__ = {
345
+ hostSession: true,
346
+ gatewayUrl: `${location.origin}/__fsaos_gateway`,
347
+ };
348
+ ```
349
+
350
+ With `hostSession` the SDK sends no bearer, does not wait for a sign-in, and
351
+ opens no realtime connection. Kernel calls and tool calls work; change events
352
+ do not arrive, so a read made with `useRealtimeQuery` runs once and is not
353
+ refreshed. Set the anchor (`setAnchor(scopePath)`) before the first call, as
354
+ on any page.
355
+
336
356
  ## Build
337
357
 
338
358
  ```bash