@copilotkit/runtime 1.5.1-test-custom-tag-prerelease-1.0 → 1.5.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 (85) hide show
  1. package/CHANGELOG.md +49 -4
  2. package/package.json +2 -2
  3. package/src/graphql/resolvers/copilot.resolver.ts +16 -0
  4. package/src/graphql/types/agents-response.type.ts +22 -0
  5. package/src/lib/runtime/copilot-runtime.ts +50 -0
  6. package/__snapshots__/schema/schema.graphql +0 -262
  7. package/dist/chunk-44O2JGUY.mjs +0 -12
  8. package/dist/chunk-44O2JGUY.mjs.map +0 -1
  9. package/dist/chunk-CLGKEUOA.mjs +0 -1408
  10. package/dist/chunk-CLGKEUOA.mjs.map +0 -1
  11. package/dist/chunk-D2WLFQS6.mjs +0 -43
  12. package/dist/chunk-D2WLFQS6.mjs.map +0 -1
  13. package/dist/chunk-DFOKBSIS.mjs +0 -1
  14. package/dist/chunk-DFOKBSIS.mjs.map +0 -1
  15. package/dist/chunk-F4RA4OOZ.mjs +0 -80
  16. package/dist/chunk-F4RA4OOZ.mjs.map +0 -1
  17. package/dist/chunk-L3RX2YCQ.mjs +0 -25
  18. package/dist/chunk-L3RX2YCQ.mjs.map +0 -1
  19. package/dist/chunk-RFF5IIZJ.mjs +0 -66
  20. package/dist/chunk-RFF5IIZJ.mjs.map +0 -1
  21. package/dist/chunk-U3V2BCGI.mjs +0 -152
  22. package/dist/chunk-U3V2BCGI.mjs.map +0 -1
  23. package/dist/chunk-YEAV6DRC.mjs +0 -3281
  24. package/dist/chunk-YEAV6DRC.mjs.map +0 -1
  25. package/dist/chunk-YOQGCPIU.mjs +0 -25
  26. package/dist/chunk-YOQGCPIU.mjs.map +0 -1
  27. package/dist/copilot-runtime-6285d897.d.ts +0 -189
  28. package/dist/graphql/types/base/index.d.ts +0 -6
  29. package/dist/graphql/types/base/index.js +0 -63
  30. package/dist/graphql/types/base/index.js.map +0 -1
  31. package/dist/graphql/types/base/index.mjs +0 -8
  32. package/dist/graphql/types/base/index.mjs.map +0 -1
  33. package/dist/graphql/types/converted/index.d.ts +0 -2
  34. package/dist/graphql/types/converted/index.js +0 -124
  35. package/dist/graphql/types/converted/index.js.map +0 -1
  36. package/dist/graphql/types/converted/index.mjs +0 -17
  37. package/dist/graphql/types/converted/index.mjs.map +0 -1
  38. package/dist/groq-adapter-15d41154.d.ts +0 -281
  39. package/dist/index-ff3fbc33.d.ts +0 -87
  40. package/dist/index.d.ts +0 -23
  41. package/dist/index.js +0 -5039
  42. package/dist/index.js.map +0 -1
  43. package/dist/index.mjs +0 -76
  44. package/dist/index.mjs.map +0 -1
  45. package/dist/langserve-48e976ac.d.ts +0 -176
  46. package/dist/lib/cloud/index.d.ts +0 -6
  47. package/dist/lib/cloud/index.js +0 -18
  48. package/dist/lib/cloud/index.js.map +0 -1
  49. package/dist/lib/cloud/index.mjs +0 -1
  50. package/dist/lib/cloud/index.mjs.map +0 -1
  51. package/dist/lib/index.d.ts +0 -20
  52. package/dist/lib/index.js +0 -4687
  53. package/dist/lib/index.js.map +0 -1
  54. package/dist/lib/index.mjs +0 -58
  55. package/dist/lib/index.mjs.map +0 -1
  56. package/dist/lib/integrations/index.d.ts +0 -33
  57. package/dist/lib/integrations/index.js +0 -2091
  58. package/dist/lib/integrations/index.js.map +0 -1
  59. package/dist/lib/integrations/index.mjs +0 -34
  60. package/dist/lib/integrations/index.mjs.map +0 -1
  61. package/dist/lib/integrations/nest/index.d.ts +0 -14
  62. package/dist/lib/integrations/nest/index.js +0 -2000
  63. package/dist/lib/integrations/nest/index.js.map +0 -1
  64. package/dist/lib/integrations/nest/index.mjs +0 -13
  65. package/dist/lib/integrations/nest/index.mjs.map +0 -1
  66. package/dist/lib/integrations/node-express/index.d.ts +0 -14
  67. package/dist/lib/integrations/node-express/index.js +0 -2000
  68. package/dist/lib/integrations/node-express/index.js.map +0 -1
  69. package/dist/lib/integrations/node-express/index.mjs +0 -13
  70. package/dist/lib/integrations/node-express/index.mjs.map +0 -1
  71. package/dist/lib/integrations/node-http/index.d.ts +0 -14
  72. package/dist/lib/integrations/node-http/index.js +0 -1986
  73. package/dist/lib/integrations/node-http/index.js.map +0 -1
  74. package/dist/lib/integrations/node-http/index.mjs +0 -12
  75. package/dist/lib/integrations/node-http/index.mjs.map +0 -1
  76. package/dist/service-adapters/index.d.ts +0 -84
  77. package/dist/service-adapters/index.js +0 -1448
  78. package/dist/service-adapters/index.js.map +0 -1
  79. package/dist/service-adapters/index.mjs +0 -26
  80. package/dist/service-adapters/index.mjs.map +0 -1
  81. package/dist/utils/index.d.ts +0 -49
  82. package/dist/utils/index.js +0 -174
  83. package/dist/utils/index.js.map +0 -1
  84. package/dist/utils/index.mjs +0 -12
  85. package/dist/utils/index.mjs.map +0 -1
