@diviops/mcp-server 1.5.59 → 1.5.60
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 +14 -1
- package/dist/wp-cli.d.ts +2 -1
- package/dist/wp-cli.js +9 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,20 @@ 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.60 release note
|
|
12
|
+
|
|
13
|
+
When WP-CLI is configured, `diviops_meta_info` now includes `wp_cli.ignored`:
|
|
14
|
+
the unique, trimmed entries from `DIVIOPS_WP_CLI_ALLOW` that were not recognized
|
|
15
|
+
at startup. Clients can inspect these alongside `allowed` and `extendable`
|
|
16
|
+
even when startup warnings are hidden. Command permissions and matching are
|
|
17
|
+
unchanged. Restart the MCP server after changing the environment configuration.
|
|
18
|
+
|
|
19
|
+
The MCP SDK dependency now requires v1.31.0 or later within v1, incorporating
|
|
20
|
+
its OAuth client credential-routing fix. This package uses the SDK server/stdio
|
|
21
|
+
path. Free remains 1.5.30, public builder remains 1.4.11, and compatibility floors
|
|
22
|
+
are unchanged.
|
|
23
|
+
|
|
24
|
+
## Previous 1.5.59 release note
|
|
12
25
|
|
|
13
26
|
Adds two default WP-CLI reads: `option pluck <option> <key-path>...` for a nested
|
|
14
27
|
option value, and `term meta get <term-id> <key>` for a term-meta field. Existing
|
package/dist/wp-cli.d.ts
CHANGED
|
@@ -68,10 +68,11 @@ export declare function createWpCli(config: WpCliConfig): {
|
|
|
68
68
|
exitCode: number | null;
|
|
69
69
|
failureKind?: "rejected" | "spawn_failed" | "killed" | "exited";
|
|
70
70
|
}>;
|
|
71
|
-
/** Return
|
|
71
|
+
/** Return startup permissions and ignored opt-ins for meta_info diagnostics. */
|
|
72
72
|
getAllowedCommands(): {
|
|
73
73
|
allowed: string[];
|
|
74
74
|
extendable: string[];
|
|
75
|
+
ignored: string[];
|
|
75
76
|
};
|
|
76
77
|
};
|
|
77
78
|
export {};
|
package/dist/wp-cli.js
CHANGED
|
@@ -127,28 +127,31 @@ const EXTENDED_COMMANDS = [
|
|
|
127
127
|
function buildAllowlist() {
|
|
128
128
|
const extra = process.env.DIVIOPS_WP_CLI_ALLOW?.trim();
|
|
129
129
|
if (!extra)
|
|
130
|
-
return DEFAULT_COMMANDS;
|
|
130
|
+
return { allowed: DEFAULT_COMMANDS, ignored: [] };
|
|
131
131
|
// Wildcard sentinel — convenience for trusted local-dev environments. Grants
|
|
132
132
|
// every entry in EXTENDED_COMMANDS but does NOT unlock anything beyond it
|
|
133
133
|
// (notably: `db query` stays out — see #361 Chunk B). Always emits a startup
|
|
134
134
|
// warning so the broad grant is never silent.
|
|
135
135
|
if (extra === '*' || extra === 'all') {
|
|
136
136
|
console.warn(`[diviops] DIVIOPS_WP_CLI_ALLOW="${extra}" — granting ALL ${EXTENDED_COMMANDS.length} extended commands. Intended for trusted local-dev only.`);
|
|
137
|
-
return [...DEFAULT_COMMANDS, ...EXTENDED_COMMANDS];
|
|
137
|
+
return { allowed: [...DEFAULT_COMMANDS, ...EXTENDED_COMMANDS], ignored: [] };
|
|
138
138
|
}
|
|
139
139
|
const requested = extra.split(',').map((s) => s.trim()).filter(Boolean);
|
|
140
140
|
const granted = new Set(DEFAULT_COMMANDS);
|
|
141
|
+
const ignored = new Set();
|
|
141
142
|
for (const cmd of requested) {
|
|
142
143
|
if (EXTENDED_COMMANDS.includes(cmd)) {
|
|
143
144
|
granted.add(cmd);
|
|
144
145
|
}
|
|
145
146
|
else if (!granted.has(cmd)) {
|
|
147
|
+
ignored.add(cmd);
|
|
146
148
|
console.warn(`[diviops] Ignoring unknown WP-CLI allow entry: "${cmd}"`);
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
return [...granted];
|
|
151
|
+
return { allowed: [...granted], ignored: [...ignored] };
|
|
150
152
|
}
|
|
151
|
-
|
|
153
|
+
// Diagnostics and permissions describe the same startup configuration.
|
|
154
|
+
const { allowed: ALLOWED_COMMANDS, ignored: IGNORED_COMMANDS } = buildAllowlist();
|
|
152
155
|
/**
|
|
153
156
|
* Validate a parsed command against the allowlist.
|
|
154
157
|
* Checks the first 1-3 args against allowed command prefixes (supports
|
|
@@ -591,10 +594,11 @@ export function createWpCli(config) {
|
|
|
591
594
|
async runArgs(args) {
|
|
592
595
|
return runArgv(args);
|
|
593
596
|
},
|
|
594
|
-
/** Return
|
|
597
|
+
/** Return startup permissions and ignored opt-ins for meta_info diagnostics. */
|
|
595
598
|
getAllowedCommands() {
|
|
596
599
|
return {
|
|
597
600
|
allowed: [...ALLOWED_COMMANDS],
|
|
601
|
+
ignored: [...IGNORED_COMMANDS],
|
|
598
602
|
extendable: EXTENDED_COMMANDS.filter((c) => !ALLOWED_COMMANDS.includes(c)),
|
|
599
603
|
};
|
|
600
604
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diviops/mcp-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.60",
|
|
4
4
|
"description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@hono/node-server": "2.1.0",
|
|
64
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
64
|
+
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
65
65
|
"body-parser": "2.3.0",
|
|
66
66
|
"fast-uri": "3.1.8",
|
|
67
67
|
"hono": "4.13.7",
|