@copilotkit/runtime 1.3.2-pre.0 → 1.3.3-pre.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +21 -3
  2. package/dist/{chunk-DJJMFT4I.mjs → chunk-O77YNLPS.mjs} +2 -2
  3. package/dist/{chunk-VBAVPCCV.mjs → chunk-TWMK36PL.mjs} +2 -2
  4. package/dist/{chunk-2VR4OD7I.mjs → chunk-U342UAU7.mjs} +157 -72
  5. package/dist/chunk-U342UAU7.mjs.map +1 -0
  6. package/dist/{chunk-6E75253N.mjs → chunk-YL3BIAR6.mjs} +2 -2
  7. package/dist/{chunk-LBWXVIGK.mjs → chunk-ZS6NNBNA.mjs} +2 -2
  8. package/dist/index.js +159 -74
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +5 -5
  11. package/dist/lib/index.js +159 -74
  12. package/dist/lib/index.js.map +1 -1
  13. package/dist/lib/index.mjs +5 -5
  14. package/dist/lib/integrations/index.js +4 -2
  15. package/dist/lib/integrations/index.js.map +1 -1
  16. package/dist/lib/integrations/index.mjs +4 -4
  17. package/dist/lib/integrations/nest/index.js +4 -2
  18. package/dist/lib/integrations/nest/index.js.map +1 -1
  19. package/dist/lib/integrations/nest/index.mjs +2 -2
  20. package/dist/lib/integrations/node-express/index.js +4 -2
  21. package/dist/lib/integrations/node-express/index.js.map +1 -1
  22. package/dist/lib/integrations/node-express/index.mjs +2 -2
  23. package/dist/lib/integrations/node-http/index.js +4 -2
  24. package/dist/lib/integrations/node-http/index.js.map +1 -1
  25. package/dist/lib/integrations/node-http/index.mjs +1 -1
  26. package/package.json +7 -5
  27. package/src/agents/langgraph/event-source.ts +97 -24
  28. package/src/agents/langgraph/events.ts +10 -1
  29. package/src/lib/runtime/remote-actions.ts +52 -31
  30. package/dist/chunk-2VR4OD7I.mjs.map +0 -1
  31. /package/dist/{chunk-DJJMFT4I.mjs.map → chunk-O77YNLPS.mjs.map} +0 -0
  32. /package/dist/{chunk-VBAVPCCV.mjs.map → chunk-TWMK36PL.mjs.map} +0 -0
  33. /package/dist/{chunk-6E75253N.mjs.map → chunk-YL3BIAR6.mjs.map} +0 -0
  34. /package/dist/{chunk-LBWXVIGK.mjs.map → chunk-ZS6NNBNA.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # @copilotkit/runtime
2
2
 
3
- ## 1.3.2-pre.0
3
+ ## 1.3.3-pre.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - pre
7
+ - Pre-release
8
8
  - Updated dependencies
9
- - @copilotkit/shared@1.3.2-pre.0
9
+ - @copilotkit/shared@1.3.3-pre.0
10
+
11
+ ## 1.3.2
12
+
13
+ ### Patch Changes
14
+
15
+ - Features and bug fixes
16
+ - 30232c0: Ensure actions can be discovered on state change
17
+ - Updated dependencies
18
+ - Updated dependencies [30232c0]
19
+ - @copilotkit/shared@1.3.2
20
+
21
+ ## 1.3.2-mme-discover-actions.0
22
+
23
+ ### Patch Changes
24
+
25
+ - Ensure actions can be discovered on state change
26
+ - Updated dependencies
27
+ - @copilotkit/shared@1.3.2-mme-discover-actions.0
10
28
 
11
29
  ## 1.3.1
12
30
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  telemetry_client_default
4
- } from "./chunk-2VR4OD7I.mjs";
4
+ } from "./chunk-U342UAU7.mjs";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-44O2JGUY.mjs";
@@ -21,4 +21,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
21
21
  export {
22
22
  copilotRuntimeNestEndpoint
23
23
  };
