@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
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EV3MMEAZ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-44O2JGUY.mjs";
|
|
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNestEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-WPJHMQDF.mjs.map
|
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.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",
|
|
@@ -1869,13 +1869,19 @@ async function execute(args) {
|
|
|
1869
1869
|
__name(execute, "execute");
|
|
1870
1870
|
async function streamEvents(controller, args) {
|
|
1871
1871
|
var _a, _b, _c, _d, _e, _f;
|
|
1872
|
-
const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2 } = args;
|
|
1872
|
+
const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2, properties } = args;
|
|
1873
1873
|
let nodeName = initialNodeName;
|
|
1874
1874
|
let state = initialState;
|
|
1875
1875
|
const { name, assistantId: initialAssistantId } = agent;
|
|
1876
|
+
const propertyHeaders = properties.authorization ? {
|
|
1877
|
+
authorization: `Bearer ${properties.authorization}`
|
|
1878
|
+
} : null;
|
|
1876
1879
|
const client = new import_langgraph_sdk.Client({
|
|
1877
1880
|
apiUrl: deploymentUrl,
|
|
1878
|
-
apiKey: langsmithApiKey
|
|
1881
|
+
apiKey: langsmithApiKey,
|
|
1882
|
+
defaultHeaders: {
|
|
1883
|
+
...propertyHeaders
|
|
1884
|
+
}
|
|
1879
1885
|
});
|
|
1880
1886
|
let threadId = argsInitialThreadId ?? (0, import_shared10.randomUUID)();
|
|
1881
1887
|
if (argsInitialThreadId && argsInitialThreadId.startsWith("ck-")) {
|
|
@@ -3311,9 +3317,15 @@ please use an LLM adapter instead.`
|
|
|
3311
3317
|
const agents = this.remoteEndpointDefinitions.reduce(async (acc, endpoint) => {
|
|
3312
3318
|
const agents2 = await acc;
|
|
3313
3319
|
if (endpoint.type === EndpointType.LangGraphPlatform) {
|
|
3320
|
+
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
3321
|
+
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
3322
|
+
} : null;
|
|
3314
3323
|
const client = new import_langgraph_sdk2.Client({
|
|
3315
3324
|
apiUrl: endpoint.deploymentUrl,
|
|
3316
|
-
apiKey: endpoint.langsmithApiKey
|
|
3325
|
+
apiKey: endpoint.langsmithApiKey,
|
|
3326
|
+
defaultHeaders: {
|
|
3327
|
+
...propertyHeaders
|
|
3328
|
+
}
|
|
3317
3329
|
});
|
|
3318
3330
|
const data = await client.assistants.search();
|
|
3319
3331
|
const endpointAgents = (data ?? []).map((entry) => ({
|
|
@@ -3376,9 +3388,15 @@ please use an LLM adapter instead.`
|
|
|
3376
3388
|
}
|
|
3377
3389
|
const headers = createHeaders(null, graphqlContext);
|
|
3378
3390
|
if (agentWithEndpoint.endpoint.type === EndpointType.LangGraphPlatform) {
|
|
3391
|
+
const propertyHeaders = graphqlContext.properties.authorization ? {
|
|
3392
|
+
authorization: `Bearer ${graphqlContext.properties.authorization}`
|
|
3393
|
+
} : null;
|
|
3379
3394
|
const client = new import_langgraph_sdk2.Client({
|
|
3380
3395
|
apiUrl: agentWithEndpoint.endpoint.deploymentUrl,
|
|
3381
|
-
apiKey: agentWithEndpoint.endpoint.langsmithApiKey
|
|
3396
|
+
apiKey: agentWithEndpoint.endpoint.langsmithApiKey,
|
|
3397
|
+
defaultHeaders: {
|
|
3398
|
+
...propertyHeaders
|
|
3399
|
+
}
|
|
3382
3400
|
});
|
|
3383
3401
|
let state = {};
|
|
3384
3402
|
try {
|