@ai4b-team/fsaos-gateway-sdk 5.0.0 → 5.1.1

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
@@ -188,6 +188,7 @@ The typed surface of the membership doors (Agent System Master Spec D13–D21).
188
188
  | `usePrincipal()` / `useUpdatePrincipal()` | Current principal identity / update |
189
189
  | `useAsset(idOrPath)` | Resolve an asset URL |
190
190
  | `useComponent(path, { version }?)` | Dynamically load a component from the edge |
191
+ | `usePublishedComponent(item)` | Load a component's published in-app version, read through the kernel |
191
192
  | `useTheme()` | Read theme CSS custom properties |
192
193
 
193
194
  `useComponent` loads a component bundle and runs it on the host page's own
@@ -200,6 +201,21 @@ replaces the one on screen when the number changes, with no timer. Pass a null
200
201
  path until the version is known. A component's stylesheet is on the page only
201
202
  while the component is mounted. To run a tool from a component, call `callTool`.
202
203
 
204
+ `usePublishedComponent(item)` loads the in-app version of a component a RevDev
205
+ project published. Pass the component item as read with `useItem` (null until
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-<hash>.js`,
208
+ `embed/bundle-<hash>.css`), through the kernel as the signed-in person: they are
209
+ ordinary `file` items, so whoever may read them may load the bundle, and no
210
+ public address serves them. Bytes that are not the ones the release sealed are
211
+ never run. It returns `{ Component, status, error, version }`, where `status` is
212
+ `loading`, `ready`, `unpublished`, `no_in_app_version` or `error`. A publish
213
+ replaces the version on screen when the item changes, with no timer; a version
214
+ that fails to load leaves the one on screen. The first load of a release in a
215
+ session is at most four kernel calls and two file reads; after that it is held
216
+ until the session ends. `loadPublishedBundle(item)` gives the same script and
217
+ stylesheet to a host that is not React.
218
+
203
219
  `useInfiniteItems(filter, { realtime: true })` uses the existing WebSocket event
204
220
  dispatch and reconnect recovery. As with the other realtime hooks, the host
205
221
  must hold an SDK account or path subscription (directly or via SDK bootstrap).