@assistant-ui/mcp-docs-server 0.1.32 → 0.1.34

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 (134) hide show
  1. package/.docs/organized/code-examples/waterfall.md +20 -22
  2. package/.docs/organized/code-examples/with-a2a.md +24 -24
  3. package/.docs/organized/code-examples/with-ag-ui.md +30 -25
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +11 -9
  5. package/.docs/organized/code-examples/with-artifacts.md +49 -37
  6. package/.docs/organized/code-examples/with-assistant-transport.md +63 -51
  7. package/.docs/organized/code-examples/with-browser-extension.md +22 -10
  8. package/.docs/organized/code-examples/with-chain-of-thought.md +406 -87
  9. package/.docs/organized/code-examples/with-cloud-standalone.md +25 -24
  10. package/.docs/organized/code-examples/with-cloud.md +11 -9
  11. package/.docs/organized/code-examples/with-custom-thread-list.md +14 -12
  12. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +23 -21
  13. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +14 -13
  14. package/.docs/organized/code-examples/with-expo.md +44 -29
  15. package/.docs/organized/code-examples/with-external-store.md +9 -7
  16. package/.docs/organized/code-examples/with-ffmpeg.md +322 -285
  17. package/.docs/organized/code-examples/with-generative-ui.md +1066 -256
  18. package/.docs/organized/code-examples/with-google-adk.md +10 -8
  19. package/.docs/organized/code-examples/with-heat-graph.md +13 -11
  20. package/.docs/organized/code-examples/with-image-generation.md +19 -17
  21. package/.docs/organized/code-examples/with-interactables.md +317 -239
  22. package/.docs/organized/code-examples/with-langchain.md +14 -12
  23. package/.docs/organized/code-examples/with-langgraph.md +91 -83
  24. package/.docs/organized/code-examples/with-livekit.md +24 -22
  25. package/.docs/organized/code-examples/with-mcp.md +18 -12
  26. package/.docs/organized/code-examples/with-opencode.md +66 -66
  27. package/.docs/organized/code-examples/with-react-hook-form.md +19 -17
  28. package/.docs/organized/code-examples/with-react-ink.md +297 -102
  29. package/.docs/organized/code-examples/with-react-router.md +17 -15
  30. package/.docs/organized/code-examples/with-resumable-stream.md +15 -14
  31. package/.docs/organized/code-examples/with-store.md +78 -76
  32. package/.docs/organized/code-examples/with-tanstack.md +13 -14
  33. package/.docs/organized/code-examples/with-tap-runtime.md +26 -24
  34. package/.docs/raw/docs/(docs)/architecture.mdx +94 -42
  35. package/.docs/raw/docs/(docs)/cli.mdx +1 -2
  36. package/.docs/raw/docs/(docs)/installation.mdx +1 -1
  37. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +5 -1
  38. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +15 -15
  39. package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +14 -1
  40. package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
  41. package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
  42. package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
  43. package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +41 -41
  44. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +19 -1
  45. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +122 -122
  46. package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +43 -2
  47. package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +6 -0
  48. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +4 -6
  49. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +30 -0
  50. package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +20 -3
  51. package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +8 -8
  52. package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +52 -4
  53. package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +100 -10
  54. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +7 -59
  55. package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -2
  56. package/.docs/raw/docs/{(docs)/copilots → copilots}/model-context.mdx +34 -26
  57. package/.docs/raw/docs/{(docs)/copilots → copilots}/motivation.mdx +32 -26
  58. package/.docs/raw/docs/guides/chain-of-thought.mdx +7 -9
  59. package/.docs/raw/docs/guides/context-api.mdx +2 -1
  60. package/.docs/raw/docs/guides/index.mdx +3 -12
  61. package/.docs/raw/docs/guides/mentions.mdx +4 -4
  62. package/.docs/raw/docs/guides/slash-commands.mdx +1 -1
  63. package/.docs/raw/docs/guides/suggestions.mdx +1 -1
  64. package/.docs/raw/docs/ink/adapters.mdx +23 -1
  65. package/.docs/raw/docs/ink/hooks.mdx +101 -85
  66. package/.docs/raw/docs/ink/migration.mdx +1 -1
  67. package/.docs/raw/docs/ink/primitives.mdx +2 -2
  68. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +1 -1
  69. package/.docs/raw/docs/integrations/index.mdx +2 -2
  70. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
  71. package/.docs/raw/docs/migrations/toolkit-tools.mdx +232 -0
  72. package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
  73. package/.docs/raw/docs/primitives/message.mdx +9 -10
  74. package/.docs/raw/docs/react-native/hooks.mdx +62 -79
  75. package/.docs/raw/docs/react-native/migration.mdx +1 -1
  76. package/.docs/raw/docs/react-native/primitives.mdx +2 -2
  77. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +3 -0
  78. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +41 -0
  79. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +122 -1
  80. package/.docs/raw/docs/runtimes/concepts/architecture.mdx +46 -4
  81. package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
  82. package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +54 -12
  83. package/.docs/raw/docs/runtimes/custom/external-store.mdx +62 -4
  84. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +30 -7
  85. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
  86. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
  87. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +14 -1
  88. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
  89. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
  90. package/.docs/raw/docs/tools/backend.mdx +144 -0
  91. package/.docs/raw/docs/tools/defining-tools.mdx +538 -0
  92. package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
  93. package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
  94. package/.docs/raw/docs/tools/index.mdx +71 -0
  95. package/.docs/raw/docs/{guides → tools}/interactables.mdx +1 -1
  96. package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +145 -50
  97. package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +15 -17
  98. package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
  99. package/.docs/raw/docs/{integrations/tools/react-mcp.mdx → tools/user-managed-mcp.mdx} +7 -7
  100. package/.docs/raw/docs/ui/directive-text.mdx +3 -3
  101. package/.docs/raw/docs/ui/mcp-config.mdx +4 -4
  102. package/.docs/raw/docs/ui/mermaid.mdx +16 -9
  103. package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
  104. package/.docs/raw/docs/ui/reasoning.mdx +4 -5
  105. package/.docs/raw/docs/ui/tool-fallback.mdx +16 -0
  106. package/.docs/raw/docs/ui/tool-group.mdx +5 -6
  107. package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
  108. package/.docs/raw/docs/utilities/react-o11y.mdx +2 -2
  109. package/dist/constants.js.map +1 -1
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js.map +1 -1
  112. package/dist/prepare-docs/code-examples.d.ts.map +1 -1
  113. package/dist/prepare-docs/code-examples.js.map +1 -1
  114. package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
  115. package/dist/prepare-docs/copy-raw.js.map +1 -1
  116. package/dist/prepare-docs/prepare.js.map +1 -1
  117. package/dist/stdio.js.map +1 -1
  118. package/dist/tools/docs.js.map +1 -1
  119. package/dist/tools/examples.js.map +1 -1
  120. package/dist/tools/tests/test-setup.js.map +1 -1
  121. package/dist/utils/mdx.js.map +1 -1
  122. package/dist/utils/paths.d.ts.map +1 -1
  123. package/dist/utils/paths.js.map +1 -1
  124. package/package.json +5 -5
  125. package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
  126. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
  127. package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
  128. package/.docs/raw/docs/guides/generative-ui.mdx +0 -142
  129. package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
  130. package/.docs/raw/docs/guides/tools.mdx +0 -736
  131. /package/.docs/raw/docs/{(docs)/copilots → copilots}/assistant-frame.mdx +0 -0
  132. /package/.docs/raw/docs/{(docs)/copilots → copilots}/make-assistant-visible.mdx +0 -0
  133. /package/.docs/raw/docs/{(docs)/copilots → copilots}/use-assistant-instructions.mdx +0 -0
  134. /package/.docs/raw/docs/{guides → tools}/mcp-apps.mdx +0 -0
