graphlit-client 1.0.20250622007 → 1.0.20250627001

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.
@@ -75,6 +75,8 @@ export var AssemblyAiModels;
75
75
  /** Authentication service type */
76
76
  export var AuthenticationServiceTypes;
77
77
  (function (AuthenticationServiceTypes) {
78
+ /** Arcade authentication service */
79
+ AuthenticationServiceTypes["Arcade"] = "ARCADE";
78
80
  /** Auth0 authentication service */
79
81
  AuthenticationServiceTypes["Auth0"] = "AUTH0";
80
82
  /** Clerk authentication service */
@@ -189,6 +191,62 @@ export var BillableMetrics;
189
191
  BillableMetrics["Tokens"] = "TOKENS";
190
192
  BillableMetrics["Units"] = "UNITS";
191
193
  })(BillableMetrics || (BillableMetrics = {}));
194
+ /** Calendar attendee response status */
195
+ export var CalendarAttendeeResponseStatus;
196
+ (function (CalendarAttendeeResponseStatus) {
197
+ /** Accepted */
198
+ CalendarAttendeeResponseStatus["Accepted"] = "ACCEPTED";
199
+ /** Declined */
200
+ CalendarAttendeeResponseStatus["Declined"] = "DECLINED";
201
+ /** Needs action */
202
+ CalendarAttendeeResponseStatus["NeedsAction"] = "NEEDS_ACTION";
203
+ /** Tentative */
204
+ CalendarAttendeeResponseStatus["Tentative"] = "TENTATIVE";
205
+ })(CalendarAttendeeResponseStatus || (CalendarAttendeeResponseStatus = {}));
206
+ /** Calendar event status */
207
+ export var CalendarEventStatus;
208
+ (function (CalendarEventStatus) {
209
+ /** Cancelled event */
210
+ CalendarEventStatus["Cancelled"] = "CANCELLED";
211
+ /** Confirmed event */
212
+ CalendarEventStatus["Confirmed"] = "CONFIRMED";
213
+ /** Tentative event */
214
+ CalendarEventStatus["Tentative"] = "TENTATIVE";
215
+ })(CalendarEventStatus || (CalendarEventStatus = {}));
216
+ /** Calendar event visibility */
217
+ export var CalendarEventVisibility;
218
+ (function (CalendarEventVisibility) {
219
+ /** Confidential event */
220
+ CalendarEventVisibility["Confidential"] = "CONFIDENTIAL";
221
+ /** Default visibility */
222
+ CalendarEventVisibility["Default"] = "DEFAULT";
223
+ /** Private event */
224
+ CalendarEventVisibility["Private"] = "PRIVATE";
225
+ /** Public event */
226
+ CalendarEventVisibility["Public"] = "PUBLIC";
227
+ })(CalendarEventVisibility || (CalendarEventVisibility = {}));
228
+ /** Calendar recurrence pattern */
229
+ export var CalendarRecurrencePattern;
230
+ (function (CalendarRecurrencePattern) {
231
+ /** Daily recurrence */
232
+ CalendarRecurrencePattern["Daily"] = "DAILY";
233
+ /** Monthly recurrence */
234
+ CalendarRecurrencePattern["Monthly"] = "MONTHLY";
235
+ /** Weekly recurrence */
236
+ CalendarRecurrencePattern["Weekly"] = "WEEKLY";
237
+ /** Yearly recurrence */
238
+ CalendarRecurrencePattern["Yearly"] = "YEARLY";
239
+ })(CalendarRecurrencePattern || (CalendarRecurrencePattern = {}));
240
+ /** Calendar reminder method */
241
+ export var CalendarReminderMethod;
242
+ (function (CalendarReminderMethod) {
243
+ /** Email reminder */
244
+ CalendarReminderMethod["Email"] = "EMAIL";
245
+ /** Popup reminder */
246
+ CalendarReminderMethod["Popup"] = "POPUP";
247
+ /** SMS reminder */
248
+ CalendarReminderMethod["Sms"] = "SMS";
249
+ })(CalendarReminderMethod || (CalendarReminderMethod = {}));
192
250
  /** Category facet types */
