@nucleux/mcp 0.5.0 → 0.6.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 +1 -1
- package/dist/index.js +11403 -5647
- package/package.json +2 -2
- package/skills/nucleux-design/SKILL.md +27 -11
- package/templates/AGENTS.md +27 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nucleux/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Model Context Protocol server for the Nucleux agentic UI component library — lets AI coding agents discover, search, and correctly use @nucleux components.",
|
|
6
6
|
"bin": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
|
-
"prebuild": "node ../../scripts/gen-mcp-catalog.mjs && node ../../scripts/gen-mcp-knowledge.mjs && node ../../scripts/gen-agent-files.mjs && node ../../scripts/gen-html-snippets.mjs",
|
|
50
|
+
"prebuild": "node ../../scripts/gen-mcp-catalog.mjs && node ../../scripts/gen-llms.mjs && node ../../scripts/gen-mcp-knowledge.mjs && node ../../scripts/gen-agent-files.mjs && node ../../scripts/gen-html-snippets.mjs",
|
|
51
51
|
"build": "tsup"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -18,9 +18,11 @@ user to add the server, then continue once it is connected:
|
|
|
18
18
|
|
|
19
19
|
Do not fall back to guessing Nucleux APIs.
|
|
20
20
|
|
|
21
|
-
Nucleux (`@nucleux/react`) is a React + Tailwind design system
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
Nucleux (`@nucleux/react`) is a React + Tailwind design system in two families:
|
|
22
|
+
shadcn-style (`Button`, `Disclosure`, …) and Material 3 (`Md3Button`,
|
|
23
|
+
`Md3Disclosure`, …). The `nucleux` MCP server holds its curated page patterns and
|
|
24
|
+
exact component contracts. Work design-first: find the pattern, read the
|
|
25
|
+
contracts, then write code.
|
|
24
26
|
|
|
25
27
|
## Rules
|
|
26
28
|
|
|
@@ -31,22 +33,36 @@ design-first: find the pattern, read the contracts, then write code.
|
|
|
31
33
|
3. Read the contract (`get_component`) before using a component. Use only the
|
|
32
34
|
imports, props and variant values it lists. Never guess a Nucleux export,
|
|
33
35
|
prop or variant. If it is not in the catalog, it does not exist.
|
|
34
|
-
4.
|
|
36
|
+
4. Pick one family per app and do not mix them: Material 3 (`Md3*`) when the
|
|
37
|
+
project already uses Material Design or the user asks for it, otherwise
|
|
38
|
+
shadcn. Patterns are written with shadcn components; in a Material 3 app use
|
|
39
|
+
each one's `Md3` twin, and where Material 3 has none (e.g. `DataTable`), the
|
|
40
|
+
shadcn component under the `md3-theme` class. Agentic components have the
|
|
41
|
+
same props in both families.
|
|
42
|
+
5. For AI features use the agentic components (nucleux.in's patterns):
|
|
43
|
+
`Disclosure` and `Caveat` for AI output, `Consent` before acting,
|
|
44
|
+
`OpenInput`/`InitialCta`/`SuggestedPrompts` for asking, `Attachments`,
|
|
45
|
+
`VoiceInput` and friends for input, `ModelSelection`, `KnowledgeBase`,
|
|
46
|
+
`Connector` and `McpConnection` for context. Search for them with
|
|
47
|
+
`search_components` instead of building your own.
|
|
48
|
+
6. Do not rebuild something Nucleux already ships (navigation, tables, cards,
|
|
35
49
|
dialogs, sheets, form controls, empty/error states). If you must, say why
|
|
36
50
|
in your summary.
|
|
37
|
-
|
|
38
|
-
`text-muted-foreground`, `border-border`, `bg-primary`, `text-destructive
|
|
51
|
+
7. Style with the semantic token classes (`bg-background`, `text-foreground`,
|
|
52
|
+
`text-muted-foreground`, `border-border`, `bg-primary`, `text-destructive`…;
|
|
53
|
+
in a Material 3 app the `md-*` roles: `bg-md-surface`, `text-md-on-surface`,
|
|
54
|
+
`bg-md-primary-container`…).
|
|
39
55
|
No hex colors, no arbitrary color values. Use the same variant for the same
|
|
40
56
|
meaning everywhere (one `cta` primary action per page, `destructive` only
|
|
41
57
|
for destructive actions).
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
8. Every page must work from 360px wide: follow each pattern's responsive rules.
|
|
59
|
+
9. Accessibility is part of done: labels for every control, `aria-label` on
|
|
44
60
|
icon-only buttons, visible focus, status not conveyed by color alone.
|
|
45
|
-
|
|
46
|
-
|
|
61
|
+
10. Every data view handles loading, empty and error (the `page-states` pattern).
|
|
62
|
+
11. When Nucleux has no pattern or component for a need, build it from Nucleux
|
|
47
63
|
primitives (or the ShadCN equivalent the tools name), keep it on Nucleux
|
|
48
64
|
tokens, and report the gap. Never present an invented component as Nucleux.
|
|
49
|
-
|
|
65
|
+
12. Nucleux is not mandatory. If the project already uses another component
|
|
50
66
|
system and the user did not ask to switch, extend that system and say so.
|
|
51
67
|
|
|
52
68
|
## Workflow
|
package/templates/AGENTS.md
CHANGED
|
@@ -6,9 +6,11 @@ This project builds its UI with Nucleux (`@nucleux/react`). Use the `nucleux`
|
|
|
6
6
|
MCP server (`npx -y @nucleux/mcp`) for patterns and component contracts; the
|
|
7
7
|
`nucleux-design` skill holds the same workflow.
|
|
8
8
|
|
|
9
|
-
Nucleux (`@nucleux/react`) is a React + Tailwind design system
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Nucleux (`@nucleux/react`) is a React + Tailwind design system in two families:
|
|
10
|
+
shadcn-style (`Button`, `Disclosure`, …) and Material 3 (`Md3Button`,
|
|
11
|
+
`Md3Disclosure`, …). The `nucleux` MCP server holds its curated page patterns and
|
|
12
|
+
exact component contracts. Work design-first: find the pattern, read the
|
|
13
|
+
contracts, then write code.
|
|
12
14
|
|
|
13
15
|
### Rules
|
|
14
16
|
|
|
@@ -19,22 +21,36 @@ design-first: find the pattern, read the contracts, then write code.
|
|
|
19
21
|
3. Read the contract (`get_component`) before using a component. Use only the
|
|
20
22
|
imports, props and variant values it lists. Never guess a Nucleux export,
|
|
21
23
|
prop or variant. If it is not in the catalog, it does not exist.
|
|
22
|
-
4.
|
|
24
|
+
4. Pick one family per app and do not mix them: Material 3 (`Md3*`) when the
|
|
25
|
+
project already uses Material Design or the user asks for it, otherwise
|
|
26
|
+
shadcn. Patterns are written with shadcn components; in a Material 3 app use
|
|
27
|
+
each one's `Md3` twin, and where Material 3 has none (e.g. `DataTable`), the
|
|
28
|
+
shadcn component under the `md3-theme` class. Agentic components have the
|
|
29
|
+
same props in both families.
|
|
30
|
+
5. For AI features use the agentic components (nucleux.in's patterns):
|
|
31
|
+
`Disclosure` and `Caveat` for AI output, `Consent` before acting,
|
|
32
|
+
`OpenInput`/`InitialCta`/`SuggestedPrompts` for asking, `Attachments`,
|
|
33
|
+
`VoiceInput` and friends for input, `ModelSelection`, `KnowledgeBase`,
|
|
34
|
+
`Connector` and `McpConnection` for context. Search for them with
|
|
35
|
+
`search_components` instead of building your own.
|
|
36
|
+
6. Do not rebuild something Nucleux already ships (navigation, tables, cards,
|
|
23
37
|
dialogs, sheets, form controls, empty/error states). If you must, say why
|
|
24
38
|
in your summary.
|
|
25
|
-
|
|
26
|
-
`text-muted-foreground`, `border-border`, `bg-primary`, `text-destructive
|
|
39
|
+
7. Style with the semantic token classes (`bg-background`, `text-foreground`,
|
|
40
|
+
`text-muted-foreground`, `border-border`, `bg-primary`, `text-destructive`…;
|
|
41
|
+
in a Material 3 app the `md-*` roles: `bg-md-surface`, `text-md-on-surface`,
|
|
42
|
+
`bg-md-primary-container`…).
|
|
27
43
|
No hex colors, no arbitrary color values. Use the same variant for the same
|
|
28
44
|
meaning everywhere (one `cta` primary action per page, `destructive` only
|
|
29
45
|
for destructive actions).
|
|
30
|
-
|
|
31
|
-
|
|
46
|
+
8. Every page must work from 360px wide: follow each pattern's responsive rules.
|
|
47
|
+
9. Accessibility is part of done: labels for every control, `aria-label` on
|
|
32
48
|
icon-only buttons, visible focus, status not conveyed by color alone.
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
10. Every data view handles loading, empty and error (the `page-states` pattern).
|
|
50
|
+
11. When Nucleux has no pattern or component for a need, build it from Nucleux
|
|
35
51
|
primitives (or the ShadCN equivalent the tools name), keep it on Nucleux
|
|
36
52
|
tokens, and report the gap. Never present an invented component as Nucleux.
|
|
37
|
-
|
|
53
|
+
12. Nucleux is not mandatory. If the project already uses another component
|
|
38
54
|
system and the user did not ask to switch, extend that system and say so.
|
|
39
55
|
|
|
40
56
|
### Workflow
|