veryfront 0.1.1048 → 0.1.1049

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 (513) hide show
  1. package/esm/cli/templates/manifest.js +3 -3
  2. package/esm/deno.d.ts +3 -0
  3. package/esm/deno.js +10 -6
  4. package/esm/src/agent/react/use-agent-metadata.js +1 -1
  5. package/esm/src/agent/react/use-agent.js +1 -1
  6. package/esm/src/agent/react/use-agents.js +1 -1
  7. package/esm/src/agent/react/use-chat/types.d.ts +0 -6
  8. package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
  9. package/esm/src/agent/react/use-chat/use-chat.d.ts +5 -0
  10. package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
  11. package/esm/src/agent/react/use-chat/use-chat.js +87 -34
  12. package/esm/src/agent/react/use-completion.js +1 -1
  13. package/esm/src/agent/react/use-streaming.js +1 -1
  14. package/esm/src/agent/react/use-voice-input.js +1 -1
  15. package/esm/src/cache/backends/api.d.ts.map +1 -1
  16. package/esm/src/cache/backends/api.js +10 -7
  17. package/esm/src/chat/index.d.ts +8 -15
  18. package/esm/src/chat/index.d.ts.map +1 -1
  19. package/esm/src/chat/index.js +7 -16
  20. package/esm/src/modules/component-registry/registry.d.ts +1 -1
  21. package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
  22. package/esm/src/modules/react-loader/component-loader.d.ts +1 -1
  23. package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
  24. package/esm/src/modules/react-loader/extract-component.d.ts +1 -1
  25. package/esm/src/modules/react-loader/extract-component.d.ts.map +1 -1
  26. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
  27. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  28. package/esm/src/modules/react-loader/types.d.ts +1 -1
  29. package/esm/src/modules/react-loader/types.d.ts.map +1 -1
  30. package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts +3 -1
  31. package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts.map +1 -1
  32. package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.js +2 -0
  33. package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts +4 -0
  34. package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
  35. package/esm/src/platform/adapters/fs/veryfront/request-context.js +1 -0
  36. package/esm/src/proxy/main.js +6 -5
  37. package/esm/src/proxy/retry.d.ts +14 -6
  38. package/esm/src/proxy/retry.d.ts.map +1 -1
  39. package/esm/src/proxy/retry.js +82 -20
  40. package/esm/src/react/compat/hooks-adapter.d.ts +1 -1
  41. package/esm/src/react/compat/hooks-adapter.d.ts.map +1 -1
  42. package/esm/src/react/compat/hooks-adapter.js +1 -1
  43. package/esm/src/react/compat/ssr-adapter/response-builder.d.ts +1 -1
  44. package/esm/src/react/compat/ssr-adapter/response-builder.d.ts.map +1 -1
  45. package/esm/src/react/compat/ssr-adapter/server-loader.d.ts +5 -5
  46. package/esm/src/react/compat/ssr-adapter/server-loader.d.ts.map +1 -1
  47. package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts +1 -1
  48. package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts.map +1 -1
  49. package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts +1 -1
  50. package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts.map +1 -1
  51. package/esm/src/react/compat/version-detector/feature-detector.js +1 -1
  52. package/esm/src/react/components/AppWrapper.d.ts +1 -1
  53. package/esm/src/react/components/AppWrapper.d.ts.map +1 -1
  54. package/esm/src/react/components/AppWrapper.js +1 -1
  55. package/esm/src/react/components/LayoutComponent.d.ts +1 -1
  56. package/esm/src/react/components/LayoutComponent.d.ts.map +1 -1
  57. package/esm/src/react/components/LayoutComponent.js +1 -1
  58. package/esm/src/react/components/MDXProvider.d.ts +1 -1
  59. package/esm/src/react/components/MDXProvider.d.ts.map +1 -1
  60. package/esm/src/react/components/MDXProvider.js +1 -1
  61. package/esm/src/react/components/ProviderComponent.d.ts +1 -1
  62. package/esm/src/react/components/ProviderComponent.d.ts.map +1 -1
  63. package/esm/src/react/components/ProviderComponent.js +1 -1
  64. package/esm/src/react/components/chat/agent-card.d.ts +15 -7
  65. package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
  66. package/esm/src/react/components/chat/agent-card.js +9 -10
  67. package/esm/src/react/components/chat/agent-picker-actions.d.ts +20 -0
  68. package/esm/src/react/components/chat/agent-picker-actions.d.ts.map +1 -0
  69. package/esm/src/react/components/chat/agent-picker-actions.js +24 -0
  70. package/esm/src/react/components/chat/agent-picker-context.d.ts +19 -0
  71. package/esm/src/react/components/chat/agent-picker-context.d.ts.map +1 -0
  72. package/esm/src/react/components/chat/agent-picker-context.js +13 -0
  73. package/esm/src/react/components/chat/agent-picker.d.ts +35 -42
  74. package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -1
  75. package/esm/src/react/components/chat/agent-picker.js +59 -50
  76. package/esm/src/react/components/chat/chat/app-mode-chat.d.ts +14 -0
  77. package/esm/src/react/components/chat/chat/app-mode-chat.d.ts.map +1 -0
  78. package/esm/src/react/components/chat/chat/app-mode-chat.js +137 -0
  79. package/esm/src/react/components/chat/chat/chat-attachments.d.ts +7 -0
  80. package/esm/src/react/components/chat/chat/chat-attachments.d.ts.map +1 -0
  81. package/esm/src/react/components/chat/chat/chat-attachments.js +16 -0
  82. package/esm/src/react/components/chat/chat/chat-component.d.ts +21 -0
  83. package/esm/src/react/components/chat/chat/chat-component.d.ts.map +1 -0
  84. package/esm/src/react/components/chat/chat/chat-component.js +1 -0
  85. package/esm/src/react/components/chat/chat/chat-props.d.ts +114 -0
  86. package/esm/src/react/components/chat/chat/chat-props.d.ts.map +1 -0
  87. package/esm/src/react/components/chat/chat/chat-props.js +1 -0
  88. package/esm/src/react/components/chat/chat/components/animations.d.ts +1 -1
  89. package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -1
  90. package/esm/src/react/components/chat/chat/components/animations.js +1 -1
  91. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +18 -18
  92. package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
  93. package/esm/src/react/components/chat/chat/components/attachment-pill.js +11 -15
  94. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +14 -3
  95. package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
  96. package/esm/src/react/components/chat/chat/components/attachments-panel.js +3 -3
  97. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +44 -14
  98. package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
  99. package/esm/src/react/components/chat/chat/components/branch-picker.js +55 -12
  100. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +1 -1
  101. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -1
  102. package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +1 -1
  103. package/esm/src/react/components/chat/chat/components/code-block.d.ts +7 -2
  104. package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
  105. package/esm/src/react/components/chat/chat/components/code-block.js +3 -3
  106. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +1 -1
  107. package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
  108. package/esm/src/react/components/chat/chat/components/drop-zone.js +1 -1
  109. package/esm/src/react/components/chat/chat/components/empty-state.d.ts +1 -1
  110. package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
  111. package/esm/src/react/components/chat/chat/components/empty-state.js +1 -1
  112. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +1 -1
  113. package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
  114. package/esm/src/react/components/chat/chat/components/inference-badge.js +1 -1
  115. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +33 -10
  116. package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
  117. package/esm/src/react/components/chat/chat/components/inline-citation.js +145 -51
  118. package/esm/src/react/components/chat/chat/components/message-actions.d.ts +49 -20
  119. package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
  120. package/esm/src/react/components/chat/chat/components/message-actions.js +72 -18
  121. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +1 -1
  122. package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
  123. package/esm/src/react/components/chat/chat/components/message-edit-form.js +1 -1
  124. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +34 -14
  125. package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
  126. package/esm/src/react/components/chat/chat/components/message-feedback.js +54 -15
  127. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts +1 -1
  128. package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
  129. package/esm/src/react/components/chat/chat/components/quick-actions.js +1 -1
  130. package/esm/src/react/components/chat/chat/components/reasoning.d.ts +14 -6
  131. package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
  132. package/esm/src/react/components/chat/chat/components/reasoning.js +3 -5
  133. package/esm/src/react/components/chat/chat/components/sidebar.d.ts +70 -16
  134. package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
  135. package/esm/src/react/components/chat/chat/components/sidebar.js +72 -23
  136. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +1 -1
  137. package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
  138. package/esm/src/react/components/chat/chat/components/skill-badge.js +1 -1
  139. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +1 -1
  140. package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -1
  141. package/esm/src/react/components/chat/chat/components/skill-tool.js +1 -1
  142. package/esm/src/react/components/chat/chat/components/sources.d.ts +25 -15
  143. package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
  144. package/esm/src/react/components/chat/chat/components/sources.js +7 -7
  145. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +14 -3
  146. package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
  147. package/esm/src/react/components/chat/chat/components/step-indicator.js +3 -3
  148. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
  149. package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
  150. package/esm/src/react/components/chat/chat/components/tab-switcher.js +1 -1
  151. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +16 -9
  152. package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
  153. package/esm/src/react/components/chat/chat/components/tool-ui.js +10 -14
  154. package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts +1 -1
  155. package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts.map +1 -1
  156. package/esm/src/react/components/chat/chat/composition/agent-avatar.js +1 -1
  157. package/esm/src/react/components/chat/chat/composition/api.d.ts +3 -3
  158. package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
  159. package/esm/src/react/components/chat/chat/composition/api.js +2 -2
  160. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +72 -29
  161. package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
  162. package/esm/src/react/components/chat/chat/composition/chat-composer.js +92 -82
  163. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +1 -1
  164. package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -1
  165. package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +1 -1
  166. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +7 -2
  167. package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
  168. package/esm/src/react/components/chat/chat/composition/chat-empty.js +3 -3
  169. package/esm/src/react/components/chat/chat/composition/chat-if.d.ts +1 -1
  170. package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -1
  171. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +25 -11
  172. package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
  173. package/esm/src/react/components/chat/chat/composition/chat-message-list.js +67 -29
  174. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +7 -3
  175. package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
  176. package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -5
  177. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +7 -2
  178. package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
  179. package/esm/src/react/components/chat/chat/composition/error-banner.js +3 -3
  180. package/esm/src/react/components/chat/chat/composition/message.d.ts +85 -34
  181. package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
  182. package/esm/src/react/components/chat/chat/composition/message.js +146 -122
  183. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +1 -1
  184. package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
  185. package/esm/src/react/components/chat/chat/composition/model-avatar.js +1 -1
  186. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +1 -1
  187. package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -1
  188. package/esm/src/react/components/chat/chat/composition/pending-message.js +1 -1
  189. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +2 -3
  190. package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
  191. package/esm/src/react/components/chat/chat/contexts/chat-context.js +1 -1
  192. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +2 -2
  193. package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
  194. package/esm/src/react/components/chat/chat/contexts/composer-context.js +1 -1
  195. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +2 -2
  196. package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
  197. package/esm/src/react/components/chat/chat/contexts/conversations-context.js +1 -1
  198. package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
  199. package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
  200. package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
  201. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +15 -2
  202. package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
  203. package/esm/src/react/components/chat/chat/contexts/message-context.js +11 -1
  204. package/esm/src/react/components/chat/chat/controlled-chat.d.ts +15 -0
  205. package/esm/src/react/components/chat/chat/controlled-chat.d.ts.map +1 -0
  206. package/esm/src/react/components/chat/chat/controlled-chat.js +97 -0
  207. package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +1 -1
  208. package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts +54 -0
  209. package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts.map +1 -0
  210. package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.js +179 -0
  211. package/esm/src/react/components/chat/chat/hooks/use-conversation.js +1 -1
  212. package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -1
  213. package/esm/src/react/components/chat/chat/hooks/use-conversations.js +3 -6
  214. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +8 -5
  215. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -1
  216. package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +6 -6
  217. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +1 -1
  218. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -1
  219. package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +1 -1
  220. package/esm/src/react/components/chat/chat/hooks/use-upload.js +1 -1
  221. package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +1 -1
  222. package/esm/src/react/components/chat/chat/index.d.ts +13 -230
  223. package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
  224. package/esm/src/react/components/chat/chat/index.js +27 -383
  225. package/esm/src/react/components/chat/chat-actions.d.ts +1 -1
  226. package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -1
  227. package/esm/src/react/components/chat/chat-actions.js +1 -1
  228. package/esm/src/react/components/chat/chat-agent-picker.d.ts +1 -1
  229. package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -1
  230. package/esm/src/react/components/chat/chat-agent-picker.js +1 -1
  231. package/esm/src/react/components/chat/chat-theme-scope.d.ts +1 -1
  232. package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -1
  233. package/esm/src/react/components/chat/chat-theme-scope.js +1 -1
  234. package/esm/src/react/components/chat/chat.d.ts +6 -6
  235. package/esm/src/react/components/chat/chat.d.ts.map +1 -1
  236. package/esm/src/react/components/chat/chat.js +4 -4
  237. package/esm/src/react/components/chat/error-boundary.d.ts +1 -1
  238. package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -1
  239. package/esm/src/react/components/chat/error-boundary.js +1 -1
  240. package/esm/src/react/components/chat/markdown.d.ts +3 -5
  241. package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
  242. package/esm/src/react/components/chat/markdown.js +4 -72
  243. package/esm/src/react/components/chat/model-selector.d.ts +21 -27
  244. package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
  245. package/esm/src/react/components/chat/model-selector.js +26 -31
  246. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts +1 -1
  247. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts.map +1 -1
  248. package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.js +1 -1
  249. package/esm/src/react/components/optimized-image/OptimizedImage.d.ts +1 -1
  250. package/esm/src/react/components/optimized-image/OptimizedImage.d.ts.map +1 -1
  251. package/esm/src/react/components/optimized-image/OptimizedImage.js +1 -1
  252. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts +1 -1
  253. package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts.map +1 -1
  254. package/esm/src/react/components/optimized-image/utils.d.ts +1 -1
  255. package/esm/src/react/components/optimized-image/utils.d.ts.map +1 -1
  256. package/esm/src/react/components/optimized-image/utils.js +1 -1
  257. package/esm/src/react/components/ui/alert.d.ts +1 -1
  258. package/esm/src/react/components/ui/alert.d.ts.map +1 -1
  259. package/esm/src/react/components/ui/alert.js +1 -1
  260. package/esm/src/react/components/ui/app-shell.d.ts +1 -1
  261. package/esm/src/react/components/ui/app-shell.d.ts.map +1 -1
  262. package/esm/src/react/components/ui/app-shell.js +1 -1
  263. package/esm/src/react/components/ui/avatar.d.ts +1 -1
  264. package/esm/src/react/components/ui/avatar.d.ts.map +1 -1
  265. package/esm/src/react/components/ui/avatar.js +1 -1
  266. package/esm/src/react/components/ui/badge.d.ts +1 -1
  267. package/esm/src/react/components/ui/badge.d.ts.map +1 -1
  268. package/esm/src/react/components/ui/badge.js +1 -1
  269. package/esm/src/react/components/ui/button.d.ts +1 -1
  270. package/esm/src/react/components/ui/button.d.ts.map +1 -1
  271. package/esm/src/react/components/ui/button.js +1 -1
  272. package/esm/src/react/components/ui/card.d.ts +1 -1
  273. package/esm/src/react/components/ui/card.d.ts.map +1 -1
  274. package/esm/src/react/components/ui/card.js +1 -1
  275. package/esm/src/react/components/ui/checkbox.d.ts +1 -1
  276. package/esm/src/react/components/ui/checkbox.d.ts.map +1 -1
  277. package/esm/src/react/components/ui/checkbox.js +1 -1
  278. package/esm/src/react/components/ui/code-block.d.ts +1 -1
  279. package/esm/src/react/components/ui/code-block.d.ts.map +1 -1
  280. package/esm/src/react/components/ui/code-block.js +1 -1
  281. package/esm/src/react/components/ui/collapsible.d.ts +1 -1
  282. package/esm/src/react/components/ui/collapsible.d.ts.map +1 -1
  283. package/esm/src/react/components/ui/collapsible.js +1 -1
  284. package/esm/src/react/components/ui/color-mode.d.ts +2 -2
  285. package/esm/src/react/components/ui/color-mode.d.ts.map +1 -1
  286. package/esm/src/react/components/ui/color-mode.js +1 -1
  287. package/esm/src/react/components/ui/command.d.ts +1 -1
  288. package/esm/src/react/components/ui/command.d.ts.map +1 -1
  289. package/esm/src/react/components/ui/command.js +1 -1
  290. package/esm/src/react/components/ui/dialog.d.ts +1 -1
  291. package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
  292. package/esm/src/react/components/ui/dialog.js +1 -1
  293. package/esm/src/react/components/ui/drawer.d.ts +1 -1
  294. package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
  295. package/esm/src/react/components/ui/drawer.js +1 -1
  296. package/esm/src/react/components/ui/dropdown-menu.d.ts +1 -1
  297. package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
  298. package/esm/src/react/components/ui/dropdown-menu.js +1 -1
  299. package/esm/src/react/components/ui/file-type.d.ts +1 -1
  300. package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
  301. package/esm/src/react/components/ui/file-type.js +1 -1
  302. package/esm/src/react/components/ui/floating.d.ts +1 -1
  303. package/esm/src/react/components/ui/floating.d.ts.map +1 -1
  304. package/esm/src/react/components/ui/floating.js +2 -2
  305. package/esm/src/react/components/ui/icon-button.d.ts +1 -1
  306. package/esm/src/react/components/ui/icon-button.d.ts.map +1 -1
  307. package/esm/src/react/components/ui/icon-button.js +1 -1
  308. package/esm/src/react/components/ui/icons/index.d.ts +1 -1
  309. package/esm/src/react/components/ui/icons/index.d.ts.map +1 -1
  310. package/esm/src/react/components/ui/icons/index.js +1 -1
  311. package/esm/src/react/components/ui/input.d.ts +1 -1
  312. package/esm/src/react/components/ui/input.d.ts.map +1 -1
  313. package/esm/src/react/components/ui/input.js +1 -1
  314. package/esm/src/react/components/ui/label.d.ts +1 -1
  315. package/esm/src/react/components/ui/label.d.ts.map +1 -1
  316. package/esm/src/react/components/ui/label.js +1 -1
  317. package/esm/src/react/components/ui/list.d.ts +1 -1
  318. package/esm/src/react/components/ui/list.d.ts.map +1 -1
  319. package/esm/src/react/components/ui/list.js +1 -1
  320. package/esm/src/react/components/ui/pill.d.ts +1 -1
  321. package/esm/src/react/components/ui/pill.d.ts.map +1 -1
  322. package/esm/src/react/components/ui/pill.js +1 -1
  323. package/esm/src/react/components/ui/popover.d.ts +1 -1
  324. package/esm/src/react/components/ui/popover.d.ts.map +1 -1
  325. package/esm/src/react/components/ui/popover.js +1 -1
  326. package/esm/src/react/components/ui/progress-bar.d.ts +1 -1
  327. package/esm/src/react/components/ui/progress-bar.d.ts.map +1 -1
  328. package/esm/src/react/components/ui/progress-bar.js +1 -1
  329. package/esm/src/react/components/ui/radio.d.ts +1 -1
  330. package/esm/src/react/components/ui/radio.d.ts.map +1 -1
  331. package/esm/src/react/components/ui/radio.js +1 -1
  332. package/esm/src/react/components/ui/scroll-fade.d.ts +1 -1
  333. package/esm/src/react/components/ui/scroll-fade.d.ts.map +1 -1
  334. package/esm/src/react/components/ui/scroll-fade.js +1 -1
  335. package/esm/src/react/components/ui/select.d.ts +1 -1
  336. package/esm/src/react/components/ui/select.d.ts.map +1 -1
  337. package/esm/src/react/components/ui/select.js +1 -1
  338. package/esm/src/react/components/ui/shimmer.d.ts +1 -1
  339. package/esm/src/react/components/ui/shimmer.d.ts.map +1 -1
  340. package/esm/src/react/components/ui/shimmer.js +1 -1
  341. package/esm/src/react/components/ui/skeleton.d.ts +1 -1
  342. package/esm/src/react/components/ui/skeleton.d.ts.map +1 -1
  343. package/esm/src/react/components/ui/skeleton.js +1 -1
  344. package/esm/src/react/components/ui/slot.d.ts +1 -1
  345. package/esm/src/react/components/ui/slot.d.ts.map +1 -1
  346. package/esm/src/react/components/ui/slot.js +1 -1
  347. package/esm/src/react/components/ui/status.d.ts +1 -1
  348. package/esm/src/react/components/ui/status.d.ts.map +1 -1
  349. package/esm/src/react/components/ui/status.js +1 -1
  350. package/esm/src/react/components/ui/switch.d.ts +1 -1
  351. package/esm/src/react/components/ui/switch.d.ts.map +1 -1
  352. package/esm/src/react/components/ui/switch.js +1 -1
  353. package/esm/src/react/components/ui/tabs.d.ts +3 -3
  354. package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
  355. package/esm/src/react/components/ui/tabs.js +1 -1
  356. package/esm/src/react/components/ui/tag.d.ts +1 -1
  357. package/esm/src/react/components/ui/tag.d.ts.map +1 -1
  358. package/esm/src/react/components/ui/tag.js +1 -1
  359. package/esm/src/react/components/ui/textarea.d.ts +1 -1
  360. package/esm/src/react/components/ui/textarea.d.ts.map +1 -1
  361. package/esm/src/react/components/ui/textarea.js +1 -1
  362. package/esm/src/react/components/ui/tokens.d.ts +1 -1
  363. package/esm/src/react/components/ui/tokens.d.ts.map +1 -1
  364. package/esm/src/react/components/ui/tokens.js +1 -1
  365. package/esm/src/react/components/ui/tooltip.d.ts +1 -1
  366. package/esm/src/react/components/ui/tooltip.d.ts.map +1 -1
  367. package/esm/src/react/components/ui/tooltip.js +2 -2
  368. package/esm/src/react/fonts/index.d.ts +1 -1
  369. package/esm/src/react/fonts/index.d.ts.map +1 -1
  370. package/esm/src/react/fonts/index.js +1 -1
  371. package/esm/src/react/primitives/agent-primitives.d.ts +4 -4
  372. package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
  373. package/esm/src/react/primitives/agent-primitives.js +1 -1
  374. package/esm/src/react/primitives/chat-container.d.ts +2 -2
  375. package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
  376. package/esm/src/react/primitives/chat-container.js +1 -1
  377. package/esm/src/react/primitives/input-box.d.ts +4 -4
  378. package/esm/src/react/primitives/input-box.d.ts.map +1 -1
  379. package/esm/src/react/primitives/input-box.js +1 -1
  380. package/esm/src/react/primitives/message-list.d.ts +5 -5
  381. package/esm/src/react/primitives/message-list.d.ts.map +1 -1
  382. package/esm/src/react/primitives/message-list.js +1 -1
  383. package/esm/src/react/primitives/tool-primitives.d.ts +4 -4
  384. package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
  385. package/esm/src/react/primitives/tool-primitives.js +1 -1
  386. package/esm/src/react/runtime/core.d.ts +1 -1
  387. package/esm/src/react/runtime/core.d.ts.map +1 -1
  388. package/esm/src/react/runtime/core.js +1 -1
  389. package/esm/src/rendering/app-reserved.d.ts +1 -1
  390. package/esm/src/rendering/app-reserved.d.ts.map +1 -1
  391. package/esm/src/rendering/app-reserved.js +1 -1
  392. package/esm/src/rendering/component-handling.d.ts +1 -1
  393. package/esm/src/rendering/component-handling.d.ts.map +1 -1
  394. package/esm/src/rendering/element-validator/element-normalizer.d.ts +1 -1
  395. package/esm/src/rendering/element-validator/element-normalizer.d.ts.map +1 -1
  396. package/esm/src/rendering/element-validator/element-normalizer.js +1 -1
  397. package/esm/src/rendering/element-validator/primitive-checks.d.ts +1 -1
  398. package/esm/src/rendering/element-validator/primitive-checks.d.ts.map +1 -1
  399. package/esm/src/rendering/element-validator/primitive-checks.js +1 -1
  400. package/esm/src/rendering/element-validator/validator-core.d.ts +1 -1
  401. package/esm/src/rendering/element-validator/validator-core.d.ts.map +1 -1
  402. package/esm/src/rendering/layouts/layout-applicator.d.ts +1 -1
  403. package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
  404. package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
  405. package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
  406. package/esm/src/rendering/layouts/utils/component-loader.d.ts +1 -1
  407. package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
  408. package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts +1 -1
  409. package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts.map +1 -1
  410. package/esm/src/rendering/orchestrator/layout.d.ts +1 -1
  411. package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
  412. package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts +1 -1
  413. package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
  414. package/esm/src/rendering/page-renderer.d.ts +1 -1
  415. package/esm/src/rendering/page-renderer.d.ts.map +1 -1
  416. package/esm/src/rendering/page-rendering.d.ts +1 -1
  417. package/esm/src/rendering/page-rendering.d.ts.map +1 -1
  418. package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts +1 -1
  419. package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts.map +1 -1
  420. package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts +1 -1
  421. package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts.map +1 -1
  422. package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts +1 -1
  423. package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts.map +1 -1
  424. package/esm/src/rendering/rsc/server-renderer/tree-processor.js +1 -1
  425. package/esm/src/rendering/snippet-renderer.js +2 -2
  426. package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
  427. package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
  428. package/esm/src/rendering/ssr/component-registry.js +1 -1
  429. package/esm/src/rendering/ssr/mdx-renderer.d.ts +1 -1
  430. package/esm/src/rendering/ssr/mdx-renderer.d.ts.map +1 -1
  431. package/esm/src/rendering/ssr/mdx-renderer.js +1 -1
  432. package/esm/src/rendering/ssr/types.d.ts +1 -1
  433. package/esm/src/rendering/ssr/types.d.ts.map +1 -1
  434. package/esm/src/rendering/ssr-renderer.d.ts +1 -1
  435. package/esm/src/rendering/ssr-renderer.d.ts.map +1 -1
  436. package/esm/src/rendering/utils/react-helpers.d.ts +1 -1
  437. package/esm/src/rendering/utils/react-helpers.d.ts.map +1 -1
  438. package/esm/src/rendering/utils/react-helpers.js +1 -1
  439. package/esm/src/security/http/base-handler.d.ts +2 -0
  440. package/esm/src/security/http/base-handler.d.ts.map +1 -1
  441. package/esm/src/security/http/base-handler.js +1 -0
  442. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  443. package/esm/src/server/handlers/dev/framework-candidates.generated.js +841 -596
  444. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  445. package/esm/src/server/handlers/request/agent-stream.handler.js +4 -1
  446. package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts +1 -1
  447. package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts.map +1 -1
  448. package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
  449. package/esm/src/transforms/mdx/index.d.ts +1 -1
  450. package/esm/src/transforms/mdx/index.d.ts.map +1 -1
  451. package/esm/src/transforms/mdx/index.js +1 -1
  452. package/esm/src/transforms/mdx/mdx-cache-adapter.js +1 -1
  453. package/esm/src/transforms/mdx/module-loader/types.d.ts +1 -1
  454. package/esm/src/transforms/mdx/module-loader/types.d.ts.map +1 -1
  455. package/esm/src/transforms/mdx/types.d.ts +2 -2
  456. package/esm/src/transforms/mdx/types.d.ts.map +1 -1
  457. package/esm/src/types/app.d.ts +1 -1
  458. package/esm/src/types/app.d.ts.map +1 -1
  459. package/esm/src/types/global-guards.d.ts +1 -1
  460. package/esm/src/types/global-guards.d.ts.map +1 -1
  461. package/esm/src/types/index.d.ts +1 -1
  462. package/esm/src/types/index.d.ts.map +1 -1
  463. package/esm/src/utils/id.d.ts +7 -0
  464. package/esm/src/utils/id.d.ts.map +1 -1
  465. package/esm/src/utils/id.js +22 -0
  466. package/esm/src/utils/version-constant.d.ts +1 -1
  467. package/esm/src/utils/version-constant.js +1 -1
  468. package/esm/src/workflow/claude-code/react/use-claude-code-stream.js +1 -1
  469. package/esm/src/workflow/claude-code/react/use-claude-code-websocket.js +1 -1
  470. package/esm/src/workflow/react/use-approval.js +1 -1
  471. package/esm/src/workflow/react/use-workflow-list.js +1 -1
  472. package/esm/src/workflow/react/use-workflow-start.js +1 -1
  473. package/esm/src/workflow/react/use-workflow.js +1 -1
  474. package/package.json +4 -5
  475. package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts +0 -3
  476. package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts.map +0 -1
  477. package/esm/deps/esm.sh/react-dom@19.2.4/client.js +0 -3
  478. package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts +0 -3
  479. package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts.map +0 -1
  480. package/esm/deps/esm.sh/react-dom@19.2.4/server.js +0 -3
  481. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +0 -3
  482. package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +0 -1
  483. package/esm/deps/esm.sh/react-dom@19.2.4.js +0 -3
  484. package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts +0 -3
  485. package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts.map +0 -1
  486. package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.js +0 -3
  487. package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts +0 -3
  488. package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts.map +0 -1
  489. package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.js +0 -3
  490. package/esm/deps/esm.sh/react@19.2.4.d.ts +0 -3
  491. package/esm/deps/esm.sh/react@19.2.4.d.ts.map +0 -1
  492. package/esm/deps/esm.sh/react@19.2.4.js +0 -3
  493. package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts +0 -3
  494. package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts.map +0 -1
  495. package/esm/deps/esm.sh/scheduler@^0.27.0.js +0 -3
  496. package/esm/react/jsx-dev-runtime.d.ts +0 -2
  497. package/esm/react/jsx-dev-runtime.d.ts.map +0 -1
  498. package/esm/react/jsx-dev-runtime.js +0 -1
  499. package/esm/react/jsx-runtime.d.ts +0 -2
  500. package/esm/react/jsx-runtime.d.ts.map +0 -1
  501. package/esm/react/jsx-runtime.js +0 -1
  502. package/esm/react/react-dom-client.d.ts +0 -3
  503. package/esm/react/react-dom-client.d.ts.map +0 -1
  504. package/esm/react/react-dom-client.js +0 -2
  505. package/esm/react/react-dom-server.d.ts +0 -3
  506. package/esm/react/react-dom-server.d.ts.map +0 -1
  507. package/esm/react/react-dom-server.js +0 -2
  508. package/esm/react/react-dom.d.ts +0 -3
  509. package/esm/react/react-dom.d.ts.map +0 -1
  510. package/esm/react/react-dom.js +0 -2
  511. package/esm/react/react.d.ts +0 -6
  512. package/esm/react/react.d.ts.map +0 -1
  513. package/esm/react/react.js +0 -7