193
251
  export var CategoryFacetTypes;
194
252
  (function (CategoryFacetTypes) {
@@ -238,6 +296,8 @@ export var CollectionTypes;
238
296
  (function (CollectionTypes) {
239
297
  /** Content collection */
240
298
  CollectionTypes["Collection"] = "COLLECTION";
299
+ /** Recurring event series */
300
+ CollectionTypes["Series"] = "SERIES";
241
301
  /** Email thread */
242
302
  CollectionTypes["Thread"] = "THREAD";
243
303
  })(CollectionTypes || (CollectionTypes = {}));
@@ -443,6 +503,8 @@ export var DeepgramModels;
443
503
  DeepgramModels["Nova2Voicemail"] = "NOVA2_VOICEMAIL";
444
504
  /** Nova 3 (General) */
445
505
  DeepgramModels["Nova3"] = "NOVA3";
506
+ /** Nova 3 (Medical) */
507
+ DeepgramModels["Nova3Medical"] = "NOVA3_MEDICAL";
446
508
  /** Whisper (Base) */
447
509
  DeepgramModels["WhisperBase"] = "WHISPER_BASE";
448
510
  /** Whisper (Large) */
@@ -679,6 +741,8 @@ export var EntityTypes;
679
741
  EntityTypes["Specification"] = "SPECIFICATION";
680
742
  /** User */
681
743
  EntityTypes["User"] = "USER";
744
+ /** View */
745
+ EntityTypes["View"] = "VIEW";
682
746
  /** Workflow */
683
747
  EntityTypes["Workflow"] = "WORKFLOW";
684
748
  })(EntityTypes || (EntityTypes = {}));
@@ -723,6 +787,8 @@ export var FeedConnectorTypes;
723
787
  FeedConnectorTypes["GitHub"] = "GIT_HUB";
724
788
  /** Google Cloud feed connector */
725
789
  FeedConnectorTypes["Google"] = "GOOGLE";
790
+ /** Google Calendar feed connector */
791
+ FeedConnectorTypes["GoogleCalendar"] = "GOOGLE_CALENDAR";
726
792
  /** Google Drive feed connector */
727
793
  FeedConnectorTypes["GoogleDrive"] = "GOOGLE_DRIVE";
728
794
  /** Google Mail feed connector */
@@ -731,6 +797,8 @@ export var FeedConnectorTypes;
731
797
  FeedConnectorTypes["Intercom"] = "INTERCOM";
732
798
  /** Linear feed connector */
733
799
  FeedConnectorTypes["Linear"] = "LINEAR";
800
+ /** Microsoft Calendar feed connector */
801
+ FeedConnectorTypes["MicrosoftCalendar"] = "MICROSOFT_CALENDAR";
734
802
  /** Microsoft Outlook Email feed connector */
735
803
  FeedConnectorTypes["MicrosoftEmail"] = "MICROSOFT_EMAIL";
736
804
  /** Microsoft OneDrive feed connector */
@@ -767,6 +835,8 @@ export var FeedServiceTypes;
767
835
  FeedServiceTypes["GitHubIssues"] = "GIT_HUB_ISSUES";
768
836
  /** Google Cloud Blob feed service */
769
837
  FeedServiceTypes["GoogleBlob"] = "GOOGLE_BLOB";
838
+ /** Google Calendar feed service */
839
+ FeedServiceTypes["GoogleCalendar"] = "GOOGLE_CALENDAR";
770
840
  /** Google Drive feed service */
771
841
  FeedServiceTypes["GoogleDrive"] = "GOOGLE_DRIVE";
772
842
  /** Google Mail feed service */
@@ -777,6 +847,8 @@ export var FeedServiceTypes;
777
847
  FeedServiceTypes["IntercomTickets"] = "INTERCOM_TICKETS";
778
848
  /** Linear feed service */
779
849
  FeedServiceTypes["Linear"] = "LINEAR";
