@assistant-ui/mcp-docs-server 0.1.2 → 0.1.4

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 (50) hide show
  1. package/.docs/organized/code-examples/local-ollama.md +7 -7
  2. package/.docs/organized/code-examples/search-agent-for-e-commerce.md +9 -9
  3. package/.docs/organized/code-examples/with-ai-sdk.md +7 -7
  4. package/.docs/organized/code-examples/with-cloud.md +7 -7
  5. package/.docs/organized/code-examples/with-external-store.md +6 -6
  6. package/.docs/organized/code-examples/with-ffmpeg.md +10 -10
  7. package/.docs/organized/code-examples/with-langgraph.md +10 -10
  8. package/.docs/organized/code-examples/with-openai-assistants.md +7 -7
  9. package/.docs/organized/code-examples/with-react-hook-form.md +10 -10
  10. package/.docs/organized/code-examples/with-vercel-ai-rsc.md +7 -7
  11. package/.docs/raw/docs/api-reference/context-providers/{TextContentPartProvider.mdx → TextMessagePartProvider.mdx} +3 -3
  12. package/.docs/raw/docs/api-reference/integrations/react-hook-form.mdx +2 -2
  13. package/.docs/raw/docs/api-reference/overview.mdx +23 -23
  14. package/.docs/raw/docs/api-reference/primitives/Error.mdx +5 -3
  15. package/.docs/raw/docs/api-reference/primitives/Message.mdx +32 -0
  16. package/.docs/raw/docs/api-reference/primitives/{ContentPart.mdx → MessagePart.mdx} +41 -41
  17. package/.docs/raw/docs/api-reference/runtimes/MessagePartRuntime.mdx +22 -0
  18. package/.docs/raw/docs/api-reference/runtimes/ThreadListRuntime.mdx +1 -0
  19. package/.docs/raw/docs/api-reference/runtimes/ThreadRuntime.mdx +1 -0
  20. package/.docs/raw/docs/concepts/runtime-layer.mdx +7 -7
  21. package/.docs/raw/docs/copilots/make-assistant-tool-ui.mdx +79 -16
  22. package/.docs/raw/docs/copilots/make-assistant-tool.mdx +111 -7
  23. package/.docs/raw/docs/copilots/model-context.mdx +4 -1
  24. package/.docs/raw/docs/copilots/motivation.mdx +4 -1
  25. package/.docs/raw/docs/getting-started.mdx +11 -10
  26. package/.docs/raw/docs/guides/Attachments.mdx +24 -21
  27. package/.docs/raw/docs/guides/ToolUI.mdx +48 -8
  28. package/.docs/raw/docs/guides/Tools.mdx +24 -6
  29. package/.docs/raw/docs/mcp-docs-server.mdx +1 -3
  30. package/.docs/raw/docs/migrations/v0-11.mdx +169 -0
  31. package/.docs/raw/docs/migrations/v0-7.mdx +8 -8
  32. package/.docs/raw/docs/migrations/v0-8.mdx +14 -14
  33. package/.docs/raw/docs/migrations/v0-9.mdx +3 -3
  34. package/.docs/raw/docs/runtimes/ai-sdk/rsc.mdx +2 -2
  35. package/.docs/raw/docs/runtimes/ai-sdk/use-assistant-hook.mdx +1 -1
  36. package/.docs/raw/docs/runtimes/ai-sdk/use-chat-hook.mdx +2 -2
  37. package/.docs/raw/docs/runtimes/ai-sdk/use-chat.mdx +2 -2
  38. package/.docs/raw/docs/runtimes/custom/external-store.mdx +5 -5
  39. package/.docs/raw/docs/runtimes/custom/local.mdx +3 -3
  40. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +2 -2
  41. package/.docs/raw/docs/ui/Attachment.mdx +5 -2
  42. package/.docs/raw/docs/ui/Markdown.mdx +2 -3
  43. package/.docs/raw/docs/ui/ToolFallback.mdx +2 -2
  44. package/dist/{chunk-CZCDQ3YH.js → chunk-JS4PWCVA.js} +1 -1
  45. package/dist/{chunk-C7O7EFKU.js → chunk-M2RKUM66.js} +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/prepare-docs/prepare.js +1 -1
  48. package/dist/stdio.js +1 -1
  49. package/package.json +5 -5
  50. package/.docs/raw/docs/api-reference/runtimes/ContentPartRuntime.mdx +0 -22
