@punica/form-mcp 0.10.0 → 0.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/form-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "MCP server for Punica Form: look up the exact API of its packages, read the rules and check code that uses them.",
5
5
  "keywords": [
6
6
  "mcp",
package/src/create.mjs CHANGED
@@ -41,7 +41,7 @@ export function createPunicaFormServer({ packages, guide }) {
41
41
  const server = new McpServer(
42
42
  { name: 'punica-form', version },
43
43
  {
44
- instructions: `${legacyNote}${versions}. Punica Form is a headless form engine and is rarely in training data: never write an import, a service name or a method from memory. Read get_guide first, look names up with search_api and get_api, and check the code with validate_code before handing it over. To produce a form at run time as data instead of code, read get_form_schema and check the definition with validate_form.`
44
+ instructions: `${legacyNote}${versions}. Punica Form is a headless form engine and is rarely in training data: never write an import, a service name or a method from memory. Read get_guide first, look names up with search_api and get_api, and check the code with validate_code before handing it over. Imports: the kit's decorators (FormKit, TextField, …) and setMessages come from \`@punica/form-kit\`, KitForm from \`@punica/form-kit/react\`, bindForm from \`@punica/form-kit/dom\`, JsonForm from \`@punica/form-kit/json\`; the kit loads the punica-* elements it draws, and no CSS import is needed. To produce a form at run time as data instead of code, read get_form_schema and check the definition with validate_form.`
45
45
  }
46
46
  );
47
47
 
package/src/guide.md CHANGED
@@ -3,6 +3,11 @@
3
3
  Punica Form is a headless form engine. `@punica/form` holds the engine,
4
4
  `@punica/form-service` the built-in services. There are no UI components.
5
5
 
6
+ Exact declarations are one call away: `get_api` with the names
7
+ (`KitFormProps`, `FieldProps`, `SetErrors`) returns each one with the types
8
+ it refers to, and `search_api` lists the exports. Ask them instead of reading
9
+ the `.d.ts` files in `node_modules`; `validate_code` checks the result.
10
+
6
11
  ## What the packages provide, and what they do not
7
12
 
8
13
  - `@punica/form`: `FormController`, the class decorators `@Services`,