@copilotkit/react-core 2.0.0-next.1 → 2.0.0-rc.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 (538) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -12
  3. package/dist/MarkdownRendererContext-B4Us6mwL.d.cts +954 -0
  4. package/dist/MarkdownRendererContext-B4Us6mwL.d.cts.map +1 -0
  5. package/dist/MarkdownRendererContext-CRKFzsEB.d.mts +954 -0
  6. package/dist/MarkdownRendererContext-CRKFzsEB.d.mts.map +1 -0
  7. package/dist/MarkdownSurfaces-C2XZISKn.cjs +3964 -0
  8. package/dist/MarkdownSurfaces-C2XZISKn.cjs.map +1 -0
  9. package/dist/MarkdownSurfaces-ChSlVYOk.mjs +3655 -0
  10. package/dist/MarkdownSurfaces-ChSlVYOk.mjs.map +1 -0
  11. package/dist/context.cjs +144 -0
  12. package/dist/context.cjs.map +1 -0
  13. package/dist/context.d.cts +166 -0
  14. package/dist/context.d.cts.map +1 -0
  15. package/dist/context.d.mts +166 -0
  16. package/dist/context.d.mts.map +1 -0
  17. package/dist/context.mjs +136 -0
  18. package/dist/context.mjs.map +1 -0
  19. package/dist/generative-ui.cjs +8151 -0
  20. package/dist/generative-ui.cjs.map +1 -0
  21. package/dist/generative-ui.d.cts +4952 -0
  22. package/dist/generative-ui.d.cts.map +1 -0
  23. package/dist/generative-ui.d.mts +4952 -0
  24. package/dist/generative-ui.d.mts.map +1 -0
  25. package/dist/generative-ui.mjs +8137 -0
  26. package/dist/generative-ui.mjs.map +1 -0
  27. package/dist/headless.cjs +1927 -0
  28. package/dist/headless.cjs.map +1 -0
  29. package/dist/headless.d.cts +1117 -0
  30. package/dist/headless.d.cts.map +1 -0
  31. package/dist/headless.d.mts +1008 -0
  32. package/dist/headless.d.mts.map +1 -0
  33. package/dist/headless.mjs +1869 -0
  34. package/dist/headless.mjs.map +1 -0
  35. package/dist/index.cjs +15576 -0
  36. package/dist/index.cjs.map +1 -0
  37. package/dist/index.css +2 -0
  38. package/dist/index.d.cts +3450 -0
  39. package/dist/index.d.cts.map +1 -0
  40. package/dist/index.d.mts +3433 -0
  41. package/dist/index.d.mts.map +1 -0
  42. package/dist/index.mjs +13927 -146
  43. package/dist/index.mjs.map +1 -1
  44. package/dist/index.umd.js +18856 -0
  45. package/dist/index.umd.js.map +1 -0
  46. package/package.json +124 -52
  47. package/CHANGELOG.md +0 -4210
  48. package/dist/chunk-2IDV5OHF.mjs +0 -11
  49. package/dist/chunk-2IDV5OHF.mjs.map +0 -1
  50. package/dist/chunk-36KQV2NA.mjs +0 -1
  51. package/dist/chunk-36KQV2NA.mjs.map +0 -1
  52. package/dist/chunk-3V5TOYKW.mjs +0 -120
  53. package/dist/chunk-3V5TOYKW.mjs.map +0 -1
  54. package/dist/chunk-4CEQJ2X6.mjs +0 -31
  55. package/dist/chunk-4CEQJ2X6.mjs.map +0 -1
  56. package/dist/chunk-4RRMC7L2.mjs +0 -32
  57. package/dist/chunk-4RRMC7L2.mjs.map +0 -1
  58. package/dist/chunk-4YZA2BZC.mjs +0 -551
  59. package/dist/chunk-4YZA2BZC.mjs.map +0 -1
  60. package/dist/chunk-53K6WNJG.mjs +0 -36
  61. package/dist/chunk-53K6WNJG.mjs.map +0 -1
  62. package/dist/chunk-6ESSSQ7Q.mjs +0 -134
  63. package/dist/chunk-6ESSSQ7Q.mjs.map +0 -1
  64. package/dist/chunk-6PUNP7CD.mjs +0 -102
  65. package/dist/chunk-6PUNP7CD.mjs.map +0 -1
  66. package/dist/chunk-6YOKPWQ7.mjs +0 -1
  67. package/dist/chunk-6YOKPWQ7.mjs.map +0 -1
  68. package/dist/chunk-6ZLPNY7X.mjs +0 -225
  69. package/dist/chunk-6ZLPNY7X.mjs.map +0 -1
  70. package/dist/chunk-7DTB7S5V.mjs +0 -83
  71. package/dist/chunk-7DTB7S5V.mjs.map +0 -1
  72. package/dist/chunk-7IBF6RBW.mjs +0 -23
  73. package/dist/chunk-7IBF6RBW.mjs.map +0 -1
  74. package/dist/chunk-A6NKSGH3.mjs +0 -1
  75. package/dist/chunk-A6NKSGH3.mjs.map +0 -1
  76. package/dist/chunk-ABWT4DRT.mjs +0 -24
  77. package/dist/chunk-ABWT4DRT.mjs.map +0 -1
  78. package/dist/chunk-AFNWX62Q.mjs +0 -110
  79. package/dist/chunk-AFNWX62Q.mjs.map +0 -1
  80. package/dist/chunk-BUSWSDYO.mjs +0 -17
  81. package/dist/chunk-BUSWSDYO.mjs.map +0 -1
  82. package/dist/chunk-CDUIA2WM.mjs +0 -60
  83. package/dist/chunk-CDUIA2WM.mjs.map +0 -1
  84. package/dist/chunk-CYDWEPFL.mjs +0 -1
  85. package/dist/chunk-CYDWEPFL.mjs.map +0 -1
  86. package/dist/chunk-DMLQZG75.mjs +0 -25
  87. package/dist/chunk-DMLQZG75.mjs.map +0 -1
  88. package/dist/chunk-E7SE25ZU.mjs +0 -59
  89. package/dist/chunk-E7SE25ZU.mjs.map +0 -1
  90. package/dist/chunk-EFL5OBKN.mjs +0 -310
  91. package/dist/chunk-EFL5OBKN.mjs.map +0 -1
  92. package/dist/chunk-F555TVE4.mjs +0 -33
  93. package/dist/chunk-F555TVE4.mjs.map +0 -1
  94. package/dist/chunk-FD6FGKYY.mjs +0 -1
  95. package/dist/chunk-FD6FGKYY.mjs.map +0 -1
  96. package/dist/chunk-FDOMAPJY.mjs +0 -59
  97. package/dist/chunk-FDOMAPJY.mjs.map +0 -1
  98. package/dist/chunk-FQFXYAV7.mjs +0 -86
  99. package/dist/chunk-FQFXYAV7.mjs.map +0 -1
  100. package/dist/chunk-GPEJNVE5.mjs +0 -80
  101. package/dist/chunk-GPEJNVE5.mjs.map +0 -1
  102. package/dist/chunk-HE22TZMF.mjs +0 -186
  103. package/dist/chunk-HE22TZMF.mjs.map +0 -1
  104. package/dist/chunk-I76HKHPJ.mjs +0 -32
  105. package/dist/chunk-I76HKHPJ.mjs.map +0 -1
  106. package/dist/chunk-ICIK2BSB.mjs +0 -17
  107. package/dist/chunk-ICIK2BSB.mjs.map +0 -1
  108. package/dist/chunk-JD7BAH7U.mjs +0 -1
  109. package/dist/chunk-JD7BAH7U.mjs.map +0 -1
  110. package/dist/chunk-LHERIF3L.mjs +0 -83
  111. package/dist/chunk-LHERIF3L.mjs.map +0 -1
  112. package/dist/chunk-LSHFN2Y5.mjs +0 -349
  113. package/dist/chunk-LSHFN2Y5.mjs.map +0 -1
  114. package/dist/chunk-LUGEI4YQ.mjs +0 -1
  115. package/dist/chunk-LUGEI4YQ.mjs.map +0 -1
  116. package/dist/chunk-NB2FKV2V.mjs +0 -1
  117. package/dist/chunk-NB2FKV2V.mjs.map +0 -1
  118. package/dist/chunk-NBK4KBLX.mjs +0 -54
  119. package/dist/chunk-NBK4KBLX.mjs.map +0 -1
  120. package/dist/chunk-O7ARI5CV.mjs +0 -31
  121. package/dist/chunk-O7ARI5CV.mjs.map +0 -1
  122. package/dist/chunk-PIF5KJYI.mjs +0 -103
  123. package/dist/chunk-PIF5KJYI.mjs.map +0 -1
  124. package/dist/chunk-PMAFHQ7P.mjs +0 -65
  125. package/dist/chunk-PMAFHQ7P.mjs.map +0 -1
  126. package/dist/chunk-QNUAXSDP.mjs +0 -166
  127. package/dist/chunk-QNUAXSDP.mjs.map +0 -1
  128. package/dist/chunk-RKTVJRK7.mjs +0 -143
  129. package/dist/chunk-RKTVJRK7.mjs.map +0 -1
  130. package/dist/chunk-SKC7AJIV.mjs +0 -61
  131. package/dist/chunk-SKC7AJIV.mjs.map +0 -1
  132. package/dist/chunk-SPCZTZCY.mjs +0 -1
  133. package/dist/chunk-SPCZTZCY.mjs.map +0 -1
  134. package/dist/chunk-VV56AVPB.mjs +0 -125
  135. package/dist/chunk-VV56AVPB.mjs.map +0 -1
  136. package/dist/chunk-WF65O6HX.mjs +0 -66
  137. package/dist/chunk-WF65O6HX.mjs.map +0 -1
  138. package/dist/chunk-XDFVCQD3.mjs +0 -27
  139. package/dist/chunk-XDFVCQD3.mjs.map +0 -1
  140. package/dist/chunk-YCG6SNAU.mjs +0 -759
  141. package/dist/chunk-YCG6SNAU.mjs.map +0 -1
  142. package/dist/chunk-YTQHRJUA.mjs +0 -86
  143. package/dist/chunk-YTQHRJUA.mjs.map +0 -1
  144. package/dist/chunk-YYN33GSG.mjs +0 -73
  145. package/dist/chunk-YYN33GSG.mjs.map +0 -1
  146. package/dist/chunk-Z6JV2LRY.mjs +0 -37
  147. package/dist/chunk-Z6JV2LRY.mjs.map +0 -1
  148. package/dist/chunk-ZVF5Q6IH.mjs +0 -29
  149. package/dist/chunk-ZVF5Q6IH.mjs.map +0 -1
  150. package/dist/chunk-ZYTXB6HH.mjs +0 -151
  151. package/dist/chunk-ZYTXB6HH.mjs.map +0 -1
  152. package/dist/components/CopilotListeners.d.ts +0 -3
  153. package/dist/components/CopilotListeners.js +0 -101
  154. package/dist/components/CopilotListeners.js.map +0 -1
  155. package/dist/components/CopilotListeners.mjs +0 -9
  156. package/dist/components/CopilotListeners.mjs.map +0 -1
  157. package/dist/components/copilot-provider/copilot-messages.d.ts +0 -24
  158. package/dist/components/copilot-provider/copilot-messages.js +0 -351
  159. package/dist/components/copilot-provider/copilot-messages.js.map +0 -1
  160. package/dist/components/copilot-provider/copilot-messages.mjs +0 -16
  161. package/dist/components/copilot-provider/copilot-messages.mjs.map +0 -1
  162. package/dist/components/copilot-provider/copilotkit-props.d.ts +0 -160
  163. package/dist/components/copilot-provider/copilotkit-props.js +0 -19
  164. package/dist/components/copilot-provider/copilotkit-props.js.map +0 -1
  165. package/dist/components/copilot-provider/copilotkit-props.mjs +0 -1
  166. package/dist/components/copilot-provider/copilotkit-props.mjs.map +0 -1
  167. package/dist/components/copilot-provider/copilotkit.d.ts +0 -19
  168. package/dist/components/copilot-provider/copilotkit.js +0 -1960
  169. package/dist/components/copilot-provider/copilotkit.js.map +0 -1
  170. package/dist/components/copilot-provider/copilotkit.mjs +0 -31
  171. package/dist/components/copilot-provider/copilotkit.mjs.map +0 -1
  172. package/dist/components/copilot-provider/index.d.ts +0 -14
  173. package/dist/components/copilot-provider/index.js +0 -1960
  174. package/dist/components/copilot-provider/index.js.map +0 -1
  175. package/dist/components/copilot-provider/index.mjs +0 -30
  176. package/dist/components/copilot-provider/index.mjs.map +0 -1
  177. package/dist/components/dev-console/console-trigger.d.ts +0 -8
  178. package/dist/components/dev-console/console-trigger.js +0 -1202
  179. package/dist/components/dev-console/console-trigger.js.map +0 -1
  180. package/dist/components/dev-console/console-trigger.mjs +0 -233
  181. package/dist/components/dev-console/console-trigger.mjs.map +0 -1
  182. package/dist/components/dev-console/developer-console-modal.d.ts +0 -10
  183. package/dist/components/dev-console/developer-console-modal.js +0 -987
  184. package/dist/components/dev-console/developer-console-modal.js.map +0 -1
  185. package/dist/components/dev-console/developer-console-modal.mjs +0 -12
  186. package/dist/components/dev-console/developer-console-modal.mjs.map +0 -1
  187. package/dist/components/dev-console/icons.d.ts +0 -9
  188. package/dist/components/dev-console/icons.js +0 -131
  189. package/dist/components/dev-console/icons.js.map +0 -1
  190. package/dist/components/dev-console/icons.mjs +0 -16
  191. package/dist/components/dev-console/icons.mjs.map +0 -1
  192. package/dist/components/error-boundary/error-boundary.d.ts +0 -31
  193. package/dist/components/error-boundary/error-boundary.js +0 -500
  194. package/dist/components/error-boundary/error-boundary.js.map +0 -1
  195. package/dist/components/error-boundary/error-boundary.mjs +0 -15
  196. package/dist/components/error-boundary/error-boundary.mjs.map +0 -1
  197. package/dist/components/error-boundary/error-utils.d.ts +0 -11
  198. package/dist/components/error-boundary/error-utils.js +0 -190
  199. package/dist/components/error-boundary/error-utils.js.map +0 -1
  200. package/dist/components/error-boundary/error-utils.mjs +0 -14
  201. package/dist/components/error-boundary/error-utils.mjs.map +0 -1
  202. package/dist/components/index.d.ts +0 -14
  203. package/dist/components/index.js +0 -1960
  204. package/dist/components/index.js.map +0 -1
  205. package/dist/components/index.mjs +0 -31
  206. package/dist/components/index.mjs.map +0 -1
  207. package/dist/components/toast/exclamation-mark-icon.d.ts +0 -9
  208. package/dist/components/toast/exclamation-mark-icon.js +0 -55
  209. package/dist/components/toast/exclamation-mark-icon.js.map +0 -1
  210. package/dist/components/toast/exclamation-mark-icon.mjs +0 -8
  211. package/dist/components/toast/exclamation-mark-icon.mjs.map +0 -1
  212. package/dist/components/toast/toast-provider.d.ts +0 -27
  213. package/dist/components/toast/toast-provider.js +0 -347
  214. package/dist/components/toast/toast-provider.js.map +0 -1
  215. package/dist/components/toast/toast-provider.mjs +0 -10
  216. package/dist/components/toast/toast-provider.mjs.map +0 -1
  217. package/dist/components/usage-banner.d.ts +0 -29
  218. package/dist/components/usage-banner.js +0 -247
  219. package/dist/components/usage-banner.js.map +0 -1
  220. package/dist/components/usage-banner.mjs +0 -12
  221. package/dist/components/usage-banner.mjs.map +0 -1
  222. package/dist/context/coagent-state-renders-context.d.ts +0 -24
  223. package/dist/context/coagent-state-renders-context.js +0 -91
  224. package/dist/context/coagent-state-renders-context.js.map +0 -1
  225. package/dist/context/coagent-state-renders-context.mjs +0 -12
  226. package/dist/context/coagent-state-renders-context.mjs.map +0 -1
  227. package/dist/context/copilot-context.d.ts +0 -10
  228. package/dist/context/copilot-context.js +0 -161
  229. package/dist/context/copilot-context.js.map +0 -1
  230. package/dist/context/copilot-context.mjs +0 -10
  231. package/dist/context/copilot-context.mjs.map +0 -1
  232. package/dist/context/copilot-messages-context.d.ts +0 -18
  233. package/dist/context/copilot-messages-context.js +0 -60
  234. package/dist/context/copilot-messages-context.js.map +0 -1
  235. package/dist/context/copilot-messages-context.mjs +0 -10
  236. package/dist/context/copilot-messages-context.mjs.map +0 -1
  237. package/dist/context/index.d.ts +0 -15
  238. package/dist/context/index.js +0 -285
  239. package/dist/context/index.js.map +0 -1
  240. package/dist/context/index.mjs +0 -33
  241. package/dist/context/index.mjs.map +0 -1
  242. package/dist/context/threads-context.d.ts +0 -16
  243. package/dist/context/threads-context.js +0 -59
  244. package/dist/context/threads-context.js.map +0 -1
  245. package/dist/context/threads-context.mjs +0 -12
  246. package/dist/context/threads-context.mjs.map +0 -1
  247. package/dist/copilot-context-ec77e921.d.ts +0 -209
  248. package/dist/hooks/index.d.ts +0 -33
  249. package/dist/hooks/index.js +0 -1774
  250. package/dist/hooks/index.js.map +0 -1
  251. package/dist/hooks/index.mjs +0 -91
  252. package/dist/hooks/index.mjs.map +0 -1
  253. package/dist/hooks/use-agent-nodename.d.ts +0 -3
  254. package/dist/hooks/use-agent-nodename.js +0 -56
  255. package/dist/hooks/use-agent-nodename.js.map +0 -1
  256. package/dist/hooks/use-agent-nodename.mjs +0 -8
  257. package/dist/hooks/use-agent-nodename.mjs.map +0 -1
  258. package/dist/hooks/use-coagent-state-render-bridge.d.ts +0 -100
  259. package/dist/hooks/use-coagent-state-render-bridge.js +0 -214
  260. package/dist/hooks/use-coagent-state-render-bridge.js.map +0 -1
  261. package/dist/hooks/use-coagent-state-render-bridge.mjs +0 -15
  262. package/dist/hooks/use-coagent-state-render-bridge.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 -255
  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 -233
  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 -295
  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 -177
  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 -462
  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 -1044
  295. package/dist/hooks/use-copilot-chat-headless_c.js.map +0 -1
  296. package/dist/hooks/use-copilot-chat-headless_c.mjs +0 -24
  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 -978
  305. package/dist/hooks/use-copilot-chat.js.map +0 -1
  306. package/dist/hooks/use-copilot-chat.mjs +0 -21
  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 -976
  310. package/dist/hooks/use-copilot-chat_internal.js.map +0 -1
  311. package/dist/hooks/use-copilot-chat_internal.mjs +0 -22
  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 -203
  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 -302
  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 -93
  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 -104
  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 -318
  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 -201
  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 -176
  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 -90
  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 -175
  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 -3528
  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 -194
  378. package/dist/lib/copilot-task.js.map +0 -1
  379. package/dist/lib/copilot-task.mjs +0 -31
  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 -196
  383. package/dist/lib/index.js.map +0 -1
  384. package/dist/lib/index.mjs +0 -32
  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 -26
  393. package/dist/setupTests.js.map +0 -1
  394. package/dist/setupTests.mjs +0 -24
  395. package/dist/setupTests.mjs.map +0 -1
  396. package/dist/types/chat-suggestion-configuration.d.ts +0 -22
  397. package/dist/types/chat-suggestion-configuration.js +0 -19
  398. package/dist/types/chat-suggestion-configuration.js.map +0 -1
  399. package/dist/types/chat-suggestion-configuration.mjs +0 -1
  400. package/dist/types/chat-suggestion-configuration.mjs.map +0 -1
  401. package/dist/types/coagent-action.d.ts +0 -29
  402. package/dist/types/coagent-action.js +0 -19
  403. package/dist/types/coagent-action.js.map +0 -1
  404. package/dist/types/coagent-action.mjs +0 -1
  405. package/dist/types/coagent-action.mjs.map +0 -1
  406. package/dist/types/coagent-state.d.ts +0 -15
  407. package/dist/types/coagent-state.js +0 -19
  408. package/dist/types/coagent-state.js.map +0 -1
  409. package/dist/types/coagent-state.mjs +0 -1
  410. package/dist/types/coagent-state.mjs.map +0 -1
  411. package/dist/types/crew.d.ts +0 -79
  412. package/dist/types/crew.js +0 -19
  413. package/dist/types/crew.js.map +0 -1
  414. package/dist/types/crew.mjs +0 -2
  415. package/dist/types/crew.mjs.map +0 -1
  416. package/dist/types/document-pointer.d.ts +0 -9
  417. package/dist/types/document-pointer.js +0 -19
  418. package/dist/types/document-pointer.js.map +0 -1
  419. package/dist/types/document-pointer.mjs +0 -1
  420. package/dist/types/document-pointer.mjs.map +0 -1
  421. package/dist/types/frontend-action.d.ts +0 -127
  422. package/dist/types/frontend-action.js +0 -53
  423. package/dist/types/frontend-action.js.map +0 -1
  424. package/dist/types/frontend-action.mjs +0 -8
  425. package/dist/types/frontend-action.mjs.map +0 -1
  426. package/dist/types/index.d.ts +0 -12
  427. package/dist/types/index.js +0 -19
  428. package/dist/types/index.js.map +0 -1
  429. package/dist/types/index.mjs +0 -4
  430. package/dist/types/index.mjs.map +0 -1
  431. package/dist/types/interrupt-action.d.ts +0 -10
  432. package/dist/types/interrupt-action.js +0 -19
  433. package/dist/types/interrupt-action.js.map +0 -1
  434. package/dist/types/interrupt-action.mjs +0 -2
  435. package/dist/types/interrupt-action.mjs.map +0 -1
  436. package/dist/types/system-message.d.ts +0 -3
  437. package/dist/types/system-message.js +0 -19
  438. package/dist/types/system-message.js.map +0 -1
  439. package/dist/types/system-message.mjs +0 -1
  440. package/dist/types/system-message.mjs.map +0 -1
  441. package/dist/utils/dev-console.d.ts +0 -3
  442. package/dist/utils/dev-console.js +0 -41
  443. package/dist/utils/dev-console.js.map +0 -1
  444. package/dist/utils/dev-console.mjs +0 -8
  445. package/dist/utils/dev-console.mjs.map +0 -1
  446. package/dist/utils/index.d.ts +0 -2
  447. package/dist/utils/index.js +0 -52
  448. package/dist/utils/index.js.map +0 -1
  449. package/dist/utils/index.mjs +0 -13
  450. package/dist/utils/index.mjs.map +0 -1
  451. package/dist/utils/suggestions-constants.d.ts +0 -9
  452. package/dist/utils/suggestions-constants.js +0 -35
  453. package/dist/utils/suggestions-constants.js.map +0 -1
  454. package/dist/utils/suggestions-constants.mjs +0 -8
  455. package/dist/utils/suggestions-constants.mjs.map +0 -1
  456. package/dist/utils/utils.d.ts +0 -2
  457. package/dist/utils/utils.js +0 -19
  458. package/dist/utils/utils.js.map +0 -1
  459. package/dist/utils/utils.mjs +0 -1
  460. package/dist/utils/utils.mjs.map +0 -1
  461. package/dist/v2/index.css +0 -4
  462. package/dist/v2/index.css.map +0 -1
  463. package/dist/v2/index.d.ts +0 -2
  464. package/dist/v2/index.js +0 -27
  465. package/dist/v2/index.js.map +0 -1
  466. package/dist/v2/index.mjs +0 -6
  467. package/dist/v2/index.mjs.map +0 -1
  468. package/jest.config.js +0 -25
  469. package/src/components/CopilotListeners.tsx +0 -81
  470. package/src/components/copilot-provider/__tests__/copilotkit-error.test.tsx +0 -75
  471. package/src/components/copilot-provider/copilot-messages.tsx +0 -274
  472. package/src/components/copilot-provider/copilotkit-props.tsx +0 -169
  473. package/src/components/copilot-provider/copilotkit.tsx +0 -671
  474. package/src/components/copilot-provider/index.ts +0 -3
  475. package/src/components/dev-console/console-trigger.tsx +0 -254
  476. package/src/components/dev-console/developer-console-modal.tsx +0 -866
  477. package/src/components/dev-console/icons.tsx +0 -101
  478. package/src/components/error-boundary/error-boundary.tsx +0 -91
  479. package/src/components/error-boundary/error-utils.tsx +0 -100
  480. package/src/components/index.ts +0 -1
  481. package/src/components/toast/exclamation-mark-icon.tsx +0 -27
  482. package/src/components/toast/toast-provider.tsx +0 -363
  483. package/src/components/usage-banner.tsx +0 -259
  484. package/src/context/coagent-state-renders-context.tsx +0 -76
  485. package/src/context/copilot-context.tsx +0 -332
  486. package/src/context/copilot-messages-context.tsx +0 -35
  487. package/src/context/index.ts +0 -16
  488. package/src/context/threads-context.tsx +0 -41
  489. package/src/hooks/__tests__/use-coagent-config.test.ts +0 -351
  490. package/src/hooks/index.ts +0 -34
  491. package/src/hooks/use-agent-nodename.ts +0 -30
  492. package/src/hooks/use-coagent-state-render-bridge.tsx +0 -293
  493. package/src/hooks/use-coagent-state-render.ts +0 -152
  494. package/src/hooks/use-coagent.ts +0 -366
  495. package/src/hooks/use-configure-chat-suggestions.tsx +0 -86
  496. package/src/hooks/use-copilot-action.ts +0 -236
  497. package/src/hooks/use-copilot-additional-instructions.ts +0 -85
  498. package/src/hooks/use-copilot-authenticated-action.ts +0 -70
  499. package/src/hooks/use-copilot-chat-headless_c.ts +0 -258
  500. package/src/hooks/use-copilot-chat-suggestions.tsx +0 -124
  501. package/src/hooks/use-copilot-chat.ts +0 -130
  502. package/src/hooks/use-copilot-chat_internal.ts +0 -696
  503. package/src/hooks/use-copilot-readable.ts +0 -135
  504. package/src/hooks/use-copilot-runtime-client.ts +0 -164
  505. package/src/hooks/use-default-tool.ts +0 -7
  506. package/src/hooks/use-flat-category-store.ts +0 -105
  507. package/src/hooks/use-frontend-tool.ts +0 -96
  508. package/src/hooks/use-human-in-the-loop.ts +0 -122
  509. package/src/hooks/use-langgraph-interrupt-render.ts +0 -136
  510. package/src/hooks/use-langgraph-interrupt.ts +0 -36
  511. package/src/hooks/use-lazy-tool-renderer.tsx +0 -30
  512. package/src/hooks/use-make-copilot-document-readable.ts +0 -30
  513. package/src/hooks/use-render-tool-call.ts +0 -80
  514. package/src/hooks/use-tree.ts +0 -207
  515. package/src/index.tsx +0 -7
  516. package/src/lib/copilot-task.ts +0 -201
  517. package/src/lib/index.ts +0 -1
  518. package/src/lib/status-checker.ts +0 -64
  519. package/src/setupTests.ts +0 -26
  520. package/src/types/chat-suggestion-configuration.ts +0 -23
  521. package/src/types/coagent-action.ts +0 -31
  522. package/src/types/coagent-state.ts +0 -13
  523. package/src/types/crew.ts +0 -89
  524. package/src/types/document-pointer.ts +0 -7
  525. package/src/types/frontend-action.ts +0 -202
  526. package/src/types/index.ts +0 -17
  527. package/src/types/interrupt-action.ts +0 -43
  528. package/src/types/system-message.ts +0 -4
  529. package/src/utils/dev-console.ts +0 -19
  530. package/src/utils/index.ts +0 -2
  531. package/src/utils/suggestions-constants.ts +0 -8
  532. package/src/utils/utils.test.ts +0 -7
  533. package/src/utils/utils.ts +0 -8
  534. package/src/v2/index.css +0 -1
  535. package/src/v2/index.ts +0 -4
  536. package/tsconfig.json +0 -8
  537. package/tsup.config.ts +0 -16
  538. package/typedoc.json +0 -4