@@ -8,7 +8,7 @@
8
8
  * - cloud: server-side provider inference
9
9
  * - server-local: explicit local model on the server
10
10
  */
11
- import { useCallback, useEffect, useRef, useState } from "../../../../react/react.js";
11
+ import { useCallback, useEffect, useRef, useState } from "react";
12
12
  import { createError, ensureError, toError } from "../../../errors/veryfront-error.js";
13
13
  import { handleAgUiStreamingResponse } from "./streaming/index.js";
14
14
  import { generateClientId } from "./utils.js";
@@ -53,6 +53,15 @@ export function resolveUseChatStreamHandler(transport) {
53
53
  */
54
54
  const DEFAULT_CHAT_API = "/api/ag-ui";
55
55
  export function useChat(options = {}) {
56
+ const { reset, ...chat } = useChatState(options);
57
+ void reset;
58
+ return chat;
59
+ }
60
+ /** @internal Chat session with the reset capability used by conversation hosts. */
61
+ export function useChatWithSessionReset(options = {}) {
62
+ return useChatState(options);
63
+ }
64
+ function useChatState(options) {
56
65
  const api = options.api ?? DEFAULT_CHAT_API;
57
66
  const [messages, setMessages] = useState(options.initialMessages ?? []);
58
67
  const messagesRef = useRef(messages);
@@ -71,12 +80,15 @@ export function useChat(options = {}) {
71
80
  const branchKeyByMessageIdRef = useRef(new Map());
72
81
  // Track pending tool outputs for addToolOutput
73
82
  const pendingToolOutputsRef = useRef(new Map());
83
+ const invalidateActiveRequest = useCallback(() => {
84
+ requestIdRef.current++;
85
+ abortControllerRef.current?.abort();
86
+ abortControllerRef.current = null;
87
+ }, []);
74
88
  // Abort in-flight request on unmount
75
89
  useEffect(() => {
76
- return () => {
77
- abortControllerRef.current?.abort();
78
- };
79
- }, []);
90
+ return invalidateActiveRequest;
91
+ }, [invalidateActiveRequest]);
80
92
  /**
81
93
  * Add tool output to pending tool-call parts.
82
94
  * Call from onToolCall to provide results (don't await)
@@ -154,6 +166,8 @@ export function useChat(options = {}) {
154
166
  message,
155
167
  }));
156
168
  }
169
+ if (!isLatestRequest(requestIdRef.current, requestId))
170
+ return;
157
171
  options.onResponse?.(response);
158
172
  if (!response.body)
159
173
  return;
@@ -162,15 +176,19 @@ export function useChat(options = {}) {
162
176
  const currentMessageIdRef = { current: streamingMessageId };
163
177
  // Mutable local — updated by onData before onMessage/onUpdate use it.
164
178
  let serverModel = model;
165
- setActiveModel(undefined);
179
+ setActiveModel((current) => isLatestRequest(requestIdRef.current, requestId) ? undefined : current);
166
180
  const handleResponse = resolveUseChatStreamHandler(options.transport);
167
181
  await handleResponse(response.body, {
168
182
  onMessage: (assistantMessage) => {
183
+ if (!isLatestRequest(requestIdRef.current, requestId))
184
+ return;
169
185
  const withMeta = {
170
186
  ...assistantMessage,
171
187
  metadata: { ...assistantMessage.metadata, model: serverModel },
172
188
  };
173
189
  setMessages((prev) => {
190
+ if (!isLatestRequest(requestIdRef.current, requestId))
191
+ return prev;
174
192
  if (!hasAddedStreamingMessage)
175
193
  return [...prev, withMeta];
176
194
  return prev.map((m) => (m.id === currentMessageIdRef.current
@@ -185,59 +203,76 @@ export function useChat(options = {}) {
185
203
  options.onFinish?.(withMeta);
186
204
  },
187
205
  onData: (eventData) => {
188
- setData(eventData);
206
+ if (!isLatestRequest(requestIdRef.current, requestId))
207
+ return;
208
+ setData((current) => isLatestRequest(requestIdRef.current, requestId) ? eventData : current);
189
209
  // Detect inference mode and resolved model from server metadata
190
210
  if (eventData &&
191
211
  typeof eventData === "object" &&
192
212
  "inferenceMode" in eventData) {
193
213
  const d = eventData;
194
214
  if (d.inferenceMode === "server-local" || d.inferenceMode === "cloud") {
195
- setInferenceMode(d.inferenceMode);
215
+ const nextInferenceMode = d.inferenceMode;
216
+ setInferenceMode((current) => isLatestRequest(requestIdRef.current, requestId) ? nextInferenceMode : current);
196
217
  }
197
218
  if (d.model) {
198
219
  serverModel = d.model;
199
- setActiveModel(d.model);
220
+ setActiveModel((current) => isLatestRequest(requestIdRef.current, requestId) ? d.model : current);
200
221
  }
201
222
  }
202
223
  },
203
224
  onUpdate: (parts, messageId, messageMetadata) => {
225
+ if (!isLatestRequest(requestIdRef.current, requestId))
226
+ return;
204
227
  const id = messageId ?? streamingMessageId;
205
228
  const metadata = { ...messageMetadata, model: serverModel };
206
229
  if (messageId && messageId !== currentMessageIdRef.current) {
207
230
  const oldId = currentMessageIdRef.current;
208
231
  currentMessageIdRef.current = messageId;
209
232
  if (hasAddedStreamingMessage) {
210
- setMessages((prev) => prev.map((m) => m.id === oldId
211
- ? { ...m, id, parts, metadata: { ...m.metadata, ...metadata } }
212
- : m));
233
+ setMessages((prev) => isLatestRequest(requestIdRef.current, requestId)
234
+ ? prev.map((m) => m.id === oldId
235
+ ? { ...m, id, parts, metadata: { ...m.metadata, ...metadata } }
236
+ : m)
237
+ : prev);
213
238
  return;
214
239
  }
215
240
  }
216
241
  if (!hasAddedStreamingMessage) {
217
242
  hasAddedStreamingMessage = true;
218
- setMessages((prev) => [
219
- ...prev,
220
- {
221
- id,
222
- role: "assistant",
223
- parts,
224
- metadata,
225
- // Stamp when the turn first appears; `onMessage` preserves it.
226
- createdAt: new Date().toISOString(),
227
- },
228
- ]);
243
+ setMessages((prev) => isLatestRequest(requestIdRef.current, requestId)
244
+ ? [
245
+ ...prev,
246
+ {
247
+ id,
248
+ role: "assistant",
249
+ parts,
250
+ metadata,
251
+ // Stamp when the turn first appears; `onMessage` preserves it.
252
+ createdAt: new Date().toISOString(),
253
+ },
254
+ ]
255
+ : prev);
229
256
  return;
230
257
  }
231
- setMessages((prev) => prev.map((m) => m.id === currentMessageIdRef.current
232
- ? { ...m, parts, metadata: { ...m.metadata, ...metadata } }
233
- : m));
258
+ setMessages((prev) => isLatestRequest(requestIdRef.current, requestId)
259
+ ? prev.map((m) => m.id === currentMessageIdRef.current
260
+ ? { ...m, parts, metadata: { ...m.metadata, ...metadata } }
261
+ : m)
262
+ : prev);
234
263
  },
235
- onToolCall: options.onToolCall,
264
+ onToolCall: options.onToolCall
265
+ ? (arg) => isLatestRequest(requestIdRef.current, requestId)
266
+ ? options.onToolCall?.(arg)
267
+ : undefined
268
+ : undefined,
236
269
  });
237
270
  }
238
271
  catch (error) {
239
272
  if (error instanceof Error && error.name === "AbortError")
240
273
  return;
274
+ if (!isLatestRequest(requestIdRef.current, requestId))
275
+ return;
241
276
  const nextError = ensureError(error);
242
277
  setError(nextError);
243
278
  options.onError?.(nextError);
@@ -273,10 +308,31 @@ export function useChat(options = {}) {
273
308
  * Stop generation
274
309
  */
275
310
  const stop = useCallback(() => {
276
- abortControllerRef.current?.abort();
277
- abortControllerRef.current = null;
311
+ // Abort cannot retract a chunk that was already decoded. Advancing the
312
+ // request id also fences callbacks and state updaters queued by that chunk.
313
+ invalidateActiveRequest();
278
314
  setIsLoading(false);
279
- }, []);
315
+ }, [invalidateActiveRequest]);
316
+ /**
317
+ * Reset state that belongs to one conversation while preserving the hook
318
+ * instance. This gives conversation hosts the same isolation as remounting
319
+ * `useChat`, including branch metadata that cannot be inferred from messages.
320
+ */
321
+ const reset = useCallback((nextMessages = []) => {
322
+ invalidateActiveRequest();
323
+ messagesRef.current = nextMessages;
324
+ branchMapRef.current.clear();
325
+ branchKeyByMessageIdRef.current.clear();
326
+ pendingToolOutputsRef.current.clear();
327
+ setMessages(nextMessages);
328
+ setInput("");
329
+ setIsLoading(false);
330
+ setError(null);
331
+ setData(null);
332
+ setModel(options.model);
333
+ setInferenceMode("cloud");
334
+ setActiveModel(undefined);
335
+ }, [invalidateActiveRequest, options.model]);
280
336
  /**
281
337
  * Edit a previous user message and resubmit.
282
338
  * Saves the current messages from the edit point as a branch so the user
@@ -403,14 +459,11 @@ export function useChat(options = {}) {
403
459
  switchBranch,
404
460
  reload,
405
461
  stop,
462
+ reset,
406
463
  setMessages,
407
464
  addToolOutput,
408
465
  data,
409
466
  handleInputChange,
410
467
  handleSubmit,
411
- // Aliases that match ChatProps so users can spread {...chat}
412
- onChange: handleInputChange,
413
- onSubmit: handleSubmit,
414
- onModelChange: setModel,
415
468
  };
416
469
  }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Single text completion with streaming support.
5
5
  */
