@ai4b-team/fsaos-gateway-sdk 3.32.0 → 3.33.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
@@ -101,7 +101,8 @@ The SDK does not decide when AI should respond, spawn agents, or infer agent ide
101
101
  - `fetchVfsItem(path)` — Fetch a single item
102
102
  - `fetchVfsItemById(id)` — Fetch a single item by UUID
103
103
  - `fetchVfsChildren(path)` — Fetch children (also warms item cache)
104
- - `fetchItems(filter)` — Fetch items by type with structured filters
104
+ - `fetchItems(filter)` — Fetch items with structured filters: one `type`, or `any_of` groups spanning types; `fields`, `field_in`, `discovery`, sort and offset
105
+ - `itemsFilterFromQueryFilter(typeData, { scope?, limit? })` — Turn a stored saved filter (a `query_filter` child of an arrangement) into the filter `useInfiniteItems` takes
105
106
  - `fetchTypeDefinitions(scopeId?)` — Fetch type definitions as `Map<string, TypeDefinition>`
106
107
  - `fetchEdgesForItem(itemId)` — Fetch edges (incoming + outgoing)
107
108
  - `fetchVfsTree(path, depth?, types?, limit?)` — Fetch recursive tree
@@ -167,6 +168,22 @@ loaded items moving out still refresh their former list. Closed lists are marked
167
168
  stale without fetching, and unchanged lists reopen from cache. All consumers of
168
169
  the same filtered query should use the same realtime setting.
169
170
 
171
+ A filter names one `type`, or `any_of`: 1-10 groups, each with an `item_type`,
172
+ `fields` and `field_in`, so one listing spans item types with one total and one
173
+ page order. `discovery: 'catalog'` keeps only what the kernel classes as a
174
+ person's own standalone things; the kernel applies it before paging. A menu's
175
+ stored sections are run without building a filter by hand:
176
+
177
+ ```ts
178
+ const { resolvedChildren } = useArrangement({ key: 'library' });
179
+ const section = resolvedChildren.find(child => child.child_type === 'query_filter');
180
+ const list = useInfiniteItems(
181
+ itemsFilterFromQueryFilter(section?.type_data, { scope: accountPath, limit: 50 }),
182
+ { realtime: true },
183
+ );
184
+ // list.allItems, list.fetchNextPage(), list.isExhausted, list.totalHint
185
+ ```
186
+
170
187
  A relevant burst refreshes the loaded pages once, using the existing
171
188
  `refreshQuery` protection against overlapping loads. Multiple pages are read
172
189
  again together so offset pagination stays consistent after inserts/deletes.