@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.9.2-next.14
4
+
5
+ ### Patch Changes
6
+
7
+ - 3a7f45f: - fix: resolve agui agents only after all other endpoints
8
+ - @copilotkit/shared@1.9.2-next.14
9
+
3
10
  ## 1.9.2-next.13
4
11
 
5
12
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LangGraphEventTypes
3
- } from "./chunk-CSXEYW65.mjs";
3
+ } from "./chunk-J7IKWG2M.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-FHD4JECV.mjs";
@@ -155,4 +155,4 @@ export {
155
155
  CustomEventNames,
156
156
  LangGraphAgent
157
157
  };
158
- //# sourceMappingURL=chunk-WY337BWR.mjs.map
158
+ //# sourceMappingURL=chunk-55VUNE6C.mjs.map
@@ -40,7 +40,7 @@ var require_package = __commonJS({
40
40
  publishConfig: {
41
41
  access: "public"
42
42
  },
43
- version: "1.9.2-next.13",
43
+ version: "1.9.2-next.14",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -3165,10 +3165,10 @@ please use an LLM adapter instead.`
3165
3165
  return agents;
3166
3166
  }
3167
3167
  discoverAgentsFromAgui() {
3168
- return Object.values(this.agents ?? []).map((agent) => ({
3169
- name: agent.agentName,
3170
- id: agent.agentId,
3171
- description: ""
3168
+ return Object.entries(this.agents ?? []).map(([key, agent]) => ({
3169
+ name: agent.agentName ?? key,
3170
+ id: agent.agentId ?? key,
3171
+ description: agent.description ?? ""
3172
3172
  }));
3173
3173
  }
3174
3174
  async loadAgentState(graphqlContext, threadId, agentName) {
@@ -3231,10 +3231,6 @@ please use an LLM adapter instead.`
3231
3231
  const propertyHeaders = graphqlContext.properties.authorization ? {
3232
3232
  authorization: `Bearer ${graphqlContext.properties.authorization}`
3233
3233
  } : null;
3234
- const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name];
3235
- if (!aguiAgent) {
3236
- throw new Error(`Agent: ${agent.name} could not be resolved`);
3237
- }
3238
3234
  let state = {};
3239
3235
  try {
3240
3236
  let client;
@@ -3247,6 +3243,10 @@ please use an LLM adapter instead.`
3247
3243
  }
3248
3244
  });
3249
3245
  } else {
3246
+ const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name];
3247
+ if (!aguiAgent) {
3248
+ throw new Error(`Agent: ${agent.name} could not be resolved`);
3249
+ }
3250
3250
  client = aguiAgent.client ?? null;
3251
3251
  }
3252
3252
  state = client ? (await client.threads.getState(threadId)).values : {};
@@ -5811,4 +5811,4 @@ export {
5811
5811
  getCommonConfig,
5812
5812
  copilotRuntimeNodeHttpEndpoint
5813
5813
  };
5814
- //# sourceMappingURL=chunk-CSXEYW65.mjs.map
5814
+ //# sourceMappingURL=chunk-J7IKWG2M.mjs.map