@meshagent/meshagent-agents 0.47.0 → 0.48.0

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.
@@ -1,6 +1,6 @@
1
- import { type AgentInputContent } from "@meshagent/meshagent";
1
+ import { type Content } from "@meshagent/meshagent";
2
2
  export type AgentPayload = Record<string, unknown>;
3
- export type JsonMap = Record<string, any>;
3
+ type JsonMap = Record<string, any>;
4
4
  export declare const agentRoomMessageType = "agent-message";
5
5
  export declare const agentTurnStartType = "meshagent.agent.turn.start";
6
6
  export declare const agentTurnSteerType = "meshagent.agent.turn.steer";
@@ -14,6 +14,7 @@ export declare const agentThreadLoadedType = "meshagent.agent.thread.loaded";
14
14
  export declare const agentThreadStartRejectedType = "meshagent.agent.thread.start.rejected";
15
15
  export declare const agentThreadOpenType = "meshagent.agent.thread.open";
16
16
  export declare const agentThreadCloseType = "meshagent.agent.thread.close";
17
+ export declare const agentMessagesInjectType = "meshagent.agent.messages.inject";
17
18
  export declare const agentParticipantConnectType = "meshagent.agent.participant.connect";
18
19
  export declare const agentParticipantDisconnectType = "meshagent.agent.participant.disconnect";
19
20
  export declare const agentThreadDeleteType = "meshagent.agent.thread.delete";
@@ -83,16 +84,38 @@ export declare const agentToolApproveType = "meshagent.agent.tool_call.approve";
83
84
  export declare const agentToolRejectType = "meshagent.agent.tool_call.reject";
84
85
  export declare const agentSecretResponseType = "meshagent.agent.secret.response";
85
86
  export declare const agentClientToolCallResponseType = "meshagent.agent.client_tool_call.response";
87
+ type AgentTextInputContent = {
88
+ type: "text";
89
+ text: string;
90
+ };
91
+ type AgentInputContent = AgentTextInputContent | AgentFileContent;
92
+ export declare class AgentFileContent {
93
+ readonly type: "file";
94
+ readonly url: string;
95
+ readonly name?: string;
96
+ constructor({ url, name }: {
97
+ url: string;
98
+ name?: string;
99
+ });
100
+ static fromJson(json: JsonMap): AgentFileContent;
101
+ toJson(): JsonMap;
102
+ formatWith(values: Record<string, string>): AgentFileContent;
103
+ }
86
104
  export declare class ToolChoice {
87
105
  readonly toolkitName: string;
88
106
  readonly toolName: string;
89
- constructor({ toolkitName, toolName, toolkit_name, tool_name }: JsonMap);
107
+ constructor({ toolkitName, toolName }: {
108
+ toolkitName: string;
109
+ toolName: string;
110
+ });
90
111
  static fromJson(json: JsonMap): ToolChoice;
91
112
  toJson(): JsonMap;
92
113
  }
93
114
  export declare class TurnMcpConfig {
94
115
  readonly servers: JsonMap[];
95
- constructor({ servers }?: JsonMap);
116
+ constructor({ servers }?: {
117
+ servers?: JsonMap[];
118
+ });
96
119
  static fromJson(json: JsonMap): TurnMcpConfig;
97
120
  toJson(): JsonMap;
98
121
  }
@@ -101,13 +124,20 @@ export declare class ClientToolkitDescription {
101
124
  readonly title?: string;
102
125
  readonly description?: string;
103
126
  readonly inputSchema: JsonMap;
104
- constructor({ name, title, description, inputSchema, input_schema }: JsonMap);
127
+ constructor({ name, title, description, inputSchema }: {
128
+ name: string;
129
+ title?: string;
130
+ description?: string;
131
+ inputSchema: JsonMap;
132
+ });
105
133
  static fromJson(json: JsonMap): ClientToolkitDescription;
106
134
  toJson(): JsonMap;
107
135
  }
108
136
  export declare class TurnToolkitConfig {
109
137
  readonly clientOptions?: JsonMap;
110
- constructor({ clientOptions, client_options }?: JsonMap);
138
+ constructor({ clientOptions }?: {
139
+ clientOptions?: JsonMap;
140
+ });
111
141
  static fromJson(json: JsonMap): TurnToolkitConfig;
112
142
  toJson(): JsonMap;
113
143
  }
@@ -115,7 +145,11 @@ export declare class AgentAudioFormat {
115
145
  readonly type: string;
116
146
  readonly sampleRate?: number;
117
147
  readonly bitrate?: number;
118
- constructor({ type, sampleRate, sample_rate, bitrate }?: JsonMap);
148
+ constructor({ type, sampleRate, bitrate }?: {
149
+ type?: string;
150
+ sampleRate?: number | null;
151
+ bitrate?: number;
152
+ });
119
153
  static fromJson(json: JsonMap): AgentAudioFormat;
120
154
  toJson(): JsonMap;
121
155
  }
@@ -133,7 +167,11 @@ export declare class ToolkitToolCapabilities {
133
167
  readonly name: string;
134
168
  readonly title?: string;
135
169
  readonly description?: string;
136
- constructor({ name, title, description }: JsonMap);
170
+ constructor({ name, title, description }: {
171
+ name: string;
172
+ title?: string;
173
+ description?: string;
174
+ });
137
175
  static fromJson(json: JsonMap): ToolkitToolCapabilities;
138
176
  toJson(): JsonMap;
139
177
  }
@@ -141,12 +179,19 @@ export declare class ToolkitCapabilities {
141
179
  readonly name: string;
142
180
  readonly title?: string;
143
181
  readonly description?: string;
144
- readonly thumbnailUrl?: string;
145
182
  readonly rules: string[];
146
183
  readonly clientOptions?: JsonMap;
147
184
  readonly hidden: boolean;
148
185
  readonly tools: ToolkitToolCapabilities[];
149
- constructor(params: JsonMap);
186
+ constructor({ name, title, description, rules, clientOptions, hidden, tools }: {
187
+ name: string;
188
+ title?: string;
189
+ description?: string;
190
+ rules?: string[];
191
+ clientOptions?: JsonMap;
192
+ hidden?: boolean;
193
+ tools?: ToolkitToolCapabilities[];
194
+ });
150
195
  static fromJson(json: JsonMap): ToolkitCapabilities;
151
196
  toJson(): JsonMap;
152
197
  }
@@ -163,8 +208,26 @@ export declare class AgentModelInfo {
163
208
  readonly outputFormat?: AgentAudioFormat;
164
209
  readonly turnDetection?: string;
165
210
  readonly realtimeProtocols: string[];
211
+ readonly supportsAttachments: boolean;
212
+ readonly accepts: string[];
166
213
  readonly active: boolean;
167
- constructor(params: JsonMap);
214
+ constructor({ name, friendlyName, description, contextWindow, pricing, modalities, availableVoices, defaultOutputVoice, inputFormat, outputFormat, turnDetection, realtimeProtocols, supportsAttachments, accepts, active }: {
215
+ name: string;
216
+ friendlyName?: string;
217
+ description?: string;
218
+ contextWindow?: number;
219
+ pricing?: Record<string, number>;
220
+ modalities?: string[];
221
+ availableVoices?: string[];
222
+ defaultOutputVoice?: string;
223
+ inputFormat?: AgentAudioFormat;
224
+ outputFormat?: AgentAudioFormat;
225
+ turnDetection?: string;
226
+ realtimeProtocols?: string[];
227
+ supportsAttachments?: boolean;
228
+ accepts?: string[];
229
+ active?: boolean;
230
+ });
168
231
  static fromJson(json: JsonMap): AgentModelInfo;
169
232
  toJson(): JsonMap;
170
233
  }
@@ -175,7 +238,14 @@ export declare class AgentProviderInfo {
175
238
  readonly backend?: string;
176
239
  readonly defaultModel: string;
177
240
  readonly models: AgentModelInfo[];
178
- constructor(params: JsonMap);
241
+ constructor({ name, friendlyName, description, backend, defaultModel, models }: {
242
+ name: string;
243
+ friendlyName: string;
244
+ description?: string;
245
+ backend?: string;
246
+ defaultModel: string;
247
+ models?: AgentModelInfo[];
248
+ });
179
249
  static fromJson(json: JsonMap): AgentProviderInfo;
180
250
  toJson(): JsonMap;
181
251
  }
@@ -184,7 +254,12 @@ export declare class AgentThreadListEntry {
184
254
  readonly name: string;
185
255
  readonly createdAt: string;
186
256
  readonly modifiedAt: string;
187
- constructor(params: JsonMap);
257
+ constructor({ path, name, createdAt, modifiedAt }: {
258
+ path: string;
259
+ name: string;
260
+ createdAt: string;
261
+ modifiedAt: string;
262
+ });
188
263
  static fromJson(json: JsonMap): AgentThreadListEntry;
189
264
  toJson(): JsonMap;
190
265
  }
@@ -193,14 +268,22 @@ export declare class AgentRealtimeConnectionInfo {
193
268
  readonly url: string;
194
269
  readonly headers: Record<string, string>;
195
270
  readonly webOnlyProtocol?: string;
196
- constructor(params: JsonMap);
271
+ constructor({ protocol, url, headers, webOnlyProtocol }: {
272
+ protocol: string;
273
+ url: string;
274
+ headers?: Record<string, string>;
275
+ webOnlyProtocol?: string;
276
+ });
197
277
  static fromJson(json: JsonMap): AgentRealtimeConnectionInfo;
198
278
  toJson(): JsonMap;
199
279
  }
