@copilotkit/shared 0.0.0-main-20250908181442 → 0.0.0-main-20260220223427

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 (265) hide show
  1. package/CHANGELOG.md +277 -22
  2. package/LICENSE +21 -0
  3. package/README.md +18 -12
  4. package/dist/_virtual/_rolldown/runtime.cjs +29 -0
  5. package/dist/constants/index.cjs +13 -0
  6. package/dist/constants/index.cjs.map +1 -0
  7. package/dist/constants/{index.d.ts → index.d.cts} +3 -1
  8. package/dist/constants/index.d.cts.map +1 -0
  9. package/dist/constants/index.d.mts +8 -0
  10. package/dist/constants/index.d.mts.map +1 -0
  11. package/dist/constants/index.mjs +8 -12
  12. package/dist/constants/index.mjs.map +1 -1
  13. package/dist/index.cjs +64 -0
  14. package/dist/index.cjs.map +1 -0
  15. package/dist/index.d.cts +22 -0
  16. package/dist/index.d.cts.map +1 -0
  17. package/dist/index.d.mts +23 -0
  18. package/dist/index.d.mts.map +1 -0
  19. package/dist/index.mjs +16 -114
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/index.umd.js +1017 -0
  22. package/dist/index.umd.js.map +1 -0
  23. package/dist/package.cjs +12 -0
  24. package/dist/package.cjs.map +1 -0
  25. package/dist/package.mjs +6 -0
  26. package/dist/package.mjs.map +1 -0
  27. package/dist/telemetry/events.d.cts +47 -0
  28. package/dist/telemetry/events.d.cts.map +1 -0
  29. package/dist/telemetry/events.d.mts +47 -0
  30. package/dist/telemetry/events.d.mts.map +1 -0
  31. package/dist/telemetry/index.d.mts +1 -0
  32. package/dist/telemetry/scarf-client.cjs +29 -0
  33. package/dist/telemetry/scarf-client.cjs.map +1 -0
  34. package/dist/telemetry/scarf-client.mjs +27 -5
  35. package/dist/telemetry/scarf-client.mjs.map +1 -1
  36. package/dist/telemetry/telemetry-client.cjs +87 -0
  37. package/dist/telemetry/telemetry-client.cjs.map +1 -0
  38. package/dist/telemetry/telemetry-client.d.cts +48 -0
  39. package/dist/telemetry/telemetry-client.d.cts.map +1 -0
  40. package/dist/telemetry/telemetry-client.d.mts +48 -0
  41. package/dist/telemetry/telemetry-client.d.mts.map +1 -0
  42. package/dist/telemetry/telemetry-client.mjs +83 -7
  43. package/dist/telemetry/telemetry-client.mjs.map +1 -1
  44. package/dist/telemetry/utils.cjs +16 -0
  45. package/dist/telemetry/utils.cjs.map +1 -0
  46. package/dist/telemetry/utils.mjs +14 -8
  47. package/dist/telemetry/utils.mjs.map +1 -1
  48. package/dist/types/{action.d.ts → action.d.cts} +32 -31
  49. package/dist/types/action.d.cts.map +1 -0
  50. package/dist/types/action.d.mts +59 -0
  51. package/dist/types/action.d.mts.map +1 -0
  52. package/dist/types/copilot-cloud-config.d.cts +15 -0
  53. package/dist/types/copilot-cloud-config.d.cts.map +1 -0
  54. package/dist/types/copilot-cloud-config.d.mts +15 -0
  55. package/dist/types/copilot-cloud-config.d.mts.map +1 -0
  56. package/dist/types/error.d.cts +57 -0
  57. package/dist/types/error.d.cts.map +1 -0
  58. package/dist/types/error.d.mts +57 -0
  59. package/dist/types/error.d.mts.map +1 -0
  60. package/dist/types/message.d.cts +31 -0
  61. package/dist/types/message.d.cts.map +1 -0
  62. package/dist/types/message.d.mts +31 -0
  63. package/dist/types/message.d.mts.map +1 -0
  64. package/dist/types/openai-assistant.d.cts +55 -0
  65. package/dist/types/openai-assistant.d.cts.map +1 -0
  66. package/dist/types/openai-assistant.d.mts +55 -0
  67. package/dist/types/openai-assistant.d.mts.map +1 -0
  68. package/dist/types/utility.d.cts +6 -0
  69. package/dist/types/utility.d.cts.map +1 -0
  70. package/dist/types/utility.d.mts +6 -0
  71. package/dist/types/utility.d.mts.map +1 -0
  72. package/dist/utils/conditions.cjs +32 -0
  73. package/dist/utils/conditions.cjs.map +1 -0
  74. package/dist/utils/{conditions.d.ts → conditions.d.cts} +16 -11
  75. package/dist/utils/conditions.d.cts.map +1 -0
  76. package/dist/utils/conditions.d.mts +31 -0
  77. package/dist/utils/conditions.d.mts.map +1 -0
  78. package/dist/utils/conditions.mjs +30 -6
  79. package/dist/utils/conditions.mjs.map +1 -1
  80. package/dist/utils/console-styling.cjs +91 -0
  81. package/dist/utils/console-styling.cjs.map +1 -0
  82. package/dist/utils/console-styling.d.cts +65 -0
  83. package/dist/utils/console-styling.d.cts.map +1 -0
  84. package/dist/utils/console-styling.d.mts +65 -0
  85. package/dist/utils/console-styling.d.mts.map +1 -0
  86. package/dist/utils/console-styling.mjs +83 -15
  87. package/dist/utils/console-styling.mjs.map +1 -1
  88. package/dist/utils/errors.cjs +439 -0
  89. package/dist/utils/errors.cjs.map +1 -0
  90. package/dist/utils/{errors.d.ts → errors.d.cts} +188 -156
  91. package/dist/utils/errors.d.cts.map +1 -0
  92. package/dist/utils/errors.d.mts +312 -0
  93. package/dist/utils/errors.d.mts.map +1 -0
  94. package/dist/utils/errors.mjs +416 -61
  95. package/dist/utils/errors.mjs.map +1 -1
  96. package/dist/utils/index.cjs +50 -0
  97. package/dist/utils/index.cjs.map +1 -0
  98. package/dist/utils/{index.d.ts → index.d.cts} +10 -9
  99. package/dist/utils/index.d.cts.map +1 -0
  100. package/dist/utils/index.d.mts +31 -0
  101. package/dist/utils/index.d.mts.map +1 -0
  102. package/dist/utils/index.mjs +47 -100
  103. package/dist/utils/index.mjs.map +1 -1
  104. package/dist/utils/json-schema.cjs +157 -0
  105. package/dist/utils/json-schema.cjs.map +1 -0
  106. package/dist/utils/json-schema.d.cts +36 -0
  107. package/dist/utils/json-schema.d.cts.map +1 -0
  108. package/dist/utils/json-schema.d.mts +36 -0
  109. package/dist/utils/json-schema.d.mts.map +1 -0
  110. package/dist/utils/json-schema.mjs +152 -10
  111. package/dist/utils/json-schema.mjs.map +1 -1
  112. package/dist/utils/random-id.cjs +38 -0
  113. package/dist/utils/random-id.cjs.map +1 -0
  114. package/dist/utils/{random-id.d.ts → random-id.d.cts} +4 -2
  115. package/dist/utils/random-id.d.cts.map +1 -0
  116. package/dist/utils/random-id.d.mts +8 -0
  117. package/dist/utils/random-id.d.mts.map +1 -0
  118. package/dist/utils/random-id.mjs +33 -12
  119. package/dist/utils/random-id.mjs.map +1 -1
  120. package/dist/utils/requests.cjs +58 -0
  121. package/dist/utils/requests.cjs.map +1 -0
  122. package/dist/utils/requests.d.cts +12 -0
  123. package/dist/utils/requests.d.cts.map +1 -0
  124. package/dist/utils/requests.d.mts +12 -0
  125. package/dist/utils/requests.d.mts.map +1 -0
  126. package/dist/utils/requests.mjs +57 -0
  127. package/dist/utils/requests.mjs.map +1 -0
  128. package/dist/utils/types.d.cts +22 -0
  129. package/dist/utils/types.d.cts.map +1 -0
  130. package/dist/utils/types.d.mts +22 -0
  131. package/dist/utils/types.d.mts.map +1 -0
  132. package/package.json +25 -20
  133. package/src/constants/index.ts +2 -1
  134. package/src/telemetry/events.ts +4 -1
  135. package/src/telemetry/telemetry-client.ts +30 -9
  136. package/src/telemetry/utils.ts +6 -2
  137. package/src/types/action.ts +10 -5
  138. package/src/types/error.ts +11 -2
  139. package/src/types/message.ts +12 -1
  140. package/src/types/openai-assistant.ts +6 -2
  141. package/src/utils/conditions.ts +27 -9
  142. package/src/utils/console-styling.ts +4 -2
  143. package/src/utils/errors.ts +49 -16
  144. package/src/utils/index.ts +2 -0
  145. package/src/utils/json-schema.test.ts +29 -5
  146. package/src/utils/json-schema.ts +39 -8
  147. package/src/utils/random-id.ts +28 -3
  148. package/src/utils/requests.ts +79 -0
  149. package/src/utils/types.ts +26 -0
  150. package/tsconfig.json +1 -1
  151. package/tsdown.config.ts +36 -0
  152. package/vitest.config.mjs +11 -0
  153. package/dist/chunk-2KQ6HEWZ.mjs +0 -194
  154. package/dist/chunk-2KQ6HEWZ.mjs.map +0 -1
  155. package/dist/chunk-2OJ5OJ2D.mjs +0 -1
  156. package/dist/chunk-2OJ5OJ2D.mjs.map +0 -1
  157. package/dist/chunk-4VYF77PM.mjs +0 -426
  158. package/dist/chunk-4VYF77PM.mjs.map +0 -1
  159. package/dist/chunk-6QGXWNS5.mjs +0 -34
  160. package/dist/chunk-6QGXWNS5.mjs.map +0 -1
  161. package/dist/chunk-6W2UEO2M.mjs +0 -94
  162. package/dist/chunk-6W2UEO2M.mjs.map +0 -1
  163. package/dist/chunk-EDB7MSUL.mjs +0 -38
  164. package/dist/chunk-EDB7MSUL.mjs.map +0 -1
  165. package/dist/chunk-FCCOSO5L.mjs +0 -1
  166. package/dist/chunk-FCCOSO5L.mjs.map +0 -1
  167. package/dist/chunk-FDWH72Z2.mjs +0 -103
  168. package/dist/chunk-FDWH72Z2.mjs.map +0 -1
  169. package/dist/chunk-GYZIHHE6.mjs +0 -13
  170. package/dist/chunk-GYZIHHE6.mjs.map +0 -1
  171. package/dist/chunk-IAFBVORQ.mjs +0 -1
  172. package/dist/chunk-IAFBVORQ.mjs.map +0 -1
  173. package/dist/chunk-MSUB6DGR.mjs +0 -1
  174. package/dist/chunk-MSUB6DGR.mjs.map +0 -1
  175. package/dist/chunk-N5EP5OD5.mjs +0 -1
  176. package/dist/chunk-N5EP5OD5.mjs.map +0 -1
  177. package/dist/chunk-NAFEBKSO.mjs +0 -1
  178. package/dist/chunk-NAFEBKSO.mjs.map +0 -1
  179. package/dist/chunk-P7STFMPO.mjs +0 -1
  180. package/dist/chunk-P7STFMPO.mjs.map +0 -1
  181. package/dist/chunk-PL5WNHFZ.mjs +0 -50
  182. package/dist/chunk-PL5WNHFZ.mjs.map +0 -1
  183. package/dist/chunk-UYARLQNA.mjs +0 -1
  184. package/dist/chunk-UYARLQNA.mjs.map +0 -1
  185. package/dist/chunk-VNNKZIFB.mjs +0 -24
  186. package/dist/chunk-VNNKZIFB.mjs.map +0 -1
  187. package/dist/constants/index.js +0 -40
  188. package/dist/constants/index.js.map +0 -1
  189. package/dist/index.d.ts +0 -23
  190. package/dist/index.js +0 -1003
  191. package/dist/index.js.map +0 -1
  192. package/dist/telemetry/events.d.ts +0 -45
  193. package/dist/telemetry/events.js +0 -19
  194. package/dist/telemetry/events.js.map +0 -1
  195. package/dist/telemetry/events.mjs +0 -1
  196. package/dist/telemetry/events.mjs.map +0 -1
  197. package/dist/telemetry/index.d.ts +0 -3
  198. package/dist/telemetry/index.js +0 -183
  199. package/dist/telemetry/index.js.map +0 -1
  200. package/dist/telemetry/index.mjs +0 -10
  201. package/dist/telemetry/index.mjs.map +0 -1
  202. package/dist/telemetry/scarf-client.d.ts +0 -7
  203. package/dist/telemetry/scarf-client.js +0 -59
  204. package/dist/telemetry/scarf-client.js.map +0 -1
  205. package/dist/telemetry/security-check.d.ts +0 -2
  206. package/dist/telemetry/security-check.js +0 -2
  207. package/dist/telemetry/security-check.js.map +0 -1
  208. package/dist/telemetry/security-check.mjs +0 -1
  209. package/dist/telemetry/security-check.mjs.map +0 -1
  210. package/dist/telemetry/telemetry-client.d.ts +0 -33
  211. package/dist/telemetry/telemetry-client.js +0 -181
  212. package/dist/telemetry/telemetry-client.js.map +0 -1
  213. package/dist/telemetry/utils.d.ts +0 -8
  214. package/dist/telemetry/utils.js +0 -69
  215. package/dist/telemetry/utils.js.map +0 -1
  216. package/dist/types/action.js +0 -19
  217. package/dist/types/action.js.map +0 -1
  218. package/dist/types/action.mjs +0 -2
  219. package/dist/types/action.mjs.map +0 -1
  220. package/dist/types/copilot-cloud-config.d.ts +0 -13
  221. package/dist/types/copilot-cloud-config.js +0 -19
  222. package/dist/types/copilot-cloud-config.js.map +0 -1
  223. package/dist/types/copilot-cloud-config.mjs +0 -2
  224. package/dist/types/copilot-cloud-config.mjs.map +0 -1
  225. package/dist/types/error.d.ts +0 -55
  226. package/dist/types/error.js +0 -19
  227. package/dist/types/error.js.map +0 -1
  228. package/dist/types/error.mjs +0 -2
  229. package/dist/types/error.mjs.map +0 -1
  230. package/dist/types/index.d.ts +0 -7
  231. package/dist/types/index.js +0 -19
  232. package/dist/types/index.js.map +0 -1
  233. package/dist/types/index.mjs +0 -8
  234. package/dist/types/index.mjs.map +0 -1
  235. package/dist/types/message.d.ts +0 -25
  236. package/dist/types/message.js +0 -19
  237. package/dist/types/message.js.map +0 -1
  238. package/dist/types/message.mjs +0 -2
  239. package/dist/types/message.mjs.map +0 -1
  240. package/dist/types/openai-assistant.d.ts +0 -53
  241. package/dist/types/openai-assistant.js +0 -19
  242. package/dist/types/openai-assistant.js.map +0 -1
  243. package/dist/types/openai-assistant.mjs +0 -2
  244. package/dist/types/openai-assistant.mjs.map +0 -1
  245. package/dist/types/utility.d.ts +0 -6
  246. package/dist/types/utility.js +0 -19
  247. package/dist/types/utility.js.map +0 -1
  248. package/dist/types/utility.mjs +0 -2
  249. package/dist/types/utility.mjs.map +0 -1
  250. package/dist/utils/conditions.js +0 -74
  251. package/dist/utils/conditions.js.map +0 -1
  252. package/dist/utils/console-styling.d.ts +0 -84
  253. package/dist/utils/console-styling.js +0 -123
  254. package/dist/utils/console-styling.js.map +0 -1
  255. package/dist/utils/errors.js +0 -443
  256. package/dist/utils/errors.js.map +0 -1
  257. package/dist/utils/index.js +0 -837
  258. package/dist/utils/index.js.map +0 -1
  259. package/dist/utils/json-schema.d.ts +0 -33
  260. package/dist/utils/json-schema.js +0 -220
  261. package/dist/utils/json-schema.js.map +0 -1
  262. package/dist/utils/random-id.js +0 -51
  263. package/dist/utils/random-id.js.map +0 -1
  264. package/jest.config.js +0 -5
  265. package/tsup.config.ts +0 -11
