@golemui/gui-mcp 1.0.0-rc.3 → 1.0.0-rc.5

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 (37) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +64 -23
  4. package/cli.js +43 -35
  5. package/dx/check-dx-code.d.ts +25 -0
  6. package/dx/dx-lint.d.ts +27 -0
  7. package/dx/dx-specs.d.ts +70 -0
  8. package/dx/get-dx-spec.d.ts +27 -0
  9. package/dx/instructions.d.ts +7 -0
  10. package/dx/list-dx-factories.d.ts +19 -0
  11. package/dx/tools.d.ts +3 -0
  12. package/dx/type-graph.d.ts +10 -0
  13. package/dx/typecheck.d.ts +41 -0
  14. package/{get-concept-B7s_l8Qs.js → get-concept-Cy3zD1BS.js} +22 -16
  15. package/{tools → json}/generate-from-json-schema.d.ts +3 -3
  16. package/{tools → json}/generate-from-openapi.d.ts +3 -3
  17. package/{tools → json}/get-widget-spec.d.ts +3 -3
  18. package/json/instructions.d.ts +6 -0
  19. package/json/tools.d.ts +3 -0
  20. package/{tools → json}/validate-form-definition.d.ts +5 -5
  21. package/json.d.ts +7 -0
  22. package/json.js +13 -0
  23. package/lib.d.ts +11 -7
  24. package/lib.js +17 -6
  25. package/list-dx-factories-CF4ExKyx.js +602 -0
  26. package/package.json +16 -7
  27. package/{lint → shared/lint}/reactive-expressions.d.ts +8 -0
  28. package/shared/tool.d.ts +49 -0
  29. package/shared/tools.d.ts +7 -0
  30. /package/{utils → json}/errors.d.ts +0 -0
  31. /package/{mapping → json/mapping}/json-schema-to-gui.d.ts +0 -0
  32. /package/{mapping → json/mapping}/validator.d.ts +0 -0
  33. /package/{schemas → json/schemas}/ajv.d.ts +0 -0
  34. /package/{schemas → json/schemas}/index.d.ts +0 -0
  35. /package/{schemas → json/schemas}/shallow-validators.d.ts +0 -0
  36. /package/{lint → json}/string-interpolation.d.ts +0 -0
  37. /package/{tools → shared}/get-concept.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { JsonSchemaLike } from '../mapping/json-schema-to-gui';
1
+ import { JsonSchemaLike } from './mapping/json-schema-to-gui';
2
2
  import { validateFormDefinition } from './validate-form-definition';
