@copilotkit/runtime 1.50.0-beta.8 → 1.50.0-beta.9

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 (96) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/chunk-2OZAGFV3.mjs +43 -0
  3. package/dist/chunk-2OZAGFV3.mjs.map +1 -0
  4. package/dist/chunk-62NE5S6M.mjs +226 -0
  5. package/dist/chunk-62NE5S6M.mjs.map +1 -0
  6. package/dist/chunk-6XRUR5UK.mjs +1 -0
  7. package/dist/chunk-6XRUR5UK.mjs.map +1 -0
  8. package/dist/chunk-AMUJQ6IR.mjs +50 -0
  9. package/dist/chunk-AMUJQ6IR.mjs.map +1 -0
  10. package/dist/chunk-BJEYMRDD.mjs +25 -0
  11. package/dist/chunk-BJEYMRDD.mjs.map +1 -0
  12. package/dist/chunk-DZV4ZIAR.mjs +3063 -0
  13. package/dist/chunk-DZV4ZIAR.mjs.map +1 -0
  14. package/dist/chunk-FHD4JECV.mjs +33 -0
  15. package/dist/chunk-FHD4JECV.mjs.map +1 -0
  16. package/dist/chunk-FMU55SEU.mjs +25 -0
  17. package/dist/chunk-FMU55SEU.mjs.map +1 -0
  18. package/dist/chunk-OWIGJONH.mjs +275 -0
  19. package/dist/chunk-OWIGJONH.mjs.map +1 -0
  20. package/dist/chunk-SBCOROE4.mjs +1112 -0
  21. package/dist/chunk-SBCOROE4.mjs.map +1 -0
  22. package/dist/chunk-TTUAEJLD.mjs +617 -0
  23. package/dist/chunk-TTUAEJLD.mjs.map +1 -0
  24. package/dist/chunk-XWBDEXDA.mjs +153 -0
  25. package/dist/chunk-XWBDEXDA.mjs.map +1 -0
  26. package/dist/chunk-Z752VE75.mjs +74 -0
  27. package/dist/chunk-Z752VE75.mjs.map +1 -0
  28. package/dist/graphql/message-conversion/index.d.ts +18 -0
  29. package/dist/graphql/message-conversion/index.js +725 -0
  30. package/dist/graphql/message-conversion/index.js.map +1 -0
  31. package/dist/graphql/message-conversion/index.mjs +245 -0
  32. package/dist/graphql/message-conversion/index.mjs.map +1 -0
  33. package/dist/graphql/types/base/index.d.ts +6 -0
  34. package/dist/graphql/types/base/index.js +63 -0
  35. package/dist/graphql/types/base/index.js.map +1 -0
  36. package/dist/graphql/types/base/index.mjs +8 -0
  37. package/dist/graphql/types/base/index.mjs.map +1 -0
  38. package/dist/graphql/types/converted/index.d.ts +2 -0
  39. package/dist/graphql/types/converted/index.js +294 -0
  40. package/dist/graphql/types/converted/index.js.map +1 -0
  41. package/dist/graphql/types/converted/index.mjs +20 -0
  42. package/dist/graphql/types/converted/index.mjs.map +1 -0
  43. package/dist/groq-adapter-50bc6e4a.d.ts +326 -0
  44. package/dist/index-adbd78f1.d.ts +154 -0
  45. package/dist/index.js +1 -1
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +1 -1
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/langserve-74a52292.d.ts +242 -0
  50. package/dist/lib/cloud/index.d.ts +6 -0
  51. package/dist/lib/cloud/index.js +18 -0
  52. package/dist/lib/cloud/index.js.map +1 -0
  53. package/dist/lib/cloud/index.mjs +1 -0
  54. package/dist/lib/cloud/index.mjs.map +1 -0
  55. package/dist/lib/index.d.ts +266 -0
  56. package/dist/lib/index.js +4944 -0
  57. package/dist/lib/index.js.map +1 -0
  58. package/dist/lib/index.mjs +74 -0
  59. package/dist/lib/index.mjs.map +1 -0
  60. package/dist/lib/integrations/index.d.ts +28 -0
  61. package/dist/lib/integrations/index.js +3024 -0
  62. package/dist/lib/integrations/index.js.map +1 -0
  63. package/dist/lib/integrations/index.mjs +36 -0
  64. package/dist/lib/integrations/index.mjs.map +1 -0
  65. package/dist/lib/integrations/nest/index.d.ts +16 -0
  66. package/dist/lib/integrations/nest/index.js +2937 -0
  67. package/dist/lib/integrations/nest/index.js.map +1 -0
  68. package/dist/lib/integrations/nest/index.mjs +13 -0
  69. package/dist/lib/integrations/nest/index.mjs.map +1 -0
  70. package/dist/lib/integrations/node-express/index.d.ts +16 -0
  71. package/dist/lib/integrations/node-express/index.js +2937 -0
  72. package/dist/lib/integrations/node-express/index.js.map +1 -0
  73. package/dist/lib/integrations/node-express/index.mjs +13 -0
  74. package/dist/lib/integrations/node-express/index.mjs.map +1 -0
  75. package/dist/lib/integrations/node-http/index.d.ts +16 -0
  76. package/dist/lib/integrations/node-http/index.js +2923 -0
  77. package/dist/lib/integrations/node-http/index.js.map +1 -0
  78. package/dist/lib/integrations/node-http/index.mjs +12 -0
  79. package/dist/lib/integrations/node-http/index.mjs.map +1 -0
  80. package/dist/service-adapters/index.d.ts +166 -0
  81. package/dist/service-adapters/index.js +1800 -0
  82. package/dist/service-adapters/index.js.map +1 -0
  83. package/dist/service-adapters/index.mjs +36 -0
  84. package/dist/service-adapters/index.mjs.map +1 -0
  85. package/dist/service-adapters/shared/index.d.ts +9 -0
  86. package/dist/service-adapters/shared/index.js +72 -0
  87. package/dist/service-adapters/shared/index.js.map +1 -0
  88. package/dist/service-adapters/shared/index.mjs +8 -0
  89. package/dist/service-adapters/shared/index.mjs.map +1 -0
  90. package/dist/shared-f6d43ef8.d.ts +446 -0
  91. package/dist/utils/index.d.ts +65 -0
  92. package/dist/utils/index.js +175 -0
  93. package/dist/utils/index.js.map +1 -0
  94. package/dist/utils/index.mjs +12 -0
  95. package/dist/utils/index.mjs.map +1 -0
  96. package/package.json +2 -2
