@copilotkit/runtime 1.9.2-next.13 → 1.9.2-next.14

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 (32) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-WY337BWR.mjs → chunk-55VUNE6C.mjs} +2 -2
  3. package/dist/{chunk-CSXEYW65.mjs → chunk-J7IKWG2M.mjs} +10 -10
  4. package/dist/chunk-J7IKWG2M.mjs.map +1 -0
  5. package/dist/{chunk-LNXBP675.mjs → chunk-LHHL56Z2.mjs} +2 -2
  6. package/dist/{chunk-NV2UY5BF.mjs → chunk-LLFNFIOQ.mjs} +2 -2
  7. package/dist/{chunk-6V6X7HZO.mjs → chunk-OXUJLGHK.mjs} +2 -2
  8. package/dist/index.js +9 -9
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +5 -5
  11. package/dist/lib/index.js +9 -9
  12. package/dist/lib/index.js.map +1 -1
  13. package/dist/lib/index.mjs +5 -5
  14. package/dist/lib/integrations/index.js +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +2 -2
  27. package/src/lib/runtime/copilot-runtime.ts +8 -9
  28. package/dist/chunk-CSXEYW65.mjs.map +0 -1
  29. /package/dist/{chunk-WY337BWR.mjs.map → chunk-55VUNE6C.mjs.map} +0 -0
  30. /package/dist/{chunk-LNXBP675.mjs.map → chunk-LHHL56Z2.mjs.map} +0 -0
  31. /package/dist/{chunk-NV2UY5BF.mjs.map → chunk-LLFNFIOQ.mjs.map} +0 -0
  32. /package/dist/{chunk-6V6X7HZO.mjs.map → chunk-OXUJLGHK.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint
3
- } from "../../../chunk-CSXEYW65.mjs";
3
+ } from "../../../chunk-J7IKWG2M.mjs";
4
4
  import "../../../chunk-SHBDMA63.mjs";
5
5
  import "../../../chunk-JTFQ5GIL.mjs";
6
6
  import "../../../chunk-XWBDEXDA.mjs";
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.9.2-next.13",
12
+ "version": "1.9.2-next.14",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -66,7 +66,7 @@
66
66
  "rxjs": "7.8.1",
67
67
  "type-graphql": "2.0.0-rc.1",
68
68
  "zod": "^3.23.3",
69
- "@copilotkit/shared": "1.9.2-next.13"
69
+ "@copilotkit/shared": "1.9.2-next.14"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@ag-ui/client": ">=0.0.28",
@@ -884,10 +884,10 @@ please use an LLM adapter instead.`,
884
884
  }
885
885
 
886
886
  discoverAgentsFromAgui(): Agent[] {
887
- return Object.values(this.agents ?? []).map((agent: LangGraphAgent) => ({
888
- name: agent.agentName,
889
- id: agent.agentId,
890
- description: "",
887
+ return Object.entries(this.agents ?? []).map(([key, agent]: [string, AbstractAgent]) => ({
888
+ name: (agent as any).agentName ?? key,
889
+ id: agent.agentId ?? key,
890
+ description: agent.description ?? "",
891
891
  }));
892
892
  }
893
893
 
@@ -963,11 +963,6 @@ please use an LLM adapter instead.`,
963
963
  ? { authorization: `Bearer ${graphqlContext.properties.authorization}` }
964
964
  : null;
965
965
 
966
- const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name] as LangGraphAgent;
967
- if (!aguiAgent) {
968
- throw new Error(`Agent: ${agent.name} could not be resolved`);
969
- }
970
-
971
966
  let state: any = {};
972
967
  try {
973
968
  let client: LangGraphClient | null;
@@ -978,6 +973,10 @@ please use an LLM adapter instead.`,
978
973
  defaultHeaders: { ...propertyHeaders },
979
974
  });
980
975
  } else {
976
+ const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name] as LangGraphAgent;
977
+ if (!aguiAgent) {
978
+ throw new Error(`Agent: ${agent.name} could not be resolved`);
979
+ }
981
980
  // @ts-expect-error -- both clients are the same
982
981
  client = aguiAgent.client ?? null;
983
982
  }