retell-sdk 5.13.0 → 5.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.
@@ -0,0 +1,395 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class Playground extends APIResource {
5
+ /**
6
+ * Stateless playground completion. Send the full conversation history (same shape
7
+ * as chat completion messages) and receive only the newly generated messages.
8
+ * Nothing is persisted server-side — the caller manages conversation state.
9
+ */
10
+ completion(agentID: string, params: PlaygroundCompletionParams, options?: RequestOptions): APIPromise<PlaygroundCompletionResponse>;
11
+ }
12
+ export interface PlaygroundCompletionResponse {
13
+ /**
14
+ * New messages generated by the agent. Same shape as chat completion response
15
+ * messages. Does not include the input messages.
16
+ */
17
+ messages: Array<PlaygroundCompletionResponse.MessageBase | PlaygroundCompletionResponse.ToolCallInvocationMessageBase | PlaygroundCompletionResponse.ToolCallResultMessageBase | PlaygroundCompletionResponse.NodeTransitionMessageBase | PlaygroundCompletionResponse.StateTransitionMessageBase>;
18
+ /**
19
+ * Whether the agent ended the conversation.
20
+ */
21
+ call_ended?: boolean;
22
+ /**
23
+ * Current node id (conversation-flow agents).
24
+ */
25
+ current_node_id?: string;
26
+ /**
27
+ * Current state name (retell-llm agents).
28
+ */
29
+ current_state?: string;
30
+ /**
31
+ * Updated dynamic variables after this turn.
32
+ */
33
+ dynamic_variables?: {
34
+ [key: string]: string;
35
+ };
36
+ /**
37
+ * Knowledge base chunks retrieved for this turn.
38
+ */
39
+ knowledge_base_retrieved_contents?: Array<string>;
40
+ }
41
+ export declare namespace PlaygroundCompletionResponse {
42
+ interface MessageBase {
43
+ /**
44
+ * Content of the message
45
+ */
46
+ content: string;
47
+ /**
48
+ * Documents whether this message is sent by agent or user.
49
+ */
50
+ role: 'agent' | 'user';
51
+ /**
52
+ * Create timestamp of the message
53
+ */
54
+ created_timestamp?: number;
55
+ /**
56
+ * Unique id of the message
57
+ */
58
+ message_id?: string;
59
+ }
60
+ interface ToolCallInvocationMessageBase {
61
+ /**
62
+ * Arguments for this tool call, it's a stringified JSON object.
63
+ */
64
+ arguments: string;
65
+ /**
66
+ * Name of the function in this tool call.
67
+ */
68
+ name: string;
69
+ /**
70
+ * This is a tool call invocation.
71
+ */
72
+ role: 'tool_call_invocation';
73
+ /**
74
+ * Tool call id, globally unique.
75
+ */
76
+ tool_call_id: string;
77
+ /**
78
+ * Create timestamp of the message
79
+ */
80
+ created_timestamp?: number;
81
+ /**
82
+ * Unique id of the message
83
+ */
84
+ message_id?: string;
85
+ /**
86
+ * Optional thought signature from Google Gemini thinking models. This is used
87
+ * internally to maintain reasoning chain in multi-turn function calling.
88
+ */
89
+ thought_signature?: string;
90
+ }
91
+ interface ToolCallResultMessageBase {
92
+ /**
93
+ * Result of the tool call, can be a string, a stringified json, etc.
94
+ */
95
+ content: string;
96
+ /**
97
+ * This is the result of a tool call.
98
+ */
99
+ role: 'tool_call_result';
100
+ /**
101
+ * Tool call id, globally unique.
102
+ */
103
+ tool_call_id: string;
104
+ /**
105
+ * Create timestamp of the message
106
+ */
107
+ created_timestamp?: number;
108
+ /**
109
+ * Unique id of the message
110
+ */
111
+ message_id?: string;
112
+ /**
113
+ * Whether the tool call was successful.
114
+ */
115
+ successful?: boolean;
116
+ }
117
+ interface NodeTransitionMessageBase {
118
+ /**
119
+ * This is a node transition.
120
+ */
121
+ role: 'node_transition';
122
+ /**
123
+ * Create timestamp of the message
124
+ */
125
+ created_timestamp?: number;
126
+ /**
127
+ * Former node id
128
+ */
129
+ former_node_id?: string;
130
+ /**
131
+ * Former node name
132
+ */
133
+ former_node_name?: string;
134
+ /**
135
+ * Unique id of the message
136
+ */
137
+ message_id?: string;
138
+ /**
139
+ * New node id
140
+ */
141
+ new_node_id?: string;
142
+ /**
143
+ * New node name
144
+ */
145
+ new_node_name?: string;
146
+ /**
147
+ * How this node was reached. "global" means a global node transition,
148
+ * "global_go_back" means returning from a global node, "interrupt_go_back" means
149
+ * going back due to user interruption, and "normal" means a regular edge
150
+ * transition.
151
+ */
152
+ transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
153
+ }
154
+ interface StateTransitionMessageBase {
155
+ /**
156
+ * This is a state transition.
157
+ */
158
+ role: 'state_transition';
159
+ /**
160
+ * Create timestamp of the message
161
+ */
162
+ created_timestamp?: number;
163
+ /**
164
+ * Former state name
165
+ */
166
+ former_state_name?: string;
167
+ /**
168
+ * Unique id of the message
169
+ */
170
+ message_id?: string;
171
+ /**
172
+ * New state name
173
+ */
174
+ new_state_name?: string;
175
+ }
176
+ }
177
+ export interface PlaygroundCompletionParams {
178
+ /**
179
+ * Body param: Full conversation history, same shape as chat completion messages.
180
+ * message_id and created_timestamp are optional — server generates them if
181
+ * omitted.
182
+ */
183
+ messages: Array<PlaygroundCompletionParams.MessageBase | PlaygroundCompletionParams.ToolCallInvocationMessageBase | PlaygroundCompletionParams.ToolCallResultMessageBase | PlaygroundCompletionParams.NodeTransitionMessageBase | PlaygroundCompletionParams.StateTransitionMessageBase>;
184
+ /**
185
+ * Query param: Agent version to use. Defaults to latest.
186
+ */
187
+ version?: number;
188
+ /**
189
+ * Body param: Conversation flow component id. Required when current_node_id refers
190
+ * to a node within a component.
191
+ */
192
+ component_id?: string;
193
+ /**
194
+ * Body param: Current node id for conversation-flow agents. Used to resume from a
195
+ * specific node. Must be provided together with component_id when testing
196
+ * components.
197
+ */
198
+ current_node_id?: string;
199
+ /**
200
+ * Body param: Current state name for retell-llm agents. Used to resume from a
201
+ * specific state.
202
+ */
203
+ current_state?: string;
204
+ /**
205
+ * Body param: Key-value pairs for dynamic variable substitution.
206
+ */
207
+ dynamic_variables?: {
208
+ [key: string]: string;
209
+ };
210
+ /**
211
+ * Body param: Optional mock responses for tools. When provided, the agent uses
212
+ * these instead of executing real tool calls.
213
+ */
214
+ tool_mocks?: Array<PlaygroundCompletionParams.ToolMock>;
215
+ }
216
+ export declare namespace PlaygroundCompletionParams {
217
+ interface MessageBase {
218
+ /**
219
+ * Content of the message
220
+ */
221
+ content: string;
222
+ /**
223
+ * Documents whether this message is sent by agent or user.
224
+ */
225
+ role: 'agent' | 'user';
226
+ /**
227
+ * Create timestamp of the message
228
+ */
229
+ created_timestamp?: number;
230
+ /**
231
+ * Unique id of the message
232
+ */
233
+ message_id?: string;
234
+ }
235
+ interface ToolCallInvocationMessageBase {
236
+ /**
237
+ * Arguments for this tool call, it's a stringified JSON object.
238
+ */
239
+ arguments: string;
240
+ /**
241
+ * Name of the function in this tool call.
242
+ */
243
+ name: string;
244
+ /**
245
+ * This is a tool call invocation.
246
+ */
247
+ role: 'tool_call_invocation';
248
+ /**
249
+ * Tool call id, globally unique.
250
+ */
251
+ tool_call_id: string;
252
+ /**
253
+ * Create timestamp of the message
254
+ */
255
+ created_timestamp?: number;
256
+ /**
257
+ * Unique id of the message
258
+ */
259
+ message_id?: string;
260
+ /**
261
+ * Optional thought signature from Google Gemini thinking models. This is used
262
+ * internally to maintain reasoning chain in multi-turn function calling.
263
+ */
264
+ thought_signature?: string;
265
+ }
266
+ interface ToolCallResultMessageBase {
267
+ /**
268
+ * Result of the tool call, can be a string, a stringified json, etc.
269
+ */
270
+ content: string;
271
+ /**
272
+ * This is the result of a tool call.
273
+ */
274
+ role: 'tool_call_result';
275
+ /**
276
+ * Tool call id, globally unique.
277
+ */
278
+ tool_call_id: string;
279
+ /**
280
+ * Create timestamp of the message
281
+ */
282
+ created_timestamp?: number;
283
+ /**
284
+ * Unique id of the message
285
+ */
286
+ message_id?: string;
287
+ /**
288
+ * Whether the tool call was successful.
289
+ */
290
+ successful?: boolean;
291
+ }
292
+ interface NodeTransitionMessageBase {
293
+ /**
294
+ * This is a node transition.
295
+ */
296
+ role: 'node_transition';
297
+ /**
298
+ * Create timestamp of the message
299
+ */
300
+ created_timestamp?: number;
301
+ /**
302
+ * Former node id
303
+ */
304
+ former_node_id?: string;
305
+ /**
306
+ * Former node name
307
+ */
308
+ former_node_name?: string;
309
+ /**
310
+ * Unique id of the message
311
+ */
312
+ message_id?: string;
313
+ /**
314
+ * New node id
315
+ */
316
+ new_node_id?: string;
317
+ /**
318
+ * New node name
319
+ */
320
+ new_node_name?: string;
321
+ /**
322
+ * How this node was reached. "global" means a global node transition,
323
+ * "global_go_back" means returning from a global node, "interrupt_go_back" means
324
+ * going back due to user interruption, and "normal" means a regular edge
325
+ * transition.
326
+ */
327
+ transition_type?: 'global' | 'global_go_back' | 'interrupt_go_back' | 'normal';
328
+ }
329
+ interface StateTransitionMessageBase {
330
+ /**
331
+ * This is a state transition.
332
+ */
333
+ role: 'state_transition';
334
+ /**
335
+ * Create timestamp of the message
336
+ */
337
+ created_timestamp?: number;
338
+ /**
339
+ * Former state name
340
+ */
341
+ former_state_name?: string;
342
+ /**
343
+ * Unique id of the message
344
+ */
345
+ message_id?: string;
346
+ /**
347
+ * New state name
348
+ */
349
+ new_state_name?: string;
350
+ }
351
+ interface ToolMock {
352
+ /**
353
+ * Rule for matching tool calls
354
+ */
355
+ input_match_rule: ToolMock.Type | ToolMock.UnionMember1;
356
+ /**
357
+ * The output of the tool call that will be fed into the LLM. Should be a JSON
358
+ * string.
359
+ */
360
+ output: string;
361
+ /**
362
+ * Name of the tool to mock
363
+ */
364
+ tool_name: string;
365
+ /**
366
+ * For tool calls like transfer_call that require a boolean result. Optional for
367
+ * most tools.
368
+ */
369
+ result?: boolean | null;
370
+ }
371
+ namespace ToolMock {
372
+ interface Type {
373
+ /**
374
+ * Match any input of the tool
375
+ */
376
+ type: 'any';
377
+ }
378
+ interface UnionMember1 {
379
+ /**
380
+ * Arguments to match. Only provided fields will be checked
381
+ */
382
+ args: {
383
+ [key: string]: unknown;
384
+ };
385
+ /**
386
+ * Match only calls with specific arguments
387
+ */
388
+ type: 'partial_match';
389
+ }
390
+ }
391
+ }
392
+ export declare namespace Playground {
393
+ export { type PlaygroundCompletionResponse as PlaygroundCompletionResponse, type PlaygroundCompletionParams as PlaygroundCompletionParams, };
394
+ }
395
+ //# sourceMappingURL=playground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/resources/playground.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,UAAU,CACR,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAS5C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,QAAQ,EAAE,KAAK,CACX,4BAA4B,CAAC,WAAW,GACxC,4BAA4B,CAAC,6BAA6B,GAC1D,4BAA4B,CAAC,yBAAyB,GACtD,4BAA4B,CAAC,yBAAyB,GACtD,4BAA4B,CAAC,0BAA0B,CAC1D,CAAC;IAEF;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,iBAAiB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE9C;;OAEG;IACH,iCAAiC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACnD;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,WAAW;QAC1B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;QAEvB;;WAEG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,UAAiB,6BAA6B;QAC5C;;WAEG;QACH,SAAS,E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AQ,CAAC,YAAY,CAAC;QAExD;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACzB;IAED,UAAiB,QAAQ,CAAC;QACxB,UAAiB,IAAI;YACnB;;eAEG;YACH,IAAI,EAAE,KAAK,CAAC;SACb;QAED,UAAiB,YAAY;YAC3B;;eAEG;YACH,IAAI,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;aAAE,CAAC;YAEjC;;eAEG;YACH,IAAI,EAAE,eAAe,CAAC;SACvB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Playground = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ class Playground extends resource_1.APIResource {
8
+ /**
9
+ * Stateless playground completion. Send the full conversation history (same shape
10
+ * as chat completion messages) and receive only the newly generated messages.
11
+ * Nothing is persisted server-side — the caller manages conversation state.
12
+ */
13
+ completion(agentID, params, options) {
14
+ const { version, ...body } = params;
15
+ return this._client.post((0, path_1.path) `/agent-playground-completion/${agentID}`, {
16
+ query: { version },
17
+ body,
18
+ timeout: this._client._options.timeout ?? 300000,
19
+ ...options,
20
+ });
21
+ }
22
+ }
23
+ exports.Playground = Playground;
24
+ //# sourceMappingURL=playground.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground.js","sourceRoot":"","sources":["../src/resources/playground.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;OAIG;IACH,UAAU,CACR,OAAe,EACf,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gCAAgC,OAAO,EAAE,EAAE;YACtE,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,gCAmBC"}
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ export class Playground extends APIResource {
5
+ /**
6
+ * Stateless playground completion. Send the full conversation history (same shape
7
+ * as chat completion messages) and receive only the newly generated messages.
8
+ * Nothing is persisted server-side — the caller manages conversation state.
9
+ */
10
+ completion(agentID, params, options) {
11
+ const { version, ...body } = params;
12
+ return this._client.post(path `/agent-playground-completion/${agentID}`, {
13
+ query: { version },
14
+ body,
15
+ timeout: this._client._options.timeout ?? 300000,
16
+ ...options,
17
+ });
18
+ }
19
+ }
20
+ //# sourceMappingURL=playground.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground.mjs","sourceRoot":"","sources":["../src/resources/playground.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,UAAU,CACR,OAAe,EACf,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gCAAgC,OAAO,EAAE,EAAE;YACtE,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,IAAI;YACJ,OAAO,EAAG,IAAI,CAAC,OAAe,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;YACzD,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -110,6 +110,7 @@ import {
110
110
  PhoneNumberResponse,
