@jini-ai/chat 0.1.0

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 (444) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +109 -0
  3. package/dist/core/agentic/chat-capabilities.d.ts +19 -0
  4. package/dist/core/agentic/chat-capabilities.d.ts.map +1 -0
  5. package/dist/core/agentic/chat-capabilities.js +106 -0
  6. package/dist/core/agentic/chat-capabilities.js.map +1 -0
  7. package/dist/core/agentic/index.d.ts +22 -0
  8. package/dist/core/agentic/index.d.ts.map +1 -0
  9. package/dist/core/agentic/index.js +21 -0
  10. package/dist/core/agentic/index.js.map +1 -0
  11. package/dist/core/events.d.ts +84 -0
  12. package/dist/core/events.d.ts.map +1 -0
  13. package/dist/core/events.js +14 -0
  14. package/dist/core/events.js.map +1 -0
  15. package/dist/core/index.d.ts +40 -0
  16. package/dist/core/index.d.ts.map +1 -0
  17. package/dist/core/index.js +40 -0
  18. package/dist/core/index.js.map +1 -0
  19. package/dist/core/messages.d.ts +53 -0
  20. package/dist/core/messages.d.ts.map +1 -0
  21. package/dist/core/messages.js +16 -0
  22. package/dist/core/messages.js.map +1 -0
  23. package/dist/core/partial-json.d.ts +36 -0
  24. package/dist/core/partial-json.d.ts.map +1 -0
  25. package/dist/core/partial-json.js +119 -0
  26. package/dist/core/partial-json.js.map +1 -0
  27. package/dist/core/persistence/index.d.ts +11 -0
  28. package/dist/core/persistence/index.d.ts.map +1 -0
  29. package/dist/core/persistence/index.js +11 -0
  30. package/dist/core/persistence/index.js.map +1 -0
  31. package/dist/core/persistence/ports.d.ts +124 -0
  32. package/dist/core/persistence/ports.d.ts.map +1 -0
  33. package/dist/core/persistence/ports.js +2 -0
  34. package/dist/core/persistence/ports.js.map +1 -0
  35. package/dist/core/persistence/title.d.ts +35 -0
  36. package/dist/core/persistence/title.d.ts.map +1 -0
  37. package/dist/core/persistence/title.js +137 -0
  38. package/dist/core/persistence/title.js.map +1 -0
  39. package/dist/core/question-form/format.d.ts +27 -0
  40. package/dist/core/question-form/format.d.ts.map +1 -0
  41. package/dist/core/question-form/format.js +45 -0
  42. package/dist/core/question-form/format.js.map +1 -0
  43. package/dist/core/question-form/normalize.d.ts +30 -0
  44. package/dist/core/question-form/normalize.d.ts.map +1 -0
  45. package/dist/core/question-form/normalize.js +192 -0
  46. package/dist/core/question-form/normalize.js.map +1 -0
  47. package/dist/core/question-form/scan.d.ts +50 -0
  48. package/dist/core/question-form/scan.d.ts.map +1 -0
  49. package/dist/core/question-form/scan.js +404 -0
  50. package/dist/core/question-form/scan.js.map +1 -0
  51. package/dist/core/question-form/types.d.ts +83 -0
  52. package/dist/core/question-form/types.d.ts.map +1 -0
  53. package/dist/core/question-form/types.js +11 -0
  54. package/dist/core/question-form/types.js.map +1 -0
  55. package/dist/core/question-form.d.ts +39 -0
  56. package/dist/core/question-form.d.ts.map +1 -0
  57. package/dist/core/question-form.js +4 -0
  58. package/dist/core/question-form.js.map +1 -0
  59. package/dist/core/todos.d.ts +70 -0
  60. package/dist/core/todos.d.ts.map +1 -0
  61. package/dist/core/todos.js +175 -0
  62. package/dist/core/todos.js.map +1 -0
  63. package/dist/core/tool-events.d.ts +18 -0
  64. package/dist/core/tool-events.d.ts.map +1 -0
  65. package/dist/core/tool-events.js +36 -0
  66. package/dist/core/tool-events.js.map +1 -0
  67. package/dist/core/tools.d.ts +51 -0
  68. package/dist/core/tools.d.ts.map +1 -0
  69. package/dist/core/tools.js +41 -0
  70. package/dist/core/tools.js.map +1 -0
  71. package/dist/core/transcript.d.ts +81 -0
  72. package/dist/core/transcript.d.ts.map +1 -0
  73. package/dist/core/transcript.js +133 -0
  74. package/dist/core/transcript.js.map +1 -0
  75. package/dist/core/transport.d.ts +109 -0
  76. package/dist/core/transport.d.ts.map +1 -0
  77. package/dist/core/transport.js +2 -0
  78. package/dist/core/transport.js.map +1 -0
  79. package/dist/core/util/index.d.ts +16 -0
  80. package/dist/core/util/index.d.ts.map +1 -0
  81. package/dist/core/util/index.js +16 -0
  82. package/dist/core/util/index.js.map +1 -0
  83. package/dist/core/util/manifest.d.ts +39 -0
  84. package/dist/core/util/manifest.d.ts.map +1 -0
  85. package/dist/core/util/manifest.js +173 -0
  86. package/dist/core/util/manifest.js.map +1 -0
  87. package/dist/core/util/markdown-context.d.ts +47 -0
  88. package/dist/core/util/markdown-context.d.ts.map +1 -0
  89. package/dist/core/util/markdown-context.js +125 -0
  90. package/dist/core/util/markdown-context.js.map +1 -0
  91. package/dist/core/util/markup-attributes.d.ts +20 -0
  92. package/dist/core/util/markup-attributes.d.ts.map +1 -0
  93. package/dist/core/util/markup-attributes.js +33 -0
  94. package/dist/core/util/markup-attributes.js.map +1 -0
  95. package/dist/core/util/parser.d.ts +42 -0
  96. package/dist/core/util/parser.d.ts.map +1 -0
  97. package/dist/core/util/parser.js +238 -0
  98. package/dist/core/util/parser.js.map +1 -0
  99. package/dist/core/util/pointer.d.ts +28 -0
  100. package/dist/core/util/pointer.d.ts.map +1 -0
  101. package/dist/core/util/pointer.js +75 -0
  102. package/dist/core/util/pointer.js.map +1 -0
  103. package/dist/core/util/recover.d.ts +40 -0
  104. package/dist/core/util/recover.d.ts.map +1 -0
  105. package/dist/core/util/recover.js +117 -0
  106. package/dist/core/util/recover.js.map +1 -0
  107. package/dist/core/util/strip.d.ts +112 -0
  108. package/dist/core/util/strip.d.ts.map +1 -0
  109. package/dist/core/util/strip.js +333 -0
  110. package/dist/core/util/strip.js.map +1 -0
  111. package/dist/core/util/types.d.ts +31 -0
  112. package/dist/core/util/types.d.ts.map +1 -0
  113. package/dist/core/util/types.js +2 -0
  114. package/dist/core/util/types.js.map +1 -0
  115. package/dist/core/util/validate.d.ts +50 -0
  116. package/dist/core/util/validate.d.ts.map +1 -0
  117. package/dist/core/util/validate.js +202 -0
  118. package/dist/core/util/validate.js.map +1 -0
  119. package/dist/react/agent-bridge/frontend-session-bridge.d.ts +45 -0
  120. package/dist/react/agent-bridge/frontend-session-bridge.d.ts.map +1 -0
  121. package/dist/react/agent-bridge/frontend-session-bridge.js +214 -0
  122. package/dist/react/agent-bridge/frontend-session-bridge.js.map +1 -0
  123. package/dist/react/artifact-types.d.ts +61 -0
  124. package/dist/react/artifact-types.d.ts.map +1 -0
  125. package/dist/react/artifact-types.js +33 -0
  126. package/dist/react/artifact-types.js.map +1 -0
  127. package/dist/react/chat-pane.d.ts +21 -0
  128. package/dist/react/chat-pane.d.ts.map +1 -0
  129. package/dist/react/chat-pane.js +20 -0
  130. package/dist/react/chat-pane.js.map +1 -0
  131. package/dist/react/components/A2uiSurfaceCard.d.ts +35 -0
  132. package/dist/react/components/A2uiSurfaceCard.d.ts.map +1 -0
  133. package/dist/react/components/A2uiSurfaceCard.js +272 -0
  134. package/dist/react/components/A2uiSurfaceCard.js.map +1 -0
  135. package/dist/react/components/AttachmentTray.d.ts +6 -0
  136. package/dist/react/components/AttachmentTray.d.ts.map +1 -0
  137. package/dist/react/components/AttachmentTray.js +30 -0
  138. package/dist/react/components/AttachmentTray.js.map +1 -0
  139. package/dist/react/components/ChatFab.d.ts +8 -0
  140. package/dist/react/components/ChatFab.d.ts.map +1 -0
  141. package/dist/react/components/ChatFab.js +24 -0
  142. package/dist/react/components/ChatFab.js.map +1 -0
  143. package/dist/react/components/Composer.d.ts +34 -0
  144. package/dist/react/components/Composer.d.ts.map +1 -0
  145. package/dist/react/components/Composer.js +300 -0
  146. package/dist/react/components/Composer.js.map +1 -0
  147. package/dist/react/components/ComposerDiscovery.d.ts +46 -0
  148. package/dist/react/components/ComposerDiscovery.d.ts.map +1 -0
  149. package/dist/react/components/ComposerDiscovery.js +38 -0
  150. package/dist/react/components/ComposerDiscovery.js.map +1 -0
  151. package/dist/react/components/ConversationList.d.ts +31 -0
  152. package/dist/react/components/ConversationList.d.ts.map +1 -0
  153. package/dist/react/components/ConversationList.js +221 -0
  154. package/dist/react/components/ConversationList.js.map +1 -0
  155. package/dist/react/components/ExtEventErrorBoundary.d.ts +35 -0
  156. package/dist/react/components/ExtEventErrorBoundary.d.ts.map +1 -0
  157. package/dist/react/components/ExtEventErrorBoundary.js +38 -0
  158. package/dist/react/components/ExtEventErrorBoundary.js.map +1 -0
  159. package/dist/react/components/Icon.d.ts +17 -0
  160. package/dist/react/components/Icon.d.ts.map +1 -0
  161. package/dist/react/components/Icon.js +46 -0
  162. package/dist/react/components/Icon.js.map +1 -0
  163. package/dist/react/components/JiniChatProvider.d.ts +45 -0
  164. package/dist/react/components/JiniChatProvider.d.ts.map +1 -0
  165. package/dist/react/components/JiniChatProvider.js +44 -0
  166. package/dist/react/components/JiniChatProvider.js.map +1 -0
  167. package/dist/react/components/Markdown.d.ts +5 -0
  168. package/dist/react/components/Markdown.d.ts.map +1 -0
  169. package/dist/react/components/Markdown.js +390 -0
  170. package/dist/react/components/Markdown.js.map +1 -0
  171. package/dist/react/components/McpUiSurfaceCard.d.ts +51 -0
  172. package/dist/react/components/McpUiSurfaceCard.d.ts.map +1 -0
  173. package/dist/react/components/McpUiSurfaceCard.js +159 -0
  174. package/dist/react/components/McpUiSurfaceCard.js.map +1 -0
  175. package/dist/react/components/MessageList.d.ts +15 -0
  176. package/dist/react/components/MessageList.d.ts.map +1 -0
  177. package/dist/react/components/MessageList.js +81 -0
  178. package/dist/react/components/MessageList.js.map +1 -0
  179. package/dist/react/components/MessageRow.d.ts +60 -0
  180. package/dist/react/components/MessageRow.d.ts.map +1 -0
  181. package/dist/react/components/MessageRow.js +156 -0
  182. package/dist/react/components/MessageRow.js.map +1 -0
  183. package/dist/react/components/NextStepActions.d.ts +34 -0
  184. package/dist/react/components/NextStepActions.d.ts.map +1 -0
  185. package/dist/react/components/NextStepActions.js +9 -0
  186. package/dist/react/components/NextStepActions.js.map +1 -0
  187. package/dist/react/components/QuestionForm.d.ts +26 -0
  188. package/dist/react/components/QuestionForm.d.ts.map +1 -0
  189. package/dist/react/components/QuestionForm.js +238 -0
  190. package/dist/react/components/QuestionForm.js.map +1 -0
  191. package/dist/react/components/QuestionsPanel.d.ts +13 -0
  192. package/dist/react/components/QuestionsPanel.d.ts.map +1 -0
  193. package/dist/react/components/QuestionsPanel.js +33 -0
  194. package/dist/react/components/QuestionsPanel.js.map +1 -0
  195. package/dist/react/components/TodoCard.d.ts +8 -0
  196. package/dist/react/components/TodoCard.d.ts.map +1 -0
  197. package/dist/react/components/TodoCard.js +29 -0
  198. package/dist/react/components/TodoCard.js.map +1 -0
  199. package/dist/react/components/ToolCard.d.ts +22 -0
  200. package/dist/react/components/ToolCard.d.ts.map +1 -0
  201. package/dist/react/components/ToolCard.js +298 -0
  202. package/dist/react/components/ToolCard.js.map +1 -0
  203. package/dist/react/components/composer-discovery.d.ts +107 -0
  204. package/dist/react/components/composer-discovery.d.ts.map +1 -0
  205. package/dist/react/components/composer-discovery.js +176 -0
  206. package/dist/react/components/composer-discovery.js.map +1 -0
  207. package/dist/react/ext-event-renderer-registry.d.ts +51 -0
  208. package/dist/react/ext-event-renderer-registry.d.ts.map +1 -0
  209. package/dist/react/ext-event-renderer-registry.js +20 -0
  210. package/dist/react/ext-event-renderer-registry.js.map +1 -0
  211. package/dist/react/features/chat-pane/agent-tools.d.ts +14 -0
  212. package/dist/react/features/chat-pane/agent-tools.d.ts.map +1 -0
  213. package/dist/react/features/chat-pane/agent-tools.js +22 -0
  214. package/dist/react/features/chat-pane/agent-tools.js.map +1 -0
  215. package/dist/react/features/chat-pane/components/AgentRuntimePicker.d.ts +12 -0
  216. package/dist/react/features/chat-pane/components/AgentRuntimePicker.d.ts.map +1 -0
  217. package/dist/react/features/chat-pane/components/AgentRuntimePicker.js +106 -0
  218. package/dist/react/features/chat-pane/components/AgentRuntimePicker.js.map +1 -0
  219. package/dist/react/features/chat-pane/components/ChatPane.d.ts +10 -0
  220. package/dist/react/features/chat-pane/components/ChatPane.d.ts.map +1 -0
  221. package/dist/react/features/chat-pane/components/ChatPane.js +169 -0
  222. package/dist/react/features/chat-pane/components/ChatPane.js.map +1 -0
  223. package/dist/react/features/chat-pane/create-daemon-attachment-uploader.d.ts +21 -0
  224. package/dist/react/features/chat-pane/create-daemon-attachment-uploader.d.ts.map +1 -0
  225. package/dist/react/features/chat-pane/create-daemon-attachment-uploader.js +213 -0
  226. package/dist/react/features/chat-pane/create-daemon-attachment-uploader.js.map +1 -0
  227. package/dist/react/features/chat-pane/create-mcp-ui-tool-caller.d.ts +70 -0
  228. package/dist/react/features/chat-pane/create-mcp-ui-tool-caller.d.ts.map +1 -0
  229. package/dist/react/features/chat-pane/create-mcp-ui-tool-caller.js +76 -0
  230. package/dist/react/features/chat-pane/create-mcp-ui-tool-caller.js.map +1 -0
  231. package/dist/react/features/chat-pane/hooks/useAgentRuntimePicker.hooks.d.ts +133 -0
  232. package/dist/react/features/chat-pane/hooks/useAgentRuntimePicker.hooks.d.ts.map +1 -0
  233. package/dist/react/features/chat-pane/hooks/useAgentRuntimePicker.hooks.js +258 -0
  234. package/dist/react/features/chat-pane/hooks/useAgentRuntimePicker.hooks.js.map +1 -0
  235. package/dist/react/features/chat-pane/hooks/useChatPane.hooks.d.ts +66 -0
  236. package/dist/react/features/chat-pane/hooks/useChatPane.hooks.d.ts.map +1 -0
  237. package/dist/react/features/chat-pane/hooks/useChatPane.hooks.js +224 -0
  238. package/dist/react/features/chat-pane/hooks/useChatPane.hooks.js.map +1 -0
  239. package/dist/react/features/chat-pane/hooks/useChatPaneAgentControl.hooks.d.ts +38 -0
  240. package/dist/react/features/chat-pane/hooks/useChatPaneAgentControl.hooks.d.ts.map +1 -0
  241. package/dist/react/features/chat-pane/hooks/useChatPaneAgentControl.hooks.js +252 -0
  242. package/dist/react/features/chat-pane/hooks/useChatPaneAgentControl.hooks.js.map +1 -0
  243. package/dist/react/features/chat-pane/hooks/useChatPaneControlsHeight.hooks.d.ts +16 -0
  244. package/dist/react/features/chat-pane/hooks/useChatPaneControlsHeight.hooks.d.ts.map +1 -0
  245. package/dist/react/features/chat-pane/hooks/useChatPaneControlsHeight.hooks.js +59 -0
  246. package/dist/react/features/chat-pane/hooks/useChatPaneControlsHeight.hooks.js.map +1 -0
  247. package/dist/react/features/chat-pane/hooks/useChatPaneFileDrop.hooks.d.ts +26 -0
  248. package/dist/react/features/chat-pane/hooks/useChatPaneFileDrop.hooks.d.ts.map +1 -0
  249. package/dist/react/features/chat-pane/hooks/useChatPaneFileDrop.hooks.js +74 -0
  250. package/dist/react/features/chat-pane/hooks/useChatPaneFileDrop.hooks.js.map +1 -0
  251. package/dist/react/features/chat-pane/hooks/useChatPaneRuntimeInventory.hooks.d.ts +25 -0
  252. package/dist/react/features/chat-pane/hooks/useChatPaneRuntimeInventory.hooks.d.ts.map +1 -0
  253. package/dist/react/features/chat-pane/hooks/useChatPaneRuntimeInventory.hooks.js +88 -0
  254. package/dist/react/features/chat-pane/hooks/useChatPaneRuntimeInventory.hooks.js.map +1 -0
  255. package/dist/react/features/chat-pane/hooks/useChatPaneWorkingDirectory.hooks.d.ts +38 -0
  256. package/dist/react/features/chat-pane/hooks/useChatPaneWorkingDirectory.hooks.d.ts.map +1 -0
  257. package/dist/react/features/chat-pane/hooks/useChatPaneWorkingDirectory.hooks.js +184 -0
  258. package/dist/react/features/chat-pane/hooks/useChatPaneWorkingDirectory.hooks.js.map +1 -0
  259. package/dist/react/features/chat-pane/index.d.ts +12 -0
  260. package/dist/react/features/chat-pane/index.d.ts.map +1 -0
  261. package/dist/react/features/chat-pane/index.js +11 -0
  262. package/dist/react/features/chat-pane/index.js.map +1 -0
  263. package/dist/react/features/chat-pane/react/components/AgentRuntimePicker.d.ts +12 -0
  264. package/dist/react/features/chat-pane/react/components/AgentRuntimePicker.d.ts.map +1 -0
  265. package/dist/react/features/chat-pane/react/components/AgentRuntimePicker.js +102 -0
  266. package/dist/react/features/chat-pane/react/components/AgentRuntimePicker.js.map +1 -0
  267. package/dist/react/features/chat-pane/react/components/ChatPane.d.ts +10 -0
  268. package/dist/react/features/chat-pane/react/components/ChatPane.d.ts.map +1 -0
  269. package/dist/react/features/chat-pane/react/components/ChatPane.js +137 -0
  270. package/dist/react/features/chat-pane/react/components/ChatPane.js.map +1 -0
  271. package/dist/react/features/chat-pane/react/hooks/useAgentRuntimePicker.hooks.d.ts +133 -0
  272. package/dist/react/features/chat-pane/react/hooks/useAgentRuntimePicker.hooks.d.ts.map +1 -0
  273. package/dist/react/features/chat-pane/react/hooks/useAgentRuntimePicker.hooks.js +258 -0
  274. package/dist/react/features/chat-pane/react/hooks/useAgentRuntimePicker.hooks.js.map +1 -0
  275. package/dist/react/features/chat-pane/react/hooks/useChatPane.hooks.d.ts +66 -0
  276. package/dist/react/features/chat-pane/react/hooks/useChatPane.hooks.d.ts.map +1 -0
  277. package/dist/react/features/chat-pane/react/hooks/useChatPane.hooks.js +223 -0
  278. package/dist/react/features/chat-pane/react/hooks/useChatPane.hooks.js.map +1 -0
  279. package/dist/react/features/chat-pane/react/hooks/useChatPaneAgentControl.hooks.d.ts +38 -0
  280. package/dist/react/features/chat-pane/react/hooks/useChatPaneAgentControl.hooks.d.ts.map +1 -0
  281. package/dist/react/features/chat-pane/react/hooks/useChatPaneAgentControl.hooks.js +252 -0
  282. package/dist/react/features/chat-pane/react/hooks/useChatPaneAgentControl.hooks.js.map +1 -0
  283. package/dist/react/features/chat-pane/react/hooks/useChatPaneFileDrop.hooks.d.ts +26 -0
  284. package/dist/react/features/chat-pane/react/hooks/useChatPaneFileDrop.hooks.d.ts.map +1 -0
  285. package/dist/react/features/chat-pane/react/hooks/useChatPaneFileDrop.hooks.js +60 -0
  286. package/dist/react/features/chat-pane/react/hooks/useChatPaneFileDrop.hooks.js.map +1 -0
  287. package/dist/react/features/chat-pane/react/hooks/useChatPaneRuntimeInventory.hooks.d.ts +25 -0
  288. package/dist/react/features/chat-pane/react/hooks/useChatPaneRuntimeInventory.hooks.d.ts.map +1 -0
  289. package/dist/react/features/chat-pane/react/hooks/useChatPaneRuntimeInventory.hooks.js +83 -0
  290. package/dist/react/features/chat-pane/react/hooks/useChatPaneRuntimeInventory.hooks.js.map +1 -0
  291. package/dist/react/features/chat-pane/react/hooks/useChatPaneWorkingDirectory.hooks.d.ts +38 -0
  292. package/dist/react/features/chat-pane/react/hooks/useChatPaneWorkingDirectory.hooks.d.ts.map +1 -0
  293. package/dist/react/features/chat-pane/react/hooks/useChatPaneWorkingDirectory.hooks.js +184 -0
  294. package/dist/react/features/chat-pane/react/hooks/useChatPaneWorkingDirectory.hooks.js.map +1 -0
  295. package/dist/react/features/chat-pane/react/styles.d.ts +2 -0
  296. package/dist/react/features/chat-pane/react/styles.d.ts.map +1 -0
  297. package/dist/react/features/chat-pane/react/styles.js +863 -0
  298. package/dist/react/features/chat-pane/react/styles.js.map +1 -0
  299. package/dist/react/features/chat-pane/rules.d.ts +31 -0
  300. package/dist/react/features/chat-pane/rules.d.ts.map +1 -0
  301. package/dist/react/features/chat-pane/rules.js +81 -0
  302. package/dist/react/features/chat-pane/rules.js.map +1 -0
  303. package/dist/react/features/chat-pane/styles.d.ts +2 -0
  304. package/dist/react/features/chat-pane/styles.d.ts.map +1 -0
  305. package/dist/react/features/chat-pane/styles.js +1327 -0
  306. package/dist/react/features/chat-pane/styles.js.map +1 -0
  307. package/dist/react/features/chat-pane/types.d.ts +248 -0
  308. package/dist/react/features/chat-pane/types.d.ts.map +1 -0
  309. package/dist/react/features/chat-pane/types.js +2 -0
  310. package/dist/react/features/chat-pane/types.js.map +1 -0
  311. package/dist/react/features/model-picker/components/CredentialStatusBadge.d.ts +7 -0
  312. package/dist/react/features/model-picker/components/CredentialStatusBadge.d.ts.map +1 -0
  313. package/dist/react/features/model-picker/components/CredentialStatusBadge.js +20 -0
  314. package/dist/react/features/model-picker/components/CredentialStatusBadge.js.map +1 -0
  315. package/dist/react/features/model-picker/components/ModelPicker.d.ts +9 -0
  316. package/dist/react/features/model-picker/components/ModelPicker.d.ts.map +1 -0
  317. package/dist/react/features/model-picker/components/ModelPicker.js +34 -0
  318. package/dist/react/features/model-picker/components/ModelPicker.js.map +1 -0
  319. package/dist/react/features/model-picker/constants.d.ts +6 -0
  320. package/dist/react/features/model-picker/constants.d.ts.map +1 -0
  321. package/dist/react/features/model-picker/constants.js +9 -0
  322. package/dist/react/features/model-picker/constants.js.map +1 -0
  323. package/dist/react/features/model-picker/dependencies.d.ts +11 -0
  324. package/dist/react/features/model-picker/dependencies.d.ts.map +1 -0
  325. package/dist/react/features/model-picker/dependencies.js +10 -0
  326. package/dist/react/features/model-picker/dependencies.js.map +1 -0
  327. package/dist/react/features/model-picker/hooks/useModelPicker.hooks.d.ts +27 -0
  328. package/dist/react/features/model-picker/hooks/useModelPicker.hooks.d.ts.map +1 -0
  329. package/dist/react/features/model-picker/hooks/useModelPicker.hooks.js +62 -0
  330. package/dist/react/features/model-picker/hooks/useModelPicker.hooks.js.map +1 -0
  331. package/dist/react/features/model-picker/index.d.ts +32 -0
  332. package/dist/react/features/model-picker/index.d.ts.map +1 -0
  333. package/dist/react/features/model-picker/index.js +29 -0
  334. package/dist/react/features/model-picker/index.js.map +1 -0
  335. package/dist/react/features/model-picker/ports.d.ts +11 -0
  336. package/dist/react/features/model-picker/ports.d.ts.map +1 -0
  337. package/dist/react/features/model-picker/ports.js +2 -0
  338. package/dist/react/features/model-picker/ports.js.map +1 -0
  339. package/dist/react/features/model-picker/react/components/CredentialStatusBadge.d.ts +7 -0
  340. package/dist/react/features/model-picker/react/components/CredentialStatusBadge.d.ts.map +1 -0
  341. package/dist/react/features/model-picker/react/components/CredentialStatusBadge.js +20 -0
  342. package/dist/react/features/model-picker/react/components/CredentialStatusBadge.js.map +1 -0
  343. package/dist/react/features/model-picker/react/components/ModelPicker.d.ts +9 -0
  344. package/dist/react/features/model-picker/react/components/ModelPicker.d.ts.map +1 -0
  345. package/dist/react/features/model-picker/react/components/ModelPicker.js +34 -0
  346. package/dist/react/features/model-picker/react/components/ModelPicker.js.map +1 -0
  347. package/dist/react/features/model-picker/react/hooks/useModelPicker.hooks.d.ts +27 -0
  348. package/dist/react/features/model-picker/react/hooks/useModelPicker.hooks.d.ts.map +1 -0
  349. package/dist/react/features/model-picker/react/hooks/useModelPicker.hooks.js +62 -0
  350. package/dist/react/features/model-picker/react/hooks/useModelPicker.hooks.js.map +1 -0
  351. package/dist/react/features/model-picker/rules.d.ts +26 -0
  352. package/dist/react/features/model-picker/rules.d.ts.map +1 -0
  353. package/dist/react/features/model-picker/rules.js +84 -0
  354. package/dist/react/features/model-picker/rules.js.map +1 -0
  355. package/dist/react/features/model-picker/types.d.ts +38 -0
  356. package/dist/react/features/model-picker/types.d.ts.map +1 -0
  357. package/dist/react/features/model-picker/types.js +2 -0
  358. package/dist/react/features/model-picker/types.js.map +1 -0
  359. package/dist/react/hooks/composer-draft-cache.d.ts +65 -0
  360. package/dist/react/hooks/composer-draft-cache.d.ts.map +1 -0
  361. package/dist/react/hooks/composer-draft-cache.js +89 -0
  362. package/dist/react/hooks/composer-draft-cache.js.map +1 -0
  363. package/dist/react/hooks/context.d.ts +18 -0
  364. package/dist/react/hooks/context.d.ts.map +1 -0
  365. package/dist/react/hooks/context.js +60 -0
  366. package/dist/react/hooks/context.js.map +1 -0
  367. package/dist/react/hooks/testing/fake-transport.d.ts +34 -0
  368. package/dist/react/hooks/testing/fake-transport.d.ts.map +1 -0
  369. package/dist/react/hooks/testing/fake-transport.js +46 -0
  370. package/dist/react/hooks/testing/fake-transport.js.map +1 -0
  371. package/dist/react/hooks/useArtifactStream.d.ts +18 -0
  372. package/dist/react/hooks/useArtifactStream.d.ts.map +1 -0
  373. package/dist/react/hooks/useArtifactStream.js +55 -0
  374. package/dist/react/hooks/useArtifactStream.js.map +1 -0
  375. package/dist/react/hooks/useChatFabDrag.d.ts +25 -0
  376. package/dist/react/hooks/useChatFabDrag.d.ts.map +1 -0
  377. package/dist/react/hooks/useChatFabDrag.js +88 -0
  378. package/dist/react/hooks/useChatFabDrag.js.map +1 -0
  379. package/dist/react/hooks/useComposer.d.ts +48 -0
  380. package/dist/react/hooks/useComposer.d.ts.map +1 -0
  381. package/dist/react/hooks/useComposer.js +121 -0
  382. package/dist/react/hooks/useComposer.js.map +1 -0
  383. package/dist/react/hooks/useConversation.d.ts +34 -0
  384. package/dist/react/hooks/useConversation.d.ts.map +1 -0
  385. package/dist/react/hooks/useConversation.js +163 -0
  386. package/dist/react/hooks/useConversation.js.map +1 -0
  387. package/dist/react/hooks/useCopyToClipboard.d.ts +14 -0
  388. package/dist/react/hooks/useCopyToClipboard.d.ts.map +1 -0
  389. package/dist/react/hooks/useCopyToClipboard.js +98 -0
  390. package/dist/react/hooks/useCopyToClipboard.js.map +1 -0
  391. package/dist/react/hooks/useExtEventGroups.d.ts +7 -0
  392. package/dist/react/hooks/useExtEventGroups.d.ts.map +1 -0
  393. package/dist/react/hooks/useExtEventGroups.js +32 -0
  394. package/dist/react/hooks/useExtEventGroups.js.map +1 -0
  395. package/dist/react/hooks/useLatestOperation.d.ts +31 -0
  396. package/dist/react/hooks/useLatestOperation.d.ts.map +1 -0
  397. package/dist/react/hooks/useLatestOperation.js +74 -0
  398. package/dist/react/hooks/useLatestOperation.js.map +1 -0
  399. package/dist/react/hooks/usePinnedTodos.d.ts +15 -0
  400. package/dist/react/hooks/usePinnedTodos.d.ts.map +1 -0
  401. package/dist/react/hooks/usePinnedTodos.js +43 -0
  402. package/dist/react/hooks/usePinnedTodos.js.map +1 -0
  403. package/dist/react/hooks/useQuestionForms.d.ts +28 -0
  404. package/dist/react/hooks/useQuestionForms.d.ts.map +1 -0
  405. package/dist/react/hooks/useQuestionForms.js +113 -0
  406. package/dist/react/hooks/useQuestionForms.js.map +1 -0
  407. package/dist/react/hooks/useRunStream.d.ts +27 -0
  408. package/dist/react/hooks/useRunStream.d.ts.map +1 -0
  409. package/dist/react/hooks/useRunStream.js +180 -0
  410. package/dist/react/hooks/useRunStream.js.map +1 -0
  411. package/dist/react/hooks/useToolTimeline.d.ts +33 -0
  412. package/dist/react/hooks/useToolTimeline.d.ts.map +1 -0
  413. package/dist/react/hooks/useToolTimeline.js +47 -0
  414. package/dist/react/hooks/useToolTimeline.js.map +1 -0
  415. package/dist/react/index.d.ts +158 -0
  416. package/dist/react/index.d.ts.map +1 -0
  417. package/dist/react/index.js +118 -0
  418. package/dist/react/index.js.map +1 -0
  419. package/dist/react/message-blocks.d.ts +86 -0
  420. package/dist/react/message-blocks.d.ts.map +1 -0
  421. package/dist/react/message-blocks.js +78 -0
  422. package/dist/react/message-blocks.js.map +1 -0
  423. package/dist/react/poc-mcp-ui-official/PocMcpUiCard.d.ts +9 -0
  424. package/dist/react/poc-mcp-ui-official/PocMcpUiCard.d.ts.map +1 -0
  425. package/dist/react/poc-mcp-ui-official/PocMcpUiCard.js +29 -0
  426. package/dist/react/poc-mcp-ui-official/PocMcpUiCard.js.map +1 -0
  427. package/dist/react/poc-mcp-ui-official/create-poc-resource.d.ts +30 -0
  428. package/dist/react/poc-mcp-ui-official/create-poc-resource.d.ts.map +1 -0
  429. package/dist/react/poc-mcp-ui-official/create-poc-resource.js +44 -0
  430. package/dist/react/poc-mcp-ui-official/create-poc-resource.js.map +1 -0
  431. package/dist/react/slots.d.ts +215 -0
  432. package/dist/react/slots.d.ts.map +1 -0
  433. package/dist/react/slots.js +2 -0
  434. package/dist/react/slots.js.map +1 -0
  435. package/dist/react/styles/reference.css +298 -0
  436. package/dist/react/tool-renderer-registry.d.ts +41 -0
  437. package/dist/react/tool-renderer-registry.d.ts.map +1 -0
  438. package/dist/react/tool-renderer-registry.js +22 -0
  439. package/dist/react/tool-renderer-registry.js.map +1 -0
  440. package/dist/react/util/defined-props.d.ts +31 -0
  441. package/dist/react/util/defined-props.d.ts.map +1 -0
  442. package/dist/react/util/defined-props.js +28 -0
  443. package/dist/react/util/defined-props.js.map +1 -0
  444. package/package.json +99 -0
