@assistant-ui/core 0.3.19 → 0.3.21

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 (934) hide show
  1. package/dist/adapters/attachment.d.ts +50 -43
  2. package/dist/adapters/attachment.d.ts.map +1 -1
  3. package/dist/adapters/attachment.js +52 -21
  4. package/dist/adapters/attachment.js.map +1 -1
  5. package/dist/adapters/directive-formatter.d.ts +2 -5
  6. package/dist/adapters/directive-formatter.d.ts.map +1 -1
  7. package/dist/adapters/feedback.d.ts +7 -8
  8. package/dist/adapters/feedback.d.ts.map +1 -1
  9. package/dist/adapters/index.d.ts +14 -9
  10. package/dist/adapters/index.d.ts.map +1 -0
  11. package/dist/adapters/index.js +1 -1
  12. package/dist/adapters/speech.d.ts +63 -65
  13. package/dist/adapters/speech.d.ts.map +1 -1
  14. package/dist/adapters/speech.js +16 -2
  15. package/dist/adapters/speech.js.map +1 -1
  16. package/dist/adapters/suggestion.d.ts +19 -22
  17. package/dist/adapters/suggestion.d.ts.map +1 -1
  18. package/dist/adapters/thread-history.d.ts +60 -58
  19. package/dist/adapters/thread-history.d.ts.map +1 -1
  20. package/dist/adapters/trigger.d.ts +8 -11
  21. package/dist/adapters/trigger.d.ts.map +1 -1
  22. package/dist/adapters/voice.d.ts +50 -45
  23. package/dist/adapters/voice.d.ts.map +1 -1
  24. package/dist/adapters/voice.js +17 -3
  25. package/dist/adapters/voice.js.map +1 -1
  26. package/dist/index.d.ts +70 -56
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +6 -6
  29. package/dist/index.js.map +1 -1
  30. package/dist/internal/duplicate-detection.d.ts +1 -4
  31. package/dist/internal/duplicate-detection.d.ts.map +1 -1
  32. package/dist/internal.d.ts +27 -58
  33. package/dist/internal.d.ts.map +1 -0
  34. package/dist/internal.js +8 -6
  35. package/dist/model-context/frame/host.d.ts +20 -23
  36. package/dist/model-context/frame/host.d.ts.map +1 -1
  37. package/dist/model-context/frame/host.js +3 -1
  38. package/dist/model-context/frame/host.js.map +1 -1
  39. package/dist/model-context/frame/provider.d.ts +28 -30
  40. package/dist/model-context/frame/provider.d.ts.map +1 -1
  41. package/dist/model-context/frame/provider.js +6 -0
  42. package/dist/model-context/frame/provider.js.map +1 -1
  43. package/dist/model-context/frame/types.d.ts +24 -27
  44. package/dist/model-context/frame/types.d.ts.map +1 -1
  45. package/dist/model-context/frame/validate.d.ts +3 -0
  46. package/dist/model-context/frame/validate.d.ts.map +1 -0
  47. package/dist/model-context/frame/validate.js +26 -0
  48. package/dist/model-context/frame/validate.js.map +1 -0
  49. package/dist/model-context/interactable-composer-metadata.d.ts +51 -39
  50. package/dist/model-context/interactable-composer-metadata.d.ts.map +1 -1
  51. package/dist/model-context/interactable-composer-metadata.js +30 -6
  52. package/dist/model-context/interactable-composer-metadata.js.map +1 -1
  53. package/dist/model-context/registry-handles.d.ts +9 -12
  54. package/dist/model-context/registry-handles.d.ts.map +1 -1
  55. package/dist/model-context/registry.d.ts +15 -18
  56. package/dist/model-context/registry.d.ts.map +1 -1
  57. package/dist/model-context/tool-call-text.d.ts +15 -17
  58. package/dist/model-context/tool-call-text.d.ts.map +1 -1
  59. package/dist/model-context/tool.d.ts +12 -14
  60. package/dist/model-context/tool.d.ts.map +1 -1
  61. package/dist/model-context/types.d.ts +40 -43
  62. package/dist/model-context/types.d.ts.map +1 -1
  63. package/dist/react/AssistantProvider.d.ts +9 -12
  64. package/dist/react/AssistantProvider.d.ts.map +1 -1
  65. package/dist/react/AssistantRuntimeProvider.d.ts +23 -26
  66. package/dist/react/AssistantRuntimeProvider.d.ts.map +1 -1
  67. package/dist/react/RuntimeAdapter.d.ts +4 -8
  68. package/dist/react/RuntimeAdapter.d.ts.map +1 -1
  69. package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts +28 -23
  70. package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts.map +1 -1
  71. package/dist/react/adapters/LocalStorageThreadListAdapter.js +77 -58
  72. package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
  73. package/dist/react/adapters/TitleGenerationAdapter.d.ts +4 -7
  74. package/dist/react/adapters/TitleGenerationAdapter.d.ts.map +1 -1
  75. package/dist/react/client/AdaptedRemoteThread.d.ts +6 -9
  76. package/dist/react/client/AdaptedRemoteThread.d.ts.map +1 -1
  77. package/dist/react/client/DataRenderers.d.ts +2 -5
  78. package/dist/react/client/DataRenderers.d.ts.map +1 -1
  79. package/dist/react/client/InMemoryThreadList.d.ts +9 -12
  80. package/dist/react/client/InMemoryThreadList.d.ts.map +1 -1
  81. package/dist/react/client/Interactables.d.ts +3 -6
  82. package/dist/react/client/Interactables.d.ts.map +1 -1
  83. package/dist/react/client/Interactables.js +306 -101
  84. package/dist/react/client/Interactables.js.map +1 -1
  85. package/dist/react/client/RemoteThreadList.d.ts +34 -37
  86. package/dist/react/client/RemoteThreadList.d.ts.map +1 -1
  87. package/dist/react/client/RemoteThreadList.js +2 -1
  88. package/dist/react/client/RemoteThreadList.js.map +1 -1
  89. package/dist/react/client/Tools.d.ts +10 -12
  90. package/dist/react/client/Tools.d.ts.map +1 -1
  91. package/dist/react/client/Tools.js +4 -8
  92. package/dist/react/client/Tools.js.map +1 -1
  93. package/dist/react/client/interactable-model-context.d.ts +9 -11
  94. package/dist/react/client/interactable-model-context.d.ts.map +1 -1
  95. package/dist/react/client/interactable-model-context.js +32 -22
  96. package/dist/react/client/interactable-model-context.js.map +1 -1
  97. package/dist/react/index.d.ts +160 -122
  98. package/dist/react/index.d.ts.map +1 -0
  99. package/dist/react/index.js +5 -5
  100. package/dist/react/interactables-legacy/Interactables.d.ts +2 -5
  101. package/dist/react/interactables-legacy/Interactables.d.ts.map +1 -1
  102. package/dist/react/interactables-legacy/Interactables.js +15 -8
  103. package/dist/react/interactables-legacy/Interactables.js.map +1 -1
  104. package/dist/react/interactables-legacy/interactable-model-context.d.ts +6 -9
  105. package/dist/react/interactables-legacy/interactable-model-context.d.ts.map +1 -1
  106. package/dist/react/interactables-legacy/interactable-model-context.js +13 -14
  107. package/dist/react/interactables-legacy/interactable-model-context.js.map +1 -1
  108. package/dist/react/interactables-legacy/scopes.d.ts +42 -46
  109. package/dist/react/interactables-legacy/scopes.d.ts.map +1 -1
  110. package/dist/react/interactables-legacy/useAssistantInteractable.d.ts +8 -11
  111. package/dist/react/interactables-legacy/useAssistantInteractable.d.ts.map +1 -1
  112. package/dist/react/interactables-legacy/useInteractableState.d.ts +7 -9
  113. package/dist/react/interactables-legacy/useInteractableState.d.ts.map +1 -1
  114. package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts +23 -14
  115. package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts.map +1 -1
  116. package/dist/react/interactables-shared/useInteractablePersistenceQueue.js +54 -25
  117. package/dist/react/interactables-shared/useInteractablePersistenceQueue.js.map +1 -1
  118. package/dist/react/model-context/define-mcp-toolkit.d.ts +15 -18
  119. package/dist/react/model-context/define-mcp-toolkit.d.ts.map +1 -1
  120. package/dist/react/model-context/define-toolkit.d.ts +13 -6
  121. package/dist/react/model-context/define-toolkit.d.ts.map +1 -1
  122. package/dist/react/model-context/external-tool.d.ts +1 -4
  123. package/dist/react/model-context/external-tool.d.ts.map +1 -1
  124. package/dist/react/model-context/human-tool.d.ts +3 -6
  125. package/dist/react/model-context/human-tool.d.ts.map +1 -1
  126. package/dist/react/model-context/interactableTool.d.ts +26 -29
  127. package/dist/react/model-context/interactableTool.d.ts.map +1 -1
  128. package/dist/react/model-context/makeAssistantDataUI.d.ts +6 -9
  129. package/dist/react/model-context/makeAssistantDataUI.d.ts.map +1 -1
  130. package/dist/react/model-context/makeAssistantTool.d.ts +6 -9
  131. package/dist/react/model-context/makeAssistantTool.d.ts.map +1 -1
  132. package/dist/react/model-context/makeAssistantToolUI.d.ts +6 -9
  133. package/dist/react/model-context/makeAssistantToolUI.d.ts.map +1 -1
  134. package/dist/react/model-context/provider-tool.d.ts +5 -7
  135. package/dist/react/model-context/provider-tool.d.ts.map +1 -1
  136. package/dist/react/model-context/stub-tool.d.ts +1 -4
  137. package/dist/react/model-context/stub-tool.d.ts.map +1 -1
  138. package/dist/react/model-context/toolbox.d.ts +44 -32
  139. package/dist/react/model-context/toolbox.d.ts.map +1 -1
  140. package/dist/react/model-context/useAssistantContext.d.ts +3 -6
  141. package/dist/react/model-context/useAssistantContext.d.ts.map +1 -1
  142. package/dist/react/model-context/useAssistantDataUI.d.ts +7 -10
  143. package/dist/react/model-context/useAssistantDataUI.d.ts.map +1 -1
  144. package/dist/react/model-context/useAssistantInstructions.d.ts +3 -6
  145. package/dist/react/model-context/useAssistantInstructions.d.ts.map +1 -1
  146. package/dist/react/model-context/useAssistantTool.d.ts +9 -13
  147. package/dist/react/model-context/useAssistantTool.d.ts.map +1 -1
  148. package/dist/react/model-context/useAssistantToolUI.d.ts +13 -16
  149. package/dist/react/model-context/useAssistantToolUI.d.ts.map +1 -1
  150. package/dist/react/model-context/useAuiToolOverrides.d.ts +3 -5
  151. package/dist/react/model-context/useAuiToolOverrides.d.ts.map +1 -1
  152. package/dist/react/model-context/useInlineRender.d.ts +3 -6
  153. package/dist/react/model-context/useInlineRender.d.ts.map +1 -1
  154. package/dist/react/model-context/useInteractable.d.ts +40 -40
  155. package/dist/react/model-context/useInteractable.d.ts.map +1 -1
  156. package/dist/react/model-context/useInteractableState.d.ts +10 -9
  157. package/dist/react/model-context/useInteractableState.d.ts.map +1 -1
  158. package/dist/react/model-context/useInteractableVersions.d.ts +4 -7
  159. package/dist/react/model-context/useInteractableVersions.d.ts.map +1 -1
  160. package/dist/react/model-context/useToolArgsStatus.d.ts +7 -9
  161. package/dist/react/model-context/useToolArgsStatus.d.ts.map +1 -1
  162. package/dist/react/primitive-hooks/useActionBarCopy.d.ts +7 -10
  163. package/dist/react/primitive-hooks/useActionBarCopy.d.ts.map +1 -1
  164. package/dist/react/primitive-hooks/useActionBarEdit.d.ts +3 -6
  165. package/dist/react/primitive-hooks/useActionBarEdit.d.ts.map +1 -1
  166. package/dist/react/primitive-hooks/useActionBarFeedback.d.ts +6 -9
  167. package/dist/react/primitive-hooks/useActionBarFeedback.d.ts.map +1 -1
  168. package/dist/react/primitive-hooks/useActionBarReload.d.ts +3 -6
  169. package/dist/react/primitive-hooks/useActionBarReload.d.ts.map +1 -1
  170. package/dist/react/primitive-hooks/useActionBarSpeak.d.ts +3 -6
  171. package/dist/react/primitive-hooks/useActionBarSpeak.d.ts.map +1 -1
  172. package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts +3 -6
  173. package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts.map +1 -1
  174. package/dist/react/primitive-hooks/useBranchPickerNext.d.ts +3 -6
  175. package/dist/react/primitive-hooks/useBranchPickerNext.d.ts.map +1 -1
  176. package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts +3 -6
  177. package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts.map +1 -1
  178. package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts +4 -7
  179. package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts.map +1 -1
  180. package/dist/react/primitive-hooks/useComposerCancel.d.ts +3 -6
  181. package/dist/react/primitive-hooks/useComposerCancel.d.ts.map +1 -1
  182. package/dist/react/primitive-hooks/useComposerDictate.d.ts +3 -6
  183. package/dist/react/primitive-hooks/useComposerDictate.d.ts.map +1 -1
  184. package/dist/react/primitive-hooks/useComposerSend.d.ts +4 -7
  185. package/dist/react/primitive-hooks/useComposerSend.d.ts.map +1 -1
  186. package/dist/react/primitive-hooks/useEditComposerCancel.d.ts +2 -5
  187. package/dist/react/primitive-hooks/useEditComposerCancel.d.ts.map +1 -1
  188. package/dist/react/primitive-hooks/useEditComposerSend.d.ts +3 -6
  189. package/dist/react/primitive-hooks/useEditComposerSend.d.ts.map +1 -1
  190. package/dist/react/primitive-hooks/useMessageBranching.d.ts +5 -8
  191. package/dist/react/primitive-hooks/useMessageBranching.d.ts.map +1 -1
  192. package/dist/react/primitive-hooks/useMessageError.d.ts +1 -4
  193. package/dist/react/primitive-hooks/useMessageError.d.ts.map +1 -1
  194. package/dist/react/primitive-hooks/useMessageReload.d.ts +3 -6
  195. package/dist/react/primitive-hooks/useMessageReload.d.ts.map +1 -1
  196. package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts +7 -10
  197. package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts.map +1 -1
  198. package/dist/react/primitive-hooks/useSuggestionTrigger.js +4 -4
  199. package/dist/react/primitive-hooks/useSuggestionTrigger.js.map +1 -1
  200. package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts +1 -4
  201. package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts.map +1 -1
  202. package/dist/react/primitive-hooks/useThreadIsRunning.d.ts +1 -4
  203. package/dist/react/primitive-hooks/useThreadIsRunning.d.ts.map +1 -1
  204. package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts +2 -5
  205. package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts.map +1 -1
  206. package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts +2 -5
  207. package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts.map +1 -1
  208. package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts +2 -5
  209. package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts.map +1 -1
  210. package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts +2 -5
  211. package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts.map +1 -1
  212. package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts +3 -6
  213. package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts.map +1 -1
  214. package/dist/react/primitive-hooks/useThreadListNew.d.ts +2 -5
  215. package/dist/react/primitive-hooks/useThreadListNew.d.ts.map +1 -1
  216. package/dist/react/primitive-hooks/useThreadMessageIds.d.ts +1 -4
  217. package/dist/react/primitive-hooks/useThreadMessageIds.d.ts.map +1 -1
  218. package/dist/react/primitive-hooks/useThreadMessages.d.ts +2 -5
  219. package/dist/react/primitive-hooks/useThreadMessages.d.ts.map +1 -1
  220. package/dist/react/primitive-hooks/useVoice.d.ts +8 -11
  221. package/dist/react/primitive-hooks/useVoice.d.ts.map +1 -1
  222. package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts +27 -29
  223. package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts.map +1 -1
  224. package/dist/react/primitives/composer/ComposerAttachments.d.ts +26 -28
  225. package/dist/react/primitives/composer/ComposerAttachments.d.ts.map +1 -1
  226. package/dist/react/primitives/composer/ComposerIf.d.ts +13 -13
  227. package/dist/react/primitives/composer/ComposerIf.d.ts.map +1 -1
  228. package/dist/react/primitives/composer/ComposerQueue.d.ts +13 -17
  229. package/dist/react/primitives/composer/ComposerQueue.d.ts.map +1 -1
  230. package/dist/react/primitives/generativeUI/GenerativeUI.d.ts +30 -33
  231. package/dist/react/primitives/generativeUI/GenerativeUI.d.ts.map +1 -1
  232. package/dist/react/primitives/generativeUI/GenerativeUI.js +42 -33
  233. package/dist/react/primitives/generativeUI/GenerativeUI.js.map +1 -1
  234. package/dist/react/primitives/message/MessageAttachments.d.ts +30 -28
  235. package/dist/react/primitives/message/MessageAttachments.d.ts.map +1 -1
  236. package/dist/react/primitives/message/MessageAttachments.js +14 -15
  237. package/dist/react/primitives/message/MessageAttachments.js.map +1 -1
  238. package/dist/react/primitives/message/MessageGroupedParts.d.ts +122 -120
  239. package/dist/react/primitives/message/MessageGroupedParts.d.ts.map +1 -1
  240. package/dist/react/primitives/message/MessageGroupedParts.js +3 -3
  241. package/dist/react/primitives/message/MessageGroupedParts.js.map +1 -1
  242. package/dist/react/primitives/message/MessageParts.d.ts +208 -194
  243. package/dist/react/primitives/message/MessageParts.d.ts.map +1 -1
  244. package/dist/react/primitives/message/MessageParts.js +124 -82
  245. package/dist/react/primitives/message/MessageParts.js.map +1 -1
  246. package/dist/react/primitives/message/MessageQuote.d.ts +8 -11
  247. package/dist/react/primitives/message/MessageQuote.d.ts.map +1 -1
  248. package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts +4 -7
  249. package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts.map +1 -1
  250. package/dist/react/primitives/part/PartMessages.d.ts +16 -19
  251. package/dist/react/primitives/part/PartMessages.d.ts.map +1 -1
  252. package/dist/react/primitives/thread/ThreadMessages.d.ts +61 -64
  253. package/dist/react/primitives/thread/ThreadMessages.d.ts.map +1 -1
  254. package/dist/react/primitives/thread/ThreadSuggestions.d.ts +25 -27
  255. package/dist/react/primitives/thread/ThreadSuggestions.d.ts.map +1 -1
  256. package/dist/react/primitives/thread/ThreadSuggestions.js +24 -5
  257. package/dist/react/primitives/thread/ThreadSuggestions.js.map +1 -1
  258. package/dist/react/primitives/threadList/ThreadListItems.d.ts +26 -28
  259. package/dist/react/primitives/threadList/ThreadListItems.d.ts.map +1 -1
  260. package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts +6 -9
  261. package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -1
  262. package/dist/react/providers/AttachmentByIndexProvider.d.ts +5 -8
  263. package/dist/react/providers/AttachmentByIndexProvider.d.ts.map +1 -1
  264. package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts +4 -7
  265. package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts.map +1 -1
  266. package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts +3 -6
  267. package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts.map +1 -1
  268. package/dist/react/providers/MessageByIdProvider.d.ts +3 -6
  269. package/dist/react/providers/MessageByIdProvider.d.ts.map +1 -1
  270. package/dist/react/providers/MessageByIndexProvider.d.ts +3 -6
  271. package/dist/react/providers/MessageByIndexProvider.d.ts.map +1 -1
  272. package/dist/react/providers/PartByIndexProvider.d.ts +3 -6
  273. package/dist/react/providers/PartByIndexProvider.d.ts.map +1 -1
  274. package/dist/react/providers/QueueItemByIndexProvider.d.ts +4 -7
  275. package/dist/react/providers/QueueItemByIndexProvider.d.ts.map +1 -1
  276. package/dist/react/providers/ReadonlyThreadProvider.d.ts +7 -10
  277. package/dist/react/providers/ReadonlyThreadProvider.d.ts.map +1 -1
  278. package/dist/react/providers/ReadonlyThreadProvider.js.map +1 -1
  279. package/dist/react/providers/SuggestionByIndexProvider.d.ts +4 -7
  280. package/dist/react/providers/SuggestionByIndexProvider.d.ts.map +1 -1
  281. package/dist/react/providers/TextMessagePartProvider.d.ts +4 -7
  282. package/dist/react/providers/TextMessagePartProvider.d.ts.map +1 -1
  283. package/dist/react/providers/TextMessagePartProvider.js +5 -1
  284. package/dist/react/providers/TextMessagePartProvider.js.map +1 -1
  285. package/dist/react/providers/ThreadListItemByIndexProvider.d.ts +4 -7
  286. package/dist/react/providers/ThreadListItemByIndexProvider.d.ts.map +1 -1
  287. package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts +4 -8
  288. package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
  289. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts +210 -219
  290. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
  291. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +70 -46
  292. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
  293. package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +186 -198
  294. package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
  295. package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js +13 -4
  296. package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
  297. package/dist/react/runtimes/RemoteThreadResource.d.ts +17 -23
  298. package/dist/react/runtimes/RemoteThreadResource.d.ts.map +1 -1
  299. package/dist/react/runtimes/RemoteThreadResource.js +3 -1
  300. package/dist/react/runtimes/RemoteThreadResource.js.map +1 -1
  301. package/dist/react/runtimes/RuntimeAdapterProvider.d.ts +10 -11
  302. package/dist/react/runtimes/RuntimeAdapterProvider.d.ts.map +1 -1
  303. package/dist/react/runtimes/assistant-transport/commandQueue.d.ts +11 -14
  304. package/dist/react/runtimes/assistant-transport/commandQueue.d.ts.map +1 -1
  305. package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts +6 -8
  306. package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts.map +1 -1
  307. package/dist/react/runtimes/assistant-transport/replayBoundaryStream.js +9 -2
  308. package/dist/react/runtimes/assistant-transport/replayBoundaryStream.js.map +1 -1
  309. package/dist/react/runtimes/assistant-transport/runManager.d.ts +9 -12
  310. package/dist/react/runtimes/assistant-transport/runManager.d.ts.map +1 -1
  311. package/dist/react/runtimes/assistant-transport/runManager.js +4 -1
  312. package/dist/react/runtimes/assistant-transport/runManager.js.map +1 -1
  313. package/dist/react/runtimes/assistant-transport/types.d.ts +123 -118
  314. package/dist/react/runtimes/assistant-transport/types.d.ts.map +1 -1
  315. package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts +7 -10
  316. package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts.map +1 -1
  317. package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.js +17 -6
  318. package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
  319. package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts +3 -6
  320. package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts.map +1 -1
  321. package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts +2 -5
  322. package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts.map +1 -1
  323. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts +7 -10
  324. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
  325. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js +426 -216
  326. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
  327. package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts +15 -18
  328. package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts.map +1 -1
  329. package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.js +8 -4
  330. package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.js.map +1 -1
  331. package/dist/react/runtimes/cloud/auiV0.d.ts +146 -125
  332. package/dist/react/runtimes/cloud/auiV0.d.ts.map +1 -1
  333. package/dist/react/runtimes/cloud/auiV0.js +120 -8
  334. package/dist/react/runtimes/cloud/auiV0.js.map +1 -1
  335. package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts +13 -15
  336. package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts.map +1 -1
  337. package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts +5 -7
  338. package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts.map +1 -1
  339. package/dist/react/runtimes/cloud/sdkIdentity.d.ts +2 -5
  340. package/dist/react/runtimes/cloud/sdkIdentity.d.ts.map +1 -1
  341. package/dist/react/runtimes/cloud/sdkIdentity.js +1 -1
  342. package/dist/react/runtimes/cloud/useCloudThreadListAdapter.d.ts +3 -6
  343. package/dist/react/runtimes/cloud/useCloudThreadListAdapter.d.ts.map +1 -1
  344. package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts +9 -11
  345. package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
  346. package/dist/react/runtimes/createMessageConverter.d.ts +15 -19
  347. package/dist/react/runtimes/createMessageConverter.d.ts.map +1 -1
  348. package/dist/react/runtimes/createMessageConverter.js.map +1 -1
  349. package/dist/react/runtimes/createRuntimeExtras.d.ts +14 -17
  350. package/dist/react/runtimes/createRuntimeExtras.d.ts.map +1 -1
  351. package/dist/react/runtimes/external-message-converter.d.ts +17 -21
  352. package/dist/react/runtimes/external-message-converter.d.ts.map +1 -1
  353. package/dist/react/runtimes/external-store-history-copy.d.ts +25 -0
  354. package/dist/react/runtimes/external-store-history-copy.d.ts.map +1 -0
  355. package/dist/react/runtimes/external-store-history-copy.js +148 -0
  356. package/dist/react/runtimes/external-store-history-copy.js.map +1 -0
  357. package/dist/react/runtimes/useExternalStoreRuntime.d.ts +3 -6
  358. package/dist/react/runtimes/useExternalStoreRuntime.d.ts.map +1 -1
  359. package/dist/react/runtimes/useExternalStoreRuntime.js +72 -35
  360. package/dist/react/runtimes/useExternalStoreRuntime.js.map +1 -1
  361. package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts +2 -5
  362. package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts.map +1 -1
  363. package/dist/react/runtimes/useLocalRuntime.d.ts +29 -41
  364. package/dist/react/runtimes/useLocalRuntime.d.ts.map +1 -1
  365. package/dist/react/runtimes/useLocalRuntime.js +142 -34
  366. package/dist/react/runtimes/useLocalRuntime.js.map +1 -1
  367. package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts +3 -6
  368. package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts.map +1 -1
  369. package/dist/react/runtimes/useRemoteThreadListRuntime.js +2 -2
  370. package/dist/react/runtimes/useRemoteThreadListRuntime.js.map +1 -1
  371. package/dist/react/runtimes/useRuntimeAdapters.d.ts +5 -7
  372. package/dist/react/runtimes/useRuntimeAdapters.d.ts.map +1 -1
  373. package/dist/react/runtimes/useStreamingTiming.d.ts +4 -6
  374. package/dist/react/runtimes/useStreamingTiming.d.ts.map +1 -1
  375. package/dist/react/types/MessagePartComponentTypes.d.ts +72 -70
  376. package/dist/react/types/MessagePartComponentTypes.d.ts.map +1 -1
  377. package/dist/react/types/scopes/dataRenderers.d.ts +11 -15
  378. package/dist/react/types/scopes/dataRenderers.d.ts.map +1 -1
  379. package/dist/react/types/scopes/interactables.d.ts +60 -60
  380. package/dist/react/types/scopes/interactables.d.ts.map +1 -1
  381. package/dist/react/types/scopes/tools.d.ts +21 -24
  382. package/dist/react/types/scopes/tools.d.ts.map +1 -1
  383. package/dist/react/types/store-augmentation.d.ts +10 -11
  384. package/dist/react/types/store-augmentation.d.ts.map +1 -1
  385. package/dist/react/utils/getMessageQuote.d.ts +6 -8
  386. package/dist/react/utils/getMessageQuote.d.ts.map +1 -1
  387. package/dist/react/utils/groupParts.d.ts +35 -37
  388. package/dist/react/utils/groupParts.d.ts.map +1 -1
  389. package/dist/react/utils/useJSONEqual.d.ts +3 -6
  390. package/dist/react/utils/useJSONEqual.d.ts.map +1 -1
  391. package/dist/react/utils/useJSONSchemaDependency.d.ts +3 -6
  392. package/dist/react/utils/useJSONSchemaDependency.d.ts.map +1 -1
  393. package/dist/runtime/api/assistant-runtime.d.ts +28 -31
  394. package/dist/runtime/api/assistant-runtime.d.ts.map +1 -1
  395. package/dist/runtime/api/attachment-runtime.d.ts +51 -49
  396. package/dist/runtime/api/attachment-runtime.d.ts.map +1 -1
  397. package/dist/runtime/api/attachment-runtime.js.map +1 -1
  398. package/dist/runtime/api/bindings.d.ts +35 -35
  399. package/dist/runtime/api/bindings.d.ts.map +1 -1
  400. package/dist/runtime/api/composer-runtime.d.ts +215 -201
  401. package/dist/runtime/api/composer-runtime.d.ts.map +1 -1
  402. package/dist/runtime/api/composer-runtime.js +4 -0
  403. package/dist/runtime/api/composer-runtime.js.map +1 -1
  404. package/dist/runtime/api/message-part-runtime.d.ts +31 -30
  405. package/dist/runtime/api/message-part-runtime.d.ts.map +1 -1
  406. package/dist/runtime/api/message-part-runtime.js +25 -2
  407. package/dist/runtime/api/message-part-runtime.js.map +1 -1
  408. package/dist/runtime/api/message-runtime.d.ts +87 -82
  409. package/dist/runtime/api/message-runtime.d.ts.map +1 -1
  410. package/dist/runtime/api/message-runtime.js +4 -3
  411. package/dist/runtime/api/message-runtime.js.map +1 -1
  412. package/dist/runtime/api/paths.d.ts +54 -57
  413. package/dist/runtime/api/paths.d.ts.map +1 -1
  414. package/dist/runtime/api/thread-list-item-runtime.d.ts +70 -72
  415. package/dist/runtime/api/thread-list-item-runtime.d.ts.map +1 -1
  416. package/dist/runtime/api/thread-list-item-runtime.js.map +1 -1
  417. package/dist/runtime/api/thread-list-runtime.d.ts +77 -81
  418. package/dist/runtime/api/thread-list-runtime.d.ts.map +1 -1
  419. package/dist/runtime/api/thread-list-runtime.js.map +1 -1
  420. package/dist/runtime/api/thread-runtime.d.ts +306 -308
  421. package/dist/runtime/api/thread-runtime.d.ts.map +1 -1
  422. package/dist/runtime/api/thread-runtime.js +2 -1
  423. package/dist/runtime/api/thread-runtime.js.map +1 -1
  424. package/dist/runtime/base/base-assistant-runtime-core.d.ts +9 -12
  425. package/dist/runtime/base/base-assistant-runtime-core.d.ts.map +1 -1
  426. package/dist/runtime/base/base-composer-runtime-core.d.ts +150 -101
  427. package/dist/runtime/base/base-composer-runtime-core.d.ts.map +1 -1
  428. package/dist/runtime/base/base-composer-runtime-core.js +400 -122
  429. package/dist/runtime/base/base-composer-runtime-core.js.map +1 -1
  430. package/dist/runtime/base/base-thread-runtime-core.d.ts +121 -104
  431. package/dist/runtime/base/base-thread-runtime-core.d.ts.map +1 -1
  432. package/dist/runtime/base/base-thread-runtime-core.js +174 -62
  433. package/dist/runtime/base/base-thread-runtime-core.js.map +1 -1
  434. package/dist/runtime/base/default-edit-composer-runtime-core.d.ts +30 -31
  435. package/dist/runtime/base/default-edit-composer-runtime-core.d.ts.map +1 -1
  436. package/dist/runtime/base/default-edit-composer-runtime-core.js +21 -2
  437. package/dist/runtime/base/default-edit-composer-runtime-core.js.map +1 -1
  438. package/dist/runtime/base/default-thread-composer-runtime-core.d.ts +28 -31
  439. package/dist/runtime/base/default-thread-composer-runtime-core.d.ts.map +1 -1
  440. package/dist/runtime/base/default-thread-composer-runtime-core.js +23 -2
  441. package/dist/runtime/base/default-thread-composer-runtime-core.js.map +1 -1
  442. package/dist/runtime/branch/external-thread-branch-adapter.d.ts +15 -18
  443. package/dist/runtime/branch/external-thread-branch-adapter.d.ts.map +1 -1
  444. package/dist/runtime/interfaces/assistant-runtime-core.d.ts +8 -11
  445. package/dist/runtime/interfaces/assistant-runtime-core.d.ts.map +1 -1
  446. package/dist/runtime/interfaces/composer-runtime-core.d.ts +98 -83
  447. package/dist/runtime/interfaces/composer-runtime-core.d.ts.map +1 -1
  448. package/dist/runtime/interfaces/thread-list-runtime-core.d.ts +67 -70
  449. package/dist/runtime/interfaces/thread-list-runtime-core.d.ts.map +1 -1
  450. package/dist/runtime/interfaces/thread-runtime-core.d.ts +225 -211
  451. package/dist/runtime/interfaces/thread-runtime-core.d.ts.map +1 -1
  452. package/dist/runtime/internal.d.ts +25 -20
  453. package/dist/runtime/internal.d.ts.map +1 -0
  454. package/dist/runtime/queue/external-thread-queue-adapter.d.ts +37 -40
  455. package/dist/runtime/queue/external-thread-queue-adapter.d.ts.map +1 -1
  456. package/dist/runtime/queue/message-queue.d.ts +32 -33
  457. package/dist/runtime/queue/message-queue.d.ts.map +1 -1
  458. package/dist/runtime/queue/message-queue.js +10 -2
  459. package/dist/runtime/queue/message-queue.js.map +1 -1
  460. package/dist/runtime/queue/queue-item.d.ts +7 -10
  461. package/dist/runtime/queue/queue-item.d.ts.map +1 -1
  462. package/dist/runtime/utils/abortable-thread-load.d.ts +9 -11
  463. package/dist/runtime/utils/abortable-thread-load.d.ts.map +1 -1
  464. package/dist/runtime/utils/attachment-add-operations.d.ts +16 -15
  465. package/dist/runtime/utils/attachment-add-operations.d.ts.map +1 -1
  466. package/dist/runtime/utils/attachment-add-operations.js +24 -2
  467. package/dist/runtime/utils/attachment-add-operations.js.map +1 -1
  468. package/dist/runtime/utils/attachment-send-operations.d.ts +12 -0
  469. package/dist/runtime/utils/attachment-send-operations.d.ts.map +1 -0
  470. package/dist/runtime/utils/attachment-send-operations.js +34 -0
  471. package/dist/runtime/utils/attachment-send-operations.js.map +1 -0
  472. package/dist/runtime/utils/auto-status.d.ts +11 -13
  473. package/dist/runtime/utils/auto-status.d.ts.map +1 -1
  474. package/dist/runtime/utils/auto-status.js +3 -5
  475. package/dist/runtime/utils/auto-status.js.map +1 -1
  476. package/dist/runtime/utils/chat-model-adapter.d.ts +31 -33
  477. package/dist/runtime/utils/chat-model-adapter.d.ts.map +1 -1
  478. package/dist/runtime/utils/external-message-conversion.d.ts +47 -48
  479. package/dist/runtime/utils/external-message-conversion.d.ts.map +1 -1
  480. package/dist/runtime/utils/external-message-conversion.js +6 -5
  481. package/dist/runtime/utils/external-message-conversion.js.map +1 -1
  482. package/dist/runtime/utils/external-store-message.d.ts +6 -9
  483. package/dist/runtime/utils/external-store-message.d.ts.map +1 -1
  484. package/dist/runtime/utils/message-repository-session.d.ts +24 -27
  485. package/dist/runtime/utils/message-repository-session.d.ts.map +1 -1
  486. package/dist/runtime/utils/message-repository.d.ts +52 -54
  487. package/dist/runtime/utils/message-repository.d.ts.map +1 -1
  488. package/dist/runtime/utils/message-repository.js +8 -7
  489. package/dist/runtime/utils/message-repository.js.map +1 -1
  490. package/dist/runtime/utils/pending-tool-calls.d.ts +12 -14
  491. package/dist/runtime/utils/pending-tool-calls.d.ts.map +1 -1
  492. package/dist/runtime/utils/resolveToolApprovalResponse.d.ts +7 -10
  493. package/dist/runtime/utils/resolveToolApprovalResponse.d.ts.map +1 -1
  494. package/dist/runtime/utils/runtime-extras-brand.d.ts +6 -9
  495. package/dist/runtime/utils/runtime-extras-brand.d.ts.map +1 -1
  496. package/dist/runtime/utils/stored-message-parts.d.ts +21 -0
  497. package/dist/runtime/utils/stored-message-parts.d.ts.map +1 -0
  498. package/dist/runtime/utils/stored-message-parts.js +103 -0
  499. package/dist/runtime/utils/stored-message-parts.js.map +1 -0
  500. package/dist/runtime/utils/streaming-timing.d.ts +23 -26
  501. package/dist/runtime/utils/streaming-timing.d.ts.map +1 -1
  502. package/dist/runtime/utils/thread-message-like.d.ts +38 -34
  503. package/dist/runtime/utils/thread-message-like.d.ts.map +1 -1
  504. package/dist/runtime/utils/thread-message-like.js +16 -6
  505. package/dist/runtime/utils/thread-message-like.js.map +1 -1
  506. package/dist/runtime/utils/thread-runtime-lifecycle.d.ts +5 -7
  507. package/dist/runtime/utils/thread-runtime-lifecycle.d.ts.map +1 -1
  508. package/dist/runtime/utils/thread-runtime-lifecycle.js +31 -4
  509. package/dist/runtime/utils/thread-runtime-lifecycle.js.map +1 -1
  510. package/dist/runtime/utils/tool-call-tree.d.ts +10 -13
  511. package/dist/runtime/utils/tool-call-tree.d.ts.map +1 -1
  512. package/dist/runtime/utils/tool-interactions.d.ts +10 -0
  513. package/dist/runtime/utils/tool-interactions.d.ts.map +1 -0
  514. package/dist/runtime/utils/tool-interactions.js +92 -0
  515. package/dist/runtime/utils/tool-interactions.js.map +1 -0
  516. package/dist/runtimes/assistant-transport/utils.d.ts +1 -4
  517. package/dist/runtimes/assistant-transport/utils.d.ts.map +1 -1
  518. package/dist/runtimes/external-store/external-store-adapter.d.ts +220 -200
  519. package/dist/runtimes/external-store/external-store-adapter.d.ts.map +1 -1
  520. package/dist/runtimes/external-store/external-store-runtime-core.d.ts +6 -8
  521. package/dist/runtimes/external-store/external-store-runtime-core.d.ts.map +1 -1
  522. package/dist/runtimes/external-store/external-store-runtime-core.js +4 -1
  523. package/dist/runtimes/external-store/external-store-runtime-core.js.map +1 -1
  524. package/dist/runtimes/external-store/external-store-shared-options.d.ts +3 -6
  525. package/dist/runtimes/external-store/external-store-shared-options.d.ts.map +1 -1
  526. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts +40 -43
  527. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts.map +1 -1
  528. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js +2 -2
  529. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js.map +1 -1
  530. package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts +119 -125
  531. package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts.map +1 -1
  532. package/dist/runtimes/external-store/external-store-thread-runtime-core.js +71 -18
  533. package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -1
  534. package/dist/runtimes/external-store/thread-message-converter.d.ts +5 -8
  535. package/dist/runtimes/external-store/thread-message-converter.d.ts.map +1 -1
  536. package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts +96 -98
  537. package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts.map +1 -1
  538. package/dist/runtimes/inert/InertThreadRuntimeCore.js +3 -0
  539. package/dist/runtimes/inert/InertThreadRuntimeCore.js.map +1 -1
  540. package/dist/runtimes/internal.d.ts +20 -16
  541. package/dist/runtimes/internal.d.ts.map +1 -0
  542. package/dist/runtimes/local/local-runtime-core.d.ts +7 -10
  543. package/dist/runtimes/local/local-runtime-core.d.ts.map +1 -1
  544. package/dist/runtimes/local/local-runtime-options.d.ts +41 -44
  545. package/dist/runtimes/local/local-runtime-options.d.ts.map +1 -1
  546. package/dist/runtimes/local/local-thread-list-runtime-core.d.ts +42 -45
  547. package/dist/runtimes/local/local-thread-list-runtime-core.d.ts.map +1 -1
  548. package/dist/runtimes/local/local-thread-runtime-core.d.ts +94 -93
  549. package/dist/runtimes/local/local-thread-runtime-core.d.ts.map +1 -1
  550. package/dist/runtimes/local/local-thread-runtime-core.js +220 -29
  551. package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -1
  552. package/dist/runtimes/local/should-continue.d.ts +2 -5
  553. package/dist/runtimes/local/should-continue.d.ts.map +1 -1
  554. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts +77 -55
  555. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts.map +1 -1
  556. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js +28 -1
  557. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js.map +1 -1
  558. package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts +12 -15
  559. package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts.map +1 -1
  560. package/dist/runtimes/remote-thread-list/adapter-changed.d.ts +3 -6
  561. package/dist/runtimes/remote-thread-list/adapter-changed.d.ts.map +1 -1
  562. package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts +2 -5
  563. package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts.map +1 -1
  564. package/dist/runtimes/remote-thread-list/optimistic-state.d.ts +34 -31
  565. package/dist/runtimes/remote-thread-list/optimistic-state.d.ts.map +1 -1
  566. package/dist/runtimes/remote-thread-list/optimistic-state.js +8 -3
  567. package/dist/runtimes/remote-thread-list/optimistic-state.js.map +1 -1
  568. package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts +60 -63
  569. package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts.map +1 -1
  570. package/dist/runtimes/remote-thread-list/remote-thread-state.js +1 -1
  571. package/dist/runtimes/remote-thread-list/title-generation.d.ts +31 -33
  572. package/dist/runtimes/remote-thread-list/title-generation.d.ts.map +1 -1
  573. package/dist/runtimes/remote-thread-list/title.d.ts +5 -8
  574. package/dist/runtimes/remote-thread-list/title.d.ts.map +1 -1
  575. package/dist/runtimes/remote-thread-list/types.d.ts +119 -121
  576. package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
  577. package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts +147 -149
  578. package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts.map +1 -1
  579. package/dist/runtimes/tool-invocations/ToolInvocationTracker.js +22 -7
  580. package/dist/runtimes/tool-invocations/ToolInvocationTracker.js.map +1 -1
  581. package/dist/store/clients/chain-of-thought-client.d.ts +8 -11
  582. package/dist/store/clients/chain-of-thought-client.d.ts.map +1 -1
  583. package/dist/store/clients/external-thread.d.ts +56 -58
  584. package/dist/store/clients/external-thread.d.ts.map +1 -1
  585. package/dist/store/clients/external-thread.js +1270 -741
  586. package/dist/store/clients/external-thread.js.map +1 -1
  587. package/dist/store/clients/model-context-client.d.ts +2 -5
  588. package/dist/store/clients/model-context-client.d.ts.map +1 -1
  589. package/dist/store/clients/no-op-composer-client.d.ts +3 -6
  590. package/dist/store/clients/no-op-composer-client.d.ts.map +1 -1
  591. package/dist/store/clients/no-op-composer-client.js +3 -1
  592. package/dist/store/clients/no-op-composer-client.js.map +1 -1
  593. package/dist/store/clients/runtime-adapter.d.ts +2 -5
  594. package/dist/store/clients/runtime-adapter.d.ts.map +1 -1
  595. package/dist/store/clients/single-thread-list.d.ts +4 -6
  596. package/dist/store/clients/single-thread-list.d.ts.map +1 -1
  597. package/dist/store/clients/submission-message.d.ts +8 -0
  598. package/dist/store/clients/submission-message.d.ts.map +1 -0
  599. package/dist/store/clients/submission-message.js +22 -0
  600. package/dist/store/clients/submission-message.js.map +1 -0
  601. package/dist/store/clients/suggestions.d.ts +8 -11
  602. package/dist/store/clients/suggestions.d.ts.map +1 -1
  603. package/dist/store/clients/thread-message-client.d.ts +12 -12
  604. package/dist/store/clients/thread-message-client.d.ts.map +1 -1
  605. package/dist/store/clients/thread-message-client.js +81 -82
  606. package/dist/store/clients/thread-message-client.js.map +1 -1
  607. package/dist/store/clients/thread-selection-events.d.ts +1 -4
  608. package/dist/store/clients/thread-selection-events.d.ts.map +1 -1
  609. package/dist/store/clients/thread-tasks.d.ts +7 -10
  610. package/dist/store/clients/thread-tasks.d.ts.map +1 -1
  611. package/dist/store/env.d.ts +1 -4
  612. package/dist/store/env.d.ts.map +1 -1
  613. package/dist/store/index.d.ts +33 -36
  614. package/dist/store/index.d.ts.map +1 -0
  615. package/dist/store/index.js +5 -5
  616. package/dist/store/internal.d.ts +12 -12
  617. package/dist/store/internal.d.ts.map +1 -0
  618. package/dist/store/internal.js +2 -2
  619. package/dist/store/primitive-predicates.d.ts +14 -16
  620. package/dist/store/primitive-predicates.d.ts.map +1 -1
  621. package/dist/store/primitive-predicates.js +10 -5
  622. package/dist/store/primitive-predicates.js.map +1 -1
  623. package/dist/store/runtime-clients/attachment-runtime-client.d.ts +4 -7
  624. package/dist/store/runtime-clients/attachment-runtime-client.d.ts.map +1 -1
  625. package/dist/store/runtime-clients/composer-runtime-client.d.ts +11 -14
  626. package/dist/store/runtime-clients/composer-runtime-client.d.ts.map +1 -1
  627. package/dist/store/runtime-clients/composer-runtime-client.js +65 -62
  628. package/dist/store/runtime-clients/composer-runtime-client.js.map +1 -1
  629. package/dist/store/runtime-clients/handle-runtime-action.d.ts +1 -4
  630. package/dist/store/runtime-clients/handle-runtime-action.d.ts.map +1 -1
  631. package/dist/store/runtime-clients/handle-thread-list-action.d.ts +1 -4
  632. package/dist/store/runtime-clients/handle-thread-list-action.d.ts.map +1 -1
  633. package/dist/store/runtime-clients/liveRef.d.ts +2 -5
  634. package/dist/store/runtime-clients/liveRef.d.ts.map +1 -1
  635. package/dist/store/runtime-clients/message-part-runtime-client.d.ts +4 -7
  636. package/dist/store/runtime-clients/message-part-runtime-client.d.ts.map +1 -1
  637. package/dist/store/runtime-clients/message-part-runtime-client.js +26 -16
  638. package/dist/store/runtime-clients/message-part-runtime-client.js.map +1 -1
  639. package/dist/store/runtime-clients/message-runtime-client.d.ts +10 -11
  640. package/dist/store/runtime-clients/message-runtime-client.d.ts.map +1 -1
  641. package/dist/store/runtime-clients/message-runtime-client.js +121 -113
  642. package/dist/store/runtime-clients/message-runtime-client.js.map +1 -1
  643. package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts +5 -8
  644. package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts.map +1 -1
  645. package/dist/store/runtime-clients/thread-list-runtime-client.d.ts +6 -9
  646. package/dist/store/runtime-clients/thread-list-runtime-client.d.ts.map +1 -1
  647. package/dist/store/runtime-clients/thread-runtime-client.d.ts +4 -7
  648. package/dist/store/runtime-clients/thread-runtime-client.d.ts.map +1 -1
  649. package/dist/store/runtime-clients/thread-runtime-client.js +221 -158
  650. package/dist/store/runtime-clients/thread-runtime-client.js.map +1 -1
  651. package/dist/store/runtime-clients/useSubscribable.d.ts +3 -6
  652. package/dist/store/runtime-clients/useSubscribable.d.ts.map +1 -1
  653. package/dist/store/scope-registration.d.ts +28 -29
  654. package/dist/store/scope-registration.d.ts.map +1 -1
  655. package/dist/store/scopes/attachment.d.ts +19 -22
  656. package/dist/store/scopes/attachment.d.ts.map +1 -1
  657. package/dist/store/scopes/chain-of-thought.d.ts +33 -35
  658. package/dist/store/scopes/chain-of-thought.d.ts.map +1 -1
  659. package/dist/store/scopes/composer.d.ts +147 -135
  660. package/dist/store/scopes/composer.d.ts.map +1 -1
  661. package/dist/store/scopes/message.d.ts +119 -112
  662. package/dist/store/scopes/message.d.ts.map +1 -1
  663. package/dist/store/scopes/model-context.d.ts +10 -13
  664. package/dist/store/scopes/model-context.d.ts.map +1 -1
  665. package/dist/store/scopes/part.d.ts +53 -50
  666. package/dist/store/scopes/part.d.ts.map +1 -1
  667. package/dist/store/scopes/queue-item.d.ts +21 -23
  668. package/dist/store/scopes/queue-item.d.ts.map +1 -1
  669. package/dist/store/scopes/suggestion.d.ts +14 -17
  670. package/dist/store/scopes/suggestion.d.ts.map +1 -1
  671. package/dist/store/scopes/suggestions.d.ts +18 -21
  672. package/dist/store/scopes/suggestions.d.ts.map +1 -1
  673. package/dist/store/scopes/task.d.ts +27 -30
  674. package/dist/store/scopes/task.d.ts.map +1 -1
  675. package/dist/store/scopes/thread-list-item.d.ts +68 -71
  676. package/dist/store/scopes/thread-list-item.d.ts.map +1 -1
  677. package/dist/store/scopes/thread.d.ts +197 -200
  678. package/dist/store/scopes/thread.d.ts.map +1 -1
  679. package/dist/store/scopes/threads.d.ts +49 -52
  680. package/dist/store/scopes/threads.d.ts.map +1 -1
  681. package/dist/subscribable/subscribable.d.ts +73 -69
  682. package/dist/subscribable/subscribable.d.ts.map +1 -1
  683. package/dist/subscribable/subscribable.js +35 -7
  684. package/dist/subscribable/subscribable.js.map +1 -1
  685. package/dist/types/attachment.d.ts +35 -37
  686. package/dist/types/attachment.d.ts.map +1 -1
  687. package/dist/types/augmentations.d.ts +7 -8
  688. package/dist/types/augmentations.d.ts.map +1 -1
  689. package/dist/types/directive.d.ts +13 -16
  690. package/dist/types/directive.d.ts.map +1 -1
  691. package/dist/types/error.d.ts +15 -17
  692. package/dist/types/error.d.ts.map +1 -1
  693. package/dist/types/index.d.ts +7 -7
  694. package/dist/types/index.d.ts.map +1 -0
  695. package/dist/types/message.d.ts +358 -318
  696. package/dist/types/message.d.ts.map +1 -1
  697. package/dist/types/message.js.map +1 -1
  698. package/dist/types/quote.d.ts +3 -6
  699. package/dist/types/quote.d.ts.map +1 -1
  700. package/dist/types/trigger.d.ts +10 -13
  701. package/dist/types/trigger.d.ts.map +1 -1
  702. package/dist/types/unsubscribe.d.ts +1 -4
  703. package/dist/types/unsubscribe.d.ts.map +1 -1
  704. package/dist/utils/abortable-iterable.d.ts +2 -5
  705. package/dist/utils/abortable-iterable.d.ts.map +1 -1
  706. package/dist/utils/composite-context-provider.d.ts +9 -13
  707. package/dist/utils/composite-context-provider.d.ts.map +1 -1
  708. package/dist/utils/data-url.d.ts +16 -19
  709. package/dist/utils/data-url.d.ts.map +1 -1
  710. package/dist/utils/getGroupStatus.d.ts +19 -21
  711. package/dist/utils/getGroupStatus.d.ts.map +1 -1
  712. package/dist/utils/id.d.ts +3 -6
  713. package/dist/utils/id.d.ts.map +1 -1
  714. package/dist/utils/image-media-type.d.ts +1 -4
  715. package/dist/utils/image-media-type.d.ts.map +1 -1
  716. package/dist/utils/invoke-user-callback.d.ts +1 -4
  717. package/dist/utils/invoke-user-callback.d.ts.map +1 -1
  718. package/dist/utils/json/is-json-equal.d.ts +1 -4
  719. package/dist/utils/json/is-json-equal.d.ts.map +1 -1
  720. package/dist/utils/json/is-json.d.ts +5 -8
  721. package/dist/utils/json/is-json.d.ts.map +1 -1
  722. package/dist/utils/json/stable-stringify-tool-args.d.ts +3 -6
  723. package/dist/utils/json/stable-stringify-tool-args.d.ts.map +1 -1
  724. package/dist/utils/normalizePartStatus.d.ts +6 -8
  725. package/dist/utils/normalizePartStatus.d.ts.map +1 -1
  726. package/dist/utils/normalizePartStatus.js +3 -2
  727. package/dist/utils/normalizePartStatus.js.map +1 -1
  728. package/dist/utils/notify-event-listeners.d.ts +2 -4
  729. package/dist/utils/notify-event-listeners.d.ts.map +1 -1
  730. package/dist/utils/record.d.ts +1 -4
  731. package/dist/utils/record.d.ts.map +1 -1
  732. package/dist/utils/silent-runtime-action.d.ts +2 -5
  733. package/dist/utils/silent-runtime-action.d.ts.map +1 -1
  734. package/dist/utils/text.d.ts +2 -5
  735. package/dist/utils/text.d.ts.map +1 -1
  736. package/dist/utils/wire-media.d.ts +3 -6
  737. package/dist/utils/wire-media.d.ts.map +1 -1
  738. package/package.json +15 -13
  739. package/src/adapters/attachment.test.ts +98 -1
  740. package/src/adapters/attachment.ts +77 -20
  741. package/src/adapters/feedback.ts +1 -0
  742. package/src/adapters/speech.test.ts +94 -0
  743. package/src/adapters/speech.ts +16 -2
  744. package/src/adapters/thread-history.ts +16 -5
  745. package/src/adapters/voice.test.ts +169 -0
  746. package/src/adapters/voice.ts +25 -4
  747. package/src/index.ts +14 -2
  748. package/src/internal.ts +7 -0
  749. package/src/model-context/frame/host.test.ts +51 -1
  750. package/src/model-context/frame/host.ts +3 -1
  751. package/src/model-context/frame/provider.test.ts +106 -20
  752. package/src/model-context/frame/provider.ts +8 -1
  753. package/src/model-context/frame/validate.ts +57 -0
  754. package/src/model-context/interactable-composer-metadata.test.ts +82 -0
  755. package/src/model-context/interactable-composer-metadata.ts +45 -2
  756. package/src/react/RuntimeAdapter.test.ts +4 -1
  757. package/src/react/adapters/LocalStorageThreadListAdapter.test.ts +711 -0
  758. package/src/react/adapters/LocalStorageThreadListAdapter.tsx +125 -109
  759. package/src/react/client/Interactables.test.ts +865 -8
  760. package/src/react/client/Interactables.ts +325 -45
  761. package/src/react/client/RemoteThreadList.concurrent.test.tsx +9 -3
  762. package/src/react/client/RemoteThreadList.initialize-failure.test.ts +124 -0
  763. package/src/react/client/RemoteThreadList.test.ts +5 -6
  764. package/src/react/client/RemoteThreadList.ts +6 -0
  765. package/src/react/client/Tools.ts +2 -3
  766. package/src/react/client/interactable-model-context.test.ts +56 -13
  767. package/src/react/client/interactable-model-context.ts +48 -23
  768. package/src/react/index.ts +2 -2
  769. package/src/react/interactables-legacy/Interactables.test.ts +221 -4
  770. package/src/react/interactables-legacy/Interactables.ts +25 -14
  771. package/src/react/interactables-legacy/interactable-model-context.ts +26 -24
  772. package/src/react/interactables-legacy/useAssistantInteractable.test.tsx +40 -22
  773. package/src/react/interactables-shared/useInteractablePersistenceQueue.test.tsx +22 -2
  774. package/src/react/interactables-shared/useInteractablePersistenceQueue.ts +63 -11
  775. package/src/react/model-context/useInteractable.test.tsx +56 -29
  776. package/src/react/primitive-hooks/useActionBarCopy.test.ts +5 -5
  777. package/src/react/primitive-hooks/useSuggestionTrigger.test.ts +33 -0
  778. package/src/react/primitive-hooks/useSuggestionTrigger.ts +7 -4
  779. package/src/react/primitives/generativeUI/GenerativeUI.test.tsx +170 -0
  780. package/src/react/primitives/generativeUI/GenerativeUI.tsx +43 -28
  781. package/src/react/primitives/message/MessageAttachments.test.tsx +2 -6
  782. package/src/react/primitives/message/MessageAttachments.tsx +14 -8
  783. package/src/react/primitives/message/MessageGroupedParts.test.tsx +155 -8
  784. package/src/react/primitives/message/MessageGroupedParts.tsx +19 -6
  785. package/src/react/primitives/message/MessageParts.test.tsx +84 -0
  786. package/src/react/primitives/message/MessageParts.tool-interaction.test.tsx +69 -0
  787. package/src/react/primitives/message/MessageParts.tsx +29 -8
  788. package/src/react/primitives/thread/ThreadMessages.test.tsx +25 -7
  789. package/src/react/primitives/thread/ThreadSuggestions.test.tsx +97 -0
  790. package/src/react/primitives/thread/ThreadSuggestions.tsx +29 -6
  791. package/src/react/providers/ReadonlyThreadProvider.tsx +2 -2
  792. package/src/react/providers/TextMessagePartProvider.tsx +3 -0
  793. package/src/react/runtimes/RemoteThreadListHookInstanceManager.layout.test.tsx +62 -0
  794. package/src/react/runtimes/RemoteThreadListHookInstanceManager.retry.test.tsx +2 -2
  795. package/src/react/runtimes/RemoteThreadListHookInstanceManager.running.test.tsx +93 -0
  796. package/src/react/runtimes/RemoteThreadListHookInstanceManager.test.tsx +181 -21
  797. package/src/react/runtimes/RemoteThreadListHookInstanceManager.title.test.tsx +62 -17
  798. package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +112 -77
  799. package/src/react/runtimes/RemoteThreadListThreadListRuntimeCore.tsx +19 -3
  800. package/src/react/runtimes/RemoteThreadResource.ts +5 -2
  801. package/src/react/runtimes/assistant-transport/replayBoundaryStream.test.ts +3 -1
  802. package/src/react/runtimes/assistant-transport/replayBoundaryStream.ts +10 -2
  803. package/src/react/runtimes/assistant-transport/runManager.ts +3 -0
  804. package/src/react/runtimes/assistant-transport/transport-parentid.test.tsx +57 -0
  805. package/src/react/runtimes/assistant-transport/transport-scheduling.test.ts +73 -46
  806. package/src/react/runtimes/assistant-transport/transport-thread-id.test.tsx +571 -0
  807. package/src/react/runtimes/assistant-transport/types.ts +9 -1
  808. package/src/react/runtimes/assistant-transport/useAssistantTransport.spec.md +10 -0
  809. package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.test.tsx +108 -1
  810. package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.ts +33 -9
  811. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.copy.integration.test.tsx +289 -0
  812. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.copy.test.tsx +471 -0
  813. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.engagement.test.tsx +330 -0
  814. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.ts +78 -2
  815. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.tsx +463 -2
  816. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +595 -227
  817. package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.test.ts +33 -4
  818. package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.ts +7 -3
  819. package/src/react/runtimes/cloud/auiV0.ts +275 -6
  820. package/src/react/runtimes/cloud/auiV0DecodeSafely.test.ts +873 -0
  821. package/src/react/runtimes/createMessageConverter.ts +9 -3
  822. package/src/react/runtimes/external-message-converter.test.ts +7 -3
  823. package/src/react/runtimes/external-store-history-copy.ts +223 -0
  824. package/src/react/runtimes/remote-thread-hook-on-tap.test.ts +2 -1
  825. package/src/react/runtimes/useExternalStoreRuntime.history-copy.test.tsx +483 -0
  826. package/src/react/runtimes/useExternalStoreRuntime.lifecycle.test.tsx +84 -3
  827. package/src/react/runtimes/useExternalStoreRuntime.suggestions.test.tsx +6 -2
  828. package/src/react/runtimes/useExternalStoreRuntime.ts +25 -5
  829. package/src/react/runtimes/useLocalRuntime.test.tsx +145 -1
  830. package/src/react/runtimes/useLocalRuntime.ts +8 -5
  831. package/src/react/runtimes/useRemoteThreadListRuntime.concurrent.test.tsx +84 -4
  832. package/src/react/runtimes/useRemoteThreadListRuntime.ts +5 -1
  833. package/src/react/types/MessagePartComponentTypes.ts +10 -0
  834. package/src/react/types/scopes/interactables.ts +3 -0
  835. package/src/runtime/api/attachment-runtime.ts +10 -5
  836. package/src/runtime/api/bindings.ts +6 -1
  837. package/src/runtime/api/composer-runtime.ts +29 -6
  838. package/src/runtime/api/message-part-runtime.test.ts +215 -0
  839. package/src/runtime/api/message-part-runtime.ts +44 -1
  840. package/src/runtime/api/message-runtime.test.ts +112 -2
  841. package/src/runtime/api/message-runtime.ts +25 -7
  842. package/src/runtime/api/thread-list-item-runtime.ts +5 -5
  843. package/src/runtime/api/thread-list-runtime.ts +3 -3
  844. package/src/runtime/api/thread-runtime.test.ts +59 -0
  845. package/src/runtime/api/thread-runtime.ts +21 -11
  846. package/src/runtime/base/base-composer-runtime-core.ts +548 -153
  847. package/src/runtime/base/base-thread-runtime-core.test.ts +1614 -136
  848. package/src/runtime/base/base-thread-runtime-core.ts +236 -46
  849. package/src/runtime/base/default-edit-composer-runtime-core.ts +24 -2
  850. package/src/runtime/base/default-thread-composer-runtime-core.ts +33 -3
  851. package/src/runtime/interfaces/composer-runtime-core.ts +19 -0
  852. package/src/runtime/interfaces/thread-runtime-core.ts +24 -1
  853. package/src/runtime/queue/message-queue.ts +11 -1
  854. package/src/runtime/utils/attachment-add-operations.ts +45 -2
  855. package/src/runtime/utils/attachment-send-operations.ts +54 -0
  856. package/src/runtime/utils/auto-status.test.ts +54 -0
  857. package/src/runtime/utils/auto-status.ts +3 -10
  858. package/src/runtime/utils/external-message-conversion.test.ts +91 -0
  859. package/src/runtime/utils/external-message-conversion.ts +9 -6
  860. package/src/runtime/utils/message-repository.test.ts +69 -1
  861. package/src/runtime/utils/message-repository.ts +14 -7
  862. package/src/runtime/utils/stored-message-parts.ts +216 -0
  863. package/src/runtime/utils/thread-message-like.test.ts +58 -0
  864. package/src/runtime/utils/thread-message-like.ts +79 -48
  865. package/src/runtime/utils/thread-runtime-lifecycle.test.ts +67 -0
  866. package/src/runtime/utils/thread-runtime-lifecycle.ts +42 -8
  867. package/src/runtime/utils/tool-interactions.test.ts +193 -0
  868. package/src/runtime/utils/tool-interactions.ts +147 -0
  869. package/src/runtimes/external-store/external-store-adapter.ts +25 -0
  870. package/src/runtimes/external-store/external-store-runtime-core.ts +10 -2
  871. package/src/runtimes/external-store/external-store-thread-list-runtime-core.ts +2 -2
  872. package/src/runtimes/external-store/external-store-thread-runtime-core.test.ts +49 -0
  873. package/src/runtimes/external-store/external-store-thread-runtime-core.ts +114 -32
  874. package/src/runtimes/inert/InertThreadRuntimeCore.test.ts +127 -56
  875. package/src/runtimes/inert/InertThreadRuntimeCore.ts +10 -1
  876. package/src/runtimes/local/local-thread-runtime-core.edit-cancellation.test.ts +70 -0
  877. package/src/runtimes/local/local-thread-runtime-core.test.ts +1866 -169
  878. package/src/runtimes/local/local-thread-runtime-core.ts +365 -40
  879. package/src/runtimes/readonly/ReadonlyThreadRuntimeCore.ts +53 -1
  880. package/src/runtimes/remote-thread-list/optimistic-state.ts +8 -3
  881. package/src/runtimes/tool-invocations/EDGE_CASES.md +19 -4
  882. package/src/runtimes/tool-invocations/ToolInvocationTracker.test.ts +392 -39
  883. package/src/runtimes/tool-invocations/ToolInvocationTracker.ts +31 -8
  884. package/src/store/clients/external-thread.test.ts +145 -0
  885. package/src/store/clients/external-thread.ts +669 -144
  886. package/src/store/clients/model-context-client.test.ts +8 -8
  887. package/src/store/clients/no-op-composer-client.ts +2 -0
  888. package/src/store/clients/submission-message.ts +27 -0
  889. package/src/store/clients/thread-message-client.test.ts +39 -0
  890. package/src/store/clients/thread-message-client.ts +13 -6
  891. package/src/store/index.ts +2 -2
  892. package/src/store/internal.ts +1 -0
  893. package/src/store/primitive-predicates.test.ts +119 -0
  894. package/src/store/primitive-predicates.ts +19 -4
  895. package/src/store/runtime-clients/composer-runtime-client.ts +4 -3
  896. package/src/store/runtime-clients/message-part-runtime-client.test.ts +42 -0
  897. package/src/store/runtime-clients/message-part-runtime-client.ts +4 -0
  898. package/src/store/runtime-clients/message-runtime-client.ts +5 -0
  899. package/src/store/runtime-clients/thread-runtime-client.test.tsx +243 -0
  900. package/src/store/runtime-clients/thread-runtime-client.ts +46 -9
  901. package/src/store/scopes/composer.ts +22 -4
  902. package/src/store/scopes/message.ts +12 -1
  903. package/src/store/scopes/part.ts +8 -0
  904. package/src/subscribable/subscribable.test.ts +205 -3
  905. package/src/subscribable/subscribable.ts +49 -7
  906. package/src/tests/RemoteThreadListThreadListRuntimeCore-errors.test.ts +95 -1
  907. package/src/tests/attachment-adapters.test.ts +16 -1
  908. package/src/tests/auiV0Encode.test.ts +412 -1
  909. package/src/tests/base-composer-runtime-core-addAttachment.test.ts +6 -6
  910. package/src/tests/base-composer-runtime-core-send.test.ts +722 -29
  911. package/src/tests/base-composer-runtime-core.test.ts +212 -5
  912. package/src/tests/composer-can-cancel.test.ts +35 -6
  913. package/src/tests/composer-can-send.test.ts +120 -1
  914. package/src/tests/composer-submission.test.tsx +796 -0
  915. package/src/tests/default-edit-composer-runtime-core.test.ts +149 -2
  916. package/src/tests/external-store-thread-list-runtime-core.test.ts +111 -0
  917. package/src/tests/external-store-thread-runtime-core-adapter.test.ts +810 -28
  918. package/src/tests/external-store-thread-runtime-core.test.ts +217 -0
  919. package/src/tests/external-thread-attachments.test.tsx +763 -26
  920. package/src/tests/external-thread-feedback.test.tsx +20 -7
  921. package/src/tests/external-thread-isLast.test.tsx +69 -0
  922. package/src/tests/external-thread-parity.test.tsx +1 -1
  923. package/src/tests/get-thread-state-isRunning.test.ts +2 -2
  924. package/src/tests/message-queue.test.ts +45 -10
  925. package/src/tests/remote-thread-list-adapter-switch.test.ts +45 -1
  926. package/src/tests/thread-switch-events.test.tsx +11 -7
  927. package/src/tests/useRemoteThreadListRuntime-controlled.test.tsx +2 -1
  928. package/src/types/message.test.ts +19 -0
  929. package/src/types/message.ts +65 -10
  930. package/src/utils/normalizePartStatus.ts +14 -1
  931. package/dist/tests/remote-thread-list-test-helpers.d.ts +0 -16
  932. package/dist/tests/remote-thread-list-test-helpers.d.ts.map +0 -1
  933. package/dist/tests/remote-thread-list-test-helpers.js +0 -59
  934. package/dist/tests/remote-thread-list-test-helpers.js.map +0 -1
