@gemmein/mcp 0.2.0 → 0.2.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/dist/index.js +15 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -87,13 +87,19 @@ const EXTRA_ERRORS = {
|
|
|
87
87
|
},
|
|
88
88
|
};
|
|
89
89
|
function parseErrorTable() {
|
|
90
|
+
// Only the "## Errors" section holds the code table — parsing the whole
|
|
91
|
+
// document also swallowed the method tables, and the old row regex missed
|
|
92
|
+
// every code with a parenthetical status (`unsupported_file_type` (415)).
|
|
90
93
|
const out = {};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
const doc = sdkFile("REFERENCE.md");
|
|
95
|
+
const start = doc.indexOf("\n## Errors");
|
|
96
|
+
const next = start === -1 ? -1 : doc.indexOf("\n## ", start + 10);
|
|
97
|
+
const section = start === -1 ? doc : doc.slice(start, next === -1 ? undefined : next);
|
|
98
|
+
for (const line of section.split("\n")) {
|
|
95
99
|
const cells = line.split("|").map((c) => c.trim());
|
|
96
|
-
|
|
100
|
+
if (cells.length < 4)
|
|
101
|
+
continue;
|
|
102
|
+
// cells[1] = code cell (may carry a status note), cells[2] = meaning, cells[3] = do
|
|
97
103
|
const codes = (cells[1].match(/`([a-z_]+)`/g) ?? []).map((c) => c.slice(1, -1));
|
|
98
104
|
for (const code of codes) {
|
|
99
105
|
out[code] = { meaning: cells[2], fix: cells[3].replace(/\*\*/g, "") };
|
|
@@ -294,7 +300,10 @@ const TOOLS = [
|
|
|
294
300
|
},
|
|
295
301
|
},
|
|
296
302
|
];
|
|
297
|
-
const server = new Server(
|
|
303
|
+
const server = new Server(
|
|
304
|
+
// The one version, read from package.json — a literal here drifted once
|
|
305
|
+
// (announced 0.1.0 while the package said 0.2.1; review 26 Aug).
|
|
306
|
+
{ name: "gemmein", version: require("../package.json").version }, { capabilities: { tools: {} } });
|
|
298
307
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
299
308
|
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
300
309
|
const errText = (t) => ({ content: [{ type: "text", text: t }], isError: true });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gemmein/mcp",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Gemmein MCP server
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Gemmein MCP server \u2014 gives coding agents the Gemmein guide, API reference, rule/error explainers, and a live integration check (reaffirm) as tools. Read-only: it never creates, edits, or deletes anything.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"prepublishOnly": "npm run build"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@gemmein/sdk": "^0.
|
|
36
|
+
"@gemmein/sdk": "^0.4.4",
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
38
38
|
},
|
|
39
39
|
"author": "Gemmein Limited",
|