jekyll-component-mcp 0.0.0-stage → 1.0.2
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/.github/skills/.gitkeep +0 -0
- package/.github/skills/jekyll-component-mcp/SKILL.md +98 -0
- package/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +167 -2
- package/dist/config/constants.d.ts +46 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +75 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/environment.d.ts +51 -0
- package/dist/config/environment.d.ts.map +1 -0
- package/dist/config/environment.js +102 -0
- package/dist/config/environment.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/frontmatter-parser.d.ts +19 -0
- package/dist/parsers/frontmatter-parser.d.ts.map +1 -0
- package/dist/parsers/frontmatter-parser.js +71 -0
- package/dist/parsers/frontmatter-parser.js.map +1 -0
- package/dist/parsers/liquid-parser.d.ts +33 -0
- package/dist/parsers/liquid-parser.d.ts.map +1 -0
- package/dist/parsers/liquid-parser.js +98 -0
- package/dist/parsers/liquid-parser.js.map +1 -0
- package/dist/parsers/project-scanner.d.ts +29 -0
- package/dist/parsers/project-scanner.d.ts.map +1 -0
- package/dist/parsers/project-scanner.js +194 -0
- package/dist/parsers/project-scanner.js.map +1 -0
- package/dist/parsers/scss-parser.d.ts +26 -0
- package/dist/parsers/scss-parser.d.ts.map +1 -0
- package/dist/parsers/scss-parser.js +90 -0
- package/dist/parsers/scss-parser.js.map +1 -0
- package/dist/security/command-policy.d.ts +21 -0
- package/dist/security/command-policy.d.ts.map +1 -0
- package/dist/security/command-policy.js +48 -0
- package/dist/security/command-policy.js.map +1 -0
- package/dist/security/path-policy.d.ts +31 -0
- package/dist/security/path-policy.d.ts.map +1 -0
- package/dist/security/path-policy.js +127 -0
- package/dist/security/path-policy.js.map +1 -0
- package/dist/security/validation.d.ts +18 -0
- package/dist/security/validation.d.ts.map +1 -0
- package/dist/security/validation.js +59 -0
- package/dist/security/validation.js.map +1 -0
- package/dist/server/context.d.ts +18 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +34 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/create-server.d.ts +8 -0
- package/dist/server/create-server.d.ts.map +1 -0
- package/dist/server/create-server.js +546 -0
- package/dist/server/create-server.js.map +1 -0
- package/dist/services/build-service.d.ts +27 -0
- package/dist/services/build-service.d.ts.map +1 -0
- package/dist/services/build-service.js +85 -0
- package/dist/services/build-service.js.map +1 -0
- package/dist/services/component-service.d.ts +74 -0
- package/dist/services/component-service.d.ts.map +1 -0
- package/dist/services/component-service.js +422 -0
- package/dist/services/component-service.js.map +1 -0
- package/dist/services/documentation-service.d.ts +64 -0
- package/dist/services/documentation-service.d.ts.map +1 -0
- package/dist/services/documentation-service.js +186 -0
- package/dist/services/documentation-service.js.map +1 -0
- package/dist/services/liquid-service.d.ts +31 -0
- package/dist/services/liquid-service.d.ts.map +1 -0
- package/dist/services/liquid-service.js +103 -0
- package/dist/services/liquid-service.js.map +1 -0
- package/dist/services/project-service.d.ts +30 -0
- package/dist/services/project-service.d.ts.map +1 -0
- package/dist/services/project-service.js +102 -0
- package/dist/services/project-service.js.map +1 -0
- package/dist/services/scss-service.d.ts +37 -0
- package/dist/services/scss-service.d.ts.map +1 -0
- package/dist/services/scss-service.js +82 -0
- package/dist/services/scss-service.js.map +1 -0
- package/dist/services/token-service.d.ts +29 -0
- package/dist/services/token-service.d.ts.map +1 -0
- package/dist/services/token-service.js +97 -0
- package/dist/services/token-service.js.map +1 -0
- package/dist/services/validation-service.d.ts +33 -0
- package/dist/services/validation-service.d.ts.map +1 -0
- package/dist/services/validation-service.js +101 -0
- package/dist/services/validation-service.js.map +1 -0
- package/dist/utils/filesystem.d.ts +38 -0
- package/dist/utils/filesystem.d.ts.map +1 -0
- package/dist/utils/filesystem.js +131 -0
- package/dist/utils/filesystem.js.map +1 -0
- package/dist/utils/json.d.ts +6 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +20 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +58 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/shell.d.ts +23 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +96 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/yaml.d.ts +15 -0
- package/dist/utils/yaml.d.ts.map +1 -0
- package/dist/utils/yaml.js +34 -0
- package/dist/utils/yaml.js.map +1 -0
- package/package.json +65 -4
- package/skills/SKILL.md +98 -0
|
File without changes
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jekyll-component-mcp
|
|
3
|
+
description: Install, configure, and use the jekyll-component-mcp MCP server with Jekyll projects. Use when setting up the server or inspecting, creating, validating, documenting, or building reusable Jekyll Liquid/SCSS components.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Jekyll Component MCP
|
|
7
|
+
|
|
8
|
+
Use this skill to set up `jekyll-component-mcp` as an MCP server and operate it safely in a Jekyll project.
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
- Node.js 20 or newer.
|
|
13
|
+
- An MCP-compatible client such as Claude Desktop, Claude Code, Cursor, or VS Code.
|
|
14
|
+
- A Jekyll project directory to use as the server's project root. Ruby/Bundler and Jekyll are only needed for build and doctor operations.
|
|
15
|
+
|
|
16
|
+
The package is an MCP server, not a Jekyll theme or a runtime dependency for the site. Install it globally or let the MCP client run it with `npx`.
|
|
17
|
+
|
|
18
|
+
## Install and configure
|
|
19
|
+
|
|
20
|
+
For a global CLI installation:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install --global jekyll-component-mcp
|
|
24
|
+
jekyll-component-mcp --root /absolute/path/to/jekyll-project
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For an MCP client that launches stdio servers with `npx`, configure:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"jekyll-component": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "jekyll-component-mcp", "--root", "/absolute/path/to/jekyll-project"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Replace the root with the actual Jekyll project path. For VS Code, use the client's MCP server configuration and its workspace-folder variable when available. Alternatively set `JEKYLL_PROJECT_ROOT` or `JEKYLL_COMPONENT_MCP_ROOT`; CLI `--root` takes precedence.
|
|
41
|
+
|
|
42
|
+
To run a local checkout during development, use `npm install`, `npm run build`, then configure the client to launch `node /absolute/path/to/jekyll-component-mcp/dist/index.js` with `--root` and the project path as arguments.
|
|
43
|
+
|
|
44
|
+
## Safe operating workflow
|
|
45
|
+
|
|
46
|
+
1. Confirm the MCP server is connected and its `jekyll_*` tools are available. If not, check Node.js 20+, the configured package command, and that the project root exists.
|
|
47
|
+
2. Start with `jekyll_project_info`. Use `jekyll_project_scan` when file locations or architecture matter. Use `jekyll_config_get` for site configuration; secrets are redacted.
|
|
48
|
+
3. Before changing an existing component, inspect it with `jekyll_component_list` and `jekyll_component_get`. Inspect SCSS with `jekyll_scss_list` / `jekyll_scss_get`, tokens with `jekyll_token_list` / `jekyll_token_get`, and Liquid includes or layouts with their corresponding list/get tools.
|
|
49
|
+
4. Match the repository's existing component, naming, Liquid, SCSS, and documentation conventions. Do not assume default paths when scan results are available.
|
|
50
|
+
5. For requested writes, use the smallest relevant tool. Preview supported mutations with `dry_run: true`, review the reported operations, then run with `dry_run: false` or omit `dry_run` to apply them. Clearly report when the configured write mode prevents a change.
|
|
51
|
+
6. After changes, run `jekyll_component_validate` for a component and/or `jekyll_validate`. If the project has the needed Ruby/Jekyll environment, run `jekyll_build` to verify the site.
|
|
52
|
+
|
|
53
|
+
## Tool reference
|
|
54
|
+
|
|
55
|
+
| Task | MCP tools |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| Project overview and structure | `jekyll_project_info`, `jekyll_project_scan`, `jekyll_config_get` |
|
|
58
|
+
| Components | `jekyll_component_list`, `jekyll_component_get`, `jekyll_component_create`, `jekyll_component_validate`, `jekyll_component_delete` |
|
|
59
|
+
| SCSS and design tokens | `jekyll_scss_list`, `jekyll_scss_get`, `jekyll_scss_create`, `jekyll_token_list`, `jekyll_token_get`, `jekyll_token_update` |
|
|
60
|
+
| Liquid includes and layouts | `jekyll_include_list`, `jekyll_include_get`, `jekyll_layout_list`, `jekyll_layout_get` |
|
|
61
|
+
| Documentation | `jekyll_docs_create`, `jekyll_docs_update` |
|
|
62
|
+
| Validation and build | `jekyll_validate`, `jekyll_build`, `jekyll_doctor` |
|
|
63
|
+
|
|
64
|
+
For component creation, `jekyll_component_create` accepts `name`, optional `category`, `variants`, `javascript`, `documentation`, `example`, and `dry_run`. Prefer this tool over separate file creation when the user asks for a reusable component; it scaffolds the Liquid component and associated assets/docs/examples.
|
|
65
|
+
|
|
66
|
+
Use the review prompts when supported by the MCP client: `jekyll_component_review`, `jekyll_accessibility_review`, `jekyll_performance_review`, and `jekyll_production_review`. Available resources include `jekyll://project`, `jekyll://components`, `jekyll://tokens`, `jekyll://config`, and `jekyll://documentation`.
|
|
67
|
+
|
|
68
|
+
## Write and security rules
|
|
69
|
+
|
|
70
|
+
- The default mode is `safe-write`: creates and updates are allowed; destructive operations are not. `read-only` disables writes. `full-write` allows destructive operations only when the tool also receives `confirm: true`.
|
|
71
|
+
- Never call `jekyll_component_delete` unless the user explicitly requested deletion and confirms the target component. The tool requires both `full-write` mode and `confirm: true`; do not change modes just to bypass this safeguard.
|
|
72
|
+
- Use `dry_run` for supported mutating tools before applying a non-trivial change. A dry run is a preview, not an applied change.
|
|
73
|
+
- Keep paths relative to or within the configured project root. The server rejects traversal and symlink escapes; do not try to bypass those checks.
|
|
74
|
+
- Build commands are allowlisted to Jekyll build/clean/doctor and supported `bundle exec` variants. Do not treat this server as an arbitrary shell or file-access tool.
|
|
75
|
+
- Do not claim a change or build succeeded unless the tool result confirms it. Surface validation errors and warnings accurately.
|
|
76
|
+
|
|
77
|
+
## Common configuration
|
|
78
|
+
|
|
79
|
+
An optional `.jekyll-mcp.json` in the project root can set the root, write mode, build command/timeout, and project paths:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"root": ".",
|
|
84
|
+
"writeMode": "safe-write",
|
|
85
|
+
"build": {
|
|
86
|
+
"command": "bundle exec jekyll build",
|
|
87
|
+
"timeout": 120000
|
|
88
|
+
},
|
|
89
|
+
"paths": {
|
|
90
|
+
"components": "_includes/components",
|
|
91
|
+
"scss": "assets/scss",
|
|
92
|
+
"docs": "docs",
|
|
93
|
+
"layouts": "_layouts"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The server also accepts `--readonly`, `--safe-write`, `--full-write`, `--timeout <ms>`, `--max-file-size <bytes>`, and `--debug` CLI options. Prefer the default `safe-write` mode unless the user has a specific need for another mode.
|
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,168 @@
|
|
|
1
|
-
#
|
|
1
|
+
# jekyll-component-mcp
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
## AI Skill
|
|
30
|
+
|
|
31
|
+
The package includes a skill with instructions for AI agents to install, configure, and use this MCP server. After the package is published, share this URL with an AI agent that can access web links:
|
|
32
|
+
|
|
33
|
+
<https://unpkg.com/jekyll-component-mcp@latest/skills/SKILL.md>
|
|
34
|
+
|
|
35
|
+
For repeatable instructions, replace `latest` with a published version, for example `@1.0.0`. You can ask the agent: "Read and follow this skill to set up and use jekyll-component-mcp: [skill URL]".
|
|
36
|
+
|
|
37
|
+
## Automated npm publishing
|
|
38
|
+
|
|
39
|
+
The GitHub Actions workflow publishes to npm when a version tag is pushed. Before the first release, configure npm Trusted Publishing for this GitHub repository and the `.github/workflows/publish-npm.yml` workflow. The workflow uses OIDC and does not require an npm token secret.
|
|
40
|
+
|
|
41
|
+
To publish a release, update the package version, commit the change, then push a matching tag such as `v1.0.2`. The workflow checks that the tag matches `package.json`, runs typecheck, tests, and build, then publishes the package with provenance.
|
|
42
|
+
|
|
43
|
+
## Quick start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# From your Jekyll project root
|
|
47
|
+
jekyll-component-mcp --root .
|
|
48
|
+
|
|
49
|
+
# Or via environment
|
|
50
|
+
JEKYLL_PROJECT_ROOT=/path/to/project jekyll-component-mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### MCP Inspector
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm run build
|
|
57
|
+
npx @modelcontextprotocol/inspector node dist/index.js --root /path/to/jekyll-project
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Write modes
|
|
61
|
+
|
|
62
|
+
| Mode | Create / Update | Delete / Destructive |
|
|
63
|
+
|-------------|-----------------|----------------------|
|
|
64
|
+
| `read-only` | ❌ | ❌ |
|
|
65
|
+
| `safe-write` (default) | ✅ | ❌ |
|
|
66
|
+
| `full-write`| ✅ | ✅ (requires `confirm: true`) |
|
|
67
|
+
|
|
68
|
+
## CLI options
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
--root <path> Project root
|
|
72
|
+
--readonly read-only mode
|
|
73
|
+
--safe-write safe-write mode (default)
|
|
74
|
+
--full-write full-write mode
|
|
75
|
+
--timeout <ms> Build timeout (default 120000)
|
|
76
|
+
--max-file-size <bytes> Max file size (default 2MiB)
|
|
77
|
+
--debug Debug logging to stderr
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Configuration file
|
|
81
|
+
|
|
82
|
+
Optional `.jekyll-mcp.json` in the project root:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"root": ".",
|
|
87
|
+
"writeMode": "safe-write",
|
|
88
|
+
"build": {
|
|
89
|
+
"command": "bundle exec jekyll build",
|
|
90
|
+
"timeout": 120000
|
|
91
|
+
},
|
|
92
|
+
"paths": {
|
|
93
|
+
"components": "_includes/components",
|
|
94
|
+
"scss": "assets/scss",
|
|
95
|
+
"docs": "docs",
|
|
96
|
+
"layouts": "_layouts"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Tools (overview)
|
|
102
|
+
|
|
103
|
+
| Tool | Purpose |
|
|
104
|
+
|------|---------|
|
|
105
|
+
| `jekyll_project_info` | High-level project summary |
|
|
106
|
+
| `jekyll_project_scan` | Full architecture map |
|
|
107
|
+
| `jekyll_config_get` | Sanitized config |
|
|
108
|
+
| `jekyll_component_list` | List components |
|
|
109
|
+
| `jekyll_component_get` | Component details + sources |
|
|
110
|
+
| `jekyll_component_create` | Create component + SCSS + docs |
|
|
111
|
+
| `jekyll_component_validate` | Structured validation |
|
|
112
|
+
| `jekyll_component_delete` | Destructive delete (full-write + confirm) |
|
|
113
|
+
| `jekyll_build` | Run Jekyll build |
|
|
114
|
+
| `jekyll_doctor` | Run jekyll doctor |
|
|
115
|
+
|
|
116
|
+
## Resources
|
|
117
|
+
|
|
118
|
+
- `jekyll://project`
|
|
119
|
+
- `jekyll://components`
|
|
120
|
+
- `jekyll://config`
|
|
121
|
+
|
|
122
|
+
## Prompts
|
|
123
|
+
|
|
124
|
+
- `jekyll_component_review`
|
|
125
|
+
- `jekyll_accessibility_review`
|
|
126
|
+
- `jekyll_performance_review`
|
|
127
|
+
- `jekyll_production_review`
|
|
128
|
+
|
|
129
|
+
## Security
|
|
130
|
+
|
|
131
|
+
- **Filesystem sandbox**: every path is resolved under the project root; traversal and symlink escapes are rejected.
|
|
132
|
+
- **Command allowlist**: only `jekyll build|clean|doctor` (and `bundle exec` variants). No arbitrary shell.
|
|
133
|
+
- **Write policy**: configurable; destructive ops require `full-write` + `confirm: true`.
|
|
134
|
+
- **Secrets**: config reads redact common secret keys; process output is scrubbed.
|
|
135
|
+
- **stdio**: stdout is reserved for MCP JSON-RPC; all logs go to stderr.
|
|
136
|
+
|
|
137
|
+
## Client configuration examples
|
|
138
|
+
|
|
139
|
+
### Claude Desktop / Claude Code
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"mcpServers": {
|
|
144
|
+
"jekyll-component": {
|
|
145
|
+
"command": "npx",
|
|
146
|
+
"args": ["-y", "jekyll-component-mcp", "--root", "/path/to/jekyll-project"]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Cursor / VS Code
|
|
153
|
+
|
|
154
|
+
Add an MCP server entry pointing at `node /path/to/jekyll-component-mcp/dist/index.js` with `--root` args as needed.
|
|
155
|
+
|
|
156
|
+
## Development
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm install
|
|
160
|
+
npm run typecheck
|
|
161
|
+
npm run build
|
|
162
|
+
npm test
|
|
163
|
+
npm run dev -- --root ./examples/jekyll-component-framework
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
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,OAAO,CAAC;AAEvC,mDAAmD;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAqB,CAAC;AAExD,oDAAoD;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD,oEAAoE;AACpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD,4CAA4C;AAC5C,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,2BAA2B;AAC3B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,CAAU,CAAC;AAG9E,wEAAwE;AACxE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE,sBAAsB;IAClC,QAAQ,EAAE,oBAAoB;IAC9B,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,aAAa;IACnB,cAAc,EAAE,wBAAwB;IACxC,YAAY,EAAE,sBAAsB;IACpC,EAAE,EAAE,WAAW;IACf,YAAY,EAAE,sBAAsB;IACpC,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,iBAAiB;IACjC,QAAQ,EAAE,UAAU;IACpB,kBAAkB,EAAE,qBAAqB;IACzC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,OAAO;CACL,CAAC;AAEX,sDAAsD;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,cAAc;IACd,cAAc;IACd,eAAe;IACf,0BAA0B;IAC1B,0BAA0B;IAC1B,2BAA2B;CACnB,CAAC;AAEX,4CAA4C;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI;IACJ,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,IAAI;IACJ,YAAY;IACZ,KAAK;IACL,MAAM;IACN,MAAM;IACN,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":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAIL,aAAa,EAGb,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAA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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,I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