@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.
Files changed (80) hide show
  1. package/dist/server.js +71 -2
  2. package/dist/server.js.map +1 -1
  3. package/dist/tools/codegen/create-kafka-consumer.d.ts +2 -0
  4. package/dist/tools/codegen/create-kafka-consumer.js +140 -0
  5. package/dist/tools/codegen/create-kafka-consumer.js.map +1 -0
  6. package/dist/tools/codegen/create-processor.d.ts +2 -0
  7. package/dist/tools/codegen/create-processor.js +157 -0
  8. package/dist/tools/codegen/create-processor.js.map +1 -0
  9. package/dist/tools/codegen/generate-test.d.ts +2 -0
  10. package/dist/tools/codegen/generate-test.js +149 -0
  11. package/dist/tools/codegen/generate-test.js.map +1 -0
  12. package/dist/tools/codegen/index.js +8 -0
  13. package/dist/tools/codegen/index.js.map +1 -1
  14. package/dist/tools/codegen/migrate-payload.d.ts +2 -0
  15. package/dist/tools/codegen/migrate-payload.js +210 -0
  16. package/dist/tools/codegen/migrate-payload.js.map +1 -0
  17. package/dist/tools/data/index.d.ts +2 -0
  18. package/dist/tools/data/index.js +7 -0
  19. package/dist/tools/data/index.js.map +1 -0
  20. package/dist/tools/data/pull.d.ts +2 -0
  21. package/dist/tools/data/pull.js +202 -0
  22. package/dist/tools/data/pull.js.map +1 -0
  23. package/dist/tools/data/push.d.ts +2 -0
  24. package/dist/tools/data/push.js +190 -0
  25. package/dist/tools/data/push.js.map +1 -0
  26. package/dist/tools/designer/generate.js +86 -81
  27. package/dist/tools/designer/generate.js.map +1 -1
  28. package/dist/tools/designer/get-udf-catalog.d.ts +2 -0
  29. package/dist/tools/designer/get-udf-catalog.js +225 -0
  30. package/dist/tools/designer/get-udf-catalog.js.map +1 -0
  31. package/dist/tools/designer/index.js +2 -0
  32. package/dist/tools/designer/index.js.map +1 -1
  33. package/dist/tools/designer/init-project.js +73 -73
  34. package/dist/tools/designer/inspect-plugin.js +70 -65
  35. package/dist/tools/designer/inspect-plugin.js.map +1 -1
  36. package/dist/tools/designer/list-plugins.js +62 -62
  37. package/dist/tools/designer/preview-files.js +72 -67
  38. package/dist/tools/designer/preview-files.js.map +1 -1
  39. package/dist/tools/designer/scaffold-plugin.js +72 -72
  40. package/dist/tools/designer/validate-payload.js +74 -69
  41. package/dist/tools/designer/validate-payload.js.map +1 -1
  42. package/dist/tools/key/generate.d.ts +2 -0
  43. package/dist/tools/key/generate.js +130 -0
  44. package/dist/tools/key/generate.js.map +1 -0
  45. package/dist/tools/key/index.d.ts +2 -0
  46. package/dist/tools/key/index.js +9 -0
  47. package/dist/tools/key/index.js.map +1 -0
  48. package/dist/tools/key/list.d.ts +2 -0
  49. package/dist/tools/key/list.js +126 -0
  50. package/dist/tools/key/list.js.map +1 -0
  51. package/dist/tools/key/revoke.d.ts +2 -0
  52. package/dist/tools/key/revoke.js +117 -0
  53. package/dist/tools/key/revoke.js.map +1 -0
  54. package/dist/tools/project/delete.d.ts +2 -0
  55. package/dist/tools/project/delete.js +116 -0
  56. package/dist/tools/project/delete.js.map +1 -0
  57. package/dist/tools/project/index.d.ts +2 -0
  58. package/dist/tools/project/index.js +7 -0
  59. package/dist/tools/project/index.js.map +1 -0
  60. package/dist/tools/project/list.d.ts +2 -0
  61. package/dist/tools/project/list.js +107 -0
  62. package/dist/tools/project/list.js.map +1 -0
  63. package/dist/tools/runtime/generate-launcher.js +3 -3
  64. package/dist/tools/setup/clear-default-config.d.ts +2 -0
  65. package/dist/tools/setup/clear-default-config.js +104 -0
  66. package/dist/tools/setup/clear-default-config.js.map +1 -0
  67. package/dist/tools/setup/get-default-config.d.ts +2 -0
  68. package/dist/tools/setup/get-default-config.js +104 -0
  69. package/dist/tools/setup/get-default-config.js.map +1 -0
  70. package/dist/tools/setup/index.js +8 -0
  71. package/dist/tools/setup/index.js.map +1 -1
  72. package/dist/tools/setup/init-config.js +3 -5
  73. package/dist/tools/setup/init-config.js.map +1 -1
  74. package/dist/tools/setup/list-configs.d.ts +2 -0
  75. package/dist/tools/setup/list-configs.js +104 -0
  76. package/dist/tools/setup/list-configs.js.map +1 -0
  77. package/dist/tools/setup/set-default-config.d.ts +2 -0
  78. package/dist/tools/setup/set-default-config.js +109 -0
  79. package/dist/tools/setup/set-default-config.js.map +1 -0
  80. package/package.json +1 -1
