@assistant-ui/core 0.3.20 → 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 (905) hide show
  1. package/dist/adapters/attachment.d.ts +42 -34
  2. package/dist/adapters/attachment.d.ts.map +1 -1
  3. package/dist/adapters/attachment.js +51 -21
  4. package/dist/adapters/attachment.js.map +1 -1
  5. package/dist/adapters/directive-formatter.d.ts +1 -3
  6. package/dist/adapters/directive-formatter.d.ts.map +1 -1
  7. package/dist/adapters/feedback.d.ts +6 -7
  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 +57 -58
  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 +14 -16
  17. package/dist/adapters/suggestion.d.ts.map +1 -1
  18. package/dist/adapters/thread-history.d.ts +54 -51
  19. package/dist/adapters/thread-history.d.ts.map +1 -1
  20. package/dist/adapters/trigger.d.ts +7 -9
  21. package/dist/adapters/trigger.d.ts.map +1 -1
  22. package/dist/adapters/voice.d.ts +46 -40
  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 +0 -2
  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 +19 -21
  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 +27 -28
  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 +19 -21
  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 +42 -29
  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 +6 -8
  54. package/dist/model-context/registry-handles.d.ts.map +1 -1
  55. package/dist/model-context/registry.d.ts +14 -16
  56. package/dist/model-context/registry.d.ts.map +1 -1
  57. package/dist/model-context/tool-call-text.d.ts +13 -14
  58. package/dist/model-context/tool-call-text.d.ts.map +1 -1
  59. package/dist/model-context/tool.d.ts +10 -11
  60. package/dist/model-context/tool.d.ts.map +1 -1
  61. package/dist/model-context/types.d.ts +32 -34
  62. package/dist/model-context/types.d.ts.map +1 -1
  63. package/dist/react/AssistantProvider.d.ts +6 -8
  64. package/dist/react/AssistantProvider.d.ts.map +1 -1
  65. package/dist/react/AssistantRuntimeProvider.d.ts +23 -25
  66. package/dist/react/AssistantRuntimeProvider.d.ts.map +1 -1
  67. package/dist/react/RuntimeAdapter.d.ts +2 -5
  68. package/dist/react/RuntimeAdapter.d.ts.map +1 -1
  69. package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts +24 -18
  70. package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts.map +1 -1
  71. package/dist/react/adapters/LocalStorageThreadListAdapter.js +58 -25
  72. package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
  73. package/dist/react/adapters/TitleGenerationAdapter.d.ts +2 -4
  74. package/dist/react/adapters/TitleGenerationAdapter.d.ts.map +1 -1
  75. package/dist/react/client/AdaptedRemoteThread.d.ts +5 -7
  76. package/dist/react/client/AdaptedRemoteThread.d.ts.map +1 -1
  77. package/dist/react/client/DataRenderers.d.ts +1 -3
  78. package/dist/react/client/DataRenderers.d.ts.map +1 -1
  79. package/dist/react/client/InMemoryThreadList.d.ts +6 -8
  80. package/dist/react/client/InMemoryThreadList.d.ts.map +1 -1
  81. package/dist/react/client/Interactables.d.ts +2 -4
  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 +32 -34
  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 +9 -11
  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 -10
  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 +1 -3
  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 -8
  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 +33 -36
  109. package/dist/react/interactables-legacy/scopes.d.ts.map +1 -1
  110. package/dist/react/interactables-legacy/useAssistantInteractable.d.ts +6 -8
  111. package/dist/react/interactables-legacy/useAssistantInteractable.d.ts.map +1 -1
  112. package/dist/react/interactables-legacy/useInteractableState.d.ts +6 -7
  113. package/dist/react/interactables-legacy/useInteractableState.d.ts.map +1 -1
  114. package/dist/react/interactables-shared/useInteractablePersistenceQueue.d.ts +23 -13
  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 +11 -13
  119. package/dist/react/model-context/define-mcp-toolkit.d.ts.map +1 -1
  120. package/dist/react/model-context/define-toolkit.d.ts +12 -4
  121. package/dist/react/model-context/define-toolkit.d.ts.map +1 -1
  122. package/dist/react/model-context/external-tool.d.ts +0 -2
  123. package/dist/react/model-context/external-tool.d.ts.map +1 -1
  124. package/dist/react/model-context/human-tool.d.ts +0 -2
  125. package/dist/react/model-context/human-tool.d.ts.map +1 -1
  126. package/dist/react/model-context/interactableTool.d.ts +23 -25
  127. package/dist/react/model-context/interactableTool.d.ts.map +1 -1
  128. package/dist/react/model-context/makeAssistantDataUI.d.ts +4 -6
  129. package/dist/react/model-context/makeAssistantDataUI.d.ts.map +1 -1
  130. package/dist/react/model-context/makeAssistantTool.d.ts +4 -6
  131. package/dist/react/model-context/makeAssistantTool.d.ts.map +1 -1
  132. package/dist/react/model-context/makeAssistantToolUI.d.ts +4 -6
  133. package/dist/react/model-context/makeAssistantToolUI.d.ts.map +1 -1
  134. package/dist/react/model-context/provider-tool.d.ts +3 -4
  135. package/dist/react/model-context/provider-tool.d.ts.map +1 -1
  136. package/dist/react/model-context/stub-tool.d.ts +0 -2
  137. package/dist/react/model-context/stub-tool.d.ts.map +1 -1
  138. package/dist/react/model-context/toolbox.d.ts +37 -24
  139. package/dist/react/model-context/toolbox.d.ts.map +1 -1
  140. package/dist/react/model-context/useAssistantContext.d.ts +2 -5
  141. package/dist/react/model-context/useAssistantContext.d.ts.map +1 -1
  142. package/dist/react/model-context/useAssistantDataUI.d.ts +5 -7
  143. package/dist/react/model-context/useAssistantDataUI.d.ts.map +1 -1
  144. package/dist/react/model-context/useAssistantInstructions.d.ts +2 -5
  145. package/dist/react/model-context/useAssistantInstructions.d.ts.map +1 -1
  146. package/dist/react/model-context/useAssistantTool.d.ts +8 -11
  147. package/dist/react/model-context/useAssistantTool.d.ts.map +1 -1
  148. package/dist/react/model-context/useAssistantToolUI.d.ts +11 -13
  149. package/dist/react/model-context/useAssistantToolUI.d.ts.map +1 -1
  150. package/dist/react/model-context/useAuiToolOverrides.d.ts +2 -3
  151. package/dist/react/model-context/useAuiToolOverrides.d.ts.map +1 -1
  152. package/dist/react/model-context/useInlineRender.d.ts +2 -4
  153. package/dist/react/model-context/useInlineRender.d.ts.map +1 -1
  154. package/dist/react/model-context/useInteractable.d.ts +37 -36
  155. package/dist/react/model-context/useInteractable.d.ts.map +1 -1
  156. package/dist/react/model-context/useInteractableState.d.ts +10 -8
  157. package/dist/react/model-context/useInteractableState.d.ts.map +1 -1
  158. package/dist/react/model-context/useInteractableVersions.d.ts +3 -5
  159. package/dist/react/model-context/useInteractableVersions.d.ts.map +1 -1
  160. package/dist/react/model-context/useToolArgsStatus.d.ts +5 -6
  161. package/dist/react/model-context/useToolArgsStatus.d.ts.map +1 -1
  162. package/dist/react/primitive-hooks/useActionBarCopy.d.ts +6 -8
  163. package/dist/react/primitive-hooks/useActionBarCopy.d.ts.map +1 -1
  164. package/dist/react/primitive-hooks/useActionBarEdit.d.ts +2 -4
  165. package/dist/react/primitive-hooks/useActionBarEdit.d.ts.map +1 -1
  166. package/dist/react/primitive-hooks/useActionBarFeedback.d.ts +4 -6
  167. package/dist/react/primitive-hooks/useActionBarFeedback.d.ts.map +1 -1
  168. package/dist/react/primitive-hooks/useActionBarReload.d.ts +2 -4
  169. package/dist/react/primitive-hooks/useActionBarReload.d.ts.map +1 -1
  170. package/dist/react/primitive-hooks/useActionBarSpeak.d.ts +2 -4
  171. package/dist/react/primitive-hooks/useActionBarSpeak.d.ts.map +1 -1
  172. package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts +2 -4
  173. package/dist/react/primitive-hooks/useActionBarStopSpeaking.d.ts.map +1 -1
  174. package/dist/react/primitive-hooks/useBranchPickerNext.d.ts +2 -4
  175. package/dist/react/primitive-hooks/useBranchPickerNext.d.ts.map +1 -1
  176. package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts +2 -4
  177. package/dist/react/primitive-hooks/useBranchPickerPrevious.d.ts.map +1 -1
  178. package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts +3 -5
  179. package/dist/react/primitive-hooks/useComposerAddAttachment.d.ts.map +1 -1
  180. package/dist/react/primitive-hooks/useComposerCancel.d.ts +2 -4
  181. package/dist/react/primitive-hooks/useComposerCancel.d.ts.map +1 -1
  182. package/dist/react/primitive-hooks/useComposerDictate.d.ts +2 -4
  183. package/dist/react/primitive-hooks/useComposerDictate.d.ts.map +1 -1
  184. package/dist/react/primitive-hooks/useComposerSend.d.ts +3 -5
  185. package/dist/react/primitive-hooks/useComposerSend.d.ts.map +1 -1
  186. package/dist/react/primitive-hooks/useEditComposerCancel.d.ts +1 -3
  187. package/dist/react/primitive-hooks/useEditComposerCancel.d.ts.map +1 -1
  188. package/dist/react/primitive-hooks/useEditComposerSend.d.ts +2 -4
  189. package/dist/react/primitive-hooks/useEditComposerSend.d.ts.map +1 -1
  190. package/dist/react/primitive-hooks/useMessageBranching.d.ts +4 -6
  191. package/dist/react/primitive-hooks/useMessageBranching.d.ts.map +1 -1
  192. package/dist/react/primitive-hooks/useMessageError.d.ts +0 -2
  193. package/dist/react/primitive-hooks/useMessageError.d.ts.map +1 -1
  194. package/dist/react/primitive-hooks/useMessageReload.d.ts +2 -4
  195. package/dist/react/primitive-hooks/useMessageReload.d.ts.map +1 -1
  196. package/dist/react/primitive-hooks/useSuggestionTrigger.d.ts +6 -8
  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 +0 -2
  201. package/dist/react/primitive-hooks/useThreadIsEmpty.d.ts.map +1 -1
  202. package/dist/react/primitive-hooks/useThreadIsRunning.d.ts +0 -2
  203. package/dist/react/primitive-hooks/useThreadIsRunning.d.ts.map +1 -1
  204. package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts +1 -3
  205. package/dist/react/primitive-hooks/useThreadListItemArchive.d.ts.map +1 -1
  206. package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts +1 -3
  207. package/dist/react/primitive-hooks/useThreadListItemDelete.d.ts.map +1 -1
  208. package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts +1 -3
  209. package/dist/react/primitive-hooks/useThreadListItemTrigger.d.ts.map +1 -1
  210. package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts +1 -3
  211. package/dist/react/primitive-hooks/useThreadListItemUnarchive.d.ts.map +1 -1
  212. package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts +2 -4
  213. package/dist/react/primitive-hooks/useThreadListLoadMore.d.ts.map +1 -1
  214. package/dist/react/primitive-hooks/useThreadListNew.d.ts +1 -3
  215. package/dist/react/primitive-hooks/useThreadListNew.d.ts.map +1 -1
  216. package/dist/react/primitive-hooks/useThreadMessageIds.d.ts +0 -2
  217. package/dist/react/primitive-hooks/useThreadMessageIds.d.ts.map +1 -1
  218. package/dist/react/primitive-hooks/useThreadMessages.d.ts +1 -3
  219. package/dist/react/primitive-hooks/useThreadMessages.d.ts.map +1 -1
  220. package/dist/react/primitive-hooks/useVoice.d.ts +5 -7
  221. package/dist/react/primitive-hooks/useVoice.d.ts.map +1 -1
  222. package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts +25 -26
  223. package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.d.ts.map +1 -1
  224. package/dist/react/primitives/composer/ComposerAttachments.d.ts +22 -23
  225. package/dist/react/primitives/composer/ComposerAttachments.d.ts.map +1 -1
  226. package/dist/react/primitives/composer/ComposerIf.d.ts +10 -9
  227. package/dist/react/primitives/composer/ComposerIf.d.ts.map +1 -1
  228. package/dist/react/primitives/composer/ComposerQueue.d.ts +11 -14
  229. package/dist/react/primitives/composer/ComposerQueue.d.ts.map +1 -1
  230. package/dist/react/primitives/generativeUI/GenerativeUI.d.ts +26 -28
  231. package/dist/react/primitives/generativeUI/GenerativeUI.d.ts.map +1 -1
  232. package/dist/react/primitives/generativeUI/GenerativeUI.js +16 -6
  233. package/dist/react/primitives/generativeUI/GenerativeUI.js.map +1 -1
  234. package/dist/react/primitives/message/MessageAttachments.d.ts +26 -23
  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 +120 -117
  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 +199 -185
  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 +6 -8
  247. package/dist/react/primitives/message/MessageQuote.d.ts.map +1 -1
  248. package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts +2 -4
  249. package/dist/react/primitives/messagePart/MessagePartInProgress.d.ts.map +1 -1
  250. package/dist/react/primitives/part/PartMessages.d.ts +13 -15
  251. package/dist/react/primitives/part/PartMessages.d.ts.map +1 -1
  252. package/dist/react/primitives/thread/ThreadMessages.d.ts +54 -56
  253. package/dist/react/primitives/thread/ThreadMessages.d.ts.map +1 -1
  254. package/dist/react/primitives/thread/ThreadSuggestions.d.ts +20 -21
  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 +22 -23
  259. package/dist/react/primitives/threadList/ThreadListItems.d.ts.map +1 -1
  260. package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts +4 -6
  261. package/dist/react/primitives/threadListItem/ThreadListItemTitle.d.ts.map +1 -1
  262. package/dist/react/providers/AttachmentByIndexProvider.d.ts +3 -5
  263. package/dist/react/providers/AttachmentByIndexProvider.d.ts.map +1 -1
  264. package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts +3 -5
  265. package/dist/react/providers/ChainOfThoughtByIndicesProvider.d.ts.map +1 -1
  266. package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts +2 -4
  267. package/dist/react/providers/ChainOfThoughtPartByIndexProvider.d.ts.map +1 -1
  268. package/dist/react/providers/MessageByIdProvider.d.ts +2 -4
  269. package/dist/react/providers/MessageByIdProvider.d.ts.map +1 -1
  270. package/dist/react/providers/MessageByIndexProvider.d.ts +2 -4
  271. package/dist/react/providers/MessageByIndexProvider.d.ts.map +1 -1
  272. package/dist/react/providers/PartByIndexProvider.d.ts +2 -4
  273. package/dist/react/providers/PartByIndexProvider.d.ts.map +1 -1
  274. package/dist/react/providers/QueueItemByIndexProvider.d.ts +2 -4
  275. package/dist/react/providers/QueueItemByIndexProvider.d.ts.map +1 -1
  276. package/dist/react/providers/ReadonlyThreadProvider.d.ts +5 -7
  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 +2 -4
  280. package/dist/react/providers/SuggestionByIndexProvider.d.ts.map +1 -1
  281. package/dist/react/providers/TextMessagePartProvider.d.ts +3 -5
  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 +3 -5
  286. package/dist/react/providers/ThreadListItemByIndexProvider.d.ts.map +1 -1
  287. package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts +3 -6
  288. package/dist/react/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -1
  289. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts +209 -219
  290. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
  291. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +53 -39
  292. package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
  293. package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +185 -196
  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 +14 -19
  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 +8 -9
  302. package/dist/react/runtimes/RuntimeAdapterProvider.d.ts.map +1 -1
  303. package/dist/react/runtimes/assistant-transport/commandQueue.d.ts +9 -11
  304. package/dist/react/runtimes/assistant-transport/commandQueue.d.ts.map +1 -1
  305. package/dist/react/runtimes/assistant-transport/replayBoundaryStream.d.ts +4 -5
  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 +7 -9
  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 +106 -100
  314. package/dist/react/runtimes/assistant-transport/types.d.ts.map +1 -1
  315. package/dist/react/runtimes/assistant-transport/useAssistantTransportRuntime.d.ts +3 -5
  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 +2 -4
  320. package/dist/react/runtimes/assistant-transport/useConvertedState.d.ts.map +1 -1
  321. package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts +1 -3
  322. package/dist/react/runtimes/assistant-transport/useLatestRef.d.ts.map +1 -1
  323. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts +5 -7
  324. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
  325. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js +410 -213
  326. package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
  327. package/dist/react/runtimes/cloud/CloudFileAttachmentAdapter.d.ts +14 -16
  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 +136 -123
  332. package/dist/react/runtimes/cloud/auiV0.d.ts.map +1 -1
  333. package/dist/react/runtimes/cloud/auiV0.js +60 -9
  334. package/dist/react/runtimes/cloud/auiV0.js.map +1 -1
  335. package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts +9 -10
  336. package/dist/react/runtimes/cloud/createCloudThreadListAdapter.d.ts.map +1 -1
  337. package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts +4 -5
  338. package/dist/react/runtimes/cloud/createCloudThreadListAdapterCreateFallback.d.ts.map +1 -1
  339. package/dist/react/runtimes/cloud/sdkIdentity.d.ts +1 -3
  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 +2 -4
  343. package/dist/react/runtimes/cloud/useCloudThreadListAdapter.d.ts.map +1 -1
  344. package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts +8 -9
  345. package/dist/react/runtimes/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
  346. package/dist/react/runtimes/createMessageConverter.d.ts +14 -17
  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 +11 -13
  350. package/dist/react/runtimes/createRuntimeExtras.d.ts.map +1 -1
  351. package/dist/react/runtimes/external-message-converter.d.ts +14 -18
  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 +2 -4
  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 +1 -3
  362. package/dist/react/runtimes/useExternalStoreSharedOptions.d.ts.map +1 -1
  363. package/dist/react/runtimes/useLocalRuntime.d.ts +26 -37
  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 +2 -4
  368. package/dist/react/runtimes/useRemoteThreadListRuntime.d.ts.map +1 -1
  369. package/dist/react/runtimes/useRuntimeAdapters.d.ts +1 -3
  370. package/dist/react/runtimes/useRuntimeAdapters.d.ts.map +1 -1
  371. package/dist/react/runtimes/useStreamingTiming.d.ts +3 -5
  372. package/dist/react/runtimes/useStreamingTiming.d.ts.map +1 -1
  373. package/dist/react/types/MessagePartComponentTypes.d.ts +46 -43
  374. package/dist/react/types/MessagePartComponentTypes.d.ts.map +1 -1
  375. package/dist/react/types/scopes/dataRenderers.d.ts +8 -11
  376. package/dist/react/types/scopes/dataRenderers.d.ts.map +1 -1
  377. package/dist/react/types/scopes/interactables.d.ts +50 -49
  378. package/dist/react/types/scopes/interactables.d.ts.map +1 -1
  379. package/dist/react/types/scopes/tools.d.ts +17 -19
  380. package/dist/react/types/scopes/tools.d.ts.map +1 -1
  381. package/dist/react/types/store-augmentation.d.ts +10 -11
  382. package/dist/react/types/store-augmentation.d.ts.map +1 -1
  383. package/dist/react/utils/getMessageQuote.d.ts +5 -6
  384. package/dist/react/utils/getMessageQuote.d.ts.map +1 -1
  385. package/dist/react/utils/groupParts.d.ts +28 -29
  386. package/dist/react/utils/groupParts.d.ts.map +1 -1
  387. package/dist/react/utils/useJSONEqual.d.ts +1 -3
  388. package/dist/react/utils/useJSONEqual.d.ts.map +1 -1
  389. package/dist/react/utils/useJSONSchemaDependency.d.ts +2 -4
  390. package/dist/react/utils/useJSONSchemaDependency.d.ts.map +1 -1
  391. package/dist/runtime/api/assistant-runtime.d.ts +26 -28
  392. package/dist/runtime/api/assistant-runtime.d.ts.map +1 -1
  393. package/dist/runtime/api/attachment-runtime.d.ts +46 -43
  394. package/dist/runtime/api/attachment-runtime.d.ts.map +1 -1
  395. package/dist/runtime/api/attachment-runtime.js.map +1 -1
  396. package/dist/runtime/api/bindings.d.ts +31 -30
  397. package/dist/runtime/api/bindings.d.ts.map +1 -1
  398. package/dist/runtime/api/composer-runtime.d.ts +207 -193
  399. package/dist/runtime/api/composer-runtime.d.ts.map +1 -1
  400. package/dist/runtime/api/composer-runtime.js +4 -0
  401. package/dist/runtime/api/composer-runtime.js.map +1 -1
  402. package/dist/runtime/api/message-part-runtime.d.ts +28 -26
  403. package/dist/runtime/api/message-part-runtime.d.ts.map +1 -1
  404. package/dist/runtime/api/message-part-runtime.js +22 -0
  405. package/dist/runtime/api/message-part-runtime.js.map +1 -1
  406. package/dist/runtime/api/message-runtime.d.ts +87 -84
  407. package/dist/runtime/api/message-runtime.d.ts.map +1 -1
  408. package/dist/runtime/api/message-runtime.js +1 -1
  409. package/dist/runtime/api/message-runtime.js.map +1 -1
  410. package/dist/runtime/api/paths.d.ts +48 -50
  411. package/dist/runtime/api/paths.d.ts.map +1 -1
  412. package/dist/runtime/api/thread-list-item-runtime.d.ts +64 -66
  413. package/dist/runtime/api/thread-list-item-runtime.d.ts.map +1 -1
  414. package/dist/runtime/api/thread-list-item-runtime.js.map +1 -1
  415. package/dist/runtime/api/thread-list-runtime.d.ts +73 -76
  416. package/dist/runtime/api/thread-list-runtime.d.ts.map +1 -1
  417. package/dist/runtime/api/thread-list-runtime.js.map +1 -1
  418. package/dist/runtime/api/thread-runtime.d.ts +299 -300
  419. package/dist/runtime/api/thread-runtime.d.ts.map +1 -1
  420. package/dist/runtime/api/thread-runtime.js +2 -1
  421. package/dist/runtime/api/thread-runtime.js.map +1 -1
  422. package/dist/runtime/base/base-assistant-runtime-core.d.ts +8 -10
  423. package/dist/runtime/base/base-assistant-runtime-core.d.ts.map +1 -1
  424. package/dist/runtime/base/base-composer-runtime-core.d.ts +149 -99
  425. package/dist/runtime/base/base-composer-runtime-core.d.ts.map +1 -1
  426. package/dist/runtime/base/base-composer-runtime-core.js +400 -122
  427. package/dist/runtime/base/base-composer-runtime-core.js.map +1 -1
  428. package/dist/runtime/base/base-thread-runtime-core.d.ts +120 -108
  429. package/dist/runtime/base/base-thread-runtime-core.d.ts.map +1 -1
  430. package/dist/runtime/base/base-thread-runtime-core.js +109 -41
  431. package/dist/runtime/base/base-thread-runtime-core.js.map +1 -1
  432. package/dist/runtime/base/default-edit-composer-runtime-core.d.ts +29 -29
  433. package/dist/runtime/base/default-edit-composer-runtime-core.d.ts.map +1 -1
  434. package/dist/runtime/base/default-edit-composer-runtime-core.js +10 -1
  435. package/dist/runtime/base/default-edit-composer-runtime-core.js.map +1 -1
  436. package/dist/runtime/base/default-thread-composer-runtime-core.d.ts +27 -29
  437. package/dist/runtime/base/default-thread-composer-runtime-core.d.ts.map +1 -1
  438. package/dist/runtime/base/default-thread-composer-runtime-core.js +21 -6
  439. package/dist/runtime/base/default-thread-composer-runtime-core.js.map +1 -1
  440. package/dist/runtime/branch/external-thread-branch-adapter.d.ts +14 -16
  441. package/dist/runtime/branch/external-thread-branch-adapter.d.ts.map +1 -1
  442. package/dist/runtime/interfaces/assistant-runtime-core.d.ts +7 -9
  443. package/dist/runtime/interfaces/assistant-runtime-core.d.ts.map +1 -1
  444. package/dist/runtime/interfaces/composer-runtime-core.d.ts +88 -72
  445. package/dist/runtime/interfaces/composer-runtime-core.d.ts.map +1 -1
  446. package/dist/runtime/interfaces/thread-list-runtime-core.d.ts +63 -65
  447. package/dist/runtime/interfaces/thread-list-runtime-core.d.ts.map +1 -1
  448. package/dist/runtime/interfaces/thread-runtime-core.d.ts +210 -197
  449. package/dist/runtime/interfaces/thread-runtime-core.d.ts.map +1 -1
  450. package/dist/runtime/internal.d.ts +25 -20
  451. package/dist/runtime/internal.d.ts.map +1 -0
  452. package/dist/runtime/queue/external-thread-queue-adapter.d.ts +35 -37
  453. package/dist/runtime/queue/external-thread-queue-adapter.d.ts.map +1 -1
  454. package/dist/runtime/queue/message-queue.d.ts +29 -31
  455. package/dist/runtime/queue/message-queue.d.ts.map +1 -1
  456. package/dist/runtime/queue/message-queue.js +1 -1
  457. package/dist/runtime/queue/queue-item.d.ts +5 -7
  458. package/dist/runtime/queue/queue-item.d.ts.map +1 -1
  459. package/dist/runtime/utils/abortable-thread-load.d.ts +7 -8
  460. package/dist/runtime/utils/abortable-thread-load.d.ts.map +1 -1
  461. package/dist/runtime/utils/attachment-add-operations.d.ts +13 -11
  462. package/dist/runtime/utils/attachment-add-operations.d.ts.map +1 -1
  463. package/dist/runtime/utils/attachment-add-operations.js +24 -2
  464. package/dist/runtime/utils/attachment-add-operations.js.map +1 -1
  465. package/dist/runtime/utils/attachment-send-operations.d.ts +12 -0
  466. package/dist/runtime/utils/attachment-send-operations.d.ts.map +1 -0
  467. package/dist/runtime/utils/attachment-send-operations.js +34 -0
  468. package/dist/runtime/utils/attachment-send-operations.js.map +1 -0
  469. package/dist/runtime/utils/auto-status.d.ts +4 -5
  470. package/dist/runtime/utils/auto-status.d.ts.map +1 -1
  471. package/dist/runtime/utils/auto-status.js +3 -5
  472. package/dist/runtime/utils/auto-status.js.map +1 -1
  473. package/dist/runtime/utils/chat-model-adapter.d.ts +26 -27
  474. package/dist/runtime/utils/chat-model-adapter.d.ts.map +1 -1
  475. package/dist/runtime/utils/external-message-conversion.d.ts +32 -32
  476. package/dist/runtime/utils/external-message-conversion.d.ts.map +1 -1
  477. package/dist/runtime/utils/external-message-conversion.js +3 -3
  478. package/dist/runtime/utils/external-message-conversion.js.map +1 -1
  479. package/dist/runtime/utils/external-store-message.d.ts +2 -4
  480. package/dist/runtime/utils/external-store-message.d.ts.map +1 -1
  481. package/dist/runtime/utils/message-repository-session.d.ts +21 -23
  482. package/dist/runtime/utils/message-repository-session.d.ts.map +1 -1
  483. package/dist/runtime/utils/message-repository.d.ts +50 -51
  484. package/dist/runtime/utils/message-repository.d.ts.map +1 -1
  485. package/dist/runtime/utils/message-repository.js +8 -7
  486. package/dist/runtime/utils/message-repository.js.map +1 -1
  487. package/dist/runtime/utils/pending-tool-calls.d.ts +10 -11
  488. package/dist/runtime/utils/pending-tool-calls.d.ts.map +1 -1
  489. package/dist/runtime/utils/resolveToolApprovalResponse.d.ts +6 -8
  490. package/dist/runtime/utils/resolveToolApprovalResponse.d.ts.map +1 -1
  491. package/dist/runtime/utils/runtime-extras-brand.d.ts +4 -6
  492. package/dist/runtime/utils/runtime-extras-brand.d.ts.map +1 -1
  493. package/dist/runtime/utils/stored-message-parts.d.ts +5 -5
  494. package/dist/runtime/utils/stored-message-parts.d.ts.map +1 -1
  495. package/dist/runtime/utils/stored-message-parts.js +22 -2
  496. package/dist/runtime/utils/stored-message-parts.js.map +1 -1
  497. package/dist/runtime/utils/streaming-timing.d.ts +19 -21
  498. package/dist/runtime/utils/streaming-timing.d.ts.map +1 -1
  499. package/dist/runtime/utils/thread-message-like.d.ts +36 -32
  500. package/dist/runtime/utils/thread-message-like.d.ts.map +1 -1
  501. package/dist/runtime/utils/thread-message-like.js +16 -6
  502. package/dist/runtime/utils/thread-message-like.js.map +1 -1
  503. package/dist/runtime/utils/thread-runtime-lifecycle.d.ts +4 -5
  504. package/dist/runtime/utils/thread-runtime-lifecycle.d.ts.map +1 -1
  505. package/dist/runtime/utils/thread-runtime-lifecycle.js +31 -4
  506. package/dist/runtime/utils/thread-runtime-lifecycle.js.map +1 -1
  507. package/dist/runtime/utils/tool-call-tree.d.ts +6 -8
  508. package/dist/runtime/utils/tool-call-tree.d.ts.map +1 -1
  509. package/dist/runtime/utils/tool-interactions.d.ts +10 -0
  510. package/dist/runtime/utils/tool-interactions.d.ts.map +1 -0
  511. package/dist/runtime/utils/tool-interactions.js +92 -0
  512. package/dist/runtime/utils/tool-interactions.js.map +1 -0
  513. package/dist/runtimes/assistant-transport/utils.d.ts +0 -2
  514. package/dist/runtimes/assistant-transport/utils.d.ts.map +1 -1
  515. package/dist/runtimes/external-store/external-store-adapter.d.ts +215 -198
  516. package/dist/runtimes/external-store/external-store-adapter.d.ts.map +1 -1
  517. package/dist/runtimes/external-store/external-store-runtime-core.d.ts +5 -6
  518. package/dist/runtimes/external-store/external-store-runtime-core.d.ts.map +1 -1
  519. package/dist/runtimes/external-store/external-store-runtime-core.js +4 -1
  520. package/dist/runtimes/external-store/external-store-runtime-core.js.map +1 -1
  521. package/dist/runtimes/external-store/external-store-shared-options.d.ts +1 -3
  522. package/dist/runtimes/external-store/external-store-shared-options.d.ts.map +1 -1
  523. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts +38 -40
  524. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts.map +1 -1
  525. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js +2 -2
  526. package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js.map +1 -1
  527. package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts +117 -124
  528. package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts.map +1 -1
  529. package/dist/runtimes/external-store/external-store-thread-runtime-core.js +44 -14
  530. package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -1
  531. package/dist/runtimes/external-store/thread-message-converter.d.ts +3 -5
  532. package/dist/runtimes/external-store/thread-message-converter.d.ts.map +1 -1
  533. package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts +94 -95
  534. package/dist/runtimes/inert/InertThreadRuntimeCore.d.ts.map +1 -1
  535. package/dist/runtimes/inert/InertThreadRuntimeCore.js +3 -0
  536. package/dist/runtimes/inert/InertThreadRuntimeCore.js.map +1 -1
  537. package/dist/runtimes/internal.d.ts +20 -16
  538. package/dist/runtimes/internal.d.ts.map +1 -0
  539. package/dist/runtimes/local/local-runtime-core.d.ts +6 -8
  540. package/dist/runtimes/local/local-runtime-core.d.ts.map +1 -1
  541. package/dist/runtimes/local/local-runtime-options.d.ts +40 -42
  542. package/dist/runtimes/local/local-runtime-options.d.ts.map +1 -1
  543. package/dist/runtimes/local/local-thread-list-runtime-core.d.ts +40 -42
  544. package/dist/runtimes/local/local-thread-list-runtime-core.d.ts.map +1 -1
  545. package/dist/runtimes/local/local-thread-runtime-core.d.ts +93 -97
  546. package/dist/runtimes/local/local-thread-runtime-core.d.ts.map +1 -1
  547. package/dist/runtimes/local/local-thread-runtime-core.js +178 -31
  548. package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -1
  549. package/dist/runtimes/local/should-continue.d.ts +1 -3
  550. package/dist/runtimes/local/should-continue.d.ts.map +1 -1
  551. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts +76 -53
  552. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.d.ts.map +1 -1
  553. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js +28 -1
  554. package/dist/runtimes/readonly/ReadonlyThreadRuntimeCore.js.map +1 -1
  555. package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts +11 -13
  556. package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts.map +1 -1
  557. package/dist/runtimes/remote-thread-list/adapter-changed.d.ts +2 -4
  558. package/dist/runtimes/remote-thread-list/adapter-changed.d.ts.map +1 -1
  559. package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts +1 -3
  560. package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts.map +1 -1
  561. package/dist/runtimes/remote-thread-list/optimistic-state.d.ts +33 -29
  562. package/dist/runtimes/remote-thread-list/optimistic-state.d.ts.map +1 -1
  563. package/dist/runtimes/remote-thread-list/optimistic-state.js +8 -3
  564. package/dist/runtimes/remote-thread-list/optimistic-state.js.map +1 -1
  565. package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts +44 -46
  566. package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts.map +1 -1
  567. package/dist/runtimes/remote-thread-list/remote-thread-state.js +1 -1
  568. package/dist/runtimes/remote-thread-list/title-generation.d.ts +25 -26
  569. package/dist/runtimes/remote-thread-list/title-generation.d.ts.map +1 -1
  570. package/dist/runtimes/remote-thread-list/title.d.ts +3 -5
  571. package/dist/runtimes/remote-thread-list/title.d.ts.map +1 -1
  572. package/dist/runtimes/remote-thread-list/types.d.ts +111 -112
  573. package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
  574. package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts +144 -145
  575. package/dist/runtimes/tool-invocations/ToolInvocationTracker.d.ts.map +1 -1
  576. package/dist/runtimes/tool-invocations/ToolInvocationTracker.js +22 -7
  577. package/dist/runtimes/tool-invocations/ToolInvocationTracker.js.map +1 -1
  578. package/dist/store/clients/chain-of-thought-client.d.ts +7 -9
  579. package/dist/store/clients/chain-of-thought-client.d.ts.map +1 -1
  580. package/dist/store/clients/external-thread.d.ts +53 -54
  581. package/dist/store/clients/external-thread.d.ts.map +1 -1
  582. package/dist/store/clients/external-thread.js +1256 -731
  583. package/dist/store/clients/external-thread.js.map +1 -1
  584. package/dist/store/clients/model-context-client.d.ts +1 -3
  585. package/dist/store/clients/model-context-client.d.ts.map +1 -1
  586. package/dist/store/clients/no-op-composer-client.d.ts +2 -4
  587. package/dist/store/clients/no-op-composer-client.d.ts.map +1 -1
  588. package/dist/store/clients/no-op-composer-client.js +3 -1
  589. package/dist/store/clients/no-op-composer-client.js.map +1 -1
  590. package/dist/store/clients/runtime-adapter.d.ts +1 -3
  591. package/dist/store/clients/runtime-adapter.d.ts.map +1 -1
  592. package/dist/store/clients/single-thread-list.d.ts +3 -4
  593. package/dist/store/clients/single-thread-list.d.ts.map +1 -1
  594. package/dist/store/clients/submission-message.d.ts +8 -0
  595. package/dist/store/clients/submission-message.d.ts.map +1 -0
  596. package/dist/store/clients/submission-message.js +22 -0
  597. package/dist/store/clients/submission-message.js.map +1 -0
  598. package/dist/store/clients/suggestions.d.ts +5 -7
  599. package/dist/store/clients/suggestions.d.ts.map +1 -1
  600. package/dist/store/clients/thread-message-client.d.ts +10 -9
  601. package/dist/store/clients/thread-message-client.d.ts.map +1 -1
  602. package/dist/store/clients/thread-message-client.js +81 -82
  603. package/dist/store/clients/thread-message-client.js.map +1 -1
  604. package/dist/store/clients/thread-selection-events.d.ts +0 -2
  605. package/dist/store/clients/thread-selection-events.d.ts.map +1 -1
  606. package/dist/store/clients/thread-tasks.d.ts +4 -6
  607. package/dist/store/clients/thread-tasks.d.ts.map +1 -1
  608. package/dist/store/env.d.ts +0 -2
  609. package/dist/store/env.d.ts.map +1 -1
  610. package/dist/store/index.d.ts +33 -36
  611. package/dist/store/index.d.ts.map +1 -0
  612. package/dist/store/index.js +5 -5
  613. package/dist/store/internal.d.ts +12 -12
  614. package/dist/store/internal.d.ts.map +1 -0
  615. package/dist/store/internal.js +2 -2
  616. package/dist/store/primitive-predicates.d.ts +3 -4
  617. package/dist/store/primitive-predicates.d.ts.map +1 -1
  618. package/dist/store/primitive-predicates.js +9 -4
  619. package/dist/store/primitive-predicates.js.map +1 -1
  620. package/dist/store/runtime-clients/attachment-runtime-client.d.ts +3 -5
  621. package/dist/store/runtime-clients/attachment-runtime-client.d.ts.map +1 -1
  622. package/dist/store/runtime-clients/composer-runtime-client.d.ts +10 -12
  623. package/dist/store/runtime-clients/composer-runtime-client.d.ts.map +1 -1
  624. package/dist/store/runtime-clients/composer-runtime-client.js +65 -62
  625. package/dist/store/runtime-clients/composer-runtime-client.js.map +1 -1
  626. package/dist/store/runtime-clients/handle-runtime-action.d.ts +0 -2
  627. package/dist/store/runtime-clients/handle-runtime-action.d.ts.map +1 -1
  628. package/dist/store/runtime-clients/handle-thread-list-action.d.ts +0 -2
  629. package/dist/store/runtime-clients/handle-thread-list-action.d.ts.map +1 -1
  630. package/dist/store/runtime-clients/liveRef.d.ts +1 -3
  631. package/dist/store/runtime-clients/liveRef.d.ts.map +1 -1
  632. package/dist/store/runtime-clients/message-part-runtime-client.d.ts +3 -5
  633. package/dist/store/runtime-clients/message-part-runtime-client.d.ts.map +1 -1
  634. package/dist/store/runtime-clients/message-part-runtime-client.js +26 -16
  635. package/dist/store/runtime-clients/message-part-runtime-client.js.map +1 -1
  636. package/dist/store/runtime-clients/message-runtime-client.d.ts +9 -9
  637. package/dist/store/runtime-clients/message-runtime-client.d.ts.map +1 -1
  638. package/dist/store/runtime-clients/message-runtime-client.js +121 -113
  639. package/dist/store/runtime-clients/message-runtime-client.js.map +1 -1
  640. package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts +4 -6
  641. package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts.map +1 -1
  642. package/dist/store/runtime-clients/thread-list-runtime-client.d.ts +5 -7
  643. package/dist/store/runtime-clients/thread-list-runtime-client.d.ts.map +1 -1
  644. package/dist/store/runtime-clients/thread-runtime-client.d.ts +3 -5
  645. package/dist/store/runtime-clients/thread-runtime-client.d.ts.map +1 -1
  646. package/dist/store/runtime-clients/thread-runtime-client.js +221 -158
  647. package/dist/store/runtime-clients/thread-runtime-client.js.map +1 -1
  648. package/dist/store/runtime-clients/useSubscribable.d.ts +2 -4
  649. package/dist/store/runtime-clients/useSubscribable.d.ts.map +1 -1
  650. package/dist/store/scope-registration.d.ts +28 -29
  651. package/dist/store/scope-registration.d.ts.map +1 -1
  652. package/dist/store/scopes/attachment.d.ts +15 -17
  653. package/dist/store/scopes/attachment.d.ts.map +1 -1
  654. package/dist/store/scopes/chain-of-thought.d.ts +28 -29
  655. package/dist/store/scopes/chain-of-thought.d.ts.map +1 -1
  656. package/dist/store/scopes/composer.d.ts +141 -128
  657. package/dist/store/scopes/composer.d.ts.map +1 -1
  658. package/dist/store/scopes/message.d.ts +114 -107
  659. package/dist/store/scopes/message.d.ts.map +1 -1
  660. package/dist/store/scopes/model-context.d.ts +7 -9
  661. package/dist/store/scopes/model-context.d.ts.map +1 -1
  662. package/dist/store/scopes/part.d.ts +49 -45
  663. package/dist/store/scopes/part.d.ts.map +1 -1
  664. package/dist/store/scopes/queue-item.d.ts +18 -20
  665. package/dist/store/scopes/queue-item.d.ts.map +1 -1
  666. package/dist/store/scopes/suggestion.d.ts +10 -12
  667. package/dist/store/scopes/suggestion.d.ts.map +1 -1
  668. package/dist/store/scopes/suggestions.d.ts +13 -15
  669. package/dist/store/scopes/suggestions.d.ts.map +1 -1
  670. package/dist/store/scopes/task.d.ts +23 -25
  671. package/dist/store/scopes/task.d.ts.map +1 -1
  672. package/dist/store/scopes/thread-list-item.d.ts +63 -65
  673. package/dist/store/scopes/thread-list-item.d.ts.map +1 -1
  674. package/dist/store/scopes/thread.d.ts +192 -194
  675. package/dist/store/scopes/thread.d.ts.map +1 -1
  676. package/dist/store/scopes/threads.d.ts +45 -47
  677. package/dist/store/scopes/threads.d.ts.map +1 -1
  678. package/dist/subscribable/subscribable.d.ts +58 -53
  679. package/dist/subscribable/subscribable.d.ts.map +1 -1
  680. package/dist/subscribable/subscribable.js +35 -7
  681. package/dist/subscribable/subscribable.js.map +1 -1
  682. package/dist/types/attachment.d.ts +26 -27
  683. package/dist/types/attachment.d.ts.map +1 -1
  684. package/dist/types/augmentations.d.ts +4 -4
  685. package/dist/types/augmentations.d.ts.map +1 -1
  686. package/dist/types/directive.d.ts +11 -13
  687. package/dist/types/directive.d.ts.map +1 -1
  688. package/dist/types/error.d.ts +7 -8
  689. package/dist/types/error.d.ts.map +1 -1
  690. package/dist/types/index.d.ts +7 -7
  691. package/dist/types/index.d.ts.map +1 -0
  692. package/dist/types/message.d.ts +322 -284
  693. package/dist/types/message.d.ts.map +1 -1
  694. package/dist/types/message.js.map +1 -1
  695. package/dist/types/quote.d.ts +2 -4
  696. package/dist/types/quote.d.ts.map +1 -1
  697. package/dist/types/trigger.d.ts +8 -10
  698. package/dist/types/trigger.d.ts.map +1 -1
  699. package/dist/types/unsubscribe.d.ts +0 -2
  700. package/dist/types/unsubscribe.d.ts.map +1 -1
  701. package/dist/utils/abortable-iterable.d.ts +0 -2
  702. package/dist/utils/abortable-iterable.d.ts.map +1 -1
  703. package/dist/utils/composite-context-provider.d.ts +8 -11
  704. package/dist/utils/composite-context-provider.d.ts.map +1 -1
  705. package/dist/utils/data-url.d.ts +10 -12
  706. package/dist/utils/data-url.d.ts.map +1 -1
  707. package/dist/utils/getGroupStatus.d.ts +17 -18
  708. package/dist/utils/getGroupStatus.d.ts.map +1 -1
  709. package/dist/utils/id.d.ts +0 -2
  710. package/dist/utils/id.d.ts.map +1 -1
  711. package/dist/utils/image-media-type.d.ts +0 -2
  712. package/dist/utils/image-media-type.d.ts.map +1 -1
  713. package/dist/utils/invoke-user-callback.d.ts +0 -2
  714. package/dist/utils/invoke-user-callback.d.ts.map +1 -1
  715. package/dist/utils/json/is-json-equal.d.ts +0 -2
  716. package/dist/utils/json/is-json-equal.d.ts.map +1 -1
  717. package/dist/utils/json/is-json.d.ts +1 -3
  718. package/dist/utils/json/is-json.d.ts.map +1 -1
  719. package/dist/utils/json/stable-stringify-tool-args.d.ts +1 -3
  720. package/dist/utils/json/stable-stringify-tool-args.d.ts.map +1 -1
  721. package/dist/utils/normalizePartStatus.d.ts +2 -3
  722. package/dist/utils/normalizePartStatus.d.ts.map +1 -1
  723. package/dist/utils/normalizePartStatus.js +3 -2
  724. package/dist/utils/normalizePartStatus.js.map +1 -1
  725. package/dist/utils/notify-event-listeners.d.ts +1 -2
  726. package/dist/utils/notify-event-listeners.d.ts.map +1 -1
  727. package/dist/utils/record.d.ts +0 -2
  728. package/dist/utils/record.d.ts.map +1 -1
  729. package/dist/utils/silent-runtime-action.d.ts +0 -2
  730. package/dist/utils/silent-runtime-action.d.ts.map +1 -1
  731. package/dist/utils/text.d.ts +1 -3
  732. package/dist/utils/text.d.ts.map +1 -1
  733. package/dist/utils/wire-media.d.ts +0 -2
  734. package/dist/utils/wire-media.d.ts.map +1 -1
  735. package/package.json +11 -10
  736. package/src/adapters/attachment.test.ts +98 -1
  737. package/src/adapters/attachment.ts +70 -20
  738. package/src/adapters/speech.test.ts +94 -0
  739. package/src/adapters/speech.ts +16 -2
  740. package/src/adapters/thread-history.ts +16 -5
  741. package/src/adapters/voice.test.ts +169 -0
  742. package/src/adapters/voice.ts +25 -4
  743. package/src/index.ts +14 -2
  744. package/src/internal.ts +7 -0
  745. package/src/model-context/frame/host.test.ts +51 -1
  746. package/src/model-context/frame/host.ts +3 -1
  747. package/src/model-context/frame/provider.test.ts +61 -0
  748. package/src/model-context/frame/provider.ts +8 -1
  749. package/src/model-context/frame/validate.ts +57 -0
  750. package/src/model-context/interactable-composer-metadata.test.ts +82 -0
  751. package/src/model-context/interactable-composer-metadata.ts +45 -2
  752. package/src/react/adapters/LocalStorageThreadListAdapter.test.ts +594 -0
  753. package/src/react/adapters/LocalStorageThreadListAdapter.tsx +98 -35
  754. package/src/react/client/Interactables.test.ts +853 -1
  755. package/src/react/client/Interactables.ts +325 -45
  756. package/src/react/client/RemoteThreadList.initialize-failure.test.ts +124 -0
  757. package/src/react/client/RemoteThreadList.ts +6 -0
  758. package/src/react/client/Tools.ts +2 -3
  759. package/src/react/client/interactable-model-context.test.ts +56 -13
  760. package/src/react/client/interactable-model-context.ts +48 -23
  761. package/src/react/index.ts +2 -2
  762. package/src/react/interactables-legacy/Interactables.test.ts +212 -1
  763. package/src/react/interactables-legacy/Interactables.ts +25 -14
  764. package/src/react/interactables-legacy/interactable-model-context.ts +26 -24
  765. package/src/react/interactables-shared/useInteractablePersistenceQueue.test.tsx +22 -2
  766. package/src/react/interactables-shared/useInteractablePersistenceQueue.ts +63 -11
  767. package/src/react/primitive-hooks/useSuggestionTrigger.test.ts +33 -0
  768. package/src/react/primitive-hooks/useSuggestionTrigger.ts +7 -4
  769. package/src/react/primitives/generativeUI/GenerativeUI.test.tsx +124 -8
  770. package/src/react/primitives/generativeUI/GenerativeUI.tsx +35 -15
  771. package/src/react/primitives/message/MessageAttachments.test.tsx +2 -6
  772. package/src/react/primitives/message/MessageAttachments.tsx +14 -8
  773. package/src/react/primitives/message/MessageGroupedParts.test.tsx +151 -7
  774. package/src/react/primitives/message/MessageGroupedParts.tsx +19 -6
  775. package/src/react/primitives/message/MessageParts.test.tsx +84 -0
  776. package/src/react/primitives/message/MessageParts.tool-interaction.test.tsx +69 -0
  777. package/src/react/primitives/message/MessageParts.tsx +29 -8
  778. package/src/react/primitives/thread/ThreadSuggestions.test.tsx +97 -0
  779. package/src/react/primitives/thread/ThreadSuggestions.tsx +29 -6
  780. package/src/react/providers/ReadonlyThreadProvider.tsx +2 -2
  781. package/src/react/providers/TextMessagePartProvider.tsx +3 -0
  782. package/src/react/runtimes/RemoteThreadListHookInstanceManager.running.test.tsx +93 -0
  783. package/src/react/runtimes/RemoteThreadListHookInstanceManager.test.tsx +160 -3
  784. package/src/react/runtimes/RemoteThreadListHookInstanceManager.title.test.tsx +38 -0
  785. package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +73 -53
  786. package/src/react/runtimes/RemoteThreadListThreadListRuntimeCore.tsx +19 -3
  787. package/src/react/runtimes/RemoteThreadResource.ts +5 -2
  788. package/src/react/runtimes/assistant-transport/replayBoundaryStream.test.ts +3 -1
  789. package/src/react/runtimes/assistant-transport/replayBoundaryStream.ts +10 -2
  790. package/src/react/runtimes/assistant-transport/runManager.ts +3 -0
  791. package/src/react/runtimes/assistant-transport/transport-parentid.test.tsx +57 -0
  792. package/src/react/runtimes/assistant-transport/transport-thread-id.test.tsx +571 -0
  793. package/src/react/runtimes/assistant-transport/types.ts +9 -1
  794. package/src/react/runtimes/assistant-transport/useAssistantTransport.spec.md +10 -0
  795. package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.test.tsx +42 -0
  796. package/src/react/runtimes/assistant-transport/useAssistantTransportRuntime.ts +33 -9
  797. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.copy.integration.test.tsx +289 -0
  798. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.copy.test.tsx +471 -0
  799. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.engagement.test.tsx +330 -0
  800. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.ts +78 -2
  801. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.test.tsx +361 -2
  802. package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +571 -216
  803. package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.test.ts +25 -0
  804. package/src/react/runtimes/cloud/CloudFileAttachmentAdapter.ts +7 -3
  805. package/src/react/runtimes/cloud/auiV0.ts +158 -9
  806. package/src/react/runtimes/cloud/auiV0DecodeSafely.test.ts +352 -1
  807. package/src/react/runtimes/createMessageConverter.ts +9 -3
  808. package/src/react/runtimes/external-store-history-copy.ts +223 -0
  809. package/src/react/runtimes/useExternalStoreRuntime.history-copy.test.tsx +483 -0
  810. package/src/react/runtimes/useExternalStoreRuntime.lifecycle.test.tsx +76 -1
  811. package/src/react/runtimes/useExternalStoreRuntime.ts +25 -5
  812. package/src/react/runtimes/useLocalRuntime.test.tsx +145 -1
  813. package/src/react/runtimes/useLocalRuntime.ts +8 -5
  814. package/src/react/types/MessagePartComponentTypes.ts +10 -0
  815. package/src/react/types/scopes/interactables.ts +3 -0
  816. package/src/runtime/api/attachment-runtime.ts +10 -5
  817. package/src/runtime/api/bindings.ts +6 -1
  818. package/src/runtime/api/composer-runtime.ts +29 -6
  819. package/src/runtime/api/message-part-runtime.test.ts +215 -0
  820. package/src/runtime/api/message-part-runtime.ts +40 -0
  821. package/src/runtime/api/message-runtime.test.ts +112 -2
  822. package/src/runtime/api/message-runtime.ts +10 -5
  823. package/src/runtime/api/thread-list-item-runtime.ts +5 -5
  824. package/src/runtime/api/thread-list-runtime.ts +3 -3
  825. package/src/runtime/api/thread-runtime.test.ts +59 -0
  826. package/src/runtime/api/thread-runtime.ts +21 -11
  827. package/src/runtime/base/base-composer-runtime-core.ts +548 -153
  828. package/src/runtime/base/base-thread-runtime-core.test.ts +744 -9
  829. package/src/runtime/base/base-thread-runtime-core.ts +154 -27
  830. package/src/runtime/base/default-edit-composer-runtime-core.ts +13 -1
  831. package/src/runtime/base/default-thread-composer-runtime-core.ts +29 -10
  832. package/src/runtime/interfaces/composer-runtime-core.ts +19 -0
  833. package/src/runtime/interfaces/thread-runtime-core.ts +22 -1
  834. package/src/runtime/utils/attachment-add-operations.ts +45 -2
  835. package/src/runtime/utils/attachment-send-operations.ts +54 -0
  836. package/src/runtime/utils/auto-status.test.ts +54 -0
  837. package/src/runtime/utils/auto-status.ts +3 -10
  838. package/src/runtime/utils/external-message-conversion.test.ts +48 -0
  839. package/src/runtime/utils/external-message-conversion.ts +3 -4
  840. package/src/runtime/utils/message-repository.test.ts +69 -1
  841. package/src/runtime/utils/message-repository.ts +14 -7
  842. package/src/runtime/utils/stored-message-parts.ts +43 -1
  843. package/src/runtime/utils/thread-message-like.test.ts +58 -0
  844. package/src/runtime/utils/thread-message-like.ts +72 -46
  845. package/src/runtime/utils/thread-runtime-lifecycle.test.ts +67 -0
  846. package/src/runtime/utils/thread-runtime-lifecycle.ts +42 -8
  847. package/src/runtime/utils/tool-interactions.test.ts +193 -0
  848. package/src/runtime/utils/tool-interactions.ts +147 -0
  849. package/src/runtimes/external-store/external-store-adapter.ts +22 -1
  850. package/src/runtimes/external-store/external-store-runtime-core.ts +10 -2
  851. package/src/runtimes/external-store/external-store-thread-list-runtime-core.ts +2 -2
  852. package/src/runtimes/external-store/external-store-thread-runtime-core.test.ts +49 -0
  853. package/src/runtimes/external-store/external-store-thread-runtime-core.ts +76 -29
  854. package/src/runtimes/inert/InertThreadRuntimeCore.test.ts +127 -56
  855. package/src/runtimes/inert/InertThreadRuntimeCore.ts +10 -1
  856. package/src/runtimes/local/local-thread-runtime-core.edit-cancellation.test.ts +70 -0
  857. package/src/runtimes/local/local-thread-runtime-core.test.ts +1649 -108
  858. package/src/runtimes/local/local-thread-runtime-core.ts +301 -47
  859. package/src/runtimes/readonly/ReadonlyThreadRuntimeCore.ts +53 -1
  860. package/src/runtimes/remote-thread-list/optimistic-state.ts +8 -3
  861. package/src/runtimes/tool-invocations/EDGE_CASES.md +19 -4
  862. package/src/runtimes/tool-invocations/ToolInvocationTracker.test.ts +392 -39
  863. package/src/runtimes/tool-invocations/ToolInvocationTracker.ts +31 -8
  864. package/src/store/clients/external-thread.test.ts +145 -0
  865. package/src/store/clients/external-thread.ts +635 -131
  866. package/src/store/clients/model-context-client.test.ts +8 -8
  867. package/src/store/clients/no-op-composer-client.ts +2 -0
  868. package/src/store/clients/submission-message.ts +27 -0
  869. package/src/store/clients/thread-message-client.test.ts +39 -0
  870. package/src/store/clients/thread-message-client.ts +13 -6
  871. package/src/store/index.ts +2 -2
  872. package/src/store/internal.ts +1 -0
  873. package/src/store/primitive-predicates.test.ts +103 -0
  874. package/src/store/primitive-predicates.ts +15 -3
  875. package/src/store/runtime-clients/composer-runtime-client.ts +4 -3
  876. package/src/store/runtime-clients/message-part-runtime-client.test.ts +42 -0
  877. package/src/store/runtime-clients/message-part-runtime-client.ts +4 -0
  878. package/src/store/runtime-clients/message-runtime-client.ts +5 -0
  879. package/src/store/runtime-clients/thread-runtime-client.test.tsx +138 -5
  880. package/src/store/runtime-clients/thread-runtime-client.ts +46 -9
  881. package/src/store/scopes/composer.ts +22 -4
  882. package/src/store/scopes/message.ts +8 -0
  883. package/src/store/scopes/part.ts +8 -0
  884. package/src/subscribable/subscribable.test.ts +198 -1
  885. package/src/subscribable/subscribable.ts +49 -7
  886. package/src/tests/RemoteThreadListThreadListRuntimeCore-errors.test.ts +95 -1
  887. package/src/tests/auiV0Encode.test.ts +408 -1
  888. package/src/tests/base-composer-runtime-core-send.test.ts +722 -29
  889. package/src/tests/base-composer-runtime-core.test.ts +196 -0
  890. package/src/tests/composer-can-send.test.ts +98 -1
  891. package/src/tests/composer-submission.test.tsx +796 -0
  892. package/src/tests/default-edit-composer-runtime-core.test.ts +102 -2
  893. package/src/tests/external-store-thread-list-runtime-core.test.ts +111 -0
  894. package/src/tests/external-store-thread-runtime-core-adapter.test.ts +581 -1
  895. package/src/tests/external-store-thread-runtime-core.test.ts +186 -0
  896. package/src/tests/external-thread-attachments.test.tsx +741 -3
  897. package/src/tests/external-thread-isLast.test.tsx +69 -0
  898. package/src/tests/get-thread-state-isRunning.test.ts +2 -2
  899. package/src/tests/remote-thread-list-adapter-switch.test.ts +45 -1
  900. package/src/types/message.ts +49 -2
  901. package/src/utils/normalizePartStatus.ts +14 -1
  902. package/dist/tests/remote-thread-list-test-helpers.d.ts +0 -15
  903. package/dist/tests/remote-thread-list-test-helpers.d.ts.map +0 -1
  904. package/dist/tests/remote-thread-list-test-helpers.js +0 -59
  905. package/dist/tests/remote-thread-list-test-helpers.js.map +0 -1