@@ -0,0 +1,242 @@
1
+ import { T as TextMessage, A as ActionExecutionMessage, R as ResultMessage, b as ActionInputAvailability, M as Message } from './index-adbd78f1.js';
2
+ import { ReplaySubject } from 'rxjs';
3
+ import { Parameter, Action } from '@copilotkit/shared';
4
+
5
+ /**
6
+ * The extensions response is used to receive additional information from the copilot runtime, specific to a
7
+ * service adapter or agent framework.
8
+ *
9
+ * Next time a request to the runtime is made, the extensions response will be included in the request as input.
10
+ */
11
+ declare class ExtensionsResponse {
12
+ openaiAssistantAPI?: OpenAIApiAssistantAPIResponse;
13
+ }
14
+ declare class OpenAIApiAssistantAPIResponse {
15
+ runId?: string;
16
+ threadId?: string;
17
+ }
18
+
19
+ declare enum RuntimeEventTypes {
20
+ TextMessageStart = "TextMessageStart",
21
+ TextMessageContent = "TextMessageContent",
22
+ TextMessageEnd = "TextMessageEnd",
23
+ ActionExecutionStart = "ActionExecutionStart",
24
+ ActionExecutionArgs = "ActionExecutionArgs",
25
+ ActionExecutionEnd = "ActionExecutionEnd",
26
+ ActionExecutionResult = "ActionExecutionResult",
27
+ AgentStateMessage = "AgentStateMessage",
28
+ MetaEvent = "MetaEvent",
29
+ RunError = "RunError"
30
+ }
31
+ declare enum RuntimeMetaEventName {
32
+ LangGraphInterruptEvent = "LangGraphInterruptEvent",
33
+ LangGraphInterruptResumeEvent = "LangGraphInterruptResumeEvent",
34
+ CopilotKitLangGraphInterruptEvent = "CopilotKitLangGraphInterruptEvent"
35
+ }
36
+ type RunTimeMetaEvent = {
37
+ type: RuntimeEventTypes.MetaEvent;
38
+ name: RuntimeMetaEventName.LangGraphInterruptEvent;
39
+ value: string;
40
+ } | {
41
+ type: RuntimeEventTypes.MetaEvent;
42
+ name: RuntimeMetaEventName.CopilotKitLangGraphInterruptEvent;
43
+ data: {
44
+ value: string;
45
+ messages: (TextMessage | ActionExecutionMessage | ResultMessage)[];
46
+ };
47
+ } | {
48
+ type: RuntimeEventTypes.MetaEvent;
49
+ name: RuntimeMetaEventName.LangGraphInterruptResumeEvent;
50
+ data: string;
51
+ };
52
+ type RuntimeErrorEvent = {
53
+ type: RuntimeEventTypes.RunError;
54
+ message: string;
55
+ code?: string;
56
+ };
57
+ type RuntimeEvent = {
58
+ type: RuntimeEventTypes.TextMessageStart;
59
+ messageId: string;
60
+ parentMessageId?: string;
61
+ } | {
62
+ type: RuntimeEventTypes.TextMessageContent;
63
+ messageId: string;
64
+ content: string;
65
+ } | {
66
+ type: RuntimeEventTypes.TextMessageEnd;
67
+ messageId: string;
68
+ } | {
69
+ type: RuntimeEventTypes.ActionExecutionStart;
70
+ actionExecutionId: string;
71
+ actionName: string;
72
+ parentMessageId?: string;
73
+ } | {
74
+ type: RuntimeEventTypes.ActionExecutionArgs;
75
+ actionExecutionId: string;
76
+ args: string;
77
+ } | {
78
+ type: RuntimeEventTypes.ActionExecutionEnd;
79
+ actionExecutionId: string;
80
+ } | {
81
+ type: RuntimeEventTypes.ActionExecutionResult;
82
+ actionName: string;
83
+ actionExecutionId: string;
84
+ result: string;
85
+ } | {
86
+ type: RuntimeEventTypes.AgentStateMessage;
87
+ threadId: string;
88
+ agentName: string;
89
+ nodeName: string;
90
+ runId: string;
91
+ active: boolean;
92
+ role: string;
93
+ state: string;
94
+ running: boolean;
95
+ } | RunTimeMetaEvent | RuntimeErrorEvent;
96
+ type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
97
+ declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
98
+ constructor();
99
+ sendTextMessageStart({ messageId, parentMessageId, }: {
100
+ messageId: string;
101
+ parentMessageId?: string;
102
+ }): void;
103
+ sendTextMessageContent({ messageId, content }: {
104
+ messageId: string;
105
+ content: string;
106
+ }): void;
107
+ sendTextMessageEnd({ messageId }: {
108
+ messageId: string;
109
+ }): void;
110
+ sendTextMessage(messageId: string, content: string): void;
111
+ sendActionExecutionStart({ actionExecutionId, actionName, parentMessageId, }: {
112
+ actionExecutionId: string;
113
+ actionName: string;
114
+ parentMessageId?: string;
115
+ }): void;
116
+ sendActionExecutionArgs({ actionExecutionId, args, }: {
117
+ actionExecutionId: string;
118
+ args: string;
119
+ }): void;
120
+ sendActionExecutionEnd({ actionExecutionId }: {
121
+ actionExecutionId: string;
122
+ }): void;
123
+ sendActionExecution({ actionExecutionId, actionName, args, parentMessageId, }: {
124
+ actionExecutionId: string;
125
+ actionName: string;
126
+ args: string;
127
+ parentMessageId?: string;
128
+ }): void;
129
+ sendActionExecutionResult({ actionExecutionId, actionName, result, error, }: {
130
+ actionExecutionId: string;
131
+ actionName: string;
132
+ result?: string;
133
+ error?: {
134
+ code: string;
135
+ message: string;
136
+ };
137
+ }): void;
138
+ sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
139
+ threadId: string;
140
+ agentName: string;
141
+ nodeName: string;
142
+ runId: string;
143
+ active: boolean;
144
+ role: string;
145
+ state: string;
146
+ running: boolean;
147
+ }): void;
148
+ }
149
+ declare class RuntimeEventSource {
150
+ private eventStream$;
151
+ private callback;
152
+ private errorHandler?;
153
+ private errorContext?;
154
+ constructor(params?: {
155
+ errorHandler?: (error: any, context: any) => Promise<void>;
156
+ errorContext?: any;
157
+ });
158
+ stream(callback: EventSourceCallback): Promise<void>;
159
+ }
160
+
161
+ declare class ActionInput {
162
+ name: string;
163
+ description: string;
164
+ jsonSchema: string;
165
+ available?: ActionInputAvailability;
166
+ }
167
+
168
+ declare class ForwardedParametersInput {
169
+ model?: string;
170
+ maxTokens?: number;
171
+ stop?: string[];
172
+ toolChoice?: String;
173
+ toolChoiceFunctionName?: string;
174
+ temperature?: number;
175
+ }
176
+
177
+ /**
178
+ * The extensions input is used to pass additional information to the copilot runtime, specific to a
179
+ * service adapter or agent framework.
180
+ */
181
+ declare class ExtensionsInput {
182
+ openaiAssistantAPI?: OpenAIApiAssistantAPIInput;
183
+ }
184
+ declare class OpenAIApiAssistantAPIInput {
185
+ runId?: string;
186
+ threadId?: string;
187
+ }
188
+
189
+ declare class AgentSessionInput {
190
+ agentName: string;
191
+ threadId?: string;
192
+ nodeName?: string;
193
+ }
194
+
195
+ declare class AgentStateInput {
196
+ agentName: string;
197
+ state: string;
198
+ config?: string;
199
+ }
200
+
201
+ interface CopilotRuntimeChatCompletionRequest {
202
+ eventSource: RuntimeEventSource;
203
+ messages: Message[];
204
+ actions: ActionInput[];
205
+ model?: string;
206
+ threadId?: string;
207
+ runId?: string;
208
+ forwardedParameters?: ForwardedParametersInput;
209
+ extensions?: ExtensionsInput;
210
+ agentSession?: AgentSessionInput;
211
+ agentStates?: AgentStateInput[];
212
+ }
213
+ interface CopilotRuntimeChatCompletionResponse {
214
+ threadId: string;
215
+ runId?: string;
216
+ extensions?: ExtensionsResponse;
217
+ }
218
+ interface CopilotServiceAdapter {
219
+ provider?: string;
220
+ model?: string;
221
+ process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
222
+ }
223
+
224
+ interface RemoteChainParameters {
225
+ name: string;
226
+ description: string;
227
+ chainUrl: string;
228
+ parameters?: Parameter[];
229
+ parameterType?: "single" | "multi";
230
+ }
231
+ declare class RemoteChain {
232
+ name: string;
233
+ description: string;
234
+ chainUrl: string;
235
+ parameters?: Parameter[];
236
+ parameterType: "single" | "multi";
237
+ constructor(options: RemoteChainParameters);
238
+ toAction(): Promise<Action<any>>;
239
+ inferLangServeParameters(): Promise<void>;
240
+ }
241
+
242
+ export { ActionInput as A, CopilotRuntimeChatCompletionRequest as C, ExtensionsInput as E, ForwardedParametersInput as F, RemoteChainParameters as R, CopilotRuntimeChatCompletionResponse as a, CopilotServiceAdapter as b, RemoteChain as c, AgentSessionInput as d, AgentStateInput as e };
@@ -0,0 +1,6 @@
1
+ interface CopilotCloudOptions {
2
+ baseUrl?: string;
3
+ publicApiKey?: string;
4
+ }
5
+
6
+ export { CopilotCloudOptions };
@@ -0,0 +1,18 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/cloud/index.ts"],"sourcesContent":["export interface CopilotCloudOptions {\n baseUrl?: string;\n publicApiKey?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,266 @@
1
+ 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-50bc6e4a.js';
2
+ export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams_BASE, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, n as MCPClient, o as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, q as convertMCPToolsToActions, l as copilotKitEndpoint, c as createContext, h as createLogger, p as extractParametersFromSchema, s as generateMcpToolInstructions, g as getCommonConfig, m as langGraphPlatformEndpoint, r as resolveEndpointType } from '../shared-f6d43ef8.js';
3
+ export { 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 * as rxjs from 'rxjs';
8
+ import { TextMessageStartEvent, TextMessageContentEvent, TextMessageEndEvent, ToolCallStartEvent, ToolCallArgsEvent, ToolCallEndEvent, RunAgentInput, EventType } from '@ag-ui/client';
9
+ import { LangGraphAgent as LangGraphAgent$1, LangGraphAgentConfig, ProcessedEvents, State, StateEnrichment, SchemaKeys } from '@ag-ui/langgraph';
10
+ export { LangGraphHttpAgent } from '@ag-ui/langgraph';
11
+ import { Message } from '@langchain/langgraph-sdk/dist/types.messages';
12
+ import 'openai';
13
+ import '../langserve-74a52292.js';
14
+ import '../index-adbd78f1.js';
15
+ import '../graphql/types/base/index.js';
16
+ import '@copilotkit/shared';
17
+ import '@langchain/core/messages';
18
+ import '@langchain/core/tools';
19
+ import '@langchain/core/utils/stream';
20
+ import 'groq-sdk';
21
+ import 'graphql';
22
+ import 'pino';
23
+ import 'graphql-yoga';
24
+ import '@copilotkitnext/runtime';
25
+ import './cloud/index.js';
26
+
27
+ interface CopilotKitStateEnrichment {
28
+ copilotkit: {
29
+ actions: StateEnrichment["ag-ui"]["tools"];
30
+ context: StateEnrichment["ag-ui"]["context"];
31
+ };
32
+ }
33
+ interface PredictStateTool {
34
+ tool: string;
35
+ state_key: string;
36
+ tool_argument: string;
37
+ }
38
+ type TextMessageEvents = TextMessageStartEvent | TextMessageContentEvent | TextMessageEndEvent;
39
+ type ToolCallEvents = ToolCallStartEvent | ToolCallArgsEvent | ToolCallEndEvent;
40
+ declare enum CustomEventNames {
41
+ CopilotKitManuallyEmitMessage = "copilotkit_manually_emit_message",
42
+ CopilotKitManuallyEmitToolCall = "copilotkit_manually_emit_tool_call",
43
+ CopilotKitManuallyEmitIntermediateState = "copilotkit_manually_emit_intermediate_state",
44
+ CopilotKitExit = "copilotkit_exit"
45
+ }
46
+ declare class LangGraphAgent extends LangGraphAgent$1 {
47
+ constructor(config: LangGraphAgentConfig);
48
+ clone(): LangGraphAgent;
49
+ dispatchEvent(event: ProcessedEvents): boolean;
50
+ run(input: RunAgentInput): rxjs.Observable<{
51
+ type: EventType.TEXT_MESSAGE_START;
52
+ role: "developer" | "system" | "assistant" | "user";
53
+ messageId: string;
54
+ timestamp?: number | undefined;
55
+ rawEvent?: any;
56
+ } | {
57
+ type: EventType.TEXT_MESSAGE_CONTENT;
58
+ messageId: string;
59
+ delta: string;
60
+ timestamp?: number | undefined;
61
+ rawEvent?: any;
62
+ } | {
63
+ type: EventType.TEXT_MESSAGE_END;
64
+ messageId: string;
65
+ timestamp?: number | undefined;
66
+ rawEvent?: any;
67
+ } | {
68
+ type: EventType.TOOL_CALL_START;
69
+ toolCallId: string;
70
+ toolCallName: string;
71
+ timestamp?: number | undefined;
72
+ rawEvent?: any;
73
+ parentMessageId?: string | undefined;
74
+ } | {
75
+ type: EventType.TOOL_CALL_ARGS;
76
+ toolCallId: string;
77
+ delta: string;
78
+ timestamp?: number | undefined;
79
+ rawEvent?: any;
80
+ } | {
81
+ type: EventType.TOOL_CALL_END;
82
+ toolCallId: string;
83
+ timestamp?: number | undefined;
84
+ rawEvent?: any;
85
+ } | {
86
+ type: EventType.THINKING_TEXT_MESSAGE_START;
87
+ timestamp?: number | undefined;
88
+ rawEvent?: any;
89
+ } | {
90
+ type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
91
+ delta: string;
92
+ timestamp?: number | undefined;
93
+ rawEvent?: any;
94
+ } | {
95
+ type: EventType.THINKING_TEXT_MESSAGE_END;
96
+ timestamp?: number | undefined;
97
+ rawEvent?: any;
98
+ } | {
99
+ type: EventType.TOOL_CALL_RESULT;
100
+ content: string;
101
+ toolCallId: string;
102
+ messageId: string;
103
+ role?: "tool" | undefined;
104
+ timestamp?: number | undefined;
105
+ rawEvent?: any;
106
+ } | {
107
+ type: EventType.THINKING_START;
108
+ timestamp?: number | undefined;
109
+ rawEvent?: any;
110
+ title?: string | undefined;
111
+ } | {
112
+ type: EventType.THINKING_END;
113
+ timestamp?: number | undefined;
114
+ rawEvent?: any;
115
+ } | {
116
+ type: EventType.STATE_SNAPSHOT;
117
+ timestamp?: number | undefined;
118
+ rawEvent?: any;
119
+ snapshot?: any;
120
+ } | {
121
+ type: EventType.STATE_DELTA;
122
+ delta: any[];
123
+ timestamp?: number | undefined;
124
+ rawEvent?: any;
125
+ } | {
126
+ type: EventType.MESSAGES_SNAPSHOT;
127
+ messages: ({
128
+ id: string;
129
+ role: "developer";
130
+ content: string;
131
+ name?: string | undefined;
132
+ } | {
133
+ id: string;
134
+ role: "system";
135
+ content: string;
136
+ name?: string | undefined;
137
+ } | {
138
+ id: string;
139
+ role: "assistant";
140
+ name?: string | undefined;
141
+ content?: string | undefined;
142
+ toolCalls?: {
143
+ function: {
144
+ name: string;
145
+ arguments: string;
146
+ };
147
+ type: "function";
148
+ id: string;
149
+ }[] | undefined;
150
+ } | {
151
+ id: string;
152
+ role: "user";
153
+ content: string;
154
+ name?: string | undefined;
155
+ } | {
156
+ id: string;
157
+ role: "tool";
158
+ content: string;
159
+ toolCallId: string;
160
+ error?: string | undefined;
161
+ })[];
162
+ timestamp?: number | undefined;
163
+ rawEvent?: any;
164
+ } | {
165
+ type: EventType.RAW;
166
+ timestamp?: number | undefined;
167
+ rawEvent?: any;
168
+ event?: any;
169
+ source?: string | undefined;
170
+ } | {
171
+ name: string;
172
+ type: EventType.CUSTOM;
173
+ value?: any;
174
+ timestamp?: number | undefined;
175
+ rawEvent?: any;
176
+ } | {
177
+ type: EventType.RUN_STARTED;
178
+ threadId: string;
179
+ runId: string;
180
+ parentRunId?: string | undefined;
181
+ timestamp?: number | undefined;
182
+ rawEvent?: any;
183
+ input?: {
184
+ threadId: string;
185
+ runId: string;
186
+ messages: ({
187
+ id: string;
188
+ role: "developer";
189
+ content: string;
190
+ name?: string | undefined;
191
+ } | {
192
+ id: string;
193
+ role: "system";
194
+ content: string;
195
+ name?: string | undefined;
196
+ } | {
197
+ id: string;
198
+ role: "assistant";
199
+ name?: string | undefined;
200
+ content?: string | undefined;
201
+ toolCalls?: {
202
+ function: {
203
+ name: string;
204
+ arguments: string;
205
+ };
206
+ type: "function";
207
+ id: string;
208
+ }[] | undefined;
209
+ } | {
210
+ id: string;
211
+ role: "user";
212
+ content: string;
213
+ name?: string | undefined;
214
+ } | {
215
+ id: string;
216
+ role: "tool";
217
+ content: string;
218
+ toolCallId: string;
219
+ error?: string | undefined;
220
+ })[];
221
+ tools: {
222
+ name: string;
223
+ description: string;
224
+ parameters?: any;
225
+ }[];
226
+ context: {
227
+ value: string;
228
+ description: string;
229
+ }[];
230
+ parentRunId?: string | undefined;
231
+ state?: any;
232
+ forwardedProps?: any;
233
+ } | undefined;
234
+ } | {
235
+ type: EventType.RUN_FINISHED;
236
+ threadId: string;
237
+ runId: string;
238
+ timestamp?: number | undefined;
239
+ rawEvent?: any;
240
+ result?: any;
241
+ } | {
242
+ message: string;
243
+ type: EventType.RUN_ERROR;
244
+ code?: string | undefined;
245
+ timestamp?: number | undefined;
246
+ rawEvent?: any;
247
+ } | {
248
+ type: EventType.STEP_STARTED;
249
+ stepName: string;
250
+ timestamp?: number | undefined;
251
+ rawEvent?: any;
252
+ } | {
253
+ type: EventType.STEP_FINISHED;
254
+ stepName: string;
255
+ timestamp?: number | undefined;
256
+ rawEvent?: any;
257
+ } | {
258
+ type: EventType;
259
+ name: string;
260
+ value: any;
261
+ }>;
262
+ langGraphDefaultMergeState(state: State, messages: Message[], input: RunAgentInput): State<StateEnrichment & CopilotKitStateEnrichment>;
263
+ getSchemaKeys(): Promise<SchemaKeys>;
264
+ }
265
+
266
+ export { CustomEventNames, LangGraphAgent, PredictStateTool, TextMessageEvents, ToolCallEvents };