@copilotkit/runtime 1.4.8-next.2 → 1.4.8

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 (53) hide show
  1. package/CHANGELOG.md +7 -11
  2. package/__snapshots__/schema/schema.graphql +0 -1
  3. package/dist/{chunk-4OJDHGJU.mjs → chunk-GGNRDS7N.mjs} +2 -2
  4. package/dist/{chunk-4DFIC23L.mjs → chunk-LSLFIYKP.mjs} +2 -2
  5. package/dist/{chunk-MCVGZ4ZG.mjs → chunk-R6AUAQK6.mjs} +17 -30
  6. package/dist/chunk-R6AUAQK6.mjs.map +1 -0
  7. package/dist/{chunk-6SSIGQER.mjs → chunk-TA5I5LYF.mjs} +2 -2
  8. package/dist/{chunk-AKGNTDRV.mjs → chunk-W7GP2EOT.mjs} +1 -14
  9. package/dist/chunk-W7GP2EOT.mjs.map +1 -0
  10. package/dist/{copilot-runtime-1c5bf72b.d.ts → copilot-runtime-48d7c2fc.d.ts} +1 -1
  11. package/dist/{groq-adapter-b6a40422.d.ts → groq-adapter-ac43305a.d.ts} +1 -1
  12. package/dist/index.d.ts +3 -3
  13. package/dist/index.js +4 -30
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +5 -5
  16. package/dist/{langserve-6245df39.d.ts → langserve-b74e8606.d.ts} +1 -2
  17. package/dist/lib/index.d.ts +3 -3
  18. package/dist/lib/index.js +4 -27
  19. package/dist/lib/index.js.map +1 -1
  20. package/dist/lib/index.mjs +5 -5
  21. package/dist/lib/integrations/index.d.ts +3 -3
  22. package/dist/lib/integrations/index.js +1 -8
  23. package/dist/lib/integrations/index.js.map +1 -1
  24. package/dist/lib/integrations/index.mjs +5 -5
  25. package/dist/lib/integrations/nest/index.d.ts +2 -2
  26. package/dist/lib/integrations/nest/index.js +1 -8
  27. package/dist/lib/integrations/nest/index.js.map +1 -1
  28. package/dist/lib/integrations/nest/index.mjs +3 -3
  29. package/dist/lib/integrations/node-express/index.d.ts +2 -2
  30. package/dist/lib/integrations/node-express/index.js +1 -8
  31. package/dist/lib/integrations/node-express/index.js.map +1 -1
  32. package/dist/lib/integrations/node-express/index.mjs +3 -3
  33. package/dist/lib/integrations/node-http/index.d.ts +2 -2
  34. package/dist/lib/integrations/node-http/index.js +1 -8
  35. package/dist/lib/integrations/node-http/index.js.map +1 -1
  36. package/dist/lib/integrations/node-http/index.mjs +2 -2
  37. package/dist/service-adapters/index.d.ts +3 -3
  38. package/dist/service-adapters/index.js +0 -13
  39. package/dist/service-adapters/index.js.map +1 -1
  40. package/dist/service-adapters/index.mjs +1 -1
  41. package/package.json +2 -2
  42. package/src/graphql/inputs/forwarded-parameters.input.ts +0 -3
  43. package/src/lib/runtime/copilot-runtime.ts +1 -7
  44. package/src/service-adapters/anthropic/anthropic-adapter.ts +0 -1
  45. package/src/service-adapters/events.ts +2 -2
  46. package/src/service-adapters/groq/groq-adapter.ts +0 -1
  47. package/src/service-adapters/openai/openai-adapter.ts +0 -1
  48. package/src/service-adapters/unify/unify-adapter.ts +0 -2
  49. package/dist/chunk-AKGNTDRV.mjs.map +0 -1
  50. package/dist/chunk-MCVGZ4ZG.mjs.map +0 -1
  51. /package/dist/{chunk-4OJDHGJU.mjs.map → chunk-GGNRDS7N.mjs.map} +0 -0
  52. /package/dist/{chunk-4DFIC23L.mjs.map → chunk-LSLFIYKP.mjs.map} +0 -0
  53. /package/dist/{chunk-6SSIGQER.mjs.map → chunk-TA5I5LYF.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,21 +1,17 @@
1
1
  # @copilotkit/runtime
2
2
 
3
- ## 1.4.8-next.2
3
+ ## 1.4.8
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - e3cce8e: - feat: add temperature parameter support for LLM completions
8
- - Updated dependencies [e3cce8e]
9
- - @copilotkit/shared@1.4.8-next.2
10
-
11
- ## 1.4.8-next.1
12
-
13
- ### Patch Changes
14
-
15
- - 1f21f28: - feat: add temperature parameter support for LLM completions
7
+ - - Better error handling
8
+ - Introduce new "EmptyLLMAdapter" for when using CoAgents
9
+ - Improve dev console help options
10
+ - Allow CopilotKit remote endpoint without agents
16
11
  - 989f159: - fix: allow CopilotKit Remote Endpoint without agents
17
12
  - Apply suggestions from code review
18
- - @copilotkit/shared@1.4.8-next.1
13
+ - Updated dependencies
14
+ - @copilotkit/shared@1.4.8
19
15
 
20
16
  ## 1.4.8-next.0
21
17
 
@@ -131,7 +131,6 @@ input ForwardedParametersInput {
131
131
  maxTokens: Float
132
132
  model: String
133
133
  stop: [String!]
134
- temperature: Float
135
134
  toolChoice: String
136
135
  toolChoiceFunctionName: String
137
136
  }
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-MCVGZ4ZG.mjs";
5
+ } from "./chunk-R6AUAQK6.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -77,4 +77,4 @@ export {
77
77
  config,
