@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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.8.14-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 9d33836: - fix: prepare cpk agui wiring for ag-ui langgraph support
8
+ - @copilotkit/shared@1.8.14-next.3
9
+
3
10
  ## 1.8.14-next.2
4
11
 
5
12
  ### Patch Changes
@@ -40,7 +40,7 @@ var require_package = __commonJS({
40
40
  publishConfig: {
41
41
  access: "public"
42
42
  },
43
- version: "1.8.14-next.2",
43
+ version: "1.8.14-next.3",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -2698,7 +2698,7 @@ import { CopilotKitLowLevelError as CopilotKitLowLevelError2, ResolvedCopilotKit
2698
2698
 
2699
2699
  // src/lib/runtime/agui-action.ts
2700
2700
  import { parseJson as parseJson3 } from "@copilotkit/shared";
2701
- function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent }) {
2701
+ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
2702
2702
  const action = {
2703
2703
  name: agent.agentId,
2704
2704
  description: agent.description,
@@ -2706,6 +2706,7 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
2706
2706
  handler: async (_args) => {
2707
2707
  },
2708
2708
  remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
2709
+ var _a;
2709
2710
  logger2.debug({
2710
2711
  actionName: agent.agentId
2711
2712
  }, "Executing remote agent");
@@ -2733,7 +2734,9 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
2733
2734
  };
2734
2735
  });
2735
2736
  return agent.legacy_to_be_removed_runAgentBridged({
2736
- tools
2737
+ tools,
2738
+ // @ts-ignore
2739
+ resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
2737
2740
  });
2738
2741
  }
2739
2742
  };
@@ -2844,7 +2847,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
2844
2847
  }
2845
2848
  }
2846
2849
  __name(fetchRemoteInfo, "fetchRemoteInfo");
2847
- async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents }) {
2850
+ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
2848
2851
  const logger2 = graphqlContext.logger.child({
2849
2852
  component: "remote-actions.fetchRemoteActions"
2850
2853
  });
@@ -2906,7 +2909,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
2906
2909
  logger: logger2,
2907
2910
  messages,
2908
2911
  agentStates,
2909
- agent
2912
+ agent,
2913
+ metaEvents
2910
2914
  }));
2911
2915
  }
2912
2916
  return result.flat();
@@ -3755,7 +3759,8 @@ please use an LLM adapter instead.`
3755
3759
  messages: inputMessages,
3756
3760
  agentStates,
3757
3761
  frontendUrl: url,
3758
- agents: this.agents
3762
+ agents: this.agents,
3763
+ metaEvents: request.metaEvents
3759
3764
  });
3760
3765
  const configuredActions = typeof this.actions === "function" ? this.actions({
3761
3766
  properties: graphqlContext.properties,
@@ -4428,6 +4433,16 @@ var CopilotResolver = class {
4428
4433
  return;
4429
4434
  }
4430
4435
  switch (event.name) {
4436
+ case LangGraphEventTypes.OnInterrupt:
4437
+ push(plainToInstance3(LangGraphInterruptEvent, {
4438
+ // @ts-ignore
4439
+ type: event.type,
4440
+ // @ts-ignore
4441
+ name: RuntimeMetaEventName.LangGraphInterruptEvent,
4442
+ // @ts-ignore
4443
+ value: event.value
4444
+ }));
4445
+ break;
4431
4446
  case RuntimeMetaEventName.LangGraphInterruptEvent:
4432
4447
  push(plainToInstance3(LangGraphInterruptEvent, {
4433
4448
  type: event.type,
@@ -5079,4 +5094,4 @@ export {
5079
5094
  getCommonConfig,
5080
5095
  copilotRuntimeNodeHttpEndpoint
5081
5096
  };
5082
- //# sourceMappingURL=chunk-YLRGZOEQ.mjs.map
5097
+ //# sourceMappingURL=chunk-6P6VMQLZ.mjs.map