@diviops/mcp-server 1.5.66 → 1.5.67

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,6 +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.67 release note — WP-CLI term metadata and assignments
12
+
13
+ `term meta list <term-id> --format=json` is available as a default read alongside
14
+ `term meta get`. Term-meta `set`/`update` and post-term `add`/`set`/`remove` require
15
+ individual opt-ins through `DIVIOPS_WP_CLI_ALLOW`; they remain denied by default.
16
+ For example, `DIVIOPS_WP_CLI_ALLOW="term meta update,post term add"` enables only
17
+ those additional commands. Restart the MCP server after changing configuration.
18
+ Existing `*`/`all` configurations acquire the expanded extended set on update.
19
+
20
+ WP-CLI passthrough has no `dry_run`, checksum protection or automatic rollback.
21
+ Read current values before writing and check state before retrying a timed-out
22
+ write. See [WP-CLI security](../docs/wp-cli-security.md) for command tiers.
23
+
11
24
  ## 1.5.66 release note
12
25
 
13
26
  Cancellation now reaches pending HTTP requests for page listing, variable listing
package/dist/index.js CHANGED
@@ -3213,7 +3213,7 @@ registerPluginTool("diviops_canvas_delete", {
3213
3213
  });
3214
3214
  // ── WP-CLI ──────────────────────────────────────────────────────────