package/CHANGELOG.md CHANGED
@@ -1,6 +1,282 @@
1
1
  # @copilotkit/shared
2
2
 
3
- ## 0.0.0-main-20250908181442
3
+ ## 0.0.0-main-20260220223427
4
+
5
+ ### Patch Changes
6
+
7
+ - ef0f539: Add reasoning support and default components for reasoning messages
8
+
9
+ ## 1.51.5-next.3
10
+
11
+ ## 1.51.5-next.2
12
+
13
+ ## 1.51.5-next.1
14
+
15
+ ## 1.51.5-next.0
16
+
17
+ ### Patch Changes
18
+
19
+ - ef0f539: Add reasoning support and default components for reasoning messages
20
+
21
+ ## 1.51.4
22
+
23
+ ## 1.51.4-next.8
24
+
25
+ ## 1.51.4-next.7
26
+
27
+ ## 1.51.4-next.6
28
+
29
+ ## 1.51.4-next.5
30
+
31
+ ## 1.51.4-next.4
32
+
33
+ ## 1.51.4-next.3
34
+
35
+ ## 1.51.4-next.2
36
+
37
+ ## 1.51.4-next.1
38
+
39
+ ## 1.51.4-next.0
40
+
41
+ ## 1.51.3
42
+
43
+ ### Patch Changes
44
+
45
+ - d655e75: fix: update ag-ui dependencies
46
+ - d36fc1e: Add UMD export
47
+
48
+ ## 1.51.3-next.8
49
+
50
+ ### Patch Changes
51
+
52
+ - d36fc1e: Add UMD export
53
+
54
+ ## 1.51.3-next.7
55
+
56
+ ## 1.51.3-next.6
57
+
58
+ ## 1.51.3-next.5
59
+
60
+ ## 1.51.3-next.4
61
+
62
+ ## 1.51.3-next.3
63
+
64
+ ### Patch Changes
65
+
66
+ - d655e75: fix: update ag-ui dependencies
67
+
68
+ ## 1.51.3-next.2
69
+
70
+ ## 1.51.3-next.1
71
+
72
+ ## 1.51.3-next.0
73
+
74
+ ## 1.51.2
75
+
76
+ ## 1.51.2-next.1
77
+
78
+ ## 1.51.2-next.0
79
+
80
+ ## 1.51.1
81
+
82
+ ## 1.51.0
83
+
84
+ ### Patch Changes
85
+
86
+ - 2839a15: Update versioning strategy
87
+ - 2afd4e3: Fix CI
88
+
89
+ ## 1.51.0-next.4
90
+
91
+ ## 1.51.0-next.3
92
+
93
+ ## 1.51.0-next.2
94
+
95
+ ### Patch Changes
96
+
97
+ - 2afd4e3: Fix CI
98
+
99
+ ## 1.51.0-next.1
100
+
101
+ ## 1.50.2-next.0
102
+
103
+ ## 1.50.1
104
+
105
+ ### Patch Changes
106
+
107
+ - 80dffec: Updated the default model and API version for the Google GenAI adapter
108
+
109
+ ## 1.50.1-next.3
110
+
111
+ ## 1.50.1-next.2
112
+
113
+ ## 1.50.1-next.1
114
+
115
+ ## 1.50.1-next.0
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated the default model and API version for the Google GenAI adapter
120
+
121
+ ## 1.50.0
122
+
123
+ ### Minor Changes
124
+
125
+ - 0fc76d7: add new runner with telemetry baked in
126
+ - c942f9c: Minor fixes and stability improvements
127
+ - eed6021: Updating to the latest version of vnext
128
+ - 3b7367e: Improving general stability around LangChain
129
+ - 7ff9ca7: Minor fixes and improvements
130
+ - 974875e: Lint and format code to resolve Prettier errors
131
+ - 4942f62: - feat: create rerouting CopilotRuntime
132
+ - 3bd484f: Minor fixes and stability improvements
133
+ - 5a534bf: fix telemetry in v1.50 runtime
134
+ - 769a06c: Refactor suggestions to not always run
135
+ - 788292b: Improving langchain dependency resolution
136
+ - eab69a2: Enabling the new inspector
137
+ - 0a7bfe0: Updating dependency versions across all packages
138
+
139
+ ### Patch Changes
140
+
141
+ - b0e3652: - chore: Update to latest of vnext
142
+
143
+ ## 1.50.0-beta.19
144
+
145
+ ### Minor Changes
146
+
147
+ - Improving langchain dependency resolution
148
+
149
+ ## 1.50.0-beta.18
150
+
151
+ ### Minor Changes
152
+
153
+ - Improving general stability around LangChain
154
+
155
+ ## 1.50.0-beta.17
156
+
157
+ ### Minor Changes
158
+
159
+ - Minor fixes and improvements
160
+
161
+ ## 1.50.0-beta.16
162
+
163
+ ### Minor Changes
164
+
165
+ - Minor fixes and stability improvements
166
+
167
+ ## 1.50.0-beta.15
168
+
169
+ ### Minor Changes
170
+
171
+ - Lint and format code to resolve Prettier errors
172
+
173
+ ## 1.50.0-beta.14
174
+
175
+ ### Minor Changes
176
+
177
+ - Minor fixes and stability improvements
178
+
179
+ ## 1.50.0-beta.13
180
+
181
+ ### Minor Changes
182
+
183
+ - Updating to the latest version of vnext
184
+
185
+ ## 1.50.0-beta.12
186
+
187
+ ### Minor Changes
188
+
189
+ - eab69a2: Enabling the new inspector
190
+
191
+ ## 1.50.0-beta.11
192
+
193
+ ### Minor Changes
194
+
195
+ - fix telemetry in v1.50 runtime
196
+
197
+ ## 1.50.0-beta.10
198
+
199
+ ### Minor Changes
200
+
201
+ - add new runner with telemetry baked in
202
+
203
+ ## 1.50.0-beta.9
204
+
205
+ ### Minor Changes
206
+
207
+ - Refactor suggestions to not always run
208
+
209
+ ## 1.50.0-beta.8
210
+
211
+ ## 1.50.0-beta.7
212
+
213
+ ## 1.50.0-beta.6
214
+
215
+ ### Minor Changes
216
+
217
+ - Updating dependency versions across all packages
218
+
219
+ ## 1.50.0-beta.4
220
+
221
+ ### Minor Changes
222
+
223
+ - 4942f62: - feat: create rerouting CopilotRuntime
224
+
225
+ ### Patch Changes
226
+
227
+ - b0e3652: - chore: Update to latest of vnext
228
+
229
+ ## 1.10.7-next.0
230
+
231
+ ## 1.10.6
232
+
233
+ ### Patch Changes
234
+
235
+ - e0dd5d5: - feat: allow additional config in direct to llm actions
236
+
237
+ ## 1.10.6-next.6
238
+
239
+ ## 1.10.6-next.5
240
+
241
+ ### Patch Changes
242
+
243
+ - e0dd5d5: - feat: allow additional config in direct to llm actions
244
+
245
+ ## 1.10.6-next.4
246
+
247
+ ## 1.10.6-next.3
248
+
249
+ ## 1.10.6-next.2
250
+
251
+ ## 1.10.6-next.1
252
+
253
+ ## 1.10.6-next.0
254
+
255
+ ## 1.10.5
256
+
257
+ ## 1.10.5-next.10
258
+
259
+ ## 1.10.5-next.9
260
+
261
+ ## 1.10.5-next.8
262
+
263
+ ## 1.10.5-next.7
264
+
265
+ ## 1.10.5-next.6
266
+
267
+ ## 1.10.5-next.5
268
+
269
+ ## 1.10.5-next.4
270
+
271
+ ## 1.10.5-next.3
272
+
273
+ ## 1.10.5-next.2
274
+
275
+ ## 1.10.5-next.1
276
+
277
+ ## 1.10.5-next.0
278
+
279
+ ## 1.10.4
4
280
 
