@primer/mcp 1.0.0-rc.bd3520b7c → 1.0.0-rc.e29d259bd
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/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as server, t as createServer } from "./server-
|
|
1
|
+
import { n as server, t as createServer } from "./server-CBy5I-Dh.js";
|
|
2
2
|
export { createServer, server };
|
|
@@ -395,10 +395,12 @@ function loadAllTokensWithGuidelines() {
|
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
function loadDesignTokensGuide() {
|
|
398
|
-
|
|
398
|
+
const guidePath = createRequire(import.meta.url).resolve("@primer/primitives/DESIGN_TOKENS_GUIDE.md");
|
|
399
|
+
return readFileSync(guidePath, "utf-8");
|
|
399
400
|
}
|
|
400
401
|
function loadDesignTokensSpec() {
|
|
401
|
-
|
|
402
|
+
const specPath = createRequire(import.meta.url).resolve("@primer/primitives/DESIGN_TOKENS_SPEC.md");
|
|
403
|
+
return readFileSync(specPath, "utf-8");
|
|
402
404
|
}
|
|
403
405
|
function getDesignTokenSpecsText(groups) {
|
|
404
406
|
return `
|
|
@@ -957,7 +959,8 @@ ${turndownService.turndown(source)}`
|
|
|
957
959
|
let effectiveGroup = resolvedGroup;
|
|
958
960
|
const filteredKeywords = [];
|
|
959
961
|
for (const kw of rawKeywords) {
|
|
960
|
-
const
|
|
962
|
+
const normalized = kw.replace(/\s+/g, "");
|
|
963
|
+
const aliasMatch = GROUP_ALIASES[normalized];
|
|
961
964
|
if (aliasMatch && !effectiveGroup) effectiveGroup = aliasMatch;
|
|
962
965
|
else filteredKeywords.push(kw);
|
|
963
966
|
}
|
|
@@ -1002,7 +1005,8 @@ ${validGroups}
|
|
|
1002
1005
|
annotations: { readOnlyHint: true }
|
|
1003
1006
|
}, async ({ groups }) => {
|
|
1004
1007
|
const resolvedGroups = groups.map((g) => {
|
|
1005
|
-
|
|
1008
|
+
const normalized = g.toLowerCase().replace(/\s+/g, "");
|
|
1009
|
+
return GROUP_ALIASES[normalized] || g;
|
|
1006
1010
|
});
|
|
1007
1011
|
const matched = allTokensWithGuidelines.filter((token) => resolvedGroups.some((rg) => tokenMatchesGroup(token, rg)));
|
|
1008
1012
|
if (matched.length === 0) {
|
package/dist/stdio.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/mcp",
|
|
3
3
|
"description": "An MCP server that connects AI tools to the Primer Design System",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.e29d259bd",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mcp": "./bin/mcp.js"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@primer/vitest-config": "^0.0.0",
|
|
52
52
|
"@types/turndown": "^5.0.5",
|
|
53
53
|
"rimraf": "^6.0.1",
|
|
54
|
-
"rolldown": "^1.2.
|
|
54
|
+
"rolldown": "^1.2.2",
|
|
55
55
|
"rolldown-plugin-dts": "^0.26.0",
|
|
56
56
|
"typescript": "^6.0.3"
|
|
57
57
|
}
|