@copilotkit/runtime 1.9.3 → 1.10.0-next.1
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 +17 -0
- package/dist/{chunk-YKUWJR33.mjs → chunk-5OSQ6CM5.mjs} +2 -2
- package/dist/{chunk-TPT4AKCH.mjs → chunk-7WC4OMOL.mjs} +2 -2
- package/dist/{chunk-27ICMTNV.mjs → chunk-NV4PTNDU.mjs} +2 -2
- package/dist/{chunk-DC55PN5M.mjs → chunk-VOCP3OKE.mjs} +2 -2
- package/dist/{chunk-IWD3ZNTV.mjs → chunk-YBAPVMN4.mjs} +9 -5
- package/dist/chunk-YBAPVMN4.mjs.map +1 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/lib/index.js +8 -4
- 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/agui-action.ts +5 -0
- package/src/lib/runtime/remote-actions.ts +1 -0
- package/src/lib/streaming.ts +1 -0
- package/dist/chunk-IWD3ZNTV.mjs.map +0 -1
- /package/dist/{chunk-YKUWJR33.mjs.map → chunk-5OSQ6CM5.mjs.map} +0 -0
- /package/dist/{chunk-TPT4AKCH.mjs.map → chunk-7WC4OMOL.mjs.map} +0 -0
- /package/dist/{chunk-27ICMTNV.mjs.map → chunk-NV4PTNDU.mjs.map} +0 -0
- /package/dist/{chunk-DC55PN5M.mjs.map → chunk-VOCP3OKE.mjs.map} +0 -0
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.
|
|
47
|
+
version: "1.10.0-next.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -3831,6 +3831,7 @@ function convertStreamingErrorToStructured(error) {
|
|
|
3831
3831
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3832
3832
|
let helpfulMessage = generateHelpfulErrorMessage(error);
|
|
3833
3833
|
if (((_a = error == null ? void 0 : error.message) == null ? void 0 : _a.includes("fetch failed")) || ((_b = error == null ? void 0 : error.message) == null ? void 0 : _b.includes("ECONNREFUSED")) || ((_c = error == null ? void 0 : error.message) == null ? void 0 : _c.includes("ENOTFOUND")) || ((_d = error == null ? void 0 : error.message) == null ? void 0 : _d.includes("ETIMEDOUT")) || ((_e = error == null ? void 0 : error.message) == null ? void 0 : _e.includes("terminated")) || ((_f = error == null ? void 0 : error.cause) == null ? void 0 : _f.code) === "UND_ERR_SOCKET" || ((_g = error == null ? void 0 : error.message) == null ? void 0 : _g.includes("other side closed")) || (error == null ? void 0 : error.code) === "UND_ERR_SOCKET") {
|
|
3834
|
+
console.log("error", error);
|
|
3834
3835
|
return new import_shared15.CopilotKitLowLevelError({
|
|
3835
3836
|
error: error instanceof Error ? error : new Error(String(error)),
|
|
3836
3837
|
url: "streaming connection",
|
|
@@ -6343,7 +6344,7 @@ var import_shared26 = require("@copilotkit/shared");
|
|
|
6343
6344
|
|
|
6344
6345
|
// src/lib/runtime/agui-action.ts
|
|
6345
6346
|
var import_shared24 = require("@copilotkit/shared");
|
|
6346
|
-
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata, nodeName }) {
|
|
6347
|
+
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata, nodeName, graphqlContext }) {
|
|
6347
6348
|
const action = {
|
|
6348
6349
|
name: agent.agentId,
|
|
6349
6350
|
description: agent.description,
|
|
@@ -6389,7 +6390,9 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
6389
6390
|
} : {},
|
|
6390
6391
|
...nodeName ? {
|
|
6391
6392
|
nodeName
|
|
6392
|
-
} : {}
|
|
6393
|
+
} : {},
|
|
6394
|
+
// Forward properties from the graphql context to the agent, e.g Authorization token
|
|
6395
|
+
...graphqlContext.properties
|
|
6393
6396
|
};
|
|
6394
6397
|
return agent.legacy_to_be_removed_runAgentBridged({
|
|
6395
6398
|
tools,
|
|
@@ -6571,7 +6574,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
|
|
|
6571
6574
|
agent,
|
|
6572
6575
|
metaEvents,
|
|
6573
6576
|
threadMetadata,
|
|
6574
|
-
nodeName
|
|
6577
|
+
nodeName,
|
|
6578
|
+
graphqlContext
|
|
6575
6579
|
}));
|
|
6576
6580
|
}
|
|
6577
6581
|
return result.flat();
|