@ai4b-team/fsaos-gateway-sdk 5.5.2 → 5.6.1
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 +35 -0
- 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 +155 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +285 -1
- package/dist/index.d.ts +285 -1
- package/dist/index.js +152 -2
- 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
|
@@ -112,6 +112,32 @@ A chat created with `member_ids` is born `auto_thread: false` (messages happen i
|
|
|
112
112
|
|
|
113
113
|
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.
|
|
114
114
|
|
|
115
|
+
### Explicit message replies (UI-independent)
|
|
116
|
+
|
|
117
|
+
`sendMessage` accepts an optional `reply_to_message_id` only when the caller explicitly chooses a message to answer. `parent_message_id` still identifies the containing thread. An ordinary send omits the reply target. Neither call navigates, opens a panel, creates a subscription, polls, or selects another conversation.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { sendMessage, fetchMessageReplyContexts, fetchMessageReplies } from '@ai4b-team/fsaos-gateway-sdk';
|
|
121
|
+
|
|
122
|
+
const receipt = await sendMessage({
|
|
123
|
+
channel_path: channelPath,
|
|
124
|
+
parent_message_id: threadId, // omit when working in the channel feed
|
|
125
|
+
reply_to_message_id: selectedMessageId,
|
|
126
|
+
message: 'Yes, use those numbers.',
|
|
127
|
+
client_request_id: intentId, // reuse this identity when reconciling an uncertain send
|
|
128
|
+
});
|
|
129
|
+
// A queued receipt identifies the intent; the message exists only after promotion.
|
|
130
|
+
|
|
131
|
+
const previews = await fetchMessageReplyContexts(messageIds); // at most 200 distinct IDs
|
|
132
|
+
const page = await fetchMessageReplies(selectedMessageId, { limit: 25 });
|
|
133
|
+
// For another page, explicitly pass page.next_cursor. A filtered page can be empty
|
|
134
|
+
// and still have a next cursor; there is no automatic fetch loop.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
All channel-history readers also expose `ChannelMessage.reply_to` when a contextual relationship exists. Its value is either `{state: 'available', message_id, path, excerpt, truncated, ...}` or `{state: 'unavailable'}` without target identity or text. The kernel checks current permissions; a preview is not a permanent authorization grant. Normal messages have no `reply_to`. `reply_count` keeps its existing meaning (children in a thread), separate from contextual replies.
|
|
138
|
+
|
|
139
|
+
Requires kernel revision `8d70d42e02c2`. Explicit sends use the `reply-message` door, which delegates to native `send-message`; an older kernel refuses the unsupported call instead of dropping the reply intent. The SDK never retries a send as an ordinary message. Relationship creation and queue admission are atomic kernel operations, and existing CCM deletion rules apply. These exports provide data and operations for any UI; they do not prescribe a reply layout.
|
|
140
|
+
|
|
115
141
|
### Members, Seats and Agents
|
|
116
142
|
|
|
117
143
|
The typed surface of the membership doors (Agent System Master Spec D13–D21). Each function forwards one gateway call with the exact params the kernel reads and returns its receipt; the hooks (`useInviteMember`, `useAcceptInvite`, `useSeatMember`, `useCreateAgent`, `useAnswerInput`) wrap the same calls with the cache invalidation each needs.
|
|
@@ -467,3 +493,12 @@ time. `onTiming` reports only method, priority, queue/request duration and outco
|
|
|
467
493
|
Commands, writes, materializing queries and subscriptions bypass the queue. The
|
|
468
494
|
scheduler never retries a request; retry/cooldown policy remains with the host's
|
|
469
495
|
existing QueryClient. Without configuration, transport behavior is unchanged.
|
|
496
|
+
|
|
497
|
+
`useMessageReplies({ channelPath, messageId, conversationRootId, enabled })` is the
|
|
498
|
+
optional React reader for an opened reply view. `conversationRootId` is the
|
|
499
|
+
containing thread (omit for the channel), including when replying to that thread's
|
|
500
|
+
root. It shares the SDK query cache and existing scope event stream, coalesces
|
|
501
|
+
relevant edge/message changes and releases its watcher on close. It never polls.
|
|
502
|
+
`fetchNextPage()` is explicit, including when an authorization-filtered page is
|
|
503
|
+
empty but has another cursor. Mounting one reader per closed message is unnecessary:
|
|
504
|
+
use the already-loaded history's `reply_to` projection for summaries.
|