@@ -23,9 +23,9 @@ The following components and types have been moved to `@assistant-ui/react-edge`
23
23
  - `CoreUserMessage`
24
24
  - `CoreAssistantMessage`
25
25
  - `CoreSystemMessage`
26
- - `CoreUserContentPart`
27
- - `CoreAssistantContentPart`
28
- - `CoreToolCallContentPart`
26
+ - `CoreUserMessagePart`
27
+ - `CoreAssistantMessagePart`
28
+ - `CoreToolCallMessagePart`
29
29
  - Core message converters
30
30
  - `fromCoreMessages`
31
31
  - `fromCoreMessage`
@@ -206,10 +206,10 @@ export default function RootLayout({
206
206
 
207
207
  ## Set up RSCDisplay
208
208
 
209
- Pass the `RSCDisplay` component to your `MessagePrimitive.Content`:
209
+ Pass the `RSCDisplay` component to your `MessagePrimitive.Parts`:
210
210
 
211
211
  ```tsx
212
- <MessagePrimitive.Content components={{ Text: RSCDisplay }} />
212
+ <MessagePrimitive.Parts components={{ Text: RSCDisplay }} />
213
213
  ```
214
214
 
215
215
  (if you are using react-ui: `<Thread assistantMessage={{ components: { Text: RSCDisplay } }} />`)
@@ -188,7 +188,7 @@ const MyAssistantMessage = () => {
188
188
 
189
189
  const WeatherToolUI = makeAssistantToolUI({
190
190
  render: () => {
191
- const aiSDKMessage = useContentPart((p) => getExternalStoreMessages(p)[0]);
191
+ const aiSDKMessage = useMessagePart((p) => getExternalStoreMessages(p)[0]);
192
192
  // ...
193
193
  },
194
194
  });
@@ -131,8 +131,8 @@ const MyAssistantMessage = () => {
131
131
 
132
132
  const WeatherToolUI = makeAssistantToolUI({
133
133
  render: () => {
134
- const aiSDKMessage = useContentPart((p) => getExternalStoreMessages(p)[0]);
134
+ const aiSDKMessage = useMessagePart((p) => getExternalStoreMessages(p)[0]);
135
135
  // ...
136
136
  },
137
137
  });
138
- ```
138
+ ```
@@ -129,8 +129,8 @@ const MyAssistantMessage = () => {
129
129
 
130
130
  const WeatherToolUI = makeAssistantToolUI({
131
131
  render: () => {
132
- const aiSDKMessage = useContentPart((p) => getExternalStoreMessages(p)[0]);
132
+ const aiSDKMessage = useMessagePart((p) => getExternalStoreMessages(p)[0]);
133
133
  // ...
134
134
  },
135
135
  });
136
- ```
136
+ ```
@@ -1144,13 +1144,13 @@ const MyComponent = () => {
1144
1144
  messages for display.
1145
1145
  </Callout>
1146
1146
 
1147
- ### Content Part Access
1147
+ ### Message part Access
1148
1148
 
1149
1149
  ```tsx
1150
1150
  const ToolUI = makeAssistantToolUI({
1151
1151
  render: () => {
1152
- const originalMessages = useContentPart((p) => getExternalStoreMessages(p));
1153
- // Access original message data for this content part
1152
+ const originalMessages = useMessagePart((p) => getExternalStoreMessages(p));
1153
+ // Access original message data for this message part
1154
1154
  },
1155
1155
  });
1156
1156
  ```
@@ -1500,8 +1500,8 @@ A flexible message format that can be converted to assistant-ui's internal forma
1500
1500
  },
1501
1501
  {
1502
1502
  name: "content",
1503
- type: "string | readonly ContentPart[]",
1504
- description: "Message content as string or structured content parts",
1503
+ type: "string | readonly MessagePart[]",
1504
+ description: "Message content as string or structured message parts",
1505
1505
  required: true,
1506
1506
  },
1507
1507
  {
@@ -841,9 +841,9 @@ function MyCustomRuntimeProvider({ children }) {
841
841
  </Callout>
842
842
 
843
843
  <Callout type="warning">
844
- **`useThreadRuntime` vs `useLocalThreadRuntime`:** - `useThreadRuntime` -
845
- Access the current thread's runtime from within components -
846
- `useLocalThreadRuntime` - Create a new single-thread runtime instance
844
+ **`useThreadRuntime` vs `useLocalThreadRuntime`:**
845
+ - `useThreadRuntime` - Access the current thread's runtime from within components
846
+ - `useLocalThreadRuntime` - Create a new single-thread runtime instance
847
847
  </Callout>
848
848
 
849
849
  ## Integration Examples
@@ -273,12 +273,12 @@ npx shadcn@latest add button
273
273
  Then create a new file under `/components/tools/ToolFallback.tsx` to define the fallback UI.
274
274
 
275
275
  ```tsx title="@/components/tools/ToolFallback.tsx"
276
- import { ToolCallContentPartComponent } from "@assistant-ui/react";
276
+ import { ToolCallMessagePartComponent } from "@assistant-ui/react";
277
277
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
278
278
  import { useState } from "react";
279
279
  import { Button } from "../ui/button";
280
280
 
281
- export const ToolFallback: ToolCallContentPartComponent = ({
281
+ export const ToolFallback: ToolCallMessagePartComponent = ({
282
282
  toolName,
283
283
  argsText,
284
284
  result,
@@ -13,7 +13,10 @@ The Attachment components let the user attach files and view the attachments.
13
13
  <AttachmentSample />
14
14
 
15
15
  <Callout type="info">
16
- **Note:** These components provide the UI for attachments, but you also need to configure attachment adapters in your runtime to handle file uploads and processing. See the [Attachments Guide](/docs/guides/Attachments) for complete setup instructions.
16
+ **Note:** These components provide the UI for attachments, but you also need
17
+ to configure attachment adapters in your runtime to handle file uploads and
18
+ processing. See the [Attachments Guide](/docs/guides/Attachments) for complete
19
+ setup instructions.
17
20
  </Callout>
18
21
 
19
22
  ## Getting Started
@@ -69,7 +72,7 @@ const UserMessage: FC = () => {
69
72
  <UserMessageAttachments />
70
73
 
71
74
  <div className="...">
72
- <MessagePrimitive.Content />
75
+ <MessagePrimitive.Parts />
73
76
  </div>
74
77
 
75
78
  <BranchPicker className="..." />
@@ -30,7 +30,7 @@ This adds a `/components/assistant-ui/markdown-text.tsx` file to your project, w
30
30
 
31
31
  ### Use it in your application
32
32
 
33
- Pass the `MarkdownText` component to the `MessagePrimitive.Content` component
33
+ Pass the `MarkdownText` component to the `MessagePrimitive.Parts` component
34
34
 
35
35
  ```tsx twoslash title="/components/assistant-ui/thread.tsx" {1,11}
36
36
  // @filename: /components/assistant-ui/markdown-text.tsx
@@ -52,7 +52,7 @@ const AssistantMessage: FC = () => {
52
52
  return (
53
53
  <MessagePrimitive.Root className="...">
54
54
  <div className="...">
55
- <MessagePrimitive.Content components={{ Text: MarkdownText }} />
55
+ <MessagePrimitive.Parts components={{ Text: MarkdownText }} />
56
56
  </div>
57
57
  <AssistantActionBar />
58
58
 
@@ -69,4 +69,3 @@ const AssistantMessage: FC = () => {
69
69
  ## Syntax highlighting
70
70
 
71
71
  Syntax Highlighting is not included by default, see [Syntax Highlighting](/docs/ui/SyntaxHighlighting) to learn how to add it.
72
-
@@ -26,7 +26,7 @@ This adds a `/components/assistant-ui/tool-fallback.tsx` file to your project, w
26
26
 
27
27
  ### Use it in your application
28
28
 
29
- Pass the `ToolFallback` component to the `MessagePrimitive.Content` component
29
+ Pass the `ToolFallback` component to the `MessagePrimitive.Parts` component
30
30
 
31
31
  ```tsx twoslash title="/components/assistant-ui/thread.tsx" {1,11}
32
32
  // @filename: /components/assistant-ui/tool-fallback.tsx
@@ -48,7 +48,7 @@ const AssistantMessage: FC = () => {
48
48
  return (
49
49
  <MessagePrimitive.Root className="...">
50
50
  <div className="...">
51
- <MessagePrimitive.Content
51
+ <MessagePrimitive.Parts
52
52
  components={{ tools: { Fallback: ToolFallback } }}
53
53
  />
54
54
  </div>
@@ -1,4 +1,4 @@
1
- import { logger, IS_PREPARE_MODE, MDX_EXTENSION, DOCS_PATH, MAX_FILE_SIZE, CODE_EXAMPLES_PATH, MD_EXTENSION } from './chunk-C7O7EFKU.js';
1
+ import { logger, IS_PREPARE_MODE, MDX_EXTENSION, DOCS_PATH, MAX_FILE_SIZE, CODE_EXAMPLES_PATH, MD_EXTENSION } from './chunk-M2RKUM66.js';
2
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { z } from 'zod';
@@ -31,7 +31,7 @@ var logger = {
31
31
  console.error(`[ERROR] ${message}`, ...args);
32
32
  },
33
33
  warn: (message, ...args) => {
34
- console.error(`[WARN] ${message}`, ...args);
34
+ console.warn(`[WARN] ${message}`, ...args);
35
35
  }
36
36
  };
37
37
 
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { runServer, server } from './chunk-CZCDQ3YH.js';
1
+ export { runServer, server } from './chunk-JS4PWCVA.js';
@@ -1,4 +1,4 @@
1
- import { ROOT_DIR, logger, EXAMPLES_PATH } from '../chunk-C7O7EFKU.js';
1
+ import { ROOT_DIR, logger, EXAMPLES_PATH } from '../chunk-M2RKUM66.js';
2
2
  import { rm, mkdir, readdir, readFile, writeFile, copyFile } from 'fs/promises';
3
3
  import { join, extname, relative } from 'path';
4
4
 
package/dist/stdio.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { runServer } from './chunk-CZCDQ3YH.js';
2
+ import { runServer } from './chunk-JS4PWCVA.js';
3
3
 
4
4
  // src/stdio.ts
5
5
  void runServer().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assistant-ui/mcp-docs-server",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "MCP server for assistant-ui documentation and examples",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,17 +8,17 @@
8
8
  "assistant-ui-mcp": "./dist/stdio.js"
9
9
  },
10
10
  "dependencies": {
11
- "@modelcontextprotocol/sdk": "^1.12.3",
12
- "zod": "^3.25.64",
11
+ "@modelcontextprotocol/sdk": "^1.13.2",
12
+ "zod": "^3.25.67",
13
13
  "gray-matter": "^4.0.3",
14
14
  "cross-env": "^7.0.3"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/node": "^24.0.1",
17
+ "@types/node": "^24.0.4",
18
18
  "tsup": "^8.5.0",
19
19
  "tsx": "^4.20.3",
20
20
  "typescript": "^5.8.3",
21
- "vitest": "^3.2.3",
21
+ "vitest": "^3.2.4",
22
22
  "eslint": "^9.29.0"
23
23
  },
24
24
  "files": [
@@ -1,22 +0,0 @@
1
- ---
2
- title: ContentPartRuntime
3
- ---
4
-
5
- import { ParametersTable } from "@/components/docs";
6
- import { ContentPartState } from "@/components/docs/parameters/context";
7
-
8
- ### `useContentPart`
9
-
10
- Access the content part state:
11
-
12
- ```tsx
13
- import { useContentPart } from "@assistant-ui/react";
14
-
15
- const part = useContentPart();
16
- const partState = useContentPart.getState();
17
-
18
- const status = useContentPart((m) => m.status);
19
- const statusAgain = useContentPart.getState().status;
20
- ```
21
-
22
- <ParametersTable {...ContentPartState} />