@regle/mcp-server 1.14.0-beta.3 → 1.14.1

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 CHANGED
@@ -1,19 +1,7 @@
1
1
  # @regle/mcp-server
2
2
 
3
- MCP (Model Context Protocol) Server for [Regle](https://reglejs.dev) - providing AI-powered assistance for Vue.js form validation.
3
+ MCP (Model Context Protocol) Server for [Regle](https://reglejs.dev) - providing AI-powered assistance for Vue form validation.
4
4
 
5
- ## Installation
6
-
7
- ```bash
8
- # npm
9
- npm install @regle/mcp-server
10
-
11
- # pnpm
12
- pnpm add @regle/mcp-server
13
-
14
- # yarn
15
- yarn add @regle/mcp-server
16
- ```
17
5
 
18
6
  ## Usage with AI Assistants
19
7
 
@@ -34,7 +22,9 @@ Add to your `claude_desktop_config.json`:
34
22
 
35
23
  ### Cursor
36
24
 
37
- Add to your MCP settings:
25
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=regle&config=eyJjb21tYW5kIjoibnB4IEByZWdsZS9tY3Atc2VydmVyIn0%3D)
26
+
27
+ Or add to your MCP settings:
38
28
 
39
29
  ```json
40
30
  {
@@ -21,7 +21,7 @@ var docs_data_default = {
21
21
  },
22
22
  {
23
23
  "id": "advanced-usage-immutable-constructors",
24
- "title": "immutable-constructors",
24
+ "title": "markStatic",
25
25
  "category": "advanced-usage",
26
26
  "path": "advanced-usage/immutable-constructors.md",
27
27
  "content": "# Handling immutable constructors\n\nRegle works by tracking changes in the state and updating the validation rules accordingly.\n\nThis works great for objects and arrays, but not for immutable constructors (like `Decimal` from `decimal.js` or `Moment` from `moment.js`, etc...).\n\nThis constructors will be interpreted as regular objects and their properties treated as nested fields.\n\n## Default Usage\n\nTo handle these cases, you can use the `markStatic` helper to mark the value as static and treat the constructor as a regular raw Field.\n\n```vue\n<template>\n <input :value=\"r$.decimal.$value?.toString()\" @input=\"handleDecimalInput\" />\n</template>\n\n```\n\n## Schema Usage\n\nWhen using Regle with `@regle/schemas`, you will have to also declare the static constructor in the schema.\n\n```ts\nimport { markStatic, useRegleSchema } from '@regle/core'\nimport { z } from 'zod'\n\nconst StaticDecimal = markStatic(Decimal)\n\nconst schema = z.object({\n decimal: z.instanceof(StaticDecimal).refine((value) => value.toNumber() > 10),\n})\n\nconst { r$ } = useRegleSchema({ decimal: new StaticDecimal(0) }, schema)\n\n```\n\n## `isStatic` helper\n\nYou can use the `isStatic` helper to check if a value is a static value.\n\n```ts\nimport { isStatic } from '@regle/core';\n\nconst isStatic = isStatic(r$.$value.decimal); // true\n```\n\n## `UnwrapStatic` type helper\n\nYou can use the `UnwrapStatic` type to unwrap a static value.\n\n```ts\nimport { type UnwrapStatic } from '@regle/core';\n\ntype value = UnwrapStatic<typeof r$.$value.decimal>; // Decimal\n```\n\n## `isRegleStatic` type helper\n\nYou can use the `isRegleStatic` type helper to check if a value is a static value.\n\n```ts\nimport { type isRegleStatic } from '@regle/core';\n\ntype isStatic = isRegleStatic<typeof state.decimal>; // true\n```"
@@ -236,6 +236,13 @@ var docs_data_default = {
236
236
  "path": "index.md",
237
237
  "content": "<h2 class=\"hidden-title\">Vue validation library</h2>\n<h2 class=\"hidden-title\">Vue form library</h2>\n<h2 class=\"hidden-title\">Vue zod forms</h2>\n<h2 class=\"hidden-title\">Vue zod</h2>\n<h2 class=\"hidden-title\">Vuelidate Zod</h2>\n<h2 class=\"hidden-title\">Vuelidate alternative</h2>\n<h2 class=\"hidden-title\">Veevalidate alternative</h2>\n<h2 class=\"hidden-title\">Vueforms alternative</h2>\n<h2 class=\"hidden-title\">Tanstack forms alternative</h2>"
238
238
  },
239
+ {
240
+ "id": "integrations-mcp-server",
241
+ "title": "Regle MCP server",
242
+ "category": "integrations",
243
+ "path": "integrations/mcp-server.md",
244
+ "content": "# MCP Server\n\nRegle offers an MCP server that can be used to get documentation and autocomplete for Regle.\n\n## Features\n\nThe MCP server provides the following features:\n\n- Create form validation rules\n- Search documentation\n- Get precise information on any rule\n- Create custom rules\n- API information on every Regle helper\n\n## Cursor\n\n<a href=\"https://cursor.com/en-US/install-mcp?name=regle&config=eyJjb21tYW5kIjoibnB4IEByZWdsZS9tY3Atc2VydmVyIn0%3D\">\n <div class=\"light-only\">\n <img src=\"https://cursor.com/deeplink/mcp-install-dark.svg\" alt=\"Install MCP Server\" />\n </div>\n <div class=\"dark-only\">\n <img src=\"https://cursor.com/deeplink/mcp-install-light.svg\" alt=\"Install MCP Server\" />\n </div>\n</a>\n\nOr add to your `.cursor/mcp.json`\n```json\n{\n \"mcpServers\": {\n \"regle\": {\n \"command\": \"npx\",\n \"args\": [\"@regle/mcp-server\"]\n }\n }\n}\n```\n\n## Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n \"mcpServers\": {\n \"regle\": {\n \"command\": \"npx\",\n \"args\": [\"@regle/mcp-server\"]\n }\n }\n}\n```"
245
+ },
239
246
  {
240
247
  "id": "integrations-nuxt",
241
248
  "title": "Nuxt",
@@ -259,7 +266,7 @@ var docs_data_default = {
259
266
  },
260
267
  {
261
268
  "id": "introduction-devtools",
262
- "title": "devtools",
269
+ "title": "Devtools",
263
270
  "category": "introduction",
264
271
  "path": "introduction/devtools.md",
265
272
  "content": "# Regle Devtools\n\nRegle offers a devtools extension for [Vue Devtools](https://devtools.vuejs.org/) to help you debug your validation tree.\n\n![Regle Devtools Screenshot](/screenshots/devtools.png)\n\n## Installation\n\nTo enable devtools, you need to install the Regle plugin in your app.\n\n:::tip\nIf you use the `@regle/nuxt` module, the devtools will be automatically enabled.\n:::\n\n```ts [main.ts]\nimport { createApp } from 'vue';\nimport App from './App.vue';\nimport { RegleVuePlugin } from '@regle/core';\n\nconst app = createApp(App);\n\napp.use(RegleVuePlugin); // <--\n\napp.mount('#app');\n```\n\n## Usage\n\nRegle devtools can inspect every variation of `useRegle`:\n\n- `useRegle`\n- `useRules`\n- `useRegleSchema`\n- `useScopedRegle`\n- `useScopedRegleSchema`\n\nYou can inspect every nested properties and rules of the `r$` instance.\n\n:::warning\nRules details inspection is not available for `useRegleSchema`\n:::\n\n### Actions\n\nYou can perform actions on the `r$` instance by clicking on the actions buttons in the devtools.\n\n![Devtools Actions Screenshot](/screenshots/devtools-actions.png)\n\n- Validate: Validate the `r$` instance (with `$validate` method)\n- Reset validation state: Reset the validation state of the `r$` instance (with `$reset` method)\n- Restore to original state: Restore the `r$` instance to the original state (with `$reset` method)\n\n## Providing custom `r$` ids to devtools\n\nBy default, the devtools will use a generic name to display the `r$` instance. \n\nYou can provide a custom name to the `useRegle` composable to display a more descriptive name in the devtools.\n\n```ts [App.vue]\nimport { useRegle } from '@regle/core';\n\nconst { r$ } = useRegle({ name: '' }, {\n name: { required }\n}, {\n id: 'my-form'\n});\n```\n\n## Devtools demo\n\nYou can go in any of the [Stablitz exemples](/examples/index) and open the devtools by clicking on the <span data-title=\"vue\"></span> \"Open Devtools\" button in the bottom middle of the page.\n\n### Vite Devtools Integration\n\nRegle devtools also integrate cleanly with [Vite](https://vitejs.dev/) when you're running your app in development mode.\n\nYou should see the Regle panel show up automatically in the Vite devtools if you've installed the plugin correctly.\n\n<img src=\"/screenshots/vite-devtools.png\" alt=\"Vite Devtools with Regle panel\" width=\"100\"/>\n\nYou will see the Regle icon showing in the devtools. Just click on it!\n\n<img src=\"/screenshots/vite-devtools-regle.png\" alt=\"Vite Devtools with Regle panel\" />"
@@ -276,7 +283,7 @@ var docs_data_default = {
276
283
  "title": "Installation",
277
284
  "category": "introduction",
278
285
  "path": "introduction/installation.md",
279
- "content": "# Installation\n\n## Prerequisites\n\nRequired\n- [Vue](https://vuejs.org/) <span data-title=\"vue\"></span> `3.3+`.\n- [Typescript](https://www.typescriptlang.org/) <span data-title=\"ee.ts\"></span> `4.8+`. \n - Compatible with plain javascript.\n- Text Editor with Vue syntax support.\n - [VSCode](https://code.visualstudio.com/) <span data-title=\".vscode\"></span> is recommended, along with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar).\n\nOptional\n- [Nuxt](https://nuxt.com/) <span data-title=\"nuxt\"></span> \n - Nuxt `3.1+`, and check docs for [Nuxt module](/integrations/nuxt)\n- [Pinia](https://pinia.vuejs.org/) <span data-title=\"pinia\"></span> \n - Pinia `2.2.5+`\n\nSchema libraries: [Docs](/integrations/schemas-libraries)\n\n- [Zod](https://zod.dev/) <span data-title=\"zod\"></span> `3.24+`. \n- [Valibot](https://valibot.dev/) <span data-title=\"valibot\"></span> `1+`.\n- [ArkType](https://arktype.io/) <span data-title=\"arktype\"></span> `2+`\n- Any library using the [Standard Schema Spec](https://standardschema.dev/) \n\n<br/>\n\n::: code-group\n\n```sh [pnpm]\npnpm add @regle/core @regle/rules\n```\n\n```sh [npm]\nnpm install @regle/core @regle/rules\n```\n\n```sh [yarn]\nyarn add @regle/core @regle/rules\n```\n\n```sh [bun]\nbun add @regle/core @regle/rules\n```\n\n:::\n\n## Devtools\n\nTo enable devtools, you need to install the Regle plugin in your app.\n\n:::tip\nIf you use the `@regle/nuxt` module, the devtools will be automatically enabled.\n:::\n\n```ts [main.ts]\nimport { createApp } from 'vue';\nimport { RegleVuePlugin } from '@regle/core';\nimport App from './App.vue';\n\nconst app = createApp(App);\n\napp.use(RegleVuePlugin); // <--\n\napp.mount('#app');\n```"
286
+ "content": "# Installation\n\n## Prerequisites\n\nRequired\n- [Vue](https://vuejs.org/) <span data-title=\"vue\"></span> `3.3+`.\n- [Typescript](https://www.typescriptlang.org/) <span data-title=\"ee.ts\"></span> `4.8+`. \n - Compatible with plain javascript.\n- Text Editor with Vue syntax support.\n - [VSCode](https://code.visualstudio.com/) <span data-title=\".vscode\"></span> is recommended, along with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar).\n\nOptional\n- [Nuxt](https://nuxt.com/) <span data-title=\"nuxt\"></span> \n - Nuxt `3.1+`, and check docs for [Nuxt module](/integrations/nuxt)\n- [Pinia](https://pinia.vuejs.org/) <span data-title=\"pinia\"></span> \n - Pinia `2.2.5+`\n\nSchema libraries: [Docs](/integrations/schemas-libraries)\n\n- [Zod](https://zod.dev/) <span data-title=\"zod\"></span> `3.24+`. \n- [Valibot](https://valibot.dev/) <span data-title=\"valibot\"></span> `1+`.\n- [ArkType](https://arktype.io/) <span data-title=\"arktype\"></span> `2+`\n- Any library using the [Standard Schema Spec](https://standardschema.dev/) \n\n<br/>\n\n::: code-group\n\n```sh [pnpm]\npnpm add @regle/core @regle/rules\n```\n\n```sh [npm]\nnpm install @regle/core @regle/rules\n```\n\n```sh [yarn]\nyarn add @regle/core @regle/rules\n```\n\n```sh [bun]\nbun add @regle/core @regle/rules\n```\n\n:::\n\n## Devtools\n\nTo enable devtools, you need to install the Regle plugin in your app.\n\n:::tip\nIf you use the `@regle/nuxt` module, the devtools will be automatically enabled.\n:::\n\n```ts [main.ts]\nimport { createApp } from 'vue';\nimport { RegleVuePlugin } from '@regle/core';\nimport App from './App.vue';\n\nconst app = createApp(App);\n\napp.use(RegleVuePlugin); // <--\n\napp.mount('#app');\n```\n\n## MCP server\n\nRegle offers an MCP server that can be used to get documentation and autocomplete for Regle.\n\nYou can install it using the following configurations:\n\n- [Cursor](/integrations/mcp-server#cursor)\n- [Claude Desktop](/integrations/mcp-server#claude-desktop)"
280
287
  },
281
288
  {
282
289
  "id": "introduction-migrate-from-vuelidate",
@@ -1656,7 +1663,7 @@ function searchApi(query) {
1656
1663
  return results;
1657
1664
  }
1658
1665
 
1659
- var version = "1.14.0-beta.3";
1666
+ var version = "1.14.1";
1660
1667
 
1661
1668
  const categories = getCategories();
1662
1669
  const server = new McpServer({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regle/mcp-server",
3
- "version": "1.14.0-beta.3",
3
+ "version": "1.14.1",
4
4
  "description": "MCP Server for Regle",
5
5
  "dependencies": {
6
6
  "@modelcontextprotocol/sdk": "1.24.3",