@copilotkit/runtime 1.8.14-next.2 → 1.8.14-next.4

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 +14 -0
  2. package/dist/{chunk-MZSUT6FW.mjs → chunk-BV7WYSOF.mjs} +2 -2
  3. package/dist/{chunk-5FDI6FH6.mjs → chunk-EQX4WXGG.mjs} +2 -2
  4. package/dist/{chunk-YLRGZOEQ.mjs → chunk-IZAPLBCH.mjs} +26 -7
  5. package/dist/chunk-IZAPLBCH.mjs.map +1 -0
  6. package/dist/{chunk-RM7LK6G2.mjs → chunk-JH3OA44N.mjs} +2 -2
  7. package/dist/index.js +25 -6
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +4 -4
  10. package/dist/lib/index.js +25 -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 +8 -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-BV7WYSOF.mjs.map} +0 -0
  32. /package/dist/{chunk-5FDI6FH6.mjs.map → chunk-EQX4WXGG.mjs.map} +0 -0
  33. /package/dist/{chunk-RM7LK6G2.mjs.map → chunk-JH3OA44N.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.8.14-next.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 12b8ca8: - fix: fix cpk agui wiring for langgraph
8
+ - @copilotkit/shared@1.8.14-next.4
9
+
10
+ ## 1.8.14-next.3
11
+
12
+ ### Patch Changes
13
+
14
+ - 9d33836: - fix: prepare cpk agui wiring for ag-ui langgraph support
15
+ - @copilotkit/shared@1.8.14-next.3
16
+
3
17
  ## 1.8.14-next.2
4
18
 
5
19
  ### Patch Changes
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-YLRGZOEQ.mjs";
5
+ } from "./chunk-IZAPLBCH.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-MZSUT6FW.mjs.map
25
+ //# sourceMappingURL=chunk-BV7WYSOF.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-YLRGZOEQ.mjs";
5
+ } from "./chunk-IZAPLBCH.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -77,4 +77,4 @@ export {
77
77
  config,
78
78
  copilotRuntimeNextJSPagesRouterEndpoint
79
79
  };
80
- //# sourceMappingURL=chunk-5FDI6FH6.mjs.map
80
+ //# sourceMappingURL=chunk-EQX4WXGG.mjs.map
@@ -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.4",
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");
@@ -2732,8 +2733,14 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
2732
2733
  parameters: JSON.parse(input.jsonSchema)
2733
2734
  };
2734
2735
  });
2736
+ const forwardedProps = metaEvents.length ? {
2737
+ command: {
2738
+ resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
2739
+ }
2740
+ } : void 0;
2735
2741
  return agent.legacy_to_be_removed_runAgentBridged({
2736
- tools
2742
+ tools,
2743
+ forwardedProps
2737
2744
  });
2738
2745
  }
2739
2746
  };
@@ -2844,7 +2851,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
2844
2851
  }
2845
2852
  }
2846
2853
  __name(fetchRemoteInfo, "fetchRemoteInfo");
2847
- async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents }) {
2854
+ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
2848
2855
  const logger2 = graphqlContext.logger.child({
2849
2856
  component: "remote-actions.fetchRemoteActions"
2850
2857
  });
@@ -2906,7 +2913,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
2906
2913
  logger: logger2,
2907
2914
  messages,
2908
2915
  agentStates,
2909
- agent
2916
+ agent,
2917
+ metaEvents
2910
2918
  }));
2911
2919
  }
2912
2920
  return result.flat();
@@ -3755,7 +3763,8 @@ please use an LLM adapter instead.`
3755
3763
  messages: inputMessages,
3756
3764
  agentStates,
3757
3765
  frontendUrl: url,
3758
- agents: this.agents
3766
+ agents: this.agents,
3767
+ metaEvents: request.metaEvents
3759
3768
  });
3760
3769
  const configuredActions = typeof this.actions === "function" ? this.actions({
3761
3770
  properties: graphqlContext.properties,
@@ -4428,6 +4437,16 @@ var CopilotResolver = class {
4428
4437
  return;
4429
4438
  }
4430
4439
  switch (event.name) {
4440
+ case LangGraphEventTypes.OnInterrupt:
4441
+ push(plainToInstance3(LangGraphInterruptEvent, {
4442
+ // @ts-ignore
4443
+ type: event.type,
4444
+ // @ts-ignore
4445
+ name: RuntimeMetaEventName.LangGraphInterruptEvent,
4446
+ // @ts-ignore
4447
+ value: event.value
4448
+ }));
4449
+ break;
4431
4450
  case RuntimeMetaEventName.LangGraphInterruptEvent:
4432
4451
  push(plainToInstance3(LangGraphInterruptEvent, {
4433
4452
  type: event.type,
@@ -5079,4 +5098,4 @@ export {
5079
5098
  getCommonConfig,
5080
5099
  copilotRuntimeNodeHttpEndpoint
5081
5100
  };
5082
- //# sourceMappingURL=chunk-YLRGZOEQ.mjs.map
5101
+ //# sourceMappingURL=chunk-IZAPLBCH.mjs.map