@@ -1,60 +1,60 @@
1
- import { CompleteAttachment } from "./attachment.js";
2
- import { ToolCallTiming, ToolModelContentPart } from "assistant-stream";
3
- import { ReadonlyJSONObject, ReadonlyJSONValue } from "assistant-stream/utils";
4
- //#region src/types/message.d.ts
1
+ import type { ReadonlyJSONObject, ReadonlyJSONValue } from "assistant-stream/utils";
2
+ import type { ToolCallTiming, ToolModelContentPart } from "assistant-stream";
3
+ import type { CompleteAttachment } from "./attachment.js";
4
+ export type { ToolCallTiming, ToolModelContentPart };
5
5
  export type PartProviderMetadata = {
6
- readonly [providerName: string]: ReadonlyJSONObject;
6
+ readonly [providerName: string]: ReadonlyJSONObject;
7
7
  };
8
8
  export type TextMessagePart = {
9
- readonly type: "text";
10
- readonly text: string;
11
- readonly status?: MessagePartStreamStatus;
12
- readonly providerMetadata?: PartProviderMetadata;
13
- readonly parentId?: string;
9
+ readonly type: "text";
10
+ readonly text: string;
11
+ readonly status?: MessagePartStreamStatus;
12
+ readonly providerMetadata?: PartProviderMetadata;
13
+ readonly parentId?: string;
14
14
  };
