@assistant-ui/mcp-docs-server 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/README.md +16 -43
  2. package/dist/index.d.ts +2 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -91
  5. package/dist/index.js.map +1 -1
  6. package/dist/proxy.d.ts +9 -0
  7. package/dist/proxy.d.ts.map +1 -0
  8. package/dist/proxy.js +76 -0
  9. package/dist/proxy.js.map +1 -0
  10. package/package.json +9 -13
  11. package/src/index.ts +3 -115
  12. package/src/proxy.test.ts +250 -0
  13. package/src/proxy.ts +111 -0
  14. package/.docs/organized/code-examples/waterfall.md +0 -807
  15. package/.docs/organized/code-examples/with-a2a.md +0 -674
  16. package/.docs/organized/code-examples/with-ag-ui.md +0 -552
  17. package/.docs/organized/code-examples/with-ai-sdk-v7.md +0 -465
  18. package/.docs/organized/code-examples/with-artifacts.md +0 -814
  19. package/.docs/organized/code-examples/with-assistant-transport.md +0 -575
  20. package/.docs/organized/code-examples/with-browser-extension.md +0 -371
  21. package/.docs/organized/code-examples/with-chain-of-thought.md +0 -960
  22. package/.docs/organized/code-examples/with-cloud-standalone.md +0 -681
  23. package/.docs/organized/code-examples/with-cloud.md +0 -438
  24. package/.docs/organized/code-examples/with-custom-thread-list.md +0 -568
  25. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +0 -526
  26. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +0 -696
  27. package/.docs/organized/code-examples/with-eve.md +0 -404
  28. package/.docs/organized/code-examples/with-expo.md +0 -2063
  29. package/.docs/organized/code-examples/with-external-store.md +0 -420
  30. package/.docs/organized/code-examples/with-ffmpeg.md +0 -828
  31. package/.docs/organized/code-examples/with-generative-ui.md +0 -1812
  32. package/.docs/organized/code-examples/with-google-adk.md +0 -367
  33. package/.docs/organized/code-examples/with-heat-graph.md +0 -304
  34. package/.docs/organized/code-examples/with-image-generation.md +0 -462
  35. package/.docs/organized/code-examples/with-interactables.md +0 -732
  36. package/.docs/organized/code-examples/with-langchain.md +0 -445
  37. package/.docs/organized/code-examples/with-langgraph.md +0 -854
  38. package/.docs/organized/code-examples/with-livekit.md +0 -642
  39. package/.docs/organized/code-examples/with-mcp.md +0 -780
  40. package/.docs/organized/code-examples/with-nuxt.md +0 -2428
  41. package/.docs/organized/code-examples/with-opencode.md +0 -1974
  42. package/.docs/organized/code-examples/with-openui.md +0 -449
  43. package/.docs/organized/code-examples/with-pi.md +0 -2083
  44. package/.docs/organized/code-examples/with-react-hook-form.md +0 -724
  45. package/.docs/organized/code-examples/with-react-ink-web.md +0 -690
  46. package/.docs/organized/code-examples/with-react-ink.md +0 -472
  47. package/.docs/organized/code-examples/with-react-router.md +0 -935
  48. package/.docs/organized/code-examples/with-resumable-stream.md +0 -667
  49. package/.docs/organized/code-examples/with-store.md +0 -679
  50. package/.docs/organized/code-examples/with-svelte.md +0 -415
  51. package/.docs/organized/code-examples/with-sveltekit.md +0 -1061
  52. package/.docs/organized/code-examples/with-tanstack.md +0 -811
  53. package/.docs/organized/code-examples/with-tap-runtime.md +0 -812
  54. package/.docs/organized/code-examples/with-virtualized-thread.md +0 -680
  55. package/.docs/organized/code-examples/with-vue.md +0 -408
  56. package/.docs/raw/docs/(docs)/architecture.mdx +0 -146
  57. package/.docs/raw/docs/(docs)/base-ui.mdx +0 -39
  58. package/.docs/raw/docs/(docs)/cli.mdx +0 -542
  59. package/.docs/raw/docs/(docs)/devtools.mdx +0 -79
  60. package/.docs/raw/docs/(docs)/index.mdx +0 -21
  61. package/.docs/raw/docs/(docs)/installation.mdx +0 -483
  62. package/.docs/raw/docs/(docs)/llm.mdx +0 -211
  63. package/.docs/raw/docs/(docs)/rtl.mdx +0 -78
  64. package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +0 -36
  65. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +0 -20
  66. package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +0 -34
  67. package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +0 -44
  68. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +0 -59
  69. package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +0 -20
  70. package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +0 -20
  71. package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +0 -84
  72. package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +0 -22
  73. package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +0 -64
  74. package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +0 -22
  75. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +0 -52
  76. package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +0 -49
  77. package/.docs/raw/docs/(reference)/api-reference/generative-ui/a2ui.mdx +0 -40
  78. package/.docs/raw/docs/(reference)/api-reference/generative-ui/actions.mdx +0 -56
  79. package/.docs/raw/docs/(reference)/api-reference/generative-ui/components.mdx +0 -86
  80. package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +0 -39
  81. package/.docs/raw/docs/(reference)/api-reference/generative-ui/json-generative-ui.mdx +0 -42
  82. package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +0 -84
  83. package/.docs/raw/docs/(reference)/api-reference/generative-ui/slack.mdx +0 -85
  84. package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +0 -45
  85. package/.docs/raw/docs/(reference)/api-reference/generative-ui/teams.mdx +0 -93
  86. package/.docs/raw/docs/(reference)/api-reference/generative-ui/tokens.mdx +0 -62
  87. package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +0 -129
  88. package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +0 -31
  89. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +0 -34
  90. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +0 -350
  91. package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +0 -28
  92. package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +0 -97
  93. package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +0 -24
  94. package/.docs/raw/docs/(reference)/api-reference/integrations/eve.mdx +0 -97
  95. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +0 -28
  96. package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +0 -200
  97. package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -37
  98. package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +0 -50
  99. package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +0 -22
  100. package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +0 -20
  101. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +0 -566
  102. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +0 -152
  103. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +0 -239
  104. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +0 -208
  105. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +0 -108
  106. package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +0 -99
  107. package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +0 -145
  108. package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +0 -82
  109. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +0 -619
  110. package/.docs/raw/docs/(reference)/api-reference/primitives/composition.mdx +0 -22
  111. package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +0 -65
  112. package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +0 -73
  113. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +0 -117
  114. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +0 -339
  115. package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +0 -77
  116. package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +0 -88
  117. package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +0 -81
  118. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +0 -129
  119. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +0 -138
  120. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +0 -122
  121. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +0 -289
  122. package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +0 -20
  123. package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +0 -24
  124. package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +0 -32
  125. package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +0 -43
  126. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +0 -43
  127. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +0 -24
  128. package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +0 -20
  129. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +0 -24
  130. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +0 -24
  131. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +0 -36
  132. package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +0 -85
  133. package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +0 -45
  134. package/.docs/raw/docs/(reference)/api-reference/tools/interactables-legacy.mdx +0 -55
  135. package/.docs/raw/docs/(reference)/api-reference/tools/interactables.mdx +0 -151
  136. package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +0 -106
  137. package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +0 -62
  138. package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +0 -178
  139. package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +0 -48
  140. package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +0 -62
  141. package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +0 -22
  142. package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +0 -19
  143. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +0 -149
  144. package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +0 -22
  145. package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +0 -54
  146. package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +0 -36
  147. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +0 -527
  148. package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -602
  149. package/.docs/raw/docs/cloud/authorization.mdx +0 -252
  150. package/.docs/raw/docs/cloud/index.mdx +0 -46
  151. package/.docs/raw/docs/cloud/langgraph.mdx +0 -554
  152. package/.docs/raw/docs/copilots/assistant-frame.mdx +0 -400
  153. package/.docs/raw/docs/copilots/make-assistant-visible.mdx +0 -82
  154. package/.docs/raw/docs/copilots/model-context.mdx +0 -156
  155. package/.docs/raw/docs/copilots/motivation.mdx +0 -202
  156. package/.docs/raw/docs/copilots/use-assistant-instructions.mdx +0 -64
  157. package/.docs/raw/docs/guides/attachments.mdx +0 -619
  158. package/.docs/raw/docs/guides/branching.mdx +0 -76
  159. package/.docs/raw/docs/guides/chain-of-thought.mdx +0 -164
  160. package/.docs/raw/docs/guides/chatgpt-subscription.mdx +0 -108
  161. package/.docs/raw/docs/guides/context-api.mdx +0 -619
  162. package/.docs/raw/docs/guides/dictation.mdx +0 -298
  163. package/.docs/raw/docs/guides/editing.mdx +0 -102
  164. package/.docs/raw/docs/guides/electron.mdx +0 -369
  165. package/.docs/raw/docs/guides/headless-composer-input.mdx +0 -113
  166. package/.docs/raw/docs/guides/image-generation.mdx +0 -74
  167. package/.docs/raw/docs/guides/index.mdx +0 -117
  168. package/.docs/raw/docs/guides/input-history.mdx +0 -55
  169. package/.docs/raw/docs/guides/latex.mdx +0 -158
  170. package/.docs/raw/docs/guides/mentions.mdx +0 -575
  171. package/.docs/raw/docs/guides/message-timing.mdx +0 -209
  172. package/.docs/raw/docs/guides/quoting.mdx +0 -169
  173. package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +0 -212
  174. package/.docs/raw/docs/guides/resumable-stream-stores.mdx +0 -152
  175. package/.docs/raw/docs/guides/resumable-streams.mdx +0 -292
  176. package/.docs/raw/docs/guides/slash-commands.mdx +0 -358
  177. package/.docs/raw/docs/guides/speech.mdx +0 -172
  178. package/.docs/raw/docs/guides/suggestions.mdx +0 -384
  179. package/.docs/raw/docs/guides/virtualization.mdx +0 -133
  180. package/.docs/raw/docs/guides/voice.mdx +0 -310
  181. package/.docs/raw/docs/ink/adapters.mdx +0 -99
  182. package/.docs/raw/docs/ink/custom-backend.mdx +0 -254
  183. package/.docs/raw/docs/ink/hooks.mdx +0 -469
  184. package/.docs/raw/docs/ink/index.mdx +0 -236
  185. package/.docs/raw/docs/ink/migration.mdx +0 -138
  186. package/.docs/raw/docs/ink/primitives.mdx +0 -1259
  187. package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +0 -528
  188. package/.docs/raw/docs/integrations/auth/better-auth.mdx +0 -188
  189. package/.docs/raw/docs/integrations/auth/clerk.mdx +0 -166
  190. package/.docs/raw/docs/integrations/auth/next-auth.mdx +0 -191
  191. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +0 -88
  192. package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +0 -282
  193. package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +0 -188
  194. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +0 -57
  195. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +0 -201
  196. package/.docs/raw/docs/integrations/gateways/index.mdx +0 -162
  197. package/.docs/raw/docs/integrations/index.mdx +0 -178
  198. package/.docs/raw/docs/integrations/observability/helicone.mdx +0 -129
  199. package/.docs/raw/docs/integrations/observability/langfuse.mdx +0 -161
  200. package/.docs/raw/docs/integrations/observability/langsmith.mdx +0 -151
  201. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +0 -773
  202. package/.docs/raw/docs/migrations/deprecation-policy.mdx +0 -42
  203. package/.docs/raw/docs/migrations/index.mdx +0 -50
  204. package/.docs/raw/docs/migrations/react-compatibility.mdx +0 -74
  205. package/.docs/raw/docs/migrations/react-langgraph-v0-7.mdx +0 -328
  206. package/.docs/raw/docs/migrations/toolkit-tools.mdx +0 -236
  207. package/.docs/raw/docs/migrations/v0-11.mdx +0 -172
  208. package/.docs/raw/docs/migrations/v0-12.mdx +0 -302
  209. package/.docs/raw/docs/migrations/v0-14.mdx +0 -297
  210. package/.docs/raw/docs/migrations/v0-15.mdx +0 -270
  211. package/.docs/raw/docs/primitives/action-bar.mdx +0 -352
  212. package/.docs/raw/docs/primitives/assistant-modal.mdx +0 -216
  213. package/.docs/raw/docs/primitives/attachment.mdx +0 -217
  214. package/.docs/raw/docs/primitives/branch-picker.mdx +0 -222
  215. package/.docs/raw/docs/primitives/chain-of-thought.mdx +0 -315
  216. package/.docs/raw/docs/primitives/composer.mdx +0 -659
  217. package/.docs/raw/docs/primitives/error.mdx +0 -142
  218. package/.docs/raw/docs/primitives/index.mdx +0 -99
  219. package/.docs/raw/docs/primitives/message.mdx +0 -618
  220. package/.docs/raw/docs/primitives/selection-toolbar.mdx +0 -191
  221. package/.docs/raw/docs/primitives/suggestion.mdx +0 -254
  222. package/.docs/raw/docs/primitives/thread-list.mdx +0 -467
  223. package/.docs/raw/docs/primitives/thread.mdx +0 -509
  224. package/.docs/raw/docs/react-native/adapters.mdx +0 -94
  225. package/.docs/raw/docs/react-native/custom-backend.mdx +0 -207
  226. package/.docs/raw/docs/react-native/hooks.mdx +0 -339
  227. package/.docs/raw/docs/react-native/index.mdx +0 -289
  228. package/.docs/raw/docs/react-native/migration.mdx +0 -142
  229. package/.docs/raw/docs/react-native/primitives.mdx +0 -839
  230. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +0 -399
  231. package/.docs/raw/docs/runtimes/a2a/overview.mdx +0 -60
  232. package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +0 -216
  233. package/.docs/raw/docs/runtimes/ag-ui/agent-state.mdx +0 -124
  234. package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +0 -70
  235. package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +0 -243
  236. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +0 -255
  237. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +0 -61
  238. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +0 -122
  239. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +0 -135
  240. package/.docs/raw/docs/runtimes/ai-sdk/v6-legacy.mdx +0 -636
  241. package/.docs/raw/docs/runtimes/ai-sdk/v7.mdx +0 -716
  242. package/.docs/raw/docs/runtimes/claude-managed-agents.mdx +0 -118
  243. package/.docs/raw/docs/runtimes/concepts/adapters.mdx +0 -265
  244. package/.docs/raw/docs/runtimes/concepts/architecture.mdx +0 -167
  245. package/.docs/raw/docs/runtimes/concepts/stability.mdx +0 -68
  246. package/.docs/raw/docs/runtimes/concepts/threads.mdx +0 -513
  247. package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +0 -763
  248. package/.docs/raw/docs/runtimes/custom/data-stream.mdx +0 -339
  249. package/.docs/raw/docs/runtimes/custom/external-store.mdx +0 -957
  250. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +0 -902
  251. package/.docs/raw/docs/runtimes/custom/overview.mdx +0 -71
  252. package/.docs/raw/docs/runtimes/eve/overview.mdx +0 -151
  253. package/.docs/raw/docs/runtimes/eve/quickstart.mdx +0 -192
  254. package/.docs/raw/docs/runtimes/google-adk/api.mdx +0 -256
  255. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +0 -784
  256. package/.docs/raw/docs/runtimes/google-adk/overview.mdx +0 -69
  257. package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +0 -229
  258. package/.docs/raw/docs/runtimes/langchain.mdx +0 -901
  259. package/.docs/raw/docs/runtimes/langgraph/agent-state.mdx +0 -181
  260. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +0 -305
  261. package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +0 -104
  262. package/.docs/raw/docs/runtimes/langgraph/overview.mdx +0 -84
  263. package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +0 -496
  264. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +0 -144
  265. package/.docs/raw/docs/runtimes/langgraph/threads.mdx +0 -113
  266. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +0 -29
  267. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -93
  268. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +0 -347
  269. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +0 -393
  270. package/.docs/raw/docs/runtimes/opencode/hooks.mdx +0 -194
  271. package/.docs/raw/docs/runtimes/opencode/overview.mdx +0 -58
  272. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +0 -119
  273. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +0 -133
  274. package/.docs/raw/docs/tools/a2ui.mdx +0 -107
  275. package/.docs/raw/docs/tools/backend.mdx +0 -147
  276. package/.docs/raw/docs/tools/defining-tools.mdx +0 -574
  277. package/.docs/raw/docs/tools/dynamic-tools.mdx +0 -112
  278. package/.docs/raw/docs/tools/generative-ui-primitive.mdx +0 -180
  279. package/.docs/raw/docs/tools/generative-ui-slack.mdx +0 -167
  280. package/.docs/raw/docs/tools/generative-ui-teams.mdx +0 -160
  281. package/.docs/raw/docs/tools/generative-ui.mdx +0 -322
  282. package/.docs/raw/docs/tools/index.mdx +0 -72
  283. package/.docs/raw/docs/tools/interactables.mdx +0 -1084
  284. package/.docs/raw/docs/tools/mcp-apps.mdx +0 -346
  285. package/.docs/raw/docs/tools/mcp.mdx +0 -466
  286. package/.docs/raw/docs/tools/multi-agent.mdx +0 -237
  287. package/.docs/raw/docs/tools/openui.mdx +0 -175
  288. package/.docs/raw/docs/tools/tool-ui.mdx +0 -1008
  289. package/.docs/raw/docs/tools/user-managed-mcp.mdx +0 -428
  290. package/.docs/raw/docs/ui/accordion.mdx +0 -266
  291. package/.docs/raw/docs/ui/assistant-modal.mdx +0 -166
  292. package/.docs/raw/docs/ui/assistant-sidebar.mdx +0 -89
  293. package/.docs/raw/docs/ui/attachment.mdx +0 -259
  294. package/.docs/raw/docs/ui/badge.mdx +0 -150
  295. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +0 -212
  296. package/.docs/raw/docs/ui/context-display.mdx +0 -148
  297. package/.docs/raw/docs/ui/diff-viewer.mdx +0 -280
  298. package/.docs/raw/docs/ui/directive-text.mdx +0 -114
  299. package/.docs/raw/docs/ui/dot-matrix.mdx +0 -133
  300. package/.docs/raw/docs/ui/file.mdx +0 -159
  301. package/.docs/raw/docs/ui/follow-up-suggestions.mdx +0 -82
  302. package/.docs/raw/docs/ui/image.mdx +0 -102
  303. package/.docs/raw/docs/ui/markdown.mdx +0 -64
  304. package/.docs/raw/docs/ui/mcp-config.mdx +0 -107
  305. package/.docs/raw/docs/ui/mermaid.mdx +0 -92
  306. package/.docs/raw/docs/ui/message-timing.mdx +0 -93
  307. package/.docs/raw/docs/ui/model-selector.mdx +0 -455
  308. package/.docs/raw/docs/ui/number-roll.mdx +0 -154
  309. package/.docs/raw/docs/ui/part-grouping.mdx +0 -614
  310. package/.docs/raw/docs/ui/quote.mdx +0 -211
  311. package/.docs/raw/docs/ui/reasoning.mdx +0 -186
  312. package/.docs/raw/docs/ui/scrollbar.mdx +0 -77
  313. package/.docs/raw/docs/ui/select.mdx +0 -254
  314. package/.docs/raw/docs/ui/sources.mdx +0 -177
  315. package/.docs/raw/docs/ui/streamdown.mdx +0 -392
  316. package/.docs/raw/docs/ui/syntax-highlighting.mdx +0 -205
  317. package/.docs/raw/docs/ui/tabs.mdx +0 -271
  318. package/.docs/raw/docs/ui/thread-list.mdx +0 -372
  319. package/.docs/raw/docs/ui/thread.mdx +0 -512
  320. package/.docs/raw/docs/ui/tool-fallback.mdx +0 -127
  321. package/.docs/raw/docs/ui/tool-group.mdx +0 -240
  322. package/.docs/raw/docs/ui/voice.mdx +0 -173
  323. package/.docs/raw/docs/utilities/heat-graph.mdx +0 -237
  324. package/.docs/raw/docs/utilities/react-o11y.mdx +0 -362
  325. package/.docs/raw/docs/utilities/tw-shimmer.mdx +0 -212
  326. package/dist/constants.d.ts +0 -14
  327. package/dist/constants.d.ts.map +0 -1
  328. package/dist/constants.js +0 -19
  329. package/dist/constants.js.map +0 -1
  330. package/dist/prepare-docs/code-examples.d.ts +0 -5
  331. package/dist/prepare-docs/code-examples.d.ts.map +0 -1
  332. package/dist/prepare-docs/code-examples.js +0 -117
  333. package/dist/prepare-docs/code-examples.js.map +0 -1
  334. package/dist/prepare-docs/copy-raw.d.ts +0 -5
  335. package/dist/prepare-docs/copy-raw.d.ts.map +0 -1
  336. package/dist/prepare-docs/copy-raw.js +0 -49
  337. package/dist/prepare-docs/copy-raw.js.map +0 -1
  338. package/dist/prepare-docs/prepare.d.ts +0 -1
  339. package/dist/prepare-docs/prepare.js +0 -22
  340. package/dist/prepare-docs/prepare.js.map +0 -1
  341. package/dist/prompts/xulux-playground.d.ts +0 -12
  342. package/dist/prompts/xulux-playground.d.ts.map +0 -1
  343. package/dist/prompts/xulux-playground.js +0 -33
  344. package/dist/prompts/xulux-playground.js.map +0 -1
  345. package/dist/tools/docs.d.ts +0 -22
  346. package/dist/tools/docs.d.ts.map +0 -1
  347. package/dist/tools/docs.js +0 -177
  348. package/dist/tools/docs.js.map +0 -1
  349. package/dist/tools/examples.d.ts +0 -24
  350. package/dist/tools/examples.d.ts.map +0 -1
  351. package/dist/tools/examples.js +0 -87
  352. package/dist/tools/examples.js.map +0 -1
  353. package/dist/tools/resources.d.ts +0 -6
  354. package/dist/tools/resources.d.ts.map +0 -1
  355. package/dist/tools/resources.js +0 -75
  356. package/dist/tools/resources.js.map +0 -1
  357. package/dist/tools/search.d.ts +0 -24
  358. package/dist/tools/search.d.ts.map +0 -1
  359. package/dist/tools/search.js +0 -39
  360. package/dist/tools/search.js.map +0 -1
  361. package/dist/tools/tests/mcp-test-client.d.ts +0 -15
  362. package/dist/tools/tests/mcp-test-client.d.ts.map +0 -1
  363. package/dist/tools/tests/mcp-test-client.js +0 -68
  364. package/dist/tools/tests/mcp-test-client.js.map +0 -1
  365. package/dist/tools/tests/test-setup.d.ts +0 -7
  366. package/dist/tools/tests/test-setup.d.ts.map +0 -1
  367. package/dist/tools/tests/test-setup.js +0 -36
  368. package/dist/tools/tests/test-setup.js.map +0 -1
  369. package/dist/tools/xulux-templates.d.ts +0 -58
  370. package/dist/tools/xulux-templates.d.ts.map +0 -1
  371. package/dist/tools/xulux-templates.js +0 -84
  372. package/dist/tools/xulux-templates.js.map +0 -1
  373. package/dist/utils/cache.d.ts +0 -5
  374. package/dist/utils/cache.d.ts.map +0 -1
  375. package/dist/utils/cache.js +0 -18
  376. package/dist/utils/cache.js.map +0 -1
  377. package/dist/utils/logger.d.ts +0 -10
  378. package/dist/utils/logger.d.ts.map +0 -1
  379. package/dist/utils/logger.js +0 -20
  380. package/dist/utils/logger.js.map +0 -1
  381. package/dist/utils/mcp-format.d.ts +0 -11
  382. package/dist/utils/mcp-format.d.ts.map +0 -1
  383. package/dist/utils/mcp-format.js +0 -14
  384. package/dist/utils/mcp-format.js.map +0 -1
  385. package/dist/utils/mdx.d.ts +0 -12
  386. package/dist/utils/mdx.d.ts.map +0 -1
  387. package/dist/utils/mdx.js +0 -45
  388. package/dist/utils/mdx.js.map +0 -1
  389. package/dist/utils/paths.d.ts +0 -12
  390. package/dist/utils/paths.d.ts.map +0 -1
  391. package/dist/utils/paths.js +0 -93
  392. package/dist/utils/paths.js.map +0 -1
  393. package/dist/utils/search.d.ts +0 -10
  394. package/dist/utils/search.d.ts.map +0 -1
  395. package/dist/utils/search.js +0 -97
  396. package/dist/utils/search.js.map +0 -1
  397. package/dist/utils/security.d.ts +0 -5
  398. package/dist/utils/security.d.ts.map +0 -1
  399. package/dist/utils/security.js +0 -22
  400. package/dist/utils/security.js.map +0 -1
  401. package/dist/xulux/catalog-client.d.ts +0 -14
  402. package/dist/xulux/catalog-client.d.ts.map +0 -1
  403. package/dist/xulux/catalog-client.js +0 -67
  404. package/dist/xulux/catalog-client.js.map +0 -1
  405. package/dist/xulux/fallback-catalog.d.ts +0 -7
  406. package/dist/xulux/fallback-catalog.d.ts.map +0 -1
  407. package/dist/xulux/fallback-catalog.js +0 -47
  408. package/dist/xulux/fallback-catalog.js.map +0 -1
  409. package/dist/xulux/fetch-sandbox.d.ts +0 -5
  410. package/dist/xulux/fetch-sandbox.d.ts.map +0 -1
  411. package/dist/xulux/fetch-sandbox.js +0 -40
  412. package/dist/xulux/fetch-sandbox.js.map +0 -1
  413. package/dist/xulux/template-service.d.ts +0 -84
  414. package/dist/xulux/template-service.d.ts.map +0 -1
  415. package/dist/xulux/template-service.js +0 -223
  416. package/dist/xulux/template-service.js.map +0 -1
  417. package/dist/xulux/types.d.ts +0 -55
  418. package/dist/xulux/types.d.ts.map +0 -1
  419. package/dist/xulux/types.js +0 -6
  420. package/dist/xulux/types.js.map +0 -1
  421. package/src/constants.ts +0 -24
  422. package/src/prepare-docs/code-examples.ts +0 -158
  423. package/src/prepare-docs/copy-raw.ts +0 -50
  424. package/src/prepare-docs/prepare.ts +0 -24
  425. package/src/prompts/xulux-playground.ts +0 -36
  426. package/src/tools/docs.ts +0 -255
  427. package/src/tools/examples.ts +0 -114
  428. package/src/tools/resources.ts +0 -111
  429. package/src/tools/search.ts +0 -46
  430. package/src/tools/tests/completions.test.ts +0 -60
  431. package/src/tools/tests/directory-size-cap.test.ts +0 -50
  432. package/src/tools/tests/docs.test.ts +0 -144
  433. package/src/tools/tests/examples.test.ts +0 -94
  434. package/src/tools/tests/integration.test.ts +0 -45
  435. package/src/tools/tests/json-parsing.test.ts +0 -23
  436. package/src/tools/tests/listings-cache.test.ts +0 -19
  437. package/src/tools/tests/mcp-protocol.test.ts +0 -216
  438. package/src/tools/tests/mcp-test-client.ts +0 -111
  439. package/src/tools/tests/path-traversal.test.ts +0 -81
  440. package/src/tools/tests/resources.test.ts +0 -133
  441. package/src/tools/tests/search.test.ts +0 -37
  442. package/src/tools/tests/test-setup.ts +0 -50
  443. package/src/tools/tests/xulux-templates.test.ts +0 -262
  444. package/src/tools/xulux-templates.ts +0 -141
  445. package/src/utils/cache.ts +0 -20
  446. package/src/utils/logger.ts +0 -20
  447. package/src/utils/mcp-format.ts +0 -14
  448. package/src/utils/mdx.ts +0 -59
  449. package/src/utils/paths.ts +0 -139
  450. package/src/utils/search.ts +0 -131
  451. package/src/utils/security.ts +0 -52
  452. package/src/utils/tests/cache.test.ts +0 -51
  453. package/src/utils/tests/mcp-format.test.ts +0 -22
  454. package/src/utils/tests/security.test.ts +0 -119
  455. package/src/xulux/catalog-client.ts +0 -105
  456. package/src/xulux/fallback-catalog.ts +0 -63
  457. package/src/xulux/fetch-sandbox.ts +0 -56
  458. package/src/xulux/template-service.ts +0 -406
  459. package/src/xulux/types.ts +0 -60