package/dist/index.mjs DELETED
@@ -1,76 +0,0 @@
1
- import "./chunk-DFOKBSIS.mjs";
2
- import {
3
- config,
4
- copilotRuntimeNextJSAppRouterEndpoint,
5
- copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "./chunk-F4RA4OOZ.mjs";
7
- import {
8
- copilotRuntimeNestEndpoint
9
- } from "./chunk-L3RX2YCQ.mjs";
10
- import {
11
- copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-YOQGCPIU.mjs";
13
- import {
14
- CopilotRuntime,
15
- buildSchema,
16
- copilotKitEndpoint,
17
- copilotRuntimeNodeHttpEndpoint,
18
- createContext,
19
- flattenToolCallsNoDuplicates,
20
- getCommonConfig,
21
- langGraphPlatformEndpoint,
22
- resolveEndpointType
23
- } from "./chunk-YEAV6DRC.mjs";
24
- import {
25
- GuardrailsValidationFailureResponse,
26
- MessageStreamInterruptedResponse,
27
- UnknownErrorResponse
28
- } from "./chunk-U3V2BCGI.mjs";
29
- import {
30
- AnthropicAdapter,
31
- ExperimentalEmptyAdapter,
32
- ExperimentalOllamaAdapter,
33
- GoogleGenerativeAIAdapter,
34
- GroqAdapter,
35
- LangChainAdapter,
36
- OpenAIAdapter,
37
- OpenAIAssistantAdapter,
38
- RemoteChain,
39
- UnifyAdapter
40
- } from "./chunk-CLGKEUOA.mjs";
41
- import "./chunk-RFF5IIZJ.mjs";
42
- import "./chunk-D2WLFQS6.mjs";
43
- import "./chunk-44O2JGUY.mjs";
44
-
45
- // src/index.ts
46
- import "reflect-metadata";
47
- export {
48
- AnthropicAdapter,
49
- CopilotRuntime,
50
- ExperimentalEmptyAdapter,
51
- ExperimentalOllamaAdapter,
52
- GoogleGenerativeAIAdapter,
53
- GroqAdapter,
54
- GuardrailsValidationFailureResponse,
55
- LangChainAdapter,
56
- MessageStreamInterruptedResponse,
57
- OpenAIAdapter,
58
- OpenAIAssistantAdapter,
59
- RemoteChain,
60
- UnifyAdapter,
61
- UnknownErrorResponse,
62
- buildSchema,
63
- config,
64
- copilotKitEndpoint,
65
- copilotRuntimeNestEndpoint,
66
- copilotRuntimeNextJSAppRouterEndpoint,
67
- copilotRuntimeNextJSPagesRouterEndpoint,
68
- copilotRuntimeNodeExpressEndpoint,
69
- copilotRuntimeNodeHttpEndpoint,
70
- createContext,
71
- flattenToolCallsNoDuplicates,
72
- getCommonConfig,
73
- langGraphPlatformEndpoint,
74
- resolveEndpointType
75
- };
76
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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,176 +0,0 @@
1
- import { A as ActionInputAvailability, a as Message } from './index-ff3fbc33.js';
2
- import * as rxjs from 'rxjs';
3
- import { Subject, ReplaySubject } from 'rxjs';
4
- import { Action, Parameter } from '@copilotkit/shared';
5
-
6
- declare enum GuardrailsResultStatus {
7
- ALLOWED = "allowed",
8
- DENIED = "denied"
9
- }
10
- declare class GuardrailsResult {
11
- status: GuardrailsResultStatus;
12
- reason?: string;
13
- }
14
-
15
- declare class ActionInput {
16
- name: string;
17
- description: string;
18
- jsonSchema: string;
19
- available?: ActionInputAvailability;
20
- }
21
-
22
- declare enum RuntimeEventTypes {
23
- TextMessageStart = "TextMessageStart",
24
- TextMessageContent = "TextMessageContent",
25
- TextMessageEnd = "TextMessageEnd",
26
- ActionExecutionStart = "ActionExecutionStart",
27
- ActionExecutionArgs = "ActionExecutionArgs",
28
- ActionExecutionEnd = "ActionExecutionEnd",
29
- ActionExecutionResult = "ActionExecutionResult",
30
- AgentStateMessage = "AgentStateMessage"
31
- }
32
- type RuntimeEvent = {
33
- type: RuntimeEventTypes.TextMessageStart;
34
- messageId: string;
35
- parentMessageId?: string;
36
- } | {
37
- type: RuntimeEventTypes.TextMessageContent;
38
- messageId: string;
39
- content: string;
40
- } | {
41
- type: RuntimeEventTypes.TextMessageEnd;
42
- messageId: string;
43
- } | {
44
- type: RuntimeEventTypes.ActionExecutionStart;
45
- actionExecutionId: string;
46
- actionName: string;
47
- parentMessageId?: string;
48
- } | {
49
- type: RuntimeEventTypes.ActionExecutionArgs;
50
- actionExecutionId: string;
51
- args: string;
52
- } | {
53
- type: RuntimeEventTypes.ActionExecutionEnd;
54
- actionExecutionId: string;
55
- } | {
56
- type: RuntimeEventTypes.ActionExecutionResult;
57
- actionName: string;
58
- actionExecutionId: string;
59
- result: string;
60
- } | {
61
- type: RuntimeEventTypes.AgentStateMessage;
62
- threadId: string;
63
- agentName: string;
64
- nodeName: string;
65
- runId: string;
66
- active: boolean;
67
- role: string;
68
- state: string;
69
- running: boolean;
70
- };
71
- type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
72
- declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
73
- constructor();
74
- sendTextMessageStart({ messageId, parentMessageId, }: {
75
- messageId: string;
76
- parentMessageId?: string;
77
- }): void;
78
- sendTextMessageContent({ messageId, content }: {
79
- messageId: string;
80
- content: string;
81
- }): void;
82
- sendTextMessageEnd({ messageId }: {
83
- messageId: string;
84
- }): void;
85
- sendTextMessage(messageId: string, content: string): void;
86
- sendActionExecutionStart({ actionExecutionId, actionName, parentMessageId, }: {
87
- actionExecutionId: string;
88
- actionName: string;
89
- parentMessageId?: string;
90
- }): void;
91
- sendActionExecutionArgs({ actionExecutionId, args, }: {
92
- actionExecutionId: string;
93
- args: string;
94
- }): void;
95
- sendActionExecutionEnd({ actionExecutionId }: {
96
- actionExecutionId: string;
97
- }): void;
98
- sendActionExecution({ actionExecutionId, actionName, args, parentMessageId, }: {
99
- actionExecutionId: string;
100
- actionName: string;
101
- args: string;
102
- parentMessageId?: string;
103
- }): void;
104
- sendActionExecutionResult({ actionExecutionId, actionName, result, }: {
105
- actionExecutionId: string;
106
- actionName: string;
107
- result: string;
108
- }): void;
109
- sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
110
- threadId: string;
111
- agentName: string;
112
- nodeName: string;
113
- runId: string;
114
- active: boolean;
115
- role: string;
116
- state: string;
117
- running: boolean;
118
- }): void;
119
- }
120
- declare class RuntimeEventSource {
121
- private eventStream$;
122
- private callback;
123
- stream(callback: EventSourceCallback): Promise<void>;
124
- sendErrorMessageToChat(message?: string): void;
125
- processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, }: {
126
- serverSideActions: Action<any>[];
127
- guardrailsResult$?: Subject<GuardrailsResult>;
128
- actionInputsWithoutAgents: ActionInput[];
129
- }): rxjs.Observable<RuntimeEvent>;
130
- }
131
-
132
- declare class ForwardedParametersInput {
133
- model?: string;
134
- maxTokens?: number;
135
- stop?: string[];
136
- toolChoice?: String;
137
- toolChoiceFunctionName?: string;
138
- temperature?: number;
139
- }
140
-
141
- interface CopilotRuntimeChatCompletionRequest {
142
- eventSource: RuntimeEventSource;
143
- messages: Message[];
144
- actions: ActionInput[];
145
- model?: string;
146
- threadId?: string;
147
- runId?: string;
148
- forwardedParameters?: ForwardedParametersInput;
149
- }
150
- interface CopilotRuntimeChatCompletionResponse {
151
- threadId: string;
152
- runId?: string;
153
- }
154
- interface CopilotServiceAdapter {
155
- process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
156
- }
157
-
158
- interface RemoteChainParameters {
159
- name: string;
160
- description: string;
161
- chainUrl: string;
162
- parameters?: Parameter[];
163
- parameterType?: "single" | "multi";
164
- }
165
- declare class RemoteChain {
166
- name: string;
167
- description: string;
168
- chainUrl: string;
169
- parameters?: Parameter[];
170
- parameterType: "single" | "multi";
171
- constructor(options: RemoteChainParameters);
172
- toAction(): Promise<Action<any>>;
173
- inferLangServeParameters(): Promise<void>;
174
- }
175
-
176
- 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,6 +0,0 @@
1
- interface CopilotCloudOptions {
2
- baseUrl?: string;
3
- publicApiKey?: string;
4
- }
5
-
6
- export { CopilotCloudOptions };
@@ -1,18 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/lib/cloud/index.ts
16
- var cloud_exports = {};
17
- module.exports = __toCommonJS(cloud_exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/cloud/index.ts"],"sourcesContent":["export interface CopilotCloudOptions {\n baseUrl?: string;\n publicApiKey?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,20 +0,0 @@
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-6285d897.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-15d41154.js';
3
- export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
4
- export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
5
- export { copilotRuntimeNodeExpressEndpoint } from './integrations/node-express/index.js';
6
- export { copilotRuntimeNestEndpoint } from './integrations/nest/index.js';
7
- import '@copilotkit/shared';
8
- import '../langserve-48e976ac.js';
9
- import '../index-ff3fbc33.js';
10
- import '../graphql/types/base/index.js';
11
- import 'rxjs';
12
- import 'graphql';
13
- import 'pino';
14
- import 'graphql-yoga';
15
- import './cloud/index.js';
16
- import 'openai';
17
- import '@langchain/core/messages';
18
- import '@langchain/core/tools';
19
- import '@langchain/core/utils/stream';
20
- import 'groq-sdk';