@copilotkit/runtime 1.4.8-coagents-v0-3.1 → 1.4.8-next.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.
- package/CHANGELOG.md +5 -4
- package/__snapshots__/schema/schema.graphql +10 -7
- package/dist/{chunk-FVYNRYIB.mjs → chunk-5KJYPVQJ.mjs} +307 -423
- package/dist/chunk-5KJYPVQJ.mjs.map +1 -0
- package/dist/{chunk-RFF5IIZJ.mjs → chunk-B74M7FXG.mjs} +2 -3
- package/dist/chunk-B74M7FXG.mjs.map +1 -0
- package/dist/{chunk-BACNNHHI.mjs → chunk-CGGI46KC.mjs} +2 -2
- package/dist/{chunk-YFG3Q3YH.mjs → chunk-EU52BTKR.mjs} +2 -2
- package/dist/{chunk-MQJNZYAH.mjs → chunk-KO4QCMY4.mjs} +2 -2
- package/dist/{chunk-2PK2SFRB.mjs → chunk-W7GP2EOT.mjs} +106 -221
- package/dist/chunk-W7GP2EOT.mjs.map +1 -0
- package/dist/{copilot-runtime-b15b683d.d.ts → copilot-runtime-1c5bf72b.d.ts} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +1 -2
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +1 -1
- package/dist/{groq-adapter-50aa9621.d.ts → groq-adapter-b6a40422.d.ts} +1 -1
- package/dist/{index-ff3fbc33.d.ts → index-10b1c870.d.ts} +8 -7
- package/dist/index.d.ts +5 -5
- package/dist/index.js +515 -745
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/dist/{langserve-8ec29cba.d.ts → langserve-6245df39.d.ts} +14 -52
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +442 -706
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +37 -71
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +6 -6
- package/dist/lib/integrations/nest/index.d.ts +3 -3
- package/dist/lib/integrations/nest/index.js +37 -71
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +4 -4
- package/dist/lib/integrations/node-express/index.d.ts +3 -3
- package/dist/lib/integrations/node-express/index.js +37 -71
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +4 -4
- package/dist/lib/integrations/node-http/index.d.ts +3 -3
- package/dist/lib/integrations/node-http/index.js +37 -71
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +3 -3
- package/dist/service-adapters/index.d.ts +36 -5
- package/dist/service-adapters/index.js +106 -219
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +5 -1
- package/package.json +2 -2
- package/src/agents/langgraph/event-source.ts +148 -140
- package/src/agents/langgraph/events.ts +1 -1
- package/src/graphql/inputs/forwarded-parameters.input.ts +3 -0
- package/src/graphql/inputs/message.input.ts +3 -15
- package/src/graphql/resolvers/copilot.resolver.ts +6 -32
- package/src/graphql/types/converted/index.ts +3 -4
- package/src/graphql/types/copilot-response.type.ts +3 -12
- package/src/graphql/types/enums.ts +11 -0
- package/src/lib/runtime/remote-action-constructors.ts +62 -60
- package/src/lib/runtime/remote-actions.ts +0 -1
- package/src/lib/runtime/remote-lg-action.ts +140 -161
- package/src/service-adapters/anthropic/anthropic-adapter.ts +6 -16
- package/src/service-adapters/conversion.ts +1 -2
- package/src/service-adapters/events.ts +52 -111
- package/src/service-adapters/experimental/empty/empty-adapter.ts +33 -0
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +3 -7
- package/src/service-adapters/groq/groq-adapter.ts +8 -23
- package/src/service-adapters/index.ts +7 -1
- package/src/service-adapters/langchain/utils.ts +31 -49
- package/src/service-adapters/openai/openai-adapter.ts +9 -22
- package/src/service-adapters/openai/openai-assistant-adapter.ts +8 -22
- package/src/service-adapters/unify/unify-adapter.ts +11 -28
- package/dist/chunk-2PK2SFRB.mjs.map +0 -1
- package/dist/chunk-FVYNRYIB.mjs.map +0 -1
- package/dist/chunk-RFF5IIZJ.mjs.map +0 -1
- /package/dist/{chunk-BACNNHHI.mjs.map → chunk-CGGI46KC.mjs.map} +0 -0
- /package/dist/{chunk-YFG3Q3YH.mjs.map → chunk-EU52BTKR.mjs.map} +0 -0
- /package/dist/{chunk-MQJNZYAH.mjs.map → chunk-KO4QCMY4.mjs.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as graphql_yoga from 'graphql-yoga';
|
|
2
|
-
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../copilot-runtime-
|
|
2
|
+
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../copilot-runtime-1c5bf72b.js';
|
|
3
3
|
import '@copilotkit/shared';
|
|
4
|
-
import '../../../langserve-
|
|
5
|
-
import '../../../index-
|
|
4
|
+
import '../../../langserve-6245df39.js';
|
|
5
|
+
import '../../../index-10b1c870.js';
|
|
6
6
|
import '../../../graphql/types/base/index.js';
|
|
7
7
|
import 'rxjs';
|
|
8
8
|
import 'graphql';
|
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.4.8-
|
|
47
|
+
version: "1.4.8-next.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -151,6 +151,12 @@ var MessageRole;
|
|
|
151
151
|
MessageRole2["system"] = "system";
|
|
152
152
|
MessageRole2["tool"] = "tool";
|
|
153
153
|
})(MessageRole || (MessageRole = {}));
|
|
154
|
+
var ActionExecutionScope;
|
|
155
|
+
(function(ActionExecutionScope2) {
|
|
156
|
+
ActionExecutionScope2["server"] = "server";
|
|
157
|
+
ActionExecutionScope2["client"] = "client";
|
|
158
|
+
ActionExecutionScope2["passThrough"] = "passThrough";
|
|
159
|
+
})(ActionExecutionScope || (ActionExecutionScope = {}));
|
|
154
160
|
var CopilotRequestType;
|
|
155
161
|
(function(CopilotRequestType2) {
|
|
156
162
|
CopilotRequestType2["Chat"] = "Chat";
|
|
@@ -169,6 +175,10 @@ var ActionInputAvailability;
|
|
|
169
175
|
name: "MessageRole",
|
|
170
176
|
description: "The role of the message"
|
|
171
177
|
});
|
|
178
|
+
(0, import_type_graphql.registerEnumType)(ActionExecutionScope, {
|
|
179
|
+
name: "ActionExecutionScope",
|
|
180
|
+
description: "The scope of the action"
|
|
181
|
+
});
|
|
172
182
|
(0, import_type_graphql.registerEnumType)(CopilotRequestType, {
|
|
173
183
|
name: "CopilotRequestType",
|
|
174
184
|
description: "The type of Copilot request"
|
|
@@ -266,7 +276,6 @@ MessageInput = _ts_decorate2([
|
|
|
266
276
|
], MessageInput);
|
|
267
277
|
var TextMessageInput = class {
|
|
268
278
|
content;
|
|
269
|
-
parentMessageId;
|
|
270
279
|
role;
|
|
271
280
|
};
|
|
272
281
|
__name(TextMessageInput, "TextMessageInput");
|
|
@@ -274,12 +283,6 @@ _ts_decorate2([
|
|
|
274
283
|
(0, import_type_graphql3.Field)(() => String),
|
|
275
284
|
_ts_metadata2("design:type", String)
|
|
276
285
|
], TextMessageInput.prototype, "content", void 0);
|
|
277
|
-
_ts_decorate2([
|
|
278
|
-
(0, import_type_graphql3.Field)(() => String, {
|
|
279
|
-
nullable: true
|
|
280
|
-
}),
|
|
281
|
-
_ts_metadata2("design:type", String)
|
|
282
|
-
], TextMessageInput.prototype, "parentMessageId", void 0);
|
|
283
286
|
_ts_decorate2([
|
|
284
287
|
(0, import_type_graphql3.Field)(() => MessageRole),
|
|
285
288
|
_ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
|
|
@@ -290,7 +293,6 @@ TextMessageInput = _ts_decorate2([
|
|
|
290
293
|
var ActionExecutionMessageInput = class {
|
|
291
294
|
name;
|
|
292
295
|
arguments;
|
|
293
|
-
parentMessageId;
|
|
294
296
|
scope;
|
|
295
297
|
};
|
|
296
298
|
__name(ActionExecutionMessageInput, "ActionExecutionMessageInput");
|
|
@@ -303,17 +305,8 @@ _ts_decorate2([
|
|
|
303
305
|
_ts_metadata2("design:type", String)
|
|
304
306
|
], ActionExecutionMessageInput.prototype, "arguments", void 0);
|
|
305
307
|
_ts_decorate2([
|
|
306
|
-
(0, import_type_graphql3.Field)(() =>
|
|
307
|
-
|
|
308
|
-
}),
|
|
309
|
-
_ts_metadata2("design:type", String)
|
|
310
|
-
], ActionExecutionMessageInput.prototype, "parentMessageId", void 0);
|
|
311
|
-
_ts_decorate2([
|
|
312
|
-
(0, import_type_graphql3.Field)(() => String, {
|
|
313
|
-
nullable: true,
|
|
314
|
-
deprecationReason: "This field will be removed in a future version"
|
|
315
|
-
}),
|
|
316
|
-
_ts_metadata2("design:type", typeof String === "undefined" ? Object : String)
|
|
308
|
+
(0, import_type_graphql3.Field)(() => ActionExecutionScope),
|
|
309
|
+
_ts_metadata2("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
|
|
317
310
|
], ActionExecutionMessageInput.prototype, "scope", void 0);
|
|
318
311
|
ActionExecutionMessageInput = _ts_decorate2([
|
|
319
312
|
(0, import_type_graphql3.InputType)()
|
|
@@ -321,7 +314,6 @@ ActionExecutionMessageInput = _ts_decorate2([
|
|
|
321
314
|
var ResultMessageInput = class {
|
|
322
315
|
actionExecutionId;
|
|
323
316
|
actionName;
|
|
324
|
-
parentMessageId;
|
|
325
317
|
result;
|
|
326
318
|
};
|
|
327
319
|
__name(ResultMessageInput, "ResultMessageInput");
|
|
@@ -333,12 +325,6 @@ _ts_decorate2([
|
|
|
333
325
|
(0, import_type_graphql3.Field)(() => String),
|
|
334
326
|
_ts_metadata2("design:type", String)
|
|
335
327
|
], ResultMessageInput.prototype, "actionName", void 0);
|
|
336
|
-
_ts_decorate2([
|
|
337
|
-
(0, import_type_graphql3.Field)(() => String, {
|
|
338
|
-
nullable: true
|
|
339
|
-
}),
|
|
340
|
-
_ts_metadata2("design:type", String)
|
|
341
|
-
], ResultMessageInput.prototype, "parentMessageId", void 0);
|
|
342
328
|
_ts_decorate2([
|
|
343
329
|
(0, import_type_graphql3.Field)(() => String),
|
|
344
330
|
_ts_metadata2("design:type", String)
|
|
@@ -602,6 +588,7 @@ var ForwardedParametersInput = class {
|
|
|
602
588
|
stop;
|
|
603
589
|
toolChoice;
|
|
604
590
|
toolChoiceFunctionName;
|
|
591
|
+
temperature;
|
|
605
592
|
};
|
|
606
593
|
__name(ForwardedParametersInput, "ForwardedParametersInput");
|
|
607
594
|
_ts_decorate7([
|
|
@@ -636,6 +623,12 @@ _ts_decorate7([
|
|
|
636
623
|
}),
|
|
637
624
|
_ts_metadata7("design:type", String)
|
|
638
625
|
], ForwardedParametersInput.prototype, "toolChoiceFunctionName", void 0);
|
|
626
|
+
_ts_decorate7([
|
|
627
|
+
(0, import_type_graphql8.Field)(() => Number, {
|
|
628
|
+
nullable: true
|
|
629
|
+
}),
|
|
630
|
+
_ts_metadata7("design:type", Number)
|
|
631
|
+
], ForwardedParametersInput.prototype, "temperature", void 0);
|
|
639
632
|
ForwardedParametersInput = _ts_decorate7([
|
|
640
633
|
(0, import_type_graphql8.InputType)()
|
|
641
634
|
], ForwardedParametersInput);
|
|
@@ -1061,7 +1054,6 @@ BaseMessageOutput = _ts_decorate13([
|
|
|
1061
1054
|
var TextMessageOutput = class {
|
|
1062
1055
|
role;
|
|
1063
1056
|
content;
|
|
1064
|
-
parentMessageId;
|
|
1065
1057
|
};
|
|
1066
1058
|
__name(TextMessageOutput, "TextMessageOutput");
|
|
1067
1059
|
_ts_decorate13([
|
|
@@ -1074,12 +1066,6 @@ _ts_decorate13([
|
|
|
1074
1066
|
]),
|
|
1075
1067
|
_ts_metadata13("design:type", Array)
|
|
1076
1068
|
], TextMessageOutput.prototype, "content", void 0);
|
|
1077
|
-
_ts_decorate13([
|
|
1078
|
-
(0, import_type_graphql14.Field)(() => String, {
|
|
1079
|
-
nullable: true
|
|
1080
|
-
}),
|
|
1081
|
-
_ts_metadata13("design:type", String)
|
|
1082
|
-
], TextMessageOutput.prototype, "parentMessageId", void 0);
|
|
1083
1069
|
TextMessageOutput = _ts_decorate13([
|
|
1084
1070
|
(0, import_type_graphql14.ObjectType)({
|
|
1085
1071
|
implements: BaseMessageOutput
|
|
@@ -1089,7 +1075,6 @@ var ActionExecutionMessageOutput = class {
|
|
|
1089
1075
|
name;
|
|
1090
1076
|
scope;
|
|
1091
1077
|
arguments;
|
|
1092
|
-
parentMessageId;
|
|
1093
1078
|
};
|
|
1094
1079
|
__name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
|
|
1095
1080
|
_ts_decorate13([
|
|
@@ -1097,11 +1082,8 @@ _ts_decorate13([
|
|
|
1097
1082
|
_ts_metadata13("design:type", String)
|
|
1098
1083
|
], ActionExecutionMessageOutput.prototype, "name", void 0);
|
|
1099
1084
|
_ts_decorate13([
|
|
1100
|
-
(0, import_type_graphql14.Field)(() =>
|
|
1101
|
-
|
|
1102
|
-
deprecationReason: "This field will be removed in a future version"
|
|
1103
|
-
}),
|
|
1104
|
-
_ts_metadata13("design:type", String)
|
|
1085
|
+
(0, import_type_graphql14.Field)(() => ActionExecutionScope),
|
|
1086
|
+
_ts_metadata13("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
|
|
1105
1087
|
], ActionExecutionMessageOutput.prototype, "scope", void 0);
|
|
1106
1088
|
_ts_decorate13([
|
|
1107
1089
|
(0, import_type_graphql14.Field)(() => [
|
|
@@ -1109,12 +1091,6 @@ _ts_decorate13([
|
|
|
1109
1091
|
]),
|
|
1110
1092
|
_ts_metadata13("design:type", Array)
|
|
1111
1093
|
], ActionExecutionMessageOutput.prototype, "arguments", void 0);
|
|
1112
|
-
_ts_decorate13([
|
|
1113
|
-
(0, import_type_graphql14.Field)(() => String, {
|
|
1114
|
-
nullable: true
|
|
1115
|
-
}),
|
|
1116
|
-
_ts_metadata13("design:type", String)
|
|
1117
|
-
], ActionExecutionMessageOutput.prototype, "parentMessageId", void 0);
|
|
1118
1094
|
ActionExecutionMessageOutput = _ts_decorate13([
|
|
1119
1095
|
(0, import_type_graphql14.ObjectType)({
|
|
1120
1096
|
implements: BaseMessageOutput
|
|
@@ -1266,14 +1242,13 @@ var TextMessage = class extends Message {
|
|
|
1266
1242
|
type = "TextMessage";
|
|
1267
1243
|
content;
|
|
1268
1244
|
role;
|
|
1269
|
-
parentMessageId;
|
|
1270
1245
|
};
|
|
1271
1246
|
__name(TextMessage, "TextMessage");
|
|
1272
1247
|
var ActionExecutionMessage = class extends Message {
|
|
1273
1248
|
type = "ActionExecutionMessage";
|
|
1274
1249
|
name;
|
|
1275
1250
|
arguments;
|
|
1276
|
-
|
|
1251
|
+
scope;
|
|
1277
1252
|
};
|
|
1278
1253
|
__name(ActionExecutionMessage, "ActionExecutionMessage");
|
|
1279
1254
|
var ResultMessage = class extends Message {
|
|
@@ -1357,7 +1332,6 @@ __name(getRuntimeInstanceTelemetryInfo, "getRuntimeInstanceTelemetryInfo");
|
|
|
1357
1332
|
var telemetry_client_default = telemetryClient;
|
|
1358
1333
|
|
|
1359
1334
|
// src/service-adapters/events.ts
|
|
1360
|
-
var import_class_transformer = require("class-transformer");
|
|
1361
1335
|
var RuntimeEventTypes;
|
|
1362
1336
|
(function(RuntimeEventTypes2) {
|
|
1363
1337
|
RuntimeEventTypes2["TextMessageStart"] = "TextMessageStart";
|
|
@@ -1372,7 +1346,7 @@ var RuntimeEventTypes;
|
|
|
1372
1346
|
|
|
1373
1347
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
1374
1348
|
var import_graphql_scalars2 = require("graphql-scalars");
|
|
1375
|
-
var
|
|
1349
|
+
var import_class_transformer = require("class-transformer");
|
|
1376
1350
|
var import_graphql = require("graphql");
|
|
1377
1351
|
|
|
1378
1352
|
// src/utils/failed-response-status-reasons.ts
|
|
@@ -1570,7 +1544,7 @@ var CopilotResolver = class {
|
|
|
1570
1544
|
reason: `Interrupted due to Guardrails validation failure. Reason: ${result.reason}`
|
|
1571
1545
|
});
|
|
1572
1546
|
outputMessages = [
|
|
1573
|
-
(0,
|
|
1547
|
+
(0, import_class_transformer.plainToInstance)(TextMessage, {
|
|
1574
1548
|
id: (0, import_shared4.randomId)(),
|
|
1575
1549
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1576
1550
|
content: result.reason,
|
|
@@ -1619,15 +1593,12 @@ var CopilotResolver = class {
|
|
|
1619
1593
|
// skip until this message start event
|
|
1620
1594
|
(0, import_rxjs3.skipWhile)((e) => e !== event),
|
|
1621
1595
|
// take until the message end event
|
|
1622
|
-
(0, import_rxjs3.takeWhile)((e) =>
|
|
1623
|
-
// filter out any other message events or message ids
|
|
1624
|
-
(0, import_rxjs3.filter)((e) => e.type == RuntimeEventTypes.TextMessageContent && e.messageId == event.messageId)
|
|
1596
|
+
(0, import_rxjs3.takeWhile)((e) => e.type != RuntimeEventTypes.TextMessageEnd)
|
|
1625
1597
|
);
|
|
1626
1598
|
const streamingTextStatus = new import_rxjs3.Subject();
|
|
1627
1599
|
const messageId = event.messageId;
|
|
1628
1600
|
pushMessage({
|
|
1629
1601
|
id: messageId,
|
|
1630
|
-
parentMessageId: event.parentMessageId,
|
|
1631
1602
|
status: (0, import_rxjs3.firstValueFrom)(streamingTextStatus),
|
|
1632
1603
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1633
1604
|
role: MessageRole.assistant,
|
|
@@ -1640,7 +1611,7 @@ var CopilotResolver = class {
|
|
|
1640
1611
|
reason,
|
|
1641
1612
|
messageId: messageId2
|
|
1642
1613
|
}, "Text streaming interrupted");
|
|
1643
|
-
streamingTextStatus.next((0,
|
|
1614
|
+
streamingTextStatus.next((0, import_class_transformer.plainToInstance)(FailedMessageStatus, {
|
|
1644
1615
|
reason
|
|
1645
1616
|
}));
|
|
1646
1617
|
responseStatus$.next(new MessageStreamInterruptedResponse({
|
|
@@ -1673,7 +1644,7 @@ var CopilotResolver = class {
|
|
|
1673
1644
|
streamingTextStatus.next(new SuccessMessageStatus());
|
|
1674
1645
|
stopStreamingText();
|
|
1675
1646
|
textSubscription == null ? void 0 : textSubscription.unsubscribe();
|
|
1676
|
-
outputMessages.push((0,
|
|
1647
|
+
outputMessages.push((0, import_class_transformer.plainToInstance)(TextMessage, {
|
|
1677
1648
|
id: messageId,
|
|
1678
1649
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1679
1650
|
content: textChunks.join(""),
|
|
@@ -1686,20 +1657,14 @@ var CopilotResolver = class {
|
|
|
1686
1657
|
break;
|
|
1687
1658
|
case RuntimeEventTypes.ActionExecutionStart:
|
|
1688
1659
|
logger2.debug("Action execution start event received");
|
|
1689
|
-
const actionExecutionArgumentStream = eventStream.pipe(
|
|
1690
|
-
(0, import_rxjs3.skipWhile)((e) => e !== event),
|
|
1691
|
-
// take until the action execution end event
|
|
1692
|
-
(0, import_rxjs3.takeWhile)((e) => !(e.type === RuntimeEventTypes.ActionExecutionEnd && e.actionExecutionId == event.actionExecutionId)),
|
|
1693
|
-
// filter out any other action execution events or action execution ids
|
|
1694
|
-
(0, import_rxjs3.filter)((e) => e.type == RuntimeEventTypes.ActionExecutionArgs && e.actionExecutionId == event.actionExecutionId)
|
|
1695
|
-
);
|
|
1660
|
+
const actionExecutionArgumentStream = eventStream.pipe((0, import_rxjs3.skipWhile)((e) => e !== event), (0, import_rxjs3.takeWhile)((e) => e.type != RuntimeEventTypes.ActionExecutionEnd));
|
|
1696
1661
|
const streamingArgumentsStatus = new import_rxjs3.Subject();
|
|
1697
1662
|
pushMessage({
|
|
1698
1663
|
id: event.actionExecutionId,
|
|
1699
|
-
parentMessageId: event.parentMessageId,
|
|
1700
1664
|
status: (0, import_rxjs3.firstValueFrom)(streamingArgumentsStatus),
|
|
1701
1665
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1702
1666
|
name: event.actionName,
|
|
1667
|
+
scope: event.scope,
|
|
1703
1668
|
arguments: new import_graphql_yoga.Repeater(async (pushArgumentsChunk, stopStreamingArguments) => {
|
|
1704
1669
|
logger2.debug("Action execution argument stream created");
|
|
1705
1670
|
const argumentChunks = [];
|
|
@@ -1715,7 +1680,7 @@ var CopilotResolver = class {
|
|
|
1715
1680
|
logger2.error({
|
|
1716
1681
|
err
|
|
1717
1682
|
}, "Error in action execution argument stream");
|
|
1718
|
-
streamingArgumentsStatus.next((0,
|
|
1683
|
+
streamingArgumentsStatus.next((0, import_class_transformer.plainToInstance)(FailedMessageStatus, {
|
|
1719
1684
|
reason: "An unknown error has occurred in the action execution argument stream"
|
|
1720
1685
|
}));
|
|
1721
1686
|
stopStreamingArguments();
|
|
@@ -1726,10 +1691,11 @@ var CopilotResolver = class {
|
|
|
1726
1691
|
streamingArgumentsStatus.next(new SuccessMessageStatus());
|
|
1727
1692
|
stopStreamingArguments();
|
|
1728
1693
|
actionExecutionArgumentSubscription == null ? void 0 : actionExecutionArgumentSubscription.unsubscribe();
|
|
1729
|
-
outputMessages.push((0,
|
|
1694
|
+
outputMessages.push((0, import_class_transformer.plainToInstance)(ActionExecutionMessage, {
|
|
1730
1695
|
id: event.actionExecutionId,
|
|
1731
1696
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1732
1697
|
name: event.actionName,
|
|
1698
|
+
scope: event.scope,
|
|
1733
1699
|
arguments: argumentChunks.join("")
|
|
1734
1700
|
}));
|
|
1735
1701
|
}
|
|
@@ -1742,15 +1708,15 @@ var CopilotResolver = class {
|
|
|
1742
1708
|
result: event.result
|
|
1743
1709
|
}, "Action execution result event received");
|
|
1744
1710
|
pushMessage({
|
|
1745
|
-
id:
|
|
1711
|
+
id: (0, import_shared4.randomId)(),
|
|
1746
1712
|
status: new SuccessMessageStatus(),
|
|
1747
1713
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1748
1714
|
actionExecutionId: event.actionExecutionId,
|
|
1749
1715
|
actionName: event.actionName,
|
|
1750
1716
|
result: event.result
|
|
1751
1717
|
});
|
|
1752
|
-
outputMessages.push((0,
|
|
1753
|
-
id:
|
|
1718
|
+
outputMessages.push((0, import_class_transformer.plainToInstance)(ResultMessage, {
|
|
1719
|
+
id: (0, import_shared4.randomId)(),
|
|
1754
1720
|
createdAt: /* @__PURE__ */ new Date(),
|
|
1755
1721
|
actionExecutionId: event.actionExecutionId,
|
|
1756
1722
|
actionName: event.actionName,
|
|
@@ -1774,7 +1740,7 @@ var CopilotResolver = class {
|
|
|
1774
1740
|
role: MessageRole.assistant,
|
|
1775
1741
|
createdAt: /* @__PURE__ */ new Date()
|
|
1776
1742
|
});
|
|
1777
|
-
outputMessages.push((0,
|
|
1743
|
+
outputMessages.push((0, import_class_transformer.plainToInstance)(AgentStateMessage, {
|
|
1778
1744
|
id: (0, import_shared4.randomId)(),
|
|
1779
1745
|
threadId: event.threadId,
|
|
1780
1746
|
agentName: event.agentName,
|