@assistant-ui/mcp-docs-server 0.2.3 → 0.3.1
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 +91 -0
- package/dist/proxy.js.map +1 -0
- package/package.json +8 -12
- package/src/index.ts +3 -115
- package/src/proxy.test.ts +385 -0
- package/src/proxy.ts +126 -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"examples.js","names":[],"sources":["../../src/tools/examples.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { readFile, readdir, lstat } from \"node:fs/promises\";\nimport { join, extname } from \"node:path\";\nimport { CODE_EXAMPLES_PATH, MAX_FILE_SIZE } from \"../constants.js\";\nimport { cacheListing } from \"../utils/cache.js\";\nimport { logger } from \"../utils/logger.js\";\nimport { formatMCPResponse } from \"../utils/mcp-format.js\";\nimport { sanitizePath } from \"../utils/security.js\";\n\nconst examplesInputSchema = z.object({\n example: z\n .string()\n .optional()\n .describe(\n 'Example name (e.g., \"with-ai-sdk-v7\"). Leave empty to list all examples.',\n ),\n});\n\nconst loadCodeExamples = cacheListing(scanCodeExamples);\n\nexport function listCodeExamples(): Promise<string[]> {\n return loadCodeExamples().catch((error) => {\n logger.error(\"Failed to list code examples\", error);\n return [];\n });\n}\n\nasync function scanCodeExamples(): Promise<string[]> {\n const files = await readdir(CODE_EXAMPLES_PATH);\n return files\n .filter((file) => extname(file) === \".md\")\n .map((file) => file.replace(\".md\", \"\"))\n .sort();\n}\n\nexport async function readCodeExample(\n exampleName: string,\n): Promise<string | null> {\n try {\n const sanitized = sanitizePath(exampleName);\n const filePath = join(CODE_EXAMPLES_PATH, `${sanitized}.md`);\n\n const stats = await lstat(filePath);\n if (stats.isSymbolicLink()) {\n logger.warn(`Attempted to read symlink: ${filePath}`);\n return null;\n }\n\n if (stats.size > MAX_FILE_SIZE) {\n logger.warn(`File size exceeds limit: ${filePath} (${stats.size} bytes)`);\n return null;\n }\n\n const content = await readFile(filePath, \"utf-8\");\n return content;\n } catch (error) {\n logger.error(`Failed to read example: ${exampleName}`, error);\n return null;\n }\n}\n\nexport const examplesTools = {\n name: \"assistantUIExamples\",\n description:\n \"List available examples or retrieve complete code for a specific example\",\n parameters: examplesInputSchema,\n execute: async ({ example }: z.infer<typeof examplesInputSchema>) => {\n try {\n if (!example) {\n logger.info(\"Listing all available examples\");\n const examples = await listCodeExamples();\n\n if (examples.length === 0) {\n return formatMCPResponse({\n error:\n \"No examples found. Please run documentation preparation first.\",\n hint: \"Run: pnpm prepare-docs\",\n });\n }\n\n return formatMCPResponse({\n type: \"list\",\n examples,\n total: examples.length,\n hint: \"Use example parameter to get complete code for any example\",\n });\n }\n\n logger.info(`Retrieving example: ${example}`);\n const content = await readCodeExample(example);\n\n if (!content) {\n const availableExamples = await listCodeExamples();\n return formatMCPResponse({\n error: `Example not found: ${example}`,\n availableExamples,\n hint: \"Use without example parameter to list all available examples\",\n });\n }\n\n return formatMCPResponse({\n type: \"example\",\n name: example,\n content,\n });\n } catch (error) {\n logger.error(\"Failed to retrieve examples\", error);\n return formatMCPResponse({\n error: \"Failed to retrieve examples\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n};\n"],"mappings":";;;;;;;;;AASA,MAAM,sBAAsB,EAAE,OAAO,EACnC,SAAS,EACN,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,4EACF,EACJ,CAAC;AAED,MAAM,mBAAmB,aAAa,gBAAgB;AAEtD,SAAgB,mBAAsC;CACpD,OAAO,iBAAiB,CAAC,CAAC,OAAO,UAAU;EACzC,OAAO,MAAM,gCAAgC,KAAK;EAClD,OAAO,CAAC;CACV,CAAC;AACH;AAEA,eAAe,mBAAsC;CAEnD,QAAO,MADa,QAAQ,kBAAkB,EAAA,CAE3C,QAAQ,SAAS,QAAQ,IAAI,MAAM,KAAK,CAAC,CACzC,KAAK,SAAS,KAAK,QAAQ,OAAO,EAAE,CAAC,CAAC,CACtC,KAAK;AACV;AAEA,eAAsB,gBACpB,aACwB;CACxB,IAAI;EACF,MAAM,YAAY,aAAa,WAAW;EAC1C,MAAM,WAAW,KAAK,oBAAoB,GAAG,UAAU,IAAI;EAE3D,MAAM,QAAQ,MAAM,MAAM,QAAQ;EAClC,IAAI,MAAM,eAAe,GAAG;GAC1B,OAAO,KAAK,8BAA8B,UAAU;GACpD,OAAO;EACT;EAEA,IAAI,MAAM,OAAA,UAAsB;GAC9B,OAAO,KAAK,4BAA4B,SAAS,IAAI,MAAM,KAAK,QAAQ;GACxE,OAAO;EACT;EAGA,OAAO,MADe,SAAS,UAAU,OAAO;CAElD,SAAS,OAAO;EACd,OAAO,MAAM,2BAA2B,eAAe,KAAK;EAC5D,OAAO;CACT;AACF;AAEA,MAAa,gBAAgB;CAC3B,MAAM;CACN,aACE;CACF,YAAY;CACZ,SAAS,OAAO,EAAE,cAAmD;EACnE,IAAI;GACF,IAAI,CAAC,SAAS;IACZ,OAAO,KAAK,gCAAgC;IAC5C,MAAM,WAAW,MAAM,iBAAiB;IAExC,IAAI,SAAS,WAAW,GACtB,OAAO,kBAAkB;KACvB,OACE;KACF,MAAM;IACR,CAAC;IAGH,OAAO,kBAAkB;KACvB,MAAM;KACN;KACA,OAAO,SAAS;KAChB,MAAM;IACR,CAAC;GACH;GAEA,OAAO,KAAK,uBAAuB,SAAS;GAC5C,MAAM,UAAU,MAAM,gBAAgB,OAAO;GAE7C,IAAI,CAAC,SAAS;IACZ,MAAM,oBAAoB,MAAM,iBAAiB;IACjD,OAAO,kBAAkB;KACvB,OAAO,sBAAsB;KAC7B;KACA,MAAM;IACR,CAAC;GACH;GAEA,OAAO,kBAAkB;IACvB,MAAM;IACN,MAAM;IACN;GACF,CAAC;EACH,SAAS,OAAO;GACd,OAAO,MAAM,+BAA+B,KAAK;GACjD,OAAO,kBAAkB;IACvB,OAAO;IACP,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAChE,CAAC;EACH;CACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","names":[],"sources":["../../src/tools/resources.ts"],"mappings":";;iBAoFgB,kBAAkB,QAAQ"}
|
package/dist/tools/resources.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { DOCS_PATH, MDX_EXTENSION } from "../constants.js";
|
|
2
|
-
import { logger } from "../utils/logger.js";
|
|
3
|
-
import { getAvailableDocFiles } from "../utils/paths.js";
|
|
4
|
-
import { formatMDXContent, readMDXFileSafe } from "../utils/mdx.js";
|
|
5
|
-
import { sanitizePath } from "../utils/security.js";
|
|
6
|
-
import { listCodeExamples, readCodeExample } from "./examples.js";
|
|
7
|
-
import { join } from "node:path";
|
|
8
|
-
import { ResourceTemplate } from "@modelcontextprotocol/server";
|
|
9
|
-
//#region src/tools/resources.ts
|
|
10
|
-
const MARKDOWN_MIME_TYPE = "text/markdown";
|
|
11
|
-
const DOCS_SCHEME = "aui-docs";
|
|
12
|
-
const EXAMPLE_SCHEME = "aui-example";
|
|
13
|
-
function templateVarToPath(value) {
|
|
14
|
-
if (Array.isArray(value)) return value.join("/");
|
|
15
|
-
return value ?? "";
|
|
16
|
-
}
|
|
17
|
-
function registerMarkdownResource(server, config) {
|
|
18
|
-
const { name, scheme, variable, title, description, notFoundLabel, list, read } = config;
|
|
19
|
-
server.registerResource(name, new ResourceTemplate(`${scheme}:///{+${variable}}`, {
|
|
20
|
-
list: async () => ({ resources: (await list()).map((key) => ({
|
|
21
|
-
uri: `${scheme}:///${key}`,
|
|
22
|
-
name: key,
|
|
23
|
-
mimeType: MARKDOWN_MIME_TYPE
|
|
24
|
-
})) }),
|
|
25
|
-
complete: { [variable]: async (value) => {
|
|
26
|
-
const needle = value.toLowerCase();
|
|
27
|
-
return (await list()).filter((key) => key.toLowerCase().includes(needle));
|
|
28
|
-
} }
|
|
29
|
-
}), {
|
|
30
|
-
title,
|
|
31
|
-
description,
|
|
32
|
-
mimeType: MARKDOWN_MIME_TYPE
|
|
33
|
-
}, async (uri, variables) => {
|
|
34
|
-
const key = templateVarToPath(variables[variable]);
|
|
35
|
-
const text = await read(key);
|
|
36
|
-
if (text === null) throw new Error(`${notFoundLabel} not found: ${key}`);
|
|
37
|
-
return { contents: [{
|
|
38
|
-
uri: uri.href,
|
|
39
|
-
mimeType: MARKDOWN_MIME_TYPE,
|
|
40
|
-
text
|
|
41
|
-
}] };
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
async function readDocResource(path) {
|
|
45
|
-
const sanitized = sanitizePath(path);
|
|
46
|
-
const mdx = await readMDXFileSafe(join(DOCS_PATH, `${sanitized}${MDX_EXTENSION}`));
|
|
47
|
-
return mdx ? formatMDXContent(mdx) : null;
|
|
48
|
-
}
|
|
49
|
-
function registerResources(server) {
|
|
50
|
-
registerMarkdownResource(server, {
|
|
51
|
-
name: "assistant-ui-docs",
|
|
52
|
-
scheme: DOCS_SCHEME,
|
|
53
|
-
variable: "path",
|
|
54
|
-
title: "assistant-ui Documentation",
|
|
55
|
-
description: "Individual assistant-ui documentation pages, readable as markdown by path.",
|
|
56
|
-
notFoundLabel: "Documentation",
|
|
57
|
-
list: getAvailableDocFiles,
|
|
58
|
-
read: readDocResource
|
|
59
|
-
});
|
|
60
|
-
registerMarkdownResource(server, {
|
|
61
|
-
name: "assistant-ui-examples",
|
|
62
|
-
scheme: EXAMPLE_SCHEME,
|
|
63
|
-
variable: "name",
|
|
64
|
-
title: "assistant-ui Examples",
|
|
65
|
-
description: "Complete assistant-ui example projects, readable as markdown.",
|
|
66
|
-
notFoundLabel: "Example",
|
|
67
|
-
list: listCodeExamples,
|
|
68
|
-
read: readCodeExample
|
|
69
|
-
});
|
|
70
|
-
logger.debug("Registered docs and examples resources");
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
export { registerResources };
|
|
74
|
-
|
|
75
|
-
//# sourceMappingURL=resources.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","names":[],"sources":["../../src/tools/resources.ts"],"sourcesContent":["import { type McpServer, ResourceTemplate } from \"@modelcontextprotocol/server\";\nimport { join } from \"node:path\";\nimport { DOCS_PATH, MDX_EXTENSION } from \"../constants.js\";\nimport { getAvailableDocFiles } from \"../utils/paths.js\";\nimport { readMDXFileSafe, formatMDXContent } from \"../utils/mdx.js\";\nimport { sanitizePath } from \"../utils/security.js\";\nimport { listCodeExamples, readCodeExample } from \"./examples.js\";\nimport { logger } from \"../utils/logger.js\";\n\nconst MARKDOWN_MIME_TYPE = \"text/markdown\";\nconst DOCS_SCHEME = \"aui-docs\";\nconst EXAMPLE_SCHEME = \"aui-example\";\n\nfunction templateVarToPath(value: string | string[] | undefined): string {\n if (Array.isArray(value)) return value.join(\"/\");\n return value ?? \"\";\n}\n\ninterface MarkdownResourceConfig {\n name: string;\n scheme: string;\n variable: string;\n title: string;\n description: string;\n notFoundLabel: string;\n list: () => Promise<string[]>;\n read: (key: string) => Promise<string | null>;\n}\n\nfunction registerMarkdownResource(\n server: McpServer,\n config: MarkdownResourceConfig,\n): void {\n const {\n name,\n scheme,\n variable,\n title,\n description,\n notFoundLabel,\n list,\n read,\n } = config;\n server.registerResource(\n name,\n new ResourceTemplate(`${scheme}:///{+${variable}}`, {\n list: async () => ({\n resources: (await list()).map((key) => ({\n uri: `${scheme}:///${key}`,\n name: key,\n mimeType: MARKDOWN_MIME_TYPE,\n })),\n }),\n complete: {\n [variable]: async (value) => {\n const needle = value.toLowerCase();\n return (await list()).filter((key) =>\n key.toLowerCase().includes(needle),\n );\n },\n },\n }),\n { title, description, mimeType: MARKDOWN_MIME_TYPE },\n async (uri, variables) => {\n const key = templateVarToPath(variables[variable]);\n const text = await read(key);\n if (text === null) {\n throw new Error(`${notFoundLabel} not found: ${key}`);\n }\n return {\n contents: [{ uri: uri.href, mimeType: MARKDOWN_MIME_TYPE, text }],\n };\n },\n );\n}\n\nasync function readDocResource(path: string): Promise<string | null> {\n const sanitized = sanitizePath(path);\n const mdx = await readMDXFileSafe(\n join(DOCS_PATH, `${sanitized}${MDX_EXTENSION}`),\n );\n return mdx ? formatMDXContent(mdx) : null;\n}\n\nexport function registerResources(server: McpServer): void {\n registerMarkdownResource(server, {\n name: \"assistant-ui-docs\",\n scheme: DOCS_SCHEME,\n variable: \"path\",\n title: \"assistant-ui Documentation\",\n description:\n \"Individual assistant-ui documentation pages, readable as markdown by path.\",\n notFoundLabel: \"Documentation\",\n list: getAvailableDocFiles,\n read: readDocResource,\n });\n\n registerMarkdownResource(server, {\n name: \"assistant-ui-examples\",\n scheme: EXAMPLE_SCHEME,\n variable: \"name\",\n title: \"assistant-ui Examples\",\n description:\n \"Complete assistant-ui example projects, readable as markdown.\",\n notFoundLabel: \"Example\",\n list: listCodeExamples,\n read: readCodeExample,\n });\n\n logger.debug(\"Registered docs and examples resources\");\n}\n"],"mappings":";;;;;;;;;AASA,MAAM,qBAAqB;AAC3B,MAAM,cAAc;AACpB,MAAM,iBAAiB;AAEvB,SAAS,kBAAkB,OAA8C;CACvE,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,KAAK,GAAG;CAC/C,OAAO,SAAS;AAClB;AAaA,SAAS,yBACP,QACA,QACM;CACN,MAAM,EACJ,MACA,QACA,UACA,OACA,aACA,eACA,MACA,SACE;CACJ,OAAO,iBACL,MACA,IAAI,iBAAiB,GAAG,OAAO,QAAQ,SAAS,IAAI;EAClD,MAAM,aAAa,EACjB,YAAY,MAAM,KAAK,EAAA,CAAG,KAAK,SAAS;GACtC,KAAK,GAAG,OAAO,MAAM;GACrB,MAAM;GACN,UAAU;EACZ,EAAE,EACJ;EACA,UAAU,GACP,WAAW,OAAO,UAAU;GAC3B,MAAM,SAAS,MAAM,YAAY;GACjC,QAAQ,MAAM,KAAK,EAAA,CAAG,QAAQ,QAC5B,IAAI,YAAY,CAAC,CAAC,SAAS,MAAM,CACnC;EACF,EACF;CACF,CAAC,GACD;EAAE;EAAO;EAAa,UAAU;CAAmB,GACnD,OAAO,KAAK,cAAc;EACxB,MAAM,MAAM,kBAAkB,UAAU,SAAS;EACjD,MAAM,OAAO,MAAM,KAAK,GAAG;EAC3B,IAAI,SAAS,MACX,MAAM,IAAI,MAAM,GAAG,cAAc,cAAc,KAAK;EAEtD,OAAO,EACL,UAAU,CAAC;GAAE,KAAK,IAAI;GAAM,UAAU;GAAoB;EAAK,CAAC,EAClE;CACF,CACF;AACF;AAEA,eAAe,gBAAgB,MAAsC;CACnE,MAAM,YAAY,aAAa,IAAI;CACnC,MAAM,MAAM,MAAM,gBAChB,KAAK,WAAW,GAAG,YAAY,eAAe,CAChD;CACA,OAAO,MAAM,iBAAiB,GAAG,IAAI;AACvC;AAEA,SAAgB,kBAAkB,QAAyB;CACzD,yBAAyB,QAAQ;EAC/B,MAAM;EACN,QAAQ;EACR,UAAU;EACV,OAAO;EACP,aACE;EACF,eAAe;EACf,MAAM;EACN,MAAM;CACR,CAAC;CAED,yBAAyB,QAAQ;EAC/B,MAAM;EACN,QAAQ;EACR,UAAU;EACV,OAAO;EACP,aACE;EACF,eAAe;EACf,MAAM;EACN,MAAM;CACR,CAAC;CAED,OAAO,MAAM,wCAAwC;AACvD"}
|
package/dist/tools/search.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
//#region src/tools/search.d.ts
|
|
3
|
-
declare const searchInputSchema: z.ZodObject<{
|
|
4
|
-
query: z.ZodString;
|
|
5
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
declare const searchTools: {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
parameters: z.ZodObject<{
|
|
11
|
-
query: z.ZodString;
|
|
12
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
execute: ({ query, limit }: z.infer<typeof searchInputSchema>) => Promise<{
|
|
15
|
-
content: Array<{
|
|
16
|
-
type: "text";
|
|
17
|
-
text: string;
|
|
18
|
-
}>;
|
|
19
|
-
structuredContent?: Record<string, unknown>;
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { searchTools };
|
|
24
|
-
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","names":[],"sources":["../../src/tools/search.ts"],"mappings":";;cAKM,mBAAiB,EAAA;;;GAYrB,EAAA,KAAA;cAEW;;;;;;;EAKuB,YAAA,OAAA,SAAA,EAAE,aAAa,uBAAkB"}
|
package/dist/tools/search.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { logger } from "../utils/logger.js";
|
|
2
|
-
import { formatMCPResponse } from "../utils/mcp-format.js";
|
|
3
|
-
import { searchDocs } from "../utils/search.js";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
const searchTools = {
|
|
6
|
-
name: "assistantUISearch",
|
|
7
|
-
description: "Search assistant-ui documentation by keyword. Returns ranked matches with their doc path, title, and a snippet. Fetch full content with assistantUIDocs using a returned path.",
|
|
8
|
-
parameters: z.object({
|
|
9
|
-
query: z.string().min(1).describe("Keyword(s) to search assistant-ui documentation for."),
|
|
10
|
-
limit: z.number().int().min(1).max(25).default(10).describe("Maximum number of results to return (default 10).")
|
|
11
|
-
}),
|
|
12
|
-
execute: async ({ query, limit }) => {
|
|
13
|
-
logger.info(`Searching documentation for: ${query}`);
|
|
14
|
-
try {
|
|
15
|
-
const results = await searchDocs(query, limit);
|
|
16
|
-
if (results.length === 0) return formatMCPResponse({
|
|
17
|
-
query,
|
|
18
|
-
results: [],
|
|
19
|
-
total: 0,
|
|
20
|
-
hint: "No matches. Use assistantUIDocs with \"/\" to list all sections."
|
|
21
|
-
});
|
|
22
|
-
return formatMCPResponse({
|
|
23
|
-
query,
|
|
24
|
-
results,
|
|
25
|
-
total: results.length
|
|
26
|
-
});
|
|
27
|
-
} catch (error) {
|
|
28
|
-
logger.error("Failed to search documentation", error);
|
|
29
|
-
return formatMCPResponse({
|
|
30
|
-
error: "Failed to search documentation",
|
|
31
|
-
message: error instanceof Error ? error.message : String(error)
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
export { searchTools };
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=search.js.map
|
package/dist/tools/search.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","names":[],"sources":["../../src/tools/search.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { logger } from \"../utils/logger.js\";\nimport { formatMCPResponse } from \"../utils/mcp-format.js\";\nimport { searchDocs } from \"../utils/search.js\";\n\nconst searchInputSchema = z.object({\n query: z\n .string()\n .min(1)\n .describe(\"Keyword(s) to search assistant-ui documentation for.\"),\n limit: z\n .number()\n .int()\n .min(1)\n .max(25)\n .default(10)\n .describe(\"Maximum number of results to return (default 10).\"),\n});\n\nexport const searchTools = {\n name: \"assistantUISearch\",\n description:\n \"Search assistant-ui documentation by keyword. Returns ranked matches with their doc path, title, and a snippet. Fetch full content with assistantUIDocs using a returned path.\",\n parameters: searchInputSchema,\n execute: async ({ query, limit }: z.infer<typeof searchInputSchema>) => {\n logger.info(`Searching documentation for: ${query}`);\n try {\n const results = await searchDocs(query, limit);\n if (results.length === 0) {\n return formatMCPResponse({\n query,\n results: [],\n total: 0,\n hint: 'No matches. Use assistantUIDocs with \"/\" to list all sections.',\n });\n }\n return formatMCPResponse({ query, results, total: results.length });\n } catch (error) {\n logger.error(\"Failed to search documentation\", error);\n return formatMCPResponse({\n error: \"Failed to search documentation\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n};\n"],"mappings":";;;;AAmBA,MAAa,cAAc;CACzB,MAAM;CACN,aACE;CACF,YAlBwB,EAAE,OAAO;EACjC,OAAO,EACJ,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,sDAAsD;EAClE,OAAO,EACJ,OAAO,CAAC,CACR,IAAI,CAAC,CACL,IAAI,CAAC,CAAC,CACN,IAAI,EAAE,CAAC,CACP,QAAQ,EAAE,CAAC,CACX,SAAS,mDAAmD;CACjE,CAMc;CACZ,SAAS,OAAO,EAAE,OAAO,YAA+C;EACtE,OAAO,KAAK,gCAAgC,OAAO;EACnD,IAAI;GACF,MAAM,UAAU,MAAM,WAAW,OAAO,KAAK;GAC7C,IAAI,QAAQ,WAAW,GACrB,OAAO,kBAAkB;IACvB;IACA,SAAS,CAAC;IACV,OAAO;IACP,MAAM;GACR,CAAC;GAEH,OAAO,kBAAkB;IAAE;IAAO;IAAS,OAAO,QAAQ;GAAO,CAAC;EACpE,SAAS,OAAO;GACd,OAAO,MAAM,kCAAkC,KAAK;GACpD,OAAO,kBAAkB;IACvB,OAAO;IACP,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAChE,CAAC;EACH;CACF;AACF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
|
-
//#region src/tools/tests/mcp-test-client.d.ts
|
|
3
|
-
type RawMcpRequest = {
|
|
4
|
-
method: string;
|
|
5
|
-
params?: unknown;
|
|
6
|
-
};
|
|
7
|
-
type McpTestClient = {
|
|
8
|
-
initialize: () => Promise<unknown>;
|
|
9
|
-
request: <Result>(request: RawMcpRequest) => Promise<Result>;
|
|
10
|
-
close: () => Promise<void>;
|
|
11
|
-
};
|
|
12
|
-
declare function createMcpTestClient(server: McpServer): Promise<McpTestClient>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { McpTestClient, createMcpTestClient };
|
|
15
|
-
//# sourceMappingURL=mcp-test-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-test-client.d.ts","names":[],"sources":["../../../src/tools/tests/mcp-test-client.ts"],"mappings":";;KAKK;EACH;EACA;;KAiBU;EACV,kBAAkB;EAClB,UAAU,QAAQ,SAAS,kBAAkB,QAAQ;EACrD,aAAa;;iBAaO,oBACpB,QAAQ,YACP,QAAQ"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { InMemoryTransport } from "@modelcontextprotocol/server";
|
|
2
|
-
//#region src/tools/tests/mcp-test-client.ts
|
|
3
|
-
function isJsonRpcResponse(message) {
|
|
4
|
-
return typeof message === "object" && message !== null && "id" in message && typeof message.id === "number" && ("result" in message || "error" in message);
|
|
5
|
-
}
|
|
6
|
-
async function createMcpTestClient(server) {
|
|
7
|
-
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
8
|
-
const pendingRequests = /* @__PURE__ */ new Map();
|
|
9
|
-
let nextRequestId = 1;
|
|
10
|
-
clientTransport.onmessage = (message) => {
|
|
11
|
-
if (!isJsonRpcResponse(message)) return;
|
|
12
|
-
const pendingRequest = pendingRequests.get(message.id);
|
|
13
|
-
if (!pendingRequest) return;
|
|
14
|
-
pendingRequests.delete(message.id);
|
|
15
|
-
if (message.error) {
|
|
16
|
-
pendingRequest.reject(/* @__PURE__ */ new Error(`MCP request failed (${message.error.code}): ${message.error.message}`));
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
pendingRequest.resolve(message.result);
|
|
20
|
-
};
|
|
21
|
-
await clientTransport.start();
|
|
22
|
-
await server.connect(serverTransport);
|
|
23
|
-
const request = (rawRequest) => {
|
|
24
|
-
const id = nextRequestId++;
|
|
25
|
-
return new Promise((resolve, reject) => {
|
|
26
|
-
pendingRequests.set(id, {
|
|
27
|
-
resolve,
|
|
28
|
-
reject
|
|
29
|
-
});
|
|
30
|
-
clientTransport.send({
|
|
31
|
-
jsonrpc: "2.0",
|
|
32
|
-
id,
|
|
33
|
-
...rawRequest
|
|
34
|
-
}).catch((error) => {
|
|
35
|
-
pendingRequests.delete(id);
|
|
36
|
-
reject(error instanceof Error ? error : new Error(String(error)));
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
return {
|
|
41
|
-
initialize: async () => {
|
|
42
|
-
const result = await request({
|
|
43
|
-
method: "initialize",
|
|
44
|
-
params: {
|
|
45
|
-
protocolVersion: "2025-11-25",
|
|
46
|
-
capabilities: {},
|
|
47
|
-
clientInfo: {
|
|
48
|
-
name: "mcp-docs-server-tests",
|
|
49
|
-
version: "1.0.0"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
await clientTransport.send({
|
|
54
|
-
jsonrpc: "2.0",
|
|
55
|
-
method: "notifications/initialized"
|
|
56
|
-
});
|
|
57
|
-
return result;
|
|
58
|
-
},
|
|
59
|
-
request,
|
|
60
|
-
close: async () => {
|
|
61
|
-
await clientTransport.close();
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { createMcpTestClient };
|
|
67
|
-
|
|
68
|
-
//# sourceMappingURL=mcp-test-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-test-client.js","names":[],"sources":["../../../src/tools/tests/mcp-test-client.ts"],"sourcesContent":["import {\n InMemoryTransport,\n type McpServer,\n} from \"@modelcontextprotocol/server\";\n\ntype RawMcpRequest = {\n method: string;\n params?: unknown;\n};\n\ntype JsonRpcResponse = {\n id: number;\n result?: unknown;\n error?: {\n code: number;\n message: string;\n };\n};\n\ntype PendingRequest = {\n resolve: (result: unknown) => void;\n reject: (error: Error) => void;\n};\n\nexport type McpTestClient = {\n initialize: () => Promise<unknown>;\n request: <Result>(request: RawMcpRequest) => Promise<Result>;\n close: () => Promise<void>;\n};\n\nfunction isJsonRpcResponse(message: unknown): message is JsonRpcResponse {\n return (\n typeof message === \"object\" &&\n message !== null &&\n \"id\" in message &&\n typeof message.id === \"number\" &&\n (\"result\" in message || \"error\" in message)\n );\n}\n\nexport async function createMcpTestClient(\n server: McpServer,\n): Promise<McpTestClient> {\n const [clientTransport, serverTransport] =\n InMemoryTransport.createLinkedPair();\n const pendingRequests = new Map<number, PendingRequest>();\n let nextRequestId = 1;\n\n clientTransport.onmessage = (message) => {\n if (!isJsonRpcResponse(message)) return;\n\n const pendingRequest = pendingRequests.get(message.id);\n if (!pendingRequest) return;\n\n pendingRequests.delete(message.id);\n if (message.error) {\n pendingRequest.reject(\n new Error(\n `MCP request failed (${message.error.code}): ${message.error.message}`,\n ),\n );\n return;\n }\n\n pendingRequest.resolve(message.result);\n };\n\n await clientTransport.start();\n await server.connect(serverTransport);\n\n const request = <Result>(rawRequest: RawMcpRequest): Promise<Result> => {\n const id = nextRequestId++;\n\n return new Promise((resolve, reject) => {\n pendingRequests.set(id, { resolve, reject });\n void clientTransport\n .send({ jsonrpc: \"2.0\", id, ...rawRequest })\n .catch((error: unknown) => {\n pendingRequests.delete(id);\n reject(error instanceof Error ? error : new Error(String(error)));\n });\n }) as Promise<Result>;\n };\n\n return {\n initialize: async () => {\n const result = await request({\n method: \"initialize\",\n params: {\n protocolVersion: \"2025-11-25\",\n capabilities: {},\n clientInfo: {\n name: \"mcp-docs-server-tests\",\n version: \"1.0.0\",\n },\n },\n });\n\n await clientTransport.send({\n jsonrpc: \"2.0\",\n method: \"notifications/initialized\",\n });\n\n return result;\n },\n request,\n close: async () => {\n await clientTransport.close();\n },\n };\n}\n"],"mappings":";;AA8BA,SAAS,kBAAkB,SAA8C;CACvE,OACE,OAAO,YAAY,YACnB,YAAY,QACZ,QAAQ,WACR,OAAO,QAAQ,OAAO,aACrB,YAAY,WAAW,WAAW;AAEvC;AAEA,eAAsB,oBACpB,QACwB;CACxB,MAAM,CAAC,iBAAiB,mBACtB,kBAAkB,iBAAiB;CACrC,MAAM,kCAAkB,IAAI,IAA4B;CACxD,IAAI,gBAAgB;CAEpB,gBAAgB,aAAa,YAAY;EACvC,IAAI,CAAC,kBAAkB,OAAO,GAAG;EAEjC,MAAM,iBAAiB,gBAAgB,IAAI,QAAQ,EAAE;EACrD,IAAI,CAAC,gBAAgB;EAErB,gBAAgB,OAAO,QAAQ,EAAE;EACjC,IAAI,QAAQ,OAAO;GACjB,eAAe,uBACb,IAAI,MACF,uBAAuB,QAAQ,MAAM,KAAK,KAAK,QAAQ,MAAM,SAC/D,CACF;GACA;EACF;EAEA,eAAe,QAAQ,QAAQ,MAAM;CACvC;CAEA,MAAM,gBAAgB,MAAM;CAC5B,MAAM,OAAO,QAAQ,eAAe;CAEpC,MAAM,WAAmB,eAA+C;EACtE,MAAM,KAAK;EAEX,OAAO,IAAI,SAAS,SAAS,WAAW;GACtC,gBAAgB,IAAI,IAAI;IAAE;IAAS;GAAO,CAAC;GAC3C,gBACG,KAAK;IAAE,SAAS;IAAO;IAAI,GAAG;GAAW,CAAC,CAAC,CAC3C,OAAO,UAAmB;IACzB,gBAAgB,OAAO,EAAE;IACzB,OAAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC,CAAC;GAClE,CAAC;EACL,CAAC;CACH;CAEA,OAAO;EACL,YAAY,YAAY;GACtB,MAAM,SAAS,MAAM,QAAQ;IAC3B,QAAQ;IACR,QAAQ;KACN,iBAAiB;KACjB,cAAc,CAAC;KACf,YAAY;MACV,MAAM;MACN,SAAS;KACX;IACF;GACF,CAAC;GAED,MAAM,gBAAgB,KAAK;IACzB,SAAS;IACT,QAAQ;GACV,CAAC;GAED,OAAO;EACT;EACA;EACA,OAAO,YAAY;GACjB,MAAM,gBAAgB,MAAM;EAC9B;CACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-setup.d.ts","names":[],"sources":["../../../src/tools/tests/test-setup.ts"],"mappings":";cAsBa;EACY,WAAA,cAAM,cAAW"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { PACKAGE_DIR } from "../../constants.js";
|
|
2
|
-
import { docsTools } from "../docs.js";
|
|
3
|
-
import { examplesTools } from "../examples.js";
|
|
4
|
-
import { searchTools } from "../search.js";
|
|
5
|
-
import { xuluxTemplateDetailsTool, xuluxTemplatePreviewTool, xuluxTemplatesListTool } from "../xulux-templates.js";
|
|
6
|
-
import { join } from "node:path";
|
|
7
|
-
import { existsSync } from "node:fs";
|
|
8
|
-
import { beforeAll } from "vitest";
|
|
9
|
-
//#region src/tools/tests/test-setup.ts
|
|
10
|
-
const tools = {
|
|
11
|
-
assistantUIDocs: docsTools,
|
|
12
|
-
assistantUIExamples: examplesTools,
|
|
13
|
-
assistantUISearch: searchTools,
|
|
14
|
-
assistantUITemplates: xuluxTemplatesListTool,
|
|
15
|
-
assistantUITemplateDetails: xuluxTemplateDetailsTool,
|
|
16
|
-
assistantUITemplatePreview: xuluxTemplatePreviewTool
|
|
17
|
-
};
|
|
18
|
-
const testContext = { callTool: async (name, args) => {
|
|
19
|
-
const tool = tools[name];
|
|
20
|
-
if (!tool) throw new Error(`Tool ${name} not found`);
|
|
21
|
-
const text = (await tool.execute(args)).content?.[0]?.text;
|
|
22
|
-
if (text === void 0) throw new Error(`Tool ${name} returned no content`);
|
|
23
|
-
try {
|
|
24
|
-
return JSON.parse(text);
|
|
25
|
-
} catch (error) {
|
|
26
|
-
throw new Error(`Tool ${name} returned invalid JSON. Output: ${text}\nParse error: ${error instanceof Error ? error.message : String(error)}`);
|
|
27
|
-
}
|
|
28
|
-
} };
|
|
29
|
-
beforeAll(() => {
|
|
30
|
-
const docsPath = join(PACKAGE_DIR, ".docs");
|
|
31
|
-
if (!existsSync(docsPath)) throw new Error("Documentation not prepared. Run: pnpm build");
|
|
32
|
-
});
|
|
33
|
-
//#endregion
|
|
34
|
-
export { testContext };
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=test-setup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-setup.js","names":[],"sources":["../../../src/tools/tests/test-setup.ts"],"sourcesContent":["import { beforeAll } from \"vitest\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { PACKAGE_DIR } from \"../../constants.js\";\nimport { docsTools } from \"../docs.js\";\nimport { examplesTools } from \"../examples.js\";\nimport { searchTools } from \"../search.js\";\nimport {\n xuluxTemplatesListTool,\n xuluxTemplateDetailsTool,\n xuluxTemplatePreviewTool,\n} from \"../xulux-templates.js\";\n\nconst tools = {\n assistantUIDocs: docsTools,\n assistantUIExamples: examplesTools,\n assistantUISearch: searchTools,\n assistantUITemplates: xuluxTemplatesListTool,\n assistantUITemplateDetails: xuluxTemplateDetailsTool,\n assistantUITemplatePreview: xuluxTemplatePreviewTool,\n};\n\nexport const testContext = {\n callTool: async (name: string, args: any) => {\n const tool = tools[name as keyof typeof tools];\n if (!tool) {\n throw new Error(`Tool ${name} not found`);\n }\n const result = await tool.execute(args);\n\n const text = result.content?.[0]?.text;\n if (text === undefined) {\n throw new Error(`Tool ${name} returned no content`);\n }\n try {\n return JSON.parse(text);\n } catch (error) {\n throw new Error(\n `Tool ${name} returned invalid JSON. Output: ${text}\\nParse error: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n};\n\nbeforeAll(() => {\n const docsPath = join(PACKAGE_DIR, \".docs\");\n if (!existsSync(docsPath)) {\n throw new Error(\"Documentation not prepared. Run: pnpm build\");\n }\n});\n"],"mappings":";;;;;;;;;AAaA,MAAM,QAAQ;CACZ,iBAAiB;CACjB,qBAAqB;CACrB,mBAAmB;CACnB,sBAAsB;CACtB,4BAA4B;CAC5B,4BAA4B;AAC9B;AAEA,MAAa,cAAc,EACzB,UAAU,OAAO,MAAc,SAAc;CAC3C,MAAM,OAAO,MAAM;CACnB,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,QAAQ,KAAK,WAAW;CAI1C,MAAM,QAAO,MAFQ,KAAK,QAAQ,IAAI,EAAA,CAElB,UAAU,EAAE,EAAE;CAClC,IAAI,SAAS,KAAA,GACX,MAAM,IAAI,MAAM,QAAQ,KAAK,qBAAqB;CAEpD,IAAI;EACF,OAAO,KAAK,MAAM,IAAI;CACxB,SAAS,OAAO;EACd,MAAM,IAAI,MACR,QAAQ,KAAK,kCAAkC,KAAK,iBAAiB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAC5H;CACF;AACF,EACF;AAEA,gBAAgB;CACd,MAAM,WAAW,KAAK,aAAa,OAAO;CAC1C,IAAI,CAAC,WAAW,QAAQ,GACtB,MAAM,IAAI,MAAM,6CAA6C;AAEjE,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
//#region src/tools/xulux-templates.d.ts
|
|
3
|
-
declare const emptyInputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
4
|
-
declare const detailsInputSchema: z.ZodObject<{
|
|
5
|
-
templateId: z.ZodString;
|
|
6
|
-
versionId: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
|
-
declare const previewInputSchema: z.ZodObject<{
|
|
9
|
-
templateId: z.ZodString;
|
|
10
|
-
versionId: z.ZodOptional<z.ZodString>;
|
|
11
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
12
|
-
}, z.core.$strip>;
|
|
13
|
-
declare const xuluxTemplatesListTool: {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
parameters: z.ZodObject<{}, z.core.$strip>;
|
|
17
|
-
execute: (_args: z.infer<typeof emptyInputSchema>) => Promise<{
|
|
18
|
-
content: Array<{
|
|
19
|
-
type: "text";
|
|
20
|
-
text: string;
|
|
21
|
-
}>;
|
|
22
|
-
structuredContent?: Record<string, unknown>;
|
|
23
|
-
}>;
|
|
24
|
-
};
|
|
25
|
-
declare const xuluxTemplateDetailsTool: {
|
|
26
|
-
name: string;
|
|
27
|
-
description: string;
|
|
28
|
-
parameters: z.ZodObject<{
|
|
29
|
-
templateId: z.ZodString;
|
|
30
|
-
versionId: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
execute: (args: z.infer<typeof detailsInputSchema>) => Promise<{
|
|
33
|
-
content: Array<{
|
|
34
|
-
type: "text";
|
|
35
|
-
text: string;
|
|
36
|
-
}>;
|
|
37
|
-
structuredContent?: Record<string, unknown>;
|
|
38
|
-
}>;
|
|
39
|
-
};
|
|
40
|
-
declare const xuluxTemplatePreviewTool: {
|
|
41
|
-
name: string;
|
|
42
|
-
description: string;
|
|
43
|
-
parameters: z.ZodObject<{
|
|
44
|
-
templateId: z.ZodString;
|
|
45
|
-
versionId: z.ZodOptional<z.ZodString>;
|
|
46
|
-
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
47
|
-
}, z.core.$strip>;
|
|
48
|
-
execute: (args: z.infer<typeof previewInputSchema>) => Promise<{
|
|
49
|
-
content: Array<{
|
|
50
|
-
type: "text";
|
|
51
|
-
text: string;
|
|
52
|
-
}>;
|
|
53
|
-
structuredContent?: Record<string, unknown>;
|
|
54
|
-
}>;
|
|
55
|
-
};
|
|
56
|
-
//#endregion
|
|
57
|
-
export { xuluxTemplateDetailsTool, xuluxTemplatePreviewTool, xuluxTemplatesListTool };
|
|
58
|
-
//# sourceMappingURL=xulux-templates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xulux-templates.d.ts","names":[],"sources":["../../src/tools/xulux-templates.ts"],"mappings":";;cAUM,kBAAgB,EAAA,cAAA,EAAA,KAAA;cAEhB,oBAAkB,EAAA;;;GAQtB,EAAA,KAAA;cAEI,oBAAkB,EAAA;;;;GActB,EAAA,KAAA;cAeW;;;;EAQY,UAAA,OAAA,EAAE,aAAa,sBAAiB;;;;;;;;cAiB5C;;;;;;;EASW,UAAA,MAAA,EAAE,aAAa,wBAAmB;;;;;;;;cAwB7C;;;;;;;;EASW,UAAA,MAAA,EAAE,aAAa,wBAAmB"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { logger } from "../utils/logger.js";
|
|
2
|
-
import { formatMCPResponse } from "../utils/mcp-format.js";
|
|
3
|
-
import { getXuluxCatalog } from "../xulux/catalog-client.js";
|
|
4
|
-
import { createTemplatePreview, getTemplateDetails, listTemplates } from "../xulux/template-service.js";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
//#region src/tools/xulux-templates.ts
|
|
7
|
-
const emptyInputSchema = z.object({});
|
|
8
|
-
const detailsInputSchema = z.object({
|
|
9
|
-
templateId: z.string().describe("The template id from assistantUITemplates"),
|
|
10
|
-
versionId: z.string().optional().describe("Optional version id. When provided, exampleConfig reflects that version's resolved defaults.")
|
|
11
|
-
});
|
|
12
|
-
const previewInputSchema = z.object({
|
|
13
|
-
templateId: z.string().describe("The template id from assistantUITemplates"),
|
|
14
|
-
versionId: z.string().optional().describe("Version id to use. Uses the template default if omitted."),
|
|
15
|
-
config: z.record(z.string(), z.unknown()).optional().describe("Customization config for the preview. Must contain only the top-level keys: hostUi, assistant, and brandTheme. Use the schemas from assistantUITemplateDetails.configRoots as the source of truth for each root. Do not pass any other root keys.")
|
|
16
|
-
});
|
|
17
|
-
function withDegradedNote(payload, degraded, degradedReason) {
|
|
18
|
-
if (!degraded) return payload;
|
|
19
|
-
return {
|
|
20
|
-
...payload,
|
|
21
|
-
catalogDegraded: true,
|
|
22
|
-
...degradedReason ? { catalogDegradedReason: degradedReason } : {}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
const xuluxTemplatesListTool = {
|
|
26
|
-
name: "assistantUITemplates",
|
|
27
|
-
description: "List the available assistant-ui hosted app templates and fixed demos with their features, customizable surfaces, and versions. Call this first for any assistant-ui app-building request. Use the features and customizable fields to decide which template fits. If customizable is empty, the entry is a fixed demo that should be used as-is rather than configured. Call assistantUITemplateDetails on the chosen template before requesting a preview.",
|
|
28
|
-
parameters: emptyInputSchema,
|
|
29
|
-
execute: async (_args) => {
|
|
30
|
-
logger.info("Listing assistant-ui templates");
|
|
31
|
-
try {
|
|
32
|
-
const { catalog, degraded, degradedReason } = await getXuluxCatalog();
|
|
33
|
-
return formatMCPResponse(withDegradedNote(listTemplates(catalog), degraded, degradedReason));
|
|
34
|
-
} catch (error) {
|
|
35
|
-
logger.error("Failed to list assistant-ui templates", error);
|
|
36
|
-
return formatMCPResponse({
|
|
37
|
-
error: "Failed to list assistant-ui templates",
|
|
38
|
-
message: error instanceof Error ? error.message : String(error)
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const xuluxTemplateDetailsTool = {
|
|
44
|
-
name: "assistantUITemplateDetails",
|
|
45
|
-
description: "Get the full authoring surface for a specific assistant-ui hosted template. Returns configRoots schemas (with types, defaults, and enums), rules, built-in tool input/outputShape, renderer contracts, and an exampleConfig. Fixed demos return no configRoots; use those as-is without config. Use this before calling assistantUITemplatePreview to understand exactly what config to write. If assistantUITemplatePreview returns validationWarnings, call this again and cross-reference configRoots to correct the config.",
|
|
46
|
-
parameters: detailsInputSchema,
|
|
47
|
-
execute: async (args) => {
|
|
48
|
-
logger.info(`Getting assistant-ui template details for: ${args.templateId}`);
|
|
49
|
-
try {
|
|
50
|
-
const { catalog, degraded, degradedReason } = await getXuluxCatalog();
|
|
51
|
-
const details = await getTemplateDetails(catalog, args);
|
|
52
|
-
return formatMCPResponse(withDegradedNote(details, degraded, degradedReason));
|
|
53
|
-
} catch (error) {
|
|
54
|
-
logger.error("Failed to get assistant-ui template details", error);
|
|
55
|
-
return formatMCPResponse({
|
|
56
|
-
error: "Failed to get assistant-ui template details",
|
|
57
|
-
message: error instanceof Error ? error.message : String(error)
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const xuluxTemplatePreviewTool = {
|
|
63
|
-
name: "assistantUITemplatePreview",
|
|
64
|
-
description: "Return preview and download URLs for a selected assistant-ui hosted template. The previewUrl is a hosted app URL; show it to the user first, or open it with an available browser/in-app-browser tool if your client provides one. If you pass config, a preview session is created on the hosted template sandbox and the returned URLs reflect that configuration. Do not pass config for fixed demos that have no configRoots in assistantUITemplateDetails. This tool only returns URLs.",
|
|
65
|
-
parameters: previewInputSchema,
|
|
66
|
-
execute: async (args) => {
|
|
67
|
-
logger.info(`Creating assistant-ui template preview for: ${args.templateId}`);
|
|
68
|
-
try {
|
|
69
|
-
const { catalog, degraded, degradedReason } = await getXuluxCatalog();
|
|
70
|
-
const result = await createTemplatePreview(catalog, args);
|
|
71
|
-
return formatMCPResponse(withDegradedNote(result, degraded, degradedReason));
|
|
72
|
-
} catch (error) {
|
|
73
|
-
logger.error("Failed to create assistant-ui template preview", error);
|
|
74
|
-
return formatMCPResponse({
|
|
75
|
-
error: "Failed to create assistant-ui template preview",
|
|
76
|
-
message: error instanceof Error ? error.message : String(error)
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
//#endregion
|
|
82
|
-
export { xuluxTemplateDetailsTool, xuluxTemplatePreviewTool, xuluxTemplatesListTool };
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=xulux-templates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xulux-templates.js","names":[],"sources":["../../src/tools/xulux-templates.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { logger } from \"../utils/logger.js\";\nimport { formatMCPResponse } from \"../utils/mcp-format.js\";\nimport { getXuluxCatalog } from \"../xulux/catalog-client.js\";\nimport {\n createTemplatePreview,\n getTemplateDetails,\n listTemplates,\n} from \"../xulux/template-service.js\";\n\nconst emptyInputSchema = z.object({});\n\nconst detailsInputSchema = z.object({\n templateId: z.string().describe(\"The template id from assistantUITemplates\"),\n versionId: z\n .string()\n .optional()\n .describe(\n \"Optional version id. When provided, exampleConfig reflects that version's resolved defaults.\",\n ),\n});\n\nconst previewInputSchema = z.object({\n templateId: z.string().describe(\"The template id from assistantUITemplates\"),\n versionId: z\n .string()\n .optional()\n .describe(\"Version id to use. Uses the template default if omitted.\"),\n config: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\n \"Customization config for the preview. Must contain only the top-level keys: hostUi, assistant, and brandTheme. \" +\n \"Use the schemas from assistantUITemplateDetails.configRoots as the source of truth for each root. \" +\n \"Do not pass any other root keys.\",\n ),\n});\n\nfunction withDegradedNote<T extends Record<string, unknown>>(\n payload: T,\n degraded: boolean,\n degradedReason?: string,\n): T & { catalogDegraded?: true; catalogDegradedReason?: string } {\n if (!degraded) return payload;\n return {\n ...payload,\n catalogDegraded: true,\n ...(degradedReason ? { catalogDegradedReason: degradedReason } : {}),\n };\n}\n\nexport const xuluxTemplatesListTool = {\n name: \"assistantUITemplates\",\n description:\n \"List the available assistant-ui hosted app templates and fixed demos with their features, customizable surfaces, and versions. \" +\n \"Call this first for any assistant-ui app-building request. Use the features and customizable fields to decide which template fits. \" +\n \"If customizable is empty, the entry is a fixed demo that should be used as-is rather than configured. \" +\n \"Call assistantUITemplateDetails on the chosen template before requesting a preview.\",\n parameters: emptyInputSchema,\n execute: async (_args: z.infer<typeof emptyInputSchema>) => {\n logger.info(\"Listing assistant-ui templates\");\n try {\n const { catalog, degraded, degradedReason } = await getXuluxCatalog();\n return formatMCPResponse(\n withDegradedNote(listTemplates(catalog), degraded, degradedReason),\n );\n } catch (error) {\n logger.error(\"Failed to list assistant-ui templates\", error);\n return formatMCPResponse({\n error: \"Failed to list assistant-ui templates\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n};\n\nexport const xuluxTemplateDetailsTool = {\n name: \"assistantUITemplateDetails\",\n description:\n \"Get the full authoring surface for a specific assistant-ui hosted template. \" +\n \"Returns configRoots schemas (with types, defaults, and enums), rules, built-in tool input/outputShape, renderer contracts, and an exampleConfig. \" +\n \"Fixed demos return no configRoots; use those as-is without config. \" +\n \"Use this before calling assistantUITemplatePreview to understand exactly what config to write. \" +\n \"If assistantUITemplatePreview returns validationWarnings, call this again and cross-reference configRoots to correct the config.\",\n parameters: detailsInputSchema,\n execute: async (args: z.infer<typeof detailsInputSchema>) => {\n logger.info(\n `Getting assistant-ui template details for: ${args.templateId}`,\n );\n try {\n const { catalog, degraded, degradedReason } = await getXuluxCatalog();\n const details = await getTemplateDetails(catalog, args);\n return formatMCPResponse(\n withDegradedNote(\n details as unknown as Record<string, unknown>,\n degraded,\n degradedReason,\n ),\n );\n } catch (error) {\n logger.error(\"Failed to get assistant-ui template details\", error);\n return formatMCPResponse({\n error: \"Failed to get assistant-ui template details\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n};\n\nexport const xuluxTemplatePreviewTool = {\n name: \"assistantUITemplatePreview\",\n description:\n \"Return preview and download URLs for a selected assistant-ui hosted template. \" +\n \"The previewUrl is a hosted app URL; show it to the user first, or open it with an available browser/in-app-browser tool if your client provides one. \" +\n \"If you pass config, a preview session is created on the hosted template sandbox and the returned URLs reflect that configuration. \" +\n \"Do not pass config for fixed demos that have no configRoots in assistantUITemplateDetails. \" +\n \"This tool only returns URLs.\",\n parameters: previewInputSchema,\n execute: async (args: z.infer<typeof previewInputSchema>) => {\n logger.info(\n `Creating assistant-ui template preview for: ${args.templateId}`,\n );\n try {\n const { catalog, degraded, degradedReason } = await getXuluxCatalog();\n const result = await createTemplatePreview(catalog, args);\n return formatMCPResponse(\n withDegradedNote(\n result as unknown as Record<string, unknown>,\n degraded,\n degradedReason,\n ),\n );\n } catch (error) {\n logger.error(\"Failed to create assistant-ui template preview\", error);\n return formatMCPResponse({\n error: \"Failed to create assistant-ui template preview\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n};\n"],"mappings":";;;;;;AAUA,MAAM,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAEpC,MAAM,qBAAqB,EAAE,OAAO;CAClC,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CAC3E,WAAW,EACR,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,8FACF;AACJ,CAAC;AAED,MAAM,qBAAqB,EAAE,OAAO;CAClC,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CAC3E,WAAW,EACR,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SAAS,0DAA0D;CACtE,QAAQ,EACL,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAC/B,SAAS,CAAC,CACV,SACC,mPAGF;AACJ,CAAC;AAED,SAAS,iBACP,SACA,UACA,gBACgE;CAChE,IAAI,CAAC,UAAU,OAAO;CACtB,OAAO;EACL,GAAG;EACH,iBAAiB;EACjB,GAAI,iBAAiB,EAAE,uBAAuB,eAAe,IAAI,CAAC;CACpE;AACF;AAEA,MAAa,yBAAyB;CACpC,MAAM;CACN,aACE;CAIF,YAAY;CACZ,SAAS,OAAO,UAA4C;EAC1D,OAAO,KAAK,gCAAgC;EAC5C,IAAI;GACF,MAAM,EAAE,SAAS,UAAU,mBAAmB,MAAM,gBAAgB;GACpE,OAAO,kBACL,iBAAiB,cAAc,OAAO,GAAG,UAAU,cAAc,CACnE;EACF,SAAS,OAAO;GACd,OAAO,MAAM,yCAAyC,KAAK;GAC3D,OAAO,kBAAkB;IACvB,OAAO;IACP,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAChE,CAAC;EACH;CACF;AACF;AAEA,MAAa,2BAA2B;CACtC,MAAM;CACN,aACE;CAKF,YAAY;CACZ,SAAS,OAAO,SAA6C;EAC3D,OAAO,KACL,8CAA8C,KAAK,YACrD;EACA,IAAI;GACF,MAAM,EAAE,SAAS,UAAU,mBAAmB,MAAM,gBAAgB;GACpE,MAAM,UAAU,MAAM,mBAAmB,SAAS,IAAI;GACtD,OAAO,kBACL,iBACE,SACA,UACA,cACF,CACF;EACF,SAAS,OAAO;GACd,OAAO,MAAM,+CAA+C,KAAK;GACjE,OAAO,kBAAkB;IACvB,OAAO;IACP,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAChE,CAAC;EACH;CACF;AACF;AAEA,MAAa,2BAA2B;CACtC,MAAM;CACN,aACE;CAKF,YAAY;CACZ,SAAS,OAAO,SAA6C;EAC3D,OAAO,KACL,+CAA+C,KAAK,YACtD;EACA,IAAI;GACF,MAAM,EAAE,SAAS,UAAU,mBAAmB,MAAM,gBAAgB;GACpE,MAAM,SAAS,MAAM,sBAAsB,SAAS,IAAI;GACxD,OAAO,kBACL,iBACE,QACA,UACA,cACF,CACF;EACF,SAAS,OAAO;GACd,OAAO,MAAM,kDAAkD,KAAK;GACpE,OAAO,kBAAkB;IACvB,OAAO;IACP,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAChE,CAAC;EACH;CACF;AACF"}
|
package/dist/utils/cache.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","names":[],"sources":["../../src/utils/cache.ts"],"mappings":";iBAAgB,aACd,YAAY,0BACL"}
|
package/dist/utils/cache.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/utils/cache.ts
|
|
2
|
-
function cacheListing(scan) {
|
|
3
|
-
let cache = null;
|
|
4
|
-
return () => {
|
|
5
|
-
if (!cache) cache = scan().then((result) => {
|
|
6
|
-
if (result.length === 0) cache = null;
|
|
7
|
-
return result;
|
|
8
|
-
}, (error) => {
|
|
9
|
-
cache = null;
|
|
10
|
-
throw error;
|
|
11
|
-
});
|
|
12
|
-
return cache;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { cacheListing };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=cache.js.map
|
package/dist/utils/cache.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","names":[],"sources":["../../src/utils/cache.ts"],"sourcesContent":["export function cacheListing(\n scan: () => Promise<string[]>,\n): () => Promise<string[]> {\n let cache: Promise<string[]> | null = null;\n return () => {\n if (!cache) {\n cache = scan().then(\n (result) => {\n if (result.length === 0) cache = null;\n return result;\n },\n (error) => {\n cache = null;\n throw error;\n },\n );\n }\n return cache;\n };\n}\n"],"mappings":";AAAA,SAAgB,aACd,MACyB;CACzB,IAAI,QAAkC;CACtC,aAAa;EACX,IAAI,CAAC,OACH,QAAQ,KAAK,CAAC,CAAC,MACZ,WAAW;GACV,IAAI,OAAO,WAAW,GAAG,QAAQ;GACjC,OAAO;EACT,IACC,UAAU;GACT,QAAQ;GACR,MAAM;EACR,CACF;EAEF,OAAO;CACT;AACF"}
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region src/utils/logger.d.ts
|
|
2
|
-
declare const logger: {
|
|
3
|
-
debug: (message: string, ...args: any[]) => void;
|
|
4
|
-
info: (message: string, ...args: any[]) => void;
|
|
5
|
-
error: (message: string, ...args: any[]) => void;
|
|
6
|
-
warn: (message: string, ...args: any[]) => void;
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { logger };
|
|
10
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/utils/logger.ts"],"mappings":";cAEa;EACM,QAAA,oBAAM;EAKP,OAAA,oBAAM;EAKL,QAAA,oBAAM;EAGP,OAAA,oBAAM"}
|
package/dist/utils/logger.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IS_PREPARE_MODE } from "../constants.js";
|
|
2
|
-
//#region src/utils/logger.ts
|
|
3
|
-
const logger = {
|
|
4
|
-
debug: (message, ...args) => {
|
|
5
|
-
if (process.env.DEBUG) console.debug(`[DEBUG] ${message}`, ...args);
|
|
6
|
-
},
|
|
7
|
-
info: (message, ...args) => {
|
|
8
|
-
if (IS_PREPARE_MODE) console.log(`[INFO] ${message}`, ...args);
|
|
9
|
-
},
|
|
10
|
-
error: (message, ...args) => {
|
|
11
|
-
console.error(`[ERROR] ${message}`, ...args);
|
|
12
|
-
},
|
|
13
|
-
warn: (message, ...args) => {
|
|
14
|
-
console.warn(`[WARN] ${message}`, ...args);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { logger };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=logger.js.map
|
package/dist/utils/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","names":[],"sources":["../../src/utils/logger.ts"],"sourcesContent":["import { IS_PREPARE_MODE } from \"../constants.js\";\n\nexport const logger = {\n debug: (message: string, ...args: any[]) => {\n if (process.env.DEBUG) {\n console.debug(`[DEBUG] ${message}`, ...args);\n }\n },\n info: (message: string, ...args: any[]) => {\n if (IS_PREPARE_MODE) {\n console.log(`[INFO] ${message}`, ...args);\n }\n },\n error: (message: string, ...args: any[]) => {\n console.error(`[ERROR] ${message}`, ...args);\n },\n warn: (message: string, ...args: any[]) => {\n console.warn(`[WARN] ${message}`, ...args);\n },\n};\n"],"mappings":";;AAEA,MAAa,SAAS;CACpB,QAAQ,SAAiB,GAAG,SAAgB;EAC1C,IAAI,QAAQ,IAAI,OACd,QAAQ,MAAM,WAAW,WAAW,GAAG,IAAI;CAE/C;CACA,OAAO,SAAiB,GAAG,SAAgB;EACzC,IAAI,iBACF,QAAQ,IAAI,UAAU,WAAW,GAAG,IAAI;CAE5C;CACA,QAAQ,SAAiB,GAAG,SAAgB;EAC1C,QAAQ,MAAM,WAAW,WAAW,GAAG,IAAI;CAC7C;CACA,OAAO,SAAiB,GAAG,SAAgB;EACzC,QAAQ,KAAK,UAAU,WAAW,GAAG,IAAI;CAC3C;AACF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/utils/mcp-format.d.ts
|
|
2
|
-
declare function formatMCPResponse(data: any): {
|
|
3
|
-
content: Array<{
|
|
4
|
-
type: "text";
|
|
5
|
-
text: string;
|
|
6
|
-
}>;
|
|
7
|
-
structuredContent?: Record<string, unknown>;
|
|
8
|
-
};
|
|
9
|
-
//#endregion
|
|
10
|
-
export { formatMCPResponse };
|
|
11
|
-
//# sourceMappingURL=mcp-format.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-format.d.ts","names":[],"sources":["../../src/utils/mcp-format.ts"],"mappings":";iBAAgB,kBAAkB;EAChC,SAAS;IAAQ;IAAc;;EAC/B,oBAAoB"}
|
package/dist/utils/mcp-format.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/utils/mcp-format.ts
|
|
2
|
-
function formatMCPResponse(data) {
|
|
3
|
-
return {
|
|
4
|
-
content: [{
|
|
5
|
-
type: "text",
|
|
6
|
-
text: typeof data === "string" ? data : JSON.stringify(data, null, 2)
|
|
7
|
-
}],
|
|
8
|
-
...typeof data === "object" && data !== null && !Array.isArray(data) && { structuredContent: data }
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { formatMCPResponse };
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=mcp-format.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-format.js","names":[],"sources":["../../src/utils/mcp-format.ts"],"sourcesContent":["export function formatMCPResponse(data: any): {\n content: Array<{ type: \"text\"; text: string }>;\n structuredContent?: Record<string, unknown>;\n} {\n const text = typeof data === \"string\" ? data : JSON.stringify(data, null, 2);\n const isStructured =\n typeof data === \"object\" && data !== null && !Array.isArray(data);\n return {\n content: [{ type: \"text\", text }],\n ...(isStructured && {\n structuredContent: data as Record<string, unknown>,\n }),\n };\n}\n"],"mappings":";AAAA,SAAgB,kBAAkB,MAGhC;CAIA,OAAO;EACL,SAAS,CAAC;GAAE,MAAM;GAAQ,MAJf,OAAO,SAAS,WAAW,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC;EAI1C,CAAC;EAChC,GAHA,OAAO,SAAS,YAAY,SAAS,QAAQ,CAAC,MAAM,QAAQ,IAAI,KAG5C,EAClB,mBAAmB,KACrB;CACF;AACF"}
|