111
111
  PhoneNumberUpdateParams,
112
112
  } from './resources/phone-number';
113
+ import { Playground, PlaygroundCompletionParams, PlaygroundCompletionResponse } from './resources/playground';
113
114
  import {
114
115
  BatchTestResponse,
115
116
  TestCaseDefinitionResponse,
@@ -849,6 +850,7 @@ export class Retell {
849
850
  concurrency: API.Concurrency = new API.Concurrency(this);
850
851
  batchCall: API.BatchCall = new API.BatchCall(this);
851
852
  tests: API.Tests = new API.Tests(this);
853
+ playground: API.Playground = new API.Playground(this);
852
854
  mcpTool: API.McpTool = new API.McpTool(this);
853
855
  }
854
856
 
@@ -865,6 +867,7 @@ Retell.Voice = Voice;
865
867
  Retell.Concurrency = Concurrency;
866
868
  Retell.BatchCall = BatchCall;
867
869
  Retell.Tests = Tests;
870
+ Retell.Playground = Playground;
868
871
  Retell.McpTool = McpTool;
869
872
 
870
873
  export declare namespace Retell {
@@ -996,6 +999,12 @@ export declare namespace Retell {
996
999
  type TestUpdateTestCaseDefinitionParams as TestUpdateTestCaseDefinitionParams,
997
1000
  };
998
1001
 
1002
+ export {
1003
+ Playground as Playground,
1004
+ type PlaygroundCompletionResponse as PlaygroundCompletionResponse,
1005
+ type PlaygroundCompletionParams as PlaygroundCompletionParams,
1006
+ };
1007
+
999
1008
  export {
1000
1009
  McpTool as McpTool,
1001
1010
  type McpToolDefinition as McpToolDefinition,
@@ -92,6 +92,7 @@ export {
92
92
  type PhoneNumberUpdateParams,
93
93
  type PhoneNumberImportParams,
94
94
  } from './phone-number';
95
+ export { Playground, type PlaygroundCompletionResponse, type PlaygroundCompletionParams } from './playground';
95
96
  export {
96
97
  Tests,
97
98
  type BatchTestResponse,