@assistant-ui/mcp-docs-server 0.1.31 → 0.1.32
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/.docs/organized/code-examples/waterfall.md +8 -8
- package/.docs/organized/code-examples/with-a2a.md +10 -10
- package/.docs/organized/code-examples/with-ag-ui.md +11 -11
- package/.docs/organized/code-examples/with-ai-sdk-v6.md +13 -13
- package/.docs/organized/code-examples/with-artifacts.md +13 -13
- package/.docs/organized/code-examples/with-assistant-transport.md +10 -10
- package/.docs/organized/code-examples/with-browser-extension.md +345 -0
- package/.docs/organized/code-examples/with-chain-of-thought.md +54 -17
- package/.docs/organized/code-examples/with-cloud-standalone.md +13 -13
- package/.docs/organized/code-examples/with-cloud.md +13 -13
- package/.docs/organized/code-examples/with-custom-thread-list.md +13 -13
- package/.docs/organized/code-examples/with-elevenlabs-conversational.md +17 -16
- package/.docs/organized/code-examples/with-elevenlabs-scribe.md +17 -16
- package/.docs/organized/code-examples/with-expo.md +24 -24
- package/.docs/organized/code-examples/with-external-store.md +10 -10
- package/.docs/organized/code-examples/with-ffmpeg.md +13 -13
- package/.docs/organized/code-examples/with-generative-ui.md +210 -13
- package/.docs/organized/code-examples/with-google-adk.md +10 -10
- package/.docs/organized/code-examples/with-heat-graph.md +8 -8
- package/.docs/organized/code-examples/with-image-generation.md +454 -0
- package/.docs/organized/code-examples/with-interactables.md +13 -13
- package/.docs/organized/code-examples/with-langchain.md +12 -12
- package/.docs/organized/code-examples/with-langgraph.md +15 -12
- package/.docs/organized/code-examples/with-livekit.md +18 -17
- package/.docs/organized/code-examples/with-mcp.md +748 -0
- package/.docs/organized/code-examples/with-opencode.md +11 -11
- package/.docs/organized/code-examples/with-parent-id-grouping.md +11 -11
- package/.docs/organized/code-examples/with-react-hook-form.md +14 -14
- package/.docs/organized/code-examples/with-react-ink.md +4 -4
- package/.docs/organized/code-examples/with-react-router.md +15 -15
- package/.docs/organized/code-examples/with-resumable-stream.md +660 -0
- package/.docs/organized/code-examples/with-store.md +8 -8
- package/.docs/organized/code-examples/with-tanstack.md +14 -14
- package/.docs/organized/code-examples/with-tap-runtime.md +11 -10
- package/.docs/raw/docs/(docs)/cli.mdx +1 -0
- package/.docs/raw/docs/(docs)/index.mdx +2 -2
- package/.docs/raw/docs/(docs)/installation.mdx +1 -1
- package/.docs/raw/docs/(reference)/api-reference/adapters/attachments.mdx +26 -24
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/index.mdx +20 -12
- package/.docs/raw/docs/(reference)/api-reference/adapters/model.mdx +44 -0
- package/.docs/raw/docs/(reference)/api-reference/adapters/persistence.mdx +37 -16
- package/.docs/raw/docs/(reference)/api-reference/adapters/runtime.mdx +12 -23
- package/.docs/raw/docs/(reference)/api-reference/adapters/suggestions.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/context-providers/assistant-runtime-provider.mdx +37 -8
- package/.docs/raw/docs/(reference)/api-reference/context-providers/index.mdx +11 -9
- package/.docs/raw/docs/(reference)/api-reference/context-providers/scoped-providers.mdx +64 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/message-conversion.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/external-store/runtime.mdx +36 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/composer-triggers.mdx +98 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/hooks/model-context.mdx +18 -57
- package/.docs/raw/docs/(reference)/api-reference/hooks/primitives.mdx +640 -0
- package/.docs/raw/docs/(reference)/api-reference/hooks/runtimes.mdx +15 -28
- package/.docs/raw/docs/(reference)/api-reference/hooks/state.mdx +64 -18
- package/.docs/raw/docs/(reference)/api-reference/hooks/utilities.mdx +434 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/cloud-ai-sdk.mdx +24 -0
- package/.docs/raw/docs/(reference)/api-reference/integrations/index.mdx +11 -12
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-ai-sdk.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/context.mdx +52 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/model-context/registry.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/overview.mdx +110 -131
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar-more.mdx +78 -221
- package/.docs/raw/docs/(reference)/api-reference/primitives/action-bar.mdx +127 -242
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-if.mdx +39 -20
- package/.docs/raw/docs/(reference)/api-reference/primitives/assistant-modal.mdx +66 -87
- package/.docs/raw/docs/(reference)/api-reference/primitives/attachment.mdx +50 -58
- package/.docs/raw/docs/(reference)/api-reference/primitives/branch-picker.mdx +80 -48
- package/.docs/raw/docs/(reference)/api-reference/primitives/chain-of-thought.mdx +67 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/composer.mdx +323 -461
- package/.docs/raw/docs/(reference)/api-reference/primitives/error.mdx +36 -43
- package/.docs/raw/docs/(reference)/api-reference/primitives/index.mdx +29 -24
- package/.docs/raw/docs/(reference)/api-reference/primitives/message-part.mdx +63 -245
- package/.docs/raw/docs/(reference)/api-reference/primitives/message.mdx +175 -591
- package/.docs/raw/docs/(reference)/api-reference/primitives/queue-item.mdx +65 -0
- package/.docs/raw/docs/(reference)/api-reference/primitives/selection-toolbar.mdx +35 -22
- package/.docs/raw/docs/(reference)/api-reference/primitives/suggestion.mdx +57 -140
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item-more.mdx +70 -161
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list-item.mdx +84 -108
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread-list.mdx +77 -96
- package/.docs/raw/docs/(reference)/api-reference/primitives/thread.mdx +173 -349
- package/.docs/raw/docs/(reference)/api-reference/runtimes/assistant-runtime.mdx +9 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/attachment-runtime.mdx +10 -21
- package/.docs/raw/docs/(reference)/api-reference/runtimes/composer-runtime.mdx +15 -70
- package/.docs/raw/docs/(reference)/api-reference/runtimes/index.mdx +18 -13
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-part-runtime.mdx +25 -28
- package/.docs/raw/docs/(reference)/api-reference/runtimes/message-runtime.mdx +11 -63
- package/.docs/raw/docs/(reference)/api-reference/runtimes/queue-state.mdx +20 -0
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-item-runtime.mdx +11 -48
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-list-runtime.mdx +10 -47
- package/.docs/raw/docs/(reference)/api-reference/runtimes/thread-runtime.mdx +18 -30
- package/.docs/raw/docs/(reference)/api-reference/tools/component-tools.mdx +68 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/index.mdx +39 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/rendering.mdx +79 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/status.mdx +42 -0
- package/.docs/raw/docs/(reference)/api-reference/tools/toolkits.mdx +92 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/assistant-transport.mdx +48 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/frame.mdx +62 -0
- package/.docs/raw/docs/(reference)/api-reference/transport/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/index.mdx +19 -0
- package/.docs/raw/docs/(reference)/api-reference/utilities/miscellaneous.mdx +131 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/index.mdx +22 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/session.mdx +54 -0
- package/.docs/raw/docs/(reference)/api-reference/voice/speech-dictation.mdx +36 -0
- package/.docs/raw/docs/cloud/ai-sdk.mdx +1 -1
- package/.docs/raw/docs/cloud/index.mdx +2 -2
- package/.docs/raw/docs/guides/attachments.mdx +4 -4
- package/.docs/raw/docs/guides/branching.mdx +1 -1
- package/.docs/raw/docs/guides/chain-of-thought.mdx +5 -5
- package/.docs/raw/docs/guides/context-api.mdx +4 -4
- package/.docs/raw/docs/guides/dictation.mdx +2 -2
- package/.docs/raw/docs/guides/editing.mdx +1 -1
- package/.docs/raw/docs/guides/generative-ui.mdx +142 -0
- package/.docs/raw/docs/guides/image-generation.mdx +74 -0
- package/.docs/raw/docs/guides/index.mdx +2 -2
- package/.docs/raw/docs/guides/interactables.mdx +2 -2
- package/.docs/raw/docs/guides/latex.mdx +2 -2
- package/.docs/raw/docs/guides/mcp-apps.mdx +231 -0
- package/.docs/raw/docs/guides/mentions.mdx +2 -2
- package/.docs/raw/docs/guides/message-timing.mdx +38 -5
- package/.docs/raw/docs/guides/multi-agent.mdx +2 -2
- package/.docs/raw/docs/guides/quoting.mdx +1 -1
- package/.docs/raw/docs/guides/resumable-stream-deployment.mdx +212 -0
- package/.docs/raw/docs/guides/resumable-stream-stores.mdx +152 -0
- package/.docs/raw/docs/guides/resumable-streams.mdx +210 -0
- package/.docs/raw/docs/guides/slash-commands.mdx +1 -1
- package/.docs/raw/docs/guides/speech.mdx +2 -2
- package/.docs/raw/docs/guides/suggestions.mdx +88 -4
- package/.docs/raw/docs/guides/tool-ui.mdx +2 -2
- package/.docs/raw/docs/guides/tools.mdx +66 -5
- package/.docs/raw/docs/guides/voice.mdx +2 -2
- package/.docs/raw/docs/ink/adapters.mdx +37 -1
- package/.docs/raw/docs/ink/custom-backend.mdx +59 -8
- package/.docs/raw/docs/ink/index.mdx +10 -11
- package/.docs/raw/docs/ink/primitives.mdx +349 -8
- package/.docs/raw/docs/integrations/auth/better-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/clerk.mdx +1 -1
- package/.docs/raw/docs/integrations/auth/next-auth.mdx +1 -1
- package/.docs/raw/docs/integrations/frameworks/ai-sdk.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/cloudflare-agents/overview.mdx +282 -0
- package/.docs/raw/docs/integrations/frameworks/mastra/overview.mdx +2 -2
- package/.docs/raw/docs/integrations/frameworks/mastra/separate-server.mdx +1 -1
- package/.docs/raw/docs/integrations/gateways/index.mdx +9 -4
- package/.docs/raw/docs/integrations/index.mdx +15 -3
- package/.docs/raw/docs/integrations/observability/langfuse.mdx +8 -1
- package/.docs/raw/docs/integrations/observability/langsmith.mdx +8 -4
- package/.docs/raw/docs/integrations/tools/react-mcp.mdx +337 -0
- package/.docs/raw/docs/primitives/composer.mdx +53 -0
- package/.docs/raw/docs/primitives/index.mdx +2 -2
- package/.docs/raw/docs/primitives/suggestion.mdx +9 -0
- package/.docs/raw/docs/react-native/hooks.mdx +2 -2
- package/.docs/raw/docs/react-native/index.mdx +4 -4
- package/.docs/raw/docs/runtimes/a2a/client-and-hooks.mdx +4 -4
- package/.docs/raw/docs/runtimes/a2a/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ag-ui/runtime-options.mdx +32 -1
- package/.docs/raw/docs/runtimes/ai-sdk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v4-legacy.mdx +7 -2
- package/.docs/raw/docs/runtimes/ai-sdk/v5-legacy.mdx +1 -1
- package/.docs/raw/docs/runtimes/ai-sdk/v6.mdx +7 -0
- package/.docs/raw/docs/runtimes/custom/data-stream.mdx +27 -2
- package/.docs/raw/docs/runtimes/custom/external-store.mdx +9 -1
- package/.docs/raw/docs/runtimes/custom/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/google-adk/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/langchain.mdx +2 -2
- package/.docs/raw/docs/runtimes/langgraph/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/opencode/overview.mdx +2 -2
- package/.docs/raw/docs/runtimes/opencode/quickstart.mdx +1 -1
- package/.docs/raw/docs/runtimes/pick-a-runtime.mdx +12 -5
- package/.docs/raw/docs/ui/composer-trigger-popover.mdx +11 -1
- package/.docs/raw/docs/ui/mcp-config.mdx +102 -0
- package/.docs/raw/docs/ui/model-selector.mdx +8 -8
- package/.docs/raw/docs/ui/sources.mdx +17 -0
- package/.docs/raw/docs/ui/streamdown.mdx +34 -2
- package/.docs/raw/docs/ui/thread-list.mdx +2 -2
- package/.docs/raw/docs/ui/thread.mdx +2 -2
- package/README.md +14 -72
- package/dist/constants.d.ts +12 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +13 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/prepare-docs/code-examples.d.ts +4 -1
- package/dist/prepare-docs/code-examples.d.ts.map +1 -1
- package/dist/prepare-docs/code-examples.js +109 -121
- package/dist/prepare-docs/code-examples.js.map +1 -1
- package/dist/prepare-docs/copy-raw.d.ts +4 -1
- package/dist/prepare-docs/copy-raw.d.ts.map +1 -1
- package/dist/prepare-docs/copy-raw.js +45 -42
- package/dist/prepare-docs/copy-raw.js.map +1 -1
- package/dist/prepare-docs/prepare.d.ts +1 -2
- package/dist/prepare-docs/prepare.js +17 -17
- package/dist/prepare-docs/prepare.js.map +1 -1
- package/dist/stdio.d.ts +1 -3
- package/dist/stdio.js +6 -3
- package/dist/stdio.js.map +1 -1
- package/dist/tools/docs.d.ts +20 -15
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/docs.js +140 -161
- package/dist/tools/docs.js.map +1 -1
- package/dist/tools/examples.d.ts +20 -15
- package/dist/tools/examples.d.ts.map +1 -1
- package/dist/tools/examples.js +74 -86
- package/dist/tools/examples.js.map +1 -1
- package/dist/tools/tests/test-setup.d.ts +5 -2
- package/dist/tools/tests/test-setup.d.ts.map +1 -1
- package/dist/tools/tests/test-setup.js +21 -28
- package/dist/tools/tests/test-setup.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +17 -17
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/mcp-format.d.ts +8 -5
- package/dist/utils/mcp-format.d.ts.map +1 -1
- package/dist/utils/mcp-format.js +9 -9
- package/dist/utils/mcp-format.js.map +1 -1
- package/dist/utils/mdx.d.ts +8 -6
- package/dist/utils/mdx.d.ts.map +1 -1
- package/dist/utils/mdx.js +22 -22
- package/dist/utils/mdx.js.map +1 -1
- package/dist/utils/paths.d.ts +9 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +66 -76
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/security.d.ts +4 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +19 -40
- package/dist/utils/security.js.map +1 -1
- package/package.json +5 -5
- package/.docs/raw/docs/(reference)/api-reference/adapters/feedback-speech.mdx +0 -41
- package/.docs/raw/docs/(reference)/api-reference/context-providers/text-message-part-provider.mdx +0 -40
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-data-stream.mdx +0 -260
- package/.docs/raw/docs/(reference)/api-reference/integrations/react-hook-form.mdx +0 -103
- package/.docs/raw/docs/(reference)/api-reference/integrations/vercel-ai-sdk.mdx +0 -254
- package/dist/prepare-docs/prepare.d.ts.map +0 -1
- package/dist/stdio.d.ts.map +0 -1
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/deprecation-policy.mdx +0 -0
- /package/.docs/raw/docs/{(reference) → migrations}/react-compatibility.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/react-langgraph-v0-7.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-11.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-12.mdx +0 -0
- /package/.docs/raw/docs/{(reference)/migrations → migrations}/v0-14.mdx +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.js","
|
|
1
|
+
{"version":3,"file":"prepare.js","names":[],"sources":["../../src/prepare-docs/prepare.ts"],"sourcesContent":["import { logger } from \"../utils/logger.js\";\nimport { copyRaw } from \"./copy-raw.js\";\nimport { prepareCodeExamples } from \"./code-examples.js\";\n\nasync function prepare(): Promise<void> {\n logger.info(\"Starting documentation preparation...\");\n\n try {\n await copyRaw();\n await prepareCodeExamples();\n\n logger.info(\"Documentation preparation complete\");\n } catch (error) {\n logger.error(\"Documentation preparation failed\", error);\n throw error;\n }\n}\n\nif (import.meta.url === `file://${process.argv[1]}`) {\n prepare().catch((error) => {\n logger.error(\"Preparation failed\", error);\n process.exit(1);\n });\n}\n"],"mappings":";;;;AAIA,eAAe,UAAyB;CACtC,OAAO,KAAK,uCAAuC;CAEnD,IAAI;EACF,MAAM,QAAQ;EACd,MAAM,oBAAoB;EAE1B,OAAO,KAAK,oCAAoC;CAClD,SAAS,OAAO;EACd,OAAO,MAAM,oCAAoC,KAAK;EACtD,MAAM;CACR;AACF;AAEA,IAAI,OAAO,KAAK,QAAQ,UAAU,QAAQ,KAAK,MAC7C,QAAQ,EAAE,OAAO,UAAU;CACzB,OAAO,MAAM,sBAAsB,KAAK;CACxC,QAAQ,KAAK,CAAC;AAChB,CAAC"}
|
package/dist/stdio.d.ts
CHANGED
package/dist/stdio.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { runServer } from "./index.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
//#region src/stdio.ts
|
|
4
|
+
runServer().catch((error) => {
|
|
5
|
+
console.error("Failed to start server:", error);
|
|
6
|
+
process.exit(1);
|
|
6
7
|
});
|
|
8
|
+
//#endregion
|
|
9
|
+
|
|
7
10
|
//# sourceMappingURL=stdio.js.map
|
package/dist/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.js","
|
|
1
|
+
{"version":3,"file":"stdio.js","names":[],"sources":["../src/stdio.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runServer } from \"./index.js\";\n\nvoid runServer().catch((error) => {\n console.error(\"Failed to start server:\", error);\n process.exit(1);\n});\n"],"mappings":";;;AAGK,UAAU,EAAE,OAAO,UAAU;CAChC,QAAQ,MAAM,2BAA2B,KAAK;CAC9C,QAAQ,KAAK,CAAC;AAChB,CAAC"}
|
package/dist/tools/docs.d.ts
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
|
+
|
|
3
|
+
//#region src/tools/docs.d.ts
|
|
2
4
|
declare const docsInputSchema: z.ZodObject<{
|
|
3
|
-
|
|
5
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
4
6
|
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
|
|
7
|
+
paths: string[];
|
|
6
8
|
}, {
|
|
7
|
-
|
|
9
|
+
paths: string[];
|
|
8
10
|
}>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
declare const docsTools: {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
parameters: {
|
|
15
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
16
|
+
};
|
|
17
|
+
execute: ({
|
|
18
|
+
paths
|
|
19
|
+
}: z.infer<typeof docsInputSchema>) => Promise<{
|
|
20
|
+
content: Array<{
|
|
21
|
+
type: "text";
|
|
22
|
+
text: string;
|
|
20
23
|
}>;
|
|
24
|
+
}>;
|
|
21
25
|
};
|
|
22
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
export { docsTools };
|
|
23
28
|
//# sourceMappingURL=docs.d.ts.map
|
package/dist/tools/docs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","
|
|
1
|
+
{"version":3,"file":"docs.d.ts","names":[],"sources":["../../src/tools/docs.ts"],"mappings":";;;cAeM,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;cAoJR,SAAA;;;;;;;;KAKgB,CAAA,CAAE,KAAA,QAAa,eAAA,MAAgB,OAAA"}
|
package/dist/tools/docs.js
CHANGED
|
@@ -1,168 +1,147 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { stat, lstat } from "node:fs/promises";
|
|
3
|
-
import { join, extname } from "node:path";
|
|
4
|
-
import { DOCS_PATH, MDX_EXTENSION, MAX_FILE_SIZE } from "../constants.js";
|
|
1
|
+
import { DOCS_PATH, MAX_FILE_SIZE, MDX_EXTENSION } from "../constants.js";
|
|
5
2
|
import { logger } from "../utils/logger.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { findNearestPaths, getAvailablePaths, listDirContents, pathExists } from "../utils/paths.js";
|
|
4
|
+
import { formatMDXContent, readMDXFile } from "../utils/mdx.js";
|
|
8
5
|
import { formatMCPResponse } from "../utils/mcp-format.js";
|
|
9
6
|
import { sanitizePath } from "../utils/security.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
7
|
+
import { extname, join } from "node:path";
|
|
8
|
+
import { z } from "zod/v3";
|
|
9
|
+
import { lstat, stat } from "node:fs/promises";
|
|
10
|
+
//#region src/tools/docs.ts
|
|
11
|
+
const docsInputSchema = z.object({ paths: z.array(z.string()).min(1).describe("Documentation paths to retrieve (e.g., [\"getting-started\", \"api-reference/primitives/thread\"])") });
|
|
16
12
|
async function readDocumentation(docPath) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
path: docPath,
|
|
114
|
-
found: false,
|
|
115
|
-
suggestions,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
if (error instanceof Error && error.message.includes("Invalid path")) {
|
|
120
|
-
return {
|
|
121
|
-
path: docPath,
|
|
122
|
-
found: false,
|
|
123
|
-
error: error.message,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
throw error;
|
|
127
|
-
}
|
|
13
|
+
logger.debug(`Reading documentation for path: ${docPath}`);
|
|
14
|
+
if (docPath === "/" || docPath === "") {
|
|
15
|
+
const { directories, files } = await listDirContents(DOCS_PATH);
|
|
16
|
+
return {
|
|
17
|
+
path: "/",
|
|
18
|
+
found: true,
|
|
19
|
+
type: "directory",
|
|
20
|
+
directories,
|
|
21
|
+
files: files.map((f) => f.replace(MDX_EXTENSION, ""))
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const fullPath = join(DOCS_PATH, sanitizePath(docPath));
|
|
26
|
+
try {
|
|
27
|
+
if ((await lstat(fullPath)).isSymbolicLink()) {
|
|
28
|
+
logger.warn(`Symlink detected at path: ${fullPath}`);
|
|
29
|
+
return {
|
|
30
|
+
path: docPath,
|
|
31
|
+
found: false,
|
|
32
|
+
error: "Symlinks are not allowed for security reasons"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
} catch {}
|
|
36
|
+
if (await pathExists(fullPath)) {
|
|
37
|
+
const stats = await stat(fullPath);
|
|
38
|
+
if (stats.isFile() && stats.size > 10485760) {
|
|
39
|
+
logger.warn(`File too large: ${fullPath} (${stats.size} bytes)`);
|
|
40
|
+
return {
|
|
41
|
+
path: docPath,
|
|
42
|
+
found: false,
|
|
43
|
+
error: `File size exceeds maximum allowed size of ${MAX_FILE_SIZE} bytes`
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (stats.isDirectory()) {
|
|
47
|
+
const { directories, files } = await listDirContents(fullPath);
|
|
48
|
+
const contents = {};
|
|
49
|
+
for (const file of files) {
|
|
50
|
+
const mdxContent = await readMDXFile(join(fullPath, file));
|
|
51
|
+
if (mdxContent) {
|
|
52
|
+
const fileName = file.replace(MDX_EXTENSION, "");
|
|
53
|
+
contents[fileName] = formatMDXContent(mdxContent);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const content = Object.keys(contents).length > 0 ? JSON.stringify(contents, null, 2) : void 0;
|
|
57
|
+
return {
|
|
58
|
+
path: docPath,
|
|
59
|
+
found: true,
|
|
60
|
+
type: "directory",
|
|
61
|
+
directories,
|
|
62
|
+
files: files.map((f) => f.replace(MDX_EXTENSION, "")),
|
|
63
|
+
...content !== void 0 && { content }
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const mdxPath = extname(fullPath) === ".mdx" ? fullPath : `${fullPath}${MDX_EXTENSION}`;
|
|
68
|
+
try {
|
|
69
|
+
const mdxLstats = await lstat(mdxPath);
|
|
70
|
+
if (mdxLstats.isSymbolicLink()) {
|
|
71
|
+
logger.warn(`Symlink detected at MDX path: ${mdxPath}`);
|
|
72
|
+
return {
|
|
73
|
+
path: docPath,
|
|
74
|
+
found: false,
|
|
75
|
+
error: "Symlinks are not allowed for security reasons"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (mdxLstats.size > 10485760) {
|
|
79
|
+
logger.warn(`MDX file too large: ${mdxPath} (${mdxLstats.size} bytes)`);
|
|
80
|
+
return {
|
|
81
|
+
path: docPath,
|
|
82
|
+
found: false,
|
|
83
|
+
error: `File size exceeds maximum allowed size of ${MAX_FILE_SIZE} bytes`
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
} catch {}
|
|
87
|
+
if (await pathExists(mdxPath)) {
|
|
88
|
+
const mdxContent = await readMDXFile(mdxPath);
|
|
89
|
+
if (mdxContent) return {
|
|
90
|
+
path: docPath,
|
|
91
|
+
found: true,
|
|
92
|
+
type: "file",
|
|
93
|
+
content: formatMDXContent(mdxContent)
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
path: docPath,
|
|
98
|
+
found: false,
|
|
99
|
+
suggestions: findNearestPaths(docPath, await getAvailablePaths())
|
|
100
|
+
};
|
|
101
|
+
} catch (error) {
|
|
102
|
+
if (error instanceof Error && error.message.includes("Invalid path")) return {
|
|
103
|
+
path: docPath,
|
|
104
|
+
found: false,
|
|
105
|
+
error: error.message
|
|
106
|
+
};
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
128
109
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
error: "Failed to retrieve documentation",
|
|
163
|
-
message: error instanceof Error ? error.message : String(error),
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
},
|
|
110
|
+
const docsTools = {
|
|
111
|
+
name: "assistantUIDocs",
|
|
112
|
+
description: "Retrieve assistant-ui documentation by path. Use \"/\" to list all sections. Supports multiple paths in a single request.",
|
|
113
|
+
parameters: docsInputSchema.shape,
|
|
114
|
+
execute: async ({ paths }) => {
|
|
115
|
+
logger.info(`Retrieving documentation for paths: ${paths.join(", ")}`);
|
|
116
|
+
try {
|
|
117
|
+
const results = await Promise.all(paths.map((path) => readDocumentation(path)));
|
|
118
|
+
if (results.length === 1) {
|
|
119
|
+
const result = results[0];
|
|
120
|
+
if (result.error) return formatMCPResponse({
|
|
121
|
+
error: result.error,
|
|
122
|
+
path: result.path
|
|
123
|
+
});
|
|
124
|
+
if (!result.found) return formatMCPResponse({
|
|
125
|
+
error: `Documentation not found for path: ${result.path}`,
|
|
126
|
+
suggestions: result.suggestions,
|
|
127
|
+
hint: "Use \"/\" to list all available documentation sections"
|
|
128
|
+
});
|
|
129
|
+
return formatMCPResponse(result);
|
|
130
|
+
}
|
|
131
|
+
return formatMCPResponse({
|
|
132
|
+
results,
|
|
133
|
+
summary: `Retrieved ${results.filter((r) => r.found).length} of ${results.length} requested paths`
|
|
134
|
+
});
|
|
135
|
+
} catch (error) {
|
|
136
|
+
logger.error("Failed to retrieve documentation", error);
|
|
137
|
+
return formatMCPResponse({
|
|
138
|
+
error: "Failed to retrieve documentation",
|
|
139
|
+
message: error instanceof Error ? error.message : String(error)
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
167
143
|
};
|
|
144
|
+
//#endregion
|
|
145
|
+
export { docsTools };
|
|
146
|
+
|
|
168
147
|
//# sourceMappingURL=docs.js.map
|
package/dist/tools/docs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","
|
|
1
|
+
{"version":3,"file":"docs.js","names":[],"sources":["../../src/tools/docs.ts"],"sourcesContent":["import { z } from \"zod/v3\";\nimport { stat, lstat } from \"node:fs/promises\";\nimport { join, extname } from \"node:path\";\nimport { DOCS_PATH, MDX_EXTENSION, MAX_FILE_SIZE } from \"../constants.js\";\nimport { logger } from \"../utils/logger.js\";\nimport {\n listDirContents,\n getAvailablePaths,\n findNearestPaths,\n pathExists,\n} from \"../utils/paths.js\";\nimport { readMDXFile, formatMDXContent } from \"../utils/mdx.js\";\nimport { formatMCPResponse } from \"../utils/mcp-format.js\";\nimport { sanitizePath } from \"../utils/security.js\";\n\nconst docsInputSchema = z.object({\n paths: z\n .array(z.string())\n .min(1)\n .describe(\n 'Documentation paths to retrieve (e.g., [\"getting-started\", \"api-reference/primitives/thread\"])',\n ),\n});\n\ninterface DocResult {\n path: string;\n found: boolean;\n type?: \"file\" | \"directory\";\n content?: string;\n files?: string[];\n directories?: string[];\n suggestions?: string[];\n error?: string;\n}\n\nasync function readDocumentation(docPath: string): Promise<DocResult> {\n logger.debug(`Reading documentation for path: ${docPath}`);\n\n if (docPath === \"/\" || docPath === \"\") {\n const { directories, files } = await listDirContents(DOCS_PATH);\n return {\n path: \"/\",\n found: true,\n type: \"directory\",\n directories,\n files: files.map((f) => f.replace(MDX_EXTENSION, \"\")),\n };\n }\n\n try {\n const sanitized = sanitizePath(docPath);\n const fullPath = join(DOCS_PATH, sanitized);\n\n try {\n const lstats = await lstat(fullPath);\n if (lstats.isSymbolicLink()) {\n logger.warn(`Symlink detected at path: ${fullPath}`);\n return {\n path: docPath,\n found: false,\n error: \"Symlinks are not allowed for security reasons\",\n };\n }\n } catch {}\n\n if (await pathExists(fullPath)) {\n const stats = await stat(fullPath);\n\n if (stats.isFile() && stats.size > MAX_FILE_SIZE) {\n logger.warn(`File too large: ${fullPath} (${stats.size} bytes)`);\n return {\n path: docPath,\n found: false,\n error: `File size exceeds maximum allowed size of ${MAX_FILE_SIZE} bytes`,\n };\n }\n\n if (stats.isDirectory()) {\n const { directories, files } = await listDirContents(fullPath);\n\n const contents: Record<string, string> = {};\n for (const file of files) {\n const mdxContent = await readMDXFile(join(fullPath, file));\n if (mdxContent) {\n const fileName = file.replace(MDX_EXTENSION, \"\");\n contents[fileName] = formatMDXContent(mdxContent);\n }\n }\n\n const content =\n Object.keys(contents).length > 0\n ? JSON.stringify(contents, null, 2)\n : undefined;\n return {\n path: docPath,\n found: true,\n type: \"directory\",\n directories,\n files: files.map((f) => f.replace(MDX_EXTENSION, \"\")),\n ...(content !== undefined && { content }),\n };\n }\n }\n\n const mdxPath =\n extname(fullPath) === MDX_EXTENSION\n ? fullPath\n : `${fullPath}${MDX_EXTENSION}`;\n\n try {\n const mdxLstats = await lstat(mdxPath);\n if (mdxLstats.isSymbolicLink()) {\n logger.warn(`Symlink detected at MDX path: ${mdxPath}`);\n return {\n path: docPath,\n found: false,\n error: \"Symlinks are not allowed for security reasons\",\n };\n }\n\n if (mdxLstats.size > MAX_FILE_SIZE) {\n logger.warn(`MDX file too large: ${mdxPath} (${mdxLstats.size} bytes)`);\n return {\n path: docPath,\n found: false,\n error: `File size exceeds maximum allowed size of ${MAX_FILE_SIZE} bytes`,\n };\n }\n } catch {}\n\n if (await pathExists(mdxPath)) {\n const mdxContent = await readMDXFile(mdxPath);\n\n if (mdxContent) {\n return {\n path: docPath,\n found: true,\n type: \"file\",\n content: formatMDXContent(mdxContent),\n };\n }\n }\n\n const availablePaths = await getAvailablePaths();\n const suggestions = findNearestPaths(docPath, availablePaths);\n\n return {\n path: docPath,\n found: false,\n suggestions,\n };\n } catch (error) {\n if (error instanceof Error && error.message.includes(\"Invalid path\")) {\n return {\n path: docPath,\n found: false,\n error: error.message,\n };\n }\n throw error;\n }\n}\n\nexport const docsTools = {\n name: \"assistantUIDocs\",\n description:\n 'Retrieve assistant-ui documentation by path. Use \"/\" to list all sections. Supports multiple paths in a single request.',\n parameters: docsInputSchema.shape,\n execute: async ({ paths }: z.infer<typeof docsInputSchema>) => {\n logger.info(`Retrieving documentation for paths: ${paths.join(\", \")}`);\n\n try {\n const results = await Promise.all(\n paths.map((path) => readDocumentation(path)),\n );\n\n if (results.length === 1) {\n const result = results[0]!;\n if (result.error) {\n return formatMCPResponse({\n error: result.error,\n path: result.path,\n });\n }\n if (!result.found) {\n return formatMCPResponse({\n error: `Documentation not found for path: ${result.path}`,\n suggestions: result.suggestions,\n hint: 'Use \"/\" to list all available documentation sections',\n });\n }\n return formatMCPResponse(result);\n }\n\n return formatMCPResponse({\n results,\n summary: `Retrieved ${results.filter((r) => r.found).length} of ${results.length} requested paths`,\n });\n } catch (error) {\n logger.error(\"Failed to retrieve documentation\", error);\n return formatMCPResponse({\n error: \"Failed to retrieve documentation\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n};\n"],"mappings":";;;;;;;;;;AAeA,MAAM,kBAAkB,EAAE,OAAO,EAC/B,OAAO,EACJ,MAAM,EAAE,OAAO,CAAC,EAChB,IAAI,CAAC,EACL,SACC,oGACF,EACJ,CAAC;AAaD,eAAe,kBAAkB,SAAqC;CACpE,OAAO,MAAM,mCAAmC,SAAS;CAEzD,IAAI,YAAY,OAAO,YAAY,IAAI;EACrC,MAAM,EAAE,aAAa,UAAU,MAAM,gBAAgB,SAAS;EAC9D,OAAO;GACL,MAAM;GACN,OAAO;GACP,MAAM;GACN;GACA,OAAO,MAAM,KAAK,MAAM,EAAE,QAAQ,eAAe,EAAE,CAAC;EACtD;CACF;CAEA,IAAI;EAEF,MAAM,WAAW,KAAK,WADJ,aAAa,OACU,CAAC;EAE1C,IAAI;GAEF,KAAI,MADiB,MAAM,QAAQ,GACxB,eAAe,GAAG;IAC3B,OAAO,KAAK,6BAA6B,UAAU;IACnD,OAAO;KACL,MAAM;KACN,OAAO;KACP,OAAO;IACT;GACF;EACF,QAAQ,CAAC;EAET,IAAI,MAAM,WAAW,QAAQ,GAAG;GAC9B,MAAM,QAAQ,MAAM,KAAK,QAAQ;GAEjC,IAAI,MAAM,OAAO,KAAK,MAAM,OAAA,UAAsB;IAChD,OAAO,KAAK,mBAAmB,SAAS,IAAI,MAAM,KAAK,QAAQ;IAC/D,OAAO;KACL,MAAM;KACN,OAAO;KACP,OAAO,6CAA6C,cAAc;IACpE;GACF;GAEA,IAAI,MAAM,YAAY,GAAG;IACvB,MAAM,EAAE,aAAa,UAAU,MAAM,gBAAgB,QAAQ;IAE7D,MAAM,WAAmC,CAAC;IAC1C,KAAK,MAAM,QAAQ,OAAO;KACxB,MAAM,aAAa,MAAM,YAAY,KAAK,UAAU,IAAI,CAAC;KACzD,IAAI,YAAY;MACd,MAAM,WAAW,KAAK,QAAQ,eAAe,EAAE;MAC/C,SAAS,YAAY,iBAAiB,UAAU;KAClD;IACF;IAEA,MAAM,UACJ,OAAO,KAAK,QAAQ,EAAE,SAAS,IAC3B,KAAK,UAAU,UAAU,MAAM,CAAC,IAChC,KAAA;IACN,OAAO;KACL,MAAM;KACN,OAAO;KACP,MAAM;KACN;KACA,OAAO,MAAM,KAAK,MAAM,EAAE,QAAQ,eAAe,EAAE,CAAC;KACpD,GAAI,YAAY,KAAA,KAAa,EAAE,QAAQ;IACzC;GACF;EACF;EAEA,MAAM,UACJ,QAAQ,QAAQ,MAAA,SACZ,WACA,GAAG,WAAW;EAEpB,IAAI;GACF,MAAM,YAAY,MAAM,MAAM,OAAO;GACrC,IAAI,UAAU,eAAe,GAAG;IAC9B,OAAO,KAAK,iCAAiC,SAAS;IACtD,OAAO;KACL,MAAM;KACN,OAAO;KACP,OAAO;IACT;GACF;GAEA,IAAI,UAAU,OAAA,UAAsB;IAClC,OAAO,KAAK,uBAAuB,QAAQ,IAAI,UAAU,KAAK,QAAQ;IACtE,OAAO;KACL,MAAM;KACN,OAAO;KACP,OAAO,6CAA6C,cAAc;IACpE;GACF;EACF,QAAQ,CAAC;EAET,IAAI,MAAM,WAAW,OAAO,GAAG;GAC7B,MAAM,aAAa,MAAM,YAAY,OAAO;GAE5C,IAAI,YACF,OAAO;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,SAAS,iBAAiB,UAAU;GACtC;EAEJ;EAKA,OAAO;GACL,MAAM;GACN,OAAO;GACP,aALkB,iBAAiB,SAAS,MADjB,kBAAkB,CAMnC;EACZ;CACF,SAAS,OAAO;EACd,IAAI,iBAAiB,SAAS,MAAM,QAAQ,SAAS,cAAc,GACjE,OAAO;GACL,MAAM;GACN,OAAO;GACP,OAAO,MAAM;EACf;EAEF,MAAM;CACR;AACF;AAEA,MAAa,YAAY;CACvB,MAAM;CACN,aACE;CACF,YAAY,gBAAgB;CAC5B,SAAS,OAAO,EAAE,YAA6C;EAC7D,OAAO,KAAK,uCAAuC,MAAM,KAAK,IAAI,GAAG;EAErE,IAAI;GACF,MAAM,UAAU,MAAM,QAAQ,IAC5B,MAAM,KAAK,SAAS,kBAAkB,IAAI,CAAC,CAC7C;GAEA,IAAI,QAAQ,WAAW,GAAG;IACxB,MAAM,SAAS,QAAQ;IACvB,IAAI,OAAO,OACT,OAAO,kBAAkB;KACvB,OAAO,OAAO;KACd,MAAM,OAAO;IACf,CAAC;IAEH,IAAI,CAAC,OAAO,OACV,OAAO,kBAAkB;KACvB,OAAO,qCAAqC,OAAO;KACnD,aAAa,OAAO;KACpB,MAAM;IACR,CAAC;IAEH,OAAO,kBAAkB,MAAM;GACjC;GAEA,OAAO,kBAAkB;IACvB;IACA,SAAS,aAAa,QAAQ,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,MAAM,QAAQ,OAAO;GACnF,CAAC;EACH,SAAS,OAAO;GACd,OAAO,MAAM,oCAAoC,KAAK;GACtD,OAAO,kBAAkB;IACvB,OAAO;IACP,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAChE,CAAC;EACH;CACF;AACF"}
|
package/dist/tools/examples.d.ts
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
|
+
|
|
3
|
+
//#region src/tools/examples.d.ts
|
|
2
4
|
declare const examplesInputSchema: z.ZodObject<{
|
|
3
|
-
|
|
5
|
+
example: z.ZodOptional<z.ZodString>;
|
|
4
6
|
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
|
|
7
|
+
example?: string | undefined;
|
|
6
8
|
}, {
|
|
7
|
-
|
|
9
|
+
example?: string | undefined;
|
|
8
10
|
}>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
declare const examplesTools: {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
parameters: {
|
|
15
|
+
example: z.ZodOptional<z.ZodString>;
|
|
16
|
+
};
|
|
17
|
+
execute: ({
|
|
18
|
+
example
|
|
19
|
+
}: z.infer<typeof examplesInputSchema>) => Promise<{
|
|
20
|
+
content: Array<{
|
|
21
|
+
type: "text";
|
|
22
|
+
text: string;
|
|
20
23
|
}>;
|
|
24
|
+
}>;
|
|
21
25
|
};
|
|
22
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
export { examplesTools };
|
|
23
28
|
//# sourceMappingURL=examples.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.d.ts","
|
|
1
|
+
{"version":3,"file":"examples.d.ts","names":[],"sources":["../../src/tools/examples.ts"],"mappings":";;;cAQM,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;cA8CZ,aAAA;;;;;;;;KAKkB,CAAA,CAAE,KAAA,QAAa,mBAAA,MAAoB,OAAA"}
|