@maz-ui/mcp 5.2.0 → 5.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.
- package/README.md +4 -2
- package/dist/chunks/files.mjs +28 -9
- package/dist/chunks/index.mjs +6588 -6170
- package/dist/chunks/theme.mjs +885 -426
- package/dist/cli.mjs +3 -9
- package/dist/index.d.mts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.mjs +5 -8
- package/dist/shared/{mcp.Ccxm-Aoc.mjs → mcp.ByQS-5Nc.mjs} +94 -31
- package/dist/shared/{mcp.D3_Fk0U3.mjs → mcp.CXId5vdl.mjs} +444 -3179
- package/docs/agents/claude-rule.md +13 -46
- package/docs/components/maz-card.md +1 -1
- package/docs/components/maz-select-country.md +1 -1
- package/docs/ecosystem/node/index.md +1 -1
- package/docs/ecosystem/node/setup-agents.md +38 -1
- package/docs/ecosystem/nuxt.md +3 -3
- package/docs/guide/ai-agents.md +5 -4
- package/docs/guide/migration-v5.md +2 -2
- package/docs/manifest.json +1 -1
- package/package.json +15 -15
- package/dist/chunks/prompt.mjs +0 -280
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ It detects your agents and configures them without touching your own instruction
|
|
|
18
18
|
- Claude Code: `.claude/rules/maz-ui.md` (rules, always loaded) and `.mcp.json`
|
|
19
19
|
- Cursor, Copilot, Codex, Windsurf...: a delimited `maz-ui` section in `AGENTS.md`, and `.cursor/mcp.json` / `.vscode/mcp.json`
|
|
20
20
|
|
|
21
|
-
Options: `--targets claude,agents-md,cursor,vscode`, `--no-rules` (MCP server only), `--no-mcp`, `--dry-run`, `--remove`. In a project without maz-ui (`@maz-ui/utils` or `@maz-ui/node` only), `init` only registers the MCP server, with the docs bundled in `@maz-ui/mcp`. With Nuxt, the `mazUi.agents` option of `@maz-ui/nuxt` registers the MCP server of the detected agents automatically in development.
|
|
21
|
+
Options: `--targets claude,agents-md,cursor,vscode`, `--paths "apps/web/**"` (files the Claude Code rule is scoped to, default: the workspaces that use maz-ui, `all` to always load it), `--no-rules` (MCP server only), `--no-mcp`, `--dry-run`, `--remove`. In a project without maz-ui (`@maz-ui/utils` or `@maz-ui/node` only), `init` only registers the MCP server, with the docs bundled in `@maz-ui/mcp`. With Nuxt, the `mazUi.agents` option of `@maz-ui/nuxt` registers the MCP server of the detected agents automatically in development.
|
|
22
22
|
|
|
23
23
|
To use it without writing anything in your projects, register the server once for your user: `claude mcp add maz-ui --scope user -- npx -y @maz-ui/mcp@latest` (its instructions carry the maz-ui rules), or install the Claude Code plugin below.
|
|
24
24
|
|
|
@@ -85,7 +85,9 @@ Options: `--docs <dir>` (or `MAZ_UI_DOCS_DIR`) to use another docs bundle, `--cw
|
|
|
85
85
|
```ts
|
|
86
86
|
import { createMazUiMcpServer, loadKnowledge, reviewCode, setupAgents } from '@maz-ui/mcp'
|
|
87
87
|
|
|
88
|
-
const knowledge = loadKnowledge({
|
|
88
|
+
const knowledge = loadKnowledge({
|
|
89
|
+
cwd: process.cwd()
|
|
90
|
+
})
|
|
89
91
|
const findings = reviewCode(source, { knowledge, filename: 'Card.vue' })
|
|
90
92
|
```
|
|
91
93
|
|
package/dist/chunks/files.mjs
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { readFileSync, existsSync, statSync } from 'node:fs';
|
|
2
2
|
import { dirname, join, relative, isAbsolute, resolve } from 'node:path';
|
|
3
|
-
import { g as glob } from '../shared/mcp.
|
|
3
|
+
import { g as glob } from '../shared/mcp.ByQS-5Nc.mjs';
|
|
4
4
|
import { filterBySeverity, reviewCode } from './index.mjs';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'url';
|
|
8
8
|
import 'module';
|
|
9
|
-
import '../shared/mcp.
|
|
9
|
+
import '../shared/mcp.CXId5vdl.mjs';
|
|
10
10
|
import 'node:buffer';
|
|
11
11
|
import 'node:util';
|
|
12
|
-
import 'node:child_process';
|
|
13
|
-
import 'node:process';
|
|
14
|
-
import 'tty';
|
|
15
|
-
import 'node:tty';
|
|
16
|
-
import 'node:crypto';
|
|
17
12
|
import 'node:url';
|
|
13
|
+
import 'node:crypto';
|
|
14
|
+
import 'node:process';
|
|
18
15
|
|
|
19
|
-
const REVIEWABLE_EXTENSIONS = [
|
|
16
|
+
const REVIEWABLE_EXTENSIONS = [
|
|
17
|
+
"vue",
|
|
18
|
+
"ts",
|
|
19
|
+
"tsx",
|
|
20
|
+
"js",
|
|
21
|
+
"jsx",
|
|
22
|
+
"mjs",
|
|
23
|
+
"mts",
|
|
24
|
+
"css",
|
|
25
|
+
"scss",
|
|
26
|
+
"pcss",
|
|
27
|
+
"postcss"
|
|
28
|
+
];
|
|
20
29
|
const MAX_REVIEWED_FILES = 200;
|
|
21
30
|
function detectFramework(fromDirectory) {
|
|
22
31
|
let directory = fromDirectory;
|
|
@@ -44,7 +53,17 @@ async function expandPaths(patterns, cwd) {
|
|
|
44
53
|
globs.push(pattern);
|
|
45
54
|
}
|
|
46
55
|
if (globs.length > 0) {
|
|
47
|
-
const matches = await glob(globs, {
|
|
56
|
+
const matches = await glob(globs, {
|
|
57
|
+
cwd,
|
|
58
|
+
absolute: true,
|
|
59
|
+
ignore: [
|
|
60
|
+
"**/node_modules/**",
|
|
61
|
+
"**/dist/**",
|
|
62
|
+
"**/.nuxt/**",
|
|
63
|
+
"**/.output/**",
|
|
64
|
+
"**/coverage/**"
|
|
65
|
+
]
|
|
66
|
+
});
|
|
48
67
|
for (const match of matches) files.add(match);
|
|
49
68
|
}
|
|
50
69
|
return [...files].filter((file) => REVIEWABLE_EXTENSIONS.includes(file.split(".").pop() ?? "")).sort();
|