@copilotkit/react-core 1.51.5-next.0 → 1.51.5-next.1

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 (474) hide show
  1. package/.attw.json +3 -0
  2. package/CHANGELOG.md +10 -0
  3. package/dist/index.cjs +4010 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +1327 -0
  6. package/dist/index.d.cts.map +1 -0
  7. package/dist/index.d.mts +1327 -0
  8. package/dist/index.d.mts.map +1 -0
  9. package/dist/index.mjs +3944 -148
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/index.umd.js +4075 -39
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/v2/index.cjs +17 -0
  14. package/dist/v2/index.css +2 -3
  15. package/dist/v2/index.css.map +1 -1
  16. package/dist/v2/index.d.cts +2 -0
  17. package/dist/v2/index.d.mts +2 -0
  18. package/dist/v2/index.mjs +4 -5
  19. package/dist/v2/index.umd.js +24 -2
  20. package/package.json +21 -21
  21. package/src/components/copilot-provider/__tests__/copilotkit-error.test.tsx +3 -3
  22. package/src/hooks/__tests__/use-coagent-config.test.ts +23 -22
  23. package/src/hooks/__tests__/use-coagent-state-render.e2e.test.tsx +33 -35
  24. package/src/hooks/__tests__/use-coagent-state-render.test.tsx +19 -18
  25. package/src/hooks/__tests__/use-frontend-tool-available.test.tsx +72 -0
  26. package/src/hooks/__tests__/use-frontend-tool-remount.e2e.test.tsx +9 -7
  27. package/src/hooks/use-copilot-chat.ts +1 -1
  28. package/src/hooks/use-frontend-tool.ts +2 -1
  29. package/src/lib/copilot-task.ts +1 -1
  30. package/src/setupTests.ts +17 -16
  31. package/tsconfig.json +1 -1
  32. package/tsdown.config.ts +94 -0
  33. package/vitest.config.mjs +30 -0
  34. package/dist/chunk-2IDV5OHF.mjs +0 -11
  35. package/dist/chunk-2IDV5OHF.mjs.map +0 -1
  36. package/dist/chunk-2JZZD4RP.mjs +0 -628
  37. package/dist/chunk-2JZZD4RP.mjs.map +0 -1
  38. package/dist/chunk-2RSAYTXH.mjs +0 -137
  39. package/dist/chunk-2RSAYTXH.mjs.map +0 -1
  40. package/dist/chunk-36KQV2NA.mjs +0 -1
  41. package/dist/chunk-36KQV2NA.mjs.map +0 -1
  42. package/dist/chunk-3LZZ4RVM.mjs +0 -37
  43. package/dist/chunk-3LZZ4RVM.mjs.map +0 -1
  44. package/dist/chunk-4ZQYMC5F.mjs +0 -36
  45. package/dist/chunk-4ZQYMC5F.mjs.map +0 -1
  46. package/dist/chunk-6AWG5FWL.mjs +0 -102
  47. package/dist/chunk-6AWG5FWL.mjs.map +0 -1
  48. package/dist/chunk-6YOKPWQ7.mjs +0 -1
  49. package/dist/chunk-6YOKPWQ7.mjs.map +0 -1
  50. package/dist/chunk-7GIBHX6X.mjs +0 -195
  51. package/dist/chunk-7GIBHX6X.mjs.map +0 -1
  52. package/dist/chunk-7PJKPWMD.mjs +0 -112
  53. package/dist/chunk-7PJKPWMD.mjs.map +0 -1
  54. package/dist/chunk-7U3DNFBF.mjs +0 -20
  55. package/dist/chunk-7U3DNFBF.mjs.map +0 -1
  56. package/dist/chunk-A6NKSGH3.mjs +0 -1
  57. package/dist/chunk-A6NKSGH3.mjs.map +0 -1
  58. package/dist/chunk-AAGMWZCN.mjs +0 -439
  59. package/dist/chunk-AAGMWZCN.mjs.map +0 -1
  60. package/dist/chunk-C7HSVDHD.mjs +0 -116
  61. package/dist/chunk-C7HSVDHD.mjs.map +0 -1
  62. package/dist/chunk-CYDWEPFL.mjs +0 -1
  63. package/dist/chunk-CYDWEPFL.mjs.map +0 -1
  64. package/dist/chunk-CZT7JUIM.mjs +0 -153
  65. package/dist/chunk-CZT7JUIM.mjs.map +0 -1
  66. package/dist/chunk-DAQORGBP.mjs +0 -125
  67. package/dist/chunk-DAQORGBP.mjs.map +0 -1
  68. package/dist/chunk-DMLQZG75.mjs +0 -25
  69. package/dist/chunk-DMLQZG75.mjs.map +0 -1
  70. package/dist/chunk-FD6FGKYY.mjs +0 -1
  71. package/dist/chunk-FD6FGKYY.mjs.map +0 -1
  72. package/dist/chunk-G7SUZGGB.mjs +0 -126
  73. package/dist/chunk-G7SUZGGB.mjs.map +0 -1
  74. package/dist/chunk-GY3FQICF.mjs +0 -23
  75. package/dist/chunk-GY3FQICF.mjs.map +0 -1
  76. package/dist/chunk-I76HKHPJ.mjs +0 -32
  77. package/dist/chunk-I76HKHPJ.mjs.map +0 -1
  78. package/dist/chunk-ICIK2BSB.mjs +0 -17
  79. package/dist/chunk-ICIK2BSB.mjs.map +0 -1
  80. package/dist/chunk-IGYMBU43.mjs +0 -43
  81. package/dist/chunk-IGYMBU43.mjs.map +0 -1
  82. package/dist/chunk-IHMMKEFG.mjs +0 -64
  83. package/dist/chunk-IHMMKEFG.mjs.map +0 -1
  84. package/dist/chunk-JD7BAH7U.mjs +0 -1
  85. package/dist/chunk-JD7BAH7U.mjs.map +0 -1
  86. package/dist/chunk-K5OXUXCG.mjs +0 -76
  87. package/dist/chunk-K5OXUXCG.mjs.map +0 -1
  88. package/dist/chunk-L7GPCF2V.mjs +0 -229
  89. package/dist/chunk-L7GPCF2V.mjs.map +0 -1
  90. package/dist/chunk-LNGBARXE.mjs +0 -86
  91. package/dist/chunk-LNGBARXE.mjs.map +0 -1
  92. package/dist/chunk-LUGEI4YQ.mjs +0 -1
  93. package/dist/chunk-LUGEI4YQ.mjs.map +0 -1
  94. package/dist/chunk-MBJ7OLYI.mjs +0 -58
  95. package/dist/chunk-MBJ7OLYI.mjs.map +0 -1
  96. package/dist/chunk-NB2FKV2V.mjs +0 -1
  97. package/dist/chunk-NB2FKV2V.mjs.map +0 -1
  98. package/dist/chunk-NINJMAND.mjs +0 -86
  99. package/dist/chunk-NINJMAND.mjs.map +0 -1
  100. package/dist/chunk-O7ARI5CV.mjs +0 -31
  101. package/dist/chunk-O7ARI5CV.mjs.map +0 -1
  102. package/dist/chunk-P6ZPE4XJ.mjs +0 -86
  103. package/dist/chunk-P6ZPE4XJ.mjs.map +0 -1
  104. package/dist/chunk-QXZTCGF4.mjs +0 -163
  105. package/dist/chunk-QXZTCGF4.mjs.map +0 -1
  106. package/dist/chunk-R7BV32X4.mjs +0 -146
  107. package/dist/chunk-R7BV32X4.mjs.map +0 -1
  108. package/dist/chunk-S65UEHGI.mjs +0 -95
  109. package/dist/chunk-S65UEHGI.mjs.map +0 -1
  110. package/dist/chunk-SBRCWA4S.mjs +0 -913
  111. package/dist/chunk-SBRCWA4S.mjs.map +0 -1
  112. package/dist/chunk-SFOKX4MH.mjs +0 -195
  113. package/dist/chunk-SFOKX4MH.mjs.map +0 -1
  114. package/dist/chunk-SK2XMJUD.mjs +0 -42
  115. package/dist/chunk-SK2XMJUD.mjs.map +0 -1
  116. package/dist/chunk-SKC7AJIV.mjs +0 -61
  117. package/dist/chunk-SKC7AJIV.mjs.map +0 -1
  118. package/dist/chunk-SPCZTZCY.mjs +0 -1
  119. package/dist/chunk-SPCZTZCY.mjs.map +0 -1
  120. package/dist/chunk-SYGQHN3H.mjs +0 -27
  121. package/dist/chunk-SYGQHN3H.mjs.map +0 -1
  122. package/dist/chunk-TFZXOEY4.mjs +0 -61
  123. package/dist/chunk-TFZXOEY4.mjs.map +0 -1
  124. package/dist/chunk-TPN7WC53.mjs +0 -33
  125. package/dist/chunk-TPN7WC53.mjs.map +0 -1
  126. package/dist/chunk-UA23VX5J.mjs +0 -65
  127. package/dist/chunk-UA23VX5J.mjs.map +0 -1
  128. package/dist/chunk-V42VL2JR.mjs +0 -136
  129. package/dist/chunk-V42VL2JR.mjs.map +0 -1
  130. package/dist/chunk-VZ4NSOFQ.mjs +0 -80
  131. package/dist/chunk-VZ4NSOFQ.mjs.map +0 -1
  132. package/dist/chunk-WRALJIW5.mjs +0 -79
  133. package/dist/chunk-WRALJIW5.mjs.map +0 -1
  134. package/dist/chunk-WV2EA7SX.mjs +0 -65
  135. package/dist/chunk-WV2EA7SX.mjs.map +0 -1
  136. package/dist/chunk-Z6JV2LRY.mjs +0 -37
  137. package/dist/chunk-Z6JV2LRY.mjs.map +0 -1
  138. package/dist/chunk-ZP2IMXFY.mjs +0 -316
  139. package/dist/chunk-ZP2IMXFY.mjs.map +0 -1
  140. package/dist/chunk-ZVF5Q6IH.mjs +0 -29
  141. package/dist/chunk-ZVF5Q6IH.mjs.map +0 -1
  142. package/dist/components/CopilotListeners.d.ts +0 -3
  143. package/dist/components/CopilotListeners.js +0 -110
  144. package/dist/components/CopilotListeners.js.map +0 -1
  145. package/dist/components/CopilotListeners.mjs +0 -9
  146. package/dist/components/CopilotListeners.mjs.map +0 -1
  147. package/dist/components/copilot-provider/copilot-messages.d.ts +0 -24
  148. package/dist/components/copilot-provider/copilot-messages.js +0 -366
  149. package/dist/components/copilot-provider/copilot-messages.js.map +0 -1
  150. package/dist/components/copilot-provider/copilot-messages.mjs +0 -16
  151. package/dist/components/copilot-provider/copilot-messages.mjs.map +0 -1
  152. package/dist/components/copilot-provider/copilotkit-props.d.ts +0 -180
  153. package/dist/components/copilot-provider/copilotkit-props.js +0 -19
  154. package/dist/components/copilot-provider/copilotkit-props.js.map +0 -1
  155. package/dist/components/copilot-provider/copilotkit-props.mjs +0 -1
  156. package/dist/components/copilot-provider/copilotkit-props.mjs.map +0 -1
  157. package/dist/components/copilot-provider/copilotkit.d.ts +0 -19
  158. package/dist/components/copilot-provider/copilotkit.js +0 -2348
  159. package/dist/components/copilot-provider/copilotkit.js.map +0 -1
  160. package/dist/components/copilot-provider/copilotkit.mjs +0 -33
  161. package/dist/components/copilot-provider/copilotkit.mjs.map +0 -1
  162. package/dist/components/copilot-provider/index.d.ts +0 -14
  163. package/dist/components/copilot-provider/index.js +0 -2348
  164. package/dist/components/copilot-provider/index.js.map +0 -1
  165. package/dist/components/copilot-provider/index.mjs +0 -32
  166. package/dist/components/copilot-provider/index.mjs.map +0 -1
  167. package/dist/components/dev-console/console-trigger.d.ts +0 -8
  168. package/dist/components/dev-console/console-trigger.js +0 -1387
  169. package/dist/components/dev-console/console-trigger.js.map +0 -1
  170. package/dist/components/dev-console/console-trigger.mjs +0 -249
  171. package/dist/components/dev-console/console-trigger.mjs.map +0 -1
  172. package/dist/components/dev-console/developer-console-modal.d.ts +0 -10
  173. package/dist/components/dev-console/developer-console-modal.js +0 -1156
  174. package/dist/components/dev-console/developer-console-modal.js.map +0 -1
  175. package/dist/components/dev-console/developer-console-modal.mjs +0 -12
  176. package/dist/components/dev-console/developer-console-modal.mjs.map +0 -1
  177. package/dist/components/dev-console/icons.d.ts +0 -9
  178. package/dist/components/dev-console/icons.js +0 -140
  179. package/dist/components/dev-console/icons.js.map +0 -1
  180. package/dist/components/dev-console/icons.mjs +0 -16
  181. package/dist/components/dev-console/icons.mjs.map +0 -1
  182. package/dist/components/error-boundary/error-boundary.d.ts +0 -31
  183. package/dist/components/error-boundary/error-boundary.js +0 -507
  184. package/dist/components/error-boundary/error-boundary.js.map +0 -1
  185. package/dist/components/error-boundary/error-boundary.mjs +0 -15
  186. package/dist/components/error-boundary/error-boundary.mjs.map +0 -1
  187. package/dist/components/error-boundary/error-utils.d.ts +0 -11
  188. package/dist/components/error-boundary/error-utils.js +0 -190
  189. package/dist/components/error-boundary/error-utils.js.map +0 -1
  190. package/dist/components/error-boundary/error-utils.mjs +0 -14
  191. package/dist/components/error-boundary/error-utils.mjs.map +0 -1
  192. package/dist/components/index.d.ts +0 -14
  193. package/dist/components/index.js +0 -2348
  194. package/dist/components/index.js.map +0 -1
  195. package/dist/components/index.mjs +0 -33
  196. package/dist/components/index.mjs.map +0 -1
  197. package/dist/components/toast/exclamation-mark-icon.d.ts +0 -9
  198. package/dist/components/toast/exclamation-mark-icon.js +0 -55
  199. package/dist/components/toast/exclamation-mark-icon.js.map +0 -1
  200. package/dist/components/toast/exclamation-mark-icon.mjs +0 -8
  201. package/dist/components/toast/exclamation-mark-icon.mjs.map +0 -1
  202. package/dist/components/toast/toast-provider.d.ts +0 -27
  203. package/dist/components/toast/toast-provider.js +0 -353
  204. package/dist/components/toast/toast-provider.js.map +0 -1
  205. package/dist/components/toast/toast-provider.mjs +0 -10
  206. package/dist/components/toast/toast-provider.mjs.map +0 -1
  207. package/dist/components/usage-banner.d.ts +0 -29
  208. package/dist/components/usage-banner.js +0 -251
  209. package/dist/components/usage-banner.js.map +0 -1
  210. package/dist/components/usage-banner.mjs +0 -12
  211. package/dist/components/usage-banner.mjs.map +0 -1
  212. package/dist/context/coagent-state-renders-context.d.ts +0 -25
  213. package/dist/context/coagent-state-renders-context.js +0 -96
  214. package/dist/context/coagent-state-renders-context.js.map +0 -1
  215. package/dist/context/coagent-state-renders-context.mjs +0 -12
  216. package/dist/context/coagent-state-renders-context.mjs.map +0 -1
  217. package/dist/context/copilot-context.d.ts +0 -10
  218. package/dist/context/copilot-context.js +0 -167
  219. package/dist/context/copilot-context.js.map +0 -1
  220. package/dist/context/copilot-context.mjs +0 -10
  221. package/dist/context/copilot-context.mjs.map +0 -1
  222. package/dist/context/copilot-messages-context.d.ts +0 -18
  223. package/dist/context/copilot-messages-context.js +0 -60
  224. package/dist/context/copilot-messages-context.js.map +0 -1
  225. package/dist/context/copilot-messages-context.mjs +0 -10
  226. package/dist/context/copilot-messages-context.mjs.map +0 -1
  227. package/dist/context/index.d.ts +0 -15
  228. package/dist/context/index.js +0 -301
  229. package/dist/context/index.js.map +0 -1
  230. package/dist/context/index.mjs +0 -33
  231. package/dist/context/index.mjs.map +0 -1
  232. package/dist/context/threads-context.d.ts +0 -16
  233. package/dist/context/threads-context.js +0 -64
  234. package/dist/context/threads-context.js.map +0 -1
  235. package/dist/context/threads-context.mjs +0 -12
  236. package/dist/context/threads-context.mjs.map +0 -1
  237. package/dist/copilot-context-ec77e921.d.ts +0 -209
  238. package/dist/hooks/index.d.ts +0 -33
  239. package/dist/hooks/index.js +0 -2190
  240. package/dist/hooks/index.js.map +0 -1
  241. package/dist/hooks/index.mjs +0 -93
  242. package/dist/hooks/index.mjs.map +0 -1
  243. package/dist/hooks/use-agent-nodename.d.ts +0 -3
  244. package/dist/hooks/use-agent-nodename.js +0 -56
  245. package/dist/hooks/use-agent-nodename.js.map +0 -1
  246. package/dist/hooks/use-agent-nodename.mjs +0 -8
  247. package/dist/hooks/use-agent-nodename.mjs.map +0 -1
  248. package/dist/hooks/use-coagent-state-render-bridge.d.ts +0 -100
  249. package/dist/hooks/use-coagent-state-render-bridge.helpers.d.ts +0 -92
  250. package/dist/hooks/use-coagent-state-render-bridge.helpers.js +0 -237
  251. package/dist/hooks/use-coagent-state-render-bridge.helpers.js.map +0 -1
  252. package/dist/hooks/use-coagent-state-render-bridge.helpers.mjs +0 -24
  253. package/dist/hooks/use-coagent-state-render-bridge.helpers.mjs.map +0 -1
  254. package/dist/hooks/use-coagent-state-render-bridge.js +0 -498
  255. package/dist/hooks/use-coagent-state-render-bridge.js.map +0 -1
  256. package/dist/hooks/use-coagent-state-render-bridge.mjs +0 -17
  257. package/dist/hooks/use-coagent-state-render-bridge.mjs.map +0 -1
  258. package/dist/hooks/use-coagent-state-render-registry.d.ts +0 -25
  259. package/dist/hooks/use-coagent-state-render-registry.js +0 -369
  260. package/dist/hooks/use-coagent-state-render-registry.js.map +0 -1
  261. package/dist/hooks/use-coagent-state-render-registry.mjs +0 -9
  262. package/dist/hooks/use-coagent-state-render-registry.mjs.map +0 -1
  263. package/dist/hooks/use-coagent-state-render.d.ts +0 -55
  264. package/dist/hooks/use-coagent-state-render.js +0 -268
  265. package/dist/hooks/use-coagent-state-render.js.map +0 -1
  266. package/dist/hooks/use-coagent-state-render.mjs +0 -11
  267. package/dist/hooks/use-coagent-state-render.mjs.map +0 -1
  268. package/dist/hooks/use-coagent.d.ts +0 -192
  269. package/dist/hooks/use-coagent.js +0 -235
  270. package/dist/hooks/use-coagent.js.map +0 -1
  271. package/dist/hooks/use-coagent.mjs +0 -9
  272. package/dist/hooks/use-coagent.mjs.map +0 -1
  273. package/dist/hooks/use-configure-chat-suggestions.d.ts +0 -36
  274. package/dist/hooks/use-configure-chat-suggestions.js +0 -79
  275. package/dist/hooks/use-configure-chat-suggestions.js.map +0 -1
  276. package/dist/hooks/use-configure-chat-suggestions.mjs +0 -47
  277. package/dist/hooks/use-configure-chat-suggestions.mjs.map +0 -1
  278. package/dist/hooks/use-copilot-action.d.ts +0 -103
  279. package/dist/hooks/use-copilot-action.js +0 -302
  280. package/dist/hooks/use-copilot-action.js.map +0 -1
  281. package/dist/hooks/use-copilot-action.mjs +0 -11
  282. package/dist/hooks/use-copilot-action.mjs.map +0 -1
  283. package/dist/hooks/use-copilot-additional-instructions.d.ts +0 -26
  284. package/dist/hooks/use-copilot-additional-instructions.js +0 -196
  285. package/dist/hooks/use-copilot-additional-instructions.js.map +0 -1
  286. package/dist/hooks/use-copilot-additional-instructions.mjs +0 -9
  287. package/dist/hooks/use-copilot-additional-instructions.mjs.map +0 -1
  288. package/dist/hooks/use-copilot-authenticated-action.d.ts +0 -18
  289. package/dist/hooks/use-copilot-authenticated-action.js +0 -477
  290. package/dist/hooks/use-copilot-authenticated-action.js.map +0 -1
  291. package/dist/hooks/use-copilot-authenticated-action.mjs +0 -13
  292. package/dist/hooks/use-copilot-authenticated-action.mjs.map +0 -1
  293. package/dist/hooks/use-copilot-chat-headless_c.d.ts +0 -25
  294. package/dist/hooks/use-copilot-chat-headless_c.js +0 -1410
  295. package/dist/hooks/use-copilot-chat-headless_c.js.map +0 -1
  296. package/dist/hooks/use-copilot-chat-headless_c.mjs +0 -26
  297. package/dist/hooks/use-copilot-chat-headless_c.mjs.map +0 -1
  298. package/dist/hooks/use-copilot-chat-suggestions.d.ts +0 -35
  299. package/dist/hooks/use-copilot-chat-suggestions.js +0 -60
  300. package/dist/hooks/use-copilot-chat-suggestions.js.map +0 -1
  301. package/dist/hooks/use-copilot-chat-suggestions.mjs +0 -8
  302. package/dist/hooks/use-copilot-chat-suggestions.mjs.map +0 -1
  303. package/dist/hooks/use-copilot-chat.d.ts +0 -92
  304. package/dist/hooks/use-copilot-chat.js +0 -1344
  305. package/dist/hooks/use-copilot-chat.js.map +0 -1
  306. package/dist/hooks/use-copilot-chat.mjs +0 -23
  307. package/dist/hooks/use-copilot-chat.mjs.map +0 -1
  308. package/dist/hooks/use-copilot-chat_internal.d.ts +0 -244
  309. package/dist/hooks/use-copilot-chat_internal.js +0 -1342
  310. package/dist/hooks/use-copilot-chat_internal.js.map +0 -1
  311. package/dist/hooks/use-copilot-chat_internal.mjs +0 -24
  312. package/dist/hooks/use-copilot-chat_internal.mjs.map +0 -1
  313. package/dist/hooks/use-copilot-readable.d.ts +0 -37
  314. package/dist/hooks/use-copilot-readable.js +0 -61
  315. package/dist/hooks/use-copilot-readable.js.map +0 -1
  316. package/dist/hooks/use-copilot-readable.mjs +0 -8
  317. package/dist/hooks/use-copilot-readable.mjs.map +0 -1
  318. package/dist/hooks/use-copilot-runtime-client.d.ts +0 -10
  319. package/dist/hooks/use-copilot-runtime-client.js +0 -206
  320. package/dist/hooks/use-copilot-runtime-client.js.map +0 -1
  321. package/dist/hooks/use-copilot-runtime-client.mjs +0 -9
  322. package/dist/hooks/use-copilot-runtime-client.mjs.map +0 -1
  323. package/dist/hooks/use-default-tool.d.ts +0 -8
  324. package/dist/hooks/use-default-tool.js +0 -312
  325. package/dist/hooks/use-default-tool.js.map +0 -1
  326. package/dist/hooks/use-default-tool.mjs +0 -12
  327. package/dist/hooks/use-default-tool.mjs.map +0 -1
  328. package/dist/hooks/use-flat-category-store.d.ts +0 -9
  329. package/dist/hooks/use-flat-category-store.js +0 -96
  330. package/dist/hooks/use-flat-category-store.js.map +0 -1
  331. package/dist/hooks/use-flat-category-store.mjs +0 -8
  332. package/dist/hooks/use-flat-category-store.mjs.map +0 -1
  333. package/dist/hooks/use-frontend-tool.d.ts +0 -11
  334. package/dist/hooks/use-frontend-tool.js +0 -107
  335. package/dist/hooks/use-frontend-tool.js.map +0 -1
  336. package/dist/hooks/use-frontend-tool.mjs +0 -8
  337. package/dist/hooks/use-frontend-tool.mjs.map +0 -1
  338. package/dist/hooks/use-human-in-the-loop.d.ts +0 -13
  339. package/dist/hooks/use-human-in-the-loop.js +0 -122
  340. package/dist/hooks/use-human-in-the-loop.js.map +0 -1
  341. package/dist/hooks/use-human-in-the-loop.mjs +0 -8
  342. package/dist/hooks/use-human-in-the-loop.mjs.map +0 -1
  343. package/dist/hooks/use-langgraph-interrupt-render.d.ts +0 -6
  344. package/dist/hooks/use-langgraph-interrupt-render.js +0 -335
  345. package/dist/hooks/use-langgraph-interrupt-render.js.map +0 -1
  346. package/dist/hooks/use-langgraph-interrupt-render.mjs +0 -14
  347. package/dist/hooks/use-langgraph-interrupt-render.mjs.map +0 -1
  348. package/dist/hooks/use-langgraph-interrupt.d.ts +0 -14
  349. package/dist/hooks/use-langgraph-interrupt.js +0 -216
  350. package/dist/hooks/use-langgraph-interrupt.js.map +0 -1
  351. package/dist/hooks/use-langgraph-interrupt.mjs +0 -10
  352. package/dist/hooks/use-langgraph-interrupt.mjs.map +0 -1
  353. package/dist/hooks/use-lazy-tool-renderer.d.ts +0 -6
  354. package/dist/hooks/use-lazy-tool-renderer.js +0 -53
  355. package/dist/hooks/use-lazy-tool-renderer.js.map +0 -1
  356. package/dist/hooks/use-lazy-tool-renderer.mjs +0 -8
  357. package/dist/hooks/use-lazy-tool-renderer.mjs.map +0 -1
  358. package/dist/hooks/use-make-copilot-document-readable.d.ts +0 -12
  359. package/dist/hooks/use-make-copilot-document-readable.js +0 -182
  360. package/dist/hooks/use-make-copilot-document-readable.js.map +0 -1
  361. package/dist/hooks/use-make-copilot-document-readable.mjs +0 -9
  362. package/dist/hooks/use-make-copilot-document-readable.mjs.map +0 -1
  363. package/dist/hooks/use-render-tool-call.d.ts +0 -12
  364. package/dist/hooks/use-render-tool-call.js +0 -94
  365. package/dist/hooks/use-render-tool-call.js.map +0 -1
  366. package/dist/hooks/use-render-tool-call.mjs +0 -8
  367. package/dist/hooks/use-render-tool-call.mjs.map +0 -1
  368. package/dist/hooks/use-tree.d.ts +0 -19
  369. package/dist/hooks/use-tree.js +0 -178
  370. package/dist/hooks/use-tree.js.map +0 -1
  371. package/dist/hooks/use-tree.mjs +0 -8
  372. package/dist/hooks/use-tree.mjs.map +0 -1
  373. package/dist/index.d.ts +0 -43
  374. package/dist/index.js +0 -4064
  375. package/dist/index.js.map +0 -1
  376. package/dist/lib/copilot-task.d.ts +0 -97
  377. package/dist/lib/copilot-task.js +0 -201
  378. package/dist/lib/copilot-task.js.map +0 -1
  379. package/dist/lib/copilot-task.mjs +0 -33
  380. package/dist/lib/copilot-task.mjs.map +0 -1
  381. package/dist/lib/index.d.ts +0 -11
  382. package/dist/lib/index.js +0 -203
  383. package/dist/lib/index.js.map +0 -1
  384. package/dist/lib/index.mjs +0 -34
  385. package/dist/lib/index.mjs.map +0 -1
  386. package/dist/lib/status-checker.d.ts +0 -17
  387. package/dist/lib/status-checker.js +0 -102
  388. package/dist/lib/status-checker.js.map +0 -1
  389. package/dist/lib/status-checker.mjs +0 -8
  390. package/dist/lib/status-checker.mjs.map +0 -1
  391. package/dist/setupTests.d.ts +0 -2
  392. package/dist/setupTests.js +0 -31
  393. package/dist/setupTests.js.map +0 -1
  394. package/dist/setupTests.mjs +0 -29
  395. package/dist/setupTests.mjs.map +0 -1
  396. package/dist/test-helpers/copilot-context.d.ts +0 -14
  397. package/dist/test-helpers/copilot-context.js +0 -128
  398. package/dist/test-helpers/copilot-context.js.map +0 -1
  399. package/dist/test-helpers/copilot-context.mjs +0 -74
  400. package/dist/test-helpers/copilot-context.mjs.map +0 -1
  401. package/dist/types/chat-suggestion-configuration.d.ts +0 -22
  402. package/dist/types/chat-suggestion-configuration.js +0 -19
  403. package/dist/types/chat-suggestion-configuration.js.map +0 -1
  404. package/dist/types/chat-suggestion-configuration.mjs +0 -1
  405. package/dist/types/chat-suggestion-configuration.mjs.map +0 -1
  406. package/dist/types/coagent-action.d.ts +0 -29
  407. package/dist/types/coagent-action.js +0 -19
  408. package/dist/types/coagent-action.js.map +0 -1
  409. package/dist/types/coagent-action.mjs +0 -1
  410. package/dist/types/coagent-action.mjs.map +0 -1
  411. package/dist/types/coagent-state.d.ts +0 -15
  412. package/dist/types/coagent-state.js +0 -19
  413. package/dist/types/coagent-state.js.map +0 -1
  414. package/dist/types/coagent-state.mjs +0 -1
  415. package/dist/types/coagent-state.mjs.map +0 -1
  416. package/dist/types/crew.d.ts +0 -79
  417. package/dist/types/crew.js +0 -19
  418. package/dist/types/crew.js.map +0 -1
  419. package/dist/types/crew.mjs +0 -2
  420. package/dist/types/crew.mjs.map +0 -1
  421. package/dist/types/document-pointer.d.ts +0 -9
  422. package/dist/types/document-pointer.js +0 -19
  423. package/dist/types/document-pointer.js.map +0 -1
  424. package/dist/types/document-pointer.mjs +0 -1
  425. package/dist/types/document-pointer.mjs.map +0 -1
  426. package/dist/types/frontend-action.d.ts +0 -127
  427. package/dist/types/frontend-action.js +0 -55
  428. package/dist/types/frontend-action.js.map +0 -1
  429. package/dist/types/frontend-action.mjs +0 -8
  430. package/dist/types/frontend-action.mjs.map +0 -1
  431. package/dist/types/index.d.ts +0 -12
  432. package/dist/types/index.js +0 -19
  433. package/dist/types/index.js.map +0 -1
  434. package/dist/types/index.mjs +0 -4
  435. package/dist/types/index.mjs.map +0 -1
  436. package/dist/types/interrupt-action.d.ts +0 -10
  437. package/dist/types/interrupt-action.js +0 -19
  438. package/dist/types/interrupt-action.js.map +0 -1
  439. package/dist/types/interrupt-action.mjs +0 -2
  440. package/dist/types/interrupt-action.mjs.map +0 -1
  441. package/dist/types/system-message.d.ts +0 -3
  442. package/dist/types/system-message.js +0 -19
  443. package/dist/types/system-message.js.map +0 -1
  444. package/dist/types/system-message.mjs +0 -1
  445. package/dist/types/system-message.mjs.map +0 -1
  446. package/dist/utils/dev-console.d.ts +0 -3
  447. package/dist/utils/dev-console.js +0 -41
  448. package/dist/utils/dev-console.js.map +0 -1
  449. package/dist/utils/dev-console.mjs +0 -8
  450. package/dist/utils/dev-console.mjs.map +0 -1
  451. package/dist/utils/index.d.ts +0 -2
  452. package/dist/utils/index.js +0 -52
  453. package/dist/utils/index.js.map +0 -1
  454. package/dist/utils/index.mjs +0 -13
  455. package/dist/utils/index.mjs.map +0 -1
  456. package/dist/utils/suggestions-constants.d.ts +0 -9
  457. package/dist/utils/suggestions-constants.js +0 -35
  458. package/dist/utils/suggestions-constants.js.map +0 -1
  459. package/dist/utils/suggestions-constants.mjs +0 -8
  460. package/dist/utils/suggestions-constants.mjs.map +0 -1
  461. package/dist/utils/utils.d.ts +0 -2
  462. package/dist/utils/utils.js +0 -19
  463. package/dist/utils/utils.js.map +0 -1
  464. package/dist/utils/utils.mjs +0 -1
  465. package/dist/utils/utils.mjs.map +0 -1
  466. package/dist/v2/index.d.ts +0 -2
  467. package/dist/v2/index.js +0 -27
  468. package/dist/v2/index.js.map +0 -1
  469. package/dist/v2/index.mjs.map +0 -1
  470. package/dist/v2/index.umd.js.map +0 -1
  471. package/jest.config.js +0 -26
  472. package/rollup.config.mjs +0 -92
  473. package/src/__mocks__/analytics-node.js +0 -9
  474. package/tsup.config.ts +0 -16
