@thallylabs/mcp 0.10.132 → 0.10.133

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
@@ -896,6 +896,7 @@ import { z as z13 } from "zod";
896
896
  import { existsSync as existsSync7, readFileSync as readFileSync7 } from "fs";
897
897
  import { join as join8 } from "path";
898
898
  import { projectNavigationContract } from "@thallylabs/core/navigation";
899
+ import { parseMdxTree } from "@thallylabs/core/markdown";
899
900
  var lintProjectSchema = z13.object({
900
901
  projectDir: z13.string().describe("Path to the Thally project root"),
901
902
  fix: z13.boolean().optional().default(false).describe("Auto-fix issues where possible (adds orphan pages to nav)")
@@ -919,6 +920,14 @@ function addOrphanToNav(projectDir, pageId) {
919
920
  writeDocsJson(projectDir, config);
920
921
  }
921
922
  }
923
+ function isOnlyComponent(content) {
924
+ try {
925
+ const children = parseMdxTree(content).children ?? [];
926
+ return children.length === 1 && children[0].type === "mdxJsxFlowElement" && /^[A-Z]/.test(children[0].name ?? "");
927
+ } catch {
928
+ return false;
929
+ }
930
+ }
922
931
  async function handleLintProject(input) {
923
932
  const { projectDir, fix = false } = input;
924
933
  const contentDir = join8(projectDir, "src", "content");
@@ -981,7 +990,7 @@ async function handleLintProject(input) {
981
990
  if (!data.description) {
982
991
  issues.push({ severity: "warning", message: `Missing "description" in frontmatter`, file: filePath.slice(projectDir.length + 1) });
983
992
  }
984
- if (content.trim().length < 50) {
993
+ if (data.mode !== "custom" && content.trim().length < 50 && !isOnlyComponent(content)) {
985
994
  issues.push({ severity: "warning", message: `Very short body (${content.trim().length} chars) \u2014 page may be empty`, file: filePath.slice(projectDir.length + 1) });
986
995
  }
987
996
  }
package/dist/tools.js CHANGED
@@ -887,6 +887,7 @@ import { z as z13 } from "zod";
887
887
  import { existsSync as existsSync7, readFileSync as readFileSync7 } from "fs";
888
888
  import { join as join8 } from "path";
889
889
  import { projectNavigationContract } from "@thallylabs/core/navigation";
890
+ import { parseMdxTree } from "@thallylabs/core/markdown";
890
891
  var lintProjectSchema = z13.object({
891
892
  projectDir: z13.string().describe("Path to the Thally project root"),
892
893
  fix: z13.boolean().optional().default(false).describe("Auto-fix issues where possible (adds orphan pages to nav)")
@@ -910,6 +911,14 @@ function addOrphanToNav(projectDir, pageId) {
910
911
  writeDocsJson(projectDir, config);
911
912
  }
912
913
  }
914
+ function isOnlyComponent(content) {
915
+ try {
916
+ const children = parseMdxTree(content).children ?? [];
917
+ return children.length === 1 && children[0].type === "mdxJsxFlowElement" && /^[A-Z]/.test(children[0].name ?? "");
918
+ } catch {
919
+ return false;
920
+ }
921
+ }
913
922
  async function handleLintProject(input) {
914
923
  const { projectDir, fix = false } = input;
915
924
  const contentDir = join8(projectDir, "src", "content");
@@ -972,7 +981,7 @@ async function handleLintProject(input) {
972
981
  if (!data.description) {
973
982
  issues.push({ severity: "warning", message: `Missing "description" in frontmatter`, file: filePath.slice(projectDir.length + 1) });
974
983
  }
975
- if (content.trim().length < 50) {
984
+ if (data.mode !== "custom" && content.trim().length < 50 && !isOnlyComponent(content)) {
976
985
  issues.push({ severity: "warning", message: `Very short body (${content.trim().length} chars) \u2014 page may be empty`, file: filePath.slice(projectDir.length + 1) });
977
986
  }
978
987
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thallylabs/mcp",
3
- "version": "0.10.132",
3
+ "version": "0.10.133",
4
4
  "description": "MCP server for managing Thally docs and tracing product changes into evidence-backed updates for human review.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -39,7 +39,7 @@
39
39
  "@anthropic-ai/sdk": "^0.36.0",
40
40
  "@modelcontextprotocol/sdk": "^1.15.0",
41
41
  "@thallylabs/core": "0.2.18",
42
- "create-thally-docs": "0.10.130",
42
+ "create-thally-docs": "0.10.131",
43
43
  "p-limit": "^6.1.0",
44
44
  "yaml": "^2.8.2",
45
45
  "zod": "^3.0.0"