@copilotkit/runtime 2.0.0-rc.6 → 2.0.0-rc.61

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 (417) hide show
  1. package/README.md +29 -4
  2. package/dist/agent/{url-download.cjs → ai-sdk/url-download.cjs} +19 -76
  3. package/dist/agent/ai-sdk/url-download.cjs.map +1 -0
  4. package/dist/agent/{url-download.d.cts → ai-sdk/url-download.d.cts} +11 -8
  5. package/dist/agent/ai-sdk/url-download.d.cts.map +1 -0
  6. package/dist/agent/{url-download.d.mts → ai-sdk/url-download.d.mts} +11 -8
  7. package/dist/agent/ai-sdk/url-download.d.mts.map +1 -0
  8. package/dist/agent/{url-download.mjs → ai-sdk/url-download.mjs} +20 -74
  9. package/dist/agent/ai-sdk/url-download.mjs.map +1 -0
  10. package/dist/agent/ai-sdk.cjs +425 -0
  11. package/dist/agent/ai-sdk.cjs.map +1 -0
  12. package/dist/agent/ai-sdk.d.cts +119 -0
  13. package/dist/agent/ai-sdk.d.cts.map +1 -0
  14. package/dist/agent/ai-sdk.d.mts +119 -0
  15. package/dist/agent/ai-sdk.d.mts.map +1 -0
  16. package/dist/agent/ai-sdk.mjs +419 -0
  17. package/dist/agent/ai-sdk.mjs.map +1 -0
  18. package/dist/agent/classic-tools.cjs +185 -0
  19. package/dist/agent/classic-tools.cjs.map +1 -0
  20. package/dist/agent/classic-tools.mjs +183 -0
  21. package/dist/agent/classic-tools.mjs.map +1 -0
  22. package/dist/agent/converters/aisdk.cjs +17 -4
  23. package/dist/agent/converters/aisdk.cjs.map +1 -1
  24. package/dist/agent/converters/aisdk.d.cts.map +1 -1
  25. package/dist/agent/converters/aisdk.d.mts.map +1 -1
  26. package/dist/agent/converters/aisdk.mjs +18 -2
  27. package/dist/agent/converters/aisdk.mjs.map +1 -1
  28. package/dist/agent/converters/tanstack.cjs +202 -30
  29. package/dist/agent/converters/tanstack.cjs.map +1 -1
  30. package/dist/agent/converters/tanstack.d.cts +90 -6
  31. package/dist/agent/converters/tanstack.d.cts.map +1 -1
  32. package/dist/agent/converters/tanstack.d.mts +90 -6
  33. package/dist/agent/converters/tanstack.d.mts.map +1 -1
  34. package/dist/agent/converters/tanstack.mjs +202 -29
  35. package/dist/agent/converters/tanstack.mjs.map +1 -1
  36. package/dist/agent/learned-skills.cjs +15 -17
  37. package/dist/agent/learned-skills.cjs.map +1 -1
  38. package/dist/agent/learned-skills.d.cts +9 -3
  39. package/dist/agent/learned-skills.d.cts.map +1 -1
  40. package/dist/agent/learned-skills.d.mts +9 -3
  41. package/dist/agent/learned-skills.d.mts.map +1 -1
  42. package/dist/agent/learned-skills.mjs +15 -16
  43. package/dist/agent/learned-skills.mjs.map +1 -1
  44. package/dist/agent/model.cjs +42 -0
  45. package/dist/agent/model.cjs.map +1 -0
  46. package/dist/agent/model.d.cts +19 -0
  47. package/dist/agent/model.d.cts.map +1 -0
  48. package/dist/agent/model.d.mts +19 -0
  49. package/dist/agent/model.d.mts.map +1 -0
  50. package/dist/agent/model.mjs +41 -0
  51. package/dist/agent/model.mjs.map +1 -0
  52. package/dist/agent/state-delta.cjs +0 -1
  53. package/dist/agent/state-delta.cjs.map +1 -1
  54. package/dist/agent.cjs +558 -0
  55. package/dist/agent.cjs.map +1 -0
  56. package/dist/agent.d.cts +455 -0
  57. package/dist/agent.d.cts.map +1 -0
  58. package/dist/agent.d.mts +455 -0
  59. package/dist/agent.d.mts.map +1 -0
  60. package/dist/agent.mjs +551 -0
  61. package/dist/agent.mjs.map +1 -0
  62. package/dist/index.cjs +23 -28
  63. package/dist/index.d.cts +14 -14
  64. package/dist/index.d.mts +14 -14
  65. package/dist/index.mjs +8 -8
  66. package/dist/internal/learned-skills.d.cts +1 -1
  67. package/dist/internal/learned-skills.d.mts +1 -1
  68. package/dist/node.cjs +2 -3
  69. package/dist/node.d.cts +3 -3
  70. package/dist/node.d.mts +3 -3
  71. package/dist/node.mjs +3 -3
  72. package/dist/runtime/core/channel-manager.cjs +10 -2
  73. package/dist/runtime/core/channel-manager.cjs.map +1 -1
  74. package/dist/runtime/core/channel-manager.d.cts +1 -1
  75. package/dist/runtime/core/channel-manager.d.mts +1 -1
  76. package/dist/runtime/core/channel-manager.mjs +10 -1
  77. package/dist/runtime/core/channel-manager.mjs.map +1 -1
  78. package/dist/runtime/core/debug-event-bus.cjs +4 -3
  79. package/dist/runtime/core/debug-event-bus.cjs.map +1 -1
  80. package/dist/runtime/core/debug-event-bus.d.cts +5 -1
  81. package/dist/runtime/core/debug-event-bus.d.cts.map +1 -1
  82. package/dist/runtime/core/debug-event-bus.d.mts +4 -0
  83. package/dist/runtime/core/debug-event-bus.d.mts.map +1 -1
  84. package/dist/runtime/core/debug-event-bus.mjs +5 -3
  85. package/dist/runtime/core/debug-event-bus.mjs.map +1 -1
  86. package/dist/runtime/core/fetch-cors.cjs.map +1 -1
  87. package/dist/runtime/core/fetch-cors.d.cts +2 -2
  88. package/dist/runtime/core/fetch-cors.d.cts.map +1 -1
  89. package/dist/runtime/core/fetch-cors.d.mts +2 -2
  90. package/dist/runtime/core/fetch-cors.d.mts.map +1 -1
  91. package/dist/runtime/core/fetch-cors.mjs.map +1 -1
  92. package/dist/runtime/core/fetch-handler.cjs +17 -14
  93. package/dist/runtime/core/fetch-handler.cjs.map +1 -1
  94. package/dist/runtime/core/fetch-handler.d.cts +22 -14
  95. package/dist/runtime/core/fetch-handler.d.cts.map +1 -1
  96. package/dist/runtime/core/fetch-handler.d.mts +22 -14
  97. package/dist/runtime/core/fetch-handler.d.mts.map +1 -1
  98. package/dist/runtime/core/fetch-handler.mjs +9 -5
  99. package/dist/runtime/core/fetch-handler.mjs.map +1 -1
  100. package/dist/runtime/core/hooks.cjs.map +1 -1
  101. package/dist/runtime/core/hooks.d.cts +5 -5
  102. package/dist/runtime/core/hooks.d.cts.map +1 -1
  103. package/dist/runtime/core/hooks.d.mts +5 -5
  104. package/dist/runtime/core/hooks.d.mts.map +1 -1
  105. package/dist/runtime/core/hooks.mjs.map +1 -1
  106. package/dist/runtime/core/learning.cjs.map +1 -1
  107. package/dist/runtime/core/learning.d.cts +9 -9
  108. package/dist/runtime/core/learning.d.cts.map +1 -1
  109. package/dist/runtime/core/learning.d.mts +8 -8
  110. package/dist/runtime/core/learning.d.mts.map +1 -1
  111. package/dist/runtime/core/learning.mjs.map +1 -1
  112. package/dist/runtime/core/logger.cjs +105 -14
  113. package/dist/runtime/core/logger.cjs.map +1 -1
  114. package/dist/runtime/core/logger.d.cts +26 -9
  115. package/dist/runtime/core/logger.d.cts.map +1 -1
  116. package/dist/runtime/core/logger.d.mts +26 -9
  117. package/dist/runtime/core/logger.d.mts.map +1 -1
  118. package/dist/runtime/core/logger.mjs +105 -12
  119. package/dist/runtime/core/logger.mjs.map +1 -1
  120. package/dist/runtime/core/middleware-sse-parser.cjs +3 -4
  121. package/dist/runtime/core/middleware-sse-parser.cjs.map +1 -1
  122. package/dist/runtime/core/middleware-sse-parser.d.cts.map +1 -1
  123. package/dist/runtime/core/middleware-sse-parser.d.mts.map +1 -1
  124. package/dist/runtime/core/middleware-sse-parser.mjs +2 -2
  125. package/dist/runtime/core/middleware-sse-parser.mjs.map +1 -1
  126. package/dist/runtime/core/middleware.cjs +5 -5
  127. package/dist/runtime/core/middleware.cjs.map +1 -1
  128. package/dist/runtime/core/middleware.d.cts +3 -3
  129. package/dist/runtime/core/middleware.d.cts.map +1 -1
  130. package/dist/runtime/core/middleware.d.mts +3 -3
  131. package/dist/runtime/core/middleware.d.mts.map +1 -1
  132. package/dist/runtime/core/middleware.mjs +4 -3
  133. package/dist/runtime/core/middleware.mjs.map +1 -1
  134. package/dist/runtime/core/package-info.cjs +1 -1
  135. package/dist/runtime/core/package-info.mjs +1 -1
  136. package/dist/runtime/core/runtime-error-reporter.cjs.map +1 -1
  137. package/dist/runtime/core/runtime-error-reporter.mjs.map +1 -1
  138. package/dist/runtime/core/runtime.cjs +44 -46
  139. package/dist/runtime/core/runtime.cjs.map +1 -1
  140. package/dist/runtime/core/runtime.d.cts +178 -91
  141. package/dist/runtime/core/runtime.d.cts.map +1 -1
  142. package/dist/runtime/core/runtime.d.mts +178 -91
  143. package/dist/runtime/core/runtime.d.mts.map +1 -1
  144. package/dist/runtime/core/runtime.mjs +42 -42
  145. package/dist/runtime/core/runtime.mjs.map +1 -1
  146. package/dist/runtime/endpoints/auto-start-channels.cjs +3 -4
  147. package/dist/runtime/endpoints/auto-start-channels.cjs.map +1 -1
  148. package/dist/runtime/endpoints/auto-start-channels.mjs +2 -2
  149. package/dist/runtime/endpoints/auto-start-channels.mjs.map +1 -1
  150. package/dist/runtime/endpoints/node-fetch-handler.cjs +4 -8
  151. package/dist/runtime/endpoints/node-fetch-handler.cjs.map +1 -1
  152. package/dist/runtime/endpoints/node-fetch-handler.d.cts +4 -5
  153. package/dist/runtime/endpoints/node-fetch-handler.d.cts.map +1 -1
  154. package/dist/runtime/endpoints/node-fetch-handler.d.mts +4 -5
  155. package/dist/runtime/endpoints/node-fetch-handler.d.mts.map +1 -1
  156. package/dist/runtime/endpoints/node-fetch-handler.mjs +3 -5
  157. package/dist/runtime/endpoints/node-fetch-handler.mjs.map +1 -1
  158. package/dist/runtime/endpoints/node.cjs +7 -5
  159. package/dist/runtime/endpoints/node.cjs.map +1 -1
  160. package/dist/runtime/endpoints/node.d.cts +16 -16
  161. package/dist/runtime/endpoints/node.d.cts.map +1 -1
  162. package/dist/runtime/endpoints/node.d.mts +16 -16
  163. package/dist/runtime/endpoints/node.d.mts.map +1 -1
  164. package/dist/runtime/endpoints/node.mjs +9 -7
  165. package/dist/runtime/endpoints/node.mjs.map +1 -1
  166. package/dist/runtime/event-transforms/index.d.cts +4 -0
  167. package/dist/runtime/event-transforms/index.d.mts +4 -0
  168. package/dist/runtime/event-transforms/index.mjs +5 -0
  169. package/dist/runtime/event-transforms/open-generative-ui-middleware.cjs +277 -0
  170. package/dist/runtime/event-transforms/open-generative-ui-middleware.cjs.map +1 -0
  171. package/dist/runtime/event-transforms/open-generative-ui-middleware.d.cts +61 -0
  172. package/dist/runtime/event-transforms/open-generative-ui-middleware.d.cts.map +1 -0
  173. package/dist/runtime/event-transforms/open-generative-ui-middleware.d.mts +61 -0
  174. package/dist/runtime/event-transforms/open-generative-ui-middleware.d.mts.map +1 -0
  175. package/dist/runtime/event-transforms/open-generative-ui-middleware.mjs +276 -0
  176. package/dist/runtime/event-transforms/open-generative-ui-middleware.mjs.map +1 -0
  177. package/dist/runtime/event-transforms/recorded-events.cjs +68 -0
  178. package/dist/runtime/event-transforms/recorded-events.cjs.map +1 -0
  179. package/dist/runtime/event-transforms/recorded-events.d.cts +27 -0
  180. package/dist/runtime/event-transforms/recorded-events.d.cts.map +1 -0
  181. package/dist/runtime/event-transforms/recorded-events.d.mts +27 -0
  182. package/dist/runtime/event-transforms/recorded-events.d.mts.map +1 -0
  183. package/dist/runtime/event-transforms/recorded-events.mjs +68 -0
  184. package/dist/runtime/event-transforms/recorded-events.mjs.map +1 -0
  185. package/dist/runtime/event-transforms/streaming-json-scanner.cjs +289 -0
  186. package/dist/runtime/event-transforms/streaming-json-scanner.cjs.map +1 -0
  187. package/dist/runtime/event-transforms/streaming-json-scanner.mjs +288 -0
  188. package/dist/runtime/event-transforms/streaming-json-scanner.mjs.map +1 -0
  189. package/dist/runtime/generative-ui/a2ui-v09-actions.cjs +106 -0
  190. package/dist/runtime/generative-ui/a2ui-v09-actions.cjs.map +1 -0
  191. package/dist/runtime/generative-ui/a2ui-v09-actions.mjs +106 -0
  192. package/dist/runtime/generative-ui/a2ui-v09-actions.mjs.map +1 -0
  193. package/dist/runtime/generative-ui/a2ui-v09-catalog.cjs +422 -0
  194. package/dist/runtime/generative-ui/a2ui-v09-catalog.cjs.map +1 -0
  195. package/dist/runtime/generative-ui/a2ui-v09-catalog.mjs +422 -0
  196. package/dist/runtime/generative-ui/a2ui-v09-catalog.mjs.map +1 -0
  197. package/dist/runtime/generative-ui/a2ui-v09-middleware.cjs +84 -0
  198. package/dist/runtime/generative-ui/a2ui-v09-middleware.cjs.map +1 -0
  199. package/dist/runtime/generative-ui/a2ui-v09-middleware.d.cts +41 -0
  200. package/dist/runtime/generative-ui/a2ui-v09-middleware.d.cts.map +1 -0
  201. package/dist/runtime/generative-ui/a2ui-v09-middleware.d.mts +41 -0
  202. package/dist/runtime/generative-ui/a2ui-v09-middleware.d.mts.map +1 -0
  203. package/dist/runtime/generative-ui/a2ui-v09-middleware.mjs +83 -0
  204. package/dist/runtime/generative-ui/a2ui-v09-middleware.mjs.map +1 -0
  205. package/dist/runtime/generative-ui/a2ui-v09-operations.cjs +694 -0
  206. package/dist/runtime/generative-ui/a2ui-v09-operations.cjs.map +1 -0
  207. package/dist/runtime/generative-ui/a2ui-v09-operations.mjs +694 -0
  208. package/dist/runtime/generative-ui/a2ui-v09-operations.mjs.map +1 -0
  209. package/dist/runtime/generative-ui/generative-ui-middleware.cjs +0 -1
  210. package/dist/runtime/generative-ui/generative-ui-middleware.cjs.map +1 -1
  211. package/dist/runtime/generative-ui/index.d.cts +1 -0
  212. package/dist/runtime/generative-ui/index.d.mts +1 -0
  213. package/dist/runtime/generative-ui/surface-writer.cjs +4 -5
  214. package/dist/runtime/generative-ui/surface-writer.cjs.map +1 -1
  215. package/dist/runtime/generative-ui/surface-writer.d.cts +1 -1
  216. package/dist/runtime/generative-ui/surface-writer.d.cts.map +1 -1
  217. package/dist/runtime/generative-ui/surface-writer.d.mts.map +1 -1
  218. package/dist/runtime/generative-ui/surface-writer.mjs +5 -5
  219. package/dist/runtime/generative-ui/surface-writer.mjs.map +1 -1
  220. package/dist/runtime/handlers/get-runtime-info.cjs +24 -6
  221. package/dist/runtime/handlers/get-runtime-info.cjs.map +1 -1
  222. package/dist/runtime/handlers/get-runtime-info.mjs +25 -7
  223. package/dist/runtime/handlers/get-runtime-info.mjs.map +1 -1
  224. package/dist/runtime/handlers/handle-connect.cjs +3 -8
  225. package/dist/runtime/handlers/handle-connect.cjs.map +1 -1
  226. package/dist/runtime/handlers/handle-connect.mjs +3 -8
  227. package/dist/runtime/handlers/handle-connect.mjs.map +1 -1
  228. package/dist/runtime/handlers/handle-debug-events.cjs.map +1 -1
  229. package/dist/runtime/handlers/handle-debug-events.mjs.map +1 -1
  230. package/dist/runtime/handlers/handle-inspector-learning.cjs +2 -3
  231. package/dist/runtime/handlers/handle-inspector-learning.cjs.map +1 -1
  232. package/dist/runtime/handlers/handle-inspector-learning.mjs.map +1 -1
  233. package/dist/runtime/handlers/handle-inspector-metadata.cjs +2 -3
  234. package/dist/runtime/handlers/handle-inspector-metadata.cjs.map +1 -1
  235. package/dist/runtime/handlers/handle-inspector-metadata.mjs.map +1 -1
  236. package/dist/runtime/handlers/handle-run.cjs +11 -16
  237. package/dist/runtime/handlers/handle-run.cjs.map +1 -1
  238. package/dist/runtime/handlers/handle-run.mjs +8 -12
  239. package/dist/runtime/handlers/handle-run.mjs.map +1 -1
  240. package/dist/runtime/handlers/handle-stop.cjs +5 -5
  241. package/dist/runtime/handlers/handle-stop.cjs.map +1 -1
  242. package/dist/runtime/handlers/handle-stop.mjs +2 -1
  243. package/dist/runtime/handlers/handle-stop.mjs.map +1 -1
  244. package/dist/runtime/handlers/handle-suggest.cjs +6 -3
  245. package/dist/runtime/handlers/handle-suggest.cjs.map +1 -1
  246. package/dist/runtime/handlers/handle-suggest.mjs +6 -2
  247. package/dist/runtime/handlers/handle-suggest.mjs.map +1 -1
  248. package/dist/runtime/handlers/handle-trajectory-connect.cjs.map +1 -1
  249. package/dist/runtime/handlers/handle-trajectory-connect.mjs.map +1 -1
  250. package/dist/runtime/handlers/handle-transcribe.cjs +0 -1
  251. package/dist/runtime/handlers/handle-transcribe.cjs.map +1 -1
  252. package/dist/runtime/handlers/handle-transcribe.mjs.map +1 -1
  253. package/dist/runtime/handlers/intelligence/annotate.cjs +8 -8
  254. package/dist/runtime/handlers/intelligence/annotate.cjs.map +1 -1
  255. package/dist/runtime/handlers/intelligence/annotate.mjs +5 -4
  256. package/dist/runtime/handlers/intelligence/annotate.mjs.map +1 -1
  257. package/dist/runtime/handlers/intelligence/connect.cjs +6 -2
  258. package/dist/runtime/handlers/intelligence/connect.cjs.map +1 -1
  259. package/dist/runtime/handlers/intelligence/connect.mjs +6 -2
  260. package/dist/runtime/handlers/intelligence/connect.mjs.map +1 -1
  261. package/dist/runtime/handlers/intelligence/memories.cjs +28 -23
  262. package/dist/runtime/handlers/intelligence/memories.cjs.map +1 -1
  263. package/dist/runtime/handlers/intelligence/memories.mjs +12 -6
  264. package/dist/runtime/handlers/intelligence/memories.mjs.map +1 -1
  265. package/dist/runtime/handlers/intelligence/run.cjs +38 -30
  266. package/dist/runtime/handlers/intelligence/run.cjs.map +1 -1
  267. package/dist/runtime/handlers/intelligence/run.mjs +37 -28
  268. package/dist/runtime/handlers/intelligence/run.mjs.map +1 -1
  269. package/dist/runtime/handlers/intelligence/thread-names.cjs +6 -5
  270. package/dist/runtime/handlers/intelligence/thread-names.cjs.map +1 -1
  271. package/dist/runtime/handlers/intelligence/thread-names.mjs +3 -1
  272. package/dist/runtime/handlers/intelligence/thread-names.mjs.map +1 -1
  273. package/dist/runtime/handlers/intelligence/threads.cjs +40 -31
  274. package/dist/runtime/handlers/intelligence/threads.cjs.map +1 -1
  275. package/dist/runtime/handlers/intelligence/threads.mjs +18 -8
  276. package/dist/runtime/handlers/intelligence/threads.mjs.map +1 -1
  277. package/dist/runtime/handlers/shared/agent-utils.cjs +50 -46
  278. package/dist/runtime/handlers/shared/agent-utils.cjs.map +1 -1
  279. package/dist/runtime/handlers/shared/agent-utils.mjs +47 -42
  280. package/dist/runtime/handlers/shared/agent-utils.mjs.map +1 -1
  281. package/dist/runtime/handlers/shared/cloud-telemetry.cjs +0 -1
  282. package/dist/runtime/handlers/shared/cloud-telemetry.cjs.map +1 -1
  283. package/dist/runtime/handlers/shared/memory-policy.cjs.map +1 -1
  284. package/dist/runtime/handlers/shared/memory-policy.mjs.map +1 -1
  285. package/dist/runtime/handlers/shared/resolve-intelligence-user.cjs +4 -3
  286. package/dist/runtime/handlers/shared/resolve-intelligence-user.cjs.map +1 -1
  287. package/dist/runtime/handlers/shared/resolve-intelligence-user.mjs +4 -3
  288. package/dist/runtime/handlers/shared/resolve-intelligence-user.mjs.map +1 -1
  289. package/dist/runtime/handlers/shared/sse-response.cjs +77 -78
  290. package/dist/runtime/handlers/shared/sse-response.cjs.map +1 -1
  291. package/dist/runtime/handlers/shared/sse-response.mjs +77 -77
  292. package/dist/runtime/handlers/shared/sse-response.mjs.map +1 -1
  293. package/dist/runtime/handlers/shared/thread-access.cjs +4 -3
  294. package/dist/runtime/handlers/shared/thread-access.cjs.map +1 -1
  295. package/dist/runtime/handlers/shared/thread-access.d.cts.map +1 -1
  296. package/dist/runtime/handlers/shared/thread-access.d.mts.map +1 -1
  297. package/dist/runtime/handlers/shared/thread-access.mjs +4 -3
  298. package/dist/runtime/handlers/shared/thread-access.mjs.map +1 -1
  299. package/dist/runtime/handlers/sse/connect.cjs +2 -0
  300. package/dist/runtime/handlers/sse/connect.cjs.map +1 -1
  301. package/dist/runtime/handlers/sse/connect.mjs +2 -0
  302. package/dist/runtime/handlers/sse/connect.mjs.map +1 -1
  303. package/dist/runtime/handlers/sse/run.cjs +5 -2
  304. package/dist/runtime/handlers/sse/run.cjs.map +1 -1
  305. package/dist/runtime/handlers/sse/run.mjs +5 -2
  306. package/dist/runtime/handlers/sse/run.mjs.map +1 -1
  307. package/dist/runtime/index.d.cts +13 -18
  308. package/dist/runtime/index.d.mts +13 -18
  309. package/dist/runtime/intelligence-platform/analytics-context.cjs +84 -0
  310. package/dist/runtime/intelligence-platform/analytics-context.cjs.map +1 -0
  311. package/dist/runtime/intelligence-platform/analytics-context.mjs +83 -0
  312. package/dist/runtime/intelligence-platform/analytics-context.mjs.map +1 -0
  313. package/dist/runtime/intelligence-platform/client.cjs +30 -4
  314. package/dist/runtime/intelligence-platform/client.cjs.map +1 -1
  315. package/dist/runtime/intelligence-platform/client.d.cts +25 -2
  316. package/dist/runtime/intelligence-platform/client.d.cts.map +1 -1
  317. package/dist/runtime/intelligence-platform/client.d.mts +25 -2
  318. package/dist/runtime/intelligence-platform/client.d.mts.map +1 -1
  319. package/dist/runtime/intelligence-platform/client.mjs +30 -3
  320. package/dist/runtime/intelligence-platform/client.mjs.map +1 -1
  321. package/dist/runtime/intelligence-platform/learning-management.cjs +7 -8
  322. package/dist/runtime/intelligence-platform/learning-management.cjs.map +1 -1
  323. package/dist/runtime/intelligence-platform/learning-management.mjs +7 -7
  324. package/dist/runtime/intelligence-platform/learning-management.mjs.map +1 -1
  325. package/dist/runtime/intelligence-platform/skill-registry/archive.cjs +104 -110
  326. package/dist/runtime/intelligence-platform/skill-registry/archive.cjs.map +1 -1
  327. package/dist/runtime/intelligence-platform/skill-registry/archive.d.cts +8 -2
  328. package/dist/runtime/intelligence-platform/skill-registry/archive.d.cts.map +1 -1
  329. package/dist/runtime/intelligence-platform/skill-registry/archive.d.mts +8 -2
  330. package/dist/runtime/intelligence-platform/skill-registry/archive.d.mts.map +1 -1
  331. package/dist/runtime/intelligence-platform/skill-registry/archive.mjs +104 -109
  332. package/dist/runtime/intelligence-platform/skill-registry/archive.mjs.map +1 -1
  333. package/dist/runtime/intelligence-platform/skill-registry/config.cjs +0 -1
  334. package/dist/runtime/intelligence-platform/skill-registry/config.cjs.map +1 -1
  335. package/dist/runtime/intelligence-platform/skill-registry/index.d.cts +1 -1
  336. package/dist/runtime/intelligence-platform/skill-registry/index.d.mts +1 -1
  337. package/dist/runtime/intelligence-platform/skill-registry/registry.cjs +22 -19
  338. package/dist/runtime/intelligence-platform/skill-registry/registry.cjs.map +1 -1
  339. package/dist/runtime/intelligence-platform/skill-registry/registry.d.cts.map +1 -1
  340. package/dist/runtime/intelligence-platform/skill-registry/registry.d.mts.map +1 -1
  341. package/dist/runtime/intelligence-platform/skill-registry/registry.mjs +22 -19
  342. package/dist/runtime/intelligence-platform/skill-registry/registry.mjs.map +1 -1
  343. package/dist/runtime/intelligence-platform/stop-run.cjs +50 -0
  344. package/dist/runtime/intelligence-platform/stop-run.cjs.map +1 -0
  345. package/dist/runtime/intelligence-platform/stop-run.mjs +50 -0
  346. package/dist/runtime/intelligence-platform/stop-run.mjs.map +1 -0
  347. package/dist/runtime/intelligence-platform/thread-lock-heartbeat.cjs +3 -3
  348. package/dist/runtime/intelligence-platform/thread-lock-heartbeat.cjs.map +1 -1
  349. package/dist/runtime/intelligence-platform/thread-lock-heartbeat.mjs +2 -1
  350. package/dist/runtime/intelligence-platform/thread-lock-heartbeat.mjs.map +1 -1
  351. package/dist/runtime/intelligence-platform/trajectories.cjs +2 -3
  352. package/dist/runtime/intelligence-platform/trajectories.cjs.map +1 -1
  353. package/dist/runtime/intelligence-platform/trajectories.mjs +2 -2
  354. package/dist/runtime/intelligence-platform/trajectories.mjs.map +1 -1
  355. package/dist/runtime/node.d.cts +2 -2
  356. package/dist/runtime/node.d.mts +2 -2
  357. package/dist/runtime/runner/agent-runner.cjs +0 -1
  358. package/dist/runtime/runner/agent-runner.cjs.map +1 -1
  359. package/dist/runtime/runner/agent-runner.d.cts +9 -0
  360. package/dist/runtime/runner/agent-runner.d.cts.map +1 -1
  361. package/dist/runtime/runner/agent-runner.d.mts +9 -0
  362. package/dist/runtime/runner/agent-runner.d.mts.map +1 -1
  363. package/dist/runtime/runner/agent-runner.mjs.map +1 -1
  364. package/dist/runtime/runner/in-memory.cjs +0 -1
  365. package/dist/runtime/runner/in-memory.cjs.map +1 -1
  366. package/dist/runtime/runner/index.d.cts +1 -1
  367. package/dist/runtime/runner/index.d.mts +1 -1
  368. package/dist/runtime/runner/index.mjs +1 -1
  369. package/dist/runtime/runner/intelligence.cjs +55 -9
  370. package/dist/runtime/runner/intelligence.cjs.map +1 -1
  371. package/dist/runtime/runner/intelligence.d.cts +12 -1
  372. package/dist/runtime/runner/intelligence.d.cts.map +1 -1
  373. package/dist/runtime/runner/intelligence.d.mts +12 -1
  374. package/dist/runtime/runner/intelligence.d.mts.map +1 -1
  375. package/dist/runtime/runner/intelligence.mjs +56 -10
  376. package/dist/runtime/runner/intelligence.mjs.map +1 -1
  377. package/dist/runtime/telemetry/disclosure.cjs +2 -3
  378. package/dist/runtime/telemetry/disclosure.cjs.map +1 -1
  379. package/dist/runtime/telemetry/disclosure.mjs +3 -3
  380. package/dist/runtime/telemetry/disclosure.mjs.map +1 -1
  381. package/dist/runtime/telemetry/events.d.cts +1 -1
  382. package/dist/runtime/telemetry/events.d.mts +1 -1
  383. package/dist/runtime/telemetry/instance-created.cjs +33 -12
  384. package/dist/runtime/telemetry/instance-created.cjs.map +1 -1
  385. package/dist/runtime/telemetry/instance-created.mjs +33 -12
  386. package/dist/runtime/telemetry/instance-created.mjs.map +1 -1
  387. package/dist/runtime/telemetry/telemetry-client.cjs +0 -5
  388. package/dist/runtime/telemetry/telemetry-client.cjs.map +1 -1
  389. package/dist/runtime/telemetry/telemetry-client.mjs +0 -4
  390. package/dist/runtime/telemetry/telemetry-client.mjs.map +1 -1
  391. package/dist/runtime/telemetry/telemetry-identity.cjs +0 -1
  392. package/dist/runtime/telemetry/telemetry-identity.cjs.map +1 -1
  393. package/dist/v2/index.d.cts +242 -0
  394. package/dist/v2/index.d.mts +242 -0
  395. package/dist/v2/node.d.cts +18 -0
  396. package/dist/v2/node.d.mts +18 -0
  397. package/package.json +84 -29
  398. package/dist/_virtual/_rolldown/runtime.cjs +0 -29
  399. package/dist/agent/converters/index.d.mts +0 -2
  400. package/dist/agent/index.cjs +0 -1328
  401. package/dist/agent/index.cjs.map +0 -1
  402. package/dist/agent/index.d.cts +0 -467
  403. package/dist/agent/index.d.cts.map +0 -1
  404. package/dist/agent/index.d.mts +0 -468
  405. package/dist/agent/index.d.mts.map +0 -1
  406. package/dist/agent/index.mjs +0 -1318
  407. package/dist/agent/index.mjs.map +0 -1
  408. package/dist/agent/mcp-tool-names.cjs +0 -82
  409. package/dist/agent/mcp-tool-names.cjs.map +0 -1
  410. package/dist/agent/mcp-tool-names.mjs +0 -80
  411. package/dist/agent/mcp-tool-names.mjs.map +0 -1
  412. package/dist/agent/url-download.cjs.map +0 -1
  413. package/dist/agent/url-download.d.cts.map +0 -1
  414. package/dist/agent/url-download.d.mts.map +0 -1
  415. package/dist/agent/url-download.mjs.map +0 -1
  416. package/dist/runtime/index.d.cts.map +0 -1
  417. package/dist/runtime/index.d.mts.map +0 -1