850
+ /** Microsoft Calendar feed service */
851
+ FeedServiceTypes["MicrosoftCalendar"] = "MICROSOFT_CALENDAR";
780
852
  /** Microsoft Outlook Email feed service */
781
853
  FeedServiceTypes["MicrosoftEmail"] = "MICROSOFT_EMAIL";
782
854
  /** Microsoft OneDrive feed service */
@@ -795,6 +867,8 @@ export var FeedServiceTypes;
795
867
  /** Feed type */
796
868
  export var FeedTypes;
797
869
  (function (FeedTypes) {
870
+ /** Calendar feed */
871
+ FeedTypes["Calendar"] = "CALENDAR";
798
872
  /** Discord channel feed */
799
873
  FeedTypes["Discord"] = "DISCORD";
800
874
  /** Email feed */
@@ -885,11 +959,34 @@ export var FileTypes;
885
959
  /** Video file */
886
960
  FileTypes["Video"] = "VIDEO";
887
961
  })(FileTypes || (FileTypes = {}));
962
+ export var GitHubAuthenticationTypes;
963
+ (function (GitHubAuthenticationTypes) {
964
+ GitHubAuthenticationTypes["Connector"] = "CONNECTOR";
965
+ GitHubAuthenticationTypes["OAuth"] = "O_AUTH";
966
+ GitHubAuthenticationTypes["PersonalAccessToken"] = "PERSONAL_ACCESS_TOKEN";
967
+ })(GitHubAuthenticationTypes || (GitHubAuthenticationTypes = {}));
968
+ export var GitHubIssueAuthenticationTypes;
969
+ (function (GitHubIssueAuthenticationTypes) {
970
+ GitHubIssueAuthenticationTypes["Connector"] = "CONNECTOR";
971
+ GitHubIssueAuthenticationTypes["OAuth"] = "O_AUTH";
972
+ GitHubIssueAuthenticationTypes["PersonalAccessToken"] = "PERSONAL_ACCESS_TOKEN";
973
+ })(GitHubIssueAuthenticationTypes || (GitHubIssueAuthenticationTypes = {}));
974
+ export var GoogleCalendarAuthenticationTypes;
975
+ (function (GoogleCalendarAuthenticationTypes) {
976
+ GoogleCalendarAuthenticationTypes["Connector"] = "CONNECTOR";
977
+ GoogleCalendarAuthenticationTypes["User"] = "USER";
978
+ })(GoogleCalendarAuthenticationTypes || (GoogleCalendarAuthenticationTypes = {}));
888
979
  export var GoogleDriveAuthenticationTypes;
889
980
  (function (GoogleDriveAuthenticationTypes) {
981
+ GoogleDriveAuthenticationTypes["Connector"] = "CONNECTOR";
890
982
  GoogleDriveAuthenticationTypes["ServiceAccount"] = "SERVICE_ACCOUNT";
891
983
  GoogleDriveAuthenticationTypes["User"] = "USER";
892
984
  })(GoogleDriveAuthenticationTypes || (GoogleDriveAuthenticationTypes = {}));
985
+ export var GoogleEmailAuthenticationTypes;
986
+ (function (GoogleEmailAuthenticationTypes) {
987
+ GoogleEmailAuthenticationTypes["Connector"] = "CONNECTOR";
988
+ GoogleEmailAuthenticationTypes["User"] = "USER";
989
+ })(GoogleEmailAuthenticationTypes || (GoogleEmailAuthenticationTypes = {}));
893
990
  /** Google model type */
894
991
  export var GoogleModels;
895
992
  (function (GoogleModels) {
@@ -1266,6 +1363,16 @@ export var MetadataTypes;
1266
1363
  /** Content metadata */
1267
1364
  MetadataTypes["Content"] = "CONTENT";
1268
1365
  })(MetadataTypes || (MetadataTypes = {}));
