@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.
- package/.docs/organized/code-examples/waterfall.md +20 -22
- package/.docs/organized/code-examples/with-a2a.md +24 -24
- package/.docs/organized/code-examples/with-ag-ui.md +30 -25
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +11 -9
- package/.docs/organized/code-examples/with-artifacts.md +49 -37
- package/.docs/organized/code-examples/with-assistant-transport.md +63 -51
- package/.docs/organized/code-examples/with-browser-extension.md +22 -10
- package/.docs/organized/code-examples/with-chain-of-thought.md +406 -87
- package/.docs/organized/code-examples/with-cloud-standalone.md +25 -24
- package/.docs/organized/code-examples/with-cloud.md +11 -9
- package/.docs/organized/code-examples/with-custom-thread-list.md +14 -12
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +23 -21
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +14 -13
- package/.docs/organized/code-examples/with-expo.md +44 -29
- package/.docs/organized/code-examples/with-external-store.md +9 -7
- package/.docs/organized/code-examples/with-ffmpeg.md +322 -285
- package/.docs/organized/code-examples/with-generative-ui.md +1066 -256
- package/.docs/organized/code-examples/with-google-adk.md +10 -8
- package/.docs/organized/code-examples/with-heat-graph.md +13 -11
- package/.docs/organized/code-examples/with-image-generation.md +19 -17
- package/.docs/organized/code-examples/with-interactables.md +317 -239
- package/.docs/organized/code-examples/with-langchain.md +14 -12
- package/.docs/organized/code-examples/with-langgraph.md +91 -83
- package/.docs/organized/code-examples/with-livekit.md +24 -22
- package/.docs/organized/code-examples/with-mcp.md +18 -12
- package/.docs/organized/code-examples/with-opencode.md +66 -66
- package/.docs/organized/code-examples/with-react-hook-form.md +19 -17
- package/.docs/organized/code-examples/with-react-ink.md +297 -102
- package/.docs/organized/code-examples/with-react-router.md +17 -15
- package/.docs/organized/code-examples/with-resumable-stream.md +15 -14
- package/.docs/organized/code-examples/with-store.md +78 -76
- package/.docs/organized/code-examples/with-tanstack.md +13 -14
- package/.docs/organized/code-examples/with-tap-runtime.md +26 -24
- package/.docs/raw/docs/(docs)/architecture.mdx +94 -42
- package/.docs/raw/docs/(docs)/cli.mdx +1 -2
- package/.docs/raw/docs/(docs)/installation.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +5 -1
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +15 -15
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +14 -1
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +18 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +33 -0
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +45 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +41 -41
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +19 -1
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +122 -122
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +43 -2
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +6 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +4 -6
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +30 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +20 -3
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +8 -8
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +52 -4
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +100 -10
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +7 -59
- package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -2
- package/.docs/raw/docs/{(docs)/copilots → copilots}/model-context.mdx +34 -26
- package/.docs/raw/docs/{(docs)/copilots → copilots}/motivation.mdx +32 -26
- package/.docs/raw/docs/guides/chain-of-thought.mdx +7 -9
- package/.docs/raw/docs/guides/context-api.mdx +2 -1
- package/.docs/raw/docs/guides/index.mdx +3 -12
- package/.docs/raw/docs/guides/mentions.mdx +4 -4
- package/.docs/raw/docs/guides/slash-commands.mdx +1 -1
- package/.docs/raw/docs/guides/suggestions.mdx +1 -1
- package/.docs/raw/docs/ink/adapters.mdx +23 -1
- package/.docs/raw/docs/ink/hooks.mdx +101 -85
- package/.docs/raw/docs/ink/migration.mdx +1 -1
- package/.docs/raw/docs/ink/primitives.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +1 -1
- package/.docs/raw/docs/integrations/index.mdx +2 -2
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +17 -2
- package/.docs/raw/docs/migrations/toolkit-tools.mdx +232 -0
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +10 -16
- package/.docs/raw/docs/primitives/message.mdx +9 -10
- package/.docs/raw/docs/react-native/hooks.mdx +62 -79
- package/.docs/raw/docs/react-native/migration.mdx +1 -1
- package/.docs/raw/docs/react-native/primitives.mdx +2 -2
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +3 -0
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +41 -0
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +122 -1
- package/.docs/raw/docs/runtimes/concepts/architecture.mdx +46 -4
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +7 -1
- package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +54 -12
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +62 -4
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +30 -7
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +108 -38
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +14 -1
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +64 -50
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +98 -86
- package/.docs/raw/docs/tools/backend.mdx +144 -0
- package/.docs/raw/docs/tools/defining-tools.mdx +538 -0
- package/.docs/raw/docs/tools/dynamic-tools.mdx +110 -0
- package/.docs/raw/docs/tools/generative-ui.mdx +214 -0
- package/.docs/raw/docs/tools/index.mdx +71 -0
- package/.docs/raw/docs/{guides → tools}/interactables.mdx +1 -1
- package/.docs/raw/docs/{integrations/tools → tools}/mcp.mdx +145 -50
- package/.docs/raw/docs/{guides → tools}/multi-agent.mdx +15 -17
- package/.docs/raw/docs/tools/tool-ui.mdx +967 -0
- package/.docs/raw/docs/{integrations/tools/react-mcp.mdx → tools/user-managed-mcp.mdx} +7 -7
- package/.docs/raw/docs/ui/directive-text.mdx +3 -3
- package/.docs/raw/docs/ui/mcp-config.mdx +4 -4
- package/.docs/raw/docs/ui/mermaid.mdx +16 -9
- package/.docs/raw/docs/ui/part-grouping.mdx +84 -50
- package/.docs/raw/docs/ui/reasoning.mdx +4 -5
- package/.docs/raw/docs/ui/tool-fallback.mdx +16 -0
- package/.docs/raw/docs/ui/tool-group.mdx +5 -6
- package/.docs/raw/docs/utilities/heat-graph.mdx +1 -1
- package/.docs/raw/docs/utilities/react-o11y.mdx +2 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/package.json +5 -5
- package/.docs/organized/code-examples/with-parent-id-grouping.md +0 -596
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool-ui.mdx +0 -151
- package/.docs/raw/docs/(docs)/copilots/make-assistant-tool.mdx +0 -230
- package/.docs/raw/docs/guides/generative-ui.mdx +0 -142
- package/.docs/raw/docs/guides/tool-ui.mdx +0 -858
- package/.docs/raw/docs/guides/tools.mdx +0 -736
- /package/.docs/raw/docs/{(docs)/copilots → copilots}/assistant-frame.mdx +0 -0
- /package/.docs/raw/docs/{(docs)/copilots → copilots}/make-assistant-visible.mdx +0 -0
- /package/.docs/raw/docs/{(docs)/copilots → copilots}/use-assistant-instructions.mdx +0 -0
- /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
|
|
153
|
-
<h1 className="font-semibold
|
|
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
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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
|
-
|
|
221
|
-
|
|
221
|
+
const args = await reader.args.get();
|
|
222
|
+
console.log("args", args);
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
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.
|
|
426
|
-
"next": "^16.2.
|
|
427
|
-
"react": "^19.2.
|
|
428
|
-
"react-dom": "^19.2.
|
|
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.
|
|
436
|
-
"@types/react": "^19.2.
|
|
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 {
|
|
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.
|
|
227
|
-
"react": "^19.2.
|
|
228
|
-
"react-dom": "^19.2.
|
|
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.
|
|
234
|
-
"@types/node": "^25.9.
|
|
235
|
-
"@types/react": "^19.2.
|
|
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.
|
|
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": "
|
|
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
|
}
|