15
15
  export type ReasoningMessagePart = {
16
- readonly type: "reasoning";
17
- readonly text: string;
18
- readonly status?: MessagePartStreamStatus;
19
- readonly unstable_summary?: string;
20
- readonly providerMetadata?: PartProviderMetadata;
21
- readonly parentId?: string;
16
+ readonly type: "reasoning";
17
+ readonly text: string;
18
+ readonly status?: MessagePartStreamStatus;
19
+ readonly unstable_summary?: string;
20
+ readonly providerMetadata?: PartProviderMetadata;
21
+ readonly parentId?: string;
22
22
  };
23
23
  export type SourceProviderMetadata = PartProviderMetadata;
24
24
  export type SourceMessagePart = {
25
- readonly type: "source";
26
- readonly sourceType: "url";
27
- readonly id: string;
28
- readonly url: string;
29
- readonly title?: string;
30
- readonly providerMetadata?: SourceProviderMetadata;
31
- readonly parentId?: string;
25
+ readonly type: "source";
26
+ readonly sourceType: "url";
27
+ readonly id: string;
28
+ readonly url: string;
29
+ readonly title?: string;
30
+ readonly providerMetadata?: SourceProviderMetadata;
31
+ readonly parentId?: string;
32
32
  } | {
33
- readonly type: "source";
34
- readonly sourceType: "document";
35
- readonly id: string;
36
- readonly url?: undefined;
37
- readonly title: string;
38
- readonly mediaType: string;
39
- readonly filename?: string;
40
- readonly providerMetadata?: SourceProviderMetadata;
41
- readonly parentId?: string;
33
+ readonly type: "source";
34
+ readonly sourceType: "document";
35
+ readonly id: string;
36
+ readonly url?: undefined;
37
+ readonly title: string;
38
+ readonly mediaType: string;
39
+ readonly filename?: string;
40
+ readonly providerMetadata?: SourceProviderMetadata;
41
+ readonly parentId?: string;
42
42
  };
