@copilotkit/runtime 1.50.0-beta.8 → 1.50.0

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 (226) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/dist/chunk-27JKTS6P.mjs +1704 -0
  3. package/dist/chunk-27JKTS6P.mjs.map +1 -0
  4. package/dist/chunk-2GPTVDTO.mjs +25 -0
  5. package/dist/chunk-2GPTVDTO.mjs.map +1 -0
  6. package/dist/chunk-2OZAGFV3.mjs +43 -0
  7. package/dist/chunk-2OZAGFV3.mjs.map +1 -0
  8. package/dist/chunk-3AJVKDZX.mjs +3097 -0
  9. package/dist/chunk-3AJVKDZX.mjs.map +1 -0
  10. package/dist/chunk-45RCC3ZS.mjs +25 -0
  11. package/dist/chunk-45RCC3ZS.mjs.map +1 -0
  12. package/dist/chunk-4EHJ4XFJ.mjs +25 -0
  13. package/dist/chunk-4EHJ4XFJ.mjs.map +1 -0
  14. package/dist/chunk-4IANB4TC.mjs +25 -0
  15. package/dist/chunk-4IANB4TC.mjs.map +1 -0
  16. package/dist/chunk-4KES76K3.mjs +74 -0
  17. package/dist/chunk-4KES76K3.mjs.map +1 -0
  18. package/dist/chunk-4OGE3SLW.mjs +3100 -0
  19. package/dist/chunk-4OGE3SLW.mjs.map +1 -0
  20. package/dist/chunk-54YJBMCP.mjs +3097 -0
  21. package/dist/chunk-54YJBMCP.mjs.map +1 -0
  22. package/dist/chunk-62NE5S6M.mjs +226 -0
  23. package/dist/chunk-62NE5S6M.mjs.map +1 -0
  24. package/dist/chunk-6ER4SZYH.mjs +74 -0
  25. package/dist/chunk-6ER4SZYH.mjs.map +1 -0
  26. package/dist/chunk-6TNSLHVR.mjs +74 -0
  27. package/dist/chunk-6TNSLHVR.mjs.map +1 -0
  28. package/dist/chunk-6XRUR5UK.mjs +1 -0
  29. package/dist/chunk-6XRUR5UK.mjs.map +1 -0
  30. package/dist/chunk-7V4BK7TZ.mjs +25 -0
  31. package/dist/chunk-7V4BK7TZ.mjs.map +1 -0
  32. package/dist/chunk-7YZIEXD2.mjs +74 -0
  33. package/dist/chunk-7YZIEXD2.mjs.map +1 -0
  34. package/dist/chunk-A4XHOAFU.mjs +25 -0
  35. package/dist/chunk-A4XHOAFU.mjs.map +1 -0
  36. package/dist/chunk-A555KEAD.mjs +6020 -0
  37. package/dist/chunk-A555KEAD.mjs.map +1 -0
  38. package/dist/chunk-AF73TFTX.mjs +74 -0
  39. package/dist/chunk-AF73TFTX.mjs.map +1 -0
  40. package/dist/chunk-AMUJQ6IR.mjs +50 -0
  41. package/dist/chunk-AMUJQ6IR.mjs.map +1 -0
  42. package/dist/chunk-AQG2SVCA.mjs +25 -0
  43. package/dist/chunk-AQG2SVCA.mjs.map +1 -0
  44. package/dist/chunk-BJZHMXND.mjs +74 -0
  45. package/dist/chunk-BJZHMXND.mjs.map +1 -0
  46. package/dist/chunk-CB2OJXF6.mjs +25 -0
  47. package/dist/chunk-CB2OJXF6.mjs.map +1 -0
  48. package/dist/chunk-CEOMFPJU.mjs +6020 -0
  49. package/dist/chunk-CEOMFPJU.mjs.map +1 -0
  50. package/dist/chunk-CZVLR7CC.mjs +175 -0
  51. package/dist/chunk-CZVLR7CC.mjs.map +1 -0
  52. package/dist/chunk-DCEEHMLJ.mjs +1127 -0
  53. package/dist/chunk-DCEEHMLJ.mjs.map +1 -0
  54. package/dist/chunk-DE3CLKUG.mjs +25 -0
  55. package/dist/chunk-DE3CLKUG.mjs.map +1 -0
  56. package/dist/chunk-DTPRUTNV.mjs +25 -0
  57. package/dist/chunk-DTPRUTNV.mjs.map +1 -0
  58. package/dist/chunk-ERUOA47O.mjs +626 -0
  59. package/dist/chunk-ERUOA47O.mjs.map +1 -0
  60. package/dist/chunk-ESSRC64W.mjs +74 -0
  61. package/dist/chunk-ESSRC64W.mjs.map +1 -0
  62. package/dist/chunk-FHD4JECV.mjs +33 -0
  63. package/dist/chunk-FHD4JECV.mjs.map +1 -0
  64. package/dist/chunk-GRAN6K6N.mjs +25 -0
  65. package/dist/chunk-GRAN6K6N.mjs.map +1 -0
  66. package/dist/chunk-I27F2UPA.mjs +175 -0
  67. package/dist/chunk-I27F2UPA.mjs.map +1 -0
  68. package/dist/chunk-IAZKTOQW.mjs +25 -0
  69. package/dist/chunk-IAZKTOQW.mjs.map +1 -0
  70. package/dist/chunk-J6XZ5MFB.mjs +25 -0
  71. package/dist/chunk-J6XZ5MFB.mjs.map +1 -0
  72. package/dist/chunk-JJ32MA4C.mjs +73 -0
  73. package/dist/chunk-JJ32MA4C.mjs.map +1 -0
  74. package/dist/chunk-JJY4ZTHQ.mjs +25 -0
  75. package/dist/chunk-JJY4ZTHQ.mjs.map +1 -0
  76. package/dist/chunk-KEYLBFU2.mjs +3117 -0
  77. package/dist/chunk-KEYLBFU2.mjs.map +1 -0
  78. package/dist/chunk-KQ53L4WZ.mjs +3094 -0
  79. package/dist/chunk-KQ53L4WZ.mjs.map +1 -0
  80. package/dist/chunk-KTELVQ67.mjs +3098 -0
  81. package/dist/chunk-KTELVQ67.mjs.map +1 -0
  82. package/dist/chunk-LPEPX6NH.mjs +25 -0
  83. package/dist/chunk-LPEPX6NH.mjs.map +1 -0
  84. package/dist/chunk-MDXE55DK.mjs +3117 -0
  85. package/dist/chunk-MDXE55DK.mjs.map +1 -0
  86. package/dist/chunk-MMFUVOXH.mjs +73 -0
  87. package/dist/chunk-MMFUVOXH.mjs.map +1 -0
  88. package/dist/chunk-N3Y4U66N.mjs +253 -0
  89. package/dist/chunk-N3Y4U66N.mjs.map +1 -0
  90. package/dist/chunk-O7UYB4MH.mjs +25 -0
  91. package/dist/chunk-O7UYB4MH.mjs.map +1 -0
  92. package/dist/chunk-OFNVQHNM.mjs +3089 -0
  93. package/dist/chunk-OFNVQHNM.mjs.map +1 -0
  94. package/dist/chunk-OFSV5GET.mjs +3074 -0
  95. package/dist/chunk-OFSV5GET.mjs.map +1 -0
  96. package/dist/chunk-OMRST67R.mjs +25 -0
  97. package/dist/chunk-OMRST67R.mjs.map +1 -0
  98. package/dist/chunk-OWIGJONH.mjs +275 -0
  99. package/dist/chunk-OWIGJONH.mjs.map +1 -0
  100. package/dist/chunk-PRZHE74A.mjs +25 -0
  101. package/dist/chunk-PRZHE74A.mjs.map +1 -0
  102. package/dist/chunk-PTYRVXXP.mjs +80 -0
  103. package/dist/chunk-PTYRVXXP.mjs.map +1 -0
  104. package/dist/chunk-R22B5CCO.mjs +25 -0
  105. package/dist/chunk-R22B5CCO.mjs.map +1 -0
  106. package/dist/chunk-SHBDMA63.mjs +141 -0
  107. package/dist/chunk-SHBDMA63.mjs.map +1 -0
  108. package/dist/chunk-SPVXBPRA.mjs +74 -0
  109. package/dist/chunk-SPVXBPRA.mjs.map +1 -0
  110. package/dist/chunk-T72G46ME.mjs +25 -0
  111. package/dist/chunk-T72G46ME.mjs.map +1 -0
  112. package/dist/chunk-TGELROPU.mjs +25 -0
  113. package/dist/chunk-TGELROPU.mjs.map +1 -0
  114. package/dist/chunk-UNX4IAAD.mjs +25 -0
  115. package/dist/chunk-UNX4IAAD.mjs.map +1 -0
  116. package/dist/chunk-V4DHVC7M.mjs +3085 -0
  117. package/dist/chunk-V4DHVC7M.mjs.map +1 -0
  118. package/dist/chunk-VVRFOB66.mjs +25 -0
  119. package/dist/chunk-VVRFOB66.mjs.map +1 -0
  120. package/dist/chunk-W6NVBYM6.mjs +80 -0
  121. package/dist/chunk-W6NVBYM6.mjs.map +1 -0
  122. package/dist/chunk-W7MBACGC.mjs +74 -0
  123. package/dist/chunk-W7MBACGC.mjs.map +1 -0
  124. package/dist/chunk-WMD4XZZS.mjs +25 -0
  125. package/dist/chunk-WMD4XZZS.mjs.map +1 -0
  126. package/dist/chunk-WX2ZNCRT.mjs +74 -0
  127. package/dist/chunk-WX2ZNCRT.mjs.map +1 -0
  128. package/dist/chunk-XWBDEXDA.mjs +153 -0
  129. package/dist/chunk-XWBDEXDA.mjs.map +1 -0
  130. package/dist/chunk-Y2Z62E2T.mjs +74 -0
  131. package/dist/chunk-Y2Z62E2T.mjs.map +1 -0
  132. package/dist/chunk-YO4I6RVI.mjs +25 -0
  133. package/dist/chunk-YO4I6RVI.mjs.map +1 -0
  134. package/dist/chunk-Z6Q5IW6I.mjs +3098 -0
  135. package/dist/chunk-Z6Q5IW6I.mjs.map +1 -0
  136. package/dist/chunk-Z726O3G2.mjs +25 -0
  137. package/dist/chunk-Z726O3G2.mjs.map +1 -0
  138. package/dist/chunk-ZE4SMZZR.mjs +3097 -0
  139. package/dist/chunk-ZE4SMZZR.mjs.map +1 -0
  140. package/dist/chunk-ZULZB33C.mjs +73 -0
  141. package/dist/chunk-ZULZB33C.mjs.map +1 -0
  142. package/dist/chunk-ZVRGXMY7.mjs +25 -0
  143. package/dist/chunk-ZVRGXMY7.mjs.map +1 -0
  144. package/dist/chunk-ZZ35WBYQ.mjs +25 -0
  145. package/dist/chunk-ZZ35WBYQ.mjs.map +1 -0
  146. package/dist/graphql/message-conversion/index.d.ts +18 -0
  147. package/dist/graphql/message-conversion/index.js +725 -0
  148. package/dist/graphql/message-conversion/index.js.map +1 -0
  149. package/dist/graphql/message-conversion/index.mjs +245 -0
  150. package/dist/graphql/message-conversion/index.mjs.map +1 -0
  151. package/dist/graphql/types/base/index.d.ts +6 -0
  152. package/dist/graphql/types/base/index.js +63 -0
  153. package/dist/graphql/types/base/index.js.map +1 -0
  154. package/dist/graphql/types/base/index.mjs +8 -0
  155. package/dist/graphql/types/base/index.mjs.map +1 -0
  156. package/dist/graphql/types/converted/index.d.ts +2 -0
  157. package/dist/graphql/types/converted/index.js +200 -0
  158. package/dist/graphql/types/converted/index.js.map +1 -0
  159. package/dist/graphql/types/converted/index.mjs +19 -0
  160. package/dist/graphql/types/converted/index.mjs.map +1 -0
  161. package/dist/groq-adapter-540da9c3.d.ts +331 -0
  162. package/dist/groq-adapter-a6f5e9d2.d.ts +331 -0
  163. package/dist/groq-adapter-c8aec5c5.d.ts +321 -0
  164. package/dist/index-96b330da.d.ts +119 -0
  165. package/dist/index-adbd78f1.d.ts +154 -0
  166. package/dist/index.d.ts +67 -8
  167. package/dist/index.js +118 -28
  168. package/dist/index.js.map +1 -1
  169. package/dist/index.mjs +120 -31
  170. package/dist/index.mjs.map +1 -1
  171. package/dist/langserve-0c6100e3.d.ts +257 -0
  172. package/dist/langserve-978d5790.d.ts +243 -0
  173. package/dist/langserve-9fc76ce5.d.ts +243 -0
  174. package/dist/lib/cloud/index.d.ts +6 -0
  175. package/dist/lib/cloud/index.js +18 -0
  176. package/dist/lib/cloud/index.js.map +1 -0
  177. package/dist/lib/cloud/index.mjs +1 -0
  178. package/dist/lib/cloud/index.mjs.map +1 -0
  179. package/dist/lib/index.d.ts +212 -0
  180. package/dist/lib/index.js +7843 -0
  181. package/dist/lib/index.js.map +1 -0
  182. package/dist/lib/index.mjs +76 -0
  183. package/dist/lib/index.mjs.map +1 -0
  184. package/dist/lib/integrations/index.d.ts +34 -0
  185. package/dist/lib/integrations/index.js +3052 -0
  186. package/dist/lib/integrations/index.js.map +1 -0
  187. package/dist/lib/integrations/index.mjs +37 -0
  188. package/dist/lib/integrations/index.mjs.map +1 -0
  189. package/dist/lib/integrations/nest/index.d.ts +15 -0
  190. package/dist/lib/integrations/nest/index.js +2959 -0
  191. package/dist/lib/integrations/nest/index.js.map +1 -0
  192. package/dist/lib/integrations/nest/index.mjs +14 -0
  193. package/dist/lib/integrations/nest/index.mjs.map +1 -0
  194. package/dist/lib/integrations/node-express/index.d.ts +15 -0
  195. package/dist/lib/integrations/node-express/index.js +2959 -0
  196. package/dist/lib/integrations/node-express/index.js.map +1 -0
  197. package/dist/lib/integrations/node-express/index.mjs +14 -0
  198. package/dist/lib/integrations/node-express/index.mjs.map +1 -0
  199. package/dist/lib/integrations/node-http/index.d.ts +15 -0
  200. package/dist/lib/integrations/node-http/index.js +2945 -0
  201. package/dist/lib/integrations/node-http/index.js.map +1 -0
  202. package/dist/lib/integrations/node-http/index.mjs +13 -0
  203. package/dist/lib/integrations/node-http/index.mjs.map +1 -0
  204. package/dist/service-adapters/index.d.ts +162 -0
  205. package/dist/service-adapters/index.js +1787 -0
  206. package/dist/service-adapters/index.js.map +1 -0
  207. package/dist/service-adapters/index.mjs +34 -0
  208. package/dist/service-adapters/index.mjs.map +1 -0
  209. package/dist/service-adapters/shared/index.d.ts +9 -0
  210. package/dist/service-adapters/shared/index.js +72 -0
  211. package/dist/service-adapters/shared/index.js.map +1 -0
  212. package/dist/service-adapters/shared/index.mjs +8 -0
  213. package/dist/service-adapters/shared/index.mjs.map +1 -0
  214. package/dist/shared-0a7346ce.d.ts +466 -0
  215. package/dist/shared-35c6eb04.d.ts +448 -0
  216. package/dist/shared-9ed1dc31.d.ts +414 -0
  217. package/dist/shared-da5708fe.d.ts +449 -0
  218. package/dist/utils/index.d.ts +65 -0
  219. package/dist/utils/index.js +175 -0
  220. package/dist/utils/index.js.map +1 -0
  221. package/dist/utils/index.mjs +12 -0
  222. package/dist/utils/index.mjs.map +1 -0
  223. package/package.json +14 -20
  224. package/src/lib/index.ts +7 -6
  225. package/src/lib/runtime/copilot-runtime.ts +62 -26
  226. package/src/lib/runtime/telemetry-agent-runner.ts +139 -0
