@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.
@@ -72,7 +72,14 @@ export type StreamingManager<T extends CreateStreamOptions | CreateSessionV2Opti
72
72
  */
73
73
  isInterruptible: boolean;
74
74
  /**
75
- * Whether triggers functionality is available for this stream
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
- triggersAvailable: boolean;
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 {};
@@ -35,7 +35,6 @@ export interface ICreateStreamRequestResponse extends StickyRequest {
35
35
  ice_servers: IceServer[];
36
36
  fluent?: boolean;
37
37
  interrupt_enabled?: boolean;
38
- triggers_enabled?: boolean;
39
38
  }
40
39
  export interface IceCandidate {
41
40
  /**
@@ -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;
@@ -11,4 +11,5 @@ export interface CreateSessionV2Response {
11
11
  id: string;
12
12
  session_url: string;
13
13
  session_token: string;
14
+ interrupt_enabled: boolean;
14
15
  }
@@ -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
- name: string | undefined;
33
+ agentName: string | undefined;
34
34
  };
35
35
  export declare const sumFunc: (numbers: number[]) => number;
36
36
  export declare const average: (numbers: number[]) => number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d-id/client-sdk",
3
3
  "private": false,
4
- "version": "1.1.57",
4
+ "version": "1.1.58",
5
5
  "type": "module",
6
6
  "description": "d-id client sdk",
7
7
  "repository": {