@@ -0,0 +1,118 @@
1
+ export { RendererRegistry, } from './artifact-types.js';
2
+ export { clearToolRenderers, getToolRenderer, registerToolRenderer, } from './tool-renderer-registry.js';
3
+ export { clearExtEventRenderers, getExtEventRenderer, registerExtEventRenderer, } from './ext-event-renderer-registry.js';
4
+ // `features/model-picker/` (REF-001 Step B, 2026-08-05): NOT re-exported here. It was, on the
5
+ // theory in the comment this replaced — "an independent slice... for a consumer that wants
6
+ // everything from one barrel" — but that consumer never existed. Checked twice, once before and
7
+ // once after the 2026-08-05 BYOK restructure of this directory: zero imports of any of its 27
8
+ // symbols anywhere in this monorepo's other packages, Jini's own examples/, or the one real
9
+ // external host consuming this package via a `file:` dependency, and zero internal use from
10
+ // `ChatPane`'s own composition. Every apparent
11
+ // name-collision hit (`AgentDefinition`, `AgentDiagnostic`, `CredentialStatus`, `ModelOption`,
12
+ // `ModelProvider`, `matchesModelQuery`) traced back to an unrelated same-named symbol native to
13
+ // `@jini-ai/protocol`/`@jini-ai/agent-runtime` or a same-named local helper in `@jini-ai/ui` — not
14
+ // this package's re-export. See ADS-memory/reports/refactor/2026-08-05-ref-001-steps-bcd-proposal.md
15
+ // §2.4 for the full trace and §9 for the re-confirmation against the post-BYOK tree.
16
+ //
17
+ // The feature itself is not deleted — `./features/model-picker/index.js` still exists and still
18
+ // works for anything inside this package that wants it (nothing currently does). This removes only
19
+ // the root barrel's re-export of it. A future consumer that genuinely needs it gets a real ADR-worthy
20
+ // decision (its own subpath, most likely, following Step C's pattern) instead of a standing
21
+ // "just in case" export nobody asked for.
22
+ /**
23
+ * @deprecated REF-001 Step C (2026-08-05): `ChatPane` and its companions moved to their own
24
+ * subpath, `@jini-ai/chat/react/chat-pane` — import from there in new code. Re-exported here,
25
+ * unchanged, so every existing `import { ChatPane } from '@jini-ai/chat/react'` keeps working.
26
+ * This alias has no removal date scheduled yet; see `chat-pane.ts` for the canonical surface and
27
+ * the module doc there for why the split exists.
28
+ */
29
+ export { AgentRuntimePicker, CHAT_PANE_AGENT_TOOLS, ChatPane, createDaemonAttachmentUploader, createMcpUiToolCaller, defaultChatPaneSelection, orderChatPaneAgents, resolveChatPaneSelection, useChatPane, useChatPaneAgentControl, useChatPaneRuntimeInventory, useChatPaneWorkingDirectory, } from './chat-pane.js';
30
+ export { useRunStream, } from './hooks/useRunStream.js';
31
+ export { useConversation, } from './hooks/useConversation.js';
32
+ export { useComposer, } from './hooks/useComposer.js';
33
+ export { useToolTimeline, } from './hooks/useToolTimeline.js';
34
+ export { useExtEventGroups, } from './hooks/useExtEventGroups.js';
35
+ export { usePinnedTodos, } from './hooks/usePinnedTodos.js';
36
+ export { parseSubmittedAnswers, useQuestionForms, } from './hooks/useQuestionForms.js';
37
+ export { useArtifactStream, } from './hooks/useArtifactStream.js';
38
+ export { CHAT_FAB_DRAG_THRESHOLD_PX, CHAT_FAB_EDGE_MARGIN_PX, clampChatFabToViewport, useChatFabDrag, } from './hooks/useChatFabDrag.js';
39
+ export { useT, useI18n, useAnalytics, useProjectContext, useChatTransport, useArtifactRegistry, } from './hooks/context.js';
40
+ /**
41
+ * REF-001 Step D (2026-08-05): both newly public. `ChatPane`'s own composition already depended
42
+ * on both — `useLatestOperation` for the "only the newest attempt may write state" guard every
43
+ * async hook in this package needs, `definedProps` for collapsing `exactOptionalPropertyTypes`
44
+ * prop-forwarding ternaries — which was itself the finding: a consumer building an equivalent
45
+ * custom async hook or an equivalent prop-forwarding composition could not reach either one, so
46
+ * `ChatPane` was doing something the published API didn't let anyone else do. Both are general
47
+ * building blocks with no `ChatPane`-specific coupling (see each module's own doc), not composition
48
+ * internals, so exporting them is a surface completion, not a leak. See
49
+ * `scripts/check-chatpane-public-surface.ts` (R10) and
50
+ * ADS-memory/reports/refactor/2026-08-05-ref-001-steps-bcd-proposal.md §9.
51
+ */
52
+ export { normalizeOperationError, useLatestOperation, } from './hooks/useLatestOperation.js';
53
+ export { definedProps } from './util/defined-props.js';
54
+ /**
55
+ * Newly public for the same R10 reason as `definedProps`/`useLatestOperation` above:
56
+ * `ChatPane`'s `composerHandle.insertText` (see `types.ts`'s `ChatPaneComposerHandle`) joins
57
+ * inserted text onto the existing draft with `appendComposerDiscovery` — the same joining rule the
58
+ * "+" discovery menu's own `insertText` items use, so a host writing into the draft from outside
59
+ * `ChatPane`'s props gets the identical, already-established behavior rather than inventing a
60
+ * second concatenation rule. Zero `ChatPane`-specific coupling (it operates on a plain draft string
61
+ * and an insertion string), so a consumer assembling an equivalent external-insertion feature faced
62
+ * the same problem and could not previously reach this solution either.
63
+ */
64
+ export { appendComposerDiscovery } from './components/composer-discovery.js';
65
+ /**
66
+ * REF-001 §10 (2026-08-05): newly public, same reasoning as `definedProps`/`useLatestOperation`
67
+ * above. `MessageRow.tsx` (itself public) depends on `interleaveMessageBlocks` to reconstruct an
68
+ * assistant message's original event order — text and tool cards interleaved where they actually
69
+ * happened — from `ChatMessage.content` + `ChatMessage.events` (see `message-blocks.ts`'s own
70
+ * module doc for why this needs computing at all, and when it refuses rather than guesses). Zero
71
+ * `ChatPane`-specific coupling: it operates on core `AgentEvent`/message vocabulary, not anything
72
+ * `ChatPane`-shaped. A consumer building an equivalent custom message-row component, with its own
73
+ * tool-timeline data, faced the identical interleaving problem and could not reach this solution —
74
+ * the same API-gap finding as §9.2, just found one hop further out by §10's transitive-reach trace
75
+ * rather than by `ChatPane`'s own direct imports. See
76
+ * ADS-memory/reports/refactor/2026-08-05-ref-001-steps-bcd-proposal.md §10.2: this export closes
77
+ * the one live instance §10 found of R10's documented transitive-reach scope limit.
78
+ */
79
+ export { interleaveMessageBlocks } from './message-blocks.js';
80
+ export { TodoCard } from './components/TodoCard.js';
81
+ /**
82
+ * The conversation switcher — new / select / delete / search / rename-on-double-click. Storage
83
+ * agnostic: it takes data plus callbacks, so a host backs it with `@jini-ai/sqlite`'s
84
+ * `ChatHistoryStore`, an HTTP endpoint, or a plain array. Drop it into `ChatPane`'s
85
+ * `leadingAccessory` slot; it needs no changes to `ChatPane` itself.
86
+ */
87
+ export { ConversationList } from './components/ConversationList.js';
88
+ export { ToolCard } from './components/ToolCard.js';
89
+ export { A2uiSurfaceCard } from './components/A2uiSurfaceCard.js';
90
+ /**
91
+ * Moved from `@jini-ai/ui`'s `react/mcp-ui/` 2026-08-03 (see `McpUiSurfaceCard.tsx`'s own file
92
+ * doc) — the same `kind: 'ext'` extensibility seam as `A2uiSurfaceCard` above, just for MCP-UI
93
+ * resources instead of A2UI surfaces.
94
+ */
95
+ export { McpUiSurfaceCard, registerMcpUiSurfaceRenderer, MCP_UI_EXT_EVENT_NAME } from './components/McpUiSurfaceCard.js';
96
+ export { ExtEventErrorBoundary } from './components/ExtEventErrorBoundary.js';
97
+ export { QuestionForm } from './components/QuestionForm.js';
98
+ export { QuestionsPanel } from './components/QuestionsPanel.js';
99
+ export { NextStepActions } from './components/NextStepActions.js';
100
+ export { Markdown } from './components/Markdown.js';
101
+ export { MessageRow } from './components/MessageRow.js';
102
+ export { MessageList } from './components/MessageList.js';
103
+ export { Composer } from './components/Composer.js';
104
+ export { AttachmentTray } from './components/AttachmentTray.js';
105
+ export { ChatFab } from './components/ChatFab.js';
106
+ export { JiniChatProvider, useJiniChatSlots, useOnFeedback } from './components/JiniChatProvider.js';
107
+ /**
108
+ * Agent bridge — the browser half of daemon-relayed frontend control.
109
+ *
110
+ * Lives here rather than in an example because a consumer cannot copy-paste its way to a
111
+ * transport: this is the piece that makes `ChatPaneAgentBridgeAccess` satisfiable at all.
112
+ *
113
+ * `createDomPageDriver`/`currentAgentPage` moved to `@jini-ai/agentic/dom` in the 2026-07-26
114
+ * extraction — re-exported here so existing `@jini-ai/chat-react` importers keep working.
115
+ */
116
+ export { createFrontendSessionBridge } from './agent-bridge/frontend-session-bridge.js';
117
+ export { createDomPageDriver, currentAgentPage } from '@jini-ai/agentic/dom';
118
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @module message-blocks
3
+ *
4
+ * Restores the original event-stream ordering of an assistant message: text and tool cards
5
+ * interleaved where they actually happened, instead of all the text followed by all the tools.
6
+ *
7
+ * ## Why this needs computing at all
8
+ *
9
+ * A rendered assistant message draws from three different shapes of the same turn.
10
+ * `ChatMessage.content` is a single string — `useConversation.ts` builds it by concatenating every
11
+ * `kind: 'text'` event (`out += ev.text`) — tool cards come from `ChatMessage.events`'s `tool_use`
12
+ * entries, and interactive surfaces (MCP-UI, A2UI) come from that same array's `kind: 'ext'`
13
+ * entries. Rendering `content`, then the tool timeline, then every `ext` group is the
14
+ * straightforward composition, and it is what `MessageRow.tsx` shipped in v1 (its own header
15
+ * records this as a known deferral pending the `AssistantMessage.tsx` extraction).
16
+ *
17
+ * The cost is not merely cosmetic ordering. Because the text runs on either side of a tool call (or
18
+ * an interactive surface) get concatenated with nothing between them, a message reads as
19
+ * `"I'll look for a tool that changes the site language.Done — the language is now English."` —
20
+ * two separate thoughts, from before and after the tool ran, fused mid-sentence. Worse for an `ext`
21
+ * surface specifically: a reply narrating what the human just submitted through an MCP-UI form (a
22
+ * `text` event that only exists BECAUSE the form's `ext` event was answered) renders ABOVE that
23
+ * form instead of below it — the answer appears to precede the question. The reader cannot tell
24
+ * which claims preceded the evidence and which followed it.
25
+ *
26
+ * Since `content` is exactly the concatenation of the text events, the split points are recoverable:
27
+ * walk the events in order, and every tool call or ext surface marks a boundary in that
28
+ * concatenation.
29
+ *
30
+ * ## Refuses rather than guesses
31
+ *
32
+ * {@link interleaveMessageBlocks} returns `null` whenever it cannot prove the reconstruction is
33
+ * lossless, and the caller falls back to the old flat layout. Losing the ordering is a presentation
34
+ * regression; dropping or duplicating a chunk of the assistant's actual words is a correctness one,
35
+ * so every check below prefers the former.
36
+ *
37
+ * It refuses when:
38
+ * - there are no events, or no tool rows AND no ext events to interleave (nothing to do — the flat
39
+ * path is identical);
40
+ * - the concatenated text events do not reproduce `content` byte for byte. This is the load-bearing
41
+ * check. A message persisted before the events schema settled, one rebuilt by a host that
42
+ * assembles `content` some other way, or any future divergence between the two, all land here;
43
+ * - the walk does not emit exactly the rows it was given (a `tool_use` with no matching row, or a
44
+ * row never reached), which would mean silently dropping a tool card.
45
+ *
46
+ * Artifacts are handled by the caller, not here — see `MessageRow.tsx`.
47
+ */
48
+ import type { AgentEvent } from '../core/index.js';
49
+ /**
50
+ * One rendered block. Consecutive tool cards are coalesced into a single `tools` block so they keep
51
+ * rendering inside one `.jini-message-tools` container, exactly as the flat layout did — a run of
52
+ * back-to-back calls should stay one visual group, not become N separately-boxed ones. An `ext`
53
+ * block marks where a `kind: 'ext'` group of a given `name` (an MCP-UI/A2UI surface, or any other
54
+ * host-registered ext renderer) belongs in reading order — one block per name, at its FIRST
55
+ * occurrence, since `MessageRow.tsx`'s `useExtEventGroups` already folds every event sharing that
56
+ * name (however many arrive, however late) into one evolving render slot; this block only fixes
57
+ * WHERE that slot sits relative to the surrounding text, not what it renders.
58
+ */
59
+ export type MessageBlock<Row> = {
60
+ readonly kind: 'text';
61
+ readonly text: string;
62
+ readonly key: string;
63
+ } | {
64
+ readonly kind: 'tools';
65
+ readonly rows: readonly Row[];
66
+ readonly key: string;
67
+ } | {
68
+ readonly kind: 'ext';
69
+ readonly name: string;
70
+ readonly key: string;
71
+ };
72
+ /**
73
+ * Rebuilds an assistant message as ordered blocks, or returns `null` if that cannot be done
74
+ * losslessly.
75
+ *
76
+ * @param events - The message's event array, in arrival order.
77
+ * @param content - The message's `content`, expected to equal the concatenated text events.
78
+ * @param rows - The tool timeline rows, already deduped and paired by `useToolTimeline`. Only rows
79
+ * present here are emitted, so a row the timeline chose to drop stays dropped.
80
+ * @returns Ordered blocks, or `null` to signal "render the flat layout instead".
81
+ * @complexity O(n + m) in the event and row counts.
82
+ */
83
+ export declare function interleaveMessageBlocks<Row extends {
84
+ id: string;
85
+ }>(events: readonly AgentEvent[] | undefined, content: string, rows: readonly Row[]): MessageBlock<Row>[] | null;
86
+ //# sourceMappingURL=message-blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-blocks.d.ts","sourceRoot":"","sources":["../../src/react/message-blocks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,CAAC,GAAG,IACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACtE;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC/E;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAChE,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,EACzC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,GAAG,EAAE,GACnB,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CA+D5B"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Rebuilds an assistant message as ordered blocks, or returns `null` if that cannot be done
3
+ * losslessly.
4
+ *
5
+ * @param events - The message's event array, in arrival order.
6
+ * @param content - The message's `content`, expected to equal the concatenated text events.
7
+ * @param rows - The tool timeline rows, already deduped and paired by `useToolTimeline`. Only rows
8
+ * present here are emitted, so a row the timeline chose to drop stays dropped.
9
+ * @returns Ordered blocks, or `null` to signal "render the flat layout instead".
10
+ * @complexity O(n + m) in the event and row counts.
11
+ */
12
+ export function interleaveMessageBlocks(events, content, rows) {
13
+ if (!events || events.length === 0)
14
+ return null;
15
+ const hasExtEvent = events.some((ev) => ev.kind === 'ext');
16
+ if (rows.length === 0 && !hasExtEvent)
17
+ return null;
18
+ // The reconstruction is only trustworthy if the text events are demonstrably the source `content`
19
+ // was built from. Anything else and the offsets below are fiction.
20
+ let concatenated = '';
21
+ for (const ev of events) {
22
+ if (ev.kind === 'text')
23
+ concatenated += ev.text;
24
+ }
25
+ if (concatenated !== content)
26
+ return null;
27
+ const rowById = new Map(rows.map((row) => [row.id, row]));
28
+ const blocks = [];
29
+ const emitted = new Set();
30
+ const emittedExtNames = new Set();
31
+ let buffer = '';
32
+ const flushText = () => {
33
+ if (buffer.length === 0)
34
+ return;
35
+ blocks.push({ kind: 'text', text: buffer, key: `text-${blocks.length}` });
36
+ buffer = '';
37
+ };
38
+ for (const ev of events) {
39
+ if (ev.kind === 'text') {
40
+ buffer += ev.text;
41
+ continue;
42
+ }
43
+ if (ev.kind === 'ext') {
44
+ // One block per name, at its FIRST occurrence — later events sharing the name fold into the
45
+ // SAME render slot (`useExtEventGroups`'s job in `MessageRow.tsx`), not a second block.
46
+ if (emittedExtNames.has(ev.name))
47
+ continue;
48
+ emittedExtNames.add(ev.name);
49
+ flushText();
50
+ blocks.push({ kind: 'ext', name: ev.name, key: `ext-${ev.name}` });
51
+ continue;
52
+ }
53
+ if (ev.kind !== 'tool_use')
54
+ continue;
55
+ const row = rowById.get(ev.id);
56
+ // A `tool_use` the timeline did not surface (deduped away as a repeat of one already seen).
57
+ // Skipping it keeps this function's output consistent with `rows`, which is the authority on
58
+ // what gets a card.
59
+ if (!row || emitted.has(ev.id))
60
+ continue;
61
+ emitted.add(ev.id);
62
+ flushText();
63
+ const last = blocks[blocks.length - 1];
64
+ if (last && last.kind === 'tools') {
65
+ blocks[blocks.length - 1] = { kind: 'tools', rows: [...last.rows, row], key: last.key };
66
+ }
67
+ else {
68
+ blocks.push({ kind: 'tools', rows: [row], key: `tools-${blocks.length}` });
69
+ }
70
+ }
71
+ flushText();
72
+ // Every row must have found its place. If one did not, the message would render with a tool card
73
+ // missing entirely — strictly worse than the flat layout it would have had.
74
+ if (emitted.size !== rows.length)
75
+ return null;
76
+ return blocks;
77
+ }
78
+ //# sourceMappingURL=message-blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-blocks.js","sourceRoot":"","sources":["../../src/react/message-blocks.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ export interface PocMcpUiCardProps {
2
+ /** Pre-fetched HTML — normally the `resource.text` from `createPocUiResource()`. */
3
+ html: string;
4
+ /** Where the (not-stood-up, for this POC) sandbox proxy page would live. */
5
+ sandboxUrl: URL;
6
+ }
7
+ /** Renders one static MCP-UI card through the real `@mcp-ui/client` `AppRenderer`. */
8
+ export declare function PocMcpUiCard({ html, sandboxUrl }: PocMcpUiCardProps): import("react").JSX.Element;
9
+ //# sourceMappingURL=PocMcpUiCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PocMcpUiCard.d.ts","sourceRoot":"","sources":["../../../src/react/poc-mcp-ui-official/PocMcpUiCard.tsx"],"names":[],"mappings":"AAwBA,MAAM,WAAW,iBAAiB;IAChC,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,UAAU,EAAE,GAAG,CAAC;CACjB;AAED,sFAAsF;AACtF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,iBAAiB,+BAQnE"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @module poc-mcp-ui-official/PocMcpUiCard
4
+ *
5
+ * PROOF OF CONCEPT — see `create-poc-resource.ts`'s module doc for full context. Not wired into
6
+ * this package's public API, not a replacement for `McpUiSurfaceCard.tsx`.
7
+ *
8
+ * Wraps `@mcp-ui/client`'s real `AppRenderer` component (the current name for what older versions
9
+ * of `@mcp-ui/client` called `UIResourceRenderer` — renamed around its v6.0.0 rebrand onto the
10
+ * `@modelcontextprotocol/ext-apps` "MCP Apps" spec). `AppRenderer` is given pre-fetched `html`
11
+ * directly (skipping MCP resource-fetching, since this POC has no live MCP server behind it) and no
12
+ * `client`, which is an explicitly supported mode per its own prop doc ("Omit to disable automatic
13
+ * MCP forwarding and use custom handlers instead" — this POC supplies neither, since the one static
14
+ * card it renders never calls a tool back).
15
+ *
16
+ * `AppRenderer` builds its own `AppBridge` internally and, on mount, creates a real sandboxed
17
+ * `<iframe>` pointed at `sandbox.url`, then waits for that iframe to `postMessage` back a
18
+ * `ui/notifications/sandbox-proxy-ready` notification before it will hand the HTML over. That
19
+ * handshake needs a REAL sandbox-proxy page served at `sandbox.url` — this POC does not stand one
20
+ * up (out of scope for validating the package's own API surface), so the test that renders this
21
+ * component asserts on the real, unmocked iframe `AppRenderer` creates (src, sandbox attribute,
22
+ * default sizing) rather than waiting for a live handshake that would just time out under jsdom.
23
+ */
24
+ import { AppRenderer } from '@mcp-ui/client';
25
+ /** Renders one static MCP-UI card through the real `@mcp-ui/client` `AppRenderer`. */
26
+ export function PocMcpUiCard({ html, sandboxUrl }) {
27
+ return (_jsx(AppRenderer, { toolName: "poc-mcp-ui-official-card", sandbox: { url: sandboxUrl }, html: html }));
28
+ }
29
+ //# sourceMappingURL=PocMcpUiCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PocMcpUiCard.js","sourceRoot":"","sources":["../../../src/react/poc-mcp-ui-official/PocMcpUiCard.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAS7C,sFAAsF;AACtF,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,UAAU,EAAqB;IAClE,OAAO,CACL,KAAC,WAAW,IACV,QAAQ,EAAC,0BAA0B,EACnC,OAAO,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,EAC5B,IAAI,EAAE,IAAI,GACV,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @module poc-mcp-ui-official/create-poc-resource
3
+ *
4
+ * PROOF OF CONCEPT — NOT wired into the package's public API (not re-exported from
5
+ * `src/react/index.ts`), and NOT a replacement for the hand-rolled MCP-UI stack
6
+ * (`McpUiSurfaceCard.tsx`, `useMcpUiHost`, `create-mcp-ui-tool-caller.ts`), which this file does
7
+ * not touch.
8
+ *
9
+ * Validates that the REAL, official `@mcp-ui/server` package (not this repo's own reimplementation
10
+ * of the MCP-UI resource shape) can build a `UIResource` end to end, per the owner's decision to
11
+ * evaluate replacing the hand-rolled client with the upstream package. See
12
+ * `poc-mcp-ui-official/__tests__/poc-mcp-ui-official.test.tsx` for the assertions this module
13
+ * exists to feed, and `ADS-memory/` (Tovu side) / this session's final report for the CJS/ESM
14
+ * interop finding that shaped how this is imported (ESM only — `@mcp-ui/client`'s CJS build is
15
+ * broken in 7.1.1; `require('@mcp-ui/client')` throws / returns an empty object depending on Node
16
+ * version. `@mcp-ui/server`'s CJS build works fine in this same version, but this module still
17
+ * uses the ESM entry point for consistency with the client half of this POC).
18
+ */
19
+ import { type UIResource } from '@mcp-ui/server';
20
+ /** The one concrete example this POC builds: a simple static HTML card. */
21
+ export declare const POC_CARD_URI = "ui://jini-poc/mcp-ui-official-card";
22
+ export declare const POC_CARD_HTML: string;
23
+ /**
24
+ * Builds the one UIResource this POC round-trips: server creates it, the test then feeds its
25
+ * `resource.text` straight to the client's `AppRenderer` as pre-fetched `html` (see the test —
26
+ * `AppRenderer`'s `html` prop skips MCP resource-fetching entirely, which is the right shape for a
27
+ * standalone POC with no live MCP server behind it).
28
+ */
29
+ export declare function createPocUiResource(): UIResource;
30
+ //# sourceMappingURL=create-poc-resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-poc-resource.d.ts","sourceRoot":"","sources":["../../../src/react/poc-mcp-ui-official/create-poc-resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEnE,2EAA2E;AAC3E,eAAO,MAAM,YAAY,uCAAuC,CAAC;AAEjE,eAAO,MAAM,aAAa,QAQd,CAAC;AAEb;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CAMhD"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @module poc-mcp-ui-official/create-poc-resource
3
+ *
4
+ * PROOF OF CONCEPT — NOT wired into the package's public API (not re-exported from
5
+ * `src/react/index.ts`), and NOT a replacement for the hand-rolled MCP-UI stack
6
+ * (`McpUiSurfaceCard.tsx`, `useMcpUiHost`, `create-mcp-ui-tool-caller.ts`), which this file does
7
+ * not touch.
8
+ *
9
+ * Validates that the REAL, official `@mcp-ui/server` package (not this repo's own reimplementation
10
+ * of the MCP-UI resource shape) can build a `UIResource` end to end, per the owner's decision to
11
+ * evaluate replacing the hand-rolled client with the upstream package. See
12
+ * `poc-mcp-ui-official/__tests__/poc-mcp-ui-official.test.tsx` for the assertions this module
13
+ * exists to feed, and `ADS-memory/` (Tovu side) / this session's final report for the CJS/ESM
14
+ * interop finding that shaped how this is imported (ESM only — `@mcp-ui/client`'s CJS build is
15
+ * broken in 7.1.1; `require('@mcp-ui/client')` throws / returns an empty object depending on Node
16
+ * version. `@mcp-ui/server`'s CJS build works fine in this same version, but this module still
17
+ * uses the ESM entry point for consistency with the client half of this POC).
18
+ */
19
+ import { createUIResource } from '@mcp-ui/server';
20
+ /** The one concrete example this POC builds: a simple static HTML card. */
21
+ export const POC_CARD_URI = 'ui://jini-poc/mcp-ui-official-card';
22
+ export const POC_CARD_HTML = [
23
+ '<!doctype html>',
24
+ '<html>',
25
+ ' <body style="font-family: sans-serif; margin: 0; padding: 16px;">',
26
+ ' <h1 data-testid="poc-card-heading">Hello from @mcp-ui/server</h1>',
27
+ ' <p>This card was built by the REAL, official createUIResource(), not the hand-rolled one.</p>',
28
+ ' </body>',
29
+ '</html>',
30
+ ].join('\n');
31
+ /**
32
+ * Builds the one UIResource this POC round-trips: server creates it, the test then feeds its
33
+ * `resource.text` straight to the client's `AppRenderer` as pre-fetched `html` (see the test —
34
+ * `AppRenderer`'s `html` prop skips MCP resource-fetching entirely, which is the right shape for a
35
+ * standalone POC with no live MCP server behind it).
36
+ */
37
+ export function createPocUiResource() {
38
+ return createUIResource({
39
+ uri: POC_CARD_URI,
40
+ content: { type: 'rawHtml', htmlString: POC_CARD_HTML },
41
+ encoding: 'text',
42
+ });
43
+ }
44
+ //# sourceMappingURL=create-poc-resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-poc-resource.js","sourceRoot":"","sources":["../../../src/react/poc-mcp-ui-official/create-poc-resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAEnE,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG,oCAAoC,CAAC;AAEjE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iBAAiB;IACjB,QAAQ;IACR,qEAAqE;IACrE,uEAAuE;IACvE,mGAAmG;IACnG,WAAW;IACX,SAAS;CACV,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,gBAAgB,CAAC;QACtB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE;QACvD,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAC;AACL,CAAC"}