@diviops/mcp-server 1.5.62 → 1.5.63

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/README.md CHANGED
@@ -8,7 +8,19 @@ The Node.js MCP server inside the DiviOps harness. It gives Claude Code, Codex,
8
8
  Claude Code <-> MCP Server (stdio) <-> WordPress REST API <-> DiviOps Agent plugin
9
9
  ```
10
10
 
11
- ## 1.5.62 release note
11
+ ## 1.5.63 release note
12
+
13
+ With Free Agent 1.5.36, runtime schema discovery accepts registered third-party
14
+ Divi modules and routes their namespaced identifiers without dropping the
15
+ namespace. The Free plugin also supports their module read/update/move and
16
+ Theme Builder block insertion. Native short identifiers remain supported;
17
+ unrelated WordPress blocks are refused and the native schema dump is unchanged.
18
+
19
+ Update both components for the complete correction. Native checks covered
20
+ FluentCart Store Logo, not every extension or version. Public builder remains
21
+ 1.4.11. Dependencies and compatibility floors are unchanged.
22
+
23
+ ## Previous 1.5.62 release note
12
24
 
13
25
  With Free Agent 1.5.34, empty header/footer inputs on template creation link the
14
26
  active enabled default's existing layouts and preserve region enabled states.
package/dist/index.js CHANGED
@@ -827,7 +827,7 @@ registerPluginTool("diviops_menu_location_assign", {
827
827
  };
828
828
  });
829
829
  registerPluginTool("diviops_schema_list_modules", {
830
- description: "List all available Divi modules (block types) with their names, titles, and categories. Use this to discover what modules can be used in layouts. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
830
+ description: "List registered native Divi and Divi-registered custom modules (block types) with their names, titles, and categories. Use this to discover what modules can be used in layouts. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
831
831
  annotations: { idempotentHint: true },
832
832
  _meta: { idempotent: "true" },
833
833
  }, async () => {
@@ -839,17 +839,17 @@ registerPluginTool("diviops_schema_list_modules", {
839
839
  };
840
840
  });
841
841
  registerPluginTool("diviops_schema_get_module", {
842
- description: "Get the attribute schema for a Divi module. Default mode 'single' returns one module's schema (optimized, ~70% smaller; pass raw: true for full). Mode 'dump_all' snapshots every Divi module in one call and includes a `schema_version` hash over the canonical *PresetAttrsMap.php files — build-time entry point for the skill regen pipeline; ignores `module_name` and `raw`. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
842
+ description: "Get the registered attribute schema for a native or Divi-registered custom module. Extension registration does not guarantee complete metadata or native rendering compatibility. Default mode 'single' returns one module's schema (optimized, ~70% smaller; pass raw: true for full). Mode 'dump_all' snapshots native Divi modules only in one call and includes a `schema_version` hash over the canonical *PresetAttrsMap.php files — build-time entry point for the skill regen pipeline; ignores `module_name` and `raw`. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
843
843
  inputSchema: {
844
844
  mode: z
845
845
  .enum(["single", "dump_all"])
846
846
  .optional()
847
847
  .default("single")
848
- .describe("'single' (default): return one module's schema. 'dump_all': return every module keyed by name plus schema_version + divi_version."),
848
+ .describe("'single' (default): return one module's schema. 'dump_all': return native Divi modules keyed by name plus schema_version + divi_version."),
849
849
  module_name: z
850
850
  .string()
851
851
  .optional()
852
- .describe('Module name, e.g. "text", "image", "accordion", or full "divi/text". Required when mode="single"; ignored when mode="dump_all".'),
852
+ .describe('Module name, e.g. "text", "image", "accordion", full "divi/text", or a registered extension such as "difl/faq". Required when mode="single"; ignored when mode="dump_all".'),
853
853
  raw: z
854
854
  .boolean()
855
855
  .optional()
@@ -877,19 +877,20 @@ registerPluginTool("diviops_schema_get_module", {
877
877
  content: [{ type: "text", text: serializeEnvelope(result, "diviops_schema_get_module") }],
878
878
  };
879
879
  }
880
- if (!module_name) {
880
+ const route = module_name ? schemaModuleRoute(module_name) : null;
881
+ if (!route) {
881
882
  const failure = {
882
883
  ok: false,
883
884
  error: {
884
885
  code: ErrorCodes.INVALID_INPUT,
885
- message: "module_name is required when mode='single'",
886
+ message: "mode='single' requires a module slug or namespace/module name; dump-all is reserved for mode='dump_all'",
886
887
  },
887
888
  };
888
889
  return {
889
890
  content: [{ type: "text", text: serializeEnvelope(failure, "diviops_schema_get_module") }],
890
891
  };
891
892
  }
892
- const result = await wp.requestEnveloped(schemaModuleRoute(module_name));
893
+ const result = await wp.requestEnveloped(route);
893
894
  const projected = envelopeMap(result, (data) => raw ? data : optimizeSchema(data));
894
895
  return {
895
896
  content: [
@@ -2801,7 +2802,7 @@ registerPluginTool("diviops_tb_layout_update", {
2801
2802
  };
2802
2803
  });
2803
2804
  registerPluginTool("diviops_tb_layout_block_insert", {
2804
- description: "Insert one or more serialized Divi blocks into an existing Theme Builder layout without replacing the whole layout. Target a unique parent with `parent_selector` (for example `divi/group[adminLabel=\"Legal Col\"]`, or `divi/group` only when it is unique) or an explicit zero-based `parent_path` from the parsed block tree such as `0.1.2`. `position=append|prepend` inserts as children of the target block; `position=before|after` inserts beside the target within its parent. Ambiguous selectors return ok:false with code 'invalid_input'; missing targets return 'not_found'. The route parses and validates the inserted blocks, rejects malformed serialization (literal pseudo-escapes such as bare `u003c` are allowed in native Code content strings), validates the final serialized layout before saving, and returns a no-op when the exact requested block sequence already exists at the insertion point." +
2805
+ description: "Insert one or more serialized Divi blocks into an existing Theme Builder layout without replacing the whole layout. Target a unique parent with `parent_selector` (for example `divi/group[adminLabel=\"Legal Col\"]`, or `divi/group` only when it is unique) or an explicit zero-based `parent_path` from the parsed block tree such as `0.1.2`. `position=append|prepend` inserts as children of the target block; `position=before|after` inserts beside the target within its parent. Ambiguous selectors return ok:false with code 'invalid_input'; missing targets return 'not_found'. Inserted named blocks and the target must be native Divi modules or custom modules registered through Divi; unrelated stored siblings are preserved. This registration check does not validate extension-specific attribute schemas or child-container rules. The route parses and validates the inserted blocks, rejects malformed serialization (literal pseudo-escapes such as bare `u003c` are allowed in native Code content strings), validates the final serialized layout before saving, and returns a no-op when the exact requested block sequence already exists at the insertion point." +
2805
2806
  DRY_RUN_DESC_SUFFIX,
2806
2807
  inputSchema: {
2807
2808
  layout_id: z.number().int().describe("Theme Builder layout post ID to mutate"),
@@ -1,2 +1,2 @@
1
1
  export declare function normalizeSchemaModuleName(moduleName: string): string;
2
- export declare function schemaModuleRoute(moduleName: string): string;
2
+ export declare function schemaModuleRoute(moduleName: string): string | null;
@@ -3,5 +3,12 @@ export function normalizeSchemaModuleName(moduleName) {
3
3
  return trimmed.startsWith("divi/") ? trimmed.slice("divi/".length) : trimmed;
4
4
  }
5
5
  export function schemaModuleRoute(moduleName) {
6
- return `/schema/module/${encodeURIComponent(normalizeSchemaModuleName(moduleName))}`;
6
+ const name = moduleName.trim();
7
+ if (!/^[a-zA-Z0-9_-]+(?:\/[a-zA-Z0-9_-]+)?$/.test(name))
8
+ return null;
9
+ const normalized = normalizeSchemaModuleName(name);
10
+ // This literal route is reserved for the build-time dump, never a single module.
11
+ if (normalized.toLowerCase() === "dump-all")
12
+ return null;
13
+ return `/schema/module/${normalized}`;
7
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviops/mcp-server",
3
- "version": "1.5.62",
3
+ "version": "1.5.63",
4
4
  "description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",