@dremio/js-sdk 0.42.0 → 0.43.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.
Files changed (115) hide show
  1. package/README.md +274 -0
  2. package/dist/cloud/ai/AIResource.d.ts +716 -17
  3. package/dist/cloud/ai/AIResource.js +40 -18
  4. package/dist/cloud/ai/AIResource.js.map +1 -1
  5. package/dist/cloud/ai/DremioModelProvider.d.ts +1 -1
  6. package/dist/cloud/ai/DremioModelProvider.js +6 -13
  7. package/dist/cloud/ai/DremioModelProvider.js.map +1 -1
  8. package/dist/cloud/ai/modelProviderCodec.d.ts +12 -0
  9. package/dist/cloud/replaceOriginResource.js +4 -0
  10. package/dist/cloud/replaceOriginResource.js.map +1 -1
  11. package/dist/common/ConflictResolver.d.ts +9 -1
  12. package/dist/common/ConflictResolver.js +10 -1
  13. package/dist/common/ConflictResolver.js.map +1 -1
  14. package/dist/common/refineRfc9557Schema.d.ts +1 -0
  15. package/dist/common/refineRfc9557Schema.js +26 -0
  16. package/dist/common/refineRfc9557Schema.js.map +1 -0
  17. package/dist/common/sharedExports.d.ts +1 -0
  18. package/dist/common/sharedExports.js +1 -0
  19. package/dist/common/sharedExports.js.map +1 -1
  20. package/dist/enterprise/Dremio.d.ts +1 -1
  21. package/dist/enterprise/Dremio.js +3 -2
  22. package/dist/enterprise/Dremio.js.map +1 -1
  23. package/dist/enterprise/ai/AIResource.d.ts +699 -18
  24. package/dist/enterprise/ai/AIResource.js +41 -19
  25. package/dist/enterprise/ai/AIResource.js.map +1 -1
  26. package/dist/enterprise/ai/chat/ChatSession.d.ts +4 -25
  27. package/dist/enterprise/ai/chat/ChatSession.js +6 -55
  28. package/dist/enterprise/ai/chat/ChatSession.js.map +1 -1
  29. package/dist/enterprise/ai/chat/UserChatMessage.d.ts +38 -22
  30. package/dist/enterprise/ai/chat/UserChatMessage.js +33 -41
  31. package/dist/enterprise/ai/chat/UserChatMessage.js.map +1 -1
  32. package/dist/enterprise/ai/chat/chatEventSchema.d.ts +169 -11
  33. package/dist/enterprise/ai/chat/chatEventSchema.js +183 -35
  34. package/dist/enterprise/ai/chat/chatEventSchema.js.map +1 -1
  35. package/dist/enterprise/ai/chat/eventWrappers/AgentChatPartialResponse.d.ts +0 -6
  36. package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.d.ts +6 -6
  37. package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.js +2 -2
  38. package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.js.map +1 -1
  39. package/dist/enterprise/ai/chat/index.d.ts +0 -3
  40. package/dist/enterprise/ai/chat/index.js +0 -1
  41. package/dist/enterprise/ai/chat/index.js.map +1 -1
  42. package/dist/enterprise/ai/chat/methods/sendChatMessage.js +4 -1
  43. package/dist/enterprise/ai/chat/methods/sendChatMessage.js.map +1 -1
  44. package/dist/enterprise/ai/chat/responseContent/AgentModelResponseContent.d.ts +1 -2
  45. package/dist/enterprise/ai/chat/responseContent/AgentModelResponseContent.js.map +1 -1
  46. package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.d.ts +1 -2
  47. package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.js +0 -1
  48. package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.js.map +1 -1
  49. package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.d.ts +1 -2
  50. package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.js +0 -1
  51. package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.js.map +1 -1
  52. package/dist/enterprise/ai/conversations/AgentConversation.d.ts +215 -0
  53. package/dist/enterprise/ai/conversations/AgentConversation.js +180 -0
  54. package/dist/enterprise/ai/conversations/AgentConversation.js.map +1 -0
  55. package/dist/enterprise/ai/conversations/conversationPropertiesCodec.d.ts +22 -0
  56. package/dist/enterprise/ai/conversations/conversationPropertiesCodec.js +62 -0
  57. package/dist/enterprise/ai/conversations/conversationPropertiesCodec.js.map +1 -0
  58. package/dist/enterprise/ai/conversations/createConversationMachine.d.ts +682 -0
  59. package/dist/enterprise/ai/conversations/createConversationMachine.js +354 -0
  60. package/dist/enterprise/ai/conversations/createConversationMachine.js.map +1 -0
  61. package/dist/enterprise/ai/conversations/methods/createConversation.d.ts +28 -0
  62. package/dist/enterprise/ai/conversations/methods/createConversation.js +68 -0
  63. package/dist/enterprise/ai/conversations/methods/createConversation.js.map +1 -0
  64. package/dist/enterprise/ai/conversations/methods/createExchangeRun.d.ts +16 -0
  65. package/dist/enterprise/ai/conversations/methods/createExchangeRun.js +36 -0
  66. package/dist/enterprise/ai/conversations/methods/createExchangeRun.js.map +1 -0
  67. package/dist/enterprise/ai/conversations/methods/deleteConversation.d.ts +2 -0
  68. package/dist/enterprise/ai/conversations/methods/deleteConversation.js +24 -0
  69. package/dist/enterprise/ai/conversations/methods/deleteConversation.js.map +1 -0
  70. package/dist/enterprise/ai/conversations/methods/listConversations.d.ts +8 -0
  71. package/dist/enterprise/ai/conversations/methods/listConversations.js +30 -0
  72. package/dist/enterprise/ai/conversations/methods/listConversations.js.map +1 -0
  73. package/dist/enterprise/ai/conversations/methods/retrieveConversation.d.ts +12 -0
  74. package/dist/enterprise/ai/conversations/methods/retrieveConversation.js +29 -0
  75. package/dist/enterprise/ai/conversations/methods/retrieveConversation.js.map +1 -0
  76. package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.d.ts +86 -0
  77. package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.js +32 -0
  78. package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.js.map +1 -0
  79. package/dist/enterprise/ai/conversations/methods/stopExchangeRun.d.ts +2 -0
  80. package/dist/enterprise/ai/conversations/methods/stopExchangeRun.js +24 -0
  81. package/dist/enterprise/ai/conversations/methods/stopExchangeRun.js.map +1 -0
  82. package/dist/enterprise/ai/conversations/methods/streamRunEvents.d.ts +6 -0
  83. package/dist/enterprise/ai/conversations/methods/streamRunEvents.js +33 -0
  84. package/dist/enterprise/ai/conversations/methods/streamRunEvents.js.map +1 -0
  85. package/dist/enterprise/ai/conversations/methods/updateConversation.d.ts +15 -0
  86. package/dist/enterprise/ai/conversations/methods/updateConversation.js +35 -0
  87. package/dist/enterprise/ai/conversations/methods/updateConversation.js.map +1 -0
  88. package/dist/enterprise/ai/conversations/reduceChatEvents.d.ts +17 -0
  89. package/dist/enterprise/ai/conversations/reduceChatEvents.js +74 -0
  90. package/dist/enterprise/ai/conversations/reduceChatEvents.js.map +1 -0
  91. package/dist/enterprise/ai/index.d.ts +5 -1
  92. package/dist/enterprise/ai/index.js +4 -1
  93. package/dist/enterprise/ai/index.js.map +1 -1
  94. package/dist/enterprise/ai/modelProvider/ModelProvider.d.ts +15 -1
  95. package/dist/enterprise/ai/modelProvider/ModelProvider.js +12 -1
  96. package/dist/enterprise/ai/modelProvider/ModelProvider.js.map +1 -1
  97. package/dist/enterprise/ai/modelProvider/modelProviderCodec.d.ts +40 -0
  98. package/dist/enterprise/ai/modelProvider/modelProviderCodec.js +10 -1
  99. package/dist/enterprise/ai/modelProvider/modelProviderCodec.js.map +1 -1
  100. package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.d.ts +21 -0
  101. package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.js +17 -0
  102. package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.js.map +1 -1
  103. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.d.ts +1 -0
  104. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js +1 -0
  105. package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js.map +1 -1
  106. package/dist-iife/cloud.js +21620 -6202
  107. package/dist-iife/community.js +14 -0
  108. package/dist-iife/enterprise.js +19404 -4038
  109. package/package.json +5 -2
  110. package/dist/enterprise/ai/chat/ChatSessionClient.d.ts +0 -18
  111. package/dist/enterprise/ai/chat/ChatSessionClient.js +0 -55
  112. package/dist/enterprise/ai/chat/ChatSessionClient.js.map +0 -1
  113. package/dist/enterprise/ai/chat/UserChatMessageContent.d.ts +0 -19
  114. package/dist/enterprise/ai/chat/UserChatMessageContent.js +0 -44
  115. package/dist/enterprise/ai/chat/UserChatMessageContent.js.map +0 -1