78
78
  copilotRuntimeNextJSPagesRouterEndpoint
79
79
  };
80
- //# sourceMappingURL=chunk-4OJDHGJU.mjs.map
80
+ //# sourceMappingURL=chunk-GGNRDS7N.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-MCVGZ4ZG.mjs";
5
+ } from "./chunk-R6AUAQK6.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-4DFIC23L.mjs.map
25
+ //# sourceMappingURL=chunk-LSLFIYKP.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RemoteChain,
3
3
  streamLangChainResponse
4
- } from "./chunk-AKGNTDRV.mjs";
4
+ } from "./chunk-W7GP2EOT.mjs";
5
5
  import {
6
6
  GuardrailsValidationFailureResponse,
7
7
  MessageStreamInterruptedResponse,
@@ -37,7 +37,7 @@ var require_package = __commonJS({
37
37
  publishConfig: {
38
38
  access: "public"
39
39
  },
40
- version: "1.4.8-next.2",
40
+ version: "1.4.8",
41
41
  sideEffects: false,
42
42
  main: "./dist/index.js",
43
43
  module: "./dist/index.mjs",
@@ -541,7 +541,6 @@ var ForwardedParametersInput = class {
541
541
  stop;
542
542
  toolChoice;
543
543
  toolChoiceFunctionName;
544
- temperature;
545
544
  };
546
545
  __name(ForwardedParametersInput, "ForwardedParametersInput");
547
546
  _ts_decorate6([
@@ -576,12 +575,6 @@ _ts_decorate6([
576
575
  }),
577
576
  _ts_metadata6("design:type", String)
578
577
  ], ForwardedParametersInput.prototype, "toolChoiceFunctionName", void 0);
579
- _ts_decorate6([
580
- Field6(() => Number, {
581
- nullable: true
582
- }),
583
- _ts_metadata6("design:type", Number)
584
- ], ForwardedParametersInput.prototype, "temperature", void 0);
585
578
  ForwardedParametersInput = _ts_decorate6([
586
579
  InputType6()
587
580
  ], ForwardedParametersInput);
@@ -1048,7 +1041,7 @@ CopilotResponse = _ts_decorate11([
1048
1041
  import { Repeater } from "graphql-yoga";
1049
1042
 
1050
1043
  // src/service-adapters/events.ts
1051
- import { randomId as randomId3 } from "@copilotkit/shared";
1044
+ import { randomId as randomId2 } from "@copilotkit/shared";
1052
1045
  import { of, concat, map, scan as scan2, concatMap, ReplaySubject as ReplaySubject2, firstValueFrom, from as from2 } from "rxjs";
1053
1046
 
1054
1047
  // src/lib/telemetry-client.ts
@@ -2066,7 +2059,7 @@ __name(setupRemoteActions, "setupRemoteActions");
2066
2059
  import { createHash as createHash3 } from "crypto";
2067
2060
 
2068
2061
  // src/lib/runtime/copilot-runtime.ts
2069
- import { actionParametersToJsonSchema, randomId as randomId2 } from "@copilotkit/shared";
2062
+ import { actionParametersToJsonSchema } from "@copilotkit/shared";
2070
2063
 
2071
2064
  // src/service-adapters/conversion.ts
2072
2065
  import { plainToInstance } from "class-transformer";
@@ -2197,13 +2190,7 @@ var CopilotRuntime = class {
2197
2190
  } catch (error) {
2198
2191
  console.error("Error getting response:", error);
2199
2192
  eventSource.sendErrorMessageToChat();
2200
- return {
2201
- threadId: threadId || randomId2(),
2202
- runId: runId || randomId2(),
2203
- eventSource,
2204
- serverSideActions: [],
2205
- actionInputsWithoutAgents: []
2206
- };
2193
+ throw error;
2207
2194
  }
2208
2195
  }
2209
2196
  async processAgentRequest(request) {
@@ -2478,14 +2465,14 @@ var RuntimeEventSource = class {
2478
2465
  async stream(callback) {
2479
2466
  this.callback = callback;
2480
2467
  }
2481
- sendErrorMessageToChat() {
2482
- const errorMessage = "\u274C An error occurred. Please try again.";
2468
+ sendErrorMessageToChat(message = "An error occurred. Please try again.") {
2469
+ const errorMessage = `\u274C ${message}`;
2483
2470
  if (!this.callback) {
2484
2471
  this.stream(async (eventStream$) => {
2485
- eventStream$.sendTextMessage(randomId3(), errorMessage);
2472
+ eventStream$.sendTextMessage(randomId2(), errorMessage);
2486
2473
  });
2487
2474
  } else {
2488
- this.eventStream$.sendTextMessage(randomId3(), errorMessage);
2475
+ this.eventStream$.sendTextMessage(randomId2(), errorMessage);
2489
2476
  }
2490
2477
  }
2491
2478
  processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents }) {
@@ -2591,7 +2578,7 @@ __name(executeAction, "executeAction");
2591
2578
  import { GraphQLJSONObject } from "graphql-scalars";
2592
2579
  import { plainToInstance as plainToInstance2 } from "class-transformer";
2593
2580
  import { GraphQLError } from "graphql";
2594
- import { randomId as randomId4 } from "@copilotkit/shared";
2581
+ import { randomId as randomId3 } from "@copilotkit/shared";
2595
2582
  function _ts_decorate12(decorators, target, key, desc) {
2596
2583
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2597
2584
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -2708,7 +2695,7 @@ var CopilotResolver = class {
2708
2695
  rejectOutputMessagesPromise = reject;
2709
2696
  });
2710
2697
  logger2.debug("Processing");
2711
- const { eventSource, threadId = randomId4(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
2698
+ const { eventSource, threadId = randomId3(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
2712
2699
  serviceAdapter,
2713
2700
  messages: data.messages,
2714
2701
  actions: data.frontend.actions.filter((action) => action.available !== ActionInputAvailability.disabled),
@@ -2753,7 +2740,7 @@ var CopilotResolver = class {
2753
2740
  });
2754
2741
  outputMessages = [
2755
2742
  plainToInstance2(TextMessage, {
2756
- id: randomId4(),
2743
+ id: randomId3(),
2757
2744
  createdAt: /* @__PURE__ */ new Date(),
2758
2745
  content: result.reason,
2759
2746
  role: MessageRole.assistant
@@ -2916,7 +2903,7 @@ var CopilotResolver = class {
2916
2903
  result: event.result
2917
2904
  }, "Action execution result event received");
2918
2905
  pushMessage({
2919
- id: randomId4(),
2906
+ id: randomId3(),
2920
2907
  status: new SuccessMessageStatus(),
2921
2908
  createdAt: /* @__PURE__ */ new Date(),
2922
2909
  actionExecutionId: event.actionExecutionId,
@@ -2924,7 +2911,7 @@ var CopilotResolver = class {
2924
2911
  result: event.result
2925
2912
  });
2926
2913
  outputMessages.push(plainToInstance2(ResultMessage, {
2927
- id: randomId4(),
2914
+ id: randomId3(),
2928
2915
  createdAt: /* @__PURE__ */ new Date(),
2929
2916
  actionExecutionId: event.actionExecutionId,
2930
2917
  actionName: event.actionName,
@@ -2936,7 +2923,7 @@ var CopilotResolver = class {
2936
2923
  event
2937
2924
  }, "Agent message event received");
2938
2925
  pushMessage({
2939
- id: randomId4(),
2926
+ id: randomId3(),
2940
2927
  status: new SuccessMessageStatus(),
2941
2928
  threadId: event.threadId,
2942
2929
  agentName: event.agentName,
@@ -2949,7 +2936,7 @@ var CopilotResolver = class {
2949
2936
  createdAt: /* @__PURE__ */ new Date()
2950
2937
  });
2951
2938
  outputMessages.push(plainToInstance2(AgentStateMessage, {
2952
- id: randomId4(),
2939
+ id: randomId3(),
2953
2940
  threadId: event.threadId,
2954
2941
  agentName: event.agentName,
2955
2942
  nodeName: event.nodeName,
@@ -3160,4 +3147,4 @@ export {
3160
3147
  getCommonConfig,
3161
3148
  copilotRuntimeNodeHttpEndpoint
3162
3149
  };
3163
- //# sourceMappingURL=chunk-MCVGZ4ZG.mjs.map
3150
+ //# sourceMappingURL=chunk-R6AUAQK6.mjs.map