@ai4b-team/fsaos-gateway-sdk 3.41.0 → 4.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
@@ -76,23 +76,23 @@ Plain HTML can use the same contract without loading the SDK:
76
76
  ### Query Key Factory
77
77
  - `vfsKeys` — Deterministic query keys for all VFS data
78
78
 
79
- ### Channel AI Auto-Response Policy
79
+ ### Channel Room Modes
80
80
 
81
- Channels contain principals as members. AI is represented as a principal/member, not as a separate channel type. The SDK exposes channel policy through `Channel.aiMode`, which is now binary:
81
+ Channels contain principals as members. AI is represented as a principal/member, not as a separate channel type. The SDK exposes the room mode through `Channel.aiMode` (Agent System Master Spec D17; kernel revision `b7c4d2a9e1f3`, 2026-10-29):
82
82
 
83
83
  | `Channel.aiMode` | Meaning |
84
84
  |------------------|---------|
85
- | `"on"` | AI auto-response is enabled for the channel. |
86
- | `"off"` | AI does not auto-respond; if an AI principal is a member, it must be explicitly invoked or addressed like any other member. |
85
+ | `"open"` | The floor decision runs on every message; whoever it names answers. |
86
+ | `"active"` | Only the on-duty agents answer a person (`Channel.activeAgentIds`; absent = every agent seated in the channel). An agent's message wakes another agent by mention only. |
87
+ | `"strict"` | Mention or named recipient only. |
88
+ | `"hand_raise"` | The floor decision runs on a person's message but nobody is woken; its answer arrives as the `conversation.hands_raised` event (`subscribeToEvents`) and the person picks who speaks, an explicit-recipient send. |
87
89
 
88
- During the backend migration, the channel normalizer accepts legacy backend values and exposes the binary SDK contract to consumers:
90
+ Mentions, a named recipient and `trigger_ai` answer in every mode. The kernel stores exactly these four values (`CHANNEL_AI_MODES`) and refuses any other at `create-channel` (`CHANNEL_AI_MODE_INVALID`); the legacy `on`/`off` rows were rewritten `on → active`, `off → strict`. A row the kernel has not rewritten is read the same way:
89
91
 
90
92
  | Legacy/backend value | SDK value |
91
93
  |----------------------|-----------|
92
- | `"auto"` | `"on"` |
93
- | `"mention"` | `"off"` |
94
- | `"off"` | `"off"` |
95
- | missing or unknown | `"off"` |
94
+ | `"on"`, `"auto"` | `"active"` |
95
+ | `"off"`, `"mention"`, missing or unknown | `"strict"` |
96
96
 
97
97
  The SDK does not decide when AI should respond, spawn agents, or infer agent identity. It forwards gateway calls and normalizes read models; the kernel owns channel policy and message-trigger behavior.
98
98
 
@@ -209,7 +209,7 @@ reconciles the remaining count. No background polling is used.
209
209
  |------|-------------|
210
210
  | `useChannelMessages(opts)` | Channel messages + bundled cards |
211
211
  | `useInfiniteChannelMessages(opts)` | Cursor-paginated messages (live tail) |
212
- | `useAllChannels()` / `useChannels()` / `useDmChannels()` | Channel lists (all / public / DM) |
212
+ | `useAllChannels()` / `useChannels()` / `useDmChannels()` | Channel lists (all / public / DM); archived channels only with `{ includeArchived: true }` |
213
213
  | `usePersonalItemOrder('channel-order' \| 'project-order', items)` | Apply and save the selected Space member's personal order through existing arrangements. |
214
214
  | `useNotifications(opts?)` | Notifications feed |
215
215
  | `useUnreadCounts(opts?)` | Aggregated unread counts |