@assistant-ui/mcp-docs-server 0.1.26 → 0.1.28

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 (43) hide show
  1. package/.docs/organized/code-examples/waterfall.md +2 -2
  2. package/.docs/organized/code-examples/with-a2a.md +2 -2
  3. package/.docs/organized/code-examples/with-ag-ui.md +3 -3
  4. package/.docs/organized/code-examples/with-ai-sdk-v6.md +4 -4
  5. package/.docs/organized/code-examples/with-artifacts.md +4 -4
  6. package/.docs/organized/code-examples/with-assistant-transport.md +2 -2
  7. package/.docs/organized/code-examples/with-chain-of-thought.md +4 -4
  8. package/.docs/organized/code-examples/with-cloud-standalone.md +4 -4
  9. package/.docs/organized/code-examples/with-cloud.md +4 -4
  10. package/.docs/organized/code-examples/with-custom-thread-list.md +4 -4
  11. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +511 -0
  12. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +6 -6
  13. package/.docs/organized/code-examples/with-expo.md +17 -17
  14. package/.docs/organized/code-examples/with-external-store.md +2 -2
  15. package/.docs/organized/code-examples/with-ffmpeg.md +217 -63
  16. package/.docs/organized/code-examples/with-generative-ui.md +841 -0
  17. package/.docs/organized/code-examples/with-google-adk.md +3 -3
  18. package/.docs/organized/code-examples/with-heat-graph.md +2 -2
  19. package/.docs/organized/code-examples/with-interactables.md +67 -9
  20. package/.docs/organized/code-examples/with-langgraph.md +3 -3
  21. package/.docs/organized/code-examples/with-livekit.md +591 -0
  22. package/.docs/organized/code-examples/with-parent-id-grouping.md +3 -3
  23. package/.docs/organized/code-examples/with-react-hook-form.md +5 -5
  24. package/.docs/organized/code-examples/with-react-ink.md +1 -1
  25. package/.docs/organized/code-examples/with-react-router.md +7 -7
  26. package/.docs/organized/code-examples/with-store.md +8 -3
  27. package/.docs/organized/code-examples/with-tanstack.md +4 -4
  28. package/.docs/organized/code-examples/with-tap-runtime.md +2 -2
  29. package/.docs/raw/docs/(docs)/copilots/model-context.mdx +9 -1
  30. package/.docs/raw/docs/(docs)/guides/interactables.mdx +99 -37
  31. package/.docs/raw/docs/(docs)/guides/mentions.mdx +406 -0
  32. package/.docs/raw/docs/(docs)/guides/slash-commands.mdx +275 -0
  33. package/.docs/raw/docs/(docs)/guides/tool-ui.mdx +29 -0
  34. package/.docs/raw/docs/(docs)/guides/voice.mdx +333 -0
  35. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +23 -0
  36. package/.docs/raw/docs/primitives/composer.mdx +27 -4
  37. package/.docs/raw/docs/runtimes/a2a/index.mdx +4 -0
  38. package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +2 -2
  39. package/.docs/raw/docs/runtimes/assistant-transport.mdx +6 -2
  40. package/.docs/raw/docs/ui/context-display.mdx +2 -2
  41. package/.docs/raw/docs/ui/model-selector.mdx +1 -1
  42. package/.docs/raw/docs/ui/voice.mdx +172 -0
  43. package/package.json +5 -6
@@ -304,11 +304,11 @@ export default nextConfig;
304
304
  "@assistant-ui/react-google-adk": "workspace:*",
305
305
  "@assistant-ui/react-markdown": "workspace:*",
306
306
  "@assistant-ui/ui": "workspace:*",
307
- "@google/adk": "^0.5.0",
307
+ "@google/adk": "^0.6.1",
308
308
  "class-variance-authority": "^0.7.1",
309
309
  "clsx": "^2.1.1",
310
310
  "lucide-react": "^1.7.0",
311
- "next": "^16.2.1",
311
+ "next": "^16.2.2",
312
312
  "react": "^19.2.4",
313
313
  "react-dom": "^19.2.4",
314
314
  "tailwind-merge": "^3.5.0",
@@ -317,7 +317,7 @@ export default nextConfig;
317
317
  "devDependencies": {
318
318
  "@assistant-ui/x-buildutils": "workspace:*",
319
319
  "@tailwindcss/postcss": "^4.2.2",
320
- "@types/node": "^25.5.0",
320
+ "@types/node": "^25.5.2",
321
321
  "@types/react": "^19.2.14",
322
322
  "@types/react-dom": "^19.2.3",
323
323
  "postcss": "^8.5.8",
@@ -270,14 +270,14 @@ export default nextConfig;
270
270
  },
271
271
  "dependencies": {
272
272
  "heat-graph": "workspace:*",
273
- "next": "^16.2.1",
273
+ "next": "^16.2.2",
274
274
  "react": "^19.2.4",
275
275
  "react-dom": "^19.2.4"
276
276
  },
