@mindfiredigital/ignix-lite-mcp 1.2.0 โ†’ 1.4.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 (90) hide show
  1. package/README.md +108 -0
  2. package/dist/server.js +187 -1954
  3. package/dist/server.js.map +1 -1
  4. package/dist/utils/check-api.js +2 -0
  5. package/dist/utils/check-api.js.map +1 -1
  6. package/package.json +14 -6
  7. package/.turbo/turbo-build.log +0 -25
  8. package/CHANGELOG.md +0 -7
  9. package/dist/manifests/accordion.json +0 -61
  10. package/dist/manifests/alert.json +0 -69
  11. package/dist/manifests/avatar.json +0 -75
  12. package/dist/manifests/badge.json +0 -74
  13. package/dist/manifests/breadcrumb.json +0 -87
  14. package/dist/manifests/button.json +0 -85
  15. package/dist/manifests/card.json +0 -91
  16. package/dist/manifests/checkbox.json +0 -122
  17. package/dist/manifests/codeblock.json +0 -63
  18. package/dist/manifests/combobox.json +0 -33
  19. package/dist/manifests/dialog.json +0 -64
  20. package/dist/manifests/divider.json +0 -47
  21. package/dist/manifests/dropdown.json +0 -105
  22. package/dist/manifests/form.json +0 -81
  23. package/dist/manifests/grid.json +0 -143
  24. package/dist/manifests/input.json +0 -99
  25. package/dist/manifests/meter.json +0 -103
  26. package/dist/manifests/navigation.json +0 -70
  27. package/dist/manifests/progress.json +0 -88
  28. package/dist/manifests/radio.json +0 -121
  29. package/dist/manifests/select.json +0 -109
  30. package/dist/manifests/skeleton.json +0 -101
  31. package/dist/manifests/tab.json +0 -88
  32. package/dist/manifests/table.json +0 -92
  33. package/dist/manifests/textarea.json +0 -117
  34. package/dist/manifests/toast.json +0 -157
  35. package/dist/manifests/tooltip.json +0 -115
  36. package/dist/vector-index.json +0 -14015
  37. package/src/context/api-context.ts +0 -14
  38. package/src/global.d.ts +0 -15
  39. package/src/manifests/accordion.json +0 -61
  40. package/src/manifests/alert.json +0 -69
  41. package/src/manifests/avatar.json +0 -75
  42. package/src/manifests/badge.json +0 -74
  43. package/src/manifests/breadcrumb.json +0 -87
  44. package/src/manifests/button.json +0 -85
  45. package/src/manifests/card.json +0 -91
  46. package/src/manifests/checkbox.json +0 -122
  47. package/src/manifests/codeblock.json +0 -63
  48. package/src/manifests/combobox.json +0 -33
  49. package/src/manifests/dialog.json +0 -64
  50. package/src/manifests/divider.json +0 -47
  51. package/src/manifests/dropdown.json +0 -105
  52. package/src/manifests/form.json +0 -81
  53. package/src/manifests/grid.json +0 -143
  54. package/src/manifests/index.ts +0 -45
  55. package/src/manifests/input.json +0 -99
  56. package/src/manifests/meter.json +0 -103
  57. package/src/manifests/navigation.json +0 -70
  58. package/src/manifests/progress.json +0 -88
  59. package/src/manifests/radio.json +0 -121
  60. package/src/manifests/select.json +0 -109
  61. package/src/manifests/skeleton.json +0 -101
  62. package/src/manifests/tab.json +0 -88
  63. package/src/manifests/table.json +0 -92
  64. package/src/manifests/textarea.json +0 -117
  65. package/src/manifests/toast.json +0 -157
  66. package/src/manifests/tooltip.json +0 -115
  67. package/src/server.ts +0 -201
  68. package/src/tools/build-index.ts +0 -55
  69. package/src/tools/check-a11y.ts +0 -106
  70. package/src/tools/embedder.ts +0 -18
  71. package/src/tools/generate-theme.ts +0 -42
  72. package/src/tools/get-emmet.ts +0 -64
  73. package/src/tools/get-manifests.ts +0 -55
  74. package/src/tools/intent-engine.ts +0 -197
  75. package/src/tools/list-components.ts +0 -20
  76. package/src/tools/search-index.ts +0 -66
  77. package/src/tools/theme-palette.ts +0 -65
  78. package/src/tools/theme-tokens.ts +0 -176
  79. package/src/tools/validator.ts +0 -367
  80. package/src/types.ts +0 -63
  81. package/src/utils/a11y-rules.ts +0 -873
  82. package/src/utils/a11y-types.ts +0 -15
  83. package/src/utils/check-api.ts +0 -13
  84. package/src/utils/cosine.ts +0 -15
  85. package/src/utils/emmet-helpers.ts +0 -171
  86. package/src/utils/intent-helpers.ts +0 -66
  87. package/src/utils/intent-parser.ts +0 -186
  88. package/src/utils/tokenizer.ts +0 -7
  89. package/tsconfig.json +0 -14
  90. package/tsup.config.ts +0 -13
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @mindfiredigital/ignix-lite-mcp
2
+
3
+ An agent-optimized, Model Context Protocol (MCP) server for **Ignix-Lite**-the browser-native, classless, accessible CSS component library.
4
+
5
+ This MCP server equips AI coding agents with the runtime capabilities to discover, construct, validate, theme, and visually audit Ignix-Lite markup.
6
+
7
+ ---
8
+
9
+ ## ๐Ÿš€ Key Features
10
+
11
+ - **Intent-to-UI (`how_to_build`):** Translates natural language descriptions (e.g., `"a confirmation modal with a red delete button"`) directly into semantic Emmet abbreviations and full HTML.
12
+ - **Structured Validation (`validate`):** Audits HTML elements against Ignix-Lite specifications and returns exact, copy-pasteable corrections on validation errors.
13
+ - **WCAG 2.2 Accessibility Audit (`check_a11y`):** Evaluates elements offline for 15+ WCAG AA criteria and suggests precise fixes.
14
+ - **Generative Theming (`generate_theme`):** Automatically computes contrast-compliant light/dark mode CSS custom variables from a single brand color.
15
+ - **Headless Visual Preview (`preview`):** Generates high-quality PNG screenshots of rendered components on-the-fly.
16
+ - **Token Receipt System (`get_token_summary`):** Provides token consumption receipts for every tool call to track agent context budget.
17
+ - **Multi-Agent Handoff Protocol (`create_handoff` / `apply_handoff`):** Allows multiple agents to exchange, modify, and patch layouts using lightweight selector diffs.
18
+
19
+ ---
20
+
21
+ ## ๐Ÿ“ฆ Installation
22
+
23
+ ```bash
24
+ npm install -g @mindfiredigital/ignix-lite-cli
25
+ ```
26
+
27
+ > The MCP server is bundled with the CLI. You do **not** need to install the MCP package separately.
28
+
29
+ ---
30
+
31
+ ## โš™๏ธ Configuration โ€” Zero Manual Steps
32
+
33
+ Use the CLI to auto-configure your editor in one command:
34
+
35
+ ```bash
36
+ ignix-lite mcp setup claude # Claude Desktop
37
+ ignix-lite mcp setup claude-code # Claude Code CLI
38
+ ignix-lite mcp setup gemini # Gemini CLI
39
+ ignix-lite mcp setup cursor # Cursor editor
40
+ ```
41
+
42
+ The CLI writes directly to your editor's config file. After running:
43
+
44
+ | Client | Next Step |
45
+ | --------------------------- | ---------------------------------------------- |
46
+ | `claude` / `claude-desktop` | Restart Claude Desktop |
47
+ | `claude-code` | Open any project with `claude` |
48
+ | `gemini` | Start a new `gemini` session |
49
+ | `cursor` | Reload Cursor (`Ctrl+Shift+P` โ†’ Reload Window) |
50
+
51
+ **Or start the server manually** (for testing or custom integrations):
52
+
53
+ ```bash
54
+ ignix-lite mcp start
55
+ ```
56
+
57
+ ---
58
+
59
+ ## ๐Ÿ› ๏ธ Tool Catalogue
60
+
61
+ | Tool | Parameters | Description |
62
+ | ------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------ |
63
+ | `list_components` | _None_ | Lists all 27 available components (button, dialog, card, etc.). |
64
+ | `get_manifest` | `name: string` | Returns the full JSON specification, properties, slots, and do/don't rules for a component. |
65
+ | `get_emmet` | `name: string` | Returns the default Emmet shorthand pattern for a component. |
66
+ | `how_to_build` | `description: string` | Converts a plain English description into the best-fit Emmet and HTML output. |
67
+ | `validate` | `html: string` | Validates HTML structure against Ignix-Lite rules, returning structured errors with exact fixes. |
68
+ | `check_a11y` | `html: string` | Evaluates markup for accessibility and WCAG 2.2 AA compliance. |
69
+ | `generate_theme` | `prompt: string` | Generates a complete `:root` CSS custom property theme based on color keywords or hex values. |
70
+ | `preview` | `input: string, options?: object` | headlessly renders Emmet or HTML to a base64 PNG data URL. |
71
+ | `get_token_summary` | `context_window?: number` | Returns session stats showing total tokens used by the MCP server. |
72
+ | `create_handoff` | `rendered_html: string, metadata?: object` | Creates a state snapshot envelope for multi-agent layout exchange. |
73
+ | `apply_handoff` | `handoff_id: string, changes: array` | Patches an existing handoff snapshot with partial component changes. |
74
+
75
+ ---
76
+
77
+ ## ๐Ÿงช Local Development
78
+
79
+ Clone the main repository, install dependencies, and build the packages:
80
+
81
+ ```bash
82
+ # Clone the repository
83
+ git clone https://github.com/mindfiredigital/ignix-lite.git
84
+ cd ignix-lite
85
+
86
+ # Install dependencies and build all packages
87
+ pnpm install
88
+ pnpm build
89
+ ```
90
+
91
+ Run the server in development mode:
92
+
93
+ ```bash
94
+ cd packages/mcp
95
+ pnpm dev
96
+ ```
97
+
98
+ To test tools locally, you can use the MCP Inspector:
99
+
100
+ ```bash
101
+ npx @modelcontextprotocol/inspector node dist/server.js
102
+ ```
103
+
104
+ ---
105
+
106
+ ## ๐Ÿ“„ License
107
+
108
+ MIT License. Designed and maintained by **Mindfire Digital**.