mcp-ssh-manager 3.8.0 → 3.8.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ All notable changes to MCP SSH Manager will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.8.1] - 2026-08-28
9
+
10
+ ### Added
11
+
12
+ - **`package-lock.json` is now committed** (contributed by @cudatuda in #60) — installs are reproducible, `npm ci` works, and the transitive tree is auditable. npm excludes lockfiles from published tarballs, so consumers of the package are unaffected.
13
+ - **`npm run test:lockfile`** (`tests/test-lockfile.js`, wired into `npm test`) — guards the lockfile against the ways it rots: version drift between `package.json` and the lockfile's two version fields, dependency ranges out of sync, a locked version outside its declared range, packages resolved from anywhere but registry.npmjs.org, missing integrity hashes, `file:`/`git+`/`link:` entries, unreviewed install scripts, and runtime dependencies requiring a newer Node than `engines.node` advertises.
14
+ - **Node 22.x added to the CI test matrix** — `engines` claims `>=18` and 22 is the active LTS.
15
+ - **`.github/dependabot.yml`** — a pinned tree stops receiving upstream fixes on its own, so monthly grouped dependency updates (capped at 3 open PRs) act as the counterweight. GitHub Actions versions are tracked too.
16
+ - **Advisory `npm audit --omit=dev --audit-level=high` step** in the `Code Quality` workflow. Not a required check: a CVE published against a transitive dependency should be visible without blocking unrelated merges.
17
+
18
+ ### Changed
19
+
20
+ - **CI installs with `npm ci` instead of `npm install`** in both workflows. `npm ci` reproduces the locked tree exactly and aborts if `package.json` and the lockfile have drifted.
21
+ - **ESLint and the JSDoc typecheck are now blocking**, and moved into the `lint` job — one of the three required status checks on `main`. They previously lived in the advisory `Code Quality` workflow, where ESLint additionally ran with `continue-on-error: true`, so neither gate could ever fail a pull request.
22
+ - **Node module caching now works.** `Code Quality` keyed its cache on `hashFiles('**/package-lock.json')` while the lockfile was gitignored, so every run shared one degenerate key. Replaced by `actions/setup-node@v4`'s built-in `cache: 'npm'`.
23
+ - GitHub Actions bumped from `actions/checkout@v3` / `actions/setup-node@v3` / `actions/cache@v3` to v4.
24
+
25
+ ### Removed
26
+
27
+ - **`npm install --save-dev eslint prettier` from the `Code Quality` workflow** — it re-resolved both packages to their latest majors on every run (ESLint 9 over the pinned `^8.56.0`) and rewrote `package.json` in the CI workspace, defeating the pinning it ran next to.
28
+ - Redundant CI steps re-running `test-profiles.js`, `test-command-aliases.js` and `test-hooks.js` individually after `npm test` had already run them.
29
+
30
+ ### Fixed
31
+
32
+ - `mcp-ssh-manager-setup.md`: the two `.gitignore` templates no longer tell readers to ignore `package-lock.json`.
33
+
8
34
  ## [3.8.0] - 2026-08-14
9
35
 
10
36
  ### Security
package/CLAUDE.md CHANGED
@@ -69,6 +69,7 @@ See [docs/TOOL_MANAGEMENT.md](docs/TOOL_MANAGEMENT.md) for complete guide.
69
69
 
70
70
  ### Development and Testing
71
71
  ```bash
72
+ npm ci # Install the exact tree from package-lock.json
72
73
  npm start # Start MCP server (requires stdin)
73
74
  npm test # Run the full test suite
74
75
  npm run typecheck # Type-check JSDoc with tsc (no build, nothing emitted)
@@ -84,6 +85,27 @@ The baseline is 0 errors and CI enforces it, so add JSDoc annotations (or a narr
84
85
  `/** @type {...} */` cast) rather than leaving new errors. `typescript` is pinned to `^6`
85
86
  because knip 5 declares `peer typescript ">=5.0.4 <7"` — bumping one requires bumping the other.
86
87
 
88
+ **Lockfile**: `package-lock.json` is committed and CI installs with `npm ci`, so the tree is
89
+ reproducible and auditable. npm never ships a lockfile inside a published tarball, so this is
90
+ invisible to consumers of the package. Two consequences for maintainers:
91
+
92
+ - **Releases bump three version spots, not one**: `package.json`, `package-lock.json`
93
+ (`.version` *and* `.packages[""].version`) and the README badge. `npm version <x.y.z>` does
94
+ the first two together; a hand edit does not. `npm run test:lockfile` fails when they diverge,
95
+ and so does `npm ci`.
96
+ - **Dependency changes must commit the regenerated lockfile.** After editing `package.json` by
97
+ hand, run `npm install --package-lock-only` and commit both files.
98
+
99
+ `tests/test-lockfile.js` guards the rest: every package resolves to registry.npmjs.org with an
100
+ integrity hash, no `file:`/`git+`/`link:` entries, install scripts limited to a reviewed
101
+ allowlist (`ssh2`, `cpu-features`), and no runtime dependency requiring a newer Node than
102
+ `engines.node` advertises — that last check carries one documented exception,
103
+ `@hono/node-server` (needs Node >=20, pulled by the MCP SDK for its HTTP transport, never
104
+ imported by the stdio server we ship; re-check it when bumping the SDK).
105
+
106
+ **Required status checks on `main`** are `lint`, `test (18.x)` and `test (20.x)`. Renaming those
107
+ jobs or dropping a matrix entry makes `main` unmergeable until branch protection is updated.
108
+
87
109
  ### Debug Tools (in `debug/` directory)
88
110
  ```bash
89
111
  ./debug/test-claude-code.sh # Test Claude Code integration
package/CONTRIBUTING.md CHANGED
@@ -36,6 +36,7 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
36
36
  3. Ensure the test suite passes
37
37
  4. Make sure your code follows the existing code style
38
38
  5. Write a clear commit message
39
+ 6. Commit `package-lock.json` if you touched dependencies
39
40
 
40
41
  ## Development Process
41
42
 
@@ -47,10 +48,21 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
47
48
 
48
49
  2. Install dependencies:
49
50
  ```bash
50
- npm install
51
+ npm ci # exact versions from package-lock.json
51
52
  pip install -r tools/requirements.txt
52
53
  ```
53
54
 
55
+ `package-lock.json` is committed. Use `npm ci` to install: it reproduces the
56
+ exact tree CI uses and fails loudly if the lockfile and `package.json` have
57
+ drifted apart. If you add, remove or bump a dependency, commit the updated
58
+ lockfile alongside `package.json` — `npm run test:lockfile` checks the two
59
+ stay in sync.
60
+
61
+ The lockfile was generated with npm 11. Older npm reformats it (key order,
62
+ the `libc` field) and produces a huge diff even when no version changes —
63
+ if your diff is thousands of lines but `npm run test:lockfile` still passes,
64
+ that is what happened; drop the reformat and keep only real version changes.
65
+
54
66
  3. Create a branch:
55
67
  ```bash
56
68
  git checkout -b feature/your-feature-name
@@ -95,10 +107,14 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
95
107
 
96
108
  Before submitting a pull request:
97
109
 
98
- 1. Test your changes manually
99
- 2. Ensure existing functionality still works
100
- 3. Test with different server configurations
101
- 4. Verify Claude Code integration works
110
+ 1. Run `npm run test:all` (test suite + typecheck + validation script)
111
+ 2. Test your changes manually
112
+ 3. Ensure existing functionality still works
113
+ 4. Test with different server configurations
114
+ 5. Verify Claude Code integration works
115
+
116
+ CI installs with `npm ci` on Node 18, 20 and 22, and the `lint` job runs
117
+ ESLint and the JSDoc typecheck as blocking gates.
102
118
 
103
119
  ## Documentation
104
120
 
package/README.md CHANGED
@@ -6,7 +6,7 @@ A Model Context Protocol (MCP) server that enables **Claude Code** and **OpenAI
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/mcp-ssh-manager.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/mcp-ssh-manager)
8
8
  [![npm downloads](https://img.shields.io/npm/dt/mcp-ssh-manager.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/mcp-ssh-manager)
9
- [![Version](https://img.shields.io/badge/Version-3.8.0-brightgreen?style=for-the-badge)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.8.0)
9
+ [![Version](https://img.shields.io/badge/Version-3.8.1-brightgreen?style=for-the-badge)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.8.1)
10
10
  [![Claude Code](https://img.shields.io/badge/Claude_Code-Compatible-5A67D8?style=for-the-badge&logo=anthropic)](https://claude.ai/code)
11
11
  [![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-Compatible-00A67E?style=for-the-badge&logo=openai)](https://openai.com/codex)
12
12
  [![MCP](https://img.shields.io/badge/MCP-Server-orange?style=for-the-badge)](https://modelcontextprotocol.io)
@@ -22,28 +22,27 @@ A Model Context Protocol (MCP) server that enables **Claude Code** and **OpenAI
22
22
 
23
23
  ---
24
24
 
25
- ## 🎉 What's New in v3.8.0
25
+ ## 🎉 What's New in v3.8.1
26
26
 
27
- **👥 Groups that live in your config, `ssh_sync` fixed on Windows, and a crash that took the whole server down** (Released: August 14, 2026)
27
+ **🔒 Reproducible installs: the lockfile is committed, CI installs from it, and a test keeps it honest** (Released: August 28, 2026)
28
28
 
29
- - **New optional `group` field per server** ([#56](https://github.com/bvisible/mcp-ssh-manager/pull/56) — contributed by [@ice616](https://github.com/ice616), requested in [#55](https://github.com/bvisible/mcp-ssh-manager/issues/55)) — tag a server with `group = "production"` and it *is* in that group: `ssh_execute_group` and `ssh_group_manage list` resolve members straight from your `.env`/TOML, so there is no `.server-groups.json` to maintain and the grouping travels with the config when you export it to another tool. Membership is the **union** of both sources, so groups you already store keep working untouched.
30
- - **🪟 `ssh_sync` works from a Windows host** ([#59](https://github.com/bvisible/mcp-ssh-manager/pull/59) — contributed by [@2836603852](https://github.com/2836603852)) — a local path like `C:\project` reached MSYS2 rsync unchanged, which read `C:` as a remote host and tried to SSH into a machine named `c`. Drive-letter, UNC and extended-length paths are now converted for the rsync argument only, while Node keeps the native path for its filesystem checks.
31
- - **💥 A tunnel on a busy port no longer kills the MCP server** — `ssh_tunnel_create` on an already-bound port hit an unhandled `'error'` event and took the entire process down with it, dropping every pooled SSH connection and open session. It now returns a normal error.
32
- - **🔒 Security: `@modelcontextprotocol/sdk` floor raised to `^1.30.0`** — the previous range still allowed versions carrying three published advisories, one of them high. `npm audit` is clean, and the `uuid` dependency is gone in favour of Node's built-in `crypto.randomUUID()`.
33
- - **🧪 JSDoc type-checking in CI** (`npm run typecheck`) — TypeScript now runs as a static checker over the plain JavaScript. **No build step, no `dist/`, nothing changes for users**; it found two of the bugs above on the day it landed.
29
+ - **`package-lock.json` is now committed** ([#60](https://github.com/bvisible/mcp-ssh-manager/pull/60) — contributed by [@cudatuda](https://github.com/cudatuda)) — installs are reproducible, `npm ci` works, and the transitive tree is auditable at last. **Nothing changes if you install from npm**: a lockfile is never shipped inside a published tarball.
30
+ - **🧪 New `npm run test:lockfile` guard** — a lockfile is only worth committing while it stays truthful, so a test locks the ways it rots: version drift, dependency ranges out of sync, a package resolved from anywhere but registry.npmjs.org, a missing integrity hash, a `file:`/`git+`/`link:` entry smuggled into the tree, an install script outside the reviewed allowlist, or a runtime dependency requiring a newer Node than `engines` advertises. Validated by mutating the lockfile 17 different ways — each one caught.
31
+ - **⚙️ CI installs with `npm ci`, and the quality gates finally block.** ESLint and the JSDoc typecheck ran in a workflow that was **not** a required check, ESLint with `continue-on-error` on top — neither could fail a pull request. Both moved into the required `lint` job. Node 22.x added to the test matrix, and the module cache (keyed on a lockfile that did not exist) works now.
32
+ - **🤖 Dependabot** — a pinned tree stops receiving upstream fixes on its own, so monthly grouped updates act as the counterweight.
34
33
 
35
- ```env
36
- SSH_SERVER_WEB1_GROUP=production
37
- ```
38
-
39
- [Read full changelog →](CHANGELOG.md#380---2026-08-14)
34
+ [Read full changelog →](CHANGELOG.md#381---2026-08-28)
40
35
 
41
36
  ---
42
37
 
43
38
  ## Previous Releases
44
39
 
45
40
  <details>
46
- <summary><b>📜 Release history — v3.7.0 down to v1.0.0</b> (click to expand)</summary>
41
+ <summary><b>📜 Release history — v3.8.0 down to v1.0.0</b> (click to expand)</summary>
42
+
43
+ ### v3.8.0 - Groups in your config, `ssh_sync` on Windows, tunnel crash fix (August 14, 2026)
44
+
45
+ - **👥 New optional `group` field per server** ([#56](https://github.com/bvisible/mcp-ssh-manager/pull/56) — contributed by [@ice616](https://github.com/ice616), requested in [#55](https://github.com/bvisible/mcp-ssh-manager/issues/55)) — tag a server with `group = "production"` and it *is* in that group: `ssh_execute_group` resolves members straight from your `.env`/TOML, union'd with any `.server-groups.json` you already keep. Also: `ssh_sync` fixed from a Windows host ([#59](https://github.com/bvisible/mcp-ssh-manager/pull/59) — contributed by [@2836603852](https://github.com/2836603852)), a tunnel on a busy port no longer takes the whole MCP server down, the `@modelcontextprotocol/sdk` floor raised to `^1.30.0` over three advisories, and JSDoc type-checking added to CI. [Full changelog →](CHANGELOG.md#380---2026-08-14)
47
46
 
48
47
  ### v3.7.0 - Per-server SSH agent forwarding (July 13, 2026)
49
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-ssh-manager",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "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
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -13,7 +13,8 @@
13
13
  "setup": "npm install && pip install -r tools/requirements.txt",
14
14
  "configure": "python tools/server-manager.py",
15
15
  "test-connection": "python tools/test-connection.py",
16
- "test": "npm run test:profiles && npm run test:aliases && npm run test:hooks && npm run test:tools && npm run test:policy && npm run test:ping && npm run test:config && npm run test:fieldnames && npm run test:groups && npm run test:agentforward && 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:dbrowcount",
16
+ "test": "npm run test:lockfile && npm run test:profiles && npm run test:aliases && npm run test:hooks && npm run test:tools && npm run test:policy && npm run test:ping && npm run test:config && npm run test:fieldnames && npm run test:groups && npm run test:agentforward && 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:dbrowcount",
17
+ "test:lockfile": "node tests/test-lockfile.js",
17
18
  "test:profiles": "node tests/test-profiles.js",
18
19
  "test:aliases": "node tests/test-command-aliases.js",
19
20
  "test:hooks": "node tests/test-hooks.js",