@copilotkit/runtime 1.4.8-next.0 → 1.4.8-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.
Files changed (52) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/__snapshots__/schema/schema.graphql +1 -0
  3. package/dist/{chunk-U6LFW34R.mjs → chunk-5KJYPVQJ.mjs} +16 -8
  4. package/dist/chunk-5KJYPVQJ.mjs.map +1 -0
  5. package/dist/{chunk-CDXNOPUW.mjs → chunk-CGGI46KC.mjs} +2 -2
  6. package/dist/{chunk-DOQSOWZS.mjs → chunk-EU52BTKR.mjs} +2 -2
  7. package/dist/{chunk-3KW7FFG5.mjs → chunk-KO4QCMY4.mjs} +2 -2
  8. package/dist/{chunk-OKQVDDJ2.mjs → chunk-W7GP2EOT.mjs} +50 -2
  9. package/dist/chunk-W7GP2EOT.mjs.map +1 -0
  10. package/dist/{copilot-runtime-12e7ac40.d.ts → copilot-runtime-1c5bf72b.d.ts} +1 -1
  11. package/dist/{groq-adapter-24abe931.d.ts → groq-adapter-b6a40422.d.ts} +1 -1
  12. package/dist/index.d.ts +4 -4
  13. package/dist/index.js +83 -25
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +9 -5
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/{langserve-f021ab9c.d.ts → langserve-6245df39.d.ts} +2 -1
  18. package/dist/lib/index.d.ts +3 -3
  19. package/dist/lib/index.js +14 -6
  20. package/dist/lib/index.js.map +1 -1
  21. package/dist/lib/index.mjs +5 -5
  22. package/dist/lib/integrations/index.d.ts +3 -3
  23. package/dist/lib/integrations/index.js +10 -3
  24. package/dist/lib/integrations/index.js.map +1 -1
  25. package/dist/lib/integrations/index.mjs +5 -5
  26. package/dist/lib/integrations/nest/index.d.ts +2 -2
  27. package/dist/lib/integrations/nest/index.js +10 -3
  28. package/dist/lib/integrations/nest/index.js.map +1 -1
  29. package/dist/lib/integrations/nest/index.mjs +3 -3
  30. package/dist/lib/integrations/node-express/index.d.ts +2 -2
  31. package/dist/lib/integrations/node-express/index.js +10 -3
  32. package/dist/lib/integrations/node-express/index.js.map +1 -1
  33. package/dist/lib/integrations/node-express/index.mjs +3 -3
  34. package/dist/lib/integrations/node-http/index.d.ts +2 -2
  35. package/dist/lib/integrations/node-http/index.js +10 -3
  36. package/dist/lib/integrations/node-http/index.js.map +1 -1
  37. package/dist/lib/integrations/node-http/index.mjs +2 -2
  38. package/dist/service-adapters/index.d.ts +35 -4
  39. package/dist/service-adapters/index.js +50 -0
  40. package/dist/service-adapters/index.js.map +1 -1
  41. package/dist/service-adapters/index.mjs +5 -1
  42. package/package.json +2 -2
  43. package/src/graphql/inputs/forwarded-parameters.input.ts +3 -0
  44. package/src/lib/logger.ts +1 -1
  45. package/src/lib/runtime/remote-action-constructors.ts +61 -57
  46. package/src/service-adapters/experimental/empty/empty-adapter.ts +33 -0
  47. package/src/service-adapters/index.ts +7 -1
  48. package/dist/chunk-OKQVDDJ2.mjs.map +0 -1
  49. package/dist/chunk-U6LFW34R.mjs.map +0 -1
  50. /package/dist/{chunk-CDXNOPUW.mjs.map → chunk-CGGI46KC.mjs.map} +0 -0
  51. /package/dist/{chunk-DOQSOWZS.mjs.map → chunk-EU52BTKR.mjs.map} +0 -0
  52. /package/dist/{chunk-3KW7FFG5.mjs.map → chunk-KO4QCMY4.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  config,
4
4
  copilotRuntimeNextJSAppRouterEndpoint,
5
5
  copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "./chunk-DOQSOWZS.mjs";
6
+ } from "./chunk-EU52BTKR.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "./chunk-3KW7FFG5.mjs";
9
+ } from "./chunk-KO4QCMY4.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-CDXNOPUW.mjs";
12
+ } from "./chunk-CGGI46KC.mjs";
13
13
  import {
14
14
  CopilotRuntime,
15
15
  buildSchema,
@@ -20,9 +20,11 @@ import {
20
20
  getCommonConfig,
21
21
  langGraphPlatformEndpoint,
22
22
  resolveEndpointType
23
- } from "./chunk-U6LFW34R.mjs";
23
+ } from "./chunk-5KJYPVQJ.mjs";
24
24
  import {
25
25
  AnthropicAdapter,
26
+ ExperimentalEmptyAdapter,
27
+ ExperimentalOllamaAdapter,
26
28
  GoogleGenerativeAIAdapter,
27
29
  GroqAdapter,
28
30
  LangChainAdapter,
@@ -30,7 +32,7 @@ import {
30
32
  OpenAIAssistantAdapter,
31
33
  RemoteChain,
32
34
  UnifyAdapter
33
- } from "./chunk-OKQVDDJ2.mjs";
35
+ } from "./chunk-W7GP2EOT.mjs";
34
36
  import {
35
37
  GuardrailsValidationFailureResponse,
36
38
  MessageStreamInterruptedResponse,
@@ -45,6 +47,8 @@ import "reflect-metadata";
45
47
  export {
46
48
  AnthropicAdapter,
47
49
  CopilotRuntime,
50
+ ExperimentalEmptyAdapter,
51
+ ExperimentalOllamaAdapter,
48
52
  GoogleGenerativeAIAdapter,
49
53
  GroqAdapter,
50
54
  GuardrailsValidationFailureResponse,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"reflect-metadata\";\nexport * from \"./lib\";\nexport * from \"./utils\";\nexport * from \"./service-adapters\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"reflect-metadata\";\nexport * from \"./lib\";\nexport * from \"./utils\";\nexport * from \"./service-adapters\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO;","names":[]}
@@ -96,6 +96,7 @@ declare class ForwardedParametersInput {
96
96
  stop?: string[];
97
97
  toolChoice?: String;
98
98
  toolChoiceFunctionName?: string;
99
+ temperature?: number;
99
100
  }
100
101
 
101
102
  interface CopilotRuntimeChatCompletionRequest {
@@ -133,4 +134,4 @@ declare class RemoteChain {
133
134
  inferLangServeParameters(): Promise<void>;
134
135
  }
135
136
 
136
- export { ActionInput as A, CopilotServiceAdapter as C, ForwardedParametersInput as F, RemoteChainParameters as R, RemoteChain as a, RuntimeEventSource as b, CopilotRuntimeChatCompletionRequest as c, CopilotRuntimeChatCompletionResponse as d };
137
+ export { ActionInput as A, CopilotRuntimeChatCompletionRequest as C, ForwardedParametersInput as F, RemoteChainParameters as R, CopilotRuntimeChatCompletionResponse as a, CopilotServiceAdapter as b, RemoteChain as c, RuntimeEventSource as d };
@@ -1,11 +1,11 @@
1
- export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-12e7ac40.js';
2
- export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-24abe931.js';
1
+ export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-1c5bf72b.js';
2
+ export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-b6a40422.js';
3
3
  export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
4
4
  export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
5
5
  export { copilotRuntimeNodeExpressEndpoint } from './integrations/node-express/index.js';
6
6
  export { copilotRuntimeNestEndpoint } from './integrations/nest/index.js';
7
7
  import '@copilotkit/shared';
8
- import '../langserve-f021ab9c.js';
8
+ import '../langserve-6245df39.js';
9
9
  import '../index-10b1c870.js';
10
10
  import '../graphql/types/base/index.js';
11
11
  import 'rxjs';
package/dist/lib/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.4.8-next.0",
47
+ version: "1.4.8-next.1",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -1830,6 +1830,7 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1830
1830
  }
1831
1831
  __name(constructLGCRemoteAction, "constructLGCRemoteAction");
1832
1832
  function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, logger: logger2, messages, agentStates }) {
1833
+ const totalAgents = Array.isArray(json["agents"]) ? json["agents"].length : 0;
1833
1834
  const actions = json["actions"].map((action) => ({
1834
1835
  name: action.name,
1835
1836
  description: action.description,
@@ -1843,7 +1844,7 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
1843
1844
  telemetry_client_default.capture("oss.runtime.remote_action_executed", {
1844
1845
  agentExecution: false,
1845
1846
  type: "self-hosted",
1846
- agentsAmount: json["agents"].length
1847
+ agentsAmount: totalAgents
1847
1848
  });
1848
1849
  try {
1849
1850
  const response = await fetch(`${url}/actions/execute`, {
@@ -1878,7 +1879,7 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
1878
1879
  }
1879
1880
  }
1880
1881
  }));
1881
- const agents = json["agents"].map((agent) => ({
1882
+ const agents = totalAgents ? json["agents"].map((agent) => ({
1882
1883
  name: agent.name,
1883
1884
  description: agent.description,
1884
1885
  parameters: [],
@@ -1931,7 +1932,7 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
1931
1932
  streamResponse(response.body, eventSource.eventStream$);
1932
1933
  return eventSource.processLangGraphEvents();
1933
1934
  }
1934
- }));
1935
+ })) : [];
1935
1936
  return [
1936
1937
  ...actions,
1937
1938
  ...agents
@@ -3086,6 +3087,7 @@ var ForwardedParametersInput = class {
3086
3087
  stop;
3087
3088
  toolChoice;
3088
3089
  toolChoiceFunctionName;
3090
+ temperature;
3089
3091
  };
3090
3092
  __name(ForwardedParametersInput, "ForwardedParametersInput");
3091
3093
  _ts_decorate7([
@@ -3120,6 +3122,12 @@ _ts_decorate7([
3120
3122
  }),
3121
3123
  _ts_metadata7("design:type", String)
3122
3124
  ], ForwardedParametersInput.prototype, "toolChoiceFunctionName", void 0);
3125
+ _ts_decorate7([
3126
+ (0, import_type_graphql8.Field)(() => Number, {
3127
+ nullable: true
3128
+ }),
3129
+ _ts_metadata7("design:type", Number)
3130
+ ], ForwardedParametersInput.prototype, "temperature", void 0);
3123
3131
  ForwardedParametersInput = _ts_decorate7([
3124
3132
  (0, import_type_graphql8.InputType)()
3125
3133
  ], ForwardedParametersInput);
@@ -4171,8 +4179,8 @@ function createLogger(options) {
4171
4179
  level: process.env.LOG_LEVEL || level || "error",
4172
4180
  redact: {
4173
4181
  paths: [
4174
- "*.pid",
4175
- "*.hostname"
4182
+ "pid",
4183
+ "hostname"
4176
4184
  ],
4177
4185
  remove: true
4178
4186
  }