@copilotkit/runtime 1.5.17 → 1.5.18-next.1
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 +15 -0
- package/dist/{chunk-HEPCIATE.mjs → chunk-2NWLEHMA.mjs} +27 -13
- package/dist/chunk-2NWLEHMA.mjs.map +1 -0
- package/dist/{chunk-D2WLFQS6.mjs → chunk-2OZAGFV3.mjs} +2 -2
- package/dist/{chunk-UHSPX2BM.mjs → chunk-326WWZNE.mjs} +3 -3
- package/dist/{chunk-U3V2BCGI.mjs → chunk-5BIEM2UU.mjs} +2 -2
- package/dist/{chunk-CPZLKCKJ.mjs → chunk-CJZ7QUXU.mjs} +3 -3
- package/dist/chunk-FHD4JECV.mjs +33 -0
- package/dist/{chunk-SPBICTJF.mjs → chunk-OS4N57XE.mjs} +3 -3
- package/dist/{chunk-S3KKBII4.mjs → chunk-OS5YD32G.mjs} +2 -2
- package/dist/{chunk-HNUNXFTW.mjs → chunk-RTFJTJMA.mjs} +3 -3
- package/dist/{copilot-runtime-3e7f1c7b.d.ts → copilot-runtime-084fb9c7.d.ts} +6 -1
- package/dist/graphql/types/base/index.mjs +2 -2
- package/dist/graphql/types/converted/index.mjs +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -9
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +20 -6
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +11 -9
- package/dist/lib/integrations/index.d.ts +2 -2
- package/dist/lib/integrations/index.js +17 -3
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +11 -9
- package/dist/lib/integrations/nest/index.d.ts +1 -1
- package/dist/lib/integrations/nest/index.js +15 -3
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +7 -7
- package/dist/lib/integrations/node-express/index.d.ts +1 -1
- package/dist/lib/integrations/node-express/index.js +15 -3
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +7 -7
- package/dist/lib/integrations/node-http/index.d.ts +1 -1
- package/dist/lib/integrations/node-http/index.js +15 -3
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +6 -6
- package/dist/service-adapters/index.mjs +2 -2
- package/dist/utils/index.mjs +2 -2
- package/package.json +2 -2
- package/src/graphql/resolvers/state.resolver.ts +6 -1
- package/src/lib/integrations/shared.ts +9 -1
- package/src/lib/runtime/copilot-runtime.ts +2 -2
- package/src/lib/runtime/remote-lg-action.ts +1 -1
- package/tsconfig.json +1 -0
- package/dist/chunk-44O2JGUY.mjs +0 -12
- package/dist/chunk-HEPCIATE.mjs.map +0 -1
- /package/dist/{chunk-D2WLFQS6.mjs.map → chunk-2OZAGFV3.mjs.map} +0 -0
- /package/dist/{chunk-UHSPX2BM.mjs.map → chunk-326WWZNE.mjs.map} +0 -0
- /package/dist/{chunk-U3V2BCGI.mjs.map → chunk-5BIEM2UU.mjs.map} +0 -0
- /package/dist/{chunk-CPZLKCKJ.mjs.map → chunk-CJZ7QUXU.mjs.map} +0 -0
- /package/dist/{chunk-44O2JGUY.mjs.map → chunk-FHD4JECV.mjs.map} +0 -0
- /package/dist/{chunk-SPBICTJF.mjs.map → chunk-OS4N57XE.mjs.map} +0 -0
- /package/dist/{chunk-S3KKBII4.mjs.map → chunk-OS5YD32G.mjs.map} +0 -0
- /package/dist/{chunk-HNUNXFTW.mjs.map → chunk-RTFJTJMA.mjs.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNodeExpressEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
9
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-OS4N57XE.mjs";
|
|
4
|
+
import "../../../chunk-2NWLEHMA.mjs";
|
|
5
|
+
import "../../../chunk-OS5YD32G.mjs";
|
|
6
|
+
import "../../../chunk-5BIEM2UU.mjs";
|
|
7
|
+
import "../../../chunk-RTFJTJMA.mjs";
|
|
8
|
+
import "../../../chunk-2OZAGFV3.mjs";
|
|
9
|
+
import "../../../chunk-FHD4JECV.mjs";
|
|
10
10
|
export {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as graphql_yoga from 'graphql-yoga';
|
|
2
|
-
import {
|
|
2
|
+
import { e as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../copilot-runtime-084fb9c7.js';
|
|
3
3
|
import '@copilotkit/shared';
|
|
4
4
|
import '../../../langserve-3a591089.js';
|
|
5
5
|
import '../../../index-f6d1f30b.js';
|
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.5.
|
|
47
|
+
version: "1.5.18-next.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -2531,7 +2531,12 @@ var StateResolver = class {
|
|
|
2531
2531
|
const agents = await ctx._copilotkit.runtime.discoverAgentsFromEndpoints(ctx);
|
|
2532
2532
|
const agent = agents.find((agent2) => agent2.name === data.agentName);
|
|
2533
2533
|
if (!agent) {
|
|
2534
|
-
|
|
2534
|
+
return {
|
|
2535
|
+
threadId: data.threadId || "",
|
|
2536
|
+
threadExists: false,
|
|
2537
|
+
state: JSON.stringify({}),
|
|
2538
|
+
messages: JSON.stringify([])
|
|
2539
|
+
};
|
|
2535
2540
|
}
|
|
2536
2541
|
const state = await ctx._copilotkit.runtime.loadAgentState(ctx, data.threadId, data.agentName);
|
|
2537
2542
|
return state;
|
|
@@ -2554,7 +2559,13 @@ StateResolver = _ts_decorate22([
|
|
|
2554
2559
|
], StateResolver);
|
|
2555
2560
|
|
|
2556
2561
|
// src/lib/integrations/shared.ts
|
|
2562
|
+
var packageJson2 = __toESM(require_package());
|
|
2557
2563
|
var logger = createLogger();
|
|
2564
|
+
var addCustomHeaderPlugin = {
|
|
2565
|
+
onResponse({ response }) {
|
|
2566
|
+
response.headers.set("X-CopilotKit-Runtime-Version", packageJson2.version);
|
|
2567
|
+
}
|
|
2568
|
+
};
|
|
2558
2569
|
async function createContext(initialContext, copilotKitContext, contextLogger, properties = {}) {
|
|
2559
2570
|
logger.debug({
|
|
2560
2571
|
copilotKitContext
|
|
@@ -2620,7 +2631,8 @@ function getCommonConfig(options) {
|
|
|
2620
2631
|
}),
|
|
2621
2632
|
schema: buildSchema(),
|
|
2622
2633
|
plugins: [
|
|
2623
|
-
(0, import_plugin_defer_stream.useDeferStream)()
|
|
2634
|
+
(0, import_plugin_defer_stream.useDeferStream)(),
|
|
2635
|
+
addCustomHeaderPlugin
|
|
2624
2636
|
],
|
|
2625
2637
|
context: (ctx) => createContext(ctx, options, contextLogger, options.properties)
|
|
2626
2638
|
};
|