200
280
  export declare class AgentToolCallLogLine {
201
281
  readonly source: string;
202
282
  readonly text: string;
203
- constructor({ source, text }: JsonMap);
283
+ constructor({ source, text }: {
284
+ source: string;
285
+ text: string;
286
+ });
204
287
  static fromJson(json: JsonMap): AgentToolCallLogLine;
205
288
  toJson(): JsonMap;
206
289
  }
@@ -212,7 +295,15 @@ export declare class AgentGeneratedImage {
212
295
  readonly width?: number;
213
296
  readonly height?: number;
214
297
  readonly status?: string;
215
- constructor(params?: JsonMap);
298
+ constructor({ uri, mimeType, createdAt, createdBy, width, height, status }?: {
299
+ uri?: string;
300
+ mimeType?: string;
301
+ createdAt?: string;
302
+ createdBy?: string;
303
+ width?: number;
304
+ height?: number;
305
+ status?: string;
306
+ });
216
307
  static fromJson(json: JsonMap): AgentGeneratedImage;
217
308
  toJson(): JsonMap;
218
309
  }
@@ -223,7 +314,14 @@ export declare class AgentGeneratedAudio {
223
314
  readonly createdBy?: string;
224
315
  readonly status?: string;
225
316
  readonly transcript?: string;
226
- constructor(params?: JsonMap);
317
+ constructor({ uri, mimeType, createdAt, createdBy, status, transcript }?: {
318
+ uri?: string;
319
+ mimeType?: string;
320
+ createdAt?: string;
321
+ createdBy?: string;
322
+ status?: string;
323
+ transcript?: string;
324
+ });
227
325
  static fromJson(json: JsonMap): AgentGeneratedAudio;
228
326
  toJson(): JsonMap;
229
327
  }
@@ -232,16 +330,20 @@ export declare class AgentContextWindowUsage {
232
330
  readonly totalTokens?: number;
233
331
  readonly compactionMode?: string;
234
332
  readonly compactionThreshold?: number;
235
- constructor(params: JsonMap);
333
+ constructor({ usedTokens, totalTokens, compactionMode, compactionThreshold }: {
334
+ usedTokens: number;
335
+ totalTokens?: number;
336
+ compactionMode?: string;
337
+ compactionThreshold?: number;
338
+ });
236
339
  static fromJson(json: JsonMap): AgentContextWindowUsage;
237
340
  toJson(): JsonMap;
238
341
  }