@@ -7,14 +7,13 @@ import { modelProviderCreateCodec } from "./modelProviderCodec.js";
7
7
  import { DremioModelProvider } from "./DremioModelProvider.ts";
8
8
  import { listAvailableModels } from "../../enterprise/ai/AIResource.ts";
9
9
  import type { SignalParam } from "../../common/Params.ts";
10
- import type { AgentChatResponse, AgentResponseContent } from "../../enterprise/ai/chat/eventWrappers/AgentChatResponse.ts";
11
- import { type Observable } from "rxjs";
12
- import { AgentChatExchange } from "../../enterprise/ai/chat/eventWrappers/AgentChatExchange.ts";
13
- import { ChatSessionClient } from "../../enterprise/ai/chat/ChatSessionClient.ts";
10
+ import { type createConversationCodec } from "../../enterprise/ai/conversations/methods/createConversation.ts";
11
+ import type { ChatEvent } from "../../enterprise/ai/chat/chatEventSchema.ts";
12
+ import type { HttpError } from "../../common/HttpError.ts";
14
13
  export declare class AIResource {
15
14
  #private;
16
15
  constructor(config: Logger & V4Config & SonarV4Config);
17
- createModelProvider(properties: z.output<typeof modelProviderCreateCodec>): import("ts-results-es").AsyncResult<ModelProvider, import("../index.ts").HttpError | z.core.$ZodError<{
16
+ createModelProvider(properties: z.output<typeof modelProviderCreateCodec>): import("ts-results-es").AsyncResult<ModelProvider, HttpError | z.core.$ZodError<{
18
17
  name: string;
19
18
  id: string;
20
19
  tag: string;
@@ -52,6 +51,12 @@ export declare class AIResource {
52
51
  organizationId: string;
53
52
  region: "GLOBAL" | "US" | "EU";
54
53
  };
54
+ } | {
55
+ openAiCompatibleApi: {
56
+ completionsApiUrl: string;
57
+ modelParameters?: string | undefined;
58
+ organizationId?: string | undefined;
59
+ };
55
60
  };
56
61
  defaultModelName: string;
57
62
  isDefault: boolean;
@@ -69,6 +74,685 @@ export declare class AIResource {
69
74
  sqlModelNames: string[];
70
75
  tag: string;
71
76
  }> | undefined>;
77
+ get conversationMachine(): import("xstate").StateMachine<import("../../enterprise/ai/conversations/createConversationMachine.ts").ConversationMachineContext, {
78
+ type: "STOP_RUN";
79
+ } | {
80
+ type: "SUBMIT_USER_MESSAGE";
81
+ message: UserChatMessage;
82
+ } | {
83
+ type: "RETRY_MESSAGE";
84
+ } | {
85
+ type: "REFRESH_HISTORY";
86
+ }, {
87
+ [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../../enterprise/interfaces.ts").AgentConversation, {
88
+ message: UserChatMessage;
89
+ modelName?: string | undefined;
90
+ modelProviderId?: string | undefined;
91
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
92
+ createdAt: import("temporal-polyfill").Temporal.Instant;
93
+ currentRunId: string | null;
94
+ id: string;
95
+ modelName: string | null;
96
+ modelProviderId: string | null;
97
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
98
+ tag: string;
99
+ title: string;
100
+ }, {
101
+ conversationId: string;
102
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
103
+ data: ({
104
+ conversationId: string;
105
+ modelName: string;
106
+ modelProviderId: string;
107
+ runId: string;
108
+ createdAt: import("temporal-polyfill").Temporal.Instant;
109
+ id: string;
110
+ content: {
111
+ chunkType: "conversationUpdate";
112
+ summary?: string | undefined;
113
+ title?: string | undefined;
114
+ };
115
+ role: "agent";
116
+ } | {
117
+ conversationId: string;
118
+ modelName: string;
119
+ modelProviderId: string;
120
+ runId: string;
121
+ createdAt: import("temporal-polyfill").Temporal.Instant;
122
+ id: string;
123
+ content: {
124
+ chunkType: "error";
125
+ message: string;
126
+ };
127
+ role: "agent";
128
+ } | {
129
+ conversationId: string;
130
+ modelName: string;
131
+ modelProviderId: string;
132
+ runId: string;
133
+ createdAt: import("temporal-polyfill").Temporal.Instant;
134
+ id: string;
135
+ content: {
136
+ chunkType: "model";
137
+ name: string;
138
+ result: Record<string, unknown>;
139
+ };
140
+ role: "agent";
141
+ } | {
142
+ conversationId: string;
143
+ modelName: string;
144
+ modelProviderId: string;
145
+ runId: string;
146
+ createdAt: import("temporal-polyfill").Temporal.Instant;
147
+ id: string;
148
+ content: {
149
+ arguments: Record<string, unknown>;
150
+ callId: string;
151
+ chunkType: "toolRequest";
152
+ name: string;
153
+ commentary?: string | undefined;
154
+ summarizedTitle?: string | undefined;
155
+ };
156
+ role: "agent";
157
+ } | {
158
+ conversationId: string;
159
+ modelName: string;
160
+ modelProviderId: string;
161
+ runId: string;
162
+ createdAt: import("temporal-polyfill").Temporal.Instant;
163
+ id: string;
164
+ content: {
165
+ callId: string;
166
+ chunkType: "toolResponse";
167
+ name: string;
168
+ result: Record<string, unknown>;
169
+ commentary?: string | undefined;
170
+ };
171
+ role: "agent";
172
+ } | {
173
+ conversationId: string;
174
+ modelName: string;
175
+ modelProviderId: string;
176
+ runId: string;
177
+ createdAt: import("temporal-polyfill").Temporal.Instant;
178
+ id: string;
179
+ content: {
180
+ chunkType: "userMessage";
181
+ text: string;
182
+ };
183
+ role: "user";
184
+ })[];
185
+ }, {
186
+ conversationId: string;
187
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
188
+ conversation: {
189
+ createdAt: import("temporal-polyfill").Temporal.Instant;
190
+ currentRunId: string | null;
191
+ id: string;
192
+ modelName: string | null;
193
+ modelProviderId: string | null;
194
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
195
+ tag: string;
196
+ title: string;
197
+ };
198
+ history: {
199
+ data: ({
200
+ conversationId: string;
201
+ modelName: string;
202
+ modelProviderId: string;
203
+ runId: string;
204
+ createdAt: import("temporal-polyfill").Temporal.Instant;
205
+ id: string;
206
+ content: {
207
+ chunkType: "conversationUpdate";
208
+ summary?: string | undefined;
209
+ title?: string | undefined;
210
+ };
211
+ role: "agent";
212
+ } | {
213
+ conversationId: string;
214
+ modelName: string;
215
+ modelProviderId: string;
216
+ runId: string;
217
+ createdAt: import("temporal-polyfill").Temporal.Instant;
218
+ id: string;
219
+ content: {
220
+ chunkType: "error";
221
+ message: string;
222
+ };
223
+ role: "agent";
224
+ } | {
225
+ conversationId: string;
226
+ modelName: string;
227
+ modelProviderId: string;
228
+ runId: string;
229
+ createdAt: import("temporal-polyfill").Temporal.Instant;
230
+ id: string;
231
+ content: {
232
+ chunkType: "model";
233
+ name: string;
234
+ result: Record<string, unknown>;
235
+ };
236
+ role: "agent";
237
+ } | {
238
+ conversationId: string;
239
+ modelName: string;
240
+ modelProviderId: string;
241
+ runId: string;
242
+ createdAt: import("temporal-polyfill").Temporal.Instant;
243
+ id: string;
244
+ content: {
245
+ arguments: Record<string, unknown>;
246
+ callId: string;
247
+ chunkType: "toolRequest";
248
+ name: string;
249
+ commentary?: string | undefined;
250
+ summarizedTitle?: string | undefined;
251
+ };
252
+ role: "agent";
253
+ } | {
254
+ conversationId: string;
255
+ modelName: string;
256
+ modelProviderId: string;
257
+ runId: string;
258
+ createdAt: import("temporal-polyfill").Temporal.Instant;
259
+ id: string;
260
+ content: {
261
+ callId: string;
262
+ chunkType: "toolResponse";
263
+ name: string;
264
+ result: Record<string, unknown>;
265
+ commentary?: string | undefined;
266
+ };
267
+ role: "agent";
268
+ } | {
269
+ conversationId: string;
270
+ modelName: string;
271
+ modelProviderId: string;
272
+ runId: string;
273
+ createdAt: import("temporal-polyfill").Temporal.Instant;
274
+ id: string;
275
+ content: {
276
+ chunkType: "userMessage";
277
+ text: string;
278
+ };
279
+ role: "user";
280
+ })[];
281
+ };
282
+ }, {
283
+ conversationId: string;
284
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
285
+ conversationProperties: {
286
+ createdAt: import("temporal-polyfill").Temporal.Instant;
287
+ currentRunId: string | null;
288
+ id: string;
289
+ modelName: string | null;
290
+ modelProviderId: string | null;
291
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
292
+ tag: string;
293
+ title: string;
294
+ };
295
+ currentRunId: string;
296
+ }, {
297
+ conversationId: string;
298
+ message: UserChatMessage;
299
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
300
+ conversationId: string;
301
+ runId: string;
302
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<{
303
+ conversationId: string;
304
+ modelName: string;
305
+ modelProviderId: string;
306
+ runId: string;
307
+ createdAt: import("temporal-polyfill").Temporal.Instant;
308
+ id: string;
309
+ content: {
310
+ chunkType: "conversationUpdate";
311
+ summary?: string | undefined;
312
+ title?: string | undefined;
313
+ };
314
+ role: "agent";
315
+ } | {
316
+ conversationId: string;
317
+ modelName: string;
318
+ modelProviderId: string;
319
+ runId: string;
320
+ createdAt: import("temporal-polyfill").Temporal.Instant;
321
+ id: string;
322
+ content: {
323
+ chunkType: "error";
324
+ message: string;
325
+ };
326
+ role: "agent";
327
+ } | {
328
+ conversationId: string;
329
+ modelName: string;
330
+ modelProviderId: string;
331
+ runId: string;
332
+ createdAt: import("temporal-polyfill").Temporal.Instant;
333
+ id: string;
334
+ content: {
335
+ chunkType: "model";
336
+ name: string;
337
+ result: Record<string, unknown>;
338
+ };
339
+ role: "agent";
340
+ } | {
341
+ conversationId: string;
342
+ modelName: string;
343
+ modelProviderId: string;
344
+ runId: string;
345
+ createdAt: import("temporal-polyfill").Temporal.Instant;
346
+ id: string;
347
+ content: {
348
+ arguments: Record<string, unknown>;
349
+ callId: string;
350
+ chunkType: "toolRequest";
351
+ name: string;
352
+ commentary?: string | undefined;
353
+ summarizedTitle?: string | undefined;
354
+ };
355
+ role: "agent";
356
+ } | {
357
+ conversationId: string;
358
+ modelName: string;
359
+ modelProviderId: string;
360
+ runId: string;
361
+ createdAt: import("temporal-polyfill").Temporal.Instant;
362
+ id: string;
363
+ content: {
364
+ callId: string;
365
+ chunkType: "toolResponse";
366
+ name: string;
367
+ result: Record<string, unknown>;
368
+ commentary?: string | undefined;
369
+ };
370
+ role: "agent";
371
+ } | {
372
+ conversationId: string;
373
+ modelName: string;
374
+ modelProviderId: string;
375
+ runId: string;
376
+ createdAt: import("temporal-polyfill").Temporal.Instant;
377
+ id: string;
378
+ content: {
379
+ chunkType: "userMessage";
380
+ text: string;
381
+ };
382
+ role: "user";
383
+ }, {
384
+ conversationId: string;
385
+ runId: string;
386
+ }, import("xstate").EventObject>> | undefined;
387
+ }, {
388
+ src: "createConversation";
389
+ logic: import("xstate").PromiseActorLogic<import("../../enterprise/interfaces.ts").AgentConversation, {
390
+ message: UserChatMessage;
391
+ modelName?: string | undefined;
392
+ modelProviderId?: string | undefined;
393
+ }, import("xstate").EventObject>;
394
+ id: string | undefined;
395
+ } | {
396
+ src: "retrieveConversation";
397
+ logic: import("xstate").PromiseActorLogic<{
398
+ createdAt: import("temporal-polyfill").Temporal.Instant;
399
+ currentRunId: string | null;
400
+ id: string;
401
+ modelName: string | null;
402
+ modelProviderId: string | null;
403
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
404
+ tag: string;
405
+ title: string;
406
+ }, {
407
+ conversationId: string;
408
+ }, import("xstate").EventObject>;
409
+ id: string | undefined;
410
+ } | {
411
+ src: "retrieveHistory";
412
+ logic: import("xstate").PromiseActorLogic<{
413
+ data: ({
414
+ conversationId: string;
415
+ modelName: string;
416
+ modelProviderId: string;
417
+ runId: string;
418
+ createdAt: import("temporal-polyfill").Temporal.Instant;
419
+ id: string;
420
+ content: {
421
+ chunkType: "conversationUpdate";
422
+ summary?: string | undefined;
423
+ title?: string | undefined;
424
+ };
425
+ role: "agent";
426
+ } | {
427
+ conversationId: string;
428
+ modelName: string;
429
+ modelProviderId: string;
430
+ runId: string;
431
+ createdAt: import("temporal-polyfill").Temporal.Instant;
432
+ id: string;
433
+ content: {
434
+ chunkType: "error";
435
+ message: string;
436
+ };
437
+ role: "agent";
438
+ } | {
439
+ conversationId: string;
440
+ modelName: string;
441
+ modelProviderId: string;
442
+ runId: string;
443
+ createdAt: import("temporal-polyfill").Temporal.Instant;
444
+ id: string;
445
+ content: {
446
+ chunkType: "model";
447
+ name: string;
448
+ result: Record<string, unknown>;
449
+ };
450
+ role: "agent";
451
+ } | {
452
+ conversationId: string;
453
+ modelName: string;
454
+ modelProviderId: string;
455
+ runId: string;
456
+ createdAt: import("temporal-polyfill").Temporal.Instant;
457
+ id: string;
458
+ content: {
459
+ arguments: Record<string, unknown>;
460
+ callId: string;
461
+ chunkType: "toolRequest";
462
+ name: string;
463
+ commentary?: string | undefined;
464
+ summarizedTitle?: string | undefined;
465
+ };
466
+ role: "agent";
467
+ } | {
468
+ conversationId: string;
469
+ modelName: string;
470
+ modelProviderId: string;
471
+ runId: string;
472
+ createdAt: import("temporal-polyfill").Temporal.Instant;
473
+ id: string;
474
+ content: {
475
+ callId: string;
476
+ chunkType: "toolResponse";
477
+ name: string;
478
+ result: Record<string, unknown>;
479
+ commentary?: string | undefined;
480
+ };
481
+ role: "agent";
482
+ } | {
483
+ conversationId: string;
484
+ modelName: string;
485
+ modelProviderId: string;
486
+ runId: string;
487
+ createdAt: import("temporal-polyfill").Temporal.Instant;
488
+ id: string;
489
+ content: {
490
+ chunkType: "userMessage";
491
+ text: string;
492
+ };
493
+ role: "user";
494
+ })[];
495
+ }, {
496
+ conversationId: string;
497
+ }, import("xstate").EventObject>;
498
+ id: string | undefined;
499
+ } | {
500
+ src: "retrieveState";
501
+ logic: import("xstate").PromiseActorLogic<{
502
+ conversation: {
503
+ createdAt: import("temporal-polyfill").Temporal.Instant;
504
+ currentRunId: string | null;
505
+ id: string;
506
+ modelName: string | null;
507
+ modelProviderId: string | null;
508
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
509
+ tag: string;
510
+ title: string;
511
+ };
512
+ history: {
513
+ data: ({
514
+ conversationId: string;
515
+ modelName: string;
516
+ modelProviderId: string;
517
+ runId: string;
518
+ createdAt: import("temporal-polyfill").Temporal.Instant;
519
+ id: string;
520
+ content: {
521
+ chunkType: "conversationUpdate";
522
+ summary?: string | undefined;
523
+ title?: string | undefined;
524
+ };
525
+ role: "agent";
526
+ } | {
527
+ conversationId: string;
528
+ modelName: string;
529
+ modelProviderId: string;
530
+ runId: string;
531
+ createdAt: import("temporal-polyfill").Temporal.Instant;
532
+ id: string;
533
+ content: {
534
+ chunkType: "error";
535
+ message: string;
536
+ };
537
+ role: "agent";
538
+ } | {
539
+ conversationId: string;
540
+ modelName: string;
541
+ modelProviderId: string;
542
+ runId: string;
543
+ createdAt: import("temporal-polyfill").Temporal.Instant;
544
+ id: string;
545
+ content: {
546
+ chunkType: "model";
547
+ name: string;
548
+ result: Record<string, unknown>;
549
+ };
550
+ role: "agent";
551
+ } | {
552
+ conversationId: string;
553
+ modelName: string;
554
+ modelProviderId: string;
555
+ runId: string;
556
+ createdAt: import("temporal-polyfill").Temporal.Instant;
557
+ id: string;
558
+ content: {
559
+ arguments: Record<string, unknown>;
560
+ callId: string;
561
+ chunkType: "toolRequest";
562
+ name: string;
563
+ commentary?: string | undefined;
564
+ summarizedTitle?: string | undefined;
565
+ };
566
+ role: "agent";
567
+ } | {
568
+ conversationId: string;
569
+ modelName: string;
570
+ modelProviderId: string;
571
+ runId: string;
572
+ createdAt: import("temporal-polyfill").Temporal.Instant;
573
+ id: string;
574
+ content: {
575
+ callId: string;
576
+ chunkType: "toolResponse";
577
+ name: string;
578
+ result: Record<string, unknown>;
579
+ commentary?: string | undefined;
580
+ };
581
+ role: "agent";
582
+ } | {
583
+ conversationId: string;
584
+ modelName: string;
585
+ modelProviderId: string;
586
+ runId: string;
587
+ createdAt: import("temporal-polyfill").Temporal.Instant;
588
+ id: string;
589
+ content: {
590
+ chunkType: "userMessage";
591
+ text: string;
592
+ };
593
+ role: "user";
594
+ })[];
595
+ };
596
+ }, {
597
+ conversationId: string;
598
+ }, import("xstate").EventObject>;
599
+ id: string | undefined;
600
+ } | {
601
+ src: "startRun";
602
+ logic: import("xstate").PromiseActorLogic<{
603
+ conversationProperties: {
604
+ createdAt: import("temporal-polyfill").Temporal.Instant;
605
+ currentRunId: string | null;
606
+ id: string;
607
+ modelName: string | null;
608
+ modelProviderId: string | null;
609
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
610
+ tag: string;
611
+ title: string;
612
+ };
613
+ currentRunId: string;
614
+ }, {
615
+ conversationId: string;
616
+ message: UserChatMessage;
617
+ }, import("xstate").EventObject>;
618
+ id: string | undefined;
619
+ } | {
620
+ src: "stopRun";
621
+ logic: import("xstate").PromiseActorLogic<void, {
622
+ conversationId: string;
623
+ runId: string;
624
+ }, import("xstate").EventObject>;
625
+ id: string | undefined;
626
+ } | {
627
+ src: "streamRun";
628
+ logic: import("xstate").ObservableActorLogic<{
629
+ conversationId: string;
630
+ modelName: string;
631
+ modelProviderId: string;
632
+ runId: string;
633
+ createdAt: import("temporal-polyfill").Temporal.Instant;
634
+ id: string;
635
+ content: {
636
+ chunkType: "conversationUpdate";
637
+ summary?: string | undefined;
638
+ title?: string | undefined;
639
+ };
640
+ role: "agent";
641
+ } | {
642
+ conversationId: string;
643
+ modelName: string;
644
+ modelProviderId: string;
645
+ runId: string;
646
+ createdAt: import("temporal-polyfill").Temporal.Instant;
647
+ id: string;
648
+ content: {
649
+ chunkType: "error";
650
+ message: string;
651
+ };
652
+ role: "agent";
653
+ } | {
654
+ conversationId: string;
655
+ modelName: string;
656
+ modelProviderId: string;
657
+ runId: string;
658
+ createdAt: import("temporal-polyfill").Temporal.Instant;
659
+ id: string;
660
+ content: {
661
+ chunkType: "model";
662
+ name: string;
663
+ result: Record<string, unknown>;
664
+ };
665
+ role: "agent";
666
+ } | {
667
+ conversationId: string;
668
+ modelName: string;
669
+ modelProviderId: string;
670
+ runId: string;
671
+ createdAt: import("temporal-polyfill").Temporal.Instant;
672
+ id: string;
673
+ content: {
674
+ arguments: Record<string, unknown>;
675
+ callId: string;
676
+ chunkType: "toolRequest";
677
+ name: string;
678
+ commentary?: string | undefined;
679
+ summarizedTitle?: string | undefined;
680
+ };
681
+ role: "agent";
682
+ } | {
683
+ conversationId: string;
684
+ modelName: string;
685
+ modelProviderId: string;
686
+ runId: string;
687
+ createdAt: import("temporal-polyfill").Temporal.Instant;
688
+ id: string;
689
+ content: {
690
+ callId: string;
691
+ chunkType: "toolResponse";
692
+ name: string;
693
+ result: Record<string, unknown>;
694
+ commentary?: string | undefined;
695
+ };
696
+ role: "agent";
697
+ } | {
698
+ conversationId: string;
699
+ modelName: string;
700
+ modelProviderId: string;
701
+ runId: string;
702
+ createdAt: import("temporal-polyfill").Temporal.Instant;
703
+ id: string;
704
+ content: {
705
+ chunkType: "userMessage";
706
+ text: string;
707
+ };
708
+ role: "user";
709
+ }, {
710
+ conversationId: string;
711
+ runId: string;
712
+ }, import("xstate").EventObject>;
713
+ id: string | undefined;
714
+ }, never, never, never, "uninitialized" | "creating_conversation" | "retrieving_history" | "idle" | "submitting_message" | "retrieve_history_failed" | "submitting_message_failed" | {
715
+ streaming: "monitoring_replies" | "stopping";
716
+ }, string, import("../../enterprise/ai/conversations/createConversationMachine.ts").ConversationMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
717
+ id: "agentConversation";
718
+ states: {
719
+ readonly creating_conversation: {};
720
+ readonly idle: {};
721
+ readonly retrieve_history_failed: {};
722
+ readonly retrieving_history: {};
723
+ readonly streaming: {
724
+ states: {
725
+ readonly monitoring_replies: {};
726
+ readonly stopping: {};
727
+ };
728
+ };
729
+ readonly submitting_message: {};
730
+ readonly submitting_message_failed: {};
731
+ readonly uninitialized: {};
732
+ };
733
+ }>;
734
+ createConversation(body: z.input<typeof createConversationCodec>): import("ts-results-es").AsyncResult<import("../../enterprise/interfaces.ts").AgentConversation, HttpError>;
735
+ listConversations(): {
736
+ data({ signal }?: SignalParam): AsyncGenerator<import("../../enterprise/interfaces.ts").AgentConversation, void, unknown>;
737
+ getPage: (params: {
738
+ maxResults: number;
739
+ }, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<{
740
+ data: import("../../enterprise/interfaces.ts").AgentConversation[];
741
+ }, HttpError>;
742
+ };
743
+ retrieveConversation(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<{
744
+ createdAt: import("temporal-polyfill").Temporal.Instant;
745
+ currentRunId: string | null;
746
+ id: string;
747
+ modelName: string | null;
748
+ modelProviderId: string | null;
749
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
750
+ tag: string;
751
+ title: string;
752
+ }, HttpError>;
753
+ retrieveConversationHistory(id: string): {
754
+ data(): AsyncGenerator<ChatEvent, void, HttpError>;
755
+ };
72
756
  listModelProviders(): {
73
757
  data({ signal }?: SignalParam): AsyncGenerator<import("ts-results-es").Ok<ModelProvider | DremioModelProvider> | import("ts-results-es").Err<z.core.$ZodError<{
74
758
  name: string;
@@ -108,6 +792,12 @@ export declare class AIResource {
108
792
  organizationId: string;
109
793
  region: "GLOBAL" | "US" | "EU";
110
794
  };
795
+ } | {
796
+ openAiCompatibleApi: {
797
+ completionsApiUrl: string;
798
+ modelParameters?: string | undefined;
799
+ organizationId?: string | undefined;
800
+ };
111
801
  };
112
802
  defaultModelName: string;
113
803
  isDefault: boolean;
@@ -164,6 +854,12 @@ export declare class AIResource {
164
854
  organizationId: string;
165
855
  region: "GLOBAL" | "US" | "EU";
166
856
  };
857
+ } | {
858
+ openAiCompatibleApi: {
859
+ completionsApiUrl: string;
860
+ modelParameters?: string | undefined;
861
+ organizationId?: string | undefined;
862
+ };
167
863
  };
168
864
  defaultModelName: string;
169
865
  isDefault: boolean;
@@ -181,10 +877,13 @@ export declare class AIResource {
181
877
  sqlModelNames: string[];
182
878
  tag: string;
183
879
  }>>)[];
184
- }, import("../index.ts").HttpError>;
880
+ }, HttpError>;
185
881
  };