6
- import { useCallback, useRef, useState } from "../../../react/react.js";
6
+ import { useCallback, useRef, useState } from "react";
7
7
  import { createError, toError } from "../../errors/veryfront-error.js";
8
8
  /**
9
9
  * useCompletion hook for single text generation
@@ -1,4 +1,4 @@
1
- import { useCallback, useRef, useState } from "../../../react/react.js";
1
+ import { useCallback, useRef, useState } from "react";
2
2
  import { createError, toError } from "../../errors/veryfront-error.js";
3
3
  /** React hook for streaming. */
4
4
  export function useStreaming(options) {
@@ -1,4 +1,4 @@
1
- import * as React from "../../../react/react.js";
1
+ import * as React from "react";
2
2
  /** Input payload for use voice. */
3
3
  export function useVoiceInput(options = {}) {
4
4
  const { language, continuous = false, interimResults = true, onTranscript, onError, onStart, onEnd, } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/src/cache/backends/api.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAqDhD,qBAAa,eAAgB,YAAW,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAG,KAAK,CAAU;IAC/B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAC;gBAGrB,OAAO,GAAE;QACP,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KACxB;IAiBR,OAAO,CAAC,SAAS;YAIH,OAAO;IAsGf,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQxC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,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AKvB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYrF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/B,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMrD"}
@@ -66,13 +66,16 @@ export class ApiCacheBackend {
66
66
  const reqCtx = getCurrentRequestContext();
67
67
  const hostToken = getHostEnv("VERYFRONT_API_TOKEN");
68
68
  const envToken = getEnvValue("VERYFRONT_API_TOKEN");
69
- // Cache API calls are framework-owned operations; use the host token when
70
- // available so project/request-scoped credentials cannot shadow it.
71
- const token = hostToken || reqCtx?.token || envToken || null;
72
- const tokenSource = hostToken
73
- ? "host-env"
74
- : reqCtx?.token
75
- ? "request"
69
+ const verifiedRequestToken = reqCtx?.tokenTrust === "verified-control-plane"
70
+ ? reqCtx.token
71
+ : undefined;
72
+ // Ordinary proxy headers are not cache credentials. Only a request token
73
+ // explicitly marked after control-plane verification may override the host.
74
+ const token = verifiedRequestToken || hostToken || envToken || null;
75
+ const tokenSource = verifiedRequestToken
76
+ ? "verified-control-plane"
77
+ : hostToken
78
+ ? "host-env"
76
79
  : envToken
77
80
  ? "env"
78
81
  : "none";
@@ -9,14 +9,7 @@
9
9
  *
10
10
  * export default function Page() {
11
11
  * const chat = useChat();
12
- * return (
13
- * <Chat
14
- * messages={chat.messages}
15
- * input={chat.input}
16
- * onChange={chat.handleInputChange}
17
- * onSubmit={chat.handleSubmit}
18
- * />
19
- * );
12
+ * return <Chat chat={chat} />;
20
13
  * }
21
14
  * ```
22
15
  *
@@ -47,17 +40,17 @@
47
40
  * </Message.Root>
48
41
  * ```
49
42
  */
50
- export { Chat, ChatComponents, type ChatProps } from "../react/components/chat/chat.js";
51
- export { ChatEmpty, type ChatEmptyProps, ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageProps, type MessageRootProps, ModelAvatar, type ModelAvatarProps, } from "../react/components/chat/chat.js";
52
- export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "../react/components/chat/chat.js";
53
- export { AgentAvatar, type AgentAvatarProps, type AttachmentInfo, AttachmentsPanel, type AttachmentsPanelActionProps, type AttachmentsPanelContextValue, type AttachmentsPanelEmptyProps, type AttachmentsPanelItemProps, type AttachmentsPanelListProps, type AttachmentsPanelLoadingProps, type AttachmentsPanelProps, BranchPicker, type BranchPickerProps, ChatMessagesSkeleton, type ChatMessagesSkeletonProps, ChatSidebar, type ChatSidebarComponent, type ChatSidebarEmptyProps, type ChatSidebarGroupProps, type ChatSidebarIcons, type ChatSidebarItemProps, type ChatSidebarListProps, type ChatSidebarNewButtonProps, type ChatSidebarProps, type ChatSidebarRootProps, type ChatTab, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, type MessageActionBarProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorContentProps, type ModelSelectorContextValue, type ModelSelectorItemProps, type ModelSelectorProps, type ModelSelectorTriggerProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, SourcePill, type SourcePillProps, Sources, type SourcesContextValue, type SourcesListProps, type SourcesProps, StepIndicator, type StepIndicatorContextValue, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, ToolCallCard, ToolStatusBadge, type UploadedFile, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, type UseStickToBottomOptions, type UseStickToBottomResult, useUpload, type UseUploadOptions, type UseUploadResult, useUploadsRegistry, type UseUploadsRegistryOptions, type UseUploadsRegistryResult, } from "../react/components/chat/chat.js";
54
- export { type Conversation, type ConversationPatch, ConversationsContextProvider, ConversationsProvider, type ConversationsProviderProps, type ConversationStore, type ConversationSummary, localConversationStore, memoryConversationStore, type StorageLike, useConversation, type UseConversationOptions, type UseConversationResult, useConversations, useConversationsContext, useConversationsContextOptional, type UseConversationsOptions, type UseConversationsResult, } from "../react/components/chat/chat.js";
55
- export { AttachmentPill, AttachmentPill as Attachment, type AttachmentPillContextValue, type AttachmentPillProps, type AttachmentPillProps as AttachmentProps, AttachmentsPanel as UploadsPanel, type AttachmentsPanelProps as UploadsPanelProps, ChatInput, ChatInput as ChatComposer, type ChatInputProps, type ChatInputProps as ChatComposerProps, Message as StandaloneMessage, Message as StreamingMessage, MessageActionBar as MessageActions, type MessageActionBarProps as MessageActionsProps, type MessageProps as StandaloneMessageProps, type MessageProps as StreamingMessageProps, Reasoning, type ReasoningContextValue, type ReasoningProps, type ReasoningTriggerProps, ToolCall, type ToolCallContextValue, type ToolCallProps, type ToolCallTriggerProps, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
43
+ export { Chat, type ChatAgentInfo, type ChatProps, } from "../react/components/chat/chat.js";
44
+ export { ChatEmpty, type ChatEmptyProps, ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListContentProps, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageProps, type MessageRootProps, type MessageTokensProps, ModelAvatar, type ModelAvatarProps, type TokenRowProps, } from "../react/components/chat/chat.js";
45
+ export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, type MessagePartsData, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useMessageParts, } from "../react/components/chat/chat.js";
46
+ export { AgentAvatar, type AgentAvatarProps, type AttachmentInfo, AttachmentsPanel, type AttachmentsPanelActionProps, type AttachmentsPanelContextValue, type AttachmentsPanelEmptyProps, type AttachmentsPanelItemProps, type AttachmentsPanelListProps, type AttachmentsPanelLoadingProps, type AttachmentsPanelProps, BranchPicker, type BranchPickerActionProps, type BranchPickerCountProps, type BranchPickerProps, ChatMessagesSkeleton, type ChatMessagesSkeletonProps, ChatSidebar, type ChatSidebarComponent, type ChatSidebarEmptyProps, type ChatSidebarGroupProps, type ChatSidebarItemProps, type ChatSidebarListProps, type ChatSidebarNewButtonProps, type ChatSidebarProps, type ChatSidebarRootProps, type ChatTab, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationCardProps, type InlineCitationProps, type InlineCitationTriggerProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, type MessageActionBarActionProps, type MessageActionBarProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackActionProps, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorContentProps, type ModelSelectorContextValue, type ModelSelectorItemProps, type ModelSelectorProps, type ModelSelectorSearchProps, type ModelSelectorTriggerProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, SourcePill, type SourcePillProps, Sources, type SourcesContextValue, type SourcesListProps, type SourcesProps, StepIndicator, type StepIndicatorContextValue, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, ToolStatusBadge, type UploadedFile, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, type UseStickToBottomOptions, type UseStickToBottomResult, useUpload, type UseUploadOptions, type UseUploadResult, useUploadsRegistry, type UseUploadsRegistryOptions, type UseUploadsRegistryResult, } from "../react/components/chat/chat.js";
47
+ export { type Conversation, type ConversationPatch, ConversationsContextProvider, ConversationsProvider, type ConversationsProviderProps, type ConversationStore, type ConversationSummary, localConversationStore, memoryConversationStore, type StorageLike, useConversation, useConversationChat, type UseConversationChatOptions, type UseConversationChatResult, type UseConversationOptions, type UseConversationResult, useConversations, useConversationsContext, useConversationsContextOptional, type UseConversationsOptions, type UseConversationsResult, } from "../react/components/chat/chat.js";
48
+ export { AttachmentPill, type AttachmentPillContextValue, type AttachmentPillProps, ChatInput, type ChatInputExportProps, type ChatInputProps, Reasoning, type ReasoningContextValue, type ReasoningProps, type ReasoningTriggerProps, ToolCall, type ToolCallContextValue, type ToolCallProps, type ToolCallTriggerProps, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
56
49
  export { Markdown, type MarkdownProps } from "../react/components/chat/markdown.js";
57
50
  export { AppShell, type AppShellHeaderProps, type AppShellOpenState, type AppShellProps, type AppShellSide, type AppShellSidebarProps, type AppShellTriggerProps, useAppShell, } from "../react/components/ui/app-shell.js";
58
51
  export { Tabs, TabsItem, type TabsItemProps, type TabsProps, } from "../react/components/ui/tabs.js";
59
52
  export { ChatThemeScope, type ChatThemeScopeProps, } from "../react/components/chat/chat-theme-scope.js";
60
- export { type AgentOption, AgentPicker, type AgentPickerContentProps, type AgentPickerContextValue, type AgentPickerItemProps, type AgentPickerProps, type AgentPickerSection, type AgentPickerTriggerProps, useAgentPicker, } from "../react/components/chat/agent-picker.js";
53
+ export { type AgentOption, AgentPicker, type AgentPickerActionProps, type AgentPickerContentProps, type AgentPickerContextValue, type AgentPickerItemProps, type AgentPickerProps, type AgentPickerSearchProps, type AgentPickerSection, type AgentPickerTriggerProps, useAgentPicker, } from "../react/components/chat/agent-picker.js";
61
54
  export { agentsToPickerOptions, ChatAgentPicker, type ChatAgentPickerProps, } from "../react/components/chat/chat-agent-picker.js";
62
55
  export { type ChatActionItem, ChatActions, type ChatActionsContentProps, type ChatActionsContextValue, type ChatActionsItemProps, type ChatActionsProps, type ChatActionsSettings, type ChatActionsTriggerProps, useChatActions, } from "../react/components/chat/chat-actions.js";
63
56
  export { CodeBlock, CodeSurface, type CodeSurfaceProps, CopyButton, type CopyButtonProps, useClipboard, type UseClipboardResult, } from "../react/components/ui/code-block.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,8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AC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,SAAS,GACf,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,MAAM,EACN,KAAK,WAAW,EAChB,eAAe,EACf,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,QAAQ,EACR,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,GACnB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,gBAAgB,EAChB,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC1B,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,sBAAs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EACxB,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,0BAA0B,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,wBAAwB,EACxB,6BAA6B,EAC7B,mCAAmC,EACnC,2CAA2C,EAC3C,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,sBAAsB,CAAC"}
@@ -9,14 +9,7 @@
9
9
  *
10
10
  * export default function Page() {
11
11
  * const chat = useChat();
12
- * return (
13
- * <Chat
14
- * messages={chat.messages}
15
- * input={chat.input}
16
- * onChange={chat.handleInputChange}
17
- * onSubmit={chat.handleSubmit}
18
- * />
19
- * );
12
+ * return <Chat chat={chat} />;
20
13
  * }
21
14
  * ```
22
15
  *
@@ -47,19 +40,17 @@
47
40
  * </Message.Root>
48
41
  * ```
49
42
  */
50
- export { Chat, ChatComponents } from "../react/components/chat/chat.js";
43
+ export { Chat, } from "../react/components/chat/chat.js";
51
44
  export { ChatEmpty, ChatEmptyState, ChatIf, ChatMessageList, ChatRoot, ErrorBanner, Message, ModelAvatar, } from "../react/components/chat/chat.js";
52
- export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "../react/components/chat/chat.js";
53
- export { AgentAvatar, AttachmentsPanel, BranchPicker, ChatMessagesSkeleton, ChatSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, SourcePill, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, useUpload, useUploadsRegistry, } from "../react/components/chat/chat.js";
45
+ export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useMessageParts, } from "../react/components/chat/chat.js";
46
+ export { AgentAvatar, AttachmentsPanel, BranchPicker, ChatMessagesSkeleton, ChatSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, RichCodeBlock, Shimmer, SkillBadge, SourcePill, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolStatusBadge, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, useUpload, useUploadsRegistry, } from "../react/components/chat/chat.js";
54
47
  // Conversation persistence adapters — swappable async stores behind the
55
48
  // (upcoming) `useConversations` hook. localStorage default; idb/api are follow-ups.
56
- export { ConversationsContextProvider, ConversationsProvider, localConversationStore, memoryConversationStore, useConversation, useConversations, useConversationsContext, useConversationsContextOptional, } from "../react/components/chat/chat.js";
49
+ export { ConversationsContextProvider, ConversationsProvider, localConversationStore, memoryConversationStore, useConversation, useConversationChat, useConversations, useConversationsContext, useConversationsContextOptional, } from "../react/components/chat/chat.js";
57
50
  // ---------------------------------------------------------------------------
58
- // Target component names. This chat surface intentionally completes the
59
- // migration away from the old Thread, Composer, and standalone message exports.
60
- // Use these names for new code and see the chat UI guide for migration notes.
51
+ // Canonical component names.
61
52
  // ---------------------------------------------------------------------------
62
- export { AttachmentPill, AttachmentPill as Attachment, AttachmentsPanel as UploadsPanel, ChatInput, ChatInput as ChatComposer, Message as StandaloneMessage, Message as StreamingMessage, MessageActionBar as MessageActions, Reasoning, ToolCall, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
53
+ export { AttachmentPill, ChatInput, Reasoning, ToolCall, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
63
54
  export { Markdown } from "../react/components/chat/markdown.js";
64
55
  // Layout primitives — chat-independent, re-exported from the `veryfront/ui`
65
56
  // package (their home) so consuming apps can compose their own shell (sidebar
@@ -1,5 +1,5 @@
1
1
  import type { RuntimeAdapter } from "../../platform/adapters/base.js";
2
- import type * as React from "../../../react/react.js";
2
+ import type * as React from "react";
3
3
  export interface ComponentExports {
4
4
  default?: unknown;
5
5
  [key: string]: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/component-registry/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,yBAAyB,CAAC;AAGtD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,CAA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E,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CACH;CA2BF"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/component-registry/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/F,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,qBAAa,iBAAiB;IAOhB,OAAO,CAAC,OAAO;IAN3B,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,aAAa,CAAW;IAChC,OAAO,CAAC,kBAAkB,CAA8B;IACxD,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,WAAW,CAAS;gBAER,OAAO,EAAE,wBAAwB;IAUrD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAeX,iBAAiB;YAsBjB,aAAa;IAmC3B,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA4B1D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAI5C,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC;IAIpC,SAAS,IAAI,eAAe,GAAG,SAAS;IAIxC,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAWlE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAUrD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,KAAK,IAAI,IAAI;IAMb,iBAAiB,IAAI,MAAM,EAAE;IAIvB,cAAc,IAAI,OAAO,CAC7B,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CACH;CA2BF"}
@@ -1,4 +1,4 @@
1
- import type * as React from "../../../react/react.js";
1
+ import type * as React from "react";
2
2
  import type { RuntimeAdapter } from "../../platform/adapters/base.js";
3
3
  import type { LoadComponentOptions } from "./types.js";
4
4
  export declare function loadModuleFromSource(source: string, filePath: string, projectDir: string, adapter: RuntimeAdapter, options?: LoadComponentOptions): Promise<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"component-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/component-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA2DlC;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAGvD"}
1
+ {"version":3,"file":"component-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/component-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA2DlC;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAGvD"}
@@ -1,3 +1,3 @@
1
- import type * as React from "../../../react/react.js";
1
+ import type * as React from "react";
2
2
  export declare function extractComponent(mod: unknown, filePath: string): React.ComponentType<Record<string, unknown>>;
3
3
  //# sourceMappingURL=extract-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-component.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/extract-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,yBAAyB,CAAC;AAGtD,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,MAAM,GACf,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0B9C"}
1
+ {"version":3,"file":"extract-component.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/extract-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,MAAM,GACf,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0B9C"}
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @module module-system/react-loader/ssr-module-loader/loader
7
7
  */
8
- import type * as React from "../../../../react/react.js";
8
+ import type * as React from "react";
9
9
  import type { SSRModuleLoaderOptions } from "./types.js";
10
10
  /**
11
11
  * SSR Module Loader with Redis Support.
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,4B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O,CAAC,wBAAwB;IAMhC,OAAO,CAAC,kCAAkC;IAY1C,aAAa,CACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAwD7B,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAK1C,2BAA2B;IAYzC,OAAO,CAAC,yBAAyB;YAkBnB,2BAA2B;CAiW1C"}
@@ -1,4 +1,4 @@
1
- import type * as React from "../../../react/react.js";
1
+ import type * as React from "react";
2
2
  export interface LoadComponentOptions {
3
3
  projectId?: string;
4
4
  /** Project slug for cache directory (human-readable name) */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,yBAAyB,CAAC;AAEtD,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -2,8 +2,9 @@ import type { DirectoryEntry, FSAdapter, FSAdapterConfig } from "./types.js";
2
2
  import type { FileInfo, ResolveFileOptions } from "../../base.js";
3
3
  import { ProxyFSAdapterManager } from "./proxy-manager.js";
4
4
  import type { VeryfrontFSAdapter } from "./adapter.js";
5
+ import { type RequestTokenTrust } from "./request-context.js";
5
6
  export { clearRequestScopedFileCache, getCurrentRequestContext, getRequestScopedFile, runWithRequestContext, setRequestScopedFile, wrapWithCurrentContext, } from "./request-context.js";
6
- export type { RequestContext } from "./request-context.js";
7
+ export type { RequestContext, RequestTokenTrust } from "./request-context.js";
7
8
  export declare class MultiProjectFSAdapter implements FSAdapter {
8
9
  private manager;
9
10
  private defaultAdapter?;
@@ -13,6 +14,7 @@ export declare class MultiProjectFSAdapter implements FSAdapter {
13
14
  releaseId?: string | null;
14
15
  branch?: string | null;
15
16
  environmentName?: string | null;
17
+ tokenTrust?: RequestTokenTrust;
16
18
  }): Promise<T>;
17
19
  setRequestContext(projectSlug: string, token: string): void;
18
20
  setProductionMode(_enabled: boolean, _releaseId?: string | null): void;
@@ -1 +1 @@
1
- {"version":3,"file":"multi-project-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/multi-project-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAOvD,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,qBAAa,qBAAsB,YAAW,SAAS;IACrD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAAC,CAAqB;gBAEhC,MAAM,EAAE,eAAe;IAanC,cAAc,CAAC,CAAC,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;Q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CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAI1D,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC;IAUvF,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUpE,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAoB9E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAExF"}
1
+ {"version":3,"file":"multi-project-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/multi-project-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAQ9E,qBAAa,qBAAsB,YAAW,SAAS;IACrD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAAC,CAAqB;gBAEhC,MAAM,EAAE,eAAe;IAanC,cAAc,CAAC,CAAC,EACd,WAAW,EAAE,MA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AC3B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAKnB,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY3D,OAAO,IAAI,IAAI;IAOf,eAAe,IAAI,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAI1D,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC;IAUvF,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUpE,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAoB9E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAExF"}
@@ -40,6 +40,7 @@ export class MultiProjectFSAdapter {
40
40
  projectSlug,
41
41
  projectId,
42
42
  token,
43
+ tokenTrust: options?.tokenTrust,
43
44
  productionMode,
44
45
  releaseId: productionMode ? releaseId : null,
45
46
  branch: productionMode ? null : branch,
@@ -71,6 +72,7 @@ export class MultiProjectFSAdapter {
71
72
  return;
72
73
  store.projectSlug = projectSlug;
73
74
  store.token = token;
75
+ store.tokenTrust = undefined;
74
76
  }
75
77
  setProductionMode(_enabled, _releaseId) {
76
78
  // No-op: In proxy mode, productionMode/releaseId are passed via runWithContext().
@@ -1,8 +1,11 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
+ export type RequestTokenTrust = "verified-control-plane";
2
3
  export interface RequestContext {
3
4
  projectSlug: string;
4
5
  projectId?: string;
5
6
  token: string;
7
+ /** Trust marker set only after the control-plane request signature is verified. */
8
+ tokenTrust?: RequestTokenTrust;
6
9
  productionMode: boolean;
7
10
  /** Release ID for production mode (mutually exclusive with branch) */
8
11
  releaseId?: string | null;
@@ -40,6 +43,7 @@ export declare function clearRequestScopedFileCache(): number;
40
43
  export declare function runWithRequestContext<T>(options: {
41
44
  projectSlug: string;
42
45
  token: string;
46
+ tokenTrust?: RequestTokenTrust;
43
47
  projectId?: string;
44
48
  productionMode?: boolean;
45
49
  releaseId?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,mCAA0C,CAAC;AAEzE,wBAAgB,wBAAwB,IAAI,cAAc,GAAG,IAAI,CAEhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAOxF;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEzE;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE5E;AAED,wBAAgB,2BAA2B,IAAI,MAAM,CAKpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,OAAO,EAAE;IACP,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,EACD,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED;;;;GAIG;AACH,UAAU,2BAA2B;IACnC,wBAAwB,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IACtD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,2BAA2B,EAAE,MAAM,MAAM,CAAC;CAC3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,0BAA0B,EAAE,2BAA2B,GAAG,SAAS,CAAC;CACzE"}
1
+ {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB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IACnC,wBAAwB,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IACtD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,2BAA2B,EAAE,MAAM,MAAM,CAAC;CAC3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,0BAA0B,EAAE,2BAA2B,GAAG,SAAS,CAAC;CACzE"}
@@ -43,6 +43,7 @@ export function runWithRequestContext(options, fn) {
43
43
  projectSlug: options.projectSlug,
44
44
  projectId: options.projectId,
45
45
  token: options.token,
46
+ tokenTrust: options.tokenTrust,
46
47
  productionMode,
47
48
  releaseId: options.releaseId ?? null,
48
49
  branch: productionMode ? null : (options.branch ?? null),