@assistant-ui/mcp-docs-server 0.1.29 → 0.1.31

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 (214) hide show
  1. package/.docs/organized/code-examples/waterfall.md +15 -7
  2. package/.docs/organized/code-examples/with-a2a.md +9 -21
  3. package/.docs/organized/code-examples/with-ag-ui.md +11 -8
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +10 -10
  5. package/.docs/organized/code-examples/with-artifacts.md +12 -10
  6. package/.docs/organized/code-examples/with-assistant-transport.md +11 -12
  7. package/.docs/organized/code-examples/with-chain-of-thought.md +83 -54
  8. package/.docs/organized/code-examples/with-cloud-standalone.md +14 -11
  9. package/.docs/organized/code-examples/with-cloud.md +9 -10
  10. package/.docs/organized/code-examples/with-custom-thread-list.md +61 -16
  11. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +17 -12
  12. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +13 -13
  13. package/.docs/organized/code-examples/with-expo.md +25 -21
  14. package/.docs/organized/code-examples/with-external-store.md +8 -8
  15. package/.docs/organized/code-examples/with-ffmpeg.md +17 -12
  16. package/.docs/organized/code-examples/with-generative-ui.md +9 -9
  17. package/.docs/organized/code-examples/with-google-adk.md +8 -8
  18. package/.docs/organized/code-examples/with-heat-graph.md +5 -5
  19. package/.docs/organized/code-examples/with-interactables.md +10 -25
  20. package/.docs/organized/code-examples/with-langchain.md +437 -0
  21. package/.docs/organized/code-examples/with-langgraph.md +16 -16
  22. package/.docs/organized/code-examples/with-livekit.md +18 -13
  23. package/.docs/organized/code-examples/with-opencode.md +105 -62
  24. package/.docs/organized/code-examples/with-parent-id-grouping.md +10 -10
  25. package/.docs/organized/code-examples/with-react-hook-form.md +220 -148
  26. package/.docs/organized/code-examples/with-react-ink.md +2 -2
  27. package/.docs/organized/code-examples/with-react-router.md +12 -12
  28. package/.docs/organized/code-examples/with-store.md +8 -5
  29. package/.docs/organized/code-examples/with-tanstack.md +10 -10
  30. package/.docs/organized/code-examples/with-tap-runtime.md +10 -6
  31. package/.docs/raw/docs/(docs)/cli.mdx +2 -1
  32. package/.docs/raw/docs/(docs)/copilots/assistant-frame.mdx +1 -0
  33. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +10 -3
  34. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +8 -3
  35. package/.docs/raw/docs/(docs)/copilots/make-assistant-visible.mdx +1 -0
  36. package/.docs/raw/docs/(docs)/copilots/model-context.mdx +1 -0
  37. package/.docs/raw/docs/(docs)/copilots/motivation.mdx +1 -0
  38. package/.docs/raw/docs/(docs)/copilots/use-assistant-instructions.mdx +1 -0
  39. package/.docs/raw/docs/(docs)/devtools.mdx +1 -0
  40. package/.docs/raw/docs/(docs)/index.mdx +1 -0
  41. package/.docs/raw/docs/(docs)/installation.mdx +1 -0
  42. package/.docs/raw/docs/(docs)/rtl.mdx +80 -0
  43. package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +34 -0
  44. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +41 -0
  45. package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +26 -0
  46. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +34 -0
  47. package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +31 -0
  48. package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +20 -0
  49. package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +26 -0
  50. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +72 -0
  51. package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +41 -0
  52. package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +48 -0
  53. package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +30 -0
  54. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +23 -0
  55. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +21 -0
  56. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +7 -0
  57. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +149 -40
  58. package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +65 -0
  59. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +2 -0
  60. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +50 -6
  61. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +15 -0
  62. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +36 -1
  63. package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +38 -0
  64. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +9 -0
  65. package/.docs/raw/docs/(reference)/migrations/v0-14.mdx +144 -6
  66. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +231 -3
  67. package/.docs/raw/docs/cloud/ai-sdk.mdx +221 -3
  68. package/.docs/raw/docs/cloud/langgraph.mdx +274 -2
  69. package/.docs/raw/docs/{(docs)/guides → guides}/attachments.mdx +41 -36
  70. package/.docs/raw/docs/guides/branching.mdx +76 -0
  71. package/.docs/raw/docs/guides/chain-of-thought.mdx +166 -0
  72. package/.docs/raw/docs/{(docs)/guides → guides}/context-api.mdx +50 -22
  73. package/.docs/raw/docs/{(docs)/guides → guides}/dictation.mdx +2 -0
  74. package/.docs/raw/docs/guides/editing.mdx +102 -0
  75. package/.docs/raw/docs/guides/index.mdx +103 -0
  76. package/.docs/raw/docs/{(docs)/guides → guides}/interactables.mdx +49 -0
  77. package/.docs/raw/docs/{(docs)/guides → guides}/latex.mdx +51 -8
  78. package/.docs/raw/docs/guides/mentions.mdx +520 -0
  79. package/.docs/raw/docs/{(docs)/guides → guides}/message-timing.mdx +8 -2
  80. package/.docs/raw/docs/{(docs)/guides → guides}/multi-agent.mdx +64 -4
  81. package/.docs/raw/docs/{(docs)/guides → guides}/quoting.mdx +10 -17
  82. package/.docs/raw/docs/guides/slash-commands.mdx +361 -0
  83. package/.docs/raw/docs/guides/speech.mdx +156 -0
  84. package/.docs/raw/docs/{(docs)/guides → guides}/suggestions.mdx +21 -83
  85. package/.docs/raw/docs/{(docs)/guides → guides}/tool-ui.mdx +108 -36
  86. package/.docs/raw/docs/{(docs)/guides → guides}/tools.mdx +131 -35
  87. package/.docs/raw/docs/{(docs)/guides → guides}/voice.mdx +39 -0
  88. package/.docs/raw/docs/ink/index.mdx +1 -3
  89. package/.docs/raw/docs/ink/migration.mdx +1 -3
  90. package/.docs/raw/docs/ink/primitives.mdx +37 -1
  91. package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +520 -0
  92. package/.docs/raw/docs/integrations/auth/better-auth.mdx +191 -0
  93. package/.docs/raw/docs/integrations/auth/clerk.mdx +172 -0
  94. package/.docs/raw/docs/integrations/auth/next-auth.mdx +196 -0
  95. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +79 -0
  96. package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +188 -0
  97. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +57 -0
  98. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +201 -0
  99. package/.docs/raw/docs/integrations/gateways/index.mdx +157 -0
  100. package/.docs/raw/docs/integrations/index.mdx +173 -0
  101. package/.docs/raw/docs/integrations/observability/helicone.mdx +130 -0
  102. package/.docs/raw/docs/integrations/observability/langfuse.mdx +156 -0
  103. package/.docs/raw/docs/integrations/observability/langsmith.mdx +146 -0
  104. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +712 -0
  105. package/.docs/raw/docs/integrations/tools/mcp.mdx +267 -0
  106. package/.docs/raw/docs/primitives/action-bar.mdx +1 -0
  107. package/.docs/raw/docs/primitives/assistant-modal.mdx +1 -0
  108. package/.docs/raw/docs/primitives/attachment.mdx +1 -0
  109. package/.docs/raw/docs/primitives/branch-picker.mdx +1 -0
  110. package/.docs/raw/docs/primitives/chain-of-thought.mdx +90 -85
  111. package/.docs/raw/docs/primitives/composer.mdx +96 -63
  112. package/.docs/raw/docs/primitives/error.mdx +1 -0
  113. package/.docs/raw/docs/primitives/index.mdx +2 -1
  114. package/.docs/raw/docs/primitives/message.mdx +68 -5
  115. package/.docs/raw/docs/primitives/selection-toolbar.mdx +1 -0
  116. package/.docs/raw/docs/primitives/suggestion.mdx +1 -0
  117. package/.docs/raw/docs/primitives/thread-list.mdx +39 -0
  118. package/.docs/raw/docs/primitives/thread.mdx +16 -13
  119. package/.docs/raw/docs/react-native/index.mdx +1 -3
  120. package/.docs/raw/docs/react-native/migration.mdx +1 -3
  121. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +396 -0
  122. package/.docs/raw/docs/runtimes/a2a/overview.mdx +60 -0
  123. package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +216 -0
  124. package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +70 -0
  125. package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +243 -0
  126. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +123 -0
  127. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +52 -0
  128. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +71 -131
  129. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +69 -63
  130. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +365 -101
  131. package/.docs/raw/docs/runtimes/concepts/adapters.mdx +265 -0
  132. package/.docs/raw/docs/runtimes/concepts/architecture.mdx +125 -0
  133. package/.docs/raw/docs/runtimes/concepts/stability.mdx +67 -0
  134. package/.docs/raw/docs/runtimes/concepts/threads.mdx +428 -0
  135. package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +703 -0
  136. package/.docs/raw/docs/runtimes/custom/data-stream.mdx +323 -0
  137. package/.docs/raw/docs/runtimes/custom/external-store.mdx +253 -1236
  138. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +746 -0
  139. package/.docs/raw/docs/runtimes/custom/overview.mdx +71 -0
  140. package/.docs/raw/docs/runtimes/google-adk/api.mdx +256 -0
  141. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +717 -0
  142. package/.docs/raw/docs/runtimes/google-adk/overview.mdx +69 -0
  143. package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +229 -0
  144. package/.docs/raw/docs/runtimes/langchain.mdx +533 -0
  145. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +305 -0
  146. package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +104 -0
  147. package/.docs/raw/docs/runtimes/langgraph/overview.mdx +84 -0
  148. package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +496 -0
  149. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +127 -0
  150. package/.docs/raw/docs/runtimes/langgraph/threads.mdx +113 -0
  151. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +3 -3
  152. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -23
  153. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +1 -1
  154. package/.docs/raw/docs/runtimes/opencode/hooks.mdx +191 -0
  155. package/.docs/raw/docs/runtimes/opencode/overview.mdx +48 -0
  156. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +119 -0
  157. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +74 -198
  158. package/.docs/raw/docs/ui/accordion.mdx +1 -0
  159. package/.docs/raw/docs/ui/assistant-modal.mdx +1 -0
  160. package/.docs/raw/docs/ui/assistant-sidebar.mdx +1 -0
  161. package/.docs/raw/docs/ui/attachment.mdx +1 -0
  162. package/.docs/raw/docs/ui/badge.mdx +1 -0
  163. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +200 -0
  164. package/.docs/raw/docs/ui/context-display.mdx +1 -0
  165. package/.docs/raw/docs/ui/diff-viewer.mdx +1 -0
  166. package/.docs/raw/docs/ui/directive-text.mdx +114 -0
  167. package/.docs/raw/docs/ui/file.mdx +1 -0
  168. package/.docs/raw/docs/ui/image.mdx +1 -0
  169. package/.docs/raw/docs/ui/markdown.mdx +2 -14
  170. package/.docs/raw/docs/ui/mermaid.mdx +1 -0
  171. package/.docs/raw/docs/ui/message-timing.mdx +3 -2
  172. package/.docs/raw/docs/ui/model-selector.mdx +1 -0
  173. package/.docs/raw/docs/ui/part-grouping.mdx +325 -313
  174. package/.docs/raw/docs/ui/quote.mdx +1 -0
  175. package/.docs/raw/docs/ui/reasoning.mdx +69 -32
  176. package/.docs/raw/docs/ui/scrollbar.mdx +1 -0
  177. package/.docs/raw/docs/ui/select.mdx +1 -0
  178. package/.docs/raw/docs/ui/sources.mdx +1 -0
  179. package/.docs/raw/docs/ui/streamdown.mdx +1 -0
  180. package/.docs/raw/docs/ui/syntax-highlighting.mdx +1 -0
  181. package/.docs/raw/docs/ui/tabs.mdx +1 -0
  182. package/.docs/raw/docs/ui/thread-list.mdx +17 -0
  183. package/.docs/raw/docs/ui/thread.mdx +56 -1
  184. package/.docs/raw/docs/ui/tool-fallback.mdx +1 -0
  185. package/.docs/raw/docs/ui/tool-group.mdx +39 -11
  186. package/.docs/raw/docs/ui/voice.mdx +1 -0
  187. package/.docs/raw/docs/utilities/heat-graph.mdx +1 -0
  188. package/.docs/raw/docs/utilities/react-o11y.mdx +278 -0
  189. package/.docs/raw/docs/utilities/tw-shimmer.mdx +1 -0
  190. package/dist/utils/logger.js +1 -1
  191. package/dist/utils/logger.js.map +1 -1
  192. package/package.json +4 -4
  193. package/src/tools/tests/path-traversal.test.ts +1 -1
  194. package/src/utils/logger.ts +1 -1
  195. package/.docs/raw/docs/(docs)/guides/branching.mdx +0 -65
  196. package/.docs/raw/docs/(docs)/guides/chain-of-thought.mdx +0 -164
  197. package/.docs/raw/docs/(docs)/guides/editing.mdx +0 -66
  198. package/.docs/raw/docs/(docs)/guides/mentions.mdx +0 -406
  199. package/.docs/raw/docs/(docs)/guides/slash-commands.mdx +0 -275
  200. package/.docs/raw/docs/(docs)/guides/speech.mdx +0 -38
  201. package/.docs/raw/docs/runtimes/a2a/index.mdx +0 -298
  202. package/.docs/raw/docs/runtimes/assistant-transport.mdx +0 -1033
  203. package/.docs/raw/docs/runtimes/custom/custom-thread-list.mdx +0 -268
  204. package/.docs/raw/docs/runtimes/custom/local.mdx +0 -1464
  205. package/.docs/raw/docs/runtimes/data-stream.mdx +0 -422
  206. package/.docs/raw/docs/runtimes/google-adk/index.mdx +0 -686
  207. package/.docs/raw/docs/runtimes/helicone.mdx +0 -61
  208. package/.docs/raw/docs/runtimes/langgraph/index.mdx +0 -607
  209. package/.docs/raw/docs/runtimes/langgraph/tutorial/index.mdx +0 -12
  210. package/.docs/raw/docs/runtimes/langserve.mdx +0 -116
  211. package/.docs/raw/docs/runtimes/mastra/full-stack-integration.mdx +0 -218
  212. package/.docs/raw/docs/runtimes/mastra/overview.mdx +0 -18
  213. package/.docs/raw/docs/runtimes/mastra/separate-server-integration.mdx +0 -217
  214. package/.docs/raw/docs/ui/mention.mdx +0 -168
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: Overview
3
+ description: Runtime action and state references used by useAui and useAuiState.
4
+ ---
5
+
6
+ {/* AUTO-GENERATED by scripts/generate-api-reference-overviews.mts */}
7
+ {/* Do not edit manually. */}
8
+
9
+ Runtime state pages document the objects exposed through `useAui` and `useAuiState`. Use this section when you need to control assistant-ui programmatically or inspect the exact state available in a context.
10
+
11
+ ## Pages
12
+
13
+ <Cards>
14
+ <Card title={"AssistantRuntime"} href={"/docs/api-reference/runtimes/assistant-runtime"}>
15
+ {"Root runtime for managing threads, tool UIs, and assistant state."}
16
+ </Card>
17
+ <Card title={"AttachmentRuntime"} href={"/docs/api-reference/runtimes/attachment-runtime"}>
18
+ {"Hooks for accessing attachment state in composer and messages."}
19
+ </Card>
20
+ <Card title={"ComposerRuntime"} href={"/docs/api-reference/runtimes/composer-runtime"}>
21
+ {"Runtime for programmatically controlling the message composer."}
22
+ </Card>
23
+ <Card title={"MessagePartRuntime"} href={"/docs/api-reference/runtimes/message-part-runtime"}>
24
+ {"Hook for accessing message part state within parts."}
25
+ </Card>
26
+ <Card title={"MessageRuntime"} href={"/docs/api-reference/runtimes/message-runtime"}>
27
+ {"Hooks for accessing message state and edit composer."}
28
+ </Card>
29
+ <Card title={"ThreadListItemRuntime"} href={"/docs/api-reference/runtimes/thread-list-item-runtime"}>
30
+ {"Runtime for managing individual thread list items."}
31
+ </Card>
32
+ <Card title={"ThreadListRuntime"} href={"/docs/api-reference/runtimes/thread-list-runtime"}>
33
+ {"Runtime for accessing and managing the list of threads."}
34
+ </Card>
35
+ <Card title={"ThreadRuntime"} href={"/docs/api-reference/runtimes/thread-runtime"}>
36
+ {"Runtime for thread state, messages, and viewport management."}
37
+ </Card>
38
+ </Cards>
@@ -18,6 +18,13 @@ const aui = useAui();
18
18
  await aui.threads().switchToNewThread();