239
342
  export declare abstract class AgentMessage {
240
- [key: string]: any;
241
343
  readonly type: string;
242
344
  readonly messageId: string;
243
345
  readonly senderName?: string;
244
- readonly createdAt: string;
346
+ readonly createdAtUtc: Date;
245
347
  readonly metadata: JsonMap;
246
348
  protected constructor({ type, messageId, message_id, senderName, sender_name, createdAt, created_at, metadata }: JsonMap);
247
349
  toJson(): JsonMap;
@@ -258,93 +360,1332 @@ export declare abstract class AgentLLMMessage extends AgentThreadMessage {
258
360
  protected constructor(params: JsonMap);
259
361
  toJson(): JsonMap;
260
362
  }
261
- type MessageCtor = {
262
- new (params?: JsonMap): AgentMessage;
263
- fromJson(json: JsonMap): AgentMessage;
264
- };
265
- export declare const StartThread: MessageCtor;
266
- export declare const TurnStart: MessageCtor;
267
- export declare const TurnSteer: MessageCtor;
268
- export declare const TurnInterrupt: MessageCtor;
269
- export declare const AgentRealtimeAudioChunk: MessageCtor;
270
- export declare const AgentRealtimeAudioCommit: MessageCtor;
271
- export declare const ClearThread: MessageCtor;
272
- export declare const OpenThread: MessageCtor;
273
- export declare const CloseThread: MessageCtor;
274
- export declare const ParticipantConnect: MessageCtor;
275
- export declare const ParticipantDisconnect: MessageCtor;
276
- export declare const DeleteThread: MessageCtor;
277
- export declare const RenameThread: MessageCtor;
278
- export declare const ListThreads: MessageCtor;
279
- export declare const WatchThreads: MessageCtor;
280
- export declare const UnwatchThreads: MessageCtor;
281
- export declare const ThreadsListed: MessageCtor;
282
- export declare const ThreadCreated: MessageCtor;
283
- export declare const ThreadUpdated: MessageCtor;
284
- export declare const ThreadDeleted: MessageCtor;
285
- export declare const CapabilitiesRequest: MessageCtor;
286
- export declare const CapabilitiesResponse: MessageCtor;
287
- export declare const ModelsRequest: MessageCtor;
288
- export declare const ModelsResponse: MessageCtor;
289
- export declare const ChangeModel: MessageCtor;
290
- export declare const AgentModelChanged: MessageCtor;
291
- export declare const ThreadCleared: MessageCtor;
292
- export declare const TurnStartAccepted: MessageCtor;
293
- export declare const TurnStartRejected: MessageCtor;
294
- export declare const TurnInterruptAccepted: MessageCtor;
295
- export declare const TurnInterrupted: MessageCtor;
296
- export declare const TurnSteerAccepted: MessageCtor;
297
- export declare const TurnSteered: MessageCtor;
298
- export declare const TurnSteerRejected: MessageCtor;
299
- export declare const TurnStarted: MessageCtor;
300
- export declare const TurnEnded: MessageCtor;
301
- export declare const ThreadStarted: MessageCtor;
302
- export declare const ThreadLoaded: MessageCtor;
303
- export declare const ThreadStartRejected: MessageCtor;
304
- export declare const AgentReasoningContentStarted: MessageCtor;
305
- export declare const AgentReasoningContentDelta: MessageCtor;
306
- export declare const AgentReasoningContentEnded: MessageCtor;
307
- export declare const AgentTextContentStarted: MessageCtor;
308
- export declare const AgentTextContentDelta: MessageCtor;
309
- export declare const AgentTextContentEnded: MessageCtor;
310
- export declare const AgentFileContentStarted: MessageCtor;
311
- export declare const AgentFileContentDelta: MessageCtor;
312
- export declare const AgentFileContentEnded: MessageCtor;
313
- export declare const AgentToolCallPending: MessageCtor;
314
- export declare const AgentToolCallInProgress: MessageCtor;
315
- export declare const AgentToolCallStarted: MessageCtor;
316
- export declare const AgentToolCallArgumentsDelta: MessageCtor;
317
- export declare const AgentToolCallLogDelta: MessageCtor;
318
- export declare const AgentToolCallEnded: MessageCtor;
319
- export declare const AgentToolCallApprovalRequested: MessageCtor;
320
- export declare const AgentSecretRequested: MessageCtor;
321
- export declare const AgentClientToolCallRequested: MessageCtor;
322
- export declare const AgentClientToolCallCancelled: MessageCtor;
323
- export declare const AgentThreadStatus: MessageCtor;
324
- export declare const AgentConnectionStatus: MessageCtor;
325
- export declare const AgentThreadEvent: MessageCtor;
326
- export declare const AgentImageGenerationStarted: MessageCtor;
327
- export declare const AgentImageGenerationPartial: MessageCtor;
328
- export declare const AgentImageGenerationCompleted: MessageCtor;
329
- export declare const AgentImageGenerationFailed: MessageCtor;
330
- export declare const AgentAudioGenerationStarted: MessageCtor;
331
- export declare const AgentAudioGenerationDelta: MessageCtor;
332
- export declare const AgentAudioGenerationCompleted: MessageCtor;
333
- export declare const AgentAudioGenerationFailed: MessageCtor;
334
- export declare const AgentAudioTranscriptionStarted: MessageCtor;
335
- export declare const AgentAudioTranscriptionDelta: MessageCtor;
336
- export declare const AgentAudioTranscriptionCompleted: MessageCtor;
337
- export declare const AgentAudioTranscriptionFailed: MessageCtor;
338
- export declare const AgentAudioInputSpeechStarted: MessageCtor;
339
- export declare const AgentAudioInputSpeechEnded: MessageCtor;
340
- export declare const AgentContextCompacted: MessageCtor;
341
- export declare const AgentUsageUpdated: MessageCtor;
342
- export declare const ApproveAgentToolCall: MessageCtor;
343
- export declare const RejectAgentToolCall: MessageCtor;
344
- export declare const AgentSecretResponse: MessageCtor;
345
- export declare const AgentClientToolCallResponse: MessageCtor;
346
- export declare function agentInputContent({ text, attachments }: {
363
+ type MessageCtor<T extends AgentMessage, Arguments extends JsonMap, Optional extends boolean> = (Optional extends true ? {
364
+ new (params?: Arguments): T;
365
+ } : {
366
+ new (params: Arguments): T;
367
+ }) & {
368
+ fromJson(json: JsonMap): T;
369
+ };
370
+ export interface StartThread extends AgentMessage {
371
+ readonly content?: AgentInputContent[];
372
+ readonly name?: string;
373
+ readonly realtimeProtocol?: string;
374
+ readonly provider?: string;
375
+ readonly backend?: string;
376
+ readonly model?: string;
377
+ readonly voice?: string;
378
+ readonly outputModalities?: string[];
379
+ readonly instructions?: string;
380
+ readonly mcp?: TurnMcpConfig;
381
+ readonly clientToolkits?: ClientToolkitDescription[];
382
+ readonly toolkits?: Record<string, TurnToolkitConfig>;
383
+ readonly toolChoice?: ToolChoice;
384
+ }
385
+ type StartThreadArguments = {
386
+ messageId?: string;
387
+ senderName?: string;
388
+ content?: AgentInputContent[];
389
+ name?: string;
390
+ realtimeProtocol?: string;
391
+ backend?: string;
392
+ provider?: string;
393
+ model?: string;
394
+ voice?: string;
395
+ outputModalities?: string[];
396
+ instructions?: string;
397
+ mcp?: TurnMcpConfig;
398
+ clientToolkits?: ClientToolkitDescription[];
399
+ toolkits?: Record<string, TurnToolkitConfig>;
400
+ toolChoice?: ToolChoice;
401
+ };
402
+ export interface TurnStart extends AgentThreadMessage {
403
+ readonly turnId?: string;
404
+ readonly content: AgentInputContent[];
405
+ readonly provider?: string;
406
+ readonly backend?: string;
407
+ readonly model?: string;
408
+ readonly voice?: string;
409
+ readonly outputModalities?: string[];
410
+ readonly instructions?: string;
411
+ readonly mcp?: TurnMcpConfig;
412
+ readonly clientToolkits?: ClientToolkitDescription[];
413
+ readonly toolkits?: Record<string, TurnToolkitConfig>;
414
+ readonly toolChoice?: ToolChoice;
415
+ }
416
+ type TurnStartArguments = {
417
+ threadId: string;
418
+ messageId?: string;
419
+ senderName?: string;
420
+ turnId?: string;
421
+ content?: AgentInputContent[];
422
+ backend?: string;
423
+ provider?: string;
424
+ model?: string;
425
+ voice?: string;
426
+ outputModalities?: string[];
427
+ instructions?: string;
428
+ mcp?: TurnMcpConfig;
429
+ clientToolkits?: ClientToolkitDescription[];
430
+ toolkits?: Record<string, TurnToolkitConfig>;
431
+ toolChoice?: ToolChoice;
432
+ };
433
+ export interface TurnSteer extends AgentThreadMessage {
434
+ readonly turnId: string;
435
+ readonly content: AgentInputContent[];
436
+ }
437
+ type TurnSteerArguments = {
438
+ threadId: string;
439
+ turnId: string;
440
+ content: AgentInputContent[];
441
+ messageId?: string;
442
+ senderName?: string;
443
+ };
444
+ export interface TurnInterrupt extends AgentThreadMessage {
445
+ readonly turnId: string;
446
+ }
447
+ type TurnInterruptArguments = {
448
+ threadId: string;
449
+ turnId: string;
450
+ messageId?: string;
451
+ senderName?: string;
452
+ };
453
+ export interface AgentRealtimeAudioChunk extends AgentThreadMessage {
454
+ readonly data: Uint8Array;
455
+ readonly format: AgentAudioFormat;
456
+ }
457
+ type AgentRealtimeAudioChunkArguments = {
458
+ threadId: string;
459
+ messageId?: string;
460
+ senderName?: string;
461
+ data?: Uint8Array;
462
+ format?: AgentAudioFormat;
463
+ };
464
+ export interface AgentRealtimeAudioCommit extends AgentThreadMessage {
465
+ readonly turnId?: string;
466
+ readonly text?: string;
467
+ readonly status?: string;
468
+ readonly transcriptionItemId?: string;
469
+ }
470
+ type AgentRealtimeAudioCommitArguments = {
471
+ threadId: string;
472
+ messageId?: string;
473
+ senderName?: string;
474
+ turnId?: string;
475
+ text?: string;
476
+ status?: string;
477
+ transcriptionItemId?: string;
478
+ };
479
+ export interface ClearThread extends AgentThreadMessage {
480
+ }
481
+ type ClearThreadArguments = {
482
+ threadId: string;
483
+ messageId?: string;
484
+ senderName?: string;
485
+ };
486
+ export interface OpenThread extends AgentThreadMessage {
487
+ readonly backend?: string;
488
+ readonly load?: boolean;
489
+ readonly sinceTurn?: string;
490
+ }
491
+ type OpenThreadArguments = {
492
+ threadId: string;
493
+ messageId?: string;
494
+ senderName?: string;
495
+ backend?: string;
496
+ load?: boolean;
497
+ sinceTurn?: string;
498
+ };
499
+ export interface CloseThread extends AgentThreadMessage {
500
+ }
501
+ type CloseThreadArguments = {
502
+ threadId: string;
503
+ messageId?: string;
504
+ senderName?: string;
505
+ };
506
+ export interface InjectMessages extends AgentThreadMessage {
507
+ readonly messages: AgentMessage[];
508
+ }
509
+ type InjectMessagesArguments = {
510
+ threadId: string;
511
+ messageId?: string;
512
+ senderName?: string;
513
+ messages?: AgentMessage[];
514
+ };
515
+ export interface ParticipantConnect extends AgentMessage {
516
+ readonly participantId: string;
517
+ }
518
+ type ParticipantConnectArguments = {
519
+ participantId: string;
520
+ messageId?: string;
521
+ senderName?: string;
522
+ };
523
+ export interface ParticipantDisconnect extends AgentMessage {
524
+ readonly participantId: string;
525
+ }
526
+ type ParticipantDisconnectArguments = {
527
+ participantId: string;
528
+ messageId?: string;
529
+ senderName?: string;
530
+ };
531
+ export interface DeleteThread extends AgentThreadMessage {
532
+ }
533
+ type DeleteThreadArguments = {
534
+ threadId: string;
535
+ messageId?: string;
536
+ senderName?: string;
537
+ };
538
+ export interface RenameThread extends AgentThreadMessage {
539
+ readonly name: string;
540
+ }
541
+ type RenameThreadArguments = {
542
+ threadId: string;
543
+ name: string;
544
+ messageId?: string;
545
+ senderName?: string;
546
+ };
547
+ export interface ListThreads extends AgentMessage {
548
+ readonly limit: number;
549
+ readonly offset: number;
550
+ }
551
+ type ListThreadsArguments = {
552
+ messageId?: string;
553
+ senderName?: string;
554
+ limit?: number;
555
+ offset?: number;
556
+ };
557
+ export interface WatchThreads extends AgentMessage {
558
+ }
559
+ type WatchThreadsArguments = {
560
+ messageId?: string;
561
+ senderName?: string;
562
+ };
563
+ export interface UnwatchThreads extends AgentMessage {
564
+ }
565
+ type UnwatchThreadsArguments = {
566
+ messageId?: string;
567
+ senderName?: string;
568
+ };
569
+ export interface ThreadsListed extends AgentMessage {
570
+ readonly sourceMessageId: string;
571
+ readonly threads: AgentThreadListEntry[];
572
+ readonly total: number;
573
+ readonly offset: number;
574
+ readonly limit: number;
575
+ }
576
+ type ThreadsListedArguments = {
577
+ sourceMessageId: string;
578
+ threads: AgentThreadListEntry[];
579
+ total: number;
580
+ offset: number;
581
+ limit: number;
582
+ messageId?: string;
583
+ senderName?: string;
584
+ };
585
+ export interface ThreadCreated extends AgentMessage {
586
+ readonly thread: AgentThreadListEntry;
587
+ }
588
+ type ThreadCreatedArguments = {
589
+ thread: AgentThreadListEntry;
590
+ messageId?: string;
591
+ senderName?: string;
592
+ };
593
+ export interface ThreadUpdated extends AgentMessage {
594
+ readonly thread: AgentThreadListEntry;
595
+ }
596
+ type ThreadUpdatedArguments = {
597
+ thread: AgentThreadListEntry;
598
+ messageId?: string;
599
+ senderName?: string;
600
+ };
601
+ export interface ThreadDeleted extends AgentMessage {
602
+ readonly path: string;
603
+ }
604
+ type ThreadDeletedArguments = {
605
+ path: string;
606
+ messageId?: string;
607
+ senderName?: string;
608
+ };
609
+ export interface CapabilitiesRequest extends AgentThreadMessage {
610
+ }
611
+ type CapabilitiesRequestArguments = {
612
+ threadId: string;
613
+ messageId?: string;
614
+ senderName?: string;
615
+ };
616
+ export interface CapabilitiesResponse extends AgentThreadMessage {
617
+ readonly sourceMessageId: string;
618
+ readonly version: string;
619
+ readonly toolkits: ToolkitCapabilities[];
620
+ }
621
+ type CapabilitiesResponseArguments = {
622
+ threadId: string;
623
+ sourceMessageId: string;
624
+ version: string;
625
+ toolkits: ToolkitCapabilities[];
626
+ messageId?: string;
627
+ senderName?: string;
628
+ };
629
+ export interface ModelsRequest extends AgentMessage {
630
+ }
631
+ type ModelsRequestArguments = {
632
+ messageId?: string;
633
+ senderName?: string;
634
+ };
635
+ export interface ModelsResponse extends AgentMessage {
636
+ readonly sourceMessageId: string;
637
+ readonly providers: AgentProviderInfo[];
638
+ }
639
+ type ModelsResponseArguments = {
640
+ sourceMessageId: string;
641
+ providers: AgentProviderInfo[];
642
+ messageId?: string;
643
+ senderName?: string;
644
+ };
645
+ export interface ChangeModel extends AgentThreadMessage {
646
+ readonly backend?: string;
647
+ readonly provider?: string;
648
+ readonly model?: string;
649
+ readonly voice?: string;
650
+ }
651
+ type ChangeModelArguments = {
652
+ threadId: string;
653
+ messageId?: string;
654
+ senderName?: string;
655
+ backend?: string;
656
+ provider?: string;
657
+ model?: string;
658
+ voice?: string;
659
+ };
660
+ export interface AgentModelChanged extends AgentThreadMessage {
661
+ readonly sourceMessageId?: string;
662
+ readonly backend?: string;
663
+ readonly provider: string;
664
+ readonly model: string;
665
+ readonly voice?: string;
666
+ readonly inputFormat?: AgentAudioFormat;
667
+ readonly outputFormat?: AgentAudioFormat;
668
+ readonly turnDetection?: string;
669
+ readonly outputModalities: string[];
670
+ readonly realtimeProtocols: string[];
671
+ readonly supportsAttachments: boolean;
672
+ readonly accepts: string[];
673
+ }
674
+ type AgentModelChangedArguments = {
675
+ threadId: string;
676
+ provider: string;
677
+ model: string;
678
+ messageId?: string;
679
+ senderName?: string;
680
+ sourceMessageId?: string;
681
+ backend?: string;
682
+ voice?: string;
683
+ inputFormat?: AgentAudioFormat;
684
+ outputFormat?: AgentAudioFormat;
685
+ turnDetection?: string;
686
+ outputModalities?: string[];
687
+ realtimeProtocols?: string[];
688
+ supportsAttachments?: boolean;
689
+ accepts?: string[];
690
+ };
691
+ export interface ThreadCleared extends AgentThreadMessage {
692
+ readonly sourceMessageId: string;
693
+ }
694
+ type ThreadClearedArguments = {
695
+ threadId: string;
696
+ sourceMessageId: string;
697
+ messageId?: string;
698
+ senderName?: string;
699
+ };
700
+ export interface TurnStartAccepted extends AgentThreadMessage {
701
+ readonly turnId?: string;
702
+ readonly sourceMessageId: string;
703
+ readonly content: AgentInputContent[];
704
+ }
705
+ type TurnStartAcceptedArguments = {
706
+ threadId: string;
707
+ sourceMessageId: string;
708
+ messageId?: string;
709
+ senderName?: string;
710
+ turnId?: string;
711
+ content?: AgentInputContent[];
712
+ };
713
+ export interface TurnStartRejected extends AgentThreadMessage {
714
+ readonly sourceMessageId: string;
715
+ readonly error: AgentError;
716
+ }
717
+ type TurnStartRejectedArguments = {
718
+ threadId: string;
719
+ sourceMessageId: string;
720
+ error: AgentError;
721
+ messageId?: string;
722
+ senderName?: string;
723
+ };
724
+ export interface TurnInterruptAccepted extends AgentThreadMessage {
725
+ readonly turnId: string;
726
+ readonly sourceMessageId: string;
727
+ }
728
+ type TurnInterruptAcceptedArguments = {
729
+ threadId: string;
730
+ turnId: string;
731
+ sourceMessageId: string;
732
+ messageId?: string;
733
+ senderName?: string;
734
+ };
735
+ export interface TurnInterrupted extends TurnInterruptAccepted {
736
+ readonly turnId: string;
737
+ readonly sourceMessageId: string;
738
+ }
739
+ type TurnInterruptedArguments = {
740
+ threadId: string;
741
+ turnId: string;
742
+ sourceMessageId: string;
743
+ messageId?: string;
744
+ senderName?: string;
745
+ };
746
+ export interface TurnSteerAccepted extends TurnStartAccepted {
747
+ readonly turnId?: string;
748
+ readonly sourceMessageId: string;
749
+ readonly content: AgentInputContent[];
750
+ }
751
+ type TurnSteerAcceptedArguments = {
752
+ threadId: string;
753
+ sourceMessageId: string;
754
+ turnId: string;
755
+ messageId?: string;
756
+ senderName?: string;
757
+ content?: AgentInputContent[];
758
+ };
759
+ export interface TurnSteered extends TurnInterruptAccepted {
760
+ readonly turnId: string;
761
+ readonly sourceMessageId: string;
762
+ }
763
+ type TurnSteeredArguments = {
764
+ threadId: string;
765
+ turnId: string;
766
+ sourceMessageId: string;
767
+ messageId?: string;
768
+ senderName?: string;
769
+ };
770
+ export interface TurnSteerRejected extends AgentThreadMessage {
771
+ readonly turnId: string;
772
+ readonly sourceMessageId: string;
773
+ readonly error: AgentError;
774
+ }
775
+ type TurnSteerRejectedArguments = {
776
+ threadId: string;
777
+ turnId: string;
778
+ sourceMessageId: string;
779
+ error: AgentError;
780
+ messageId?: string;
781
+ senderName?: string;
782
+ };
783
+ export interface TurnStarted extends TurnInterruptAccepted {
784
+ readonly turnId: string;
785
+ readonly sourceMessageId: string;
786
+ }
787
+ type TurnStartedArguments = {
788
+ threadId: string;
789
+ turnId: string;
790
+ sourceMessageId: string;
791
+ messageId?: string;
792
+ senderName?: string;
793
+ };
794
+ export interface TurnEnded extends AgentThreadMessage {
795
+ readonly turnId: string;
796
+ readonly error?: AgentError;
797
+ }
798
+ type TurnEndedArguments = {
799
+ threadId: string;
800
+ turnId: string;
801
+ messageId?: string;
802
+ senderName?: string;
803
+ error?: AgentError;
804
+ };
805
+ export interface ThreadStarted extends AgentMessage {
806
+ readonly sourceMessageId: string;
807
+ readonly threadId: string;
808
+ readonly realtimeConnection?: AgentRealtimeConnectionInfo;
809
+ }
810
+ type ThreadStartedArguments = {
811
+ sourceMessageId: string;
812
+ threadId: string;
813
+ messageId?: string;
814
+ senderName?: string;
815
+ realtimeConnection?: AgentRealtimeConnectionInfo;
816
+ };
817
+ export interface ThreadLoaded extends AgentThreadMessage {
818
+ readonly sourceMessageId?: string;
819
+ readonly sinceTurn?: string;
820
+ }
821
+ type ThreadLoadedArguments = {
822
+ threadId: string;
823
+ messageId?: string;
824
+ senderName?: string;
825
+ sourceMessageId?: string;
826
+ sinceTurn?: string;
827
+ };
828
+ export interface ThreadStartRejected extends AgentMessage {
829
+ readonly sourceMessageId: string;
830
+ readonly error: AgentError;
831
+ }
832
+ type ThreadStartRejectedArguments = {
833
+ sourceMessageId: string;
834
+ error: AgentError;
835
+ messageId?: string;
836
+ senderName?: string;
837
+ };
838
+ export interface AgentReasoningContentStarted extends AgentLLMMessage {
839
+ readonly turnId: string;
840
+ readonly itemId: string;
841
+ }
842
+ type AgentReasoningContentStartedArguments = {
843
+ threadId: string;
844
+ turnId: string;
845
+ itemId: string;
846
+ messageId?: string;
847
+ senderName?: string;
848
+ provider?: string;
849
+ model?: string;
850
+ };
851
+ export interface AgentReasoningContentDelta extends AgentLLMMessage {
852
+ readonly turnId: string;
853
+ readonly itemId: string;
854
+ readonly text: string;
855
+ }
856
+ type AgentReasoningContentDeltaArguments = {
857
+ threadId: string;
858
+ turnId: string;
859
+ itemId: string;
860
+ text: string;
861
+ messageId?: string;
862
+ senderName?: string;
863
+ provider?: string;
864
+ model?: string;
865
+ };
866
+ export interface AgentReasoningContentEnded extends AgentLLMMessage {
867
+ readonly turnId: string;
868
+ readonly itemId: string;
869
+ }
870
+ type AgentReasoningContentEndedArguments = {
871
+ threadId: string;
872
+ turnId: string;
873
+ itemId: string;
874
+ messageId?: string;
875
+ senderName?: string;
876
+ provider?: string;
877
+ model?: string;
878
+ };
879
+ export interface AgentTextContentStarted extends AgentLLMMessage {
880
+ readonly turnId: string;
881
+ readonly itemId: string;
882
+ readonly phase?: string;
883
+ }
884
+ type AgentTextContentStartedArguments = {
885
+ threadId: string;
886
+ turnId: string;
887
+ itemId: string;
888
+ messageId?: string;
889
+ senderName?: string;
890
+ provider?: string;
891
+ model?: string;
892
+ phase?: string;
893
+ };
894
+ export interface AgentTextContentDelta extends AgentTextContentStarted {
895
+ readonly turnId: string;
896
+ readonly itemId: string;
897
+ readonly phase?: string;
898
+ readonly text: string;
899
+ }
900
+ type AgentTextContentDeltaArguments = {
901
+ threadId: string;
902
+ turnId: string;
903
+ itemId: string;
904
+ text: string;
905
+ messageId?: string;
906
+ senderName?: string;
907
+ provider?: string;
908
+ model?: string;
909
+ phase?: string;
910
+ };
911
+ export interface AgentTextContentEnded extends AgentTextContentStarted {
912
+ readonly turnId: string;
913
+ readonly itemId: string;
914
+ readonly phase?: string;
915
+ }
916
+ type AgentTextContentEndedArguments = {
917
+ threadId: string;
918
+ turnId: string;
919
+ itemId: string;
920
+ messageId?: string;
921
+ senderName?: string;
922
+ provider?: string;
923
+ model?: string;
924
+ phase?: string;
925
+ };
926
+ export interface AgentFileContentStarted extends AgentLLMMessage {
927
+ readonly turnId: string;
928
+ readonly itemId: string;
929
+ }
930
+ type AgentFileContentStartedArguments = {
931
+ threadId: string;
932
+ turnId: string;
933
+ itemId: string;
934
+ messageId?: string;
935
+ senderName?: string;
936
+ provider?: string;
937
+ model?: string;
938
+ };
939
+ export interface AgentFileContentDelta extends AgentLLMMessage {
940
+ readonly turnId: string;
941
+ readonly itemId: string;
942
+ readonly url: string;
943
+ }
944
+ type AgentFileContentDeltaArguments = {
945
+ threadId: string;
946
+ turnId: string;
947
+ itemId: string;
948
+ url: string;
949
+ messageId?: string;
950
+ senderName?: string;
951
+ provider?: string;
952
+ model?: string;
953
+ };
954
+ export interface AgentFileContentEnded extends AgentLLMMessage {
955
+ readonly turnId: string;
956
+ readonly itemId: string;
957
+ }
958
+ type AgentFileContentEndedArguments = {
959
+ threadId: string;
960
+ turnId: string;
961
+ itemId: string;
962
+ messageId?: string;
963
+ senderName?: string;
964
+ provider?: string;
965
+ model?: string;
966
+ };
967
+ export interface AgentToolCallPending extends AgentLLMMessage {
968
+ readonly turnId: string;
969
+ readonly itemId: string;
970
+ readonly namespace: string;
971
+ readonly callId?: string;
972
+ readonly toolkit: string;
973
+ readonly tool: string;
974
+ readonly arguments?: JsonMap;
975
+ readonly argumentBytes?: number;
976
+ }
977
+ type AgentToolCallPendingArguments = {
978
+ threadId: string;
979
+ turnId: string;
980
+ itemId: string;
981
+ toolkit: string;
982
+ tool: string;
983
+ messageId?: string;
984
+ senderName?: string;
985
+ provider?: string;
986
+ model?: string;
987
+ namespace?: string;
988
+ callId?: string;
989
+ arguments?: JsonMap;
990
+ argumentBytes?: number;
991
+ };
992
+ export interface AgentToolCallInProgress extends AgentToolCallPending {
993
+ readonly turnId: string;
994
+ readonly itemId: string;
995
+ readonly namespace: string;
996
+ readonly callId?: string;
997
+ readonly toolkit: string;
998
+ readonly tool: string;
999
+ readonly arguments?: JsonMap;
1000
+ readonly argumentBytes?: number;
1001
+ }
1002
+ type AgentToolCallInProgressArguments = {
1003
+ threadId: string;
1004
+ turnId: string;
1005
+ itemId: string;
1006
+ toolkit: string;
1007
+ tool: string;
1008
+ messageId?: string;
1009
+ senderName?: string;
1010
+ provider?: string;
1011
+ model?: string;
1012
+ namespace?: string;
1013
+ callId?: string;
1014
+ arguments?: JsonMap;
1015
+ argumentBytes?: number;
1016
+ };
1017
+ export interface AgentToolCallStarted extends AgentToolCallPending {
1018
+ readonly turnId: string;
1019
+ readonly itemId: string;
1020
+ readonly namespace: string;
1021
+ readonly callId?: string;
1022
+ readonly toolkit: string;
1023
+ readonly tool: string;
1024
+ readonly arguments?: JsonMap;
1025
+ readonly argumentBytes?: number;
1026
+ }
1027
+ type AgentToolCallStartedArguments = {
1028
+ threadId: string;
1029
+ turnId: string;
1030
+ itemId: string;
1031
+ toolkit: string;
1032
+ tool: string;
1033
+ messageId?: string;
1034
+ senderName?: string;
1035
+ provider?: string;
1036
+ model?: string;
1037
+ namespace?: string;
1038
+ callId?: string;
1039
+ arguments?: JsonMap;
1040
+ argumentBytes?: number;
1041
+ };
1042
+ export interface AgentToolCallArgumentsDelta extends AgentLLMMessage {
1043
+ readonly turnId: string;
1044
+ readonly itemId: string;
1045
+ readonly namespace: string;
1046
+ readonly callId?: string;
1047
+ readonly delta: string;
1048
+ }
1049
+ type AgentToolCallArgumentsDeltaArguments = {
1050
+ threadId: string;
1051
+ turnId: string;
1052
+ itemId: string;
1053
+ delta: string;
1054
+ messageId?: string;
1055
+ senderName?: string;
1056
+ provider?: string;
1057
+ model?: string;
1058
+ namespace?: string;
1059
+ callId?: string;
1060
+ };
1061
+ export interface AgentToolCallLogDelta extends AgentLLMMessage {
1062
+ readonly turnId: string;
1063
+ readonly itemId: string;
1064
+ readonly namespace: string;
1065
+ readonly callId?: string;
1066
+ readonly lines: AgentToolCallLogLine[];
1067
+ }
1068
+ type AgentToolCallLogDeltaArguments = {
1069
+ threadId: string;
1070
+ turnId: string;
1071
+ itemId: string;
1072
+ lines: AgentToolCallLogLine[];
1073
+ messageId?: string;
1074
+ senderName?: string;
1075
+ provider?: string;
1076
+ model?: string;
1077
+ namespace?: string;
1078
+ callId?: string;
1079
+ };
1080
+ export interface AgentToolCallEnded extends AgentLLMMessage {
1081
+ readonly turnId: string;
1082
+ readonly itemId: string;
1083
+ readonly namespace: string;
1084
+ readonly callId?: string;
1085
+ readonly toolkit?: string;
1086
+ readonly tool?: string;
1087
+ readonly result?: Content;
1088
+ readonly error?: AgentError;
1089
+ }
1090
+ type AgentToolCallEndedArguments = {
1091
+ threadId: string;
1092
+ turnId: string;
1093
+ itemId: string;
1094
+ messageId?: string;
1095
+ senderName?: string;
1096
+ provider?: string;
1097
+ model?: string;
1098
+ namespace?: string;
1099
+ callId?: string;
1100
+ toolkit?: string;
1101
+ tool?: string;
1102
+ result?: Content;
1103
+ error?: AgentError;
1104
+ };
1105
+ export interface AgentToolCallApprovalRequested extends AgentToolCallPending {
1106
+ readonly turnId: string;
1107
+ readonly itemId: string;
1108
+ readonly namespace: string;
1109
+ readonly callId?: string;
1110
+ readonly toolkit: string;
1111
+ readonly tool: string;
1112
+ readonly arguments?: JsonMap;
1113
+ }
1114
+ type AgentToolCallApprovalRequestedArguments = {
1115
+ threadId: string;
1116
+ turnId: string;
1117
+ itemId: string;
1118
+ toolkit: string;
1119
+ tool: string;
1120
+ messageId?: string;
1121
+ senderName?: string;
1122
+ provider?: string;
1123
+ model?: string;
1124
+ namespace?: string;
1125
+ callId?: string;
1126
+ arguments?: JsonMap;
1127
+ };
1128
+ export interface AgentSecretRequested extends AgentLLMMessage {
1129
+ readonly turnId: string;
1130
+ readonly requestId: string;
1131
+ readonly secretName: string;
1132
+ readonly prompt?: string;
1133
+ readonly oauth?: JsonMap;
1134
+ readonly challenge?: string;
1135
+ }
1136
+ type AgentSecretRequestedArguments = {
1137
+ threadId: string;
1138
+ turnId: string;
1139
+ requestId: string;
1140
+ secretName: string;
1141
+ messageId?: string;
1142
+ senderName?: string;
1143
+ provider?: string;
1144
+ model?: string;
1145
+ prompt?: string;
1146
+ oauth?: JsonMap;
1147
+ challenge?: string;
1148
+ };
1149
+ export interface AgentClientToolCallRequested extends AgentLLMMessage {
1150
+ readonly turnId: string;
1151
+ readonly requestId: string;
1152
+ readonly targetParticipantId?: string;
1153
+ readonly toolkit: string;
1154
+ readonly tool: string;
1155
+ readonly arguments: JsonMap;
1156
+ }
1157
+ type AgentClientToolCallRequestedArguments = {
1158
+ threadId: string;
1159
+ turnId: string;
1160
+ requestId: string;
1161
+ targetParticipantId?: string;
1162
+ toolkit: string;
1163
+ tool: string;
1164
+ messageId?: string;
1165
+ senderName?: string;
1166
+ provider?: string;
1167
+ model?: string;
1168
+ arguments?: JsonMap;
1169
+ };
1170
+ export interface AgentClientToolCallCancelled extends AgentLLMMessage {
1171
+ readonly turnId: string;
1172
+ readonly requestId: string;
1173
+ readonly targetParticipantId?: string;
1174
+ readonly toolkit: string;
1175
+ readonly tool: string;
1176
+ readonly reason?: string;
1177
+ }
1178
+ type AgentClientToolCallCancelledArguments = {
1179
+ threadId: string;
1180
+ turnId: string;
1181
+ requestId: string;
1182
+ targetParticipantId?: string;
1183
+ toolkit: string;
1184
+ tool: string;
1185
+ messageId?: string;
1186
+ senderName?: string;
1187
+ provider?: string;
1188
+ model?: string;
1189
+ reason?: string;
1190
+ };
1191
+ export interface AgentThreadStatus extends AgentThreadMessage {
1192
+ readonly status?: string;
1193
+ readonly mode?: string;
1194
+ readonly startedAt?: string;
1195
+ readonly turnId?: string;
1196
+ readonly pendingItemId?: string;
1197
+ readonly totalBytes?: number;
1198
+ readonly linesAdded?: number;
1199
+ readonly linesRemoved?: number;
1200
+ }
1201
+ type AgentThreadStatusArguments = {
1202
+ threadId: string;
1203
+ messageId?: string;
1204
+ senderName?: string;
1205
+ status?: string;
1206
+ mode?: string;
1207
+ startedAt?: string;
1208
+ turnId?: string;
1209
+ pendingItemId?: string;
1210
+ totalBytes?: number;
1211
+ linesAdded?: number;
1212
+ linesRemoved?: number;
1213
+ };
1214
+ export interface AgentConnectionStatus extends AgentMessage {
1215
+ readonly status: string;
1216
+ readonly message?: string;
1217
+ readonly reason?: string;
1218
+ readonly retryInSeconds?: number;
1219
+ readonly participantId?: string;
1220
+ }
1221
+ type AgentConnectionStatusArguments = {
1222
+ status: string;
1223
+ messageId?: string;
1224
+ senderName?: string;
1225
+ message?: string;
1226
+ reason?: string;
1227
+ retryInSeconds?: number;
1228
+ participantId?: string;
1229
+ };
1230
+ export interface AgentThreadEvent extends AgentLLMMessage {
1231
+ readonly event: JsonMap;
1232
+ }
1233
+ type AgentThreadEventArguments = {
1234
+ threadId: string;
1235
+ event: JsonMap;
1236
+ messageId?: string;
1237
+ senderName?: string;
1238
+ provider?: string;
1239
+ model?: string;
1240
+ };
1241
+ export interface AgentImageGenerationStarted extends AgentLLMMessage {
1242
+ readonly turnId: string;
1243
+ readonly itemId: string;
1244
+ readonly callId?: string;
1245
+ readonly toolkit: string;
1246
+ readonly tool: string;
1247
+ readonly arguments?: JsonMap;
1248
+ }
1249
+ type AgentImageGenerationStartedArguments = {
1250
+ threadId: string;
1251
+ turnId: string;
1252
+ itemId: string;
1253
+ messageId?: string;
1254
+ senderName?: string;
1255
+ provider?: string;
1256
+ model?: string;
1257
+ callId?: string;
1258
+ toolkit?: string;
1259
+ tool?: string;
1260
+ arguments?: JsonMap;
1261
+ };
1262
+ export interface AgentImageGenerationPartial extends AgentLLMMessage {
1263
+ readonly turnId: string;
1264
+ readonly itemId: string;
1265
+ readonly callId?: string;
1266
+ readonly toolkit: string;
1267
+ readonly tool: string;
1268
+ readonly arguments?: JsonMap;
1269
+ readonly image?: AgentGeneratedImage;
1270
+ readonly partialIndex?: number;
1271
+ }
1272
+ type AgentImageGenerationPartialArguments = {
1273
+ threadId: string;
1274
+ turnId: string;
1275
+ itemId: string;
1276
+ messageId?: string;
1277
+ senderName?: string;
1278
+ provider?: string;
1279
+ model?: string;
1280
+ callId?: string;
1281
+ toolkit?: string;
1282
+ tool?: string;
1283
+ arguments?: JsonMap;
1284
+ image?: AgentGeneratedImage;
1285
+ partialIndex?: number;
1286
+ };
1287
+ export interface AgentImageGenerationCompleted extends AgentLLMMessage {
1288
+ readonly turnId: string;
1289
+ readonly itemId: string;
1290
+ readonly callId?: string;
1291
+ readonly toolkit: string;
1292
+ readonly tool: string;
1293
+ readonly arguments?: JsonMap;
1294
+ readonly images: AgentGeneratedImage[];
1295
+ }
1296
+ type AgentImageGenerationCompletedArguments = {
1297
+ threadId: string;
1298
+ turnId: string;
1299
+ itemId: string;
1300
+ messageId?: string;
1301
+ senderName?: string;
1302
+ provider?: string;
1303
+ model?: string;
1304
+ callId?: string;
1305
+ toolkit?: string;
1306
+ tool?: string;
1307
+ arguments?: JsonMap;
1308
+ images?: AgentGeneratedImage[];
1309
+ };
1310
+ export interface AgentImageGenerationFailed extends AgentLLMMessage {
1311
+ readonly turnId: string;
1312
+ readonly itemId: string;
1313
+ readonly callId?: string;
1314
+ readonly toolkit: string;
1315
+ readonly tool: string;
1316
+ readonly arguments?: JsonMap;
1317
+ readonly error?: AgentError;
1318
+ }
1319
+ type AgentImageGenerationFailedArguments = {
1320
+ threadId: string;
1321
+ turnId: string;
1322
+ itemId: string;
1323
+ messageId?: string;
1324
+ senderName?: string;
1325
+ provider?: string;
1326
+ model?: string;
1327
+ callId?: string;
1328
+ toolkit?: string;
1329
+ tool?: string;
1330
+ arguments?: JsonMap;
1331
+ error?: AgentError;
1332
+ };
1333
+ export interface AgentAudioGenerationStarted extends AgentLLMMessage {
1334
+ readonly turnId: string;
1335
+ readonly itemId: string;
1336
+ readonly responseId?: string;
1337
+ readonly contentIndex?: number;
1338
+ }
1339
+ type AgentAudioGenerationStartedArguments = {
1340
+ threadId: string;
1341
+ turnId: string;
1342
+ itemId: string;
1343
+ messageId?: string;
1344
+ senderName?: string;
1345
+ provider?: string;
1346
+ model?: string;
1347
+ responseId?: string;
1348
+ contentIndex?: number;
1349
+ };
1350
+ export interface AgentAudioGenerationDelta extends AgentLLMMessage {
1351
+ readonly turnId: string;
1352
+ readonly itemId: string;
1353
+ readonly responseId?: string;
1354
+ readonly contentIndex?: number;
1355
+ readonly data: Uint8Array;
1356
+ readonly mimeType?: string;
1357
+ readonly outputFormat?: AgentAudioFormat;
1358
+ }
1359
+ type AgentAudioGenerationDeltaArguments = {
1360
+ threadId: string;
1361
+ turnId: string;
1362
+ itemId: string;
1363
+ messageId?: string;
1364
+ senderName?: string;
1365
+ provider?: string;
1366
+ model?: string;
1367
+ responseId?: string;
1368
+ contentIndex?: number;
1369
+ data?: Uint8Array;
1370
+ mimeType?: string;
1371
+ outputFormat?: AgentAudioFormat;
1372
+ };
1373
+ export interface AgentAudioGenerationCompleted extends AgentLLMMessage {
1374
+ readonly turnId: string;
1375
+ readonly itemId: string;
1376
+ readonly responseId?: string;
1377
+ readonly contentIndex?: number;
1378
+ readonly audio?: AgentGeneratedAudio;
1379
+ readonly outputFormat?: AgentAudioFormat;
1380
+ }
1381
+ type AgentAudioGenerationCompletedArguments = {
1382
+ threadId: string;
1383
+ turnId: string;
1384
+ itemId: string;
1385
+ messageId?: string;
1386
+ senderName?: string;
1387
+ provider?: string;
1388
+ model?: string;
1389
+ responseId?: string;
1390
+ contentIndex?: number;
1391
+ audio?: AgentGeneratedAudio;
1392
+ outputFormat?: AgentAudioFormat;
1393
+ };
1394
+ export interface AgentAudioGenerationFailed extends AgentLLMMessage {
1395
+ readonly turnId: string;
1396
+ readonly itemId: string;
1397
+ readonly responseId?: string;
1398
+ readonly contentIndex?: number;
1399
+ readonly error?: AgentError;
1400
+ }
1401
+ type AgentAudioGenerationFailedArguments = {
1402
+ threadId: string;
1403
+ turnId: string;
1404
+ itemId: string;
1405
+ messageId?: string;
1406
+ senderName?: string;
1407
+ provider?: string;
1408
+ model?: string;
1409
+ responseId?: string;
1410
+ contentIndex?: number;
1411
+ error?: AgentError;
1412
+ };
1413
+ export interface AgentAudioTranscriptionStarted extends AgentLLMMessage {
1414
+ readonly turnId: string;
1415
+ readonly itemId: string;
1416
+ readonly responseId?: string;
1417
+ readonly contentIndex?: number;
1418
+ readonly role?: string;
1419
+ }
1420
+ type AgentAudioTranscriptionStartedArguments = {
1421
+ threadId: string;
1422
+ turnId: string;
1423
+ itemId: string;
1424
+ messageId?: string;
1425
+ senderName?: string;
1426
+ provider?: string;
1427
+ model?: string;
1428
+ responseId?: string;
1429
+ contentIndex?: number;
1430
+ role?: string;
1431
+ };
1432
+ export interface AgentAudioTranscriptionDelta extends AgentLLMMessage {
1433
+ readonly turnId: string;
1434
+ readonly itemId: string;
1435
+ readonly responseId?: string;
1436
+ readonly contentIndex?: number;
1437
+ readonly role?: string;
1438
+ readonly text: string;
1439
+ }
1440
+ type AgentAudioTranscriptionDeltaArguments = {
1441
+ threadId: string;
1442
+ turnId: string;
1443
+ itemId: string;
1444
+ text: string;
1445
+ messageId?: string;
1446
+ senderName?: string;
1447
+ provider?: string;
1448
+ model?: string;
1449
+ responseId?: string;
1450
+ contentIndex?: number;
1451
+ role?: string;
1452
+ };
1453
+ export interface AgentAudioTranscriptionCompleted extends AgentLLMMessage {
1454
+ readonly turnId: string;
1455
+ readonly itemId: string;
1456
+ readonly responseId?: string;
1457
+ readonly contentIndex?: number;
1458
+ readonly role?: string;
1459
+ readonly text?: string;
1460
+ }
1461
+ type AgentAudioTranscriptionCompletedArguments = {
1462
+ threadId: string;
1463
+ turnId: string;
1464
+ itemId: string;
1465
+ messageId?: string;
1466
+ senderName?: string;
1467
+ provider?: string;
1468
+ model?: string;
1469
+ responseId?: string;
1470
+ contentIndex?: number;
1471
+ role?: string;
1472
+ text?: string;
1473
+ };
1474
+ export interface AgentAudioTranscriptionFailed extends AgentLLMMessage {
1475
+ readonly turnId: string;
1476
+ readonly itemId: string;
1477
+ readonly responseId?: string;
1478
+ readonly contentIndex?: number;
1479
+ readonly role?: string;
1480
+ readonly error?: AgentError;
1481
+ }
1482
+ type AgentAudioTranscriptionFailedArguments = {
1483
+ threadId: string;
1484
+ turnId: string;
1485
+ itemId: string;
1486
+ messageId?: string;
1487
+ senderName?: string;
1488
+ provider?: string;
1489
+ model?: string;
1490
+ responseId?: string;
1491
+ contentIndex?: number;
1492
+ role?: string;
1493
+ error?: AgentError;
1494
+ };
1495
+ export interface AgentAudioInputSpeechStarted extends AgentThreadMessage {
1496
+ readonly turnId: string;
1497
+ readonly itemId?: string;
1498
+ readonly audioStartMs?: number;
1499
+ }
1500
+ type AgentAudioInputSpeechStartedArguments = {
1501
+ threadId: string;
1502
+ turnId: string;
1503
+ messageId?: string;
1504
+ senderName?: string;
1505
+ itemId?: string;
1506
+ audioStartMs?: number;
1507
+ };
1508
+ export interface AgentAudioInputSpeechEnded extends AgentThreadMessage {
1509
+ readonly turnId: string;
1510
+ readonly itemId?: string;
1511
+ readonly audioEndMs?: number;
1512
+ }
1513
+ type AgentAudioInputSpeechEndedArguments = {
1514
+ threadId: string;
1515
+ turnId: string;
1516
+ messageId?: string;
1517
+ senderName?: string;
1518
+ itemId?: string;
1519
+ audioEndMs?: number;
1520
+ };
1521
+ export interface AgentContextCompacted extends AgentThreadMessage {
1522
+ readonly checkpointId: string;
1523
+ readonly path: string;
1524
+ readonly throughSequence: number;
1525
+ readonly createdAt?: string;
1526
+ readonly messages?: JsonMap[];
1527
+ }
1528
+ type AgentContextCompactedArguments = {
1529
+ threadId: string;
1530
+ checkpointId: string;
1531
+ path: string;
1532
+ throughSequence: number;
1533
+ messageId?: string;
1534
+ senderName?: string;
1535
+ createdAt?: string;
1536
+ messages?: JsonMap[];
1537
+ };
1538
+ export interface AgentUsageUpdated extends AgentThreadMessage {
1539
+ readonly turnId?: string;
1540
+ readonly usage: Record<string, number>;
1541
+ readonly contextWindow: AgentContextWindowUsage;
1542
+ }
1543
+ type AgentUsageUpdatedArguments = {
1544
+ threadId: string;
1545
+ contextWindow: AgentContextWindowUsage;
1546
+ messageId?: string;
1547
+ senderName?: string;
1548
+ turnId?: string;
1549
+ usage?: Record<string, number>;
1550
+ };
1551
+ export interface ApproveAgentToolCall extends AgentThreadMessage {
1552
+ readonly turnId: string;
1553
+ readonly itemId: string;
1554
+ }
1555
+ type ApproveAgentToolCallArguments = {
1556
+ threadId: string;
1557
+ turnId: string;
1558
+ itemId: string;
1559
+ messageId?: string;
1560
+ senderName?: string;
1561
+ };
1562
+ export interface RejectAgentToolCall extends ApproveAgentToolCall {
1563
+ readonly turnId: string;
1564
+ readonly itemId: string;
1565
+ }
1566
+ type RejectAgentToolCallArguments = {
1567
+ threadId: string;
1568
+ turnId: string;
1569
+ itemId: string;
1570
+ messageId?: string;
1571
+ senderName?: string;
1572
+ };
1573
+ export interface AgentSecretResponse extends AgentThreadMessage {
1574
+ readonly turnId: string;
1575
+ readonly requestId: string;
1576
+ readonly value?: string;
1577
+ readonly authorizationCode?: string;
1578
+ readonly redirectUri?: string;
1579
+ readonly error?: string;
1580
+ }
1581
+ type AgentSecretResponseArguments = {
1582
+ threadId: string;
1583
+ turnId: string;
1584
+ requestId: string;
1585
+ messageId?: string;
1586
+ senderName?: string;
1587
+ value?: string;
1588
+ authorizationCode?: string;
1589
+ redirectUri?: string;
1590
+ error?: string;
1591
+ };
1592
+ export interface AgentClientToolCallResponse extends AgentThreadMessage {
1593
+ readonly turnId: string;
1594
+ readonly requestId: string;
1595
+ readonly response: Content;
1596
+ }
1597
+ type AgentClientToolCallResponseArguments = {
1598
+ threadId: string;
1599
+ turnId: string;
1600
+ requestId: string;
1601
+ response: Content;
1602
+ messageId?: string;
1603
+ senderName?: string;
1604
+ };
1605
+ export declare const StartThread: MessageCtor<StartThread, StartThreadArguments, true>;
1606
+ export declare const TurnStart: MessageCtor<TurnStart, TurnStartArguments, false>;
1607
+ export declare const TurnSteer: MessageCtor<TurnSteer, TurnSteerArguments, false>;
1608
+ export declare const TurnInterrupt: MessageCtor<TurnInterrupt, TurnInterruptArguments, false>;
1609
+ export declare const AgentRealtimeAudioChunk: MessageCtor<AgentRealtimeAudioChunk, AgentRealtimeAudioChunkArguments, false>;
1610
+ export declare const AgentRealtimeAudioCommit: MessageCtor<AgentRealtimeAudioCommit, AgentRealtimeAudioCommitArguments, false>;
1611
+ export declare const ClearThread: MessageCtor<ClearThread, ClearThreadArguments, false>;
1612
+ export declare const OpenThread: MessageCtor<OpenThread, OpenThreadArguments, false>;
1613
+ export declare const CloseThread: MessageCtor<CloseThread, CloseThreadArguments, false>;
1614
+ export declare const InjectMessages: MessageCtor<InjectMessages, InjectMessagesArguments, false>;
1615
+ export declare const ParticipantConnect: MessageCtor<ParticipantConnect, ParticipantConnectArguments, false>;
1616
+ export declare const ParticipantDisconnect: MessageCtor<ParticipantDisconnect, ParticipantDisconnectArguments, false>;
1617
+ export declare const DeleteThread: MessageCtor<DeleteThread, DeleteThreadArguments, false>;
1618
+ export declare const RenameThread: MessageCtor<RenameThread, RenameThreadArguments, false>;
1619
+ export declare const ListThreads: MessageCtor<ListThreads, ListThreadsArguments, true>;
1620
+ export declare const WatchThreads: MessageCtor<WatchThreads, WatchThreadsArguments, true>;
1621
+ export declare const UnwatchThreads: MessageCtor<UnwatchThreads, UnwatchThreadsArguments, true>;
1622
+ export declare const ThreadsListed: MessageCtor<ThreadsListed, ThreadsListedArguments, false>;
1623
+ export declare const ThreadCreated: MessageCtor<ThreadCreated, ThreadCreatedArguments, false>;
1624
+ export declare const ThreadUpdated: MessageCtor<ThreadUpdated, ThreadUpdatedArguments, false>;
1625
+ export declare const ThreadDeleted: MessageCtor<ThreadDeleted, ThreadDeletedArguments, false>;
1626
+ export declare const CapabilitiesRequest: MessageCtor<CapabilitiesRequest, CapabilitiesRequestArguments, false>;
1627
+ export declare const CapabilitiesResponse: MessageCtor<CapabilitiesResponse, CapabilitiesResponseArguments, false>;
1628
+ export declare const ModelsRequest: MessageCtor<ModelsRequest, ModelsRequestArguments, true>;
1629
+ export declare const ModelsResponse: MessageCtor<ModelsResponse, ModelsResponseArguments, false>;
1630
+ export declare const ChangeModel: MessageCtor<ChangeModel, ChangeModelArguments, false>;
1631
+ export declare const AgentModelChanged: MessageCtor<AgentModelChanged, AgentModelChangedArguments, false>;
1632
+ export declare const ThreadCleared: MessageCtor<ThreadCleared, ThreadClearedArguments, false>;
1633
+ export declare const TurnStartAccepted: MessageCtor<TurnStartAccepted, TurnStartAcceptedArguments, false>;
1634
+ export declare const TurnStartRejected: MessageCtor<TurnStartRejected, TurnStartRejectedArguments, false>;
1635
+ export declare const TurnInterruptAccepted: MessageCtor<TurnInterruptAccepted, TurnInterruptAcceptedArguments, false>;
1636
+ export declare const TurnInterrupted: MessageCtor<TurnInterrupted, TurnInterruptedArguments, false>;
1637
+ export declare const TurnSteerAccepted: MessageCtor<TurnSteerAccepted, TurnSteerAcceptedArguments, false>;
1638
+ export declare const TurnSteered: MessageCtor<TurnSteered, TurnSteeredArguments, false>;
1639
+ export declare const TurnSteerRejected: MessageCtor<TurnSteerRejected, TurnSteerRejectedArguments, false>;
1640
+ export declare const TurnStarted: MessageCtor<TurnStarted, TurnStartedArguments, false>;
1641
+ export declare const TurnEnded: MessageCtor<TurnEnded, TurnEndedArguments, false>;
1642
+ export declare const ThreadStarted: MessageCtor<ThreadStarted, ThreadStartedArguments, false>;
1643
+ export declare const ThreadLoaded: MessageCtor<ThreadLoaded, ThreadLoadedArguments, false>;
1644
+ export declare const ThreadStartRejected: MessageCtor<ThreadStartRejected, ThreadStartRejectedArguments, false>;
1645
+ export declare const AgentReasoningContentStarted: MessageCtor<AgentReasoningContentStarted, AgentReasoningContentStartedArguments, false>;
1646
+ export declare const AgentReasoningContentDelta: MessageCtor<AgentReasoningContentDelta, AgentReasoningContentDeltaArguments, false>;
1647
+ export declare const AgentReasoningContentEnded: MessageCtor<AgentReasoningContentEnded, AgentReasoningContentEndedArguments, false>;
1648
+ export declare const AgentTextContentStarted: MessageCtor<AgentTextContentStarted, AgentTextContentStartedArguments, false>;
1649
+ export declare const AgentTextContentDelta: MessageCtor<AgentTextContentDelta, AgentTextContentDeltaArguments, false>;
1650
+ export declare const AgentTextContentEnded: MessageCtor<AgentTextContentEnded, AgentTextContentEndedArguments, false>;
1651
+ export declare const AgentFileContentStarted: MessageCtor<AgentFileContentStarted, AgentFileContentStartedArguments, false>;
1652
+ export declare const AgentFileContentDelta: MessageCtor<AgentFileContentDelta, AgentFileContentDeltaArguments, false>;
1653
+ export declare const AgentFileContentEnded: MessageCtor<AgentFileContentEnded, AgentFileContentEndedArguments, false>;
1654
+ export declare const AgentToolCallPending: MessageCtor<AgentToolCallPending, AgentToolCallPendingArguments, false>;
1655
+ export declare const AgentToolCallInProgress: MessageCtor<AgentToolCallInProgress, AgentToolCallInProgressArguments, false>;
1656
+ export declare const AgentToolCallStarted: MessageCtor<AgentToolCallStarted, AgentToolCallStartedArguments, false>;
1657
+ export declare const AgentToolCallArgumentsDelta: MessageCtor<AgentToolCallArgumentsDelta, AgentToolCallArgumentsDeltaArguments, false>;
1658
+ export declare const AgentToolCallLogDelta: MessageCtor<AgentToolCallLogDelta, AgentToolCallLogDeltaArguments, false>;
1659
+ export declare const AgentToolCallEnded: MessageCtor<AgentToolCallEnded, AgentToolCallEndedArguments, false>;
1660
+ export declare const AgentToolCallApprovalRequested: MessageCtor<AgentToolCallApprovalRequested, AgentToolCallApprovalRequestedArguments, false>;
1661
+ export declare const AgentSecretRequested: MessageCtor<AgentSecretRequested, AgentSecretRequestedArguments, false>;
1662
+ export declare const AgentClientToolCallRequested: MessageCtor<AgentClientToolCallRequested, AgentClientToolCallRequestedArguments, false>;
1663
+ export declare const AgentClientToolCallCancelled: MessageCtor<AgentClientToolCallCancelled, AgentClientToolCallCancelledArguments, false>;
1664
+ export declare const AgentThreadStatus: MessageCtor<AgentThreadStatus, AgentThreadStatusArguments, false>;
1665
+ export declare const AgentConnectionStatus: MessageCtor<AgentConnectionStatus, AgentConnectionStatusArguments, false>;
1666
+ export declare const AgentThreadEvent: MessageCtor<AgentThreadEvent, AgentThreadEventArguments, false>;
1667
+ export declare const AgentImageGenerationStarted: MessageCtor<AgentImageGenerationStarted, AgentImageGenerationStartedArguments, false>;
1668
+ export declare const AgentImageGenerationPartial: MessageCtor<AgentImageGenerationPartial, AgentImageGenerationPartialArguments, false>;
1669
+ export declare const AgentImageGenerationCompleted: MessageCtor<AgentImageGenerationCompleted, AgentImageGenerationCompletedArguments, false>;
1670
+ export declare const AgentImageGenerationFailed: MessageCtor<AgentImageGenerationFailed, AgentImageGenerationFailedArguments, false>;
1671
+ export declare const AgentAudioGenerationStarted: MessageCtor<AgentAudioGenerationStarted, AgentAudioGenerationStartedArguments, false>;
1672
+ export declare const AgentAudioGenerationDelta: MessageCtor<AgentAudioGenerationDelta, AgentAudioGenerationDeltaArguments, false>;
1673
+ export declare const AgentAudioGenerationCompleted: MessageCtor<AgentAudioGenerationCompleted, AgentAudioGenerationCompletedArguments, false>;
1674
+ export declare const AgentAudioGenerationFailed: MessageCtor<AgentAudioGenerationFailed, AgentAudioGenerationFailedArguments, false>;
1675
+ export declare const AgentAudioTranscriptionStarted: MessageCtor<AgentAudioTranscriptionStarted, AgentAudioTranscriptionStartedArguments, false>;
1676
+ export declare const AgentAudioTranscriptionDelta: MessageCtor<AgentAudioTranscriptionDelta, AgentAudioTranscriptionDeltaArguments, false>;
1677
+ export declare const AgentAudioTranscriptionCompleted: MessageCtor<AgentAudioTranscriptionCompleted, AgentAudioTranscriptionCompletedArguments, false>;
1678
+ export declare const AgentAudioTranscriptionFailed: MessageCtor<AgentAudioTranscriptionFailed, AgentAudioTranscriptionFailedArguments, false>;
1679
+ export declare const AgentAudioInputSpeechStarted: MessageCtor<AgentAudioInputSpeechStarted, AgentAudioInputSpeechStartedArguments, false>;
1680
+ export declare const AgentAudioInputSpeechEnded: MessageCtor<AgentAudioInputSpeechEnded, AgentAudioInputSpeechEndedArguments, false>;
1681
+ export declare const AgentContextCompacted: MessageCtor<AgentContextCompacted, AgentContextCompactedArguments, false>;
1682
+ export declare const AgentUsageUpdated: MessageCtor<AgentUsageUpdated, AgentUsageUpdatedArguments, false>;
1683
+ export declare const ApproveAgentToolCall: MessageCtor<ApproveAgentToolCall, ApproveAgentToolCallArguments, false>;
1684
+ export declare const RejectAgentToolCall: MessageCtor<RejectAgentToolCall, RejectAgentToolCallArguments, false>;
1685
+ export declare const AgentSecretResponse: MessageCtor<AgentSecretResponse, AgentSecretResponseArguments, false>;
1686
+ export declare const AgentClientToolCallResponse: MessageCtor<AgentClientToolCallResponse, AgentClientToolCallResponseArguments, false>;
1687
+ export declare function agentInputContent({ text, attachments, }: {
347
1688
  text: string;
348
- attachments: string[];
1689
+ attachments: AgentFileContent[];
349
1690
  }): AgentInputContent[];
350
1691
  export {};