@@ -1,11 +1,10 @@
1
- import { CopilotRuntimeFetchHandler } from "../core/fetch-handler.cjs";
1
+ import { CopilotKitRuntimeLogger } from "../core/logger.cjs";
2
+ import { CopilotKitRuntimeFetchHandler } from "../core/fetch-handler.cjs";
2
3
  import { IncomingMessage, ServerResponse } from "node:http";
3
4
 
4
5
  //#region src/runtime/endpoints/node-fetch-handler.d.ts
5
6
  type NodeFetchHandler = (req: IncomingMessage, res: ServerResponse) => Promise<void>;
6
- declare function createCopilotNodeHandler(handler: CopilotRuntimeFetchHandler): NodeFetchHandler;
7
- /** @deprecated Use `createCopilotNodeHandler` instead. */
8
- declare const createNodeFetchHandler: typeof createCopilotNodeHandler;
7
+ declare function createCopilotKitNodeHandler(handler: CopilotKitRuntimeFetchHandler, logger?: CopilotKitRuntimeLogger): NodeFetchHandler;
9
8
  //#endregion
10
- export { NodeFetchHandler, createCopilotNodeHandler, createNodeFetchHandler };
9
+ export { NodeFetchHandler, createCopilotKitNodeHandler };
11
10
  //# sourceMappingURL=node-fetch-handler.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-fetch-handler.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":";;;;KAkCY,gBAAA,IACV,GAAA,EAAK,eAAA,EACL,GAAA,EAAK,cAAA,KACF,OAAA;AAAA,iBAEW,wBAAA,CACd,OAAA,EAAS,0BAAA,GACR,gBAAA;;cAqBU,sBAAA,SAAsB,wBAAA"}