186
- listAvailableModels(...args: Parameters<ReturnType<typeof listAvailableModels>>): import("ts-results-es").AsyncResult<Set<string>, import("../index.ts").HttpError>;
187
- retrieveModelProvider(id: string): import("ts-results-es").AsyncResult<ModelProvider | DremioModelProvider, import("../index.ts").HttpError | z.core.$ZodError<{
882
+ listAvailableModels(...args: Parameters<ReturnType<typeof listAvailableModels>>): import("ts-results-es").AsyncResult<Set<{
883
+ name: string;
884
+ isRecommended: boolean;
885
+ }>, HttpError>;
886
+ retrieveModelProvider(id: string): import("ts-results-es").AsyncResult<ModelProvider | DremioModelProvider, HttpError | z.core.$ZodError<{
188
887
  name: string;
189
888
  id: string;
190
889
  tag: string;
@@ -222,6 +921,12 @@ export declare class AIResource {
222
921
  organizationId: string;
223
922
  region: "GLOBAL" | "US" | "EU";
224
923
  };
924
+ } | {
925
+ openAiCompatibleApi: {
926
+ completionsApiUrl: string;
927
+ modelParameters?: string | undefined;
928
+ organizationId?: string | undefined;
929
+ };
225
930
  };
226
931
  defaultModelName: string;
227
932
  isDefault: boolean;
@@ -242,14 +947,8 @@ export declare class AIResource {
242
947
  /**
243
948
  * Sends a chat message to the Dremio AI Agent and returns an Observable containing
244
949
  * Agent replies.
950
+ *
951
+ * @deprecated
245
952
  */
246
- sendChatMessage(chatSession: ChatSession, userChatMessage: UserChatMessage): Observable<import("ts-results-es").Ok<AgentChatResponse<AgentResponseContent>> | import("ts-results-es").Err<import("../index.ts").HttpError | import("../index.ts").Problem<"https://api.dremio.dev/problems/ai-agent/chat/agent-disabled" | "https://api.dremio.dev/problems/ai-agent/chat/input-too-large" | "https://api.dremio.dev/problems/ai-agent/chat/model-provider-not-found" | "https://api.dremio.dev/problems/ai-agent/chat/no-default-model-provider" | "https://api.dremio.dev/problems/ai-agent/chat/no-model-provider-privilege" | "https://api.dremio.dev/problems/ai-agent/chat/preview-disabled" | "https://api.dremio.dev/problems/ai-agent/chat/rate-limit-exceeded", undefined>>>;
247
- /**
248
- * Creates an Observable that emits each time the `AgentChatExchange` is updated
249
- * with events from the Agent.
250
- */
251
- createAgentChatExchange$<T extends AgentResponseContent>(chatSession: ChatSession, userChatMessage: UserChatMessage, options?: {
252
- mapChatEvents?: (v: AgentChatResponse<AgentResponseContent>) => Observable<AgentChatResponse<T>>;
253
- }): Observable<AgentChatExchange>;
254
- createChatSessionClient(chatSession: ChatSession): ChatSessionClient;
953
+ sendChatMessage(chatSession: ChatSession, userChatMessage: UserChatMessage): import("rxjs").Observable<import("ts-results-es").Ok<import("./index.ts").AgentChatResponse<import("./index.ts").AgentResponseContent>> | import("ts-results-es").Err<HttpError | import("../index.ts").Problem<"https://api.dremio.dev/problems/ai-agent/chat/agent-disabled" | "https://api.dremio.dev/problems/ai-agent/chat/input-too-large" | "https://api.dremio.dev/problems/ai-agent/chat/model-provider-not-found" | "https://api.dremio.dev/problems/ai-agent/chat/no-default-model-provider" | "https://api.dremio.dev/problems/ai-agent/chat/no-model-provider-privilege" | "https://api.dremio.dev/problems/ai-agent/chat/preview-disabled" | "https://api.dremio.dev/problems/ai-agent/chat/rate-limit-exceeded", undefined>>>;
255
954
  }