@springbrand/chat-client 0.1.3-alpha.21 → 0.1.3-alpha.22
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springbrand/chat-client",
|
|
3
|
-
"version": "0.1.3-alpha.
|
|
3
|
+
"version": "0.1.3-alpha.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/react-dom": "^19.2.3",
|
|
26
26
|
"react-dom": "^19.2.7",
|
|
27
27
|
"typescript": "^7.0.2",
|
|
28
|
-
"@springbrand/agent-runtime": "0.2.0-alpha.
|
|
28
|
+
"@springbrand/agent-runtime": "0.2.0-alpha.30"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"typecheck": "tsc --noEmit"
|
|
@@ -33,6 +33,7 @@ import { CURRENT_INBOX_AGENT_PATH } from "./chat-sessions";
|
|
|
33
33
|
type ChatMessageMetadata = Record<string, unknown> & {
|
|
34
34
|
error?: string;
|
|
35
35
|
requestedCapabilities?: readonly RequestedCapability[];
|
|
36
|
+
turnId?: string;
|
|
36
37
|
turnStatus?: string;
|
|
37
38
|
};
|
|
38
39
|
type ChatMessage = UIMessage<ChatMessageMetadata>;
|
|
@@ -174,6 +175,7 @@ type SharedChatConnectionOptions = {
|
|
|
174
175
|
host?: string;
|
|
175
176
|
credentials?: RequestCredentials;
|
|
176
177
|
protocols?: string | string[];
|
|
178
|
+
onMessage?: (message: MessageEvent) => void;
|
|
177
179
|
inboxAgent?: string;
|
|
178
180
|
sessionAgent?: string;
|
|
179
181
|
/** Host projection used only until the selected Session sends its first state. */
|
|
@@ -213,6 +215,7 @@ export function UniversalAgentChatProvider({
|
|
|
213
215
|
: { name: connection.inboxName }),
|
|
214
216
|
...(connection.host === undefined ? {} : { host: connection.host }),
|
|
215
217
|
...(connection.protocols === undefined ? {} : { protocols: connection.protocols }),
|
|
218
|
+
...(connection.onMessage === undefined ? {} : { onMessage: connection.onMessage }),
|
|
216
219
|
connectionTimeout: 6_000,
|
|
217
220
|
sub: [{
|
|
218
221
|
agent: connection.sessionAgent ?? "UniversalAgent",
|