@ai4b-team/fsaos-gateway-sdk 3.37.0 → 3.38.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
@@ -138,6 +138,7 @@ The SDK does not decide when AI should respond, spawn agents, or infer agent ide
138
138
  | `useList(path)` / `useChildren(path)` | Children of a path (location) |
139
139
  | `useItems(filter)` | Items by type with filters (location; account-scoped, **not** frame-aware) |
140
140
  | `useInfiniteItems(filter, { realtime? })` | Kernel-filtered infinite pages; optional event-driven refresh, cached items, load more and refetch. No polling. |
141
+ | `useIncrementalItems(filter, { shouldReadUpdate? })` | Live created-at feed: query pages once, point-read inserts and selected updates, reconcile after deletes/reconnect. No polling. |
141
142
  | `useInfiniteChildren(path)` | Infinite-scroll directory listing |
142
143
  | `useTree(path, depth?)` | Recursive tree |
143
144
  | `useSearch(query, types?)` | Keyword search |
@@ -168,6 +169,15 @@ loaded items moving out still refresh their former list. Closed lists are marked
168
169
  stale without fetching, and unchanged lists reopen from cache. All consumers of
169
170
  the same filtered query should use the same realtime setting.
170
171
 
172
+ For a high-traffic message feed, `useIncrementalItems` avoids reloading every
173
+ loaded page whenever a reply changes. It supports one item `type`, an explicit
174
+ `scope`, `sort_by: 'created_at'`, and optional `parent_id`, `fields`, or
175
+ `field_in`. It returns the same list and pagination fields as
176
+ `useInfiniteItems`. Inserts cost one item read; updates are ignored unless
177
+ `shouldReadUpdate(change, loadedItems)` selects them; deletes and reconnects
178
+ reconcile the pages. More complex filters fall back to the ordinary realtime
179
+ listing. The host still needs its normal account or path WebSocket subscription.
180
+
171
181
  A filter names one `type`, or `any_of`: 1-10 groups, each with an `item_type`,
172
182
  `fields` and `field_in`, so one listing spans item types with one total and one
173
183
  page order. `discovery: 'catalog'` keeps only what the kernel classes as a