@copilotkit/runtime 1.8.5-next.3 → 1.8.5-next.4
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 +7 -0
- package/dist/{chunk-2PVUPC44.mjs → chunk-574FKWP5.mjs} +2 -2
- package/dist/{chunk-UOCZJTXN.mjs → chunk-GGXHVDCG.mjs} +2 -2
- package/dist/{chunk-UTUGZIQI.mjs → chunk-PKO7BUPS.mjs} +24 -7
- package/dist/chunk-PKO7BUPS.mjs.map +1 -0
- package/dist/{chunk-TDPCQIMB.mjs → chunk-WQZQTGHT.mjs} +2 -2
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.js +18 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- 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 +2 -2
- package/src/lib/runtime/remote-lg-action.ts +24 -2
- package/dist/chunk-UTUGZIQI.mjs.map +0 -1
- /package/dist/{chunk-2PVUPC44.mjs.map → chunk-574FKWP5.mjs.map} +0 -0
- /package/dist/{chunk-UOCZJTXN.mjs.map → chunk-GGXHVDCG.mjs.map} +0 -0
- /package/dist/{chunk-TDPCQIMB.mjs.map → chunk-WQZQTGHT.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.8.5-next.
|
|
12
|
+
"version": "1.8.5-next.4",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"module": "./dist/index.mjs",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"rxjs": "^7.8.1",
|
|
60
60
|
"type-graphql": "2.0.0-rc.1",
|
|
61
61
|
"zod": "^3.23.3",
|
|
62
|
-
"@copilotkit/shared": "1.8.5-next.
|
|
62
|
+
"@copilotkit/shared": "1.8.5-next.4"
|
|
63
63
|
},
|
|
64
64
|
"keywords": [
|
|
65
65
|
"copilotkit",
|
|
@@ -13,7 +13,7 @@ import telemetry from "../telemetry-client";
|
|
|
13
13
|
import { MetaEventInput } from "../../graphql/inputs/meta-event.input";
|
|
14
14
|
import { MetaEventName } from "../../graphql/types/meta-events.type";
|
|
15
15
|
import { RunsStreamPayload } from "@langchain/langgraph-sdk/dist/types";
|
|
16
|
-
import { parseJson } from "@copilotkit/shared";
|
|
16
|
+
import { parseJson, CopilotKitMisuseError } from "@copilotkit/shared";
|
|
17
17
|
import { RemoveMessage } from "@langchain/core/messages";
|
|
18
18
|
|
|
19
19
|
type State = Record<string, any>;
|
|
@@ -83,7 +83,29 @@ export async function execute(args: ExecutionArgs): Promise<ReadableStream<Uint8
|
|
|
83
83
|
try {
|
|
84
84
|
await streamEvents(controller, args);
|
|
85
85
|
controller.close();
|
|
86
|
-
} catch (err) {
|
|
86
|
+
} catch (err) {
|
|
87
|
+
// Unwrap the possible cause
|
|
88
|
+
const cause = err?.cause;
|
|
89
|
+
|
|
90
|
+
// Check code directly if it exists
|
|
91
|
+
const errorCode = cause?.code || err?.code;
|
|
92
|
+
|
|
93
|
+
if (errorCode === "ECONNREFUSED") {
|
|
94
|
+
throw new CopilotKitMisuseError({
|
|
95
|
+
message: `
|
|
96
|
+
The LangGraph client could not connect to the graph. Please further check previous logs, which includes further details.
|
|
97
|
+
|
|
98
|
+
See more: https://docs.copilotkit.ai/troubleshooting/common-issues`,
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
throw new CopilotKitMisuseError({
|
|
102
|
+
message: `
|
|
103
|
+
The LangGraph client threw unhandled error ${err}.
|
|
104
|
+
|
|
105
|
+
See more: https://docs.copilotkit.ai/troubleshooting/common-issues`,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
87
109
|
},
|
|
88
110
|
});
|
|
89
111
|
}
|