24
- //# sourceMappingURL=chunk-DJJMFT4I.mjs.map
24
+ //# sourceMappingURL=chunk-O77YNLPS.mjs.map
@@ -5,7 +5,7 @@ import {
5
5
  RuntimeEventSource,
6
6
  isLangGraphAgentAction,
7
7
  setupRemoteActions
8
- } from "./chunk-2VR4OD7I.mjs";
8
+ } from "./chunk-U342UAU7.mjs";
9
9
  import {
10
10
  ActionExecutionMessage,
11
11
  AgentStateMessage,
@@ -258,4 +258,4 @@ export {
258
258
  CopilotRuntime,
259
259
  flattenToolCallsNoDuplicates
260
260
  };
261
- //# sourceMappingURL=chunk-VBAVPCCV.mjs.map
261
+ //# sourceMappingURL=chunk-TWMK36PL.mjs.map
@@ -36,7 +36,7 @@ var require_package = __commonJS({
36
36
  publishConfig: {
37
37
  access: "public"
38
38
  },
39
- version: "1.3.2-pre.0",
39
+ version: "1.3.3-pre.0",
40
40
  sideEffects: false,
41
41
  main: "./dist/index.js",
42
42
  module: "./dist/index.mjs",
@@ -51,7 +51,9 @@ var require_package = __commonJS({
51
51
  test: "jest --passWithNoTests",
52
52
  "check-types": "tsc --noEmit",
53
53
  clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
54
- "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts"
54
+ "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
55
+ "link:global": "pnpm link --global",
56
+ "unlink:global": "pnpm unlink --global"
55
57
  },
56
58
  devDependencies: {
57
59
  "@swc/core": "1.5.28",
@@ -1029,7 +1031,7 @@ var telemetryClient = new TelemetryClient({
1029
1031
  var telemetry_client_default = telemetryClient;
1030
1032
 
1031
1033
  // src/agents/langgraph/event-source.ts
1032
- import { ReplaySubject, scan, mergeMap } from "rxjs";
1034
+ import { ReplaySubject, scan, mergeMap, catchError } from "rxjs";
1033
1035
 
1034
1036
  // src/agents/langgraph/events.ts
1035
1037
  var LangGraphEventTypes;
@@ -1044,9 +1046,11 @@ var LangGraphEventTypes;
1044
1046
  LangGraphEventTypes2["OnToolEnd"] = "on_tool_end";
1045
1047
  LangGraphEventTypes2["OnCopilotKitStateSync"] = "on_copilotkit_state_sync";
1046
1048
  LangGraphEventTypes2["OnCopilotKitEmitMessage"] = "on_copilotkit_emit_message";
1049
+ LangGraphEventTypes2["OnCopilotKitEmitToolCall"] = "on_copilotkit_emit_tool_call";
1047
1050
  })(LangGraphEventTypes || (LangGraphEventTypes = {}));
1048
1051
 
1049
1052
  // src/agents/langgraph/event-source.ts
1053
+ import { randomId } from "@copilotkit/shared";
1050
1054
  var RemoteLangGraphEventSource = class {
1051
1055
  eventStream$ = new ReplaySubject();
1052
1056
  async streamResponse(response) {
@@ -1073,46 +1077,67 @@ var RemoteLangGraphEventSource = class {
1073
1077
  });
1074
1078
  }
1075
1079
  __name(flushBuffer, "flushBuffer");
1076
- while (true) {
1077
- const { done, value } = await reader.read();
1078
- if (!done) {
1079
- buffer.push(decoder.decode(value, {
1080
- stream: true
1081
- }));
1082
- }
1083
- flushBuffer();
1084
- if (done) {
1085
- break;
1080
+ try {
1081
+ while (true) {
1082
+ const { done, value } = await reader.read();
1083
+ if (!done) {
1084
+ buffer.push(decoder.decode(value, {
1085
+ stream: true
1086
+ }));
1087
+ }
1088
+ flushBuffer();
1089
+ if (done) {
1090
+ break;
1091
+ }
1086
1092
  }
1093
+ } catch (error) {
1094
+ console.error("Error in stream", error);
1095
+ eventStream$.error(error);
1096
+ return;
1087
1097
  }
1088
1098
  eventStream$.complete();
1089
1099
  }
1100
+ shouldEmitToolCall(shouldEmitToolCalls, toolCallName) {
1101
+ if (typeof shouldEmitToolCalls === "boolean") {
1102
+ return shouldEmitToolCalls;
1103
+ }
1104
+ if (Array.isArray(shouldEmitToolCalls)) {
1105
+ return shouldEmitToolCalls.includes(toolCallName);
1106
+ }
1107
+ return shouldEmitToolCalls === toolCallName;
1108
+ }
1090
1109
  processLangGraphEvents() {
1110
+ let lastEventWithState = null;
1091
1111
  return this.eventStream$.pipe(scan((acc, event) => {
1092
- var _a, _b, _c, _d, _e, _f, _g, _h;
1112
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
1093
1113
  if (event.event === LangGraphEventTypes.OnChatModelStream) {
1094
1114
  if ((_c = (_b = (_a = event.data) == null ? void 0 : _a.chunk) == null ? void 0 : _b.kwargs) == null ? void 0 : _c.tool_call_chunks) {
1095
- acc.prevToolCallId = acc.toolCallId;
1096
- acc.toolCallId = (_d = event.data.chunk.kwargs) == null ? void 0 : _d.id;
1115
+ acc.prevToolCallMessageId = acc.toolCallMessageId;
1116
+ acc.toolCallMessageId = (_d = event.data.chunk.kwargs) == null ? void 0 : _d.id;
1097
1117
  if ((_e = event.data.chunk.kwargs.tool_call_chunks[0]) == null ? void 0 : _e.name) {
1098
1118
  acc.toolCallName = event.data.chunk.kwargs.tool_call_chunks[0].name;
1099
1119
  }
1120
+ if ((_f = event.data.chunk.kwargs.tool_call_chunks[0]) == null ? void 0 : _f.id) {
1121
+ acc.toolCallId = event.data.chunk.kwargs.tool_call_chunks[0].id;
1122
+ }
1100
1123
  }
1101
1124
  acc.prevMessageId = acc.messageId;
1102
- acc.messageId = (_h = (_g = (_f = event.data) == null ? void 0 : _f.chunk) == null ? void 0 : _g.kwargs) == null ? void 0 : _h.id;
1125
+ acc.messageId = (_i = (_h = (_g = event.data) == null ? void 0 : _g.chunk) == null ? void 0 : _h.kwargs) == null ? void 0 : _i.id;
1103
1126
  } else {
1104
- acc.prevToolCallId = acc.toolCallId;
1105
- acc.toolCallId = null;
1127
+ acc.prevToolCallMessageId = acc.toolCallMessageId;
1128
+ acc.toolCallMessageId = null;
1106
1129
  acc.prevMessageId = acc.messageId;
1107
1130
  acc.messageId = null;
1108
1131
  acc.toolCallName = null;
1109
1132
  }
1110
1133
  acc.event = event;
1134
+ lastEventWithState = acc;
1111
1135
  return acc;
1112
1136
  }, {
1113
1137
  event: null,
1114
1138
  toolCallId: null,
1115
- prevToolCallId: null,
1139
+ toolCallMessageId: null,
1140
+ prevToolCallMessageId: null,
1116
1141
  messageId: null,
1117
1142
  toolCallName: null,
1118
1143
  prevMessageId: null
@@ -1129,7 +1154,7 @@ var RemoteLangGraphEventSource = class {
1129
1154
  shouldEmitMessages = eventWithState.event.metadata["copilotkit:emit-messages"];
1130
1155
  }
1131
1156
  }
1132
- if (eventWithState.prevToolCallId !== null && eventWithState.prevToolCallId !== eventWithState.toolCallId && shouldEmitToolCalls) {
1157
+ if (eventWithState.prevToolCallMessageId !== null && eventWithState.prevToolCallMessageId !== eventWithState.toolCallMessageId && this.shouldEmitToolCall(shouldEmitToolCalls, eventWithState.toolCallName)) {
1133
1158
  events.push({
1134
1159
  type: RuntimeEventTypes.ActionExecutionEnd
1135
1160
  });
@@ -1153,6 +1178,20 @@ var RemoteLangGraphEventSource = class {
1153
1178
  type: RuntimeEventTypes.TextMessageEnd
1154
1179
  });
1155
1180
  break;
1181
+ case LangGraphEventTypes.OnCopilotKitEmitToolCall:
1182
+ events.push({
1183
+ type: RuntimeEventTypes.ActionExecutionStart,
1184
+ actionExecutionId: eventWithState.event.id,
1185
+ actionName: eventWithState.event.name
1186
+ });
1187
+ events.push({
1188
+ type: RuntimeEventTypes.ActionExecutionArgs,
1189
+ args: JSON.stringify(eventWithState.event.args)
1190
+ });
1191
+ events.push({
1192
+ type: RuntimeEventTypes.ActionExecutionEnd
1193
+ });
1194
+ break;
1156
1195
  case LangGraphEventTypes.OnCopilotKitStateSync:
1157
1196
  events.push({
1158
1197
  type: RuntimeEventTypes.AgentStateMessage,
@@ -1169,11 +1208,11 @@ var RemoteLangGraphEventSource = class {
1169
1208
  case LangGraphEventTypes.OnToolEnd:
1170
1209
  break;
1171
1210
  case LangGraphEventTypes.OnChatModelStream:
1172
- if (eventWithState.toolCallId !== null && eventWithState.prevToolCallId !== eventWithState.toolCallId) {
1173
- if (shouldEmitToolCalls) {
1211
+ if (eventWithState.toolCallMessageId !== null && eventWithState.prevToolCallMessageId !== eventWithState.toolCallMessageId) {
1212
+ if (this.shouldEmitToolCall(shouldEmitToolCalls, eventWithState.toolCallName)) {
1174
1213
  events.push({
1175
1214
  type: RuntimeEventTypes.ActionExecutionStart,
1176
- actionExecutionId: eventWithState.toolCallId,
1215
+ actionExecutionId: eventWithState.toolCallMessageId,
1177
1216
  actionName: eventWithState.toolCallName,
1178
1217
  scope: "client"
1179
1218
  });
@@ -1189,7 +1228,7 @@ var RemoteLangGraphEventSource = class {
1189
1228
  const args = (_e = (_d = (_c = (_b = (_a = eventWithState.event.data) == null ? void 0 : _a.chunk) == null ? void 0 : _b.kwargs) == null ? void 0 : _c.tool_call_chunks) == null ? void 0 : _d[0]) == null ? void 0 : _e.args;
1190
1229
  const content = (_h = (_g = (_f = eventWithState.event.data) == null ? void 0 : _f.chunk) == null ? void 0 : _g.kwargs) == null ? void 0 : _h.content;
1191
1230
  if (args) {
1192
- if (shouldEmitToolCalls) {
1231
+ if (this.shouldEmitToolCall(shouldEmitToolCalls, eventWithState.toolCallName)) {
1193
1232
  events.push({
1194
1233
  type: RuntimeEventTypes.ActionExecutionArgs,
1195
1234
  args
@@ -1206,6 +1245,32 @@ var RemoteLangGraphEventSource = class {
1206
1245
  break;
1207
1246
  }
1208
1247
  return events;
1248
+ }), catchError((error) => {
1249
+ console.error(error);
1250
+ const events = [];
1251
+ if (lastEventWithState == null ? void 0 : lastEventWithState.messageId) {
1252
+ events.push({
1253
+ type: RuntimeEventTypes.TextMessageEnd
1254
+ });
1255
+ }
1256
+ if (lastEventWithState == null ? void 0 : lastEventWithState.toolCallMessageId) {
1257
+ events.push({
1258
+ type: RuntimeEventTypes.ActionExecutionEnd
1259
+ });
1260
+ }
1261
+ const messageId = randomId();
1262
+ events.push({
1263
+ type: RuntimeEventTypes.TextMessageStart,
1264
+ messageId
1265
+ });
1266
+ events.push({
1267
+ type: RuntimeEventTypes.TextMessageContent,
1268
+ content: "\u274C An error occurred. Please try again."
1269
+ });
1270
+ events.push({
1271
+ type: RuntimeEventTypes.TextMessageEnd
1272
+ });
1273
+ return events;
1209
1274
  }));
1210
1275
  }
1211
1276
  };
@@ -1239,27 +1304,40 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
1239
1304
  url
1240
1305
  }, "Fetching actions from url");
1241
1306
  const headers = createHeaders(onBeforeRequest, graphqlContext);
1242
- const response = await fetch(`${url}/info`, {
1243
- method: "POST",
1244
- headers,
1245
- body: JSON.stringify({
1246
- properties: graphqlContext.properties,
1247
- frontendUrl
1248
- })
1249
- });
1250
- if (!response.ok) {
1307
+ try {
1308
+ const response = await fetch(`${url}/info`, {
1309
+ method: "POST",
1310
+ headers,
1311
+ body: JSON.stringify({
1312
+ properties: graphqlContext.properties,
1313
+ frontendUrl
1314
+ })
1315
+ });
1316
+ if (!response.ok) {
1317
+ logger2.error({
1318
+ url,
1319
+ status: response.status,
1320
+ body: await response.text()
1321
+ }, "Failed to fetch actions from url");
1322
+ return {
1323
+ actions: [],
1324
+ agents: []
1325
+ };
1326
+ }
1327
+ const json = await response.json();
1328
+ logger2.debug({
1329
+ json
1330
+ }, "Fetched actions from url");
1331
+ return json;
1332
+ } catch (error) {
1251
1333
  logger2.error({
1252
- url,
1253
- status: response.status,
1254
- body: await response.text()
1334
+ error: error.message ? error.message : error + ""
1255
1335
  }, "Failed to fetch actions from url");
1256
- return [];
1336
+ return {
1337
+ actions: [],
1338
+ agents: []
1339
+ };
1257
1340
  }
1258
- const json = await response.json();
1259
- logger2.debug({
1260
- json
1261
- }, "Fetched actions from url");
1262
- return json;
1263
1341
  }
1264
1342
  __name(fetchRemoteInfo, "fetchRemoteInfo");
1265
1343
  function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, logger: logger2, messages, agentStates }) {
@@ -1274,30 +1352,37 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
1274
1352
  }, "Executing remote action");
1275
1353
  const headers = createHeaders(onBeforeRequest, graphqlContext);
1276
1354
  telemetry_client_default.capture("oss.runtime.remote_action_executed", {});
1277
- const response = await fetch(`${url}/actions/execute`, {
1278
- method: "POST",
1279
- headers,
1280
- body: JSON.stringify({
1281
- name: action.name,
1282
- arguments: args,
1283
- properties: graphqlContext.properties
1284
- })
1285
- });
1286
- if (!response.ok) {
1355
+ try {
1356
+ const response = await fetch(`${url}/actions/execute`, {
1357
+ method: "POST",
1358
+ headers,
1359
+ body: JSON.stringify({
1360
+ name: action.name,
1361
+ arguments: args,
1362
+ properties: graphqlContext.properties
1363
+ })
1364
+ });
1365
+ if (!response.ok) {
1366
+ logger2.error({
1367
+ url,
1368
+ status: response.status,
1369
+ body: await response.text()
1370
+ }, "Failed to execute remote action");
1371
+ return "Failed to execute remote action";
1372
+ }
1373
+ const requestResult = await response.json();
1374
+ const result = requestResult["result"];
1375
+ logger2.debug({
1376
+ actionName: action.name,
1377
+ result
1378
+ }, "Executed remote action");
1379
+ return result;
1380
+ } catch (error) {
1287
1381
  logger2.error({
1288
- url,
1289
- status: response.status,
1290
- body: await response.text()
1382
+ error: error.message ? error.message : error + ""
1291
1383
  }, "Failed to execute remote action");
1292
1384
  return "Failed to execute remote action";
1293
1385
  }
1294
- const requestResult = await response.json();
1295
- const result = requestResult["result"];
1296
- logger2.debug({
1297
- actionName: action.name,
1298
- result
1299
- }, "Executed remote action");
1300
- return result;
1301
1386
  }
1302
1387
  }));
1303
1388
  const agents = json["agents"].map((agent) => ({
@@ -1578,7 +1663,7 @@ __name(executeAction, "executeAction");
1578
1663
  import { GraphQLJSONObject } from "graphql-scalars";
1579
1664
  import { plainToInstance } from "class-transformer";
1580
1665
  import { GraphQLError } from "graphql";
1581
- import { randomId } from "@copilotkit/shared";
1666
+ import { randomId as randomId2 } from "@copilotkit/shared";
1582
1667
  function _ts_decorate12(decorators, target, key, desc) {
1583
1668
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1584
1669
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -1695,7 +1780,7 @@ var CopilotResolver = class {
1695
1780
  rejectOutputMessagesPromise = reject;
1696
1781
  });
1697
1782
  logger2.debug("Processing");
1698
- const { eventSource, threadId = randomId(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
1783
+ const { eventSource, threadId = randomId2(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
1699
1784
  serviceAdapter,
1700
1785
  messages: data.messages,
1701
1786
  actions: data.frontend.actions,
@@ -1740,7 +1825,7 @@ var CopilotResolver = class {
1740
1825
  });
1741
1826
  outputMessages = [
1742
1827
  plainToInstance(TextMessage, {
1743
- id: randomId(),
1828
+ id: randomId2(),
1744
1829
  createdAt: /* @__PURE__ */ new Date(),
1745
1830
  content: result.reason,
1746
1831
  role: MessageRole.assistant
@@ -1791,7 +1876,7 @@ var CopilotResolver = class {
1791
1876
  takeWhile((e) => e.type != RuntimeEventTypes.TextMessageEnd)
1792
1877
  );
1793
1878
  const streamingTextStatus = new Subject();
1794
- const messageId = randomId();
1879
+ const messageId = randomId2();
1795
1880
  pushMessage({
1796
1881
  id: messageId,
1797
1882
  status: firstValueFrom2(streamingTextStatus),
@@ -1903,7 +1988,7 @@ var CopilotResolver = class {
1903
1988
  result: event.result
1904
1989
  }, "Action execution result event received");
1905
1990
  pushMessage({
1906
- id: randomId(),
1991
+ id: randomId2(),
1907
1992
  status: new SuccessMessageStatus(),
1908
1993
  createdAt: /* @__PURE__ */ new Date(),
1909
1994
  actionExecutionId: event.actionExecutionId,
@@ -1911,7 +1996,7 @@ var CopilotResolver = class {
1911
1996
  result: event.result
1912
1997
  });
1913
1998
  outputMessages.push(plainToInstance(ResultMessage, {
1914
- id: randomId(),
1999
+ id: randomId2(),
1915
2000
  createdAt: /* @__PURE__ */ new Date(),
1916
2001
  actionExecutionId: event.actionExecutionId,
1917
2002
  actionName: event.actionName,
@@ -1923,7 +2008,7 @@ var CopilotResolver = class {
1923
2008
  event
1924
2009
  }, "Agent message event received");
1925
2010
  pushMessage({
1926
- id: randomId(),
2011
+ id: randomId2(),
1927
2012
  status: new SuccessMessageStatus(),
1928
2013
  threadId: event.threadId,
1929
2014
  agentName: event.agentName,
@@ -1936,7 +2021,7 @@ var CopilotResolver = class {
1936
2021
  createdAt: /* @__PURE__ */ new Date()
1937
2022
  });
1938
2023
  outputMessages.push(plainToInstance(AgentStateMessage, {
1939
- id: randomId(),
2024
+ id: randomId2(),
1940
2025
  threadId: event.threadId,
1941
2026
  agentName: event.agentName,
1942
2027
  nodeName: event.nodeName,
@@ -2144,4 +2229,4 @@ export {
2144
2229
  getCommonConfig,
2145
2230
  copilotRuntimeNodeHttpEndpoint
2146
2231
  };
2147
- //# sourceMappingURL=chunk-2VR4OD7I.mjs.map
2232
+ //# sourceMappingURL=chunk-U342UAU7.mjs.map