@kaltura-sdk/avatars 1.14.0 → 1.14.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/index.esm.js +18 -17
- package/package.json +2 -2
- package/src/lib/avatar-client-manager/machines/avatar-connection/actors/on-agent-client-tool-call.d.ts +2 -0
- package/src/lib/avatar-client-manager/machines/avatar-connection/avatar-connection-machine.d.ts +2 -0
- package/src/lib/avatar-client-manager/machines/avatar-connection/states/connected-state.d.ts +1 -0
- package/src/lib/avatar-client-manager/machines/avatar-connection/states/connected-states/genie-intellect-state.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnisphereLoggerFactory, TinyDataStore, TinyPubSub, performanceMonitor
|
|
1
|
+
import { UnisphereLoggerFactory, TinyDataStore, TinyPubSub, performanceMonitor } from '@unisphere/core';
|
|
2
2
|
import { getPartnerIdFromKs } from '@unisphere/runtime-js';
|
|
3
3
|
import { DisconnectReasons, getAvatarDefaultCapabilities, resolveActiveContextType, AvatarConnectionStatus } from '@unisphere/genie-types';
|
|
4
4
|
import { z as z$1 } from 'zod/mini';
|
|
@@ -6805,6 +6805,7 @@ const genieIntellectState = {
|
|
|
6805
6805
|
logger: context.logger,
|
|
6806
6806
|
getClientToolHandler: context.getClientToolHandler,
|
|
6807
6807
|
ks: context.externalInfo.kaltura.ks,
|
|
6808
|
+
clientToolResponseUrl: context.externalInfo.runtimeSettings.clientToolResponseUrl,
|
|
6808
6809
|
threadId: context.threadId
|
|
6809
6810
|
})
|
|
6810
6811
|
}
|
|
@@ -22597,11 +22598,10 @@ const resolveServerConfig = fromPromise(_a => __awaiter(void 0, [_a], void 0, fu
|
|
|
22597
22598
|
logger
|
|
22598
22599
|
} = input;
|
|
22599
22600
|
if (runtimeSettings.serverConfig === 'studio') {
|
|
22600
|
-
|
|
22601
|
-
|
|
22602
|
-
|
|
22603
|
-
|
|
22604
|
-
});
|
|
22601
|
+
if (!runtimeSettings.agenticServerUrl) {
|
|
22602
|
+
throw new Error('Studio mode requires runtimeSettings.agenticServerUrl to be set (the api.avatar service URL)');
|
|
22603
|
+
}
|
|
22604
|
+
const agenticServerUrl = runtimeSettings.agenticServerUrl;
|
|
22605
22605
|
logger.log('Studio mode: fetching server config from appInit');
|
|
22606
22606
|
const appInitRes = yield fetch(`${agenticServerUrl}/v1/application/appInit`, {
|
|
22607
22607
|
method: 'POST',
|
|
@@ -22881,10 +22881,6 @@ const onAgentClientToolCall = fromCallback(({
|
|
|
22881
22881
|
input,
|
|
22882
22882
|
sendBack
|
|
22883
22883
|
}) => {
|
|
22884
|
-
const genieServerUrl = environmentResolver.getKalturaServerUrl({
|
|
22885
|
-
serviceName: 'genie',
|
|
22886
|
-
type: 'microservice'
|
|
22887
|
-
});
|
|
22888
22884
|
return createTinyPubsubEventsHandler({
|
|
22889
22885
|
source: source$1,
|
|
22890
22886
|
logger: input.logger,
|
|
@@ -22948,13 +22944,18 @@ const onAgentClientToolCall = fromCallback(({
|
|
|
22948
22944
|
void executeClientToolCall({
|
|
22949
22945
|
toolMetadata,
|
|
22950
22946
|
getToolHandler: input.getClientToolHandler,
|
|
22951
|
-
sendToolResponse: (toolId, toolName, response) =>
|
|
22952
|
-
|
|
22953
|
-
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
|
|
22957
|
-
|
|
22947
|
+
sendToolResponse: (toolId, toolName, response) => {
|
|
22948
|
+
if (!input.clientToolResponseUrl) {
|
|
22949
|
+
return Promise.reject(new Error('Cannot send client tool call response: runtimeSettings.clientToolResponseUrl is not configured'));
|
|
22950
|
+
}
|
|
22951
|
+
return sendClientToolResponse({
|
|
22952
|
+
url: input.clientToolResponseUrl,
|
|
22953
|
+
ks: input.ks,
|
|
22954
|
+
toolId,
|
|
22955
|
+
toolName,
|
|
22956
|
+
response
|
|
22957
|
+
});
|
|
22958
|
+
},
|
|
22958
22959
|
logger: input.logger,
|
|
22959
22960
|
onCompleted: (toolName, waitForResponse) => {
|
|
22960
22961
|
sendBack({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaltura-sdk/avatars",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"author": "kaltura",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@kaltura-sdk/rtc-core": "^1.25.16",
|
|
14
14
|
"@local/genie-shared-utils": "^1.0.0",
|
|
15
15
|
"@unisphere/core": "^1.99.0",
|
|
16
|
-
"@unisphere/genie-types": "^1.39.
|
|
16
|
+
"@unisphere/genie-types": "^1.39.1",
|
|
17
17
|
"@unisphere/notifications-core": "^1.25.0",
|
|
18
18
|
"@unisphere/runtime": "^1.98.0",
|
|
19
19
|
"@unisphere/runtime-js": "^1.96.0",
|
|
@@ -4,6 +4,8 @@ type OnAgentClientToolCallInput = {
|
|
|
4
4
|
logger: UnisphereLoggerType;
|
|
5
5
|
getClientToolHandler: GetAvatarClientToolHandler;
|
|
6
6
|
ks: string;
|
|
7
|
+
/** Full URL to POST client-tool-call responses to — see `AvatarRuntimeSettings.clientToolResponseUrl`. Required for client tool calls to receive a response; if omitted, tool call responses fail with a `delivery-error`. */
|
|
8
|
+
clientToolResponseUrl?: string;
|
|
7
9
|
threadId: string | null;
|
|
8
10
|
};
|
|
9
11
|
export declare const onAgentClientToolCall: import("xstate").CallbackActorLogic<AgentClientToolCallCompletedEvent | AgentClientToolCallLoggedEvent, OnAgentClientToolCallInput, import("xstate").EventObject>;
|
package/src/lib/avatar-client-manager/machines/avatar-connection/avatar-connection-machine.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export declare const avatarConnectionMachine: import("xstate").StateMachine<Avat
|
|
|
75
75
|
logger: import("@unisphere/core").UnisphereLoggerType;
|
|
76
76
|
getClientToolHandler: import("dist/unisphere/packages/local/shared-utils/src").GetClientToolHandler;
|
|
77
77
|
ks: string;
|
|
78
|
+
clientToolResponseUrl?: string | undefined;
|
|
78
79
|
threadId: string | null;
|
|
79
80
|
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("./types").TapToTalkButtonShownEvent | import("./types").TapToTalkButtonHiddenEvent, {
|
|
80
81
|
logger: import("@unisphere/core").UnisphereLoggerType;
|
|
@@ -282,6 +283,7 @@ export declare const avatarConnectionMachine: import("xstate").StateMachine<Avat
|
|
|
282
283
|
logger: import("@unisphere/core").UnisphereLoggerType;
|
|
283
284
|
getClientToolHandler: import("dist/unisphere/packages/local/shared-utils/src").GetClientToolHandler;
|
|
284
285
|
ks: string;
|
|
286
|
+
clientToolResponseUrl?: string | undefined;
|
|
285
287
|
threadId: string | null;
|
|
286
288
|
}, import("xstate").EventObject>;
|
|
287
289
|
id: string | undefined;
|
package/src/lib/avatar-client-manager/machines/avatar-connection/states/connected-state.d.ts
CHANGED
|
@@ -562,6 +562,7 @@ export declare const connectedState: {
|
|
|
562
562
|
logger: import("@unisphere/core").UnisphereLoggerType;
|
|
563
563
|
getClientToolHandler: import("dist/unisphere/packages/local/shared-utils/src").GetClientToolHandler;
|
|
564
564
|
ks: string;
|
|
565
|
+
clientToolResponseUrl: string | undefined;
|
|
565
566
|
threadId: string | null;
|
|
566
567
|
};
|
|
567
568
|
};
|
|
@@ -21,6 +21,7 @@ export declare const genieIntellectState: {
|
|
|
21
21
|
logger: import("@unisphere/core").UnisphereLoggerType;
|
|
22
22
|
getClientToolHandler: import("dist/unisphere/packages/local/shared-utils/src").GetClientToolHandler;
|
|
23
23
|
ks: string;
|
|
24
|
+
clientToolResponseUrl: string | undefined;
|
|
24
25
|
threadId: string | null;
|
|
25
26
|
};
|
|
26
27
|
};
|