@@ -1,29 +0,0 @@
1
- type CoAgentStateRenderProps<T> = {
2
- state: T;
3
- nodeName: string;
4
- status: "inProgress" | "complete";
5
- };
6
- type CoAgentStateRenderHandlerArguments<T> = {
7
- nodeName: string;
8
- state: T;
9
- };
10
- interface CoAgentStateRender<T = any> {
11
- /**
12
- * The name of the coagent.
13
- */
14
- name: string;
15
- /**
16
- * The node name of the coagent.
17
- */
18
- nodeName?: string;
19
- /**
20
- * The handler function to handle the state of the agent.
21
- */
22
- handler?: (props: CoAgentStateRenderHandlerArguments<T>) => void | Promise<void>;
23
- /**
24
- * The render function to handle the state of the agent.
25
- */
26
- render?: ((props: CoAgentStateRenderProps<T>) => string | React.ReactElement | undefined | null) | string;
27
- }
28
-
29
- export { CoAgentStateRender, CoAgentStateRenderHandlerArguments, CoAgentStateRenderProps };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/coagent-action.ts
17
- var coagent_action_exports = {};
18
- module.exports = __toCommonJS(coagent_action_exports);
19
- //# sourceMappingURL=coagent-action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/coagent-action.ts"],"sourcesContent":["export type CoAgentStateRenderProps<T> = {\n state: T;\n nodeName: string;\n status: \"inProgress\" | \"complete\";\n};\n\nexport type CoAgentStateRenderHandlerArguments<T> = {\n nodeName: string;\n state: T;\n};\n\nexport interface CoAgentStateRender<T = any> {\n /**\n * The name of the coagent.\n */\n name: string;\n /**\n * The node name of the coagent.\n */\n nodeName?: string;\n /**\n * The handler function to handle the state of the agent.\n */\n handler?: (\n props: CoAgentStateRenderHandlerArguments<T>,\n ) => void | Promise<void>;\n /**\n * The render function to handle the state of the agent.\n */\n render?:\n | ((\n props: CoAgentStateRenderProps<T>,\n ) => string | React.ReactElement | undefined | null)\n | string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=coagent-action.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,15 +0,0 @@
1
- interface CoagentState {
2
- name: string;
3
- state: any;
4
- running: boolean;
5
- active: boolean;
6
- threadId?: string;
7
- config?: {
8
- configurable?: Record<string, any>;
9
- [key: string]: any;
10
- };
11
- nodeName?: string;
12
- runId?: string;
13
- }
14
-
15
- export { CoagentState };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/coagent-state.ts
17
- var coagent_state_exports = {};
18
- module.exports = __toCommonJS(coagent_state_exports);
19
- //# sourceMappingURL=coagent-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/coagent-state.ts"],"sourcesContent":["export interface CoagentState {\n name: string;\n state: any;\n running: boolean;\n active: boolean;\n threadId?: string;\n config?: {\n configurable?: Record<string, any>;\n [key: string]: any;\n };\n nodeName?: string;\n runId?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=coagent-state.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,79 +0,0 @@
1
- /**
2
- * Status of a response or action that requires user input
3
- */
4
- type CrewsResponseStatus = "inProgress" | "complete" | "executing";
5
- /**
6
- * Response data structure for the ResponseRenderer
7
- */
8
- interface CrewsResponse {
9
- /**
10
- * Unique identifier for the response
11
- */
12
- id: string;
13
- /**
14
- * The content of the response to display
15
- */
16
- content: string;
17
- /**
18
- * Optional metadata for the response
19
- */
20
- metadata?: Record<string, any>;
21
- }
22
- /**
23
- * Base state item interface for agent state items
24
- */
25
- interface CrewsStateItem {
26
- /**
27
- * Unique identifier for the item
28
- */
29
- id: string;
30
- /**
31
- * Timestamp when the item was created
32
- */
33
- timestamp: string;
34
- }
35
- /**
36
- * Tool execution state item
37
- */
38
- interface CrewsToolStateItem extends CrewsStateItem {
39
- /**
40
- * Name of the tool that was executed
41
- */
42
- tool: string;
43
- /**
44
- * Optional thought process for the tool execution
45
- */
46
- thought?: string;
47
- /**
48
- * Result of the tool execution
49
- */
50
- result?: any;
51
- }
52
- /**
53
- * Task state item
54
- */
55
- interface CrewsTaskStateItem extends CrewsStateItem {
56
- /**
57
- * Name of the task
58
- */
59
- name: string;
60
- /**
61
- * Description of the task
62
- */
63
- description?: string;
64
- }
65
- /**
66
- * AgentState containing information about steps and tasks
67
- */
68
- interface CrewsAgentState {
69
- /**
70
- * Array of tool execution steps
71
- */
72
- steps?: CrewsToolStateItem[];
73
- /**
74
- * Array of tasks
75
- */
76
- tasks?: CrewsTaskStateItem[];
77
- }
78
-
79
- export { CrewsAgentState, CrewsResponse, CrewsResponseStatus, CrewsStateItem, CrewsTaskStateItem, CrewsToolStateItem };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/crew.ts
17
- var crew_exports = {};
18
- module.exports = __toCommonJS(crew_exports);
19
- //# sourceMappingURL=crew.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/crew.ts"],"sourcesContent":["/**\n * Status of a response or action that requires user input\n */\nexport type CrewsResponseStatus = \"inProgress\" | \"complete\" | \"executing\";\n\n/**\n * Response data structure for the ResponseRenderer\n */\nexport interface CrewsResponse {\n /**\n * Unique identifier for the response\n */\n id: string;\n\n /**\n * The content of the response to display\n */\n content: string;\n\n /**\n * Optional metadata for the response\n */\n metadata?: Record<string, any>;\n}\n\n/**\n * Base state item interface for agent state items\n */\nexport interface CrewsStateItem {\n /**\n * Unique identifier for the item\n */\n id: string;\n\n /**\n * Timestamp when the item was created\n */\n timestamp: string;\n}\n\n/**\n * Tool execution state item\n */\nexport interface CrewsToolStateItem extends CrewsStateItem {\n /**\n * Name of the tool that was executed\n */\n tool: string;\n\n /**\n * Optional thought process for the tool execution\n */\n thought?: string;\n\n /**\n * Result of the tool execution\n */\n result?: any;\n}\n\n/**\n * Task state item\n */\nexport interface CrewsTaskStateItem extends CrewsStateItem {\n /**\n * Name of the task\n */\n name: string;\n\n /**\n * Description of the task\n */\n description?: string;\n}\n\n/**\n * AgentState containing information about steps and tasks\n */\nexport interface CrewsAgentState {\n /**\n * Array of tool execution steps\n */\n steps?: CrewsToolStateItem[];\n\n /**\n * Array of tasks\n */\n tasks?: CrewsTaskStateItem[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1,2 +0,0 @@
1
- import "../chunk-6YOKPWQ7.mjs";
2
- //# sourceMappingURL=crew.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,9 +0,0 @@
1
- interface DocumentPointer {
2
- id: string;
3
- name: string;
4
- sourceApplication: string;
5
- iconImageUri: string;
6
- getContents: () => string;
7
- }
8
-
9
- export { DocumentPointer };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/document-pointer.ts
17
- var document_pointer_exports = {};
18
- module.exports = __toCommonJS(document_pointer_exports);
19
- //# sourceMappingURL=document-pointer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/document-pointer.ts"],"sourcesContent":["export interface DocumentPointer {\n id: string;\n name: string;\n sourceApplication: string;\n iconImageUri: string;\n getContents: () => string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=document-pointer.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,127 +0,0 @@
1
- import { ActionInputAvailability } from '@copilotkit/runtime-client-gql';
2
- import { Parameter, Action, MappedParameterTypes } from '@copilotkit/shared';
3
- import React__default from 'react';
4
-
5
- interface InProgressState<T extends Parameter[] | [] = []> {
6
- status: "inProgress";
7
- args: Partial<MappedParameterTypes<T>>;
8
- result: undefined;
9
- }
10
- interface ExecutingState<T extends Parameter[] | [] = []> {
11
- status: "executing";
12
- args: MappedParameterTypes<T>;
13
- result: undefined;
14
- }
15
- interface CompleteState<T extends Parameter[] | [] = []> {
16
- status: "complete";
17
- args: MappedParameterTypes<T>;
18
- result: any;
19
- }
20
- interface InProgressStateNoArgs<T extends Parameter[] | [] = []> {
21
- status: "inProgress";
22
- args: Partial<MappedParameterTypes<T>>;
23
- result: undefined;
24
- }
25
- interface ExecutingStateNoArgs<T extends Parameter[] | [] = []> {
26
- status: "executing";
27
- args: MappedParameterTypes<T>;
28
- result: undefined;
29
- }
30
- interface CompleteStateNoArgs<T extends Parameter[] | [] = []> {
31
- status: "complete";
32
- args: MappedParameterTypes<T>;
33
- result: any;
34
- }
35
- interface InProgressStateWait<T extends Parameter[] | [] = []> {
36
- status: "inProgress";
37
- args: Partial<MappedParameterTypes<T>>;
38
- /** @deprecated use respond instead */
39
- handler: undefined;
40
- respond: undefined;
41
- result: undefined;
42
- }
43
- interface ExecutingStateWait<T extends Parameter[] | [] = []> {
44
- status: "executing";
45
- args: MappedParameterTypes<T>;
46
- /** @deprecated use respond instead */
47
- handler: (result: any) => void;
48
- respond: (result: any) => void;
49
- result: undefined;
50
- }
51
- interface CompleteStateWait<T extends Parameter[] | [] = []> {
52
- status: "complete";
53
- args: MappedParameterTypes<T>;
54
- /** @deprecated use respond instead */
55
- handler: undefined;
56
- respond: undefined;
57
- result: any;
58
- }
59
- interface InProgressStateNoArgsWait<T extends Parameter[] | [] = []> {
60
- status: "inProgress";
61
- args: Partial<MappedParameterTypes<T>>;
62
- /** @deprecated use respond instead */
63
- handler: undefined;
64
- respond: undefined;
65
- result: undefined;
66
- }
67
- interface ExecutingStateNoArgsWait<T extends Parameter[] | [] = []> {
68
- status: "executing";
69
- args: MappedParameterTypes<T>;
70
- /** @deprecated use respond instead */
71
- handler: (result: any) => void;
72
- respond: (result: any) => void;
73
- result: undefined;
74
- }
75
- interface CompleteStateNoArgsWait<T extends Parameter[] | [] = []> {
76
- status: "complete";
77
- args: MappedParameterTypes<T>;
78
- /** @deprecated use respond instead */
79
- handler: undefined;
80
- respond: undefined;
81
- }
82
- type ActionRenderProps<T extends Parameter[] | [] = []> = CompleteState<T> | ExecutingState<T> | InProgressState<T>;
83
- type ActionRenderPropsNoArgs<T extends Parameter[] | [] = []> = CompleteStateNoArgs<T> | ExecutingStateNoArgs<T> | InProgressStateNoArgs<T>;
84
- type ActionRenderPropsWait<T extends Parameter[] | [] = []> = CompleteStateWait<T> | ExecutingStateWait<T> | InProgressStateWait<T>;
85
- type ActionRenderPropsNoArgsWait<T extends Parameter[] | [] = []> = CompleteStateNoArgsWait<T> | ExecutingStateNoArgsWait<T> | InProgressStateNoArgsWait<T>;
86
- type CatchAllActionRenderProps<T extends Parameter[] | [] = []> = (CompleteState<T> & {
87
- name: string;
88
- }) | (ExecutingState<T> & {
89
- name: string;
90
- }) | (InProgressState<T> & {
91
- name: string;
92
- });
93
- type FrontendActionAvailability = "disabled" | "enabled" | "remote" | "frontend";
94
- type FrontendAction<T extends Parameter[] | [] = [], N extends string = string> = Action<T> & {
95
- name: Exclude<N, "*">;
96
- /**
97
- * @deprecated Use `available` instead.
98
- */
99
- disabled?: boolean;
100
- available?: FrontendActionAvailability;
101
- pairedAction?: string;
102
- followUp?: boolean;
103
- } & ({
104
- render?: string | (T extends [] ? (props: ActionRenderPropsNoArgs<T>) => string | React__default.ReactElement : (props: ActionRenderProps<T>) => string | React__default.ReactElement);
105
- /** @deprecated use renderAndWaitForResponse instead */
106
- renderAndWait?: never;
107
- renderAndWaitForResponse?: never;
108
- } | {
109
- render?: never;
110
- /** @deprecated use renderAndWaitForResponse instead */
111
- renderAndWait?: T extends [] ? (props: ActionRenderPropsNoArgsWait<T>) => React__default.ReactElement : (props: ActionRenderPropsWait<T>) => React__default.ReactElement;
112
- renderAndWaitForResponse?: T extends [] ? (props: ActionRenderPropsNoArgsWait<T>) => React__default.ReactElement : (props: ActionRenderPropsWait<T>) => React__default.ReactElement;
113
- handler?: never;
114
- });
115
- type CatchAllFrontendAction = {
116
- name: "*";
117
- render: (props: CatchAllActionRenderProps<any>) => React__default.ReactElement;
118
- };
119
- type RenderFunctionStatus = ActionRenderProps<any>["status"];
120
- declare function processActionsForRuntimeRequest(actions: FrontendAction<any>[]): {
121
- name: string;
122
- description: string;
123
- jsonSchema: string;
124
- available: ActionInputAvailability;
125
- }[];
126
-
127
- export { ActionRenderProps, ActionRenderPropsNoArgs, ActionRenderPropsNoArgsWait, ActionRenderPropsWait, CatchAllActionRenderProps, CatchAllFrontendAction, FrontendAction, FrontendActionAvailability, RenderFunctionStatus, processActionsForRuntimeRequest };
@@ -1,55 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/types/frontend-action.ts
21
- var frontend_action_exports = {};
22
- __export(frontend_action_exports, {
23
- processActionsForRuntimeRequest: () => processActionsForRuntimeRequest
24
- });
25
- module.exports = __toCommonJS(frontend_action_exports);
26
- var import_runtime_client_gql = require("@copilotkit/runtime-client-gql");
27
- var import_shared = require("@copilotkit/shared");
28
- function processActionsForRuntimeRequest(actions) {
29
- const filteredActions = actions.filter(
30
- (action) => action.available !== import_runtime_client_gql.ActionInputAvailability.Disabled && action.disabled !== true && action.name !== "*" && action.available != "frontend" && !action.pairedAction
31
- ).map((action) => {
32
- let available = import_runtime_client_gql.ActionInputAvailability.Enabled;
33
- if (action.disabled) {
34
- available = import_runtime_client_gql.ActionInputAvailability.Disabled;
35
- } else if (action.available === "disabled") {
36
- available = import_runtime_client_gql.ActionInputAvailability.Disabled;
37
- } else if (action.available === "remote") {
38
- available = import_runtime_client_gql.ActionInputAvailability.Remote;
39
- }
40
- return {
41
- name: action.name,
42
- description: action.description || "",
43
- jsonSchema: JSON.stringify(
44
- (0, import_shared.actionParametersToJsonSchema)(action.parameters || [])
45
- ),
46
- available
47
- };
48
- });
49
- return filteredActions;
50
- }
51
- // Annotate the CommonJS export names for ESM import in node:
52
- 0 && (module.exports = {
53
- processActionsForRuntimeRequest
54
- });
55
- //# sourceMappingURL=frontend-action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/frontend-action.ts"],"sourcesContent":["import { ActionInputAvailability } from \"@copilotkit/runtime-client-gql\";\nimport {\n Action,\n Parameter,\n MappedParameterTypes,\n actionParametersToJsonSchema,\n} from \"@copilotkit/shared\";\nimport React from \"react\";\n\ninterface InProgressState<T extends Parameter[] | [] = []> {\n status: \"inProgress\";\n args: Partial<MappedParameterTypes<T>>;\n result: undefined;\n}\n\ninterface ExecutingState<T extends Parameter[] | [] = []> {\n status: \"executing\";\n args: MappedParameterTypes<T>;\n result: undefined;\n}\n\ninterface CompleteState<T extends Parameter[] | [] = []> {\n status: \"complete\";\n args: MappedParameterTypes<T>;\n result: any;\n}\n\ninterface InProgressStateNoArgs<T extends Parameter[] | [] = []> {\n status: \"inProgress\";\n args: Partial<MappedParameterTypes<T>>;\n result: undefined;\n}\n\ninterface ExecutingStateNoArgs<T extends Parameter[] | [] = []> {\n status: \"executing\";\n args: MappedParameterTypes<T>;\n result: undefined;\n}\n\ninterface CompleteStateNoArgs<T extends Parameter[] | [] = []> {\n status: \"complete\";\n args: MappedParameterTypes<T>;\n result: any;\n}\n\ninterface InProgressStateWait<T extends Parameter[] | [] = []> {\n status: \"inProgress\";\n args: Partial<MappedParameterTypes<T>>;\n /** @deprecated use respond instead */\n handler: undefined;\n respond: undefined;\n result: undefined;\n}\n\ninterface ExecutingStateWait<T extends Parameter[] | [] = []> {\n status: \"executing\";\n args: MappedParameterTypes<T>;\n /** @deprecated use respond instead */\n handler: (result: any) => void;\n respond: (result: any) => void;\n result: undefined;\n}\n\ninterface CompleteStateWait<T extends Parameter[] | [] = []> {\n status: \"complete\";\n args: MappedParameterTypes<T>;\n /** @deprecated use respond instead */\n handler: undefined;\n respond: undefined;\n result: any;\n}\n\ninterface InProgressStateNoArgsWait<T extends Parameter[] | [] = []> {\n status: \"inProgress\";\n args: Partial<MappedParameterTypes<T>>;\n /** @deprecated use respond instead */\n handler: undefined;\n respond: undefined;\n result: undefined;\n}\n\ninterface ExecutingStateNoArgsWait<T extends Parameter[] | [] = []> {\n status: \"executing\";\n args: MappedParameterTypes<T>;\n /** @deprecated use respond instead */\n handler: (result: any) => void;\n respond: (result: any) => void;\n result: undefined;\n}\n\ninterface CompleteStateNoArgsWait<T extends Parameter[] | [] = []> {\n status: \"complete\";\n args: MappedParameterTypes<T>;\n /** @deprecated use respond instead */\n handler: undefined;\n respond: undefined;\n}\n\nexport type ActionRenderProps<T extends Parameter[] | [] = []> =\n | CompleteState<T>\n | ExecutingState<T>\n | InProgressState<T>;\n\nexport type ActionRenderPropsNoArgs<T extends Parameter[] | [] = []> =\n | CompleteStateNoArgs<T>\n | ExecutingStateNoArgs<T>\n | InProgressStateNoArgs<T>;\n\nexport type ActionRenderPropsWait<T extends Parameter[] | [] = []> =\n | CompleteStateWait<T>\n | ExecutingStateWait<T>\n | InProgressStateWait<T>;\n\nexport type ActionRenderPropsNoArgsWait<T extends Parameter[] | [] = []> =\n | CompleteStateNoArgsWait<T>\n | ExecutingStateNoArgsWait<T>\n | InProgressStateNoArgsWait<T>;\n\nexport type CatchAllActionRenderProps<T extends Parameter[] | [] = []> =\n | (CompleteState<T> & {\n name: string;\n })\n | (ExecutingState<T> & {\n name: string;\n })\n | (InProgressState<T> & {\n name: string;\n });\n\nexport type FrontendActionAvailability =\n | \"disabled\"\n | \"enabled\"\n | \"remote\"\n | \"frontend\";\n\nexport type FrontendAction<\n T extends Parameter[] | [] = [],\n N extends string = string,\n> = Action<T> & {\n name: Exclude<N, \"*\">;\n /**\n * @deprecated Use `available` instead.\n */\n disabled?: boolean;\n available?: FrontendActionAvailability;\n pairedAction?: string;\n followUp?: boolean;\n} & (\n | {\n render?:\n | string\n | (T extends []\n ? (\n props: ActionRenderPropsNoArgs<T>,\n ) => string | React.ReactElement\n : (props: ActionRenderProps<T>) => string | React.ReactElement);\n /** @deprecated use renderAndWaitForResponse instead */\n renderAndWait?: never;\n renderAndWaitForResponse?: never;\n }\n | {\n render?: never;\n /** @deprecated use renderAndWaitForResponse instead */\n renderAndWait?: T extends []\n ? (props: ActionRenderPropsNoArgsWait<T>) => React.ReactElement\n : (props: ActionRenderPropsWait<T>) => React.ReactElement;\n renderAndWaitForResponse?: T extends []\n ? (props: ActionRenderPropsNoArgsWait<T>) => React.ReactElement\n : (props: ActionRenderPropsWait<T>) => React.ReactElement;\n handler?: never;\n }\n );\n\nexport type CatchAllFrontendAction = {\n name: \"*\";\n render: (props: CatchAllActionRenderProps<any>) => React.ReactElement;\n};\n\nexport type RenderFunctionStatus = ActionRenderProps<any>[\"status\"];\n\nexport function processActionsForRuntimeRequest(\n actions: FrontendAction<any>[],\n) {\n const filteredActions = actions\n .filter(\n (action) =>\n action.available !== ActionInputAvailability.Disabled &&\n action.disabled !== true &&\n action.name !== \"*\" &&\n action.available != \"frontend\" &&\n !action.pairedAction,\n )\n .map((action) => {\n let available: ActionInputAvailability | undefined =\n ActionInputAvailability.Enabled;\n if (action.disabled) {\n available = ActionInputAvailability.Disabled;\n } else if (action.available === \"disabled\") {\n available = ActionInputAvailability.Disabled;\n } else if (action.available === \"remote\") {\n available = ActionInputAvailability.Remote;\n }\n return {\n name: action.name,\n description: action.description || \"\",\n jsonSchema: JSON.stringify(\n actionParametersToJsonSchema(action.parameters || []),\n ),\n available,\n };\n });\n return filteredActions;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAwC;AACxC,oBAKO;AA8KA,SAAS,gCACd,SACA;AACA,QAAM,kBAAkB,QACrB;AAAA,IACC,CAAC,WACC,OAAO,cAAc,kDAAwB,YAC7C,OAAO,aAAa,QACpB,OAAO,SAAS,OAChB,OAAO,aAAa,cACpB,CAAC,OAAO;AAAA,EACZ,EACC,IAAI,CAAC,WAAW;AACf,QAAI,YACF,kDAAwB;AAC1B,QAAI,OAAO,UAAU;AACnB,kBAAY,kDAAwB;AAAA,IACtC,WAAW,OAAO,cAAc,YAAY;AAC1C,kBAAY,kDAAwB;AAAA,IACtC,WAAW,OAAO,cAAc,UAAU;AACxC,kBAAY,kDAAwB;AAAA,IACtC;AACA,WAAO;AAAA,MACL,MAAM,OAAO;AAAA,MACb,aAAa,OAAO,eAAe;AAAA,MACnC,YAAY,KAAK;AAAA,YACf,4CAA6B,OAAO,cAAc,CAAC,CAAC;AAAA,MACtD;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH,SAAO;AACT;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- processActionsForRuntimeRequest
3
- } from "../chunk-TPN7WC53.mjs";
4
- import "../chunk-SKC7AJIV.mjs";
5
- export {
6
- processActionsForRuntimeRequest
7
- };
8
- //# sourceMappingURL=frontend-action.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,12 +0,0 @@
1
- export { DocumentPointer } from './document-pointer.js';
2
- export { SystemMessageFunction } from './system-message.js';
3
- export { ActionRenderProps, ActionRenderPropsNoArgs, ActionRenderPropsNoArgsWait, ActionRenderPropsWait, CatchAllActionRenderProps, CatchAllFrontendAction, FrontendAction, FrontendActionAvailability, RenderFunctionStatus } from './frontend-action.js';
4
- export { CopilotChatSuggestionConfiguration } from './chat-suggestion-configuration.js';
5
- export { CrewsAgentState, CrewsResponse, CrewsResponseStatus, CrewsStateItem, CrewsTaskStateItem, CrewsToolStateItem } from './crew.js';
6
- export { f as LangGraphInterruptAction, h as LangGraphInterruptActionSetter, g as LangGraphInterruptActionSetterArgs, e as LangGraphInterruptRender, L as LangGraphInterruptRenderHandlerProps, d as LangGraphInterruptRenderProps, Q as QueuedInterruptEvent } from '../copilot-context-ec77e921.js';
7
- import '@copilotkit/runtime-client-gql';
8
- import '@copilotkit/shared';
9
- import 'react';
10
- import '../hooks/use-tree.js';
11
- import './coagent-action.js';
12
- import './coagent-state.js';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/index.ts
17
- var types_exports = {};
18
- module.exports = __toCommonJS(types_exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export type { DocumentPointer } from \"./document-pointer\";\nexport type { SystemMessageFunction } from \"./system-message\";\nexport type {\n ActionRenderProps,\n ActionRenderPropsNoArgs,\n ActionRenderPropsWait,\n ActionRenderPropsNoArgsWait,\n FrontendAction,\n FrontendActionAvailability,\n RenderFunctionStatus,\n CatchAllActionRenderProps,\n CatchAllFrontendAction,\n} from \"./frontend-action\";\n\nexport type { CopilotChatSuggestionConfiguration } from \"./chat-suggestion-configuration\";\nexport * from \"./crew\";\nexport * from \"./interrupt-action\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1,4 +0,0 @@
1
- import "../chunk-FD6FGKYY.mjs";
2
- import "../chunk-36KQV2NA.mjs";
3
- import "../chunk-6YOKPWQ7.mjs";
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,10 +0,0 @@
1
- import '@copilotkit/runtime-client-gql';
2
- export { f as LangGraphInterruptAction, h as LangGraphInterruptActionSetter, g as LangGraphInterruptActionSetterArgs, e as LangGraphInterruptRender, L as LangGraphInterruptRenderHandlerProps, d as LangGraphInterruptRenderProps, Q as QueuedInterruptEvent } from '../copilot-context-ec77e921.js';
3
- import '@copilotkit/shared';
4
- import './frontend-action.js';
5
- import 'react';
6
- import '../hooks/use-tree.js';
7
- import './document-pointer.js';
8
- import './chat-suggestion-configuration.js';
9
- import './coagent-action.js';
10
- import './coagent-state.js';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/interrupt-action.ts
17
- var interrupt_action_exports = {};
18
- module.exports = __toCommonJS(interrupt_action_exports);
19
- //# sourceMappingURL=interrupt-action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/interrupt-action.ts"],"sourcesContent":["import { LangGraphInterruptEvent } from \"@copilotkit/runtime-client-gql\";\nimport { AgentSession } from \"../context/copilot-context\";\n\nexport interface LangGraphInterruptRenderHandlerProps<TEventValue = any> {\n event: LangGraphInterruptEvent<TEventValue>;\n resolve: (resolution: string) => void;\n}\n\nexport interface LangGraphInterruptRenderProps<TEventValue = any> {\n result: unknown;\n event: LangGraphInterruptEvent<TEventValue>;\n resolve: (resolution: string) => void;\n}\n\nexport interface LangGraphInterruptRender<TEventValue = any> {\n id: string;\n /**\n * The handler function to handle the event.\n */\n handler?: (\n props: LangGraphInterruptRenderHandlerProps<TEventValue>,\n ) => any | Promise<any>;\n /**\n * The render function to handle the event.\n */\n render?: (\n props: LangGraphInterruptRenderProps<TEventValue>,\n ) => string | React.ReactElement;\n /**\n * Method that returns a boolean, indicating if the interrupt action should run\n * Useful when using multiple interrupts\n */\n enabled?: (args: {\n eventValue: TEventValue;\n agentMetadata: AgentSession;\n }) => boolean;\n}\n\nexport type LangGraphInterruptAction = LangGraphInterruptRender & {\n event?: LangGraphInterruptEvent;\n};\n\nexport type LangGraphInterruptActionSetterArgs =\n Partial<LangGraphInterruptRender> | null;\nexport type LangGraphInterruptActionSetter = (\n action: LangGraphInterruptActionSetterArgs,\n) => void;\n\nexport interface QueuedInterruptEvent {\n eventId: string; // Generated unique ID for tracking\n threadId: string;\n event: LangGraphInterruptEvent;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1,2 +0,0 @@
1
- import "../chunk-36KQV2NA.mjs";
2
- //# sourceMappingURL=interrupt-action.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,3 +0,0 @@
1
- type SystemMessageFunction = (contextString: string, additionalInstructions?: string) => string;
2
-
3
- export { SystemMessageFunction };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/system-message.ts
17
- var system_message_exports = {};
18
- module.exports = __toCommonJS(system_message_exports);
19
- //# sourceMappingURL=system-message.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/system-message.ts"],"sourcesContent":["export type SystemMessageFunction = (\n contextString: string,\n additionalInstructions?: string,\n) => string;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=system-message.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,3 +0,0 @@
1
- declare function shouldShowDevConsole(showDevConsole?: boolean): boolean;
2
-
3
- export { shouldShowDevConsole };