@@ -149,8 +149,8 @@ export default function RootLayout({
149
149
  <html lang="en">
150
150
  <body className="font-sans antialiased">
151
151
  <div className="flex h-screen flex-col">
152
- <header className="border-b bg-background px-4 py-2">
153
- <h1 className="font-semibold text-lg">
152
+ <header className="bg-background border-b px-4 py-2">
153
+ <h1 className="text-lg font-semibold">
154
154
  Assistant Transport Example
155
155
  </h1>
156
156
  </header>
@@ -170,9 +170,11 @@ export default function RootLayout({
170
170
 
171
171
  import {
172
172
  AssistantRuntimeProvider,
173
+ defineToolkit,
174
+ Tools,
173
175
  type AssistantTransportConnectionMetadata,
174
- makeAssistantTool,
175
176
  unstable_createMessageConverter as createMessageConverter,
177
+ useAui,
176
178
  useAssistantTransportRuntime,
177
179
  } from "@assistant-ui/react";
178
180
  import {
@@ -182,46 +184,53 @@ import {
182
184
  import type { ReactNode } from "react";
183
185
  import { z } from "zod";
184
186
 
185
- // Frontend tool with execute function
186
- const WeatherTool = makeAssistantTool({
187
- type: "frontend",
188
- toolName: "get_weather",
189
- description: "Get the current weather for a city",
190
- parameters: z.object({
191
- location: z.string().describe("The city to get weather for"),
192
- unit: z
193
- .enum(["celsius", "fahrenheit"])
194
- .optional()
195
- .describe("Temperature unit"),
196
- }),
197
- execute: async ({ location, unit = "celsius" }) => {
198
- console.log(`Getting weather for ${location} in ${unit}`);
199
- // Simulate API call
200
- await new Promise((resolve) => setTimeout(resolve, 1000));
201
-
202
- const temp = Math.floor(Math.random() * 30) + 10;
203
- const conditions = ["sunny", "cloudy", "rainy", "partly cloudy"];
204
- const condition = conditions[Math.floor(Math.random() * conditions.length)];
205
-
206
- return {
207
- location,
208
- temperature: temp,
209
- unit,
210
- condition,
211
- humidity: Math.floor(Math.random() * 40) + 40,
212
- windSpeed: Math.floor(Math.random() * 20) + 5,
213
- };
214
- },
215
- streamCall: async (reader) => {
216
- console.log("streamCall", reader);
217
- const city = await reader.args.get("location");
218
- console.log("location", city);
187
+ const toolkit = defineToolkit({
188
+ get_weather: {
189
+ type: "frontend",
190
+ description: "Get the current weather for a city",
191
+ parameters: z.object({
192
+ location: z.string().describe("The city to get weather for"),
193
+ unit: z
194
+ .enum(["celsius", "fahrenheit"])
195
+ .optional()
196
+ .describe("Temperature unit"),
197
+ }),
198
+ execute: async ({ location, unit = "celsius" }) => {
199
+ console.log(`Getting weather for ${location} in ${unit}`);
200
+ await new Promise((resolve) => setTimeout(resolve, 1000));
201
+
202
+ const temp = Math.floor(Math.random() * 30) + 10;
203
+ const conditions = ["sunny", "cloudy", "rainy", "partly cloudy"];
204
+ const condition =
205
+ conditions[Math.floor(Math.random() * conditions.length)];
206
+
207
+ return {
208
+ location,
209
+ temperature: temp,
210
+ unit,
211
+ condition,
212
+ humidity: Math.floor(Math.random() * 40) + 40,
213
+ windSpeed: Math.floor(Math.random() * 20) + 5,
214
+ };
215
+ },
216
+ streamCall: async (reader) => {
217
+ console.log("streamCall", reader);
218
+ const city = await reader.args.get("location");
219
+ console.log("location", city);
219
220
 
220
- const args = await reader.args.get();
221
- console.log("args", args);
221
+ const args = await reader.args.get();
222
+ console.log("args", args);
222
223
 
223
- const result = await reader.response.get();
224
- console.log("result", result);
224
+ const result = await reader.response.get();
225
+ console.log("result", result);
226
+ },
227
+ renderText: {
228
+ running: ({ args }) => `Getting weather for ${args.location ?? "..."}`,
229
+ complete: ({ args, result }) =>
230
+ result
231
+ ? `${args.location}: ${result.temperature}° ${result.unit}, ${result.condition}`
232
+ : "Weather lookup complete",
233
+ },
225
234
  },
226
235
  });
227
236
 
@@ -295,11 +304,12 @@ export function MyRuntimeProvider({ children }: MyRuntimeProviderProps) {
295
304
  console.log("Request cancelled");
296
305
  },
297
306
  });
307
+ const aui = useAui({
308
+ tools: Tools({ toolkit }),
309
+ });
298
310
 
299
311
  return (
300
- <AssistantRuntimeProvider runtime={runtime}>
301
- <WeatherTool />
302
-
312
+ <AssistantRuntimeProvider aui={aui} runtime={runtime}>
303
313
  {children}
304
314
  </AssistantRuntimeProvider>
305
315
  );
@@ -383,6 +393,7 @@ export default function Home() {
383
393
  ## next.config.js
384
394
 
385
395
  ```javascript
396
+ import { withAui } from "@assistant-ui/next";
386
397
  /** @type {import('next').NextConfig} */
387
398
  const nextConfig = {
388
399
  experimental: {
@@ -398,7 +409,7 @@ const nextConfig = {
398
409
  },
399
410
  };
400
411
 
401
- export default nextConfig;
412
+ export default withAui(nextConfig);
402
413
 
403
414
  ```
404
415
 
@@ -422,18 +433,19 @@ export default nextConfig;
422
433
  "@assistant-ui/ui": "workspace:*",
423
434
  "class-variance-authority": "^0.7.1",
424
435
  "clsx": "^2.1.1",
425
- "lucide-react": "^1.16.0",
426
- "next": "^16.2.6",
427
- "react": "^19.2.6",
428
- "react-dom": "^19.2.6",
436
+ "lucide-react": "^1.17.0",
437
+ "next": "^16.2.7",
438
+ "react": "^19.2.7",
439
+ "react-dom": "^19.2.7",
429
440
  "tailwind-merge": "^3.6.0",
430
441
  "zod": "^4.4.3"
431
442
  },
432
443
  "devDependencies": {
444
+ "@assistant-ui/next": "workspace:*",
433
445
  "@assistant-ui/x-buildutils": "workspace:*",
434
446
  "@tailwindcss/postcss": "^4.3.0",
435
- "@types/node": "^25.9.1",
436
- "@types/react": "^19.2.15",
447
+ "@types/node": "^25.9.2",
448
+ "@types/react": "^19.2.17",
437
449
  "@types/react-dom": "^19.2.3",
438
450
  "postcss": "^8.5.15",
439
451
  "tailwindcss": "^4.3.0",
@@ -171,7 +171,13 @@ export function useMockStore() {
171
171
  }
172
172
  }, []);
173
173
 
174
- return { messages, setMessages, isRunning, onNew };
174
+ return {
175
+ messages,
176
+ setMessages,
177
+ isRunning,
178
+ onNew,
179
+ convertMessage: (m: ThreadMessageLike) => m,
180
+ };
175
181
  }
176
182
 
177
183
  ```
@@ -223,21 +229,21 @@ export function MyThread() {
223
229
  "@assistant-ui/ui": "workspace:*",
224
230
  "class-variance-authority": "^0.7.1",
225
231
  "clsx": "^2.1.1",
226
- "lucide-react": "^1.16.0",
227
- "react": "^19.2.6",
228
- "react-dom": "^19.2.6",
232
+ "lucide-react": "^1.17.0",
233
+ "react": "^19.2.7",
234
+ "react-dom": "^19.2.7",
229
235
  "tailwind-merge": "^3.6.0"
230
236
  },
231
237
  "devDependencies": {
232
238
  "@tailwindcss/postcss": "^4.3.0",
233
- "@types/chrome": "^0.1.42",
234
- "@types/node": "^25.9.1",
235
- "@types/react": "^19.2.15",
239
+ "@types/chrome": "^0.1.43",
240
+ "@types/node": "^25.9.2",
241
+ "@types/react": "^19.2.17",
236
242
  "@types/react-dom": "^19.2.3",
237
243
  "esbuild": "^0.28.0",
238
244
  "postcss": "^8.5.15",
239
245
  "tailwindcss": "^4.3.0",
240
- "tsx": "^4.22.3",
246
+ "tsx": "^4.22.4",
241
247
  "tw-animate-css": "^1.4.0",
242
248
  "typescript": "5.9.3"
243
249
  }
@@ -327,7 +333,8 @@ if (root) {
327
333
  ```json
328
334
  {
329
335
  "compilerOptions": {
330
- "target": "ES2020",
336
+ "target": "ES2022",
337
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
331
338
  "module": "ESNext",
332
339
  "moduleResolution": "bundler",
333
340
  "jsx": "react-jsx",
@@ -336,7 +343,12 @@ if (root) {
336
343
  "skipLibCheck": true,
337
344
  "noEmit": true,
338
345
  "allowImportingTsExtensions": true,
339
- "types": ["chrome", "node"]
346
+ "types": ["chrome", "node"],
347
+ "paths": {
348
+ "@/components/*": ["../../packages/ui/src/components/*"],
349
+ "@/lib/*": ["../../packages/ui/src/lib/*"],
350
+ "@/hooks/*": ["../../packages/ui/src/hooks/*"]
351
+ }
340
352
  },
341
353
  "include": ["*.ts", "*.tsx", "scripts/*.mts"]
342
354
  }