jekyll-component-mcp 0.0.0-stage → 1.0.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 (104) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +21 -0
  3. package/README.md +153 -2
  4. package/dist/config/constants.d.ts +46 -0
  5. package/dist/config/constants.d.ts.map +1 -0
  6. package/dist/config/constants.js +75 -0
  7. package/dist/config/constants.js.map +1 -0
  8. package/dist/config/environment.d.ts +51 -0
  9. package/dist/config/environment.d.ts.map +1 -0
  10. package/dist/config/environment.js +102 -0
  11. package/dist/config/environment.js.map +1 -0
  12. package/dist/index.d.ts +7 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +86 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/parsers/frontmatter-parser.d.ts +19 -0
  17. package/dist/parsers/frontmatter-parser.d.ts.map +1 -0
  18. package/dist/parsers/frontmatter-parser.js +71 -0
  19. package/dist/parsers/frontmatter-parser.js.map +1 -0
  20. package/dist/parsers/liquid-parser.d.ts +33 -0
  21. package/dist/parsers/liquid-parser.d.ts.map +1 -0
  22. package/dist/parsers/liquid-parser.js +98 -0
  23. package/dist/parsers/liquid-parser.js.map +1 -0
  24. package/dist/parsers/project-scanner.d.ts +29 -0
  25. package/dist/parsers/project-scanner.d.ts.map +1 -0
  26. package/dist/parsers/project-scanner.js +194 -0
  27. package/dist/parsers/project-scanner.js.map +1 -0
  28. package/dist/parsers/scss-parser.d.ts +26 -0
  29. package/dist/parsers/scss-parser.d.ts.map +1 -0
  30. package/dist/parsers/scss-parser.js +90 -0
  31. package/dist/parsers/scss-parser.js.map +1 -0
  32. package/dist/security/command-policy.d.ts +21 -0
  33. package/dist/security/command-policy.d.ts.map +1 -0
  34. package/dist/security/command-policy.js +48 -0
  35. package/dist/security/command-policy.js.map +1 -0
  36. package/dist/security/path-policy.d.ts +31 -0
  37. package/dist/security/path-policy.d.ts.map +1 -0
  38. package/dist/security/path-policy.js +127 -0
  39. package/dist/security/path-policy.js.map +1 -0
  40. package/dist/security/validation.d.ts +18 -0
  41. package/dist/security/validation.d.ts.map +1 -0
  42. package/dist/security/validation.js +59 -0
  43. package/dist/security/validation.js.map +1 -0
  44. package/dist/server/context.d.ts +18 -0
  45. package/dist/server/context.d.ts.map +1 -0
  46. package/dist/server/context.js +34 -0
  47. package/dist/server/context.js.map +1 -0
  48. package/dist/server/create-server.d.ts +8 -0
  49. package/dist/server/create-server.d.ts.map +1 -0
  50. package/dist/server/create-server.js +546 -0
  51. package/dist/server/create-server.js.map +1 -0
  52. package/dist/services/build-service.d.ts +27 -0
  53. package/dist/services/build-service.d.ts.map +1 -0
  54. package/dist/services/build-service.js +85 -0
  55. package/dist/services/build-service.js.map +1 -0
  56. package/dist/services/component-service.d.ts +74 -0
  57. package/dist/services/component-service.d.ts.map +1 -0
  58. package/dist/services/component-service.js +422 -0
  59. package/dist/services/component-service.js.map +1 -0
  60. package/dist/services/documentation-service.d.ts +64 -0
  61. package/dist/services/documentation-service.d.ts.map +1 -0
  62. package/dist/services/documentation-service.js +186 -0
  63. package/dist/services/documentation-service.js.map +1 -0
  64. package/dist/services/liquid-service.d.ts +31 -0
  65. package/dist/services/liquid-service.d.ts.map +1 -0
  66. package/dist/services/liquid-service.js +103 -0
  67. package/dist/services/liquid-service.js.map +1 -0
  68. package/dist/services/project-service.d.ts +30 -0
  69. package/dist/services/project-service.d.ts.map +1 -0
  70. package/dist/services/project-service.js +102 -0
  71. package/dist/services/project-service.js.map +1 -0
  72. package/dist/services/scss-service.d.ts +37 -0
  73. package/dist/services/scss-service.d.ts.map +1 -0
  74. package/dist/services/scss-service.js +82 -0
  75. package/dist/services/scss-service.js.map +1 -0
  76. package/dist/services/token-service.d.ts +29 -0
  77. package/dist/services/token-service.d.ts.map +1 -0
  78. package/dist/services/token-service.js +97 -0
  79. package/dist/services/token-service.js.map +1 -0
  80. package/dist/services/validation-service.d.ts +33 -0
  81. package/dist/services/validation-service.d.ts.map +1 -0
  82. package/dist/services/validation-service.js +101 -0
  83. package/dist/services/validation-service.js.map +1 -0
  84. package/dist/utils/filesystem.d.ts +38 -0
  85. package/dist/utils/filesystem.d.ts.map +1 -0
  86. package/dist/utils/filesystem.js +131 -0
  87. package/dist/utils/filesystem.js.map +1 -0
  88. package/dist/utils/json.d.ts +6 -0
  89. package/dist/utils/json.d.ts.map +1 -0
  90. package/dist/utils/json.js +20 -0
  91. package/dist/utils/json.js.map +1 -0
  92. package/dist/utils/logger.d.ts +14 -0
  93. package/dist/utils/logger.d.ts.map +1 -0
  94. package/dist/utils/logger.js +58 -0
  95. package/dist/utils/logger.js.map +1 -0
  96. package/dist/utils/shell.d.ts +23 -0
  97. package/dist/utils/shell.d.ts.map +1 -0
  98. package/dist/utils/shell.js +96 -0
  99. package/dist/utils/shell.js.map +1 -0
  100. package/dist/utils/yaml.d.ts +15 -0
  101. package/dist/utils/yaml.d.ts.map +1 -0
  102. package/dist/utils/yaml.js +34 -0
  103. package/dist/utils/yaml.js.map +1 -0
  104. package/package.json +51 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0