5
281
  ### Patch Changes
6
282
 
@@ -60,14 +336,12 @@
60
336
  agentic runtimes we acquired tech-debt that, with this PR, is being alleviated.
61
337
 
62
338
  As such, the following features have been updated to be completely functional with Headless UI.
63
-
64
339
  - Generative UI
65
340
  - Suggestions
66
341
  - Agentic Generative UI
67
342
  - Interrupts
68
343
 
69
344
  In addition, a variety of QOL changes have been made.
70
-
71
345
  - New AG-UI based message types
72
346
  - Inline code rendering is fixed
73
347
 
@@ -79,19 +353,15 @@
79
353
  - 6d1de58: - fix: address issues that would cause headless UI breaking changes in the next release
80
354
 
81
355
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
82
-
83
356
  - fix: more fixes addressing breaking changes in new Headless UI
84
357
 
85
358
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
86
-
87
359
  - chore: address linting issues
88
360
 
89
361
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
90
-
91
362
  - chore: fixing branding and docs
92
363
 
93
364
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
94
-
95
365
  - chore: more docs fixing
96
366
 
97
367
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
@@ -109,19 +379,15 @@
109
379
  - 6d1de58: - fix: address issues that would cause headless UI breaking changes in the next release
110
380
 
111
381
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
112
-
113
382
  - fix: more fixes addressing breaking changes in new Headless UI