1
+ {"version":3,"file":"node-fetch-handler.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":";;;;;KAmCY,gBAAA,IACV,GAAA,EAAK,eAAA,EACL,GAAA,EAAK,cAAA,KACF,OAAA;AAAA,iBAEW,2BAAA,CACd,OAAA,EAAS,6BAAA,EACT,MAAA,GAAQ,uBAAA,GACP,gBAAA"}
@@ -1,11 +1,10 @@
1
- import { CopilotRuntimeFetchHandler } from "../core/fetch-handler.mjs";
1
+ import { CopilotKitRuntimeLogger } from "../core/logger.mjs";
2
+ import { CopilotKitRuntimeFetchHandler } from "../core/fetch-handler.mjs";
2
3
  import { IncomingMessage, ServerResponse } from "node:http";
3
4
 
4
5
  //#region src/runtime/endpoints/node-fetch-handler.d.ts
5
6
  type NodeFetchHandler = (req: IncomingMessage, res: ServerResponse) => Promise<void>;
6
- declare function createCopilotNodeHandler(handler: CopilotRuntimeFetchHandler): NodeFetchHandler;
7
- /** @deprecated Use `createCopilotNodeHandler` instead. */
8
- declare const createNodeFetchHandler: typeof createCopilotNodeHandler;
7
+ declare function createCopilotKitNodeHandler(handler: CopilotKitRuntimeFetchHandler, logger?: CopilotKitRuntimeLogger): NodeFetchHandler;
9
8
  //#endregion
