@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.
- package/README.md +16 -43
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -91
- package/dist/index.js.map +1 -1
- package/dist/proxy.d.ts +9 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +76 -0
- package/dist/proxy.js.map +1 -0
- package/package.json +8 -12
- package/src/index.ts +3 -115
- package/src/proxy.test.ts +250 -0
- package/src/proxy.ts +111 -0
- package/.docs/organized/code-examples/waterfall.md +0 -807
- package/.docs/organized/code-examples/with-a2a.md +0 -675
- package/.docs/organized/code-examples/with-ag-ui.md +0 -553
- package/.docs/organized/code-examples/with-ai-sdk-v7.md +0 -466
- package/.docs/organized/code-examples/with-artifacts.md +0 -815
- package/.docs/organized/code-examples/with-assistant-transport.md +0 -576
- package/.docs/organized/code-examples/with-browser-extension.md +0 -371
- package/.docs/organized/code-examples/with-chain-of-thought.md +0 -962
- package/.docs/organized/code-examples/with-cloud-standalone.md +0 -681
- package/.docs/organized/code-examples/with-cloud.md +0 -439
- package/.docs/organized/code-examples/with-custom-thread-list.md +0 -569
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +0 -527
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +0 -697
- package/.docs/organized/code-examples/with-eve.md +0 -405
- package/.docs/organized/code-examples/with-expo.md +0 -2246
- package/.docs/organized/code-examples/with-external-store.md +0 -421
- package/.docs/organized/code-examples/with-ffmpeg.md +0 -829
- package/.docs/organized/code-examples/with-generative-ui.md +0 -1810
- package/.docs/organized/code-examples/with-google-adk.md +0 -368
- package/.docs/organized/code-examples/with-heat-graph.md +0 -304
- package/.docs/organized/code-examples/with-image-generation.md +0 -463
- package/.docs/organized/code-examples/with-interactables.md +0 -733
- package/.docs/organized/code-examples/with-langchain.md +0 -446
- package/.docs/organized/code-examples/with-langgraph.md +0 -855
- package/.docs/organized/code-examples/with-livekit.md +0 -643
- package/.docs/organized/code-examples/with-mcp.md +0 -782
- package/.docs/organized/code-examples/with-nuxt.md +0 -2428
- package/.docs/organized/code-examples/with-opencode.md +0 -1974
- package/.docs/organized/code-examples/with-openui.md +0 -450
- package/.docs/organized/code-examples/with-pi.md +0 -2084
- package/.docs/organized/code-examples/with-react-hook-form.md +0 -727
- package/.docs/organized/code-examples/with-react-ink-web.md +0 -740
- package/.docs/organized/code-examples/with-react-ink.md +0 -473
- package/.docs/organized/code-examples/with-react-router.md +0 -936
- package/.docs/organized/code-examples/with-resumable-stream.md +0 -668
- package/.docs/organized/code-examples/with-store.md +0 -679
- package/.docs/organized/code-examples/with-svelte.md +0 -415
- package/.docs/organized/code-examples/with-sveltekit.md +0 -1061
- package/.docs/organized/code-examples/with-tanstack.md +0 -812
- package/.docs/organized/code-examples/with-tap-runtime.md +0 -813
- package/.docs/organized/code-examples/with-virtualized-thread.md +0 -681
- package/.docs/organized/code-examples/with-vue.md +0 -408
- package/.docs/raw/docs/(getting-started)/architecture.mdx +0 -146
- package/.docs/raw/docs/(getting-started)/base-ui.mdx +0 -39
- package/.docs/raw/docs/(getting-started)/cli.mdx +0 -542
- package/.docs/raw/docs/(getting-started)/devtools.mdx +0 -79
- package/.docs/raw/docs/(getting-started)/index.mdx +0 -23
- package/.docs/raw/docs/(getting-started)/installation.mdx +0 -483
- package/.docs/raw/docs/(getting-started)/llm.mdx +0 -211
- package/.docs/raw/docs/(getting-started)/rtl.mdx +0 -78
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +0 -36
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +0 -20
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +0 -34
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +0 -44
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +0 -59
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +0 -20
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +0 -26
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +0 -84
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +0 -22
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +0 -64
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +0 -22
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +0 -57
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +0 -49
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/a2ui.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/actions.mdx +0 -56
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/components.mdx +0 -86
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/index.mdx +0 -39
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/json-generative-ui.mdx +0 -42
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/rendering.mdx +0 -84
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/slack.mdx +0 -85
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/spec.mdx +0 -45
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/teams.mdx +0 -93
- package/.docs/raw/docs/(reference)/api-reference/generative-ui/tokens.mdx +0 -62
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +0 -129
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +0 -31
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +0 -34
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +0 -350
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +0 -28
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +0 -97
- package/.docs/raw/docs/(reference)/api-reference/integrations/ai-sdk.mdx +0 -200
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +0 -24
- package/.docs/raw/docs/(reference)/api-reference/integrations/eve.mdx +0 -118
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +0 -28
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -37
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +0 -50
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +0 -22
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +0 -20
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +0 -566
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +0 -152
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +0 -239
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +0 -208
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +0 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +0 -99
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +0 -145
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +0 -82
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +0 -637
- package/.docs/raw/docs/(reference)/api-reference/primitives/composition.mdx +0 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +0 -65
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +0 -73
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +0 -117
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +0 -339
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +0 -77
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +0 -88
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +0 -81
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +0 -129
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +0 -138
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +0 -122
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +0 -289
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +0 -20
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +0 -24
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +0 -32
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +0 -43
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +0 -43
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +0 -24
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +0 -20
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +0 -24
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +0 -24
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +0 -36
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +0 -85
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +0 -45
- package/.docs/raw/docs/(reference)/api-reference/tools/interactables-legacy.mdx +0 -55
- package/.docs/raw/docs/(reference)/api-reference/tools/interactables.mdx +0 -151
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +0 -106
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +0 -62
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +0 -178
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +0 -48
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +0 -62
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +0 -22
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +0 -19
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +0 -152
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +0 -22
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +0 -54
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +0 -36
- package/.docs/raw/docs/cloud/ai-sdk-assistant-ui.mdx +0 -527
- package/.docs/raw/docs/cloud/ai-sdk.mdx +0 -604
- package/.docs/raw/docs/cloud/authorization.mdx +0 -252
- package/.docs/raw/docs/cloud/index.mdx +0 -46
- package/.docs/raw/docs/cloud/langgraph.mdx +0 -554
- package/.docs/raw/docs/copilots/assistant-frame.mdx +0 -411
- package/.docs/raw/docs/copilots/make-assistant-visible.mdx +0 -82
- package/.docs/raw/docs/copilots/model-context.mdx +0 -156
- package/.docs/raw/docs/copilots/motivation.mdx +0 -202
- package/.docs/raw/docs/copilots/use-assistant-instructions.mdx +0 -64
- package/.docs/raw/docs/guides/attachments.mdx +0 -619
- package/.docs/raw/docs/guides/branching.mdx +0 -76
- package/.docs/raw/docs/guides/chain-of-thought.mdx +0 -164
- package/.docs/raw/docs/guides/chatgpt-subscription.mdx +0 -108
- package/.docs/raw/docs/guides/context-api.mdx +0 -619
- package/.docs/raw/docs/guides/dictation.mdx +0 -298
- package/.docs/raw/docs/guides/editing.mdx +0 -102
- package/.docs/raw/docs/guides/electron.mdx +0 -369
- package/.docs/raw/docs/guides/headless-composer-input.mdx +0 -113
- package/.docs/raw/docs/guides/image-generation.mdx +0 -74
- package/.docs/raw/docs/guides/index.mdx +0 -117
- package/.docs/raw/docs/guides/input-history.mdx +0 -55
- package/.docs/raw/docs/guides/latex.mdx +0 -158
- package/.docs/raw/docs/guides/mentions.mdx +0 -575
- package/.docs/raw/docs/guides/message-timing.mdx +0 -215
- package/.docs/raw/docs/guides/quoting.mdx +0 -169
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +0 -212
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +0 -152
- package/.docs/raw/docs/guides/resumable-streams.mdx +0 -292
- package/.docs/raw/docs/guides/slash-commands.mdx +0 -358
- package/.docs/raw/docs/guides/speech.mdx +0 -172
- package/.docs/raw/docs/guides/suggestions.mdx +0 -384
- package/.docs/raw/docs/guides/virtualization.mdx +0 -133
- package/.docs/raw/docs/guides/voice.mdx +0 -310
- package/.docs/raw/docs/ink/adapters.mdx +0 -99
- package/.docs/raw/docs/ink/custom-backend.mdx +0 -254
- package/.docs/raw/docs/ink/hooks.mdx +0 -469
- package/.docs/raw/docs/ink/index.mdx +0 -237
- package/.docs/raw/docs/ink/migration.mdx +0 -138
- package/.docs/raw/docs/ink/primitives.mdx +0 -1259
- package/.docs/raw/docs/integrations/attachments/custom-adapter.mdx +0 -528
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +0 -188
- package/.docs/raw/docs/integrations/auth/clerk.mdx +0 -166
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +0 -191
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +0 -88
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents.mdx +0 -283
- package/.docs/raw/docs/integrations/frameworks/mastra/full-stack.mdx +0 -188
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +0 -57
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +0 -201
- package/.docs/raw/docs/integrations/gateways/index.mdx +0 -162
- package/.docs/raw/docs/integrations/index.mdx +0 -178
- package/.docs/raw/docs/integrations/observability/helicone.mdx +0 -129
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +0 -161
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +0 -151
- package/.docs/raw/docs/integrations/persistence/custom-adapter.mdx +0 -773
- package/.docs/raw/docs/migrations/deprecation-policy.mdx +0 -42
- package/.docs/raw/docs/migrations/index.mdx +0 -50
- package/.docs/raw/docs/migrations/react-compatibility.mdx +0 -74
- package/.docs/raw/docs/migrations/react-langgraph-v0-7.mdx +0 -328
- package/.docs/raw/docs/migrations/toolkit-tools.mdx +0 -236
- package/.docs/raw/docs/migrations/v0-11.mdx +0 -172
- package/.docs/raw/docs/migrations/v0-12.mdx +0 -302
- package/.docs/raw/docs/migrations/v0-14.mdx +0 -297
- package/.docs/raw/docs/migrations/v0-15.mdx +0 -270
- package/.docs/raw/docs/primitives/action-bar.mdx +0 -352
- package/.docs/raw/docs/primitives/assistant-modal.mdx +0 -216
- package/.docs/raw/docs/primitives/attachment.mdx +0 -217
- package/.docs/raw/docs/primitives/branch-picker.mdx +0 -222
- package/.docs/raw/docs/primitives/chain-of-thought.mdx +0 -315
- package/.docs/raw/docs/primitives/composer.mdx +0 -659
- package/.docs/raw/docs/primitives/error.mdx +0 -142
- package/.docs/raw/docs/primitives/index.mdx +0 -99
- package/.docs/raw/docs/primitives/message.mdx +0 -618
- package/.docs/raw/docs/primitives/selection-toolbar.mdx +0 -191
- package/.docs/raw/docs/primitives/suggestion.mdx +0 -254
- package/.docs/raw/docs/primitives/thread-list.mdx +0 -467
- package/.docs/raw/docs/primitives/thread.mdx +0 -509
- package/.docs/raw/docs/react-native/adapters.mdx +0 -94
- package/.docs/raw/docs/react-native/custom-backend.mdx +0 -207
- package/.docs/raw/docs/react-native/hooks.mdx +0 -339
- package/.docs/raw/docs/react-native/index.mdx +0 -289
- package/.docs/raw/docs/react-native/migration.mdx +0 -142
- package/.docs/raw/docs/react-native/primitives.mdx +0 -976
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +0 -399
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +0 -60
- package/.docs/raw/docs/runtimes/a2a/quickstart.mdx +0 -216
- package/.docs/raw/docs/runtimes/ag-ui/agent-state.mdx +0 -124
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +0 -70
- package/.docs/raw/docs/runtimes/ag-ui/quickstart.mdx +0 -243
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +0 -267
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +0 -61
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +0 -122
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +0 -135
- package/.docs/raw/docs/runtimes/ai-sdk/v6-legacy.mdx +0 -636
- package/.docs/raw/docs/runtimes/ai-sdk/v7.mdx +0 -731
- package/.docs/raw/docs/runtimes/claude-managed-agents.mdx +0 -118
- package/.docs/raw/docs/runtimes/concepts/adapters.mdx +0 -265
- package/.docs/raw/docs/runtimes/concepts/architecture.mdx +0 -167
- package/.docs/raw/docs/runtimes/concepts/stability.mdx +0 -68
- package/.docs/raw/docs/runtimes/concepts/threads.mdx +0 -513
- package/.docs/raw/docs/runtimes/custom/assistant-transport.mdx +0 -763
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +0 -339
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +0 -957
- package/.docs/raw/docs/runtimes/custom/local-runtime.mdx +0 -902
- package/.docs/raw/docs/runtimes/custom/overview.mdx +0 -71
- package/.docs/raw/docs/runtimes/eve/overview.mdx +0 -151
- package/.docs/raw/docs/runtimes/eve/quickstart.mdx +0 -192
- package/.docs/raw/docs/runtimes/google-adk/api.mdx +0 -256
- package/.docs/raw/docs/runtimes/google-adk/hooks.mdx +0 -784
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +0 -69
- package/.docs/raw/docs/runtimes/google-adk/quickstart.mdx +0 -229
- package/.docs/raw/docs/runtimes/langchain.mdx +0 -901
- package/.docs/raw/docs/runtimes/langgraph/agent-state.mdx +0 -181
- package/.docs/raw/docs/runtimes/langgraph/generative-ui.mdx +0 -305
- package/.docs/raw/docs/runtimes/langgraph/interrupts.mdx +0 -104
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +0 -84
- package/.docs/raw/docs/runtimes/langgraph/quickstart.mdx +0 -496
- package/.docs/raw/docs/runtimes/langgraph/streaming.mdx +0 -144
- package/.docs/raw/docs/runtimes/langgraph/threads.mdx +0 -113
- package/.docs/raw/docs/runtimes/langgraph/tutorial/introduction.mdx +0 -29
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-1.mdx +0 -93
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-2.mdx +0 -347
- package/.docs/raw/docs/runtimes/langgraph/tutorial/part-3.mdx +0 -393
- package/.docs/raw/docs/runtimes/opencode/hooks.mdx +0 -194
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +0 -58
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +0 -119
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +0 -133
- package/.docs/raw/docs/tools/a2ui.mdx +0 -107
- package/.docs/raw/docs/tools/backend.mdx +0 -147
- package/.docs/raw/docs/tools/defining-tools.mdx +0 -574
- package/.docs/raw/docs/tools/dynamic-tools.mdx +0 -112
- package/.docs/raw/docs/tools/generative-ui-primitive.mdx +0 -180
- package/.docs/raw/docs/tools/generative-ui-slack.mdx +0 -167
- package/.docs/raw/docs/tools/generative-ui-teams.mdx +0 -160
- package/.docs/raw/docs/tools/generative-ui.mdx +0 -322
- package/.docs/raw/docs/tools/index.mdx +0 -72
- package/.docs/raw/docs/tools/interactables.mdx +0 -1084
- package/.docs/raw/docs/tools/mcp-apps.mdx +0 -363
- package/.docs/raw/docs/tools/mcp.mdx +0 -466
- package/.docs/raw/docs/tools/multi-agent.mdx +0 -237
- package/.docs/raw/docs/tools/openui.mdx +0 -175
- package/.docs/raw/docs/tools/tool-ui.mdx +0 -1020
- package/.docs/raw/docs/tools/user-managed-mcp.mdx +0 -428
- package/.docs/raw/docs/ui/assistant-modal.mdx +0 -166
- package/.docs/raw/docs/ui/assistant-sidebar.mdx +0 -89
- package/.docs/raw/docs/ui/attachment.mdx +0 -279
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +0 -247
- package/.docs/raw/docs/ui/context-display.mdx +0 -148
- package/.docs/raw/docs/ui/directive-text.mdx +0 -114
- package/.docs/raw/docs/ui/file.mdx +0 -159
- package/.docs/raw/docs/ui/follow-up-suggestions.mdx +0 -82
- package/.docs/raw/docs/ui/image.mdx +0 -102
- package/.docs/raw/docs/ui/markdown.mdx +0 -103
- package/.docs/raw/docs/ui/mcp-config.mdx +0 -107
- package/.docs/raw/docs/ui/mermaid.mdx +0 -92
- package/.docs/raw/docs/ui/message-timing.mdx +0 -93
- package/.docs/raw/docs/ui/model-selector.mdx +0 -455
- package/.docs/raw/docs/ui/part-grouping.mdx +0 -614
- package/.docs/raw/docs/ui/quote.mdx +0 -211
- package/.docs/raw/docs/ui/reasoning.mdx +0 -214
- package/.docs/raw/docs/ui/scrollbar.mdx +0 -77
- package/.docs/raw/docs/ui/sources.mdx +0 -186
- package/.docs/raw/docs/ui/streamdown.mdx +0 -392
- package/.docs/raw/docs/ui/syntax-highlighting.mdx +0 -205
- package/.docs/raw/docs/ui/thread-list.mdx +0 -411
- package/.docs/raw/docs/ui/thread.mdx +0 -559
- package/.docs/raw/docs/ui/tool-fallback.mdx +0 -141
- package/.docs/raw/docs/ui/tool-group.mdx +0 -240
- package/.docs/raw/docs/ui/voice.mdx +0 -173
- package/.docs/raw/docs/utilities/heat-graph.mdx +0 -237
- package/.docs/raw/docs/utilities/react-o11y.mdx +0 -362
- package/.docs/raw/docs/utilities/tw-shimmer.mdx +0 -212
- package/dist/constants.d.ts +0 -14
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -19
- package/dist/constants.js.map +0 -1
- package/dist/prepare-docs/code-examples.d.ts +0 -5
- package/dist/prepare-docs/code-examples.d.ts.map +0 -1
- package/dist/prepare-docs/code-examples.js +0 -117
- package/dist/prepare-docs/code-examples.js.map +0 -1
- package/dist/prepare-docs/copy-raw.d.ts +0 -5
- package/dist/prepare-docs/copy-raw.d.ts.map +0 -1
- package/dist/prepare-docs/copy-raw.js +0 -49
- package/dist/prepare-docs/copy-raw.js.map +0 -1
- package/dist/prepare-docs/prepare.d.ts +0 -1
- package/dist/prepare-docs/prepare.js +0 -22
- package/dist/prepare-docs/prepare.js.map +0 -1
- package/dist/prompts/xulux-playground.d.ts +0 -12
- package/dist/prompts/xulux-playground.d.ts.map +0 -1
- package/dist/prompts/xulux-playground.js +0 -33
- package/dist/prompts/xulux-playground.js.map +0 -1
- package/dist/tools/docs.d.ts +0 -22
- package/dist/tools/docs.d.ts.map +0 -1
- package/dist/tools/docs.js +0 -177
- package/dist/tools/docs.js.map +0 -1
- package/dist/tools/examples.d.ts +0 -24
- package/dist/tools/examples.d.ts.map +0 -1
- package/dist/tools/examples.js +0 -87
- package/dist/tools/examples.js.map +0 -1
- package/dist/tools/resources.d.ts +0 -6
- package/dist/tools/resources.d.ts.map +0 -1
- package/dist/tools/resources.js +0 -75
- package/dist/tools/resources.js.map +0 -1
- package/dist/tools/search.d.ts +0 -24
- package/dist/tools/search.d.ts.map +0 -1
- package/dist/tools/search.js +0 -39
- package/dist/tools/search.js.map +0 -1
- package/dist/tools/tests/mcp-test-client.d.ts +0 -15
- package/dist/tools/tests/mcp-test-client.d.ts.map +0 -1
- package/dist/tools/tests/mcp-test-client.js +0 -68
- package/dist/tools/tests/mcp-test-client.js.map +0 -1
- package/dist/tools/tests/test-setup.d.ts +0 -7
- package/dist/tools/tests/test-setup.d.ts.map +0 -1
- package/dist/tools/tests/test-setup.js +0 -36
- package/dist/tools/tests/test-setup.js.map +0 -1
- package/dist/tools/xulux-templates.d.ts +0 -58
- package/dist/tools/xulux-templates.d.ts.map +0 -1
- package/dist/tools/xulux-templates.js +0 -84
- package/dist/tools/xulux-templates.js.map +0 -1
- package/dist/utils/cache.d.ts +0 -5
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/cache.js +0 -18
- package/dist/utils/cache.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -10
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -20
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/mcp-format.d.ts +0 -11
- package/dist/utils/mcp-format.d.ts.map +0 -1
- package/dist/utils/mcp-format.js +0 -14
- package/dist/utils/mcp-format.js.map +0 -1
- package/dist/utils/mdx.d.ts +0 -12
- package/dist/utils/mdx.d.ts.map +0 -1
- package/dist/utils/mdx.js +0 -45
- package/dist/utils/mdx.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -12
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js +0 -93
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/search.d.ts +0 -10
- package/dist/utils/search.d.ts.map +0 -1
- package/dist/utils/search.js +0 -97
- package/dist/utils/search.js.map +0 -1
- package/dist/utils/security.d.ts +0 -5
- package/dist/utils/security.d.ts.map +0 -1
- package/dist/utils/security.js +0 -22
- package/dist/utils/security.js.map +0 -1
- package/dist/xulux/catalog-client.d.ts +0 -14
- package/dist/xulux/catalog-client.d.ts.map +0 -1
- package/dist/xulux/catalog-client.js +0 -112
- package/dist/xulux/catalog-client.js.map +0 -1
- package/dist/xulux/fallback-catalog.d.ts +0 -7
- package/dist/xulux/fallback-catalog.d.ts.map +0 -1
- package/dist/xulux/fallback-catalog.js +0 -47
- package/dist/xulux/fallback-catalog.js.map +0 -1
- package/dist/xulux/fetch-sandbox.d.ts +0 -5
- package/dist/xulux/fetch-sandbox.d.ts.map +0 -1
- package/dist/xulux/fetch-sandbox.js +0 -40
- package/dist/xulux/fetch-sandbox.js.map +0 -1
- package/dist/xulux/template-service.d.ts +0 -84
- package/dist/xulux/template-service.d.ts.map +0 -1
- package/dist/xulux/template-service.js +0 -223
- package/dist/xulux/template-service.js.map +0 -1
- package/dist/xulux/types.d.ts +0 -55
- package/dist/xulux/types.d.ts.map +0 -1
- package/dist/xulux/types.js +0 -6
- package/dist/xulux/types.js.map +0 -1
- package/src/constants.ts +0 -24
- package/src/prepare-docs/code-examples.ts +0 -158
- package/src/prepare-docs/copy-raw.ts +0 -50
- package/src/prepare-docs/prepare.ts +0 -24
- package/src/prompts/xulux-playground.ts +0 -36
- package/src/tools/docs.ts +0 -255
- package/src/tools/examples.ts +0 -114
- package/src/tools/resources.ts +0 -111
- package/src/tools/search.ts +0 -46
- package/src/tools/tests/completions.test.ts +0 -60
- package/src/tools/tests/directory-size-cap.test.ts +0 -50
- package/src/tools/tests/docs.test.ts +0 -147
- package/src/tools/tests/examples.test.ts +0 -94
- package/src/tools/tests/integration.test.ts +0 -45
- package/src/tools/tests/json-parsing.test.ts +0 -23
- package/src/tools/tests/listings-cache.test.ts +0 -19
- package/src/tools/tests/mcp-protocol.test.ts +0 -216
- package/src/tools/tests/mcp-test-client.ts +0 -111
- package/src/tools/tests/path-traversal.test.ts +0 -84
- package/src/tools/tests/resources.test.ts +0 -133
- package/src/tools/tests/search.test.ts +0 -37
- package/src/tools/tests/test-setup.ts +0 -50
- package/src/tools/tests/xulux-templates.test.ts +0 -325
- package/src/tools/xulux-templates.ts +0 -141
- package/src/utils/cache.ts +0 -20
- package/src/utils/logger.ts +0 -20
- package/src/utils/mcp-format.ts +0 -14
- package/src/utils/mdx.ts +0 -59
- package/src/utils/paths.ts +0 -139
- package/src/utils/search.ts +0 -131
- package/src/utils/security.ts +0 -52
- package/src/utils/tests/cache.test.ts +0 -51
- package/src/utils/tests/mcp-format.test.ts +0 -22
- package/src/utils/tests/security.test.ts +0 -119
- package/src/xulux/catalog-client.ts +0 -150
- package/src/xulux/fallback-catalog.ts +0 -63
- package/src/xulux/fetch-sandbox.ts +0 -56
- package/src/xulux/template-service.ts +0 -406
- 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 */}
|