mcp-ssh-manager 4.0.0 → 4.0.1

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.
@@ -19,8 +19,8 @@ release check.
19
19
 
20
20
  1. Merge the release changes through a pull request. Keep the existing required
21
21
  `lint`, `test (18.x)` and `test (20.x)` checks; also require the interface jobs
22
- before release. They build/typecheck the UI, compare it with committed
23
- `dist/ui`, run browser flows, and exercise an upgrade from the real npm 3.8.5.
22
+ before release. They build/typecheck the UI into the generated
23
+ `dist/ui` (and check nothing generated is tracked), run browser flows, and exercise an upgrade from the real npm 3.8.5.
24
24
  2. Update root/desktop package manifests and lockfiles, plus both version fields
25
25
  in `server.json`. `scripts/release-version.mjs` checks their agreement.
26
26
  3. For a candidate, use a version such as `4.0.0-beta.1` and its exact
package/docs/MIGRATION.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Upgrading from 3.8 to 4.0
2
2
 
3
- **4.0.0 is released, on npm and as a desktop application** ([release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.0.0)).
3
+ **4.0 is released, on npm and as a desktop application**; the latest is 4.0.1 ([release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.0.1)).
4
4
  The last 3.8 release is 3.8.7, for anyone who pins the 3.8 line.
5
5
 
6
6
  The upgrade path preserves headless npm/CLI use. The application, vault import
@@ -27,10 +27,12 @@ cd ..
27
27
  npm run test:published-upgrade # needs network: actual npm 3.8.5 → V4 → 3.8.5