10
- export { NodeFetchHandler, createCopilotNodeHandler, createNodeFetchHandler };
9
+ export { NodeFetchHandler, createCopilotKitNodeHandler };
11
10
  //# sourceMappingURL=node-fetch-handler.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-fetch-handler.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":";;;;KAkCY,gBAAA,IACV,GAAA,EAAK,eAAA,EACL,GAAA,EAAK,cAAA,KACF,OAAA;AAAA,iBAEW,wBAAA,CACd,OAAA,EAAS,0BAAA,GACR,gBAAA;;cAqBU,sBAAA,SAAsB,wBAAA"}
1
+ {"version":3,"file":"node-fetch-handler.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":";;;;;KAmCY,gBAAA,IACV,GAAA,EAAK,eAAA,EACL,GAAA,EAAK,cAAA,KACF,OAAA;AAAA,iBAEW,2BAAA,CACd,OAAA,EAAS,6BAAA,EACT,MAAA,GAAQ,uBAAA,GACP,gBAAA"}
@@ -1,4 +1,4 @@
1
- import { logger } from "@copilotkit/shared";
1
+ import { getRuntimeLogger } from "../core/logger.mjs";
2
2
  import { createHeaders, createRequest, sendResponse } from "@remix-run/node-fetch-server";
3
3
 
4
4
  //#region src/runtime/endpoints/node-fetch-handler.ts
@@ -7,7 +7,7 @@ const METHODS_WITHOUT_BODY = new Set([
7
7
  "HEAD",
8
8
  "OPTIONS"
9
9
  ]);
10
- function createCopilotNodeHandler(handler) {
10
+ function createCopilotKitNodeHandler(handler, logger = getRuntimeLogger()) {
11
11
  return async (req, res) => {
12
12
  try {
13
13
  const method = (req.method ?? "GET").toUpperCase();
@@ -21,8 +21,6 @@ function createCopilotNodeHandler(handler) {
21
21
  }
22
22
  };
23
23
  }
24
- /** @deprecated Use `createCopilotNodeHandler` instead. */
25
- const createNodeFetchHandler = createCopilotNodeHandler;
26
24
  /**
27
25
  * Build a Fetch Request from a Node IncomingMessage whose body stream has
28
26
  * already been consumed by a body parser.
@@ -69,5 +67,5 @@ function synthesizeBody(body) {
69
67
  }
70
68
 
71
69
  //#endregion
72
- export { createCopilotNodeHandler, createNodeFetchHandler };
70
+ export { createCopilotKitNodeHandler };
73
71
  //# sourceMappingURL=node-fetch-handler.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"node-fetch-handler.mjs","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"sourcesContent":["/**\n * Generic Node ↔ Fetch bridge for CopilotKit runtime.\n *\n * Wraps a `CopilotRuntimeFetchHandler` as a Node HTTP handler using\n * `@remix-run/node-fetch-server` for reliable streaming and conversion.\n *\n * When body-parsing middleware (Express `express.json()`, NestJS's default\n * parser, …) runs first, the Node request stream is already consumed and\n * `req.body` holds the parsed content. Reading the exhausted stream would hang,\n * so that case re-serialises `req.body` into the Fetch `Request` instead.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { createCopilotRuntimeHandler } from \"@copilotkit/runtime\";\n * import { createCopilotNodeHandler } from \"@copilotkit/runtime/node\";\n *\n * const handler = createCopilotRuntimeHandler({ runtime, basePath: \"/api/copilotkit\", cors: true });\n * const nodeHandler = createCopilotNodeHandler(handler);\n * createServer(nodeHandler).listen(3000);\n * ```\n */\n\nimport type { IncomingMessage, ServerResponse } from \"node:http\";\nimport {\n createHeaders,\n createRequest,\n sendResponse,\n} from \"@remix-run/node-fetch-server\";\nimport type { CopilotRuntimeFetchHandler } from \"../core/fetch-handler\";\nimport { logger } from \"@copilotkit/shared\";\n\nconst METHODS_WITHOUT_BODY = new Set([\"GET\", \"HEAD\", \"OPTIONS\"]);\n\nexport type NodeFetchHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n) => Promise<void>;\n\nexport function createCopilotNodeHandler(\n handler: CopilotRuntimeFetchHandler,\n): NodeFetchHandler {\n return async (req: IncomingMessage, res: ServerResponse) => {\n try {\n const method = (req.method ?? \"GET\").toUpperCase();\n const fetchReq =\n !METHODS_WITHOUT_BODY.has(method) && hasPreParsedBody(req)\n ? buildPreParsedRequest(req, res)\n : createRequest(req, res);\n const fetchRes = await handler(fetchReq);\n await sendResponse(res, fetchRes);\n } catch (err: unknown) {\n logger.error({ err }, \"Error in Node fetch handler\");\n if (!res.headersSent) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n }\n };\n}\n\n/** @deprecated Use `createCopilotNodeHandler` instead. */\nexport const createNodeFetchHandler = createCopilotNodeHandler;\n\n/**\n * Build a Fetch Request from a Node IncomingMessage whose body stream has\n * already been consumed by a body parser.\n *\n * The URL, headers and abort wiring match `createRequest` (the streaming path),\n * so a request routes the same way whether or not a parser ran first. In\n * particular the URL comes from `req.url`, which is what a mounting router\n * matched against; `originalUrl` still carries the mount prefix and would miss\n * the handler's `basePath`.\n */\nfunction buildPreParsedRequest(\n req: IncomingMessage & { body?: unknown },\n res: ServerResponse,\n): Request {\n const method = (req.method ?? \"GET\").toUpperCase();\n const headers = createHeaders(req);\n const protocol =\n \"encrypted\" in req.socket && req.socket.encrypted ? \"https:\" : \"http:\";\n const host = headers.get(\"host\") ?? \"localhost\";\n const url = new URL(req.url ?? \"/\", `${protocol}//${host}`);\n\n // Wire an AbortSignal so client disconnects propagate to the fetch handler\n const controller = new AbortController();\n res.on(\"close\", () => {\n if (!res.writableFinished) controller.abort();\n });\n\n const init: RequestInit = {\n method,\n headers,\n signal: controller.signal,\n };\n\n const { body, contentType } = synthesizeBody(req.body);\n if (contentType) {\n headers.set(\"content-type\", contentType);\n }\n headers.delete(\"content-length\");\n if (body !== undefined) {\n init.body = body;\n }\n\n return new Request(url, init);\n}\n\nfunction hasPreParsedBody(req: IncomingMessage & { body?: unknown }): boolean {\n if (req.body === undefined || req.body === null) return false;\n\n // Only `readableEnded` means \"a parser drained this stream to its end\".\n // `req.complete` and the private `_readableState.ended` are set by the HTTP\n // parser once the socket has all the bytes, whether or not anything read them.\n //\n // That distinction matters because `req.body` being set does not prove a parser\n // ran: body-parser 1.x (Express 4) assigns `req.body = req.body || {}` before\n // its own content-type checks, so a request it declines to parse — multipart\n // upload, text/plain — reaches us with `req.body === {}` and a full, unread\n // stream. Treating that as pre-parsed rebuilt the request from `{}` and\n // dropped the real payload.\n return Boolean(req.readableEnded);\n}\n\nfunction synthesizeBody(body: unknown): {\n body?: BodyInit;\n contentType?: string;\n} {\n if (Buffer.isBuffer(body) || body instanceof Uint8Array) {\n // Buffer/Uint8Array<ArrayBufferLike> are valid fetch bodies at runtime,\n // but the DOM lib's BodyInit only admits ArrayBuffer-backed views.\n return { body: body as BodyInit };\n }\n if (typeof body === \"string\") {\n return { body };\n }\n if (typeof body === \"object\" && body !== null) {\n return { body: JSON.stringify(body), contentType: \"application/json\" };\n }\n return {};\n}\n"],"mappings":";;;;AAgCA,MAAM,uBAAuB,IAAI,IAAI;CAAC;CAAO;CAAQ;CAAU,CAAC;AAOhE,SAAgB,yBACd,SACkB;AAClB,QAAO,OAAO,KAAsB,QAAwB;AAC1D,MAAI;GACF,MAAM,UAAU,IAAI,UAAU,OAAO,aAAa;AAMlD,SAAM,aAAa,KADF,MAAM,QAHrB,CAAC,qBAAqB,IAAI,OAAO,IAAI,iBAAiB,IAAI,GACtD,sBAAsB,KAAK,IAAI,GAC/B,cAAc,KAAK,IAAI,CACW,CACP;WAC1B,KAAc;AACrB,UAAO,MAAM,EAAE,KAAK,EAAE,8BAA8B;AACpD,OAAI,CAAC,IAAI,aAAa;AACpB,QAAI,aAAa;AACjB,QAAI,IAAI,wBAAwB;;;;;;AAOxC,MAAa,yBAAyB;;;;;;;;;;;AAYtC,SAAS,sBACP,KACA,KACS;CACT,MAAM,UAAU,IAAI,UAAU,OAAO,aAAa;CAClD,MAAM,UAAU,cAAc,IAAI;CAClC,MAAM,WACJ,eAAe,IAAI,UAAU,IAAI,OAAO,YAAY,WAAW;CACjE,MAAM,OAAO,QAAQ,IAAI,OAAO,IAAI;CACpC,MAAM,MAAM,IAAI,IAAI,IAAI,OAAO,KAAK,GAAG,SAAS,IAAI,OAAO;CAG3D,MAAM,aAAa,IAAI,iBAAiB;AACxC,KAAI,GAAG,eAAe;AACpB,MAAI,CAAC,IAAI,iBAAkB,YAAW,OAAO;GAC7C;CAEF,MAAM,OAAoB;EACxB;EACA;EACA,QAAQ,WAAW;EACpB;CAED,MAAM,EAAE,MAAM,gBAAgB,eAAe,IAAI,KAAK;AACtD,KAAI,YACF,SAAQ,IAAI,gBAAgB,YAAY;AAE1C,SAAQ,OAAO,iBAAiB;AAChC,KAAI,SAAS,OACX,MAAK,OAAO;AAGd,QAAO,IAAI,QAAQ,KAAK,KAAK;;AAG/B,SAAS,iBAAiB,KAAoD;AAC5E,KAAI,IAAI,SAAS,UAAa,IAAI,SAAS,KAAM,QAAO;AAYxD,QAAO,QAAQ,IAAI,cAAc;;AAGnC,SAAS,eAAe,MAGtB;AACA,KAAI,OAAO,SAAS,KAAK,IAAI,gBAAgB,WAG3C,QAAO,EAAQ,MAAkB;AAEnC,KAAI,OAAO,SAAS,SAClB,QAAO,EAAE,MAAM;AAEjB,KAAI,OAAO,SAAS,YAAY,SAAS,KACvC,QAAO;EAAE,MAAM,KAAK,UAAU,KAAK;EAAE,aAAa;EAAoB;AAExE,QAAO,EAAE"}
