@ai4b-team/fsaos-gateway-sdk 4.3.1 → 5.0.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
@@ -187,9 +187,19 @@ The typed surface of the membership doors (Agent System Master Spec D13–D21).
187
187
  | `useAccounts()` | Account memberships, switcher accounts, and the accounts mounted under each |
188
188
  | `usePrincipal()` / `useUpdatePrincipal()` | Current principal identity / update |
189
189
  | `useAsset(idOrPath)` | Resolve an asset URL |
190
- | `useComponent(path)` | Dynamically load a component from the edge |
190
+ | `useComponent(path, { version }?)` | Dynamically load a component from the edge |
191
191
  | `useTheme()` | Read theme CSS custom properties |
192
192
 
193
+ `useComponent` loads a component bundle and runs it on the host page's own
194
+ React and SDK: the bundle's `require` answers to `react`, to the SDK
195
+ (`@ai4b-team/fsaos-gateway-sdk`, `@fsaos/gateway`) and to the UI primitives
196
+ (`@ai4b-team/fsaos-gateway-sdk/ui`, `@fsaos/ui`). Pass `{ version }` to load
197
+ exactly that published version: read the live version from the component item
198
+ with `useItem`, which a change event keeps current, and the new version
199
+ replaces the one on screen when the number changes, with no timer. Pass a null
200
+ path until the version is known. A component's stylesheet is on the page only
201
+ while the component is mounted. To run a tool from a component, call `callTool`.
202
+
193
203
  `useInfiniteItems(filter, { realtime: true })` uses the existing WebSocket event
194
204
  dispatch and reconnect recovery. As with the other realtime hooks, the host
195
205
  must hold an SDK account or path subscription (directly or via SDK bootstrap).