@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,31 +4,31 @@ import { execProcess } from '../../lib/exec.js';
|
|
|
4
4
|
export function registerDesignerInitProject(server) {
|
|
5
5
|
server.registerTool('designer_init_project', {
|
|
6
6
|
title: 'Init Designer Project',
|
|
7
|
-
description: `Initialise a new frontend project from an existing RESTForge Designer plugin, by running restforge-designer init. This WRITES a new project scaffold (config + structure) to disk, ready for generating frontend code.
|
|
8
|
-
|
|
9
|
-
USE WHEN:
|
|
10
|
-
- The user asks to start/initialise a new frontend project based on a designer plugin
|
|
11
|
-
- The user asks things like "init project frontend baru", "scaffold aplikasi dari plugin designer", "mulai project frontend dengan plugin X", "init a new frontend project", "set up a designer project from plugin <id>", "buat project frontend dari plugin"
|
|
12
|
-
- The user has a plugin id in mind and wants the project skeleton (app config, auth settings, ports) created from it
|
|
13
|
-
|
|
14
|
-
DO NOT USE FOR:
|
|
15
|
-
- Generating frontend code from an existing UDF payload -> use 'designer_generate'
|
|
16
|
-
- Creating a brand new custom plugin from a template -> use 'designer_scaffold_plugin'
|
|
17
|
-
- Listing or inspecting available plugins -> use 'designer_list_plugins' / 'designer_inspect_plugin'
|
|
18
|
-
|
|
19
|
-
This tool wraps the RESTForge Designer CLI command: restforge-designer init --plugin=<plugin> --output=<output> [optional flags], run in the given cwd.
|
|
20
|
-
The --plugin and --output flags are always sent so the binary never drops into interactive prompt mode. Optional flags (app name/code, API URLs, auth settings, port, idle timeout, no-auth, overwrite, plugins dir, license) are forwarded only when supplied.
|
|
21
|
-
This operation is license-gated: the RESTForge Designer license must be active for init to succeed.
|
|
22
|
-
|
|
23
|
-
Preconditions:
|
|
24
|
-
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
25
|
-
'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
|
|
26
|
-
- A valid, active RESTForge Designer license is required (the operation is license-gated).
|
|
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. "initialise the frontend project", "generate the frontend code", "scaffold a new plugin").
|
|
31
|
-
- Speak in plain language. Confirm what was created and where; do not paste raw CLI output unless the user explicitly asks.
|
|
7
|
+
description: `Initialise a new frontend project from an existing RESTForge Designer plugin, by running restforge-designer init. This WRITES a new project scaffold (config + structure) to disk, ready for generating frontend code.
|
|
8
|
+
|
|
9
|
+
USE WHEN:
|
|
10
|
+
- The user asks to start/initialise a new frontend project based on a designer plugin
|
|
11
|
+
- The user asks things like "init project frontend baru", "scaffold aplikasi dari plugin designer", "mulai project frontend dengan plugin X", "init a new frontend project", "set up a designer project from plugin <id>", "buat project frontend dari plugin"
|
|
12
|
+
- The user has a plugin id in mind and wants the project skeleton (app config, auth settings, ports) created from it
|
|
13
|
+
|
|
14
|
+
DO NOT USE FOR:
|
|
15
|
+
- Generating frontend code from an existing UDF payload -> use 'designer_generate'
|
|
16
|
+
- Creating a brand new custom plugin from a template -> use 'designer_scaffold_plugin'
|
|
17
|
+
- Listing or inspecting available plugins -> use 'designer_list_plugins' / 'designer_inspect_plugin'
|
|
18
|
+
|
|
19
|
+
This tool wraps the RESTForge Designer CLI command: restforge-designer init --plugin=<plugin> --output=<output> [optional flags], run in the given cwd.
|
|
20
|
+
The --plugin and --output flags are always sent so the binary never drops into interactive prompt mode. Optional flags (app name/code, API URLs, auth settings, port, idle timeout, no-auth, overwrite, plugins dir, license) are forwarded only when supplied.
|
|
21
|
+
This operation is license-gated: the RESTForge Designer license must be active for init to succeed.
|
|
22
|
+
|
|
23
|
+
Preconditions:
|
|
24
|
+
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
25
|
+
'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
|
|
26
|
+
- A valid, active RESTForge Designer license is required (the operation is license-gated).
|
|
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. "initialise the frontend project", "generate the frontend code", "scaffold a new plugin").
|
|
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
|
|
@@ -118,18 +118,18 @@ PRESENTATION GUIDANCE:
|
|
|
118
118
|
content: [
|
|
119
119
|
{
|
|
120
120
|
type: 'text',
|
|
121
|
-
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
122
|
-
|
|
123
|
-
Working directory: ${projectCwd}
|
|
124
|
-
Plugin: ${plugin}
|
|
125
|
-
Output: ${output}
|
|
126
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
127
|
-
Probe command: ${probe.command}
|
|
128
|
-
Exit code: ${probe.exitCode}
|
|
129
|
-
|
|
130
|
-
For the assistant:
|
|
131
|
-
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a project can be initialised.
|
|
132
|
-
- 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.
|
|
121
|
+
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
122
|
+
|
|
123
|
+
Working directory: ${projectCwd}
|
|
124
|
+
Plugin: ${plugin}
|
|
125
|
+
Output: ${output}
|
|
126
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
127
|
+
Probe command: ${probe.command}
|
|
128
|
+
Exit code: ${probe.exitCode}
|
|
129
|
+
|
|
130
|
+
For the assistant:
|
|
131
|
+
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a project can be initialised.
|
|
132
|
+
- 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.
|
|
133
133
|
- Once it is installed, retry initialising the project.`,
|
|
134
134
|
},
|
|
135
135
|
],
|
|
@@ -176,26 +176,26 @@ For the assistant:
|
|
|
176
176
|
content: [
|
|
177
177
|
{
|
|
178
178
|
type: 'text',
|
|
179
|
-
text: `Initialising the Designer project did not complete.
|
|
180
|
-
|
|
181
|
-
Working directory: ${projectCwd}
|
|
182
|
-
Plugin: ${plugin}
|
|
183
|
-
Output: ${output}
|
|
184
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
185
|
-
Command: ${result.command}
|
|
186
|
-
Exit code: ${result.exitCode}
|
|
187
|
-
|
|
188
|
-
--- stdout ---
|
|
189
|
-
${result.stdout}
|
|
190
|
-
--- end stdout ---
|
|
191
|
-
${stderrBlock}
|
|
192
|
-
For the assistant:
|
|
193
|
-
- The init did not finish successfully, so the project 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:
|
|
194
|
-
* 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.
|
|
195
|
-
* The output directory already exists and overwrite was not enabled — suggest retrying with overwrite, or choosing a different output path.
|
|
196
|
-
* The plugin id does not exist — suggest listing the available plugins to pick a valid id.
|
|
197
|
-
* The chosen plugin does not support init — soft note: not every plugin supports the 'init' feature. If the CLI says something like "does not support the init feature", suggest picking a plugin that does (the available plugins can be listed to find one). Do not hardcode or assert a permanent list of which plugins support init — treat it as something to confirm from the current plugin list rather than a fixed claim.
|
|
198
|
-
* Exit code -1 — the command crashed or timed out; offer to retry.
|
|
179
|
+
text: `Initialising the Designer project did not complete.
|
|
180
|
+
|
|
181
|
+
Working directory: ${projectCwd}
|
|
182
|
+
Plugin: ${plugin}
|
|
183
|
+
Output: ${output}
|
|
184
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
185
|
+
Command: ${result.command}
|
|
186
|
+
Exit code: ${result.exitCode}
|
|
187
|
+
|
|
188
|
+
--- stdout ---
|
|
189
|
+
${result.stdout}
|
|
190
|
+
--- end stdout ---
|
|
191
|
+
${stderrBlock}
|
|
192
|
+
For the assistant:
|
|
193
|
+
- The init did not finish successfully, so the project 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:
|
|
194
|
+
* 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.
|
|
195
|
+
* The output directory already exists and overwrite was not enabled — suggest retrying with overwrite, or choosing a different output path.
|
|
196
|
+
* The plugin id does not exist — suggest listing the available plugins to pick a valid id.
|
|
197
|
+
* The chosen plugin does not support init — soft note: not every plugin supports the 'init' feature. If the CLI says something like "does not support the init feature", suggest picking a plugin that does (the available plugins can be listed to find one). Do not hardcode or assert a permanent list of which plugins support init — treat it as something to confirm from the current plugin list rather than a fixed claim.
|
|
198
|
+
* Exit code -1 — the command crashed or timed out; offer to retry.
|
|
199
199
|
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
200
200
|
},
|
|
201
201
|
],
|
|
@@ -210,22 +210,22 @@ For the assistant:
|
|
|
210
210
|
content: [
|
|
211
211
|
{
|
|
212
212
|
type: 'text',
|
|
213
|
-
text: `Designer project initialised successfully.
|
|
214
|
-
|
|
215
|
-
Working directory: ${projectCwd}
|
|
216
|
-
Plugin: ${plugin}
|
|
217
|
-
Output: ${output}
|
|
218
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
219
|
-
Command: ${result.command}
|
|
220
|
-
Exit code: ${result.exitCode}
|
|
221
|
-
|
|
222
|
-
--- stdout ---
|
|
223
|
-
${result.stdout}
|
|
224
|
-
--- end stdout ---
|
|
225
|
-
${stderrBlock}
|
|
226
|
-
For the assistant:
|
|
227
|
-
- Confirm to the user that the frontend project was initialised. Mention the plugin and the output location in plain language.
|
|
228
|
-
- Suggest the next step: author or supply a UDF payload and then generate the frontend code into the project. The usual flow is validate the payload, preview the files, then generate.
|
|
213
|
+
text: `Designer project initialised successfully.
|
|
214
|
+
|
|
215
|
+
Working directory: ${projectCwd}
|
|
216
|
+
Plugin: ${plugin}
|
|
217
|
+
Output: ${output}
|
|
218
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
219
|
+
Command: ${result.command}
|
|
220
|
+
Exit code: ${result.exitCode}
|
|
221
|
+
|
|
222
|
+
--- stdout ---
|
|
223
|
+
${result.stdout}
|
|
224
|
+
--- end stdout ---
|
|
225
|
+
${stderrBlock}
|
|
226
|
+
For the assistant:
|
|
227
|
+
- Confirm to the user that the frontend project was initialised. Mention the plugin and the output location in plain language.
|
|
228
|
+
- Suggest the next step: author or supply a UDF payload and then generate the frontend code into the project. The usual flow is validate the payload, preview the files, then generate.
|
|
229
229
|
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
230
230
|
},
|
|
231
231
|
],
|
|
@@ -4,30 +4,35 @@ import { execProcess } from '../../lib/exec.js';
|
|
|
4
4
|
export function registerDesignerInspectPlugin(server) {
|
|
5
5
|
server.registerTool('designer_inspect_plugin', {
|
|
6
6
|
title: 'Inspect Designer Plugin',
|
|
7
|
-
description: `Inspect the metadata of a single RESTForge Designer frontend plugin (its schema, fields, components, and configuration), by running restforge-designer plugins inspect for a given plugin id.
|
|
8
|
-
|
|
9
|
-
USE WHEN:
|
|
10
|
-
- The user asks for the details, metadata, schema, or fields of one specific designer plugin
|
|
11
|
-
- The user asks things like "detail plugin X", "metadata plugin", "schema plugin designer", "apa isi plugin vanilla-js-auth", "what's inside the vanilla-js-auth plugin", "tampilkan field plugin frontend ini", "show me the structure of plugin <id>"
|
|
12
|
-
- Before authoring a UDF payload for a plugin, to learn which fields and components that plugin expects
|
|
13
|
-
- The user names a specific plugin id and wants to understand what it provides
|
|
14
|
-
|
|
15
|
-
DO NOT USE FOR:
|
|
16
|
-
- Listing ALL available plugins -> use 'designer_list_plugins'
|
|
17
|
-
- Validating a UDF payload against a plugin -> use 'designer_validate_payload'
|
|
18
|
-
- Previewing the files a payload would generate -> use 'designer_preview_files'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
7
|
+
description: `Inspect the metadata of a single RESTForge Designer frontend plugin (its schema, fields, components, and configuration), by running restforge-designer plugins inspect for a given plugin id.
|
|
8
|
+
|
|
9
|
+
USE WHEN:
|
|
10
|
+
- The user asks for the details, metadata, schema, or fields of one specific designer plugin
|
|
11
|
+
- The user asks things like "detail plugin X", "metadata plugin", "schema plugin designer", "apa isi plugin vanilla-js-auth", "what's inside the vanilla-js-auth plugin", "tampilkan field plugin frontend ini", "show me the structure of plugin <id>"
|
|
12
|
+
- Before authoring a UDF payload for a plugin, to learn which fields and components that plugin expects
|
|
13
|
+
- The user names a specific plugin id and wants to understand what it provides
|
|
14
|
+
|
|
15
|
+
DO NOT USE FOR:
|
|
16
|
+
- Listing ALL available plugins -> use 'designer_list_plugins'
|
|
17
|
+
- Validating a UDF payload against a plugin -> use 'designer_validate_payload'
|
|
18
|
+
- Previewing the files a payload would generate -> use 'designer_preview_files'
|
|
19
|
+
- The authoritative catalog of UDF structure and rules (valid field types, required appConfig fields, enums, limits) -> use 'designer_get_udf_catalog'
|
|
20
|
+
|
|
21
|
+
This tool wraps the RESTForge Designer CLI command: restforge-designer plugins inspect --plugin=<plugin> [--plugins-dir=<pluginsDir>], run in the given cwd.
|
|
22
|
+
The CLI resolves the named plugin (auto-detected, or from --plugins-dir) and prints its metadata. It does not modify any file and does not require a license.
|
|
23
|
+
|
|
24
|
+
IMPORTANT — identity, not UDF structure:
|
|
25
|
+
- This tool returns the IDENTITY/metadata of ONE plugin (its declared schema, fields, components, configuration). It is NOT the authoritative source of UDF structure and authoring rules. Do NOT infer the valid UDF field types, required appConfig fields, enums, or limits from this plugin metadata.
|
|
26
|
+
- For the authoritative UDF structure and rules, use 'designer_get_udf_catalog' (serialized from the designer's own validator constants). Use plugin inspection to learn what a SPECIFIC plugin provides; use the catalog to learn the UDF rules that apply across the designer.
|
|
27
|
+
|
|
28
|
+
Preconditions:
|
|
29
|
+
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
30
|
+
'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
|
|
31
|
+
|
|
32
|
+
PRESENTATION GUIDANCE:
|
|
33
|
+
- Match the user's language. If the user writes in Indonesian, respond in Indonesian.
|
|
34
|
+
- Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "inspect the plugin", "list the available plugins", "generate the frontend code").
|
|
35
|
+
- Speak in plain language. Summarise the plugin metadata; do not paste raw CLI output unless the user explicitly asks.
|
|
31
36
|
- When a precondition is not met, frame it as a question or next-step suggestion rather than an error.`,
|
|
32
37
|
inputSchema: {
|
|
33
38
|
cwd: z
|
|
@@ -62,17 +67,17 @@ PRESENTATION GUIDANCE:
|
|
|
62
67
|
content: [
|
|
63
68
|
{
|
|
64
69
|
type: 'text',
|
|
65
|
-
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
66
|
-
|
|
67
|
-
Working directory: ${projectCwd}
|
|
68
|
-
Plugin: ${plugin}
|
|
69
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
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 a plugin can be inspected.
|
|
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.
|
|
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: ${plugin}
|
|
74
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
75
|
+
Probe command: ${probe.command}
|
|
76
|
+
Exit code: ${probe.exitCode}
|
|
77
|
+
|
|
78
|
+
For the assistant:
|
|
79
|
+
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before a plugin can be inspected.
|
|
80
|
+
- 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
81
|
- Once it is installed, retry inspecting the plugin.`,
|
|
77
82
|
},
|
|
78
83
|
],
|
|
@@ -94,19 +99,19 @@ For the assistant:
|
|
|
94
99
|
content: [
|
|
95
100
|
{
|
|
96
101
|
type: 'text',
|
|
97
|
-
text: `Inspecting the Designer plugin did not complete — the command crashed or timed out.
|
|
98
|
-
|
|
99
|
-
Working directory: ${projectCwd}
|
|
100
|
-
Plugin: ${plugin}
|
|
101
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
102
|
-
Command: ${result.command}
|
|
103
|
-
|
|
104
|
-
--- stderr ---
|
|
105
|
-
${result.stderr}
|
|
106
|
-
--- end stderr ---
|
|
107
|
-
|
|
108
|
-
For the assistant:
|
|
109
|
-
- The Designer CLI did not finish (likely a crash or timeout), so there is no plugin metadata to report.
|
|
102
|
+
text: `Inspecting the Designer plugin did not complete — the command crashed or timed out.
|
|
103
|
+
|
|
104
|
+
Working directory: ${projectCwd}
|
|
105
|
+
Plugin: ${plugin}
|
|
106
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
107
|
+
Command: ${result.command}
|
|
108
|
+
|
|
109
|
+
--- stderr ---
|
|
110
|
+
${result.stderr}
|
|
111
|
+
--- end stderr ---
|
|
112
|
+
|
|
113
|
+
For the assistant:
|
|
114
|
+
- The Designer CLI did not finish (likely a crash or timeout), so there is no plugin metadata to report.
|
|
110
115
|
- Tell the user the inspection could not be completed and offer to retry. Do not mention internal tool names.`,
|
|
111
116
|
},
|
|
112
117
|
],
|
|
@@ -122,23 +127,23 @@ For the assistant:
|
|
|
122
127
|
content: [
|
|
123
128
|
{
|
|
124
129
|
type: 'text',
|
|
125
|
-
text: `Inspecting the Designer plugin ran.
|
|
126
|
-
|
|
127
|
-
Working directory: ${projectCwd}
|
|
128
|
-
Plugin: ${plugin}
|
|
129
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
130
|
-
Command: ${result.command}
|
|
131
|
-
Exit code: ${result.exitCode}
|
|
132
|
-
|
|
133
|
-
--- stdout ---
|
|
134
|
-
${result.stdout}
|
|
135
|
-
--- end stdout ---
|
|
136
|
-
${stderrBlock}
|
|
137
|
-
For the assistant:
|
|
138
|
-
- The Designer CLI ran to completion. Read the CLI output above and classify the result:
|
|
139
|
-
(a) Positive result — the output is the plugin's metadata (its schema, fields, components). Summarise it in plain language so the user understands what the plugin expects, and offer the next step (e.g. author or validate a payload for it).
|
|
140
|
-
(b) Actionable negative verdict — the named plugin id does not exist, or the plugins directory override could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Tell the user the plugin id was not found (note: a "plugin not found" verdict often comes with a non-zero exit code, which is expected here) and suggest listing the available plugins to pick a valid id.
|
|
141
|
-
- 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).
|
|
130
|
+
text: `Inspecting the Designer plugin ran.
|
|
131
|
+
|
|
132
|
+
Working directory: ${projectCwd}
|
|
133
|
+
Plugin: ${plugin}
|
|
134
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
135
|
+
Command: ${result.command}
|
|
136
|
+
Exit code: ${result.exitCode}
|
|
137
|
+
|
|
138
|
+
--- stdout ---
|
|
139
|
+
${result.stdout}
|
|
140
|
+
--- end stdout ---
|
|
141
|
+
${stderrBlock}
|
|
142
|
+
For the assistant:
|
|
143
|
+
- The Designer CLI ran to completion. Read the CLI output above and classify the result:
|
|
144
|
+
(a) Positive result — the output is the plugin's metadata (its schema, fields, components). Summarise it in plain language so the user understands what the plugin expects, and offer the next step (e.g. author or validate a payload for it).
|
|
145
|
+
(b) Actionable negative verdict — the named plugin id does not exist, or the plugins directory override could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Tell the user the plugin id was not found (note: a "plugin not found" verdict often comes with a non-zero exit code, which is expected here) and suggest listing the available plugins to pick a valid id.
|
|
146
|
+
- 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).
|
|
142
147
|
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
143
148
|
},
|
|
144
149
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect-plugin.js","sourceRoot":"","sources":["../../../src/tools/designer/inspect-plugin.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,yBAAyB,EACzB;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"inspect-plugin.js","sourceRoot":"","sources":["../../../src/tools/designer/inspect-plugin.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,30 +4,30 @@ import { execProcess } from '../../lib/exec.js';
|
|
|
4
4
|
export function registerDesignerListPlugins(server) {
|
|
5
5
|
server.registerTool('designer_list_plugins', {
|
|
6
6
|
title: 'List Designer Plugins',
|
|
7
|
-
description: `List the RESTForge Designer frontend plugins available in the current environment, by running restforge-designer plugins list. Each plugin defines a frontend tech stack / template the designer can generate against.
|
|
8
|
-
|
|
9
|
-
USE WHEN:
|
|
10
|
-
- The user asks which designer plugins are available, or wants the catalog of frontend templates
|
|
11
|
-
- The user asks things like "plugin apa yang tersedia", "daftar plugin designer", "list frontend plugins", "what designer plugins do I have", "tampilkan plugin frontend", "which frontend templates can I use"
|
|
12
|
-
- Before initialising a project or generating frontend code, to choose which plugin to target
|
|
13
|
-
- The user mentions designer plugins generically and wants an overview
|
|
14
|
-
|
|
15
|
-
DO NOT USE FOR:
|
|
16
|
-
- Inspecting the metadata, schema, or fields of ONE specific plugin -> use 'designer_inspect_plugin'
|
|
17
|
-
- Validating a UDF payload against a plugin -> use 'designer_validate_payload'
|
|
18
|
-
- Previewing the files a payload would generate -> use 'designer_preview_files'
|
|
19
|
-
|
|
20
|
-
This tool wraps the RESTForge Designer CLI command: restforge-designer plugins list [--plugins-dir=<pluginsDir>], run in the given cwd.
|
|
21
|
-
The CLI prints a table of available plugins (auto-detected, or from --plugins-dir when supplied). It does not modify any file and does not require a license.
|
|
22
|
-
|
|
23
|
-
Preconditions:
|
|
24
|
-
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
25
|
-
'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
|
|
26
|
-
|
|
27
|
-
PRESENTATION GUIDANCE:
|
|
28
|
-
- Match the user's language. If the user writes in Indonesian, respond in Indonesian.
|
|
29
|
-
- Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "list the available plugins", "inspect a plugin", "generate the frontend code").
|
|
30
|
-
- Speak in plain language. Summarise the plugins (names, count); do not paste raw CLI output unless the user explicitly asks.
|
|
7
|
+
description: `List the RESTForge Designer frontend plugins available in the current environment, by running restforge-designer plugins list. Each plugin defines a frontend tech stack / template the designer can generate against.
|
|
8
|
+
|
|
9
|
+
USE WHEN:
|
|
10
|
+
- The user asks which designer plugins are available, or wants the catalog of frontend templates
|
|
11
|
+
- The user asks things like "plugin apa yang tersedia", "daftar plugin designer", "list frontend plugins", "what designer plugins do I have", "tampilkan plugin frontend", "which frontend templates can I use"
|
|
12
|
+
- Before initialising a project or generating frontend code, to choose which plugin to target
|
|
13
|
+
- The user mentions designer plugins generically and wants an overview
|
|
14
|
+
|
|
15
|
+
DO NOT USE FOR:
|
|
16
|
+
- Inspecting the metadata, schema, or fields of ONE specific plugin -> use 'designer_inspect_plugin'
|
|
17
|
+
- Validating a UDF payload against a plugin -> use 'designer_validate_payload'
|
|
18
|
+
- Previewing the files a payload would generate -> use 'designer_preview_files'
|
|
19
|
+
|
|
20
|
+
This tool wraps the RESTForge Designer CLI command: restforge-designer plugins list [--plugins-dir=<pluginsDir>], run in the given cwd.
|
|
21
|
+
The CLI prints a table of available plugins (auto-detected, or from --plugins-dir when supplied). It does not modify any file and does not require a license.
|
|
22
|
+
|
|
23
|
+
Preconditions:
|
|
24
|
+
- The 'restforge-designer' binary must be installed and reachable on PATH. This tool pre-checks that by running
|
|
25
|
+
'restforge-designer --version'; if the binary is missing, the response will surface that as a non-error precondition.
|
|
26
|
+
|
|
27
|
+
PRESENTATION GUIDANCE:
|
|
28
|
+
- Match the user's language. If the user writes in Indonesian, respond in Indonesian.
|
|
29
|
+
- Never mention internal tool names in the reply to the user. Describe actions by what they do (e.g. "list the available plugins", "inspect a plugin", "generate the frontend code").
|
|
30
|
+
- Speak in plain language. Summarise the plugins (names, count); do not paste raw CLI output unless the user explicitly asks.
|
|
31
31
|
- When a precondition is not met, frame it as a question or next-step suggestion rather than an error.`,
|
|
32
32
|
inputSchema: {
|
|
33
33
|
cwd: z
|
|
@@ -58,16 +58,16 @@ PRESENTATION GUIDANCE:
|
|
|
58
58
|
content: [
|
|
59
59
|
{
|
|
60
60
|
type: 'text',
|
|
61
|
-
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
62
|
-
|
|
63
|
-
Working directory: ${projectCwd}
|
|
64
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
65
|
-
Probe command: ${probe.command}
|
|
66
|
-
Exit code: ${probe.exitCode}
|
|
67
|
-
|
|
68
|
-
For the assistant:
|
|
69
|
-
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before the available plugins can be listed.
|
|
70
|
-
- 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.
|
|
61
|
+
text: `Precondition not met: the RESTForge Designer command-line tool is not installed or not on PATH.
|
|
62
|
+
|
|
63
|
+
Working directory: ${projectCwd}
|
|
64
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
65
|
+
Probe command: ${probe.command}
|
|
66
|
+
Exit code: ${probe.exitCode}
|
|
67
|
+
|
|
68
|
+
For the assistant:
|
|
69
|
+
- The user needs to install RESTForge Designer (and ensure it is on the system PATH) before the available plugins can be listed.
|
|
70
|
+
- 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
71
|
- Once it is installed, retry listing the plugins.`,
|
|
72
72
|
},
|
|
73
73
|
],
|
|
@@ -89,18 +89,18 @@ For the assistant:
|
|
|
89
89
|
content: [
|
|
90
90
|
{
|
|
91
91
|
type: 'text',
|
|
92
|
-
text: `Listing Designer plugins did not complete — the command crashed or timed out.
|
|
93
|
-
|
|
94
|
-
Working directory: ${projectCwd}
|
|
95
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
96
|
-
Command: ${result.command}
|
|
97
|
-
|
|
98
|
-
--- stderr ---
|
|
99
|
-
${result.stderr}
|
|
100
|
-
--- end stderr ---
|
|
101
|
-
|
|
102
|
-
For the assistant:
|
|
103
|
-
- The Designer CLI did not finish (likely a crash or timeout), so there is no plugin list to report.
|
|
92
|
+
text: `Listing Designer plugins did not complete — the command crashed or timed out.
|
|
93
|
+
|
|
94
|
+
Working directory: ${projectCwd}
|
|
95
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
96
|
+
Command: ${result.command}
|
|
97
|
+
|
|
98
|
+
--- stderr ---
|
|
99
|
+
${result.stderr}
|
|
100
|
+
--- end stderr ---
|
|
101
|
+
|
|
102
|
+
For the assistant:
|
|
103
|
+
- The Designer CLI did not finish (likely a crash or timeout), so there is no plugin list to report.
|
|
104
104
|
- Tell the user the list could not be retrieved and offer to retry. Do not mention internal tool names.`,
|
|
105
105
|
},
|
|
106
106
|
],
|
|
@@ -116,22 +116,22 @@ For the assistant:
|
|
|
116
116
|
content: [
|
|
117
117
|
{
|
|
118
118
|
type: 'text',
|
|
119
|
-
text: `Listing Designer plugins ran.
|
|
120
|
-
|
|
121
|
-
Working directory: ${projectCwd}
|
|
122
|
-
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
123
|
-
Command: ${result.command}
|
|
124
|
-
Exit code: ${result.exitCode}
|
|
125
|
-
|
|
126
|
-
--- stdout ---
|
|
127
|
-
${result.stdout}
|
|
128
|
-
--- end stdout ---
|
|
129
|
-
${stderrBlock}
|
|
130
|
-
For the assistant:
|
|
131
|
-
- The Designer CLI ran to completion. Read the CLI output above and classify the result:
|
|
132
|
-
(a) Positive result — the output is a table of available plugins. Summarise the plugins in plain language (names and how many) and, if the user is choosing one, suggest inspecting a specific plugin for its details.
|
|
133
|
-
(b) Actionable negative verdict — no plugins were found, or the plugins directory override could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Explain the situation (e.g. the plugins folder is empty or the override path is wrong) and offer next steps.
|
|
134
|
-
- 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).
|
|
119
|
+
text: `Listing Designer plugins ran.
|
|
120
|
+
|
|
121
|
+
Working directory: ${projectCwd}
|
|
122
|
+
Plugins dir: ${pluginsDir ?? 'auto-detect'}
|
|
123
|
+
Command: ${result.command}
|
|
124
|
+
Exit code: ${result.exitCode}
|
|
125
|
+
|
|
126
|
+
--- stdout ---
|
|
127
|
+
${result.stdout}
|
|
128
|
+
--- end stdout ---
|
|
129
|
+
${stderrBlock}
|
|
130
|
+
For the assistant:
|
|
131
|
+
- The Designer CLI ran to completion. Read the CLI output above and classify the result:
|
|
132
|
+
(a) Positive result — the output is a table of available plugins. Summarise the plugins in plain language (names and how many) and, if the user is choosing one, suggest inspecting a specific plugin for its details.
|
|
133
|
+
(b) Actionable negative verdict — no plugins were found, or the plugins directory override could not be resolved. These are legitimate results to RELAY to the user, not tool malfunctions. Explain the situation (e.g. the plugins folder is empty or the override path is wrong) and offer next steps.
|
|
134
|
+
- 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).
|
|
135
135
|
- Do not paste the raw CLI output unless the user explicitly asks. Do not mention internal tool names. Match the user's language.`,
|
|
136
136
|
},
|
|
137
137
|
],
|