1
+ {"version":3,"file":"node-fetch-handler.mjs","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"sourcesContent":["/**\n * Generic Node ↔ Fetch bridge for CopilotKit runtime.\n *\n * Wraps a `CopilotKitRuntimeFetchHandler` as a Node HTTP handler using\n * `@remix-run/node-fetch-server` for reliable streaming and conversion.\n *\n * When body-parsing middleware (Express `express.json()`, NestJS's default\n * parser, …) runs first, the Node request stream is already consumed and\n * `req.body` holds the parsed content. Reading the exhausted stream would hang,\n * so that case re-serialises `req.body` into the Fetch `Request` instead.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { createCopilotKitRuntimeHandler } from \"@copilotkit/runtime\";\n * import { createCopilotKitNodeHandler } from \"@copilotkit/runtime/node\";\n *\n * const handler = createCopilotKitRuntimeHandler({ runtime, basePath: \"/api/copilotkit\", cors: true });\n * const nodeHandler = createCopilotKitNodeHandler(handler);\n * createServer(nodeHandler).listen(3000);\n * ```\n */\n\nimport type { IncomingMessage, ServerResponse } from \"node:http\";\nimport {\n createHeaders,\n createRequest,\n sendResponse,\n} from \"@remix-run/node-fetch-server\";\nimport type { CopilotKitRuntimeFetchHandler } from \"../core/fetch-handler\";\nimport { getRuntimeLogger } from \"../core/logger\";\nimport type { CopilotKitRuntimeLogger } from \"../core/logger\";\n\nconst METHODS_WITHOUT_BODY = new Set([\"GET\", \"HEAD\", \"OPTIONS\"]);\n\nexport type NodeFetchHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n) => Promise<void>;\n\nexport function createCopilotKitNodeHandler(\n handler: CopilotKitRuntimeFetchHandler,\n logger: CopilotKitRuntimeLogger = getRuntimeLogger(),\n): NodeFetchHandler {\n return async (req: IncomingMessage, res: ServerResponse) => {\n try {\n const method = (req.method ?? \"GET\").toUpperCase();\n const fetchReq =\n !METHODS_WITHOUT_BODY.has(method) && hasPreParsedBody(req)\n ? buildPreParsedRequest(req, res)\n : createRequest(req, res);\n const fetchRes = await handler(fetchReq);\n await sendResponse(res, fetchRes);\n } catch (err: unknown) {\n logger.error({ err }, \"Error in Node fetch handler\");\n if (!res.headersSent) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n }\n };\n}\n\n/**\n * Build a Fetch Request from a Node IncomingMessage whose body stream has\n * already been consumed by a body parser.\n *\n * The URL, headers and abort wiring match `createRequest` (the streaming path),\n * so a request routes the same way whether or not a parser ran first. In\n * particular the URL comes from `req.url`, which is what a mounting router\n * matched against; `originalUrl` still carries the mount prefix and would miss\n * the handler's `basePath`.\n */\nfunction buildPreParsedRequest(\n req: IncomingMessage & { body?: unknown },\n res: ServerResponse,\n): Request {\n const method = (req.method ?? \"GET\").toUpperCase();\n const headers = createHeaders(req);\n const protocol =\n \"encrypted\" in req.socket && req.socket.encrypted ? \"https:\" : \"http:\";\n const host = headers.get(\"host\") ?? \"localhost\";\n const url = new URL(req.url ?? \"/\", `${protocol}//${host}`);\n\n // Wire an AbortSignal so client disconnects propagate to the fetch handler\n const controller = new AbortController();\n res.on(\"close\", () => {\n if (!res.writableFinished) controller.abort();\n });\n\n const init: RequestInit = {\n method,\n headers,\n signal: controller.signal,\n };\n\n const { body, contentType } = synthesizeBody(req.body);\n if (contentType) {\n headers.set(\"content-type\", contentType);\n }\n headers.delete(\"content-length\");\n if (body !== undefined) {\n init.body = body;\n }\n\n return new Request(url, init);\n}\n\nfunction hasPreParsedBody(req: IncomingMessage & { body?: unknown }): boolean {\n if (req.body === undefined || req.body === null) return false;\n\n // Only `readableEnded` means \"a parser drained this stream to its end\".\n // `req.complete` and the private `_readableState.ended` are set by the HTTP\n // parser once the socket has all the bytes, whether or not anything read them.\n //\n // That distinction matters because `req.body` being set does not prove a parser\n // ran: body-parser 1.x (Express 4) assigns `req.body = req.body || {}` before\n // its own content-type checks, so a request it declines to parse — multipart\n // upload, text/plain — reaches us with `req.body === {}` and a full, unread\n // stream. Treating that as pre-parsed rebuilt the request from `{}` and\n // dropped the real payload.\n return Boolean(req.readableEnded);\n}\n\nfunction synthesizeBody(body: unknown): {\n body?: BodyInit;\n contentType?: string;\n} {\n if (Buffer.isBuffer(body) || body instanceof Uint8Array) {\n // Buffer/Uint8Array<ArrayBufferLike> are valid fetch bodies at runtime,\n // but the DOM lib's BodyInit only admits ArrayBuffer-backed views.\n return { body: body as BodyInit };\n }\n if (typeof body === \"string\") {\n return { body };\n }\n if (typeof body === \"object\" && body !== null) {\n return { body: JSON.stringify(body), contentType: \"application/json\" };\n }\n return {};\n}\n"],"mappings":";;;;AAiCA,MAAM,uBAAuB,IAAI,IAAI;CAAC;CAAO;CAAQ;CAAU,CAAC;AAOhE,SAAgB,4BACd,SACA,SAAkC,kBAAkB,EAClC;AAClB,QAAO,OAAO,KAAsB,QAAwB;AAC1D,MAAI;GACF,MAAM,UAAU,IAAI,UAAU,OAAO,aAAa;AAMlD,SAAM,aAAa,KADF,MAAM,QAHrB,CAAC,qBAAqB,IAAI,OAAO,IAAI,iBAAiB,IAAI,GACtD,sBAAsB,KAAK,IAAI,GAC/B,cAAc,KAAK,IAAI,CACW,CACP;WAC1B,KAAc;AACrB,UAAO,MAAM,EAAE,KAAK,EAAE,8BAA8B;AACpD,OAAI,CAAC,IAAI,aAAa;AACpB,QAAI,aAAa;AACjB,QAAI,IAAI,wBAAwB;;;;;;;;;;;;;;;AAgBxC,SAAS,sBACP,KACA,KACS;CACT,MAAM,UAAU,IAAI,UAAU,OAAO,aAAa;CAClD,MAAM,UAAU,cAAc,IAAI;CAClC,MAAM,WACJ,eAAe,IAAI,UAAU,IAAI,OAAO,YAAY,WAAW;CACjE,MAAM,OAAO,QAAQ,IAAI,OAAO,IAAI;CACpC,MAAM,MAAM,IAAI,IAAI,IAAI,OAAO,KAAK,GAAG,SAAS,IAAI,OAAO;CAG3D,MAAM,aAAa,IAAI,iBAAiB;AACxC,KAAI,GAAG,eAAe;AACpB,MAAI,CAAC,IAAI,iBAAkB,YAAW,OAAO;GAC7C;CAEF,MAAM,OAAoB;EACxB;EACA;EACA,QAAQ,WAAW;EACpB;CAED,MAAM,EAAE,MAAM,gBAAgB,eAAe,IAAI,KAAK;AACtD,KAAI,YACF,SAAQ,IAAI,gBAAgB,YAAY;AAE1C,SAAQ,OAAO,iBAAiB;AAChC,KAAI,SAAS,OACX,MAAK,OAAO;AAGd,QAAO,IAAI,QAAQ,KAAK,KAAK;;AAG/B,SAAS,iBAAiB,KAAoD;AAC5E,KAAI,IAAI,SAAS,UAAa,IAAI,SAAS,KAAM,QAAO;AAYxD,QAAO,QAAQ,IAAI,cAAc;;AAGnC,SAAS,eAAe,MAGtB;AACA,KAAI,OAAO,SAAS,KAAK,IAAI,gBAAgB,WAG3C,QAAO,EAAQ,MAAkB;AAEnC,KAAI,OAAO,SAAS,SAClB,QAAO,EAAE,MAAM;AAEjB,KAAI,OAAO,SAAS,YAAY,SAAS,KACvC,QAAO;EAAE,MAAM,KAAK,UAAU,KAAK;EAAE,aAAa;EAAoB;AAExE,QAAO,EAAE"}
@@ -1,16 +1,18 @@
1
+ const require_logger = require('../core/logger.cjs');
1
2
  const require_fetch_handler = require('../core/fetch-handler.cjs');
2
3
  const require_node_fetch_handler = require('./node-fetch-handler.cjs');
3
4
  const require_auto_start_channels = require('./auto-start-channels.cjs');
4
5
 
5
6
  //#region src/runtime/endpoints/node.ts
