@mastra/mcp-docs-server 0.13.20 → 0.13.21-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +8 -8
- package/.docs/organized/changelogs/%40internal%2Ftypes-builder.md +2 -0
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +8 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +19 -19
- package/.docs/organized/changelogs/%40mastra%2Fcloud.md +13 -13
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +41 -41
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +22 -22
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +12 -12
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +17 -17
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +21 -21
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +6 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +17 -17
- package/.docs/organized/changelogs/create-mastra.md +5 -5
- package/.docs/organized/changelogs/mastra.md +21 -21
- package/.docs/organized/code-examples/agent.md +34 -9
- package/.docs/organized/code-examples/ai-sdk-v5.md +16 -14
- package/.docs/organized/code-examples/heads-up-game.md +3 -3
- package/.docs/raw/auth/clerk.mdx +142 -0
- package/.docs/raw/getting-started/installation.mdx +3 -1
- package/.docs/raw/getting-started/model-providers.mdx +31 -31
- package/.docs/raw/observability/ai-tracing.mdx +123 -24
- package/.docs/raw/reference/agents/ChunkType.mdx +857 -0
- package/.docs/raw/reference/agents/MastraModelOutput.mdx +321 -0
- package/.docs/raw/reference/agents/generateVNext.mdx +519 -0
- package/.docs/raw/reference/agents/streamVNext.mdx +6 -20
- package/.docs/raw/reference/auth/clerk.mdx +71 -0
- package/.docs/raw/reference/scorers/answer-similarity.mdx +179 -0
- package/.docs/raw/scorers/off-the-shelf-scorers.mdx +1 -0
- package/.docs/raw/server-db/production-server.mdx +27 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +144 -159
- package/.docs/raw/workflows/control-flow.mdx +1 -1
- package/.docs/raw/workflows/suspend-and-resume.mdx +5 -0
- package/CHANGELOG.md +9 -0
- package/dist/stdio.js +11 -4
- package/dist/tools/docs.d.ts.map +1 -1
- package/package.json +4 -4
- /package/.docs/raw/reference/{templates.mdx → templates/overview.mdx} +0 -0
package/dist/stdio.js
CHANGED
|
@@ -844,7 +844,7 @@ async function readMdxContent(docPath, queryKeywords) {
|
|
|
844
844
|
const fullPath = path3__default.resolve(path3__default.join(docsBaseDir, docPath));
|
|
845
845
|
if (!fullPath.startsWith(path3__default.resolve(docsBaseDir))) {
|
|
846
846
|
void logger.error(`Path traversal attempt detected`);
|
|
847
|
-
return { found: false };
|
|
847
|
+
return { found: false, isSecurityViolation: true };
|
|
848
848
|
}
|
|
849
849
|
void logger.debug(`Reading MDX content from: ${fullPath}`);
|
|
850
850
|
try {
|
|
@@ -877,14 +877,14 @@ ${content2}`;
|
|
|
877
877
|
}
|
|
878
878
|
const contentBasedSuggestions = await getMatchingPaths(docPath, queryKeywords, docsBaseDir);
|
|
879
879
|
const suggestions = ["---", "", contentBasedSuggestions, ""].join("\n");
|
|
880
|
-
return { found: true, content: dirListing + fileContents + suggestions };
|
|
880
|
+
return { found: true, content: dirListing + fileContents + suggestions, isSecurityViolation: false };
|
|
881
881
|
}
|
|
882
882
|
const content = await fs3.readFile(fullPath, "utf-8");
|
|
883
|
-
return { found: true, content };
|
|
883
|
+
return { found: true, content, isSecurityViolation: false };
|
|
884
884
|
} catch (error) {
|
|
885
885
|
void logger.error(`Failed to read MDX content: ${fullPath}`, error);
|
|
886
886
|
if (error.code === "ENOENT") {
|
|
887
|
-
return { found: false };
|
|
887
|
+
return { found: false, isSecurityViolation: false };
|
|
888
888
|
}
|
|
889
889
|
throw error;
|
|
890
890
|
}
|
|
@@ -979,6 +979,13 @@ var docsTool = {
|
|
|
979
979
|
error: null
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
|
+
if (result.isSecurityViolation) {
|
|
983
|
+
return {
|
|
984
|
+
path: path6,
|
|
985
|
+
content: null,
|
|
986
|
+
error: "Invalid path"
|
|
987
|
+
};
|
|
988
|
+
}
|
|
982
989
|
const directorySuggestions = await findNearestDirectory(path6, availablePaths);
|
|
983
990
|
const contentBasedSuggestions = await getMatchingPaths(path6, queryKeywords, docsBaseDir);
|
|
984
991
|
return {
|
package/dist/tools/docs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/tools/docs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/tools/docs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkKxB,eAAO,MAAM,eAAe;;;;;;;;;EAW1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;oBAkBG,SAAS;CAwDhC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.21-alpha.0",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"uuid": "^11.1.0",
|
|
34
34
|
"zod": "^3.25.76",
|
|
35
35
|
"zod-to-json-schema": "^3.24.6",
|
|
36
|
-
"@mastra/core": "0.16.
|
|
36
|
+
"@mastra/core": "0.16.3-alpha.0",
|
|
37
37
|
"@mastra/mcp": "^0.12.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@wong2/mcp-cli": "^1.10.0",
|
|
45
45
|
"cross-env": "^7.0.3",
|
|
46
46
|
"eslint": "^9.30.1",
|
|
47
|
-
"hono": "^4.
|
|
47
|
+
"hono": "^4.9.6",
|
|
48
48
|
"tsup": "^8.5.0",
|
|
49
49
|
"tsx": "^4.19.4",
|
|
50
50
|
"typescript": "^5.8.3",
|
|
51
51
|
"vitest": "^3.2.4",
|
|
52
52
|
"@internal/lint": "0.0.38",
|
|
53
|
-
"@mastra/core": "0.16.
|
|
53
|
+
"@mastra/core": "0.16.3-alpha.0"
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://mastra.ai",
|
|
56
56
|
"repository": {
|
|
File without changes
|