1366
+ export var MicrosoftCalendarAuthenticationTypes;
1367
+ (function (MicrosoftCalendarAuthenticationTypes) {
1368
+ MicrosoftCalendarAuthenticationTypes["Connector"] = "CONNECTOR";
1369
+ MicrosoftCalendarAuthenticationTypes["User"] = "USER";
1370
+ })(MicrosoftCalendarAuthenticationTypes || (MicrosoftCalendarAuthenticationTypes = {}));
1371
+ export var MicrosoftEmailAuthenticationTypes;
1372
+ (function (MicrosoftEmailAuthenticationTypes) {
1373
+ MicrosoftEmailAuthenticationTypes["Connector"] = "CONNECTOR";
1374
+ MicrosoftEmailAuthenticationTypes["User"] = "USER";
1375
+ })(MicrosoftEmailAuthenticationTypes || (MicrosoftEmailAuthenticationTypes = {}));
1269
1376
  /** Mistral model type */
1270
1377
  export var MistralModels;
1271
1378
  (function (MistralModels) {
@@ -1391,6 +1498,11 @@ export var OccurrenceTypes;
1391
1498
  OccurrenceTypes["Text"] = "TEXT";
1392
1499
  OccurrenceTypes["Time"] = "TIME";
1393
1500
  })(OccurrenceTypes || (OccurrenceTypes = {}));
1501
+ export var OneDriveAuthenticationTypes;
1502
+ (function (OneDriveAuthenticationTypes) {
1503
+ OneDriveAuthenticationTypes["Connector"] = "CONNECTOR";
1504
+ OneDriveAuthenticationTypes["User"] = "USER";
1505
+ })(OneDriveAuthenticationTypes || (OneDriveAuthenticationTypes = {}));
1394
1506
  /** OpenAI Image model type */
1395
1507
  export var OpenAiImageModels;
1396
1508
  (function (OpenAiImageModels) {
@@ -1803,6 +1915,7 @@ export var SearchTypes;
1803
1915
  export var SharePointAuthenticationTypes;
1804
1916
  (function (SharePointAuthenticationTypes) {
1805
1917
  SharePointAuthenticationTypes["Application"] = "APPLICATION";
1918
+ SharePointAuthenticationTypes["Connector"] = "CONNECTOR";
1806
1919
  SharePointAuthenticationTypes["User"] = "USER";
1807
1920
  })(SharePointAuthenticationTypes || (SharePointAuthenticationTypes = {}));
1808
1921
  /** Site type */
@@ -2052,6 +2165,12 @@ export var UserTypes;
2052
2165
  /** Human user */
2053
2166
  UserTypes["Human"] = "HUMAN";
2054
2167
  })(UserTypes || (UserTypes = {}));
2168
+ /** View type */
2169
+ export var ViewTypes;
2170
+ (function (ViewTypes) {
2171
+ /** Content view */
2172
+ ViewTypes["Content"] = "CONTENT";
2173
+ })(ViewTypes || (ViewTypes = {}));
2055
2174
  /** Voyage model type */
2056
2175
  export var VoyageModels;