6
- function createCopilotNodeListener(options) {
7
- const handler = require_fetch_handler.createCopilotRuntimeHandler(options);
8
- const listener = require_node_fetch_handler.createCopilotNodeHandler(handler);
7
+ function createCopilotKitNodeListener(options) {
8
+ const handler = require_fetch_handler.createCopilotKitRuntimeHandler(options);
9
+ const logger = require_logger.getRuntimeLogger(options.runtime);
10
+ const listener = require_node_fetch_handler.createCopilotKitNodeHandler(handler, logger);
9
11
  listener.channels = handler.channels;
10
- require_auto_start_channels.autoStartChannels(listener.channels);
12
+ require_auto_start_channels.autoStartChannels(listener.channels, logger);
11
13
  return listener;
12
14
  }
13
15
 
14
16
  //#endregion
15
- exports.createCopilotNodeListener = createCopilotNodeListener;
17
+ exports.createCopilotKitNodeListener = createCopilotKitNodeListener;
16
18
  //# sourceMappingURL=node.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.cjs","names":["createCopilotRuntimeHandler","createCopilotNodeHandler"],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import { createCopilotRuntimeHandler } from \"../core/fetch-handler\";\nimport type { CopilotRuntimeHandlerOptions } from \"../core/fetch-handler\";\nimport type { RuntimeWithDeclaredChannels } from \"../core/runtime\";\nimport type { ChannelsControl } from \"../core/channel-manager\";\nimport { createCopilotNodeHandler } from \"./node-fetch-handler\";\nimport type { NodeFetchHandler } from \"./node-fetch-handler\";\nimport { autoStartChannels } from \"./auto-start-channels\";\n\n/**\n * A Node.js HTTP request listener that is also a callable object carrying an\n * optional {@link ChannelsControl} surface, mirroring\n * `CopilotRuntimeFetchHandler.channels`. Node is the long-running,\n * lifecycle-owning entry point for the runtime, so it is the surface that\n * exposes `.channels` for callers that need to observe or stop the managed\n * Channel activation the listener starts at creation.\n */\nexport type NodeCopilotListener = NodeFetchHandler & {\n channels?: ChannelsControl;\n};\n\n/**\n * A {@link NodeCopilotListener} whose {@link ChannelsControl} surface is\n * guaranteed present. Returned when the runtime was constructed with at least\n * one declared Intelligence Channel and activation was not opted out of, so the\n * documented `listener.channels.ready(...)` call type-checks without a `!` or a\n * `?.` under strict TypeScript — the Node mirror of\n * `CopilotRuntimeFetchHandlerWithChannels`.\n */\nexport type NodeCopilotListenerWithChannels = NodeFetchHandler & {\n /** Lifecycle control surface for the runtime's declared managed Channels. */\n channels: ChannelsControl;\n};\n\n/**\n * Convenience wrapper for creating a Node.js HTTP request listener\n * from CopilotKit runtime handler options.\n *\n * When the runtime declares managed Channels (and activation was not opted\n * out of via `activateChannels: false`), the returned listener exposes\n * `.channels` — the same {@link ChannelsControl} surface carried by the\n * underlying fetch handler.\n *\n * ## Managed Channels lifecycle\n *\n * Creating the listener STARTS activation — which opens the persistent Realtime\n * Gateway WebSocket and starts every direct adapter on the declared Channels.\n * Node owns its own process lifetime, so there is nothing to defer to and no\n * required incantation: a declared Channel connects because it was declared.\n * (The generic `createCopilotRuntimeHandler` is the opposite — it stays lazy for\n * serverless/edge safety; see its TSDoc.)\n *\n * `await listener.channels.ready()` is therefore OPTIONAL and purely\n * await-and-observe: it resolves once every declared Channel has settled to\n * `online`/`setup_required` and rejects with the activation failure, observing\n * the activation started at creation rather than triggering a second one. Await\n * it when startup should block on Channels being live (or should exit non-zero\n * when they are not); skip it and activation failures land in the logs instead.\n * `listener.channels.stop()` tears activation down.\n *\n * Pass `activateChannels: false` to build no control surface and open no socket\n * — the clean opt-out for a test or a short-lived script that mounts the\n * listener without wanting its Channels connected.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { CopilotRuntime } from \"@copilotkit/runtime\";\n * import { createCopilotNodeListener } from \"@copilotkit/runtime/node\";\n *\n * const listener = createCopilotNodeListener({\n * runtime: new CopilotRuntime({ agents: { ... } }),\n * basePath: \"/api/copilotkit\",\n * cors: true,\n * });\n * createServer(listener).listen(3000);\n * // Declared managed Channels are already connecting at this point.\n *\n * // Optional: block startup on them being live. Bound it so one wedged adapter\n * // cannot hang startup forever.\n * await listener.channels.ready({ timeoutMs: 30_000 });\n * ```\n */\n/**\n * Overload: a runtime constructed with at least one declared Intelligence\n * Channel (a {@link RuntimeWithDeclaredChannels}-branded runtime), when\n * activation is not disabled, yields a listener with a **non-optional**\n * {@link ChannelsControl}. `activateChannels` is constrained to\n * `true | undefined` here so passing `activateChannels: false` (which leaves no\n * `.channels`) falls through to the optional-shape overload below rather than\n * dishonestly promising a control surface that will not exist. Mirrors the\n * `createCopilotRuntimeHandler` overload pair so the brand survives the wrapper.\n *\n * The brand comes from constructing the runtime with a literal non-empty\n * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a\n * dynamically-assembled `Channel[]` is not branded, so it falls to the\n * optional-shape overload and its call sites still need `?.`.\n */\nexport function createCopilotNodeListener(\n options: CopilotRuntimeHandlerOptions & {\n runtime: RuntimeWithDeclaredChannels;\n activateChannels?: true | undefined;\n },\n): NodeCopilotListenerWithChannels;\n/**\n * Overload: every other runtime (SSE, Intelligence without channels, or with\n * activation disabled) yields a listener whose `.channels` is optional.\n */\nexport function createCopilotNodeListener(\n options: CopilotRuntimeHandlerOptions,\n): NodeCopilotListener;\nexport function createCopilotNodeListener(\n options: CopilotRuntimeHandlerOptions,\n): NodeCopilotListener {\n const handler = createCopilotRuntimeHandler(options);\n const listener: NodeCopilotListener = createCopilotNodeHandler(handler);\n listener.channels = handler.channels;\n autoStartChannels(listener.channels);\n return listener;\n}\n"],"mappings":";;;;;AA8GA,SAAgB,0BACd,SACqB;CACrB,MAAM,UAAUA,kDAA4B,QAAQ;CACpD,MAAM,WAAgCC,oDAAyB,QAAQ;AACvE,UAAS,WAAW,QAAQ;AAC5B,+CAAkB,SAAS,SAAS;AACpC,QAAO"}
1
+ {"version":3,"file":"node.cjs","names":["createCopilotKitRuntimeHandler","getRuntimeLogger","createCopilotKitNodeHandler"],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import { createCopilotKitRuntimeHandler } from \"../core/fetch-handler\";\nimport type { CopilotKitRuntimeHandlerOptions } from \"../core/fetch-handler\";\nimport type { RuntimeWithDeclaredChannels } from \"../core/runtime\";\nimport type { ChannelsControl } from \"../core/channel-manager\";\nimport { createCopilotKitNodeHandler } from \"./node-fetch-handler\";\nimport type { NodeFetchHandler } from \"./node-fetch-handler\";\nimport { autoStartChannels } from \"./auto-start-channels\";\nimport { getRuntimeLogger } from \"../core/logger\";\n\n/**\n * A Node.js HTTP request listener that is also a callable object carrying an\n * optional {@link ChannelsControl} surface, mirroring\n * `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,\n * lifecycle-owning entry point for the runtime, so it is the surface that\n * exposes `.channels` for callers that need to observe or stop the managed\n * Channel activation the listener starts at creation.\n */\nexport type NodeCopilotKitListener = NodeFetchHandler & {\n channels?: ChannelsControl;\n};\n\n/**\n * A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is\n * guaranteed present. Returned when the runtime was constructed with at least\n * one declared Intelligence Channel and activation was not opted out of, so the\n * documented `listener.channels.ready(...)` call type-checks without a `!` or a\n * `?.` under strict TypeScript — the Node mirror of\n * `CopilotKitRuntimeFetchHandlerWithChannels`.\n */\nexport type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {\n /** Lifecycle control surface for the runtime's declared managed Channels. */\n channels: ChannelsControl;\n};\n\n/**\n * Convenience wrapper for creating a Node.js HTTP request listener\n * from CopilotKit runtime handler options.\n *\n * When the runtime declares managed Channels (and activation was not opted\n * out of via `activateChannels: false`), the returned listener exposes\n * `.channels` — the same {@link ChannelsControl} surface carried by the\n * underlying fetch handler.\n *\n * ## Managed Channels lifecycle\n *\n * Creating the listener STARTS activation — which opens the persistent Realtime\n * Gateway WebSocket and starts every direct adapter on the declared Channels.\n * Node owns its own process lifetime, so there is nothing to defer to and no\n * required incantation: a declared Channel connects because it was declared.\n * (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for\n * serverless/edge safety; see its TSDoc.)\n *\n * `await listener.channels.ready()` is therefore OPTIONAL and purely\n * await-and-observe: it resolves once every declared Channel has settled to\n * `online`/`setup_required` and rejects with the activation failure, observing\n * the activation started at creation rather than triggering a second one. Await\n * it when startup should block on Channels being live (or should exit non-zero\n * when they are not); skip it and activation failures land in the logs instead.\n * `listener.channels.stop()` tears activation down.\n *\n * Pass `activateChannels: false` to build no control surface and open no socket\n * — the clean opt-out for a test or a short-lived script that mounts the\n * listener without wanting its Channels connected.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { CopilotKitRuntime } from \"@copilotkit/runtime\";\n * import { createCopilotKitNodeListener } from \"@copilotkit/runtime/node\";\n *\n * const listener = createCopilotKitNodeListener({\n * runtime: new CopilotKitRuntime({ agents: { ... } }),\n * basePath: \"/api/copilotkit\",\n * cors: true,\n * });\n * createServer(listener).listen(3000);\n * // Declared managed Channels are already connecting at this point.\n *\n * // Optional: block startup on them being live. Bound it so one wedged adapter\n * // cannot hang startup forever.\n * await listener.channels.ready({ timeoutMs: 30_000 });\n * ```\n */\n/**\n * Overload: a runtime constructed with at least one declared Intelligence\n * Channel (a {@link RuntimeWithDeclaredChannels}-branded runtime), when\n * activation is not disabled, yields a listener with a **non-optional**\n * {@link ChannelsControl}. `activateChannels` is constrained to\n * `true | undefined` here so passing `activateChannels: false` (which leaves no\n * `.channels`) falls through to the optional-shape overload below rather than\n * dishonestly promising a control surface that will not exist. Mirrors the\n * `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.\n *\n * The brand comes from constructing the runtime with a literal non-empty\n * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a\n * dynamically-assembled `Channel[]` is not branded, so it falls to the\n * optional-shape overload and its call sites still need `?.`.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions & {\n runtime: RuntimeWithDeclaredChannels;\n activateChannels?: true | undefined;\n },\n): NodeCopilotKitListenerWithChannels;\n/**\n * Overload: every other runtime (SSE, Intelligence without channels, or with\n * activation disabled) yields a listener whose `.channels` is optional.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener;\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener {\n const handler = createCopilotKitRuntimeHandler(options);\n const logger = getRuntimeLogger(options.runtime);\n const listener: NodeCopilotKitListener = createCopilotKitNodeHandler(\n handler,\n logger,\n );\n listener.channels = handler.channels;\n autoStartChannels(listener.channels, logger);\n return listener;\n}\n"],"mappings":";;;;;;AA+GA,SAAgB,6BACd,SACwB;CACxB,MAAM,UAAUA,qDAA+B,QAAQ;CACvD,MAAM,SAASC,gCAAiB,QAAQ,QAAQ;CAChD,MAAM,WAAmCC,uDACvC,SACA,OACD;AACD,UAAS,WAAW,QAAQ;AAC5B,+CAAkB,SAAS,UAAU,OAAO;AAC5C,QAAO"}
@@ -1,29 +1,29 @@
1
1
  import { RuntimeWithDeclaredChannels } from "../core/runtime.cjs";
2
2
  import { ChannelsControl } from "../core/channel-manager.cjs";
3
- import { CopilotRuntimeHandlerOptions } from "../core/fetch-handler.cjs";
3
+ import { CopilotKitRuntimeHandlerOptions } from "../core/fetch-handler.cjs";
4
4
  import { NodeFetchHandler } from "./node-fetch-handler.cjs";
5
5
 
6
6
  //#region src/runtime/endpoints/node.d.ts
7
7
  /**
8
8
  * A Node.js HTTP request listener that is also a callable object carrying an
9
9
  * optional {@link ChannelsControl} surface, mirroring
10
- * `CopilotRuntimeFetchHandler.channels`. Node is the long-running,
10
+ * `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,
11
11
  * lifecycle-owning entry point for the runtime, so it is the surface that
12
12
  * exposes `.channels` for callers that need to observe or stop the managed
13
13
  * Channel activation the listener starts at creation.
14
14
  */
15
- type NodeCopilotListener = NodeFetchHandler & {
15
+ type NodeCopilotKitListener = NodeFetchHandler & {
16
16
  channels?: ChannelsControl;
17
17
  };
18
18
  /**
19
- * A {@link NodeCopilotListener} whose {@link ChannelsControl} surface is
19
+ * A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is
20
20
  * guaranteed present. Returned when the runtime was constructed with at least
21
21
  * one declared Intelligence Channel and activation was not opted out of, so the
22
22
  * documented `listener.channels.ready(...)` call type-checks without a `!` or a
23
23
  * `?.` under strict TypeScript — the Node mirror of
24
- * `CopilotRuntimeFetchHandlerWithChannels`.
24
+ * `CopilotKitRuntimeFetchHandlerWithChannels`.
25
25
  */
26
- type NodeCopilotListenerWithChannels = NodeFetchHandler & {
26
+ type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {
27
27
  /** Lifecycle control surface for the runtime's declared managed Channels. */channels: ChannelsControl;
28
28
  };
29
29
  /**
@@ -41,7 +41,7 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
41
41
  * Gateway WebSocket and starts every direct adapter on the declared Channels.
42
42
  * Node owns its own process lifetime, so there is nothing to defer to and no
43
43
  * required incantation: a declared Channel connects because it was declared.
44
- * (The generic `createCopilotRuntimeHandler` is the opposite — it stays lazy for
44
+ * (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for
45
45
  * serverless/edge safety; see its TSDoc.)
46
46
  *
47
47
  * `await listener.channels.ready()` is therefore OPTIONAL and purely
@@ -59,11 +59,11 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
59
59
  * @example
60
60
  * ```typescript
61
61
  * import { createServer } from "node:http";
62
- * import { CopilotRuntime } from "@copilotkit/runtime";
63
- * import { createCopilotNodeListener } from "@copilotkit/runtime/node";
62
+ * import { CopilotKitRuntime } from "@copilotkit/runtime";
63
+ * import { createCopilotKitNodeListener } from "@copilotkit/runtime/node";
64
64
  *
65
- * const listener = createCopilotNodeListener({
66
- * runtime: new CopilotRuntime({ agents: { ... } }),
65
+ * const listener = createCopilotKitNodeListener({
66
+ * runtime: new CopilotKitRuntime({ agents: { ... } }),
67
67
  * basePath: "/api/copilotkit",
68
68
  * cors: true,
69
69
  * });
@@ -83,22 +83,22 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
83
83
  * `true | undefined` here so passing `activateChannels: false` (which leaves no
84
84
  * `.channels`) falls through to the optional-shape overload below rather than
85
85
  * dishonestly promising a control surface that will not exist. Mirrors the
86
- * `createCopilotRuntimeHandler` overload pair so the brand survives the wrapper.
86
+ * `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.
87
87
  *
88
88
  * The brand comes from constructing the runtime with a literal non-empty
89
89
  * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a
90
90
  * dynamically-assembled `Channel[]` is not branded, so it falls to the
91
91
  * optional-shape overload and its call sites still need `?.`.
92
92
  */
93
- declare function createCopilotNodeListener(options: CopilotRuntimeHandlerOptions & {
93
+ declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions & {
94
94
  runtime: RuntimeWithDeclaredChannels;
95
95
  activateChannels?: true | undefined;
96
- }): NodeCopilotListenerWithChannels;
96
+ }): NodeCopilotKitListenerWithChannels;
97
97
  /**
98
98
  * Overload: every other runtime (SSE, Intelligence without channels, or with
99
99
  * activation disabled) yields a listener whose `.channels` is optional.
100
100
  */
101
- declare function createCopilotNodeListener(options: CopilotRuntimeHandlerOptions): NodeCopilotListener;
101
+ declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions): NodeCopilotKitListener;
102
102
  //#endregion
