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

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