@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
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-CSXEYW65.mjs";
5
+ } from "./chunk-J7IKWG2M.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
22
22
  export {
23
23
  copilotRuntimeNestEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-LNXBP675.mjs.map
25
+ //# sourceMappingURL=chunk-LHHL56Z2.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-CSXEYW65.mjs";
5
+ } from "./chunk-J7IKWG2M.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-NV2UY5BF.mjs.map
80
+ //# sourceMappingURL=chunk-LLFNFIOQ.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-CSXEYW65.mjs";
5
+ } from "./chunk-J7IKWG2M.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-6V6X7HZO.mjs.map
25
+ //# sourceMappingURL=chunk-OXUJLGHK.mjs.map
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.9.2-next.13",
47
+ version: "1.9.2-next.14",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -5135,10 +5135,10 @@ please use an LLM adapter instead.`
5135
5135
  return agents;
5136
5136
  }
5137
5137
  discoverAgentsFromAgui() {
5138
- return Object.values(this.agents ?? []).map((agent) => ({
5139
- name: agent.agentName,
5140
- id: agent.agentId,
5141
- description: ""
5138
+ return Object.entries(this.agents ?? []).map(([key, agent]) => ({
5139
+ name: agent.agentName ?? key,
5140
+ id: agent.agentId ?? key,
5141
+ description: agent.description ?? ""
5142
5142
  }));
5143
5143
  }
5144
5144
  async loadAgentState(graphqlContext, threadId, agentName) {
@@ -5201,10 +5201,6 @@ please use an LLM adapter instead.`
5201
5201
  const propertyHeaders = graphqlContext.properties.authorization ? {
5202
5202
  authorization: `Bearer ${graphqlContext.properties.authorization}`
5203
5203
  } : null;
5204
- const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name];
5205
- if (!aguiAgent) {
5206
- throw new Error(`Agent: ${agent.name} could not be resolved`);
5207
- }
5208
5204
  let state = {};
5209
5205
  try {
5210
5206
  let client;
@@ -5217,6 +5213,10 @@ please use an LLM adapter instead.`
5217
5213
  }
5218
5214
  });
5219
5215
  } else {
5216
+ const aguiAgent = graphqlContext._copilotkit.runtime.agents[agent.name];
5217
+ if (!aguiAgent) {
5218
+ throw new Error(`Agent: ${agent.name} could not be resolved`);
5219
+ }
5220
5220
  client = aguiAgent.client ?? null;
5221
5221
  }
5222
5222
  state = client ? (await client.threads.getState(threadId)).values : {};