@@ -4,31 +4,36 @@ import { execProcess } from '../../lib/exec.js';
4
4
  export function registerDesignerPreviewFiles(server) {
5
5
  server.registerTool('designer_preview_files', {
6
6
  title: 'Preview Designer Files',
7
- description: `Preview (dry-run) the frontend files that the RESTForge Designer would generate from a UI Definition File (UDF) payload, by running restforge-designer preview. This lists what would be produced WITHOUT writing anything to disk.
8
-
9
- USE WHEN:
10
- - The user asks which files would be generated, or wants a dry-run before generating frontend code
11
- - The user asks things like "file apa yang akan di-generate", "preview output frontend designer", "dry-run generate", "what files will the designer produce", "tunjukkan hasil generate tanpa menulis file", "preview the designer output"
12
- - Before actually generating the frontend code, to inspect the planned output and confirm it looks right
13
- - The user mentions a designer/frontend UDF payload and wants to see the resulting file layout first
14
-
15
- DO NOT USE FOR:
16
- - Validating that a UDF payload is structurally correct against the plugin schema -> use 'designer_validate_payload'
17
- - Actually generating and writing the frontend files (preview is read-only; the real generation tool writes files)
18
- - Listing the available designer plugins -> use 'designer_list_plugins'
19
- - Inspecting one plugin's metadata -> use 'designer_inspect_plugin'
20
-
21
- This tool wraps the RESTForge Designer CLI command: restforge-designer preview --payload=<payload> [--plugins-dir=<pluginsDir>], run in the given cwd.
22
- The CLI reads the UDF payload JSON, resolves the target plugin (auto-detected or from --plugins-dir), and prints the list of files it would generate. It 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 will surface that as a non-error precondition.
27
-
28
- PRESENTATION GUIDANCE:
29
- - Match the user's language. If the user writes in Indonesian, respond in Indonesian.
30
- - Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "preview the generated files", "validate the UI definition", "generate the frontend code").
31
- - Speak in plain language. Summarise the planned file list; do not paste raw CLI output unless the user explicitly asks.
7
+ description: `Preview (dry-run) the frontend files that the RESTForge Designer would generate from a UI Definition File (UDF) payload, by running restforge-designer preview. This lists what would be produced WITHOUT writing anything to disk.
8
+
9
+ USE WHEN:
10
+ - The user asks which files would be generated, or wants a dry-run before generating frontend code
11
+ - The user asks things like "file apa yang akan di-generate", "preview output frontend designer", "dry-run generate", "what files will the designer produce", "tunjukkan hasil generate tanpa menulis file", "preview the designer output"
12
+ - Before actually generating the frontend code, to inspect the planned output and confirm it looks right
13
+ - The user mentions a designer/frontend UDF payload and wants to see the resulting file layout first
14
+
15
+ DO NOT USE FOR:
16
+ - Validating that a UDF payload is structurally correct against the plugin schema -> use 'designer_validate_payload'
17
+ - Actually generating and writing the frontend files (preview is read-only; the real generation tool writes files)
18
+ - Listing the available designer plugins -> use 'designer_list_plugins'
19
+ - Inspecting one plugin's metadata -> use 'designer_inspect_plugin'
20
+
21
+ This tool wraps the RESTForge Designer CLI command: restforge-designer preview --payload=<payload> [--plugins-dir=<pluginsDir>], run in the given cwd.
22
+ The CLI reads the UDF payload JSON, resolves the target plugin (auto-detected or from --plugins-dir), and prints the list of files it would generate. It does not modify any file and does not require a license.
23
+
24
+ Cross-reference (grounding & on-ramp):
25
+ - To ground the UDF shape before previewing or editing it (valid field types, required appConfig fields, enums, limits), use 'designer_get_udf_catalog' — the authoritative source of UDF structure.
26
+ - If the UDF does not exist yet but a backend RDF does, the on-ramp is 'codegen_migrate_payload' (RDF -> split UDF set), then validate and preview that output.
27
+ - Canonical UDF flow: codegen_migrate_payload -> designer_get_udf_catalog -> designer_validate_payload -> designer_preview_files -> designer_generate.
28
+
29
+ Preconditions:
30
+ - The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
31
+ 'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
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. "preview the generated files", "validate the UI definition", "generate the frontend code").
36
+ - Speak in plain language. Summarise the planned file list; do not paste raw CLI output unless the user explicitly asks.
32
37
  - When a precondition is not met, frame it as a question or next-step suggestion rather than an error.`,
33
38
  inputSchema: {
34
39
  cwd: z
@@ -63,17 +68,17 @@ PRESENTATION GUIDANCE:
63
68
  content: [
64
69
  {
65
70
  type: 'text',
66
- text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
67
-
68
- Working directory: ${projectCwd}
69
- Payload: ${payload}
70
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
71
- Probe command: ${probe.command}
72
- Exit code: ${probe.exitCode}
73
-
74
- For the assistant:
75
- - The user needs to install RESTForge Designer (and ensure it is on the system PATH) before the generated files can be previewed.
76
- - 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.
71
+ text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
72
+
73
+ Working directory: ${projectCwd}
74
+ Payload: ${payload}
75
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
76
+ Probe command: ${probe.command}
77
+ Exit code: ${probe.exitCode}
78
+
79
+ For the assistant:
80
+ - The user needs to install RESTForge Designer (and ensure it is on the system PATH) before the generated files can be previewed.
81
+ - 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.
77
82
  - Once it is installed, retry the preview.`,
78
83
  },
79
84
  ],