28
28
  ```
29
29
 
30
- `dist/ui` is committed and shipped in the npm tarball. Rebuild after a UI edit;
31
- CI rejects a build that differs from the committed interface. Browser tests
32
- exercise that compiled interface against the real local ControlPlane HTTP/SSE
33
- server. Playwright reports, traces and failure screenshots are retained in CI.
30
+ `dist/ui` is generated, not committed: `prepack` builds it into the npm tarball
31
+ (`npm run build:ui` does the same by hand), and the desktop app builds it when it
32
+ is assembled. CI builds it on three systems, fails if anything generated is
33
+ tracked by git, and release.yml refuses a tarball that does not carry it. Browser
34
+ tests exercise that compiled interface against the real local ControlPlane
35
+ HTTP/SSE server. Playwright reports, traces and failure screenshots are retained in CI.
34
36
 
35
37
  For focused work, run `npm run test:migration`, `test:security`, `test:hostkeys`,
36
38
  `test:proxy`, `test:working-directory`, `test:groups-persistence`, `test:release`,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "mcp-ssh-manager",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "mcpName": "io.github.bvisible/mcp-ssh-manager",
5
- "description": "MCP SSH Manager: Model Context Protocol server for SSH remote server management. Control SSH connections from Claude Code and OpenAI Codex - execute commands, transfer files, database operations, backups, health monitoring, and DevOps automation. NEW: Tool activation system reduces context usage by 92%",
5
+ "description": "MCP server for SSH: let AI agents (Claude Code, Codex, any MCP client) run commands, transfer files and manage servers over SSH, with human approval, an encrypted vault and a live audit trail.",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "mcp-ssh-manager": "src/index.js",
@@ -14,7 +14,7 @@
14
14
  "setup": "npm install && pip install -r tools/requirements.txt",
15
15
  "configure": "python tools/server-manager.py",
16
16
  "test-connection": "python tools/test-connection.py",
17
- "test": "npm run test:lockfile && npm run test:sudostdin && npm run test:vault && npm run test:recovery && npm run test:upgrade && npm run test:notify && npm run test:commands && npm run test:commandlog && npm run test:portability && npm run test:approval && npm run test:controlplane && npm run test:terminal && npm run test:files && npm run test:livestream && npm run test:skills && npm run test:redaction && npm run test:profiles && npm run test:aliases && npm run test:hooks && npm run test:tools && npm run test:policy && npm run test:policynames && npm run test:ping && npm run test:config && npm run test:fieldnames && npm run test:groups && npm run test:agentforward && npm run test:certpath && npm run test:agentannounce && npm run test:autherrors && npm run test:envchoice && npm run test:lifecycle && npm run test:tunnel && npm run test:sync && npm run test:sync-path && npm run test:dbquoting && npm run test:dbinjection && npm run test:backupinjection && npm run test:dbrowcount && npm run test:migration && npm run test:security && npm run test:hostkeys && npm run test:proxy && npm run test:working-directory && npm run test:groups-persistence && npm run test:release && npm run test:cli-experience && npm run test:desktop-install && npm run test:agent-clients && npm run test:preview && npm run test:desktop-smoke && npm run test:cli-edit",
17
+ "test": "npm run test:lockfile && npm run test:sudostdin && npm run test:vault && npm run test:recovery && npm run test:upgrade && npm run test:notify && npm run test:commands && npm run test:commandlog && npm run test:portability && npm run test:approval && npm run test:controlplane && npm run test:terminal && npm run test:files && npm run test:livestream && npm run test:skills && npm run test:redaction && npm run test:profiles && npm run test:aliases && npm run test:hooks && npm run test:tools && npm run test:policy && npm run test:policynames && npm run test:ping && npm run test:config && npm run test:fieldnames && npm run test:groups && npm run test:agentforward && npm run test:certpath && npm run test:agentannounce && npm run test:autherrors && npm run test:envchoice && npm run test:lifecycle && npm run test:tunnel && npm run test:sync && npm run test:sync-path && npm run test:dbquoting && npm run test:dbinjection && npm run test:quoteprops && npm run test:backupinjection && npm run test:dbrowcount && npm run test:migration && npm run test:security && npm run test:hostkeys && npm run test:proxy && npm run test:working-directory && npm run test:groups-persistence && npm run test:release && npm run test:cli-experience && npm run test:desktop-install && npm run test:agent-clients && npm run test:appupdate && npm run test:preview && npm run test:desktop-smoke && npm run test:cli-edit",
18
18
  "test:lockfile": "node tests/test-lockfile.js",
19
19
  "test:sudostdin": "node tests/test-sudo-stdin.js",
20
20
  "test:vault": "node tests/test-secret-store.js",
@@ -43,6 +43,7 @@
43
43
  "test:sync-path": "node tests/test-rsync-path.js",
44
44
  "test:dbquoting": "node tests/test-database-query-quoting.js",
45
45
  "test:dbinjection": "node tests/test-database-injection.js",
46
+ "test:quoteprops": "node tests/test-shell-quote-properties.js",
46
47
  "test:backupinjection": "node tests/test-backup-monitor-injection.js",
47
48
  "test:dbrowcount": "node tests/test-database-row-count.js",
48
49
  "test:cli-edit": "node tests/test-cli-edit-server.js",
@@ -53,7 +54,8 @@
53
54
  "format": "prettier --write 'src/**/*.js' 'tests/**/*.js'",
54
55
  "test:terminal": "node tests/test-terminal.js",
55
56
  "test:files": "node tests/test-files.js",
56
- "build:ui": "cd ui && npm ci && npm run build",
57
+ "build:ui": "node scripts/build-interface.mjs",
58
+ "prepack": "node scripts/build-interface.mjs",
57
59
  "test:recovery": "node tests/test-vault-recovery.js",
58
60
  "test:upgrade": "node tests/test-upgrade.js",
59
61
  "test:notify": "node tests/test-notify.js",
@@ -69,6 +71,7 @@
69
71
  "test:release": "node tests/test-release.js",
70
72
  "test:cli-experience": "node tests/test-cli-experience.js",
71
73
  "test:agent-clients": "node tests/test-agent-clients.js",
74
+ "test:appupdate": "node tests/test-app-update.js",
72
75
  "test:desktop-install": "node tests/test-desktop-install.js",
73
76
  "test:published-upgrade": "node scripts/test-upgrade-from-published.mjs",
74
77
  "test:ui": "npm --prefix ui run test:e2e",
@@ -78,42 +81,38 @@
78
81
  },
79
82
  "keywords": [
80
83
  "mcp",
84
+ "mcp-server",
85
+ "model-context-protocol",
81
86
  "ssh",
82
- "mcp-ssh",
83
- "mcp ssh",
84
87
  "ssh-mcp",
85
- "ssh mcp",
86
- "model-context-protocol-ssh",
87
- "mcp-server",
88
- "mcp server ssh",
88
+ "mcp-ssh",
89
+ "sftp",
90
+ "ssh-client",
89
91
  "claude-code",
90
- "claude-ssh",
91
- "claude-code-ssh",
92
+ "claude-desktop",
92
93
  "openai-codex",
93
94
  "codex",
94
- "model-context-protocol",
95
+ "ai-agents",
96
+ "agentic-ai",
97
+ "llm-tools",
98
+ "ai-assistant",
99
+ "devops",
95
100
  "remote-server",
101
+ "server-management",
102
+ "remote-access",
103
+ "human-in-the-loop",
104
+ "approval",
105
+ "audit-log",
106
+ "security",
107
+ "backup",
108
+ "database",
109
+ "health-monitoring",
96
110
  "ssh-manager",
97
- "ssh manager mcp",
98
- "remote-ssh",
99
111
  "ssh-automation",
100
112
  "deployment",
101
- "devops",
102
- "automation",
103
- "backup",
104
- "restore",
105
- "health-monitoring",
106
- "database",
107
113
  "mysql",
108
114
  "postgresql",
109
- "mongodb",
110
- "profiles",
111
- "hooks",
112
- "aliases",
113
- "toml",
114
- "ai-assistant",
115
- "ai-tools",
116
- "llm-tools"
115
+ "mongodb"
117
116
  ],
118
117
  "author": "MCP SSH Manager Contributors",
119
118
  "license": "MIT",
@@ -135,6 +134,7 @@
135
134
  "devDependencies": {
136
135
  "@types/node": "^26.6.4",
137
136
  "eslint": "^8.56.0",
137
+ "fast-check": "^4.10.2",
138
138
  "knip": "^6.40.0",
139
139
  "prettier": "^3.2.4",
140
140
  "typescript": "^6.0.3"
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ // Builds the control plane interface into dist/ui.
3
+ //
4
+ // dist/ui is generated, never committed: it is built when the npm package is
5
+ // made (`prepack`), when the desktop app is assembled (prepare-engine) and by
6
+ // hand with `npm run build:ui`. What a user installs is unchanged: the package
7
+ // and the app carry the built interface, so nothing compiles on their machine.
8
+ //
9
+ // The interface sources live in ui/ and are not part of the package, so a tree
10
+ // without ui/ (an unpacked tarball) keeps the dist/ui it already has.
11
+ import { execFileSync } from 'node:child_process';
12
+ import fs from 'node:fs';
13
+ import path from 'node:path';
14
+ import { fileURLToPath } from 'node:url';
15
+
16
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
17
+ const ui = path.join(root, 'ui');
18
+ const out = path.join(root, 'dist', 'ui');
19
+ const REQUIRED = ['index.html', 'app.js', 'app.css'];
20
+
21
+ /** What is missing from a build, empty when it is complete. */
22
+ function missingFrom(dir) {
23
+ return REQUIRED.filter(name => {
24
+ try { return fs.statSync(path.join(dir, name)).size === 0; } catch { return true; }
25
+ });
26
+ }
27
+
28
+ /**
29
+ * Run npm without a shell. `npm_execpath` is npm's own script when this file is
30
+ * started by `npm run`; Windows has no `npm` binary, only `npm.cmd`, which Node
31
+ * will not spawn without a shell.
32
+ * @param {string[]} args
33
+ */
34
+ function npm(args) {
35
+ const cli = process.env.npm_execpath;
36
+ // Everything is written to stderr: as `prepack` this runs inside `npm pack`,
37
+ // whose stdout may be machine-read (`npm pack --json`) and must stay clean.
38
+ const stdio = ['ignore', process.stderr.fd, process.stderr.fd];
39
+ if (cli && cli.endsWith('.js')) {
40
+ execFileSync(process.execPath, [cli, ...args], { cwd: root, stdio });
41
+ } else {
42
+ execFileSync(process.platform === 'win32' ? 'npm.cmd' : 'npm', args, { cwd: root, stdio, shell: process.platform === 'win32' });
43
+ }
44
+ }
45
+
46
+ if (!fs.existsSync(path.join(ui, 'package.json'))) {
47
+ const missing = missingFrom(out);
48
+ if (missing.length) {
49
+ console.error(`The interface sources (ui/) are not here and dist/ui is incomplete (missing: ${missing.join(', ')}).`);
50
+ process.exit(1);
51
+ }
52
+ console.error('No interface sources here; keeping the dist/ui that comes with this tree.');
53
+ process.exit(0);
54
+ }
55
+
56
+ // A pack from a fresh checkout has no ui/node_modules yet; the lockfile decides
57
+ // what gets installed, exactly as in CI.
58
+ if (!fs.existsSync(path.join(ui, 'node_modules'))) {
59
+ console.error('Installing the interface dependencies from ui/package-lock.json…');
60
+ npm(['ci', '--prefix', 'ui', '--no-audit', '--no-fund']);
61
+ }
62
+
63
+ // Never ship a stale or half-written build: start from nothing.
64
+ fs.rmSync(out, { recursive: true, force: true });
65
+ console.error('Building the interface into dist/ui…');
66
+ npm(['run', 'build', '--prefix', 'ui']);
67
+
68
+ const missing = missingFrom(out);
69
+ if (missing.length) {
70
+ console.error(`The interface build did not produce: ${missing.join(', ')}`);
71
+ process.exit(1);
72
+ }
73
+ console.error('dist/ui is ready.');
@@ -0,0 +1,12 @@
1
+ # Python tools for the pre-commit hooks (scripts/setup-hooks.sh). The hashed
2
+ # lock, requirements-dev.txt, is generated from this file; floors only, the lock
3
+ # holds the exact versions. Python 3.11 and later: 3.10 reaches end of life this month, and the
4
+ # fixed releases of black, filelock, requests and urllib3 do not support older ones.
5
+ # uv pip compile scripts/requirements-dev.in --generate-hashes --universal --python-version 3.11 -o scripts/requirements-dev.txt
6
+ # Check the result against OSV before committing: a lock of pinned versions is
7
+ # read by OpenSSF Scorecard, and an affected version there is a standing alert.
8
+ pre-commit>=4.0.1
9
+ black>=26.3.1
10
+ flake8>=7.1.1
11
+ isort>=5.13.2
12
+ detect-secrets>=1.5.0