114
383
 
115
384
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
116
-
117
385
  - chore: address linting issues
118
386
 
119
387
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
120
-
121
388
  - chore: fixing branding and docs
122
389
 
123
390
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
124
-
125
391
  - chore: more docs fixing
126
392
 
127
393
  Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
@@ -158,14 +424,12 @@
158
424
  agentic runtimes we acquired tech-debt that, with this PR, is being alleviated.
159
425
 
160
426
  As such, the following features have been updated to be completely functional with Headless UI.
161
-
162
427
  - Generative UI
163
428
  - Suggestions
164
429
  - Agentic Generative UI
165
430
  - Interrupts
166
431
 
167
432
  In addition, a variety of QOL changes have been made.
168
-
169
433
  - New AG-UI based message types
170
434
  - Inline code rendering is fixed
171
435
 
@@ -196,7 +460,6 @@
196
460
  ### Patch Changes
197
461
 
198
462
  - fac89c2: - refactor: rename onTrace to onError throughout codebase
199
-
200
463
  - Rename CopilotTraceEvent to CopilotErrorEvent and CopilotTraceHandler to CopilotErrorHandler
201
464
 
202
465
  - 9169ad7: - feat: add onTrace handler for runtime and UI error/event tracking
@@ -226,7 +489,6 @@
226
489
  ### Patch Changes
