@copilotkit/runtime 1.5.15-next.2 → 1.5.15-next.3
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-4KT3HMC3.mjs → chunk-EV3MMEAZ.mjs} +29 -11
- package/dist/chunk-EV3MMEAZ.mjs.map +1 -0
- package/dist/{chunk-I33ESKDS.mjs → chunk-I2OII4XX.mjs} +2 -2
- package/dist/{chunk-OTB2F27M.mjs → chunk-KPOZF6JI.mjs} +2 -2
- package/dist/{chunk-C2HNOETE.mjs → chunk-WPJHMQDF.mjs} +2 -2
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.js +23 -5
- 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/copilot-runtime.ts +10 -0
- package/src/lib/runtime/remote-lg-action.ts +11 -2
- package/dist/chunk-4KT3HMC3.mjs.map +0 -1
- /package/dist/{chunk-I33ESKDS.mjs.map → chunk-I2OII4XX.mjs.map} +0 -0
- /package/dist/{chunk-OTB2F27M.mjs.map → chunk-KPOZF6JI.mjs.map} +0 -0
- /package/dist/{chunk-C2HNOETE.mjs.map → chunk-WPJHMQDF.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I2OII4XX.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WPJHMQDF.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KPOZF6JI.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EV3MMEAZ.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AnthropicAdapter,
|
|
26
26
|
EmptyAdapter,
|
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.5.15-next.
|
|
47
|
+
version: "1.5.15-next.3",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -1533,13 +1533,19 @@ async function execute(args) {
|
|
|
1533
1533
|
__name(execute, "execute");
|
|
1534
1534
|
async function streamEvents(controller, args) {
|
|
1535
1535
|
var _a, _b, _c, _d, _e, _f;
|
|
1536
|
-
const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2 } = args;
|
|
1536
|
+
const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2, properties } = args;
|
|
1537
1537
|
let nodeName = initialNodeName;
|
|
1538
1538
|
let state = initialState;
|
|
1539
1539
|
const { name, assistantId: initialAssistantId } = agent;
|
|
1540
|
+
const propertyHeaders = properties.authorization ? {
|
|
1541
|
+
authorization: `Bearer ${properties.authorization}`
|
|
1542
|
+
} : null;
|
|
1540
1543
|
const client = new import_langgraph_sdk.Client({
|
|
1541
1544
|
apiUrl: deploymentUrl,
|
|
1542
|
-
apiKey: langsmithApiKey
|
|
1545
|
+
apiKey: langsmithApiKey,
|
|
1546
|
+
defaultHeaders: {
|
|
1547
|
+
...propertyHeaders
|
|
1548
|
+
}
|
|
1543
1549
|
});
|
|
1544
1550
|
let threadId = argsInitialThreadId ?? (0, import_shared8.randomUUID)();
|
|
1545
1551
|
if (argsInitialThreadId && argsInitialThreadId.startsWith("ck-")) {
|
|
@@ -2975,9 +2981,15 @@ please use an LLM adapter instead.`
|
|
|
2975
2981
|
const agents = this.remoteEndpointDefinitions.reduce(async (acc, endpoint) => {
|
|
2976
2982
|
const agents2 = await acc;
|
|
2977
2983
|
if (endpoint.type === EndpointType.LangGraphPlatform) {
|
|
2984
|
+
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
2985
|
+
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
2986
|
+
} : null;
|
|
2978
2987
|
const client = new import_langgraph_sdk2.Client({
|
|
2979
2988
|
apiUrl: endpoint.deploymentUrl,
|
|
2980
|
-
apiKey: endpoint.langsmithApiKey
|
|
2989
|
+
apiKey: endpoint.langsmithApiKey,
|
|
2990
|
+
defaultHeaders: {
|
|
2991
|
+
...propertyHeaders
|
|
2992
|
+
}
|
|
2981
2993
|
});
|
|
2982
2994
|
const data = await client.assistants.search();
|
|
2983
2995
|
const endpointAgents = (data ?? []).map((entry) => ({
|
|
@@ -3040,9 +3052,15 @@ please use an LLM adapter instead.`
|
|
|
3040
3052
|
}
|
|
3041
3053
|
const headers = createHeaders(null, graphqlContext);
|
|
3042
3054
|
if (agentWithEndpoint.endpoint.type === EndpointType.LangGraphPlatform) {
|
|
3055
|
+
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
3056
|
+
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
3057
|
+
} : null;
|
|
3043
3058
|
const client = new import_langgraph_sdk2.Client({
|
|
3044
3059
|
apiUrl: agentWithEndpoint.endpoint.deploymentUrl,
|
|
3045
|
-
apiKey: agentWithEndpoint.endpoint.langsmithApiKey
|
|
3060
|
+
apiKey: agentWithEndpoint.endpoint.langsmithApiKey,
|
|
3061
|
+
defaultHeaders: {
|
|
3062
|
+
...propertyHeaders
|
|
3063
|
+
}
|
|
3046
3064
|
});
|
|
3047
3065
|
let state = {};
|
|
3048
3066
|
try {
|