@assistant-ui/mcp-docs-server 0.2.3 → 0.3.0

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 (452) hide show
  1. package/README.md +16 -43
  2. package/dist/index.d.ts +2 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -91
  5. package/dist/index.js.map +1 -1
  6. package/dist/proxy.d.ts +9 -0
  7. package/dist/proxy.d.ts.map +1 -0
  8. package/dist/proxy.js +76 -0
  9. package/dist/proxy.js.map +1 -0
  10. package/package.json +8 -12
  11. package/src/index.ts +3 -115
  12. package/src/proxy.test.ts +250 -0
  13. package/src/proxy.ts +111 -0
  14. package/.docs/organized/code-examples/waterfall.md +0 -807
  15. package/.docs/organized/code-examples/with-a2a.md +0 -675
  16. package/.docs/organized/code-examples/with-ag-ui.md +0 -553
  17. package/.docs/organized/code-examples/with-ai-sdk-v7.md +0 -466
  18. package/.docs/organized/code-examples/with-artifacts.md +0 -815
  19. package/.docs/organized/code-examples/with-assistant-transport.md +0 -576
  20. package/.docs/organized/code-examples/with-browser-extension.md +0 -371
  21. package/.docs/organized/code-examples/with-chain-of-thought.md +0 -962
  22. package/.docs/organized/code-examples/with-cloud-standalone.md +0 -681
  23. package/.docs/organized/code-examples/with-cloud.md +0 -439
  24. package/.docs/organized/code-examples/with-custom-thread-list.md +0 -569
  25. package/.docs/organized/code-examples/with-elevenlabs-conversational.md +0 -527
  26. package/.docs/organized/code-examples/with-elevenlabs-scribe.md +0 -697
  27. package/.docs/organized/code-examples/with-eve.md +0 -405
  28. package/.docs/organized/code-examples/with-expo.md +0 -2246
  29. package/.docs/organized/code-examples/with-external-store.md +0 -421
  30. package/.docs/organized/code-examples/with-ffmpeg.md +0 -829
  31. package/.docs/organized/code-examples/with-generative-ui.md +0 -1810
  32. package/.docs/organized/code-examples/with-google-adk.md +0 -368
  33. package/.docs/organized/code-examples/with-heat-graph.md +0 -304
  34. package/.docs/organized/code-examples/with-image-generation.md +0 -463
  35. package/.docs/organized/code-examples/with-interactables.md +0 -733
  36. package/.docs/organized/code-examples/with-langchain.md +0 -446
  37. package/.docs/organized/code-examples/with-langgraph.md +0 -855
  38. package/.docs/organized/code-examples/with-livekit.md +0 -643
  39. package/.docs/organized/code-examples/with-mcp.md +0 -782
  40. package/.docs/organized/code-examples/with-nuxt.md +0 -2428
  41. package/.docs/organized/code-examples/with-opencode.md +0 -1974
  42. package/.docs/organized/code-examples/with-openui.md +0 -450
  43. package/.docs/organized/code-examples/with-pi.md +0 -2084
  44. package/.docs/organized/code-examples/with-react-hook-form.md +0 -727
  45. package/.docs/organized/code-examples/with-react-ink-web.md +0 -740
  46. package/.docs/organized/code-examples/with-react-ink.md +0 -473
  47. package/.docs/organized/code-examples/with-react-router.md +0 -936
  48. package/.docs/organized/code-examples/with-resumable-stream.md +0 -668
  49. package/.docs/organized/code-examples/with-store.md +0 -679
  50. package/.docs/organized/code-examples/with-svelte.md +0 -415
  51. package/.docs/organized/code-examples/with-sveltekit.md +0 -1061
  52. package/.docs/organized/code-examples/with-tanstack.md +0 -812
  53. package/.docs/organized/code-examples/with-tap-runtime.md +0 -813
  54. package/.docs/organized/code-examples/with-virtualized-thread.md +0 -681
  55. package/.docs/organized/code-examples/with-vue.md +0 -408
  56. package/.docs/raw/docs/(getting-started)/architecture.mdx +0 -146
  57. package/.docs/raw/docs/(getting-started)/base-ui.mdx +0 -39
  58. package/.docs/raw/docs/(getting-started)/cli.mdx +0 -542
  59. package/.docs/raw/docs/(getting-started)/devtools.mdx +0 -79
  60. package/.docs/raw/docs/(getting-started)/index.mdx +0 -23
  61. package/.docs/raw/docs/(getting-started)/installation.mdx +0 -483
  62. package/.docs/raw/docs/(getting-started)/llm.mdx +0 -211
  63. package/.docs/raw/docs/(getting-started)/rtl.mdx +0 -78
  64. package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +0 -36
  65. package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +0 -20
  66. package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +0 -34
  67. package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +0 -44
  68. package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +0 -59
  69. package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +0 -20
  70. package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +0 -26
  71. package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +0 -84
  72. package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +0 -22
  73. package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +0 -64
  74. package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +0 -22
  75. package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +0 -57
  76. package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +0 -49
  77. package/.docs/raw/docs/(reference)/api-reference/generative-ui/a2ui.mdx +0 -40
  78. package/.docs/raw/docs/(reference)/api-reference/generative-ui/actions.mdx +0 -56
  79. package/.docs/raw/docs/(reference)/api-reference/generative-ui/components.mdx +0 -86
  80. package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +0 -39
  81. package/.docs/raw/docs/(reference)/api-reference/generative-ui/json-generative-ui.mdx +0 -42
  82. package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +0 -84
  83. package/.docs/raw/docs/(reference)/api-reference/generative-ui/slack.mdx +0 -85
  84. package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +0 -45
  85. package/.docs/raw/docs/(reference)/api-reference/generative-ui/teams.mdx +0 -93
  86. package/.docs/raw/docs/(reference)/api-reference/generative-ui/tokens.mdx +0 -62
  87. package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +0 -129
  88. package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +0 -31
  89. package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +0 -34
  90. package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +0 -350
  91. package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +0 -28
  92. package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +0 -97
  93. package/.docs/raw/docs/(reference)/api-reference/integrations/ai-sdk.mdx +0 -200
  94. package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +0 -24
  95. package/.docs/raw/docs/(reference)/api-reference/integrations/eve.mdx +0 -118
  96. package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +0 -28
  97. package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -37
  98. package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +0 -50
  99. package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +0 -22
  100. package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +0 -20
  101. package/.docs/raw/docs/(reference)/api-reference/overview.mdx +0 -566
  102. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +0 -152
  103. package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +0 -239
  104. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +0 -208
  105. package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +0 -108
  106. package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +0 -99
  107. package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +0 -145
  108. package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +0 -82
  109. package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +0 -637
  110. package/.docs/raw/docs/(reference)/api-reference/primitives/composition.mdx +0 -22
  111. package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +0 -65
  112. package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +0 -73
  113. package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +0 -117
  114. package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +0 -339
  115. package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +0 -77
  116. package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +0 -88
  117. package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +0 -81
  118. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +0 -129
  119. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +0 -138
  120. package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +0 -122
  121. package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +0 -289
  122. package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +0 -20
  123. package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +0 -24
  124. package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +0 -32
  125. package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +0 -43
  126. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +0 -43
  127. package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +0 -24
  128. package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +0 -20
  129. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +0 -24
  130. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +0 -24
  131. package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +0 -36
  132. package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +0 -85
  133. package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +0 -45
  134. package/.docs/raw/docs/(reference)/api-reference/tools/interactables-legacy.mdx +0 -55
  135. package/.docs/raw/docs/(reference)/api-reference/tools/interactables.mdx +0 -151
  136. package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +0 -106
  137. package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +0 -62
  138. package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +0 -178
  139. package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +0 -48
  140. package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +0 -62
  141. package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +0 -22
  142. package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +0 -19
  143. package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +0 -152
  144. package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +0 -22
  145. package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +0 -54
  146. package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +0 -36
  147. package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +0 -527
  148. package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -604
  149. package/.docs/raw/docs/cloud/authorization.mdx +0 -252
  150. package/.docs/raw/docs/cloud/index.mdx +0 -46
  151. package/.docs/raw/docs/cloud/langgraph.mdx +0 -554
  152. package/.docs/raw/docs/copilots/assistant-frame.mdx +0 -411
  153. package/.docs/raw/docs/copilots/make-assistant-visible.mdx +0 -82
  154. package/.docs/raw/docs/copilots/model-context.mdx +0 -156
  155. package/.docs/raw/docs/copilots/motivation.mdx +0 -202
  156. package/.docs/raw/docs/copilots/use-assistant-instructions.mdx +0 -64
  157. package/.docs/raw/docs/guides/attachments.mdx +0 -619
  158. package/.docs/raw/docs/guides/branching.mdx +0 -76
  159. package/.docs/raw/docs/guides/chain-of-thought.mdx +0 -164
  160. package/.docs/raw/docs/guides/chatgpt-subscription.mdx +0 -108
  161. package/.docs/raw/docs/guides/context-api.mdx +0 -619
  162. package/.docs/raw/docs/guides/dictation.mdx +0 -298
  163. package/.docs/raw/docs/guides/editing.mdx +0 -102
  164. package/.docs/raw/docs/guides/electron.mdx +0 -369
  165. package/.docs/raw/docs/guides/headless-composer-input.mdx +0 -113
  166. package/.docs/raw/docs/guides/image-generation.mdx +0 -74
  167. package/.docs/raw/docs/guides/index.mdx +0 -117
  168. package/.docs/raw/docs/guides/input-history.mdx +0 -55
  169. package/.docs/raw/docs/guides/latex.mdx +0 -158
  170. package/.docs/raw/docs/guides/mentions.mdx +0 -575
  171. package/.docs/raw/docs/guides/message-timing.mdx +0 -215
  172. package/.docs/raw/docs/guides/quoting.mdx +0 -169
  173. package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +0 -212
  174. package/.docs/raw/docs/guides/resumable-stream-stores.mdx +0 -152
  175. package/.docs/raw/docs/guides/resumable-streams.mdx +0 -292
  176. package/.docs/raw/docs/guides/slash-commands.mdx +0 -358
  177. package/.docs/raw/docs/guides/speech.mdx +0 -172
  178. package/.docs/raw/docs/guides/suggestions.mdx +0 -384
  179. package/.docs/raw/docs/guides/virtualization.mdx +0 -133
  180. package/.docs/raw/docs/guides/voice.mdx +0 -310
  181. package/.docs/raw/docs/ink/adapters.mdx +0 -99
  182. package/.docs/raw/docs/ink/custom-backend.mdx +0 -254
  183. package/.docs/raw/docs/ink/hooks.mdx +0 -469
  184. package/.docs/raw/docs/ink/index.mdx +0 -237
  185. package/.docs/raw/docs/ink/migration.mdx +0 -138
  186. package/.docs/raw/docs/ink/primitives.mdx +0 -1259
  187. package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +0 -528
  188. package/.docs/raw/docs/integrations/auth/better-auth.mdx +0 -188
  189. package/.docs/raw/docs/integrations/auth/clerk.mdx +0 -166
  190. package/.docs/raw/docs/integrations/auth/next-auth.mdx +0 -191
  191. package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +0 -88
  192. package/.docs/raw/docs/integrations/frameworks/cloudflare-agents.mdx +0 -283
  193. package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +0 -188
  194. package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +0 -57
  195. package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +0 -201
  196. package/.docs/raw/docs/integrations/gateways/index.mdx +0 -162
  197. package/.docs/raw/docs/integrations/index.mdx +0 -178
  198. package/.docs/raw/docs/integrations/observability/helicone.mdx +0 -129
  199. package/.docs/raw/docs/integrations/observability/langfuse.mdx +0 -161
  200. package/.docs/raw/docs/integrations/observability/langsmith.mdx +0 -151
  201. package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +0 -773
  202. package/.docs/raw/docs/migrations/deprecation-policy.mdx +0 -42
  203. package/.docs/raw/docs/migrations/index.mdx +0 -50
  204. package/.docs/raw/docs/migrations/react-compatibility.mdx +0 -74
  205. package/.docs/raw/docs/migrations/react-langgraph-v0-7.mdx +0 -328
  206. package/.docs/raw/docs/migrations/toolkit-tools.mdx +0 -236
  207. package/.docs/raw/docs/migrations/v0-11.mdx +0 -172
  208. package/.docs/raw/docs/migrations/v0-12.mdx +0 -302
  209. package/.docs/raw/docs/migrations/v0-14.mdx +0 -297
  210. package/.docs/raw/docs/migrations/v0-15.mdx +0 -270
  211. package/.docs/raw/docs/primitives/action-bar.mdx +0 -352
  212. package/.docs/raw/docs/primitives/assistant-modal.mdx +0 -216
  213. package/.docs/raw/docs/primitives/attachment.mdx +0 -217
  214. package/.docs/raw/docs/primitives/branch-picker.mdx +0 -222
  215. package/.docs/raw/docs/primitives/chain-of-thought.mdx +0 -315
  216. package/.docs/raw/docs/primitives/composer.mdx +0 -659
  217. package/.docs/raw/docs/primitives/error.mdx +0 -142
  218. package/.docs/raw/docs/primitives/index.mdx +0 -99
  219. package/.docs/raw/docs/primitives/message.mdx +0 -618
  220. package/.docs/raw/docs/primitives/selection-toolbar.mdx +0 -191
  221. package/.docs/raw/docs/primitives/suggestion.mdx +0 -254
  222. package/.docs/raw/docs/primitives/thread-list.mdx +0 -467
  223. package/.docs/raw/docs/primitives/thread.mdx +0 -509
  224. package/.docs/raw/docs/react-native/adapters.mdx +0 -94
  225. package/.docs/raw/docs/react-native/custom-backend.mdx +0 -207
  226. package/.docs/raw/docs/react-native/hooks.mdx +0 -339
  227. package/.docs/raw/docs/react-native/index.mdx +0 -289
  228. package/.docs/raw/docs/react-native/migration.mdx +0 -142
  229. package/.docs/raw/docs/react-native/primitives.mdx +0 -976
  230. package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +0 -399
  231. package/.docs/raw/docs/runtimes/a2a/overview.mdx +0 -60
  232. package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +0 -216
  233. package/.docs/raw/docs/runtimes/ag-ui/agent-state.mdx +0 -124
  234. package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +0 -70
  235. package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +0 -243
  236. package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +0 -267
  237. package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +0 -61
  238. package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +0 -122
  239. package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +0 -135
  240. package/.docs/raw/docs/runtimes/ai-sdk/v6-legacy.mdx +0 -636
  241. package/.docs/raw/docs/runtimes/ai-sdk/v7.mdx +0 -731
  242. package/.docs/raw/docs/runtimes/claude-managed-agents.mdx +0 -118
  243. package/.docs/raw/docs/runtimes/concepts/adapters.mdx +0 -265
  244. package/.docs/raw/docs/runtimes/concepts/architecture.mdx +0 -167
  245. package/.docs/raw/docs/runtimes/concepts/stability.mdx +0 -68
  246. package/.docs/raw/docs/runtimes/concepts/threads.mdx +0 -513
  247. package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +0 -763
  248. package/.docs/raw/docs/runtimes/custom/data-stream.mdx +0 -339
  249. package/.docs/raw/docs/runtimes/custom/external-store.mdx +0 -957
  250. package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +0 -902
  251. package/.docs/raw/docs/runtimes/custom/overview.mdx +0 -71
  252. package/.docs/raw/docs/runtimes/eve/overview.mdx +0 -151
  253. package/.docs/raw/docs/runtimes/eve/quickstart.mdx +0 -192
  254. package/.docs/raw/docs/runtimes/google-adk/api.mdx +0 -256
  255. package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +0 -784
  256. package/.docs/raw/docs/runtimes/google-adk/overview.mdx +0 -69
  257. package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +0 -229
  258. package/.docs/raw/docs/runtimes/langchain.mdx +0 -901
  259. package/.docs/raw/docs/runtimes/langgraph/agent-state.mdx +0 -181
  260. package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +0 -305
  261. package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +0 -104
  262. package/.docs/raw/docs/runtimes/langgraph/overview.mdx +0 -84
  263. package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +0 -496
  264. package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +0 -144
  265. package/.docs/raw/docs/runtimes/langgraph/threads.mdx +0 -113
  266. package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +0 -29
  267. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -93
  268. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +0 -347
  269. package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +0 -393
  270. package/.docs/raw/docs/runtimes/opencode/hooks.mdx +0 -194
  271. package/.docs/raw/docs/runtimes/opencode/overview.mdx +0 -58
  272. package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +0 -119
  273. package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +0 -133
  274. package/.docs/raw/docs/tools/a2ui.mdx +0 -107
  275. package/.docs/raw/docs/tools/backend.mdx +0 -147
  276. package/.docs/raw/docs/tools/defining-tools.mdx +0 -574
  277. package/.docs/raw/docs/tools/dynamic-tools.mdx +0 -112
  278. package/.docs/raw/docs/tools/generative-ui-primitive.mdx +0 -180
  279. package/.docs/raw/docs/tools/generative-ui-slack.mdx +0 -167
  280. package/.docs/raw/docs/tools/generative-ui-teams.mdx +0 -160
  281. package/.docs/raw/docs/tools/generative-ui.mdx +0 -322
  282. package/.docs/raw/docs/tools/index.mdx +0 -72
  283. package/.docs/raw/docs/tools/interactables.mdx +0 -1084
  284. package/.docs/raw/docs/tools/mcp-apps.mdx +0 -363
  285. package/.docs/raw/docs/tools/mcp.mdx +0 -466
  286. package/.docs/raw/docs/tools/multi-agent.mdx +0 -237
  287. package/.docs/raw/docs/tools/openui.mdx +0 -175
  288. package/.docs/raw/docs/tools/tool-ui.mdx +0 -1020
  289. package/.docs/raw/docs/tools/user-managed-mcp.mdx +0 -428
  290. package/.docs/raw/docs/ui/assistant-modal.mdx +0 -166
  291. package/.docs/raw/docs/ui/assistant-sidebar.mdx +0 -89
  292. package/.docs/raw/docs/ui/attachment.mdx +0 -279
  293. package/.docs/raw/docs/ui/composer-trigger-popover.mdx +0 -247
  294. package/.docs/raw/docs/ui/context-display.mdx +0 -148
  295. package/.docs/raw/docs/ui/directive-text.mdx +0 -114
  296. package/.docs/raw/docs/ui/file.mdx +0 -159
  297. package/.docs/raw/docs/ui/follow-up-suggestions.mdx +0 -82
  298. package/.docs/raw/docs/ui/image.mdx +0 -102
  299. package/.docs/raw/docs/ui/markdown.mdx +0 -103
  300. package/.docs/raw/docs/ui/mcp-config.mdx +0 -107
  301. package/.docs/raw/docs/ui/mermaid.mdx +0 -92
  302. package/.docs/raw/docs/ui/message-timing.mdx +0 -93
  303. package/.docs/raw/docs/ui/model-selector.mdx +0 -455
  304. package/.docs/raw/docs/ui/part-grouping.mdx +0 -614
  305. package/.docs/raw/docs/ui/quote.mdx +0 -211
  306. package/.docs/raw/docs/ui/reasoning.mdx +0 -214
  307. package/.docs/raw/docs/ui/scrollbar.mdx +0 -77
  308. package/.docs/raw/docs/ui/sources.mdx +0 -186
  309. package/.docs/raw/docs/ui/streamdown.mdx +0 -392
  310. package/.docs/raw/docs/ui/syntax-highlighting.mdx +0 -205
  311. package/.docs/raw/docs/ui/thread-list.mdx +0 -411
  312. package/.docs/raw/docs/ui/thread.mdx +0 -559
  313. package/.docs/raw/docs/ui/tool-fallback.mdx +0 -141
  314. package/.docs/raw/docs/ui/tool-group.mdx +0 -240
  315. package/.docs/raw/docs/ui/voice.mdx +0 -173
  316. package/.docs/raw/docs/utilities/heat-graph.mdx +0 -237
  317. package/.docs/raw/docs/utilities/react-o11y.mdx +0 -362
  318. package/.docs/raw/docs/utilities/tw-shimmer.mdx +0 -212
  319. package/dist/constants.d.ts +0 -14
  320. package/dist/constants.d.ts.map +0 -1
  321. package/dist/constants.js +0 -19
  322. package/dist/constants.js.map +0 -1
  323. package/dist/prepare-docs/code-examples.d.ts +0 -5
  324. package/dist/prepare-docs/code-examples.d.ts.map +0 -1
  325. package/dist/prepare-docs/code-examples.js +0 -117
  326. package/dist/prepare-docs/code-examples.js.map +0 -1
  327. package/dist/prepare-docs/copy-raw.d.ts +0 -5
  328. package/dist/prepare-docs/copy-raw.d.ts.map +0 -1
  329. package/dist/prepare-docs/copy-raw.js +0 -49
  330. package/dist/prepare-docs/copy-raw.js.map +0 -1
  331. package/dist/prepare-docs/prepare.d.ts +0 -1
  332. package/dist/prepare-docs/prepare.js +0 -22
  333. package/dist/prepare-docs/prepare.js.map +0 -1
  334. package/dist/prompts/xulux-playground.d.ts +0 -12
  335. package/dist/prompts/xulux-playground.d.ts.map +0 -1
  336. package/dist/prompts/xulux-playground.js +0 -33
  337. package/dist/prompts/xulux-playground.js.map +0 -1
  338. package/dist/tools/docs.d.ts +0 -22
  339. package/dist/tools/docs.d.ts.map +0 -1
  340. package/dist/tools/docs.js +0 -177
  341. package/dist/tools/docs.js.map +0 -1
  342. package/dist/tools/examples.d.ts +0 -24
  343. package/dist/tools/examples.d.ts.map +0 -1
  344. package/dist/tools/examples.js +0 -87
  345. package/dist/tools/examples.js.map +0 -1
  346. package/dist/tools/resources.d.ts +0 -6
  347. package/dist/tools/resources.d.ts.map +0 -1
  348. package/dist/tools/resources.js +0 -75
  349. package/dist/tools/resources.js.map +0 -1
  350. package/dist/tools/search.d.ts +0 -24
  351. package/dist/tools/search.d.ts.map +0 -1
  352. package/dist/tools/search.js +0 -39
  353. package/dist/tools/search.js.map +0 -1
  354. package/dist/tools/tests/mcp-test-client.d.ts +0 -15
  355. package/dist/tools/tests/mcp-test-client.d.ts.map +0 -1
  356. package/dist/tools/tests/mcp-test-client.js +0 -68
  357. package/dist/tools/tests/mcp-test-client.js.map +0 -1
  358. package/dist/tools/tests/test-setup.d.ts +0 -7
  359. package/dist/tools/tests/test-setup.d.ts.map +0 -1
  360. package/dist/tools/tests/test-setup.js +0 -36
  361. package/dist/tools/tests/test-setup.js.map +0 -1
  362. package/dist/tools/xulux-templates.d.ts +0 -58
  363. package/dist/tools/xulux-templates.d.ts.map +0 -1
  364. package/dist/tools/xulux-templates.js +0 -84
  365. package/dist/tools/xulux-templates.js.map +0 -1
  366. package/dist/utils/cache.d.ts +0 -5
  367. package/dist/utils/cache.d.ts.map +0 -1
  368. package/dist/utils/cache.js +0 -18
  369. package/dist/utils/cache.js.map +0 -1
  370. package/dist/utils/logger.d.ts +0 -10
  371. package/dist/utils/logger.d.ts.map +0 -1
  372. package/dist/utils/logger.js +0 -20
  373. package/dist/utils/logger.js.map +0 -1
  374. package/dist/utils/mcp-format.d.ts +0 -11
  375. package/dist/utils/mcp-format.d.ts.map +0 -1
  376. package/dist/utils/mcp-format.js +0 -14
  377. package/dist/utils/mcp-format.js.map +0 -1
  378. package/dist/utils/mdx.d.ts +0 -12
  379. package/dist/utils/mdx.d.ts.map +0 -1
  380. package/dist/utils/mdx.js +0 -45
  381. package/dist/utils/mdx.js.map +0 -1
  382. package/dist/utils/paths.d.ts +0 -12
  383. package/dist/utils/paths.d.ts.map +0 -1
  384. package/dist/utils/paths.js +0 -93
  385. package/dist/utils/paths.js.map +0 -1
  386. package/dist/utils/search.d.ts +0 -10
  387. package/dist/utils/search.d.ts.map +0 -1
  388. package/dist/utils/search.js +0 -97
  389. package/dist/utils/search.js.map +0 -1
  390. package/dist/utils/security.d.ts +0 -5
  391. package/dist/utils/security.d.ts.map +0 -1
  392. package/dist/utils/security.js +0 -22
  393. package/dist/utils/security.js.map +0 -1
  394. package/dist/xulux/catalog-client.d.ts +0 -14
  395. package/dist/xulux/catalog-client.d.ts.map +0 -1
  396. package/dist/xulux/catalog-client.js +0 -112
  397. package/dist/xulux/catalog-client.js.map +0 -1
  398. package/dist/xulux/fallback-catalog.d.ts +0 -7
  399. package/dist/xulux/fallback-catalog.d.ts.map +0 -1
  400. package/dist/xulux/fallback-catalog.js +0 -47
  401. package/dist/xulux/fallback-catalog.js.map +0 -1
  402. package/dist/xulux/fetch-sandbox.d.ts +0 -5
  403. package/dist/xulux/fetch-sandbox.d.ts.map +0 -1
  404. package/dist/xulux/fetch-sandbox.js +0 -40
  405. package/dist/xulux/fetch-sandbox.js.map +0 -1
  406. package/dist/xulux/template-service.d.ts +0 -84
  407. package/dist/xulux/template-service.d.ts.map +0 -1
  408. package/dist/xulux/template-service.js +0 -223
  409. package/dist/xulux/template-service.js.map +0 -1
  410. package/dist/xulux/types.d.ts +0 -55
  411. package/dist/xulux/types.d.ts.map +0 -1
  412. package/dist/xulux/types.js +0 -6
  413. package/dist/xulux/types.js.map +0 -1
  414. package/src/constants.ts +0 -24
  415. package/src/prepare-docs/code-examples.ts +0 -158
  416. package/src/prepare-docs/copy-raw.ts +0 -50
  417. package/src/prepare-docs/prepare.ts +0 -24
  418. package/src/prompts/xulux-playground.ts +0 -36
  419. package/src/tools/docs.ts +0 -255
  420. package/src/tools/examples.ts +0 -114
  421. package/src/tools/resources.ts +0 -111
  422. package/src/tools/search.ts +0 -46
  423. package/src/tools/tests/completions.test.ts +0 -60
  424. package/src/tools/tests/directory-size-cap.test.ts +0 -50
  425. package/src/tools/tests/docs.test.ts +0 -147
  426. package/src/tools/tests/examples.test.ts +0 -94
  427. package/src/tools/tests/integration.test.ts +0 -45
  428. package/src/tools/tests/json-parsing.test.ts +0 -23
  429. package/src/tools/tests/listings-cache.test.ts +0 -19
  430. package/src/tools/tests/mcp-protocol.test.ts +0 -216
  431. package/src/tools/tests/mcp-test-client.ts +0 -111
  432. package/src/tools/tests/path-traversal.test.ts +0 -84
  433. package/src/tools/tests/resources.test.ts +0 -133
  434. package/src/tools/tests/search.test.ts +0 -37
  435. package/src/tools/tests/test-setup.ts +0 -50
  436. package/src/tools/tests/xulux-templates.test.ts +0 -325
  437. package/src/tools/xulux-templates.ts +0 -141
  438. package/src/utils/cache.ts +0 -20
  439. package/src/utils/logger.ts +0 -20
  440. package/src/utils/mcp-format.ts +0 -14
  441. package/src/utils/mdx.ts +0 -59
  442. package/src/utils/paths.ts +0 -139
  443. package/src/utils/search.ts +0 -131
  444. package/src/utils/security.ts +0 -52
  445. package/src/utils/tests/cache.test.ts +0 -51
  446. package/src/utils/tests/mcp-format.test.ts +0 -22
  447. package/src/utils/tests/security.test.ts +0 -119
  448. package/src/xulux/catalog-client.ts +0 -150
  449. package/src/xulux/fallback-catalog.ts +0 -63
  450. package/src/xulux/fetch-sandbox.ts +0 -56
  451. package/src/xulux/template-service.ts +0 -406
  452. package/src/xulux/types.ts +0 -64