103
- export { NodeCopilotListener, NodeCopilotListenerWithChannels, createCopilotNodeListener };
103
+ export { NodeCopilotKitListener, NodeCopilotKitListenerWithChannels, createCopilotKitNodeListener };
104
104
  //# sourceMappingURL=node.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;AAgBA;;;;;;KAAY,mBAAA,GAAsB,gBAAA;EAChC,QAAA,GAAW,eAAA;AAAA;AAWb;;;;;;;;AAAA,KAAY,+BAAA,GAAkC,gBAAA;EAqE9B,6EAnEd,QAAA,EAAU,eAAA;AAAA;;;;;;;;;;;;;;AA6EZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAVgB,yBAAA,CACd,OAAA,EAAS,4BAAA;EACP,OAAA,EAAS,2BAAA;EACT,gBAAA;AAAA,IAED,+BAAA;;;;;iBAKa,yBAAA,CACd,OAAA,EAAS,4BAAA,GACR,mBAAA"}
1
+ {"version":3,"file":"node.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;AAiBA;;;;;;KAAY,sBAAA,GAAyB,gBAAA;EACnC,QAAA,GAAW,eAAA;AAAA;AAWb;;;;;;;;AAAA,KAAY,kCAAA,GAAqC,gBAAA;EAqEjC,6EAnEd,QAAA,EAAU,eAAA;AAAA;;;;;;;;;;;;;;AA6EZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAVgB,4BAAA,CACd,OAAA,EAAS,+BAAA;EACP,OAAA,EAAS,2BAAA;EACT,gBAAA;AAAA,IAED,kCAAA;;;;;iBAKa,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,sBAAA"}
@@ -1,29 +1,29 @@
1
1
  import { RuntimeWithDeclaredChannels } from "../core/runtime.mjs";
2
2
  import { ChannelsControl } from "../core/channel-manager.mjs";
3
- import { CopilotRuntimeHandlerOptions } from "../core/fetch-handler.mjs";
3
+ import { CopilotKitRuntimeHandlerOptions } from "../core/fetch-handler.mjs";
4
4
  import { NodeFetchHandler } from "./node-fetch-handler.mjs";
5
5
 
6
6
  //#region src/runtime/endpoints/node.d.ts
7
7
  /**
8
8
  * A Node.js HTTP request listener that is also a callable object carrying an
9
9
  * optional {@link ChannelsControl} surface, mirroring
10
- * `CopilotRuntimeFetchHandler.channels`. Node is the long-running,
10
+ * `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,
11
11
  * lifecycle-owning entry point for the runtime, so it is the surface that
12
12
  * exposes `.channels` for callers that need to observe or stop the managed
13
13
  * Channel activation the listener starts at creation.
14
14
  */
15
- type NodeCopilotListener = NodeFetchHandler & {
15
+ type NodeCopilotKitListener = NodeFetchHandler & {
16
16
  channels?: ChannelsControl;
17
17
  };
18
18
  /**
19
- * A {@link NodeCopilotListener} whose {@link ChannelsControl} surface is
19
+ * A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is
20
20
  * guaranteed present. Returned when the runtime was constructed with at least
21
21
  * one declared Intelligence Channel and activation was not opted out of, so the
22
22
  * documented `listener.channels.ready(...)` call type-checks without a `!` or a
23
23
  * `?.` under strict TypeScript — the Node mirror of
24
- * `CopilotRuntimeFetchHandlerWithChannels`.
24
+ * `CopilotKitRuntimeFetchHandlerWithChannels`.
25
25
  */
26
- type NodeCopilotListenerWithChannels = NodeFetchHandler & {
26
+ type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {
27
27
  /** Lifecycle control surface for the runtime's declared managed Channels. */channels: ChannelsControl;
28
28
  };
29
29
  /**
@@ -41,7 +41,7 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
41
41
  * Gateway WebSocket and starts every direct adapter on the declared Channels.
42
42
  * Node owns its own process lifetime, so there is nothing to defer to and no
43
43
  * required incantation: a declared Channel connects because it was declared.
44
- * (The generic `createCopilotRuntimeHandler` is the opposite — it stays lazy for
44
+ * (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for
45
45
  * serverless/edge safety; see its TSDoc.)
46
46
  *
47
47
  * `await listener.channels.ready()` is therefore OPTIONAL and purely
@@ -59,11 +59,11 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
59
59
  * @example
60
60
  * ```typescript
61
61
  * import { createServer } from "node:http";
62
- * import { CopilotRuntime } from "@copilotkit/runtime";
63
- * import { createCopilotNodeListener } from "@copilotkit/runtime/node";
62
+ * import { CopilotKitRuntime } from "@copilotkit/runtime";
63
+ * import { createCopilotKitNodeListener } from "@copilotkit/runtime/node";
64
64
  *
65
- * const listener = createCopilotNodeListener({
66
- * runtime: new CopilotRuntime({ agents: { ... } }),
65
+ * const listener = createCopilotKitNodeListener({
66
+ * runtime: new CopilotKitRuntime({ agents: { ... } }),
67
67
  * basePath: "/api/copilotkit",
68
68
  * cors: true,
69
69
  * });
@@ -83,22 +83,22 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
83
83
  * `true | undefined` here so passing `activateChannels: false` (which leaves no
84
84
  * `.channels`) falls through to the optional-shape overload below rather than
85
85
  * dishonestly promising a control surface that will not exist. Mirrors the
86
- * `createCopilotRuntimeHandler` overload pair so the brand survives the wrapper.
86
+ * `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.
87
87
  *
88
88
  * The brand comes from constructing the runtime with a literal non-empty
89
89
  * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a
90
90
  * dynamically-assembled `Channel[]` is not branded, so it falls to the
91
91
  * optional-shape overload and its call sites still need `?.`.
92
92
  */
93
- declare function createCopilotNodeListener(options: CopilotRuntimeHandlerOptions & {
93
+ declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions & {
94
94
  runtime: RuntimeWithDeclaredChannels;
95
95
  activateChannels?: true | undefined;
96
- }): NodeCopilotListenerWithChannels;
96
+ }): NodeCopilotKitListenerWithChannels;
97
97
  /**
98
98
  * Overload: every other runtime (SSE, Intelligence without channels, or with
99
99
  * activation disabled) yields a listener whose `.channels` is optional.
100
100
  */
101
- declare function createCopilotNodeListener(options: CopilotRuntimeHandlerOptions): NodeCopilotListener;
101
+ declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions): NodeCopilotKitListener;
102
102
  //#endregion
103
- export { NodeCopilotListener, NodeCopilotListenerWithChannels, createCopilotNodeListener };
103
+ export { NodeCopilotKitListener, NodeCopilotKitListenerWithChannels, createCopilotKitNodeListener };
104
104
  //# sourceMappingURL=node.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;AAgBA;;;;;;KAAY,mBAAA,GAAsB,gBAAA;EAChC,QAAA,GAAW,eAAA;AAAA;AAWb;;;;;;;;AAAA,KAAY,+BAAA,GAAkC,gBAAA;EAqE9B,6EAnEd,QAAA,EAAU,eAAA;AAAA;;;;;;;;;;;;;;AA6EZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAVgB,yBAAA,CACd,OAAA,EAAS,4BAAA;EACP,OAAA,EAAS,2BAAA;EACT,gBAAA;AAAA,IAED,+BAAA;;;;;iBAKa,yBAAA,CACd,OAAA,EAAS,4BAAA,GACR,mBAAA"}
1
+ {"version":3,"file":"node.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;AAiBA;;;;;;KAAY,sBAAA,GAAyB,gBAAA;EACnC,QAAA,GAAW,eAAA;AAAA;AAWb;;;;;;;;AAAA,KAAY,kCAAA,GAAqC,gBAAA;EAqEjC,6EAnEd,QAAA,EAAU,eAAA;AAAA;;;;;;;;;;;;;;AA6EZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAVgB,4BAAA,CACd,OAAA,EAAS,+BAAA;EACP,OAAA,EAAS,2BAAA;EACT,gBAAA;AAAA,IAED,kCAAA;;;;;iBAKa,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,sBAAA"}
@@ -1,16 +1,18 @@
1
- import { createCopilotRuntimeHandler } from "../core/fetch-handler.mjs";
2
- import { createCopilotNodeHandler } from "./node-fetch-handler.mjs";
1
+ import { getRuntimeLogger } from "../core/logger.mjs";
2
+ import { createCopilotKitRuntimeHandler } from "../core/fetch-handler.mjs";
3
+ import { createCopilotKitNodeHandler } from "./node-fetch-handler.mjs";
3
4
  import { autoStartChannels } from "./auto-start-channels.mjs";
4
5
 
5
6
  //#region src/runtime/endpoints/node.ts