@@ -1,8 +1,9 @@
1
+ import { generateId } from "../../utils/id.js";
1
2
  import { nullProtoRecord } from "../../utils/record.js";
2
3
  import { isRecord } from "../../utils/json/is-json.js";
3
4
  import { interactableToolName, shallowMergeInteractableState } from "../../model-context/interactable-composer-metadata.js";
4
- import { generateId } from "../../utils/id.js";
5
5
  import "assistant-stream";
6
+ import { getPartialJsonObjectMeta } from "assistant-stream/utils";
6
7
  //#region src/react/client/interactable-model-context.ts
7
8
  const ID_PROPERTY = {
8
9
  type: "string",
@@ -63,21 +64,22 @@ const idKeyedArrayFieldNames = (properties) => {
63
64
  };
64
65
  const withArrayUpdateSchemas = (properties) => Object.fromEntries(Object.entries(properties).map(([key, value]) => [key, toArrayUpdateSchema(value, key)]));
65
66
  /**
66
- * Wraps an interactable's partial state schema with the required `id`
67
- * parameter. Falls back to a permissive schema when the partial conversion
68
- * failed at registration time.
67
+ * Replaces the state schema's root `required` list with the `id` parameter,
68
+ * so every top-level field is optional while nested objects keep theirs and
69
+ * travel whole through the shallow merge. Falls back to a permissive schema
70
+ * when the JSON Schema conversion failed at registration time.
69
71
  */
70
- function withRequiredId(partial) {
71
- if (!partial || typeof partial !== "object" || partial.type !== "object") return {
72
+ function withRequiredId(schema) {
73
+ if (!schema || typeof schema !== "object" || schema.type !== "object") return {
72
74
  type: "object",
73
75
  properties: { id: ID_PROPERTY },
74
76
  required: ["id"],
75
77
  additionalProperties: true
76
78
  };
77
- if (process.env.NODE_ENV !== "production" && partial.properties?.id) console.warn("[Interactables] a top-level \"id\" field in an interactable's stateSchema is reserved for instance addressing by the update tool and cannot be updated by the model. Rename the field to make it model-writable.");
78
- const { id: _reserved, ...properties } = partial.properties ?? {};
79
+ if (process.env.NODE_ENV !== "production" && schema.properties?.id) console.warn("[Interactables] a top-level \"id\" field in an interactable's stateSchema is reserved for instance addressing by the update tool and cannot be updated by the model. Rename the field to make it model-writable.");
80
+ const { id: _reserved, ...properties } = schema.properties ?? {};
79
81
  return {
80
- ...partial,
82
+ ...schema,
81
83
  properties: {
82
84
  id: ID_PROPERTY,
83
85
  ...withArrayUpdateSchemas(properties)
@@ -85,7 +87,7 @@ function withRequiredId(partial) {
85
87
  required: ["id"]
86
88
  };
87
89
  }
88
- function buildInteractableModelContext(definitions, partialSchemaCache, setDefState, streamBaselines = /* @__PURE__ */ new Map()) {
90
+ function buildInteractableModelContext(definitions, schemaCache, setDefState, getCurrentDefinitions, streamBaselines = /* @__PURE__ */ new Map()) {
89
91
  const entries = Object.values(definitions);
90
92
  if (entries.length === 0) return void 0;
91
93
  const byName = /* @__PURE__ */ new Map();
@@ -102,8 +104,8 @@ function buildInteractableModelContext(definitions, partialSchemaCache, setDefSt
102
104
  continue;
103
105
  }
104
106
  const first = instances[0];
105
- const partialSchema = partialSchemaCache.get(first.id);
106
- const idKeyedFields = partialSchema && isRecord(partialSchema.properties) ? idKeyedArrayFieldNames(partialSchema.properties) : /* @__PURE__ */ new Set();
107
+ const jsonSchema = schemaCache.get(first.id);
108
+ const idKeyedFields = jsonSchema && isRecord(jsonSchema.properties) ? idKeyedArrayFieldNames(jsonSchema.properties) : /* @__PURE__ */ new Set();
107
109
  const resolveTarget = (id) => {
108
110
  if (typeof id === "string") {
109
111
  const def = definitions[id];
@@ -113,8 +115,8 @@ function buildInteractableModelContext(definitions, partialSchemaCache, setDefSt
113
115
  };
114
116
  tools[toolName] = {
115
117
  type: "frontend",
116
- description: `Update the state of interactable component "${name}". ${first.description} Pass the id of the instance to update — instance ids and current state appear in the conversation as state snapshots. Only include the fields you want to change; omitted fields keep their current values.`,
117
- parameters: withRequiredId(partialSchema),
118
+ description: `Update the state of interactable component "${name}". ${first.description} Pass the id of the instance to update — instance ids and current state appear in the conversation as state snapshots. Only include the fields you want to change; omitted fields keep their current values. A nested object replaces the existing one, so send it complete.`,
119
+ parameters: withRequiredId(jsonSchema),
118
120
  streamCall: async (reader, { toolCallId }) => {
119
121
  try {
120
122
  for await (const partialArgs of reader.args.streamValues()) {
@@ -126,21 +128,29 @@ function buildInteractableModelContext(definitions, partialSchemaCache, setDefSt
126
128
  if (Object.keys(partial).length === 0) continue;
127
129
  const target = resolveTarget(id);
128
130
  if (!target) continue;
131
+ const currentTarget = getCurrentDefinitions()[target.id];
132
+ if (currentTarget?.name !== name) continue;
129
133
  const baseline = streamBaselines.get(toolCallId);
130
- const arrayBaseline = baseline?.targetId === target.id ? baseline.state : target.state;
134
+ const arrayBaseline = baseline?.targetId === target.id ? baseline.state : currentTarget.state;
131
135
  if (!baseline || baseline.targetId !== target.id) streamBaselines.set(toolCallId, {
132
136
  targetId: target.id,
133
- state: target.state
137
+ state: currentTarget.state
134
138
  });
135
- setDefState(target.id, (prev) => shallowMergeInteractableState(prev, partial, { arrayBaseline }));
139
+ const partialPath = getPartialJsonObjectMeta(args)?.partialPath;
140
+ setDefState(target.id, (prev) => shallowMergeInteractableState(prev, partial, {
141
+ arrayBaseline,
142
+ partialPath
143
+ }));
136
144
  }
137
145
  } catch {}
138
146
  },
139
147
  execute: async (args, { toolCallId }) => {
140
148
  const { id, ...partial } = args ?? {};
141
149
  const target = resolveTarget(id);
142
- if (!target) {
143
- const validIds = instances.map((d) => d.id);
150
+ const currentDefinitions = getCurrentDefinitions();
151
+ const currentTarget = target ? currentDefinitions[target.id] : void 0;
152
+ if (!currentTarget || currentTarget.name !== name) {
153
+ const validIds = Object.values(currentDefinitions).filter((def) => def.name === name).map((def) => def.id);
144
154
  return {
145
155
  success: false,
146
156
  error: `Unknown id ${JSON.stringify(id)} for interactable "${name}". Valid ids: ${validIds.join(", ")}`
@@ -149,8 +159,8 @@ function buildInteractableModelContext(definitions, partialSchemaCache, setDefSt
149
159
  const baseline = streamBaselines.get(toolCallId);
150
160
  streamBaselines.delete(toolCallId);
151
161
  const addedItemIds = nullProtoRecord();
152
- setDefState(target.id, (prev) => shallowMergeInteractableState(prev, partial, {
153
- arrayBaseline: baseline?.targetId === target.id ? baseline.state : void 0,
162
+ setDefState(currentTarget.id, (prev) => shallowMergeInteractableState(prev, partial, {
163
+ arrayBaseline: baseline?.targetId === currentTarget.id ? baseline.state : void 0,
154
164
  idFactory: (field) => {
155
165
  const itemId = generateId();
156
166
  (addedItemIds[field] ??= []).push(itemId);
@@ -160,7 +170,7 @@ function buildInteractableModelContext(definitions, partialSchemaCache, setDefSt
160
170
  }));
161
171
  const result = {
162
172
  success: true,
163
- id: target.id
173
+ id: currentTarget.id
164
174
  };
165
175
  if (Object.keys(addedItemIds).length > 0) result.addedItemIds = { ...addedItemIds };
166
176
  return result;
@@ -1 +1 @@
1
- {"version":3,"file":"interactable-model-context.js","names":["Tool","toJSONSchema","Unstable_InteractableDefinition","interactableToolName","shallowMergeInteractableState","Unstable_InteractableSnapshotEntry","generateId","isRecord","nullProtoRecord","PartialJSONSchema","ReturnType","ID_PROPERTY","type","const","description","ITEM_ID_PROPERTY","hasIdProperty","schema","Record","properties","id","undefined","withRequiredItemId","required","withoutItemId","_omitted","Array","isArray","filter","key","toArrayUpdateSchema","field","itemSchema","items","idKeyed","add","remove","clear","update","additionalProperties","idKeyedArrayFieldNames","Set","names","value","Object","entries","withArrayUpdateSchemas","fromEntries","map","withRequiredId","partial","process","env","NODE_ENV","console","warn","_reserved","buildInteractableModelContext","definitions","partialSchemaCache","Map","setDefState","updater","prev","streamBaselines","targetId","state","tools","unstable_composerMetadata","values","length","byName","def","list","get","name","push","set","instances","toolName","first","partialSchema","idKeyedFields","resolveTarget","parameters","streamCall","reader","toolCallId","partialArgs","args","streamValues","keys","idIndex","indexOf","target","baseline","arrayBaseline","execute","validIds","d","success","error","JSON","stringify","join","delete","addedItemIds","idFactory","itemId","result","interactables"],"sources":["../../../src/react/client/interactable-model-context.ts"],"sourcesContent":["import type { Tool } from \"assistant-stream\";\nimport { toJSONSchema } from \"assistant-stream\";\nimport type { Unstable_InteractableDefinition } from \"../types/scopes/interactables\";\nimport {\n interactableToolName,\n shallowMergeInteractableState,\n type Unstable_InteractableSnapshotEntry,\n} from \"../../model-context/interactable-composer-metadata\";\nimport { generateId } from \"../../utils/id\";\nimport { isRecord } from \"../../utils/json/is-json\";\nimport { nullProtoRecord } from \"../../utils/record\";\n\nexport type PartialJSONSchema = ReturnType<typeof toJSONSchema>;\n\nconst ID_PROPERTY = {\n type: \"string\" as const,\n description:\n \"The id of the instance to update, as shown in its state snapshot in the conversation.\",\n};\n\nconst ITEM_ID_PROPERTY = {\n type: \"string\" as const,\n description: \"The id of an item currently in this list.\",\n};\n\nconst hasIdProperty = (schema: Record<string, unknown>) => {\n const properties = schema.properties;\n return isRecord(properties) && properties.id !== undefined;\n};\n\nconst withRequiredItemId = (schema: Record<string, unknown>) => ({\n ...schema,\n required: [\"id\"],\n});\n\n// The framework assigns ids to new items, so the model never sees the `id`\n// field when adding (it can't address an item that doesn't exist yet).\nconst withoutItemId = (schema: Record<string, unknown>) => {\n const { id: _omitted, ...properties } = isRecord(schema.properties)\n ? schema.properties\n : {};\n const required = Array.isArray(schema.required)\n ? schema.required.filter((key) => key !== \"id\")\n : schema.required;\n return { ...schema, properties, required };\n};\n\nconst toArrayUpdateSchema = (schema: unknown, field: string) => {\n if (!isRecord(schema) || schema.type !== \"array\") return schema;\n const itemSchema = schema.items;\n if (Array.isArray(itemSchema) || !isRecord(itemSchema)) return schema;\n\n const idKeyed = hasIdProperty(itemSchema);\n const properties: Record<string, unknown> = {\n add: {\n type: \"array\",\n items: idKeyed ? withoutItemId(itemSchema) : itemSchema,\n },\n remove: {\n type: \"array\",\n items: idKeyed ? ITEM_ID_PROPERTY : itemSchema,\n },\n clear: { type: \"boolean\" },\n };\n\n if (idKeyed) {\n properties.update = {\n type: \"array\",\n items: withRequiredItemId(itemSchema),\n };\n }\n\n return {\n type: \"object\" as const,\n description:\n `Operations for array field \"${field}\". To change one item use update ` +\n `with its id; add new items (their ids are assigned for you), remove items ` +\n `by id, or clear to empty. Change only the items you mean to — never resend ` +\n `the whole array to edit one item.`,\n properties,\n additionalProperties: false,\n };\n};\n\n// Top-level array fields whose items carry an `id` — the fields the framework\n// mints ids for on add.\nconst idKeyedArrayFieldNames = (\n properties: Record<string, unknown>,\n): Set<string> => {\n const names = new Set<string>();\n for (const [key, value] of Object.entries(properties)) {\n if (\n isRecord(value) &&\n value.type === \"array\" &&\n isRecord(value.items) &&\n hasIdProperty(value.items)\n ) {\n names.add(key);\n }\n }\n return names;\n};\n\nconst withArrayUpdateSchemas = (properties: Record<string, unknown>) =>\n Object.fromEntries(\n Object.entries(properties).map(([key, value]) => [\n key,\n toArrayUpdateSchema(value, key),\n ]),\n );\n\n/**\n * Wraps an interactable's partial state schema with the required `id`\n * parameter. Falls back to a permissive schema when the partial conversion\n * failed at registration time.\n */\nfunction withRequiredId(partial: PartialJSONSchema | undefined) {\n if (!partial || typeof partial !== \"object\" || partial.type !== \"object\") {\n return {\n type: \"object\" as const,\n properties: { id: ID_PROPERTY },\n required: [\"id\"],\n additionalProperties: true,\n };\n }\n if (process.env.NODE_ENV !== \"production\" && partial.properties?.id) {\n console.warn(\n `[Interactables] a top-level \"id\" field in an interactable's stateSchema is ` +\n `reserved for instance addressing by the update tool and cannot be updated ` +\n `by the model. Rename the field to make it model-writable.`,\n );\n }\n const { id: _reserved, ...properties } = partial.properties ?? {};\n return {\n ...partial,\n properties: { id: ID_PROPERTY, ...withArrayUpdateSchemas(properties) },\n required: [\"id\"],\n };\n}\n\nexport function buildInteractableModelContext(\n definitions: Record<string, Unstable_InteractableDefinition>,\n partialSchemaCache: Map<string, PartialJSONSchema>,\n setDefState: (id: string, updater: (prev: unknown) => unknown) => void,\n streamBaselines = new Map<string, { targetId: string; state: unknown }>(),\n):\n | {\n tools: Record<string, Tool<any, any>>;\n unstable_composerMetadata?: Record<string, unknown>;\n }\n | undefined {\n const entries = Object.values(definitions);\n if (entries.length === 0) return undefined;\n\n const byName = new Map<string, Unstable_InteractableDefinition[]>();\n for (const def of entries) {\n const list = byName.get(def.name) ?? [];\n list.push(def);\n byName.set(def.name, list);\n }\n\n const tools: Record<string, Tool<any, any>> = {};\n\n for (const [name, instances] of byName) {\n const toolName = interactableToolName(name);\n if (tools[toolName]) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n `[Interactables] interactable names \"${name}\" and another registered name ` +\n `both sanitize to the tool name \"${toolName}\". Rename one of them.`,\n );\n }\n continue;\n }\n\n const first = instances[0]!;\n const partialSchema = partialSchemaCache.get(first.id);\n const idKeyedFields =\n partialSchema && isRecord(partialSchema.properties)\n ? idKeyedArrayFieldNames(partialSchema.properties)\n : new Set<string>();\n\n // `id` resolves to a definition of this name; an id-less call is accepted\n // only while exactly one instance exists.\n const resolveTarget = (\n id: unknown,\n ): Unstable_InteractableDefinition | undefined => {\n if (typeof id === \"string\") {\n const def = definitions[id];\n return def?.name === name ? def : undefined;\n }\n return instances.length === 1 ? first : undefined;\n };\n\n tools[toolName] = {\n type: \"frontend\",\n description:\n `Update the state of interactable component \"${name}\". ${first.description} ` +\n `Pass the id of the instance to update — instance ids and current state ` +\n `appear in the conversation as state snapshots. Only include the fields ` +\n `you want to change; omitted fields keep their current values.`,\n parameters: withRequiredId(partialSchema),\n streamCall: async (reader, { toolCallId }) => {\n try {\n for await (const partialArgs of reader.args.streamValues()) {\n if (!partialArgs || typeof partialArgs !== \"object\") continue;\n const args = partialArgs as Record<string, unknown>;\n const keys = Object.keys(args);\n const idIndex = keys.indexOf(\"id\");\n if (idIndex === keys.length - 1) continue;\n\n const { id, ...partial } = args;\n if (Object.keys(partial).length === 0) continue;\n const target = resolveTarget(id);\n if (!target) continue;\n\n const baseline = streamBaselines.get(toolCallId);\n const arrayBaseline =\n baseline?.targetId === target.id ? baseline.state : target.state;\n if (!baseline || baseline.targetId !== target.id) {\n streamBaselines.set(toolCallId, {\n targetId: target.id,\n state: target.state,\n });\n }\n\n setDefState(target.id, (prev) =>\n shallowMergeInteractableState(prev, partial, { arrayBaseline }),\n );\n }\n } catch {\n // Non-fatal: execute handles the final state\n }\n },\n execute: async (args: unknown, { toolCallId }) => {\n const { id, ...partial } = (args ?? {}) as Record<string, unknown>;\n const target = resolveTarget(id);\n if (!target) {\n const validIds = instances.map((d) => d.id);\n return {\n success: false,\n error: `Unknown id ${JSON.stringify(id)} for interactable \"${name}\". Valid ids: ${validIds.join(\", \")}`,\n };\n }\n const baseline = streamBaselines.get(toolCallId);\n streamBaselines.delete(toolCallId);\n const addedItemIds = nullProtoRecord<string[]>();\n setDefState(target.id, (prev) =>\n shallowMergeInteractableState(prev, partial, {\n arrayBaseline:\n baseline?.targetId === target.id ? baseline.state : undefined,\n idFactory: (field) => {\n const itemId = generateId();\n (addedItemIds[field] ??= []).push(itemId);\n return itemId;\n },\n idKeyedFields,\n }),\n );\n // The resolved id lets an id-less call's UI (and the model) address\n // the instance that was actually updated.\n const result: {\n success: true;\n id: string;\n addedItemIds?: Record<string, string[]>;\n } = { success: true, id: target.id };\n if (Object.keys(addedItemIds).length > 0) {\n result.addedItemIds = { ...addedItemIds };\n }\n return result;\n },\n };\n }\n\n const interactables: Unstable_InteractableSnapshotEntry[] = entries.map(\n (def) => ({\n id: def.id,\n name: def.name,\n state: def.state,\n }),\n );\n return { tools, unstable_composerMetadata: { interactables } };\n}\n"],"mappings":";;;;;;AAcA,MAAMW,cAAc;CAClBC,MAAM;CACNE,aACE;AACJ;AAEA,MAAMC,mBAAmB;CACvBH,MAAM;CACNE,aAAa;AACf;AAEA,MAAME,iBAAiBC,WAAoC;CACzD,MAAME,aAAaF,OAAOE;CAC1B,OAAOZ,SAASY,UAAU,KAAKA,WAAWC,OAAOC,KAAAA;AACnD;AAEA,MAAMC,sBAAsBL,YAAqC;CAC/D,GAAGA;CACHM,UAAU,CAAC,IAAI;AACjB;AAIA,MAAMC,iBAAiBP,WAAoC;CACzD,MAAM,EAAEG,IAAIK,UAAU,GAAGN,eAAeZ,SAASU,OAAOE,UAAU,IAC9DF,OAAOE,aACP,CAAC;CACL,MAAMI,WAAWG,MAAMC,QAAQV,OAAOM,QAAQ,IAC1CN,OAAOM,SAASK,QAAQC,QAAQA,QAAQ,IAAI,IAC5CZ,OAAOM;CACX,OAAO;EAAE,GAAGN;EAAQE;EAAYI;CAAS;AAC3C;AAEA,MAAMO,uBAAuBb,QAAiBc,UAAkB;CAC9D,IAAI,CAACxB,SAASU,MAAM,KAAKA,OAAOL,SAAS,SAAS,OAAOK;CACzD,MAAMe,aAAaf,OAAOgB;CAC1B,IAAIP,MAAMC,QAAQK,UAAU,KAAK,CAACzB,SAASyB,UAAU,GAAG,OAAOf;CAE/D,MAAMiB,UAAUlB,cAAcgB,UAAU;CACxC,MAAMb,aAAsC;EAC1CgB,KAAK;GACHvB,MAAM;GACNqB,OAAOC,UAAUV,cAAcQ,UAAU,IAAIA;EAC/C;EACAI,QAAQ;GACNxB,MAAM;GACNqB,OAAOC,UAAUnB,mBAAmBiB;EACtC;EACAK,OAAO,EAAEzB,MAAM,UAAU;CAC3B;CAEA,IAAIsB,SACFf,WAAWmB,SAAS;EAClB1B,MAAM;EACNqB,OAAOX,mBAAmBU,UAAU;CACtC;C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AAI6C,KAAKgC,MAAM;MACxC,OAAOA;KACT;KACA1B;IACF,CAAC,CACH;IAGA,MAAM2B,SAIF;KAAET,SAAS;KAAMhF,IAAI0E,OAAO1E;IAAG;IACnC,IAAIwB,OAAO+C,KAAKe,YAAY,CAAC,CAACpC,SAAS,GACrCuC,OAAOH,eAAe,EAAE,GAAGA,aAAa;IAE1C,OAAOG;GACT;EACF;CACF;CASA,OAAO;EAAE1C;EAAOC,2BAA2B,EAAE0C,eAPejE,QAAQG,KACjEwB,SAAS;GACRpD,IAAIoD,IAAIpD;GACRuD,MAAMH,IAAIG;GACVT,OAAOM,IAAIN;EACb,EAE2C4C,EAAc;CAAE;AAC/D"}
1
+ {"version":3,"file":"interactable-model-context.js","names":["Tool","toJSONSchema","getPartialJsonObjectMeta","Unstable_InteractableDefinition","interactableToolName","shallowMergeInteractableState","Unstable_InteractableSnapshotEntry","generateId","isRecord","nullProtoRecord","StateJSONSchema","ReturnType","ID_PROPERTY","type","const","description","ITEM_ID_PROPERTY","hasIdProperty","schema","Record","properties","id","undefined","withRequiredItemId","required","withoutItemId","_omitted","Array","isArray","filter","key","toArrayUpdateSchema","field","itemSchema","items","idKeyed","add","remove","clear","update","additionalProperties","idKeyedArrayFieldNames","Set","names","value","Object","entries","withArrayUpdateSchemas","fromEntries","map","withRequiredId","process","env","NODE_ENV","console","warn","_reserved","buildInteractableModelContext","definitions","schemaCache","Map","setDefState","updater","prev","getCurrentDefinitions","streamBaselines","targetId","state","tools","unstable_composerMetadata","values","length","byName","def","list","get","name","push","set","instances","toolName","first","jsonSchema","idKeyedFields","resolveTarget","parameters","streamCall","reader","toolCallId","partialArgs","args","streamValues","keys","idIndex","indexOf","partial","target","currentTarget","baseline","arrayBaseline","partialPath","execute","currentDefinitions","validIds","success","error","JSON","stringify","join","delete","addedItemIds","idFactory","itemId","result","interactables"],"sources":["../../../src/react/client/interactable-model-context.ts"],"sourcesContent":["import type { Tool } from \"assistant-stream\";\nimport { toJSONSchema } from \"assistant-stream\";\nimport { getPartialJsonObjectMeta } from \"assistant-stream/utils\";\nimport type { Unstable_InteractableDefinition } from \"../types/scopes/interactables\";\nimport {\n interactableToolName,\n shallowMergeInteractableState,\n type Unstable_InteractableSnapshotEntry,\n} from \"../../model-context/interactable-composer-metadata\";\nimport { generateId } from \"../../utils/id\";\nimport { isRecord } from \"../../utils/json/is-json\";\nimport { nullProtoRecord } from \"../../utils/record\";\n\nexport type StateJSONSchema = ReturnType<typeof toJSONSchema>;\n\nconst ID_PROPERTY = {\n type: \"string\" as const,\n description:\n \"The id of the instance to update, as shown in its state snapshot in the conversation.\",\n};\n\nconst ITEM_ID_PROPERTY = {\n type: \"string\" as const,\n description: \"The id of an item currently in this list.\",\n};\n\nconst hasIdProperty = (schema: Record<string, unknown>) => {\n const properties = schema.properties;\n return isRecord(properties) && properties.id !== undefined;\n};\n\nconst withRequiredItemId = (schema: Record<string, unknown>) => ({\n ...schema,\n required: [\"id\"],\n});\n\n// The framework assigns ids to new items, so the model never sees the `id`\n// field when adding (it can't address an item that doesn't exist yet).\nconst withoutItemId = (schema: Record<string, unknown>) => {\n const { id: _omitted, ...properties } = isRecord(schema.properties)\n ? schema.properties\n : {};\n const required = Array.isArray(schema.required)\n ? schema.required.filter((key) => key !== \"id\")\n : schema.required;\n return { ...schema, properties, required };\n};\n\nconst toArrayUpdateSchema = (schema: unknown, field: string) => {\n if (!isRecord(schema) || schema.type !== \"array\") return schema;\n const itemSchema = schema.items;\n if (Array.isArray(itemSchema) || !isRecord(itemSchema)) return schema;\n\n const idKeyed = hasIdProperty(itemSchema);\n const properties: Record<string, unknown> = {\n add: {\n type: \"array\",\n items: idKeyed ? withoutItemId(itemSchema) : itemSchema,\n },\n remove: {\n type: \"array\",\n items: idKeyed ? ITEM_ID_PROPERTY : itemSchema,\n },\n clear: { type: \"boolean\" },\n };\n\n if (idKeyed) {\n properties.update = {\n type: \"array\",\n items: withRequiredItemId(itemSchema),\n };\n }\n\n return {\n type: \"object\" as const,\n description:\n `Operations for array field \"${field}\". To change one item use update ` +\n `with its id; add new items (their ids are assigned for you), remove items ` +\n `by id, or clear to empty. Change only the items you mean to — never resend ` +\n `the whole array to edit one item.`,\n properties,\n additionalProperties: false,\n };\n};\n\n// Top-level array fields whose items carry an `id` — the fields the framework\n// mints ids for on add.\nconst idKeyedArrayFieldNames = (\n properties: Record<string, unknown>,\n): Set<string> => {\n const names = new Set<string>();\n for (const [key, value] of Object.entries(properties)) {\n if (\n isRecord(value) &&\n value.type === \"array\" &&\n isRecord(value.items) &&\n hasIdProperty(value.items)\n ) {\n names.add(key);\n }\n }\n return names;\n};\n\nconst withArrayUpdateSchemas = (properties: Record<string, unknown>) =>\n Object.fromEntries(\n Object.entries(properties).map(([key, value]) => [\n key,\n toArrayUpdateSchema(value, key),\n ]),\n );\n\n/**\n * Replaces the state schema's root `required` list with the `id` parameter,\n * so every top-level field is optional while nested objects keep theirs and\n * travel whole through the shallow merge. Falls back to a permissive schema\n * when the JSON Schema conversion failed at registration time.\n */\nfunction withRequiredId(schema: StateJSONSchema | undefined) {\n if (!schema || typeof schema !== \"object\" || schema.type !== \"object\") {\n return {\n type: \"object\" as const,\n properties: { id: ID_PROPERTY },\n required: [\"id\"],\n additionalProperties: true,\n };\n }\n if (process.env.NODE_ENV !== \"production\" && schema.properties?.id) {\n console.warn(\n `[Interactables] a top-level \"id\" field in an interactable's stateSchema is ` +\n `reserved for instance addressing by the update tool and cannot be updated ` +\n `by the model. Rename the field to make it model-writable.`,\n );\n }\n const { id: _reserved, ...properties } = schema.properties ?? {};\n return {\n ...schema,\n properties: { id: ID_PROPERTY, ...withArrayUpdateSchemas(properties) },\n required: [\"id\"],\n };\n}\n\nexport function buildInteractableModelContext(\n definitions: Record<string, Unstable_InteractableDefinition>,\n schemaCache: Map<string, StateJSONSchema>,\n setDefState: (id: string, updater: (prev: unknown) => unknown) => void,\n getCurrentDefinitions: () => Record<string, Unstable_InteractableDefinition>,\n streamBaselines = new Map<string, { targetId: string; state: unknown }>(),\n):\n | {\n tools: Record<string, Tool<any, any>>;\n unstable_composerMetadata?: Record<string, unknown>;\n }\n | undefined {\n const entries = Object.values(definitions);\n if (entries.length === 0) return undefined;\n\n const byName = new Map<string, Unstable_InteractableDefinition[]>();\n for (const def of entries) {\n const list = byName.get(def.name) ?? [];\n list.push(def);\n byName.set(def.name, list);\n }\n\n const tools: Record<string, Tool<any, any>> = {};\n\n for (const [name, instances] of byName) {\n const toolName = interactableToolName(name);\n if (tools[toolName]) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n `[Interactables] interactable names \"${name}\" and another registered name ` +\n `both sanitize to the tool name \"${toolName}\". Rename one of them.`,\n );\n }\n continue;\n }\n\n const first = instances[0]!;\n const jsonSchema = schemaCache.get(first.id);\n const idKeyedFields =\n jsonSchema && isRecord(jsonSchema.properties)\n ? idKeyedArrayFieldNames(jsonSchema.properties)\n : new Set<string>();\n\n // `id` resolves to a definition of this name; an id-less call is accepted\n // only while exactly one instance exists.\n const resolveTarget = (\n id: unknown,\n ): Unstable_InteractableDefinition | undefined => {\n if (typeof id === \"string\") {\n const def = definitions[id];\n return def?.name === name ? def : undefined;\n }\n return instances.length === 1 ? first : undefined;\n };\n\n tools[toolName] = {\n type: \"frontend\",\n description:\n `Update the state of interactable component \"${name}\". ${first.description} ` +\n `Pass the id of the instance to update — instance ids and current state ` +\n `appear in the conversation as state snapshots. Only include the fields ` +\n `you want to change; omitted fields keep their current values. A nested ` +\n `object replaces the existing one, so send it complete.`,\n parameters: withRequiredId(jsonSchema),\n streamCall: async (reader, { toolCallId }) => {\n try {\n for await (const partialArgs of reader.args.streamValues()) {\n if (!partialArgs || typeof partialArgs !== \"object\") continue;\n const args = partialArgs as Record<string, unknown>;\n const keys = Object.keys(args);\n const idIndex = keys.indexOf(\"id\");\n if (idIndex === keys.length - 1) continue;\n\n const { id, ...partial } = args;\n if (Object.keys(partial).length === 0) continue;\n const target = resolveTarget(id);\n if (!target) continue;\n const currentTarget = getCurrentDefinitions()[target.id];\n if (currentTarget?.name !== name) continue;\n\n const baseline = streamBaselines.get(toolCallId);\n const arrayBaseline =\n baseline?.targetId === target.id\n ? baseline.state\n : currentTarget.state;\n if (!baseline || baseline.targetId !== target.id) {\n streamBaselines.set(toolCallId, {\n targetId: target.id,\n state: currentTarget.state,\n });\n }\n\n const partialPath = getPartialJsonObjectMeta(\n args as Record<symbol, unknown>,\n )?.partialPath;\n setDefState(target.id, (prev) =>\n shallowMergeInteractableState(prev, partial, {\n arrayBaseline,\n partialPath,\n }),\n );\n }\n } catch {\n // Non-fatal: execute handles the final state\n }\n },\n execute: async (args: unknown, { toolCallId }) => {\n const { id, ...partial } = (args ?? {}) as Record<string, unknown>;\n const target = resolveTarget(id);\n // The tool was built from a snapshot, so the target may have unmounted\n // or been replaced under the same id since; mutating either would\n // report success for a write nothing receives.\n const currentDefinitions = getCurrentDefinitions();\n const currentTarget = target\n ? currentDefinitions[target.id]\n : undefined;\n if (!currentTarget || currentTarget.name !== name) {\n const validIds = Object.values(currentDefinitions)\n .filter((def) => def.name === name)\n .map((def) => def.id);\n return {\n success: false,\n error: `Unknown id ${JSON.stringify(id)} for interactable \"${name}\". Valid ids: ${validIds.join(\", \")}`,\n };\n }\n const baseline = streamBaselines.get(toolCallId);\n streamBaselines.delete(toolCallId);\n const addedItemIds = nullProtoRecord<string[]>();\n setDefState(currentTarget.id, (prev) =>\n shallowMergeInteractableState(prev, partial, {\n arrayBaseline:\n baseline?.targetId === currentTarget.id\n ? baseline.state\n : undefined,\n idFactory: (field) => {\n const itemId = generateId();\n (addedItemIds[field] ??= []).push(itemId);\n return itemId;\n },\n idKeyedFields,\n }),\n );\n // The resolved id lets an id-less call's UI (and the model) address\n // the instance that was actually updated.\n const result: {\n success: true;\n id: string;\n addedItemIds?: Record<string, string[]>;\n } = { success: true, id: currentTarget.id };\n if (Object.keys(addedItemIds).length > 0) {\n result.addedItemIds = { ...addedItemIds };\n }\n return result;\n },\n };\n }\n\n const interactables: Unstable_InteractableSnapshotEntry[] = entries.map(\n (def) => ({\n id: def.id,\n name: def.name,\n state: def.state,\n }),\n );\n return { tools, unstable_composerMetadata: { interactables } };\n}\n"],"mappings":";;;;;;;AAeA,MAAMY,cAAc;CAClBC,MAAM;CACNE,aACE;AACJ;AAEA,MAAMC,mBAAmB;CACvBH,MAAM;CACNE,aAAa;AACf;AAEA,MAAME,iBAAiBC,WAAoC;CACzD,MAAME,aAAaF,OAAOE;CAC1B,OAAOZ,SAASY,UAAU,KAAKA,WAAWC,OAAOC,KAAAA;AACnD;AAEA,MAAMC,sBAAsBL,YAAqC;CAC/D,GAAGA;CACHM,UAAU,CAAC,IAAI;AACjB;AAIA,MAAMC,iBAAiBP,WAAoC;CACzD,MAAM,EAAEG,IAAIK,UAAU,GAAGN,eAAeZ,SAASU,OAAOE,UAAU,IAC9DF,OAAOE,aACP,CAAC;CACL,MAAMI,WAAWG,MAAMC,QAAQV,OAAOM,QAAQ,IAC1CN,OAAOM,SAASK,QAAQC,QAAQA,QAAQ,IAAI,IAC5CZ,OAAOM;CACX,OAAO;EAAE,GAAGN;EAAQE;EAAYI;CAAS;AAC3C;AAEA,MAAMO,uBAAuBb,QAAiBc,UAAkB;CAC9D,IAAI,CAACxB,SAASU,MAAM,KAAKA,OAAOL,SAAS,SAAS,OAAOK;CACzD,MAAMe,aAAaf,OAAOgB;CAC1B,IAAIP,MAAMC,QAAQK,UAAU,KAAK,CAACzB,SAASyB,UAAU,GAAG,OAAOf;CAE/D,MAAMiB,UAAUlB,cAAcgB,UAAU;CACxC,MAAMb,aAAsC;EAC1CgB,KAAK;GACHvB,MAAM;GACNqB,OAAOC,UAAUV,cAAcQ,UAAU,IAAIA;EAC/C;EACAI,QAAQ;GACNxB,MAAM;GACNqB,OAAOC,UAAUnB,mBAAmBiB;EACtC;EACAK,OAAO,EAAEzB,MAAM,UAAU;CAC3B;CAEA,IAAIsB,SACFf,WAAWmB,SAAS;EAClB1B,MAAM;EACNqB,OAAOX,mBAAmBU,UAA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;IACF;IACA,MAAMV,WAAWjC,gBAAgBU,IAAIa,UAAU;IAC/CvB,gBAAgB4C,OAAOrB,UAAU;IACjC,MAAMsB,eAAerG,gBAA0B;IAC/CoD,YAAYoC,cAAc5E,KAAK0C,SAC7B1D,8BAA8B0D,MAAMgC,SAAS;KAC3CI,eACED,UAAUhC,aAAa+B,cAAc5E,KACjC6E,SAAS/B,QACT7C,KAAAA;KACNyF,YAAY/E,UAAU;MACpB,MAAMgF,SAASzG,WAAW;MAC1B,CAACuG,aAAa9E,WAAW,CAAA,EAAA,CAAI6C,KAAKmC,MAAM;MACxC,OAAOA;KACT;KACA7B;IACF,CAAC,CACH;IAGA,MAAM8B,SAIF;KAAET,SAAS;KAAMnF,IAAI4E,cAAc5E;IAAG;IAC1C,IAAIwB,OAAO+C,KAAKkB,YAAY,CAAC,CAACvC,SAAS,GACrC0C,OAAOH,eAAe,EAAE,GAAGA,aAAa;IAE1C,OAAOG;GACT;EACF;CACF;CASA,OAAO;EAAE7C;EAAOC,2BAA2B,EAAE6C,eAPepE,QAAQG,KACjEwB,SAAS;GACRpD,IAAIoD,IAAIpD;GACRuD,MAAMH,IAAIG;GACVT,OAAOM,IAAIN;EACb,EAE2C+C,EAAc;CAAE;AAC/D"}
@@ -1,122 +1,160 @@
1
- /// <reference path="../store/scope-registration.d.ts" />
2
- /// <reference path="./types/store-augmentation.d.ts" />
3
- import { AssistantContextConfig } from "../model-context/types.js";
4
- import { PartState } from "../store/scopes/part.js";
5
- import { RuntimeAdapter } from "./RuntimeAdapter.js";
6
- import { RuntimeAdapters } from "../runtimes/remote-thread-list/types.js";
7
- import { JoinStrategy } from "../runtime/utils/external-message-conversion.js";
8
- import { ExternalMessageConversionCache, convertExternalMessages, createExternalMessageConversionCache, useExternalMessageConverter } from "./runtimes/external-message-converter.js";
9
- import { StreamingTimingAccessors, StreamingTimingOptions, StreamingTimingState } from "../runtime/utils/streaming-timing.js";
10
- import { useStreamingTiming } from "./runtimes/useStreamingTiming.js";
11
- import { DataMessagePartComponent, DataMessagePartProps, EmptyMessagePartComponent, EmptyMessagePartProps, FileMessagePartComponent, FileMessagePartProps, GenerativeUIComponentRegistry, GenerativeUIMessagePartComponent, GenerativeUIMessagePartProps, GenerativeUIRenderProps, ImageMessagePartComponent, ImageMessagePartProps, QuoteMessagePartComponent, QuoteMessagePartProps, ReasoningGroupComponent, ReasoningGroupProps, ReasoningMessagePartComponent, ReasoningMessagePartProps, SourceMessagePartComponent, SourceMessagePartProps, TextMessagePartComponent, TextMessagePartProps, ToolCallMessagePartComponent, ToolCallMessagePartProps, Unstable_AudioMessagePartComponent, Unstable_AudioMessagePartProps } from "./types/MessagePartComponentTypes.js";
12
- import { ToolCallText, ToolDefinition, Toolkit, ToolkitDefinition, ToolkitDefinitionEntry } from "./model-context/toolbox.js";
13
- import { defineToolkit } from "./model-context/define-toolkit.js";
14
- import { McpToolkitDefinition, McpToolkitEntry, McpToolkitToolConfig, defineMcpToolkit } from "./model-context/define-mcp-toolkit.js";
15
- import { AssistantProviderBase, AssistantProviderBaseProps, getRenderComponent } from "./AssistantProvider.js";
16
- import { AssistantRuntimeProvider } from "./AssistantRuntimeProvider.js";
17
- import { TitleGenerationAdapter, createSimpleTitleAdapter } from "./adapters/TitleGenerationAdapter.js";
18
- import { AsyncStorageLike, createLocalStorageAdapter } from "./adapters/LocalStorageThreadListAdapter.js";
19
- import { DataRenderers } from "./client/DataRenderers.js";
20
- import { Unstable_InteractableDefinition, Unstable_InteractablePersistedState, Unstable_InteractablePersistenceAdapter, Unstable_InteractablePersistenceStatus, Unstable_InteractableRegistration, Unstable_InteractableStateSchema, Unstable_InteractablesClientSchema, Unstable_InteractablesConfig, Unstable_InteractablesMethods, Unstable_InteractablesState } from "./types/scopes/interactables.js";
21
- import { unstable_Interactables } from "./client/Interactables.js";
22
- import { McpAppResourceOutput, ToolsClientSchema, ToolsMethods, ToolsState } from "./types/scopes/tools.js";
23
- import { Tools } from "./client/Tools.js";
24
- import { AssistantToolProps, useAssistantTool } from "./model-context/useAssistantTool.js";
25
- import { AssistantTool, makeAssistantTool } from "./model-context/makeAssistantTool.js";
26
- import { AssistantToolUIProps, useAssistantToolUI } from "./model-context/useAssistantToolUI.js";
27
- import { AssistantToolUI, makeAssistantToolUI } from "./model-context/makeAssistantToolUI.js";
28
- import { AssistantDataUIProps, useAssistantDataUI } from "./model-context/useAssistantDataUI.js";
29
- import { AssistantDataUI, makeAssistantDataUI } from "./model-context/makeAssistantDataUI.js";
30
- import { useAssistantInstructions } from "./model-context/useAssistantInstructions.js";
31
- import { useAssistantContext } from "./model-context/useAssistantContext.js";
32
- import { useInlineRender } from "./model-context/useInlineRender.js";
33
- import { stubTool } from "./model-context/stub-tool.js";
34
- import { externalTool } from "./model-context/external-tool.js";
35
- import { useAuiToolOverrides } from "./model-context/useAuiToolOverrides.js";
36
- import { hitl, hitlTool, humanTool } from "./model-context/human-tool.js";
37
- import { ProviderToolConfig, providerTool } from "./model-context/provider-tool.js";
38
- import { InteractableDefinition, InteractablePersistedState, InteractablePersistenceAdapter, InteractablePersistenceStatus, InteractableRegistration, InteractableStateSchema, InteractablesClientSchema, InteractablesMethods, InteractablesState } from "./interactables-legacy/scopes.js";
39
- import { AssistantInteractableProps, useAssistantInteractable } from "./interactables-legacy/useAssistantInteractable.js";
40
- import { useInteractableState } from "./interactables-legacy/useInteractableState.js";
41
- import { Unstable_InferInteractableState, Unstable_InteractableConfig, Unstable_InteractableVersionInfo, unstable_useInteractable } from "./model-context/useInteractable.js";
42
- import { unstable_useInteractableState } from "./model-context/useInteractableState.js";
43
- import { unstable_useInteractableVersions } from "./model-context/useInteractableVersions.js";
44
- import { Unstable_InteractableToolConfig, Unstable_InteractableToolRenderProps, unstable_interactableTool } from "./model-context/interactableTool.js";
45
- import { ToolArgsStatus, useToolArgsStatus } from "./model-context/useToolArgsStatus.js";
46
- import { Interactables } from "./interactables-legacy/Interactables.js";
47
- import { DataRenderersClientSchema, DataRenderersMethods, DataRenderersState } from "./types/scopes/dataRenderers.js";
48
- import { ComposerAttachmentByIndexProvider, MessageAttachmentByIndexProvider } from "./providers/AttachmentByIndexProvider.js";
49
- import { ThreadListItemRuntimeProvider } from "./providers/ThreadListItemRuntimeProvider.js";
50
- import { MessageByIndexProvider } from "./providers/MessageByIndexProvider.js";
51
- import { PartByIndexProvider } from "./providers/PartByIndexProvider.js";
52
- import { TextMessagePartProvider } from "./providers/TextMessagePartProvider.js";
53
- import { ChainOfThoughtByIndicesProvider } from "./providers/ChainOfThoughtByIndicesProvider.js";
54
- import { ThreadListItemByIndexProvider } from "./providers/ThreadListItemByIndexProvider.js";
55
- import { ChainOfThoughtPartByIndexProvider } from "./providers/ChainOfThoughtPartByIndexProvider.js";
56
- import { SuggestionByIndexProvider, SuggestionByIndexProviderProps } from "./providers/SuggestionByIndexProvider.js";
57
- import { QueueItemByIndexProvider, QueueItemByIndexProviderProps } from "./providers/QueueItemByIndexProvider.js";
58
- import { ReadonlyThreadProvider } from "./providers/ReadonlyThreadProvider.js";
59
- import { useRuntimeAdapters } from "./runtimes/useRuntimeAdapters.js";
60
- import { RuntimeAdapterProvider } from "./runtimes/RuntimeAdapterProvider.js";
61
- import { useExternalStoreRuntime } from "./runtimes/useExternalStoreRuntime.js";
62
- import { useExternalStoreSharedOptions } from "./runtimes/useExternalStoreSharedOptions.js";
63
- import { createMessageConverter } from "./runtimes/createMessageConverter.js";
64
- import { RuntimeExtras, createRuntimeExtras, unstable_createRuntimeExtrasFromBrand } from "./runtimes/createRuntimeExtras.js";
65
- import { RemoteThreadListHookInstanceManager } from "./runtimes/RemoteThreadListHookInstanceManager.js";
66
- import { RemoteThreadListThreadListRuntimeCore } from "./runtimes/RemoteThreadListThreadListRuntimeCore.js";
67
- import { useRemoteThreadListRuntime } from "./runtimes/useRemoteThreadListRuntime.js";
68
- import { CloudThreadListAdapterOptions, createCloudThreadListAdapter } from "./runtimes/cloud/createCloudThreadListAdapter.js";
69
- import { useCloudThreadListAdapter } from "./runtimes/cloud/useCloudThreadListAdapter.js";
70
- import { useCloudThreadListRuntime } from "./runtimes/cloud/useCloudThreadListRuntime.js";
71
- import { AssistantTransportCommand, AssistantTransportConnectionMetadata, AssistantTransportOptions, AssistantTransportProtocol, SendCommandsRequestBody } from "./runtimes/assistant-transport/types.js";
72
- import { useAssistantTransportRuntime, useAssistantTransportSendCommand, useAssistantTransportState } from "./runtimes/assistant-transport/useAssistantTransportRuntime.js";
73
- import { useAssistantCloudThreadHistoryAdapter } from "./runtimes/cloud/AssistantCloudThreadHistoryAdapter.js";
74
- import { CloudFileAttachmentAdapter } from "./runtimes/cloud/CloudFileAttachmentAdapter.js";
75
- import { ThreadPrimitiveMessageByIndex, ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveUnstable_MessageById } from "./primitives/thread/ThreadMessages.js";
76
- import { EnrichedPartState, MessagePartComponent, MessagePrimitivePartByIndex, MessagePrimitiveParts, defaultComponents } from "./primitives/message/MessageParts.js";
77
- import { GroupByContext, groupPartByType } from "./utils/groupParts.js";
78
- import { MessagePrimitiveGroupedParts } from "./primitives/message/MessageGroupedParts.js";
79
- import { GenerativeUIRender, GenerativeUIRenderError, MessagePrimitiveGenerativeUI } from "./primitives/generativeUI/GenerativeUI.js";
80
- import { MessagePrimitiveQuote } from "./primitives/message/MessageQuote.js";
81
- import { MessagePrimitiveAttachmentByIndex, MessagePrimitiveAttachments } from "./primitives/message/MessageAttachments.js";
82
- import { ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments } from "./primitives/composer/ComposerAttachments.js";
83
- import { ComposerPrimitiveQueue } from "./primitives/composer/ComposerQueue.js";
84
- import { ThreadListPrimitiveItemByIndex, ThreadListPrimitiveItems } from "./primitives/threadList/ThreadListItems.js";
85
- import { ChainOfThoughtPrimitiveParts } from "./primitives/chainOfThought/ChainOfThoughtParts.js";
86
- import { PartPrimitiveMessages, PartPrimitiveMessagesImpl } from "./primitives/part/PartMessages.js";
87
- import { MessagePartPrimitiveInProgress } from "./primitives/messagePart/MessagePartInProgress.js";
88
- import { ThreadListItemPrimitiveTitle } from "./primitives/threadListItem/ThreadListItemTitle.js";
89
- import { ThreadPrimitiveSuggestionByIndex, ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl } from "./primitives/thread/ThreadSuggestions.js";
90
- import { ComposerPrimitiveIf, UseComposerIfProps } from "./primitives/composer/ComposerIf.js";
91
- import { getMessageQuote } from "./utils/getMessageQuote.js";
92
- import { useThreadMessages } from "./primitive-hooks/useThreadMessages.js";
93
- import { unstable_useThreadMessageIds } from "./primitive-hooks/useThreadMessageIds.js";
94
- import { useThreadIsRunning } from "./primitive-hooks/useThreadIsRunning.js";
95
- import { useThreadIsEmpty } from "./primitive-hooks/useThreadIsEmpty.js";
96
- import { useComposerSend } from "./primitive-hooks/useComposerSend.js";
97
- import { useComposerCancel } from "./primitive-hooks/useComposerCancel.js";
98
- import { useComposerDictate } from "./primitive-hooks/useComposerDictate.js";
99
- import { useComposerAddAttachment } from "./primitive-hooks/useComposerAddAttachment.js";
100
- import { useMessageReload } from "./primitive-hooks/useMessageReload.js";
101
- import { useMessageBranching } from "./primitive-hooks/useMessageBranching.js";
102
- import { UseActionBarCopyOptions, useActionBarCopy } from "./primitive-hooks/useActionBarCopy.js";
103
- import { useActionBarEdit } from "./primitive-hooks/useActionBarEdit.js";
104
- import { useActionBarReload } from "./primitive-hooks/useActionBarReload.js";
105
- import { useActionBarFeedbackNegative, useActionBarFeedbackPositive } from "./primitive-hooks/useActionBarFeedback.js";
106
- import { useActionBarSpeak } from "./primitive-hooks/useActionBarSpeak.js";
107
- import { useActionBarStopSpeaking } from "./primitive-hooks/useActionBarStopSpeaking.js";
108
- import { useVoiceControls, useVoiceState, useVoiceVolume } from "./primitive-hooks/useVoice.js";
109
- import { useBranchPickerNext } from "./primitive-hooks/useBranchPickerNext.js";
110
- import { useBranchPickerPrevious } from "./primitive-hooks/useBranchPickerPrevious.js";
111
- import { UseSuggestionTriggerOptions, useSuggestionTrigger } from "./primitive-hooks/useSuggestionTrigger.js";
112
- import { useThreadListItemArchive } from "./primitive-hooks/useThreadListItemArchive.js";
113
- import { useThreadListItemDelete } from "./primitive-hooks/useThreadListItemDelete.js";
114
- import { useThreadListItemUnarchive } from "./primitive-hooks/useThreadListItemUnarchive.js";
115
- import { useThreadListItemTrigger } from "./primitive-hooks/useThreadListItemTrigger.js";
116
- import { useThreadListNew } from "./primitive-hooks/useThreadListNew.js";
117
- import { useThreadListLoadMore } from "./primitive-hooks/useThreadListLoadMore.js";
118
- import { useEditComposerCancel } from "./primitive-hooks/useEditComposerCancel.js";
119
- import { useEditComposerSend } from "./primitive-hooks/useEditComposerSend.js";
120
- import { useMessageError } from "./primitive-hooks/useMessageError.js";
121
- import { LocalRuntimeOptions, splitLocalRuntimeOptions, useLocalRuntime } from "./runtimes/useLocalRuntime.js";
122
- export { type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantInteractableProps, AssistantProviderBase, type AssistantProviderBaseProps, AssistantRuntimeProvider, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type AssistantTransportCommand, type AssistantTransportConnectionMetadata, type AssistantTransportOptions, type AssistantTransportProtocol, type AsyncStorageLike, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ChainOfThoughtPrimitiveParts, CloudFileAttachmentAdapter, type CloudThreadListAdapterOptions, ComposerAttachmentByIndexProvider, ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments, ComposerPrimitiveIf, ComposerPrimitiveQueue, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type DataRenderersClientSchema, type DataRenderersMethods, type DataRenderersState, type EmptyMessagePartComponent, type EmptyMessagePartProps, type EnrichedPartState, type ExternalMessageConversionCache, type FileMessagePartComponent, type FileMessagePartProps, type GenerativeUIComponentRegistry, type GenerativeUIMessagePartComponent, type GenerativeUIMessagePartProps, GenerativeUIRender, GenerativeUIRenderError, type GenerativeUIRenderProps, type GroupByContext, type ImageMessagePartComponent, type ImageMessagePartProps, type InteractableDefinition, type InteractablePersistedState, type InteractablePersistenceAdapter, type InteractablePersistenceStatus, type InteractableRegistration, type InteractableStateSchema, Interactables, type InteractablesClientSchema, type InteractablesMethods, type InteractablesState, type JoinStrategy, type LocalRuntimeOptions, type McpAppResourceOutput, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, MessagePartComponent, MessagePartPrimitiveInProgress, MessagePrimitiveAttachmentByIndex, MessagePrimitiveAttachments, MessagePrimitiveGenerativeUI, MessagePrimitiveGroupedParts, MessagePrimitivePartByIndex, MessagePrimitiveParts, MessagePrimitiveQuote, PartByIndexProvider, PartPrimitiveMessages, PartPrimitiveMessagesImpl, type PartState, type ProviderToolConfig, QueueItemByIndexProvider, type QueueItemByIndexProviderProps, type QuoteMessagePartComponent, type QuoteMessagePartProps, ReadonlyThreadProvider, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, RemoteThreadListHookInstanceManager, RemoteThreadListThreadListRuntimeCore, RuntimeAdapter, RuntimeAdapterProvider, type RuntimeAdapters, type RuntimeExtras, type SendCommandsRequestBody, type SourceMessagePartComponent, type SourceMessagePartProps, type StreamingTimingAccessors, type StreamingTimingOptions, type StreamingTimingState, SuggestionByIndexProvider, type SuggestionByIndexProviderProps, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemPrimitiveTitle, ThreadListItemRuntimeProvider, ThreadListPrimitiveItemByIndex, ThreadListPrimitiveItems, ThreadPrimitiveMessageByIndex, ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveSuggestionByIndex, ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl, ThreadPrimitiveUnstable_MessageById, type TitleGenerationAdapter, type ToolArgsStatus, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolDefinition, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type ToolsClientSchema, type ToolsMethods, type ToolsState, type Unstable_AudioMessagePartComponent, type Unstable_AudioMessagePartProps, type Unstable_InferInteractableState, type Unstable_InteractableConfig, type Unstable_InteractableDefinition, type Unstable_InteractablePersistedState, type Unstable_InteractablePersistenceAdapter, type Unstable_InteractablePersistenceStatus, type Unstable_InteractableRegistration, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type UseActionBarCopyOptions, type UseComposerIfProps, type UseSuggestionTriggerOptions, convertExternalMessages, createCloudThreadListAdapter, createExternalMessageConversionCache, createLocalStorageAdapter, createMessageConverter, createRuntimeExtras, createSimpleTitleAdapter, defineMcpToolkit, defineToolkit, externalTool, getMessageQuote, getRenderComponent, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, defaultComponents as messagePartsDefaultComponents, providerTool, splitLocalRuntimeOptions, stubTool, unstable_Interactables, unstable_createRuntimeExtrasFromBrand, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useActionBarCopy, useActionBarEdit, useActionBarFeedbackNegative, useActionBarFeedbackPositive, useActionBarReload, useActionBarSpeak, useActionBarStopSpeaking, useAssistantCloudThreadHistoryAdapter, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAssistantTransportRuntime, useAssistantTransportSendCommand, useAssistantTransportState, useAuiToolOverrides, useBranchPickerNext, useBranchPickerPrevious, useCloudThreadListAdapter, useCloudThreadListRuntime, useComposerAddAttachment, useComposerCancel, useComposerDictate, useComposerSend, useEditComposerCancel, useEditComposerSend, useExternalMessageConverter, useExternalStoreRuntime, useExternalStoreSharedOptions, useInlineRender, useInteractableState, useLocalRuntime, useMessageBranching, useMessageError, useMessageReload, useRemoteThreadListRuntime, useRuntimeAdapters, useStreamingTiming, useSuggestionTrigger, useThreadIsEmpty, useThreadIsRunning, useThreadListItemArchive, useThreadListItemDelete, useThreadListItemTrigger, useThreadListItemUnarchive, useThreadListLoadMore, useThreadListNew, useThreadMessages, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
1
+ /// <reference path="../store/scope-registration.d.ts" preserve="true" />
2
+ /// <reference path="types/store-augmentation.d.ts" preserve="true" />
3
+ export { makeAssistantTool, type AssistantTool, } from "./model-context/makeAssistantTool.js";
4
+ export { type AssistantToolUI, makeAssistantToolUI, } from "./model-context/makeAssistantToolUI.js";
5
+ export { type AssistantDataUI, makeAssistantDataUI, } from "./model-context/makeAssistantDataUI.js";
6
+ export { useAssistantInstructions } from "./model-context/useAssistantInstructions.js";
7
+ export { useAssistantContext, type AssistantContextConfig, } from "./model-context/useAssistantContext.js";
8
+ export { useAssistantTool, type AssistantToolProps, } from "./model-context/useAssistantTool.js";
9
+ export { useAssistantToolUI, type AssistantToolUIProps, } from "./model-context/useAssistantToolUI.js";
10
+ export { useAssistantDataUI, type AssistantDataUIProps, } from "./model-context/useAssistantDataUI.js";
11
+ export { useInlineRender } from "./model-context/useInlineRender.js";
12
+ export { type Toolkit, type ToolDefinition, type ToolkitDefinition, type ToolkitDefinitionEntry, type ToolCallText, } from "./model-context/toolbox.js";
13
+ export { defineToolkit } from "./model-context/define-toolkit.js";
14
+ export { stubTool } from "./model-context/stub-tool.js";
15
+ export { externalTool } from "./model-context/external-tool.js";
16
+ export { useAuiToolOverrides } from "./model-context/useAuiToolOverrides.js";
17
+ export { hitl, hitlTool, humanTool } from "./model-context/human-tool.js";
18
+ export { providerTool, type ProviderToolConfig, } from "./model-context/provider-tool.js";
19
+ export { defineMcpToolkit, type McpToolkitEntry, type McpToolkitDefinition, type McpToolkitToolConfig, } from "./model-context/define-mcp-toolkit.js";
20
+ /**
21
+ * @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API.
22
+ * Scheduled for removal on/after 2026-09-14. See
23
+ * {@link https://www.assistant-ui.com/docs/tools/interactables#migrating-from-the-previous-api | Interactables migration guide}.
24
+ */
25
+ export { useAssistantInteractable, type AssistantInteractableProps, } from "./interactables-legacy/useAssistantInteractable.js";
26
+ /**
27
+ * @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API.
28
+ * Scheduled for removal on/after 2026-09-14. See
29
+ * {@link https://www.assistant-ui.com/docs/tools/interactables#migrating-from-the-previous-api | Interactables migration guide}.
30
+ */
31
+ export { useInteractableState } from "./interactables-legacy/useInteractableState.js";
32
+ export {
33
+ /** @deprecated Unstable / Experimental — may change in any release. */
34
+ unstable_useInteractable, type Unstable_InteractableConfig, type Unstable_InferInteractableState, type Unstable_InteractableVersionInfo, } from "./model-context/useInteractable.js";
35
+ export {
36
+ /** @deprecated Unstable / Experimental — may change in any release. */
37
+ unstable_useInteractableState, } from "./model-context/useInteractableState.js";
38
+ export {
39
+ /** @deprecated Unstable / Experimental — may change in any release. */
40
+ unstable_useInteractableVersions, } from "./model-context/useInteractableVersions.js";
41
+ export {
42
+ /** @deprecated Unstable / Experimental — may change in any release. */
43
+ unstable_interactableTool, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, } from "./model-context/interactableTool.js";
44
+ export { useToolArgsStatus, type ToolArgsStatus, } from "./model-context/useToolArgsStatus.js";
45
+ export { Tools, type McpAppResourceOutput } from "./client/Tools.js";
46
+ export { DataRenderers } from "./client/DataRenderers.js";
47
+ /**
48
+ * @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API.
49
+ * Scheduled for removal on/after 2026-09-14. See
50
+ * {@link https://www.assistant-ui.com/docs/tools/interactables#migrating-from-the-previous-api | Interactables migration guide}.
51
+ */
52
+ export { Interactables } from "./interactables-legacy/Interactables.js";
53
+ export {
54
+ /** @deprecated Unstable / Experimental — may change in any release. */
55
+ unstable_Interactables, } from "./client/Interactables.js";
56
+ export type { EmptyMessagePartComponent, EmptyMessagePartProps, TextMessagePartComponent, TextMessagePartProps, ReasoningMessagePartComponent, ReasoningMessagePartProps, SourceMessagePartComponent, SourceMessagePartProps, ImageMessagePartComponent, ImageMessagePartProps, FileMessagePartComponent, FileMessagePartProps, Unstable_AudioMessagePartComponent, Unstable_AudioMessagePartProps, DataMessagePartComponent, DataMessagePartProps, ToolCallMessagePartComponent, ToolCallMessagePartProps, ReasoningGroupProps, ReasoningGroupComponent, QuoteMessagePartComponent, QuoteMessagePartProps, GenerativeUIComponentRegistry, GenerativeUIMessagePartComponent, GenerativeUIMessagePartProps, GenerativeUIRenderProps, } from "./types/MessagePartComponentTypes.js";
57
+ export type { ToolsState, ToolsMethods, ToolsClientSchema, } from "./types/scopes/tools.js";
58
+ export type { DataRenderersState, DataRenderersMethods, DataRenderersClientSchema, } from "./types/scopes/dataRenderers.js";
59
+ export type {
60
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
61
+ InteractableStateSchema,
62
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
63
+ InteractablesState,
64
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
65
+ InteractableDefinition,
66
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
67
+ InteractableRegistration,
68
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
69
+ InteractablesMethods,
70
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
71
+ InteractablePersistedState,
72
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
73
+ InteractablePersistenceAdapter,
74
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
75
+ InteractablePersistenceStatus,
76
+ /** @deprecated Since 2026-06-14 — migrate to the Unstable / Experimental API. */
77
+ InteractablesClientSchema, } from "./interactables-legacy/scopes.js";
78
+ export type { Unstable_InteractableStateSchema, Unstable_InteractablesState, Unstable_InteractableDefinition, Unstable_InteractableRegistration, Unstable_InteractablesMethods, Unstable_InteractablePersistedState, Unstable_InteractablePersistenceAdapter, Unstable_InteractablePersistenceStatus, Unstable_InteractablesClientSchema, Unstable_InteractablesConfig, } from "./types/scopes/interactables.js";
79
+ export { MessageAttachmentByIndexProvider, ComposerAttachmentByIndexProvider, } from "./providers/AttachmentByIndexProvider.js";
80
+ export { ThreadListItemRuntimeProvider } from "./providers/ThreadListItemRuntimeProvider.js";
81
+ export { MessageByIndexProvider } from "./providers/MessageByIndexProvider.js";
82
+ export { PartByIndexProvider } from "./providers/PartByIndexProvider.js";
83
+ export { TextMessagePartProvider } from "./providers/TextMessagePartProvider.js";
84
+ export { ChainOfThoughtByIndicesProvider } from "./providers/ChainOfThoughtByIndicesProvider.js";
85
+ export { ThreadListItemByIndexProvider } from "./providers/ThreadListItemByIndexProvider.js";
86
+ export { ChainOfThoughtPartByIndexProvider } from "./providers/ChainOfThoughtPartByIndexProvider.js";
87
+ export { SuggestionByIndexProvider, type SuggestionByIndexProviderProps, } from "./providers/SuggestionByIndexProvider.js";
88
+ export { QueueItemByIndexProvider, type QueueItemByIndexProviderProps, } from "./providers/QueueItemByIndexProvider.js";
89
+ export { ReadonlyThreadProvider } from "./providers/ReadonlyThreadProvider.js";
90
+ export { RuntimeAdapter } from "./RuntimeAdapter.js";
91
+ export { RuntimeAdapterProvider, useRuntimeAdapters, type RuntimeAdapters, } from "./runtimes/RuntimeAdapterProvider.js";
92
+ export { useExternalStoreRuntime } from "./runtimes/useExternalStoreRuntime.js";
93
+ export { useExternalStoreSharedOptions } from "./runtimes/useExternalStoreSharedOptions.js";
94
+ export { useExternalMessageConverter, convertExternalMessages, createExternalMessageConversionCache, } from "./runtimes/external-message-converter.js";
95
+ export type { ExternalMessageConversionCache, JoinStrategy, } from "./runtimes/external-message-converter.js";
96
+ export { createMessageConverter } from "./runtimes/createMessageConverter.js";
97
+ export { useStreamingTiming, type StreamingTimingAccessors, type StreamingTimingOptions, type StreamingTimingState, } from "./runtimes/useStreamingTiming.js";
98
+ export { createRuntimeExtras, unstable_createRuntimeExtrasFromBrand, type RuntimeExtras, } from "./runtimes/createRuntimeExtras.js";
99
+ export { RemoteThreadListHookInstanceManager } from "./runtimes/RemoteThreadListHookInstanceManager.js";
100
+ export { RemoteThreadListThreadListRuntimeCore } from "./runtimes/RemoteThreadListThreadListRuntimeCore.js";
101
+ export { useRemoteThreadListRuntime } from "./runtimes/useRemoteThreadListRuntime.js";
102
+ export { useCloudThreadListAdapter } from "./runtimes/cloud/useCloudThreadListAdapter.js";
103
+ export { createCloudThreadListAdapter, type CloudThreadListAdapterOptions, } from "./runtimes/cloud/createCloudThreadListAdapter.js";
104
+ export { useCloudThreadListRuntime } from "./runtimes/cloud/useCloudThreadListRuntime.js";
105
+ export { useAssistantTransportRuntime, useAssistantTransportSendCommand, useAssistantTransportState, } from "./runtimes/assistant-transport/useAssistantTransportRuntime.js";
106
+ export type { AssistantTransportConnectionMetadata, AssistantTransportCommand, AssistantTransportOptions, AssistantTransportProtocol, SendCommandsRequestBody, } from "./runtimes/assistant-transport/types.js";
107
+ export { useAssistantCloudThreadHistoryAdapter } from "./runtimes/cloud/AssistantCloudThreadHistoryAdapter.js";
108
+ export { CloudFileAttachmentAdapter } from "./runtimes/cloud/CloudFileAttachmentAdapter.js";
109
+ export { createLocalStorageAdapter, type AsyncStorageLike, } from "./adapters/LocalStorageThreadListAdapter.js";
110
+ export { createSimpleTitleAdapter, type TitleGenerationAdapter, } from "./adapters/TitleGenerationAdapter.js";
111
+ export { AssistantProviderBase, getRenderComponent, type AssistantProviderBaseProps, } from "./AssistantProvider.js";
112
+ export { ThreadPrimitiveMessages, ThreadPrimitiveMessagesImpl, ThreadPrimitiveMessageByIndex, ThreadPrimitiveUnstable_MessageById, } from "./primitives/thread/ThreadMessages.js";
113
+ export { MessagePrimitiveParts, MessagePartComponent, MessagePrimitivePartByIndex, defaultComponents as messagePartsDefaultComponents, type EnrichedPartState, type PartState, } from "./primitives/message/MessageParts.js";
114
+ export { MessagePrimitiveGroupedParts } from "./primitives/message/MessageGroupedParts.js";
115
+ export { groupPartByType, type GroupByContext } from "./utils/groupParts.js";
116
+ export { MessagePrimitiveGenerativeUI, GenerativeUIRender, GenerativeUIRenderError, } from "./primitives/generativeUI/GenerativeUI.js";
117
+ export { MessagePrimitiveQuote } from "./primitives/message/MessageQuote.js";
118
+ export { MessagePrimitiveAttachments, MessagePrimitiveAttachmentByIndex, } from "./primitives/message/MessageAttachments.js";
119
+ export { ComposerPrimitiveAttachments, ComposerPrimitiveAttachmentByIndex, } from "./primitives/composer/ComposerAttachments.js";
120
+ export { ComposerPrimitiveQueue } from "./primitives/composer/ComposerQueue.js";
121
+ export { ThreadListPrimitiveItems, ThreadListPrimitiveItemByIndex, } from "./primitives/threadList/ThreadListItems.js";
122
+ export { ChainOfThoughtPrimitiveParts } from "./primitives/chainOfThought/ChainOfThoughtParts.js";
123
+ export { PartPrimitiveMessages, PartPrimitiveMessagesImpl, } from "./primitives/part/PartMessages.js";
124
+ export { MessagePartPrimitiveInProgress } from "./primitives/messagePart/MessagePartInProgress.js";
125
+ export { ThreadListItemPrimitiveTitle } from "./primitives/threadListItem/ThreadListItemTitle.js";
126
+ export { ThreadPrimitiveSuggestions, ThreadPrimitiveSuggestionsImpl, ThreadPrimitiveSuggestionByIndex, } from "./primitives/thread/ThreadSuggestions.js";
127
+ export { ComposerPrimitiveIf, type UseComposerIfProps, } from "./primitives/composer/ComposerIf.js";
128
+ export { getMessageQuote } from "./utils/getMessageQuote.js";
129
+ export { useThreadMessages } from "./primitive-hooks/useThreadMessages.js";
130
+ export { unstable_useThreadMessageIds } from "./primitive-hooks/useThreadMessageIds.js";
131
+ export { useThreadIsRunning } from "./primitive-hooks/useThreadIsRunning.js";
132
+ export { useThreadIsEmpty } from "./primitive-hooks/useThreadIsEmpty.js";
133
+ export { useComposerSend } from "./primitive-hooks/useComposerSend.js";
134
+ export { useComposerCancel } from "./primitive-hooks/useComposerCancel.js";
135
+ export { useComposerDictate } from "./primitive-hooks/useComposerDictate.js";
136
+ export { useComposerAddAttachment } from "./primitive-hooks/useComposerAddAttachment.js";
137
+ export { useMessageReload } from "./primitive-hooks/useMessageReload.js";
138
+ export { useMessageBranching } from "./primitive-hooks/useMessageBranching.js";
139
+ export { useActionBarCopy, type UseActionBarCopyOptions, } from "./primitive-hooks/useActionBarCopy.js";
140
+ export { useActionBarEdit } from "./primitive-hooks/useActionBarEdit.js";
141
+ export { useActionBarReload } from "./primitive-hooks/useActionBarReload.js";
142
+ export { useActionBarFeedbackPositive, useActionBarFeedbackNegative, } from "./primitive-hooks/useActionBarFeedback.js";
143
+ export { useActionBarSpeak } from "./primitive-hooks/useActionBarSpeak.js";
144
+ export { useActionBarStopSpeaking } from "./primitive-hooks/useActionBarStopSpeaking.js";
145
+ export { useVoiceState, useVoiceVolume, useVoiceControls, } from "./primitive-hooks/useVoice.js";
146
+ export { useBranchPickerNext } from "./primitive-hooks/useBranchPickerNext.js";
147
+ export { useBranchPickerPrevious } from "./primitive-hooks/useBranchPickerPrevious.js";
148
+ export { useSuggestionTrigger, type UseSuggestionTriggerOptions, } from "./primitive-hooks/useSuggestionTrigger.js";
149
+ export { useThreadListItemArchive } from "./primitive-hooks/useThreadListItemArchive.js";
150
+ export { useThreadListItemDelete } from "./primitive-hooks/useThreadListItemDelete.js";
151
+ export { useThreadListItemUnarchive } from "./primitive-hooks/useThreadListItemUnarchive.js";
152
+ export { useThreadListItemTrigger } from "./primitive-hooks/useThreadListItemTrigger.js";
153
+ export { useThreadListNew } from "./primitive-hooks/useThreadListNew.js";
154
+ export { useThreadListLoadMore } from "./primitive-hooks/useThreadListLoadMore.js";
155
+ export { useEditComposerCancel } from "./primitive-hooks/useEditComposerCancel.js";
156
+ export { useEditComposerSend } from "./primitive-hooks/useEditComposerSend.js";
157
+ export { useMessageError } from "./primitive-hooks/useMessageError.js";
158
+ export { AssistantRuntimeProvider } from "./AssistantRuntimeProvider.js";
159
+ export { useLocalRuntime, splitLocalRuntimeOptions, type LocalRuntimeOptions, } from "./runtimes/useLocalRuntime.js";
160
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":";;AAIA,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,GACnB,6CAA0C;AAC3C,OAAO,EACL,KAAK,eAAe,EACpB,mBAAmB,GACpB,+CAA4C;AAC7C,OAAO,EACL,KAAK,eAAe,EACpB,mBAAmB,GACpB,+CAA4C;AAC7C,OAAO,EAAE,wBAAwB,EAAE,oDAAiD;AACpF,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,+CAA4C;AAC7C,OAAO,EACL,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,4CAAyC;AAC1C,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,GAC1B,8CAA2C;AAC5C,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,GAC1B,8CAA2C;AAC5C,OAAO,EAAE,eAAe,EAAE,2CAAwC;AAClE,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GAClB,mCAAgC;AACjC,OAAO,EAAE,aAAa,EAAE,0CAAuC;AAC/D,OAAO,EAAE,QAAQ,EAAE,qCAAkC;AACrD,OAAO,EAAE,YAAY,EAAE,yCAAsC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,+CAA4C;AAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,sCAAmC;AACvE,OAAO,EACL,YAAY,EACZ,KAAK,kBAAkB,GACxB,yCAAsC;AACvC,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,8CAA2C;AAC5C;;;;GAIG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