3215
3215
  registerLocalTool("diviops_meta_wp_cli", {
3216
- description: "Run a WP-CLI command on the WordPress site. Requires WP_PATH env var (LOCAL_SITE_ID auto-detected from Local by Flywheel), or WP_CLI_CMD for containerized wrappers. Commands validated against a safety allowlist. Default tier covers read ops across options/posts/post-types/taxonomies/users/info/core/db (including targeted `option pluck` and `term meta get` reads), non-destructive writes (post/term create+update, post meta read/write, cache/rewrite/transient flush, `plugin update` from authenticated sources), ACF/SCF schema ops (`acf export/import/field-group list/get` plus SCF 6.8.4+ `scf json {status,sync,import,export}` and the `acf json …` aliases), and WXR export. Extended tier (requires DIVIOPS_WP_CLI_ALLOW env var) adds destructive or bulk-modifying ops: option update, post/post meta/term delete, search-replace, import, plugin activate/deactivate, eval-file. Filesystem-touching commands (`wp export`, `acf export/import`, `scf|acf json export/import`) are additionally constrained: path arguments must resolve under a safe root (defaults to `<WP_PATH>/.diviops-tmp/`, overridable via DIVIOPS_WP_CLI_SAFE_FS_ROOT, disable via DIVIOPS_WP_CLI_UNSAFE_FS=1); `wp export` and `scf json export` require an explicit `--dir=<path>` (or `--stdout`). In WP_CLI_CMD wrapper mode, DIVIOPS_WP_CLI_SAFE_FS_ROOT is required for FS-sensitive commands. Prefer the typed `diviops_scf_*` wrappers for SCF round-trips — they're easier to invoke and accept the same safe-root scoping. Use --format=json for structured output. Full allowlist + tier rationale + filesystem semantics in the MCP server README. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }. Success payload: { stdout: string, stderr: string, exit_code: 0 }. Four failure modes converge on 'meta_wp_cli.command_failed' with error.data = { exit_code: number | null, stdout: string, stderr: string }: (a) numeric exit_code — wp-cli ran and exited non-zero; stdout/stderr are raw streams verbatim. (b) exit_code=null and message starts with 'wp-cli command terminated:' — execFile launched the child but it was killed (timeout or signal); stdout/stderr carry whatever streamed before the kill. (c) exit_code=null and message starts with 'wp-cli could not spawn:' — the OS refused to start the child (ENOENT/EACCES/EPERM); child never ran, stdout/stderr are empty. (d) exit_code=null and message is the rejection reason — pre-execution rejection by the allowlist / FS validator; rejection reason synthesized into error.data.stderr because the child never ran. A missing wp-cli configuration surfaces as 'meta_wp_cli.not_configured'. stdout is always passed through as a string (no server-side JSON parse) — pass --format=json and parse on the caller side when you want structured output.",
3216
+ description: "Run a WP-CLI command on the WordPress site. Requires WP_PATH env var (LOCAL_SITE_ID auto-detected from Local by Flywheel), or WP_CLI_CMD for containerized wrappers. Commands validated against a safety allowlist. Default tier covers read ops across options/posts/post-types/taxonomies/users/info/core/db (including targeted `option pluck` and `term meta get/list` reads), non-destructive writes (post/term create+update, post meta read/write, cache/rewrite/transient flush, `plugin update` from authenticated sources), ACF/SCF schema ops (`acf export/import/field-group list/get` plus SCF 6.8.4+ `scf json {status,sync,import,export}` and the `acf json …` aliases), and WXR export. Extended tier (requires DIVIOPS_WP_CLI_ALLOW env var) adds destructive or bulk-modifying ops: option update, post/post meta/term delete, term meta set/update, post term add/set/remove, search-replace, import, plugin activate/deactivate, eval-file. This passthrough has no dry_run, checksum protection or automatic backup/rollback; read back state before retrying a timed-out write. Filesystem-touching commands (`wp export`, `acf export/import`, `scf|acf json export/import`) are additionally constrained: path arguments must resolve under a safe root (defaults to `<WP_PATH>/.diviops-tmp/`, overridable via DIVIOPS_WP_CLI_SAFE_FS_ROOT, disable via DIVIOPS_WP_CLI_UNSAFE_FS=1); `wp export` and `scf json export` require an explicit `--dir=<path>` (or `--stdout`). In WP_CLI_CMD wrapper mode, DIVIOPS_WP_CLI_SAFE_FS_ROOT is required for FS-sensitive commands. Prefer the typed `diviops_scf_*` wrappers for SCF round-trips — they're easier to invoke and accept the same safe-root scoping. Use --format=json for structured output. Full allowlist + tier rationale + filesystem semantics in the MCP server README. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }. Success payload: { stdout: string, stderr: string, exit_code: 0 }. Four failure modes converge on 'meta_wp_cli.command_failed' with error.data = { exit_code: number | null, stdout: string, stderr: string }: (a) numeric exit_code — wp-cli ran and exited non-zero; stdout/stderr are raw streams verbatim. (b) exit_code=null and message starts with 'wp-cli command terminated:' — execFile launched the child but it was killed (timeout or signal); stdout/stderr carry whatever streamed before the kill. (c) exit_code=null and message starts with 'wp-cli could not spawn:' — the OS refused to start the child (ENOENT/EACCES/EPERM); child never ran, stdout/stderr are empty. (d) exit_code=null and message is the rejection reason — pre-execution rejection by the allowlist / FS validator; rejection reason synthesized into error.data.stderr because the child never ran. A missing wp-cli configuration surfaces as 'meta_wp_cli.not_configured'. stdout is always passed through as a string (no server-side JSON parse) — pass --format=json and parse on the caller side when you want structured output.",
3217
3217
  inputSchema: {
3218
3218
  command: z
3219
3219
  .string()
package/dist/wp-cli.js CHANGED
@@ -28,8 +28,7 @@ const DEFAULT_COMMANDS = [
28
28
  'post meta list',
29
29
  'post meta set',
30
30
  'post meta update',
31
- // Taxonomy assignments (read-only). Assignment writes (`post term add/set/remove`)
32
- // stay unsupported until a concrete workflow justifies a typed or extended path.
31
+ // Taxonomy assignment reads; assignment writes require explicit opt-in.
33
32
  'post term list',
34
33
  // Post types (read-only)
35
34
  'post-type list',
@@ -38,6 +37,7 @@ const DEFAULT_COMMANDS = [
38
37
  'taxonomy list',
39
38
  'term list',
40
39
  'term meta get',
40
+ 'term meta list',
41
41
  'term create',
42
42
  'term update',
43
43
  // ACF / SCF (schema ops — idempotent dev-time workflow)
@@ -117,6 +117,11 @@ const EXTENDED_COMMANDS = [
117
117
  'post delete', // Destructive — permanently removes content
118
118
  'post meta delete', // Destructive — removes metadata
119
119
  'term delete', // Destructive — removes taxonomy terms
120
+ 'term meta set', // Writes arbitrary term metadata
121
+ 'term meta update', // Writes arbitrary term metadata
122
+ 'post term add', // Adds taxonomy assignments
123
+ 'post term set', // Replaces taxonomy assignments
124
+ 'post term remove', // Removes taxonomy assignments
120
125
  'search-replace', // Bulk DB modification — highest-risk content op
121
126
  'import', // Bulk content ingestion from WXR files
122
127
  'plugin activate', // Can enable untrusted plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviops/mcp-server",
3
- "version": "1.5.66",
3
+ "version": "1.5.67",
4
4
  "description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",