@xxxyz/dsh-mcp-manager 2.1.3 → 2.1.4
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/lib/index.js +6 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { createRequire } from 'node:module';
|
|
|
15
15
|
export default {
|
|
16
16
|
name: 'dsh-mcp-manager-host',
|
|
17
17
|
inject: ['timer', 'fs', 'settings', 'sandboxPolicy', 'webServer', 'tools', 'skills'],
|
|
18
|
-
apply(ctx) {
|
|
18
|
+
apply(ctx, config) {
|
|
19
19
|
const fs = ctx.fs;
|
|
20
20
|
const settings = ctx.settings;
|
|
21
21
|
const sandboxPolicy = ctx.sandboxPolicy;
|
|
@@ -36,7 +36,11 @@ export default {
|
|
|
36
36
|
// set, every state-changing op requires `x-dsh-token: <token>`. Read-only
|
|
37
37
|
// ops (plugin-version, mcpm-list, skill-list) stay open so the UI still
|
|
38
38
|
// renders; mcpm-export is guarded too because it leaks full configs.
|
|
39
|
-
|
|
39
|
+
// NOTE: the entry config arrives as the SECOND apply argument (Cordis
|
|
40
|
+
// calls `callback(ctx, config)`) — never read it off `ctx.config`, which
|
|
41
|
+
// is not an injected service and throws "cannot get property without
|
|
42
|
+
// inject" at boot.
|
|
43
|
+
const TOKEN = String(config?.token || process.env.DSH_MCP_MANAGER_TOKEN || '').trim();
|
|
40
44
|
const WRITE_OPS = new Set([
|
|
41
45
|
'mcpm-add', 'mcpm-edit', 'mcpm-remove', 'mcpm-set-enabled', 'mcpm-restart',
|
|
42
46
|
'mcpm-export', 'mcpm-import', 'skill-toggle',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xxxyz/dsh-mcp-manager",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "DSH-standard MCP manager plugin: Settings UI + HTTP API + model-facing mcp_manager_* tools. Install with one command: dsh plugin --profile web add @xxxyz/dsh-mcp-manager@latest",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|