jui-tools-mcp-server 2.12.9 → 2.12.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jui-tools-mcp-server",
3
- "version": "2.12.9",
3
+ "version": "2.12.10",
4
4
  "description": "MCP server for JsonUI project management - wraps jui and jsonui-doc CLIs plus component spec lookup",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -14,9 +14,15 @@ export function register(server: McpServer, config: ServerConfig) {
14
14
  attributes: z.string().optional().describe("Attributes in key:type format (e.g., 'prop1:String,prop2:Int')"),
15
15
  container: z.boolean().optional().describe("Mark as container component"),
16
16
  skip_existing: z.boolean().optional().describe(
17
- "Leave existing converter files untouched (no overwrite prompt). " +
18
- "`jui build` enables this automatically; pass it here for idempotent " +
19
- "explicit scaffold runs."
17
+ "Leave existing converter and scaffold files untouched, without the " +
18
+ "overwrite prompt — for idempotent scaffold runs. Wins over `force` " +
19
+ "when both are set."
20
+ ),
21
+ force: z.boolean().optional().describe(
22
+ "Replace existing converter and scaffold files without the overwrite " +
23
+ "prompt. The scaffolds are the project's own code: edits made in them " +
24
+ "are lost. Needs jsonui-cli 1.8.113 or later (earlier `jui` rejects " +
25
+ "--force)."
20
26
  ),
21
27
  project_dir: z.string().optional().describe("Project directory (overrides JUI_PROJECT_DIR env)"),
22
28
  },
@@ -30,6 +36,7 @@ export function register(server: McpServer, config: ServerConfig) {
30
36
  if (params.attributes) { args.push("--attributes", params.attributes); }
31
37
  if (params.container) { args.push("--container"); }
32
38
  if (params.skip_existing) { args.push("--skip-existing"); }
39
+ if (params.force) { args.push("--force"); }
33
40
 
34
41
  const result = await runCli("jui", args, { cwd: projectDir });
35
42
  return { content: [{ type: "text", text: formatResult(result) }] };
@@ -284,6 +284,28 @@ describe("jui_generate_converter", () => {
284
284
  "--all",
285
285
  ]);
286
286
  });
287
+
288
+ // `jui g converter --force` exists from jsonui-cli 1.8.113; the tool had no
289
+ // way to pass it.
290
+ it("passes --force only when asked", async () => {
291
+ await harness.call("jui_generate_converter", {
292
+ all: true,
293
+ force: true,
294
+ project_dir: projectDir,
295
+ });
296
+ await harness.call("jui_generate_converter", { all: true, project_dir: projectDir });
297
+ expect(recorded[0].args).toEqual(["generate", "converter", "--all", "--force"]);
298
+ expect(recorded[1].args).toEqual(["generate", "converter", "--all"]);
299
+ });
300
+
301
+ // The description said "`jui build` enables this automatically": the build
302
+ // has not generated converters for a long time (jsonui-cli 1.8.113 removed
303
+ // the same sentence from its own docstring).
304
+ it("does not tell the agent that jui build skips existing converters", () => {
305
+ const schema = harness.tools.get("jui_generate_converter")!.schema;
306
+ expect(schema.skip_existing.description).not.toContain("jui build");
307
+ expect(schema.force.description).toContain("1.8.113");
308
+ });
287
309
  });
288
310
 
289
311
  describe("jui_verify", () => {