@@ -95,19 +100,19 @@ For the assistant:
95
100
  content: [
96
101
  {
97
102
  type: 'text',
98
- text: `Designer preview did not complete — the command crashed or timed out.
99
-
100
- Working directory: ${projectCwd}
101
- Payload: ${payload}
102
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
103
- Command: ${result.command}
104
-
105
- --- stderr ---
106
- ${result.stderr}
107
- --- end stderr ---
108
-
109
- For the assistant:
110
- - The Designer CLI did not finish (likely a crash or timeout), so there is no preview to report.
103
+ text: `Designer preview did not complete — the command crashed or timed out.
104
+
105
+ Working directory: ${projectCwd}
106
+ Payload: ${payload}
107
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
108
+ Command: ${result.command}
109
+
110
+ --- stderr ---
111
+ ${result.stderr}
112
+ --- end stderr ---
113
+
114
+ For the assistant:
115
+ - The Designer CLI did not finish (likely a crash or timeout), so there is no preview to report.
111
116
  - Tell the user the preview could not be completed and offer to retry. Do not mention internal tool names.`,
112
117
  },
113
118
  ],
@@ -123,24 +128,24 @@ For the assistant:
123
128
  content: [
124
129
  {
125
130
  type: 'text',
126
- text: `Designer preview ran.
127
-
128
- Working directory: ${projectCwd}
129
- Payload: ${payload}
130
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
131
- Command: ${result.command}
132
- Exit code: ${result.exitCode}
133
-
134
- --- stdout ---
135
- ${result.stdout}
136
- --- end stdout ---
137
- ${stderrBlock}
138
- For the assistant:
139
- - The Designer CLI ran to completion. Read the CLI output above and classify the result:
140
- (a) Positive result — the output lists the files that would be generated. Summarise the planned files in plain language (how many, what kinds) and offer the next step: generate the frontend code for real.
141
- (b) Actionable negative verdict — the payload is invalid, the payload file was not found, or the target plugin / plugins directory could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Summarise the concrete problem (which path or field is wrong) and offer to retry after the user fixes it; validating the payload first can help pinpoint structural errors.
142
- - A non-zero exit code here means the CLI reported a negative verdict (case b), NOT that the tool failed. Never tell the user "the tool failed" for case (b).
143
- - Soft note: if preview fails with an appConfig/plugin error (e.g. the plugin or app config "not found") while the SAME payload passes validation, the payload may rely on 'extends' / 'include' references that preview does not appear to merge the way validation does. As a possible workaround, suggest pointing the preview at 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.
131
+ text: `Designer preview ran.
132
+
133
+ Working directory: ${projectCwd}
134
+ Payload: ${payload}
135
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
136
+ Command: ${result.command}
137
+ Exit code: ${result.exitCode}
138
+
139
+ --- stdout ---
140
+ ${result.stdout}
141
+ --- end stdout ---
142
+ ${stderrBlock}
143
+ For the assistant:
144
+ - The Designer CLI ran to completion. Read the CLI output above and classify the result:
145
+ (a) Positive result — the output lists the files that would be generated. Summarise the planned files in plain language (how many, what kinds) and offer the next step: generate the frontend code for real.
146
+ (b) Actionable negative verdict — the payload is invalid, the payload file was not found, or the target plugin / plugins directory could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Summarise the concrete problem (which path or field is wrong) and offer to retry after the user fixes it; validating the payload first can help pinpoint structural errors.
147
+ - A non-zero exit code here means the CLI reported a negative verdict (case b), NOT that the tool failed. Never tell the user "the tool failed" for case (b).
148
+ - Soft note: if preview fails with an appConfig/plugin error (e.g. the plugin or app config "not found") while the SAME payload passes validation, the payload may rely on 'extends' / 'include' references that preview does not appear to merge the way validation does. As a possible workaround, suggest pointing the preview at 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.
144
149
  - Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
145
150
  },
146
151
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"preview-files.js","sourceRoot":"","sources":["../../../src/tools/designer/preview-files.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,4BAA4B,CAAC,MAAiB;IAC5D,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;uGAyBoF;QACjG,WAAW,EAAE;YACX,GAA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AC,SAAS,EAAE,aAAa,OAAO,EAAE,CAAC,CAAC;QACjD,IAAI,UAAU;YAAE,IAAI,CAAC,IAAI,CAAC,iBAAiB,UAAU,EAAE,CAAC,CAAC;QAEzD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,oBAAoB,EAAE,IAAI,EAAE;YAC3D,GAAG,EAAE,UAAU;YACf,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;QAEH,yEAAyE;QACzE,sEAAsE;QACtE,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;qBAEC,UAAU;WACpB,OAAO;eACH,UAAU,IAAI,aAAa;WAC/B,MAAM,CAAC,OAAO;;;EAGvB,MAAM,CAAC,MAAM;;;;;2GAK4F;qBAC9F;iBACF;gBACD,OAAO,EAAE,IAAI,EAAE,sCAAsC;aACtD,CAAC;QACJ,CAAC;QAED,+EAA+E;QAC/E,qFAAqF;QACrF,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;eACH,UAAU,IAAI,aAAa;WAC/B,MAAM,CAAC,OAAO;aACZ,MAAM,CAAC,QAAQ;;;EAG1B,MAAM,CAAC,MAAM;;EAEb,WAAW;;;;;;;kIAOqH;iBACvH;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -4,31 +4,31 @@ import { execProcess } from '../../lib/exec.js';
4
4
  export function registerDesignerScaffoldPlugin(server) {
5
5
  server.registerTool('designer_scaffold_plugin', {
6
6
  title: 'Scaffold Designer Plugin',
7
- description: `Scaffold a new custom RESTForge Designer frontend plugin from a template, by running restforge-designer plugins scaffold. This WRITES a new plugin folder to disk that the user can then customise.
8
-
9
- USE WHEN:
10
- - The user asks to create a new custom designer/frontend plugin from scratch
11
- - The user asks things like "buat plugin custom baru", "scaffold folder plugin designer", "mulai plugin frontend dari template", "create a new designer plugin", "scaffold a frontend plugin", "bikin plugin frontend baru"
12
- - The user wants a starter plugin folder they can edit to build their own frontend generator template
13
- - The user names a new plugin id and wants the folder structure generated for it
14
-
15
- DO NOT USE FOR:
16
- - Generating a frontend application from a UDF payload -> use 'designer_generate'
17
- - Initialising a project from an existing plugin -> use 'designer_init_project'
18
- - Listing the available plugins -> use 'designer_list_plugins'
19
- - Inspecting one existing plugin's metadata -> use 'designer_inspect_plugin'
20
-
21
- This tool wraps the RESTForge Designer CLI command: restforge-designer plugins scaffold --id=<id> --output=<output> [--plugins-dir=<pluginsDir>], run in the given cwd.
22
- The CLI creates a new plugin folder named after the given id under the output directory. It does NOT require a license (scaffolding is license-free).
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 will surface that as a non-error precondition.
27
-
28
- PRESENTATION GUIDANCE:
29
- - Match the user's language. If the user writes in Indonesian, respond in Indonesian.
30
- - Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "scaffold a new plugin", "list the available plugins", "generate the frontend code").
31
- - Speak in plain language. Confirm what was created and where; do not paste raw CLI output unless the user explicitly asks.
7
+ description: `Scaffold a new custom RESTForge Designer frontend plugin from a template, by running restforge-designer plugins scaffold. This WRITES a new plugin folder to disk that the user can then customise.
8
+
9
+ USE WHEN:
10
+ - The user asks to create a new custom designer/frontend plugin from scratch
11
+ - The user asks things like "buat plugin custom baru", "scaffold folder plugin designer", "mulai plugin frontend dari template", "create a new designer plugin", "scaffold a frontend plugin", "bikin plugin frontend baru"
12
+ - The user wants a starter plugin folder they can edit to build their own frontend generator template
13
+ - The user names a new plugin id and wants the folder structure generated for it
14
+
15
+ DO NOT USE FOR:
16
+ - Generating a frontend application from a UDF payload -> use 'designer_generate'
17
+ - Initialising a project from an existing plugin -> use 'designer_init_project'
18
+ - Listing the available plugins -> use 'designer_list_plugins'
19
+ - Inspecting one existing plugin's metadata -> use 'designer_inspect_plugin'
20
+
21
+ This tool wraps the RESTForge Designer CLI command: restforge-designer plugins scaffold --id=<id> --output=<output> [--plugins-dir=<pluginsDir>], run in the given cwd.
22
+ The CLI creates a new plugin folder named after the given id under the output directory. It does NOT require a license (scaffolding is license-free).
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 will surface that as a non-error precondition.
27
+
28
+ PRESENTATION GUIDANCE:
29
+ - Match the user's language. If the user writes in Indonesian, respond in Indonesian.
30
+ - Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "scaffold a new plugin", "list the available plugins", "generate the frontend code").
31
+ - Speak in plain language. Confirm what was created and where; do not paste raw CLI output unless the user explicitly asks.
32
32
  - When a precondition is not met, frame it as a question or next-step suggestion rather than an error.`,
33
33
  inputSchema: {
34
34
  cwd: z
@@ -67,18 +67,18 @@ PRESENTATION GUIDANCE:
67
67
  content: [
68
68
  {
69
69
  type: 'text',
70
- text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
71
-
72
- Working directory: ${projectCwd}
73
- Plugin id: ${id}
74
- Output: ${output}
75
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
76
- Probe command: ${probe.command}
77
- Exit code: ${probe.exitCode}
78
-
79
- For the assistant:
80
- - The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a plugin can be scaffolded.
81
- - 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.
70
+ text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
71
+
72
+ Working directory: ${projectCwd}
73
+ Plugin id: ${id}
74
+ Output: ${output}
75
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
76
+ Probe command: ${probe.command}
77
+ Exit code: ${probe.exitCode}
78
+
79
+ For the assistant:
80
+ - The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a plugin can be scaffolded.
81
+ - 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.
82
82
  - Once it is installed, retry scaffolding the plugin.`,
83
83
  },
84
84
  ],
@@ -104,24 +104,24 @@ For the assistant:
104
104
  content: [
105
105
  {
106
106
  type: 'text',
107
- text: `Scaffolding the Designer plugin did not complete.
108
-
109
- Working directory: ${projectCwd}
110
- Plugin id: ${id}
111
- Output: ${output}
112
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
113
- Command: ${result.command}
114
- Exit code: ${result.exitCode}
115
-
116
- --- stdout ---
117
- ${result.stdout}
118
- --- end stdout ---
119
- ${stderrBlock}
120
- For the assistant:
121
- - The scaffold did not finish successfully, so the plugin folder may not exist or may be partial. Read the CLI output above and explain the most likely cause to the user in plain language. Common causes:
122
- * The output directory already exists or is not writable — suggest a different output path or clearing the existing folder.
123
- * The plugin id is invalid (bad characters) — suggest a simpler id.
124
- * Exit code -1 — the command crashed or timed out; offer to retry.
107
+ text: `Scaffolding the Designer plugin did not complete.
108
+
109
+ Working directory: ${projectCwd}
110
+ Plugin id: ${id}
111
+ Output: ${output}
112
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
113
+ Command: ${result.command}
114
+ Exit code: ${result.exitCode}
115
+
116
+ --- stdout ---
117
+ ${result.stdout}
118
+ --- end stdout ---
119
+ ${stderrBlock}
120
+ For the assistant:
121
+ - The scaffold did not finish successfully, so the plugin folder may not exist or may be partial. Read the CLI output above and explain the most likely cause to the user in plain language. Common causes:
122
+ * The output directory already exists or is not writable — suggest a different output path or clearing the existing folder.
123
+ * The plugin id is invalid (bad characters) — suggest a simpler id.
124
+ * Exit code -1 — the command crashed or timed out; offer to retry.
125
125
  - Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
126
126
  },
127
127
  ],
@@ -136,23 +136,23 @@ For the assistant:
136
136
  content: [
137
137
  {
138
138
  type: 'text',
139
- text: `Designer plugin scaffolded successfully.
140
-
141
- Working directory: ${projectCwd}
142
- Plugin id: ${id}
143
- Output: ${output}
144
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
145
- Command: ${result.command}
146
- Exit code: ${result.exitCode}
147
-
148
- --- stdout ---
149
- ${result.stdout}
150
- --- end stdout ---
151
- ${stderrBlock}
152
- For the assistant:
153
- - Confirm to the user that the new plugin folder was created. Mention the plugin id and the output location in plain language.
154
- - The scaffold is a starting point: the user will edit the generated plugin files (templates, schema) to build their own frontend generator.
155
- - Suggest a sensible next step, e.g. inspecting or listing the plugins to confirm the new one is picked up, or authoring a UDF payload that targets it.
139
+ text: `Designer plugin scaffolded successfully.
140
+
141
+ Working directory: ${projectCwd}
142
+ Plugin id: ${id}
143
+ Output: ${output}
144
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
145
+ Command: ${result.command}
146
+ Exit code: ${result.exitCode}
147
+
148
+ --- stdout ---
149
+ ${result.stdout}
150
+ --- end stdout ---
151
+ ${stderrBlock}
152
+ For the assistant:
153
+ - Confirm to the user that the new plugin folder was created. Mention the plugin id and the output location in plain language.
154
+ - The scaffold is a starting point: the user will edit the generated plugin files (templates, schema) to build their own frontend generator.
155
+ - Suggest a sensible next step, e.g. inspecting or listing the plugins to confirm the new one is picked up, or authoring a UDF payload that targets it.
156
156
  - Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
157
157
  },
158
158
  ],
@@ -4,34 +4,39 @@ import { execProcess } from '../../lib/exec.js';
4
4
  export function registerDesignerValidatePayload(server) {
5
5
  server.registerTool('designer_validate_payload', {
6
6
  title: 'Validate Designer Payload',
7
- description: `Validate a frontend UI Definition File (UDF) payload against the schema of the RESTForge Designer plugin it targets, by running restforge-designer validate.
8
-
9
- USE WHEN:
10
- - The user asks to validate, check, or verify a frontend designer payload / UI definition (UDF) file
11
- - The user asks things like "validasi UDF", "cek payload frontend", "is this UI definition valid", "validate designer payload", "apakah payload UDF benar", "check the frontend payload against the plugin schema"
12
- - Before previewing or generating frontend code from a UDF, to confirm the payload is structurally valid against the plugin schema
13
- - The user mentions a designer/frontend payload JSON and wants to know whether it conforms to the plugin it targets
14
- - Routine pre-generation sanity check on a UDF file
15
-
16
- DO NOT USE FOR:
17
- - Validating a backend RDF payload against the database schema -> use 'codegen_validate_payload'
18
- - Validating an SDF (database schema definition) -> use 'codegen_dbschema_validate'
19
- - Validating raw SQL -> use 'codegen_validate_sql'
20
- - Generating the frontend code itself (this only validates, it does not write files)
21
-
22
- This tool wraps the RESTForge Designer CLI command: restforge-designer validate --payload=<payload> [--plugins-dir=<pluginsDir>], run in the given cwd.
23
- The CLI reads the UDF payload JSON, resolves the target plugin (auto-detected or from --plugins-dir), and reports whether
24
- the payload is valid against that plugin's schema, listing structural errors when it is not. It does not modify any file and
25
- does not require a license.
26
-
27
- Preconditions:
28
- - The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
29
- 'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
30
-
31
- PRESENTATION GUIDANCE:
32
- - Match the user's language. If the user writes in Indonesian, respond in Indonesian.
33
- - Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "validate the UI definition", "preview the generated files", "generate the frontend code").
34
- - Speak in plain language. Summarise the result; do not paste raw CLI output unless the user explicitly asks.
7
+ description: `Validate a frontend UI Definition File (UDF) payload against the schema of the RESTForge Designer plugin it targets, by running restforge-designer validate.
8
+
9
+ USE WHEN:
10
+ - The user asks to validate, check, or verify a frontend designer payload / UI definition (UDF) file
11
+ - The user asks things like "validasi UDF", "cek payload frontend", "is this UI definition valid", "validate designer payload", "apakah payload UDF benar", "check the frontend payload against the plugin schema"
12
+ - Before previewing or generating frontend code from a UDF, to confirm the payload is structurally valid against the plugin schema
13
+ - The user mentions a designer/frontend payload JSON and wants to know whether it conforms to the plugin it targets
14
+ - Routine pre-generation sanity check on a UDF file
15
+
16
+ DO NOT USE FOR:
17
+ - Validating a backend RDF payload against the database schema -> use 'codegen_validate_payload'
18
+ - Validating an SDF (database schema definition) -> use 'codegen_dbschema_validate'
19
+ - Validating raw SQL -> use 'codegen_validate_sql'
20
+ - Generating the frontend code itself (this only validates, it does not write files)
21
+
22
+ This tool wraps the RESTForge Designer CLI command: restforge-designer validate --payload=<payload> [--plugins-dir=<pluginsDir>], run in the given cwd.
23
+ The CLI reads the UDF payload JSON, resolves the target plugin (auto-detected or from --plugins-dir), and reports whether
24
+ the payload is valid against that plugin's schema, listing structural errors when it is not. It does not modify any file and
25
+ does not require a license.
26
+
27
+ Cross-reference (grounding & on-ramp):
28
+ - Before authoring or validating a UDF, ground its shape (valid field types, required appConfig fields, enums, limits) against the designer's own rules via 'designer_get_udf_catalog' that catalog is the authoritative source of UDF structure.
29
+ - If no UDF payload exists yet but the user has a backend RDF, the natural on-ramp is 'codegen_migrate_payload' (converts an RDF into a split UDF set); validate that output here.
30
+ - Canonical UDF flow: codegen_migrate_payload -> designer_get_udf_catalog -> designer_validate_payload -> designer_preview_files -> designer_generate.
31
+
32
+ Preconditions:
33
+ - The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
34
+ 'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
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. "validate the UI definition", "preview the generated files", "generate the frontend code").
39
+ - Speak in plain language. Summarise the result; 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
@@ -68,17 +73,17 @@ PRESENTATION GUIDANCE:
68
73
  content: [
69
74
  {
70
75
  type: 'text',
71
- text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
72
-
73
- Working directory: ${projectCwd}
74
- Payload: ${payload}
75
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
76
- Probe command: ${probe.command}
77
- Exit code: ${probe.exitCode}
78
-
79
- For the assistant:
80
- - The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a frontend payload can be validated.
81
- - 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
+ text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
77
+
78
+ Working directory: ${projectCwd}
79
+ Payload: ${payload}
80
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
81
+ Probe command: ${probe.command}
82
+ Exit code: ${probe.exitCode}
83
+
84
+ For the assistant:
85
+ - The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a frontend payload can be validated.
86
+ - 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.
82
87
  - Once it is installed, retry validating the payload.`,
83
88
  },
84
89
  ],
@@ -102,19 +107,19 @@ For the assistant:
102
107
  content: [
103
108
  {
104
109
  type: 'text',
105
- text: `Designer payload validation did not complete — the command crashed or timed out.
106
-
107
- Working directory: ${projectCwd}
108
- Payload: ${payload}
109
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
110
- Command: ${result.command}
111
-
112
- --- stderr ---
113
- ${result.stderr}
114
- --- end stderr ---
115
-
116
- For the assistant:
117
- - The Designer CLI did not finish (likely a crash or timeout), so there is no validation verdict to report.
110
+ text: `Designer payload validation did not complete — the command crashed or timed out.
111
+
112
+ Working directory: ${projectCwd}
113
+ Payload: ${payload}
114
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
115
+ Command: ${result.command}
116
+
117
+ --- stderr ---
118
+ ${result.stderr}
119
+ --- end stderr ---
120
+
121
+ For the assistant:
122
+ - The Designer CLI did not finish (likely a crash or timeout), so there is no validation verdict to report.
118
123
  - Tell the user the check could not be completed and offer to retry. Do not mention internal tool names.`,
119
124
  },
120
125
  ],
@@ -132,23 +137,23 @@ For the assistant:
132
137
  content: [
133
138
  {
134
139
  type: 'text',
135
- text: `Designer payload validation ran.
136
-
137
- Working directory: ${projectCwd}
138
- Payload: ${payload}
139
- Plugins dir: ${pluginsDir ?? 'auto-detect'}
140
- Command: ${result.command}
141
- Exit code: ${result.exitCode}
142
-
143
- --- stdout ---
144
- ${result.stdout}
145
- --- end stdout ---
146
- ${stderrBlock}
147
- For the assistant:
148
- - The Designer CLI ran to completion. Read the CLI output above and classify the result:
149
- (a) Positive result — the payload is VALID against the target plugin schema. Confirm this in plain language and suggest the next step: preview the files that would be generated from this payload, or generate the frontend code. Describe steps by what they do.
150
- (b) Actionable negative verdict — the payload is INVALID (the output lists structural errors), or the payload file was not found, or the target plugin / plugins directory could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Summarise the concrete problems (which fields, components, or paths are wrong) and offer to re-check after the user fixes them.
151
- - A non-zero exit code here means the CLI reported a negative verdict (case b), NOT that the tool failed. Never tell the user "the tool failed" for case (b).
140
+ text: `Designer payload validation ran.
141
+
142
+ Working directory: ${projectCwd}
143
+ Payload: ${payload}
144
+ Plugins dir: ${pluginsDir ?? 'auto-detect'}
145
+ Command: ${result.command}
146
+ Exit code: ${result.exitCode}
147
+
148
+ --- stdout ---
149
+ ${result.stdout}
150
+ --- end stdout ---
151
+ ${stderrBlock}
152
+ For the assistant:
153
+ - The Designer CLI ran to completion. Read the CLI output above and classify the result:
154
+ (a) Positive result — the payload is VALID against the target plugin schema. Confirm this in plain language and suggest the next step: preview the files that would be generated from this payload, or generate the frontend code. Describe steps by what they do.
155
+ (b) Actionable negative verdict — the payload is INVALID (the output lists structural errors), or the payload file was not found, or the target plugin / plugins directory could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Summarise the concrete problems (which fields, components, or paths are wrong) and offer to re-check after the user fixes them.
156
+ - A non-zero exit code here means the CLI reported a negative verdict (case b), NOT that the tool failed. Never tell the user "the tool failed" for case (b).
152
157
  - Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
153
158
  },
154
159
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"validate-payload.js","sourceRoot":"","sources":["../../../src/tools/designer/validate-payload.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,+BAA+B,CAAC,MAAiB;IAC/D,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B;QACE,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;uGA4BoF;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,iEAAiE,CAAC;YAC9E,UAAU,EAAE,CAAC;iBACV,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,EAAE;iBACV,QAAQ,CAAC,mGAAmG,CAAC;SACjH;QACD,WAAW,EAAE;YACX,KAAK,EAAE,2BAA2B;YAClC,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;SACrB;KACF,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;QACrC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAEhC,+EAA+E;QAC/E,8EAA8E;QAC9E,8EAA8E;QAC9E,gEAAgE;QAChE,MAAM,KAAK,GAAG,MAAM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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;eACH,UAAU,IAAI,aAAa;WAC/B,MAAM,CAAC,OAAO;aACZ,MAAM,CAAC,QAAQ;;;EAG1B,MAAM,CAAC,MAAM;;EAEb,WAAW;;;;;;kIAMqH;iBACvH;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"validate-payload.js","sourceRoot":"","sources":["../../../src/tools/designer/validate-payload.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,+BAA+B,CAAC,MAAiB;IAC/D,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B;QACE,KAAK,EAAE,2BAA2B;QAClC,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,iEAAiE,CAAC;YAC9E,UAAU,EAAE,CAAC;iBACV,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,EAAE;iBACV,QAAQ,CAAC,mGAAmG,CAAC;SACjH;QACD,WAAW,EAAE;YACX,KAAK,EAAE,2BAA2B;YAClC,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI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OAAO;;;EAGvB,MAAM,CAAC,MAAM;;;;;yGAK0F;qBAC5F;iBACF;gBACD,OAAO,EAAE,IAAI,EAAE,sCAAsC;aACtD,CAAC;QACJ,CAAC;QAED,gFAAgF;QAChF,iFAAiF;QACjF,iFAAiF;QACjF,8EAA8E;QAC9E,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;eACH,UAAU,IAAI,aAAa;WAC/B,MAAM,CAAC,OAAO;aACZ,MAAM,CAAC,QAAQ;;;EAG1B,MAAM,CAAC,MAAM;;EAEb,WAAW;;;;;;kIAMqH;iBACvH;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerKeyGenerate(server: McpServer): void;