43
43
  export type ImageMessagePart = {
44
- readonly type: "image";
45
- readonly image: string;
46
- readonly filename?: string;
47
- readonly providerMetadata?: PartProviderMetadata;
44
+ readonly type: "image";
45
+ readonly image: string;
46
+ readonly filename?: string;
47
+ readonly providerMetadata?: PartProviderMetadata;
48
48
  };
49
49
  export type FileMessagePart = {
50
- readonly type: "file";
51
- readonly filename?: string;
52
- readonly data: string;
53
- readonly mimeType: string;
54
- /** How `data` goes on the wire: a url or id reference; omitted = inferred (http(s) → url, else base64). "url" is honored by the LangChain-family, A2A, AG-UI, and Google ADK runtimes; "id" by the LangChain family only. */
55
- readonly sourceType?: "url" | "id";
56
- readonly providerMetadata?: PartProviderMetadata;
57
- readonly parentId?: string;
50
+ readonly type: "file";
51
+ readonly filename?: string;
52
+ readonly data: string;
53
+ readonly mimeType: string;
54
+ /** How `data` goes on the wire: a url or id reference; omitted = inferred (http(s) → url, else base64). "url" is honored by the LangChain-family, A2A, AG-UI, and Google ADK runtimes; "id" by the LangChain family only. */
55
+ readonly sourceType?: "url" | "id";
56
+ readonly providerMetadata?: PartProviderMetadata;
57
+ readonly parentId?: string;
58
58
  };