4
+
5
+ ### Added
6
+
7
+ - MCP server for Jekyll component development (stdio transport)
8
+ - Project tools: info, scan, config
9
+ - Component tools: list, get, create, validate, delete
10
+ - SCSS tools: list, get, create
11
+ - Design token tools: list, get, update
12
+ - Liquid tools: include list/get, layout list/get
13
+ - Documentation tools: create, update
14
+ - Validation and build tools
15
+ - Resources: jekyll://project, components, tokens, config, documentation
16
+ - Prompts: component, accessibility, performance, production reviews
17
+ - Security: path sandbox, command allowlist, write modes, dry-run
18
+ - Example Jekyll Component Framework project under `examples/`
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jekyll-component-mcp contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,154 @@
1
- # Temporary Holding Version
1
+ # jekyll-component-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **AI-native development MCP server for Jekyll projects and reusable Liquid/SCSS/JavaScript components.**
4
+
5
+ Production-ready Model Context Protocol (MCP) server that lets AI agents understand, inspect, create, validate, build, and document Jekyll component frameworks.
6
+
7
+ ## Features
8
+
9
+ - **Jekyll-aware tools** — not a generic filesystem wrapper
10
+ - **Component lifecycle** — list, get, create, validate, delete
11
+ - **SCSS + design tokens** — architecture detection and safe updates
12
+ - **Secure by default** — project-root sandbox, allowlisted commands, write modes
13
+ - **Dry-run support** — preview mutations before writing
14
+ - **Resources & prompts** — structured context and review workflows for agents
15
+
16
+ ## Requirements
17
+
18
+ - Node.js 20+
19
+ - A Jekyll project (optional Gemfile / Bundler)
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install -g jekyll-component-mcp
25
+ # or use locally
26
+ npx jekyll-component-mcp --root /path/to/jekyll-project
27
+ ```
28
+
29
+ ## Quick start
30
+
31
+ ```bash
32
+ # From your Jekyll project root
33
+ jekyll-component-mcp --root .
34
+
35
+ # Or via environment
36
+ JEKYLL_PROJECT_ROOT=/path/to/project jekyll-component-mcp
37
+ ```
38
+
39
+ ### MCP Inspector
40
+
41
+ ```bash
42
+ npm run build
43
+ npx @modelcontextprotocol/inspector node dist/index.js --root /path/to/jekyll-project
44
+ ```
45
+
46
+ ## Write modes
47
+
48
+ | Mode | Create / Update | Delete / Destructive |
49
+ |-------------|-----------------|----------------------|
50
+ | `read-only` | ❌ | ❌ |
51
+ | `safe-write` (default) | ✅ | ❌ |
52
+ | `full-write`| ✅ | ✅ (requires `confirm: true`) |
53
+
54
+ ## CLI options
55
+
56
+ ```
57
+ --root <path> Project root
58
+ --readonly read-only mode
59
+ --safe-write safe-write mode (default)
60
+ --full-write full-write mode
61
+ --timeout <ms> Build timeout (default 120000)
62
+ --max-file-size <bytes> Max file size (default 2MiB)
63
+ --debug Debug logging to stderr
64
+ ```
65
+
66
+ ## Configuration file
67
+
68
+ Optional `.jekyll-mcp.json` in the project root:
69
+
70
+ ```json
71
+ {
72
+ "root": ".",
73
+ "writeMode": "safe-write",
74
+ "build": {
75
+ "command": "bundle exec jekyll build",
76
+ "timeout": 120000
77
+ },
78
+ "paths": {
79
+ "components": "_includes/components",
80
+ "scss": "assets/scss",
81
+ "docs": "docs",
82
+ "layouts": "_layouts"
83
+ }
84
+ }
85
+ ```
86
+
87
+ ## Tools (overview)
88
+
89
+ | Tool | Purpose |
90
+ |------|---------|
91
+ | `jekyll_project_info` | High-level project summary |
92
+ | `jekyll_project_scan` | Full architecture map |
93
+ | `jekyll_config_get` | Sanitized config |
94
+ | `jekyll_component_list` | List components |
95
+ | `jekyll_component_get` | Component details + sources |
96
+ | `jekyll_component_create` | Create component + SCSS + docs |
97
+ | `jekyll_component_validate` | Structured validation |
98
+ | `jekyll_component_delete` | Destructive delete (full-write + confirm) |
99
+ | `jekyll_build` | Run Jekyll build |
100
+ | `jekyll_doctor` | Run jekyll doctor |
101
+
102
+ ## Resources
103
+
104
+ - `jekyll://project`
105
+ - `jekyll://components`
106
+ - `jekyll://config`
107
+
108
+ ## Prompts
109
+
110
+ - `jekyll_component_review`
111
+ - `jekyll_accessibility_review`
112
+ - `jekyll_performance_review`
113
+ - `jekyll_production_review`
114
+
115
+ ## Security
116
+
117
+ - **Filesystem sandbox**: every path is resolved under the project root; traversal and symlink escapes are rejected.
118
+ - **Command allowlist**: only `jekyll build|clean|doctor` (and `bundle exec` variants). No arbitrary shell.
119
+ - **Write policy**: configurable; destructive ops require `full-write` + `confirm: true`.
120
+ - **Secrets**: config reads redact common secret keys; process output is scrubbed.
121
+ - **stdio**: stdout is reserved for MCP JSON-RPC; all logs go to stderr.
122
+
123
+ ## Client configuration examples
124
+
125
+ ### Claude Desktop / Claude Code
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "jekyll-component": {
131
+ "command": "npx",
132
+ "args": ["-y", "jekyll-component-mcp", "--root", "/path/to/jekyll-project"]
133
+ }
134
+ }
135
+ }
136
+ ```
137
+
138
+ ### Cursor / VS Code
139
+
140
+ Add an MCP server entry pointing at `node /path/to/jekyll-component-mcp/dist/index.js` with `--root` args as needed.
141
+
142
+ ## Development
143
+
144
+ ```bash
145
+ npm install
146
+ npm run typecheck
147
+ npm run build
148
+ npm test
149
+ npm run dev -- --root ./examples/jekyll-component-framework
150
+ ```
151
+
152
+ ## License
153
+
154
+ MIT
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Project-wide constants for jekyll-component-mcp.
3
+ */
4
+ export declare const PACKAGE_NAME = "jekyll-component-mcp";
5
+ export declare const PACKAGE_VERSION = "1.0.0";
6
+ /** Default write policy when none is specified. */
7
+ export declare const DEFAULT_WRITE_MODE: "safe-write";
8
+ /** Default Jekyll build timeout in milliseconds. */
9
+ export declare const DEFAULT_BUILD_TIMEOUT_MS = 120000;
10
+ /** Default maximum readable/writable file size in bytes (2 MiB). */
11
+ export declare const DEFAULT_MAX_FILE_SIZE: number;
12
+ /** Default maximum directory scan depth. */
13
+ export declare const DEFAULT_MAX_SCAN_DEPTH = 12;
14
+ /** Allowed write modes. */
15
+ export declare const WRITE_MODES: readonly ["read-only", "safe-write", "full-write"];
16
+ export type WriteMode = (typeof WRITE_MODES)[number];
17
+ /** Default framework path conventions (detected/adapted at runtime). */
18
+ export declare const DEFAULT_PATHS: {
19
+ readonly components: "_includes/components";
20
+ readonly sections: "_includes/sections";
21
+ readonly layouts: "_layouts";
22
+ readonly includes: "_includes";
23
+ readonly scss: "assets/scss";
24
+ readonly scssComponents: "assets/scss/components";
25
+ readonly scssSections: "assets/scss/sections";
26
+ readonly js: "assets/js";
27
+ readonly jsComponents: "assets/js/components";
28
+ readonly docs: "docs";
29
+ readonly docsComponents: "docs/components";
30
+ readonly examples: "examples";
31
+ readonly examplesComponents: "examples/components";
32
+ readonly data: "_data";
33
+ readonly posts: "_posts";
34
+ readonly sass: "_sass";
35
+ readonly assets: "assets";
36
+ readonly site: "_site";
37
+ };
38
+ /** Commands that are always allowed (allowlisted). */
39
+ export declare const ALLOWED_BUILD_COMMANDS: readonly ["jekyll build", "jekyll clean", "jekyll doctor", "bundle exec jekyll build", "bundle exec jekyll clean", "bundle exec jekyll doctor"];
40
+ /** Forbidden command tokens (hard deny). */
41
+ export declare const FORBIDDEN_COMMAND_TOKENS: readonly ["rm", "sudo", "curl", "wget", "bash", "sh", "powershell", "cmd", "eval", "exec", "chmod", "chown", "dd", "mkfs", ">", ">>", "|", ";", "&&", "||", "`", "$("];
42
+ /** Component name pattern: kebab-case, starts with letter. */
43
+ export declare const COMPONENT_NAME_REGEX: RegExp;
44
+ /** Maximum component name length. */
45
+ export declare const MAX_COMPONENT_NAME_LENGTH = 64;
46
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY,yBAAyB,CAAC;AACnD,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC,mDAAmD;AACnD,eAAO,MAAM,kBAAkB,EAAG,YAAqB,CAAC;AAExD,oDAAoD;AACpD,eAAO,MAAM,wBAAwB,SAAU,CAAC;AAEhD,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,QAAkB,CAAC;AAErD,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,2BAA2B;AAC3B,eAAO,MAAM,WAAW,oDAAqD,CAAC;AAC9E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,wEAAwE;AACxE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CAmBhB,CAAC;AAEX,sDAAsD;AACtD,eAAO,MAAM,sBAAsB,iJAOzB,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,wBAAwB,wKAuB3B,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,QAAkC,CAAC;AAEpE,qCAAqC;AACrC,eAAO,MAAM,yBAAyB,KAAK,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Project-wide constants for jekyll-component-mcp.
3
+ */
4
+ export const PACKAGE_NAME = "jekyll-component-mcp";
5
+ export const PACKAGE_VERSION = "1.0.0";
6
+ /** Default write policy when none is specified. */
7
+ export const DEFAULT_WRITE_MODE = "safe-write";
8
+ /** Default Jekyll build timeout in milliseconds. */
9
+ export const DEFAULT_BUILD_TIMEOUT_MS = 120_000;
10
+ /** Default maximum readable/writable file size in bytes (2 MiB). */
11
+ export const DEFAULT_MAX_FILE_SIZE = 2 * 1024 * 1024;
12
+ /** Default maximum directory scan depth. */
13
+ export const DEFAULT_MAX_SCAN_DEPTH = 12;
14
+ /** Allowed write modes. */
15
+ export const WRITE_MODES = ["read-only", "safe-write", "full-write"];
16
+ /** Default framework path conventions (detected/adapted at runtime). */
17
+ export const DEFAULT_PATHS = {
18
+ components: "_includes/components",
19
+ sections: "_includes/sections",
20
+ layouts: "_layouts",
21
+ includes: "_includes",
22
+ scss: "assets/scss",
23
+ scssComponents: "assets/scss/components",
24
+ scssSections: "assets/scss/sections",
25
+ js: "assets/js",
26
+ jsComponents: "assets/js/components",
27
+ docs: "docs",
28
+ docsComponents: "docs/components",
29
+ examples: "examples",
30
+ examplesComponents: "examples/components",
31
+ data: "_data",
32
+ posts: "_posts",
33
+ sass: "_sass",
34
+ assets: "assets",
35
+ site: "_site",
36
+ };
37
+ /** Commands that are always allowed (allowlisted). */
38
+ export const ALLOWED_BUILD_COMMANDS = [
39
+ "jekyll build",
40
+ "jekyll clean",
41
+ "jekyll doctor",
42
+ "bundle exec jekyll build",
43
+ "bundle exec jekyll clean",
44
+ "bundle exec jekyll doctor",
45
+ ];
46
+ /** Forbidden command tokens (hard deny). */
47
+ export const FORBIDDEN_COMMAND_TOKENS = [
48
+ "rm",
49
+ "sudo",
50
+ "curl",
51
+ "wget",
52
+ "bash",
53
+ "sh",
54
+ "powershell",
55
+ "cmd",
56
+ "eval",
57
+ "exec",
58
+ "chmod",
59
+ "chown",
60
+ "dd",
61
+ "mkfs",
62
+ ">",
63
+ ">>",
64
+ "|",
65
+ ";",
66
+ "&&",
67
+ "||",
68
+ "`",
69
+ "$(",
70
+ ];
71
+ /** Component name pattern: kebab-case, starts with letter. */
72
+ export const COMPONENT_NAME_REGEX = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
73
+ /** Maximum component name length. */
74
+ export const MAX_COMPONENT_NAME_LENGTH = 64;
75
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,OA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,OAAO;IACP,OAAO;IACP,IAAI;IACJ,MAAM;IACN,GAAG;IACH,IAAI;IACJ,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;CACI,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,+BAA+B,CAAC;AAEpE,qCAAqC;AACrC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Runtime configuration: CLI flags, env vars, optional .jekyll-mcp.json
3
+ */
4
+ import { DEFAULT_PATHS, type WriteMode } from "./constants.js";
5
+ export interface BuildConfig {
6
+ command: string;
7
+ timeout: number;
8
+ }
9
+ export interface PathOverrides {
10
+ components?: string;
11
+ sections?: string;
12
+ layouts?: string;
13
+ includes?: string;
14
+ scss?: string;
15
+ scssComponents?: string;
16
+ scssSections?: string;
17
+ js?: string;
18
+ jsComponents?: string;
19
+ docs?: string;
20
+ docsComponents?: string;
21
+ examples?: string;
22
+ examplesComponents?: string;
23
+ data?: string;
24
+ posts?: string;
25
+ sass?: string;
26
+ assets?: string;
27
+ site?: string;
28
+ }
29
+ export interface McpConfig {
30
+ root: string;
31
+ writeMode: WriteMode;
32
+ build: BuildConfig;
33
+ paths: typeof DEFAULT_PATHS & PathOverrides;
34
+ maxFileSize: number;
35
+ maxScanDepth: number;
36
+ debug: boolean;
37
+ allowPackageManager: boolean;
38
+ }
39
+ export interface CliOptions {
40
+ root?: string;
41
+ writeMode?: WriteMode;
42
+ timeout?: number;
43
+ maxFileSize?: number;
44
+ debug?: boolean;
45
+ allowPackageManager?: boolean;
46
+ }
47
+ /**
48
+ * Resolve full runtime configuration from CLI, env, and optional config file.
49
+ */
50
+ export declare function resolveConfig(cli?: CliOptions): McpConfig;
51
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"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AAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAgCD;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,GAAE,UAAe,GAAG,SAAS,CA4E7D"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Runtime configuration: CLI flags, env vars, optional .jekyll-mcp.json
3
+ */
4
+ import fs from "node:fs";
5
+ import path from "node:path";
6
+ import { parse as parseYaml } from "yaml"; // yaml package also handles JSON-ish
7
+ import { DEFAULT_BUILD_TIMEOUT_MS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_SCAN_DEPTH, DEFAULT_PATHS, DEFAULT_WRITE_MODE, WRITE_MODES, } from "./constants.js";
8
+ import { resolveProjectRoot } from "../security/path-policy.js";
9
+ import { logger } from "../utils/logger.js";
10
+ function loadConfigFile(root) {
11
+ const candidates = [
12
+ path.join(root, ".jekyll-mcp.json"),
13
+ path.join(root, ".jekyll-mcp.yaml"),
14
+ path.join(root, ".jekyll-mcp.yml"),
15
+ ];
16
+ for (const file of candidates) {
17
+ if (!fs.existsSync(file))
18
+ continue;
19
+ try {
20
+ const raw = fs.readFileSync(file, "utf8");
21
+ const data = file.endsWith(".json")
22
+ ? JSON.parse(raw)
23
+ : parseYaml(raw);
24
+ logger.debug("Loaded config file", { file });
25
+ return data;
26
+ }
27
+ catch (err) {
28
+ logger.warn("Failed to parse config file", { file, error: String(err) });
29
+ }
30
+ }
31
+ return {};
32
+ }
33
+ function parseWriteMode(value) {
34
+ if (typeof value === "string" && WRITE_MODES.includes(value)) {
35
+ return value;
36
+ }
37
+ return undefined;
38
+ }
39
+ /**
40
+ * Resolve full runtime configuration from CLI, env, and optional config file.
41
+ */
42
+ export function resolveConfig(cli = {}) {
43
+ // Root resolution priority: CLI > env > config file (later) > cwd
44
+ let rootCandidate = cli.root ??
45
+ process.env.JEKYLL_PROJECT_ROOT ??
46
+ process.env.JEKYLL_COMPONENT_MCP_ROOT ??
47
+ process.cwd();
48
+ // First pass: resolve root so we can load config file from it
49
+ let root = resolveProjectRoot(rootCandidate);
50
+ const fileConfig = loadConfigFile(root);
51
+ // If config file specifies a different root, re-resolve
52
+ if (fileConfig.root && fileConfig.root !== "." && fileConfig.root !== rootCandidate) {
53
+ const fromFile = path.isAbsolute(fileConfig.root)
54
+ ? fileConfig.root
55
+ : path.resolve(root, fileConfig.root);
56
+ root = resolveProjectRoot(fromFile);
57
+ }
58
+ const writeMode = cli.writeMode ??
59
+ parseWriteMode(process.env.JEKYLL_MCP_WRITE_MODE) ??
60
+ parseWriteMode(fileConfig.writeMode) ??
61
+ DEFAULT_WRITE_MODE;
62
+ const timeout = cli.timeout ??
63
+ (process.env.JEKYLL_MCP_BUILD_TIMEOUT
64
+ ? Number(process.env.JEKYLL_MCP_BUILD_TIMEOUT)
65
+ : undefined) ??
66
+ fileConfig.build?.timeout ??
67
+ DEFAULT_BUILD_TIMEOUT_MS;
68
+ const maxFileSize = cli.maxFileSize ??
69
+ (process.env.JEKYLL_MCP_MAX_FILE_SIZE
70
+ ? Number(process.env.JEKYLL_MCP_MAX_FILE_SIZE)
71
+ : undefined) ??
72
+ fileConfig.maxFileSize ??
73
+ DEFAULT_MAX_FILE_SIZE;
74
+ const debug = cli.debug === true ||
75
+ process.env.JEKYLL_MCP_DEBUG === "1" ||
76
+ process.env.JEKYLL_MCP_DEBUG === "true" ||
77
+ fileConfig.debug === true;
78
+ const allowPackageManager = cli.allowPackageManager === true ||
79
+ process.env.JEKYLL_MCP_ALLOW_PM === "1" ||
80
+ fileConfig.allowPackageManager === true;
81
+ const paths = {
82
+ ...DEFAULT_PATHS,
83
+ ...(fileConfig.paths ?? {}),
84
+ };
85
+ const buildCommand = fileConfig.build?.command ??
86
+ process.env.JEKYLL_MCP_BUILD_COMMAND ??
87
+ "bundle exec jekyll build";
88
+ return {
89
+ root,
90
+ writeMode,
91
+ build: {
92
+ command: buildCommand,
93
+ timeout: Number.isFinite(timeout) && timeout > 0 ? timeout : DEFAULT_BUILD_TIMEOUT_MS,
94
+ },
95
+ paths,
96
+ maxFileSize: Number.isFinite(maxFileSize) && maxFileSize > 0 ? maxFileSize : DEFAULT_MAX_FILE_SIZE,
97
+ maxScanDepth: fileConfig.maxScanDepth ?? DEFAULT_MAX_SCAN_DEPTH,
98
+ debug,
99
+ allowPackageManager,
100
+ };
101
+ }
102
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC,CAAC,qCAAqC;AAChF,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,WAAW,GAEZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAgD5C,SAAS,cAAc,CAAC,IAAY;IAClC,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,iBAAiB,CAAC;KACnC,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,SAAS;QACnC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,I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AAa;QAChB,GAAG,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC;KAC5B,CAAC;IAEF,MAAM,YAAY,GAChB,UAAU,CAAC,KAAK,EAAE,OAAO;QACzB,OAAO,CAAC,GAAG,CAAC,wBAAwB;QACpC,0BAA0B,CAAC;IAE7B,OAAO;QACL,IAAI;QACJ,SAAS;QACT,KAAK,EAAE;YACL,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB;SACtF;QACD,KAAK;QACL,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,qBAAqB;QAClG,YAAY,EAAE,UAAU,CAAC,YAAY,IAAI,sBAAsB;QAC/D,KAAK;QACL,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * jekyll-component-mcp entry point.
4
+ * stdout is reserved for MCP JSON-RPC. All logging goes to stderr.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG"}
package/dist/index.js ADDED
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * jekyll-component-mcp entry point.
4
+ * stdout is reserved for MCP JSON-RPC. All logging goes to stderr.
5
+ */
6
+ import { serveStdio } from "@modelcontextprotocol/server/stdio";
7
+ import { resolveConfig } from "./config/environment.js";
8
+ import { createContext } from "./server/context.js";
9
+ import { createServer } from "./server/create-server.js";
10
+ import { setLogLevel, logger } from "./utils/logger.js";
11
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "./config/constants.js";
12
+ function parseArgs(argv) {
13
+ const opts = {};
14
+ for (let i = 0; i < argv.length; i++) {
15
+ const a = argv[i];
16
+ if (a === "--root" && argv[i + 1]) {
17
+ opts.root = argv[++i];
18
+ }
19
+ else if (a === "--readonly" || a === "--read-only") {
20
+ opts.writeMode = "read-only";
21
+ }
22
+ else if (a === "--safe-write") {
23
+ opts.writeMode = "safe-write";
24
+ }
25
+ else if (a === "--full-write") {
26
+ opts.writeMode = "full-write";
27
+ }
28
+ else if (a === "--timeout" && argv[i + 1]) {
29
+ opts.timeout = Number(argv[++i]);
30
+ }
31
+ else if (a === "--max-file-size" && argv[i + 1]) {
32
+ opts.maxFileSize = Number(argv[++i]);
33
+ }
34
+ else if (a === "--debug") {
35
+ opts.debug = true;
36
+ }
37
+ else if (a === "--allow-package-manager") {
38
+ opts.allowPackageManager = true;
39
+ }
40
+ else if (a === "--help" || a === "-h") {
41
+ console.error(`
42
+ ${PACKAGE_NAME} v${PACKAGE_VERSION}
43
+
44
+ AI-native MCP server for Jekyll projects and reusable Liquid/SCSS/JS components.
45
+
46
+ Usage:
47
+ jekyll-component-mcp [options]
48
+
49
+ Options:
50
+ --root <path> Project root (or set JEKYLL_PROJECT_ROOT)
51
+ --readonly Write mode: read-only
52
+ --safe-write Write mode: safe-write (default)
53
+ --full-write Write mode: full-write (allows destructive ops)
54
+ --timeout <ms> Build timeout in milliseconds (default 120000)
55
+ --max-file-size <bytes> Max file size for read/write (default 2MiB)
56
+ --debug Enable debug logging to stderr
57
+ --allow-package-manager Allow package-manager commands when implemented
58
+ -h, --help Show this help
59
+
60
+ Security:
61
+ All filesystem access is sandboxed to the project root.
62
+ Commands are allowlisted (jekyll build/clean/doctor only).
63
+ Destructive operations require full-write mode and confirm: true.
64
+ `);
65
+ process.exit(0);
66
+ }
67
+ }
68
+ return opts;
69
+ }
70
+ function main() {
71
+ const cli = parseArgs(process.argv.slice(2));
72
+ const config = resolveConfig(cli);
73
+ if (config.debug) {
74
+ setLogLevel("debug");
75
+ }
76
+ logger.info(`${PACKAGE_NAME} v${PACKAGE_VERSION} starting`, {
77
+ root: config.root,
78
+ writeMode: config.writeMode,
79
+ buildTimeout: config.build.timeout,
80
+ });
81
+ const ctx = createContext(config);
82
+ // serveStdio owns the transport; factory creates a fresh server per connection
83
+ void serveStdio(() => createServer(ctx));
84
+ }
85
+ main();
86
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAmB,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEtE,SAAS,SAAS,CAAC,IAAc;IAC/B,MAAM,IAAI,GAAe,EAAE,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QACxB,CAAC;aAAM,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,KAAK,aAAa,EAAE,CAAC;YACrD,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC;QAC/B,CAAC;aAAM,IAAI,CAAC,KAAK,cAAc,EAAE,CAAC;YAChC,IAAI,CAAC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AAM,CAAC,IAAI,CAAC,GAAG,YAAY,KAAK,eAAe,WAAW,EAAE;QAC1D,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;KACnC,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAElC,+EAA+E;IAC/E,KAAK,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Front matter validation and parsing for Jekyll documents.
3
+ */
4
+ export interface FrontMatterIssue {
5
+ field: string;
6
+ level: "error" | "warning";
7
+ message: string;
8
+ }
9
+ export interface FrontMatterResult {
10
+ data: Record<string, unknown>;
11
+ content: string;
12
+ issues: FrontMatterIssue[];
13
+ valid: boolean;
14
+ }
15
+ /**
16
+ * Validate front matter. Prefer warnings over hard errors for optional fields.
17
+ */
18
+ export declare function validateFrontMatter(source: string): FrontMatterResult;
19
+ //# sourceMappingURL=frontmatter-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontmatter-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/frontmatter-parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;CAChB;AAsBD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CA+CrE"}