@dremio/js-sdk 0.58.0 → 0.60.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.
- package/README.md +9 -0
- package/dist/cloud/ai/AIResource.d.ts +93 -13
- package/dist/enterprise/ai/AIResource.d.ts +93 -13
- package/dist/enterprise/ai/chat/UserChatMessage.d.ts +0 -2
- package/dist/enterprise/ai/chat/UserChatMessage.js +0 -1
- package/dist/enterprise/ai/chat/UserChatMessage.js.map +1 -1
- package/dist/enterprise/ai/chat/chatEventSchema.d.ts +26 -3
- package/dist/enterprise/ai/chat/chatEventSchema.js +61 -11
- package/dist/enterprise/ai/chat/chatEventSchema.js.map +1 -1
- package/dist/enterprise/ai/conversations/AgentConversation.d.ts +30 -4
- package/dist/enterprise/ai/conversations/createConversationMachine.d.ts +97 -13
- package/dist/enterprise/ai/conversations/createConversationMachine.js +80 -11
- package/dist/enterprise/ai/conversations/createConversationMachine.js.map +1 -1
- package/dist/enterprise/ai/conversations/methods/createConversation.d.ts +0 -1
- package/dist/enterprise/ai/conversations/methods/createConversation.js +0 -2
- package/dist/enterprise/ai/conversations/methods/createConversation.js.map +1 -1
- package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.d.ts +15 -2
- package/dist/enterprise/ai/conversations/reduceChatEvents.d.ts +1 -1
- package/dist/enterprise/ai/conversations/reduceChatEvents.js +4 -1
- package/dist/enterprise/ai/conversations/reduceChatEvents.js.map +1 -1
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.d.ts +7 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js +3 -0
- package/dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js.map +1 -1
- package/dist-iife/cloud.js +150 -32
- package/dist-iife/enterprise.js +150 -32
- package/package.json +1 -1
package/dist-iife/cloud.js
CHANGED
|
@@ -4718,9 +4718,11 @@ var DremioCloud = (() => {
|
|
|
4718
4718
|
// dist/enterprise/catalog/CatalogObjects/EnterpriseDatasetCatalogObject.js
|
|
4719
4719
|
var EnterpriseDatasetCatalogObject = class extends DatasetCatalogObject {
|
|
4720
4720
|
owner;
|
|
4721
|
+
vizAttributes;
|
|
4721
4722
|
constructor(properties) {
|
|
4722
4723
|
super(properties);
|
|
4723
4724
|
this.owner = properties.owner;
|
|
4725
|
+
this.vizAttributes = properties.vizAttributes;
|
|
4724
4726
|
}
|
|
4725
4727
|
grants() {
|
|
4726
4728
|
return this.catalogReference.grants();
|
|
@@ -4738,7 +4740,8 @@ var DremioCloud = (() => {
|
|
|
4738
4740
|
owner: entity.owner ? {
|
|
4739
4741
|
id: entity.owner.ownerId,
|
|
4740
4742
|
type: entity.owner.ownerType
|
|
4741
|
-
} : void 0
|
|
4743
|
+
} : void 0,
|
|
4744
|
+
vizAttributes: entity.vizAttributes
|
|
4742
4745
|
};
|
|
4743
4746
|
};
|
|
4744
4747
|
|
|
@@ -17128,6 +17131,14 @@ var DremioCloud = (() => {
|
|
|
17128
17131
|
var endOfStreamChunkSchema = object({
|
|
17129
17132
|
chunkType: literal("endOfStream")
|
|
17130
17133
|
});
|
|
17134
|
+
var endOfStreamInputSchema = object({
|
|
17135
|
+
chunkType: literal("endOfStream"),
|
|
17136
|
+
conversationId: string2(),
|
|
17137
|
+
createdAt: string2().check(iso_exports.datetime()),
|
|
17138
|
+
modelName: string2(),
|
|
17139
|
+
modelProviderId: string2(),
|
|
17140
|
+
runId: string2()
|
|
17141
|
+
});
|
|
17131
17142
|
var interruptChunkSchema = object({
|
|
17132
17143
|
chunkType: literal("interrupt")
|
|
17133
17144
|
});
|
|
@@ -17147,6 +17158,14 @@ var DremioCloud = (() => {
|
|
|
17147
17158
|
stepName: string2(),
|
|
17148
17159
|
text: string2()
|
|
17149
17160
|
});
|
|
17161
|
+
var sandboxStdoutChunkSchema = object({
|
|
17162
|
+
callId: string2().check(_trim(), _minLength(1)),
|
|
17163
|
+
chunkType: literal("sandboxStdout"),
|
|
17164
|
+
isFinal: boolean2(),
|
|
17165
|
+
text: string2()
|
|
17166
|
+
});
|
|
17167
|
+
var sandboxStdoutContentSchema = sandboxStdoutChunkSchema;
|
|
17168
|
+
var sandboxStdoutChatEventSchema = extend2(sandboxStdoutChunkSchema, chatEventSharedSchema);
|
|
17150
17169
|
var toolPlanSchema = record(string2(), unknown());
|
|
17151
17170
|
var toolRequestChunkSchema = object({
|
|
17152
17171
|
arguments: record(string2(), unknown()),
|
|
@@ -17184,12 +17203,13 @@ var DremioCloud = (() => {
|
|
|
17184
17203
|
]);
|
|
17185
17204
|
var chatEventInputSchema = discriminatedUnion("chunkType", [
|
|
17186
17205
|
extend2(errorChunkV2Schema, chatEventSharedSchema),
|
|
17187
|
-
|
|
17206
|
+
endOfStreamInputSchema,
|
|
17188
17207
|
extend2(interruptChunkSchema, chatEventSharedSchema),
|
|
17189
17208
|
extend2(conversationUpdateChunkSchema, chatEventSharedSchema),
|
|
17190
17209
|
extend2(jobUpdateChunkSchema, chatEventSharedSchema),
|
|
17191
17210
|
extend2(modelChunkSchema, chatEventSharedSchema),
|
|
17192
17211
|
extend2(sandboxProgressChunkSchema, chatEventSharedSchema),
|
|
17212
|
+
sandboxStdoutChatEventSchema,
|
|
17193
17213
|
extend2(toolRequestChunkSchema, chatEventSharedSchema),
|
|
17194
17214
|
extend2(toolResponseChunkSchema, chatEventSharedSchema),
|
|
17195
17215
|
extend2(userMessageChunkSchema, chatEventSharedSchema)
|
|
@@ -17198,13 +17218,14 @@ var DremioCloud = (() => {
|
|
|
17198
17218
|
createdAt: _instanceof(Xn.Instant),
|
|
17199
17219
|
id: string2()
|
|
17200
17220
|
});
|
|
17221
|
+
var endOfStreamOutputSchema = omit2(chatEventOutputSharedSchema, { id: true });
|
|
17201
17222
|
var chatEventOutputSchema = union([
|
|
17202
17223
|
extend2(chatEventOutputSharedSchema, {
|
|
17203
17224
|
content: conversationUpdateChunkSchema,
|
|
17204
17225
|
role: literal("agent")
|
|
17205
17226
|
}),
|
|
17206
17227
|
extend2(chatEventOutputSharedSchema, { content: errorChunkV2Schema, role: literal("agent") }),
|
|
17207
|
-
extend2(
|
|
17228
|
+
extend2(endOfStreamOutputSchema, {
|
|
17208
17229
|
content: endOfStreamChunkSchema,
|
|
17209
17230
|
role: literal("agent")
|
|
17210
17231
|
}),
|
|
@@ -17221,6 +17242,10 @@ var DremioCloud = (() => {
|
|
|
17221
17242
|
content: sandboxProgressChunkSchema,
|
|
17222
17243
|
role: literal("agent")
|
|
17223
17244
|
}),
|
|
17245
|
+
extend2(chatEventOutputSharedSchema, {
|
|
17246
|
+
content: sandboxStdoutContentSchema,
|
|
17247
|
+
role: literal("agent")
|
|
17248
|
+
}),
|
|
17224
17249
|
extend2(chatEventOutputSharedSchema, {
|
|
17225
17250
|
content: toolRequestChunkSchema,
|
|
17226
17251
|
role: literal("agent")
|
|
@@ -17236,6 +17261,17 @@ var DremioCloud = (() => {
|
|
|
17236
17261
|
]);
|
|
17237
17262
|
var chatEventCodec = codec(chatEventInputSchema, chatEventOutputSchema, {
|
|
17238
17263
|
decode(v2) {
|
|
17264
|
+
if (v2.chunkType === "endOfStream") {
|
|
17265
|
+
return {
|
|
17266
|
+
content: { chunkType: "endOfStream" },
|
|
17267
|
+
conversationId: v2.conversationId,
|
|
17268
|
+
createdAt: Xn.Instant.from(v2.createdAt),
|
|
17269
|
+
modelName: v2.modelName,
|
|
17270
|
+
modelProviderId: v2.modelProviderId,
|
|
17271
|
+
role: "agent",
|
|
17272
|
+
runId: v2.runId
|
|
17273
|
+
};
|
|
17274
|
+
}
|
|
17239
17275
|
const sharedProperties = {
|
|
17240
17276
|
conversationId: v2.conversationId,
|
|
17241
17277
|
createdAt: Xn.Instant.from(v2.createdAt),
|
|
@@ -17265,14 +17301,6 @@ var DremioCloud = (() => {
|
|
|
17265
17301
|
},
|
|
17266
17302
|
role: "agent"
|
|
17267
17303
|
};
|
|
17268
|
-
case "endOfStream":
|
|
17269
|
-
return {
|
|
17270
|
-
...sharedProperties,
|
|
17271
|
-
content: {
|
|
17272
|
-
chunkType: "endOfStream"
|
|
17273
|
-
},
|
|
17274
|
-
role: "agent"
|
|
17275
|
-
};
|
|
17276
17304
|
case "interrupt":
|
|
17277
17305
|
return {
|
|
17278
17306
|
...sharedProperties,
|
|
@@ -17313,6 +17341,17 @@ var DremioCloud = (() => {
|
|
|
17313
17341
|
},
|
|
17314
17342
|
role: "agent"
|
|
17315
17343
|
};
|
|
17344
|
+
case "sandboxStdout":
|
|
17345
|
+
return {
|
|
17346
|
+
...sharedProperties,
|
|
17347
|
+
content: {
|
|
17348
|
+
callId: v2.callId,
|
|
17349
|
+
chunkType: "sandboxStdout",
|
|
17350
|
+
isFinal: v2.isFinal,
|
|
17351
|
+
text: v2.text
|
|
17352
|
+
},
|
|
17353
|
+
role: "agent"
|
|
17354
|
+
};
|
|
17316
17355
|
case "toolRequest":
|
|
17317
17356
|
return {
|
|
17318
17357
|
...sharedProperties,
|
|
@@ -17349,10 +17388,21 @@ var DremioCloud = (() => {
|
|
|
17349
17388
|
}
|
|
17350
17389
|
},
|
|
17351
17390
|
encode(v2) {
|
|
17391
|
+
if (v2.content.chunkType === "endOfStream") {
|
|
17392
|
+
return {
|
|
17393
|
+
chunkType: "endOfStream",
|
|
17394
|
+
conversationId: v2.conversationId,
|
|
17395
|
+
createdAt: v2.createdAt.toString(),
|
|
17396
|
+
modelName: v2.modelName,
|
|
17397
|
+
modelProviderId: v2.modelProviderId,
|
|
17398
|
+
runId: v2.runId
|
|
17399
|
+
};
|
|
17400
|
+
}
|
|
17401
|
+
const id = v2.id;
|
|
17352
17402
|
return {
|
|
17353
17403
|
conversationId: v2.conversationId,
|
|
17354
17404
|
createdAt: v2.createdAt.toString(),
|
|
17355
|
-
messageId:
|
|
17405
|
+
messageId: id,
|
|
17356
17406
|
modelName: v2.modelName,
|
|
17357
17407
|
modelProviderId: v2.modelProviderId,
|
|
17358
17408
|
runId: v2.runId,
|
|
@@ -17498,7 +17548,6 @@ var DremioCloud = (() => {
|
|
|
17498
17548
|
};
|
|
17499
17549
|
var createConversationPromptSchema = strictObject({
|
|
17500
17550
|
acceptTaskNames: optional(array(string2())),
|
|
17501
|
-
approvalResponseOnly: optional(boolean2()),
|
|
17502
17551
|
approvals: optional(object({
|
|
17503
17552
|
allToolsAllowed: boolean2(),
|
|
17504
17553
|
approvalNonce: string2(),
|
|
@@ -17980,7 +18029,6 @@ var DremioCloud = (() => {
|
|
|
17980
18029
|
modelProviderId: v2.modelProviderId,
|
|
17981
18030
|
prompt: {
|
|
17982
18031
|
acceptTaskNames: v2.message.prompt?.acceptTaskNames,
|
|
17983
|
-
approvalResponseOnly: v2.message.prompt?.approvalResponseOnly,
|
|
17984
18032
|
approvals: v2.message.prompt?.approvals,
|
|
17985
18033
|
context: v2.message.prompt?.context,
|
|
17986
18034
|
skillIds: v2.message.prompt?.skillIds,
|
|
@@ -17992,7 +18040,6 @@ var DremioCloud = (() => {
|
|
|
17992
18040
|
return {
|
|
17993
18041
|
message: UserChatMessage.new(v2.prompt.text, {
|
|
17994
18042
|
acceptTaskNames: v2.prompt?.acceptTaskNames,
|
|
17995
|
-
approvalResponseOnly: v2.prompt?.approvalResponseOnly,
|
|
17996
18043
|
approvals: v2.prompt?.approvals,
|
|
17997
18044
|
context: v2.prompt?.context,
|
|
17998
18045
|
skillIds: v2.prompt?.skillIds
|
|
@@ -19376,8 +19423,10 @@ var DremioCloud = (() => {
|
|
|
19376
19423
|
case "error":
|
|
19377
19424
|
case "model":
|
|
19378
19425
|
case "sandboxProgress":
|
|
19426
|
+
case "sandboxStdout":
|
|
19379
19427
|
case "userMessage": {
|
|
19380
|
-
|
|
19428
|
+
const event = chatEvent;
|
|
19429
|
+
conversationExchange.messages.set(event.id, event);
|
|
19381
19430
|
break;
|
|
19382
19431
|
}
|
|
19383
19432
|
case "toolRequest":
|
|
@@ -22876,6 +22925,14 @@ ${err.message}`);
|
|
|
22876
22925
|
}
|
|
22877
22926
|
|
|
22878
22927
|
// dist/enterprise/ai/conversations/createConversationMachine.js
|
|
22928
|
+
var RETRIEVE_STATE_TIMEOUT_MS = 1e4;
|
|
22929
|
+
var STREAM_RETRY_DELAY_MS = 2500;
|
|
22930
|
+
var MAX_STREAM_RETRIES = 5;
|
|
22931
|
+
var STREAM_STATE_RESET = {
|
|
22932
|
+
receivedEndOfStream: false,
|
|
22933
|
+
streamRetryCount: 0,
|
|
22934
|
+
userRequestedStop: false
|
|
22935
|
+
};
|
|
22879
22936
|
var createConversationMachine = (config3) => setup({
|
|
22880
22937
|
actors: {
|
|
22881
22938
|
createConversation: fromPromise2(({ input }) => createConversation(config3)(input).then((result) => {
|
|
@@ -22897,9 +22954,13 @@ ${err.message}`);
|
|
|
22897
22954
|
return result.value;
|
|
22898
22955
|
})),
|
|
22899
22956
|
retrieveState: fromPromise2(async ({ input, signal }) => {
|
|
22957
|
+
const timeoutSignal = AbortSignal.any([
|
|
22958
|
+
signal,
|
|
22959
|
+
AbortSignal.timeout(RETRIEVE_STATE_TIMEOUT_MS)
|
|
22960
|
+
]);
|
|
22900
22961
|
const [conversationResult, historyResult] = await Promise.all([
|
|
22901
|
-
retrieveConversation(config3)(input.conversationId, { signal }),
|
|
22902
|
-
retrieveConversationHistory(config3)(input.conversationId, { signal })
|
|
22962
|
+
retrieveConversation(config3)(input.conversationId, { signal: timeoutSignal }),
|
|
22963
|
+
retrieveConversationHistory(config3)(input.conversationId, { signal: timeoutSignal })
|
|
22903
22964
|
]);
|
|
22904
22965
|
if (conversationResult.isErr()) {
|
|
22905
22966
|
throw conversationResult.error;
|
|
@@ -22926,6 +22987,9 @@ ${err.message}`);
|
|
|
22926
22987
|
})),
|
|
22927
22988
|
streamRun: fromObservable(({ input }) => fromTextEventStream(({ signal }) => streamRunEvents(config3)({ conversationId: input.conversationId, runId: input.runId }, { signal })).pipe(map((event) => decode(chatEventCodec, JSON.parse(event.data)))))
|
|
22928
22989
|
},
|
|
22990
|
+
delays: {
|
|
22991
|
+
STREAM_RETRY_DELAY: STREAM_RETRY_DELAY_MS
|
|
22992
|
+
},
|
|
22929
22993
|
types: {
|
|
22930
22994
|
context: {},
|
|
22931
22995
|
emitted: {},
|
|
@@ -22937,7 +23001,8 @@ ${err.message}`);
|
|
|
22937
23001
|
conversationId: input.conversationId,
|
|
22938
23002
|
conversationSnapshot: void 0,
|
|
22939
23003
|
currentRunId: void 0,
|
|
22940
|
-
messageAttempt: void 0
|
|
23004
|
+
messageAttempt: void 0,
|
|
23005
|
+
...STREAM_STATE_RESET
|
|
22941
23006
|
}),
|
|
22942
23007
|
id: "agentConversation",
|
|
22943
23008
|
initial: "uninitialized",
|
|
@@ -22964,7 +23029,8 @@ ${err.message}`);
|
|
|
22964
23029
|
}
|
|
22965
23030
|
],
|
|
22966
23031
|
currentRunId: ({ event }) => event.output.currentRunId,
|
|
22967
|
-
messageAttempt: void 0
|
|
23032
|
+
messageAttempt: void 0,
|
|
23033
|
+
...STREAM_STATE_RESET
|
|
22968
23034
|
}),
|
|
22969
23035
|
emit(({ event }) => ({
|
|
22970
23036
|
id: event.output.id,
|
|
@@ -23027,7 +23093,8 @@ ${err.message}`);
|
|
|
23027
23093
|
{
|
|
23028
23094
|
actions: assign({
|
|
23029
23095
|
conversationSnapshot: ({ context: context2, event }) => AgentConversation.reduceChatEvents(context2.conversationSnapshot, event.output.history.data),
|
|
23030
|
-
currentRunId: ({ event }) => event.output.conversation.currentRunId
|
|
23096
|
+
currentRunId: ({ event }) => event.output.conversation.currentRunId,
|
|
23097
|
+
receivedEndOfStream: false
|
|
23031
23098
|
}),
|
|
23032
23099
|
guard: ({ event }) => !!event.output.conversation.currentRunId,
|
|
23033
23100
|
target: "streaming"
|
|
@@ -23035,7 +23102,8 @@ ${err.message}`);
|
|
|
23035
23102
|
{
|
|
23036
23103
|
actions: assign({
|
|
23037
23104
|
conversationSnapshot: ({ context: context2, event }) => AgentConversation.reduceChatEvents(context2.conversationSnapshot, event.output.history.data),
|
|
23038
|
-
currentRunId: ({ event }) => event.output.conversation.currentRunId
|
|
23105
|
+
currentRunId: ({ event }) => event.output.conversation.currentRunId,
|
|
23106
|
+
...STREAM_STATE_RESET
|
|
23039
23107
|
}),
|
|
23040
23108
|
target: "idle"
|
|
23041
23109
|
}
|
|
@@ -23044,10 +23112,16 @@ ${err.message}`);
|
|
|
23044
23112
|
{
|
|
23045
23113
|
guard: ({ event }) => {
|
|
23046
23114
|
const e2 = event.error;
|
|
23115
|
+
if (e2?.name === "TimeoutError")
|
|
23116
|
+
return false;
|
|
23047
23117
|
return e2?.name === "AbortError" || e2?.message?.includes("aborted") || e2?.code === "ABORT_ERR";
|
|
23048
23118
|
},
|
|
23049
23119
|
target: "uninitialized"
|
|
23050
23120
|
},
|
|
23121
|
+
{
|
|
23122
|
+
guard: ({ context: context2 }) => context2.streamRetryCount > 0,
|
|
23123
|
+
target: "stream_interrupted"
|
|
23124
|
+
},
|
|
23051
23125
|
{
|
|
23052
23126
|
actions: [
|
|
23053
23127
|
assign({
|
|
@@ -23064,6 +23138,30 @@ ${err.message}`);
|
|
|
23064
23138
|
src: "retrieveState"
|
|
23065
23139
|
}
|
|
23066
23140
|
},
|
|
23141
|
+
stream_interrupted: {
|
|
23142
|
+
after: {
|
|
23143
|
+
STREAM_RETRY_DELAY: [
|
|
23144
|
+
{
|
|
23145
|
+
actions: assign({
|
|
23146
|
+
streamRetryCount: ({ context: context2 }) => context2.streamRetryCount + 1
|
|
23147
|
+
}),
|
|
23148
|
+
guard: ({ context: context2 }) => context2.streamRetryCount < MAX_STREAM_RETRIES,
|
|
23149
|
+
target: "retrieving_history"
|
|
23150
|
+
},
|
|
23151
|
+
{
|
|
23152
|
+
target: "stream_recovery_failed"
|
|
23153
|
+
}
|
|
23154
|
+
]
|
|
23155
|
+
}
|
|
23156
|
+
},
|
|
23157
|
+
stream_recovery_failed: {
|
|
23158
|
+
on: {
|
|
23159
|
+
REFRESH_HISTORY: {
|
|
23160
|
+
actions: assign({ lastError: void 0, streamRetryCount: 0 }),
|
|
23161
|
+
target: "retrieving_history"
|
|
23162
|
+
}
|
|
23163
|
+
}
|
|
23164
|
+
},
|
|
23067
23165
|
streaming: {
|
|
23068
23166
|
description: "Manages monitoring and canceling the current run",
|
|
23069
23167
|
initial: "monitoring_replies",
|
|
@@ -23077,20 +23175,37 @@ ${err.message}`);
|
|
|
23077
23175
|
runId: context2.currentRunId
|
|
23078
23176
|
};
|
|
23079
23177
|
},
|
|
23080
|
-
onDone:
|
|
23081
|
-
|
|
23082
|
-
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
|
|
23178
|
+
onDone: [
|
|
23179
|
+
{
|
|
23180
|
+
actions: assign({ currentRunId: null, userRequestedStop: false }),
|
|
23181
|
+
guard: ({ context: context2 }) => !!context2.receivedEndOfStream || !!context2.userRequestedStop,
|
|
23182
|
+
target: "idle"
|
|
23183
|
+
},
|
|
23184
|
+
{
|
|
23185
|
+
actions: assign({ currentRunId: null }),
|
|
23186
|
+
target: "stream_interrupted"
|
|
23187
|
+
}
|
|
23188
|
+
],
|
|
23189
|
+
onError: [
|
|
23190
|
+
{
|
|
23191
|
+
actions: assign({ currentRunId: null, userRequestedStop: false }),
|
|
23192
|
+
guard: ({ context: context2 }) => !!context2.receivedEndOfStream || !!context2.userRequestedStop,
|
|
23193
|
+
target: "idle"
|
|
23194
|
+
},
|
|
23195
|
+
{
|
|
23196
|
+
actions: assign({ currentRunId: null }),
|
|
23197
|
+
target: "stream_interrupted"
|
|
23198
|
+
}
|
|
23199
|
+
],
|
|
23088
23200
|
onSnapshot: {
|
|
23089
23201
|
actions: enqueueActions(({ context: context2, enqueue, event }) => {
|
|
23090
23202
|
const chatEvent = event.snapshot.context;
|
|
23091
23203
|
if (!chatEvent) {
|
|
23092
23204
|
return;
|
|
23093
23205
|
}
|
|
23206
|
+
if (chatEvent.content.chunkType === "endOfStream" && !context2.receivedEndOfStream) {
|
|
23207
|
+
enqueue.assign({ receivedEndOfStream: true });
|
|
23208
|
+
}
|
|
23094
23209
|
const nextSnapshot = AgentConversation.reduceChatEvents(context2.conversationSnapshot, [chatEvent]);
|
|
23095
23210
|
enqueue.assign({
|
|
23096
23211
|
conversationSnapshot: nextSnapshot
|
|
@@ -23108,6 +23223,7 @@ ${err.message}`);
|
|
|
23108
23223
|
description: "Attached to the run event stream",
|
|
23109
23224
|
on: {
|
|
23110
23225
|
STOP_RUN: {
|
|
23226
|
+
actions: assign({ userRequestedStop: true }),
|
|
23111
23227
|
target: "stopping"
|
|
23112
23228
|
}
|
|
23113
23229
|
}
|
|
@@ -23120,10 +23236,11 @@ ${err.message}`);
|
|
|
23120
23236
|
runId: context2.currentRunId
|
|
23121
23237
|
}),
|
|
23122
23238
|
onDone: {
|
|
23123
|
-
actions: assign({ currentRunId: void 0 }),
|
|
23239
|
+
actions: assign({ currentRunId: void 0, userRequestedStop: false }),
|
|
23124
23240
|
target: "#agentConversation.idle"
|
|
23125
23241
|
},
|
|
23126
23242
|
onError: {
|
|
23243
|
+
actions: assign({ userRequestedStop: false }),
|
|
23127
23244
|
target: "#agentConversation.retrieving_history"
|
|
23128
23245
|
},
|
|
23129
23246
|
src: "stopRun"
|
|
@@ -23165,7 +23282,8 @@ ${err.message}`);
|
|
|
23165
23282
|
}
|
|
23166
23283
|
],
|
|
23167
23284
|
currentRunId: ({ event }) => event.output.currentRunId,
|
|
23168
|
-
messageAttempt: void 0
|
|
23285
|
+
messageAttempt: void 0,
|
|
23286
|
+
...STREAM_STATE_RESET
|
|
23169
23287
|
}),
|
|
23170
23288
|
target: "streaming"
|
|
23171
23289
|
},
|