@restforgejs/mcp-server 1.2.2 → 1.2.4
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/dist/server.js +71 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/codegen/create-kafka-consumer.d.ts +2 -0
- package/dist/tools/codegen/create-kafka-consumer.js +140 -0
- package/dist/tools/codegen/create-kafka-consumer.js.map +1 -0
- package/dist/tools/codegen/create-processor.d.ts +2 -0
- package/dist/tools/codegen/create-processor.js +157 -0
- package/dist/tools/codegen/create-processor.js.map +1 -0
- package/dist/tools/codegen/generate-test.d.ts +2 -0
- package/dist/tools/codegen/generate-test.js +149 -0
- package/dist/tools/codegen/generate-test.js.map +1 -0
- package/dist/tools/codegen/index.js +8 -0
- package/dist/tools/codegen/index.js.map +1 -1
- package/dist/tools/codegen/migrate-payload.d.ts +2 -0
- package/dist/tools/codegen/migrate-payload.js +210 -0
- package/dist/tools/codegen/migrate-payload.js.map +1 -0
- package/dist/tools/data/index.d.ts +2 -0
- package/dist/tools/data/index.js +7 -0
- package/dist/tools/data/index.js.map +1 -0
- package/dist/tools/data/pull.d.ts +2 -0
- package/dist/tools/data/pull.js +202 -0
- package/dist/tools/data/pull.js.map +1 -0
- package/dist/tools/data/push.d.ts +2 -0
- package/dist/tools/data/push.js +190 -0
- package/dist/tools/data/push.js.map +1 -0
- package/dist/tools/designer/generate.js +86 -81
- package/dist/tools/designer/generate.js.map +1 -1
- package/dist/tools/designer/get-udf-catalog.d.ts +2 -0
- package/dist/tools/designer/get-udf-catalog.js +225 -0
- package/dist/tools/designer/get-udf-catalog.js.map +1 -0
- package/dist/tools/designer/index.js +2 -0
- package/dist/tools/designer/index.js.map +1 -1
- package/dist/tools/designer/init-project.js +73 -73
- package/dist/tools/designer/inspect-plugin.js +70 -65
- package/dist/tools/designer/inspect-plugin.js.map +1 -1
- package/dist/tools/designer/list-plugins.js +62 -62
- package/dist/tools/designer/preview-files.js +72 -67
- package/dist/tools/designer/preview-files.js.map +1 -1
- package/dist/tools/designer/scaffold-plugin.js +72 -72
- package/dist/tools/designer/validate-payload.js +74 -69
- package/dist/tools/designer/validate-payload.js.map +1 -1
- package/dist/tools/key/generate.d.ts +2 -0
- package/dist/tools/key/generate.js +130 -0
- package/dist/tools/key/generate.js.map +1 -0
- package/dist/tools/key/index.d.ts +2 -0
- package/dist/tools/key/index.js +9 -0
- package/dist/tools/key/index.js.map +1 -0
- package/dist/tools/key/list.d.ts +2 -0
- package/dist/tools/key/list.js +126 -0
- package/dist/tools/key/list.js.map +1 -0
- package/dist/tools/key/revoke.d.ts +2 -0
- package/dist/tools/key/revoke.js +117 -0
- package/dist/tools/key/revoke.js.map +1 -0
- package/dist/tools/project/delete.d.ts +2 -0
- package/dist/tools/project/delete.js +116 -0
- package/dist/tools/project/delete.js.map +1 -0
- package/dist/tools/project/index.d.ts +2 -0
- package/dist/tools/project/index.js +7 -0
- package/dist/tools/project/index.js.map +1 -0
- package/dist/tools/project/list.d.ts +2 -0
- package/dist/tools/project/list.js +107 -0
- package/dist/tools/project/list.js.map +1 -0
- package/dist/tools/runtime/generate-launcher.js +3 -3
- package/dist/tools/setup/clear-default-config.d.ts +2 -0
- package/dist/tools/setup/clear-default-config.js +104 -0
- package/dist/tools/setup/clear-default-config.js.map +1 -0
- package/dist/tools/setup/get-default-config.d.ts +2 -0
- package/dist/tools/setup/get-default-config.js +104 -0
- package/dist/tools/setup/get-default-config.js.map +1 -0
- package/dist/tools/setup/index.js +8 -0
- package/dist/tools/setup/index.js.map +1 -1
- package/dist/tools/setup/init-config.js +3 -5
- package/dist/tools/setup/init-config.js.map +1 -1
- package/dist/tools/setup/list-configs.d.ts +2 -0
- package/dist/tools/setup/list-configs.js +104 -0
- package/dist/tools/setup/list-configs.js.map +1 -0
- package/dist/tools/setup/set-default-config.d.ts +2 -0
- package/dist/tools/setup/set-default-config.js +109 -0
- package/dist/tools/setup/set-default-config.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,34 +4,39 @@ import { execProcess } from '../../lib/exec.js';
|
|
|
4
4
|
export function registerDesignerGenerate(server) {
|
|
5
5
|
server.registerTool('designer_generate', {
|
|
6
6
|
title: 'Generate Designer Frontend',
|
|
7
|
-
description: `Generate frontend code from a UI Definition File (UDF) payload, by running restforge-designer generate. This WRITES the generated frontend files to disk.
|
|
8
|
-
|
|
9
|
-
USE WHEN:
|
|
10
|
-
- The user asks to generate / build the frontend application from a UDF payload
|
|
11
|
-
- The user asks things like "generate aplikasi frontend dari UDF", "build frontend dari payload", "generate satu page/form" (scope=form), "generate the frontend code", "build the frontend from this UI definition", "generate frontend designer"
|
|
12
|
-
- The user has a valid UDF payload and wants the real frontend files produced (not just a preview)
|
|
13
|
-
- The user wants to generate a single page/form rather than the whole app (use scope=form with the page id)
|
|
14
|
-
|
|
15
|
-
DO NOT USE FOR:
|
|
16
|
-
- Previewing which files would be generated WITHOUT writing them -> use 'designer_preview_files'
|
|
17
|
-
- Validating that the UDF payload is structurally correct -> use 'designer_validate_payload'
|
|
18
|
-
- Initialising a new project from a plugin -> use 'designer_init_project'
|
|
19
|
-
- Creating a new custom plugin from a template -> use 'designer_scaffold_plugin'
|
|
20
|
-
|
|
21
|
-
This tool wraps the RESTForge Designer CLI command: restforge-designer generate --payload=<payload> --output=<output> [optional flags], run in the given cwd.
|
|
22
|
-
The --payload and --output flags are always sent so the binary never drops into interactive prompt mode. Optional flags (plugin override, overwrite, scope, page, skip shared, plugins dir, license) are forwarded only when supplied; the binary defaults to scope 'app' when --scope is omitted.
|
|
23
|
-
This operation is license-gated: the RESTForge Designer license must be active for generation to succeed.
|
|
24
|
-
The recommended flow is read-before-write (§5.3): validate the payload, then preview the files, then generate.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
7
|
+
description: `Generate frontend code from a UI Definition File (UDF) payload, by running restforge-designer generate. This WRITES the generated frontend files to disk.
|
|
8
|
+
|
|
9
|
+
USE WHEN:
|
|
10
|
+
- The user asks to generate / build the frontend application from a UDF payload
|
|
11
|
+
- The user asks things like "generate aplikasi frontend dari UDF", "build frontend dari payload", "generate satu page/form" (scope=form), "generate the frontend code", "build the frontend from this UI definition", "generate frontend designer"
|
|
12
|
+
- The user has a valid UDF payload and wants the real frontend files produced (not just a preview)
|
|
13
|
+
- The user wants to generate a single page/form rather than the whole app (use scope=form with the page id)
|
|
14
|
+
|
|
15
|
+
DO NOT USE FOR:
|
|
16
|
+
- Previewing which files would be generated WITHOUT writing them -> use 'designer_preview_files'
|
|
17
|
+
- Validating that the UDF payload is structurally correct -> use 'designer_validate_payload'
|
|
18
|
+
- Initialising a new project from a plugin -> use 'designer_init_project'
|
|
19
|
+
- Creating a new custom plugin from a template -> use 'designer_scaffold_plugin'
|
|
20
|
+
|
|
21
|
+
This tool wraps the RESTForge Designer CLI command: restforge-designer generate --payload=<payload> --output=<output> [optional flags], run in the given cwd.
|
|
22
|
+
The --payload and --output flags are always sent so the binary never drops into interactive prompt mode. Optional flags (plugin override, overwrite, scope, page, skip shared, plugins dir, license) are forwarded only when supplied; the binary defaults to scope 'app' when --scope is omitted.
|
|
23
|
+
This operation is license-gated: the RESTForge Designer license must be active for generation to succeed.
|
|
24
|
+
The recommended flow is read-before-write (§5.3): validate the payload, then preview the files, then generate.
|
|
25
|
+
|
|
26
|
+
Cross-reference (grounding & on-ramp):
|
|
27
|
+
- Before authoring or generating from a UDF, ground its shape (valid field types, required appConfig fields, enums, limits) against the designer's own rules via 'designer_get_udf_catalog' — the authoritative source of UDF structure.
|
|
28
|
+
- If no UDF payload exists yet but the user has a backend RDF, the on-ramp is 'codegen_migrate_payload' (RDF -> split UDF set); validate and preview it before generating.
|
|
29
|
+
- Canonical UDF flow: codegen_migrate_payload -> designer_get_udf_catalog -> designer_validate_payload -> designer_preview_files -> designer_generate.
|
|
30
|
+
|
|
31
|
+
Preconditions:
|
|
32
|
+
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
33
|
+
'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
|
|
34
|
+
- A valid, active RESTForge Designer license is required (the operation is license-gated).
|
|
35
|
+
|
|
36
|
+
PRESENTATION GUIDANCE:
|
|
37
|
+
- Match the user's language. If the user writes in Indonesian, respond in Indonesian.
|
|
38
|
+
- Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "generate the frontend code", "validate the UI definition", "preview the generated files").
|
|
39
|
+
- Speak in plain language. Confirm what was generated and where; do not paste raw CLI output unless the user explicitly asks.
|
|
35
40
|
- When a precondition is not met, frame it as a question or next-step suggestion rather than an error.`,
|
|
36
41
|
inputSchema: {
|
|
37
42
|
cwd: z
|
|
@@ -97,18 +102,18 @@ PRESENTATION GUIDANCE:
|
|
|
97
102
|
content: [
|
|
98
103
|
{
|
|
99
104
|
type: 'text',
|
|
100
|
-
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
101
|
-
|
|
102
|
-
Working directory: ${projectCwd}
|
|
103
|
-
Payload: ${payload}
|
|
104
|
-
Output: ${output}
|
|
105
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
106
|
-
Probe command: ${probe.command}
|
|
107
|
-
Exit code: ${probe.exitCode}
|
|
108
|
-
|
|
109
|
-
For the assistant:
|
|
110
|
-
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before frontend code can be generated.
|
|
111
|
-
- When explaining to the user, say something like "the RESTForge Designer tool isn't installed or isn't on your PATH yet — please install it and try again". Do not mention internal tool names.
|
|
105
|
+
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
106
|
+
|
|
107
|
+
Working directory: ${projectCwd}
|
|
108
|
+
Payload: ${payload}
|
|
109
|
+
Output: ${output}
|
|
110
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
111
|
+
Probe command: ${probe.command}
|
|
112
|
+
Exit code: ${probe.exitCode}
|
|
113
|
+
|
|
114
|
+
For the assistant:
|
|
115
|
+
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before frontend code can be generated.
|
|
116
|
+
- When explaining to the user, say something like "the RESTForge Designer tool isn't installed or isn't on your PATH yet — please install it and try again". Do not mention internal tool names.
|
|
112
117
|
- Once it is installed, retry generating the frontend code.`,
|
|
113
118
|
},
|
|
114
119
|
],
|
|
@@ -148,29 +153,29 @@ For the assistant:
|
|
|
148
153
|
content: [
|
|
149
154
|
{
|
|
150
155
|
type: 'text',
|
|
151
|
-
text: `Generating the frontend code did not complete.
|
|
152
|
-
|
|
153
|
-
Working directory: ${projectCwd}
|
|
154
|
-
Payload: ${payload}
|
|
155
|
-
Output: ${output}
|
|
156
|
-
Scope: ${scope ?? 'app (default)'}
|
|
157
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
158
|
-
Command: ${result.command}
|
|
159
|
-
Exit code: ${result.exitCode}
|
|
160
|
-
|
|
161
|
-
--- stdout ---
|
|
162
|
-
${result.stdout}
|
|
163
|
-
--- end stdout ---
|
|
164
|
-
${stderrBlock}
|
|
165
|
-
For the assistant:
|
|
166
|
-
- The generation did not finish successfully, so the output files may be missing or partial. Read the CLI output above and explain the most likely cause to the user in plain language. Common causes:
|
|
167
|
-
* The RESTForge Designer license is not active — this operation is license-gated. Suggest the user activate their RESTForge Designer license through the Designer desktop application or its own CLI, then retry. Do not name any internal tool.
|
|
168
|
-
* The UDF payload is invalid — suggest validating the payload first to pinpoint the structural errors, then retry.
|
|
169
|
-
* The payload relies on 'extends' / 'include' references — soft note: if the same payload passes validation but generation fails with an appConfig/plugin error (e.g. the plugin or app config "not found"), the payload may use 'extends' / 'include' that generate does not appear to merge the way validation does. As a possible workaround, suggest a self-contained payload (inline appConfig and pages) or an already-merged file. This is a tentative hint, not a guaranteed rule — do not state it as certain or tie it to a specific version.
|
|
170
|
-
* The payload file path is wrong / the file was not found — suggest checking the path.
|
|
171
|
-
* The plugin id in the payload (or the plugins directory) could not be resolved — suggest listing the available plugins.
|
|
172
|
-
* The output directory already exists and overwrite was not enabled — suggest retrying with overwrite, or choosing a different output path.
|
|
173
|
-
* Exit code -1 — the command crashed or timed out; offer to retry.
|
|
156
|
+
text: `Generating the frontend code did not complete.
|
|
157
|
+
|
|
158
|
+
Working directory: ${projectCwd}
|
|
159
|
+
Payload: ${payload}
|
|
160
|
+
Output: ${output}
|
|
161
|
+
Scope: ${scope ?? 'app (default)'}
|
|
162
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
163
|
+
Command: ${result.command}
|
|
164
|
+
Exit code: ${result.exitCode}
|
|
165
|
+
|
|
166
|
+
--- stdout ---
|
|
167
|
+
${result.stdout}
|
|
168
|
+
--- end stdout ---
|
|
169
|
+
${stderrBlock}
|
|
170
|
+
For the assistant:
|
|
171
|
+
- The generation did not finish successfully, so the output files may be missing or partial. Read the CLI output above and explain the most likely cause to the user in plain language. Common causes:
|
|
172
|
+
* The RESTForge Designer license is not active — this operation is license-gated. Suggest the user activate their RESTForge Designer license through the Designer desktop application or its own CLI, then retry. Do not name any internal tool.
|
|
173
|
+
* The UDF payload is invalid — suggest validating the payload first to pinpoint the structural errors, then retry.
|
|
174
|
+
* The payload relies on 'extends' / 'include' references — soft note: if the same payload passes validation but generation fails with an appConfig/plugin error (e.g. the plugin or app config "not found"), the payload may use 'extends' / 'include' that generate does not appear to merge the way validation does. As a possible workaround, suggest a self-contained payload (inline appConfig and pages) or an already-merged file. This is a tentative hint, not a guaranteed rule — do not state it as certain or tie it to a specific version.
|
|
175
|
+
* The payload file path is wrong / the file was not found — suggest checking the path.
|
|
176
|
+
* The plugin id in the payload (or the plugins directory) could not be resolved — suggest listing the available plugins.
|
|
177
|
+
* The output directory already exists and overwrite was not enabled — suggest retrying with overwrite, or choosing a different output path.
|
|
178
|
+
* Exit code -1 — the command crashed or timed out; offer to retry.
|
|
174
179
|
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
175
180
|
},
|
|
176
181
|
],
|
|
@@ -185,24 +190,24 @@ For the assistant:
|
|
|
185
190
|
content: [
|
|
186
191
|
{
|
|
187
192
|
type: 'text',
|
|
188
|
-
text: `Frontend code generated successfully.
|
|
189
|
-
|
|
190
|
-
Working directory: ${projectCwd}
|
|
191
|
-
Payload: ${payload}
|
|
192
|
-
Output: ${output}
|
|
193
|
-
Scope: ${scope ?? 'app (default)'}
|
|
194
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
195
|
-
Command: ${result.command}
|
|
196
|
-
Exit code: ${result.exitCode}
|
|
197
|
-
|
|
198
|
-
--- stdout ---
|
|
199
|
-
${result.stdout}
|
|
200
|
-
--- end stdout ---
|
|
201
|
-
${stderrBlock}
|
|
202
|
-
For the assistant:
|
|
203
|
-
- Confirm to the user that the frontend code was generated. Mention the output location and the scope (whole app, or a single page/form) in plain language.
|
|
204
|
-
- Summarise what was produced from the CLI output (how many files, what kind) rather than pasting it.
|
|
205
|
-
- Suggest a sensible next step, e.g. running or inspecting the generated frontend.
|
|
193
|
+
text: `Frontend code generated successfully.
|
|
194
|
+
|
|
195
|
+
Working directory: ${projectCwd}
|
|
196
|
+
Payload: ${payload}
|
|
197
|
+
Output: ${output}
|
|
198
|
+
Scope: ${scope ?? 'app (default)'}
|
|
199
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
200
|
+
Command: ${result.command}
|
|
201
|
+
Exit code: ${result.exitCode}
|
|
202
|
+
|
|
203
|
+
--- stdout ---
|
|
204
|
+
${result.stdout}
|
|
205
|
+
--- end stdout ---
|
|
206
|
+
${stderrBlock}
|
|
207
|
+
For the assistant:
|
|
208
|
+
- Confirm to the user that the frontend code was generated. Mention the output location and the scope (whole app, or a single page/form) in plain language.
|
|
209
|
+
- Summarise what was produced from the CLI output (how many files, what kind) rather than pasting it.
|
|
210
|
+
- Suggest a sensible next step, e.g. running or inspecting the generated frontend.
|
|
206
211
|
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
207
212
|
},
|
|
208
213
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/tools/designer/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/tools/designer/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uGAiCoF;QACjG,WAAW,EAAE;YACX,GAAG,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,gEAAgE,CAAC;YAC7E,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,4EAA4E,CAAC;YACzF,MAAM,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,6GAA6G,CAAC;YAC1H,MAAM,EA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F;QACpF,oFAAoF;QACpF,oBAAoB;QACpB,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM;gBAC/B,CAAC,CAAC,qBAAqB,MAAM,CAAC,MAAM,wBAAwB;gBAC5D,CAAC,CAAC,EAAE,CAAC;YACP,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;qBAEC,UAAU;WACpB,OAAO;UACR,MAAM;SACP,KAAK,IAAI,eAAe;eAClB,UAAU,IAAI,aAAa;WAC/B,MAAM,CAAC,OAAO;aACZ,MAAM,CAAC,QAAQ;;;EAG1B,MAAM,CAAC,MAAM;;EAEb,WAAW;;;;;;;;;;kIAUqH;qBACrH;iBACF;gBACD,OAAO,EAAE,IAAI,EAAE,yCAAyC;aACzD,CAAC;QACJ,CAAC;QAED,oEAAoE;QACpE,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM;YAC/B,CAAC,CAAC,qBAAqB,MAAM,CAAC,MAAM,wBAAwB;YAC5D,CAAC,CAAC,EAAE,CAAC;QACP,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;qBAEG,UAAU;WACpB,OAAO;UACR,MAAM;SACP,KAAK,IAAI,eAAe;eAClB,UAAU,IAAI,aAAa;WAC/B,MAAM,CAAC,OAAO;aACZ,MAAM,CAAC,QAAQ;;;EAG1B,MAAM,CAAC,MAAM;;EAEb,WAAW;;;;;kIAKqH;iBACvH;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { execProcess } from '../../lib/exec.js';
|
|
4
|
+
export function registerDesignerGetUdfCatalog(server) {
|
|
5
|
+
server.registerTool('designer_get_udf_catalog', {
|
|
6
|
+
title: 'Get UDF Catalog',
|
|
7
|
+
description: `Get the authoritative JSON catalog of RESTForge Designer UDF structure and rules (valid field types, editor modes, badge colors, id-generation options, navigation item types/depth limits, required appConfig fields, port range, number format, and dashboard widget/chart/data-source options), by running restforge-designer catalog. The catalog is serialized from the designer's own validator constants (single source of truth), so it stays in sync with the installed designer version and never drifts.
|
|
8
|
+
|
|
9
|
+
USE WHEN:
|
|
10
|
+
- Before composing or editing a UDF payload — to ground valid field types and required fields against the designer's own rules
|
|
11
|
+
- The user asks things like "tipe field UDF apa yang valid", "valid UDF field types", "struktur appConfig", "required appConfig fields", "aturan UDF designer", "enum UDF", "what badge colors are allowed", "apa yang boleh di dashboard widget", "which dashboard widgets/charts are available", "show me the UDF catalog"
|
|
12
|
+
- 'designer_validate_payload' rejects a UDF payload and you need the authoritative shape (allowed enum values, required fields) to fix it
|
|
13
|
+
- The user wants the catalog of dashboard widget types, chart engines, or data source methods for a designer UDF
|
|
14
|
+
|
|
15
|
+
DO NOT USE FOR:
|
|
16
|
+
- Validating a concrete UDF payload against a plugin -> use 'designer_validate_payload'
|
|
17
|
+
- Reading the identity/metadata or schema of ONE specific plugin -> use 'designer_inspect_plugin'
|
|
18
|
+
- Listing available designer plugins -> use 'designer_list_plugins'
|
|
19
|
+
- The BACKEND field validation catalog (RDF payload fieldValidation constraints, data types, format presets) -> use 'codegen_get_field_validation_catalog'
|
|
20
|
+
|
|
21
|
+
This tool wraps the RESTForge Designer CLI command: restforge-designer catalog [--section=<fields|navigation|app-config|dashboard|all>], run in the given cwd.
|
|
22
|
+
The catalog is a static constant (it does not depend on cwd) and the command does not modify any file and does not require a license.
|
|
23
|
+
|
|
24
|
+
Preconditions:
|
|
25
|
+
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
26
|
+
'restforge-designer --version'; if the binary is missing, the response surfaces that as a non-error precondition.
|
|
27
|
+
- The installed designer must be recent enough to support the 'catalog' command. Older designer builds do not have it; in
|
|
28
|
+
that case the response surfaces a non-error precondition suggesting the designer be updated.
|
|
29
|
+
|
|
30
|
+
Cross-reference (read-before-write):
|
|
31
|
+
- Call this tool BEFORE authoring or editing a UDF payload, and before generating frontend code, to ground the payload shape against the designer's own rules.
|
|
32
|
+
|
|
33
|
+
PRESENTATION GUIDANCE:
|
|
34
|
+
- Match the user's language. If the user writes in Indonesian, respond in Indonesian.
|
|
35
|
+
- Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "look up the UDF rules", "validate the payload", "generate the frontend code").
|
|
36
|
+
- Speak in plain language. Summarise the catalog (e.g. how many valid field types, which sections are present); do not paste the entire JSON unless the user explicitly asks for it.
|
|
37
|
+
- When a precondition is not met (binary missing, or too old to support the catalog), frame it as a question or next-step suggestion rather than an error.`,
|
|
38
|
+
inputSchema: {
|
|
39
|
+
cwd: z
|
|
40
|
+
.string()
|
|
41
|
+
.min(1)
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Working directory where the binary is run. The catalog does not depend on cwd (it is a static constant); defaults to the process cwd when omitted.'),
|
|
44
|
+
section: z
|
|
45
|
+
.enum(['fields', 'navigation', 'app-config', 'dashboard', 'all'])
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('Which slice of the catalog to return. The binary defaults to "all" when omitted (forward-only: not sent unless supplied).'),
|
|
48
|
+
},
|
|
49
|
+
annotations: {
|
|
50
|
+
title: 'Get UDF Catalog',
|
|
51
|
+
readOnlyHint: true,
|
|
52
|
+
idempotentHint: true,
|
|
53
|
+
},
|
|
54
|
+
}, async ({ cwd, section }) => {
|
|
55
|
+
const resolvedCwd = cwd ? resolve(cwd) : process.cwd();
|
|
56
|
+
// Precondition check: the restforge-designer binary must be reachable on PATH.
|
|
57
|
+
// Treated as a non-error precondition per the authoring guide §3.4.
|
|
58
|
+
const probe = await execProcess('restforge-designer', ['--version'], {
|
|
59
|
+
cwd: resolvedCwd,
|
|
60
|
+
timeout: 10_000,
|
|
61
|
+
});
|
|
62
|
+
if (!probe.success) {
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
68
|
+
|
|
69
|
+
Working directory: ${resolvedCwd}
|
|
70
|
+
Probe command: ${probe.command}
|
|
71
|
+
Exit code: ${probe.exitCode}
|
|
72
|
+
|
|
73
|
+
For the assistant:
|
|
74
|
+
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before the UDF catalog can be retrieved.
|
|
75
|
+
- When explaining to the user, say something like "the RESTForge Designer tool isn't installed or isn't on your PATH yet — please install it and try again". Do not mention internal tool names.
|
|
76
|
+
- Once it is installed, retry getting the catalog.`,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
isError: false, // per §3.4
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// Forward only the arguments the user supplied (forward-only per §3.5 / D6).
|
|
83
|
+
const args = ['catalog'];
|
|
84
|
+
if (section)
|
|
85
|
+
args.push(`--section=${section}`);
|
|
86
|
+
const result = await execProcess('restforge-designer', args, {
|
|
87
|
+
cwd: resolvedCwd,
|
|
88
|
+
timeout: 15_000,
|
|
89
|
+
});
|
|
90
|
+
// Branch 1 — binary too old: the 'catalog' subcommand does not exist yet.
|
|
91
|
+
// Best-effort detection: a failed run whose output carries clap's
|
|
92
|
+
// "unrecognized subcommand" error. Mapped to a NON-error precondition
|
|
93
|
+
// (binary needs updating), per the campaign note and §3.4.
|
|
94
|
+
const combinedOutput = `${result.stderr}\n${result.stdout}`.toLowerCase();
|
|
95
|
+
if (!result.success && combinedOutput.includes('unrecognized subcommand')) {
|
|
96
|
+
return {
|
|
97
|
+
content: [
|
|
98
|
+
{
|
|
99
|
+
type: 'text',
|
|
100
|
+
text: `Precondition not met: the installed RESTForge Designer does not support the UDF catalog yet.
|
|
101
|
+
|
|
102
|
+
Working directory: ${resolvedCwd}
|
|
103
|
+
Installed version: ${probe.stdout.trim() || 'unknown'}
|
|
104
|
+
Command: ${result.command}
|
|
105
|
+
Exit code: ${result.exitCode}
|
|
106
|
+
|
|
107
|
+
For the assistant:
|
|
108
|
+
- The installed RESTForge Designer is too old: it does not recognize the catalog command.
|
|
109
|
+
- When explaining to the user, say something like "your RESTForge Designer is an older version that doesn't expose the UDF catalog yet — please update RESTForge Designer to the latest version and try again". Do not mention internal tool names.
|
|
110
|
+
- Once it is updated, retry getting the catalog.`,
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
isError: false, // non-error precondition: binary needs updating
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
// Branch — unexpected crash/timeout: no real exit code (-1). Pre-flight
|
|
117
|
+
// already confirmed the binary spawns, so this is a real failure per §3.4.
|
|
118
|
+
if (result.exitCode === -1) {
|
|
119
|
+
return {
|
|
120
|
+
content: [
|
|
121
|
+
{
|
|
122
|
+
type: 'text',
|
|
123
|
+
text: `Getting the UDF catalog did not complete — the command crashed or timed out.
|
|
124
|
+
|
|
125
|
+
Working directory: ${resolvedCwd}
|
|
126
|
+
Command: ${result.command}
|
|
127
|
+
|
|
128
|
+
--- stderr ---
|
|
129
|
+
${result.stderr}
|
|
130
|
+
--- end stderr ---
|
|
131
|
+
|
|
132
|
+
For the assistant:
|
|
133
|
+
- The Designer CLI did not finish (likely a crash or timeout), so there is no catalog to report.
|
|
134
|
+
- Tell the user the catalog could not be retrieved and offer to retry. Do not mention internal tool names.`,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
isError: true, // per §3.4 — unexpected crash/timeout
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
// Branch 3 — other non-zero exit: the binary recognizes 'catalog' but failed
|
|
141
|
+
// for another reason. Read-only relay per D7 (isError:false), guide the model
|
|
142
|
+
// to read the output.
|
|
143
|
+
if (!result.success) {
|
|
144
|
+
const stderrBlock = result.stderr
|
|
145
|
+
? `\n--- stderr ---\n${result.stderr}\n--- end stderr ---\n`
|
|
146
|
+
: '';
|
|
147
|
+
return {
|
|
148
|
+
content: [
|
|
149
|
+
{
|
|
150
|
+
type: 'text',
|
|
151
|
+
text: `Getting the UDF catalog ran but reported a non-zero exit.
|
|
152
|
+
|
|
153
|
+
Working directory: ${resolvedCwd}
|
|
154
|
+
Command: ${result.command}
|
|
155
|
+
Exit code: ${result.exitCode}
|
|
156
|
+
|
|
157
|
+
--- stdout ---
|
|
158
|
+
${result.stdout}
|
|
159
|
+
--- end stdout ---
|
|
160
|
+
${stderrBlock}
|
|
161
|
+
For the assistant:
|
|
162
|
+
- The Designer CLI ran to completion but returned a non-zero exit. Read the output above and relay the situation to the user; this is a verdict to convey, not a tool malfunction.
|
|
163
|
+
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
isError: false, // read-only relay per D7
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
// Branch 2 — success: pass the catalog JSON through untouched, with grounding
|
|
170
|
+
// guidance for the assistant. We do not reshape or interpret the catalog.
|
|
171
|
+
let parsed = null;
|
|
172
|
+
let prettyJson = result.stdout;
|
|
173
|
+
let catalogVersion = 'unknown';
|
|
174
|
+
let sectionsLabel = section ?? 'all';
|
|
175
|
+
try {
|
|
176
|
+
parsed = JSON.parse(result.stdout);
|
|
177
|
+
prettyJson = JSON.stringify(parsed, null, 2);
|
|
178
|
+
const root = (parsed ?? {});
|
|
179
|
+
if (typeof root.udfCatalogVersion === 'number' || typeof root.udfCatalogVersion === 'string') {
|
|
180
|
+
catalogVersion = root.udfCatalogVersion;
|
|
181
|
+
}
|
|
182
|
+
// When no --section was supplied, the binary returns the full catalog; surface
|
|
183
|
+
// which top-level sections are present (excluding the version marker).
|
|
184
|
+
if (!section) {
|
|
185
|
+
const keys = Object.keys(root).filter((k) => k !== 'udfCatalogVersion');
|
|
186
|
+
if (keys.length > 0)
|
|
187
|
+
sectionsLabel = keys.join(', ');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
// Success exit but unparseable output: relay raw stdout rather than hard-fail
|
|
192
|
+
// (read-only designer tool, D7). The fenced block below carries the raw text.
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
content: [
|
|
196
|
+
{
|
|
197
|
+
type: 'text',
|
|
198
|
+
text: `UDF catalog retrieved successfully.
|
|
199
|
+
|
|
200
|
+
Working directory: ${resolvedCwd}
|
|
201
|
+
Source: restforge-designer (serialized from validator constants) — single source of truth for the installed designer version
|
|
202
|
+
Installed version: ${probe.stdout.trim() || 'unknown'}
|
|
203
|
+
udfCatalogVersion: ${catalogVersion}
|
|
204
|
+
Section(s): ${sectionsLabel}
|
|
205
|
+
|
|
206
|
+
--- UDF Catalog (JSON) ---
|
|
207
|
+
${prettyJson}
|
|
208
|
+
--- end UDF Catalog (JSON) ---
|
|
209
|
+
|
|
210
|
+
For the assistant:
|
|
211
|
+
- Confirm to the user that the catalog is available. Summarise in plain language (e.g. how many valid field types, which sections are present).
|
|
212
|
+
- Do not paste the full JSON block unless the user explicitly asks. If the user only asked to "see the catalog", offer to drill into a specific section (fields, navigation, app-config, dashboard) instead of dumping everything.
|
|
213
|
+
- When authoring or editing a UDF payload, use this catalog as ground truth to:
|
|
214
|
+
* Restrict field "type" to the values in fields.validFieldTypes; reject anything else as invalid.
|
|
215
|
+
* Ensure appConfig includes every entry in appConfig.requiredFields, and keep port within appConfig.port range.
|
|
216
|
+
* Restrict editor modes, badge colors, id-generation modes/formats, navigation item types, and navigation depth to the enums and limits in the catalog.
|
|
217
|
+
* Restrict dashboard widget types, chart engines, and data source methods to the dashboard section's enums, and respect widgetsRequiringFields / forbiddenFields.
|
|
218
|
+
- This is the DESIGNER (frontend UDF) catalog. Do not confuse it with the backend field validation catalog used for RDF payload fieldValidation constraints.
|
|
219
|
+
- Do not mention internal tool names. Match the user's language.`,
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=get-udf-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-udf-catalog.js","sourceRoot":"","sources":["../../../src/tools/designer/get-udf-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2JA8BwI;QACrJ,WAAW,EAAE;YACX,GAAG,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,EAAE;iBACV,QAAQ,CACP,oJAAoJ,CACrJ;YACH,OAAO,EAAE,CAAC;iBACP,IAAI,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;iBAChE,QAAQ,EAAE;iBACV,QAAQ,CACP,2HAA2H,CAC5H;SACJ;QACD,WAAW,EAAE;YACX,KAAK,EAAE,iBAAiB;YACxB,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;SACrB;KACF,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACzB,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAEvD,+EAA+E;QAC/E,oEAAoE;QACpE,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAC,WAAW,CAAC,EAAE;YACnE,GAAG,EAAE,WAAW;YAChB,OAAO,E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C,iBAAiB,KAAK,QAAQ,EAAE,CAAC;gBAC7F,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC;YAC1C,CAAC;YACD,+EAA+E;YAC/E,uEAAuE;YACvE,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,mBAAmB,CAAC,CAAC;gBACxE,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;oBAAE,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,8EAA8E;YAC9E,8EAA8E;QAChF,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;qBAEG,WAAW;;qBAEX,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,SAAS;qBAChC,cAAc;cACrB,aAAa;;;EAGzB,UAAU;;;;;;;;;;;;iEAYqD;iBACtD;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { registerDesignerInspectPlugin } from './inspect-plugin.js';
|
|
|
5
5
|
import { registerDesignerScaffoldPlugin } from './scaffold-plugin.js';
|
|
6
6
|
import { registerDesignerInitProject } from './init-project.js';
|
|
7
7
|
import { registerDesignerGenerate } from './generate.js';
|
|
8
|
+
import { registerDesignerGetUdfCatalog } from './get-udf-catalog.js';
|
|
8
9
|
export function registerDesignerTools(server) {
|
|
9
10
|
registerDesignerValidatePayload(server);
|
|
10
11
|
registerDesignerPreviewFiles(server);
|
|
@@ -13,5 +14,6 @@ export function registerDesignerTools(server) {
|
|
|
13
14
|
registerDesignerScaffoldPlugin(server);
|
|
14
15
|
registerDesignerInitProject(server);
|
|
15
16
|
registerDesignerGenerate(server);
|
|
17
|
+
registerDesignerGetUdfCatalog(server);
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/designer/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/designer/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,+BAA+B,CAAC,MAAM,CAAC,CAAC;IACxC,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACrC,2BAA2B,CAAC,MAAM,CAAC,CAAC;IACpC,6BAA6B,CAAC,MAAM,CAAC,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