@golemui/gui-mcp 1.2.0 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## 1.2.1-rc.0 (2026-08-11)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - date time intermediate states and commit on blur ([#265](https://github.com/golemui/golemui/pull/265))
6
+ - **gui-mcp:** warn on half-configured boolean validators; document validation traps ([#262](https://github.com/golemui/golemui/pull/262))
7
+
8
+ ### ❤️ Thank You
9
+
10
+ - Raúl Jiménez @Elecash
11
+
12
+ ## 1.2.0 (2026-08-04)
13
+
14
+ ### 🚀 Features
15
+
16
+ - **mcp:** add golemui-mcp CLI subcommands for skills ([58b9c21f](https://github.com/golemui/golemui/commit/58b9c21f))
17
+
18
+ ### 🩹 Fixes
19
+
20
+ - dependencies and type graph ([#241](https://github.com/golemui/golemui/pull/241))
21
+ - **gui-mcp:** resolve @golemui/dx in the dx_check_code type graph ([8afa41db](https://github.com/golemui/golemui/commit/8afa41db))
22
+ - **gui-validators:** make initValidators fail loudly on unknown configs ([#237](https://github.com/golemui/golemui/pull/237))
23
+ - **mcp:** correct lit and vanilla submit event names in DX grounding ([47cf777f](https://github.com/golemui/golemui/commit/47cf777f))
24
+ - **core:** make WithWidget and WidgetLoaders public-only ([#228](https://github.com/golemui/golemui/pull/228))
25
+
26
+ ### ❤️ Thank You
27
+
28
+ - Mud Scientist @mudscientist
29
+ - Raúl Jiménez @Elecash
30
+ - Raúl Jiménez @Elecash
31
+
1
32
  ## 1.1.1-rc.3 (2026-08-04)
2
33
 
3
34
  This was a version bump only for gui-mcp to align it with other projects, there were no code changes.
package/cli.js CHANGED
@@ -5,8 +5,8 @@ import { fileURLToPath } from "node:url";
5
5
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
8
- import { d as checkDxCode, r as resolveDxFramework, f as listDxFactoriesCatalog, b as DX_LIST_FACTORIES_TOOL, g as getDxSpec, a as DX_GET_SPEC_TOOL, D as DX_CHECK_CODE_TOOL } from "./list-dx-factories-BLhvXI07.js";
9
- import { v as validateFormDefinition, c as JSON_VALIDATE_FORM_DEFINITION_TOOL, g as generateFromJsonSchema, a as JSON_GENERATE_FROM_SCHEMA_TOOL, d as generateFromOpenapi, J as JSON_GENERATE_FROM_OPENAPI_TOOL, f as getWidgetSpec, b as JSON_GET_WIDGET_SPEC_TOOL, e as getConcept, G as GET_CONCEPT_TOOL } from "./get-concept-DRFSt-XX.js";
8
+ import { d as checkDxCode, r as resolveDxFramework, f as listDxFactoriesCatalog, b as DX_LIST_FACTORIES_TOOL, g as getDxSpec, a as DX_GET_SPEC_TOOL, D as DX_CHECK_CODE_TOOL } from "./list-dx-factories-Td5MhXfg.js";
9
+ import { v as validateFormDefinition, c as JSON_VALIDATE_FORM_DEFINITION_TOOL, g as generateFromJsonSchema, a as JSON_GENERATE_FROM_SCHEMA_TOOL, d as generateFromOpenapi, J as JSON_GENERATE_FROM_OPENAPI_TOOL, f as getWidgetSpec, b as JSON_GET_WIDGET_SPEC_TOOL, e as getConcept, G as GET_CONCEPT_TOOL } from "./get-concept-CnyfqgLF.js";
10
10
  const USAGE = `Usage: golemui-mcp [command]
11
11
 
12
12
  Validate GolemUI forms from the command line (no MCP client needed).
@@ -21,7 +21,7 @@ Commands:
21
21
 
22
22
  Output: a single JSON result on stdout.
23
23
  validate-json → { valid, errors, warnings, expressionWarnings, interpolationWarnings }
24
- check-dx → { ok, diagnostics, expressionWarnings }
24
+ check-dx → { ok, diagnostics, expressionWarnings, validatorWarnings }
25
25
 
26
26
  Exit codes: 0 = valid/ok · 1 = invalid (fix the reported problems and re-run) ·
27
27
  2 = usage or file error.
@@ -110,7 +110,7 @@ const dxTools = [
110
110
  defineTool(DX_GET_SPEC_TOOL, getDxSpec),
111
111
  defineTool(DX_CHECK_CODE_TOOL, checkDxCode)
112
112
  ];
113
- const JSON_INSTRUCTIONS = '1. Starting from an existing schema? Use a generator — both return a pre-validated definition, so check the returned `unmapped` list and surface anything left over to the user. For a raw JSON Schema (e.g. an API request body), call `json_generate_from_schema`. For an OpenAPI 3.x spec, call `json_generate_from_openapi`: pass `operation` as "METHOD /path" (e.g. "POST /users") or an exact operationId, plus the spec as a parsed `document` or a `documentUrl` to fetch — it resolves the operation\'s request body, dereferences `$ref`s, and falls back to the operation\'s parameters when there is no request body.\n2. Building or editing by hand? Look up a single widget with `json_get_widget_spec` (its `kind`, `props`, and `validator` shape), and cross-cutting behavior that spans widgets — conditional rendering, per-state prop overrides — with `get_concept`.\n3. ALWAYS finish by calling `json_validate_form_definition`. It checks the definition against the bundled JSON Schemas and returns `{ valid, errors, warnings, expressionWarnings }`. Treat `errors` as blocking: fix them and re-validate until `valid` is true. `warnings` (likely-custom widgets) and `expressionWarnings` (linted reactive expressions) are advisory — surface them, but they do not flip `valid`.\n\n';
113
+ const JSON_INSTRUCTIONS = '1. Starting from an existing schema? Use a generator — both return a pre-validated definition, so check the returned `unmapped` list and surface anything left over to the user. For a raw JSON Schema (e.g. an API request body), call `json_generate_from_schema`. For an OpenAPI 3.x spec, call `json_generate_from_openapi`: pass `operation` as "METHOD /path" (e.g. "POST /users") or an exact operationId, plus the spec as a parsed `document` or a `documentUrl` to fetch — it resolves the operation\'s request body, dereferences `$ref`s, and falls back to the operation\'s parameters when there is no request body.\n2. Building or editing by hand? Look up a single widget with `json_get_widget_spec` (its `kind`, `props`, and `validator` shape), and cross-cutting behavior that spans widgets — conditional rendering, per-state prop overrides, validation rules and error messages — with `get_concept`. Before writing a mandatory checkbox or gating a button on `$formIsInvalid`, call `get_concept({ concept: "validation" })` — both have non-obvious traps.\n3. ALWAYS finish by calling `json_validate_form_definition`. It checks the definition against the bundled JSON Schemas and returns `{ valid, errors, warnings, expressionWarnings }`. Treat `errors` as blocking: fix them and re-validate until `valid` is true. `warnings` (likely-custom widgets) and `expressionWarnings` (linted reactive expressions) are advisory — surface them, but they do not flip `valid`.\n\n';
114
114
  const jsonTools = [
115
115
  defineTool(JSON_VALIDATE_FORM_DEFINITION_TOOL, validateFormDefinition),
116
116
  defineTool(JSON_GENERATE_FROM_SCHEMA_TOOL, generateFromJsonSchema),
package/dx/dx-lint.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { ExpressionFinding } from '../shared/lint/reactive-expressions';
2
+ import { BooleanValidatorFinding } from '../shared/lint/boolean-validator';
2
3
  import { DxDiagnostic } from './typecheck';
3
4
  import type * as TS from 'typescript';
4
5
  /**
5
6
  * Static lints over a `gui.*` DX snippet that the TypeScript compiler cannot catch.
6
7
  *
7
- * The compiler is the truthful gate for *type* errors, but two real defects slip past
8
+ * The compiler is the truthful gate for *type* errors, but three real defects slip past
8
9
  * it because the code is structurally valid TypeScript:
9
10
  *
10
11
  * 1. **Misplaced `include`/`exclude` (the silent no-op).** Spreading a factory result
@@ -19,9 +20,17 @@ import type * as TS from 'typescript';
19
20
  * `json_validate_form_definition` path uses ({@link checkReactiveExpression}), so the two
20
21
  * surfaces share one set of rules. Reported as non-blocking `expressionWarnings`,
21
22
  * mirroring the JSON path.
23
+ *
24
+ * 3. **The mandatory-checkbox trap.** On `gui.inputs.checkbox`/`gui.inputs.booleanInput`,
25
+ * a validator with only half of the `required: true` + `const: true` pair type-checks
26
+ * but validates something the author almost never means (`required` alone passes
27
+ * `false`; `const` alone passes the pristine `undefined`). Shares the JSON path's rule
28
+ * engine ({@link checkBooleanValidatorRules}). Reported as non-blocking
29
+ * `validatorWarnings` — either half alone is legal, just rarely intended.
22
30
  */
23
31
  export interface DxLintResult {
24
32
  diagnostics: DxDiagnostic[];
25
33
  expressionWarnings: ExpressionFinding[];
34
+ validatorWarnings: BooleanValidatorFinding[];
26
35
  }
27
36
  export declare function lintDxSnippet(ts: typeof TS, sourceText: string, lineOffset: number): DxLintResult;
package/dx/typecheck.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ExpressionFinding } from '../shared/lint/reactive-expressions';
2
+ import { BooleanValidatorFinding } from '../shared/lint/boolean-validator';
2
3
  /**
3
4
  * In-process TypeScript type-check of a `gui.*` DX snippet against the real `@golemui`
4
5
  * type graph. This is the *truthful* gate: the arena spike proved that regex and even
@@ -32,6 +33,12 @@ export interface DxCheckResult {
32
33
  * etc.), linted by the same engine as the JSON path. Advisory — they do not flip `ok`.
33
34
  */
34
35
  expressionWarnings: ExpressionFinding[];
36
+ /**
37
+ * Non-blocking boolean-validator findings (a `checkbox`/`booleanInput` validator with only
38
+ * half of the `required: true` + `const: true` pair — the mandatory-checkbox trap), linted
39
+ * by the same rule engine as the JSON path. Advisory — they do not flip `ok`.
40
+ */
41
+ validatorWarnings: BooleanValidatorFinding[];
35
42
  }
36
43
  /**
37
44
  * Type-check a `gui.*` DX snippet against the real `@golemui` types.