@diviops/mcp-server 1.5.61 → 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 +26 -1
- package/dist/index.js +11 -10
- package/dist/schema-route.d.ts +1 -1
- package/dist/schema-route.js +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,32 @@ 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.
|
|
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
|
|
24
|
+
|
|
25
|
+
With Free Agent 1.5.34, empty header/footer inputs on template creation link the
|
|
26
|
+
active enabled default's existing layouts and preserve region enabled states.
|
|
27
|
+
Preview and apply report resolved sources and IDs. Without an enabled default,
|
|
28
|
+
the result explicitly reports native-theme fallback; invalid inheritance is
|
|
29
|
+
refused before changes. Existing templates are not automatically repaired.
|
|
30
|
+
|
|
31
|
+
Links are resolved at creation, not automatically rebound when the default
|
|
32
|
+
layout ID is replaced. Update the Free plugin to receive the fix; this MCP
|
|
33
|
+
update supplies matching tool guidance. Public builder remains 1.4.11.
|
|
34
|
+
Dependencies and compatibility floors are unchanged.
|
|
35
|
+
|
|
36
|
+
## Previous 1.5.61 release note
|
|
12
37
|
|
|
13
38
|
With Free Agent 1.5.31, Theme Builder template trash and permanent deletion
|
|
14
39
|
preserve layouts referenced by another template. Preview excludes them from
|
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
|
|
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
|
|
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
|
|
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",
|
|
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
|
-
|
|
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: "
|
|
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(
|
|
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"),
|
|
@@ -2865,12 +2866,12 @@ registerPluginTool("diviops_tb_template_create", {
|
|
|
2865
2866
|
.string()
|
|
2866
2867
|
.optional()
|
|
2867
2868
|
.default("")
|
|
2868
|
-
.describe("Header block markup
|
|
2869
|
+
.describe("Header block markup. Empty links the active enabled default template’s header layout and enabled state at creation; otherwise uses native-theme fallback. Links are not automatically rebound if the default layout ID changes. Invalid inheritance is refused; dry_run reports resolved regions."),
|
|
2869
2870
|
footer_content: z
|
|
2870
2871
|
.string()
|
|
2871
2872
|
.optional()
|
|
2872
2873
|
.default("")
|
|
2873
|
-
.describe("Footer block markup
|
|
2874
|
+
.describe("Footer block markup. Empty links the active enabled default template’s footer layout and enabled state at creation; otherwise uses native-theme fallback. Links are not automatically rebound if the default layout ID changes. Invalid inheritance is refused; dry_run reports resolved regions."),
|
|
2874
2875
|
body_content: z.string().optional().default("").describe("Body block markup (omitted/empty = existing no-custom-body behavior). Nonempty content requires plugin capability tb_template_create_body; returns body_layout_id. No global Theme Builder save or legacy cleanup."),
|
|
2875
2876
|
dry_run: DRY_RUN_FIELD,
|
|
2876
2877
|
},
|
package/dist/schema-route.d.ts
CHANGED
|
@@ -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;
|
package/dist/schema-route.js
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|