2057
2176
  (function (VoyageModels) {
@@ -108,9 +108,49 @@ export function formatMessagesForAnthropic(messages) {
108
108
  systemPrompt = trimmedMessage;
109
109
  break;
110
110
  case ConversationRoleTypes.Assistant:
111
- const content = [];
112
- // Add text content
113
- if (trimmedMessage) {
111
+ const content = []; // Use any[] to allow thinking blocks
112
+ // Handle thinking blocks for extended thinking preservation
113
+ if (trimmedMessage && trimmedMessage.includes('<thinking')) {
114
+ // Extract thinking content and signature if present
115
+ const thinkingMatch = trimmedMessage.match(/<thinking(?:\s+signature="([^"]*)")?>([\s\S]*?)<\/thinking>/);
116
+ if (thinkingMatch) {
117
+ const signature = thinkingMatch[1]; // Optional signature
118
+ const thinkingContent = thinkingMatch[2].trim();
119
+ // Add thinking block for conversation history preservation
120
+ if (thinkingContent) {
121
+ const thinkingBlock = {
122
+ type: "thinking",
123
+ thinking: thinkingContent,
124
+ };
125
+ // Add signature if present (required by Anthropic API)
126
+ if (signature) {
127
+ thinkingBlock.signature = signature;
128
+ }
129
+ else {
130
+ // Provide a default signature if none captured
131
+ thinkingBlock.signature = "";
132
+ }
133
+ content.push(thinkingBlock);
134
+ }
135
+ // Remove thinking tags from the main text and add remaining content
136
+ const textWithoutThinking = trimmedMessage.replace(/<thinking(?:\s+[^>]*)?>[\s\S]*?<\/thinking>/g, '').trim();
137
+ if (textWithoutThinking) {
138
+ content.push({
139
+ type: "text",
140
+ text: textWithoutThinking,
141
+ });
142
+ }
143
+ }
144
+ else {
145
+ // No valid thinking blocks found, add as regular text
146
+ content.push({
147
+ type: "text",
148
+ text: trimmedMessage,
149
+ });
150
+ }
151
+ }
152
+ else if (trimmedMessage) {
153
+ // Add regular text content
114
154
  content.push({
115
155
  type: "text",
116
156
  text: trimmedMessage,
@@ -341,6 +381,12 @@ export function formatMessagesForCohere(messages) {
341
381
  * Format GraphQL conversation messages for Mistral SDK
342
382
  */
343
383
  export function formatMessagesForMistral(messages) {
384
+ if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
385
+ console.log(`[Mistral Formatter] Input: ${messages.length} messages`);
386
+ messages.forEach((msg, idx) => {
387
+ console.log(` Input ${idx}: role=${msg.role}, hasToolCalls=${!!msg.toolCalls}, toolCallId=${msg.toolCallId}`);
388
+ });
389
+ }
344
390
  const formattedMessages = [];
345
391
  for (const message of messages) {
346
392
  if (!message.role)
@@ -360,7 +406,7 @@ export function formatMessagesForMistral(messages) {
360
406
  case ConversationRoleTypes.Assistant:
361
407
  const assistantMessage = {
362
408
  role: "assistant",
363
- content: trimmedMessage,
409
+ content: trimmedMessage || "", // Mistral expects string, not null
364
410
  };
365
411
  // Add tool calls if present
366
412
  if (message.toolCalls && message.toolCalls.length > 0) {
@@ -368,6 +414,7 @@ export function formatMessagesForMistral(messages) {
368
414
  .filter((tc) => tc !== null)
369
415
  .map((toolCall) => ({
370
416
  id: toolCall.id,
417
+ type: "function",
371
418
  function: {
372
419
  name: toolCall.name,
373
420
  arguments: toolCall.arguments,
@@ -377,10 +424,16 @@ export function formatMessagesForMistral(messages) {
377
424
  formattedMessages.push(assistantMessage);
378
425
  break;
379
426
  case ConversationRoleTypes.Tool:
427
+ if (!message.toolCallId) {
428
+ console.warn(`[Mistral] Tool message missing toolCallId, skipping`);
429
+ break;
430
+ }
431
+ // Mistral expects tool_call_id (snake_case) and a name field
380
432
  formattedMessages.push({
381
433
  role: "tool",
434
+ name: message.toolName || "unknown", // Access toolName from extended message
382
435
  content: trimmedMessage,
383
- tool_call_id: message.toolCallId || "",
436
+ tool_call_id: message.toolCallId, // Mistral uses snake_case!
384
437
  });
385
438
  break;
386
439
  default: // User messages
@@ -415,6 +468,16 @@ export function formatMessagesForMistral(messages) {
415
468
  break;
416
469
  }
417
470
  }
471
+ if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
472
+ console.log(`[Mistral Formatter] Output: ${formattedMessages.length} messages`);
473
+ formattedMessages.forEach((msg, idx) => {
474
+ const msgWithTools = msg;
475
+ console.log(` Output ${idx}: role=${msg.role}, hasToolCalls=${!!msgWithTools.tool_calls}, toolCallId=${msgWithTools.tool_call_id}`);
476
+ if (msgWithTools.tool_calls) {
477
+ console.log(` Tool calls: ${JSON.stringify(msgWithTools.tool_calls)}`);
478
+ }
479
+ });
480
+ }
418
481
  return formattedMessages;
419
482
  }
420
483
  /**
@@ -1,48 +1,53 @@
1
- import { ConversationToolCall, Specification, ToolDefinitionInput } from "../generated/graphql-types.js";
2
- import { OpenAIMessage, AnthropicMessage, GoogleMessage, CohereMessage, MistralMessage, BedrockMessage } from "./llm-formatters.js";
1
+ import { ConversationToolCall, Specification, ToolDefinitionInput, ConversationMessage } from "../generated/graphql-types.js";
2
+ import { OpenAIMessage, AnthropicMessage, GoogleMessage, MistralMessage, BedrockMessage } from "./llm-formatters.js";
3
3
  import { StreamEvent } from "../types/internal.js";
4
4
  /**
5
5
  * Stream with OpenAI SDK
6
6
  */
7
7
  export declare function streamWithOpenAI(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, openaiClient: any, // OpenAI client instance
8
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
8
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
9
9
  /**
10
10
  * Stream with Anthropic SDK
11
11
  */
12
- export declare function streamWithAnthropic(specification: Specification, messages: AnthropicMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, anthropicClient: any, // Anthropic client instance
13
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
12
+ type AnthropicClient = import("@anthropic-ai/sdk").default;
13
+ export declare function streamWithAnthropic(specification: Specification, messages: AnthropicMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, anthropicClient: AnthropicClient, // Properly typed Anthropic client
14
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal, thinkingConfig?: {
15
+ type: "enabled";
16
+ budget_tokens: number;
17
+ }): Promise<void>;
14
18
  /**
15
19
  * Stream with Google SDK
16
20
  */
17
21
  export declare function streamWithGoogle(specification: Specification, messages: GoogleMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, googleClient: any, // Google GenerativeAI client instance
18
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
22
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
19
23
  /**
20
24
  * Stream with Groq SDK (OpenAI-compatible)
21
25
  */
22
26
  export declare function streamWithGroq(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, groqClient: any, // Groq client instance (OpenAI-compatible)
23
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
27
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
24
28
  /**
25
29
  * Stream with Cerebras SDK (OpenAI-compatible)
26
30
  */
27
31
  export declare function streamWithCerebras(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, cerebrasClient: any, // OpenAI client instance configured for Cerebras
28
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
32
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
29
33
  /**
30
34
  * Stream with Deepseek SDK (OpenAI-compatible)
31
35
  */
32
36
  export declare function streamWithDeepseek(specification: Specification, messages: OpenAIMessage[], tools: ToolDefinitionInput[] | undefined, deepseekClient: any, // OpenAI client instance configured for Deepseek
33
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
37
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
34
38
  /**
35
39
  * Stream with Cohere SDK
36
40
  */
37
- export declare function streamWithCohere(specification: Specification, messages: CohereMessage[], tools: ToolDefinitionInput[] | undefined, cohereClient: any, // CohereClient instance
38
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
41
+ export declare function streamWithCohere(specification: Specification, messages: ConversationMessage[], tools: ToolDefinitionInput[] | undefined, cohereClient: any, // CohereClient instance
42
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
39
43
  /**
40
44
  * Stream with Mistral SDK
41
45
  */
42
46
  export declare function streamWithMistral(specification: Specification, messages: MistralMessage[], tools: ToolDefinitionInput[] | undefined, mistralClient: any, // Mistral client instance
43
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
47
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
44
48
  /**
45
49
  * Stream with Bedrock SDK (for Claude models)
46
50
  */
47
51
  export declare function streamWithBedrock(specification: Specification, messages: BedrockMessage[], systemPrompt: string | undefined, tools: ToolDefinitionInput[] | undefined, bedrockClient: any, // BedrockRuntimeClient instance
48
- onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void): Promise<void>;
52
+ onEvent: (event: StreamEvent) => void, onComplete: (message: string, toolCalls: ConversationToolCall[]) => void, abortSignal?: AbortSignal): Promise<void>;
53
+ export {};