@copilotkit/runtime 1.8.14-next.2 → 1.8.14-next.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 (33) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-YLRGZOEQ.mjs → chunk-6P6VMQLZ.mjs} +22 -7
  3. package/dist/chunk-6P6VMQLZ.mjs.map +1 -0
  4. package/dist/{chunk-MZSUT6FW.mjs → chunk-BMA7V5T7.mjs} +2 -2
  5. package/dist/{chunk-RM7LK6G2.mjs → chunk-C7XHY7LW.mjs} +2 -2
  6. package/dist/{chunk-5FDI6FH6.mjs → chunk-T2RKWYXN.mjs} +2 -2
  7. package/dist/index.js +21 -6
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +4 -4
  10. package/dist/lib/index.js +21 -6
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/index.mjs +4 -4
  13. package/dist/lib/integrations/index.js +44 -1
  14. package/dist/lib/integrations/index.js.map +1 -1
  15. package/dist/lib/integrations/index.mjs +4 -4
  16. package/dist/lib/integrations/nest/index.js +44 -1
  17. package/dist/lib/integrations/nest/index.js.map +1 -1
  18. package/dist/lib/integrations/nest/index.mjs +2 -2
  19. package/dist/lib/integrations/node-express/index.js +44 -1
  20. package/dist/lib/integrations/node-express/index.js.map +1 -1
  21. package/dist/lib/integrations/node-express/index.mjs +2 -2
  22. package/dist/lib/integrations/node-http/index.js +44 -1
  23. package/dist/lib/integrations/node-http/index.js.map +1 -1
  24. package/dist/lib/integrations/node-http/index.mjs +1 -1
  25. package/package.json +2 -2
  26. package/src/graphql/resolvers/copilot.resolver.ts +14 -0
  27. package/src/lib/runtime/agui-action.ts +5 -0
  28. package/src/lib/runtime/copilot-runtime.ts +1 -0
  29. package/src/lib/runtime/remote-actions.ts +3 -0
  30. package/dist/chunk-YLRGZOEQ.mjs.map +0 -1
  31. /package/dist/{chunk-MZSUT6FW.mjs.map → chunk-BMA7V5T7.mjs.map} +0 -0
  32. /package/dist/{chunk-RM7LK6G2.mjs.map → chunk-C7XHY7LW.mjs.map} +0 -0
  33. /package/dist/{chunk-5FDI6FH6.mjs.map → chunk-T2RKWYXN.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  config,
4
4
  copilotRuntimeNextJSAppRouterEndpoint,
5
5
  copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "./chunk-5FDI6FH6.mjs";
6
+ } from "./chunk-T2RKWYXN.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "./chunk-RM7LK6G2.mjs";
9
+ } from "./chunk-C7XHY7LW.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-MZSUT6FW.mjs";
12
+ } from "./chunk-BMA7V5T7.mjs";
13
13
  import {
14
14
  CopilotRuntime,
15
15
  addCustomHeaderPlugin,
@@ -25,7 +25,7 @@ import {
25
25
  getCommonConfig,
26
26
  langGraphPlatformEndpoint,
27
27
  resolveEndpointType
28
- } from "./chunk-YLRGZOEQ.mjs";
28
+ } from "./chunk-6P6VMQLZ.mjs";
29
29
  import {
30
30
  AnthropicAdapter,
31
31
  EmptyAdapter,
package/dist/lib/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.8.14-next.2",
47
+ version: "1.8.14-next.3",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -3938,7 +3938,7 @@ var import_shared15 = require("@copilotkit/shared");
3938
3938
 
3939
3939
  // src/lib/runtime/agui-action.ts
3940
3940
  var import_shared13 = require("@copilotkit/shared");
3941
- function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent }) {
3941
+ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
3942
3942
  const action = {
3943
3943
  name: agent.agentId,
3944
3944
  description: agent.description,
@@ -3946,6 +3946,7 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
3946
3946
  handler: async (_args) => {
3947
3947
  },
3948
3948
  remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
3949
+ var _a;
3949
3950
  logger2.debug({
3950
3951
  actionName: agent.agentId
3951
3952
  }, "Executing remote agent");
@@ -3973,7 +3974,9 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
3973
3974
  };
3974
3975
  });
3975
3976
  return agent.legacy_to_be_removed_runAgentBridged({
3976
- tools
3977
+ tools,
3978
+ // @ts-ignore
3979
+ resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
3977
3980
  });
3978
3981
  }
3979
3982
  };
@@ -4084,7 +4087,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
4084
4087
  }
4085
4088
  }
4086
4089
  __name(fetchRemoteInfo, "fetchRemoteInfo");
4087
- async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents }) {
4090
+ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
4088
4091
  const logger2 = graphqlContext.logger.child({
4089
4092
  component: "remote-actions.fetchRemoteActions"
4090
4093
  });
@@ -4146,7 +4149,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
4146
4149
  logger: logger2,
4147
4150
  messages,
4148
4151
  agentStates,
4149
- agent
4152
+ agent,
4153
+ metaEvents
4150
4154
  }));
4151
4155
  }
4152
4156
  return result.flat();
@@ -5209,7 +5213,8 @@ please use an LLM adapter instead.`
5209
5213
  messages: inputMessages,
5210
5214
  agentStates,
5211
5215
  frontendUrl: url,
5212
- agents: this.agents
5216
+ agents: this.agents,
5217
+ metaEvents: request.metaEvents
5213
5218
  });
5214
5219
  const configuredActions = typeof this.actions === "function" ? this.actions({
5215
5220
  properties: graphqlContext.properties,
@@ -5917,6 +5922,16 @@ var CopilotResolver = class {
5917
5922
  return;
5918
5923
  }
5919
5924
  switch (event.name) {
5925
+ case LangGraphEventTypes.OnInterrupt:
5926
+ push((0, import_class_transformer3.plainToInstance)(LangGraphInterruptEvent, {
5927
+ // @ts-ignore
5928
+ type: event.type,
5929
+ // @ts-ignore
5930
+ name: RuntimeMetaEventName.LangGraphInterruptEvent,
5931
+ // @ts-ignore
5932
+ value: event.value
5933
+ }));
5934
+ break;
5920
5935
  case RuntimeMetaEventName.LangGraphInterruptEvent:
5921
5936
  push((0, import_class_transformer3.plainToInstance)(LangGraphInterruptEvent, {
5922
5937
  type: event.type,