@copilotkit/runtime 1.3.2 → 1.3.3

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 +8 -0
  2. package/dist/{chunk-VQY3UTNK.mjs → chunk-3RSGBABY.mjs} +2 -2
  3. package/dist/{chunk-CP4IV75Q.mjs → chunk-4QVREBXP.mjs} +2 -2
  4. package/dist/{chunk-IYJBUTRQ.mjs → chunk-AOSWZOH5.mjs} +2 -2
  5. package/dist/{chunk-J3URDBS7.mjs → chunk-LQSJAQSM.mjs} +157 -72
  6. package/dist/chunk-LQSJAQSM.mjs.map +1 -0
  7. package/dist/{chunk-GJHAWL7E.mjs → chunk-TU4DA2BH.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-J3URDBS7.mjs.map +0 -1
  31. /package/dist/{chunk-VQY3UTNK.mjs.map → chunk-3RSGBABY.mjs.map} +0 -0
  32. /package/dist/{chunk-CP4IV75Q.mjs.map → chunk-4QVREBXP.mjs.map} +0 -0
  33. /package/dist/{chunk-IYJBUTRQ.mjs.map → chunk-AOSWZOH5.mjs.map} +0 -0
  34. /package/dist/{chunk-GJHAWL7E.mjs.map → chunk-TU4DA2BH.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.3.2",
47
+ version: "1.3.3",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -59,7 +59,9 @@ var require_package = __commonJS({
59
59
  test: "jest --passWithNoTests",
60
60
  "check-types": "tsc --noEmit",
61
61
  clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
62
- "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts"
62
+ "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
63
+ "link:global": "pnpm link --global",
64
+ "unlink:global": "pnpm unlink --global"
63
65
  },
64
66
  devDependencies: {
65
67
  "@swc/core": "1.5.28",
@@ -146,7 +148,7 @@ module.exports = __toCommonJS(src_exports);
146
148
  var import_reflect_metadata = require("reflect-metadata");
147
149
 
148
150
  // src/lib/runtime/copilot-runtime.ts
149
- var import_shared9 = require("@copilotkit/shared");
151
+ var import_shared10 = require("@copilotkit/shared");
150
152
 
151
153
  // src/service-adapters/langchain/langserve.ts
152
154
  var import_remote = require("langchain/runnables/remote");
@@ -1575,9 +1577,11 @@ var LangGraphEventTypes;
1575
1577
  LangGraphEventTypes2["OnToolEnd"] = "on_tool_end";
1576
1578
  LangGraphEventTypes2["OnCopilotKitStateSync"] = "on_copilotkit_state_sync";
1577
1579
  LangGraphEventTypes2["OnCopilotKitEmitMessage"] = "on_copilotkit_emit_message";
1580
+ LangGraphEventTypes2["OnCopilotKitEmitToolCall"] = "on_copilotkit_emit_tool_call";
1578
1581
  })(LangGraphEventTypes || (LangGraphEventTypes = {}));
1579
1582
 
1580
1583
  // src/agents/langgraph/event-source.ts
1584
+ var import_shared9 = require("@copilotkit/shared");
1581
1585
  var RemoteLangGraphEventSource = class {
1582
1586
  eventStream$ = new import_rxjs.ReplaySubject();
1583
1587
  async streamResponse(response) {
@@ -1604,46 +1608,67 @@ var RemoteLangGraphEventSource = class {
1604
1608
  });
1605
1609
  }
1606
1610
  __name(flushBuffer, "flushBuffer");
1607
- while (true) {
1608
- const { done, value } = await reader.read();
1609
- if (!done) {
1610
- buffer.push(decoder.decode(value, {
1611
- stream: true
1612
- }));
1613
- }
1614
- flushBuffer();
1615
- if (done) {
1616
- break;
1611
+ try {
1612
+ while (true) {
1613
+ const { done, value } = await reader.read();
1614
+ if (!done) {
1615
+ buffer.push(decoder.decode(value, {
1616
+ stream: true
1617
+ }));
1618
+ }
1619
+ flushBuffer();
1620
+ if (done) {
1621
+ break;
1622
+ }
1617
1623
  }
1624
+ } catch (error) {
1625
+ console.error("Error in stream", error);
1626
+ eventStream$.error(error);
1627
+ return;
1618
1628
  }
1619
1629
  eventStream$.complete();
1620
1630
  }
1631
+ shouldEmitToolCall(shouldEmitToolCalls, toolCallName) {
1632
+ if (typeof shouldEmitToolCalls === "boolean") {
1633
+ return shouldEmitToolCalls;
1634
+ }
1635
+ if (Array.isArray(shouldEmitToolCalls)) {
1636
+ return shouldEmitToolCalls.includes(toolCallName);
1637
+ }
1638
+ return shouldEmitToolCalls === toolCallName;
1639
+ }
1621
1640
  processLangGraphEvents() {
1641
+ let lastEventWithState = null;
1622
1642
  return this.eventStream$.pipe((0, import_rxjs.scan)((acc, event) => {
1623
- var _a, _b, _c, _d, _e, _f, _g, _h;
1643
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
1624
1644
  if (event.event === LangGraphEventTypes.OnChatModelStream) {
1625
1645
  if ((_c = (_b = (_a = event.data) == null ? void 0 : _a.chunk) == null ? void 0 : _b.kwargs) == null ? void 0 : _c.tool_call_chunks) {
1626
- acc.prevToolCallId = acc.toolCallId;
1627
- acc.toolCallId = (_d = event.data.chunk.kwargs) == null ? void 0 : _d.id;
1646
+ acc.prevToolCallMessageId = acc.toolCallMessageId;
1647
+ acc.toolCallMessageId = (_d = event.data.chunk.kwargs) == null ? void 0 : _d.id;
1628
1648
  if ((_e = event.data.chunk.kwargs.tool_call_chunks[0]) == null ? void 0 : _e.name) {
1629
1649
  acc.toolCallName = event.data.chunk.kwargs.tool_call_chunks[0].name;
1630
1650
  }
1651
+ if ((_f = event.data.chunk.kwargs.tool_call_chunks[0]) == null ? void 0 : _f.id) {
1652
+ acc.toolCallId = event.data.chunk.kwargs.tool_call_chunks[0].id;
1653
+ }
1631
1654
  }
1632
1655
  acc.prevMessageId = acc.messageId;
1633
- acc.messageId = (_h = (_g = (_f = event.data) == null ? void 0 : _f.chunk) == null ? void 0 : _g.kwargs) == null ? void 0 : _h.id;
1656
+ acc.messageId = (_i = (_h = (_g = event.data) == null ? void 0 : _g.chunk) == null ? void 0 : _h.kwargs) == null ? void 0 : _i.id;
1634
1657
  } else {
1635
- acc.prevToolCallId = acc.toolCallId;
1636
- acc.toolCallId = null;
1658
+ acc.prevToolCallMessageId = acc.toolCallMessageId;
1659
+ acc.toolCallMessageId = null;
1637
1660
  acc.prevMessageId = acc.messageId;
1638
1661
  acc.messageId = null;
1639
1662
  acc.toolCallName = null;
1640
1663
  }
1641
1664
  acc.event = event;
1665
+ lastEventWithState = acc;
1642
1666
  return acc;
1643
1667
  }, {
1644
1668
  event: null,
1645
1669
  toolCallId: null,
1646
- prevToolCallId: null,
1670
+ toolCallMessageId: null,
1671
+ prevToolCallMessageId: null,
1647
1672
  messageId: null,
1648
1673
  toolCallName: null,
1649
1674
  prevMessageId: null
@@ -1660,7 +1685,7 @@ var RemoteLangGraphEventSource = class {
1660
1685
  shouldEmitMessages = eventWithState.event.metadata["copilotkit:emit-messages"];
1661
1686
  }
1662
1687
  }
1663
- if (eventWithState.prevToolCallId !== null && eventWithState.prevToolCallId !== eventWithState.toolCallId && shouldEmitToolCalls) {
1688
+ if (eventWithState.prevToolCallMessageId !== null && eventWithState.prevToolCallMessageId !== eventWithState.toolCallMessageId && this.shouldEmitToolCall(shouldEmitToolCalls, eventWithState.toolCallName)) {
1664
1689
  events.push({
1665
1690
  type: RuntimeEventTypes.ActionExecutionEnd
1666
1691
  });
@@ -1684,6 +1709,20 @@ var RemoteLangGraphEventSource = class {
1684
1709
  type: RuntimeEventTypes.TextMessageEnd
1685
1710
  });
1686
1711
  break;
1712
+ case LangGraphEventTypes.OnCopilotKitEmitToolCall:
1713
+ events.push({
1714
+ type: RuntimeEventTypes.ActionExecutionStart,
1715
+ actionExecutionId: eventWithState.event.id,
1716
+ actionName: eventWithState.event.name
1717
+ });
1718
+ events.push({
1719
+ type: RuntimeEventTypes.ActionExecutionArgs,
1720
+ args: JSON.stringify(eventWithState.event.args)
1721
+ });
1722
+ events.push({
1723
+ type: RuntimeEventTypes.ActionExecutionEnd
1724
+ });
1725
+ break;
1687
1726
  case LangGraphEventTypes.OnCopilotKitStateSync:
1688
1727
  events.push({
1689
1728
  type: RuntimeEventTypes.AgentStateMessage,
@@ -1700,11 +1739,11 @@ var RemoteLangGraphEventSource = class {
1700
1739
  case LangGraphEventTypes.OnToolEnd:
1701
1740
  break;
1702
1741
  case LangGraphEventTypes.OnChatModelStream:
1703
- if (eventWithState.toolCallId !== null && eventWithState.prevToolCallId !== eventWithState.toolCallId) {
1704
- if (shouldEmitToolCalls) {
1742
+ if (eventWithState.toolCallMessageId !== null && eventWithState.prevToolCallMessageId !== eventWithState.toolCallMessageId) {
1743
+ if (this.shouldEmitToolCall(shouldEmitToolCalls, eventWithState.toolCallName)) {
1705
1744
  events.push({
1706
1745
  type: RuntimeEventTypes.ActionExecutionStart,
1707
- actionExecutionId: eventWithState.toolCallId,
1746
+ actionExecutionId: eventWithState.toolCallMessageId,
1708
1747
  actionName: eventWithState.toolCallName,
1709
1748
  scope: "client"
1710
1749
  });
@@ -1720,7 +1759,7 @@ var RemoteLangGraphEventSource = class {
1720
1759
  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;
1721
1760
  const content = (_h = (_g = (_f = eventWithState.event.data) == null ? void 0 : _f.chunk) == null ? void 0 : _g.kwargs) == null ? void 0 : _h.content;
1722
1761
  if (args) {
1723
- if (shouldEmitToolCalls) {
1762
+ if (this.shouldEmitToolCall(shouldEmitToolCalls, eventWithState.toolCallName)) {
1724
1763
  events.push({
1725
1764
  type: RuntimeEventTypes.ActionExecutionArgs,
1726
1765
  args
@@ -1737,6 +1776,32 @@ var RemoteLangGraphEventSource = class {
1737
1776
  break;
1738
1777
  }
1739
1778
  return events;
1779
+ }), (0, import_rxjs.catchError)((error) => {
1780
+ console.error(error);
1781
+ const events = [];
1782
+ if (lastEventWithState == null ? void 0 : lastEventWithState.messageId) {
1783
+ events.push({
1784
+ type: RuntimeEventTypes.TextMessageEnd
1785
+ });
1786
+ }
1787
+ if (lastEventWithState == null ? void 0 : lastEventWithState.toolCallMessageId) {
1788
+ events.push({
1789
+ type: RuntimeEventTypes.ActionExecutionEnd
1790
+ });
1791
+ }
1792
+ const messageId = (0, import_shared9.randomId)();
1793
+ events.push({
1794
+ type: RuntimeEventTypes.TextMessageStart,
1795
+ messageId
1796
+ });
1797
+ events.push({
1798
+ type: RuntimeEventTypes.TextMessageContent,
1799
+ content: "\u274C An error occurred. Please try again."
1800
+ });
1801
+ events.push({
1802
+ type: RuntimeEventTypes.TextMessageEnd
1803
+ });
1804
+ return events;
1740
1805
  }));
1741
1806
  }
1742
1807
  };
@@ -1770,27 +1835,40 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
1770
1835
  url
1771
1836
  }, "Fetching actions from url");
1772
1837
  const headers = createHeaders(onBeforeRequest, graphqlContext);
1773
- const response = await fetch(`${url}/info`, {
1774
- method: "POST",
1775
- headers,
1776
- body: JSON.stringify({
1777
- properties: graphqlContext.properties,
1778
- frontendUrl
1779
- })
1780
- });
1781
- if (!response.ok) {
1838
+ try {
1839
+ const response = await fetch(`${url}/info`, {
1840
+ method: "POST",
1841
+ headers,
1842
+ body: JSON.stringify({
1843
+ properties: graphqlContext.properties,
1844
+ frontendUrl
1845
+ })
1846
+ });
1847
+ if (!response.ok) {
1848
+ logger2.error({
1849
+ url,
1850
+ status: response.status,
1851
+ body: await response.text()
1852
+ }, "Failed to fetch actions from url");
1853
+ return {
1854
+ actions: [],
1855
+ agents: []
1856
+ };
1857
+ }
1858
+ const json = await response.json();
1859
+ logger2.debug({
1860
+ json
1861
+ }, "Fetched actions from url");
1862
+ return json;
1863
+ } catch (error) {
1782
1864
  logger2.error({
1783
- url,
1784
- status: response.status,
1785
- body: await response.text()
1865
+ error: error.message ? error.message : error + ""
1786
1866
  }, "Failed to fetch actions from url");
1787
- return [];
1867
+ return {
1868
+ actions: [],
1869
+ agents: []
1870
+ };
1788
1871
  }
1789
- const json = await response.json();
1790
- logger2.debug({
1791
- json
1792
- }, "Fetched actions from url");
1793
- return json;
1794
1872
  }
1795
1873
  __name(fetchRemoteInfo, "fetchRemoteInfo");
1796
1874
  function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, logger: logger2, messages, agentStates }) {
@@ -1805,30 +1883,37 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
1805
1883
  }, "Executing remote action");
1806
1884
  const headers = createHeaders(onBeforeRequest, graphqlContext);
1807
1885
  telemetry_client_default.capture("oss.runtime.remote_action_executed", {});
1808
- const response = await fetch(`${url}/actions/execute`, {
1809
- method: "POST",
1810
- headers,
1811
- body: JSON.stringify({
1812
- name: action.name,
1813
- arguments: args,
1814
- properties: graphqlContext.properties
1815
- })
1816
- });
1817
- if (!response.ok) {
1886
+ try {
1887
+ const response = await fetch(`${url}/actions/execute`, {
1888
+ method: "POST",
1889
+ headers,
1890
+ body: JSON.stringify({
1891
+ name: action.name,
1892
+ arguments: args,
1893
+ properties: graphqlContext.properties
1894
+ })
1895
+ });
1896
+ if (!response.ok) {
1897
+ logger2.error({
1898
+ url,
1899
+ status: response.status,
1900
+ body: await response.text()
1901
+ }, "Failed to execute remote action");
1902
+ return "Failed to execute remote action";
1903
+ }
1904
+ const requestResult = await response.json();
1905
+ const result = requestResult["result"];
1906
+ logger2.debug({
1907
+ actionName: action.name,
1908
+ result
1909
+ }, "Executed remote action");
1910
+ return result;
1911
+ } catch (error) {
1818
1912
  logger2.error({
1819
- url,
1820
- status: response.status,
1821
- body: await response.text()
1913
+ error: error.message ? error.message : error + ""
1822
1914
  }, "Failed to execute remote action");
1823
1915
  return "Failed to execute remote action";
1824
1916
  }
1825
- const requestResult = await response.json();
1826
- const result = requestResult["result"];
1827
- logger2.debug({
1828
- actionName: action.name,
1829
- result
1830
- }, "Executed remote action");
1831
- return result;
1832
1917
  }
1833
1918
  }));
1834
1919
  const agents = json["agents"].map((agent) => ({
@@ -2183,7 +2268,7 @@ var CopilotRuntime = class {
2183
2268
  const serverSideActionsInput = serverSideActions.map((action) => ({
2184
2269
  name: action.name,
2185
2270
  description: action.description,
2186
- jsonSchema: JSON.stringify((0, import_shared9.actionParametersToJsonSchema)(action.parameters))
2271
+ jsonSchema: JSON.stringify((0, import_shared10.actionParametersToJsonSchema)(action.parameters))
2187
2272
  }));
2188
2273
  const actionInputs = flattenToolCallsNoDuplicates([
2189
2274
  ...serverSideActionsInput,
@@ -2236,7 +2321,7 @@ var CopilotRuntime = class {
2236
2321
  async processAgentRequest(request) {
2237
2322
  var _a;
2238
2323
  const { messages: rawMessages, outputMessagesPromise, graphqlContext, agentSession } = request;
2239
- const { threadId = (0, import_shared9.randomId)(), agentName, nodeName } = agentSession;
2324
+ const { threadId = (0, import_shared10.randomId)(), agentName, nodeName } = agentSession;
2240
2325
  const serverSideActions = await this.getServerSideActions(request);
2241
2326
  const messages = convertGqlInputToMessages(rawMessages);
2242
2327
  const agent = serverSideActions.find((action) => action.name === agentName && isLangGraphAgentAction(action));
@@ -2246,7 +2331,7 @@ var CopilotRuntime = class {
2246
2331
  const serverSideActionsInput = serverSideActions.filter((action) => !isLangGraphAgentAction(action)).map((action) => ({
2247
2332
  name: action.name,
2248
2333
  description: action.description,
2249
- jsonSchema: JSON.stringify((0, import_shared9.actionParametersToJsonSchema)(action.parameters))
2334
+ jsonSchema: JSON.stringify((0, import_shared10.actionParametersToJsonSchema)(action.parameters))
2250
2335
  }));
2251
2336
  const actionInputsWithoutAgents = flattenToolCallsNoDuplicates([
2252
2337
  ...serverSideActionsInput,
@@ -3389,7 +3474,7 @@ var UnknownErrorResponse = class extends FailedResponseStatus {
3389
3474
  __name(UnknownErrorResponse, "UnknownErrorResponse");
3390
3475
 
3391
3476
  // src/graphql/resolvers/copilot.resolver.ts
3392
- var import_shared10 = require("@copilotkit/shared");
3477
+ var import_shared11 = require("@copilotkit/shared");
3393
3478
  function _ts_decorate14(decorators, target, key, desc) {
3394
3479
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3395
3480
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -3506,7 +3591,7 @@ var CopilotResolver = class {
3506
3591
  rejectOutputMessagesPromise = reject;
3507
3592
  });
3508
3593
  logger2.debug("Processing");
3509
- const { eventSource, threadId = (0, import_shared10.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
3594
+ const { eventSource, threadId = (0, import_shared11.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
3510
3595
  serviceAdapter,
3511
3596
  messages: data.messages,
3512
3597
  actions: data.frontend.actions,
@@ -3551,7 +3636,7 @@ var CopilotResolver = class {
3551
3636
  });
3552
3637
  outputMessages = [
3553
3638
  (0, import_class_transformer2.plainToInstance)(TextMessage, {
3554
- id: (0, import_shared10.randomId)(),
3639
+ id: (0, import_shared11.randomId)(),
3555
3640
  createdAt: /* @__PURE__ */ new Date(),
3556
3641
  content: result.reason,
3557
3642
  role: MessageRole.assistant
@@ -3602,7 +3687,7 @@ var CopilotResolver = class {
3602
3687
  (0, import_rxjs4.takeWhile)((e) => e.type != RuntimeEventTypes.TextMessageEnd)
3603
3688
  );
3604
3689
  const streamingTextStatus = new import_rxjs4.Subject();
3605
- const messageId = (0, import_shared10.randomId)();
3690
+ const messageId = (0, import_shared11.randomId)();
3606
3691
  pushMessage({
3607
3692
  id: messageId,
3608
3693
  status: (0, import_rxjs4.firstValueFrom)(streamingTextStatus),
@@ -3714,7 +3799,7 @@ var CopilotResolver = class {
3714
3799
  result: event.result
3715
3800
  }, "Action execution result event received");
3716
3801
  pushMessage({
3717
- id: (0, import_shared10.randomId)(),
3802
+ id: (0, import_shared11.randomId)(),
3718
3803
  status: new SuccessMessageStatus(),
3719
3804
  createdAt: /* @__PURE__ */ new Date(),
3720
3805
  actionExecutionId: event.actionExecutionId,
@@ -3722,7 +3807,7 @@ var CopilotResolver = class {
3722
3807
  result: event.result
3723
3808
  });
3724
3809
  outputMessages.push((0, import_class_transformer2.plainToInstance)(ResultMessage, {
3725
- id: (0, import_shared10.randomId)(),
3810
+ id: (0, import_shared11.randomId)(),
3726
3811
  createdAt: /* @__PURE__ */ new Date(),
3727
3812
  actionExecutionId: event.actionExecutionId,
3728
3813
  actionName: event.actionName,
@@ -3734,7 +3819,7 @@ var CopilotResolver = class {
3734
3819
  event
3735
3820
  }, "Agent message event received");
3736
3821
  pushMessage({
3737
- id: (0, import_shared10.randomId)(),
3822
+ id: (0, import_shared11.randomId)(),
3738
3823
  status: new SuccessMessageStatus(),
3739
3824
  threadId: event.threadId,
3740
3825
  agentName: event.agentName,
@@ -3747,7 +3832,7 @@ var CopilotResolver = class {
3747
3832
  createdAt: /* @__PURE__ */ new Date()
3748
3833
  });
3749
3834
  outputMessages.push((0, import_class_transformer2.plainToInstance)(AgentStateMessage, {
3750
- id: (0, import_shared10.randomId)(),
3835
+ id: (0, import_shared11.randomId)(),
3751
3836
  threadId: event.threadId,
3752
3837
  agentName: event.agentName,
3753
3838
  nodeName: event.nodeName,