@copilotkit/runtime 1.50.1-next.0 → 1.50.1-next.2

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 (222) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +2 -2
  7. package/dist/chunk-27JKTS6P.mjs +0 -1704
  8. package/dist/chunk-27JKTS6P.mjs.map +0 -1
  9. package/dist/chunk-2GPTVDTO.mjs +0 -25
  10. package/dist/chunk-2GPTVDTO.mjs.map +0 -1
  11. package/dist/chunk-2OZAGFV3.mjs +0 -43
  12. package/dist/chunk-2OZAGFV3.mjs.map +0 -1
  13. package/dist/chunk-3AJVKDZX.mjs +0 -3097
  14. package/dist/chunk-3AJVKDZX.mjs.map +0 -1
  15. package/dist/chunk-45RCC3ZS.mjs +0 -25
  16. package/dist/chunk-45RCC3ZS.mjs.map +0 -1
  17. package/dist/chunk-4EHJ4XFJ.mjs +0 -25
  18. package/dist/chunk-4EHJ4XFJ.mjs.map +0 -1
  19. package/dist/chunk-4IANB4TC.mjs +0 -25
  20. package/dist/chunk-4IANB4TC.mjs.map +0 -1
  21. package/dist/chunk-4KES76K3.mjs +0 -74
  22. package/dist/chunk-4KES76K3.mjs.map +0 -1
  23. package/dist/chunk-4OGE3SLW.mjs +0 -3100
  24. package/dist/chunk-4OGE3SLW.mjs.map +0 -1
  25. package/dist/chunk-54YJBMCP.mjs +0 -3097
  26. package/dist/chunk-54YJBMCP.mjs.map +0 -1
  27. package/dist/chunk-62NE5S6M.mjs +0 -226
  28. package/dist/chunk-62NE5S6M.mjs.map +0 -1
  29. package/dist/chunk-6ER4SZYH.mjs +0 -74
  30. package/dist/chunk-6ER4SZYH.mjs.map +0 -1
  31. package/dist/chunk-6TNSLHVR.mjs +0 -74
  32. package/dist/chunk-6TNSLHVR.mjs.map +0 -1
  33. package/dist/chunk-6XRUR5UK.mjs +0 -1
  34. package/dist/chunk-6XRUR5UK.mjs.map +0 -1
  35. package/dist/chunk-7V4BK7TZ.mjs +0 -25
  36. package/dist/chunk-7V4BK7TZ.mjs.map +0 -1
  37. package/dist/chunk-7YZIEXD2.mjs +0 -74
  38. package/dist/chunk-7YZIEXD2.mjs.map +0 -1
  39. package/dist/chunk-A4XHOAFU.mjs +0 -25
  40. package/dist/chunk-A4XHOAFU.mjs.map +0 -1
  41. package/dist/chunk-A555KEAD.mjs +0 -6020
  42. package/dist/chunk-A555KEAD.mjs.map +0 -1
  43. package/dist/chunk-AF73TFTX.mjs +0 -74
  44. package/dist/chunk-AF73TFTX.mjs.map +0 -1
  45. package/dist/chunk-AMUJQ6IR.mjs +0 -50
  46. package/dist/chunk-AMUJQ6IR.mjs.map +0 -1
  47. package/dist/chunk-AQG2SVCA.mjs +0 -25
  48. package/dist/chunk-AQG2SVCA.mjs.map +0 -1
  49. package/dist/chunk-BJZHMXND.mjs +0 -74
  50. package/dist/chunk-BJZHMXND.mjs.map +0 -1
  51. package/dist/chunk-CB2OJXF6.mjs +0 -25
  52. package/dist/chunk-CB2OJXF6.mjs.map +0 -1
  53. package/dist/chunk-CEOMFPJU.mjs +0 -6020
  54. package/dist/chunk-CEOMFPJU.mjs.map +0 -1
  55. package/dist/chunk-CZVLR7CC.mjs +0 -175
  56. package/dist/chunk-CZVLR7CC.mjs.map +0 -1
  57. package/dist/chunk-DCEEHMLJ.mjs +0 -1127
  58. package/dist/chunk-DCEEHMLJ.mjs.map +0 -1
  59. package/dist/chunk-DE3CLKUG.mjs +0 -25
  60. package/dist/chunk-DE3CLKUG.mjs.map +0 -1
  61. package/dist/chunk-DTPRUTNV.mjs +0 -25
  62. package/dist/chunk-DTPRUTNV.mjs.map +0 -1
  63. package/dist/chunk-ERUOA47O.mjs +0 -626
  64. package/dist/chunk-ERUOA47O.mjs.map +0 -1
  65. package/dist/chunk-ESSRC64W.mjs +0 -74
  66. package/dist/chunk-ESSRC64W.mjs.map +0 -1
  67. package/dist/chunk-FHD4JECV.mjs +0 -33
  68. package/dist/chunk-FHD4JECV.mjs.map +0 -1
  69. package/dist/chunk-GRAN6K6N.mjs +0 -25
  70. package/dist/chunk-GRAN6K6N.mjs.map +0 -1
  71. package/dist/chunk-I27F2UPA.mjs +0 -175
  72. package/dist/chunk-I27F2UPA.mjs.map +0 -1
  73. package/dist/chunk-IAZKTOQW.mjs +0 -25
  74. package/dist/chunk-IAZKTOQW.mjs.map +0 -1
  75. package/dist/chunk-J6XZ5MFB.mjs +0 -25
  76. package/dist/chunk-J6XZ5MFB.mjs.map +0 -1
  77. package/dist/chunk-JJ32MA4C.mjs +0 -73
  78. package/dist/chunk-JJ32MA4C.mjs.map +0 -1
  79. package/dist/chunk-JJY4ZTHQ.mjs +0 -25
  80. package/dist/chunk-JJY4ZTHQ.mjs.map +0 -1
  81. package/dist/chunk-KEYLBFU2.mjs +0 -3117
  82. package/dist/chunk-KEYLBFU2.mjs.map +0 -1
  83. package/dist/chunk-KQ53L4WZ.mjs +0 -3094
  84. package/dist/chunk-KQ53L4WZ.mjs.map +0 -1
  85. package/dist/chunk-KTELVQ67.mjs +0 -3098
  86. package/dist/chunk-KTELVQ67.mjs.map +0 -1
  87. package/dist/chunk-LPEPX6NH.mjs +0 -25
  88. package/dist/chunk-LPEPX6NH.mjs.map +0 -1
  89. package/dist/chunk-MDXE55DK.mjs +0 -3117
  90. package/dist/chunk-MDXE55DK.mjs.map +0 -1
  91. package/dist/chunk-MMFUVOXH.mjs +0 -73
  92. package/dist/chunk-MMFUVOXH.mjs.map +0 -1
  93. package/dist/chunk-N3Y4U66N.mjs +0 -253
  94. package/dist/chunk-N3Y4U66N.mjs.map +0 -1
  95. package/dist/chunk-O7UYB4MH.mjs +0 -25
  96. package/dist/chunk-O7UYB4MH.mjs.map +0 -1
  97. package/dist/chunk-OFNVQHNM.mjs +0 -3089
  98. package/dist/chunk-OFNVQHNM.mjs.map +0 -1
  99. package/dist/chunk-OFSV5GET.mjs +0 -3074
  100. package/dist/chunk-OFSV5GET.mjs.map +0 -1
  101. package/dist/chunk-OMRST67R.mjs +0 -25
  102. package/dist/chunk-OMRST67R.mjs.map +0 -1
  103. package/dist/chunk-OWIGJONH.mjs +0 -275
  104. package/dist/chunk-OWIGJONH.mjs.map +0 -1
  105. package/dist/chunk-PRZHE74A.mjs +0 -25
  106. package/dist/chunk-PRZHE74A.mjs.map +0 -1
  107. package/dist/chunk-PTYRVXXP.mjs +0 -80
  108. package/dist/chunk-PTYRVXXP.mjs.map +0 -1
  109. package/dist/chunk-R22B5CCO.mjs +0 -25
  110. package/dist/chunk-R22B5CCO.mjs.map +0 -1
  111. package/dist/chunk-SHBDMA63.mjs +0 -141
  112. package/dist/chunk-SHBDMA63.mjs.map +0 -1
  113. package/dist/chunk-SPVXBPRA.mjs +0 -74
  114. package/dist/chunk-SPVXBPRA.mjs.map +0 -1
  115. package/dist/chunk-T72G46ME.mjs +0 -25
  116. package/dist/chunk-T72G46ME.mjs.map +0 -1
  117. package/dist/chunk-TGELROPU.mjs +0 -25
  118. package/dist/chunk-TGELROPU.mjs.map +0 -1
  119. package/dist/chunk-UNX4IAAD.mjs +0 -25
  120. package/dist/chunk-UNX4IAAD.mjs.map +0 -1
  121. package/dist/chunk-V4DHVC7M.mjs +0 -3085
  122. package/dist/chunk-V4DHVC7M.mjs.map +0 -1
  123. package/dist/chunk-VVRFOB66.mjs +0 -25
  124. package/dist/chunk-VVRFOB66.mjs.map +0 -1
  125. package/dist/chunk-W6NVBYM6.mjs +0 -80
  126. package/dist/chunk-W6NVBYM6.mjs.map +0 -1
  127. package/dist/chunk-W7MBACGC.mjs +0 -74
  128. package/dist/chunk-W7MBACGC.mjs.map +0 -1
  129. package/dist/chunk-WMD4XZZS.mjs +0 -25
  130. package/dist/chunk-WMD4XZZS.mjs.map +0 -1
  131. package/dist/chunk-WX2ZNCRT.mjs +0 -74
  132. package/dist/chunk-WX2ZNCRT.mjs.map +0 -1
  133. package/dist/chunk-XWBDEXDA.mjs +0 -153
  134. package/dist/chunk-XWBDEXDA.mjs.map +0 -1
  135. package/dist/chunk-Y2Z62E2T.mjs +0 -74
  136. package/dist/chunk-Y2Z62E2T.mjs.map +0 -1
  137. package/dist/chunk-YO4I6RVI.mjs +0 -25
  138. package/dist/chunk-YO4I6RVI.mjs.map +0 -1
  139. package/dist/chunk-Z6Q5IW6I.mjs +0 -3098
  140. package/dist/chunk-Z6Q5IW6I.mjs.map +0 -1
  141. package/dist/chunk-Z726O3G2.mjs +0 -25
  142. package/dist/chunk-Z726O3G2.mjs.map +0 -1
  143. package/dist/chunk-ZE4SMZZR.mjs +0 -3097
  144. package/dist/chunk-ZE4SMZZR.mjs.map +0 -1
  145. package/dist/chunk-ZULZB33C.mjs +0 -73
  146. package/dist/chunk-ZULZB33C.mjs.map +0 -1
  147. package/dist/chunk-ZVRGXMY7.mjs +0 -25
  148. package/dist/chunk-ZVRGXMY7.mjs.map +0 -1
  149. package/dist/chunk-ZZ35WBYQ.mjs +0 -25
  150. package/dist/chunk-ZZ35WBYQ.mjs.map +0 -1
  151. package/dist/graphql/message-conversion/index.d.ts +0 -18
  152. package/dist/graphql/message-conversion/index.js +0 -725
  153. package/dist/graphql/message-conversion/index.js.map +0 -1
  154. package/dist/graphql/message-conversion/index.mjs +0 -245
  155. package/dist/graphql/message-conversion/index.mjs.map +0 -1
  156. package/dist/graphql/types/base/index.d.ts +0 -6
  157. package/dist/graphql/types/base/index.js +0 -63
  158. package/dist/graphql/types/base/index.js.map +0 -1
  159. package/dist/graphql/types/base/index.mjs +0 -8
  160. package/dist/graphql/types/base/index.mjs.map +0 -1
  161. package/dist/graphql/types/converted/index.d.ts +0 -2
  162. package/dist/graphql/types/converted/index.js +0 -200
  163. package/dist/graphql/types/converted/index.js.map +0 -1
  164. package/dist/graphql/types/converted/index.mjs +0 -19
  165. package/dist/graphql/types/converted/index.mjs.map +0 -1
  166. package/dist/groq-adapter-540da9c3.d.ts +0 -331
  167. package/dist/groq-adapter-a6f5e9d2.d.ts +0 -331
  168. package/dist/groq-adapter-c8aec5c5.d.ts +0 -321
  169. package/dist/index-96b330da.d.ts +0 -119
  170. package/dist/index-adbd78f1.d.ts +0 -154
  171. package/dist/langserve-0c6100e3.d.ts +0 -257
  172. package/dist/langserve-978d5790.d.ts +0 -243
  173. package/dist/langserve-9fc76ce5.d.ts +0 -243
  174. package/dist/lib/cloud/index.d.ts +0 -6
  175. package/dist/lib/cloud/index.js +0 -18
  176. package/dist/lib/cloud/index.js.map +0 -1
  177. package/dist/lib/cloud/index.mjs +0 -1
  178. package/dist/lib/cloud/index.mjs.map +0 -1
  179. package/dist/lib/index.d.ts +0 -212
  180. package/dist/lib/index.js +0 -7843
  181. package/dist/lib/index.js.map +0 -1
  182. package/dist/lib/index.mjs +0 -76
  183. package/dist/lib/index.mjs.map +0 -1
  184. package/dist/lib/integrations/index.d.ts +0 -34
  185. package/dist/lib/integrations/index.js +0 -3052
  186. package/dist/lib/integrations/index.js.map +0 -1
  187. package/dist/lib/integrations/index.mjs +0 -37
  188. package/dist/lib/integrations/index.mjs.map +0 -1
  189. package/dist/lib/integrations/nest/index.d.ts +0 -15
  190. package/dist/lib/integrations/nest/index.js +0 -2959
  191. package/dist/lib/integrations/nest/index.js.map +0 -1
  192. package/dist/lib/integrations/nest/index.mjs +0 -14
  193. package/dist/lib/integrations/nest/index.mjs.map +0 -1
  194. package/dist/lib/integrations/node-express/index.d.ts +0 -15
  195. package/dist/lib/integrations/node-express/index.js +0 -2959
  196. package/dist/lib/integrations/node-express/index.js.map +0 -1
  197. package/dist/lib/integrations/node-express/index.mjs +0 -14
  198. package/dist/lib/integrations/node-express/index.mjs.map +0 -1
  199. package/dist/lib/integrations/node-http/index.d.ts +0 -15
  200. package/dist/lib/integrations/node-http/index.js +0 -2945
  201. package/dist/lib/integrations/node-http/index.js.map +0 -1
  202. package/dist/lib/integrations/node-http/index.mjs +0 -13
  203. package/dist/lib/integrations/node-http/index.mjs.map +0 -1
  204. package/dist/service-adapters/index.d.ts +0 -162
  205. package/dist/service-adapters/index.js +0 -1787
  206. package/dist/service-adapters/index.js.map +0 -1
  207. package/dist/service-adapters/index.mjs +0 -34
  208. package/dist/service-adapters/index.mjs.map +0 -1
  209. package/dist/service-adapters/shared/index.d.ts +0 -9
  210. package/dist/service-adapters/shared/index.js +0 -72
  211. package/dist/service-adapters/shared/index.js.map +0 -1
  212. package/dist/service-adapters/shared/index.mjs +0 -8
  213. package/dist/service-adapters/shared/index.mjs.map +0 -1
  214. package/dist/shared-0a7346ce.d.ts +0 -466
  215. package/dist/shared-35c6eb04.d.ts +0 -448
  216. package/dist/shared-9ed1dc31.d.ts +0 -414
  217. package/dist/shared-da5708fe.d.ts +0 -449
  218. package/dist/utils/index.d.ts +0 -65
  219. package/dist/utils/index.js +0 -175
  220. package/dist/utils/index.js.map +0 -1
  221. package/dist/utils/index.mjs +0 -12
  222. package/dist/utils/index.mjs.map +0 -1
@@ -1,243 +0,0 @@
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 { CopilotRuntimeChatCompletionRequest as C, RemoteChainParameters as R, CopilotRuntimeChatCompletionResponse as a, CopilotServiceAdapter as b, RemoteChain as c };
@@ -1,243 +0,0 @@
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 };
@@ -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":[]}