@diviops/mcp-server 1.5.70 → 1.5.72
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 +15 -4
- package/dist/index.js +59 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,12 @@ 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.72 candidate release note
|
|
12
|
+
|
|
13
|
+
Adds five capability-gated Pro SEO text workflow tools: plan, advance, status/report, recovery plan and recover. Existing Free SEO tools gain bounded operation correlation and exact outcome lookup. Pair with Free 1.5.43 and Pro 1.0.18-beta for the complete reviewed workflow; availability follows capabilities, not a shared version floor.
|
|
14
|
+
|
|
15
|
+
Each advance affects at most one explicit page. After an interrupted request, read status before deciding whether to advance again; do not automatically retry. Single-page authoring and recovery remain Free. Restart or reconnect the MCP client after supported component updates to refresh discovery. Candidate packaging and publication remain separate.
|
|
16
|
+
|
|
11
17
|
## 1.5.68 release note — named site-wide CSS blocks
|
|
12
18
|
|
|
13
19
|
With Free Agent 1.5.39, `diviops_custom_css_get`, `diviops_custom_css_upsert`
|
|
@@ -495,7 +501,7 @@ The server exposes **100 always-on tools** across the categories below. Each cat
|
|
|
495
501
|
| Library + templates | Reusable layouts + Theme Builder | `library_*`, `template_*`, `tb_*` |
|
|
496
502
|
| Native Custom CSS | Read, preview, update and restore named site-wide CSS blocks | `custom_css_*` |
|
|
497
503
|
| WordPress menus | Author reusable nav menus and theme-location assignments | `menu_*` |
|
|
498
|
-
| Semantic SEO metadata | Inspect provider support; TSF title/description
|
|
504
|
+
| Semantic SEO metadata | Inspect provider support; TSF and Rank Math title/description and canonical/noindex with checksum/readback guards | `seo_*` |
|
|
499
505
|
| Schema introspection | Module attribute discovery | `schema_*` |
|
|
500
506
|
| Canvas / off-canvas | Popups, modals, menus | `canvas_*` |
|
|
501
507
|
| SCF integration | Secure Custom Fields sync | `scf_*` |
|
|
@@ -828,14 +834,19 @@ TSF retains a custom canonical under noindex and suppresses generated fallback.
|
|
|
828
834
|
Homepage canonical settings can override a page value. Typed recovery records
|
|
829
835
|
have no automatic expiry and require operator cleanup.
|
|
830
836
|
|
|
831
|
-
Pair MCP 1.5.
|
|
837
|
+
Pair MCP 1.5.71 with Free Agent 1.5.42 and restart the server. Native Classic
|
|
832
838
|
editor save/reopen, frontend canonical/robots, primed sitemap exclusion and
|
|
833
839
|
restoration, defaults drift and permission refusal passed on WordPress 7.1,
|
|
834
840
|
PHP 8.3 and Divi 5.13.1 for Rank Math 1.0.279 and TSF 5.1.4. TSF additionally
|
|
835
841
|
passed exact empty/zero/force-index restore and homepage/scheme checks. Block
|
|
836
842
|
editor, other provider versions, external cache eviction and MCP stdio runtime
|
|
837
|
-
are outside this qualification. Rank Math title/description
|
|
838
|
-
|
|
843
|
+
are outside this qualification. Rank Math title/description set/clear uses the same
|
|
844
|
+
plain-text safety checks, top-level checksum and typed recovery. Its separate native
|
|
845
|
+
qualification passed both page save/reopen paths, frontend output, clear/default
|
|
846
|
+
fallback, exact absent/empty/template recovery and legacy-record compatibility. Refresh checksums after updating;
|
|
847
|
+
legacy canonical/noindex recovery records remain supported. Computed text may
|
|
848
|
+
contain unresolved provider templates and is not a verified frontend tag. Yoast,
|
|
849
|
+
social/schema and bulk edits remain outside these adapters. See the [Rank Math contract](../docs/rank-math-seo-adapter.md)
|
|
839
850
|
and [TSF contract](../docs/tsf-indexing-adapter.md).
|
|
840
851
|
|
|
841
852
|
### `_meta.idempotent` markers
|
package/dist/index.js
CHANGED
|
@@ -522,15 +522,18 @@ registerPluginTool("diviops_seo_provider_list", {
|
|
|
522
522
|
};
|
|
523
523
|
});
|
|
524
524
|
registerPluginTool("diviops_seo_metadata_get", {
|
|
525
|
-
description: "Read explicit and effective semantic SEO metadata for one provider-supported post. Free/core and explicit-metadata-only: fields depend on provider: TSF seo_title/meta_description plus a separate indexing section on 5.1.4 pages, or Rank Math canonical_url/noindex; no raw metadata keys or provider maps are accepted or returned. Requires edit_post before stored payload exposure. Returns exact explicit presence/value, effective provider output, deterministic checksum, provider lifecycle/capability evidence, canonical WordPress identity evidence, and cache status. Error codes include not_found, forbidden, seo.provider_absent, seo.provider_incompatible, seo.provider_unsupported, and seo.post_type_unsupported. Returns the standardized envelope.",
|
|
525
|
+
description: "Read explicit and effective semantic SEO metadata for one provider-supported post. Free/core and explicit-metadata-only: fields depend on provider: TSF seo_title/meta_description plus a separate indexing section on 5.1.4 pages, or Rank Math seo_title/meta_description/canonical_url/noindex; no raw metadata keys or provider maps are accepted or returned. Requires edit_post before stored payload exposure. Returns exact explicit presence/value, effective provider output, deterministic checksum, provider lifecycle/capability evidence, canonical WordPress identity evidence, and cache status. Error codes include not_found, forbidden, seo.provider_absent, seo.provider_incompatible, seo.provider_unsupported, and seo.post_type_unsupported. With operation_key, returns only the historical recorded outcome for a keyed TSF/Rank Math text operation. uncertain or lock_held means stop and inspect; lookup never retries or unlocks. not_recorded is not proof of a completed noop. Returns the standardized envelope.",
|
|
526
526
|
inputSchema: {
|
|
527
|
+
operation_key: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{15,63}$/).optional().describe("Look up a text-operation key instead of current metadata; requires the same provider and target."),
|
|
527
528
|
post_id: z.number().int().positive().describe("WordPress post/page ID to inspect. Requires edit_post on this exact target."),
|
|
528
529
|
provider: SEO_PROVIDER.optional().default("auto").describe("Provider selector. auto refuses ambiguity when both providers are active."),
|
|
529
530
|
},
|
|
530
531
|
annotations: { idempotentHint: true },
|
|
531
532
|
_meta: { idempotent: "true" },
|
|
532
|
-
}, async ({ post_id, provider }) => {
|
|
533
|
-
const params = new URLSearchParams({ provider: provider ?? "auto" })
|
|
533
|
+
}, async ({ post_id, provider, operation_key }) => {
|
|
534
|
+
const params = new URLSearchParams({ provider: provider ?? "auto" });
|
|
535
|
+
if (operation_key !== undefined)
|
|
536
|
+
params.set("operation_key", operation_key);
|
|
534
537
|
const result = await wp.requestEnveloped(`/seo/metadata/${post_id}?${params}`);
|
|
535
538
|
return {
|
|
536
539
|
content: [
|
|
@@ -1257,26 +1260,32 @@ registerPluginTool("diviops_meta_find_icon", {
|
|
|
1257
1260
|
});
|
|
1258
1261
|
// ── Write Tools ──────────────────────────────────────────────────────
|
|
1259
1262
|
registerPluginTool("diviops_seo_metadata_update", {
|
|
1260
|
-
description: "Update one page/post using fixed provider fields and expected_checksum. TSF retains seo_title/meta_description set/clear and its original top-level checksum. TSF 5.1.4 pages additionally support canonical_url set/clear and noindex set with value=noindex or reset_default without a value; use indexing.checksum from get for these operations and TSF restore. Do not mix text and indexing changes. TSF keeps unrelated robots defaults inherited and custom canonical URLs remain under noindex. Rank Math 1.0.279 supports canonical_url set/clear and noindex set with value='noindex' on pages; it preserves other robots directives and previews inherited defaults that become pinned. No generic robots arrays, force-index or noindex clear. reset_default is TSF-only.
|
|
1263
|
+
description: "Update one page/post using fixed provider fields and expected_checksum. TSF retains seo_title/meta_description set/clear and its original top-level checksum. TSF 5.1.4 pages additionally support canonical_url set/clear and noindex set with value=noindex or reset_default without a value; use indexing.checksum from get for these operations and tsf_ indexing restore. TSF text restore uses tsft_ snapshots and the original top-level checksum. Do not mix text and indexing changes. TSF keeps unrelated robots defaults inherited and custom canonical URLs remain under noindex. Rank Math 1.0.279 additionally supports plain-text seo_title/meta_description set/clear with its top-level checksum and typed restore; unresolved template variables and markup are refused. It supports canonical_url set/clear and noindex set with value='noindex' on pages; it preserves other robots directives and previews inherited defaults that become pinned. No generic robots arrays, force-index or noindex clear. reset_default is TSF-only. TSF text and both canonical/noindex adapters create a persistent typed recovery record before apply and return snapshot_id. To restore, omit changes and pass restore_snapshot_id with a fresh expected_checksum; restore refuses third-party changes and preserves untouched fields. Use dry_run to preview. Reads return provider-computed values, not verified frontend tags; Rank Math suppresses canonical output under noindex. Other providers, social/schema/bulk edits are unsupported. Optional operation_key correlates text-only updates/restores within one site/provider. Reuse it only with identical target, provider version, expected_checksum and input: an existing record returns a historical outcome without replaying, even if current metadata has changed. Preview/noop does not reserve a key. Indexing operations cannot use it. After a lost response, look up the key through get; uncertain/locked records stop. Runtime qualification remains separate." +
|
|
1261
1264
|
DRY_RUN_DESC_SUFFIX,
|
|
1262
1265
|
inputSchema: {
|
|
1266
|
+
operation_key: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{15,63}$/).optional().describe("Stable caller key for one text operation (16–64 ASCII letters, digits, underscore or hyphen). Save it before calling; never change the input when reusing it."),
|
|
1263
1267
|
post_id: z.number().int().positive().describe("WordPress post/page ID to update. Requires edit_post on this exact target."),
|
|
1264
1268
|
provider: SEO_PROVIDER.optional().default("auto").describe("Provider selector. Use auto, tsf, or rank_math."),
|
|
1269
|
+
expected_text_context: z.string().regex(/^sha256:[a-f0-9]{64}$/).optional().describe("Optional stronger context guard from text_evidence.context_checksum for reviewed text operations."),
|
|
1265
1270
|
expected_checksum: z
|
|
1266
1271
|
.string()
|
|
1267
1272
|
.regex(/^sha256:[a-f0-9]{64}$/)
|
|
1268
|
-
.describe("Checksum from get: indexing.checksum for TSF canonical/noindex or
|
|
1273
|
+
.describe("Checksum from get: indexing.checksum for TSF canonical/noindex or tsf_ indexing restore; top-level checksum otherwise. No force path."),
|
|
1269
1274
|
changes: SEO_CHANGES.optional().describe("Provide changes OR restore_snapshot_id. Rank Math noindex set value must be noindex."),
|
|
1270
|
-
restore_snapshot_id: z.string().regex(/^(?:rm|tsf)_[a-f0-9-]{36}$/).optional().describe("Restore one
|
|
1275
|
+
restore_snapshot_id: z.string().regex(/^(?:rm|tsf|tsft)_[a-f0-9-]{36}$/).optional().describe("Restore one recorded text or indexing operation for the selected provider; omit changes. Not a content snapshot."),
|
|
1271
1276
|
dry_run: DRY_RUN_FIELD,
|
|
1272
1277
|
},
|
|
1273
1278
|
annotations: { idempotentHint: false },
|
|
1274
1279
|
_meta: { idempotent: "conditional" },
|
|
1275
|
-
}, async ({ post_id, provider, expected_checksum, changes, restore_snapshot_id, dry_run }) => {
|
|
1280
|
+
}, async ({ post_id, provider, expected_checksum, changes, restore_snapshot_id, dry_run, operation_key, expected_text_context }) => {
|
|
1276
1281
|
const body = {
|
|
1277
1282
|
provider: provider ?? "auto",
|
|
1278
1283
|
expected_checksum,
|
|
1279
1284
|
};
|
|
1285
|
+
if (expected_text_context !== undefined)
|
|
1286
|
+
body.expected_text_context = expected_text_context;
|
|
1287
|
+
if (operation_key !== undefined)
|
|
1288
|
+
body.operation_key = operation_key;
|
|
1280
1289
|
if (changes !== undefined)
|
|
1281
1290
|
body.changes = changes;
|
|
1282
1291
|
if (restore_snapshot_id !== undefined)
|
|
@@ -4405,6 +4414,49 @@ const ManagedRecoveryConfirmationSchema = {
|
|
|
4405
4414
|
.describe("Short-lived signed token returned by the matching preview operation."),
|
|
4406
4415
|
};
|
|
4407
4416
|
function registerProTools() {
|
|
4417
|
+
const seoPlanIdentity = { plan_id: z.string().uuid(), plan_hash: z.string().regex(/^sha256:[a-f0-9]{64}$/) };
|
|
4418
|
+
const seoAdvance = { ...seoPlanIdentity, acknowledgement: z.literal("apply_reviewed_non_atomic_text_plan") };
|
|
4419
|
+
const seoChange = z.discriminatedUnion("action", [
|
|
4420
|
+
z.object({ field: z.enum(["seo_title", "meta_description"]), action: z.literal("set"), value: z.string().min(1).max(8192) }).strict(),
|
|
4421
|
+
z.object({ field: z.enum(["seo_title", "meta_description"]), action: z.literal("clear") }).strict(),
|
|
4422
|
+
]);
|
|
4423
|
+
const seoRolloutTransport = (action) => async (args) => {
|
|
4424
|
+
const route = `/pro/seo-rollout/${action.replaceAll("_", "-")}`;
|
|
4425
|
+
const result = action === "get"
|
|
4426
|
+
? await wp.requestEnveloped(`${route}?plan_id=${encodeURIComponent(String(args.plan_id))}`)
|
|
4427
|
+
: await wp.requestEnveloped(route, { method: "POST", body: args });
|
|
4428
|
+
return { content: [{ type: "text", text: serializeEnvelope(result, `diviops_seo_rollout_${action}`) }] };
|
|
4429
|
+
};
|
|
4430
|
+
registerProTool("diviops_seo_rollout_plan", {
|
|
4431
|
+
description: "Create a private immutable reviewed title/description plan for 1–20 explicit published public pages on one site/provider (TSF 5.1.4 or Rank Math 1.0.279). Validates all pages without SEO writes. Show the complete before/target brief and non-atomic limits to the operator; obtain confirmation before advancing. Expires for first execution after 30 minutes. No Yoast, discovery, copy generation, robots, social or schema.",
|
|
4432
|
+
inputSchema: z.object({ provider: z.enum(["tsf", "rank_math"]), brief: z.object({ name: z.string().min(1).max(80), version: z.number().int().positive() }).strict(), pages: z.array(z.object({ id: z.number().int().positive(), changes: z.array(seoChange).min(1).max(2) }).strict()).min(1).max(20) }).strict(),
|
|
4433
|
+
annotations: { readOnlyHint: false, idempotentHint: false },
|
|
4434
|
+
_meta: { idempotent: "false" },
|
|
4435
|
+
}, seoRolloutTransport("plan"), { target: "seo_rollout", capabilityKey: "seo_rollout_v1" });
|
|
4436
|
+
registerProTool("diviops_seo_rollout_advance", {
|
|
4437
|
+
description: "After operator confirmation of the exact plan/hash, advance at most one page. Each explicit call can advance another page; never automatically retry a lost response. Read status first. Stops on drift, permission loss or uncertain evidence. Acknowledgement binds the reviewed request but is not proof of human identity. No background work or atomic batch guarantee.",
|
|
4438
|
+
inputSchema: z.object(seoAdvance).strict(),
|
|
4439
|
+
annotations: { readOnlyHint: false, idempotentHint: false },
|
|
4440
|
+
_meta: { idempotent: "conditional" },
|
|
4441
|
+
}, seoRolloutTransport("advance"), { target: "seo_rollout", capabilityKey: "seo_rollout_v1" });
|
|
4442
|
+
registerProTool("diviops_seo_rollout_get", {
|
|
4443
|
+
description: "Read the retained rollout plan, per-page outcome, operation references and handover report. Permission loss redacts stored content. Prepared/uncertain evidence or retained leases require stop and inspection, not blind retries. Metadata verification never claims rendered output or rankings.",
|
|
4444
|
+
inputSchema: z.object({ plan_id: z.string().uuid() }).strict(),
|
|
4445
|
+
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
4446
|
+
_meta: { idempotent: "true" },
|
|
4447
|
+
}, seoRolloutTransport("get"), { target: "seo_rollout", capabilityKey: "seo_rollout_v1" });
|
|
4448
|
+
registerProTool("diviops_seo_rollout_recovery_plan", {
|
|
4449
|
+
description: "Create a separate immutable recovery plan from verified applied references in reverse order, using Free conditional restores. Freezes further original advances. Show the recovery before/target and obtain operator confirmation. Later untouched fields are preserved; conflicts refuse. Basic individual recovery remains Free.",
|
|
4450
|
+
inputSchema: z.object(seoPlanIdentity).strict(),
|
|
4451
|
+
annotations: { readOnlyHint: false, idempotentHint: false },
|
|
4452
|
+
_meta: { idempotent: "conditional" },
|
|
4453
|
+
}, seoRolloutTransport("recovery_plan"), { target: "seo_rollout", capabilityKey: "seo_rollout_v1" });
|
|
4454
|
+
registerProTool("diviops_seo_rollout_recover", {
|
|
4455
|
+
description: "After confirmation of the separate recovery plan/hash, restore at most one page through Free conditional recovery. Stops at the first conflict or uncertainty and retains inverse evidence. Read status after response loss; no automatic retry, force restore or lease takeover.",
|
|
4456
|
+
inputSchema: z.object(seoAdvance).strict(),
|
|
4457
|
+
annotations: { readOnlyHint: false, idempotentHint: false },
|
|
4458
|
+
_meta: { idempotent: "conditional" },
|
|
4459
|
+
}, seoRolloutTransport("recover"), { target: "seo_rollout", capabilityKey: "seo_rollout_v1" });
|
|
4408
4460
|
const staffBodyApply = handshakeState.kind === "ok"
|
|
4409
4461
|
&& handshakeState.capabilities.cross_env_staff_body_evidence === true
|
|
4410
4462
|
&& handshakeState.capabilities.cross_env_staff_body_apply === true;
|