@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/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PKO7BUPS.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-FHD4JECV.mjs";
|
|
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNodeExpressEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-574FKWP5.mjs.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getCommonConfig,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PKO7BUPS.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-FHD4JECV.mjs";
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
config,
|
|
78
78
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-GGXHVDCG.mjs.map
|
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
publishConfig: {
|
|
40
40
|
access: "public"
|
|
41
41
|
},
|
|
42
|
-
version: "1.8.5-next.
|
|
42
|
+
version: "1.8.5-next.4",
|
|
43
43
|
sideEffects: false,
|
|
44
44
|
main: "./dist/index.js",
|
|
45
45
|
module: "./dist/index.mjs",
|
|
@@ -1687,7 +1687,7 @@ import { Client as LangGraphClient } from "@langchain/langgraph-sdk";
|
|
|
1687
1687
|
import { createHash } from "crypto";
|
|
1688
1688
|
import { isValidUUID, randomUUID } from "@copilotkit/shared";
|
|
1689
1689
|
import { parse as parsePartialJson } from "partial-json";
|
|
1690
|
-
import { parseJson } from "@copilotkit/shared";
|
|
1690
|
+
import { parseJson, CopilotKitMisuseError } from "@copilotkit/shared";
|
|
1691
1691
|
import { RemoveMessage } from "@langchain/core/messages";
|
|
1692
1692
|
var activeInterruptEvent = false;
|
|
1693
1693
|
async function execute(args) {
|
|
@@ -1697,6 +1697,23 @@ async function execute(args) {
|
|
|
1697
1697
|
await streamEvents(controller, args);
|
|
1698
1698
|
controller.close();
|
|
1699
1699
|
} catch (err) {
|
|
1700
|
+
const cause = err == null ? void 0 : err.cause;
|
|
1701
|
+
const errorCode = (cause == null ? void 0 : cause.code) || (err == null ? void 0 : err.code);
|
|
1702
|
+
if (errorCode === "ECONNREFUSED") {
|
|
1703
|
+
throw new CopilotKitMisuseError({
|
|
1704
|
+
message: `
|
|
1705
|
+
The LangGraph client could not connect to the graph. Please further check previous logs, which includes further details.
|
|
1706
|
+
|
|
1707
|
+
See more: https://docs.copilotkit.ai/troubleshooting/common-issues`
|
|
1708
|
+
});
|
|
1709
|
+
} else {
|
|
1710
|
+
throw new CopilotKitMisuseError({
|
|
1711
|
+
message: `
|
|
1712
|
+
The LangGraph client threw unhandled error ${err}.
|
|
1713
|
+
|
|
1714
|
+
See more: https://docs.copilotkit.ai/troubleshooting/common-issues`
|
|
1715
|
+
});
|
|
1716
|
+
}
|
|
1700
1717
|
}
|
|
1701
1718
|
}
|
|
1702
1719
|
});
|
|
@@ -2674,7 +2691,7 @@ __name(setupRemoteActions, "setupRemoteActions");
|
|
|
2674
2691
|
import { createHash as createHash3 } from "crypto";
|
|
2675
2692
|
|
|
2676
2693
|
// src/lib/runtime/copilot-runtime.ts
|
|
2677
|
-
import { actionParametersToJsonSchema, ResolvedCopilotKitError as ResolvedCopilotKitError3, CopilotKitApiDiscoveryError as CopilotKitApiDiscoveryError2, randomId as randomId2, CopilotKitError as CopilotKitError3, CopilotKitLowLevelError as CopilotKitLowLevelError3, CopilotKitAgentDiscoveryError, CopilotKitMisuseError } from "@copilotkit/shared";
|
|
2694
|
+
import { actionParametersToJsonSchema, ResolvedCopilotKitError as ResolvedCopilotKitError3, CopilotKitApiDiscoveryError as CopilotKitApiDiscoveryError2, randomId as randomId2, CopilotKitError as CopilotKitError3, CopilotKitLowLevelError as CopilotKitLowLevelError3, CopilotKitAgentDiscoveryError, CopilotKitMisuseError as CopilotKitMisuseError2 } from "@copilotkit/shared";
|
|
2678
2695
|
|
|
2679
2696
|
// src/service-adapters/conversion.ts
|
|
2680
2697
|
import { plainToInstance } from "class-transformer";
|
|
@@ -2820,7 +2837,7 @@ var CopilotRuntime = class {
|
|
|
2820
2837
|
this.mcpEndpointsConfig = params == null ? void 0 : params.mcpEndpoints;
|
|
2821
2838
|
this.createMCPClientImpl = params == null ? void 0 : params.createMCPClient;
|
|
2822
2839
|
if (this.mcpEndpointsConfig && this.mcpEndpointsConfig.length > 0 && !this.createMCPClientImpl) {
|
|
2823
|
-
throw new
|
|
2840
|
+
throw new CopilotKitMisuseError2({
|
|
2824
2841
|
message: "MCP Integration Error: `mcpEndpoints` were provided, but the `createMCPClient` function was not passed to the CopilotRuntime constructor. Please provide an implementation for `createMCPClient`."
|
|
2825
2842
|
});
|
|
2826
2843
|
}
|
|
@@ -2881,7 +2898,7 @@ var CopilotRuntime = class {
|
|
|
2881
2898
|
return await this.processAgentRequest(request);
|
|
2882
2899
|
}
|
|
2883
2900
|
if (serviceAdapter instanceof EmptyAdapter) {
|
|
2884
|
-
throw new
|
|
2901
|
+
throw new CopilotKitMisuseError2({
|
|
2885
2902
|
message: `Invalid adapter configuration: EmptyAdapter is only meant to be used with agent lock mode.
|
|
2886
2903
|
For non-agent components like useCopilotChatSuggestions, CopilotTextarea, or CopilotTask,
|
|
2887
2904
|
please use an LLM adapter instead.`
|
|
@@ -3071,7 +3088,7 @@ please use an LLM adapter instead.`
|
|
|
3071
3088
|
});
|
|
3072
3089
|
}
|
|
3073
3090
|
} catch (e) {
|
|
3074
|
-
throw new
|
|
3091
|
+
throw new CopilotKitMisuseError2({
|
|
3075
3092
|
message: `
|
|
3076
3093
|
Failed to find or contact remote endpoint at url ${endpoint.deploymentUrl}.
|
|
3077
3094
|
Make sure the API is running and that it's indeed a LangGraph platform url.
|
|
@@ -4757,4 +4774,4 @@ export {
|
|
|
4757
4774
|
getCommonConfig,
|
|
4758
4775
|
copilotRuntimeNodeHttpEndpoint
|
|
4759
4776
|
};
|
|
4760
|
-
//# sourceMappingURL=chunk-
|
|
4777
|
+
//# sourceMappingURL=chunk-PKO7BUPS.mjs.map
|