@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 +11 -1
- package/dist/iife/gateway.js +4 -4
- package/dist/iife/gateway.js.map +4 -4
- package/dist/iife/ui.js +1 -1
- package/dist/index.cjs +293 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +295 -65
- package/dist/index.js.map +1 -1
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/package.json +1 -1
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).
|