@copilotkit/runtime 1.5.12-next.2 → 1.5.12-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.
Files changed (29) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{chunk-SFLMY3ES.mjs → chunk-53ZLUGHX.mjs} +2 -2
  3. package/dist/{chunk-ZCU6UPCY.mjs → chunk-6PZWWJ32.mjs} +2 -2
  4. package/dist/{chunk-BETLEV37.mjs → chunk-FOUJ36SV.mjs} +2 -2
  5. package/dist/{chunk-FA5DJ2TZ.mjs → chunk-U3DYEEGJ.mjs} +8 -2
  6. package/dist/{chunk-FA5DJ2TZ.mjs.map → chunk-U3DYEEGJ.mjs.map} +1 -1
  7. package/dist/index.js +6 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +4 -4
  10. package/dist/lib/index.js +33 -17
  11. package/dist/lib/index.js.map +1 -1
  12. package/dist/lib/index.mjs +4 -4
  13. package/dist/lib/integrations/index.js +1 -1
  14. package/dist/lib/integrations/index.js.map +1 -1
  15. package/dist/lib/integrations/index.mjs +4 -4
  16. package/dist/lib/integrations/nest/index.js +1 -1
  17. package/dist/lib/integrations/nest/index.js.map +1 -1
  18. package/dist/lib/integrations/nest/index.mjs +2 -2
  19. package/dist/lib/integrations/node-express/index.js +1 -1
  20. package/dist/lib/integrations/node-express/index.js.map +1 -1
  21. package/dist/lib/integrations/node-express/index.mjs +2 -2
  22. package/dist/lib/integrations/node-http/index.js +1 -1
  23. package/dist/lib/integrations/node-http/index.js.map +1 -1
  24. package/dist/lib/integrations/node-http/index.mjs +1 -1
  25. package/package.json +2 -2
  26. package/src/lib/runtime/copilot-runtime.ts +12 -1
  27. /package/dist/{chunk-SFLMY3ES.mjs.map → chunk-53ZLUGHX.mjs.map} +0 -0
  28. /package/dist/{chunk-ZCU6UPCY.mjs.map → chunk-6PZWWJ32.mjs.map} +0 -0
  29. /package/dist/{chunk-BETLEV37.mjs.map → chunk-FOUJ36SV.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint
3
- } from "../../../chunk-FA5DJ2TZ.mjs";
3
+ } from "../../../chunk-U3DYEEGJ.mjs";
4
4
  import "../../../chunk-CLGKEUOA.mjs";
5
5
  import "../../../chunk-U3V2BCGI.mjs";
6
6
  import "../../../chunk-HNUNXFTW.mjs";
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.5.12-next.2",
12
+ "version": "1.5.12-next.4",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -58,7 +58,7 @@
58
58
  "rxjs": "^7.8.1",
59
59
  "type-graphql": "2.0.0-rc.1",
60
60
  "zod": "^3.23.3",
61
- "@copilotkit/shared": "1.5.12-next.2"
61
+ "@copilotkit/shared": "1.5.12-next.4"
62
62
  },
63
63
  "keywords": [
64
64
  "copilotkit",
@@ -13,7 +13,12 @@
13
13
  */
14
14
 
15
15
  import { Action, actionParametersToJsonSchema, Parameter, randomId } from "@copilotkit/shared";
16
- import { CopilotServiceAdapter, RemoteChain, RemoteChainParameters } from "../../service-adapters";
16
+ import {
17
+ CopilotServiceAdapter,
18
+ ExperimentalEmptyAdapter,
19
+ RemoteChain,
20
+ RemoteChainParameters,
21
+ } from "../../service-adapters";
17
22
  import { MessageInput } from "../../graphql/inputs/message.input";
18
23
  import { ActionInput } from "../../graphql/inputs/action.input";
19
24
  import { RuntimeEventSource } from "../../service-adapters/events";
@@ -184,6 +189,12 @@ export class CopilotRuntime<const T extends Parameter[] | [] = []> {
184
189
  if (agentSession) {
185
190
  return await this.processAgentRequest(request);
186
191
  }
192
+ if (serviceAdapter instanceof ExperimentalEmptyAdapter) {
193
+ // TODO: use CPK error here
194
+ throw new Error(`Invalid adapter configuration: ExperimentalEmptyAdapter is only meant to be used with agent lock mode.
195
+ For non-agent components like useCopilotChatSuggestions, CopilotTextarea, or CopilotTask,
196
+ please use an LLM adapter instead.`);
197
+ }
187
198
 
188
199
  const messages = rawMessages.filter((message) => !message.agentStateMessage);
189
200