@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.
- package/CHANGELOG.md +3 -3
- package/dist/{chunk-VN26GZV4.mjs → chunk-6TFW5P6C.mjs} +2 -2
- package/dist/{chunk-LOMWWP44.mjs → chunk-EN2GQDJF.mjs} +2 -2
- package/dist/{chunk-QXHQKRLT.mjs → chunk-HTQXEUKU.mjs} +2 -2
- package/dist/{chunk-GVAUIADR.mjs → chunk-I5X63624.mjs} +27 -34
- package/dist/chunk-I5X63624.mjs.map +1 -0
- package/dist/{chunk-LB3EPUOQ.mjs → chunk-TOIJ5IIA.mjs} +2 -2
- package/dist/index.js +26 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/lib/index.js +26 -33
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.js +1 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.js +1 -1
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +2 -2
- package/dist/lib/integrations/node-express/index.js +1 -1
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +2 -2
- package/dist/lib/integrations/node-http/index.js +1 -1
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/package.json +4 -4
- package/src/lib/runtime/remote-actions.ts +24 -33
- package/dist/chunk-GVAUIADR.mjs.map +0 -1
- /package/dist/{chunk-VN26GZV4.mjs.map → chunk-6TFW5P6C.mjs.map} +0 -0
- /package/dist/{chunk-LOMWWP44.mjs.map → chunk-EN2GQDJF.mjs.map} +0 -0
- /package/dist/{chunk-QXHQKRLT.mjs.map → chunk-HTQXEUKU.mjs.map} +0 -0
- /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-
|
|
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-
|
|
19
|
+
} from "./chunk-HTQXEUKU.mjs";
|
|
20
20
|
import {
|
|
21
21
|
copilotRuntimeNestEndpoint
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EN2GQDJF.mjs";
|
|
23
23
|
import {
|
|
24
24
|
copilotRuntimeNodeExpressEndpoint
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6TFW5P6C.mjs";
|
|
26
26
|
import {
|
|
27
27
|
buildSchema,
|
|
28
28
|
copilotRuntimeNodeHttpEndpoint,
|
|
29
29
|
createContext,
|
|
30
30
|
getCommonConfig
|
|
31
|
-
} from "./chunk-
|
|
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
|
|
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
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
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
|
-
|
|
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 [
|