59
59
  /**
60
60
  * @deprecated Use {@link FileMessagePart} with an `audio/*` mime type. `file`
@@ -66,16 +66,16 @@ export type FileMessagePart = {
66
66
  * will not gain fields.
67
67
  */
68
68
  export type Unstable_AudioMessagePart = {
69
- readonly type: "audio";
70
- readonly audio: {
71
- readonly data: string;
72
- readonly format: "mp3" | "wav";
73
- };
69
+ readonly type: "audio";
70
+ readonly audio: {
71
+ readonly data: string;
72
+ readonly format: "mp3" | "wav";
73
+ };
74
74
  };
75
75
  export type DataMessagePart<T = any> = {
76
- readonly type: "data";
77
- readonly name: string;
78
- readonly data: T;
76
+ readonly type: "data";
77
+ readonly name: string;
78
+ readonly data: T;
79
79
  };
80
80
  /**
81
81
  * A JSON spec describing a tree of UI components to render.
@@ -86,22 +86,22 @@ export type DataMessagePart<T = any> = {
86
86
  * rejected with a typed error — the allowlist is the security boundary in the
87
87
  * default same-realm rendering path.
88
88
  */
89
- export type GenerativeUINode = string | {
90
- /** Allowlisted component name (resolved against the consumer registry). */
91
- readonly component: string;
92
- /** Props passed to the resolved component (must be JSON-serializable). */
93
- readonly props?: Record<string, unknown>;
94
- /** Optional children — strings render as text, objects recurse. */
95
- readonly children?: readonly GenerativeUINode[];
96
- /** Optional stable key for React reconciliation. */
97
- readonly key?: string;
89
+ export type GenerativeUINode = string | number | readonly GenerativeUINode[] | {
90
+ /** Allowlisted component name (resolved against the consumer registry). */
91
+ readonly component: string;
92
+ /** Props passed to the resolved component (must be JSON-serializable). */
93
+ readonly props?: Record<string, unknown>;
94
+ /** Optional child nodes — strings and numbers render as text; nested arrays and objects recurse. */
95
+ readonly children?: readonly GenerativeUINode[];
96
+ /** Optional stable key for React reconciliation. */
97
+ readonly key?: string;
98
98
  };
99
99
  /**
100
100
  * The root spec for a generative UI tree.
101
101
  */
102
102
  export type GenerativeUISpec = {
103
- /** Root node(s) to render. */
104
- readonly root: GenerativeUINode | readonly GenerativeUINode[];
103
+ /** Root node(s) to render. */
104
+ readonly root: GenerativeUINode | readonly GenerativeUINode[];
105
105
  };
106
106
  /**
107
107
  * A message part that carries a JSON spec describing UI to render.
@@ -112,46 +112,46 @@ export type GenerativeUISpec = {
112
112
  * friendly: a partially-streamed spec renders progressively.
113
113
  */
114
114
  export type GenerativeUIMessagePart = {
115
- readonly type: "generative-ui";
116
- /** The JSON spec describing the UI tree. */
117
- readonly spec: GenerativeUISpec;
118
- /** Optional id (useful for replays / stable keys). */
119
- readonly id?: string;
120
- readonly parentId?: string;
115
+ readonly type: "generative-ui";
116
+ /** The JSON spec describing the UI tree. */
117
+ readonly spec: GenerativeUISpec;
118
+ /** Optional id (useful for replays / stable keys). */
119
+ readonly id?: string;
120
+ readonly parentId?: string;
121
121
  };
122
122
  export type McpAppMetadata = {
123
- readonly resourceUri: string;
124
- readonly mimeType?: string;
125
- readonly visibility?: readonly ("model" | "app")[];
126
- /** Routable server identity emitted by the agent stack when multiple MCP servers back one agent; for @ag-ui/mcp-apps-middleware this is the configured serverId, falling back to its serverHash. */
127
- readonly serverId?: string;
123
+ readonly resourceUri: string;
124
+ readonly mimeType?: string;
125
+ readonly visibility?: readonly ("model" | "app")[];
126
+ /** Routable server identity emitted by the agent stack when multiple MCP servers back one agent; for @ag-ui/mcp-apps-middleware this is the configured serverId, falling back to its serverHash. */
127
+ readonly serverId?: string;
128
128
  };
129
129
  export declare const MCP_APP_URI_SCHEME = "ui://";
130
130
  export declare const isMcpAppUri: (uri: string | undefined) => boolean;
131
131
  export type ToolCallMessagePartMcpMetadata = {
132
- readonly app?: McpAppMetadata;
132
+ readonly app?: McpAppMetadata;
133
133
  };
134
134
  export type ToolApprovalOptionKind = "allow-once" | "allow-always" | "reject-once" | "reject-always";
135
135
  export type ToolApprovalOption = {
136
- /** Opaque, host-defined identifier. Scope semantics (session vs project vs global) belong to the option supplier. */
137
- readonly id: string;
138
- /**
139
- * Decision class. Drives approved-resolution and default rendering.
140
- * Open union: `_`-prefixed custom kinds are never auto-resolved; they must
141
- * be answered with an explicit `approved` value (optionally alongside the
142
- * `optionId`), which is what the default kit sends when one is chosen.
143
- */
144
- readonly kind: ToolApprovalOptionKind | (string & {});
145
- /** Human label. Renderers supply defaults per kind when omitted. */
146
- readonly label?: string;
147
- readonly description?: string;
148
- /** Patterns or rules this option would persist, shown before the user commits. Supplied by the host; never derived by the library. */
149
- readonly grants?: readonly string[];
150
- /** Opt-in confirmation step before this option resolves. */
151
- readonly confirm?: boolean | {
152
- title?: string;
153
- description?: string;
154
- };
136
+ /** Opaque, host-defined identifier. Scope semantics (session vs project vs global) belong to the option supplier. */
137
+ readonly id: string;
138
+ /**
139
+ * Decision class. Drives approved-resolution and default rendering.
140
+ * Open union: `_`-prefixed custom kinds are never auto-resolved; they must
141
+ * be answered with an explicit `approved` value (optionally alongside the
142
+ * `optionId`), which is what the default kit sends when one is chosen.
143
+ */
144
+ readonly kind: ToolApprovalOptionKind | (string & {});
145
+ /** Human label. Renderers supply defaults per kind when omitted. */
146
+ readonly label?: string;
147
+ readonly description?: string;
148
+ /** Patterns or rules this option would persist, shown before the user commits. Supplied by the host; never derived by the library. */
149
+ readonly grants?: readonly string[];
150
+ /** Opt-in confirmation step before this option resolves. */
151
+ readonly confirm?: boolean | {
152
+ title?: string;
153
+ description?: string;
154
+ };
155
155
  };
156
156
  /**
157
157
  * How an approval request should be presented, and which answers it accepts.
@@ -170,244 +170,282 @@ export type ToolApprovalDisplay = "decision" | "select" | "text";
170
170
  * and the runtime reads it to reject a `text` response the host cannot record.
171
171
  */
172
172
  export declare const toolApprovalAcceptsText: (approval: {
173
- readonly display?: ToolApprovalDisplay;
174
- readonly allowFreeform?: boolean;
173
+ readonly display?: ToolApprovalDisplay;
174
+ readonly allowFreeform?: boolean;
175
175
  }) => boolean;
176
176
  export type ToolApprovalResponse = {
177
- readonly approved: boolean;
178
- readonly text?: string;
179
- readonly reason?: string;
177
+ readonly approved: boolean;
178
+ readonly text?: string;
179
+ readonly reason?: string;
180
180
  } | {
181
- readonly optionId: string;
182
- readonly text?: string;
183
- readonly reason?: string;
181
+ readonly optionId: string;
182
+ readonly text?: string;
183
+ readonly reason?: string;
184
184
  } | {
185
- readonly approved: boolean;
186
- readonly optionId: string;
187
- readonly text?: string;
188
- readonly reason?: string;
185
+ readonly approved: boolean;
186
+ readonly optionId: string;
187
+ readonly text?: string;
188
+ readonly reason?: string;
189
189
  } | {
190
- /** Answer to a request that asks a question rather than for a decision. */
191
- readonly text: string;
192
- readonly reason?: string;
190
+ /** Answer to a request that asks a question rather than for a decision. */
191
+ readonly text: string;
192
+ readonly reason?: string;
193
+ };
194
+ /** One thing a user did in a tool call's rendered UI, stored with the call. */
195
+ export type Unstable_ToolInteraction = {
196
+ /** A generative UI action the user fired, with the user's input under `$input`. */
197
+ readonly type: "action";
198
+ /** When the user acted, in epoch milliseconds. */
199
+ readonly occurredAt: number;
200
+ readonly payload: ReadonlyJSONObject;
201
+ } | {
202
+ /** The answer the user gave to the tool's request for human input. */
203
+ readonly type: "human-response";
204
+ /** When the user answered, in epoch milliseconds. */
205
+ readonly occurredAt: number;
206
+ readonly payload: ReadonlyJSONValue;
207
+ };
208
+ /**
209
+ * The interactions recorded on a tool call, oldest first. `omitted` counts
210
+ * earlier entries dropped to keep the log within its size limit.
211
+ */
212
+ export type Unstable_ToolInteractionLog = {
213
+ readonly entries: readonly Unstable_ToolInteraction[];
214
+ readonly omitted?: number;
215
+ };
216
+ /** An interaction to record; the runtime validates the payload and stamps the time. */
217
+ export type Unstable_ToolInteractionInput = {
218
+ readonly type: Unstable_ToolInteraction["type"];
219
+ readonly payload: unknown;
193
220
  };
194
221
  export type ToolCallMessagePart<TArgs = ReadonlyJSONObject, TResult = unknown> = {
195
- /** Identifies this part as a tool call. */
196
- readonly type: "tool-call";
197
- /** Stable identifier for this invocation of the tool. */
198
- readonly toolCallId: string;
199
- /** Name of the tool requested by the model. */
200
- readonly toolName: string;
201
- /**
202
- * Arguments supplied by the model. During streaming this is a partial parse:
203
- * fields may be missing or incomplete. From a tool-call renderer, use
204
- * `useToolArgsStatus` to detect which fields are still arriving.
205
- */
206
- readonly args: TArgs;
207
- /** Result returned by the tool, if it has completed. */
208
- readonly result?: TResult | undefined;
209
- /** Whether the result represents a tool execution error. */
210
- readonly isError?: boolean | undefined;
211
- /** Raw JSON argument text streamed by the model. */
212
- readonly argsText: string;
213
- /** UI-only artifact associated with the tool result. */
214
- readonly artifact?: unknown;
215
- /** Wall-clock timing for this call, when the runtime or host tracks it. */
216
- readonly timing?: ToolCallTiming;
217
- /** MCP app metadata associated with this tool call, when present. */
218
- readonly mcp?: ToolCallMessagePartMcpMetadata;
219
- /** Provider metadata associated with this tool call, when present. */
220
- readonly providerMetadata?: PartProviderMetadata;
221
- /** Content returned to the model for this tool result. */
222
- readonly modelContent?: readonly ToolModelContentPart[] | undefined;
223
- /** Human-input request that must be resolved before the run can continue. */
224
- readonly interrupt?: {
225
- type: "human";
226
- payload: unknown;
227
- };
228
- /** Server-side approval gate. `respondToApproval` may only be called while `approved` is undefined and no `resolution` is recorded. */
229
- readonly approval?: {
230
- readonly id: string;
222
+ /** Identifies this part as a tool call. */
223
+ readonly type: "tool-call";
224
+ /** Stable identifier for this invocation of the tool. */
225
+ readonly toolCallId: string;
226
+ /** Name of the tool requested by the model. */
227
+ readonly toolName: string;
231
228
  /**
232
- * The question put to the user. A request that asks for something other
233
- * than permission carries it here, so a renderer can show the question
234
- * rather than inferring a decision from the tool name.
229
+ * Arguments supplied by the model. During streaming this is a partial parse:
230
+ * fields may be missing or incomplete. From a tool-call renderer, use
231
+ * `useToolArgsStatus` to detect which fields are still arriving.
235
232
  */
236
- readonly prompt?: string;
237
- /** How the request should be presented. Absent: a plain decision. */
238
- readonly display?: ToolApprovalDisplay;
239
- /** Whether a free-form answer is accepted alongside the options. */
240
- readonly allowFreeform?: boolean;
241
- readonly approved?: boolean;
242
- readonly reason?: string;
243
- readonly isAutomatic?: boolean;
244
- /** Available decisions for this call. Absent: a plain allow / deny pair. */
245
- readonly options?: readonly ToolApprovalOption[];
246
- /** The option chosen at resolution, when options were present. */
247
- readonly optionId?: string;
248
- /** The free-form answer recorded at resolution, when one was given. */
249
- readonly text?: string;
250
- /** Terminal non-decision state: the request was cancelled or expired without a user decision. Set by the host. */
251
- readonly resolution?: "cancelled" | "expired";
252
- };
253
- /** Parent message-part ID when this part belongs to a nested structure. */
254
- readonly parentId?: string;
255
- /**
256
- * Nested thread messages produced by this tool call, for example a sub-agent
257
- * conversation.
258
- */
259
- readonly messages?: readonly ThreadMessage[];
233
+ readonly args: TArgs;
234
+ /** Result returned by the tool. Final once it has completed; an interim value while `isPreliminary` is set. */
235
+ readonly result?: TResult | undefined;
236
+ /** Whether the result represents a tool execution error. */
237
+ readonly isError?: boolean | undefined;
238
+ /** Whether `result` is an interim value from a tool that is still running, so the call is not settled yet. */
239
+ readonly isPreliminary?: boolean | undefined;
240
+ /** Raw JSON argument text streamed by the model. */
241
+ readonly argsText: string;
242
+ /** UI-only artifact associated with the tool result. */
243
+ readonly artifact?: unknown;
244
+ /** Wall-clock timing for this call, when the runtime or host tracks it. */
245
+ readonly timing?: ToolCallTiming;
246
+ /** MCP app metadata associated with this tool call, when present. */
247
+ readonly mcp?: ToolCallMessagePartMcpMetadata;
248
+ /** Provider metadata associated with this tool call, when present. */
249
+ readonly providerMetadata?: PartProviderMetadata;
250
+ /** Content returned to the model for this tool result. */
251
+ readonly modelContent?: readonly ToolModelContentPart[] | undefined;
252
+ /** Human-input request that must be resolved before the run can continue. */
253
+ readonly interrupt?: {
254
+ type: "human";
255
+ payload: unknown;
256
+ };
257
+ /** Server-side approval gate. `respondToApproval` may only be called while `approved` is undefined and no `resolution` is recorded. */
258
+ readonly approval?: {
259
+ readonly id: string;
260
+ /**
261
+ * The question put to the user. A request that asks for something other
262
+ * than permission carries it here, so a renderer can show the question
263
+ * rather than inferring a decision from the tool name.
264
+ */
265
+ readonly prompt?: string;
266
+ /** How the request should be presented. Absent: a plain decision. */
267
+ readonly display?: ToolApprovalDisplay;
268
+ /** Whether a free-form answer is accepted alongside the options. */
269
+ readonly allowFreeform?: boolean;
270
+ /**
271
+ * Whether the request accepts a dismissal: `approved: false` with no
272
+ * answer. A decision is always refusable; a question is only when its host
273
+ * records a dismissal, so a renderer offers one only when this is set.
274
+ */
275
+ readonly dismissible?: boolean;
276
+ readonly approved?: boolean;
277
+ readonly reason?: string;
278
+ readonly isAutomatic?: boolean;
279
+ /** Available decisions for this call. Absent: a plain allow / deny pair. */
280
+ readonly options?: readonly ToolApprovalOption[];
281
+ /** The option chosen at resolution, when options were present. */
282
+ readonly optionId?: string;
283
+ /** The free-form answer recorded at resolution, when one was given. */
284
+ readonly text?: string;
285
+ /** Terminal non-decision state: the request was cancelled or expired without a user decision. Set by the host. */
286
+ readonly resolution?: "cancelled" | "expired";
287
+ };
288
+ /** Parent message-part ID when this part belongs to a nested structure. */
289
+ readonly parentId?: string;
290
+ /**
291
+ * Nested thread messages produced by this tool call, for example a sub-agent
292
+ * conversation.
293
+ */
294
+ readonly messages?: readonly ThreadMessage[];
295
+ /**
296
+ * What the user did in this call's rendered UI, recorded so a stored
297
+ * conversation shows the answer beside the question.
298
+ */
299
+ readonly unstable_interactions?: Unstable_ToolInteractionLog;
260
300
  };
261
301
  export type ThreadUserMessagePart = TextMessagePart | ImageMessagePart | FileMessagePart | DataMessagePart | Unstable_AudioMessagePart;
262
302
  export type ThreadAssistantMessagePart = TextMessagePart | ReasoningMessagePart | ToolCallMessagePart | SourceMessagePart | FileMessagePart | ImageMessagePart | DataMessagePart | GenerativeUIMessagePart;
263
303
  export type MessagePartStatus = {
264
- readonly type: "running";
304
+ readonly type: "running";
265
305
  } | {
266
- readonly type: "complete";
306
+ readonly type: "complete";
267
307
  } | {
268
- readonly type: "incomplete";
269
- readonly reason: "cancelled" | "length" | "content-filter" | "other" | "error";
270
- readonly error?: unknown;
308
+ readonly type: "incomplete";
309
+ readonly reason: "cancelled" | "length" | "content-filter" | "other" | "error";
310
+ readonly error?: unknown;
271
311
  };
272
312
  export type MessagePartStreamStatus = {
273
- readonly type: "running";
313
+ readonly type: "running";
274
314
  } | {
275
- readonly type: "complete";
315
+ readonly type: "complete";
276
316
  } | {
277
- readonly type: "incomplete";
278
- readonly reason: "cancelled" | "length" | "content-filter" | "other" | "error";
317
+ readonly type: "incomplete";
318
+ readonly reason: "cancelled" | "length" | "content-filter" | "other" | "error";
279
319
  };
280
320
  export type ToolCallMessagePartStatus = {
281
- /** The tool call is waiting for UI or human input before continuing. */
282
- readonly type: "requires-action";
283
- /** Reason the tool call requires action. */
284
- readonly reason: "tool-calls" | "interrupt";
321
+ /** The tool call is waiting for UI or human input before continuing. */
322
+ readonly type: "requires-action";
323
+ /** Reason the tool call requires action. */
324
+ readonly reason: "tool-calls" | "interrupt";
285
325
  } | {
286
- readonly type: "incomplete";
287
- readonly reason: "tool-calls";
288
- readonly error?: ReadonlyJSONValue;
326
+ readonly type: "incomplete";
327
+ readonly reason: "tool-calls";
328
+ readonly error?: ReadonlyJSONValue;
289
329
  } | MessagePartStatus;
290
330
  export type MessageStatus = {
291
- readonly type: "running";
331
+ readonly type: "running";
292
332
  } | {
293
- readonly type: "requires-action";
294
- readonly reason: "tool-calls" | "interrupt";
333
+ readonly type: "requires-action";
334
+ readonly reason: "tool-calls" | "interrupt";
295
335
  } | {
296
- readonly type: "complete";
297
- readonly reason: "stop" | "unknown";
336
+ readonly type: "complete";
337
+ readonly reason: "stop" | "unknown";
298
338
  } | {
299
- readonly type: "incomplete";
300
- readonly reason: "cancelled" | "tool-calls" | "length" | "content-filter" | "other" | "error";
301
- readonly error?: ReadonlyJSONValue;
339
+ readonly type: "incomplete";
340
+ readonly reason: "cancelled" | "tool-calls" | "length" | "content-filter" | "other" | "error";
341
+ readonly error?: ReadonlyJSONValue;
302
342
  };
303
343
  export type MessageTiming = {
304
- readonly streamStartTime: number;
305
- readonly firstTokenTime?: number;
306
- readonly totalStreamTime?: number;
307
- readonly tokenCount?: number;
308
- readonly tokensPerSecond?: number;
309
- readonly totalChunks: number;
310
- readonly toolCallCount: number;
344
+ readonly streamStartTime: number;
345
+ readonly firstTokenTime?: number;
346
+ readonly totalStreamTime?: number;
347
+ readonly tokenCount?: number;
348
+ readonly tokensPerSecond?: number;
349
+ readonly totalChunks: number;
350
+ readonly toolCallCount: number;
311
351
  };
312
352
  export type MessageModality = "voice";
313
353
  export type ThreadStep = {
314
- readonly messageId?: string;
315
- readonly usage?: {
316
- readonly inputTokens: number;
317
- readonly outputTokens: number;
318
- } | undefined;
354
+ readonly messageId?: string;
355
+ readonly usage?: {
356
+ readonly inputTokens: number;
357
+ readonly outputTokens: number;
358
+ } | undefined;
319
359
  };
320
360
  type MessageCommonProps = {
321
- readonly id: string;
322
- readonly createdAt: Date;
361
+ readonly id: string;
362
+ readonly createdAt: Date;
323
363
  };
324
364
  export type ThreadSystemMessage = MessageCommonProps & {
325
- readonly role: "system";
326
- readonly content: readonly [TextMessagePart];
327
- readonly metadata: {
328
- readonly unstable_state?: undefined;
329
- readonly unstable_annotations?: undefined;
330
- readonly unstable_data?: undefined;
331
- readonly steps?: undefined;
332
- readonly submittedFeedback?: undefined;
333
- readonly timing?: undefined;
334
- readonly modality?: undefined;
335
- readonly custom: Record<string, unknown>;
336
- };
365
+ readonly role: "system";
366
+ readonly content: readonly [TextMessagePart];
367
+ readonly metadata: {
368
+ readonly unstable_state?: undefined;
369
+ readonly unstable_annotations?: undefined;
370
+ readonly unstable_data?: undefined;
371
+ readonly steps?: undefined;
372
+ readonly submittedFeedback?: undefined;
373
+ readonly timing?: undefined;
374
+ readonly modality?: undefined;
375
+ readonly custom: Record<string, unknown>;
376
+ };
337
377
  };
338
378
  export type ThreadUserMessage = MessageCommonProps & {
339
- readonly role: "user";
340
- readonly content: readonly ThreadUserMessagePart[];
341
- readonly attachments: readonly CompleteAttachment[];
342
- readonly metadata: {
343
- readonly unstable_state?: undefined;
344
- readonly unstable_annotations?: undefined;
345
- readonly unstable_data?: undefined;
346
- readonly steps?: undefined;
347
- readonly submittedFeedback?: undefined;
348
- readonly timing?: undefined;
349
- readonly isOptimistic?: boolean;
350
- /** Set when the message was produced by a voice session rather than typed. */
351
- readonly modality?: MessageModality;
352
- readonly custom: Record<string, unknown>;
353
- };
379
+ readonly role: "user";
380
+ readonly content: readonly ThreadUserMessagePart[];
381
+ readonly attachments: readonly CompleteAttachment[];
382
+ readonly metadata: {
383
+ readonly unstable_state?: undefined;
384
+ readonly unstable_annotations?: undefined;
385
+ readonly unstable_data?: undefined;
386
+ readonly steps?: undefined;
387
+ readonly submittedFeedback?: undefined;
388
+ readonly timing?: undefined;
389
+ readonly isOptimistic?: boolean;
390
+ /** Set when the message was produced by a voice session rather than typed. */
391
+ readonly modality?: MessageModality;
392
+ readonly custom: Record<string, unknown>;
393
+ };
354
394
  };
355
395
  export type ThreadAssistantMessage = MessageCommonProps & {
356
- readonly role: "assistant";
357
- readonly content: readonly ThreadAssistantMessagePart[];
358
- readonly status: MessageStatus;
359
- readonly metadata: {
360
- readonly unstable_state: ReadonlyJSONValue;
361
- readonly unstable_annotations: readonly ReadonlyJSONValue[];
362
- readonly unstable_data: readonly ReadonlyJSONValue[];
363
- readonly steps: readonly ThreadStep[];
364
- readonly submittedFeedback?: {
365
- readonly type: "positive" | "negative";
366
- readonly comment?: string;
396
+ readonly role: "assistant";
397
+ readonly content: readonly ThreadAssistantMessagePart[];
398
+ readonly status: MessageStatus;
399
+ readonly metadata: {
400
+ readonly unstable_state: ReadonlyJSONValue;
401
+ readonly unstable_annotations: readonly ReadonlyJSONValue[];
402
+ readonly unstable_data: readonly ReadonlyJSONValue[];
403
+ readonly steps: readonly ThreadStep[];
404
+ readonly submittedFeedback?: {
405
+ readonly type: "positive" | "negative";
406
+ readonly comment?: string;
407
+ };
408
+ readonly timing?: MessageTiming;
409
+ /**
410
+ * Marks a client-side optimistic placeholder. Such messages are evicted
411
+ * once off the head branch and are never persisted.
412
+ */
413
+ readonly isOptimistic?: boolean;
414
+ /** Set when the message was produced by a voice session rather than typed. */
415
+ readonly modality?: MessageModality;
416
+ readonly custom: Record<string, unknown>;
367
417
  };
368
- readonly timing?: MessageTiming;
369
- /**
370
- * Marks a client-side optimistic placeholder. Such messages are evicted
371
- * once off the head branch and are never persisted.
372
- */
373
- readonly isOptimistic?: boolean;
374
- /** Set when the message was produced by a voice session rather than typed. */
375
- readonly modality?: MessageModality;
376
- readonly custom: Record<string, unknown>;
377
- };
378
418
  };
379
419
  type BaseThreadMessage = {
380
- readonly status?: ThreadAssistantMessage["status"];
381
- readonly metadata: {
382
- readonly unstable_state?: ReadonlyJSONValue | undefined;
383
- readonly unstable_annotations?: readonly ReadonlyJSONValue[] | undefined;
384
- readonly unstable_data?: readonly ReadonlyJSONValue[] | undefined;
385
- readonly steps?: readonly ThreadStep[] | undefined;
386
- readonly submittedFeedback?: {
387
- readonly type: "positive" | "negative";
388
- readonly comment?: string;
389
- } | undefined;
390
- readonly timing?: MessageTiming | undefined;
391
- readonly isOptimistic?: boolean;
392
- readonly modality?: MessageModality | undefined;
393
- readonly custom: Record<string, unknown>;
394
- };
395
- readonly attachments?: ThreadUserMessage["attachments"];
420
+ readonly status?: ThreadAssistantMessage["status"];
421
+ readonly metadata: {
422
+ readonly unstable_state?: ReadonlyJSONValue | undefined;
423
+ readonly unstable_annotations?: readonly ReadonlyJSONValue[] | undefined;
424
+ readonly unstable_data?: readonly ReadonlyJSONValue[] | undefined;
425
+ readonly steps?: readonly ThreadStep[] | undefined;
426
+ readonly submittedFeedback?: {
427
+ readonly type: "positive" | "negative";
428
+ readonly comment?: string;
429
+ } | undefined;
430
+ readonly timing?: MessageTiming | undefined;
431
+ readonly isOptimistic?: boolean;
432
+ readonly modality?: MessageModality | undefined;
433
+ readonly custom: Record<string, unknown>;
434
+ };
435
+ readonly attachments?: ThreadUserMessage["attachments"];
396
436
  };
397
437
  export type ThreadMessage = BaseThreadMessage & (ThreadSystemMessage | ThreadUserMessage | ThreadAssistantMessage);
398
438
  export type MessageRole = ThreadMessage["role"];
399
439
  export type RunConfig = {
400
- readonly custom?: Record<string, unknown>;
440
+ readonly custom?: Record<string, unknown>;
401
441
  };
402
442
  export type AppendMessage = Omit<ThreadMessage, "id"> & {
403
- parentId: string | null;
404
- /** The ID of the message that was edited or undefined. */
405
- sourceId: string | null;
406
- runConfig: RunConfig | undefined;
407
- startRun?: boolean | undefined;
408
- /** Process this message next; only meaningful for queue-capable runtimes. */
409
- steer?: boolean | undefined;
443
+ parentId: string | null;
444
+ /** The ID of the message that was edited or undefined. */
445
+ sourceId: string | null;
446
+ runConfig: RunConfig | undefined;
447
+ startRun?: boolean | undefined;
448
+ /** Process this message next; only meaningful for queue-capable runtimes. */
449
+ steer?: boolean | undefined;
410
450
  };
411
- //#endregion
412
- export type { ToolCallTiming, ToolModelContentPart };
413
451
  //# sourceMappingURL=message.d.ts.map