@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
@@ -0,0 +1,682 @@
1
+ import type { UserChatMessage } from "../chat/UserChatMessage.ts";
2
+ import { AgentConversation } from "./AgentConversation.ts";
3
+ import type { ConversationExchange } from "./reduceChatEvents.ts";
4
+ import type { SonarV4Config } from "../../../common/Config.ts";
5
+ export type ConversationMachineInput = {
6
+ conversationId: string | null;
7
+ };
8
+ export type ConversationMachineContext = {
9
+ conversationId: string | null;
10
+ conversationSnapshot?: ConversationExchange[];
11
+ currentRunId?: string | null;
12
+ lastError?: unknown;
13
+ messageAttempt?: UserChatMessage;
14
+ };
15
+ export type ConversationMachineEvents = {
16
+ type: "STOP_RUN";
17
+ } | {
18
+ type: "SUBMIT_USER_MESSAGE";
19
+ message: UserChatMessage;
20
+ } | {
21
+ type: "RETRY_MESSAGE";
22
+ } | {
23
+ type: "REFRESH_HISTORY";
24
+ };
25
+ export declare const createConversationMachine: (config: SonarV4Config) => import("xstate").StateMachine<ConversationMachineContext, {
26
+ type: "STOP_RUN";
27
+ } | {
28
+ type: "SUBMIT_USER_MESSAGE";
29
+ message: UserChatMessage;
30
+ } | {
31
+ type: "RETRY_MESSAGE";
32
+ } | {
33
+ type: "REFRESH_HISTORY";
34
+ }, {
35
+ [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<AgentConversation, {
36
+ message: UserChatMessage;
37
+ modelName?: string | undefined;
38
+ modelProviderId?: string | undefined;
39
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
40
+ createdAt: import("temporal-polyfill").Temporal.Instant;
41
+ currentRunId: string | null;
42
+ id: string;
43
+ modelName: string | null;
44
+ modelProviderId: string | null;
45
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
46
+ tag: string;
47
+ title: string;
48
+ }, {
49
+ conversationId: string;
50
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
51
+ data: ({
52
+ conversationId: string;
53
+ modelName: string;
54
+ modelProviderId: string;
55
+ runId: string;
56
+ createdAt: import("temporal-polyfill").Temporal.Instant;
57
+ id: string;
58
+ content: {
59
+ chunkType: "conversationUpdate";
60
+ summary?: string | undefined;
61
+ title?: string | undefined;
62
+ };
63
+ role: "agent";
64
+ } | {
65
+ conversationId: string;
66
+ modelName: string;
67
+ modelProviderId: string;
68
+ runId: string;
69
+ createdAt: import("temporal-polyfill").Temporal.Instant;
70
+ id: string;
71
+ content: {
72
+ chunkType: "error";
73
+ message: string;
74
+ };
75
+ role: "agent";
76
+ } | {
77
+ conversationId: string;
78
+ modelName: string;
79
+ modelProviderId: string;
80
+ runId: string;
81
+ createdAt: import("temporal-polyfill").Temporal.Instant;
82
+ id: string;
83
+ content: {
84
+ chunkType: "model";
85
+ name: string;
86
+ result: Record<string, unknown>;
87
+ };
88
+ role: "agent";
89
+ } | {
90
+ conversationId: string;
91
+ modelName: string;
92
+ modelProviderId: string;
93
+ runId: string;
94
+ createdAt: import("temporal-polyfill").Temporal.Instant;
95
+ id: string;
96
+ content: {
97
+ arguments: Record<string, unknown>;
98
+ callId: string;
99
+ chunkType: "toolRequest";
100
+ name: string;
101
+ commentary?: string | undefined;
102
+ summarizedTitle?: string | undefined;
103
+ };
104
+ role: "agent";
105
+ } | {
106
+ conversationId: string;
107
+ modelName: string;
108
+ modelProviderId: string;
109
+ runId: string;
110
+ createdAt: import("temporal-polyfill").Temporal.Instant;
111
+ id: string;
112
+ content: {
113
+ callId: string;
114
+ chunkType: "toolResponse";
115
+ name: string;
116
+ result: Record<string, unknown>;
117
+ commentary?: string | undefined;
118
+ };
119
+ role: "agent";
120
+ } | {
121
+ conversationId: string;
122
+ modelName: string;
123
+ modelProviderId: string;
124
+ runId: string;
125
+ createdAt: import("temporal-polyfill").Temporal.Instant;
126
+ id: string;
127
+ content: {
128
+ chunkType: "userMessage";
129
+ text: string;
130
+ };
131
+ role: "user";
132
+ })[];
133
+ }, {
134
+ conversationId: string;
135
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
136
+ conversation: {
137
+ createdAt: import("temporal-polyfill").Temporal.Instant;
138
+ currentRunId: string | null;
139
+ id: string;
140
+ modelName: string | null;
141
+ modelProviderId: string | null;
142
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
143
+ tag: string;
144
+ title: string;
145
+ };
146
+ history: {
147
+ data: ({
148
+ conversationId: string;
149
+ modelName: string;
150
+ modelProviderId: string;
151
+ runId: string;
152
+ createdAt: import("temporal-polyfill").Temporal.Instant;
153
+ id: string;
154
+ content: {
155
+ chunkType: "conversationUpdate";
156
+ summary?: string | undefined;
157
+ title?: string | undefined;
158
+ };
159
+ role: "agent";
160
+ } | {
161
+ conversationId: string;
162
+ modelName: string;
163
+ modelProviderId: string;
164
+ runId: string;
165
+ createdAt: import("temporal-polyfill").Temporal.Instant;
166
+ id: string;
167
+ content: {
168
+ chunkType: "error";
169
+ message: string;
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: "model";
181
+ name: string;
182
+ result: Record<string, unknown>;
183
+ };
184
+ role: "agent";
185
+ } | {
186
+ conversationId: string;
187
+ modelName: string;
188
+ modelProviderId: string;
189
+ runId: string;
190
+ createdAt: import("temporal-polyfill").Temporal.Instant;
191
+ id: string;
192
+ content: {
193
+ arguments: Record<string, unknown>;
194
+ callId: string;
195
+ chunkType: "toolRequest";
196
+ name: string;
197
+ commentary?: string | undefined;
198
+ summarizedTitle?: string | undefined;
199
+ };
200
+ role: "agent";
201
+ } | {
202
+ conversationId: string;
203
+ modelName: string;
204
+ modelProviderId: string;
205
+ runId: string;
206
+ createdAt: import("temporal-polyfill").Temporal.Instant;
207
+ id: string;
208
+ content: {
209
+ callId: string;
210
+ chunkType: "toolResponse";
211
+ name: string;
212
+ result: Record<string, unknown>;
213
+ commentary?: string | undefined;
214
+ };
215
+ role: "agent";
216
+ } | {
217
+ conversationId: string;
218
+ modelName: string;
219
+ modelProviderId: string;
220
+ runId: string;
221
+ createdAt: import("temporal-polyfill").Temporal.Instant;
222
+ id: string;
223
+ content: {
224
+ chunkType: "userMessage";
225
+ text: string;
226
+ };
227
+ role: "user";
228
+ })[];
229
+ };
230
+ }, {
231
+ conversationId: string;
232
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
233
+ conversationProperties: {
234
+ createdAt: import("temporal-polyfill").Temporal.Instant;
235
+ currentRunId: string | null;
236
+ id: string;
237
+ modelName: string | null;
238
+ modelProviderId: string | null;
239
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
240
+ tag: string;
241
+ title: string;
242
+ };
243
+ currentRunId: string;
244
+ }, {
245
+ conversationId: string;
246
+ message: UserChatMessage;
247
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
248
+ conversationId: string;
249
+ runId: string;
250
+ }, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<{
251
+ conversationId: string;
252
+ modelName: string;
253
+ modelProviderId: string;
254
+ runId: string;
255
+ createdAt: import("temporal-polyfill").Temporal.Instant;
256
+ id: string;
257
+ content: {
258
+ chunkType: "conversationUpdate";
259
+ summary?: string | undefined;
260
+ title?: string | undefined;
261
+ };
262
+ role: "agent";
263
+ } | {
264
+ conversationId: string;
265
+ modelName: string;
266
+ modelProviderId: string;
267
+ runId: string;
268
+ createdAt: import("temporal-polyfill").Temporal.Instant;
269
+ id: string;
270
+ content: {
271
+ chunkType: "error";
272
+ message: string;
273
+ };
274
+ role: "agent";
275
+ } | {
276
+ conversationId: string;
277
+ modelName: string;
278
+ modelProviderId: string;
279
+ runId: string;
280
+ createdAt: import("temporal-polyfill").Temporal.Instant;
281
+ id: string;
282
+ content: {
283
+ chunkType: "model";
284
+ name: string;
285
+ result: Record<string, unknown>;
286
+ };
287
+ role: "agent";
288
+ } | {
289
+ conversationId: string;
290
+ modelName: string;
291
+ modelProviderId: string;
292
+ runId: string;
293
+ createdAt: import("temporal-polyfill").Temporal.Instant;
294
+ id: string;
295
+ content: {
296
+ arguments: Record<string, unknown>;
297
+ callId: string;
298
+ chunkType: "toolRequest";
299
+ name: string;
300
+ commentary?: string | undefined;
301
+ summarizedTitle?: string | undefined;
302
+ };
303
+ role: "agent";
304
+ } | {
305
+ conversationId: string;
306
+ modelName: string;
307
+ modelProviderId: string;
308
+ runId: string;
309
+ createdAt: import("temporal-polyfill").Temporal.Instant;
310
+ id: string;
311
+ content: {
312
+ callId: string;
313
+ chunkType: "toolResponse";
314
+ name: string;
315
+ result: Record<string, unknown>;
316
+ commentary?: string | undefined;
317
+ };
318
+ role: "agent";
319
+ } | {
320
+ conversationId: string;
321
+ modelName: string;
322
+ modelProviderId: string;
323
+ runId: string;
324
+ createdAt: import("temporal-polyfill").Temporal.Instant;
325
+ id: string;
326
+ content: {
327
+ chunkType: "userMessage";
328
+ text: string;
329
+ };
330
+ role: "user";
331
+ }, {
332
+ conversationId: string;
333
+ runId: string;
334
+ }, import("xstate").EventObject>> | undefined;
335
+ }, {
336
+ src: "createConversation";
337
+ logic: import("xstate").PromiseActorLogic<AgentConversation, {
338
+ message: UserChatMessage;
339
+ modelName?: string | undefined;
340
+ modelProviderId?: string | undefined;
341
+ }, import("xstate").EventObject>;
342
+ id: string | undefined;
343
+ } | {
344
+ src: "retrieveConversation";
345
+ logic: import("xstate").PromiseActorLogic<{
346
+ createdAt: import("temporal-polyfill").Temporal.Instant;
347
+ currentRunId: string | null;
348
+ id: string;
349
+ modelName: string | null;
350
+ modelProviderId: string | null;
351
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
352
+ tag: string;
353
+ title: string;
354
+ }, {
355
+ conversationId: string;
356
+ }, import("xstate").EventObject>;
357
+ id: string | undefined;
358
+ } | {
359
+ src: "retrieveHistory";
360
+ logic: import("xstate").PromiseActorLogic<{
361
+ data: ({
362
+ conversationId: string;
363
+ modelName: string;
364
+ modelProviderId: string;
365
+ runId: string;
366
+ createdAt: import("temporal-polyfill").Temporal.Instant;
367
+ id: string;
368
+ content: {
369
+ chunkType: "conversationUpdate";
370
+ summary?: string | undefined;
371
+ title?: string | undefined;
372
+ };
373
+ role: "agent";
374
+ } | {
375
+ conversationId: string;
376
+ modelName: string;
377
+ modelProviderId: string;
378
+ runId: string;
379
+ createdAt: import("temporal-polyfill").Temporal.Instant;
380
+ id: string;
381
+ content: {
382
+ chunkType: "error";
383
+ message: string;
384
+ };
385
+ role: "agent";
386
+ } | {
387
+ conversationId: string;
388
+ modelName: string;
389
+ modelProviderId: string;
390
+ runId: string;
391
+ createdAt: import("temporal-polyfill").Temporal.Instant;
392
+ id: string;
393
+ content: {
394
+ chunkType: "model";
395
+ name: string;
396
+ result: Record<string, unknown>;
397
+ };
398
+ role: "agent";
399
+ } | {
400
+ conversationId: string;
401
+ modelName: string;
402
+ modelProviderId: string;
403
+ runId: string;
404
+ createdAt: import("temporal-polyfill").Temporal.Instant;
405
+ id: string;
406
+ content: {
407
+ arguments: Record<string, unknown>;
408
+ callId: string;
409
+ chunkType: "toolRequest";
410
+ name: string;
411
+ commentary?: string | undefined;
412
+ summarizedTitle?: string | undefined;
413
+ };
414
+ role: "agent";
415
+ } | {
416
+ conversationId: string;
417
+ modelName: string;
418
+ modelProviderId: string;
419
+ runId: string;
420
+ createdAt: import("temporal-polyfill").Temporal.Instant;
421
+ id: string;
422
+ content: {
423
+ callId: string;
424
+ chunkType: "toolResponse";
425
+ name: string;
426
+ result: Record<string, unknown>;
427
+ commentary?: string | undefined;
428
+ };
429
+ role: "agent";
430
+ } | {
431
+ conversationId: string;
432
+ modelName: string;
433
+ modelProviderId: string;
434
+ runId: string;
435
+ createdAt: import("temporal-polyfill").Temporal.Instant;
436
+ id: string;
437
+ content: {
438
+ chunkType: "userMessage";
439
+ text: string;
440
+ };
441
+ role: "user";
442
+ })[];
443
+ }, {
444
+ conversationId: string;
445
+ }, import("xstate").EventObject>;
446
+ id: string | undefined;
447
+ } | {
448
+ src: "retrieveState";
449
+ logic: import("xstate").PromiseActorLogic<{
450
+ conversation: {
451
+ createdAt: import("temporal-polyfill").Temporal.Instant;
452
+ currentRunId: string | null;
453
+ id: string;
454
+ modelName: string | null;
455
+ modelProviderId: string | null;
456
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
457
+ tag: string;
458
+ title: string;
459
+ };
460
+ history: {
461
+ data: ({
462
+ conversationId: string;
463
+ modelName: string;
464
+ modelProviderId: string;
465
+ runId: string;
466
+ createdAt: import("temporal-polyfill").Temporal.Instant;
467
+ id: string;
468
+ content: {
469
+ chunkType: "conversationUpdate";
470
+ summary?: string | undefined;
471
+ title?: string | undefined;
472
+ };
473
+ role: "agent";
474
+ } | {
475
+ conversationId: string;
476
+ modelName: string;
477
+ modelProviderId: string;
478
+ runId: string;
479
+ createdAt: import("temporal-polyfill").Temporal.Instant;
480
+ id: string;
481
+ content: {
482
+ chunkType: "error";
483
+ message: string;
484
+ };
485
+ role: "agent";
486
+ } | {
487
+ conversationId: string;
488
+ modelName: string;
489
+ modelProviderId: string;
490
+ runId: string;
491
+ createdAt: import("temporal-polyfill").Temporal.Instant;
492
+ id: string;
493
+ content: {
494
+ chunkType: "model";
495
+ name: string;
496
+ result: Record<string, unknown>;
497
+ };
498
+ role: "agent";
499
+ } | {
500
+ conversationId: string;
501
+ modelName: string;
502
+ modelProviderId: string;
503
+ runId: string;
504
+ createdAt: import("temporal-polyfill").Temporal.Instant;
505
+ id: string;
506
+ content: {
507
+ arguments: Record<string, unknown>;
508
+ callId: string;
509
+ chunkType: "toolRequest";
510
+ name: string;
511
+ commentary?: string | undefined;
512
+ summarizedTitle?: string | undefined;
513
+ };
514
+ role: "agent";
515
+ } | {
516
+ conversationId: string;
517
+ modelName: string;
518
+ modelProviderId: string;
519
+ runId: string;
520
+ createdAt: import("temporal-polyfill").Temporal.Instant;
521
+ id: string;
522
+ content: {
523
+ callId: string;
524
+ chunkType: "toolResponse";
525
+ name: string;
526
+ result: Record<string, unknown>;
527
+ commentary?: string | undefined;
528
+ };
529
+ role: "agent";
530
+ } | {
531
+ conversationId: string;
532
+ modelName: string;
533
+ modelProviderId: string;
534
+ runId: string;
535
+ createdAt: import("temporal-polyfill").Temporal.Instant;
536
+ id: string;
537
+ content: {
538
+ chunkType: "userMessage";
539
+ text: string;
540
+ };
541
+ role: "user";
542
+ })[];
543
+ };
544
+ }, {
545
+ conversationId: string;
546
+ }, import("xstate").EventObject>;
547
+ id: string | undefined;
548
+ } | {
549
+ src: "startRun";
550
+ logic: import("xstate").PromiseActorLogic<{
551
+ conversationProperties: {
552
+ createdAt: import("temporal-polyfill").Temporal.Instant;
553
+ currentRunId: string | null;
554
+ id: string;
555
+ modelName: string | null;
556
+ modelProviderId: string | null;
557
+ modifiedAt: import("temporal-polyfill").Temporal.Instant;
558
+ tag: string;
559
+ title: string;
560
+ };
561
+ currentRunId: string;
562
+ }, {
563
+ conversationId: string;
564
+ message: UserChatMessage;
565
+ }, import("xstate").EventObject>;
566
+ id: string | undefined;
567
+ } | {
568
+ src: "stopRun";
569
+ logic: import("xstate").PromiseActorLogic<void, {
570
+ conversationId: string;
571
+ runId: string;
572
+ }, import("xstate").EventObject>;
573
+ id: string | undefined;
574
+ } | {
575
+ src: "streamRun";
576
+ logic: import("xstate").ObservableActorLogic<{
577
+ conversationId: string;
578
+ modelName: string;
579
+ modelProviderId: string;
580
+ runId: string;
581
+ createdAt: import("temporal-polyfill").Temporal.Instant;
582
+ id: string;
583
+ content: {
584
+ chunkType: "conversationUpdate";
585
+ summary?: string | undefined;
586
+ title?: string | undefined;
587
+ };
588
+ role: "agent";
589
+ } | {
590
+ conversationId: string;
591
+ modelName: string;
592
+ modelProviderId: string;
593
+ runId: string;
594
+ createdAt: import("temporal-polyfill").Temporal.Instant;
595
+ id: string;
596
+ content: {
597
+ chunkType: "error";
598
+ message: string;
599
+ };
600
+ role: "agent";
601
+ } | {
602
+ conversationId: string;
603
+ modelName: string;
604
+ modelProviderId: string;
605
+ runId: string;
606
+ createdAt: import("temporal-polyfill").Temporal.Instant;
607
+ id: string;
608
+ content: {
609
+ chunkType: "model";
610
+ name: string;
611
+ result: Record<string, unknown>;
612
+ };
613
+ role: "agent";
614
+ } | {
615
+ conversationId: string;
616
+ modelName: string;
617
+ modelProviderId: string;
618
+ runId: string;
619
+ createdAt: import("temporal-polyfill").Temporal.Instant;
620
+ id: string;
621
+ content: {
622
+ arguments: Record<string, unknown>;
623
+ callId: string;
624
+ chunkType: "toolRequest";
625
+ name: string;
626
+ commentary?: string | undefined;
627
+ summarizedTitle?: string | undefined;
628
+ };
629
+ role: "agent";
630
+ } | {
631
+ conversationId: string;
632
+ modelName: string;
633
+ modelProviderId: string;
634
+ runId: string;
635
+ createdAt: import("temporal-polyfill").Temporal.Instant;
636
+ id: string;
637
+ content: {
638
+ callId: string;
639
+ chunkType: "toolResponse";
640
+ name: string;
641
+ result: Record<string, unknown>;
642
+ commentary?: string | undefined;
643
+ };
644
+ role: "agent";
645
+ } | {
646
+ conversationId: string;
647
+ modelName: string;
648
+ modelProviderId: string;
649
+ runId: string;
650
+ createdAt: import("temporal-polyfill").Temporal.Instant;
651
+ id: string;
652
+ content: {
653
+ chunkType: "userMessage";
654
+ text: string;
655
+ };
656
+ role: "user";
657
+ }, {
658
+ conversationId: string;
659
+ runId: string;
660
+ }, import("xstate").EventObject>;
661
+ id: string | undefined;
662
+ }, never, never, never, "uninitialized" | "creating_conversation" | "retrieving_history" | "idle" | "submitting_message" | "retrieve_history_failed" | "submitting_message_failed" | {
663
+ streaming: "monitoring_replies" | "stopping";
664
+ }, string, ConversationMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
665
+ id: "agentConversation";
666
+ states: {
667
+ readonly creating_conversation: {};
668
+ readonly idle: {};
669
+ readonly retrieve_history_failed: {};
670
+ readonly retrieving_history: {};
671
+ readonly streaming: {
672
+ states: {
673
+ readonly monitoring_replies: {};
674
+ readonly stopping: {};
675
+ };
676
+ };
677
+ readonly submitting_message: {};
678
+ readonly submitting_message_failed: {};
679
+ readonly uninitialized: {};
680
+ };
681
+ }>;
682
+ export type AgentConversationMachine = ReturnType<typeof createConversationMachine>;