@ai4b-team/fsaos-gateway-sdk 4.3.0 → 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 +16 -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 +315 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -8
- package/dist/index.d.ts +16 -8
- package/dist/index.js +317 -69
- 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
|
@@ -50,6 +50,11 @@ Rule of thumb: if the answer should differ depending on *who is asking* or *whic
|
|
|
50
50
|
### Gateway Call
|
|
51
51
|
- `gatewayCall(method, params)` — Core RPC dispatcher: `POST /d/{hostname}`
|
|
52
52
|
|
|
53
|
+
### File Uploads
|
|
54
|
+
- `uploadFile(file, { parentPath, name? })` and `useFileUpload()` save a new file item. If its name is taken, the kernel atomically chooses a numbered sibling such as `photo-2.png` and the SDK returns that item's actual ID and path. Retrying the same upload reuses its item.
|
|
55
|
+
- A caller that treats the filename as a fixed address can pass `collisionPolicy: 'fail'` to retain `NAME_TAKEN`. For example, a version snapshot that later reads `version-<id>.json` by exact path must use this policy.
|
|
56
|
+
- Naming and replay are kernel decisions. The SDK makes no list request or client-side retry loop to choose a name.
|
|
57
|
+
|
|
53
58
|
### Public Page Forms
|
|
54
59
|
- `submitForm(capabilityId, fields, options?)` — Submit through the public domain gateway to the form dataset bound to the current published page release. The browser supplies only the declared capability name, current page URL, and field values; it never receives a dataset identity or write credential. This works from the IIFE, ESM, or npm build.
|
|
55
60
|
- `FormSubmissionError` — Includes the stable `fillId`, HTTP status, and error code so an uncertain submission can be retried without creating a second fill.
|
|
@@ -182,9 +187,19 @@ The typed surface of the membership doors (Agent System Master Spec D13–D21).
|
|
|
182
187
|
| `useAccounts()` | Account memberships, switcher accounts, and the accounts mounted under each |
|
|
183
188
|
| `usePrincipal()` / `useUpdatePrincipal()` | Current principal identity / update |
|
|
184
189
|
| `useAsset(idOrPath)` | Resolve an asset URL |
|
|
185
|
-
| `useComponent(path)` | Dynamically load a component from the edge |
|
|
190
|
+
| `useComponent(path, { version }?)` | Dynamically load a component from the edge |
|
|
186
191
|
| `useTheme()` | Read theme CSS custom properties |
|
|
187
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
|
+
|
|
188
203
|
`useInfiniteItems(filter, { realtime: true })` uses the existing WebSocket event
|
|
189
204
|
dispatch and reconnect recovery. As with the other realtime hooks, the host
|
|
190
205
|
must hold an SDK account or path subscription (directly or via SDK bootstrap).
|