277
277
  "devDependencies": {
278
278
  "@assistant-ui/x-buildutils": "workspace:*",
279
279
  "@tailwindcss/postcss": "^4.2.2",
280
- "@types/node": "^25.5.0",
280
+ "@types/node": "^25.5.2",
281
281
  "@types/react": "^19.2.14",
282
282
  "@types/react-dom": "^19.2.3",
283
283
  "postcss": "^8.5.8",
@@ -29,7 +29,7 @@ export async function POST(req: Request) {
29
29
 
30
30
  // Convert client-defined tools (forwarded from model context) to AI SDK format.
31
31
  // These have no `execute` — they are frontend tools executed on the client
32
- // via useAssistantTool / useInteractable.
32
+ // via useAssistantTool / useAssistantInteractable.
33
33
  const tools = clientTools
34
34
  ? Object.fromEntries(
35
35
  Object.entries(clientTools).map(([name, def]) => [
@@ -214,14 +214,15 @@ export default function RootLayout({
214
214
  ```tsx
215
215
  "use client";
216
216
 
217
- import { useRef, useState, useCallback } from "react";
217
+ import { useRef, useState, useCallback, useEffect } from "react";
218
218
  import { Thread } from "@/components/assistant-ui/thread";
219
219
  import {
220
220
  AssistantRuntimeProvider,
221
221
  Interactables,
222
222
  Suggestions,
223
223
  useAui,
224
- useInteractable,
224
+ useAssistantInteractable,
225
+ useInteractableState,
225
226
  useAssistantTool,
226
227
  } from "@assistant-ui/react";
227
228
  import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
@@ -231,6 +232,7 @@ import {
231
232
  CheckCircle2Icon,
232
233
  CircleIcon,
233
234
  ListTodoIcon,
235
+ Loader2Icon,
234
236
  StickyNoteIcon,
235
237
  Trash2Icon,
236
238
  PlusIcon,
@@ -258,12 +260,16 @@ const taskBoardInitialState: TaskBoardState = { tasks: [] };
258
260
  let nextTaskId = 0;
259
261
 
260
262
  function TaskBoard() {
261
- const [state, setState] = useInteractable<TaskBoardState>("taskBoard", {
263
+ const id = useAssistantInteractable("taskBoard", {
262
264
  description:
263
265
  "A task board showing the user's tasks. Use the manage_tasks tool (not update_taskBoard) to add/toggle/remove/clear tasks.",
264
266
  stateSchema: taskBoardSchema,
265
267
  initialState: taskBoardInitialState,
266
268
  });
269
+ const [state, { setState, isPending }] = useInteractableState<TaskBoardState>(
270
+ id,
271
+ taskBoardInitialState,
272
+ );
267
273
 
268
274
  const setStateRef = useRef(setState);
269
275
  setStateRef.current = setState;
@@ -323,6 +329,9 @@ function TaskBoard() {
323
329
  <div className="flex items-center gap-2 border-b px-4 py-3">
324
330
  <ListTodoIcon className="size-4 text-muted-foreground" />
325
331
  <span className="font-semibold text-sm">Task Board</span>
332
+ {isPending && (
333
+ <Loader2Icon className="size-3 animate-spin text-muted-foreground" />
334
+ )}
326
335
  {state.tasks.length > 0 && (
327
336
  <span className="ml-auto rounded-full bg-primary/10 px-2 py-0.5 font-medium text-primary text-xs">
328
337
  {doneCount}/{state.tasks.length}
@@ -422,7 +431,7 @@ function NoteCard({
422
431
  // Multi-instance: each NoteCard has a unique `id`, all share name "note"
423
432
  // Partial updates: AI can send { color: "blue" } without resending title/content
424
433
  // Selection: clicking a note calls setSelected(true)
425
- const [state, , { setSelected }] = useInteractable<NoteState>("note", {
434
+ useAssistantInteractable("note", {
426
435
  id: noteId,
427
436
  description:
428
437
  "A sticky note. The AI can partially update any field (title, content, color) without resending the others.",
@@ -430,6 +439,10 @@ function NoteCard({
430
439
  initialState: noteInitialState,
431
440
  selected: selectedId === noteId,
432
441
  });
442
+ const [state, { setSelected }] = useInteractableState<NoteState>(
443
+ noteId,
444
+ noteInitialState,
445
+ );
433
446
 
434
447
  const isSelected = selectedId === noteId;
435
448
 
@@ -471,9 +484,31 @@ function NoteCard({
471
484
  );
472
485
  }
473
486
 
487
+ const NOTE_IDS_KEY = "interactables-example-note-ids";
488
+
489
+ function loadNoteIds(): string[] {
490
+ try {
491
+ const saved = localStorage.getItem(NOTE_IDS_KEY);
492
+ return saved ? JSON.parse(saved) : [];
493
+ } catch {
494
+ return [];
495
+ }
496
+ }
497
+
474
498
  function NotesPanel() {
475
499
  const [noteIds, setNoteIds] = useState<string[]>([]);
476
500
  const [selectedId, setSelectedId] = useState<string | null>(null);
501
+ const hydratedRef = useRef(false);
502
+
503
+ useEffect(() => {
504
+ if (!hydratedRef.current) {
505
+ hydratedRef.current = true;
506
+ const saved = loadNoteIds();
507
+ if (saved.length > 0) setNoteIds(saved);
508
+ return;
509
+ }
510
+ localStorage.setItem(NOTE_IDS_KEY, JSON.stringify(noteIds));
511
+ }, [noteIds]);
477
512
 
478
513
  const noteIdsRef = useRef(noteIds);
479
514
  noteIdsRef.current = noteIds;
@@ -572,6 +607,27 @@ function NotesPanel() {
572
607
  // App
573
608
  // ===========================================================================
574
609
 
610
+ const STORAGE_KEY = "interactables-example";
611
+
612
+ function useInteractablePersistence(aui: ReturnType<typeof useAui>) {
613
+ useEffect(() => {
614
+ const saved = localStorage.getItem(STORAGE_KEY);
615
+ if (saved) {
616
+ try {
617
+ aui.interactables().importState(JSON.parse(saved));
618
+ } catch {
619
+ // ignore malformed data
620
+ }
621
+ }
622
+
623
+ aui.interactables().setPersistenceAdapter({
624
+ save: (state) => {
625
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(state));
626
+ },
627
+ });
628
+ }, [aui]);
629
+ }
630
+
575
631
  export default function Home() {
576
632
  const runtime = useChatRuntime({
577
633
  sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls,
@@ -599,6 +655,8 @@ export default function Home() {
599
655
  ]),
600
656
  });
601
657
 
658
+ useInteractablePersistence(aui);
659
+
602
660
  return (
603
661
  <AssistantRuntimeProvider aui={aui} runtime={runtime}>
604
662
  <main className="flex h-full">
@@ -677,15 +735,15 @@ export default nextConfig;
677
735
  "start": "next start"
678
736
  },
679
737
  "dependencies": {
680
- "@ai-sdk/openai": "^3.0.48",
738
+ "@ai-sdk/openai": "^3.0.51",
681
739
  "@assistant-ui/react": "workspace:*",
682
740
  "@assistant-ui/react-ai-sdk": "workspace:*",
683
741
  "@assistant-ui/ui": "workspace:*",
684
- "ai": "^6.0.138",
742
+ "ai": "^6.0.148",
685
743
  "class-variance-authority": "^0.7.1",
686
744
  "clsx": "^2.1.1",
687
745
  "lucide-react": "^1.7.0",
688
- "next": "^16.2.1",
746
+ "next": "^16.2.2",
689
747
  "react": "^19.2.4",
690
748
  "react-dom": "^19.2.4",
691
749
  "tailwind-merge": "^3.5.0",
@@ -694,7 +752,7 @@ export default nextConfig;
694
752
  "devDependencies": {
695
753
  "@assistant-ui/x-buildutils": "workspace:*",
696
754
  "@tailwindcss/postcss": "^4.2.2",
697
- "@types/node": "^25.5.0",
755
+ "@types/node": "^25.5.2",
698
756
  "@types/react": "^19.2.14",
699
757
  "@types/react-dom": "^19.2.3",
700
758
  "postcss": "^8.5.8",
@@ -871,11 +871,11 @@ export default nextConfig;
871
871
  "@assistant-ui/react-langgraph": "workspace:*",
872
872
  "@assistant-ui/react-markdown": "workspace:*",
873
873
  "@assistant-ui/ui": "workspace:*",
874
- "@langchain/langgraph-sdk": "^1.8.0",
874
+ "@langchain/langgraph-sdk": "^1.8.8",
875
875
  "class-variance-authority": "^0.7.1",
876
876
  "clsx": "^2.1.1",
877
877
  "lucide-react": "^1.7.0",
878
- "next": "^16.2.1",
878
+ "next": "^16.2.2",
879
879
  "react": "^19.2.4",
880
880
  "react-dom": "^19.2.4",
881
881
  "tailwind-merge": "^3.5.0"
@@ -883,7 +883,7 @@ export default nextConfig;
883
883
  "devDependencies": {
884
884
  "@assistant-ui/x-buildutils": "workspace:*",
885
885
  "@tailwindcss/postcss": "^4.2.2",
886
- "@types/node": "^25.5.0",
886
+ "@types/node": "^25.5.2",
887
887
  "@types/react": "^19.2.14",
888
888
  "@types/react-dom": "^19.2.3",
889
889
  "postcss": "^8.5.8",