@@ -0,0 +1,243 @@
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
+ name?: string;
223
+ }
224
+
225
+ interface RemoteChainParameters {
226
+ name: string;
227
+ description: string;
228
+ chainUrl: string;
229
+ parameters?: Parameter[];
230
+ parameterType?: "single" | "multi";
231
+ }
232
+ declare class RemoteChain {
233
+ name: string;
234
+ description: string;
235
+ chainUrl: string;
236
+ parameters?: Parameter[];
237
+ parameterType: "single" | "multi";
238
+ constructor(options: RemoteChainParameters);
239
+ toAction(): Promise<Action<any>>;
240
+ inferLangServeParameters(): Promise<void>;
241
+ }
242
+
243
+ 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,212 @@
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-c8aec5c5.js';
2
+ export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, t as generateMcpToolInstructions, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from '../shared-0a7346ce.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 * 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-0c6100e3.js';
14
+ import '../index-96b330da.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 './cloud/index.js';
25
+
26
+ interface CopilotKitStateEnrichment {
27
+ copilotkit: {
28
+ actions: StateEnrichment["ag-ui"]["tools"];
29
+ context: StateEnrichment["ag-ui"]["context"];
30
+ };
31
+ }
32
+ interface PredictStateTool {
33
+ tool: string;
34
+ state_key: string;
35
+ tool_argument: string;
36
+ }
37
+ type TextMessageEvents = TextMessageStartEvent | TextMessageContentEvent | TextMessageEndEvent;
38
+ type ToolCallEvents = ToolCallStartEvent | ToolCallArgsEvent | ToolCallEndEvent;
39
+ declare enum CustomEventNames {
40
+ CopilotKitManuallyEmitMessage = "copilotkit_manually_emit_message",
41
+ CopilotKitManuallyEmitToolCall = "copilotkit_manually_emit_tool_call",
42
+ CopilotKitManuallyEmitIntermediateState = "copilotkit_manually_emit_intermediate_state",
43
+ CopilotKitExit = "copilotkit_exit"
44
+ }
45
+ declare class LangGraphAgent extends LangGraphAgent$1 {
46
+ constructor(config: LangGraphAgentConfig);
47
+ dispatchEvent(event: ProcessedEvents): boolean;
48
+ run(input: RunAgentInput): rxjs.Observable<{
49
+ type: EventType.TEXT_MESSAGE_START;
50
+ role: "developer" | "system" | "assistant" | "user";
51
+ messageId: string;
52
+ timestamp?: number | undefined;
53
+ rawEvent?: any;
54
+ } | {
55
+ type: EventType.TEXT_MESSAGE_CONTENT;
56
+ messageId: string;
57
+ delta: string;
58
+ timestamp?: number | undefined;
59
+ rawEvent?: any;
60
+ } | {
61
+ type: EventType.TEXT_MESSAGE_END;
62
+ messageId: string;
63
+ timestamp?: number | undefined;
64
+ rawEvent?: any;
65
+ } | {
66
+ type: EventType.TOOL_CALL_START;
67
+ toolCallId: string;
68
+ toolCallName: string;
69
+ timestamp?: number | undefined;
70
+ rawEvent?: any;
71
+ parentMessageId?: string | undefined;
72
+ } | {
73
+ type: EventType.TOOL_CALL_ARGS;
74
+ toolCallId: string;
75
+ delta: string;
76
+ timestamp?: number | undefined;
77
+ rawEvent?: any;
78
+ } | {
79
+ type: EventType.TOOL_CALL_END;
80
+ toolCallId: string;
81
+ timestamp?: number | undefined;
82
+ rawEvent?: any;
83
+ } | {
84
+ type: EventType.THINKING_TEXT_MESSAGE_START;
85
+ timestamp?: number | undefined;
86
+ rawEvent?: any;
87
+ } | {
88
+ type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
89
+ delta: string;
90
+ timestamp?: number | undefined;
91
+ rawEvent?: any;
92
+ } | {
93
+ type: EventType.THINKING_TEXT_MESSAGE_END;
94
+ timestamp?: number | undefined;
95
+ rawEvent?: any;
96
+ } | {
97
+ type: EventType.TOOL_CALL_RESULT;
98
+ content: string;
99
+ toolCallId: string;
100
+ messageId: string;
101
+ role?: "tool" | undefined;
102
+ timestamp?: number | undefined;
103
+ rawEvent?: any;
104
+ } | {
105
+ type: EventType.THINKING_START;
106
+ timestamp?: number | undefined;
107
+ rawEvent?: any;
108
+ title?: string | undefined;
109
+ } | {
110
+ type: EventType.THINKING_END;
111
+ timestamp?: number | undefined;
112
+ rawEvent?: any;
113
+ } | {
114
+ type: EventType.STATE_SNAPSHOT;
115
+ timestamp?: number | undefined;
116
+ rawEvent?: any;
117
+ snapshot?: any;
118
+ } | {
119
+ type: EventType.STATE_DELTA;
120
+ delta: any[];
121
+ timestamp?: number | undefined;
122
+ rawEvent?: any;
123
+ } | {
124
+ type: EventType.MESSAGES_SNAPSHOT;
125
+ messages: ({
126
+ id: string;
127
+ role: "developer";
128
+ content: string;
129
+ name?: string | undefined;
130
+ } | {
131
+ id: string;
132
+ role: "system";
133
+ content: string;
134
+ name?: string | undefined;
135
+ } | {
136
+ id: string;
137
+ role: "assistant";
138
+ name?: string | undefined;
139
+ content?: string | undefined;
140
+ toolCalls?: {
141
+ function: {
142
+ name: string;
143
+ arguments: string;
144
+ };
145
+ type: "function";
146
+ id: string;
147
+ }[] | undefined;
148
+ } | {
149
+ id: string;
150
+ role: "user";
151
+ content: string;
152
+ name?: string | undefined;
153
+ } | {
154
+ id: string;
155
+ role: "tool";
156
+ content: string;
157
+ toolCallId: string;
158
+ error?: string | undefined;
159
+ })[];
160
+ timestamp?: number | undefined;
161
+ rawEvent?: any;
162
+ } | {
163
+ type: EventType.RAW;
164
+ timestamp?: number | undefined;
165
+ rawEvent?: any;
166
+ event?: any;
167
+ source?: string | undefined;
168
+ } | {
169
+ name: string;
170
+ type: EventType.CUSTOM;
171
+ value?: any;
172
+ timestamp?: number | undefined;
173
+ rawEvent?: any;
174
+ } | {
175
+ type: EventType.RUN_STARTED;
176
+ threadId: string;
177
+ runId: string;
178
+ timestamp?: number | undefined;
179
+ rawEvent?: any;
180
+ } | {
181
+ type: EventType.RUN_FINISHED;
182
+ threadId: string;
183
+ runId: string;
184
+ timestamp?: number | undefined;
185
+ rawEvent?: any;
186
+ result?: any;
187
+ } | {
188
+ message: string;
189
+ type: EventType.RUN_ERROR;
190
+ code?: string | undefined;
191
+ timestamp?: number | undefined;
192
+ rawEvent?: any;
193
+ } | {
194
+ type: EventType.STEP_STARTED;
195
+ stepName: string;
196
+ timestamp?: number | undefined;
197
+ rawEvent?: any;
198
+ } | {
199
+ type: EventType.STEP_FINISHED;
200
+ stepName: string;
201
+ timestamp?: number | undefined;
202
+ rawEvent?: any;
203
+ } | {
204
+ type: EventType;
205
+ name: string;
206
+ value: any;
207
+ }>;
208
+ langGraphDefaultMergeState(state: State, messages: Message[], input: RunAgentInput): State<StateEnrichment & CopilotKitStateEnrichment>;
209
+ getSchemaKeys(): Promise<SchemaKeys>;
210
+ }
211
+
212
+ export { CustomEventNames, LangGraphAgent, PredictStateTool, TextMessageEvents, ToolCallEvents };