@copilotkit/runtime 1.3.14-fix-handle-execute-agent-error.0 → 1.3.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 +3 -3
  2. package/dist/{chunk-VN26GZV4.mjs → chunk-6TFW5P6C.mjs} +2 -2
  3. package/dist/{chunk-LOMWWP44.mjs → chunk-EN2GQDJF.mjs} +2 -2
  4. package/dist/{chunk-QXHQKRLT.mjs → chunk-HTQXEUKU.mjs} +2 -2
  5. package/dist/{chunk-GVAUIADR.mjs → chunk-I5X63624.mjs} +27 -34
  6. package/dist/chunk-I5X63624.mjs.map +1 -0
  7. package/dist/{chunk-LB3EPUOQ.mjs → chunk-TOIJ5IIA.mjs} +2 -2
  8. package/dist/index.js +26 -33
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +5 -5
  11. package/dist/lib/index.js +26 -33
  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 +4 -4
  27. package/src/lib/runtime/remote-actions.ts +24 -33
  28. package/dist/chunk-GVAUIADR.mjs.map +0 -1
  29. /package/dist/{chunk-VN26GZV4.mjs.map → chunk-6TFW5P6C.mjs.map} +0 -0
  30. /package/dist/{chunk-LOMWWP44.mjs.map → chunk-EN2GQDJF.mjs.map} +0 -0
  31. /package/dist/{chunk-QXHQKRLT.mjs.map → chunk-HTQXEUKU.mjs.map} +0 -0
  32. /package/dist/{chunk-LB3EPUOQ.mjs.map → chunk-TOIJ5IIA.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CopilotRuntime,
3
3
  flattenToolCallsNoDuplicates
4
- } from "./chunk-LB3EPUOQ.mjs";
4
+ } from "./chunk-TOIJ5IIA.mjs";
5
5
  import {
6
6
  AnthropicAdapter,
7
7
  GoogleGenerativeAIAdapter,
@@ -16,19 +16,19 @@ import {
16
16
  config,
17
17
  copilotRuntimeNextJSAppRouterEndpoint,
18
18
  copilotRuntimeNextJSPagesRouterEndpoint
19
- } from "./chunk-QXHQKRLT.mjs";
19
+ } from "./chunk-HTQXEUKU.mjs";
20
20
  import {
21
21
  copilotRuntimeNestEndpoint
22
- } from "./chunk-LOMWWP44.mjs";
22
+ } from "./chunk-EN2GQDJF.mjs";
23
23
  import {
24
24
  copilotRuntimeNodeExpressEndpoint
25
- } from "./chunk-VN26GZV4.mjs";
25
+ } from "./chunk-6TFW5P6C.mjs";
26
26
  import {
27
27
  buildSchema,
28
28
  copilotRuntimeNodeHttpEndpoint,
29
29
  createContext,
30
30
  getCommonConfig
31
- } from "./chunk-GVAUIADR.mjs";
31
+ } from "./chunk-I5X63624.mjs";
32
32
  import "./chunk-CPAHDRLS.mjs";
33
33
  import {
34
34
  GuardrailsValidationFailureResponse,
package/dist/lib/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.3.14-fix-handle-execute-agent-error.0",
47
+ version: "1.3.14",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -1459,41 +1459,34 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
1459
1459
  state = JSON.parse(jsonState);
1460
1460
  }
1461
1461
  }
1462
- try {
1463
- const response = await fetch(`${url}/agents/execute`, {
1464
- method: "POST",
1465
- headers,
1466
- body: JSON.stringify({
1467
- name,
1468
- threadId,
1469
- nodeName,
1470
- messages,
1471
- state,
1472
- properties: graphqlContext.properties,
1473
- actions: actionInputsWithoutAgents.map((action) => ({
1474
- name: action.name,
1475
- description: action.description,
1476
- parameters: JSON.parse(action.jsonSchema)
1477
- }))
1478
- })
1479
- });
1480
- if (!response.ok) {
1481
- logger2.error({
1482
- url,
1483
- status: response.status,
1484
- body: await response.text()
1485
- }, "Failed to execute remote agent");
1486
- throw "Failed to execute remote agent";
1487
- }
1488
- const eventSource = new RemoteLangGraphEventSource();
1489
- eventSource.streamResponse(response);
1490
- return eventSource.processLangGraphEvents();
1491
- } catch (error) {
1462
+ const response = await fetch(`${url}/agents/execute`, {
1463
+ method: "POST",
1464
+ headers,
1465
+ body: JSON.stringify({
1466
+ name,
1467
+ threadId,
1468
+ nodeName,
1469
+ messages,
1470
+ state,
1471
+ properties: graphqlContext.properties,
1472
+ actions: actionInputsWithoutAgents.map((action) => ({
1473
+ name: action.name,
1474
+ description: action.description,
1475
+ parameters: JSON.parse(action.jsonSchema)
1476
+ }))
1477
+ })
1478
+ });
1479
+ if (!response.ok) {
1492
1480
  logger2.error({
1493
- error: error.message ? error.message : error + ""
1481
+ url,
1482
+ status: response.status,
1483
+ body: await response.text()
1494
1484
  }, "Failed to execute remote agent");
1495
- throw "Failed to execute remote agent";
1485
+ throw new Error("Failed to execute remote agent");
1496
1486
  }
1487
+ const eventSource = new RemoteLangGraphEventSource();
1488
+ eventSource.streamResponse(response);
1489
+ return eventSource.processLangGraphEvents();
1497
1490
  }
1498
1491
  }));
1499
1492
  return [