19
19
  await aui.threads().switchToThread(threadId);
20
20
 
21
+ // Re-fetch the thread list from the remote adapter
22
+ // (e.g. after async auth completes)
23
+ await aui.threads().reload();
24
+
25
+ // Append the next page of threads when the adapter returned a `nextCursor`
26
+ await aui.threads().loadMore();
27
+
21
28
  // Access the main thread runtime
22
29
  const mainThread = aui.threads().main;
23
30
 
@@ -47,6 +54,8 @@ import { useAuiState } from "@assistant-ui/react";
47
54
 
48
55
  const threads = useAuiState((s) => s.threads.threadIds);
49
56
  const isLoading = useAuiState((s) => s.threads.isLoading);
57
+ const hasMore = useAuiState((s) => s.threads.hasMore);
58
+ const isLoadingMore = useAuiState((s) => s.threads.isLoadingMore);
50
59
  ```
51
60
 
52
61
  <ParametersTable {...ThreadListState} />
@@ -1,8 +1,139 @@
1
1
  ---
2
2
  title: Migration to v0.14
3
- description: Primitives migrate from components prop to children render functions.
3
+ description: Drops APIs deprecated since v0.11/v0.12, and primitives migrate from components prop to children render functions.
4
4
  ---
5
5
 
6
+ Version 0.14 finishes deprecation cycles started in v0.11 and v0.12, and replaces the `components` prop on primitives with a children render function pattern. If your app is on v0.13 and free of deprecation warnings, the only required change is the children API migration.
7
+
8
+ ## Automatic Migration
9
+
10
+ The codemod that ships with the CLI handles the v0.12 hook renames (`useAssistantApi` → `useAui`, etc.) which are also removed in v0.14:
11
+
12
+ ```bash
13
+ npx assistant-ui@latest upgrade
14
+ ```
15
+
16
+ The other removals listed below are simple renames you can apply with find-and-replace.
17
+
18
+ ## Hook Aliases Removed
19
+
20
+ These thin aliases existed only for backwards compatibility:
21
+
22
+ | Removed | Replacement |
23
+ | ------------------------------------ | ---------------------------- |
24
+ | `useAssistantApi` | `useAui` |
25
+ | `useAssistantState` | `useAuiState` |
26
+ | `useAssistantEvent` | `useAuiEvent` |
27
+ | `AssistantIf` | `AuiIf` |
28
+ | `useLocalThreadRuntime` | `useLocalRuntime` |
29
+ | `unstable_useRemoteThreadListRuntime`| `useRemoteThreadListRuntime` |
30
+ | `unstable_useCloudThreadListAdapter` | `useCloudThreadListAdapter` |
31
+ | `unstable_RemoteThreadListAdapter` | `RemoteThreadListAdapter` |
32
+ | `unstable_InMemoryThreadListAdapter` | `InMemoryThreadListAdapter` |
33
+
34
+ ## Runtime API Cleanups
35
+
36
+ ### `AssistantRuntime`
37
+
38
+ | Removed | Replacement |
39
+ | ---------------------------------------- | ----------------------------------------- |
40
+ | `runtime.threadList` | `runtime.threads` |
41
+ | `runtime.switchToNewThread()` | `runtime.threads.switchToNewThread()` |
42
+ | `runtime.switchToThread(id)` | `runtime.threads.switchToThread(id)` |
43
+ | `runtime.registerModelConfigProvider(p)` | `runtime.registerModelContextProvider(p)` |
44
+ | `runtime.reset({ initialMessages })` | `runtime.thread.reset(initialMessages)` |
45
+
46
+ ### `ThreadRuntime`
47
+
48
+ | Removed | Replacement |
49
+ | ------------------------------------------ | ----------------------------------- |
50
+ | `thread.startRun(parentId)` (positional) | `thread.startRun({ parentId })` |
51
+ | `thread.unstable_resumeRun(config)` | `thread.resumeRun(config)` |
52
+ | `thread.unstable_loadExternalState(state)` | `thread.importExternalState(state)` |
53
+ | `thread.getModelConfig()` | `thread.getModelContext()` |
54
+
55
+ ### `MessageState` / `MessageRuntime`
56
+
57
+ The duplicate top-level `submittedFeedback` field has been removed. It has always been mirrored from `message.metadata.submittedFeedback`, which remains the source of truth:
58
+
59
+ ```tsx
60
+ // Before
61
+ useAuiState((s) => s.message.submittedFeedback);
62
+
63
+ // After
64
+ useAuiState((s) => s.message.metadata.submittedFeedback);
65
+ ```
66
+
67
+ ### `ChatModelRunOptions`
68
+
69
+ If you wrote a custom `ChatModelAdapter`, the legacy alias `options.config` (which mirrored `options.context`) is gone:
70
+
71
+ ```ts
72
+ // Before
73
+ const adapter: ChatModelAdapter = {
74
+ async run({ messages, config }) {
75
+ /* config.tools, config.config, ... */
76
+ },
77
+ };
78
+
79
+ // After
80
+ const adapter: ChatModelAdapter = {
81
+ async run({ messages, context }) {
82
+ /* context.tools, context.config, ... */
83
+ },
84
+ };
85
+ ```
86
+
87
+ ## External Store Helpers
88
+
89
+ `getExternalStoreMessage` (singular) has been removed. Use `getExternalStoreMessages` (plural), which always returns an array — even when only one source message is bound:
90
+
91
+ ```ts
92
+ // Before
93
+ const original = getExternalStoreMessage<MyMessage>(threadMessage);
94
+
95
+ // After
96
+ const [original] = getExternalStoreMessages<MyMessage>(threadMessage);
97
+ ```
98
+
99
+ ## Assistant Transport Helpers
100
+
101
+ `toAISDKTools` and `getEnabledTools` (re-exported from `@assistant-ui/react`) have been removed. Both wrapped functionality that's now exposed directly by `assistant-stream`:
102
+
103
+ ```ts
104
+ // Before
105
+ import { toAISDKTools } from "@assistant-ui/react";
106
+ const schemas = toAISDKTools(tools);
107
+
108
+ // After
109
+ import { toToolsJSONSchema } from "assistant-stream";
110
+ const schemas = toToolsJSONSchema(tools);
111
+ ```
112
+
113
+ `toToolsJSONSchema` filters out `disabled` and `backend` tools by default. To replicate the old `toAISDKTools` behavior exactly (include all tools regardless), pass `{ filter: () => true }`.
114
+
115
+ ## react-langgraph
116
+
117
+ `useLangGraphRuntime`'s `onSwitchToThread` option has been removed. Use `load`, which has the same signature plus an optional `AbortSignal`:
118
+
119
+ ```ts
120
+ // Before
121
+ useLangGraphRuntime({
122
+ stream,
123
+ onSwitchToThread: async (threadId) => {
124
+ return await fetchThread(threadId);
125
+ },
126
+ });
127
+
128
+ // After
129
+ useLangGraphRuntime({
130
+ stream,
131
+ load: async (threadId, { signal } = {}) => {
132
+ return await fetchThread(threadId, { signal });
133
+ },
134
+ });
135
+ ```
136
+
6
137
  ## Children API for Primitives
7
138
 
8
139
  Version 0.14 replaces the `components` prop on primitives with a children render function pattern. This gives you full control over rendering with simple inline logic.
@@ -150,10 +281,17 @@ When using the children API, tool-call parts include `addResult` and `resume` me
150
281
 
151
282
  The `components` prop is still supported on all primitives but is deprecated and will be removed in a future version.
152
283
 
153
- ## Getting Help
284
+ ## Still Deprecated (not removed)
285
+
286
+ Some APIs marked `@deprecated` are intentionally kept for one more release to give downstream runtimes time to migrate:
287
+
288
+ - `ThreadState.threadId` and `ThreadState.metadata` — use `useThreadListItem()` (see [v0.12 guide](/docs/migrations/v0-12)). Will be removed in a future minor release.
289
+ - Legacy context hooks under `legacy-runtime/hooks/*` (`useThreadRuntime`, `useMessageRuntime`, etc.) — replaced by `useAui()` / `useAuiState()` in v0.12. The codemod migrates these.
290
+ - Primitive `If` components (`ThreadIf`, `MessageIf`, `ComposerIf`, `ThreadEmpty`) — replaced by `AuiIf`. The codemod migrates these.
154
291
 
155
- If you encounter issues during migration:
292
+ You'll continue to see deprecation warnings on these; expect removal in a future minor release.
293
+
294
+ ## Getting Help
156
295
 
157
- 1. Check the updated API documentation for detailed examples
158
- 2. Review the example applications in the repository
159
- 3. Report issues at https://github.com/assistant-ui/assistant-ui/issues
296
+ - File issues at https://github.com/assistant-ui/assistant-ui/issues
297
+ - See the [deprecation policy](/docs/migrations/deprecation-policy) for the support window
@@ -55,6 +55,9 @@ Create a new project in the [assistant-cloud dashboard](https://cloud.assistant-
55
55
 
56
56
  Add the following environment variables to your project:
57
57
 
58
+ <PlatformTabs>
59
+ <Tab value="React">
60
+
58
61
  ```bash title=".env.local"
59
62
  # Frontend API URL from your cloud project settings
60
63
  NEXT_PUBLIC_ASSISTANT_BASE_URL=https://proj-[YOUR-ID].assistant-api.com
@@ -63,6 +66,31 @@ NEXT_PUBLIC_ASSISTANT_BASE_URL=https://proj-[YOUR-ID].assistant-api.com
63
66
  ASSISTANT_API_KEY=your-api-key-here
64
67
  ```
65
68
 
69
+ </Tab>
70
+ <Tab value="React Native">
71
+
72
+ ```bash title=".env"
73
+ # Client API URL from your cloud project settings
74
+ EXPO_PUBLIC_ASSISTANT_BASE_URL=https://proj-[YOUR-ID].assistant-api.com
75
+
76
+ # API key for server-side operations; do not ship this in your app bundle
77
+ ASSISTANT_API_KEY=your-api-key-here
78
+ ```
79
+
80
+ </Tab>
81
+ <Tab value="React Ink">
82
+
83
+ ```bash title=".env"
84
+ # Client API URL from your cloud project settings
85
+ ASSISTANT_BASE_URL=https://proj-[YOUR-ID].assistant-api.com
86
+
87
+ # API key for server-side operations; do not ship this in your CLI bundle
88
+ ASSISTANT_API_KEY=your-api-key-here
89
+ ```
90
+
91
+ </Tab>
92
+ </PlatformTabs>
93
+
66
94
  </Step>
67
95
 
68
96
  <Step>
@@ -71,8 +99,24 @@ ASSISTANT_API_KEY=your-api-key-here
71
99
 
72
100
  Install the required packages:
73
101
 
102
+ <PlatformTabs>
103
+ <Tab value="React">
104
+
74
105
  <InstallCommand npm={["@assistant-ui/react", "@assistant-ui/react-ai-sdk"]} />
75
106
 
107
+ </Tab>
108
+ <Tab value="React Native">
109
+
110
+ <InstallCommand expo={["@assistant-ui/react-native", "@assistant-ui/react-ai-sdk", "assistant-cloud"]} />
111
+
112
+ </Tab>
113
+ <Tab value="React Ink">
114
+
115
+ <InstallCommand npm={["@assistant-ui/react-ink", "@assistant-ui/react-ai-sdk", "assistant-cloud", "ink", "react"]} />
116
+
117
+ </Tab>
118
+ </PlatformTabs>
119
+
76
120
  </Step>
77
121
 
78
122
  <Step>
@@ -81,6 +125,9 @@ Install the required packages:
81
125
 
82
126
  Create a client-side AssistantCloud instance and integrate it with your AI SDK runtime:
83
127
 
128
+ <PlatformTabs>
129
+ <Tab value="React">
130
+
84
131
  ```tsx title="app/chat/page.tsx"
85
132
  "use client";
86
133
 
@@ -115,6 +162,133 @@ export default function ChatPage() {
115
162
  }
116
163
  ```
117
164
 
165
+ </Tab>
166
+ <Tab value="React Native">
167
+
168
+ ```tsx title="app/chat.tsx"
169
+ import { useMemo } from "react";
170
+ import { Text, View } from "react-native";
171
+ import {
172
+ AssistantRuntimeProvider,
173
+ ThreadListItemPrimitive,
174
+ ThreadListPrimitive,
175
+ } from "@assistant-ui/react-native";
176
+ import { AssistantCloud } from "assistant-cloud";
177
+ import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
178
+ import { Thread } from "@/components/assistant-ui/thread";
179
+
180
+ async function getAssistantToken() {
181
+ // Return a user token from your auth provider.
182
+ return "...";
183
+ }
184
+
185
+ function ThreadList() {
186
+ return (
187
+ <ThreadListPrimitive.Root>
188
+ <ThreadListPrimitive.New>
189
+ <Text>New chat</Text>
190
+ </ThreadListPrimitive.New>
191
+ <ThreadListPrimitive.Items
192
+ renderItem={({ threadId }) => (
193
+ <ThreadListItemPrimitive.Root key={threadId}>
194
+ <ThreadListItemPrimitive.Trigger>
195
+ <ThreadListItemPrimitive.Title fallback="New conversation" />
196
+ </ThreadListItemPrimitive.Trigger>
197
+ </ThreadListItemPrimitive.Root>
198
+ )}
199
+ />
200
+ </ThreadListPrimitive.Root>
201
+ );
202
+ }
203
+
204
+ export default function ChatScreen() {
205
+ const cloud = useMemo(
206
+ () =>
207
+ new AssistantCloud({
208
+ baseUrl: process.env.EXPO_PUBLIC_ASSISTANT_BASE_URL!,
209
+ authToken: getAssistantToken,
210
+ }),
211
+ [],
212
+ );
213
+
214
+ const runtime = useChatRuntime({ cloud });
215
+
216
+ return (
217
+ <AssistantRuntimeProvider runtime={runtime}>
218
+ <View style={{ flex: 1 }}>
219
+ <ThreadList />
220
+ <Thread />
221
+ </View>
222
+ </AssistantRuntimeProvider>
223
+ );
224
+ }
225
+ ```
226
+
227
+ </Tab>
228
+ <Tab value="React Ink">
229
+
230
+ ```tsx title="chat.tsx"
231
+ import { useMemo } from "react";
232
+ import { Box, Text } from "ink";
233
+ import {
234
+ AssistantRuntimeProvider,
235
+ ThreadListItemPrimitive,
236
+ ThreadListPrimitive,
237
+ } from "@assistant-ui/react-ink";
238
+ import { AssistantCloud } from "assistant-cloud";
239
+ import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
240
+ import { Thread } from "./components/thread.js";
241
+
242
+ async function getAssistantToken() {
243
+ // Return a user token from your auth provider.
244
+ return "...";
245
+ }
246
+
247
+ function ThreadList() {
248
+ return (
249
+ <ThreadListPrimitive.Root>
250
+ <ThreadListPrimitive.New>
251
+ <Text color="green">[New chat]</Text>
252
+ </ThreadListPrimitive.New>
253
+ <ThreadListPrimitive.Items
254
+ renderItem={({ threadId }) => (
255
+ <ThreadListItemPrimitive.Root key={threadId}>
256
+ <ThreadListItemPrimitive.Trigger>
257
+ <ThreadListItemPrimitive.Title fallback="New conversation" />
258
+ </ThreadListItemPrimitive.Trigger>
259
+ </ThreadListItemPrimitive.Root>
260
+ )}
261
+ />
262
+ </ThreadListPrimitive.Root>
263
+ );
264
+ }
265
+
266
+ export function Chat() {
267
+ const cloud = useMemo(
268
+ () =>
269
+ new AssistantCloud({
270
+ baseUrl: process.env.ASSISTANT_BASE_URL!,
271
+ authToken: getAssistantToken,
272
+ }),
273
+ [],
274
+ );
275
+
276
+ const runtime = useChatRuntime({ cloud });
277
+
278
+ return (
279
+ <AssistantRuntimeProvider runtime={runtime}>
280
+ <Box flexDirection="column">
281
+ <ThreadList />
282
+ <Thread />
283
+ </Box>
284
+ </AssistantRuntimeProvider>
285
+ );
286
+ }
287
+ ```
288
+
289
+ </Tab>
290
+ </PlatformTabs>
291
+
118
292
  </Step>
119
293
 
120
294
  </Steps>
@@ -166,7 +340,7 @@ export default function ChatPage() {
166
340
  name: "history",
167
341
  type: "ThreadHistoryAdapter",
168
342
  description:
169
- "Adapter for loading and saving thread history. Used to restore previous messages when switching threads.",
343
+ "Adapter for loading and saving thread history. Used to restore previous messages when switching threads. The adapter must implement `withFormat` when used with AI SDK — see [Persisting Chat History](/docs/runtimes/ai-sdk/v6#persisting-chat-history).",
170
344
  },
171
345
  ],
172
346
  },
@@ -213,7 +387,7 @@ export async function POST(req: Request) {
213
387
  const { messages } = await req.json();
214
388
 
215
389
  const result = streamText({
216
- model: openai("gpt-4o-mini"),
390
+ model: openai("gpt-5.4-mini"),
217
391
  messages,
218
392
  });
219
393
 
@@ -264,7 +438,10 @@ See the [AI SDK Telemetry guide](/docs/cloud/ai-sdk#sub-agent-model-tracking) fo
264
438
 
265
439
  ## Authentication
266
440
 
267
- The example above uses anonymous mode (browser session-based user ID) via the env var. For production apps with user accounts, pass an explicit cloud instance:
441
+ The React example above uses anonymous mode for quick demos. For production apps with user accounts, pass an explicit cloud instance with a token from your auth provider:
442
+
443
+ <PlatformTabs>
444
+ <Tab value="React">
268
445
 
269
446
  ```tsx
270
447
  import { useMemo } from "react";
@@ -285,6 +462,57 @@ function Chat() {
285
462
  }
286
463
  ```
287
464
 
465
+ </Tab>
466
+ <Tab value="React Native">
467
+
468
+ ```tsx
469
+ import { useMemo } from "react";
470
+ import { AssistantCloud } from "assistant-cloud";
471
+ import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
472
+
473
+ async function getAssistantToken() {
474
+ // Return a user token from your native auth provider.
475
+ return "...";
476
+ }
477
+
478
+ function Chat() {
479
+ const cloud = useMemo(() => new AssistantCloud({
480
+ baseUrl: process.env.EXPO_PUBLIC_ASSISTANT_BASE_URL!,
481
+ authToken: getAssistantToken,
482
+ }), []);
483
+
484
+ const runtime = useChatRuntime({ cloud });
485
+ // ...
486
+ }
487
+ ```
488
+
489
+ </Tab>
490
+ <Tab value="React Ink">
491
+
492
+ ```tsx
493
+ import { useMemo } from "react";
494
+ import { AssistantCloud } from "assistant-cloud";
495
+ import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
496
+
497
+ async function getAssistantToken() {
498
+ // Return a user token from your CLI auth flow.
499
+ return "...";
500
+ }
501
+
502
+ function Chat() {
503
+ const cloud = useMemo(() => new AssistantCloud({
504
+ baseUrl: process.env.ASSISTANT_BASE_URL!,
505
+ authToken: getAssistantToken,
506
+ }), []);
507
+
508
+ const runtime = useChatRuntime({ cloud });
509
+ // ...
510
+ }
511
+ ```
512
+
513
+ </Tab>
514
+ </PlatformTabs>
515
+
288
516
  See the [Cloud Authorization](/docs/cloud/authorization) guide for other auth providers.
289
517
 
290
518