@wastech-mdlint/mcp-server 0.2.2 → 0.3.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.
Files changed (2) hide show
  1. package/dist/tools/lint.js +13 -1
  2. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { customRuleEntrySchema, duplicateCustomIdMessage, findDuplicateCustomIds, formatLintResultText, lintContent, resolveCustomRule, ruleEntrySchema, ruleRegistry, RuleResolutionError, } from "@wastech-mdlint/core";
1
+ import { customRuleEntrySchema, duplicateCustomIdMessage, findDuplicateCustomIds, findMixedRuleSpellings, formatLintResultText, lintContent, mixedRuleSpellingMessage, resolveCustomRule, ruleEntrySchema, ruleRegistry, RuleResolutionError, } from "@wastech-mdlint/core";
2
2
  import { z } from "zod";
3
3
  import { lintMessageSchema } from "../shared/lint-message-schema.js";
4
4
  import { ToolInputError } from "../shared/tool-input-error.js";
@@ -90,6 +90,18 @@ function resolveRequestedRules(entries) {
90
90
  siblingPath: `rules[${collision.firstIndex}]`,
91
91
  })}`);
92
92
  }
93
+ // The same cross-entry check the config loader runs, from the same core helper and message, so a
94
+ // rule list written by id in one entry and by alias in another is refused identically on both
95
+ // hosts: on either, the reader would miss one of the two entries when searching for the rule.
96
+ const mixed = findMixedRuleSpellings(entries, ruleRegistry)[0];
97
+ if (mixed !== undefined) {
98
+ throw new ToolInputError("A rule must be spelled one way in one request.", `rules[${mixed.index}].rule: ${mixedRuleSpellingMessage({
99
+ ruleId: mixed.ruleId,
100
+ spelling: mixed.spelling,
101
+ firstSpelling: mixed.firstSpelling,
102
+ siblingPath: `rules[${mixed.firstIndex}]`,
103
+ })}`);
104
+ }
93
105
  const resolved = [];
94
106
  for (const entry of entries) {
95
107
  let rule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wastech-mdlint/mcp-server",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server for Markdown linting: read-only Model Context Protocol tools for lint findings, the context graph, and change impact.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@modelcontextprotocol/sdk": "^1.29.0",
44
- "@wastech-mdlint/core": "0.2.2",
44
+ "@wastech-mdlint/core": "0.3.0",
45
45
  "zod": "^4.6.6"
46
46
  },
47
47
  "publishConfig": {