@lintsure/mcp 0.1.3 → 0.2.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/dist/src/index.js +4 -2
- package/package.json +2 -2
package/dist/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { AGENT_GUIDANCE, APPROVAL_RULES, ALL_FRAMEWORKS, DISCLAIMER, classify, getKnowledge, nextSteps, readConfig, rules, scan, toMarkdown } from "@lintsure/core";
|
|
10
|
-
const server = new McpServer({ name: "lintsure", version: "0.
|
|
10
|
+
const server = new McpServer({ name: "lintsure", version: "0.2.0" }, { instructions: AGENT_GUIDANCE });
|
|
11
11
|
// Every tool only reads. Clients can show this; none of them may treat a Lintsure tool as making changes.
|
|
12
12
|
const RO = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
13
13
|
const fw = z.array(z.enum(ALL_FRAMEWORKS)).optional()
|
|
@@ -16,7 +16,9 @@ const fw = z.array(z.enum(ALL_FRAMEWORKS)).optional()
|
|
|
16
16
|
const reply = (...texts) => ({ content: [...texts, `---\n${DISCLAIMER}`].map((text) => ({ type: "text", text })) });
|
|
17
17
|
server.tool("scan", "Check a repo's code for compliance gaps. Returns findings with file, line, rules broken, fix and auditor note, plus what still needs doing outside code. Results are for a person to review; never present them as a pass, a certification or a decision.", { path: z.string().default(".").describe("Repo path"), frameworks: fw }, RO, async ({ path, frameworks }) => {
|
|
18
18
|
const root = resolve(path);
|
|
19
|
-
const
|
|
19
|
+
const cfg = (await readConfig(root)).frameworks;
|
|
20
|
+
const why = frameworks ? "Chosen by the user through their coding agent." : cfg ? "Listed in lintsure.config.yaml." : undefined;
|
|
21
|
+
const report = await scan(root, frameworks ?? cfg ?? ALL_FRAMEWORKS, { why, source: "mcp" });
|
|
20
22
|
const steps = nextSteps(report).map((s, i) => `${i + 1}. ${s}`).join("\n");
|
|
21
23
|
return reply(toMarkdown(report), JSON.stringify(report), `${APPROVAL_RULES}\n\nEach finding above already has its proposal (where, what, why, benefit). Ask the user which one to work on first.\n\nNext steps for the user:\n${steps}`);
|
|
22
24
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lintsure/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"mcpName": "io.github.lintsure/lintsure",
|
|
5
5
|
"description": "Lintsure MCP server for Claude Code, Cursor, Codex and Windsurf. Readiness checks, not an audit or legal advice.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"LICENSE"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lintsure/core": "0.
|
|
17
|
+
"@lintsure/core": "0.2.0",
|
|
18
18
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
19
19
|
"zod": "^3.24.0"
|
|
20
20
|
},
|