@golemui/gui-mcp 1.2.1 → 1.3.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/CHANGELOG.md +21 -0
- package/cli.js +2 -2
- package/get-concept-zrVPpS-8.js +3539 -0
- package/json/errors.d.ts +3 -6
- package/json/schemas/index.d.ts +6 -5
- package/json/schemas/shallow-validators.d.ts +14 -2
- package/json.js +1 -1
- package/lib.js +2 -2
- package/{list-dx-factories-Td5MhXfg.js → list-dx-factories-BHlwQnVh.js} +1 -1
- package/package.json +5 -5
- package/shared/form-schema-url.d.ts +7 -0
- package/get-concept-CnyfqgLF.js +0 -3328
package/json/errors.d.ts
CHANGED
|
@@ -12,12 +12,9 @@ export type FormattedResult = {
|
|
|
12
12
|
};
|
|
13
13
|
declare const STRING_FORMATS: string[];
|
|
14
14
|
/**
|
|
15
|
-
* Formats ajv
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* When `dataRoot` is provided, `oneOf` branches at widget positions are collapsed to just the
|
|
19
|
-
* closest-matching branch — without this, a single `type: 'buton'` typo emits ~30 errors (one per
|
|
20
|
-
* non-matching branch + a summary), most of which are noise.
|
|
15
|
+
* Formats ajv errors into messages with concrete fix suggestions, aimed at an LLM
|
|
16
|
+
* self-correcting the form it produced. With `dataRoot`, widget `oneOf` branches
|
|
17
|
+
* collapse to the closest-matching one (a single typo otherwise emits ~30 errors).
|
|
21
18
|
*/
|
|
22
19
|
export declare function formatAjvErrors(errors: ErrorObject[] | null | undefined, dataRoot?: unknown): FormattedResult;
|
|
23
20
|
/**
|
package/json/schemas/index.d.ts
CHANGED
|
@@ -6,17 +6,18 @@ export type WidgetSchema = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare const COMMON_SCHEMA: WidgetSchema;
|
|
8
8
|
export declare const FORM_SCHEMA: WidgetSchema;
|
|
9
|
+
export declare const WIDGETS_SCHEMA: WidgetSchema;
|
|
9
10
|
export declare const LAYOUT_WIDGET_SCHEMA: WidgetSchema;
|
|
10
11
|
export declare const VALIDATORS_SCHEMA: WidgetSchema;
|
|
12
|
+
export declare const RANGES_SCHEMA: WidgetSchema;
|
|
11
13
|
/**
|
|
12
|
-
* Fallback schema for
|
|
13
|
-
*
|
|
14
|
-
* validator to compile. Kept out of COMPONENT_SCHEMAS because it has no single `type` const.
|
|
14
|
+
* Fallback schema for custom components (any `type` not in COMPONENT_SCHEMAS, it has
|
|
15
|
+
* no single `type` const). The `formWidget` oneOf refs it, so it must be registered.
|
|
15
16
|
*/
|
|
16
17
|
export declare const CUSTOM_SCHEMA: WidgetSchema;
|
|
17
18
|
/**
|
|
18
|
-
* Component schemas
|
|
19
|
-
*
|
|
19
|
+
* Component schemas keyed by the widget `type` const, re-exported from the
|
|
20
|
+
* generated `COMPONENT_SCHEMAS_BY_TYPE` map in `@golemui/gui-schemas`.
|
|
20
21
|
*/
|
|
21
22
|
export declare const COMPONENT_SCHEMAS: Record<string, WidgetSchema>;
|
|
22
23
|
export declare const ALL_SCHEMAS: WidgetSchema[];
|
|
@@ -2,10 +2,22 @@ import { ValidateFunction } from 'ajv';
|
|
|
2
2
|
export declare function getValidatorBranches(): readonly string[];
|
|
3
3
|
/**
|
|
4
4
|
* Returns a validator that checks a GolemUI `validator` field against the branch corresponding
|
|
5
|
-
* to its `type` value (e.g. `type: 'string'`
|
|
6
|
-
* validator's type isn't a known branch.
|
|
5
|
+
* to its `type` value (e.g. `type: 'string'` selects the stringValidator branch). Returns null
|
|
6
|
+
* if the validator's type isn't a known branch.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getValidatorBranchValidator(validatorType: string): ValidateFunction | null;
|
|
9
|
+
/**
|
|
10
|
+
* Returns a validator for a chunk reference (`{ "$ref": "./x.form-chunk.json" }`), which the
|
|
11
|
+
* `formWidget` oneOf accepts anywhere a widget can appear.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getChunkRefValidator(): ValidateFunction;
|
|
14
|
+
export declare function getCustomWidgetKinds(): readonly string[];
|
|
15
|
+
/**
|
|
16
|
+
* Returns a validator that checks a custom widget against the `custom.schema.json` branch
|
|
17
|
+
* matching its `kind`, with nested content loosened the same way {@link getShallowWidgetValidator}
|
|
18
|
+
* loosens it. Returns null if the kind is not one of the four allowed values.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCustomWidgetValidator(kind: string): ValidateFunction | null;
|
|
9
21
|
/**
|
|
10
22
|
* Returns a validator for the given widget type that checks the widget's own properties without
|
|
11
23
|
* recursing into nested widgets. Returns null if the widget type is unknown.
|
package/json.js
CHANGED
package/lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-
|
|
2
|
-
import { D, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, l, f as f2, t } from "./list-dx-factories-
|
|
1
|
+
import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-zrVPpS-8.js";
|
|
2
|
+
import { D, a as a2, b as b2, c as c2, d as d2, e as e2, g as g2, l, f as f2, t } from "./list-dx-factories-BHlwQnVh.js";
|
|
3
3
|
export {
|
|
4
4
|
D as DX_CHECK_CODE_TOOL,
|
|
5
5
|
a2 as DX_GET_SPEC_TOOL,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as checkReactiveExpression, i as checkBooleanValidatorRules } from "./get-concept-
|
|
1
|
+
import { h as checkReactiveExpression, i as checkBooleanValidatorRules } from "./get-concept-zrVPpS-8.js";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { resolve, join, dirname } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemui/gui-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"ajv": "^8.17.1",
|
|
44
44
|
"ajv-formats": "^3.0.1",
|
|
45
45
|
"typescript": "^5.9.2",
|
|
46
|
-
"@golemui/gui-schemas": "1.
|
|
47
|
-
"@golemui/gui-shared": "1.
|
|
48
|
-
"@golemui/gui-validators": "1.
|
|
49
|
-
"@golemui/core": "1.
|
|
46
|
+
"@golemui/gui-schemas": "1.3.0",
|
|
47
|
+
"@golemui/gui-shared": "1.3.0",
|
|
48
|
+
"@golemui/gui-validators": "1.3.0",
|
|
49
|
+
"@golemui/core": "1.3.0",
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
51
51
|
"zod": "^4.0.0",
|
|
52
52
|
"@standard-schema/spec": "^1.0.0"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published form schema URL emitted as `$schema` in every example and
|
|
3
|
+
* generated form definition. It is kept resolving by the alias file
|
|
4
|
+
* `libs/schemas/site/form.schema.json`, which forwards to the gui form
|
|
5
|
+
* envelope. A spec asserts this constant matches that alias `$id`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FORM_SCHEMA_URL = "https://golemui.com/schemas/form.schema.json";
|