227
490
 
228
491
  - fac89c2: - refactor: rename onTrace to onError throughout codebase
229
-
230
492
  - Rename CopilotTraceEvent to CopilotErrorEvent and CopilotTraceHandler to CopilotErrorHandler
231
493
 
232
494
  ## 1.9.2-next.17
@@ -830,7 +1092,6 @@
830
1092
  - e16d95e: New prerelease
831
1093
  - 1721cbd: Add convertActionsToDynamicStructuredTools to sdk-js
832
1094
  - CopilotKit Core:
833
-
834
1095
  - Improved error messages and overall logs
835
1096
  - `useCopilotAction.renderAndAwait` renamed to `.renderAndAwaitForResponse` (backwards compatible, will be deprecated in the future)
836
1097
  - Improved scrolling behavior. It is now possible to scroll up during LLM response generation
@@ -838,7 +1099,6 @@
838
1099
  - Updated interfaces for better developer ergonomics
839
1100
 
840
1101
  CoAgents:
841
-
842
1102
  - Renamed `remoteActions` to `remoteEndpoints` (backwards compatible, will be deprecated in the future)
843
1103
  - Support for LangGraph Platform in Remote Endpoints
844
1104
  - LangGraph JS Support for CoAgents (locally via `langgraph dev`, `langgraph up` or deployed to LangGraph Platform)