@@ -1,118 +0,0 @@
1
- ---
2
- title: Claude Managed Agents
3
- description: Connect Anthropic's Managed Agents sessions to assistant-ui with the external store runtime, folding the session event log into messages, rendering approval gates, and using sessions as the thread list.
4
- ---
5
-
6
- [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) is Anthropic's hosted agent platform: Anthropic runs the agent loop and provisions a sandboxed container per session, and your client drives the session over an event stream. A session holds the entire conversation server-side as a durable event log, streams every step (text, tool calls, approval stops, status) as typed events, and accepts user messages and tool confirmations back.
7
-
8
- That shape maps directly onto two assistant-ui primitives, with no adapter package in between:
9
-
10
- - [`useExternalStoreRuntime`](/docs/runtimes/custom/external-store) renders messages you derive from the session's event log. The log is the single source of truth, so replaying a stored session and tailing a live one run through the same pure function and can never disagree.
11
- - [`useRemoteThreadListRuntime`](/docs/api-reference/hooks/runtimes#useremotethreadlistruntime) turns the session list into the thread sidebar. A thread is a session; there is no conversations table anywhere in the app.
12
-
13
- Anthropic ships an official reference implementation of this integration: the [Claude Managed Agents quickstart](https://github.com/anthropics/claude-quickstarts/tree/main/managed-agents/assistant-ui) is a complete Next.js app (composer, thread, sidebar, tool cards, approval gate) built exactly this way. This page teaches the pattern; the quickstart is the runnable proof.
14
-
15
- <Callout type="info">
16
- Managed Agents is a beta API (`managed-agents-2026-04-01`; the SDK sets the header automatically). The quickstart declares `@anthropic-ai/sdk` `^0.113.0` (the session event helpers and token previews need 0.109.0 or later), and `@assistant-ui/react` 0.14.27 or later for the toolkit API and the approval gate on the external store runtime.
17
- </Callout>
18
-
19
- ## The event-to-message mapping
20
-
21
- Everything the session emits arrives as a typed event. The integration is one pure fold from the event array to assistant-ui's message model:
22
-
23
- | Managed Agents event | assistant-ui |
24
- | --- | --- |
25
- | `user.message` | A user message |
26
- | `agent.message` | Assistant text (buffered, authoritative) |
27
- | `event_start` / `event_delta` | The same text, streamed early as token previews |
28
- | `agent.thinking` | A reasoning part (progress signal only; the API sends no reasoning text) |
29
- | `agent.tool_use` / `agent.mcp_tool_use` / `agent.custom_tool_use` | A tool-call part; the `toolCallId` is the event id |
30
- | `agent.tool_result` (and mcp / custom variants) | That part's result |
31
- | `session.status_idle` with `stop_reason: requires_action` | `requires-action` message status, plus an approval on each blocked tool part |
32
- | `user.tool_confirmation` | The approval, settled (allowed or denied) |
33
- | `session.status_running` / `status_idle` | Whether the turn is live (`isRunning`) |
34
- | `session.error` | An error status on the message, or a retry banner |
35
-
36
- Because the fold is pure, opening an old chat replays `sessions.events.list()` through it, and a live chat feeds the SSE tail through it, and the two paths cannot render differently. Approvals, denials, and charts all come back after a reload because they are in the log, not in browser state.
37
-
38
- The runtime wiring is a structural subset of `ThreadMessageLike`, handed to the external store as-is:
39
-
40
- ```tsx
41
- const runtime = useExternalStoreRuntime<ThreadMessageLike>({
42
- messages: snapshot.messages,
43
- convertMessage: (m) => m,
44
- isRunning: isBusy(snapshot),
45
-
46
- onNew: async (message) => {
47
- const id = await ensureSession();
48
- await sendMessage(id, textOf(message));
49
- },
50
-
51
- // The Stop button becomes a real server-side interrupt.
52
- onCancel: async () => controller.interrupt(),
53
-
54
- // The Allow / Deny click on a gated tool call. approvalId is the
55
- // tool_use event id from session.status_idle { requires_action }.
56
- onRespondToToolApproval: async ({ approvalId, approved, reason }) => {
57
- controller.respondToApproval(approvalId, approved, reason);
58
- },
59
- });
60
- ```
61
-
62
- ## Sessions are the thread list
63
-
64
- The sidebar is a `RemoteThreadListAdapter` over the Managed Agents session API. Thread id and session id are the same string, so nothing maps between the two worlds:
65
-
66
- | Adapter method | Managed Agents call |
67
- | --- | --- |
68
- | `list` | `sessions.list()`, filtered to the sessions this app created (a `metadata` tag) |
69
- | `initialize` | `sessions.create()`, invoked by assistant-ui on the first message of a new chat |
70
- | `rename` | `sessions.update({ title })` |
71
- | `archive` | `sessions.archive()` |
72
- | `unarchive` | Throws. Managed Agents sessions cannot be unarchived, and switching to an archived thread auto-unarchives by default, so do not render archived sessions as switchable (the quickstart's ownership gate rejects archived ids outright) |
73
- | `delete` | `sessions.delete()` |
74
- | `fetch` | `sessions.retrieve()` |
75
- | `generateTitle` | Reads the title back after the server retitles the session from the first message, so the sidebar row updates without a second model call |
76
-
77
- A brand-new chat has no session until the first send: the composer works immediately, and `initialize()` creates the session lazily when the first message (or first attachment upload) needs one. Kill the server, restart, reload, and every conversation comes back, because none of it ever lived in the app.
78
-
79
- ## The approval gate
80
-
81
- Managed Agents supports per-tool [permission policies](https://platform.claude.com/docs/en/managed-agents/permission-policies). A tool configured as `always_ask` (the quickstart gates `bash` this way) does not run when the agent reaches for it. The session emits the `agent.tool_use` event, then parks:
82
-
83
- ```json
84
- { "type": "session.status_idle", "stop_reason": { "type": "requires_action", "event_ids": ["sevt_..."] } }
85
- ```
86
-
87
- The fold stamps an approval onto that tool part and sets the message status to `requires-action`, which is everything assistant-ui needs to render Allow and Deny on the tool card. The click flows back through `onRespondToToolApproval` as a `user.tool_confirmation` event:
88
-
89
- ```json
90
- { "type": "user.tool_confirmation", "tool_use_id": "sevt_...", "result": "deny", "deny_message": "Not on this box." }
91
- ```
92
-
93
- Two wire details matter. The `tool_use_id` is the tool-use event id, not an Anthropic `toolu_` id. And a denial reaches the agent as the tool's result, so it adjusts course instead of retrying the same command.
94
-
95
- Custom client-executed tools ride the same `requires_action` stop but take a `user.custom_tool_result` instead of a confirmation; sending a confirmation for one is a 400. The quickstart's inline chart tool is the worked example: the session parks, the card renders the chart from the tool's input, and the client answers so the agent continues.
96
-
97
- ## Token streaming
98
-
99
- By default assistant text arrives as whole `agent.message` events when a model request finishes. Opting the stream into `event_deltas: ["agent.message", "agent.thinking"]` adds token previews: an `event_start` announces the upcoming event, `event_delta` fragments stream the text, and the buffered event lands last as the authoritative record. Concatenating a preview's deltas in arrival order yields a prefix of the final text, but under load the server may shed the remaining deltas for an event, so the prefix is not necessarily the whole message. The fold therefore appends fragments for display and discards the accumulated preview when the buffered event arrives; never treat a preview as final. When a turn errors or is interrupted, the buffered event may never arrive at all, but `span.model_request_end` still does, so close any unreconciled preview when you see it.
100
-
101
- Previews are best-effort and gated per organization. Build against the buffered events and treat deltas as an enhancement: an org without the streaming gate runs the identical code path with replies arriving whole.
102
-
103
- ## Security boundary
104
-
105
- The Anthropic API key stays server-side; the browser talks only to your own route handlers, which relay to Managed Agents. Because a session id arrives from the browser and becomes an API path parameter, validate ownership on every route: the id must resolve, belong to your agent, and carry your app's metadata tag before any read or write. The API key can see the whole workspace; that gate is what keeps a guessed id from reading it. The quickstart's [`ownedSession()`](https://github.com/anthropics/claude-quickstarts/blob/main/managed-agents/assistant-ui/lib/owned-session.ts) is the reference shape.
106
-
107
- ## Run the reference
108
-
109
- ```bash
110
- git clone https://github.com/anthropics/claude-quickstarts
111
- cd claude-quickstarts/managed-agents/assistant-ui
112
- npm install
113
- cp .env.example .env # add ANTHROPIC_API_KEY, or `ant auth login` once
114
- npm run setup # one-time: creates the agent + environment, paste the IDs into .env
115
- npm run dev # drop sample_data/sales.csv into the chat
116
- ```
117
-
118
- The quickstart's [README](https://github.com/anthropics/claude-quickstarts/tree/main/managed-agents/assistant-ui#readme) walks through every file: the reducer, the session controller, the thread list adapter, the tool cards, and the attachment adapter that uploads composer files into the session sandbox. For the platform itself, start with Anthropic's [Managed Agents overview](https://platform.claude.com/docs/en/managed-agents/overview) and [events reference](https://platform.claude.com/docs/en/managed-agents/events-and-streaming).
@@ -1,265 +0,0 @@
1
- ---
2
- title: Adapters
3
- description: Reusable extension points for attachments, speech, feedback, history, and suggestions.
4
- ---
5
-
6
- Adapters are how assistant-ui adds capabilities like file uploads or message persistence to a runtime without coupling the runtime to a specific backend. You implement a small interface, plug it into the runtime's `adapters` option, and the matching UI surfaces (paperclip button, audio button, history reload) light up.
7
-
8
- Every adapter on this page works the same way regardless of which runtime you use. When an adapter is supported by a runtime, you provide it via that runtime's `adapters` option:
9
-
10
- ```ts
11
- const runtime = useLocalRuntime(modelAdapter, {
12
- adapters: { attachments, history, speech, feedback, suggestion },
13
- });
14
- ```
15
-
16
- Framework adapters take the same shape:
17
-
18
- ```ts
19
- const runtime = useChatRuntime({ adapters: { attachments, history } });
20
- ```
21
-
22
- ## Support matrix
23
-
24
- | Adapter | LocalRuntime | ExternalStoreRuntime | DataStream | AssistantTransport | react-ai-sdk | react-langgraph | react-langchain | react-google-adk | react-a2a | react-ag-ui | react-opencode |
25
- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
26
- | Attachments | Yes | Yes | Yes | Yes | Yes | (via thread state) | (via thread state) | Yes | Yes | Yes | (no) |
27
- | Speech | Yes | Yes | Yes | (no) | Yes | Yes | Yes | Yes | Yes | Yes | (no) |
28
- | Dictation | Yes | Yes | Yes | (no) | Yes | Yes | (no) | Yes | (no) | Yes | (no) |
29
- | Feedback | Yes | Yes | Yes | (no) | Yes | Yes | Yes | Yes | Yes | Yes | (no) |
30
- | History | Yes | (use your store) | Yes | (use thread converter) | Yes | (via load) | (via load) | Yes | Yes | Yes | (server-managed) |
31
- | Suggestion | Yes | (no) | Yes | (no) | (no) | (no) | (no) | (no) | (no) | (no) | (no) |
32
- | threadList | Yes (`RemoteThreadListAdapter`) | Yes (`ExternalStoreThreadListAdapter`) | Yes (`RemoteThreadListAdapter`) | Yes | Yes | Yes | Yes | Yes | Yes | Yes (experimental) | Built-in (sessions) |
33
-
34
- `(no)` means the adapter slot is not exposed by that runtime today. You would need to drop down a layer to use it.
35
-
36
- ## Attachment adapter
37
-
38
- Handles file and image uploads. When present, the composer renders a paperclip button.
39
-
40
- ```ts
41
- type AttachmentAdapter = {
42
- accept: string;
43
- add: (input: { file: File }) => Promise<PendingAttachment>;
44
- send: (attachment: PendingAttachment) => Promise<CompleteAttachment>;
45
- remove?: (attachment: Attachment) => Promise<void>;
46
- };
47
- ```
48
-
49
- Three lifecycle methods:
50
-
51
- - `add` runs when the user picks a file. Upload it, return a record with status `requires-action` so the composer holds the file before sending.
52
- - `send` runs when the user submits the message. Finalize the upload, attach a `content` payload, and mark status `complete`.
53
- - `remove` is optional and runs when the user removes the attachment before sending.
54
-
55
- Minimal upload-and-send example:
56
-
57
- ```ts
58
- const attachmentAdapter: AttachmentAdapter = {
59
- accept: "image/*,application/pdf",
60
- async add({ file }) {
61
- const form = new FormData();
62
- form.append("file", file);
63
- const { id, url } = await fetch("/api/upload", {
64
- method: "POST",
65
- body: form,
66
- }).then((r) => r.json());
67
- return {
68
- id,
69
- type: file.type.startsWith("image/") ? "image" : "document",
70
- name: file.name,
71
- contentType: file.type,
72
- file,
73
- url,
74
- status: { type: "requires-action", reason: "composer-send" },
75
- };
76
- },
77
- async send(attachment) {
78
- return {
79
- ...attachment,
80
- status: { type: "complete" },
81
- content: [
82
- attachment.type === "image"
83
- ? { type: "image", image: attachment.url! }
84
- : { type: "text", text: `[${attachment.name}](${attachment.url})` },
85
- ],
86
- };
87
- },
88
- };
89
- ```
90
-
91
- For multiple file types use `CompositeAttachmentAdapter`:
92
-
93
- ```ts
94
- import {
95
- CompositeAttachmentAdapter,
96
- SimpleImageAttachmentAdapter,
97
- SimpleTextAttachmentAdapter,
98
- } from "@assistant-ui/react";
99
-
100
- const attachmentAdapter = new CompositeAttachmentAdapter([
101
- new SimpleImageAttachmentAdapter(),
102
- new SimpleTextAttachmentAdapter(),
103
- ]);
104
- ```
105
-
106
- ## Speech adapter
107
-
108
- Text-to-speech for assistant messages. When present, message bubbles render an audio button.
109
-
110
- ```ts
111
- type SpeechSynthesisAdapter = {
112
- speak: (text: string) => Utterance;
113
- };
114
- ```
115
-
116
- `speak` returns an `Utterance` with `cancel()`, a `status` field, and `subscribe(callback)`. Browser-native example:
117
-
118
- ```ts
119
- const speechAdapter: SpeechSynthesisAdapter = {
120
- speak(text) {
121
- const utterance = new SpeechSynthesisUtterance(text);
122
- const subscribers = new Set<() => void>();
123
- const result: SpeechSynthesisAdapter.Utterance = {
124
- status: { type: "running" },
125
- cancel: () => {
126
- speechSynthesis.cancel();
127
- result.status = { type: "ended", reason: "cancelled" };
128
- subscribers.forEach((cb) => cb());
129
- },
130
- subscribe(cb) {
131
- subscribers.add(cb);
132
- return () => subscribers.delete(cb);
133
- },
134
- };
135
- utterance.addEventListener("end", () => {
136
- result.status = { type: "ended", reason: "finished" };
137
- subscribers.forEach((cb) => cb());
138
- });
139
- speechSynthesis.speak(utterance);
140
- return result;
141
- },
142
- };
143
- ```
144
-
145
- ## Dictation adapter
146
-
147
- Speech-to-text input for the composer. When present, the composer renders a microphone button. The contract is parallel to the speech adapter.
148
-
149
- ## Feedback adapter
150
-
151
- Thumbs up / thumbs down on assistant messages. When present, message bubbles render feedback buttons.
152
-
153
- ```ts
154
- type FeedbackAdapter = {
155
- submit: (feedback: {
156
- type: "positive" | "negative";
157
- message: ThreadMessage;
158
- }) => Promise<void>;
159
- };
160
- ```
161
-
162
- ```ts
163
- const feedbackAdapter: FeedbackAdapter = {
164
- async submit({ type, message }) {
165
- await fetch("/api/feedback", {
166
- method: "POST",
167
- headers: { "Content-Type": "application/json" },
168
- body: JSON.stringify({ messageId: message.id, rating: type }),
169
- });
170
- },
171
- };
172
- ```
173
-
174
- ## History adapter
175
-
176
- Per-thread message persistence. Used by `LocalRuntime` and adapters built on it (`react-ai-sdk`, `react-google-adk`, `react-a2a`, `useDataStreamRuntime`).
177
-
178
- `ExternalStoreRuntime` does not use a history adapter directly, since you already own the message array. Persist via your store instead. `react-langgraph` and `react-langchain` source persistence from server-side thread state, exposed through their `load` callbacks.
179
-
180
- ```ts
181
- type ThreadHistoryAdapter = {
182
- load: () => Promise<{
183
- messages: { parentId: string | null; message: ThreadMessage }[];
184
- }>;
185
- append: (item: {
186
- parentId: string | null;
187
- message: ThreadMessage;
188
- }) => Promise<void>;
189
- resume?: (input: {
190
- messages: ThreadMessage[];
191
- }) => Promise<ReadableStream | undefined>;
192
- withFormat?: <Fmt>(fmt: Fmt) => ThreadHistoryAdapter;
193
- };
194
- ```
195
-
196
- `load` runs when a thread opens. `append` runs after each message completes.
197
-
198
- <Callout type="info">
199
- `react-ai-sdk` requires `withFormat` so messages round-trip as AI SDK `UIMessage` objects. An adapter without `withFormat` throws at runtime in the AI SDK path. See the [AI SDK history docs](/docs/runtimes/ai-sdk/v7) for the full pattern.
200
- </Callout>
201
-
202
- ## Suggestion adapter
203
-
204
- Proposes follow-up prompts after each assistant message. When present, suggestion chips render under the latest assistant message.
205
-
206
- ```ts
207
- type SuggestionAdapter = {
208
- generate: (input: {
209
- messages: readonly ThreadMessage[];
210
- }) => AsyncGenerator<{ prompt: string }[]>;
211
- };
212
- ```
213
-
214
- ```ts
215
- const suggestionAdapter: SuggestionAdapter = {
216
- async *generate({ messages }) {
217
- const last = messages.at(-1);
218
- if (!last) return;
219
- const response = await fetch("/api/suggestions", {
220
- method: "POST",
221
- body: JSON.stringify(last),
222
- });
223
- yield (await response.json()).suggestions;
224
- },
225
- };
226
- ```
227
-
228
- ## Thread list adapter
229
-
230
- Multi-thread support is documented separately, since the contract differs by runtime. See [threads](/docs/runtimes/concepts/threads).
231
-
232
- ## Composing adapters
233
-
234
- Adapters compose freely. Provide as many or as few as you need; UI surfaces enable based on which slots are filled.
235
-
236
- ```ts
237
- const runtime = useLocalRuntime(modelAdapter, {
238
- adapters: {
239
- attachments: myAttachmentAdapter,
240
- history: myHistoryAdapter,
241
- speech: mySpeechAdapter,
242
- feedback: myFeedbackAdapter,
243
- },
244
- });
245
- ```
246
-
247
- ## Related
248
-
249
- <Cards>
250
- <Card
251
- title="Threads"
252
- description="Multi-thread support: cloud, custom database, ExternalStore."
253
- href="/docs/runtimes/concepts/threads"
254
- />
255
- <Card
256
- title="Architecture"
257
- description="The three-layer runtime model and how adapters fit in."
258
- href="/docs/runtimes/concepts/architecture"
259
- />
260
- <Card
261
- title="Pick a runtime"
262
- description="Choose the right runtime for your backend."
263
- href="/docs/runtimes/pick-a-runtime"
264
- />
265
- </Cards>
@@ -1,167 +0,0 @@
1
- ---
2
- title: Runtime architecture
3
- description: How core runtimes, protocol layers, and framework adapters fit together.
4
- ---
5
-
6
- assistant-ui exposes runtime integrations at three layers. Understanding which layer you are picking from clarifies what each runtime gives you and how features flow between them.
7
-
8
- ## The three layers
9
-
10
- <Flow.Root
11
- llm={`graph TD
12
- subgraph Framework["Framework adapters"]
13
- A1[react-ai-sdk]
14
- A2[react-langgraph]
15
- A3[react-langchain]
16
- A4[react-google-adk]
17
- A5[react-a2a]
18
- A6[react-ag-ui]
19
- A7[react-opencode]
20
- end
21
- subgraph Protocol["Protocol layers"]
22
- P1[DataStream]
23
- P2[AssistantTransport]
24
- end
25
- subgraph Core["Core runtimes"]
26
- C1[LocalRuntime]
27
- C2[ExternalStoreRuntime]
28
- end
29
- A1 --> C2
30
- A2 --> C2
31
- A3 --> C2
32
- A4 --> C2
33
- A5 --> C2
34
- A6 --> C2
35
- A7 --> C2
36
- P1 --> C1
37
- P2 --> C2`}
38
- >
39
- <Flow.Canvas
40
- edges={[
41
- { from: "datastream", to: "local", route: "down", midFrac: 0.4, laneOffset: -60 },
42
- { from: "transport", to: "external", route: "down", midFrac: 0.65, toOffset: -14 },
43
- { from: "adapters", to: "external", route: "down", midFrac: 0.4, toOffset: 14 },
44
- ]}
45
- >
46
- <div className="grid max-w-2xl grid-cols-[1fr_1.6fr] gap-4">
47
- <Flow.Group>
48
- <Flow.GroupLabel>Protocol layers</Flow.GroupLabel>
49
- <Flow.Column className="items-stretch gap-5">
50
- <Flow.Row className="justify-start">
51
- <Flow.Node flowId="datastream">DataStream</Flow.Node>
52
- </Flow.Row>
53
- <Flow.Row className="justify-end">
54
- <Flow.Node flowId="transport">AssistantTransport</Flow.Node>
55
- </Flow.Row>
56
- </Flow.Column>
57
- </Flow.Group>
58
- <Flow.Group flowId="adapters">
59
- <Flow.GroupLabel>Framework adapters</Flow.GroupLabel>
60
- <Flow.Row className="flex-wrap justify-start">
61
- <Flow.Node>react-ai-sdk</Flow.Node>
62
- <Flow.Node>react-langgraph</Flow.Node>
63
- <Flow.Node>react-langchain</Flow.Node>
64
- <Flow.Node>react-google-adk</Flow.Node>
65
- <Flow.Node>react-a2a</Flow.Node>
66
- <Flow.Node>react-ag-ui</Flow.Node>
67
- <Flow.Node>react-opencode</Flow.Node>
68
- </Flow.Row>
69
- </Flow.Group>
70
- </div>
71
- <div className="h-14" aria-hidden />
72
- <Flow.Group className="mx-auto w-fit">
73
- <Flow.GroupLabel>Core runtimes</Flow.GroupLabel>
74
- <Flow.Row className="gap-10">
75
- <Flow.Node flowId="local">LocalRuntime</Flow.Node>
76
- <Flow.Node flowId="external">ExternalStoreRuntime</Flow.Node>
77
- </Flow.Row>
78
- </Flow.Group>
79
- </Flow.Canvas>
80
- </Flow.Root>
81
-
82
- Each upper layer is implemented in terms of a lower one. You can drop down a layer whenever you need more control, but most users start at the framework layer and never touch the others.
83
-
84
- ## Core runtimes
85
-
86
- These own everything assistant-ui considers a runtime: messages, threads, branching, edit and regenerate state, run lifecycle. Every other layer is built on one of them.
87
-
88
- **`LocalRuntime`** keeps state inside the runtime itself and exposes a `ChatModelAdapter` interface. You implement a single `run` function (or `async *run` for streaming) and the runtime takes care of branching, editing, regeneration, and history through built-in plumbing.
89
-
90
- **`ExternalStoreRuntime`** is the inverse: you own the message array and provide callbacks (`onNew`, `onEdit`, `onReload`, etc.). The runtime renders whatever you give it. UI features turn on based on which callbacks are present.
91
-
92
- | Concern | LocalRuntime | ExternalStoreRuntime |
93
- | --- | --- | --- |
94
- | State ownership | Runtime | You |
95
- | Setup complexity | Low | Medium |
96
- | Branching | Built in | Requires `setMessages` |
97
- | Editing | Built in | Requires `onEdit` |
98
- | Best fit | Greenfield projects | Redux, zustand, tanstack-query stacks |
99
-
100
- See [LocalRuntime](/docs/runtimes/custom/local-runtime) and [ExternalStoreRuntime](/docs/runtimes/custom/external-store) for full guides.
101
-
102
- ## Protocol layers
103
-
104
- These wrap a core runtime with a wire-protocol contract so a generic backend can talk to assistant-ui without writing a custom `ChatModelAdapter` each time.
105
-
106
- **`DataStream`** is a message-streaming protocol. Your backend emits a standardized stream of message parts (text deltas, tool calls) and `useDataStreamRuntime` consumes it on top of `LocalRuntime`. Closest to "AI SDK style streaming for any backend".
107
-
108
- **`AssistantTransport`** is a state-streaming protocol. Your backend sends snapshots of its agent state and the runtime converts them into UI messages on top of `ExternalStoreRuntime`. Closest to "stream the whole agent state, not just messages".
109
-
110
- | Protocol | Layered on | Choose when |
111
- | --- | --- | --- |
112
- | DataStream | LocalRuntime | Your backend already speaks the data stream protocol, or you want a thin message-stream contract |
113
- | AssistantTransport | ExternalStoreRuntime | Your agent has internal state worth surfacing, or you need bidirectional commands and custom command types |
114
-
115
- ## Framework adapters
116
-
117
- The fastest path. Each adapter wraps one of the core or protocol layers and adds framework-specific conveniences.
118
-
119
- | Adapter | Layered on | Targets |
120
- | --- | --- | --- |
121
- | `react-ai-sdk` | `ExternalStoreRuntime` | Vercel AI SDK v7 (`useChat`) |
122
- | `react-langgraph` | `ExternalStoreRuntime` | LangGraph Cloud via `@langchain/langgraph-sdk` |
123
- | `react-langchain` | `ExternalStoreRuntime` | LangGraph Cloud via `@langchain/react`'s `useStream` |
124
- | `react-google-adk` | `ExternalStoreRuntime` | Google ADK JS or Python agents |
125
- | `react-a2a` | `ExternalStoreRuntime` | Any A2A v1.0 protocol server |
126
- | `react-ag-ui` | `ExternalStoreRuntime` | AG-UI protocol agents (CopilotKit, custom servers) |
127
- | `react-opencode` | `ExternalStoreRuntime` | OpenCode coding-agent server (experimental) |
128
-
129
- When an adapter exposes a feature like attachments, speech, or feedback, it does so through the same [adapter interfaces](/docs/runtimes/concepts/adapters) the core runtimes use. A feature implemented once works the same way across runtimes.
130
-
131
- ## How features flow
132
-
133
- A few things follow predictable patterns regardless of layer:
134
-
135
- - **Adapters** (attachments, speech, feedback, history, suggestions) are configured the same way and carry the same contract everywhere. See [adapters](/docs/runtimes/concepts/adapters).
136
- - **Threads** (single, cloud, custom database) work via a shared `RemoteThreadListAdapter` for `LocalRuntime`-based runtimes and a separate `ExternalStoreThreadListAdapter` for `ExternalStoreRuntime`. See [threads](/docs/runtimes/concepts/threads).
137
- - **Unstable APIs** are surfaced with an `unstable_` prefix and may change in any release. See [stability](/docs/runtimes/concepts/stability).
138
-
139
- ## Choosing a layer
140
-
141
- Start at the top, descend only when blocked.
142
-
143
- 1. **Framework adapter** if your backend matches one. You get streaming, threads, and adapter slots without writing protocol code.
144
- 2. **Protocol layer** if no framework adapter fits but you can pick a wire format. `DataStream` for message streaming, `AssistantTransport` for state streaming.
145
- 3. **Core runtime** if your situation is too custom for a protocol. `LocalRuntime` for simple cases, `ExternalStoreRuntime` if you already have a store.
146
-
147
- If you are unsure, start at [picking a runtime](/docs/runtimes/pick-a-runtime).
148
-
149
- ## Related
150
-
151
- <Cards>
152
- <Card
153
- title="Adapters"
154
- description="Attachments, speech, feedback, history, suggestions across runtimes."
155
- href="/docs/runtimes/concepts/adapters"
156
- />
157
- <Card
158
- title="Threads"
159
- description="Multi-thread support: cloud, custom database, ExternalStore."
160
- href="/docs/runtimes/concepts/threads"
161
- />
162
- <Card
163
- title="Stability"
164
- description="What unstable_ means and which APIs may change."
165
- href="/docs/runtimes/concepts/stability"
166
- />
167
- </Cards>
@@ -1,68 +0,0 @@
1
- ---
2
- title: Stability
3
- description: What unstable_ means, when APIs become stable, and how to track changes.
4
- ---
5
-
6
- assistant-ui ships some APIs with an `unstable_` prefix. This is a deliberate signal, not a bug.
7
-
8
- ## What `unstable_` means
9
-
10
- An `unstable_` prefix tells you that the API is exposed publicly so you can build against it, but the surface (signature, naming, semantics, return shape) may change in any release including patch releases.
11
-
12
- If you depend on an unstable API:
13
-
14
- - **Pin your dependency range** so an automatic minor or patch update cannot rewrite the contract under you.
15
- - **Isolate the call site** behind a small wrapper in your code so you can adapt to upstream changes in one place.
16
- - **Expect renames or removals** when the API stabilizes; the prefix gets dropped on the stable form.
17
-
18
- ## Why we ship them
19
-
20
- Three reasons something stays `unstable_`:
21
-
22
- 1. **The design is still in flux** and we want feedback on the current shape before committing.
23
- 2. **The API depends on internals** we are still rearranging, so the surface tracks that motion.
24
- 3. **The use case is real today** but stable-api expectations (semver discipline, comprehensive coverage, docs) have not been met yet.
25
-
26
- ## Currently unstable APIs
27
-
28
- A non-exhaustive list of `unstable_` exports surfaced in the runtime docs.
29
-
30
- | API | Package | Notes |
31
- | --- | --- | --- |
32
- | `unstable_createMessageConverter` | `@assistant-ui/react` | Message-format converter used by AssistantTransport and DataStream. |
33
- | `unstable_humanToolNames` | `@assistant-ui/react` | Tool names that pause the run until a result is added via `addResult`. Only available on LocalRuntime; not supported in DataStream. |
34
- | `unstable_threadListAdapter` | `@assistant-ui/react-langgraph` | LangGraph thread-list adapter slot on `useLangGraphRuntime`. |
35
- | `unstable_createLangGraphStream` | `@assistant-ui/react-langgraph` | End-to-end cancellation primitive. |
36
- | `unstable_Provider` | Various adapters | React-component face on `RemoteThreadListAdapter`. Must render children synchronously. `useRemoteThreadListRuntime` renders it when present; the `RemoteThreadList` store entry ignores it. |
37
- | `unstable_useAdapters` | Various adapters | Hook face on `RemoteThreadListAdapter`. The `RemoteThreadList` store entry calls it. `useRemoteThreadListRuntime` synthesizes a `RuntimeAdapterProvider` from it when `unstable_Provider` is omitted. |
38
- | `unstable_capabilities` | `ExternalStoreRuntime` | Toggle copy and other thread capabilities. |
39
- | `unstable_state`, `unstable_annotations`, `unstable_data` | Message metadata | Runtime-internal fields exposed for advanced use cases. |
40
- | `unstable_assistantMessageId`, `unstable_threadId`, `unstable_parentId`, `unstable_getMessage` | `ChatModelRunOptions` | Identifiers and accessors passed to your `ChatModelAdapter.run`. |
41
-
42
- Framework adapters list their own unstable surface in the corresponding adapter pages.
43
-
44
- ## When something stabilizes
45
-
46
- Stabilization usually drops the prefix. If `unstable_foo` becomes stable, the new export is `foo`, the old name is kept as a deprecated alias for at least one minor cycle, and the changelog calls out the change.
47
-
48
- Watch the [release notes](https://github.com/assistant-ui/assistant-ui/releases) and the [migration guides](/docs/migrations) for transitions.
49
-
50
- ## Related
51
-
52
- <Cards>
53
- <Card
54
- title="Architecture"
55
- description="The three-layer runtime model."
56
- href="/docs/runtimes/concepts/architecture"
57
- />
58
- <Card
59
- title="Adapters"
60
- description="The shared adapter contracts."
61
- href="/docs/runtimes/concepts/adapters"
62
- />
63
- <Card
64
- title="Threads"
65
- description="Multi-thread support patterns."
66
- href="/docs/runtimes/concepts/threads"
67
- />
68
- </Cards>