@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,404 @@
1
+ /**
2
+ * @module question-form/scan
3
+ *
4
+ * Markup segmentation for `<question-form>` / `<ask-question>` blocks:
5
+ * locating open/close tags, splitting prose from form JSON, and the
6
+ * tolerant streaming-recovery path that renders a partial form before its
7
+ * JSON body has finished arriving. Split out of the original single-file
8
+ * `question-form.ts`; see `../question-form.ts` for the public facade, the
9
+ * block format, and the tag-name-alias rule.
10
+ */
11
+ import { parsePartialJson } from '../partial-json.js';
12
+ import { parseQuotedAttrs } from '../util/markup-attributes.js';
13
+ import { mapRawQuestion } from './normalize.js';
14
+ // `question-form` is the canonical tag; `ask-question` is an alias the model
15
+ // occasionally drifts to. The close tag must match the open tag name, so each
16
+ // match captures the name and computes its own close-tag string. Matching is
17
+ // case-insensitive so `<Question-Form>` / `<ASK-QUESTION>` still parse.
18
+ const OPEN_RE = /<(question-form|ask-question)\b([^>]*)>/i;
19
+ // Group 1 is a mandatory (non-optional) alternation and group 2 is an
20
+ // unconditional `*`-quantified capture, so both always participate whenever
21
+ // `m` itself is non-null — `noUncheckedIndexedAccess` just can't see that
22
+ // from the regex alone. Centralized here so the six call sites below don't
23
+ // each repeat the same assertion and reasoning.
24
+ function matchedTagAndAttrs(m) {
25
+ return { tagName: m[1].toLowerCase(), rawAttrs: m[2] };
26
+ }
27
+ /**
28
+ * Split `input` into ordered prose/form segments. Scans repeatedly for
29
+ * `question-form`/`ask-question` opens; for each, locates the matching close
30
+ * tag and tries to parse the JSON body. A block that doesn't parse cleanly,
31
+ * or has no close tag yet, is left in the prose stream verbatim.
32
+ *
33
+ * @complexity O(n) amortized in `input.length` — each iteration advances the
34
+ * cursor past the segment it just emitted.
35
+ */
36
+ export function splitOnQuestionForms(input) {
37
+ const out = [];
38
+ let cursor = 0;
39
+ while (cursor < input.length) {
40
+ const slice = input.slice(cursor);
41
+ const m = OPEN_RE.exec(slice);
42
+ if (!m) {
43
+ out.push({ kind: 'text', text: slice });
44
+ break;
45
+ }
46
+ const { tagName, rawAttrs } = matchedTagAndAttrs(m);
47
+ const closeTag = `</${tagName}>`;
48
+ const openStart = cursor + m.index;
49
+ const openEnd = openStart + m[0].length;
50
+ const closeIdx = findCloseTag(input, openEnd, closeTag);
51
+ if (closeIdx === -1) {
52
+ // Unterminated — leave the rest as prose so we don't swallow it.
53
+ out.push({ kind: 'text', text: slice });
54
+ break;
55
+ }
56
+ if (openStart > cursor) {
57
+ out.push({ kind: 'text', text: input.slice(cursor, openStart) });
58
+ }
59
+ const body = input.slice(openEnd, closeIdx);
60
+ const attrs = parseQuotedAttrs(rawAttrs);
61
+ const form = tryParseForm(body, attrs);
62
+ const blockEnd = closeIdx + closeTag.length;
63
+ if (form) {
64
+ out.push({ kind: 'form', form, raw: input.slice(openStart, blockEnd) });
65
+ }
66
+ else {
67
+ // Malformed — keep raw text so the user can still see it.
68
+ out.push({ kind: 'text', text: input.slice(openStart, blockEnd) });
69
+ }
70
+ cursor = blockEnd;
71
+ }
72
+ return out;
73
+ }
74
+ /** The first complete, parseable `<question-form>` in `input`, or `null`. */
75
+ export function findFirstQuestionForm(input) {
76
+ for (const seg of splitOnQuestionForms(input)) {
77
+ if (seg.kind === 'form')
78
+ return { form: seg.form, raw: seg.raw };
79
+ }
80
+ return null;
81
+ }
82
+ /**
83
+ * Convenience wrapper over {@link findFirstQuestionForm} matching the
84
+ * `parseQuestionForm()` name from the target API — returns just the form
85
+ * (dropping the matched raw text), or `null` when `input` has no complete
86
+ * question-form block. For a still-streaming block use
87
+ * {@link parsePartialQuestionForm} instead.
88
+ */
89
+ export function parseQuestionForm(input) {
90
+ return findFirstQuestionForm(input)?.form ?? null;
91
+ }
92
+ /**
93
+ * Drop a trailing, not-yet-closed question-form block from streaming text so
94
+ * a chat surface doesn't flash raw `<question-form>{…` markup before the
95
+ * JSON finishes. Returns the visible text plus whether such an open block
96
+ * existed (meaning a form is mid-generation).
97
+ */
98
+ export function stripTrailingOpenQuestionForm(input) {
99
+ let cursor = 0;
100
+ while (cursor < input.length) {
101
+ const slice = input.slice(cursor);
102
+ const m = OPEN_RE.exec(slice);
103
+ if (!m)
104
+ break;
105
+ const { tagName } = matchedTagAndAttrs(m);
106
+ const closeTag = `</${tagName}>`;
107
+ const openStart = cursor + m.index;
108
+ const openEnd = openStart + m[0].length;
109
+ const closeIdx = findCloseTag(input, openEnd, closeTag);
110
+ if (closeIdx === -1) {
111
+ return { text: input.slice(0, openStart), hadOpenForm: true };
112
+ }
113
+ cursor = closeIdx + closeTag.length;
114
+ }
115
+ return { text: input, hadOpenForm: false };
116
+ }
117
+ /** `true` when a question-form open tag is present but its close tag hasn't streamed in yet. */
118
+ export function hasUnterminatedQuestionForm(input) {
119
+ return stripTrailingOpenQuestionForm(input).hadOpenForm;
120
+ }
121
+ function findCloseTag(input, from, closeTag) {
122
+ const closeLower = closeTag.toLowerCase();
123
+ const tagLen = closeTag.length;
124
+ const maxStart = input.length - tagLen;
125
+ for (let i = from; i <= maxStart; i++) {
126
+ if (input.slice(i, i + tagLen).toLowerCase() === closeLower) {
127
+ return i;
128
+ }
129
+ }
130
+ return -1;
131
+ }
132
+ function tryParseForm(body, attrs) {
133
+ const trimmed = body.trim();
134
+ if (!trimmed)
135
+ return null;
136
+ // Allow the JSON to be wrapped in a fenced ```json block — common when the
137
+ // model echoes its own indented body.
138
+ const stripped = trimmed
139
+ .replace(/^```(?:json)?\s*/i, '')
140
+ .replace(/```\s*$/i, '')
141
+ .trim();
142
+ let data;
143
+ try {
144
+ data = JSON.parse(stripped);
145
+ }
146
+ catch {
147
+ return null;
148
+ }
149
+ if (!data || typeof data !== 'object')
150
+ return null;
151
+ const obj = data;
152
+ const rawQuestions = Array.isArray(obj.questions) ? obj.questions : null;
153
+ if (!rawQuestions)
154
+ return null;
155
+ const questions = [];
156
+ rawQuestions.forEach((q, i) => {
157
+ const mapped = mapRawQuestion(q, i);
158
+ if (mapped)
159
+ questions.push(mapped);
160
+ });
161
+ if (questions.length === 0)
162
+ return null;
163
+ const id = attrs.id ?? (typeof obj.id === 'string' ? obj.id : 'discovery');
164
+ const title = attrs.title ?? (typeof obj.title === 'string' ? obj.title : 'A few quick questions');
165
+ const description = typeof obj.description === 'string' ? obj.description : undefined;
166
+ const submitLabel = typeof obj.submitLabel === 'string' ? obj.submitLabel : undefined;
167
+ return {
168
+ id,
169
+ title,
170
+ questions,
171
+ ...(description ? { description } : {}),
172
+ ...(submitLabel ? { submitLabel } : {}),
173
+ };
174
+ }
175
+ /**
176
+ * Tolerant parser for a still-streaming `<question-form>` block. Unlike
177
+ * {@link tryParseForm} it does not require valid, complete JSON: it reads the
178
+ * title/id from the open tag's attrs (available the instant the tag streams
179
+ * in) and extracts however many *complete* question objects have arrived so
180
+ * far, so a Questions panel can render a frame immediately and fill
181
+ * questions in progressively. Returns `null` only when no open tag is
182
+ * present at all.
183
+ *
184
+ * @complexity O(n) in `input.length` (one regex scan plus a linear
185
+ * string-aware brace walk via {@link parsePartialJson}).
186
+ */
187
+ export function parsePartialQuestionForm(input) {
188
+ const m = OPEN_RE.exec(input);
189
+ if (!m)
190
+ return null;
191
+ const { tagName, rawAttrs } = matchedTagAndAttrs(m);
192
+ const closeTag = `</${tagName}>`;
193
+ const openEnd = m.index + m[0].length;
194
+ const attrs = parseQuotedAttrs(rawAttrs);
195
+ const closeIdx = findCloseTag(input, openEnd, closeTag);
196
+ const rawBody = closeIdx === -1 ? input.slice(openEnd) : input.slice(openEnd, closeIdx);
197
+ // Strip the fenced ```json wrapper some models emit. The opening fence is
198
+ // removed always; the trailing fence is removed too once it streams in
199
+ // (possibly only a partial ``` so far) — otherwise leftover backticks make
200
+ // the JSON unparseable in the gap between "fence closed" and
201
+ // "</question-form> arrived", dropping the live preview back to empty.
202
+ const body = stripTrailingFence(rawBody.replace(/^\s*```(?:json)?\s*/i, ''));
203
+ // Derive form-level metadata from the *parsed top-level object*, not a
204
+ // whole-body regex scan: a nested question/option `id`/`title`/`description`
205
+ // must not masquerade as the form's own.
206
+ const parsed = parsePartialJson(body);
207
+ const top = parsed && typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};
208
+ const topTitle = typeof top.title === 'string' && top.title.trim().length > 0 ? top.title : undefined;
209
+ // `id` keys a still-editable panel, so it must be stable for the whole
210
+ // stream — don't adopt it until its string literal is fully terminated,
211
+ // otherwise it would churn character-by-character and remount the panel.
212
+ const id = attrs.id ?? completeTopLevelString(body, 'id') ?? 'discovery';
213
+ const title = attrs.title ?? topTitle ?? 'A few quick questions';
214
+ const description = typeof top.description === 'string' ? top.description : undefined;
215
+ const submitLabel = typeof top.submitLabel === 'string' ? top.submitLabel : undefined;
216
+ const questions = shapeStreamingQuestions(top.questions, countClosedQuestionObjects(body));
217
+ return {
218
+ id,
219
+ title,
220
+ questions,
221
+ ...(description ? { description } : {}),
222
+ ...(submitLabel ? { submitLabel } : {}),
223
+ };
224
+ }
225
+ // Strip a trailing ``` fence (possibly only partially streamed) from a form
226
+ // body — but only when those backticks are the closing wrapper, not content
227
+ // of a JSON string value still being typed.
228
+ function stripTrailingFence(body) {
229
+ const m = /\s*`{1,3}\s*$/.exec(body);
230
+ if (!m)
231
+ return body;
232
+ const before = body.slice(0, m.index);
233
+ if (endsInsideJsonString(before))
234
+ return body;
235
+ return before;
236
+ }
237
+ function endsInsideJsonString(s) {
238
+ let inStr = false;
239
+ let esc = false;
240
+ for (let i = 0; i < s.length; i++) {
241
+ const c = s[i];
242
+ if (inStr) {
243
+ if (esc)
244
+ esc = false;
245
+ else if (c === '\\')
246
+ esc = true;
247
+ else if (c === '"')
248
+ inStr = false;
249
+ }
250
+ else if (c === '"') {
251
+ inStr = true;
252
+ }
253
+ }
254
+ return inStr;
255
+ }
256
+ // Return a top-level (depth-1) string field's value ONLY if its string
257
+ // literal is fully terminated in the (possibly partial) body. Depth-aware so
258
+ // a nested question `id` can't be mistaken for the form's own.
259
+ function completeTopLevelString(body, field) {
260
+ const marker = `"${field}"`;
261
+ let depth = 0;
262
+ let inStr = false;
263
+ let esc = false;
264
+ for (let i = 0; i < body.length; i++) {
265
+ const c = body[i];
266
+ if (inStr) {
267
+ if (esc)
268
+ esc = false;
269
+ else if (c === '\\')
270
+ esc = true;
271
+ else if (c === '"')
272
+ inStr = false;
273
+ continue;
274
+ }
275
+ if (c === '{' || c === '[') {
276
+ depth++;
277
+ continue;
278
+ }
279
+ if (c === '}' || c === ']') {
280
+ depth--;
281
+ continue;
282
+ }
283
+ if (c === '"') {
284
+ if (depth === 1 && body.startsWith(marker, i)) {
285
+ let j = i + marker.length;
286
+ while (j < body.length && /\s/.test(body[j]))
287
+ j++;
288
+ if (body[j] !== ':') {
289
+ inStr = true; // it's a value string, not our key — skip it
290
+ continue;
291
+ }
292
+ j++;
293
+ while (j < body.length && /\s/.test(body[j]))
294
+ j++;
295
+ if (body[j] !== '"')
296
+ return undefined; // value not a (started) string
297
+ let value = '';
298
+ let vesc = false;
299
+ for (let k = j + 1; k < body.length; k++) {
300
+ const vc = body[k];
301
+ if (vesc) {
302
+ value += vc;
303
+ vesc = false;
304
+ }
305
+ else if (vc === '\\') {
306
+ value += vc;
307
+ vesc = true;
308
+ }
309
+ else if (vc === '"') {
310
+ try {
311
+ return JSON.parse(`"${value}"`);
312
+ }
313
+ catch {
314
+ return value;
315
+ }
316
+ }
317
+ else {
318
+ value += vc;
319
+ }
320
+ }
321
+ return undefined; // closing quote hasn't streamed yet
322
+ }
323
+ inStr = true;
324
+ }
325
+ }
326
+ return undefined;
327
+ }
328
+ function shapeStreamingQuestions(rawQuestions, closedCount) {
329
+ if (!Array.isArray(rawQuestions))
330
+ return [];
331
+ const out = [];
332
+ rawQuestions.forEach((raw, index) => {
333
+ if (!raw || typeof raw !== 'object')
334
+ return;
335
+ const q = raw;
336
+ const label = q.label;
337
+ if (typeof label !== 'string' || label.trim().length === 0)
338
+ return;
339
+ // Surface a question only once its canonical id is determinable, so the
340
+ // preview id matches what the final parse assigns: a closed object's id
341
+ // is final; an in-flight object needs an explicit id already present.
342
+ const isClosed = index < closedCount;
343
+ const hasId = typeof q.id === 'string' && q.id.trim().length > 0;
344
+ if (!isClosed && !hasId)
345
+ return;
346
+ const mapped = mapRawQuestion(raw, index);
347
+ if (mapped)
348
+ out.push(mapped);
349
+ });
350
+ return out;
351
+ }
352
+ // Count how many question objects in a partial `"questions": [ … ]` body
353
+ // have their closing brace already streamed (string-aware).
354
+ function countClosedQuestionObjects(body) {
355
+ const keyMatch = /"questions"\s*:\s*\[/.exec(body);
356
+ if (!keyMatch)
357
+ return 0;
358
+ let i = keyMatch.index + keyMatch[0].length;
359
+ let count = 0;
360
+ while (i < body.length) {
361
+ while (i < body.length && /[\s,]/.test(body[i]))
362
+ i++;
363
+ if (i >= body.length || body[i] === ']')
364
+ break;
365
+ if (body[i] !== '{')
366
+ break;
367
+ const obj = extractBalancedObject(body, i);
368
+ if (!obj)
369
+ break; // trailing object hasn't closed yet
370
+ count++;
371
+ i += obj.length;
372
+ }
373
+ return count;
374
+ }
375
+ // Return the substring for the balanced `{...}` object starting at `start`,
376
+ // or null if it never closes (string-aware so braces inside strings don't count).
377
+ function extractBalancedObject(s, start) {
378
+ let depth = 0;
379
+ let inStr = false;
380
+ let esc = false;
381
+ for (let i = start; i < s.length; i++) {
382
+ const c = s[i];
383
+ if (inStr) {
384
+ if (esc)
385
+ esc = false;
386
+ else if (c === '\\')
387
+ esc = true;
388
+ else if (c === '"')
389
+ inStr = false;
390
+ continue;
391
+ }
392
+ if (c === '"')
393
+ inStr = true;
394
+ else if (c === '{')
395
+ depth++;
396
+ else if (c === '}') {
397
+ depth--;
398
+ if (depth === 0)
399
+ return s.slice(start, i + 1);
400
+ }
401
+ }
402
+ return null;
403
+ }
404
+ //# sourceMappingURL=scan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../src/core/question-form/scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,wEAAwE;AACxE,MAAM,OAAO,GAAG,0CAA0C,CAAC;AAE3D,sEAAsE;AACtE,4EAA4E;AA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AC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,4EAA4E;AAC5E,kFAAkF;AAClF,SAAS,qBAAqB,CAAC,CAAS,EAAE,KAAa;IACrD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,GAAG,GAAG,KAAK,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAW,CAAC;QACzB,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,GAAG;gBAAE,GAAG,GAAG,KAAK,CAAC;iBAChB,IAAI,CAAC,KAAK,IAAI;gBAAE,GAAG,GAAG,IAAI,CAAC;iBAC3B,IAAI,CAAC,KAAK,GAAG;gBAAE,KAAK,GAAG,KAAK,CAAC;YAClC,SAAS;QACX,CAAC;QACD,IAAI,CAAC,KAAK,GAAG;YAAE,KAAK,GAAG,IAAI,CAAC;aACvB,IAAI,CAAC,KAAK,GAAG;YAAE,KAAK,EAAE,CAAC;aACvB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YACnB,KAAK,EAAE,CAAC;YACR,IAAI,KAAK,KAAK,CAAC;gBAAE,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @module question-form/types
3
+ *
4
+ * Type vocabulary for the `<question-form>` parser, split out of the
5
+ * original single-file `question-form.ts` so `scan.ts` / `normalize.ts` /
6
+ * `format.ts` can each import just the types they need without pulling in
7
+ * one another's implementation. See `../question-form.ts` for the public
8
+ * facade and the block format this vocabulary describes.
9
+ */
10
+ export type QuestionType = 'radio' | 'checkbox' | 'select' | 'text' | 'textarea' | 'number' | 'range' | 'date' | 'time' | 'datetime-local' | 'color' | 'url' | 'email' | 'tel' | 'file' | 'switch' | 'direction-cards';
11
+ /**
12
+ * Rich card metadata for a single `direction-cards` option. A direction
13
+ * picker renders a swatch row, a serif/sans type sample, a mood blurb, and a
14
+ * "references" line so users can scan visually instead of reading radio
15
+ * labels. The agent emits this metadata inline in the form JSON so a host
16
+ * can render it without additional fetches.
17
+ */
18
+ export interface DirectionCard {
19
+ /** The radio value — what comes back in the user's answer. Must match a label/value in `options`. */
20
+ id: string;
21
+ /** Short headline on the card. */
22
+ label: string;
23
+ /** One- or two-sentence mood blurb. */
24
+ mood: string;
25
+ /** Real-world exemplars (kept to at most 6 by the parser). */
26
+ references: string[];
27
+ /** Swatch hex / OKLch strings for the palette row (kept to at most 8 by the parser). */
28
+ palette: string[];
29
+ /** Display (headline) font stack, for a live "Aa" sample. */
30
+ displayFont: string;
31
+ /** Body font stack, for a secondary sample. */
32
+ bodyFont: string;
33
+ }
34
+ export interface FormOption {
35
+ label: string;
36
+ value: string;
37
+ description?: string;
38
+ }
39
+ export interface FormQuestion {
40
+ id: string;
41
+ label: string;
42
+ type: QuestionType;
43
+ options?: FormOption[];
44
+ placeholder?: string;
45
+ required?: boolean;
46
+ help?: string;
47
+ defaultValue?: string | string[];
48
+ /** Only applies when `type === 'checkbox'`. Caps the number of selected options. */
49
+ maxSelections?: number;
50
+ /**
51
+ * For finite-choice controls, show a free-form override beside the
52
+ * generated options so the user can supply their own value.
53
+ */
54
+ allowCustom?: boolean;
55
+ customLabel?: string;
56
+ customPlaceholder?: string;
57
+ /** Numeric/range inputs only. */
58
+ min?: number;
59
+ max?: number;
60
+ step?: number;
61
+ /** File inputs only. The answer serializes selected file names, not bytes. */
62
+ multiple?: boolean;
63
+ /** File inputs only. Mirrors the native file input `accept` attribute. */
64
+ accept?: string;
65
+ /** Only present when `type === 'direction-cards'`. Mapped to `options` by `id`. */
66
+ cards?: DirectionCard[];
67
+ }
68
+ export interface QuestionForm {
69
+ id: string;
70
+ title: string;
71
+ description?: string;
72
+ questions: FormQuestion[];
73
+ submitLabel?: string;
74
+ }
75
+ export type FormSegment = {
76
+ kind: 'text';
77
+ text: string;
78
+ } | {
79
+ kind: 'form';
80
+ form: QuestionForm;
81
+ raw: string;
82
+ };
83
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/question-form/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,UAAU,GACV,QAAQ,GACR,MAAM,GACN,UAAU,GACV,QAAQ,GACR,OAAO,GACP,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,KAAK,GACL,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,iBAAiB,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,qGAAqG;IACrG,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,wFAAwF;IACxF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @module question-form/types
3
+ *
4
+ * Type vocabulary for the `<question-form>` parser, split out of the
5
+ * original single-file `question-form.ts` so `scan.ts` / `normalize.ts` /
6
+ * `format.ts` can each import just the types they need without pulling in
7
+ * one another's implementation. See `../question-form.ts` for the public
8
+ * facade and the block format this vocabulary describes.
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/question-form/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @module question-form
3
+ *
4
+ * Parser for inline `<question-form>...</question-form>` blocks an agent
5
+ * emits to ask the user a structured set of clarifying questions before
6
+ * proceeding. Body must be JSON, e.g.:
7
+ *
8
+ * <question-form id="discovery" title="Quick brief">
9
+ * {
10
+ * "questions": [
11
+ * { "id": "platform", "label": "Platform", "type": "radio",
12
+ * "options": ["Mobile (iOS/Android)", "Desktop web", "Responsive"],
13
+ * "required": true }
14
+ * ]
15
+ * }
16
+ * </question-form>
17
+ *
18
+ * `<ask-question>...</ask-question>` is accepted as an alias for
19
+ * `<question-form>`, so a model that drifts to the colloquial tag name
20
+ * still renders correctly instead of leaking raw markup into prose.
21
+ *
22
+ * Splits a final assistant text payload into ordered segments — prose +
23
+ * forms — so a host's message renderer can render the form inline.
24
+ *
25
+ * This module is a stable public facade. The implementation is split across
26
+ * `question-form/` by responsibility, each with its own invariants:
27
+ * - `types.ts` — the shared type vocabulary
28
+ * - `scan.ts` — tag matching, prose/form segmentation, and the
29
+ * tolerant streaming-recovery path
30
+ * - `normalize.ts` — raw-JSON-to-`FormQuestion` normalization, including
31
+ * the `isRenderableColor` CSS-injection guard
32
+ * - `format.ts` — turning submitted answers into agent-readable prose
33
+ * Only re-exports live here; do not add implementation directly to this file.
34
+ */
35
+ export type { QuestionType, DirectionCard, FormOption, FormQuestion, QuestionForm, FormSegment } from './question-form/types.js';
36
+ export { splitOnQuestionForms, findFirstQuestionForm, parseQuestionForm, stripTrailingOpenQuestionForm, hasUnterminatedQuestionForm, parsePartialQuestionForm, } from './question-form/scan.js';
37
+ export { isRenderableColor } from './question-form/normalize.js';
38
+ export { formatFormAnswers, formOptionLabelForValue, formOptionValueForLabel } from './question-form/format.js';
39
+ //# sourceMappingURL=question-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-form.d.ts","sourceRoot":"","sources":["../../src/core/question-form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACjI,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { splitOnQuestionForms, findFirstQuestionForm, parseQuestionForm, stripTrailingOpenQuestionForm, hasUnterminatedQuestionForm, parsePartialQuestionForm, } from './question-form/scan.js';
2
+ export { isRenderableColor } from './question-form/normalize.js';
3
+ export { formatFormAnswers, formOptionLabelForValue, formOptionValueForLabel } from './question-form/format.js';
4
+ //# sourceMappingURL=question-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-form.js","sourceRoot":"","sources":["../../src/core/question-form.ts"],"names":[],"mappings":"AAmCA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @module todos
3
+ *
4
+ * Pure TodoWrite-style plan-tool snapshot parsing/derivation. Reads the
5
+ * structured plan a `TodoWrite`/`update_plan`-shaped tool call carries and
6
+ * derives the "latest plan state" a pinned progress card renders — no I/O,
7
+ * no framework.
8
+ */
9
+ import type { AgentEvent } from './events.js';
10
+ import type { ChatRunStatus } from './messages.js';
11
+ export type TodoStatus = 'pending' | 'in_progress' | 'completed' | 'stopped';
12
+ export interface TodoItem {
13
+ content: string;
14
+ status: TodoStatus;
15
+ activeForm?: string | undefined;
16
+ }
17
+ /** `true` when `name` is one of the accepted plan/TodoWrite tool-name spellings. */
18
+ export declare function isTodoWriteToolName(name: string): boolean;
19
+ /**
20
+ * Parse a plan-tool call's raw `input` into a normalized `TodoItem[]`,
21
+ * tolerating the several shapes different agent runtimes emit (`todos` vs
22
+ * `plan` array; `content`/`step`/`description`/`label`/`text` for the item
23
+ * body; `activeForm`/`active_form`).
24
+ *
25
+ * @param input - The `tool_use` event's `input`, of unknown shape.
26
+ * @returns Normalized items; entries with no recognizable body text are dropped.
27
+ * @complexity O(n) in the number of raw plan entries.
28
+ */
29
+ export declare function parseTodoWriteInput(input: unknown): TodoItem[];
30
+ /**
31
+ * Find the most recent plan-tool `tool_use` in a single turn's events and
32
+ * return its parsed items, or `[]` if this turn never wrote a plan.
33
+ * @complexity O(n), scanning from the end.
34
+ */
35
+ export declare function latestTodosFromEvents(events: AgentEvent[] | undefined): TodoItem[];
36
+ /** The subset of {@link latestTodosFromEvents} not yet marked `completed`. */
37
+ export declare function unfinishedTodosFromEvents(events: AgentEvent[] | undefined): TodoItem[];
38
+ /**
39
+ * Walk a conversation in reverse to find the most recent plan-tool
40
+ * `tool_use` across every message and return its raw (un-parsed) `input`, so
41
+ * a caller can hand it straight to a plan/todo card without re-implementing
42
+ * the discovery walk.
43
+ *
44
+ * @param messages - Conversation turns, oldest first (only `events` is read).
45
+ * @returns The raw tool input, or `null` if no plan tool has run yet.
46
+ * @complexity O(n*m) worst case (n messages, m events each), but returns on
47
+ * the first hit scanning backwards, so the common case (a recent plan
48
+ * update) is far cheaper.
49
+ */
50
+ export declare function latestTodoWriteInputFromMessages(messages: ReadonlyArray<{
51
+ events?: AgentEvent[] | undefined;
52
+ }> | undefined): unknown | null;
53
+ /** Convenience alias for {@link latestTodoWriteInputFromMessages} matching the `latestTodoWriteInput()` name in the target API. */
54
+ export declare const latestTodoWriteInput: typeof latestTodoWriteInputFromMessages;
55
+ /**
56
+ * Variant of {@link latestTodoWriteInputFromMessages} for a "pinned progress
57
+ * card" that must stay honest once its owning run has ended: while the run
58
+ * is still active the raw input is returned as-is, but once the run is
59
+ * terminal any item still marked `in_progress` is flipped to `stopped` (the
60
+ * agent process exited before marking it done or failed).
61
+ *
62
+ * @complexity Same as {@link latestTodoWriteInputFromMessages}, plus an O(m)
63
+ * remap of the winning turn's items when the run has ended.
64
+ */
65
+ export declare function latestTodoWriteInputForPinnedCard<T extends {
66
+ events?: AgentEvent[] | undefined;
67
+ runStatus?: ChatRunStatus | undefined;
68
+ endedAt?: number | undefined;
69
+ }>(messages: ReadonlyArray<T> | undefined): unknown | null;
70
+ //# sourceMappingURL=todos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../src/core/todos.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7E,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AASD,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzD;AAYD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,EA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