@copilotkit/runtime 1.5.15-next.1 → 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 +14 -0
- package/dist/{chunk-3QMRQQKK.mjs → chunk-EV3MMEAZ.mjs} +29 -11
- package/dist/chunk-EV3MMEAZ.mjs.map +1 -0
- package/dist/{chunk-DATHT2T2.mjs → chunk-I2OII4XX.mjs} +2 -2
- package/dist/{chunk-5KOKNRAO.mjs → chunk-KPOZF6JI.mjs} +2 -2
- package/dist/{chunk-2CH7MDMH.mjs → chunk-WPJHMQDF.mjs} +2 -2
- package/dist/{copilot-runtime-628cc60c.d.ts → copilot-runtime-e6c34790.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.d.ts +1 -1
- 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.d.ts +2 -2
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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-actions.ts +1 -1
- package/src/lib/runtime/remote-lg-action.ts +11 -2
- package/dist/chunk-3QMRQQKK.mjs.map +0 -1
- /package/dist/{chunk-DATHT2T2.mjs.map → chunk-I2OII4XX.mjs.map} +0 -0
- /package/dist/{chunk-5KOKNRAO.mjs.map → chunk-KPOZF6JI.mjs.map} +0 -0
- /package/dist/{chunk-2CH7MDMH.mjs.map → chunk-WPJHMQDF.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.5.15-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c14f9db: - add headers handling to other LangGraphClients
|
|
8
|
+
- @copilotkit/shared@1.5.15-next.3
|
|
9
|
+
|
|
10
|
+
## 1.5.15-next.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- eb315bd: - fix: allow empty langsmith api key
|
|
15
|
+
- @copilotkit/shared@1.5.15-next.2
|
|
16
|
+
|
|
3
17
|
## 1.5.15-next.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -38,7 +38,7 @@ var require_package = __commonJS({
|
|
|
38
38
|
publishConfig: {
|
|
39
39
|
access: "public"
|
|
40
40
|
},
|
|
41
|
-
version: "1.5.15-next.
|
|
41
|
+
version: "1.5.15-next.3",
|
|
42
42
|
sideEffects: false,
|
|
43
43
|
main: "./dist/index.js",
|
|
44
44
|
module: "./dist/index.mjs",
|
|
@@ -1449,7 +1449,7 @@ var RemoteLangGraphEventSource = class {
|
|
|
1449
1449
|
__name(RemoteLangGraphEventSource, "RemoteLangGraphEventSource");
|
|
1450
1450
|
|
|
1451
1451
|
// src/lib/runtime/remote-lg-action.ts
|
|
1452
|
-
import { Client } from "@langchain/langgraph-sdk";
|
|
1452
|
+
import { Client as LangGraphClient } from "@langchain/langgraph-sdk";
|
|
1453
1453
|
import { createHash } from "crypto";
|
|
1454
1454
|
import { randomUUID, isValidUUID } from "@copilotkit/shared";
|
|
1455
1455
|
import { parse as parsePartialJson } from "partial-json";
|
|
@@ -1467,13 +1467,19 @@ async function execute(args) {
|
|
|
1467
1467
|
__name(execute, "execute");
|
|
1468
1468
|
async function streamEvents(controller, args) {
|
|
1469
1469
|
var _a, _b, _c, _d, _e, _f;
|
|
1470
|
-
const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2 } = args;
|
|
1470
|
+
const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2, properties } = args;
|
|
1471
1471
|
let nodeName = initialNodeName;
|
|
1472
1472
|
let state = initialState;
|
|
1473
1473
|
const { name, assistantId: initialAssistantId } = agent;
|
|
1474
|
-
const
|
|
1474
|
+
const propertyHeaders = properties.authorization ? {
|
|
1475
|
+
authorization: `Bearer ${properties.authorization}`
|
|
1476
|
+
} : null;
|
|
1477
|
+
const client = new LangGraphClient({
|
|
1475
1478
|
apiUrl: deploymentUrl,
|
|
1476
|
-
apiKey: langsmithApiKey
|
|
1479
|
+
apiKey: langsmithApiKey,
|
|
1480
|
+
defaultHeaders: {
|
|
1481
|
+
...propertyHeaders
|
|
1482
|
+
}
|
|
1477
1483
|
});
|
|
1478
1484
|
let threadId = argsInitialThreadId ?? randomUUID();
|
|
1479
1485
|
if (argsInitialThreadId && argsInitialThreadId.startsWith("ck-")) {
|
|
@@ -2336,7 +2342,7 @@ __name(convertGqlInputToMessages, "convertGqlInputToMessages");
|
|
|
2336
2342
|
|
|
2337
2343
|
// src/lib/runtime/copilot-runtime.ts
|
|
2338
2344
|
import { from } from "rxjs";
|
|
2339
|
-
import { Client as
|
|
2345
|
+
import { Client as LangGraphClient2 } from "@langchain/langgraph-sdk";
|
|
2340
2346
|
var CopilotRuntime = class {
|
|
2341
2347
|
actions;
|
|
2342
2348
|
remoteEndpointDefinitions;
|
|
@@ -2442,9 +2448,15 @@ please use an LLM adapter instead.`
|
|
|
2442
2448
|
const agents = this.remoteEndpointDefinitions.reduce(async (acc, endpoint) => {
|
|
2443
2449
|
const agents2 = await acc;
|
|
2444
2450
|
if (endpoint.type === EndpointType.LangGraphPlatform) {
|
|
2445
|
-
const
|
|
2451
|
+
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
2452
|
+
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
2453
|
+
} : null;
|
|
2454
|
+
const client = new LangGraphClient2({
|
|
2446
2455
|
apiUrl: endpoint.deploymentUrl,
|
|
2447
|
-
apiKey: endpoint.langsmithApiKey
|
|
2456
|
+
apiKey: endpoint.langsmithApiKey,
|
|
2457
|
+
defaultHeaders: {
|
|
2458
|
+
...propertyHeaders
|
|
2459
|
+
}
|
|
2448
2460
|
});
|
|
2449
2461
|
const data = await client.assistants.search();
|
|
2450
2462
|
const endpointAgents = (data ?? []).map((entry) => ({
|
|
@@ -2507,9 +2519,15 @@ please use an LLM adapter instead.`
|
|
|
2507
2519
|
}
|
|
2508
2520
|
const headers = createHeaders(null, graphqlContext);
|
|
2509
2521
|
if (agentWithEndpoint.endpoint.type === EndpointType.LangGraphPlatform) {
|
|
2510
|
-
const
|
|
2522
|
+
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
2523
|
+
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
2524
|
+
} : null;
|
|
2525
|
+
const client = new LangGraphClient2({
|
|
2511
2526
|
apiUrl: agentWithEndpoint.endpoint.deploymentUrl,
|
|
2512
|
-
apiKey: agentWithEndpoint.endpoint.langsmithApiKey
|
|
2527
|
+
apiKey: agentWithEndpoint.endpoint.langsmithApiKey,
|
|
2528
|
+
defaultHeaders: {
|
|
2529
|
+
...propertyHeaders
|
|
2530
|
+
}
|
|
2513
2531
|
});
|
|
2514
2532
|
let state = {};
|
|
2515
2533
|
try {
|
|
@@ -3814,4 +3832,4 @@ export {
|
|
|
3814
3832
|
getCommonConfig,
|
|
3815
3833
|
copilotRuntimeNodeHttpEndpoint
|
|
3816
3834
|
};
|
|
3817
|
-
//# sourceMappingURL=chunk-
|
|
3835
|
+
//# sourceMappingURL=chunk-EV3MMEAZ.mjs.map
|