@@ -846,7 +1106,6 @@
846
1106
  - Enhanced state management and message handling
847
1107
 
848
1108
  CopilotKid Back-end SDK:
849
-
850
1109
  - Released a whole-new `@copilotkit/sdk-js` for building agents with LangGraph JS Support
851
1110
 
852
1111
  - 8d0144f: bump
@@ -1086,7 +1345,6 @@ CopilotKid Back-end SDK:
1086
1345
  ### Patch Changes
1087
1346
 
1088
1347
  - inject minified css in bundle
1089
-
1090
1348
  - removes the need to import `styles.css` manually
1091
1349
  - empty `styles.css` included in the build for backwards compatibility
1092
1350
  - uses tsup's `injectStyles` with `postcss` to bundle and minify the CSS, then inject it as a style tag
@@ -1188,7 +1446,6 @@ CopilotKid Back-end SDK:
1188
1446
  ### Major Changes
1189
1447
 
1190
1448
  - b6a4b6eb: V1.0 Release Candidate
1191
-
1192
1449
  - A robust new protocol between the frontend and the Copilot Runtime
1193
1450
  - Support for Copilot Cloud
1194
1451
  - Generative UI
@@ -1196,7 +1453,6 @@ CopilotKid Back-end SDK:
1196
1453
  - OpenAI assistant API streaming
1197
1454
 
1198
1455
  - V1.0 Release
1199
-
1200
1456
  - A robust new protocol between the frontend and the Copilot Runtime
1201
1457
  - Support for Copilot Cloud
1202
1458
  - Generative UI
@@ -1225,7 +1481,6 @@ CopilotKid Back-end SDK:
1225
1481
  ### Major Changes
1226
1482
 
1227
1483
  - V1.0 Release Candidate
1228
-
1229
1484
  - A robust new protocol between the frontend and the Copilot Runtime
1230
1485
  - Support for Copilot Cloud
1231
1486
  - Generative UI
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Atai Barkai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -48,9 +48,9 @@
48
48
  const { visibleMessages, appendMessage, setMessages, ... } = useCopilotChat();
49
49
 
50
50
  // Pre-built components with deep customization options (CSS + pass custom sub-components)
51
- <CopilotPopup
52
- instructions={"You are assisting the user as best as you can. Answer in the best way possible given the data you have."}
53
- labels={{ title: "Popup Assistant", initial: "Need any help?" }}
51
+ <CopilotPopup
52
+ instructions={"You are assisting the user as best as you can. Answer in the best way possible given the data you have."}
53
+ labels={{ title: "Popup Assistant", initial: "Need any help?" }}
54
54
  />
55
55
  ```
56
56
 
@@ -71,9 +71,9 @@ useCopilotAction({
71
71
 
72
72
  ```ts
73
73
  // Share state between app and agent
