@copilotkit/runtime 1.3.13 → 1.3.14-fix-handle-execute-agent-error.0
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 +8 -0
- package/dist/{chunk-76K222WC.mjs → chunk-GVAUIADR.mjs} +34 -27
- package/dist/chunk-GVAUIADR.mjs.map +1 -0
- package/dist/{chunk-3LFBIWWK.mjs → chunk-LB3EPUOQ.mjs} +2 -2
- package/dist/{chunk-SPZSO3T3.mjs → chunk-LOMWWP44.mjs} +2 -2
- package/dist/{chunk-DEZQR4EM.mjs → chunk-QXHQKRLT.mjs} +2 -2
- package/dist/{chunk-MCUYYSCJ.mjs → chunk-VN26GZV4.mjs} +2 -2
- package/dist/index.js +33 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/lib/index.js +33 -26
- 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 +33 -24
- package/dist/chunk-76K222WC.mjs.map +0 -1
- /package/dist/{chunk-3LFBIWWK.mjs.map → chunk-LB3EPUOQ.mjs.map} +0 -0
- /package/dist/{chunk-SPZSO3T3.mjs.map → chunk-LOMWWP44.mjs.map} +0 -0
- /package/dist/{chunk-DEZQR4EM.mjs.map → chunk-QXHQKRLT.mjs.map} +0 -0
- /package/dist/{chunk-MCUYYSCJ.mjs.map → chunk-VN26GZV4.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-LB3EPUOQ.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-QXHQKRLT.mjs";
|
|
20
20
|
import {
|
|
21
21
|
copilotRuntimeNestEndpoint
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LOMWWP44.mjs";
|
|
23
23
|
import {
|
|
24
24
|
copilotRuntimeNodeExpressEndpoint
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VN26GZV4.mjs";
|
|
26
26
|
import {
|
|
27
27
|
buildSchema,
|
|
28
28
|
copilotRuntimeNodeHttpEndpoint,
|
|
29
29
|
createContext,
|
|
30
30
|
getCommonConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GVAUIADR.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.
|
|
47
|
+
version: "1.3.14-fix-handle-execute-agent-error.0",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -1459,34 +1459,41 @@ 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
|
-
|
|
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) {
|
|
1480
1492
|
logger2.error({
|
|
1481
|
-
|
|
1482
|
-
status: response.status,
|
|
1483
|
-
body: await response.text()
|
|
1493
|
+
error: error.message ? error.message : error + ""
|
|
1484
1494
|
}, "Failed to execute remote agent");
|
|
1485
|
-
throw
|
|
1495
|
+
throw "Failed to execute remote agent";
|
|
1486
1496
|
}
|
|
1487
|
-
const eventSource = new RemoteLangGraphEventSource();
|
|
1488
|
-
eventSource.streamResponse(response);
|
|
1489
|
-
return eventSource.processLangGraphEvents();
|
|
1490
1497
|
}
|
|
1491
1498
|
}));
|
|
1492
1499
|
return [
|