3
3
  export type GenerateFromJsonSchemaInput = {
4
4
  jsonSchema: JsonSchemaLike;
@@ -18,8 +18,8 @@ export type GenerateFromJsonSchemaResult = {
18
18
  validation: ReturnType<typeof validateFormDefinition>;
19
19
  };
20
20
  export declare function generateFromJsonSchema(input: GenerateFromJsonSchemaInput): GenerateFromJsonSchemaResult;
21
- export declare const GENERATE_FROM_JSON_SCHEMA_TOOL: {
22
- readonly name: "generate_from_json_schema";
21
+ export declare const JSON_GENERATE_FROM_SCHEMA_TOOL: {
22
+ readonly name: "json_generate_from_schema";
23
23
  readonly description: string;
24
24
  readonly inputSchema: {
25
25
  readonly type: "object";
@@ -1,4 +1,4 @@
1
- import { JsonSchemaLike } from '../mapping/json-schema-to-gui';
1
+ import { JsonSchemaLike } from './mapping/json-schema-to-gui';
2
2
  import { validateFormDefinition } from './validate-form-definition';
3
3
  type OpenAPIDoc = {
4
4
  openapi?: string;
@@ -47,8 +47,8 @@ export type GenerateFromOpenapiResult = {
47
47
  validation: ReturnType<typeof validateFormDefinition>;
48
48
  };
49
49
  export declare function generateFromOpenapi(input: GenerateFromOpenapiInput): Promise<GenerateFromOpenapiResult>;
50
- export declare const GENERATE_FROM_OPENAPI_TOOL: {
51
- readonly name: "generate_from_openapi";
50
+ export declare const JSON_GENERATE_FROM_OPENAPI_TOOL: {
51
+ readonly name: "json_generate_from_openapi";
52
52
  readonly description: string;
53
53
  readonly inputSchema: {
54
54
  readonly type: "object";
@@ -1,4 +1,4 @@
1
- import { WidgetSchema } from '../schemas/index';
1
+ import { WidgetSchema } from './schemas/index';
2
2
  export type GetWidgetSpecInput = {
3
3
  widgetType: string;
4
4
  };
@@ -12,8 +12,8 @@ export type GetWidgetSpecResult = {
12
12
  export declare function getWidgetSpec(input: GetWidgetSpecInput): GetWidgetSpecResult;
13
13
  export declare function listWidgetTypes(): string[];
14
14
  export declare function getValidatorsSchema(): WidgetSchema;
15
- export declare const GET_WIDGET_SPEC_TOOL: {
16
- readonly name: "get_widget_spec";
15
+ export declare const JSON_GET_WIDGET_SPEC_TOOL: {
16
+ readonly name: "json_get_widget_spec";
17
17
  readonly description: string;
18
18
  readonly inputSchema: {
19
19
  readonly type: "object";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The JSON form-definition half of the server's connect-time guidance (the MCP
3
+ * `initialize.instructions` field). Composed with the DX half in `cli.ts`. Owned here so
4
+ * the JSON path's routing advice evolves independently of the `gui.*` path's.
5
+ */
6
+ export declare const JSON_INSTRUCTIONS: string;
@@ -0,0 +1,3 @@
1
+ import { ToolEntry } from '../shared/tool';
2
+ /** The JSON form-definition path's MCP tools: generate, look up, and validate. */
3
+ export declare const jsonTools: ToolEntry[];
@@ -1,6 +1,6 @@
1
- import { FormattedError } from '../utils/errors';
2
- import { ExpressionFinding } from '../lint/reactive-expressions';
3
- import { InterpolationFinding } from '../lint/string-interpolation';
1
+ import { FormattedError } from './errors';
2
+ import { ExpressionFinding } from '../shared/lint/reactive-expressions';
3
+ import { InterpolationFinding } from './string-interpolation';
4
4
  export type ValidateInput = {
5
5
  formDefinition: unknown;
6
6
  };
@@ -12,8 +12,8 @@ export type ValidateResult = {
12
12
  interpolationWarnings: InterpolationFinding[];
13
13
  };
14
14
  export declare function validateFormDefinition(input: ValidateInput): ValidateResult;
15
- export declare const VALIDATE_FORM_DEFINITION_TOOL: {
16
- readonly name: "validate_form_definition";
15
+ export declare const JSON_VALIDATE_FORM_DEFINITION_TOOL: {
16
+ readonly name: "json_validate_form_definition";
17
17
  readonly description: string;
18
18
  readonly inputSchema: {
19
19
  readonly type: "object";
package/json.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export { validateFormDefinition, JSON_VALIDATE_FORM_DEFINITION_TOOL, } from './json/validate-form-definition';
2
+ export type { ValidateInput, ValidateResult } from './json/validate-form-definition';
3
+ export { generateFromJsonSchema, JSON_GENERATE_FROM_SCHEMA_TOOL, } from './json/generate-from-json-schema';
4
+ export type { GenerateFromJsonSchemaInput, GenerateFromJsonSchemaResult, } from './json/generate-from-json-schema';
5
+ export { generateFromOpenapi, JSON_GENERATE_FROM_OPENAPI_TOOL } from './json/generate-from-openapi';
6
+ export { getWidgetSpec, JSON_GET_WIDGET_SPEC_TOOL } from './json/get-widget-spec';
7
+ export { getConcept, GET_CONCEPT_TOOL } from './shared/get-concept';
package/json.js ADDED
@@ -0,0 +1,13 @@
1
+ import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-Cy3zD1BS.js";
2
+ export {
3
+ G as GET_CONCEPT_TOOL,
4
+ J as JSON_GENERATE_FROM_OPENAPI_TOOL,
5
+ a as JSON_GENERATE_FROM_SCHEMA_TOOL,
6
+ b as JSON_GET_WIDGET_SPEC_TOOL,
7
+ c as JSON_VALIDATE_FORM_DEFINITION_TOOL,
8
+ g as generateFromJsonSchema,
9
+ d as generateFromOpenapi,
10
+ e as getConcept,
11
+ f as getWidgetSpec,
12
+ v as validateFormDefinition
13
+ };
package/lib.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- export { validateFormDefinition, VALIDATE_FORM_DEFINITION_TOOL, } from './tools/validate-form-definition';
2
- export type { ValidateInput, ValidateResult } from './tools/validate-form-definition';
3
- export { generateFromJsonSchema, GENERATE_FROM_JSON_SCHEMA_TOOL, } from './tools/generate-from-json-schema';
4
- export type { GenerateFromJsonSchemaInput, GenerateFromJsonSchemaResult, } from './tools/generate-from-json-schema';
5
- export { generateFromOpenapi, GENERATE_FROM_OPENAPI_TOOL } from './tools/generate-from-openapi';
6
- export { getWidgetSpec, GET_WIDGET_SPEC_TOOL } from './tools/get-widget-spec';
7
- export { getConcept, GET_CONCEPT_TOOL } from './tools/get-concept';
1
+ export * from './json';
2
+ export { checkDxCode, DX_CHECK_CODE_TOOL } from './dx/check-dx-code';
3
+ export type { CheckDxCodeInput, CheckDxCodeResult } from './dx/check-dx-code';
4
+ export { getDxSpec, DX_GET_SPEC_TOOL } from './dx/get-dx-spec';
5
+ export type { GetDxSpecInput, GetDxSpecResult } from './dx/get-dx-spec';
6
+ export { listDxFactoriesCatalog, DX_LIST_FACTORIES_TOOL } from './dx/list-dx-factories';
7
+ export type { ListDxFactoriesResult } from './dx/list-dx-factories';
8
+ export { typeCheckDx } from './dx/typecheck';
9
+ export type { DxDiagnostic, DxCheckResult } from './dx/typecheck';
10
+ export { DX_SPECS, listDxFactories, dxCatalog } from './dx/dx-specs';
11
+ export type { DxSpec, DxNamespace, DxCatalog, DxCatalogEntry } from './dx/dx-specs';
package/lib.js CHANGED
@@ -1,13 +1,24 @@
1
- import { G, a, b, c, V, g, d, e, f, v } from "./get-concept-B7s_l8Qs.js";
1
+ import { G, J, a, b, c, g, d, e, f, v } from "./get-concept-Cy3zD1BS.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-CF4ExKyx.js";
2
3
  export {
3
- G as GENERATE_FROM_JSON_SCHEMA_TOOL,
4
- a as GENERATE_FROM_OPENAPI_TOOL,
5
- b as GET_CONCEPT_TOOL,
6
- c as GET_WIDGET_SPEC_TOOL,
7
- V as VALIDATE_FORM_DEFINITION_TOOL,
4
+ D as DX_CHECK_CODE_TOOL,
5
+ a2 as DX_GET_SPEC_TOOL,
6
+ b2 as DX_LIST_FACTORIES_TOOL,
7
+ c2 as DX_SPECS,
8
+ G as GET_CONCEPT_TOOL,
9
+ J as JSON_GENERATE_FROM_OPENAPI_TOOL,
10
+ a as JSON_GENERATE_FROM_SCHEMA_TOOL,
11
+ b as JSON_GET_WIDGET_SPEC_TOOL,
12
+ c as JSON_VALIDATE_FORM_DEFINITION_TOOL,
13
+ d2 as checkDxCode,
14
+ e2 as dxCatalog,
8
15
  g as generateFromJsonSchema,
9
16
  d as generateFromOpenapi,
10
17
  e as getConcept,
18
+ g2 as getDxSpec,
11
19
  f as getWidgetSpec,
20
+ l as listDxFactories,
21
+ f2 as listDxFactoriesCatalog,
22
+ t as typeCheckDx,
12
23
  v as validateFormDefinition
13
24
  };