74
- const { agentState } = useCoAgent({
75
- name: "basic_agent",
76
- initialState: { input: "NYC" }
74
+ const { agentState } = useCoAgent({
75
+ name: "basic_agent",
76
+ initialState: { input: "NYC" }
77
77
  });
78
78
 
79
79
  // agentic generative UI
@@ -114,14 +114,20 @@ useCopilotAction({
114
114
  ```ts
115
115
  // intermediate agent state streaming (supports both LangGraph.js + LangGraph python)
116
116
  const modifiedConfig = copilotKitCustomizeConfig(config, {
117
- emitIntermediateState: [{
118
- stateKey: "outline",
119
- tool: "set_outline",
120
- toolArgument: "outline"
121
- }],
117
+ emitIntermediateState: [
118
+ {
119
+ stateKey: "outline",
120
+ tool: "set_outline",
121
+ toolArgument: "outline",
122
+ },
123
+ ],
122
124
  });
123
- const response = await ChatOpenAI({ model: "gpt-4o" }).invoke(messages, modifiedConfig);
125
+ const response = await ChatOpenAI({ model: "gpt-4o" }).invoke(
126
+ messages,
127
+ modifiedConfig,
128
+ );
124
129
  ```
130
+
125
131
  ## 🏆 Featured Examples
126
132
 
127
133
  <p align="center">
@@ -0,0 +1,29 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
@@ -0,0 +1,13 @@
1
+
2
+ //#region src/constants/index.ts
3
+ const COPILOT_CLOUD_API_URL = "https://api.cloud.copilotkit.ai";
4
+ const COPILOT_CLOUD_VERSION = "v1";
5
+ const COPILOT_CLOUD_CHAT_URL = `${COPILOT_CLOUD_API_URL}/copilotkit/${COPILOT_CLOUD_VERSION}`;
6
+ const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = "X-CopilotCloud-Public-Api-Key";
7
+
8
+ //#endregion
9
+ exports.COPILOT_CLOUD_API_URL = COPILOT_CLOUD_API_URL;
10
+ exports.COPILOT_CLOUD_CHAT_URL = COPILOT_CLOUD_CHAT_URL;
11
+ exports.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = COPILOT_CLOUD_PUBLIC_API_KEY_HEADER;
12
+ exports.COPILOT_CLOUD_VERSION = COPILOT_CLOUD_VERSION;
13
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../src/constants/index.ts"],"sourcesContent":["export const COPILOT_CLOUD_API_URL = \"https://api.cloud.copilotkit.ai\";\nexport const COPILOT_CLOUD_VERSION = \"v1\";\nexport const COPILOT_CLOUD_CHAT_URL = `${COPILOT_CLOUD_API_URL}/copilotkit/${COPILOT_CLOUD_VERSION}`;\nexport const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER =\n \"X-CopilotCloud-Public-Api-Key\";\n"],"mappings":";;AAAA,MAAa,wBAAwB;AACrC,MAAa,wBAAwB;AACrC,MAAa,yBAAyB,GAAG,sBAAsB,cAAc;AAC7E,MAAa,sCACX"}
@@ -1,6 +1,8 @@
1
+ //#region src/constants/index.d.ts
1
2
  declare const COPILOT_CLOUD_API_URL = "https://api.cloud.copilotkit.ai";
2
3
  declare const COPILOT_CLOUD_VERSION = "v1";
3
4
  declare const COPILOT_CLOUD_CHAT_URL = "https://api.cloud.copilotkit.ai/copilotkit/v1";
4
5
  declare const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = "X-CopilotCloud-Public-Api-Key";
5
-
6
+ //#endregion
6
7
  export { COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION };
8
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/constants/index.ts"],"mappings":";cAAa,qBAAA;AAAA,cACA,qBAAA;AAAA,cACA,sBAAA;AAAA,cACA,mCAAA"}
@@ -0,0 +1,8 @@
1
+ //#region src/constants/index.d.ts
2
+ declare const COPILOT_CLOUD_API_URL = "https://api.cloud.copilotkit.ai";
3
+ declare const COPILOT_CLOUD_VERSION = "v1";
4
+ declare const COPILOT_CLOUD_CHAT_URL = "https://api.cloud.copilotkit.ai/copilotkit/v1";
5
+ declare const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = "X-CopilotCloud-Public-Api-Key";
6
+ //#endregion
7
+ export { COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION };
8
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/constants/index.ts"],"mappings":";cAAa,qBAAA;AAAA,cACA,qBAAA;AAAA,cACA,sBAAA;AAAA,cACA,mCAAA"}
@@ -1,13 +1,9 @@
1
- import {
2
- COPILOT_CLOUD_API_URL,
3
- COPILOT_CLOUD_CHAT_URL,
4
- COPILOT_CLOUD_PUBLIC_API_KEY_HEADER,
5
- COPILOT_CLOUD_VERSION
6
- } from "../chunk-GYZIHHE6.mjs";
7
- export {
8
- COPILOT_CLOUD_API_URL,
9
- COPILOT_CLOUD_CHAT_URL,
10
- COPILOT_CLOUD_PUBLIC_API_KEY_HEADER,
11
- COPILOT_CLOUD_VERSION
12
- };
1
+ //#region src/constants/index.ts
2
+ const COPILOT_CLOUD_API_URL = "https://api.cloud.copilotkit.ai";
3
+ const COPILOT_CLOUD_VERSION = "v1";
4
+ const COPILOT_CLOUD_CHAT_URL = `${COPILOT_CLOUD_API_URL}/copilotkit/${COPILOT_CLOUD_VERSION}`;
5
+ const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = "X-CopilotCloud-Public-Api-Key";
6
+
7
+ //#endregion
8
+ export { COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION };
13
9
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/constants/index.ts"],"sourcesContent":["export const COPILOT_CLOUD_API_URL = \"https://api.cloud.copilotkit.ai\";\nexport const COPILOT_CLOUD_VERSION = \"v1\";\nexport const COPILOT_CLOUD_CHAT_URL = `${COPILOT_CLOUD_API_URL}/copilotkit/${COPILOT_CLOUD_VERSION}`;\nexport const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER =\n \"X-CopilotCloud-Public-Api-Key\";\n"],"mappings":";AAAA,MAAa,wBAAwB;AACrC,MAAa,wBAAwB;AACrC,MAAa,yBAAyB,GAAG,sBAAsB,cAAc;AAC7E,MAAa,sCACX"}
package/dist/index.cjs ADDED
@@ -0,0 +1,64 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_conditions = require('./utils/conditions.cjs');
3
+ const require_console_styling = require('./utils/console-styling.cjs');
4
+ const require_errors = require('./utils/errors.cjs');
5
+ const require_json_schema = require('./utils/json-schema.cjs');
6
+ const require_random_id = require('./utils/random-id.cjs');
7
+ const require_requests = require('./utils/requests.cjs');
8
+ const require_index = require('./utils/index.cjs');
9
+ const require_index$1 = require('./constants/index.cjs');
10
+ const require_package = require('./package.cjs');
11
+ const require_telemetry_client = require('./telemetry/telemetry-client.cjs');
12
+
13
+ //#region src/index.ts
14
+ const COPILOTKIT_VERSION = require_package.version;
15
+
16
+ //#endregion
17
+ exports.BANNER_ERROR_NAMES = require_errors.BANNER_ERROR_NAMES;
18
+ exports.COPILOTKIT_VERSION = COPILOTKIT_VERSION;
19
+ exports.COPILOT_CLOUD_API_URL = require_index$1.COPILOT_CLOUD_API_URL;
20
+ exports.COPILOT_CLOUD_CHAT_URL = require_index$1.COPILOT_CLOUD_CHAT_URL;
21
+ exports.COPILOT_CLOUD_ERROR_NAMES = require_errors.COPILOT_CLOUD_ERROR_NAMES;
22
+ exports.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = require_index$1.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER;
23
+ exports.COPILOT_CLOUD_VERSION = require_index$1.COPILOT_CLOUD_VERSION;
24
+ exports.ConfigurationError = require_errors.ConfigurationError;
25
+ exports.ConsoleColors = require_console_styling.ConsoleColors;
26
+ exports.ConsoleStyles = require_console_styling.ConsoleStyles;
27
+ exports.CopilotKitAgentDiscoveryError = require_errors.CopilotKitAgentDiscoveryError;
28
+ exports.CopilotKitApiDiscoveryError = require_errors.CopilotKitApiDiscoveryError;
29
+ exports.CopilotKitError = require_errors.CopilotKitError;
30
+ exports.CopilotKitErrorCode = require_errors.CopilotKitErrorCode;
31
+ exports.CopilotKitLowLevelError = require_errors.CopilotKitLowLevelError;
32
+ exports.CopilotKitMisuseError = require_errors.CopilotKitMisuseError;
33
+ exports.CopilotKitRemoteEndpointDiscoveryError = require_errors.CopilotKitRemoteEndpointDiscoveryError;
34
+ exports.CopilotKitVersionMismatchError = require_errors.CopilotKitVersionMismatchError;
35
+ exports.ERROR_CONFIG = require_errors.ERROR_CONFIG;
36
+ exports.ERROR_NAMES = require_errors.ERROR_NAMES;
37
+ exports.ErrorVisibility = require_errors.ErrorVisibility;
38
+ exports.MissingPublicApiKeyError = require_errors.MissingPublicApiKeyError;
39
+ exports.ResolvedCopilotKitError = require_errors.ResolvedCopilotKitError;
40
+ exports.Severity = require_errors.Severity;
41
+ exports.TelemetryClient = require_telemetry_client.TelemetryClient;
42
+ exports.UpgradeRequiredError = require_errors.UpgradeRequiredError;
43
+ exports.actionParametersToJsonSchema = require_json_schema.actionParametersToJsonSchema;
44
+ exports.convertJsonSchemaToZodSchema = require_json_schema.convertJsonSchemaToZodSchema;
45
+ exports.dataToUUID = require_random_id.dataToUUID;
46
+ exports.ensureStructuredError = require_errors.ensureStructuredError;
47
+ exports.executeConditions = require_conditions.executeConditions;
48
+ exports.getPossibleVersionMismatch = require_errors.getPossibleVersionMismatch;
49
+ exports.getZodParameters = require_json_schema.getZodParameters;
50
+ exports.isMacOS = require_index.isMacOS;
51
+ exports.isStructuredCopilotKitError = require_errors.isStructuredCopilotKitError;
52
+ exports.isTelemetryDisabled = require_telemetry_client.isTelemetryDisabled;
53
+ exports.isValidUUID = require_random_id.isValidUUID;
54
+ exports.jsonSchemaToActionParameters = require_json_schema.jsonSchemaToActionParameters;
55
+ exports.logCopilotKitPlatformMessage = require_console_styling.logCopilotKitPlatformMessage;
56
+ exports.logStyled = require_console_styling.logStyled;
57
+ exports.parseJson = require_index.parseJson;
58
+ exports.publicApiKeyRequired = require_console_styling.publicApiKeyRequired;
59
+ exports.randomId = require_random_id.randomId;
60
+ exports.randomUUID = require_random_id.randomUUID;
61
+ exports.readBody = require_requests.readBody;
62
+ exports.styledConsole = require_console_styling.styledConsole;
63
+ exports.tryMap = require_index.tryMap;
64
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./utils\";\nexport * from \"./constants\";\nexport * from \"./telemetry\";\n\nimport * as packageJson from \"../package.json\";\nexport const COPILOTKIT_VERSION = packageJson.version;\n"],"mappings":";;;;;;;;;;;;;AAMA,MAAa"}