@@ -0,0 +1,3450 @@
1
+ import { a as useMarkdownRenderer, c as ReactActivityMessageRenderer, i as MarkdownRendererProvider, l as GenerativeUIConfig, n as MarkdownRenderer, r as MarkdownRendererProps, s as GenerativeUIChatSurfaceProps, t as DefaultMarkdownRendererProps } from "./MarkdownRendererContext-B4Us6mwL.cjs";
2
+ import * as react from "react";
3
+ import React$1, { ComponentType, ReactNode } from "react";
4
+ import { Attachment, Attachment as Attachment$1, AttachmentModality, AttachmentsConfig, AttachmentsConfig as AttachmentsConfig$1, DebugConfig, InferSchemaOutput, InputContentSource as InputContentSource$1, LicenseContextValue, StandardSchemaV1 } from "@copilotkit/shared";
5
+ import { z } from "zod";
6
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
7
+ import { ActivityMessage as ActivityMessage$1, AgentCapabilities as AgentCapabilities$1, AssistantMessage as AssistantMessage$1, Message as Message$1, ReasoningMessage as ReasoningMessage$1, ToolCall as ToolCall$1, ToolMessage as ToolMessage$1, UserMessage as UserMessage$1 } from "@ag-ui/core";
8
+ import { ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUIEvent, AGUIEventByType, AGUIEventOf, AGUI_METADATA_KEY, AbstractAgent, AbstractAgent as AbstractAgent$1, ActivityDeltaEvent, ActivityDeltaEventProps, ActivityMessage, ActivitySnapshotEvent, ActivitySnapshotEventProps, AddOperation, AgentCapabilities, AgentConfig, AgentDebugConfig, AgentStateMutation, AgentSubscriber, AgentSubscriberParams, AssistantMessage, Attributable, AudioInputContent, AudioInputPart, AudioPart, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, BaseEvent, BaseEventFields, BaseEventProps, BaseMessage, CompatibilityBoundary, ContentPart, Context, CopyOperation, CustomEvent, CustomEventProps, DataSource, DebugLogger, DebugLoggerInput, DeveloperMessage, DocumentInputContent, DocumentInputPart, DocumentPart, Event, EventPayloadOf, EventType, ExecutionCapabilities, FileSource, FilterToolCallsMiddleware, FunctionCall, FunctionMiddleware, HttpAgent, HttpAgentConfig, HttpAgentFetchFn, HumanInTheLoopCapabilities, IdentityCapabilities, ImageInputContent, ImageInputPart, ImagePart, InputContent, InputContentDataSource, InputContentPart, InputContentSource, InputContentUrlSource, Interrupt, JsonPatch, JsonPatchOperation, JsonPointer, Message, MessagesSnapshotEvent, MessagesSnapshotEventProps, Metadata, Middleware, MiddlewareFunction, MoveOperation, MultiAgentCapabilities, MultimodalCapabilities, MultimodalInputCapabilities, MultimodalOutputCapabilities, OutputCapabilities, PROTOCOL_VERSION, PartSource, RawEvent, RawEventProps, ReasoningCapabilities, ReasoningEncryptedValueEvent, ReasoningEncryptedValueEventProps, ReasoningEncryptedValueSubtype, ReasoningEndEvent, ReasoningEndEventProps, ReasoningMessage, ReasoningMessageChunkEvent, ReasoningMessageChunkEventProps, ReasoningMessageContentEvent, ReasoningMessageContentEventProps, ReasoningMessageEndEvent, ReasoningMessageEndEventProps, ReasoningMessageStartEvent, ReasoningMessageStartEventProps, ReasoningStartEvent, ReasoningStartEventProps, RemoveOperation, ReplaceOperation, ResolvedAgentDebugConfig, ResumeEntry, ResumeStatus, Role, RunAgentInput, RunAgentParameters, RunAgentResult, RunAgentResult as RunAgentResult$1, RunErrorEvent, RunErrorEventProps, RunFinishedCancelledOutcome, RunFinishedEvent, RunFinishedEventProps, RunFinishedInterruptOutcome, RunFinishedOutcome, RunFinishedSuccessOutcome, RunStartedEvent, RunStartedEventProps, State, StateCapabilities, StateDeltaEvent, StateDeltaEventProps, StateSnapshotEvent, StateSnapshotEventProps, StepFinishedEvent, StepFinishedEventProps, StepStartedEvent, StepStartedEventProps, SubagentErrorEvent, SubagentErrorEventProps, SubagentFinishedEvent, SubagentFinishedEventProps, SubagentFinishedOutcome, SubagentFinishedSuccessOutcome, SubagentFinishedSuspendedOutcome, SubagentInfo, SubagentRunId, SubagentStartedEvent, SubagentStartedEventProps, SystemMessage, TestOperation, TextInputContent, TextMessageChunkEvent, TextMessageChunkEventProps, TextMessageContentEvent, TextMessageContentEventProps, TextMessageEndEvent, TextMessageEndEventProps, TextMessageRole, TextMessageStartEvent, TextMessageStartEventProps, TextPart, TokenUsage, Tool, ToolCall, ToolCallArgsEvent, ToolCallArgsEventProps, ToolCallChunkEvent, ToolCallChunkEventProps, ToolCallEndEvent, ToolCallEndEventProps, ToolCallResultEvent, ToolCallResultEventProps, ToolCallStartEvent, ToolCallStartEventProps, ToolMessage, ToolsCapabilities, TransportCapabilities, UnrecognizedEvent, UrlSource, UserMessage, VideoInputContent, VideoInputPart, VideoPart, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, compactEvents, contentHasMedia, contentToText, convertToLegacyEvents, createDebugLogger, defaultApplyEvents, enforceEvents, enforceOutgoingInput, getRunOutcome, isInterruptExpired, isRecognizedEvent, mergeMetadata, omitOptionalNulls, parseProtoStream, parseSSEStream, randomUUID, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, verifyEvents, withAuthoritativeActivityTypes } from "@ag-ui/client";
9
+ import { A2UIMarkdownOperation, A2UI_FENCE_LANGUAGE, ActionConfig, ActionCreator, ActionFromCreator, ActionFromCreators, ActionGroupConfig, ActionGroupResult, AgentRegistry, AgentThreadLockedError, AnyAction, ChildIdsOf, ChildWalkOptions, ContextStore, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreAddAgentParams, CopilotKitCoreCatalogComponent, CopilotKitCoreConfig, CopilotKitCoreConfig as CopilotKitCoreConfig$1, CopilotKitCoreConnectAgentParams, CopilotKitCoreContinuationHandoff, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreFriendsAccess, CopilotKitCoreGetSuggestionsResult, CopilotKitCoreGetToolParams, CopilotKitCoreRegisterProxiedAgentParams, CopilotKitCoreRegisterProxiedAgentResult, CopilotKitCoreRunAgentParams, CopilotKitCoreRunToolParams, CopilotKitCoreRunToolResult, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreStopAgentParams, CopilotKitCoreSubscriber, CopilotKitCoreSubscriber as CopilotKitCoreSubscriber$1, CopilotKitCoreSubscription, CopilotKitCoreSubscription as CopilotKitCoreSubscription$1, CopilotKitHeaderResolutionError, CopilotKitHeadersSource, CopilotKitHeadersSource as CopilotKitHeadersSource$1, CopilotKitMessageFilter, CopilotKitMessageFilter as CopilotKitMessageFilter$1, CopilotRuntimeTransport, DispatchingEffect, DispatchingEffectOptions, DynamicSuggestionsConfig, DynamicSuggestionsConfig as DynamicSuggestionsConfig$1, Effect, EmptyActionConfig, FrontendTool, FrontendTool as FrontendTool$1, FrontendToolHandlerContext, FrontendToolReconnectBehavior, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, InspectorActiveThreadPayload, InspectorMetadataV1, InspectorStopViewingPayload, InspectorViewThreadPayload, InspectorViewThreadResultPayload, IntelligenceAgent, IntelligenceAgentConfig, IntelligenceRuntimeInfo, JsonValue, LearningConfig, LearningConfig as LearningConfig$1, LegacyLearningConfig, MEMORY_ERROR_REGISTRY, MarkdownSegment, MarkdownToken, MarkdownTokenList, Memory, Memory as Memory$1, MemoryChanges, MemoryChanges as MemoryChanges$1, MemoryError, MemoryErrorCategory, MemoryErrorCode, MemoryErrorRegistryEntry, MemoryKind, MemoryRealtimeStatus, MemoryRealtimeStatus as MemoryRealtimeStatus$1, MemoryScope, NewMemory, NewMemory as NewMemory$1, NonDispatchingEffect, NonDispatchingEffectOptions, OpenThreadRegistration, ParseMarkdownOptions, PropsActionConfig, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgentConfig, Reducer, RunCompletionAware, RunHandler, RuntimeLicenseStatus, RuntimeMode, ScopedContext, ScopedProperties, Selector, StartResult, StateManager, StaticSuggestionsConfig, StaticSuggestionsConfig as StaticSuggestionsConfig$1, Store, StoreLifecycleAction, SubscribeToAgentOptions, SubscribeToAgentSubscriber, Suggestion, Suggestion as Suggestion$1, SuggestionAvailability, SuggestionEngine, SuggestionsConfig, SurfaceSegment, ThreadEndpointRuntimeInfo, ThreadRunActivityNotification, Tokens, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, TrajectoryStartOptions, WebMCPModelContext, WebMCPRegistry, WebMCPToolAnnotations, WebMCPToolConfig, classifySurfaceCards, completePartialMarkdown, createActionGroup, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, emitInspectorActiveThread, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, empty, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getMarkdownOperationSurfaceId, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isRunCompletionAware, ofType, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorViewThread, onInspectorViewThreadResult, parseMarkdown, parseToolArguments, prepareSurfaceOperations, props, segmentSurfaceProse, select, splitA2UIMarkdown, ɵCOPILOTKIT_FEATURES, ɵCopilotKitFeature, ɵGenerativeUIDebugFunction, ɵGenerativeUIDebugPromptSection, ɵGenerativeUIDebugRun, ɵGenerativeUIDebugSnapshot, ɵGenerativeUIDebugSource, ɵGenerativeUIDebugSurface, ɵInterruptDecision, ɵInterruptEvent, ɵInterruptState, ɵInterruptToolResult, ɵMAX_SOCKET_RETRIES, ɵMemoryEnvironment, ɵMemoryMetadataEvent, ɵMemoryRuntimeContext, ɵMemoryState, ɵMemoryStore, ɵPendingInterrupt, ɵPhoenixChannelLike, ɵPhoenixChannelOptions, ɵPhoenixChannelSession, ɵPhoenixJoinOutcome, ɵPhoenixPushLike, ɵPhoenixSocketLike, ɵPhoenixSocketOptions, ɵPhoenixSocketSession, ɵPhoenixSocketSignal, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵThread, ɵThreadEnvironment, ɵThreadMetadataEvent, ɵThreadRuntimeContext, ɵThreadSelectors, ɵThreadStore, ɵclearAgentInterruptState, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵgetAgentInterruptState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵthreadAdapterEvents, ɵwithHeaderDefaults } from "@copilotkit/core";
10
+ import { ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, BaseEventSchema, BaseMessageSchema, ContentPartSchema, ContextSchema, CopyOperationSchema, CustomEventSchema, DataSourceSchema, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FunctionCallSchema, HumanInTheLoopCapabilitiesSchema, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OptionalMetadataSchema, OutputCapabilitiesSchema, PartSourceSchema, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunStartedEventSchema, StateCapabilitiesSchema, StateDeltaEventSchema, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TransportCapabilitiesSchema, UrlSourceSchema, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema } from "@ag-ui/core/schemas";
11
+ import { MCPAppsActivityContent, MCPAppsActivityContent as MCPAppsActivityContent$1, MCPAppsActivityContentSchema, MCPAppsActivityType, ɵMcpFollowUpHost, ɵrunMcpFollowUp } from "@copilotkit/mcp-apps-renderer/activity";
12
+ import { Theme, Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
13
+ import { Anchor as InspectorAnchor } from "@copilotkit/web-inspector";
14
+
15
+ //#region src/components/chat/BasicMarkdownRenderer.d.ts
16
+ /**
17
+ * Dependency-light built-in markdown renderer (basic GFM). Walks the
18
+ * framework-agnostic token tree from `@copilotkit/core` into React elements.
19
+ * No syntax highlighting, no math, no table/image action buttons — plug in a
20
+ * custom renderer via `CopilotKitProvider markdownRenderer={...}` for those.
21
+ */
22
+ declare function BasicMarkdownRenderer({
23
+ content,
24
+ className
25
+ }: MarkdownRendererProps): react_jsx_runtime0.JSX.Element | null;
26
+ declare namespace BasicMarkdownRenderer {
27
+ var displayName: string;
28
+ }
29
+ //#endregion
30
+ //#region src/components/chat/StreamingMarkdownDefaultRenderer.d.ts
31
+ /**
32
+ * react-core's built-in default markdown renderer — a thin adapter over
33
+ * `@copilotkit/markdown-renderer`'s streaming renderer. Maps the pluggable
34
+ * renderer contract (`{ content, isStreaming, className }`) onto the streaming
35
+ * renderer for streaming-safe incremental rendering + per-token animation.
36
+ * Still overridable via the slot/provider pluggable interface.
37
+ */
38
+ declare function StreamingMarkdownDefaultRenderer({
39
+ content,
40
+ isStreaming,
41
+ className,
42
+ nodeRenderers,
43
+ caret,
44
+ options,
45
+ onLinkClick,
46
+ onCitationClick
47
+ }: MarkdownRendererProps & DefaultMarkdownRendererProps): react_jsx_runtime0.JSX.Element | null;
48
+ declare namespace StreamingMarkdownDefaultRenderer {
49
+ var displayName: string;
50
+ }
51
+ //#endregion
52
+ //#region src/components/chat/CopilotChatAudioRecorder.d.ts
53
+ /** Finite-state machine for every recorder implementation */
54
+ type AudioRecorderState = "idle" | "recording" | "processing";
55
+ /** Error subclass so callers can `instanceof`-guard recorder failures */
56
+ declare class AudioRecorderError extends Error {
57
+ constructor(message: string);
58
+ }
59
+ interface AudioRecorderRef {
60
+ state: AudioRecorderState;
61
+ start: () => Promise<void>;
62
+ stop: () => Promise<Blob>;
63
+ dispose: () => void;
64
+ }
65
+ declare const CopilotChatAudioRecorder: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<AudioRecorderRef>>;
66
+ //#endregion
67
+ //#region src/providers/CopilotChatConfigurationProvider.d.ts
68
+ declare const CopilotChatDefaultLabels: {
69
+ chatInputPlaceholder: string;
70
+ chatInputToolbarStartTranscribeButtonLabel: string;
71
+ chatInputToolbarCancelTranscribeButtonLabel: string;
72
+ chatInputToolbarFinishTranscribeButtonLabel: string;
73
+ chatInputToolbarAddButtonLabel: string;
74
+ chatInputToolbarToolsButtonLabel: string;
75
+ chatInputToolbarSendButtonLabel: string;
76
+ chatInputToolbarStopButtonLabel: string;
77
+ assistantMessageToolbarCopyCodeLabel: string;
78
+ assistantMessageToolbarCopyCodeCopiedLabel: string;
79
+ assistantMessageToolbarCopyMessageLabel: string;
80
+ assistantMessageToolbarInspectorLabel: string;
81
+ assistantMessageToolbarInspectorDescription: string;
82
+ assistantMessageToolbarInspectorLocalOnlyLabel: string;
83
+ assistantMessageToolbarInspectorLocalOnlyDescription: string;
84
+ assistantMessageToolbarInspectorTitle: string;
85
+ assistantMessageToolbarInspectorHideLabel: string;
86
+ assistantMessageToolbarInspectorHideDescription: string;
87
+ assistantMessageToolbarThumbsUpLabel: string;
88
+ assistantMessageToolbarThumbsDownLabel: string;
89
+ assistantMessageFeedbackCommentPlaceholder: string;
90
+ assistantMessageFeedbackCommentSubmitLabel: string;
91
+ assistantMessageToolbarReadAloudLabel: string;
92
+ assistantMessageToolbarRegenerateLabel: string;
93
+ userMessageToolbarCopyMessageLabel: string;
94
+ userMessageToolbarEditMessageLabel: string;
95
+ userMessageToolbarPreviousBranchLabel: string;
96
+ userMessageToolbarNextBranchLabel: string;
97
+ chatDisclaimerText: string;
98
+ chatToggleOpenLabel: string;
99
+ chatToggleCloseLabel: string;
100
+ chatScrollToBottomLabel: string;
101
+ modalHeaderTitle: string;
102
+ welcomeMessageText: string;
103
+ reasoningMessageThinkingLabel: string;
104
+ chatInputSlashMenuLabel: string;
105
+ chatInputSlashMenuEmptyText: string;
106
+ attachmentRemoveButtonLabel: string;
107
+ attachmentPlayVideoButtonLabel: string;
108
+ attachmentPreviewCloseButtonLabel: string;
109
+ modalHeaderCloseButtonLabel: string;
110
+ modalHeaderThreadsButtonLabel: string;
111
+ sidebarLabel: string;
112
+ };
113
+ type CopilotChatLabels = typeof CopilotChatDefaultLabels;
114
+ interface CopilotChatConfigurationValue {
115
+ labels: CopilotChatLabels;
116
+ agentId: string;
117
+ threadId: string;
118
+ isModalOpen: boolean;
119
+ setModalOpen: (open: boolean) => void;
120
+ /**
121
+ * Whether the thread-list drawer is open. A sibling boolean to `isModalOpen`
122
+ * (deliberately NOT folded into a tri-state enum): on desktop the chat modal
123
+ * and the drawer coexist, so two independent booleans are required.
124
+ */
125
+ drawerOpen: boolean;
126
+ /**
127
+ * Toggles the drawer open state. On mobile viewports (`<768px`) opening the
128
+ * drawer closes the chat modal (mutual exclusion); on desktop there is no
129
+ * constraint.
130
+ */
131
+ setDrawerOpen: (open: boolean) => void;
132
+ /**
133
+ * True once a `<CopilotThreadsDrawer>` wrapper has registered itself with this chat
134
+ * configuration. The header thread-list launcher renders ONLY when this is
135
+ * set, so chats with no drawer stay byte-for-byte unchanged.
136
+ */
137
+ drawerRegistered: boolean;
138
+ /**
139
+ * Called by the drawer wrapper on mount to announce its presence (and flip
140
+ * `drawerRegistered`). Returns a cleanup function that de-registers the
141
+ * drawer on unmount.
142
+ *
143
+ * @returns A cleanup callback that reverses the registration.
144
+ */
145
+ registerDrawer: () => () => void;
146
+ /**
147
+ * Internal: registers the modal-close setter of the provider that actually
148
+ * owns the rendered modal (a descendant that supplied `isModalDefaultOpen`),
149
+ * so the drawer's mobile mutual-exclusion — owned by the top-most provider —
150
+ * closes the modal that is genuinely on screen rather than the top-most
151
+ * provider's own (possibly unrendered) modal state.
152
+ *
153
+ * @param closeModal - A setter the drawer may call to close the rendered modal.
154
+ * @returns A cleanup callback that de-registers the closer.
155
+ */
156
+ ɵregisterModalCloser: (closeModal: (open: boolean) => void) => () => void;
157
+ hasExplicitThreadId: boolean;
158
+ /**
159
+ * Imperatively sets the active thread for this chat configuration.
160
+ *
161
+ * Use this to drive the rendered thread without a host callback — e.g. a
162
+ * `<CopilotThreadsDrawer>` selecting a thread row sets it explicitly so the chat
163
+ * connects to that backend thread.
164
+ *
165
+ * Guarded like the top-level `<CopilotKit>` provider's `setThreadId`: when
166
+ * the consumer controls the threadId via the `threadId` prop on this
167
+ * provider, this is a no-op (a warning is logged) so a prop-controlled
168
+ * threadId is never silently overridden.
169
+ *
170
+ * @param threadId - The thread id to make active.
171
+ * @param options.explicit - Whether the thread is a caller choice. Defaults
172
+ * to `true` (a picked thread). Pass `false` to set a non-explicit thread
173
+ * so the welcome screen shows (see {@link startNewThread}).
174
+ */
175
+ setActiveThreadId: (threadId: string, options?: {
176
+ explicit?: boolean;
177
+ }) => void;
178
+ /**
179
+ * Resets the active thread to a fresh, non-explicit client-side thread: a
180
+ * newly minted UUID with `hasExplicitThreadId=false`, so the welcome screen
181
+ * shows. Pairs with the core `startNewThread()` to clear the conversation
182
+ * with no host wiring.
183
+ *
184
+ * Guarded identically to {@link setActiveThreadId}: a no-op when the
185
+ * threadId is prop-controlled.
186
+ */
187
+ startNewThread: () => void;
188
+ }
189
+ interface CopilotChatConfigurationProviderProps {
190
+ children: ReactNode;
191
+ labels?: Partial<CopilotChatLabels>;
192
+ agentId?: string;
193
+ threadId?: string;
194
+ hasExplicitThreadId?: boolean;
195
+ isModalDefaultOpen?: boolean;
196
+ }
197
+ declare const CopilotChatConfigurationProvider: React$1.FC<CopilotChatConfigurationProviderProps>;
198
+ declare const useCopilotChatConfiguration: () => CopilotChatConfigurationValue | null;
199
+ //#endregion
200
+ //#region src/lib/slots.d.ts
201
+ /** Existing union (unchanged) */
202
+ type SlotValue<C extends React$1.ComponentType<any>> = C | string | Partial<React$1.ComponentProps<C>>;
203
+ /** Utility: concrete React elements for every slot */
204
+ type SlotElements<S> = { [K in keyof S]: React$1.ReactElement };
205
+ type WithSlots<S extends Record<string, React$1.ComponentType<any>>, Rest = {}> = { [K in keyof S]?: SlotValue<S[K]> } & {
206
+ children?: (props: SlotElements<S> & Rest) => React$1.ReactNode;
207
+ } & Omit<Rest, "children">;
208
+ //#endregion
209
+ //#region src/components/chat/CopilotChatInput.d.ts
210
+ type CopilotChatInputMode = "input" | "transcribe" | "processing";
211
+ type ToolsMenuItem = {
212
+ label: string;
213
+ } & ({
214
+ action: () => void;
215
+ items?: never;
216
+ } | {
217
+ action?: never;
218
+ items: (ToolsMenuItem | "-")[];
219
+ });
220
+ type CopilotChatInputSlots = {
221
+ textArea: typeof CopilotChatInput.TextArea;
222
+ sendButton: typeof CopilotChatInput.SendButton;
223
+ startTranscribeButton: typeof CopilotChatInput.StartTranscribeButton;
224
+ cancelTranscribeButton: typeof CopilotChatInput.CancelTranscribeButton;
225
+ finishTranscribeButton: typeof CopilotChatInput.FinishTranscribeButton;
226
+ addMenuButton: typeof CopilotChatInput.AddMenuButton;
227
+ audioRecorder: typeof CopilotChatAudioRecorder;
228
+ disclaimer: typeof CopilotChatInput.Disclaimer;
229
+ };
230
+ type CopilotChatInputRestProps = {
231
+ mode?: CopilotChatInputMode;
232
+ toolsMenu?: (ToolsMenuItem | "-")[];
233
+ autoFocus?: boolean;
234
+ onSubmitMessage?: (value: string) => void;
235
+ onStop?: () => void;
236
+ isRunning?: boolean;
237
+ onStartTranscribe?: () => void;
238
+ onCancelTranscribe?: () => void;
239
+ onFinishTranscribe?: () => void;
240
+ onFinishTranscribeWithAudio?: (audioBlob: Blob) => Promise<void>;
241
+ onAddFile?: () => void;
242
+ value?: string;
243
+ onChange?: (value: string) => void; /** Positioning mode for the input container. Default: 'static' */
244
+ positioning?: "static" | "absolute"; /** Keyboard height in pixels for mobile keyboard handling */
245
+ keyboardHeight?: number; /** Ref for the outer positioning container */
246
+ containerRef?: React$1.Ref<HTMLDivElement>; /** Whether to show the disclaimer. Default: true for absolute positioning, false for static */
247
+ showDisclaimer?: boolean;
248
+ /**
249
+ * Set to `true` when the input sits at the bottom of its container as a
250
+ * flex-last-child (visible position is driven by layout, not CSS
251
+ * positioning). Triggers reservation of bottom space for the fixed
252
+ * CopilotKit license banner via the
253
+ * `--copilotkit-license-banner-offset` CSS var so the two don't overlap.
254
+ *
255
+ * Not needed when `positioning === "absolute"`; that mode already pins the
256
+ * input to the bottom and picks up the same reservation automatically.
257
+ * Leave unset (default `false`) for inputs rendered mid-layout such as the
258
+ * welcome screen, where the banner offset would push the input off-center.
259
+ */
260
+ bottomAnchored?: boolean;
261
+ } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange">;
262
+ type CopilotChatInputBaseProps = WithSlots<CopilotChatInputSlots, CopilotChatInputRestProps>;
263
+ type CopilotChatInputChildrenArgs = CopilotChatInputBaseProps extends {
264
+ children?: infer C;
265
+ } ? C extends ((props: infer P) => React$1.ReactNode) ? P : never : never;
266
+ type CopilotChatInputProps = Omit<CopilotChatInputBaseProps, "children"> & {
267
+ children?: (props: CopilotChatInputChildrenArgs) => React$1.ReactNode;
268
+ };
269
+ /**
270
+ * The chat composer: a text area with the add-menu, voice and send/stop
271
+ * buttons, and a slash-command menu that lists `toolsMenu` items once the text
272
+ * starts with "/".
273
+ */
274
+ declare function CopilotChatInput({
275
+ mode,
276
+ onSubmitMessage,
277
+ onStop,
278
+ isRunning,
279
+ onStartTranscribe,
280
+ onCancelTranscribe,
281
+ onFinishTranscribe,
282
+ onFinishTranscribeWithAudio,
283
+ onAddFile,
284
+ onChange,
285
+ value,
286
+ toolsMenu,
287
+ autoFocus,
288
+ positioning,
289
+ keyboardHeight,
290
+ containerRef,
291
+ showDisclaimer,
292
+ bottomAnchored,
293
+ textArea,
294
+ sendButton,
295
+ startTranscribeButton,
296
+ cancelTranscribeButton,
297
+ finishTranscribeButton,
298
+ addMenuButton,
299
+ audioRecorder,
300
+ disclaimer,
301
+ children,
302
+ className,
303
+ ...props
304
+ }: CopilotChatInputProps): react_jsx_runtime0.JSX.Element;
305
+ declare namespace CopilotChatInput {
306
+ /**
307
+ * The icon-only send button. Its accessible name is
308
+ * `labels.chatInputToolbarSendButtonLabel` unless an `aria-label` is passed;
309
+ * the input passes `labels.chatInputToolbarStopButtonLabel` while the button
310
+ * stops a run.
311
+ */
312
+ const SendButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
313
+ /**
314
+ * An icon-only toolbar button. `labels[labelKey]` is both its accessible
315
+ * name and its tooltip text.
316
+ */
317
+ const ToolbarButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
318
+ icon: React$1.ReactNode;
319
+ labelKey: keyof CopilotChatLabels;
320
+ defaultClassName?: string;
321
+ }>;
322
+ const StartTranscribeButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
323
+ const CancelTranscribeButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
324
+ const FinishTranscribeButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
325
+ /**
326
+ * The "+" button that opens the attachment and tools menu. Its accessible
327
+ * name and tooltip come from `labels.chatInputToolbarAddButtonLabel`.
328
+ */
329
+ const AddMenuButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
330
+ toolsMenu?: (ToolsMenuItem | "-")[];
331
+ onAddFile?: () => void;
332
+ }>;
333
+ type TextAreaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
334
+ const TextArea: React$1.ForwardRefExoticComponent<TextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
335
+ const AudioRecorder: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<AudioRecorderRef>>;
336
+ const Disclaimer: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
337
+ }
338
+ //#endregion
339
+ //#region src/components/chat/tool-call-layout.d.ts
340
+ /**
341
+ * How the chat shows tool calls.
342
+ *
343
+ * - `"grouped"` (default): calls made in a row share one card, collapsed to a
344
+ * summary ("Used 3 tools") that opens to a row per call.
345
+ * - `"line"`: the same grouping as a quiet line of text, like the reasoning
346
+ * message's "Thought for 4 seconds".
347
+ * - `"stacked"`: the latest call on top of a stack of the earlier ones; click
348
+ * to fan the stack out into its cards.
349
+ * - `"turn"`: the agent works in the open (narration, then a row per call),
350
+ * and when the reply is done everything before it folds into "Worked for 9s".
351
+ * - `"separate"`: every call gets its own card, as before grouping existed.
352
+ *
353
+ * Only calls drawn by a renderer that opts into grouping (`group: true`) are
354
+ * grouped; CopilotKit's built-in card from `useDefaultRenderTool()` does. Any
355
+ * other call always shows on its own and splits the group around it.
356
+ */
357
+ type CopilotChatToolCallDisplay = "grouped" | "line" | "stacked" | "turn" | "separate";
358
+ /** One tool call and, once it has finished, the message carrying its result. */
359
+ interface ToolCallEntry {
360
+ toolCall: ToolCall$1;
361
+ toolMessage?: ToolMessage$1;
362
+ }
363
+ //#endregion
364
+ //#region src/components/chat/CopilotChatToolCallGroup.d.ts
365
+ type CopilotChatToolCallGroupAppearance = "card" | "line" | "stack";
366
+ interface CopilotChatToolCallGroupProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> {
367
+ /** The calls in the group, in order. */
368
+ calls: ToolCallEntry[];
369
+ /** Renders one call through the registered renderers. */
370
+ renderCall: (call: ToolCallEntry) => React$1.ReactNode;
371
+ /**
372
+ * - `"card"` (default): one card with a summary header and a row per call.
373
+ * - `"line"`: a quiet line of text that opens to a list of rows.
374
+ * - `"stack"`: the latest call on a stack of the earlier ones.
375
+ */
376
+ appearance?: CopilotChatToolCallGroupAppearance;
377
+ /** The agent is running and nothing follows the group, so more calls may join it. */
378
+ isActive?: boolean;
379
+ }
380
+ /**
381
+ * Tool calls made in a row, collapsed into one summary. While a call runs the
382
+ * summary names it ("Running read_file src/app.ts"); once they're all done it
383
+ * reads "Used 3 tools" and opens to the calls.
384
+ *
385
+ * Each call is drawn by its registered renderer. CopilotKit's built-in card
386
+ * (`useDefaultRenderTool`) draws a compact row inside the card and line
387
+ * appearances and an open stack; a custom wildcard renderer draws whatever it
388
+ * draws.
389
+ */
390
+ declare function CopilotChatToolCallGroup({
391
+ calls,
392
+ renderCall,
393
+ appearance,
394
+ isActive,
395
+ className,
396
+ ...props
397
+ }: CopilotChatToolCallGroupProps): react_jsx_runtime0.JSX.Element | null;
398
+ //#endregion
399
+ //#region src/components/chat/CopilotChatToolCallsView.d.ts
400
+ type CopilotChatToolCallsViewProps = {
401
+ message: AssistantMessage$1;
402
+ messages?: Message$1[];
403
+ /**
404
+ * How to show the calls (see `CopilotChatToolCallDisplay`). Inside a message
405
+ * view it follows the view's `toolCallDisplay`; on its own it defaults to
406
+ * `"grouped"`.
407
+ */
408
+ display?: CopilotChatToolCallDisplay;
409
+ /**
410
+ * Draws a group of calls made in a row: a component, a class name for the
411
+ * default group, or props for it (e.g. `{ appearance: "line" }`).
412
+ */
413
+ group?: SlotValue<typeof CopilotChatToolCallGroup>;
414
+ };
415
+ declare function CopilotChatToolCallsView({
416
+ message,
417
+ messages,
418
+ display: displayProp,
419
+ group
420
+ }: CopilotChatToolCallsViewProps): react_jsx_runtime0.JSX.Element | null;
421
+ //#endregion
422
+ //#region src/components/chat/CopilotChatAssistantMessage.d.ts
423
+ type CopilotChatFeedbackMessage = AssistantMessage$1 & {
424
+ rawEvent?: unknown;
425
+ };
426
+ type CopilotChatAssistantMessageProps = WithSlots<{
427
+ markdownRenderer: typeof CopilotChatAssistantMessage.MarkdownRenderer;
428
+ toolbar: typeof CopilotChatAssistantMessage.Toolbar;
429
+ copyButton: typeof CopilotChatAssistantMessage.CopyButton;
430
+ inspectorButton: typeof CopilotChatAssistantMessage.InspectorButton;
431
+ thumbsUpButton: typeof CopilotChatAssistantMessage.ThumbsUpButton;
432
+ thumbsDownButton: typeof CopilotChatAssistantMessage.ThumbsDownButton;
433
+ readAloudButton: typeof CopilotChatAssistantMessage.ReadAloudButton;
434
+ regenerateButton: typeof CopilotChatAssistantMessage.RegenerateButton;
435
+ toolCallsView: typeof CopilotChatToolCallsView;
436
+ }, {
437
+ onThumbsUp?: (message: CopilotChatFeedbackMessage) => void;
438
+ onThumbsDown?: (message: CopilotChatFeedbackMessage) => void;
439
+ onReadAloud?: (message: AssistantMessage$1) => void;
440
+ onRegenerate?: (message: AssistantMessage$1) => void;
441
+ message: AssistantMessage$1;
442
+ messages?: Message$1[];
443
+ isRunning?: boolean;
444
+ /**
445
+ * Whether this is the last message the chat renders. The message view
446
+ * passes it, because the rendered list can differ from `messages` when
447
+ * `transformMessages` drops, replaces or reorders messages. Defaults to
448
+ * comparing against the last entry of `messages`.
449
+ */
450
+ isLatest?: boolean;
451
+ additionalToolbarItems?: React$1.ReactNode;
452
+ toolbarVisible?: boolean;
453
+ /**
454
+ * The comment field of a reply rating, inside the popover next to the
455
+ * chosen thumb. Shown only while Automatic Learning records ratings; it
456
+ * renders after `children`, so a `children` layout does not place it.
457
+ */
458
+ feedbackComment?: SlotValue<typeof CopilotChatAssistantMessage.FeedbackComment>;
459
+ } & React$1.HTMLAttributes<HTMLDivElement>>;
460
+ declare function CopilotChatAssistantMessage({
461
+ message,
462
+ messages,
463
+ isRunning,
464
+ isLatest,
465
+ onThumbsUp,
466
+ onThumbsDown,
467
+ onReadAloud,
468
+ onRegenerate,
469
+ additionalToolbarItems,
470
+ toolbarVisible,
471
+ markdownRenderer,
472
+ toolbar,
473
+ copyButton,
474
+ inspectorButton,
475
+ thumbsUpButton,
476
+ thumbsDownButton,
477
+ readAloudButton,
478
+ regenerateButton,
479
+ feedbackComment: feedbackCommentSlot,
480
+ toolCallsView,
481
+ children,
482
+ className,
483
+ ...props
484
+ }: CopilotChatAssistantMessageProps): react_jsx_runtime0.JSX.Element;
485
+ declare namespace CopilotChatAssistantMessage {
486
+ const MarkdownRenderer: React$1.FC<MarkdownRendererProps & DefaultMarkdownRendererProps & {
487
+ /** Id of the rendered message. The markdown transport finds its fences by it. */messageId?: string;
488
+ }>;
489
+ const Toolbar: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
490
+ const ToolbarButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement> & {
491
+ title: string;
492
+ tooltip?: React$1.ReactNode;
493
+ tooltipClassName?: string;
494
+ children: React$1.ReactNode;
495
+ }>;
496
+ const CopyButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
497
+ const InspectorButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
498
+ const ThumbsUpButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
499
+ const ThumbsDownButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
500
+ /**
501
+ * The comment field of a rating, shown in a popover next to the chosen
502
+ * thumb. Enter saves; Send appears once the text differs from the saved
503
+ * comment. The popover marks itself `data-copilotkit-ignore`, so Learning
504
+ * records the saved comment but not the typing; outside it, mark the
505
+ * field yourself.
506
+ */
507
+ const FeedbackComment: React$1.FC<{
508
+ value: string; /** The comment already saved. */
509
+ savedComment: string;
510
+ inputRef?: React$1.Ref<HTMLInputElement>;
511
+ onChange: (value: string) => void;
512
+ onSubmit: () => void;
513
+ onEditingChange?: (editing: boolean) => void;
514
+ /**
515
+ * Focus left the form for `next`, or for no focusable element when null.
516
+ * Not called when the window loses focus.
517
+ */
518
+ onLeave?: (next: Element | null) => void;
519
+ className?: string;
520
+ }>;
521
+ const ReadAloudButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
522
+ const RegenerateButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
523
+ }
524
+ //#endregion
525
+ //#region src/components/chat/CopilotChatUserMessage.d.ts
526
+ interface CopilotChatUserMessageOnEditMessageProps {
527
+ message: UserMessage$1;
528
+ }
529
+ interface CopilotChatUserMessageOnSwitchToBranchProps {
530
+ message: UserMessage$1;
531
+ branchIndex: number;
532
+ numberOfBranches: number;
533
+ }
534
+ type CopilotChatUserMessageProps = WithSlots<{
535
+ messageRenderer: typeof CopilotChatUserMessage.MessageRenderer;
536
+ toolbar: typeof CopilotChatUserMessage.Toolbar;
537
+ copyButton: typeof CopilotChatUserMessage.CopyButton;
538
+ editButton: typeof CopilotChatUserMessage.EditButton;
539
+ branchNavigation: typeof CopilotChatUserMessage.BranchNavigation;
540
+ }, {
541
+ onEditMessage?: (props: CopilotChatUserMessageOnEditMessageProps) => void;
542
+ onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void;
543
+ message: UserMessage$1;
544
+ branchIndex?: number;
545
+ numberOfBranches?: number;
546
+ additionalToolbarItems?: React.ReactNode;
547
+ } & React.HTMLAttributes<HTMLDivElement>>;
548
+ declare function CopilotChatUserMessage({
549
+ message,
550
+ onEditMessage,
551
+ branchIndex,
552
+ numberOfBranches,
553
+ onSwitchToBranch,
554
+ additionalToolbarItems,
555
+ messageRenderer,
556
+ toolbar,
557
+ copyButton,
558
+ editButton,
559
+ branchNavigation,
560
+ children,
561
+ className,
562
+ ...props
563
+ }: CopilotChatUserMessageProps): react_jsx_runtime0.JSX.Element;
564
+ declare namespace CopilotChatUserMessage {
565
+ const Container: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>>;
566
+ const MessageRenderer: React.FC<{
567
+ content: string;
568
+ className?: string;
569
+ }>;
570
+ const Toolbar: React.FC<React.HTMLAttributes<HTMLDivElement>>;
571
+ const ToolbarButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
572
+ title: string;
573
+ children: React.ReactNode;
574
+ }>;
575
+ const CopyButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
576
+ copied?: boolean;
577
+ }>;
578
+ const EditButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement>>;
579
+ /**
580
+ * Previous/next buttons and an "n/m" counter for switching between branches
581
+ * of a user message. Renders only with more than one branch and an
582
+ * `onSwitchToBranch` handler. The buttons are named by
583
+ * `labels.userMessageToolbarPreviousBranchLabel` and
584
+ * `labels.userMessageToolbarNextBranchLabel`.
585
+ */
586
+ const BranchNavigation: React.FC<React.HTMLAttributes<HTMLDivElement> & {
587
+ currentBranch?: number;
588
+ numberOfBranches?: number;
589
+ onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void;
590
+ message: UserMessage$1;
591
+ }>;
592
+ }
593
+ //#endregion
594
+ //#region src/components/chat/CopilotChatReasoningMessage.d.ts
595
+ type CopilotChatReasoningMessageProps = WithSlots<{
596
+ header: typeof CopilotChatReasoningMessage.Header;
597
+ contentView: typeof CopilotChatReasoningMessage.Content;
598
+ toggle: typeof CopilotChatReasoningMessage.Toggle;
599
+ }, {
600
+ message: ReasoningMessage$1;
601
+ messages?: Message$1[];
602
+ isRunning?: boolean;
603
+ /**
604
+ * Whether this is the last message the chat renders. The message view
605
+ * passes it, because the rendered list can differ from `messages` when
606
+ * `transformMessages` drops, replaces or reorders messages. Defaults to
607
+ * comparing against the last entry of `messages`.
608
+ */
609
+ isLatest?: boolean;
610
+ } & React.HTMLAttributes<HTMLDivElement>>;
611
+ /**
612
+ * A reasoning message as a collapsible block. While the model reasons it is
613
+ * open and the header shows `labels.reasoningMessageThinkingLabel`; when
614
+ * streaming ends it collapses and the header reads "Thought for …". The
615
+ * `header` slot also receives `elapsedSeconds`.
616
+ */
617
+ declare function CopilotChatReasoningMessage({
618
+ message,
619
+ messages,
620
+ isRunning,
621
+ isLatest: isLatestProp,
622
+ header,
623
+ contentView,
624
+ toggle,
625
+ children,
626
+ className,
627
+ ...props
628
+ }: CopilotChatReasoningMessageProps): react_jsx_runtime0.JSX.Element;
629
+ declare namespace CopilotChatReasoningMessage {
630
+ const Header: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
631
+ isOpen?: boolean;
632
+ label?: string;
633
+ hasContent?: boolean;
634
+ isStreaming?: boolean;
635
+ /**
636
+ * Seconds spent reasoning so far, updated every second while streaming.
637
+ * The default label formats it in English ("Thought for 12 seconds");
638
+ * a custom header can use it to build a localized label.
639
+ */
640
+ elapsedSeconds?: number;
641
+ }>;
642
+ const Content: React.FC<React.HTMLAttributes<HTMLDivElement> & {
643
+ isStreaming?: boolean;
644
+ hasContent?: boolean;
645
+ }>;
646
+ const Toggle: React.FC<React.HTMLAttributes<HTMLDivElement> & {
647
+ isOpen?: boolean;
648
+ }>;
649
+ }
650
+ //#endregion
651
+ //#region src/components/chat/CopilotChatSuggestionPill.d.ts
652
+ interface CopilotChatSuggestionPillProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
653
+ /** Optional icon to render on the left side when not loading. */
654
+ icon?: React$1.ReactNode;
655
+ /** Whether the pill should display a loading spinner. */
656
+ isLoading?: boolean;
657
+ }
658
+ declare const CopilotChatSuggestionPill: React$1.ForwardRefExoticComponent<CopilotChatSuggestionPillProps & React$1.RefAttributes<HTMLButtonElement>>;
659
+ //#endregion
660
+ //#region src/components/chat/CopilotChatSuggestionView.d.ts
661
+ declare const DefaultContainer: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
662
+ type CopilotChatSuggestionViewProps = WithSlots<{
663
+ container: typeof DefaultContainer;
664
+ suggestion: typeof CopilotChatSuggestionPill;
665
+ }, {
666
+ suggestions: Suggestion$1[];
667
+ onSelectSuggestion?: (suggestion: Suggestion$1, index: number) => void;
668
+ loadingIndexes?: ReadonlyArray<number>;
669
+ } & React$1.HTMLAttributes<HTMLDivElement>>;
670
+ declare const CopilotChatSuggestionView: React$1.ForwardRefExoticComponent<{
671
+ container?: SlotValue<React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>> | undefined;
672
+ suggestion?: SlotValue<React$1.ForwardRefExoticComponent<CopilotChatSuggestionPillProps & React$1.RefAttributes<HTMLButtonElement>>> | undefined;
673
+ } & {
674
+ children?: ((props: {
675
+ container: React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
676
+ suggestion: React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
677
+ } & {
678
+ suggestions: Suggestion$1[];
679
+ onSelectSuggestion?: (suggestion: Suggestion$1, index: number) => void;
680
+ loadingIndexes?: ReadonlyArray<number>;
681
+ } & React$1.HTMLAttributes<HTMLDivElement>) => React$1.ReactNode) | undefined;
682
+ } & Omit<{
683
+ suggestions: Suggestion$1[];
684
+ onSelectSuggestion?: (suggestion: Suggestion$1, index: number) => void;
685
+ loadingIndexes?: ReadonlyArray<number>;
686
+ } & React$1.HTMLAttributes<HTMLDivElement>, "children"> & React$1.RefAttributes<HTMLDivElement>>;
687
+ //#endregion
688
+ //#region src/components/chat/CopilotChatWorkSummary.d.ts
689
+ interface CopilotChatWorkSummaryProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
690
+ /** The agent is still working on this reply. */
691
+ isWorking: boolean;
692
+ /** Whether the work (narration and tool calls) is showing. */
693
+ isOpen: boolean;
694
+ /** The tool calls the reply made. */
695
+ calls: ToolCallEntry[];
696
+ /**
697
+ * How long the agent has worked on the reply, in ms, summed over its runs
698
+ * so time spent waiting between them doesn't count. Only known for replies
699
+ * this client watched start; without it the summary shows the tool count.
700
+ */
701
+ elapsedMs?: number;
702
+ /** When the current run started (epoch ms), while the agent is working. */
703
+ workingSince?: number;
704
+ }
705
+ /**
706
+ * The line at the top of a reply in the `"turn"` tool-call display. While the
707
+ * agent works it reads "Working 4s"; once the reply is done it reads "Worked
708
+ * for 9s · 7 tools" and toggles the work it folded away.
709
+ */
710
+ declare function CopilotChatWorkSummary({
711
+ isWorking,
712
+ isOpen,
713
+ calls,
714
+ elapsedMs,
715
+ workingSince,
716
+ className,
717
+ ...props
718
+ }: CopilotChatWorkSummaryProps): react_jsx_runtime0.JSX.Element;
719
+ //#endregion
720
+ //#region src/components/intelligence-indicator/IntelligenceIndicatorView.d.ts
721
+ /** Lifecycle state the brain hands the face. */
722
+ type IntelligenceIndicatorStatus = "in-progress" | "finished";
723
+ interface IntelligenceIndicatorViewProps extends React$1.HTMLAttributes<HTMLSpanElement> {
724
+ /** The assistant message this indicator is attached to. */
725
+ message: Message$1;
726
+ /**
727
+ * Whether the intelligence work is still running (`in-progress`) or
728
+ * has settled (`finished`). Drives the icon morph and chrome
729
+ * fade-out via the `data-status` attribute on the wrapper.
730
+ */
731
+ status: IntelligenceIndicatorStatus;
732
+ /** The visible label, e.g. "Using CopilotKit Intelligence". */
733
+ label: string;
734
+ }
735
+ /**
736
+ * The presentational "CopilotKit Intelligence" face — the default
737
+ * rendered by the {@link IntelligenceIndicator} brain and the default
738
+ * value for the `intelligenceIndicator` slot.
739
+ *
740
+ * Layout: a glassmorphism pill (the `__chrome` layer) wrapping an icon
741
+ * and a label. The icon is two overlaid SVG paths — a spinner arc and a
742
+ * checkmark — whose geometry lives in each path's `d` ATTRIBUTE so it
743
+ * renders in every browser (the CSS `d:` property is Chrome-only).
744
+ *
745
+ * Two states, driven by the `data-status` attribute (see globals.css
746
+ * for the exact timing):
747
+ * 1. **In-progress.** The arc spins (CSS rotation) inside the pill and
748
+ * the checkmark is hidden. Label + icon are a saturated purple.
749
+ * 2. **Finished.** The arc fades out mid-spin while the checkmark draws
750
+ * itself in upright (animated `stroke-dashoffset`); the pill chrome
751
+ * fades away; and the label + icon settle from purple to a neutral
752
+ * gray, with the label slanting slightly (a `transform: skewX`
753
+ * faux-italic, so it interpolates with the color instead of snapping
754
+ * and never reflows). The result reads as quiet "history metadata"
755
+ * rather than an active spinner. The label text itself never changes
756
+ * — the static check plus the color/slant shift carry the "done"
757
+ * meaning, so no wording change is needed.
758
+ *
759
+ * All motion is gated behind `prefers-reduced-motion` (globals.css):
760
+ * when reduced motion is requested the arc does not spin and the two
761
+ * states swap instantly, without transitions.
762
+ *
763
+ * Customize via the `intelligenceIndicator` slot on `CopilotChat`:
764
+ * a className string restyles the wrapper, a props object tweaks
765
+ * the default (`{ label }`), and a component replaces it entirely
766
+ * with full control over visuals and timing.
767
+ */
768
+ declare function IntelligenceIndicatorView({
769
+ message,
770
+ status,
771
+ label,
772
+ className,
773
+ ...rest
774
+ }: IntelligenceIndicatorViewProps): React$1.ReactElement;
775
+ //#endregion
776
+ //#region src/components/intelligence-indicator/IntelligenceIndicator.d.ts
777
+ interface IntelligenceIndicatorProps {
778
+ /** The message this indicator is attached to. */
779
+ message: Message$1;
780
+ /**
781
+ * Agent id whose run state the indicator tracks. Pass through from
782
+ * the surrounding chat configuration; mounting from
783
+ * `CopilotChatMessageView` resolves this automatically.
784
+ */
785
+ agentId: string;
786
+ /**
787
+ * Optional override for the visible label. Defaults to
788
+ * "CopilotKit Intelligence".
789
+ */
790
+ label?: string;
791
+ /**
792
+ * Slot override for the presentational face. A className string, a
793
+ * props object, or a full replacement component — see
794
+ * {@link IntelligenceIndicatorView}. Forwarded from the
795
+ * `intelligenceIndicator` slot on `CopilotChat`.
796
+ */
797
+ intelligenceIndicator?: SlotValue<typeof IntelligenceIndicatorView>;
798
+ }
799
+ /**
800
+ * Stable turn id for the messages that precede the first user message (a turn
801
+ * with no opening user message of its own). Used as the React key so the
802
+ * indicator for that turn never collides with a real user-message id.
803
+ */
804
+ declare const INTELLIGENCE_TURN_HEAD = "__cpk_turn_head__";
805
+ /**
806
+ * Map each Intelligence-using turn to its anchor message — the FIRST bash-using
807
+ * assistant message of the turn — and a stable turn id (the id of the user
808
+ * message that opened the turn, or {@link INTELLIGENCE_TURN_HEAD} for the
809
+ * pre-first-user turn). Returns `Map<anchorMessageId, turnId>`.
810
+ *
811
+ * Anchoring to the FIRST (not last) bash-using message keeps the indicator
812
+ * fixed in place for the whole turn: later bash steps don't reposition it, so
813
+ * the spinner never abruptly jumps mid-turn (bug 1). `CopilotChatMessageView`
814
+ * emits exactly one `IntelligenceIndicator` per entry, keyed by the turn id and
815
+ * positioned at the anchor; the per-turn key also lets every past turn keep its
816
+ * own indicator in scroll-back.
817
+ *
818
+ * `visibleMessages` is what actually renders, when that differs from
819
+ * `messages` (the chat's `transformMessages`). Turns are still read from the
820
+ * full list, so hiding a user message does not merge its turn into the one
821
+ * before it, and anchors are only chosen among visible messages. A message the
822
+ * transform built itself joins the turn of the visible message before it.
823
+ */
824
+ declare function getIntelligenceTurnAnchors(messages: readonly Message$1[], visibleMessages?: readonly Message$1[]): Map<string, string>;
825
+ /**
826
+ * The "Using CopilotKit Intelligence" indicator brain. Auto-mounted by
827
+ * `CopilotChatMessageView` — once per Intelligence-using turn, at that
828
+ * turn's anchor message and keyed by the turn id (see
829
+ * {@link getIntelligenceTurnAnchors}). Callers do not register this
830
+ * themselves. It owns the run subscription and the phase machine and
831
+ * renders its swappable face via the `intelligenceIndicator` slot.
832
+ *
833
+ * Placement (which message anchors the turn) is decided by the view, so
834
+ * this component does not self-gate its own placement; it only derives
835
+ * in-progress/finished for the turn it was mounted on.
836
+ *
837
+ * Render gates (all must hold):
838
+ * 1. `copilotkit.intelligence !== undefined`
839
+ * 2. The (anchor) message is an assistant message with at least one
840
+ * tool call whose name matches {@link DEFAULT_TOOL_PATTERNS}.
841
+ * 3. The phase machine is past `hidden`.
842
+ *
843
+ * Because the view keys each indicator by its turn id, the instance moves
844
+ * with the anchor across a hand-off (no remount, no spinner restart), and
845
+ * every prior Intelligence-using turn keeps its own persistent indicator
846
+ * in chat history.
847
+ *
848
+ * Phase machine (per-instance, all timers local):
849
+ * - Starts in `hidden`, unless the message mounts onto an
850
+ * already-completed turn (no pending work, agent stopped or a
851
+ * real follow-up already present), in which case the lazy
852
+ * `useState` initializer starts directly in `finished`. This is
853
+ * what avoids a "hidden flash" on history replay.
854
+ * - `hidden → spinner` once a matching tool call has been pending
855
+ * (no `tool`-role result with a matching `toolCallId`) for
856
+ * {@link PENDING_THRESHOLD_MS}. Replay flashes (tool call + result
857
+ * in the same tick) never cross this threshold.
858
+ * - `hidden → finished` if after the grace window the turn is
859
+ * already complete (no pending work AND
860
+ * `sawRealFollowup || !agent.isRunning`). Handles very fast tools
861
+ * whose result lands within the grace window.
862
+ * - `spinner → finished` as soon as EITHER `agent.isRunning` flips
863
+ * false OR a non-tool-call-like message appears later in
864
+ * `agent.messages` (i.e. the agent produced a "real" follow-up —
865
+ * prose answer or a new user turn).
866
+ * - `finished` is terminal: the indicator settles into its
867
+ * persistent tag form and stays mounted.
868
+ */
869
+ declare function IntelligenceIndicator(props: IntelligenceIndicatorProps): React$1.ReactElement | null;
870
+ //#endregion
871
+ //#region src/components/chat/CopilotChatMessageView.d.ts
872
+ /** What the view passes the wrapper of a message group. */
873
+ interface MessageGroupWrapperProps<S = unknown> {
874
+ /** The group's key, as returned by `groupMessages`. */
875
+ groupKey: string;
876
+ /** The messages in the group, in order. */
877
+ messages: Message$1[];
878
+ /** The default rendering of the group's messages. */
879
+ children: React$1.ReactNode;
880
+ /**
881
+ * State the view keeps for this group, keyed by `groupKey`. It survives the
882
+ * row leaving the window and the wrapper remounting, is dropped once the key
883
+ * no longer appears, and is cleared when the thread changes. `undefined`
884
+ * until first set.
885
+ */
886
+ state: S | undefined;
887
+ setState: (next: S) => void;
888
+ }
889
+ /** Several messages rendered as one row, inside an app-provided wrapper. */
890
+ interface MessageGroup<S = unknown> {
891
+ type: "group";
892
+ /**
893
+ * Identifies the group across renders: its React key and the key its state
894
+ * is held under. Keep it stable while the thread streams, e.g. the id of the
895
+ * group's first message.
896
+ */
897
+ key: string;
898
+ messages: Message$1[];
899
+ /**
900
+ * Define it once at module level. A component created inside
901
+ * `groupMessages` is a new type on every call and remounts each time.
902
+ */
903
+ wrapper: React$1.ComponentType<MessageGroupWrapperProps<S>>;
904
+ }
905
+ /** One row of the message list: a single message, or a group of them. */
906
+ type MessageRow = {
907
+ type: "message";
908
+ message: Message$1;
909
+ } | MessageGroup;
910
+ /** A row holding a single message, rendered as it would be ungrouped. */
911
+ declare function messageRow(message: Message$1): MessageRow;
912
+ /** A row holding a group of messages, rendered inside `wrapper`. */
913
+ declare function messageGroup<S>(group: Omit<MessageGroup<S>, "type">): MessageRow;
914
+ type CopilotChatMessageViewProps = Omit<WithSlots<{
915
+ assistantMessage: typeof CopilotChatAssistantMessage;
916
+ userMessage: typeof CopilotChatUserMessage;
917
+ reasoningMessage: typeof CopilotChatReasoningMessage;
918
+ cursor: typeof CopilotChatMessageView.Cursor;
919
+ intelligenceIndicator: typeof IntelligenceIndicatorView; /** The "Working… / Worked for 9s" line of the `"turn"` tool-call display. */
920
+ workSummary: typeof CopilotChatWorkSummary;
921
+ }, {
922
+ isRunning?: boolean;
923
+ messages?: Message$1[];
924
+ /**
925
+ * Reshapes the message list before it renders: drop, replace or reorder
926
+ * messages with the whole list in view. Receives the list after duplicate
927
+ * ids are merged. Row keys, virtualization and rendering all work off
928
+ * the returned list, so a dropped message takes no row.
929
+ *
930
+ * Tool-call cards still look up their results in the full list, so
931
+ * hiding tool-result messages here does not strip results from them.
932
+ *
933
+ * Memoized on the input list and this function — pass a stable function
934
+ * (e.g. `useCallback`) or it reruns on every render.
935
+ */
936
+ transformMessages?: (messages: Message$1[]) => Message$1[];
937
+ /**
938
+ * Splits the message list into rows. Return `messageRow(message)` for a
939
+ * message that renders on its own, and `messageGroup({ key, messages,
940
+ * wrapper })` for messages that render together inside `wrapper` — a
941
+ * collapsible block of tool calls, say. Receives the list after
942
+ * `transformMessages`. Each row is one virtualized row.
943
+ *
944
+ * Return each message in at most one row. Tool-call cards still find
945
+ * their results in the full list.
946
+ *
947
+ * Memoized on its input and this function — pass a stable function.
948
+ */
949
+ groupMessages?: (messages: Message$1[]) => MessageRow[];
950
+ /**
951
+ * Whether reply thumbs record ratings for Automatic Learning once a
952
+ * Trajectory has started. Defaults to `true`; set `false` to keep the
953
+ * thumbs to your own `onThumbsUp` / `onThumbsDown` handlers and slots.
954
+ */
955
+ messageFeedback?: boolean;
956
+ /**
957
+ * How tool calls show. Defaults to `"grouped"`: calls made in a row
958
+ * share one card that opens to a row per call. `"line"` and `"stacked"`
959
+ * group them too; `"turn"` folds a reply's whole working phase into
960
+ * "Worked for 9s" once it's done; `"separate"` gives every call its own
961
+ * card. Calls with a renderer of their own always show on their own.
962
+ */
963
+ toolCallDisplay?: CopilotChatToolCallDisplay;
964
+ } & React$1.HTMLAttributes<HTMLDivElement>>, "children"> & {
965
+ children?: (props: {
966
+ isRunning: boolean;
967
+ messages: Message$1[];
968
+ messageElements: React$1.ReactElement[];
969
+ interruptElement: React$1.ReactElement | null;
970
+ }) => React$1.ReactElement;
971
+ };
972
+ declare function CopilotChatMessageView({
973
+ messages,
974
+ assistantMessage,
975
+ userMessage,
976
+ reasoningMessage,
977
+ cursor,
978
+ intelligenceIndicator,
979
+ workSummary,
980
+ isRunning,
981
+ transformMessages,
982
+ groupMessages,
983
+ messageFeedback,
984
+ toolCallDisplay,
985
+ children,
986
+ className,
987
+ ...props
988
+ }: CopilotChatMessageViewProps): react_jsx_runtime0.JSX.Element;
989
+ declare namespace CopilotChatMessageView {
990
+ var Cursor: ({
991
+ className,
992
+ ...props
993
+ }: React$1.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime0.JSX.Element;
994
+ }
995
+ //#endregion
996
+ //#region src/components/chat/normalize-auto-scroll.d.ts
997
+ type AutoScrollMode = "pin-to-bottom" | "pin-to-send" | "none";
998
+ //#endregion
999
+ //#region src/components/chat/CopilotChatView.d.ts
1000
+ type WelcomeScreenProps = WithSlots<{
1001
+ welcomeMessage: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
1002
+ }, {
1003
+ input: React$1.ReactElement;
1004
+ suggestionView: React$1.ReactElement;
1005
+ } & React$1.HTMLAttributes<HTMLDivElement>>;
1006
+ type CopilotChatViewProps = WithSlots<{
1007
+ messageView: typeof CopilotChatMessageView;
1008
+ scrollView: typeof CopilotChatView.ScrollView;
1009
+ input: React$1.ComponentType<CopilotChatInputProps>;
1010
+ suggestionView: typeof CopilotChatSuggestionView;
1011
+ }, {
1012
+ messages?: Message$1[];
1013
+ autoScroll?: AutoScrollMode | boolean;
1014
+ isRunning?: boolean;
1015
+ suggestions?: Suggestion$1[];
1016
+ suggestionLoadingIndexes?: ReadonlyArray<number>;
1017
+ onSelectSuggestion?: (suggestion: Suggestion$1, index: number) => void;
1018
+ welcomeScreen?: SlotValue<React$1.FC<WelcomeScreenProps>> | boolean;
1019
+ onSubmitMessage?: (value: string) => void;
1020
+ onStop?: () => void;
1021
+ inputMode?: CopilotChatInputMode;
1022
+ inputValue?: string;
1023
+ onInputChange?: (value: string) => void;
1024
+ onStartTranscribe?: () => void;
1025
+ onCancelTranscribe?: () => void;
1026
+ onFinishTranscribe?: () => void;
1027
+ onFinishTranscribeWithAudio?: (audioBlob: Blob) => Promise<void>;
1028
+ attachments?: Attachment$1[];
1029
+ onRemoveAttachment?: (id: string) => void;
1030
+ onAddFile?: () => void;
1031
+ dragOver?: boolean;
1032
+ onDragOver?: (e: React$1.DragEvent) => void;
1033
+ onDragLeave?: (e: React$1.DragEvent) => void;
1034
+ onDrop?: (e: React$1.DragEvent) => void;
1035
+ /**
1036
+ * When `true`, suppresses the welcome screen while a thread's initial
1037
+ * connect is in flight. Prevents the "How can I help you today?" flash
1038
+ * that would otherwise appear between mounting an empty agent instance
1039
+ * and the bootstrap messages arriving from /connect.
1040
+ */
1041
+ isConnecting?: boolean;
1042
+ /**
1043
+ * When `true`, the caller has explicitly picked a thread (via `threadId`
1044
+ * prop or `CopilotChatConfigurationProvider`). Suppresses the welcome
1045
+ * screen unconditionally — a caller-managed thread targets a specific
1046
+ * conversation and should render its messages (or an empty panel during
1047
+ * connect) rather than a generic "start a new chat" greeting.
1048
+ */
1049
+ hasExplicitThreadId?: boolean;
1050
+ /**
1051
+ * @deprecated Use the `input` slot's `disclaimer` prop instead:
1052
+ * ```tsx
1053
+ * <CopilotChat input={{ disclaimer: MyDisclaimer }} />
1054
+ * ```
1055
+ */
1056
+ disclaimer?: SlotValue<React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>>;
1057
+ /**
1058
+ * Slot for the "Using CopilotKit Intelligence" indicator. Pass-through
1059
+ * to `CopilotChatMessageView`'s `intelligenceIndicator` slot — accepts a
1060
+ * className string, a props object, or a replacement component.
1061
+ */
1062
+ intelligenceIndicator?: SlotValue<typeof IntelligenceIndicatorView>;
1063
+ } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "inputMode">>;
1064
+ declare function CopilotChatView({
1065
+ messageView,
1066
+ input,
1067
+ scrollView,
1068
+ suggestionView,
1069
+ welcomeScreen,
1070
+ messages,
1071
+ autoScroll,
1072
+ isRunning,
1073
+ suggestions,
1074
+ suggestionLoadingIndexes,
1075
+ onSelectSuggestion,
1076
+ onSubmitMessage,
1077
+ onStop,
1078
+ inputMode,
1079
+ inputValue,
1080
+ onInputChange,
1081
+ onStartTranscribe,
1082
+ onCancelTranscribe,
1083
+ onFinishTranscribe,
1084
+ onFinishTranscribeWithAudio,
1085
+ attachments,
1086
+ onRemoveAttachment,
1087
+ onAddFile,
1088
+ dragOver,
1089
+ onDragOver,
1090
+ onDragLeave,
1091
+ onDrop,
1092
+ isConnecting,
1093
+ hasExplicitThreadId,
1094
+ disclaimer,
1095
+ intelligenceIndicator,
1096
+ children,
1097
+ className,
1098
+ ...props
1099
+ }: CopilotChatViewProps): react_jsx_runtime0.JSX.Element;
1100
+ declare namespace CopilotChatView {
1101
+ const ScrollView: React$1.FC<React$1.HTMLAttributes<HTMLDivElement> & {
1102
+ autoScroll?: AutoScrollMode | boolean;
1103
+ scrollThreadId?: string;
1104
+ scrollToBottomButton?: SlotValue<React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>>;
1105
+ feather?: SlotValue<React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>>;
1106
+ inputContainerHeight?: number;
1107
+ isResizing?: boolean;
1108
+ }>;
1109
+ /**
1110
+ * Scrolls the message list to the latest message. Shown while the user is
1111
+ * scrolled up; its accessible name is `labels.chatScrollToBottomLabel`.
1112
+ */
1113
+ const ScrollToBottomButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
1114
+ const Feather: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
1115
+ const WelcomeMessage: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
1116
+ const WelcomeScreen: React$1.FC<WelcomeScreenProps>;
1117
+ }
1118
+ //#endregion
1119
+ //#region src/components/chat/CopilotChat.d.ts
1120
+ type CopilotChatProps = Omit<CopilotChatViewProps, "messages" | "isRunning" | "suggestions" | "suggestionLoadingIndexes" | "onSelectSuggestion" | "attachments" | "onRemoveAttachment" | "onAddFile" | "dragOver" | "onDragOver" | "onDragLeave" | "onDrop"> & {
1121
+ agentId?: string;
1122
+ threadId?: string;
1123
+ labels?: Partial<CopilotChatLabels>;
1124
+ /**
1125
+ * Enable Inspector message shortcuts for this chat (enabled by default).
1126
+ * An explicit CopilotKit provider enableInspector value takes priority.
1127
+ * Shortcuts only appear in local development while Inspector is visible.
1128
+ */
1129
+ inspectorTools?: boolean; /** Accepts a className, partial props, or any component with CopilotChatView props — static namespace members are not required. */
1130
+ chatView?: SlotValue<React$1.ComponentType<CopilotChatViewProps>>;
1131
+ isModalDefaultOpen?: boolean; /** Enable multimodal file attachments (images, audio, video, documents). */
1132
+ attachments?: AttachmentsConfig$1;
1133
+ /**
1134
+ * Error handler scoped to this chat's agent. Fires in addition to the
1135
+ * provider-level onError (does not suppress it). Receives only errors
1136
+ * whose context.agentId matches this chat's agent.
1137
+ */
1138
+ onError?: (event: {
1139
+ error: Error;
1140
+ code: CopilotKitCoreErrorCode$1;
1141
+ context: Record<string, any>;
1142
+ }) => void | Promise<void>;
1143
+ /**
1144
+ * Throttle interval (in milliseconds) for re-renders triggered by message
1145
+ * change notifications. Overrides the provider-level `defaultThrottleMs`
1146
+ * for this chat instance. Forwarded to the internal `useAgent()` hook,
1147
+ * which resolves the effective throttle value.
1148
+ *
1149
+ * @default undefined — inherits from provider `defaultThrottleMs`;
1150
+ * if that is also unset, re-renders are unthrottled. Note: passing
1151
+ * `throttleMs={0}` explicitly disables throttling for this instance
1152
+ * even when the provider specifies a non-zero `defaultThrottleMs`.
1153
+ */
1154
+ throttleMs?: number;
1155
+ /**
1156
+ * Experimental. Wrapper for generative UI surfaces rendered in this chat.
1157
+ * Receives `{ surfaceId, isStreaming, error, children }`.
1158
+ */
1159
+ generativeUISurface?: React$1.ComponentType<GenerativeUIChatSurfaceProps>;
1160
+ };
1161
+ declare function CopilotChat({
1162
+ agentId,
1163
+ threadId,
1164
+ labels,
1165
+ inspectorTools,
1166
+ chatView,
1167
+ isModalDefaultOpen,
1168
+ attachments: attachmentsConfig,
1169
+ onError,
1170
+ throttleMs,
1171
+ generativeUISurface,
1172
+ ...props
1173
+ }: CopilotChatProps): react_jsx_runtime0.JSX.Element;
1174
+ declare namespace CopilotChat {
1175
+ const View: typeof CopilotChatView;
1176
+ }
1177
+ //#endregion
1178
+ //#region src/components/chat/CopilotChatToggleButton.d.ts
1179
+ declare const DefaultOpenIcon: React$1.FC<React$1.SVGProps<SVGSVGElement>>;
1180
+ declare const DefaultCloseIcon: React$1.FC<React$1.SVGProps<SVGSVGElement>>;
1181
+ interface CopilotChatToggleButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
1182
+ /** Optional slot override for the chat (closed) icon. */
1183
+ openIcon?: SlotValue<typeof DefaultOpenIcon>;
1184
+ /** Optional slot override for the close icon. */
1185
+ closeIcon?: SlotValue<typeof DefaultCloseIcon>;
1186
+ }
1187
+ declare const CopilotChatToggleButton: React$1.ForwardRefExoticComponent<CopilotChatToggleButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
1188
+ //#endregion
1189
+ //#region src/components/chat/CopilotModalHeader.d.ts
1190
+ type HeaderSlots = {
1191
+ titleContent: typeof CopilotModalHeader.Title;
1192
+ closeButton: typeof CopilotModalHeader.CloseButton;
1193
+ drawerLauncher: typeof CopilotModalHeader.DrawerLauncher;
1194
+ };
1195
+ type HeaderRestProps = {
1196
+ title?: string;
1197
+ } & Omit<React$1.HTMLAttributes<HTMLDivElement>, "children">;
1198
+ /**
1199
+ * Payload handed to the optional `children` render function. `drawerLauncher`
1200
+ * is nullable because the launcher is rendered only when a drawer has
1201
+ * registered — when none is present, custom layouts receive `null` and can omit
1202
+ * the launcher slot entirely.
1203
+ */
1204
+ type HeaderChildrenPayload = {
1205
+ titleContent: React$1.ReactElement;
1206
+ closeButton: React$1.ReactElement;
1207
+ drawerLauncher: React$1.ReactElement | null;
1208
+ title?: string;
1209
+ } & Omit<HeaderRestProps, "title">;
1210
+ type CopilotModalHeaderProps = Omit<WithSlots<HeaderSlots, HeaderRestProps>, "children"> & {
1211
+ children?: (props: HeaderChildrenPayload) => React$1.ReactNode;
1212
+ };
1213
+ declare function CopilotModalHeader({
1214
+ title,
1215
+ titleContent,
1216
+ closeButton,
1217
+ drawerLauncher,
1218
+ children,
1219
+ className,
1220
+ ...rest
1221
+ }: CopilotModalHeaderProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null | undefined;
1222
+ declare namespace CopilotModalHeader {
1223
+ var displayName: string;
1224
+ }
1225
+ declare namespace CopilotModalHeader {
1226
+ const Title: React$1.FC<React$1.HTMLAttributes<HTMLDivElement>>;
1227
+ /**
1228
+ * Closes the popup or sidebar. Its accessible name is
1229
+ * `labels.modalHeaderCloseButtonLabel`.
1230
+ */
1231
+ const CloseButton: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
1232
+ /**
1233
+ * The thread-list launcher button. Rendered in the header ONLY when a
1234
+ * `<CopilotThreadsDrawer>` wrapper has registered with the chat configuration; it
1235
+ * toggles the drawer open state. The stable `data-testid` is the focus-return
1236
+ * target for the drawer wrapper on cancel/back/backdrop/Escape.
1237
+ */
1238
+ const DrawerLauncher: React$1.FC<React$1.ButtonHTMLAttributes<HTMLButtonElement>>;
1239
+ }
1240
+ //#endregion
1241
+ //#region src/components/chat/CopilotSidebarView.d.ts
1242
+ type CopilotSidebarViewProps = CopilotChatViewProps & {
1243
+ /** Accepts a className, partial props, or any component with CopilotModalHeader props — static namespace members are not required. */header?: SlotValue<React$1.ComponentType<CopilotModalHeaderProps>>;
1244
+ toggleButton?: SlotValue<typeof CopilotChatToggleButton>;
1245
+ width?: number | string;
1246
+ defaultOpen?: boolean;
1247
+ position?: "left" | "right";
1248
+ };
1249
+ /**
1250
+ * The chat in a side panel: a `complementary` region named by
1251
+ * `labels.sidebarLabel`, with a header, the chat view and a toggle button.
1252
+ */
1253
+ declare function CopilotSidebarView({
1254
+ header,
1255
+ toggleButton,
1256
+ width,
1257
+ defaultOpen,
1258
+ position,
1259
+ ...props
1260
+ }: CopilotSidebarViewProps): react_jsx_runtime0.JSX.Element;
1261
+ declare namespace CopilotSidebarView {
1262
+ var displayName: string;
1263
+ }
1264
+ declare namespace CopilotSidebarView {
1265
+ /**
1266
+ * Sidebar-specific welcome screen layout:
1267
+ * - Suggestions at the top
1268
+ * - Welcome message in the middle
1269
+ * - Input fixed at the bottom (like normal chat)
1270
+ */
1271
+ const WelcomeScreen: React$1.FC<WelcomeScreenProps>;
1272
+ }
1273
+ //#endregion
1274
+ //#region src/components/chat/CopilotPopupView.d.ts
1275
+ type CopilotPopupViewProps = CopilotChatViewProps & {
1276
+ /** Accepts a className, partial props, or any component with CopilotModalHeader props — static namespace members are not required. */header?: SlotValue<React$1.ComponentType<CopilotModalHeaderProps>>;
1277
+ toggleButton?: SlotValue<typeof CopilotChatToggleButton>;
1278
+ width?: number | string;
1279
+ height?: number | string;
1280
+ clickOutsideToClose?: boolean;
1281
+ defaultOpen?: boolean;
1282
+ };
1283
+ declare function CopilotPopupView({
1284
+ header,
1285
+ toggleButton,
1286
+ width,
1287
+ height,
1288
+ clickOutsideToClose,
1289
+ defaultOpen,
1290
+ className,
1291
+ ...restProps
1292
+ }: CopilotPopupViewProps): react_jsx_runtime0.JSX.Element;
1293
+ declare namespace CopilotPopupView {
1294
+ var displayName: string;
1295
+ }
1296
+ declare namespace CopilotPopupView {
1297
+ /**
1298
+ * Popup-specific welcome screen layout:
1299
+ * - Welcome message centered vertically
1300
+ * - Suggestions just above input
1301
+ * - Input fixed at the bottom
1302
+ */
1303
+ const WelcomeScreen: React$1.FC<WelcomeScreenProps>;
1304
+ }
1305
+ //#endregion
1306
+ //#region src/components/chat/CopilotSidebar.d.ts
1307
+ type CopilotSidebarProps = Omit<CopilotChatProps, "chatView"> & {
1308
+ header?: CopilotSidebarViewProps["header"];
1309
+ toggleButton?: CopilotSidebarViewProps["toggleButton"];
1310
+ defaultOpen?: boolean;
1311
+ /**
1312
+ * Controlled open state. When supplied, the host owns whether the sidebar is
1313
+ * open: the sidebar renders this value and never changes it on its own.
1314
+ * Pair it with `onOpenChange` to react to the toggle button. Omit it (and use
1315
+ * `defaultOpen`) to let the sidebar manage its own state.
1316
+ */
1317
+ open?: boolean;
1318
+ /**
1319
+ * Called with the requested state whenever the sidebar asks to open or close
1320
+ * (the toggle button, or the thread drawer on mobile). In controlled mode
1321
+ * nothing moves until the host updates `open`.
1322
+ */
1323
+ onOpenChange?: (open: boolean) => void;
1324
+ width?: number | string;
1325
+ position?: CopilotSidebarViewProps["position"];
1326
+ };
1327
+ declare function CopilotSidebar({
1328
+ header,
1329
+ toggleButton,
1330
+ defaultOpen,
1331
+ open,
1332
+ onOpenChange,
1333
+ width,
1334
+ position,
1335
+ ...chatProps
1336
+ }: CopilotSidebarProps): react_jsx_runtime0.JSX.Element;
1337
+ declare namespace CopilotSidebar {
1338
+ var displayName: string;
1339
+ }
1340
+ //#endregion
1341
+ //#region src/components/chat/CopilotPopup.d.ts
1342
+ type CopilotPopupProps = Omit<CopilotChatProps, "chatView"> & {
1343
+ header?: CopilotPopupViewProps["header"];
1344
+ toggleButton?: CopilotPopupViewProps["toggleButton"];
1345
+ defaultOpen?: boolean;
1346
+ /**
1347
+ * Controlled open state. When supplied, the host owns whether the popup is
1348
+ * open: the popup renders this value and never changes it on its own. Pair it
1349
+ * with `onOpenChange` to react to the toggle button and to click-outside.
1350
+ * Omit it (and use `defaultOpen`) to let the popup manage its own state.
1351
+ */
1352
+ open?: boolean;
1353
+ /**
1354
+ * Called with the requested state whenever the popup asks to open or close
1355
+ * (the toggle button, click-outside, or the thread drawer on mobile). In
1356
+ * controlled mode nothing moves until the host updates `open`.
1357
+ */
1358
+ onOpenChange?: (open: boolean) => void;
1359
+ width?: CopilotPopupViewProps["width"];
1360
+ height?: CopilotPopupViewProps["height"];
1361
+ clickOutsideToClose?: CopilotPopupViewProps["clickOutsideToClose"];
1362
+ };
1363
+ declare function CopilotPopup({
1364
+ header,
1365
+ toggleButton,
1366
+ defaultOpen,
1367
+ open,
1368
+ onOpenChange,
1369
+ width,
1370
+ height,
1371
+ clickOutsideToClose,
1372
+ ...chatProps
1373
+ }: CopilotPopupProps): react_jsx_runtime0.JSX.Element;
1374
+ declare namespace CopilotPopup {
1375
+ var displayName: string;
1376
+ }
1377
+ //#endregion
1378
+ //#region src/hooks/use-threads.d.ts
1379
+ /**
1380
+ * A conversation thread managed by CopilotKit Intelligence.
1381
+ *
1382
+ * Each thread has a unique `id`, an optional human-readable `name`, and
1383
+ * timestamp fields tracking creation and update times.
1384
+ */
1385
+ interface Thread {
1386
+ id: string;
1387
+ agentId: string;
1388
+ name: string | null;
1389
+ archived: boolean;
1390
+ createdAt: string;
1391
+ updatedAt: string;
1392
+ /**
1393
+ * ISO-8601 timestamp of the most recent agent run on this thread. Absent
1394
+ * when the thread has never been run. Prefer this over `updatedAt` for
1395
+ * user-facing "last activity" displays — it is not bumped by metadata-only
1396
+ * actions like rename or archive.
1397
+ */
1398
+ lastRunAt?: string;
1399
+ }
1400
+ /**
1401
+ * Configuration for the {@link useThreads} hook.
1402
+ *
1403
+ * Thread operations are scoped to the runtime-authenticated user and the
1404
+ * provided agent on CopilotKit Intelligence.
1405
+ */
1406
+ interface UseThreadsInput {
1407
+ /** The ID of the agent whose threads to list and manage. */
1408
+ agentId: string;
1409
+ /** When `true`, archived threads are included in the list. Defaults to `false`. */
1410
+ includeArchived?: boolean;
1411
+ /** Maximum number of threads to fetch per page. When set, enables cursor-based pagination. */
1412
+ limit?: number;
1413
+ /**
1414
+ * When `false`, the hook stays inert: no runtime context is dispatched, so
1415
+ * NO thread-list fetch or realtime subscription is issued. Used by gated
1416
+ * surfaces (e.g. an unlicensed `<CopilotThreadsDrawer>`) that must not touch the
1417
+ * network until the gate opens. Defaults to `true`.
1418
+ *
1419
+ * Flipping `enabled` back to `true` resumes normal fetching on the next
1420
+ * effect run; mutations are likewise short-circuited while disabled.
1421
+ */
1422
+ enabled?: boolean;
1423
+ }
1424
+ /**
1425
+ * Return value of the {@link useThreads} hook.
1426
+ *
1427
+ * The `threads` array is kept in sync with the platform via a realtime
1428
+ * WebSocket subscription (when available) and is sorted most-recently-updated
1429
+ * first. Mutations reject with an `Error` if the platform request fails.
1430
+ */
1431
+ interface UseThreadsResult {
1432
+ /**
1433
+ * Threads for the current user/agent pair, sorted by most recently
1434
+ * updated first. Updated in realtime when the platform pushes metadata
1435
+ * events. Includes archived threads only when `includeArchived` is set.
1436
+ */
1437
+ threads: Thread[];
1438
+ /**
1439
+ * `true` while the initial thread list is being fetched from the platform.
1440
+ * Subsequent realtime updates do not re-enter the loading state.
1441
+ */
1442
+ isLoading: boolean;
1443
+ /**
1444
+ * The most recent error from fetching threads or executing a mutation,
1445
+ * or `null` when there is no error. Reset to `null` on the next
1446
+ * successful fetch.
1447
+ *
1448
+ * This channel folds together developer/config errors (missing runtime URL,
1449
+ * runtime without thread endpoints) and genuine list-load/mutation failures.
1450
+ * End-user surfaces that must not leak config errors should prefer
1451
+ * {@link listError}, which excludes the config/runtime-setup errors.
1452
+ */
1453
+ error: Error | null;
1454
+ /**
1455
+ * The most recent genuine list-load or mutation error from the platform, or
1456
+ * `null`. Unlike {@link error}, this EXCLUDES developer/config errors (a
1457
+ * missing runtime URL, or a runtime that does not advertise thread
1458
+ * endpoints), so an end-user surface can render it directly without leaking
1459
+ * a developer-facing configuration message into the UI.
1460
+ */
1461
+ listError: Error | null;
1462
+ /**
1463
+ * The error from the most recent FAILED next-page (fetch-more) load, or
1464
+ * `null`. Tracked separately from {@link listError} so a paginated-load
1465
+ * failure surfaces an inline "couldn't load more" affordance while the
1466
+ * already-loaded list stays visible. Cleared when a fetch-more is retried or
1467
+ * succeeds.
1468
+ */
1469
+ fetchMoreError: Error | null;
1470
+ /**
1471
+ * `true` when there are more threads available to fetch via
1472
+ * {@link fetchMoreThreads}. Only meaningful when `limit` is set.
1473
+ */
1474
+ hasMoreThreads: boolean;
1475
+ /**
1476
+ * `true` while a subsequent page of threads is being fetched.
1477
+ */
1478
+ isFetchingMoreThreads: boolean;
1479
+ /**
1480
+ * `true` while at least one thread mutation (rename, archive, unarchive,
1481
+ * delete) is awaiting a server response. Mutations apply optimistically, so
1482
+ * this is primarily useful for disabling controls or showing a subtle
1483
+ * in-flight indicator.
1484
+ */
1485
+ isMutating: boolean;
1486
+ /**
1487
+ * Fetch the next page of threads. No-op when {@link hasMoreThreads} is
1488
+ * `false` or a fetch is already in progress.
1489
+ */
1490
+ fetchMoreThreads: () => void;
1491
+ /**
1492
+ * Re-fetch the thread list from the platform without clearing the current
1493
+ * list. Backs the drawer's error-state Retry and the Active/All filter
1494
+ * refetch. No-op until the runtime is connected.
1495
+ */
1496
+ refetchThreads: () => void;
1497
+ /**
1498
+ * Reset to a fresh, non-explicit client-side thread so the welcome screen
1499
+ * shows. Lazy creation: no row appears in {@link threads} until the new
1500
+ * thread's first run persists server-side.
1501
+ */
1502
+ startNewThread: () => void;
1503
+ /**
1504
+ * Rename a thread on the platform.
1505
+ * Resolves when the server confirms the update; rejects on failure.
1506
+ */
1507
+ renameThread: (threadId: string, name: string) => Promise<void>;
1508
+ /**
1509
+ * Archive a thread on the platform.
1510
+ * Archived threads are excluded from subsequent list results.
1511
+ * Resolves when the server confirms the update; rejects on failure.
1512
+ */
1513
+ archiveThread: (threadId: string) => Promise<void>;
1514
+ /**
1515
+ * Restore a previously archived thread on the platform.
1516
+ * The thread re-appears in default (non-archived) list results.
1517
+ * Resolves when the server confirms the update; rejects on failure.
1518
+ */
1519
+ unarchiveThread: (threadId: string) => Promise<void>;
1520
+ /**
1521
+ * Permanently delete a thread from the platform.
1522
+ * This is irreversible. Resolves when the server confirms deletion;
1523
+ * rejects on failure.
1524
+ */
1525
+ deleteThread: (threadId: string) => Promise<void>;
1526
+ }
1527
+ /**
1528
+ * React hook for listing and managing CopilotKit Intelligence threads.
1529
+ *
1530
+ * On mount the hook fetches the thread list for the runtime-authenticated user
1531
+ * and the given `agentId`. When CopilotKit Intelligence exposes a WebSocket
1532
+ * URL, it also opens a realtime subscription so the `threads` array stays
1533
+ * current without polling — thread creates, renames, archives, and deletes
1534
+ * from any client are reflected immediately.
1535
+ *
1536
+ * Mutation methods (`renameThread`, `archiveThread`, `unarchiveThread`,
1537
+ * `deleteThread`) return promises that resolve once the platform confirms the
1538
+ * operation and reject with an `Error` on failure.
1539
+ *
1540
+ * @param input - Agent identifier and optional list controls.
1541
+ * @returns Thread list state and stable mutation callbacks.
1542
+ *
1543
+ * @example
1544
+ * ```tsx
1545
+ * import { useThreads } from "@copilotkit/react-core";
1546
+ *
1547
+ * function ThreadList() {
1548
+ * const { threads, isLoading, renameThread, deleteThread } = useThreads({
1549
+ * agentId: "agent-1",
1550
+ * });
1551
+ *
1552
+ * if (isLoading) return <p>Loading…</p>;
1553
+ *
1554
+ * return (
1555
+ * <ul>
1556
+ * {threads.map((t) => (
1557
+ * <li key={t.id}>
1558
+ * {t.name ?? "Untitled"}
1559
+ * <button onClick={() => renameThread(t.id, "New name")}>Rename</button>
1560
+ * <button onClick={() => deleteThread(t.id)}>Delete</button>
1561
+ * </li>
1562
+ * ))}
1563
+ * </ul>
1564
+ * );
1565
+ * }
1566
+ * ```
1567
+ */
1568
+ declare function useThreads({
1569
+ agentId,
1570
+ includeArchived,
1571
+ limit,
1572
+ enabled
1573
+ }: UseThreadsInput): UseThreadsResult;
1574
+ //#endregion
1575
+ //#region src/components/chat/CopilotThreadsDrawer.d.ts
1576
+ /**
1577
+ * Per-row content render function. Receives a thread and returns the React
1578
+ * node to project into the element's `slot="row:{id}"`. Returning `null`
1579
+ * (or omitting the prop) falls back to the element's built-in row name.
1580
+ */
1581
+ type CopilotThreadsDrawerRowRenderer = (thread: Thread) => React$1.ReactNode;
1582
+ /**
1583
+ * Props for {@link CopilotThreadsDrawer}.
1584
+ *
1585
+ * The drawer is a thin controller around the framework-agnostic
1586
+ * `<copilotkit-threads-drawer>` custom element. It feeds the element domain data
1587
+ * (threads/loading/error from {@link useThreads}, the active thread from the
1588
+ * chat configuration) and routes the element's outbound DOM events back into
1589
+ * core thread operations and chat-configuration changes.
1590
+ */
1591
+ interface CopilotThreadsDrawerProps {
1592
+ /**
1593
+ * The agent whose threads to list and manage. Defaults to the agent of the
1594
+ * surrounding chat configuration, or the platform default when none is set.
1595
+ */
1596
+ agentId?: string;
1597
+ /**
1598
+ * Optional escape-hatch called when the user picks a thread row. The wrapper
1599
+ * additionally focuses the chat input. When omitted, the wrapper drives the
1600
+ * surrounding chat configuration directly (`setActiveThreadId`), so a bare
1601
+ * `<CopilotThreadsDrawer>` switches the rendered thread with no host wiring. Provide
1602
+ * this only to take control of the active thread yourself (e.g. a v1
1603
+ * `setThreadId`); when provided it is preferred over the provider.
1604
+ */
1605
+ onThreadSelect?: (threadId: string) => void;
1606
+ /**
1607
+ * Optional escape-hatch called when the user starts a new thread (the
1608
+ * element's "+ New" button). The wrapper always resets the core thread store
1609
+ * to a fresh, non-explicit client-side thread (`startNewThread`). When this
1610
+ * is omitted, the wrapper also resets the surrounding chat configuration to a
1611
+ * fresh non-explicit thread (`startNewThread`) so the welcome screen shows
1612
+ * with no host wiring. Provide this only to clear your own active thread;
1613
+ * when provided it is preferred over the provider.
1614
+ */
1615
+ onNewThread?: () => void;
1616
+ /** Called when the Upgrade CTA is clicked. */
1617
+ onLicensed?: () => void;
1618
+ /**
1619
+ * Destination the locked view's Upgrade CTA opens in a new tab. Defaults to
1620
+ * the element's built-in CopilotKit Intelligence docs URL when omitted. Set
1621
+ * to an empty string to suppress the default navigation and handle the click
1622
+ * yourself via `onLicensed`.
1623
+ */
1624
+ licenseUrl?: string;
1625
+ /**
1626
+ * Optional per-row content. Rendered as light-DOM children with
1627
+ * `slot="row:{id}"` so the element projects them in place of the default
1628
+ * row name. Return `null` for a given row to keep the element's default.
1629
+ */
1630
+ renderRow?: CopilotThreadsDrawerRowRenderer;
1631
+ /**
1632
+ * Accessible + default-header label for the drawer region. Sets the custom
1633
+ * element's `aria-label` and the default header text (shown when no
1634
+ * `slot="header"` content is projected). Defaults to the element's built-in
1635
+ * `"Threads"` when omitted.
1636
+ */
1637
+ label?: string;
1638
+ /**
1639
+ * Heading for the "Recent Conversations" section above the thread list. Sets
1640
+ * the custom element's `recent-label` attribute. Defaults to the element's
1641
+ * built-in `"Recent Conversations"` when omitted.
1642
+ */
1643
+ recentLabel?: string;
1644
+ /**
1645
+ * Whether the drawer offers a collapse toggle. Sets the custom element's
1646
+ * `collapsible` PROPERTY. When `false`, the drawer has no collapse toggle and
1647
+ * is always expanded. Defaults to the element's built-in `true` when omitted.
1648
+ */
1649
+ collapsible?: boolean;
1650
+ /**
1651
+ * Called when the drawer's collapsed state changes (via the element's collapse
1652
+ * toggle), with the new collapsed state. Mirrors the element's
1653
+ * `collapse-change` event.
1654
+ */
1655
+ onCollapseChange?: (collapsed: boolean) => void;
1656
+ /**
1657
+ * Page size for thread pagination. When set, threads are fetched in pages of
1658
+ * this size and the drawer shows a "Load more" control while more remain.
1659
+ * When omitted, the full list loads at once and no pagination control shows.
1660
+ */
1661
+ limit?: number;
1662
+ /**
1663
+ * `data-testid` set on the underlying custom element (handy in tests and for
1664
+ * targeting from a host page). Defaults to `"copilot-threads-drawer"`.
1665
+ */
1666
+ "data-testid"?: string;
1667
+ }
1668
+ /**
1669
+ * React wrapper for the shadow-DOM `<copilotkit-threads-drawer>` threads drawer.
1670
+ *
1671
+ * Responsibilities:
1672
+ * - Registers the custom element on the client (SSR-safe; nothing renders
1673
+ * during prerender to avoid hydration mismatch).
1674
+ * - Feeds the element domain data: `threads`, `loading`, `error`,
1675
+ * `activeThreadId`, `licensed`, fetch-more state.
1676
+ * - Routes the element's outbound events to core thread operations
1677
+ * ({@link useThreads}) and chat-configuration changes.
1678
+ * - Registers with the surrounding chat configuration so the header
1679
+ * thread-list launcher appears, and binds the element `open` state to the
1680
+ * configuration's `drawerOpen`.
1681
+ *
1682
+ * Intelligence gating is two-pronged: the locked view shows when the runtime
1683
+ * reports no active entitlement OR the `threads` feature is unavailable. While
1684
+ * unavailable, the thread fetch is skipped entirely so the drawer issues no
1685
+ * network requests.
1686
+ *
1687
+ * Thread switching needs no host wiring: when `onThreadSelect`/`onNewThread`
1688
+ * are omitted, the wrapper drives the surrounding chat configuration directly
1689
+ * ({@link CopilotChatConfigurationValue.setActiveThreadId} /
1690
+ * {@link CopilotChatConfigurationValue.startNewThread}), so a bare drawer
1691
+ * connects to the picked thread and shows the welcome screen on "+ New". Pass
1692
+ * the callbacks only to take control yourself.
1693
+ *
1694
+ * @example
1695
+ * ```tsx
1696
+ * // Callback-free: the drawer drives the chat configuration itself.
1697
+ * <CopilotKitProvider runtimeUrl="/api/copilotkit">
1698
+ * <CopilotChat />
1699
+ * <CopilotThreadsDrawer />
1700
+ * </CopilotKitProvider>
1701
+ * ```
1702
+ */
1703
+ declare function CopilotThreadsDrawer({
1704
+ agentId,
1705
+ onThreadSelect,
1706
+ onNewThread,
1707
+ onLicensed,
1708
+ licenseUrl,
1709
+ renderRow,
1710
+ label,
1711
+ recentLabel,
1712
+ collapsible,
1713
+ onCollapseChange,
1714
+ limit,
1715
+ "data-testid": dataTestId
1716
+ }: CopilotThreadsDrawerProps): React$1.ReactElement | null;
1717
+ declare namespace CopilotThreadsDrawer {
1718
+ var displayName: string;
1719
+ }
1720
+ //#endregion
1721
+ //#region src/components/chat/CopilotChatAttachmentQueue.d.ts
1722
+ interface CopilotChatAttachmentQueueProps {
1723
+ attachments: Attachment$1[];
1724
+ onRemoveAttachment: (id: string) => void;
1725
+ className?: string;
1726
+ }
1727
+ /**
1728
+ * The attachments queued in the composer, each with a preview and a remove
1729
+ * button named by `labels.attachmentRemoveButtonLabel`.
1730
+ */
1731
+ declare const CopilotChatAttachmentQueue: React$1.FC<CopilotChatAttachmentQueueProps>;
1732
+ //#endregion
1733
+ //#region src/components/chat/CopilotChatAttachmentRenderer.d.ts
1734
+ interface CopilotChatAttachmentRendererProps {
1735
+ type: "image" | "audio" | "video" | "document";
1736
+ source: InputContentSource$1;
1737
+ filename?: string;
1738
+ className?: string;
1739
+ }
1740
+ declare const CopilotChatAttachmentRenderer: React$1.FC<CopilotChatAttachmentRendererProps>;
1741
+ //#endregion
1742
+ //#region src/components/WildcardToolCallRender.d.ts
1743
+ /**
1744
+ * Catch-all (`"*"`) tool-call renderer that shows CopilotKit's default
1745
+ * tool-call card for any tool without a dedicated renderer.
1746
+ */
1747
+ declare const WildcardToolCallRender: ReactToolCallRenderer<any>;
1748
+ //#endregion
1749
+ //#region src/components/CopilotKitInspectorContext.d.ts
1750
+ type CopilotKitInspectorOpenRequest = {
1751
+ messageId: string;
1752
+ threadId?: string;
1753
+ agentId?: string;
1754
+ };
1755
+ //#endregion
1756
+ //#region src/components/CopilotKitInspector.d.ts
1757
+ interface CopilotKitInspectorProps {
1758
+ core?: CopilotKitCore$1 | null;
1759
+ onVisibilityChange?: (visible: boolean) => void;
1760
+ openRequest?: CopilotKitInspectorOpenRequest | null;
1761
+ }
1762
+ declare const CopilotKitInspector: react.FC<CopilotKitInspectorProps>;
1763
+ //#endregion
1764
+ //#region src/components/MCPAppsActivityRenderer.d.ts
1765
+ /**
1766
+ * Props for the activity renderer component
1767
+ */
1768
+ interface MCPAppsActivityRendererProps {
1769
+ activityType: string;
1770
+ content: MCPAppsActivityContent$1;
1771
+ message: unknown;
1772
+ agent: AbstractAgent$1 | undefined;
1773
+ /**
1774
+ * Restore `allow-same-origin` on the sandbox. Unsafe: the widget runs with
1775
+ * the host page's origin. Set via `mcpApps.allowSameOriginFallback` on
1776
+ * `CopilotKitProvider`.
1777
+ */
1778
+ allowSameOriginFallback?: boolean;
1779
+ }
1780
+ /**
1781
+ * MCP Apps Extension Activity Renderer
1782
+ *
1783
+ * Renders MCP Apps UI in a sandboxed iframe with full protocol support.
1784
+ * Fetches resource content on-demand via proxied MCP requests. The React shell
1785
+ * owns the iframe; `bindMcpApp` owns the protocol.
1786
+ */
1787
+ declare const MCPAppsActivityRenderer: React$1.FC<MCPAppsActivityRendererProps>;
1788
+ //#endregion
1789
+ //#region src/components/OpenGenerativeUIRenderer.d.ts
1790
+ declare const OpenGenerativeUIActivityType = "open-generative-ui";
1791
+ declare const OpenGenerativeUIContentSchema: z.ZodObject<{
1792
+ initialHeight: z.ZodOptional<z.ZodNumber>;
1793
+ generating: z.ZodOptional<z.ZodBoolean>;
1794
+ css: z.ZodOptional<z.ZodString>;
1795
+ cssComplete: z.ZodOptional<z.ZodBoolean>;
1796
+ html: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1797
+ htmlComplete: z.ZodOptional<z.ZodBoolean>;
1798
+ jsFunctions: z.ZodOptional<z.ZodString>;
1799
+ jsFunctionsComplete: z.ZodOptional<z.ZodBoolean>;
1800
+ jsExpressions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1801
+ jsExpressionsComplete: z.ZodOptional<z.ZodBoolean>;
1802
+ }, "strip", z.ZodTypeAny, {
1803
+ html?: string[] | undefined;
1804
+ initialHeight?: number | undefined;
1805
+ generating?: boolean | undefined;
1806
+ css?: string | undefined;
1807
+ cssComplete?: boolean | undefined;
1808
+ htmlComplete?: boolean | undefined;
1809
+ jsFunctions?: string | undefined;
1810
+ jsFunctionsComplete?: boolean | undefined;
1811
+ jsExpressions?: string[] | undefined;
1812
+ jsExpressionsComplete?: boolean | undefined;
1813
+ }, {
1814
+ html?: string[] | undefined;
1815
+ initialHeight?: number | undefined;
1816
+ generating?: boolean | undefined;
1817
+ css?: string | undefined;
1818
+ cssComplete?: boolean | undefined;
1819
+ htmlComplete?: boolean | undefined;
1820
+ jsFunctions?: string | undefined;
1821
+ jsFunctionsComplete?: boolean | undefined;
1822
+ jsExpressions?: string[] | undefined;
1823
+ jsExpressionsComplete?: boolean | undefined;
1824
+ }>;
1825
+ type OpenGenerativeUIContent = z.infer<typeof OpenGenerativeUIContentSchema>;
1826
+ /**
1827
+ * Schema for the generateSandboxedUi tool call arguments.
1828
+ * Used by the frontend tool renderer to display placeholder messages.
1829
+ */
1830
+ declare const GenerateSandboxedUiArgsSchema: z.ZodObject<{
1831
+ initialHeight: z.ZodOptional<z.ZodNumber>;
1832
+ placeholderMessages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1833
+ css: z.ZodOptional<z.ZodString>;
1834
+ html: z.ZodOptional<z.ZodString>;
1835
+ jsFunctions: z.ZodOptional<z.ZodString>;
1836
+ jsExpressions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1837
+ }, "strip", z.ZodTypeAny, {
1838
+ html?: string | undefined;
1839
+ initialHeight?: number | undefined;
1840
+ css?: string | undefined;
1841
+ jsFunctions?: string | undefined;
1842
+ jsExpressions?: string[] | undefined;
1843
+ placeholderMessages?: string[] | undefined;
1844
+ }, {
1845
+ html?: string | undefined;
1846
+ initialHeight?: number | undefined;
1847
+ css?: string | undefined;
1848
+ jsFunctions?: string | undefined;
1849
+ jsExpressions?: string[] | undefined;
1850
+ placeholderMessages?: string[] | undefined;
1851
+ }>;
1852
+ type GenerateSandboxedUiArgs = z.infer<typeof GenerateSandboxedUiArgsSchema>;
1853
+ interface OpenGenerativeUIActivityRendererProps {
1854
+ activityType: string;
1855
+ content: OpenGenerativeUIContent;
1856
+ message: unknown;
1857
+ agent: unknown;
1858
+ }
1859
+ /**
1860
+ * Outer wrapper — absorbs every parent re-render but only forwards
1861
+ * throttled content snapshots to the memoized inner component.
1862
+ */
1863
+ declare const OpenGenerativeUIActivityRenderer: React$1.FC<OpenGenerativeUIActivityRendererProps>;
1864
+ /**
1865
+ * Frontend tool renderer for generateSandboxedUi.
1866
+ * Displays placeholder messages while the UI is being generated.
1867
+ */
1868
+ declare const OpenGenerativeUIToolRenderer: React$1.FC<{
1869
+ name: string;
1870
+ args: Partial<GenerateSandboxedUiArgs>;
1871
+ status: ToolCallStatus$1.InProgress;
1872
+ result: undefined;
1873
+ } | {
1874
+ name: string;
1875
+ args: GenerateSandboxedUiArgs;
1876
+ status: ToolCallStatus$1.Executing;
1877
+ result: undefined;
1878
+ } | {
1879
+ name: string;
1880
+ args: GenerateSandboxedUiArgs;
1881
+ status: ToolCallStatus$1.Complete;
1882
+ result: string;
1883
+ }>;
1884
+ //#endregion
1885
+ //#region src/types/react-tool-call-renderer.d.ts
1886
+ interface ReactToolCallRenderer<T = unknown> {
1887
+ name: string;
1888
+ /**
1889
+ * Schema describing the tool arguments. Optional — renderers registered for
1890
+ * tools without parameters (e.g. HITL confirm dialogs) have no schema.
1891
+ */
1892
+ args?: StandardSchemaV1<any, T>;
1893
+ /**
1894
+ * Optional agent ID to constrain this tool renderer to a specific agent.
1895
+ * If specified, this renderer will only be used for the specified agent.
1896
+ */
1897
+ agentId?: string;
1898
+ /**
1899
+ * Whether calls this renderer draws join the chat's tool-call groups (see
1900
+ * `toolCallDisplay` on `CopilotChatMessageView`). CopilotKit's built-in card
1901
+ * sets it; a renderer that leaves it unset always shows its calls on their
1902
+ * own, since the chat can't tell what it draws (it may even draw nothing).
1903
+ */
1904
+ group?: boolean;
1905
+ render: React.ComponentType<{
1906
+ name: string;
1907
+ toolCallId: string;
1908
+ args: Partial<T>;
1909
+ status: ToolCallStatus$1.InProgress;
1910
+ result: undefined;
1911
+ } | {
1912
+ name: string;
1913
+ toolCallId: string;
1914
+ args: T;
1915
+ status: ToolCallStatus$1.Executing;
1916
+ result: undefined;
1917
+ } | {
1918
+ name: string;
1919
+ toolCallId: string;
1920
+ args: T;
1921
+ status: ToolCallStatus$1.Complete;
1922
+ result: string;
1923
+ }>;
1924
+ }
1925
+ //#endregion
1926
+ //#region src/hooks/use-render-tool-call.d.ts
1927
+ interface UseRenderToolCallProps {
1928
+ toolCall: ToolCall$1;
1929
+ toolMessage?: ToolMessage$1;
1930
+ }
1931
+ /**
1932
+ * Hook that returns a function to render tool calls based on the render functions
1933
+ * defined in CopilotKitProvider.
1934
+ *
1935
+ * @returns A function that takes a tool call and optional tool message and returns the rendered component
1936
+ */
1937
+ declare function useRenderToolCall(): ({
1938
+ toolCall,
1939
+ toolMessage
1940
+ }: UseRenderToolCallProps) => React$1.ReactElement | null;
1941
+ //#endregion
1942
+ //#region src/types/react-custom-message-renderer.d.ts
1943
+ type ReactCustomMessageRendererPosition = "before" | "after";
1944
+ interface ReactCustomMessageRenderer {
1945
+ agentId?: string;
1946
+ render: React.ComponentType<{
1947
+ message: Message$1;
1948
+ position: ReactCustomMessageRendererPosition;
1949
+ runId: string;
1950
+ messageIndex: number;
1951
+ messageIndexInRun: number;
1952
+ numberOfMessagesInRun: number;
1953
+ agentId: string;
1954
+ stateSnapshot: any;
1955
+ }> | null;
1956
+ }
1957
+ //#endregion
1958
+ //#region src/hooks/use-render-custom-messages.d.ts
1959
+ interface UseRenderCustomMessagesParams {
1960
+ message: Message$1;
1961
+ position: ReactCustomMessageRendererPosition;
1962
+ }
1963
+ declare function useRenderCustomMessages(): ((params: UseRenderCustomMessagesParams) => react_jsx_runtime0.JSX.Element | null) | null;
1964
+ //#endregion
1965
+ //#region src/types/frontend-tool.d.ts
1966
+ type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknown>> = FrontendTool$1<T> & {
1967
+ render?: ReactToolCallRenderer<T>["render"];
1968
+ };
1969
+ //#endregion
1970
+ //#region src/types/human-in-the-loop.d.ts
1971
+ type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool$1<T>, "handler"> & {
1972
+ /**
1973
+ * Render the human-in-the-loop UI for this tool call.
1974
+ *
1975
+ * Beyond the tool call's `args`/`status`/`result`, the render props carry
1976
+ * attribution:
1977
+ * - `toolCallId` — the AG-UI tool call id, unique per interrupt. It is the
1978
+ * stable key for correlating this interrupt with runtime (sub)agent
1979
+ * attribution — e.g. the `agentId` reported by `onToolExecutionStart`, or
1980
+ * per-run attribution stamped on the event stream — so the UI can label
1981
+ * the interrupt with the agent that actually raised it.
1982
+ * - `agentId` — the agent this tool was *registered* to (the tool's own
1983
+ * `agentId`), or `undefined` for an unscoped tool. This is the static
1984
+ * registration scope; it is NOT necessarily the runtime (sub)agent that
1985
+ * raised the interrupt. For runtime attribution, correlate `toolCallId`
1986
+ * with the event-stream/`onToolExecutionStart` agent id.
1987
+ */
1988
+ render: React$1.ComponentType<{
1989
+ name: string;
1990
+ description: string;
1991
+ toolCallId: string;
1992
+ agentId?: string;
1993
+ args: Partial<T>;
1994
+ status: ToolCallStatus$1.InProgress;
1995
+ result: undefined;
1996
+ respond: undefined;
1997
+ } | {
1998
+ name: string;
1999
+ description: string;
2000
+ toolCallId: string;
2001
+ agentId?: string;
2002
+ args: T;
2003
+ status: ToolCallStatus$1.Executing;
2004
+ result: undefined;
2005
+ respond: (result: unknown) => Promise<void>;
2006
+ } | {
2007
+ name: string;
2008
+ description: string;
2009
+ toolCallId: string;
2010
+ agentId?: string;
2011
+ args: T;
2012
+ status: ToolCallStatus$1.Complete;
2013
+ result: string;
2014
+ respond: undefined;
2015
+ }>;
2016
+ };
2017
+ //#endregion
2018
+ //#region src/types/defineToolCallRenderer.d.ts
2019
+ /**
2020
+ * Helper to define a type-safe tool call renderer entry.
2021
+ * - Accepts a single object whose keys match ReactToolCallRenderer's fields: { name, args, render, agentId? }.
2022
+ * - Derives `args` type from the provided schema (any Standard Schema V1 compatible library).
2023
+ * - Ensures the render function param type exactly matches ReactToolCallRenderer<T>["render"]'s param.
2024
+ * - For wildcard tools (name: "*"), args is optional and defaults to z.any()
2025
+ */
2026
+ type RenderProps<T> = {
2027
+ name: string;
2028
+ toolCallId: string;
2029
+ args: Partial<T>;
2030
+ status: ToolCallStatus$1.InProgress;
2031
+ result: undefined;
2032
+ } | {
2033
+ name: string;
2034
+ toolCallId: string;
2035
+ args: T;
2036
+ status: ToolCallStatus$1.Executing;
2037
+ result: undefined;
2038
+ } | {
2039
+ name: string;
2040
+ toolCallId: string;
2041
+ args: T;
2042
+ status: ToolCallStatus$1.Complete;
2043
+ result: string;
2044
+ };
2045
+ declare function defineToolCallRenderer(def: {
2046
+ name: "*";
2047
+ render: (props: RenderProps<any>) => React$1.ReactElement | null;
2048
+ agentId?: string;
2049
+ group?: boolean;
2050
+ }): ReactToolCallRenderer<any>;
2051
+ declare function defineToolCallRenderer<S extends StandardSchemaV1>(def: {
2052
+ name: string;
2053
+ args: S;
2054
+ render: (props: RenderProps<InferSchemaOutput<S>>) => React$1.ReactElement | null;
2055
+ agentId?: string;
2056
+ group?: boolean;
2057
+ }): ReactToolCallRenderer<InferSchemaOutput<S>>;
2058
+ //#endregion
2059
+ //#region src/types/interrupt.d.ts
2060
+ /** Name of the legacy custom event agents emit to signal an interrupt. */
2061
+ declare const INTERRUPT_EVENT_NAME = "on_interrupt";
2062
+ /** Legacy custom-event interrupt payload (agent emits a custom `on_interrupt` event). */
2063
+ interface InterruptEvent<TValue = unknown> {
2064
+ name: string;
2065
+ value: TValue;
2066
+ }
2067
+ /**
2068
+ * Resolve the agent with user input for an interrupt.
2069
+ *
2070
+ * - Standard interrupts: records `{ status: "resolved", payload }` for the target
2071
+ * interrupt (defaults to the primary one). Resumes once every open interrupt is
2072
+ * addressed; returns the resume run result, or `void` while still awaiting others.
2073
+ * - Legacy interrupts: resumes immediately via `command.resume = payload`.
2074
+ */
2075
+ type InterruptResolveFn = (payload?: unknown, interruptId?: string) => Promise<RunAgentResult$1 | void>;
2076
+ /**
2077
+ * Cancel an interrupt.
2078
+ *
2079
+ * - Standard interrupts: records `{ status: "cancelled" }` for the target interrupt
2080
+ * (defaults to the primary one), then resumes once all are addressed.
2081
+ * - Legacy interrupts: dismisses the pending interrupt without resuming.
2082
+ */
2083
+ type InterruptCancelFn = (interruptId?: string) => Promise<RunAgentResult$1 | void>;
2084
+ interface InterruptHandlerProps<TValue = unknown> {
2085
+ /**
2086
+ * Legacy event shape (`{ name, value }`). Always present for back-compat: for
2087
+ * standard interrupts, `value` is the primary `Interrupt` and `name` is `"on_interrupt"`.
2088
+ * Prefer `interrupt` / `interrupts` for standard interrupts.
2089
+ */
2090
+ event: InterruptEvent<TValue>;
2091
+ /** Primary standard interrupt (`interrupts[0]`), or `null` for legacy interrupts. */
2092
+ interrupt: Interrupt | null;
2093
+ /** All open standard interrupts (empty array for legacy interrupts). */
2094
+ interrupts: Interrupt[];
2095
+ resolve: InterruptResolveFn;
2096
+ cancel: InterruptCancelFn;
2097
+ }
2098
+ interface InterruptRenderProps<TValue = unknown, TResult = unknown> {
2099
+ event: InterruptEvent<TValue>;
2100
+ interrupt: Interrupt | null;
2101
+ interrupts: Interrupt[];
2102
+ result: TResult;
2103
+ resolve: InterruptResolveFn;
2104
+ cancel: InterruptCancelFn;
2105
+ }
2106
+ //#endregion
2107
+ //#region src/types/sandbox-function.d.ts
2108
+ type SandboxFunction<TParams extends StandardSchemaV1 = StandardSchemaV1> = {
2109
+ name: string;
2110
+ description: string;
2111
+ parameters: TParams;
2112
+ handler: (args: any) => Promise<unknown>;
2113
+ };
2114
+ //#endregion
2115
+ //#region src/hooks/use-render-activity-message.d.ts
2116
+ declare function useRenderActivityMessage(): {
2117
+ renderActivityMessage: (message: ActivityMessage$1) => React.ReactElement | null;
2118
+ findRenderer: (activityType: string) => ReactActivityMessageRenderer<unknown> | null;
2119
+ };
2120
+ //#endregion
2121
+ //#region src/hooks/use-frontend-tool.d.ts
2122
+ declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>, deps?: ReadonlyArray<unknown>): void;
2123
+ //#endregion
2124
+ //#region src/hooks/use-frontend-tools.d.ts
2125
+ /**
2126
+ * Register a list of frontend tools whose length can change between renders.
2127
+ *
2128
+ * `useFrontendTool` registers exactly one tool per call, so it cannot be called
2129
+ * in a loop over a runtime-length list without breaking the rules of hooks.
2130
+ * This hook runs a single effect over the whole array instead, which makes it
2131
+ * safe to build the list from state, props, or a server response.
2132
+ *
2133
+ * Tools are keyed by `name` plus `agentId`, the same as `useFrontendTool`. A
2134
+ * tool that disappears from the array is unregistered on the next render, and
2135
+ * every tool is unregistered on unmount. Renderers stay registered after
2136
+ * unmount so past tool calls still render in the chat history.
2137
+ *
2138
+ * @param tools - The tools to register. May be empty and may change length.
2139
+ * @param deps - Extra dependencies that force re-registration, compared by
2140
+ * identity like the second argument of `useEffect`. Use this when a handler
2141
+ * closes over a value that is not part of the tool definition. Keep the array
2142
+ * a constant length across renders.
2143
+ *
2144
+ * @example
2145
+ * Register one tool per item in application state:
2146
+ * ```tsx
2147
+ * const [reports, setReports] = useState<Report[]>([]);
2148
+ *
2149
+ * useFrontendTools(
2150
+ * reports.map((report) => ({
2151
+ * name: `open_${report.id}`,
2152
+ * description: `Open the ${report.title} report`,
2153
+ * handler: async () => navigate(`/reports/${report.id}`),
2154
+ * })),
2155
+ * [navigate],
2156
+ * );
2157
+ * ```
2158
+ *
2159
+ * @example
2160
+ * Register tools described by the backend:
2161
+ * ```tsx
2162
+ * const { data } = useQuery(fetchToolDescriptors);
2163
+ *
2164
+ * useFrontendTools(
2165
+ * (data ?? []).map((descriptor) => ({
2166
+ * name: descriptor.name,
2167
+ * description: descriptor.description,
2168
+ * parameters: z.object({ query: z.string() }),
2169
+ * handler: async ({ query }) => runDescriptor(descriptor.id, query),
2170
+ * })),
2171
+ * );
2172
+ * ```
2173
+ */
2174
+ declare function useFrontendTools(tools: ReadonlyArray<ReactFrontendTool<any>> | undefined, deps?: ReadonlyArray<unknown>): void;
2175
+ //#endregion
2176
+ //#region src/hooks/use-component.d.ts
2177
+ type InferRenderProps<T> = T extends StandardSchemaV1 ? InferSchemaOutput<T> : any;
2178
+ /**
2179
+ * Registers a React component as a frontend tool renderer in chat.
2180
+ *
2181
+ * This hook is a convenience wrapper around `useFrontendTool` that:
2182
+ * - builds a model-facing tool description,
2183
+ * - forwards optional schema parameters (any Standard Schema V1 compatible library),
2184
+ * - renders your component with tool call parameters.
2185
+ *
2186
+ * Use this when you want to display a typed visual component for a tool call
2187
+ * without manually wiring a full frontend tool object.
2188
+ *
2189
+ * When `parameters` is provided, render props are inferred from the schema.
2190
+ * When omitted, the render component may accept any props.
2191
+ *
2192
+ * @typeParam TSchema - Schema describing tool parameters, or `undefined` when no schema is given.
2193
+ * @param config - Tool registration config.
2194
+ * @param deps - Optional dependencies to refresh registration (same semantics as `useEffect`).
2195
+ *
2196
+ * @example
2197
+ * ```tsx
2198
+ * // Without parameters — render accepts any props
2199
+ * useComponent({
2200
+ * name: "showGreeting",
2201
+ * render: ({ message }: { message: string }) => <div>{message}</div>,
2202
+ * });
2203
+ * ```
2204
+ *
2205
+ * @example
2206
+ * ```tsx
2207
+ * // With parameters — render props inferred from schema
2208
+ * useComponent({
2209
+ * name: "showWeatherCard",
2210
+ * parameters: z.object({ city: z.string() }),
2211
+ * render: ({ city }) => <div>{city}</div>,
2212
+ * });
2213
+ * ```
2214
+ *
2215
+ * @example
2216
+ * ```tsx
2217
+ * useComponent(
2218
+ * {
2219
+ * name: "renderProfile",
2220
+ * parameters: z.object({ userId: z.string() }),
2221
+ * render: ProfileCard,
2222
+ * agentId: "support-agent",
2223
+ * },
2224
+ * [selectedAgentId],
2225
+ * );
2226
+ * ```
2227
+ */
2228
+ declare function useComponent<TSchema extends StandardSchemaV1<any, Record<string, unknown>> | undefined = undefined>(config: {
2229
+ name: string;
2230
+ description?: string;
2231
+ parameters?: TSchema;
2232
+ render: ComponentType<NoInfer<InferRenderProps<TSchema>>>;
2233
+ agentId?: string;
2234
+ followUp?: boolean;
2235
+ }, deps?: ReadonlyArray<unknown>): void;
2236
+ //#endregion
2237
+ //#region src/hooks/use-render-tool.d.ts
2238
+ interface RenderToolInProgressProps<S extends StandardSchemaV1> {
2239
+ name: string;
2240
+ toolCallId: string;
2241
+ parameters: Partial<InferSchemaOutput<S>>;
2242
+ status: "inProgress";
2243
+ result: undefined;
2244
+ }
2245
+ interface RenderToolExecutingProps<S extends StandardSchemaV1> {
2246
+ name: string;
2247
+ toolCallId: string;
2248
+ parameters: InferSchemaOutput<S>;
2249
+ status: "executing";
2250
+ result: undefined;
2251
+ }
2252
+ interface RenderToolCompleteProps<S extends StandardSchemaV1> {
2253
+ name: string;
2254
+ toolCallId: string;
2255
+ parameters: InferSchemaOutput<S>;
2256
+ status: "complete";
2257
+ result: string;
2258
+ }
2259
+ type RenderToolProps<S extends StandardSchemaV1> = RenderToolInProgressProps<S> | RenderToolExecutingProps<S> | RenderToolCompleteProps<S>;
2260
+ /**
2261
+ * Registers a wildcard (`"*"`) renderer for tool calls.
2262
+ *
2263
+ * The wildcard renderer is used as a fallback when no exact name-matched
2264
+ * renderer is registered for a tool call.
2265
+ *
2266
+ * @param config - Wildcard renderer configuration.
2267
+ * @param deps - Optional dependencies to refresh registration.
2268
+ *
2269
+ * @example
2270
+ * ```tsx
2271
+ * useRenderTool(
2272
+ * {
2273
+ * name: "*",
2274
+ * render: ({ name, status }) => (
2275
+ * <div>
2276
+ * {status === "complete" ? "✓" : "⏳"} {name}
2277
+ * </div>
2278
+ * ),
2279
+ * },
2280
+ * [],
2281
+ * );
2282
+ * ```
2283
+ */
2284
+ declare function useRenderTool(config: {
2285
+ name: "*";
2286
+ render: (props: any) => React.ReactElement | null;
2287
+ agentId?: string; /** Let the chat group the calls this renderer draws (see `toolCallDisplay`). */
2288
+ group?: boolean;
2289
+ }, deps?: ReadonlyArray<unknown>): void;
2290
+ /**
2291
+ * Registers a name-scoped renderer for tool calls.
2292
+ *
2293
+ * The provided `parameters` schema defines the typed shape of `props.parameters`
2294
+ * in `render` for `executing` and `complete` states. Accepts any Standard Schema V1
2295
+ * compatible library (Zod, Valibot, ArkType, etc.).
2296
+ *
2297
+ * @typeParam S - Schema type describing tool call parameters.
2298
+ * @param config - Named renderer configuration.
2299
+ * @param deps - Optional dependencies to refresh registration.
2300
+ *
2301
+ * @example
2302
+ * ```tsx
2303
+ * useRenderTool(
2304
+ * {
2305
+ * name: "searchDocs",
2306
+ * parameters: z.object({ query: z.string() }),
2307
+ * render: ({ status, parameters, result }) => {
2308
+ * if (status === "inProgress") return <div>Preparing...</div>;
2309
+ * if (status === "executing") return <div>Searching {parameters.query}</div>;
2310
+ * return <div>{result}</div>;
2311
+ * },
2312
+ * },
2313
+ * [],
2314
+ * );
2315
+ * ```
2316
+ */
2317
+ declare function useRenderTool<S extends StandardSchemaV1>(config: {
2318
+ name: string;
2319
+ parameters: S;
2320
+ render: (props: RenderToolProps<S>) => React.ReactElement | null;
2321
+ agentId?: string; /** Let the chat group the calls this renderer draws (see `toolCallDisplay`). */
2322
+ group?: boolean;
2323
+ }, deps?: ReadonlyArray<unknown>): void;
2324
+ //#endregion
2325
+ //#region src/hooks/use-default-render-tool.d.ts
2326
+ type DefaultRenderProps = {
2327
+ /** The name of the tool being called. */name: string; /** The id of the tool call being rendered. */
2328
+ toolCallId: string; /** The parsed parameters passed to the tool call. */
2329
+ parameters: unknown; /** Current execution status of the tool call. */
2330
+ status: "inProgress" | "executing" | "complete"; /** The tool call result string, available only when `status` is `"complete"`. */
2331
+ result: string | undefined;
2332
+ };
2333
+ /**
2334
+ * Registers a wildcard (`"*"`) tool-call renderer via `useRenderTool`.
2335
+ *
2336
+ * - Call with no config to use CopilotKit's built-in default tool-call card.
2337
+ * - Pass `config.render` to replace the default UI with your own fallback renderer.
2338
+ *
2339
+ * This is useful when you want a generic renderer for tools that do not have a
2340
+ * dedicated `useRenderTool({ name: "..." })` registration.
2341
+ *
2342
+ * @param config - Optional custom wildcard render function.
2343
+ * @param deps - Optional dependencies to refresh registration.
2344
+ *
2345
+ * @example
2346
+ * ```tsx
2347
+ * useDefaultRenderTool();
2348
+ * ```
2349
+ *
2350
+ * @example
2351
+ * ```tsx
2352
+ * useDefaultRenderTool({
2353
+ * render: ({ name, status }) => <div>{name}: {status}</div>,
2354
+ * });
2355
+ * ```
2356
+ *
2357
+ * @example
2358
+ * ```tsx
2359
+ * useDefaultRenderTool(
2360
+ * {
2361
+ * render: ({ name, result }) => (
2362
+ * <ToolEventRow title={name} payload={result} compact={compactMode} />
2363
+ * ),
2364
+ * },
2365
+ * [compactMode],
2366
+ * );
2367
+ * ```
2368
+ */
2369
+ declare function useDefaultRenderTool(config?: {
2370
+ render?: (props: DefaultRenderProps) => React$1.ReactElement | null;
2371
+ /**
2372
+ * Let the chat group calls your `render` draws, like it groups the
2373
+ * built-in card's (see `toolCallDisplay` on `CopilotChatMessageView`).
2374
+ * Off by default for a custom `render`, since it may draw nothing.
2375
+ */
2376
+ group?: boolean;
2377
+ }, deps?: ReadonlyArray<unknown>): void;
2378
+ //#endregion
2379
+ //#region src/hooks/use-human-in-the-loop.d.ts
2380
+ declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>, deps?: ReadonlyArray<unknown>): void;
2381
+ //#endregion
2382
+ //#region src/hooks/use-agent.d.ts
2383
+ declare enum UseAgentUpdate {
2384
+ OnMessagesChanged = "OnMessagesChanged",
2385
+ OnStateChanged = "OnStateChanged",
2386
+ OnRunStatusChanged = "OnRunStatusChanged"
2387
+ }
2388
+ interface UseAgentPropsBase {
2389
+ updates?: UseAgentUpdate[];
2390
+ /**
2391
+ * Throttle interval (in milliseconds) for re-renders triggered by
2392
+ * `onMessagesChanged` and `onStateChanged` notifications. Useful to reduce
2393
+ * re-render frequency during high-frequency streaming updates.
2394
+ *
2395
+ * Uses a leading+trailing pattern with a shared window — first update
2396
+ * fires immediately, subsequent updates within the window are coalesced,
2397
+ * and a trailing timer ensures the most recent update fires after the
2398
+ * window expires. See `CopilotKitCore.subscribeToAgentWithOptions` in `@copilotkit/core`
2399
+ * for details.
2400
+ *
2401
+ * Resolved as: `throttleMs ?? provider defaultThrottleMs ?? 0`.
2402
+ * Passing `throttleMs={0}` explicitly disables throttling even when the
2403
+ * provider specifies a non-zero `defaultThrottleMs`.
2404
+ *
2405
+ * Run lifecycle callbacks (`onRunInitialized`, `onRunFinalized`,
2406
+ * `onRunFailed`, `onRunErrorEvent`) always fire immediately.
2407
+ *
2408
+ * @default undefined
2409
+ * When unset, inherits from the provider's `defaultThrottleMs`;
2410
+ * if that is also unset, the effective value is `0` (no throttle).
2411
+ */
2412
+ throttleMs?: number;
2413
+ }
2414
+ /**
2415
+ * Thread-scoped variant. `agentId`, `runtimeAgentId`, and `threadId` are a
2416
+ * matched set: together they give this hook a *private* agent — registered
2417
+ * under the local `agentId`, routing outbound to `runtimeAgentId` — that is
2418
+ * safe to pin a thread onto. None of the three is meaningful without the other
2419
+ * two, so all are required here.
2420
+ */
2421
+ interface UseAgentThreadScopedProps {
2422
+ /**
2423
+ * The name to register this hook's proxied agent under.
2424
+ *
2425
+ * Required, and must not already be taken. The usual fallbacks (the chat
2426
+ * configuration's agentId, then `DEFAULT_AGENT_ID`) name agents that already
2427
+ * exist, and registering over one either throws `already registered` or
2428
+ * silently shadows it, depending on whether runtime discovery has landed — so
2429
+ * the caller has to name it.
2430
+ */
2431
+ agentId: string;
2432
+ /**
2433
+ * Thread to scope the agent's run to. Written onto the underlying agent, so
2434
+ * `/agent/run`, `/agent/connect`, and `/agent/stop` address this thread.
2435
+ *
2436
+ * REQUIRES `runtimeAgentId`. A runtime agent registered under a given id is a
2437
+ * singleton, so writing a per-hook threadId directly onto it would let two
2438
+ * `useAgent` calls that share an `agentId` clobber each other's thread.
2439
+ * Passing a distinct local `agentId` plus the `runtimeAgentId` it routes to
2440
+ * gives this hook a private proxied agent to pin the thread onto instead of a
2441
+ * shared one.
2442
+ */
2443
+ threadId: string;
2444
+ /**
2445
+ * The id of the runtime agent to route outbound requests to, while this hook
2446
+ * exposes a distinct local `agentId`. Registers a proxied agent via
2447
+ * `CopilotKitCore.registerProxiedAgent`, letting several frontend agents
2448
+ * (e.g. one per open thread) mount against a single runtime agent without a
2449
+ * shared-singleton collision.
2450
+ *
2451
+ * When set, `agentId` is the *local* registry id (must not collide with an
2452
+ * existing local or runtime-discovered agent) and `runtimeAgentId` is the
2453
+ * runtime agent the proxy addresses on `/agent/run` etc.
2454
+ *
2455
+ * REQUIRES `threadId`. Registering a private agent is only worth doing to
2456
+ * scope a thread to it; without a `threadId` the private agent would take its
2457
+ * thread from the chat configuration, which is what binding to the shared
2458
+ * agent via `agentId` alone already does — just with an extra registration
2459
+ * and a local id to keep unique.
2460
+ */
2461
+ runtimeAgentId: string;
2462
+ }
2463
+ /**
2464
+ * Default variant: neither `threadId` nor `runtimeAgentId`. The hook binds to
2465
+ * the shared agent registered under `agentId` and leaves its threadId to the
2466
+ * chat configuration (or to the agent's own auto-minted UUID).
2467
+ *
2468
+ * Both props are typed `undefined` here rather than omitted so that supplying
2469
+ * either one on its own fails to match *both* branches — that is the
2470
+ * type-level enforcement of the all-or-nothing rule.
2471
+ */
2472
+ interface UseAgentUnscopedProps {
2473
+ /**
2474
+ * Agent to bind to. Resolution precedence: this property, then the surrounding
2475
+ * chat configuration's agentId, then the global default.
2476
+ */
2477
+ agentId?: string;
2478
+ /** Requires `runtimeAgentId`. See {@link UseAgentThreadScopedProps.threadId}. */
2479
+ threadId?: undefined;
2480
+ /** Requires `threadId`. See {@link UseAgentThreadScopedProps.runtimeAgentId}. */
2481
+ runtimeAgentId?: undefined;
2482
+ }
2483
+ /**
2484
+ * Props for {@link useAgent}.
2485
+ *
2486
+ * There are exactly two valid shapes, and the type admits nothing in between:
2487
+ *
2488
+ * - **Bind to an agent** — `useAgent()`, `useAgent({ agentId })`. The shared
2489
+ * instance from the registry; the thread comes from the chat configuration.
2490
+ * - **Bind a private agent to a thread** —
2491
+ * `useAgent({ agentId, runtimeAgentId, threadId })`. All three required.
2492
+ *
2493
+ * So `useAgent({ agentId, threadId })`, `useAgent({ agentId, runtimeAgentId })`,
2494
+ * and `useAgent({ runtimeAgentId, threadId })` are all compile errors. Each
2495
+ * partial combination is either unsafe (a thread scoped onto a shared singleton)
2496
+ * or pointless (a private agent with no thread, or one registered over an id
2497
+ * that already belongs to a real agent).
2498
+ */
2499
+ type UseAgentProps = UseAgentPropsBase & (UseAgentThreadScopedProps | UseAgentUnscopedProps);
2500
+ declare function useAgent({
2501
+ agentId,
2502
+ threadId,
2503
+ runtimeAgentId,
2504
+ updates,
2505
+ throttleMs
2506
+ }?: UseAgentProps): {
2507
+ agent: AbstractAgent$1;
2508
+ /**
2509
+ * Whether `agent` is the real, runtime-synced (or locally-registered) agent
2510
+ * rather than a provisional stand-in returned while the runtime is still
2511
+ * connecting (or in an error state).
2512
+ *
2513
+ * `agent` is always a fully-constructed `AbstractAgent`, so calling
2514
+ * `agent.subscribe(...)`, `agent.setState(...)`, etc. is always safe. But
2515
+ * while `isReady` is `false` the instance is a placeholder that will be
2516
+ * swapped for the real agent once the runtime `/info` sync resolves, at
2517
+ * which point `agent` changes reference and dependent effects re-run.
2518
+ * Guard on `isReady` when you only want to act against the real agent —
2519
+ * e.g. subscribing to run-lifecycle events you don't want to miss during
2520
+ * the provisional window (#5000).
2521
+ */
2522
+ isReady: boolean;
2523
+ };
2524
+ //#endregion
2525
+ //#region src/hooks/use-capabilities.d.ts
2526
+ /**
2527
+ * Returns the capabilities declared by the given agent (or the agent resolved
2528
+ * from the surrounding chat configuration, falling back to the default agent).
2529
+ * Capabilities are populated from the runtime `/info` response at connection
2530
+ * time. The hook reads them synchronously from the agent instance — there is
2531
+ * no separate loading state, but the value will be `undefined` until the
2532
+ * runtime handshake completes.
2533
+ *
2534
+ * @param agentId - Optional agent ID. If omitted, inherits the surrounding
2535
+ * chat configuration's agent, falling back to the default agent.
2536
+ * @returns The agent's capabilities, or `undefined` if the agent doesn't
2537
+ * declare capabilities.
2538
+ */
2539
+ declare function useCapabilities(agentId?: string): AgentCapabilities$1 | undefined;
2540
+ //#endregion
2541
+ //#region src/hooks/use-agent-context.d.ts
2542
+ /**
2543
+ * Represents any value that can be serialized to JSON.
2544
+ */
2545
+ type JsonSerializable = string | number | boolean | null | JsonSerializable[] | {
2546
+ [key: string]: JsonSerializable;
2547
+ };
2548
+ /**
2549
+ * Context configuration for useAgentContext.
2550
+ * Accepts any JSON-serializable value which will be converted to a string.
2551
+ */
2552
+ interface AgentContextInput {
2553
+ /** A human-readable description of what this context represents */
2554
+ description: string;
2555
+ /** The context value - will be converted to a JSON string if not already a string */
2556
+ value: JsonSerializable;
2557
+ }
2558
+ declare function useAgentContext(context: AgentContextInput): void;
2559
+ //#endregion
2560
+ //#region src/hooks/use-suggestions.d.ts
2561
+ interface UseSuggestionsOptions {
2562
+ agentId?: string;
2563
+ }
2564
+ interface UseSuggestionsResult {
2565
+ suggestions: Suggestion$1[];
2566
+ reloadSuggestions: () => void;
2567
+ clearSuggestions: () => void;
2568
+ isLoading: boolean;
2569
+ }
2570
+ declare function useSuggestions({
2571
+ agentId
2572
+ }?: UseSuggestionsOptions): UseSuggestionsResult;
2573
+ //#endregion
2574
+ //#region src/hooks/use-configure-suggestions.d.ts
2575
+ type StaticSuggestionInput = Omit<Suggestion$1, "isLoading"> & Partial<Pick<Suggestion$1, "isLoading">>;
2576
+ type StaticSuggestionsConfigInput = Omit<StaticSuggestionsConfig$1, "suggestions"> & {
2577
+ suggestions: StaticSuggestionInput[];
2578
+ };
2579
+ type SuggestionsConfigInput = DynamicSuggestionsConfig$1 | StaticSuggestionsConfigInput;
2580
+ declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, deps?: ReadonlyArray<unknown>): void;
2581
+ //#endregion
2582
+ //#region src/hooks/use-interrupt.d.ts
2583
+ type InterruptHandlerFn<TValue, TResult> = (props: InterruptHandlerProps<TValue>) => TResult | PromiseLike<TResult>;
2584
+ type InterruptResultFromHandler<THandler> = THandler extends ((...args: never[]) => infer TResult) ? TResult extends PromiseLike<infer TResolved> ? TResolved | null : TResult | null : null;
2585
+ type InterruptResult<TValue, TResult> = InterruptResultFromHandler<InterruptHandlerFn<TValue, TResult>>;
2586
+ type InterruptRenderInChat = boolean | undefined;
2587
+ type UseInterruptReturn<TRenderInChat extends InterruptRenderInChat> = TRenderInChat extends false ? React$1.ReactElement | null : TRenderInChat extends true | undefined ? void : React$1.ReactElement | null | void;
2588
+ /** Recognize thenables returned by interrupt preprocessing handlers. */
2589
+ /**
2590
+ * Configuration options for `useInterrupt`.
2591
+ */
2592
+ interface UseInterruptConfigBase<TValue = unknown, TResult = never> {
2593
+ /**
2594
+ * Render function for the interrupt UI.
2595
+ *
2596
+ * Receives both the standard `interrupt`/`interrupts` and the legacy `event`.
2597
+ * Call `resolve(payload)` to resume with user input, or `cancel()` to cancel.
2598
+ */
2599
+ render: (props: InterruptRenderProps<TValue, InterruptResult<TValue, TResult>>) => React$1.ReactElement;
2600
+ /**
2601
+ * Optional pre-render handler invoked when an interrupt is received.
2602
+ * Return a sync or async value to expose as `result` in `render`.
2603
+ * Rejecting/throwing falls back to `result = null`.
2604
+ */
2605
+ handler?: InterruptHandlerFn<TValue, TResult>;
2606
+ /**
2607
+ * Optional predicate to filter which interrupts this hook handles.
2608
+ * Receives the legacy-compatible event (for standard interrupts, `value` is
2609
+ * the primary `Interrupt`). Return `false` to ignore.
2610
+ */
2611
+ enabled?: (event: InterruptEvent<TValue>) => boolean;
2612
+ /** Optional agent id. Defaults to the current configured chat agent. */
2613
+ agentId?: string;
2614
+ }
2615
+ type UseInterruptConfig<TValue = unknown, TResult = never, TRenderInChat extends InterruptRenderInChat = undefined> = UseInterruptConfigBase<TValue, TResult> & {
2616
+ /** When true (default), the interrupt UI renders inside `<CopilotChat>` automatically. */renderInChat?: TRenderInChat;
2617
+ };
2618
+ /**
2619
+ * Handles agent interrupts with optional filtering, preprocessing, and resume behavior.
2620
+ *
2621
+ * Supports both the AG-UI standard interrupt flow (`RUN_FINISHED` with
2622
+ * `outcome.type === "interrupt"`) and the legacy custom-event flow
2623
+ * (`on_interrupt`). For standard interrupts, `render` receives `interrupt`
2624
+ * (the primary one) and `interrupts` (the full open set); call `resolve(payload)`
2625
+ * to resume or `cancel()` to cancel. Resuming addresses the targeted interrupt
2626
+ * and, once every open interrupt is addressed, submits a single spec `resume`
2627
+ * array via `copilotkit.runAgent`.
2628
+ *
2629
+ * - `renderInChat: true` (default): the element is published into `<CopilotChat>`; returns `void`.
2630
+ * - `renderInChat: false`: the hook returns the interrupt element for manual placement.
2631
+ *
2632
+ * @example
2633
+ * ```tsx
2634
+ * useInterrupt({
2635
+ * render: ({ interrupt, resolve, cancel }) => (
2636
+ * <div>
2637
+ * <p>{interrupt?.message}</p>
2638
+ * <button onClick={() => resolve({ approved: true })}>Approve</button>
2639
+ * <button onClick={() => cancel()}>Cancel</button>
2640
+ * </div>
2641
+ * ),
2642
+ * });
2643
+ * ```
2644
+ */
2645
+ declare function useInterrupt<TResult = never, TRenderInChat extends InterruptRenderInChat = undefined>(config: UseInterruptConfig<any, TResult, TRenderInChat>): UseInterruptReturn<TRenderInChat>;
2646
+ //#endregion
2647
+ //#region src/hooks/use-memories.d.ts
2648
+ /**
2649
+ * Return value of the {@link useMemories} hook.
2650
+ *
2651
+ * The `memories` array is the server-authoritative list for the current user.
2652
+ * It is hydrated from a REST snapshot and kept current by realtime
2653
+ * `memory_metadata` deltas from the store's own channel. Mutations resolve
2654
+ * once the platform confirms the operation and reject with an `Error` on
2655
+ * failure.
2656
+ */
2657
+ interface UseMemoriesResult {
2658
+ /**
2659
+ * Memories for the current user, newest first. Updated in realtime when
2660
+ * the platform pushes `memory_metadata` events.
2661
+ */
2662
+ memories: Memory$1[];
2663
+ /**
2664
+ * `true` while the initial memory snapshot is being fetched. Subsequent
2665
+ * realtime updates do not re-enter the loading state.
2666
+ */
2667
+ isLoading: boolean;
2668
+ /**
2669
+ * The most recent error from fetching memories or executing a mutation, or
2670
+ * `null` when there is no error. Cleared on the next fetch attempt, on a
2671
+ * successful fetch, when the runtime context changes, and on a successful
2672
+ * mutation (a failed mutation replaces it with that mutation's error).
2673
+ */
2674
+ error: Error | null;
2675
+ /**
2676
+ * `true` when the platform memory routes are available. Set to `false`
2677
+ * after a 404 or 501, indicating memory is not supported by the current
2678
+ * runtime configuration.
2679
+ */
2680
+ isAvailable: boolean;
2681
+ /**
2682
+ * Health of the realtime connection that streams live `memory_metadata`
2683
+ * deltas. Distinct from `isAvailable`/`error` (which describe the REST list
2684
+ * route): `"connecting"` while the socket opens/joins, `"connected"` once
2685
+ * live deltas are flowing, and `"unavailable"` once the socket permanently
2686
+ * gives up — at which point the list is a frozen snapshot. Lets the UI drop a
2687
+ * "live" indicator instead of showing it over stale data.
2688
+ */
2689
+ realtimeStatus: MemoryRealtimeStatus$1;
2690
+ /**
2691
+ * Re-fetch the memory snapshot from the platform. Resolves once the re-pull
2692
+ * settles; rejects if it fails or the store is torn down mid-flight.
2693
+ */
2694
+ refresh: () => Promise<void>;
2695
+ /**
2696
+ * Create a memory. Resolves to the stored memory (server-authoritative);
2697
+ * rejects on failure.
2698
+ */
2699
+ addMemory: (input: NewMemory$1) => Promise<Memory$1>;
2700
+ /**
2701
+ * Supersede a memory: the old memory is retired and a new one is created.
2702
+ * Resolves to the new memory (its `id` differs from `id`); rejects on
2703
+ * failure.
2704
+ *
2705
+ * Supersede is a FULL replacement, not a partial patch: `changes` is the
2706
+ * complete definition of the new memory. You must re-supply `content` and
2707
+ * `kind`, and an omitted `sourceThreadIds` resets the new memory's source
2708
+ * threads to empty — it does not preserve the prior memory's value.
2709
+ */
2710
+ updateMemory: (id: string, changes: MemoryChanges$1) => Promise<Memory$1>;
2711
+ /**
2712
+ * Retire a memory (non-lossy delete). Resolves when the server confirms;
2713
+ * rejects on failure.
2714
+ */
2715
+ removeMemory: (id: string) => Promise<void>;
2716
+ }
2717
+ /**
2718
+ * React hook for listing and managing platform memories.
2719
+ *
2720
+ * Reads the memory store owned and wired by `CopilotKitCore`. On mount the
2721
+ * hook exposes the live list plus stable `addMemory` / `updateMemory` /
2722
+ * `removeMemory` / `refresh` callbacks. Mutations are server-authoritative:
2723
+ * each resolves once the platform confirms the operation and rejects with an
2724
+ * `Error` on failure.
2725
+ *
2726
+ * Realtime updates are automatic: the core's memory store opens its own
2727
+ * `user_meta:memories:<joinCode>` channel and applies `memory_metadata` deltas
2728
+ * to the list. You can still call `refresh()` to re-pull the REST snapshot on
2729
+ * demand.
2730
+ *
2731
+ * @returns Memory list state and stable mutation callbacks.
2732
+ *
2733
+ * @example
2734
+ * ```tsx
2735
+ * import { useMemories } from "@copilotkit/react-core";
2736
+ *
2737
+ * function MemoryList() {
2738
+ * const { memories, isLoading, isAvailable, addMemory, removeMemory } =
2739
+ * useMemories();
2740
+ *
2741
+ * if (!isAvailable) return null;
2742
+ * if (isLoading) return <p>Loading…</p>;
2743
+ *
2744
+ * return (
2745
+ * <ul>
2746
+ * {memories.map((m) => (
2747
+ * <li key={m.id}>
2748
+ * {m.content}
2749
+ * <button onClick={() => removeMemory(m.id)}>Delete</button>
2750
+ * </li>
2751
+ * ))}
2752
+ * </ul>
2753
+ * );
2754
+ * }
2755
+ * ```
2756
+ */
2757
+ declare function useMemories(): UseMemoriesResult;
2758
+ //#endregion
2759
+ //#region src/hooks/use-learn-from-user-action.d.ts
2760
+ /**
2761
+ * Input to {@link UseLearnFromUserActionRecorder}, the function returned
2762
+ * by {@link useLearnFromUserAction}. Captures a single UI interaction that
2763
+ * CopilotKit Intelligence's auto-curated knowledge base loop will distill
2764
+ * into the team's `/project` notes.
2765
+ */
2766
+ interface LearnFromUserActionInput {
2767
+ /** Thread the action is associated with. May be unknown to the platform. */
2768
+ threadId: string;
2769
+ /** Short, agent-readable summary of what the user did. Optional. */
2770
+ title?: string | null;
2771
+ /** Optional longer explanation. */
2772
+ description?: string | null;
2773
+ /** Free-form, JSON-serializable snapshot describing the action. Optional. */
2774
+ data?: unknown;
2775
+ /** ISO-8601 client-asserted timestamp. Defaults to server NOW() when absent. */
2776
+ occurredAt?: string;
2777
+ /**
2778
+ * Caller-supplied idempotency key. When omitted, `recordAnnotation` generates a
2779
+ * fresh UUID per call so retries collapse to the original row at the
2780
+ * platform. Supply your own to keep a single semantic event idempotent
2781
+ * across calls (e.g. a React re-render or a manual retry button).
2782
+ */
2783
+ clientEventId?: string;
2784
+ }
2785
+ /** Outcome returned by the recorder function. */
2786
+ interface LearnFromUserActionResult {
2787
+ /** Platform-assigned id of the user-action row. */
2788
+ id: string;
2789
+ /** True when the platform recognized this `clientEventId` as a retry. */
2790
+ duplicate: boolean;
2791
+ }
2792
+ /** Recorder function returned by {@link useLearnFromUserAction}. */
2793
+ type UseLearnFromUserActionRecorder = (input: LearnFromUserActionInput) => Promise<LearnFromUserActionResult>;
2794
+ /**
2795
+ * Record a user UI interaction in CopilotKit Intelligence's user-actions
2796
+ * stream. The platform's auto-curated knowledge base agent reads these
2797
+ * (alongside finished agent runs) and writes free-form Obsidian-flavored
2798
+ * markdown to `/project`, where any agent in the same project can later
2799
+ * read it via the `copilotkit_knowledge_base_shell` MCP tool.
2800
+ *
2801
+ * The hook returns a stable function. Calling it issues a request to the
2802
+ * customer's CopilotKit runtime (`POST ${runtimeUrl}/annotate`), which
2803
+ * resolves the Intel user from the BFF's auth and forwards to the
2804
+ * platform — the Intel API key never reaches the browser.
2805
+ *
2806
+ * If `clientEventId` is omitted `recordAnnotation` generates a UUID per call,
2807
+ * so a naive double-call (e.g. React 18 strict-mode double-mount, or a retry
2808
+ * after a network blip on a fresh Promise) is naturally safe. Supply your
2809
+ * own key when a single semantic event must remain idempotent across
2810
+ * multiple `learnFromUserAction(...)` calls.
2811
+ *
2812
+ * @example
2813
+ * ```tsx
2814
+ * import { useLearnFromUserAction } from "@copilotkit/react-core";
2815
+ *
2816
+ * function SettingsPage({ threadId }) {
2817
+ * const learnFromUserAction = useLearnFromUserAction();
2818
+ *
2819
+ * const onRename = (oldName: string, newName: string) => {
2820
+ * void learnFromUserAction({
2821
+ * threadId,
2822
+ * title: "Renamed project",
2823
+ * data: { previous: { name: oldName }, next: { name: newName } },
2824
+ * });
2825
+ * };
2826
+ * }
2827
+ * ```
2828
+ */
2829
+ declare function useLearnFromUserAction(): UseLearnFromUserActionRecorder;
2830
+ //#endregion
2831
+ //#region src/hooks/use-learn-from-user-action-in-current-thread.d.ts
2832
+ /**
2833
+ * Input to {@link UseLearnFromUserActionInCurrentThreadRecorder} — same as
2834
+ * {@link LearnFromUserActionInput} minus `threadId`, which is sourced from
2835
+ * the surrounding `<CopilotChatConfigurationProvider>` at call time.
2836
+ */
2837
+ type LearnFromUserActionInCurrentThreadInput = Omit<LearnFromUserActionInput, "threadId">;
2838
+ /** Recorder function returned by {@link useLearnFromUserActionInCurrentThread}. */
2839
+ type UseLearnFromUserActionInCurrentThreadRecorder = (input: LearnFromUserActionInCurrentThreadInput) => Promise<LearnFromUserActionResult>;
2840
+ /**
2841
+ * Record a user UI interaction against the **current chat's** thread. The
2842
+ * `threadId` is sourced from the surrounding
2843
+ * `<CopilotChatConfigurationProvider>` (the same provider `<CopilotChat>`,
2844
+ * `<CopilotSidebar>`, and friends set up), so callers in a chat-aware
2845
+ * subtree don't need to thread an id through manually.
2846
+ *
2847
+ * Throws on **call** (not on mount) when there is no chat-config provider
2848
+ * in scope — matches the "throw on call when runtimeUrl is missing"
2849
+ * behavior of {@link useLearnFromUserAction}. Mounting the hook in a branch
2850
+ * that never fires is harmless.
2851
+ *
2852
+ * The recorder does NOT accept a `threadId` override. If you need to
2853
+ * record against an explicit thread, use {@link useLearnFromUserAction}
2854
+ * directly — two hooks, two crisp contracts, no mode confusion.
2855
+ *
2856
+ * This hook always uses `config.threadId`, regardless of whether the
2857
+ * surrounding chat config minted it internally or received one from
2858
+ * the caller. Auto-minted threads simply mean the action lands under
2859
+ * a thread the platform never saw — the writer agent still distills
2860
+ * user-action-only threads (it does not require the thread to exist
2861
+ * in `cpki.threads`), so the loop keeps learning.
2862
+ *
2863
+ * @example
2864
+ * ```tsx
2865
+ * import { useLearnFromUserActionInCurrentThread } from "@copilotkit/react-core";
2866
+ *
2867
+ * function SettingsPanel() {
2868
+ * const learnFromUserAction = useLearnFromUserActionInCurrentThread();
2869
+ *
2870
+ * const onRename = (oldName: string, newName: string) => {
2871
+ * void learnFromUserAction({
2872
+ * title: "Renamed project",
2873
+ * data: { previous: { name: oldName }, next: { name: newName } },
2874
+ * });
2875
+ * };
2876
+ *
2877
+ * // ...
2878
+ * }
2879
+ * ```
2880
+ */
2881
+ declare function useLearnFromUserActionInCurrentThread(): UseLearnFromUserActionInCurrentThreadRecorder;
2882
+ //#endregion
2883
+ //#region src/hooks/use-attachments.d.ts
2884
+ interface UseAttachmentsProps {
2885
+ config?: AttachmentsConfig$1;
2886
+ }
2887
+ interface UseAttachmentsReturn {
2888
+ /** Currently selected attachments (uploading + ready). */
2889
+ attachments: Attachment$1[];
2890
+ /** Whether attachments are enabled. */
2891
+ enabled: boolean;
2892
+ /** Whether the user is dragging a file over the drop zone. */
2893
+ dragOver: boolean;
2894
+ /** Ref for the hidden file input element. */
2895
+ fileInputRef: React$1.RefObject<HTMLInputElement | null>;
2896
+ /** Ref for the container element (used for scoped paste handling). */
2897
+ containerRef: React$1.RefObject<HTMLDivElement | null>;
2898
+ /** Process an array of files (validate, upload, add to state). */
2899
+ processFiles: (files: File[]) => Promise<void>;
2900
+ /** Handler for `<input type="file" onChange>`. */
2901
+ handleFileUpload: (e: React$1.ChangeEvent<HTMLInputElement>) => Promise<void>;
2902
+ /** Handler for `onDragOver` on the drop zone. */
2903
+ handleDragOver: (e: React$1.DragEvent) => void;
2904
+ /** Handler for `onDragLeave` on the drop zone. */
2905
+ handleDragLeave: (e: React$1.DragEvent) => void;
2906
+ /** Handler for `onDrop` on the drop zone. */
2907
+ handleDrop: (e: React$1.DragEvent) => Promise<void>;
2908
+ /** Remove an attachment by ID. */
2909
+ removeAttachment: (id: string) => void;
2910
+ /**
2911
+ * Consume ready attachments and clear the queue.
2912
+ * Returns the attachments that were ready; resets the file input.
2913
+ * No-ops if the queue is already empty (no state update triggered).
2914
+ */
2915
+ consumeAttachments: () => Attachment$1[];
2916
+ }
2917
+ /**
2918
+ * Hook that manages file attachment state — uploads, drag-and-drop, paste,
2919
+ * and lifecycle. All returned callbacks are referentially stable across
2920
+ * renders (via useCallback) to avoid destabilizing downstream memoization.
2921
+ */
2922
+ declare function useAttachments({
2923
+ config
2924
+ }: UseAttachmentsProps): UseAttachmentsReturn;
2925
+ //#endregion
2926
+ //#region src/hooks/use-learning-containers.d.ts
2927
+ /**
2928
+ * Arguments for {@link useLearningContainers}.
2929
+ *
2930
+ * @deprecated This interface supports only the legacy plural-container
2931
+ * annotation. Configure `getLearningContainerId` on `CopilotKitIntelligence`
2932
+ * for new Intelligence runtimes.
2933
+ */
2934
+ interface UseLearningContainersArgs {
2935
+ /** Thread to apply the learning-container selection to. */
2936
+ threadId: string;
2937
+ /**
2938
+ * The ordered list of learning container identifiers to activate for this
2939
+ * thread. Defaults to `["project"]` on the backend when absent.
2940
+ */
2941
+ learningContainers: readonly string[];
2942
+ }
2943
+ /**
2944
+ * Legacy compatibility hook that keeps a thread's plural learning-container
2945
+ * annotation in sync by emitting
2946
+ * `set_learning_containers` annotations via the CopilotKit runtime annotate
2947
+ * endpoint (`POST ${runtimeUrl}/annotate`).
2948
+ *
2949
+ * **Emit rules:**
2950
+ * - On mount with `["project"]` (the backend default) → does NOT emit.
2951
+ * Absence of an annotation equals the default, so the round-trip is skipped.
2952
+ * - On mount with any other value → emits immediately.
2953
+ * - On any subsequent content change (including a switch back to
2954
+ * `["project"]`) → emits (a deliberate switch is always recorded).
2955
+ * - On unmount or threadId change → emits a reset to `["project"]`
2956
+ * so the backend is left in a clean state for the next consumer.
2957
+ * Changing `learningContainers` within the same thread does NOT reset the
2958
+ * thread; only the new value is emitted.
2959
+ *
2960
+ * Content-equality is evaluated via `JSON.stringify` so a fresh array literal
2961
+ * with the same items does NOT trigger a redundant emit.
2962
+ *
2963
+ * If `runtimeUrl` is absent, all emits are silently skipped.
2964
+ *
2965
+ * @example
2966
+ * ```tsx
2967
+ * function ThreadPane({ threadId, userScope }: Props) {
2968
+ * useLearningContainers({
2969
+ * threadId,
2970
+ * learningContainers: [userScope],
2971
+ * });
2972
+ * // ...
2973
+ * }
2974
+ * ```
2975
+ *
2976
+ * @deprecated This hook supports only the legacy plural-container annotation.
2977
+ * Configure `getLearningContainerId` on `CopilotKitIntelligence` for new
2978
+ * Intelligence runtimes.
2979
+ */
2980
+ declare function useLearningContainers({
2981
+ threadId,
2982
+ learningContainers
2983
+ }: UseLearningContainersArgs): void;
2984
+ //#endregion
2985
+ //#region src/hooks/use-learning-containers-in-current-thread.d.ts
2986
+ /**
2987
+ * Arguments for {@link useLearningContainersInCurrentThread}.
2988
+ * Same as {@link UseLearningContainersArgs} minus `threadId`, which is
2989
+ * sourced from the surrounding `<CopilotChatConfigurationProvider>` at
2990
+ * render time.
2991
+ *
2992
+ * @deprecated This type supports only the legacy plural-container annotation.
2993
+ * Configure `getLearningContainerId` on `CopilotKitIntelligence` for new
2994
+ * Intelligence runtimes.
2995
+ */
2996
+ type UseLearningContainersInCurrentThreadArgs = Omit<UseLearningContainersArgs, "threadId">;
2997
+ /**
2998
+ * Legacy compatibility hook that keeps the **current chat thread's** plural
2999
+ * learning-container annotation in sync. The `threadId` is sourced from the surrounding
3000
+ * `<CopilotChatConfigurationProvider>` (the same provider `<CopilotChat>`,
3001
+ * `<CopilotSidebar>`, and friends set up), so callers in a chat-aware
3002
+ * subtree don't need to thread an id through manually.
3003
+ *
3004
+ * **Throws on render** when there is no chat-config provider in scope or
3005
+ * when the provider does not yet have an active `threadId`. Mount the hook
3006
+ * inside a subtree that is guaranteed to have a thread context.
3007
+ *
3008
+ * If you need to manage an explicit thread, use {@link useLearningContainers}
3009
+ * directly — two hooks, two crisp contracts, no mode confusion.
3010
+ *
3011
+ * @throws When no `CopilotChatConfigurationProvider` is in scope or when the
3012
+ * active `threadId` is absent/empty.
3013
+ *
3014
+ * @example
3015
+ * ```tsx
3016
+ * function ThreadPanel({ scope }: Props) {
3017
+ * useLearningContainersInCurrentThread({
3018
+ * learningContainers: [scope],
3019
+ * });
3020
+ * // ...
3021
+ * }
3022
+ * ```
3023
+ *
3024
+ * @deprecated This hook supports only the legacy plural-container annotation.
3025
+ * Configure `getLearningContainerId` on `CopilotKitIntelligence` for new
3026
+ * Intelligence runtimes.
3027
+ */
3028
+ declare function useLearningContainersInCurrentThread({
3029
+ learningContainers
3030
+ }: UseLearningContainersInCurrentThreadArgs): void;
3031
+ //#endregion
3032
+ //#region src/lib/react-core.d.ts
3033
+ interface CopilotKitCoreReactConfig extends CopilotKitCoreConfig$1 {
3034
+ renderToolCalls?: ReactToolCallRenderer<any>[];
3035
+ renderActivityMessages?: ReactActivityMessageRenderer<any>[];
3036
+ renderCustomMessages?: ReactCustomMessageRenderer[];
3037
+ }
3038
+ interface CopilotKitCoreReactSubscriber extends CopilotKitCoreSubscriber$1 {
3039
+ onRenderToolCallsChanged?: (event: {
3040
+ copilotkit: CopilotKitCore$1;
3041
+ renderToolCalls: ReactToolCallRenderer<any>[];
3042
+ }) => void | Promise<void>;
3043
+ onInterruptElementChanged?: (event: {
3044
+ copilotkit: CopilotKitCore$1;
3045
+ interruptElement: React$1.ReactElement | null;
3046
+ }) => void | Promise<void>;
3047
+ }
3048
+ declare class CopilotKitCoreReact extends CopilotKitCore$1 {
3049
+ private _renderToolCalls;
3050
+ private _hookRenderToolCalls;
3051
+ private _cachedMergedRenderToolCalls;
3052
+ private _renderCustomMessages;
3053
+ private _renderActivityMessages;
3054
+ private _interruptElement;
3055
+ constructor(config: CopilotKitCoreReactConfig);
3056
+ get renderCustomMessages(): Readonly<ReactCustomMessageRenderer[]>;
3057
+ get renderActivityMessages(): Readonly<ReactActivityMessageRenderer<any>>[];
3058
+ get renderToolCalls(): Readonly<ReactToolCallRenderer<any>>[];
3059
+ setRenderActivityMessages(renderers: ReactActivityMessageRenderer<any>[]): void;
3060
+ setRenderCustomMessages(renderers: ReactCustomMessageRenderer[]): void;
3061
+ setRenderToolCalls(renderToolCalls: ReactToolCallRenderer<any>[]): void;
3062
+ addHookRenderToolCall(entry: ReactToolCallRenderer<any>): void;
3063
+ removeHookRenderToolCall(name: string, agentId?: string): void;
3064
+ private _notifyRenderToolCallsChanged;
3065
+ get interruptElement(): React$1.ReactElement | null;
3066
+ setInterruptElement(element: React$1.ReactElement | null): void;
3067
+ subscribe(subscriber: CopilotKitCoreReactSubscriber): CopilotKitCoreSubscription$1;
3068
+ /**
3069
+ * Wait for pending React state updates before the follow-up agent run.
3070
+ *
3071
+ * When a frontend tool handler calls setState(), React 18 batches the update
3072
+ * and schedules a commit via its internal scheduler (MessageChannel). The
3073
+ * useAgentContext hook registers context via useLayoutEffect, which runs
3074
+ * synchronously after React commits that batch.
3075
+ *
3076
+ * Awaiting a zero-delay timeout yields to the macrotask queue. React's
3077
+ * MessageChannel task runs first, committing the pending state and running
3078
+ * useLayoutEffect (which updates the context store). The follow-up runAgent
3079
+ * call then reads fresh context.
3080
+ */
3081
+ waitForPendingFrameworkUpdates(): Promise<void>;
3082
+ }
3083
+ //#endregion
3084
+ //#region src/context.d.ts
3085
+ interface CopilotKitContextValue {
3086
+ copilotkit: CopilotKitCoreReact;
3087
+ /**
3088
+ * Whether CopilotKit should automatically mount Intelligence indicators.
3089
+ * Defaults to true when omitted for compatibility with custom providers.
3090
+ */
3091
+ showIntelligenceIndicator?: boolean;
3092
+ /**
3093
+ * Set of tool call IDs currently being executed.
3094
+ * This is tracked at the provider level to ensure tool execution events
3095
+ * are captured even before child components mount.
3096
+ */
3097
+ executingToolCallIds: ReadonlySet<string>;
3098
+ }
3099
+ declare const useCopilotKit: () => CopilotKitContextValue;
3100
+ declare const useLicenseContext: () => LicenseContextValue;
3101
+ //#endregion
3102
+ //#region src/a2ui/A2UIRecoveryStates.d.ts
3103
+ /**
3104
+ * Shared pre-paint lifecycle states for the A2UI surface renderer (OSS-162).
3105
+ *
3106
+ * The A2UI middleware drives the WHOLE generative-UI lifecycle on a single
3107
+ * `a2ui-surface` activity (one stable messageId, `replace: true`), so the states
3108
+ * below swap IN PLACE and the painted surface ultimately replaces them:
3109
+ *
3110
+ * building → animated skeleton + "Building interface" (+ optional ~N tokens)
3111
+ * retrying → same skeleton; once perceptible, the sub-label becomes
3112
+ * "Retrying generation… (N/M attempts)" (threshold-gated so a fast
3113
+ * transient retry never flashes), with debug detail per debugExposure
3114
+ * failed → a clean hard-failure card (replacing the skeleton), developer
3115
+ * detail tucked into an expander gated by debugExposure
3116
+ * painted → the surface renderer owns the UI (these states render nothing)
3117
+ *
3118
+ * Timing (`showAfterMs` / `showAfterAttempts`) and how much debug detail to surface
3119
+ * (`debugExposure`) are client concerns; the server can override `debugExposure`
3120
+ * by stamping it onto the activity content (it wins over the client option).
3121
+ */
3122
+ type A2UIRecoveryRendererOptions = {
3123
+ /** Delay (ms) before the "Retrying…" sub-label becomes visible. Default 2000. */showAfterMs?: number; /** Show the "Retrying…" sub-label immediately once `attempt` reaches this. Default 2. */
3124
+ showAfterAttempts?: number; /** How much retry/debug detail to surface. Default "collapsed". */
3125
+ debugExposure?: "hidden" | "collapsed" | "verbose";
3126
+ };
3127
+ //#endregion
3128
+ //#region src/providers/CopilotKitProvider.d.ts
3129
+ interface CopilotKitProviderProps {
3130
+ children: ReactNode;
3131
+ runtimeUrl?: string;
3132
+ /**
3133
+ * Headers sent with every request. A record, or a sync or async builder
3134
+ * that runs when each request is sent. An inline arrow is fine. The builder
3135
+ * should be cheap; cache tokens in it (Clerk's `getToken()` already does).
3136
+ */
3137
+ headers?: CopilotKitHeadersSource$1;
3138
+ /**
3139
+ * Credentials mode for fetch requests (e.g., "include" for HTTP-only cookies in cross-origin requests).
3140
+ */
3141
+ credentials?: RequestCredentials;
3142
+ /**
3143
+ * Rewrites the message list sent to runtime agents on every run.
3144
+ *
3145
+ * CopilotKit sends the whole thread each time. When your agent already
3146
+ * stores the conversation, most of that payload is waste, and an agent that
3147
+ * merges the inbound list with its own store can show the model every turn
3148
+ * twice. Return the messages to send:
3149
+ *
3150
+ * ```tsx
3151
+ * <CopilotKit
3152
+ * runtimeUrl="/api/copilotkit"
3153
+ * messageFilter={(messages) => messages.slice(-1)}
3154
+ * />
3155
+ * ```
3156
+ *
3157
+ * The filter changes the request body only. The transcript the UI renders is
3158
+ * untouched. Broken tool-call pairs are repaired before the request is sent,
3159
+ * so a filter this blunt cannot strand a tool result mid-HITL.
3160
+ *
3161
+ * Agents reached through your CopilotRuntime honor this. An agent your app
3162
+ * passes in directly does not, and neither Intelligence runs nor suggestion
3163
+ * runs are ever filtered.
3164
+ *
3165
+ * Prefer a stable reference (`useCallback`). An inline arrow re-registers the
3166
+ * filter on every render, which is harmless but needless.
3167
+ */
3168
+ messageFilter?: CopilotKitMessageFilter$1;
3169
+ /** Your CopilotKit public license key. */
3170
+ publicApiKey?: string;
3171
+ /** Your public license key for accessing CopilotKit Intelligence features. */
3172
+ publicLicenseKey?: string;
3173
+ /**
3174
+ * Signed license token for offline verification of CopilotKit Intelligence features.
3175
+ * Obtain from https://dashboard.operations.copilotkit.ai.
3176
+ */
3177
+ licenseToken?: string;
3178
+ properties?: Record<string, unknown>;
3179
+ /**
3180
+ * The id of the agent every `<CopilotChat>` under this provider talks to,
3181
+ * unless a chat names its own with the `agentId` prop.
3182
+ *
3183
+ * This is the v2 replacement for the v1 `<CopilotKit agent="...">` prop. Set
3184
+ * it here and you never need the v1 compatibility provider just to name an
3185
+ * agent. Defaults to `"default"`.
3186
+ */
3187
+ agentId?: string;
3188
+ useSingleEndpoint?: boolean;
3189
+ agents__unsafe_dev_only?: Record<string, AbstractAgent$1>;
3190
+ selfManagedAgents?: Record<string, AbstractAgent$1>;
3191
+ renderToolCalls?: ReactToolCallRenderer<any>[];
3192
+ renderActivityMessages?: ReactActivityMessageRenderer<any>[];
3193
+ renderCustomMessages?: ReactCustomMessageRenderer[];
3194
+ /**
3195
+ * Global markdown renderer used by assistant/reasoning messages. Overrides the
3196
+ * built-in basic renderer. A per-message `markdownRenderer` slot still wins
3197
+ * over this. Plug in your own (e.g. a streamdown wrapper) to restore rich
3198
+ * rendering — CopilotKit ships only the basic renderer.
3199
+ */
3200
+ markdownRenderer?: MarkdownRenderer;
3201
+ frontendTools?: ReactFrontendTool[];
3202
+ humanInTheLoop?: ReactHumanInTheLoop[];
3203
+ /**
3204
+ * Configuration for OpenGenerativeUI — sandboxed UI generated by the LLM.
3205
+ *
3206
+ * @example
3207
+ * ```tsx
3208
+ * <CopilotKit
3209
+ * runtimeUrl="/api/copilotkit"
3210
+ * openGenerativeUI={{
3211
+ * sandboxFunctions: [{ name: "addToCart", description: "…", parameters: schema, handler: fn }],
3212
+ * }}
3213
+ * >
3214
+ * ```
3215
+ */
3216
+ openGenerativeUI?: {
3217
+ /**
3218
+ * Functions made available inside sandboxed iframes.
3219
+ * Each function is described to the LLM via agent context and exposed
3220
+ * via websandbox's `localApi`.
3221
+ *
3222
+ * Inside the iframe, call them with:
3223
+ * ```js
3224
+ * await Websandbox.connection.remote.<functionName>(args)
3225
+ * ```
3226
+ */
3227
+ sandboxFunctions?: SandboxFunction[];
3228
+ /**
3229
+ * Design guidelines injected as agent context for the `generateSandboxedUi` tool.
3230
+ * Override this to control the visual style of generated UIs.
3231
+ *
3232
+ * A sensible default is provided if omitted.
3233
+ */
3234
+ designSkill?: string;
3235
+ };
3236
+ /**
3237
+ * @deprecated This prop no longer controls the Inspector. Use
3238
+ * `enableInspector` instead.
3239
+ */
3240
+ showDevConsole?: boolean | "auto";
3241
+ /**
3242
+ * Disable the CopilotKit Inspector in development.
3243
+ * The Inspector is enabled by default in development browser builds on
3244
+ * localhost/loopback. It is always disabled on remote hosts, in production,
3245
+ * and during server rendering. Temporary Inspector hides also hide its
3246
+ * message shortcuts.
3247
+ * An explicit value takes priority over CopilotChat's inspectorTools prop.
3248
+ */
3249
+ enableInspector?: boolean;
3250
+ /**
3251
+ * Whether to automatically mount the Intelligence indicator in chat.
3252
+ *
3253
+ * @default true
3254
+ */
3255
+ showIntelligenceIndicator?: boolean;
3256
+ /**
3257
+ * Error handler called when CopilotKit encounters an error.
3258
+ * Fires for all error types (runtime connection failures, agent errors, tool errors).
3259
+ */
3260
+ onError?: (event: {
3261
+ error: Error;
3262
+ code: CopilotKitCoreErrorCode$1;
3263
+ context: Record<string, any>;
3264
+ }) => void | Promise<void>;
3265
+ /**
3266
+ * Configuration for the A2UI (Agent-to-UI) renderer.
3267
+ * The built-in A2UI renderer is activated automatically when the runtime reports
3268
+ * that `a2ui` is configured in `CopilotRuntime`. This prop is optional and only
3269
+ * needed if you want to override the default theme.
3270
+ *
3271
+ * @example
3272
+ * ```tsx
3273
+ * <CopilotKit runtimeUrl="/api/copilotkit" a2ui={{ theme: myCustomTheme }}>
3274
+ * {children}
3275
+ * </CopilotKit>
3276
+ * ```
3277
+ */
3278
+ a2ui?: {
3279
+ /**
3280
+ * Override the default A2UI viewer theme.
3281
+ * When omitted, the built-in `viewerTheme` from `@copilotkit/a2ui-renderer` is used.
3282
+ */
3283
+ theme?: Theme;
3284
+ /**
3285
+ * Optional component catalog to pass to the A2UI renderer.
3286
+ * When omitted, the default basicCatalog is used.
3287
+ */
3288
+ catalog?: any;
3289
+ /**
3290
+ * Optional custom loading component shown while an A2UI surface is generating.
3291
+ * When omitted, a default animated skeleton is shown.
3292
+ */
3293
+ loadingComponent?: React$1.ComponentType;
3294
+ /**
3295
+ * When true (the default), the full component schemas from the catalog are
3296
+ * sent as agent context so the agent knows what components and props are
3297
+ * available. The A2UI middleware can overwrite this with a server-side
3298
+ * schema if configured.
3299
+ *
3300
+ * When false, the agent context still describes the catalog, but only by its
3301
+ * catalog ID and the names of its custom components, without their JSON
3302
+ * schemas. The component schema entry and the A2UI generation and design
3303
+ * guidelines are not sent. With the CopilotKit LangGraph middleware's
3304
+ * injected A2UI tool, the A2UI subagent then gets the component names only;
3305
+ * a host can still give it a composition guide through the middleware's
3306
+ * guidelines (`a2uiParams.guidelines.compositionGuide` in TypeScript,
3307
+ * `a2ui_params["guidelines"]["composition_guide"]` in Python).
3308
+ */
3309
+ includeSchema?: boolean;
3310
+ /**
3311
+ * Options for the A2UI error-recovery status UI (OSS-162): how long before
3312
+ * the transient "Retrying…" hint appears, after how many attempts, and how
3313
+ * much retry/debug detail to surface. When omitted, sane defaults apply.
3314
+ */
3315
+ recovery?: A2UIRecoveryRendererOptions;
3316
+ };
3317
+ /**
3318
+ * Experimental. Native generative UI: `generativeUI={{ ui }}`, where `ui`
3319
+ * comes from `createGenerativeUI`. The agent renders your React components
3320
+ * into chat or into `<GenerativeUISurface id>` mounts. Props that match
3321
+ * the declared state and events that match the declared functions are
3322
+ * bound by the library, and the model does not see them.
3323
+ */
3324
+ generativeUI?: GenerativeUIConfig;
3325
+ /**
3326
+ * Configuration for the built-in MCP Apps renderer.
3327
+ *
3328
+ * @example
3329
+ * ```tsx
3330
+ * <CopilotKit runtimeUrl="/api/copilotkit" mcpApps={{ allowSameOriginFallback: true }}>
3331
+ * {children}
3332
+ * </CopilotKit>
3333
+ * ```
3334
+ */
3335
+ mcpApps?: {
3336
+ /**
3337
+ * Restore `allow-same-origin` on the MCP App sandbox. Default `false`.
3338
+ *
3339
+ * **Unsafe.** The widget then runs with your page's origin: it can read
3340
+ * your cookies, storage and DOM, and call your APIs as the signed-in user.
3341
+ * Only set it for widgets you wrote and trust that need `localStorage`,
3342
+ * `IndexedDB` or cookies. By default widgets get an opaque origin.
3343
+ */
3344
+ allowSameOriginFallback?: boolean;
3345
+ };
3346
+ /**
3347
+ * Default throttle interval (in milliseconds) for `useAgent` re-renders
3348
+ * triggered by `OnMessagesChanged` notifications. This value is used as
3349
+ * a fallback when neither the `useAgent()` hook nor `<CopilotChat>` /
3350
+ * `<CopilotSidebar>` / `<CopilotPopup>` specify an explicit `throttleMs`.
3351
+ *
3352
+ * @default undefined (components/hooks without an explicit throttleMs will be unthrottled)
3353
+ */
3354
+ defaultThrottleMs?: number;
3355
+ /**
3356
+ * Enable debug logging for the client-side event pipeline.
3357
+ */
3358
+ debug?: DebugConfig;
3359
+ /**
3360
+ * Turns on interaction capture (`@copilotkit/learning`). `learning` (short
3361
+ * for `learning={true}`) records with the default options; pass an object
3362
+ * for options. `false` or omitting the prop turns capture off and cancels
3363
+ * startup. Without a sink, Core authenticates with the runtime and sends
3364
+ * browser events to Intelligence; a custom sink keeps the standalone
3365
+ * collector behavior. Updated settings apply to the next Trajectory.
3366
+ *
3367
+ * Capture starts after mount. Set `trajectoryId` to use your own ID;
3368
+ * otherwise the provider generates one. The generated ID stays the same
3369
+ * across rerenders, reconnects and option changes; turning capture off,
3370
+ * setting `autoStart: false` or supplying a `trajectoryId` ends it, and the
3371
+ * next generated Trajectory gets a new ID. Read the active ID from
3372
+ * `copilotkit.trajectoryId`.
3373
+ *
3374
+ * Set `autoStart: false` to start capture yourself with `startTrajectory()`.
3375
+ * Capture stops on unmount, including manually started Trajectories.
3376
+ *
3377
+ * @example
3378
+ * <CopilotKitProvider runtimeUrl="/api/copilotkit" learning>
3379
+ */
3380
+ learning?: boolean | LearningProp;
3381
+ }
3382
+ type LearningProp = LearningConfig$1 & {
3383
+ /**
3384
+ * Starts a Trajectory after mount. Defaults to `true`; set `false` to call
3385
+ * `startTrajectory()` yourself.
3386
+ */
3387
+ autoStart?: boolean;
3388
+ trajectoryId?: string;
3389
+ /**
3390
+ * Used only by explicit custom sinks. Authenticated capture warns and ignores
3391
+ * this option; assign Learning Spaces on the server with
3392
+ * `getTrajectoryLearningContainerIds` on `CopilotKitIntelligence`.
3393
+ */
3394
+ learningContainerIds?: string[];
3395
+ };
3396
+ /** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
3397
+ declare const CopilotKitProvider: React$1.FC<CopilotKitProviderProps>;
3398
+ //#endregion
3399
+ //#region src/providers/SandboxFunctionsContext.d.ts
3400
+ declare const SandboxFunctionsContext: react.Context<readonly SandboxFunction[]>;
3401
+ declare function useSandboxFunctions(): readonly SandboxFunction[];
3402
+ //#endregion
3403
+ //#region src/a2ui/A2UIMessageRenderer.d.ts
3404
+ /**
3405
+ * User action with dataContextPath, as dispatched by A2UI components.
3406
+ */
3407
+ type A2UIUserAction = {
3408
+ name: string;
3409
+ sourceComponentId: string;
3410
+ surfaceId: string;
3411
+ timestamp: string;
3412
+ context?: Record<string, unknown>;
3413
+ dataContextPath?: string;
3414
+ };
3415
+ /**
3416
+ * Intercept an A2UI user action before it reaches the agent.
3417
+ *
3418
+ * Called with the dispatched action and a `forward` helper that runs the agent
3419
+ * with the (optionally modified) action. The return value drives the default
3420
+ * forwarding:
3421
+ * - return `null` → the app handled it client-side (e.g. a `navigate` event);
3422
+ * the action is NOT forwarded to the agent.
3423
+ * - return an `A2UIUserAction` → that (possibly modified) action is forwarded.
3424
+ * - return `undefined` / `void` → the original action is forwarded unchanged.
3425
+ *
3426
+ * `forward` is provided for advanced cases where you want to do async work and
3427
+ * forward manually; if you call it yourself, return `null` to suppress the
3428
+ * default forward and avoid running the agent twice.
3429
+ */
3430
+ type A2UIActionInterceptor = (action: A2UIUserAction, forward: (action?: A2UIUserAction) => Promise<void>) => void | A2UIUserAction | null | Promise<void | A2UIUserAction | null>;
3431
+ type A2UIMessageRendererOptions = {
3432
+ theme: Theme; /** Optional component catalog to pass to A2UIProvider */
3433
+ catalog?: any; /** Optional custom loading component shown while the A2UI surface is building. */
3434
+ loadingComponent?: React.ComponentType;
3435
+ /**
3436
+ * Pre-paint recovery/loading UX options (OSS-162): timing before the
3437
+ * "Retrying…" sub-label appears + how much retry/debug detail to surface.
3438
+ */
3439
+ recovery?: A2UIRecoveryRendererOptions;
3440
+ /**
3441
+ * Intercept actions before they reach the agent. Lets an app handle an action
3442
+ * client-side (e.g. `navigate`) instead of forwarding every action. See
3443
+ * {@link A2UIActionInterceptor}.
3444
+ */
3445
+ onAction?: A2UIActionInterceptor;
3446
+ };
3447
+ declare function createA2UIMessageRenderer(options: A2UIMessageRendererOptions): ReactActivityMessageRenderer<any>;
3448
+ //#endregion
3449
+ export { type A2UIActionInterceptor, type A2UIMarkdownOperation, type A2UIMessageRendererOptions, type A2UIRecoveryRendererOptions, type A2UITheme, type A2UIUserAction, A2UI_FENCE_LANGUAGE, ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, type AGUIEvent, type AGUIEventByType, type AGUIEventOf, AGUI_METADATA_KEY, AbstractAgent, type ActionConfig, type ActionCreator, type ActionFromCreator, type ActionFromCreators, type ActionGroupConfig, type ActionGroupResult, type ActivityDeltaEvent, type ActivityDeltaEventProps, ActivityDeltaEventSchema, type ActivityMessage, ActivityMessageSchema, type ActivitySnapshotEvent, type ActivitySnapshotEventProps, ActivitySnapshotEventSchema, type AddOperation, AddOperationSchema, type AgentCapabilities, AgentCapabilitiesSchema, type AgentConfig, type AgentContextInput, type AgentDebugConfig, AgentRegistry, type AgentStateMutation, type AgentSubscriber, type AgentSubscriberParams, AgentThreadLockedError, type AnyAction, type AssistantMessage, AssistantMessageSchema, type Attachment, type AttachmentModality, type AttachmentsConfig, type Attributable, AttributableSchema, type AudioInputContent, AudioInputContentSchema, type AudioInputPart, AudioInputPartSchema, type AudioPart, AudioPartSchema, AudioRecorderError, type AudioRecorderState, type AutoScrollMode, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, type BaseEvent, type BaseEventFields, type BaseEventProps, BaseEventSchema, type BaseMessage, BaseMessageSchema, BasicMarkdownRenderer, type ChildIdsOf, type ChildWalkOptions, CompatibilityBoundary, type ContentPart, ContentPartSchema, type Context, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, type CopilotChatFeedbackMessage, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatReasoningMessage, type CopilotChatReasoningMessageProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, type CopilotChatToolCallDisplay, CopilotChatToolCallGroup, type CopilotChatToolCallGroupAppearance, type CopilotChatToolCallGroupProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, CopilotChatWorkSummary, type CopilotChatWorkSummaryProps, type CopilotKitContextValue, CopilotKitCore, type CopilotKitCoreAddAgentParams, type CopilotKitCoreCatalogComponent, type CopilotKitCoreConfig, type CopilotKitCoreConnectAgentParams, type CopilotKitCoreContinuationHandoff, CopilotKitCoreErrorCode, type CopilotKitCoreFriendsAccess, type CopilotKitCoreGetSuggestionsResult, type CopilotKitCoreGetToolParams, CopilotKitCoreReact, type CopilotKitCoreReactConfig, CopilotKitCoreReactSubscriber, type CopilotKitCoreRegisterProxiedAgentParams, type CopilotKitCoreRegisterProxiedAgentResult, type CopilotKitCoreRunAgentParams, type CopilotKitCoreRunToolParams, type CopilotKitCoreRunToolResult, CopilotKitCoreRuntimeConnectionStatus, type CopilotKitCoreStopAgentParams, type CopilotKitCoreSubscriber, type CopilotKitCoreSubscription, CopilotKitHeaderResolutionError, type CopilotKitHeadersSource, CopilotKitInspector, CopilotKitInspectorProps, type CopilotKitMessageFilter, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, type CopilotRuntimeTransport, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, CopilotThreadsDrawer, type CopilotThreadsDrawerProps, type CopilotThreadsDrawerRowRenderer, type CopyOperation, CopyOperationSchema, type CustomEvent, type CustomEventProps, CustomEventSchema, type DataSource, DataSourceSchema, DebugLogger, type DebugLoggerInput, DefaultMarkdownRendererProps, type DeveloperMessage, DeveloperMessageSchema, type DispatchingEffect, type DispatchingEffectOptions, type DocumentInputContent, DocumentInputContentSchema, type DocumentInputPart, DocumentInputPartSchema, type DocumentPart, DocumentPartSchema, type DynamicSuggestionsConfig, type Effect, type EmptyActionConfig, type Event, type EventPayloadOf, EventSchema, EventSchemas, EventType, EventTypeSchema, type ExecutionCapabilities, ExecutionCapabilitiesSchema, type FileSource, FileSourceSchema, FilterToolCallsMiddleware, type FrontendTool, type FrontendToolHandlerContext, type FrontendToolReconnectBehavior, type FunctionCall, FunctionCallSchema, FunctionMiddleware, GenerateSandboxedUiArgs, GenerateSandboxedUiArgsSchema, HttpAgent, type HttpAgentConfig, type HttpAgentFetchFn, type HumanInTheLoopCapabilities, HumanInTheLoopCapabilitiesSchema, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTELLIGENCE_TURN_HEAD, INTERRUPT_EVENT_NAME, type IdentityCapabilities, IdentityCapabilitiesSchema, type ImageInputContent, ImageInputContentSchema, type ImageInputPart, ImageInputPartSchema, type ImagePart, ImagePartSchema, type InputContent, type InputContentDataSource, InputContentDataSourceSchema, type InputContentPart, InputContentSchema, type InputContentSource, InputContentSourceSchema, type InputContentUrlSource, InputContentUrlSourceSchema, type InspectorActiveThreadPayload, type InspectorAnchor, type InspectorMetadataV1, type InspectorStopViewingPayload, type InspectorViewThreadPayload, type InspectorViewThreadResultPayload, IntelligenceAgent, type IntelligenceAgentConfig, IntelligenceIndicator, type IntelligenceIndicatorProps, type IntelligenceIndicatorStatus, IntelligenceIndicatorView, type IntelligenceIndicatorViewProps, type IntelligenceRuntimeInfo, type Interrupt, InterruptCancelFn, type InterruptEvent, type InterruptHandlerProps, type InterruptRenderProps, InterruptResolveFn, InterruptSchema, type JsonPatch, type JsonPatchOperation, JsonPatchOperationSchema, JsonPatchSchema, type JsonPointer, JsonPointerSchema, type JsonSerializable, type JsonValue, type LearnFromUserActionInCurrentThreadInput, type LearnFromUserActionInput, type LearnFromUserActionResult, type LearningConfig, type LegacyLearningConfig, type MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, MEMORY_ERROR_REGISTRY, MarkdownRenderer, MarkdownRendererProps, MarkdownRendererProvider, type MarkdownSegment, type MarkdownToken, type MarkdownTokenList, type Memory, type MemoryChanges, MemoryError, type MemoryErrorCategory, type MemoryErrorCode, type MemoryErrorRegistryEntry, type MemoryKind, type MemoryRealtimeStatus, type MemoryScope, type Message, type MessageGroup, type MessageGroupWrapperProps, type MessageRow, MessageSchema, type MessagesSnapshotEvent, type MessagesSnapshotEventProps, MessagesSnapshotEventSchema, type Metadata, MetadataSchema, Middleware, type MiddlewareFunction, type MoveOperation, MoveOperationSchema, type MultiAgentCapabilities, MultiAgentCapabilitiesSchema, type MultimodalCapabilities, MultimodalCapabilitiesSchema, type MultimodalInputCapabilities, MultimodalInputCapabilitiesSchema, type MultimodalOutputCapabilities, MultimodalOutputCapabilitiesSchema, type NewMemory, type NonDispatchingEffect, type NonDispatchingEffectOptions, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContent, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, type OpenThreadRegistration, OptionalMetadataSchema, type OutputCapabilities, OutputCapabilitiesSchema, PROTOCOL_VERSION, type ParseMarkdownOptions, type PartSource, PartSourceSchema, type PropsActionConfig, ProxiedCopilotRuntimeAgent, type ProxiedCopilotRuntimeAgentConfig, type RawEvent, type RawEventProps, RawEventSchema, ReactActivityMessageRenderer, ReactCustomMessageRenderer, ReactCustomMessageRendererPosition, ReactFrontendTool, ReactHumanInTheLoop, ReactToolCallRenderer, type ReasoningCapabilities, ReasoningCapabilitiesSchema, type ReasoningEncryptedValueEvent, type ReasoningEncryptedValueEventProps, ReasoningEncryptedValueEventSchema, type ReasoningEncryptedValueSubtype, ReasoningEncryptedValueSubtypeSchema, type ReasoningEndEvent, type ReasoningEndEventProps, ReasoningEndEventSchema, type ReasoningMessage, type ReasoningMessageChunkEvent, type ReasoningMessageChunkEventProps, ReasoningMessageChunkEventSchema, type ReasoningMessageContentEvent, type ReasoningMessageContentEventProps, ReasoningMessageContentEventSchema, type ReasoningMessageEndEvent, type ReasoningMessageEndEventProps, ReasoningMessageEndEventSchema, ReasoningMessageSchema, type ReasoningMessageStartEvent, type ReasoningMessageStartEventProps, ReasoningMessageStartEventSchema, type ReasoningStartEvent, type ReasoningStartEventProps, ReasoningStartEventSchema, type Reducer, type RemoveOperation, RemoveOperationSchema, type ReplaceOperation, ReplaceOperationSchema, type ResolvedAgentDebugConfig, type ResumeEntry, ResumeEntrySchema, type ResumeStatus, type Role, RoleSchema, type RunAgentInput, RunAgentInputSchema, type RunAgentParameters, type RunAgentResult, type RunCompletionAware, type RunErrorEvent, type RunErrorEventProps, RunErrorEventSchema, type RunFinishedCancelledOutcome, RunFinishedCancelledOutcomeSchema, type RunFinishedEvent, type RunFinishedEventProps, RunFinishedEventSchema, type RunFinishedInterruptOutcome, RunFinishedInterruptOutcomeSchema, type RunFinishedOutcome, RunFinishedOutcomeSchema, type RunFinishedSuccessOutcome, RunFinishedSuccessOutcomeSchema, RunHandler, type RunStartedEvent, type RunStartedEventProps, RunStartedEventSchema, type RuntimeLicenseStatus, type RuntimeMode, SandboxFunction, SandboxFunctionsContext, type ScopedContext, type ScopedProperties, type Selector, type StartResult, type State, type StateCapabilities, StateCapabilitiesSchema, type StateDeltaEvent, type StateDeltaEventProps, StateDeltaEventSchema, StateManager, StateSchema, type StateSnapshotEvent, type StateSnapshotEventProps, StateSnapshotEventSchema, type StaticSuggestionsConfig, type StepFinishedEvent, type StepFinishedEventProps, StepFinishedEventSchema, type StepStartedEvent, type StepStartedEventProps, StepStartedEventSchema, type Store, type StoreLifecycleAction, StreamingMarkdownDefaultRenderer, type SubagentErrorEvent, type SubagentErrorEventProps, SubagentErrorEventSchema, type SubagentFinishedEvent, type SubagentFinishedEventProps, SubagentFinishedEventSchema, type SubagentFinishedOutcome, SubagentFinishedOutcomeSchema, type SubagentFinishedSuccessOutcome, SubagentFinishedSuccessOutcomeSchema, type SubagentFinishedSuspendedOutcome, SubagentFinishedSuspendedOutcomeSchema, type SubagentInfo, SubagentInfoSchema, type SubagentRunId, SubagentRunIdSchema, type SubagentStartedEvent, type SubagentStartedEventProps, SubagentStartedEventSchema, type SubscribeToAgentOptions, type SubscribeToAgentSubscriber, type Suggestion, type SuggestionAvailability, SuggestionEngine, type SuggestionsConfig, type SurfaceSegment, type SystemMessage, SystemMessageSchema, type TestOperation, TestOperationSchema, type TextInputContent, TextInputContentSchema, type TextMessageChunkEvent, type TextMessageChunkEventProps, TextMessageChunkEventSchema, type TextMessageContentEvent, type TextMessageContentEventProps, TextMessageContentEventSchema, type TextMessageEndEvent, type TextMessageEndEventProps, TextMessageEndEventSchema, type TextMessageRole, TextMessageRoleSchema, type TextMessageStartEvent, type TextMessageStartEventProps, TextMessageStartEventSchema, type TextPart, TextPartSchema, type Thread, type ThreadEndpointRuntimeInfo, type ThreadRunActivityNotification, type TokenUsage, TokenUsageSchema, type Tokens, type Tool, type ToolCall, type ToolCallArgsEvent, type ToolCallArgsEventProps, ToolCallArgsEventSchema, type ToolCallChunkEvent, type ToolCallChunkEventProps, ToolCallChunkEventSchema, type ToolCallEndEvent, type ToolCallEndEventProps, ToolCallEndEventSchema, type ToolCallEntry, type ToolCallResultEvent, type ToolCallResultEventProps, ToolCallResultEventSchema, ToolCallSchema, type ToolCallStartEvent, type ToolCallStartEventProps, ToolCallStartEventSchema, ToolCallStatus, type ToolMessage, ToolMessageSchema, ToolSchema, type ToolsCapabilities, ToolsCapabilitiesSchema, type ToolsMenuItem, type TrajectoryStartOptions, type TransportCapabilities, TransportCapabilitiesSchema, type UnrecognizedEvent, type UrlSource, UrlSourceSchema, UseAgentUpdate, type UseAttachmentsProps, type UseAttachmentsReturn, type UseInterruptConfig, type UseLearnFromUserActionInCurrentThreadRecorder, type UseLearnFromUserActionRecorder, type UseLearningContainersArgs, type UseLearningContainersInCurrentThreadArgs, type UseMemoriesResult, type UseThreadsInput, type UseThreadsResult, type UserMessage, UserMessageSchema, type VideoInputContent, VideoInputContentSchema, type VideoInputPart, VideoInputPartSchema, type VideoPart, VideoPartSchema, type WebMCPModelContext, WebMCPRegistry, type WebMCPToolAnnotations, type WebMCPToolConfig, WildcardToolCallRender, a2uiDefaultTheme, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, classifySurfaceCards, compactEvents, completePartialMarkdown, contentHasMedia, contentToText, convertToLegacyEvents, createA2UIMessageRenderer, createActionGroup, createDebugLogger, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, defaultApplyEvents, defineToolCallRenderer, emitInspectorActiveThread, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, empty, enforceEvents, enforceOutgoingInput, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getIntelligenceTurnAnchors, getMarkdownOperationSurfaceId, getRunOutcome, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInterruptExpired, isRecognizedEvent, isRunCompletionAware, mergeMetadata, messageGroup, messageRow, ofType, omitOptionalNulls, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorViewThread, onInspectorViewThreadResult, parseMarkdown, parseProtoStream, parseSSEStream, parseToolArguments, prepareSurfaceOperations, props, randomUUID, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, segmentSurfaceProse, select, splitA2UIMarkdown, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useFrontendTools, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLearningContainers, useLearningContainersInCurrentThread, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, type ɵCopilotKitFeature, type ɵGenerativeUIDebugFunction, type ɵGenerativeUIDebugPromptSection, type ɵGenerativeUIDebugRun, type ɵGenerativeUIDebugSnapshot, type ɵGenerativeUIDebugSource, type ɵGenerativeUIDebugSurface, type ɵInterruptDecision, type ɵInterruptEvent, ɵInterruptState, type ɵInterruptToolResult, ɵMAX_SOCKET_RETRIES, type ɵMcpFollowUpHost, type ɵMemoryEnvironment, type ɵMemoryMetadataEvent, type ɵMemoryRuntimeContext, type ɵMemoryState, type ɵMemoryStore, type ɵPendingInterrupt, type ɵPhoenixChannelLike, type ɵPhoenixChannelOptions, type ɵPhoenixChannelSession, type ɵPhoenixJoinOutcome, type ɵPhoenixPushLike, type ɵPhoenixSocketLike, type ɵPhoenixSocketOptions, type ɵPhoenixSocketSession, type ɵPhoenixSocketSignal, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, type ɵThread, type ɵThreadEnvironment, type ɵThreadMetadataEvent, type ɵThreadRuntimeContext, type ɵThreadSelectors, type ɵThreadStore, ɵclearAgentInterruptState, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵgetAgentInterruptState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵthreadAdapterEvents, ɵwithHeaderDefaults };
3450
+ //# sourceMappingURL=index.d.cts.map