@@ -1,56 +0,0 @@
1
- ---
2
- title: Generative UI Actions
3
- description: "Register handlers for model-emitted $action payloads and dispatch them from interactive generative UI components."
4
- ---
5
-
6
- import { ActionDispatchContext, ActionRegistry, createActionRegistry } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### ActionDispatchContext
18
-
19
- Context handed to an [ActionHandler](/docs/api-reference/generative-ui/actions#actionhandler) when an `$action` fires.
20
-
21
- <ParametersTable {...ActionDispatchContext} />
22
-
23
- ### ActionHandler
24
-
25
- Resolves a single `$action.type`. Fire-and-forget actions return `void` or a
26
- promise that resolves to it; human-in-the-loop actions return a value the
27
- runtime uses to resume the run (see IR doc Open question #2 — the resume
28
- value is left as `unknown` and documented per-action). The return value is
29
- handed back to `dispatch`'s caller as `unknown`.
30
-
31
- ```ts
32
- type ActionHandler = (
33
- ctx: ActionDispatchContext,
34
- ) => unknown | Promise<unknown>;
35
- ```
36
-
37
- ### ActionRegistry
38
-
39
- The host-provided map from `$action.type` to [ActionHandler](/docs/api-reference/generative-ui/actions#actionhandler). This is the single dispatch target for rendered generative UI: every interactive component fires its `$action` here through the injected `$dispatch` (a submit Button defers to its ancestor form's dispatch instead). The payload's `$input` takes one of two shapes: a single value for a standalone control's dispatch (`Select`, `Input`, `DatePicker`, `Checkbox`, `RadioGroup`), or an object keyed by field `name` for a `Form` or a `Card` with `asForm` set. Construct it with [createActionRegistry](/docs/api-reference/generative-ui/actions#createactionregistry) and pass it to `JSONGenerativeUI`.
40
-
41
- <ParametersTable {...ActionRegistry} />
42
-
43
- ### createActionRegistry
44
-
45
- <ParametersTable {...createActionRegistry} />
46
-
47
- ### emptyActionRegistry
48
-
49
- A no-op registry used when no handlers are provided. Dispatch resolves to
50
- `undefined` and logs a warning in dev for unknown types, so a model-emitted
51
- action with no handler degrades to "does nothing" rather than throwing.
52
-
53
- ```ts
54
- const emptyActionRegistry: ActionRegistry;
55
- ```
56
- {/* api-reference:end */}
@@ -1,86 +0,0 @@
1
- ---
2
- title: Generative UI Components
3
- description: Define the component library JSONGenerativeUI can render, including schemas, render functions, and the default vocabulary.
4
- ---
5
-
6
- import { GenerativeUIComponent, defineGenerativeComponents } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### defaultGenerativeUILibrary
18
-
19
- The closed generative-ui vocabulary the factory ships: a fixed set of
20
- intrinsic components the model may render, each a zod `properties` schema
21
- plus an unstyled structural `render` (semantic HTML with a `data-aui`
22
- attribute naming the component, plus `data-aui-<prop>` hooks, for the host
23
- to style). Users opt in by passing it to
24
- `new JSONGenerativeUI({ library: defaultGenerativeUILibrary })`, and override
25
- or extend entries with their own `defineGenerativeComponents`.
26
-
27
- ```ts
28
- const defaultGenerativeUILibrary: GenerativeUILibrary;
29
- ```
30
-
31
- ### defineGenerativeComponents
32
-
33
- Authoring helper for a `"use generative"` generative-UI library — the set of
34
- components the model may render. Each component colocates its `properties`
35
- schema (kept on every build, drives the tool parameters) with its `render`
36
- (kept only on the client). Pass the result to [JSONGenerativeUI](/docs/api-reference/generative-ui/json-generative-ui#jsongenerativeui):
37
-
38
- ```tsx
39
- "use generative";
40
- const generative = new JSONGenerativeUI({
41
- library: defineGenerativeComponents({
42
- Card: {
43
- description: "A card.",
44
- properties: z.object({ title: z.string() }),
45
- render: (props) => <Card {...props} />,
46
- },
47
- }),
48
- });
49
- ```
50
-
51
- Unlike [defineToolkit](/docs/api-reference/tools/toolkits#definetoolkit), it has **no runtime implementation**. A
52
- `"use generative"` compiler unwraps the `defineGenerativeComponents(...)` call
53
- per build, dropping each `render` (and its client-only imports) from the server
54
- build. Reaching it at runtime means the module wasn't compiled (the directive
55
- is missing, or it was used outside a `"use generative"` file), so it throws
56
- rather than shipping client `render` code to the server.
57
-
58
- <ParametersTable {...defineGenerativeComponents} />
59
-
60
- ### GenerativeUIComponent
61
-
62
- A component the model is allowed to render, with the schema for its props.
63
-
64
- Components opt into prop streaming with `streamProperties`: they render as
65
- props arrive, so `render` sees `Partial<P>` while `$status` is `"streaming"`
66
- and the full `P` once it is `"done"`. By default a component opts out and is
67
- only rendered once its props are complete.
68
-
69
- `render` is a function of `props`, not a React component. Direct hook use is
70
- fine (each node is mounted on its own fiber), but a given node must keep its
71
- `type` across renders for hook identity to be stable.
72
-
73
- <ParametersTable {...GenerativeUIComponent} />
74
-
75
- ### GenerativeUILibrary
76
-
77
- The consumer-provided allowlist of components the model is permitted to
78
- render. Keys are the `type` values referenced in the generative-ui tree
79
- (e.g. `"Card"`, `"Button"`); values describe each component.
80
-
81
- This registry is the security boundary — any `type` not present is rejected.
82
-
83
- ```ts
84
- type GenerativeUILibrary = Record<string, GenerativeUIComponent>;
85
- ```
86
- {/* api-reference:end */}
@@ -1,39 +0,0 @@
1
- ---
2
- title: Generative UI API Reference
3
- description: Spec-driven generative UI for assistant-ui. The data format an assistant streams, the component registry that resolves it, and the renderer that turns it into React elements.
4
- ---
5
-
6
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
7
- {/* The page list is generated from exported APIs; edit only the manual prose slot. */}
8
-
9
- ## Pages
10
-
11
- <Cards>
12
- <Card title={"JSONGenerativeUI"} href={"/docs/api-reference/generative-ui/json-generative-ui"}>
13
- {"Create present and prompt_user tools from a generative UI component library, with options for display mode and action dispatch."}
14
- </Card>
15
- <Card title={"Generative UI Components"} href={"/docs/api-reference/generative-ui/components"}>
16
- {"Define the component library JSONGenerativeUI can render, including schemas, render functions, and the default vocabulary."}
17
- </Card>
18
- <Card title={"Generative UI Actions"} href={"/docs/api-reference/generative-ui/actions"}>
19
- {"Register handlers for model-emitted $action payloads and dispatch them from interactive generative UI components."}
20
- </Card>
21
- <Card title={"Generative UI Spec"} href={"/docs/api-reference/generative-ui/spec"}>
22
- {"The serializable node tree an assistant emits to describe generative UI. Covers the GenerativeUISpec format, its nodes, and the message part that carries the spec."}
23
- </Card>
24
- <Card title={"Generative UI Rendering"} href={"/docs/api-reference/generative-ui/rendering"}>
25
- {"Render generative UI trees, build present-tool schemas, and inspect or serialize model-produced UI nodes."}
26
- </Card>
27
- <Card title={"Slack Block Kit"} href={"/docs/api-reference/generative-ui/slack"}>
28
- {"Convert generative UI trees to Slack Block Kit payloads and decode block_actions interactions back into $action payloads."}
29
- </Card>
30
- <Card title={"Microsoft Teams"} href={"/docs/api-reference/generative-ui/teams"}>
31
- {"Convert generative UI trees to Teams Adaptive Cards and decode Action.Submit payloads back into $action payloads."}
32
- </Card>
33
- <Card title={"A2UI"} href={"/docs/api-reference/generative-ui/a2ui"}>
34
- {"Convert A2UI surface operations into generative UI specs."}
35
- </Card>
36
- <Card title={"Generative UI Tokens"} href={"/docs/api-reference/generative-ui/tokens"}>
37
- {"Shared token arrays used by the default generative UI vocabulary for sizing, color, alignment, and component variants."}
38
- </Card>
39
- </Cards>
@@ -1,42 +0,0 @@
1
- ---
2
- title: JSONGenerativeUI
3
- description: "Create present and prompt_user tools from a generative UI component library, with options for display mode and action dispatch."
4
- ---
5
-
6
- import { JSONGenerativeUI, JSONGenerativeUIOptions, PresentToolOptions } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### JSONGenerativeUI
18
-
19
- Client build of [JSONGenerativeUI](/docs/api-reference/generative-ui/json-generative-ui#jsongenerativeui), resolved through the package's
20
- `default` export condition (browser and SSR).
21
-
22
- `present` is a frontend tool that renders the model's `{ $type,...props }`
23
- tree against the library and resolves immediately. `prompt_user` is a
24
- human-in-the-loop tool: the model pauses and the rendered UI supplies the
25
- result. Both draw the tree the same way, so they share one `render`. The
26
- `actions` registry (if provided) is threaded into the render context so
27
- interactive components can fire `$action` through `$dispatch`.
28
-
29
- <ParametersTable {...JSONGenerativeUI} />
30
-
31
- ### JSONGenerativeUIOptions
32
-
33
- Options for [JSONGenerativeUI](/docs/api-reference/generative-ui/json-generative-ui#jsongenerativeui).
34
-
35
- <ParametersTable {...JSONGenerativeUIOptions} />
36
-
37
- ### PresentToolOptions
38
-
39
- Options for [JSONGenerativeUI.present](/docs/api-reference/generative-ui/json-generative-ui#jsongenerativeui).
40
-
41
- <ParametersTable {...PresentToolOptions} />
42
- {/* api-reference:end */}
@@ -1,84 +0,0 @@
1
- ---
2
- title: Generative UI Rendering
3
- description: Render generative UI trees, build present-tool schemas, and inspect or serialize model-produced UI nodes.
4
- ---
5
-
6
- import { GenerativeUIRender, GenerativeUIRenderContext, GenerativeUIRenderError, buildPresentParameters, generativeUIToJSX, renderGenerativeUI } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### buildPresentParameters
18
-
19
- Builds the JSON schema for the `present` tool from a [GenerativeUILibrary](/docs/api-reference/generative-ui/components#generativeuilibrary).
20
-
21
- The model produces a node `{ $type, $key?,...props }` where `$type` selects
22
- a component, the optional `$key` pins a stable identity for list items that
23
- may reorder, and the rest are its props. The schema is a flat object: `$type`
24
- is an enum of the component names, every component's props are merged into
25
- one optional bag, and `children` recurses via `$defs` so the tree can nest.
26
-
27
- It is intentionally flat rather than a per-`$type` discriminated union. Tool /
28
- function-call schemas (OpenAI and others) require the top-level parameters to
29
- be a plain object and reject a top-level `oneOf`/`anyOf`/`enum`. So props can't
30
- be refined per `$type` at the root; the model is guided instead by `$type`'s
31
- description (which lists each component) and each prop's own description. The
32
- renderer validates nothing here — an unknown `$type` or stray prop is handled
33
- at render time — so a looser schema only costs the model a hint, not safety.
34
-
35
- <ParametersTable {...buildPresentParameters} />
36
-
37
- ### GenerativeUIRender
38
-
39
- Internal renderer. Resolves a [GenerativeUISpec](/docs/api-reference/generative-ui/spec#generativeuispec) against the consumer
40
- allowlist. Used by `MessagePrimitive.GenerativeUI` and by
41
- `MessagePrimitive.Parts` when handling a `generative-ui` part.
42
-
43
- <ParametersTable {...GenerativeUIRender} />
44
-
45
- ### GenerativeUIRenderContext
46
-
47
- The render context threaded through [renderGenerativeUI](/docs/api-reference/generative-ui/rendering#rendergenerativeui).
48
-
49
- <ParametersTable {...GenerativeUIRenderContext} />
50
-
51
- ### GenerativeUIRenderError
52
-
53
- Thrown when a generative-ui spec references a component name that is not
54
- present in the consumer-provided allowlist. The allowlist is the security
55
- boundary in the same-realm rendering path — there is no fallback by
56
- default. Pass `Fallback` to opt into a soft-fail UX.
57
-
58
- <ParametersTable {...GenerativeUIRenderError} />
59
-
60
- ### generativeUIToJSX
61
-
62
- Serializes a generative-UI node to a JSX-like string for display: the "view source" of a model-produced tree. The wire form `{ $type: "Weather", id: "x" }` becomes `<Weather id="x" />`, and nested `children` render between tags: `<Card title="Hi"><Text>hello</Text></Card>`. A model-provided `$key` becomes the JSX `key` attribute.
63
-
64
- By default this is a faithful textual rendering, not a parser: text children are emitted verbatim (not HTML/JSX-escaped), so the result is meant to be shown, not re-parsed. Returns `""` for nodes that aren't renderable (no `$type` yet, `null`, booleans).
65
-
66
- Pass `{ escape: true }` to make the output safe to paste back into JSX: any string child containing `<`, `>`, `&`, `{`, or `}` is emitted as a JSON-stringified expression (`{JSON.stringify(child)}`) instead of verbatim, while a string child with none of those characters still renders verbatim.
67
-
68
- Pass `{ pretty: true }` to pretty-print nested element trees with two-space indentation, while pure text children stay on one line.
69
-
70
- <ParametersTable {...generativeUIToJSX} />
71
-
72
- ### renderGenerativeUI
73
-
74
- Renders a generative-ui tree against a [GenerativeUILibrary](/docs/api-reference/generative-ui/components#generativeuilibrary).
75
-
76
- The model emits each node as a flat object `{ $type,...props }`. We first
77
- normalize that wire form into the canonical NormalizedUINode (with
78
- `children` lifted to a reserved top-level key), then render: each `type` is
79
- looked up in the library and its `props` are passed to the component's
80
- `render(props, context)`, with `children` rendered recursively so components
81
- can nest.
82
-
83
- <ParametersTable {...renderGenerativeUI} />
84
- {/* api-reference:end */}
@@ -1,85 +0,0 @@
1
- ---
2
- title: Slack Block Kit
3
- description: "Convert generative UI trees to Slack Block Kit payloads and decode block_actions interactions back into $action payloads."
4
- ---
5
-
6
- import { FromSlackBlocksResult, SlackBlocksResult, SlackConversionWarning, ToSlackBlocksOptions, decodeBlockAction, fromSlackBlocks, toSlackBlocks } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### decodeBlockAction
18
-
19
- Decodes one structural entry from a Slack `block_actions` payload.
20
- `$input` is reserved for the runtime selection: a `$input` key inside the
21
- button's JSON `value` payload is dropped rather than spread into the result.
22
-
23
- <ParametersTable {...decodeBlockAction} />
24
-
25
- ### fromSlackBlocks
26
-
27
- Converts Slack Block Kit JSON back into a generative-ui IR tree, inverting
28
- [toSlackBlocks](/docs/api-reference/generative-ui/slack#toslackblocks). Accepts a blocks array or a `{ blocks }` wrapper;
29
- malformed input resolves to an empty node list plus a warning, and an
30
- unrecognized block or action element is skipped with a "dropped" warning.
31
- Every array read along the way (blocks, fields, options, elements, cards,
32
- rows, cells) is bounded to its site's cap before it is mapped over, so a
33
- hostile array (sparse or proxied with a fabricated `length`) is clamped
34
- with a "clamped" warning instead of stalling the event loop. Never throws.
35
-
36
- The Slack shape is lossier than the IR, so some information cannot be
37
- recovered: a context block's elements always decode as `Caption` (the
38
- original `Badge` vs `Caption` distinction does not survive the round trip),
39
- a button's `buttonStyle` is only recovered for the `primary`/`danger` Slack
40
- styles, a native alert block's `title` and `description` merge into a
41
- single `description` string, and a card's layout collapses to its `title`,
42
- a flat `children` list (image, then text, then caption, in that order),
43
- and `confirm`/`cancel` footer buttons. A section field's label and value
44
- are split on the first `*`+newline delimiter, so a label or value that
45
- itself contains that exact delimiter cannot be split back unambiguously.
46
- A data-table cell that Slack carries as `raw_text` always decodes as a
47
- string, even when its text is the stringified form of a boolean, since the
48
- Slack shape does not distinguish a boolean from ordinary text.
49
-
50
- <ParametersTable {...fromSlackBlocks} />
51
-
52
- ### FromSlackBlocksResult
53
-
54
- The IR nodes and non-fatal warnings produced by converting Slack Block Kit JSON back into generative UI.
55
-
56
- <ParametersTable {...FromSlackBlocksResult} />
57
-
58
- ### SlackBlocksResult
59
-
60
- The blocks and non-fatal warnings produced by Slack conversion.
61
-
62
- <ParametersTable {...SlackBlocksResult} />
63
-
64
- ### SlackConversionWarning
65
-
66
- A non-fatal note reported during Slack conversion.
67
-
68
- `clamped` removed content to fit a limit, `dropped` discarded a node or one
69
- of its props and may leave a placeholder note behind, and `fallback` emitted
70
- the node in a different form than requested.
71
-
72
- <ParametersTable {...SlackConversionWarning} />
73
-
74
- ### toSlackBlocks
75
-
76
- Converts a generative-UI tree into Slack Block Kit JSON and downgrade warnings.
77
-
78
- <ParametersTable {...toSlackBlocks} />
79
-
80
- ### ToSlackBlocksOptions
81
-
82
- Options that select the target Slack surface.
83
-
84
- <ParametersTable {...ToSlackBlocksOptions} />
85
- {/* api-reference:end */}
@@ -1,45 +0,0 @@
1
- ---
2
- title: Generative UI Spec
3
- description: The serializable node tree an assistant emits to describe generative UI. Covers the GenerativeUISpec format, its nodes, and the message part that carries the spec.
4
- ---
5
-
6
- import { GenerativeUIMessagePart, GenerativeUINode, GenerativeUISpec } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### GenerativeUIMessagePart
18
-
19
- A message part that carries a JSON spec describing UI to render.
20
-
21
- Render with `<MessagePrimitive.GenerativeUI components={...} />`. The
22
- primitive resolves component names against the consumer-provided allowlist
23
- — any unknown name throws a typed error rather than rendering. Stream-
24
- friendly: a partially-streamed spec renders progressively.
25
-
26
- <ParametersTable {...GenerativeUIMessagePart} />
27
-
28
- ### GenerativeUINode
29
-
30
- A JSON spec describing a tree of UI components to render.
31
-
32
- The agent emits a [GenerativeUIMessagePart](/docs/api-reference/generative-ui/spec#generativeuimessagepart) containing this spec, and
33
- the consumer-provided component allowlist is used to resolve `component`
34
- names. Any component referenced that is not present in the allowlist is
35
- rejected with a typed error — the allowlist is the security boundary in the
36
- default same-realm rendering path.
37
-
38
- <ParametersTable {...GenerativeUINode} />
39
-
40
- ### GenerativeUISpec
41
-
42
- The root spec for a generative UI tree.
43
-
44
- <ParametersTable {...GenerativeUISpec} />
45
- {/* api-reference:end */}
@@ -1,93 +0,0 @@
1
- ---
2
- title: Microsoft Teams
3
- description: "Convert generative UI trees to Teams Adaptive Cards and decode Action.Submit payloads back into $action payloads."
4
- ---
5
-
6
- import { AdaptiveCardResult, TeamsAttachmentsResult, TeamsConversionWarning, decodeSubmitData, toAdaptiveCard, toTeamsAttachments } from "@/generated/typeDocs";
7
-
8
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
9
- {/* Do not edit manually. */}
10
-
11
- {/* api-reference:start */}
12
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
13
- {/* Do not edit this block manually. */}
14
-
15
- ## API Reference
16
-
17
- ### AdaptiveCardResult
18
-
19
- The card and non-fatal warnings produced by [toAdaptiveCard](/docs/api-reference/generative-ui/teams#toadaptivecard).
20
-
21
- <ParametersTable {...AdaptiveCardResult} />
22
-
23
- ### decodeSubmitData
24
-
25
- Decodes the merged `activity.value` object a Teams bot receives on
26
- Action.Submit, inverting the `aui` envelope buildSubmitAction nests
27
- the resume action under. Adaptive Cards fold every other same-card input's
28
- value into the same submit object keyed by its `id`, so every top-level key
29
- besides `aui` is collected into `$input` (omitted when there are none).
30
- `aui` is reserved for the envelope: `toAdaptiveCard` renames any input
31
- whose id would collide to an unused id derived from it before encoding, so
32
- a same-card input value can never land on this key. `$input` and `type`
33
- are reserved on the way out: a `$input` key inside the envelope payload is
34
- dropped so the slot only ever reflects same-card input values, and the
35
- envelope's own `type` wins over a payload key of the same name. Every
36
- collected key (in `payload` or `$input`) is kept as an own data property of
37
- the returned object, even a `__proto__` or `constructor` key, since the
38
- object is always built by spreading and `Object.fromEntries` rather than by
39
- keyed assignment. Envelope keys are read as own properties only, so
40
- prototype-inherited `aui`, `type`, or `payload` values never dispatch.
41
- Returns `undefined` for a missing or malformed `aui` envelope; never throws.
42
-
43
- <ParametersTable {...decodeSubmitData} />
44
-
45
- ### TeamsAttachmentsResult
46
-
47
- The attachments and non-fatal warnings produced by [toTeamsAttachments](/docs/api-reference/generative-ui/teams#toteamsattachments).
48
-
49
- <ParametersTable {...TeamsAttachmentsResult} />
50
-
51
- ### TeamsConversionWarning
52
-
53
- A non-fatal note reported during Teams conversion.
54
-
55
- `clamped` removed content to fit a limit, `dropped` discarded a node or one
56
- of its props and may leave a placeholder note behind, and `fallback`
57
- emitted the node in a different form than requested. `advisory` changed
58
- nothing at all and notes content Teams may still render poorly or refuse,
59
- such as a payload over the byte budget or a `Row` past the recommended
60
- column count.
61
-
62
- <ParametersTable {...TeamsConversionWarning} />
63
-
64
- ### toAdaptiveCard
65
-
66
- Converts a generative-ui tree into a Microsoft Teams Adaptive Card and
67
- non-fatal conversion warnings. Sizes, weights, and colors map to Adaptive
68
- Card's semantic enums rather than raw values. An Input/Select/RadioGroup/
69
- Checkbox/DatePicker whose id would be the reserved RESERVED_INPUT_ID
70
- is renamed with a warning (see `decodeSubmitData`). Never throws: an
71
- unknown `$type` is skipped with a "dropped" warning, and a malformed input
72
- resolves to an empty card plus a "dropped" warning instead of throwing.
73
-
74
- <ParametersTable {...toAdaptiveCard} />
75
-
76
- ### ToAdaptiveCardOptions
77
-
78
- Options accepted by [toAdaptiveCard](/docs/api-reference/generative-ui/teams#toadaptivecard) and [toTeamsAttachments](/docs/api-reference/generative-ui/teams#toteamsattachments). Reserved for future extension; no options are currently defined.
79
-
80
- ```ts
81
- export interface ToAdaptiveCardOptions {}
82
- ```
83
-
84
- ### toTeamsAttachments
85
-
86
- Converts a generative-ui tree into Teams bot-framework message attachments.
87
- A root-level `Carousel` becomes one attachment per `Card` child (clamped to
88
- CAROUSEL_ATTACHMENT_CAP) with `attachmentLayout: "carousel"`;
89
- anything else converts through [toAdaptiveCard](/docs/api-reference/generative-ui/teams#toadaptivecard)'s engine into a
90
- single attachment. Never throws.
91
-
92
- <ParametersTable {...toTeamsAttachments} />
93
- {/* api-reference:end */}
@@ -1,62 +0,0 @@
1
- ---
2
- title: Generative UI Tokens
3
- description: Shared token arrays used by the default generative UI vocabulary for sizing, color, alignment, and component variants.
4
- ---
5
-
6
- {/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}
7
- {/* Do not edit manually. */}
8
-
9
- {/* api-reference:start */}
10
- {/* AUTO-GENERATED by scripts/generate-api-reference.mts */}
11
- {/* Do not edit this block manually. */}
12
-
13
- ## API Reference
14
-
15
- ### ALERT_TONES
16
-
17
- ```ts
18
- const ALERT_TONES: readonly ["info", "success", "warning", "danger"];
19
- ```
20
-
21
- ### ALIGNS
22
-
23
- ```ts
24
- const ALIGNS: readonly ["start", "center", "end"];
25
- ```
26
-
27
- ### BUTTON_STYLES
28
-
29
- ```ts
30
- const BUTTON_STYLES: readonly ["primary", "secondary", "outline", "ghost", "danger"];
31
- ```
32
-
33
- ### COLORS
34
-
35
- ```ts
36
- const COLORS: readonly ["emphasis", "secondary", "alpha-70", "white", "white-70", "white-50"];
37
- ```
38
-
39
- ### IMAGE_SIZE_TOKENS
40
-
41
- ```ts
42
- const IMAGE_SIZE_TOKENS: readonly ["sm", "md", "lg"];
43
- ```
44
-
45
- ### JUSTIFIES
46
-
47
- ```ts
48
- const JUSTIFIES: readonly ["start", "center", "end", "between"];
49
- ```
50
-
51
- ### TEXT_SIZES
52
-
53
- ```ts
54
- const TEXT_SIZES: readonly ["sm", "md", "lg", "xl", "2xl", "3xl"];
55
- ```
56
-
57
- ### WEIGHTS
58
-
59
- ```ts
60
- const WEIGHTS: readonly ["normal", "medium", "semibold", "bold"];
61
- ```
62
- {/* api-reference:end */}