6
- function createCopilotNodeListener(options) {
7
- const handler = createCopilotRuntimeHandler(options);
8
- const listener = createCopilotNodeHandler(handler);
7
+ function createCopilotKitNodeListener(options) {
8
+ const handler = createCopilotKitRuntimeHandler(options);
9
+ const logger = getRuntimeLogger(options.runtime);
10
+ const listener = createCopilotKitNodeHandler(handler, logger);
9
11
  listener.channels = handler.channels;
10
- autoStartChannels(listener.channels);
12
+ autoStartChannels(listener.channels, logger);
11
13
  return listener;
12
14
  }
13
15
 
14
16
  //#endregion
15
- export { createCopilotNodeListener };
17
+ export { createCopilotKitNodeListener };
16
18
  //# sourceMappingURL=node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.mjs","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import { createCopilotRuntimeHandler } from \"../core/fetch-handler\";\nimport type { CopilotRuntimeHandlerOptions } from \"../core/fetch-handler\";\nimport type { RuntimeWithDeclaredChannels } from \"../core/runtime\";\nimport type { ChannelsControl } from \"../core/channel-manager\";\nimport { createCopilotNodeHandler } from \"./node-fetch-handler\";\nimport type { NodeFetchHandler } from \"./node-fetch-handler\";\nimport { autoStartChannels } from \"./auto-start-channels\";\n\n/**\n * A Node.js HTTP request listener that is also a callable object carrying an\n * optional {@link ChannelsControl} surface, mirroring\n * `CopilotRuntimeFetchHandler.channels`. Node is the long-running,\n * lifecycle-owning entry point for the runtime, so it is the surface that\n * exposes `.channels` for callers that need to observe or stop the managed\n * Channel activation the listener starts at creation.\n */\nexport type NodeCopilotListener = NodeFetchHandler & {\n channels?: ChannelsControl;\n};\n\n/**\n * A {@link NodeCopilotListener} whose {@link ChannelsControl} surface is\n * guaranteed present. Returned when the runtime was constructed with at least\n * one declared Intelligence Channel and activation was not opted out of, so the\n * documented `listener.channels.ready(...)` call type-checks without a `!` or a\n * `?.` under strict TypeScript — the Node mirror of\n * `CopilotRuntimeFetchHandlerWithChannels`.\n */\nexport type NodeCopilotListenerWithChannels = NodeFetchHandler & {\n /** Lifecycle control surface for the runtime's declared managed Channels. */\n channels: ChannelsControl;\n};\n\n/**\n * Convenience wrapper for creating a Node.js HTTP request listener\n * from CopilotKit runtime handler options.\n *\n * When the runtime declares managed Channels (and activation was not opted\n * out of via `activateChannels: false`), the returned listener exposes\n * `.channels` — the same {@link ChannelsControl} surface carried by the\n * underlying fetch handler.\n *\n * ## Managed Channels lifecycle\n *\n * Creating the listener STARTS activation — which opens the persistent Realtime\n * Gateway WebSocket and starts every direct adapter on the declared Channels.\n * Node owns its own process lifetime, so there is nothing to defer to and no\n * required incantation: a declared Channel connects because it was declared.\n * (The generic `createCopilotRuntimeHandler` is the opposite — it stays lazy for\n * serverless/edge safety; see its TSDoc.)\n *\n * `await listener.channels.ready()` is therefore OPTIONAL and purely\n * await-and-observe: it resolves once every declared Channel has settled to\n * `online`/`setup_required` and rejects with the activation failure, observing\n * the activation started at creation rather than triggering a second one. Await\n * it when startup should block on Channels being live (or should exit non-zero\n * when they are not); skip it and activation failures land in the logs instead.\n * `listener.channels.stop()` tears activation down.\n *\n * Pass `activateChannels: false` to build no control surface and open no socket\n * — the clean opt-out for a test or a short-lived script that mounts the\n * listener without wanting its Channels connected.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { CopilotRuntime } from \"@copilotkit/runtime\";\n * import { createCopilotNodeListener } from \"@copilotkit/runtime/node\";\n *\n * const listener = createCopilotNodeListener({\n * runtime: new CopilotRuntime({ agents: { ... } }),\n * basePath: \"/api/copilotkit\",\n * cors: true,\n * });\n * createServer(listener).listen(3000);\n * // Declared managed Channels are already connecting at this point.\n *\n * // Optional: block startup on them being live. Bound it so one wedged adapter\n * // cannot hang startup forever.\n * await listener.channels.ready({ timeoutMs: 30_000 });\n * ```\n */\n/**\n * Overload: a runtime constructed with at least one declared Intelligence\n * Channel (a {@link RuntimeWithDeclaredChannels}-branded runtime), when\n * activation is not disabled, yields a listener with a **non-optional**\n * {@link ChannelsControl}. `activateChannels` is constrained to\n * `true | undefined` here so passing `activateChannels: false` (which leaves no\n * `.channels`) falls through to the optional-shape overload below rather than\n * dishonestly promising a control surface that will not exist. Mirrors the\n * `createCopilotRuntimeHandler` overload pair so the brand survives the wrapper.\n *\n * The brand comes from constructing the runtime with a literal non-empty\n * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a\n * dynamically-assembled `Channel[]` is not branded, so it falls to the\n * optional-shape overload and its call sites still need `?.`.\n */\nexport function createCopilotNodeListener(\n options: CopilotRuntimeHandlerOptions & {\n runtime: RuntimeWithDeclaredChannels;\n activateChannels?: true | undefined;\n },\n): NodeCopilotListenerWithChannels;\n/**\n * Overload: every other runtime (SSE, Intelligence without channels, or with\n * activation disabled) yields a listener whose `.channels` is optional.\n */\nexport function createCopilotNodeListener(\n options: CopilotRuntimeHandlerOptions,\n): NodeCopilotListener;\nexport function createCopilotNodeListener(\n options: CopilotRuntimeHandlerOptions,\n): NodeCopilotListener {\n const handler = createCopilotRuntimeHandler(options);\n const listener: NodeCopilotListener = createCopilotNodeHandler(handler);\n listener.channels = handler.channels;\n autoStartChannels(listener.channels);\n return listener;\n}\n"],"mappings":";;;;;AA8GA,SAAgB,0BACd,SACqB;CACrB,MAAM,UAAU,4BAA4B,QAAQ;CACpD,MAAM,WAAgC,yBAAyB,QAAQ;AACvE,UAAS,WAAW,QAAQ;AAC5B,mBAAkB,SAAS,SAAS;AACpC,QAAO"}
1
+ {"version":3,"file":"node.mjs","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import { createCopilotKitRuntimeHandler } from \"../core/fetch-handler\";\nimport type { CopilotKitRuntimeHandlerOptions } from \"../core/fetch-handler\";\nimport type { RuntimeWithDeclaredChannels } from \"../core/runtime\";\nimport type { ChannelsControl } from \"../core/channel-manager\";\nimport { createCopilotKitNodeHandler } from \"./node-fetch-handler\";\nimport type { NodeFetchHandler } from \"./node-fetch-handler\";\nimport { autoStartChannels } from \"./auto-start-channels\";\nimport { getRuntimeLogger } from \"../core/logger\";\n\n/**\n * A Node.js HTTP request listener that is also a callable object carrying an\n * optional {@link ChannelsControl} surface, mirroring\n * `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,\n * lifecycle-owning entry point for the runtime, so it is the surface that\n * exposes `.channels` for callers that need to observe or stop the managed\n * Channel activation the listener starts at creation.\n */\nexport type NodeCopilotKitListener = NodeFetchHandler & {\n channels?: ChannelsControl;\n};\n\n/**\n * A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is\n * guaranteed present. Returned when the runtime was constructed with at least\n * one declared Intelligence Channel and activation was not opted out of, so the\n * documented `listener.channels.ready(...)` call type-checks without a `!` or a\n * `?.` under strict TypeScript — the Node mirror of\n * `CopilotKitRuntimeFetchHandlerWithChannels`.\n */\nexport type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {\n /** Lifecycle control surface for the runtime's declared managed Channels. */\n channels: ChannelsControl;\n};\n\n/**\n * Convenience wrapper for creating a Node.js HTTP request listener\n * from CopilotKit runtime handler options.\n *\n * When the runtime declares managed Channels (and activation was not opted\n * out of via `activateChannels: false`), the returned listener exposes\n * `.channels` — the same {@link ChannelsControl} surface carried by the\n * underlying fetch handler.\n *\n * ## Managed Channels lifecycle\n *\n * Creating the listener STARTS activation — which opens the persistent Realtime\n * Gateway WebSocket and starts every direct adapter on the declared Channels.\n * Node owns its own process lifetime, so there is nothing to defer to and no\n * required incantation: a declared Channel connects because it was declared.\n * (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for\n * serverless/edge safety; see its TSDoc.)\n *\n * `await listener.channels.ready()` is therefore OPTIONAL and purely\n * await-and-observe: it resolves once every declared Channel has settled to\n * `online`/`setup_required` and rejects with the activation failure, observing\n * the activation started at creation rather than triggering a second one. Await\n * it when startup should block on Channels being live (or should exit non-zero\n * when they are not); skip it and activation failures land in the logs instead.\n * `listener.channels.stop()` tears activation down.\n *\n * Pass `activateChannels: false` to build no control surface and open no socket\n * — the clean opt-out for a test or a short-lived script that mounts the\n * listener without wanting its Channels connected.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { CopilotKitRuntime } from \"@copilotkit/runtime\";\n * import { createCopilotKitNodeListener } from \"@copilotkit/runtime/node\";\n *\n * const listener = createCopilotKitNodeListener({\n * runtime: new CopilotKitRuntime({ agents: { ... } }),\n * basePath: \"/api/copilotkit\",\n * cors: true,\n * });\n * createServer(listener).listen(3000);\n * // Declared managed Channels are already connecting at this point.\n *\n * // Optional: block startup on them being live. Bound it so one wedged adapter\n * // cannot hang startup forever.\n * await listener.channels.ready({ timeoutMs: 30_000 });\n * ```\n */\n/**\n * Overload: a runtime constructed with at least one declared Intelligence\n * Channel (a {@link RuntimeWithDeclaredChannels}-branded runtime), when\n * activation is not disabled, yields a listener with a **non-optional**\n * {@link ChannelsControl}. `activateChannels` is constrained to\n * `true | undefined` here so passing `activateChannels: false` (which leaves no\n * `.channels`) falls through to the optional-shape overload below rather than\n * dishonestly promising a control surface that will not exist. Mirrors the\n * `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.\n *\n * The brand comes from constructing the runtime with a literal non-empty\n * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a\n * dynamically-assembled `Channel[]` is not branded, so it falls to the\n * optional-shape overload and its call sites still need `?.`.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions & {\n runtime: RuntimeWithDeclaredChannels;\n activateChannels?: true | undefined;\n },\n): NodeCopilotKitListenerWithChannels;\n/**\n * Overload: every other runtime (SSE, Intelligence without channels, or with\n * activation disabled) yields a listener whose `.channels` is optional.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener;\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener {\n const handler = createCopilotKitRuntimeHandler(options);\n const logger = getRuntimeLogger(options.runtime);\n const listener: NodeCopilotKitListener = createCopilotKitNodeHandler(\n handler,\n logger,\n );\n listener.channels = handler.channels;\n autoStartChannels(listener.channels, logger);\n return listener;\n}\n"],"mappings":";;;;;;AA+GA,SAAgB,6BACd,SACwB;CACxB,MAAM,UAAU,+BAA+B,QAAQ;CACvD,MAAM,SAAS,iBAAiB,QAAQ,QAAQ;CAChD,MAAM,WAAmC,4BACvC,SACA,OACD;AACD,UAAS,WAAW,QAAQ;AAC5B,mBAAkB,SAAS,UAAU,OAAO;AAC5C,QAAO"}
@@ -0,0 +1,4 @@
1
+ import { ArgsParser, GenerateSandboxedUIParams, OnParamEvent, OpenGenerativeUIMiddleware } from "./open-generative-ui-middleware.cjs";
2
+ import { RecordedEventTransformOptions, transformRecordedEvents } from "./recorded-events.cjs";
3
+ import { A2UIMiddleware, A2UIMiddlewareConfig as A2UIMiddlewareConfig$1 } from "@ag-ui/a2ui-middleware";
4
+ export { A2UIMiddleware, type A2UIMiddlewareConfig$1 as A2UIMiddlewareConfig };
@@ -0,0 +1,4 @@
1
+ import { ArgsParser, GenerateSandboxedUIParams, OnParamEvent, OpenGenerativeUIMiddleware } from "./open-generative-ui-middleware.mjs";
2
+ import { RecordedEventTransformOptions, transformRecordedEvents } from "./recorded-events.mjs";
3
+ import { A2UIMiddleware as A2UIMiddleware$1, A2UIMiddlewareConfig as A2UIMiddlewareConfig$1 } from "@ag-ui/a2ui-middleware";
4
+ export { A2UIMiddleware$1 as A2UIMiddleware, type A2UIMiddlewareConfig$1 as A2UIMiddlewareConfig };
@@ -0,0 +1,5 @@
1
+ import { ArgsParser, OpenGenerativeUIMiddleware } from "./open-generative-ui-middleware.mjs";
2
+ import { transformRecordedEvents } from "./recorded-events.mjs";
3
+ import { A2UIMiddleware as A2UIMiddleware$1 } from "@ag-ui/a2ui-middleware";
4
+
5
+ export { A2UIMiddleware$1 as A2UIMiddleware };