@d-id/client-sdk 1.1.57 → 1.1.58
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/dist/index.js +767 -740
- package/dist/index.umd.cjs +7 -7
- package/dist/src/services/streaming-manager/common.d.ts +9 -2
- package/dist/src/types/entities/agents/manager.d.ts +13 -5
- package/dist/src/types/stream/rtc.d.ts +0 -1
- package/dist/src/types/stream/stream.d.ts +1 -0
- package/dist/src/types/stream/streams-v2.d.ts +1 -0
- package/dist/src/utils/analytics.d.ts +1 -1
- package/package.json +1 -1
|
@@ -72,7 +72,14 @@ export type StreamingManager<T extends CreateStreamOptions | CreateSessionV2Opti
|
|
|
72
72
|
*/
|
|
73
73
|
isInterruptible: boolean;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Register an RPC method handler on the LiveKit room.
|
|
76
|
+
* Used internally by the agent-manager for client tool delegation.
|
|
77
|
+
* supported only for livekit manager
|
|
78
|
+
*/
|
|
79
|
+
registerRpcMethod?(method: string, handler: (data: any) => Promise<string>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Unregister a previously registered RPC method.
|
|
82
|
+
* supported only for livekit manager
|
|
76
83
|
*/
|
|
77
|
-
|
|
84
|
+
unregisterRpcMethod?(method: string): void;
|
|
78
85
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { STTTokenResponse } from '../..';
|
|
2
2
|
import { Auth } from '../../auth';
|
|
3
|
-
import { AgentActivityState, CompatibilityMode, ConnectionState, ConnectivityState, SendStreamPayloadResponse, StreamEvents, StreamType, StreamingState, ToolCallingPayload, ToolResultPayload } from '../../stream';
|
|
3
|
+
import { AgentActivityState, ClientToolHandler, CompatibilityMode, ConnectionState, ConnectivityState, SendStreamPayloadResponse, StreamEvents, StreamType, StreamingState, ToolCallingPayload, ToolResultPayload } from '../../stream';
|
|
4
4
|
import { SupportedStreamScript } from '../../stream-script';
|
|
5
5
|
import { ManagerCallbacks as StreamManagerCallbacks } from '../../stream/stream';
|
|
6
6
|
import { Agent } from './agent';
|
|
@@ -169,10 +169,6 @@ export interface AgentManager {
|
|
|
169
169
|
* Get if the stream supports interrupt
|
|
170
170
|
*/
|
|
171
171
|
getIsInterruptAvailable: () => boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Get if the stream supports triggers
|
|
174
|
-
*/
|
|
175
|
-
getIsTriggersAvailable: () => boolean;
|
|
176
172
|
/**
|
|
177
173
|
* Array of starter messages that will be sent to the agent when the chat starts
|
|
178
174
|
*/
|
|
@@ -256,5 +252,17 @@ export interface AgentManager {
|
|
|
256
252
|
* Only available for Fluent streams and when there's an active video to interrupt
|
|
257
253
|
*/
|
|
258
254
|
interrupt: (interrupt: Interrupt) => void;
|
|
255
|
+
/**
|
|
256
|
+
* Register a handler for a client tool. When the agent's LLM calls this tool,
|
|
257
|
+
* the handler executes on the client and returns the result to the LLM.
|
|
258
|
+
* @param name - Tool name (must match the tool name defined in the agent config)
|
|
259
|
+
* @param handler - Async function receiving args, must return a JSON string (max 15KiB)
|
|
260
|
+
*/
|
|
261
|
+
registerClientTool: (name: string, handler: ClientToolHandler) => void;
|
|
262
|
+
/**
|
|
263
|
+
* Remove a previously registered client tool handler.
|
|
264
|
+
* @param name - Tool name to unregister
|
|
265
|
+
*/
|
|
266
|
+
unregisterClientTool: (name: string) => void;
|
|
259
267
|
}
|
|
260
268
|
export {};
|
|
@@ -157,6 +157,7 @@ export interface StreamInterruptPayload {
|
|
|
157
157
|
videoId: string;
|
|
158
158
|
timestamp: number;
|
|
159
159
|
}
|
|
160
|
+
export type ClientToolHandler = (args: Record<string, unknown>) => Promise<string>;
|
|
160
161
|
export interface ToolCallingPayload {
|
|
161
162
|
execution_id: string;
|
|
162
163
|
tool_name: string;
|
|
@@ -30,7 +30,7 @@ export declare function getAgentInfo(agent: Agent): {
|
|
|
30
30
|
maxResponseLength: number | undefined;
|
|
31
31
|
agentId: string;
|
|
32
32
|
access: "public" | "private" | "rejected" | "pending-public" | "unlisted" | undefined;
|
|
33
|
-
|
|
33
|
+
agentName: string | undefined;
|
|
34
34
|
};
|
|
35
35
|
export declare const sumFunc: (numbers: number[]) => number;
|
|
36
36
|
export declare const average: (numbers: number[]) => number;
|