mcp-ssh-manager 3.8.7 → 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.
Files changed (104) hide show
  1. package/.eslintignore +5 -0
  2. package/.gitattributes +5 -0
  3. package/CHANGELOG.md +371 -6
  4. package/CLAUDE.md +6 -0
  5. package/CODE_OF_CONDUCT.md +18 -0
  6. package/CONTRIBUTING.md +30 -0
  7. package/Formula/ssh-manager.rb +60 -0
  8. package/README.md +484 -964
  9. package/ROADMAP-V4.md +451 -0
  10. package/brand/README.md +43 -0
  11. package/brand/icon.svg +32 -0
  12. package/brand/mark.svg +18 -0
  13. package/brand/wordmark.svg +30 -0
  14. package/cli/app.js +230 -0
  15. package/cli/control.js +116 -0
  16. package/cli/lib/colors.sh +15 -0
  17. package/cli/lib/menu.sh +145 -96
  18. package/cli/portability.js +186 -0
  19. package/cli/ssh-manager +197 -91
  20. package/cli/ssh-manager.js +14 -0
  21. package/cli/style.js +17 -0
  22. package/cli/vault.js +411 -0
  23. package/desktop/ControlPlaneApp.swift +219 -0
  24. package/desktop/build.sh +58 -0
  25. package/desktop/electron/after-pack.cjs +39 -0
  26. package/desktop/electron/electron-builder.yml +148 -0
  27. package/desktop/electron/finalize-artifacts.mjs +83 -0
  28. package/desktop/electron/main.js +815 -0
  29. package/desktop/electron/package-lock.json +3656 -0
  30. package/desktop/electron/package.json +30 -0
  31. package/desktop/electron/prepare-engine.mjs +84 -0
  32. package/desktop/electron/resources/entitlements.mac.plist +22 -0
  33. package/desktop/electron/resources/icon.png +0 -0
  34. package/desktop/electron/resources/trayTemplate.png +0 -0
  35. package/desktop/electron/resources/trayTemplate@2x.png +0 -0
  36. package/desktop/electron/smoke-test.mjs +184 -0
  37. package/dist/ui/app.css +1 -0
  38. package/dist/ui/app.js +501 -0
  39. package/dist/ui/assets/Forum-Regular.woff2 +0 -0
  40. package/dist/ui/assets/JetBrainsMono-Bold.woff2 +0 -0
  41. package/dist/ui/assets/JetBrainsMono-Regular.woff2 +0 -0
  42. package/dist/ui/assets/Karla-Variable.woff2 +0 -0
  43. package/dist/ui/index.html +16 -0
  44. package/docs/DISTRIBUTION.md +136 -0
  45. package/docs/FINAL-TEST-V4.md +209 -0
  46. package/docs/MIGRATION.md +334 -0
  47. package/docs/TESTING-V4.md +119 -0
  48. package/docs/superpowers/specs/2026-10-08-desktop-from-npm-and-cli-design.md +187 -0
  49. package/docs/videos/control-plane.mp4 +0 -0
  50. package/package.json +61 -30
  51. package/scripts/build-interface.mjs +73 -0
  52. package/scripts/capture-screenshots.mjs +191 -0
  53. package/scripts/demo-env.mjs +461 -0
  54. package/scripts/frame-screenshots.py +176 -0
  55. package/scripts/macbook-mockup.py +296 -0
  56. package/scripts/make-tray-icon.py +61 -0
  57. package/scripts/preview-candidate.mjs +291 -0
  58. package/scripts/publish-desktop.mjs +46 -0
  59. package/scripts/record-demo.mjs +229 -0
  60. package/scripts/release-version.mjs +32 -0
  61. package/scripts/render-cli-menu.py +157 -0
  62. package/scripts/requirements-dev.in +12 -0
  63. package/scripts/requirements-dev.txt +424 -0
  64. package/scripts/run-ui-regression.mjs +48 -0
  65. package/scripts/setup-hooks.sh +7 -13
  66. package/scripts/smoke-desktop.mjs +80 -0
  67. package/scripts/test-drag-and-drop.mjs +114 -0
  68. package/scripts/test-first-run.mjs +5 -0
  69. package/scripts/test-import-ui.mjs +5 -0
  70. package/scripts/test-preferences-persist.mjs +5 -0
  71. package/scripts/test-upgrade-from-published.mjs +226 -0
  72. package/scripts/verify-mac-build.sh +153 -0
  73. package/scripts/verify-windows-build.ps1 +15 -0
  74. package/server.json +3 -3
  75. package/skills/README.md +42 -0
  76. package/skills/ssh-incident/SKILL.md +55 -0
  77. package/skills/ssh-operations/SKILL.md +62 -0
  78. package/skills/ssh-restricted/SKILL.md +57 -0
  79. package/src/agent-clients.js +482 -0
  80. package/src/approval.js +291 -0
  81. package/src/audit.js +11 -1
  82. package/src/command-log.js +162 -0
  83. package/src/config-loader.js +119 -4
  84. package/src/config-paths.js +101 -0
  85. package/src/control-plane.js +2730 -0
  86. package/src/desktop-install.js +747 -0
  87. package/src/index.js +179 -213
  88. package/src/live-stream.js +261 -0
  89. package/src/saved-commands.js +150 -0
  90. package/src/secret-store.js +573 -0
  91. package/src/server-aliases.js +8 -7
  92. package/src/server-config-manager.js +33 -7
  93. package/src/server-export.js +106 -0
  94. package/src/server-groups.js +82 -21
  95. package/src/server-import.js +477 -0
  96. package/src/shell-quote.js +9 -2
  97. package/src/ssh-connection.js +155 -0
  98. package/src/ssh-manager.js +186 -13
  99. package/src/tunnel-manager.js +79 -0
  100. package/src/vault-recovery.js +206 -0
  101. package/src/xlsx.js +322 -0
  102. package/docs/images/social-preview.png +0 -0
  103. package/docs/images/social-preview@2x.png +0 -0
  104. package/docs/images/ssh-manager-cli-menu.png +0 -0
package/.eslintignore ADDED
@@ -0,0 +1,5 @@
1
+ # Third-party code shipped as-is. Linting it would report thousands of style
2
+ # issues in a file we must not edit — the point of vendoring is that it stays
3
+ # byte-identical to what upstream published.
4
+ vendor/
5
+ node_modules/
package/.gitattributes ADDED
@@ -0,0 +1,5 @@
1
+ # The interface sources are checked out with LF on Windows too: the build must
2
+ # reproduce byte for byte on every system (mixed CRLF input and LF injections
3
+ # from Vite would otherwise change index.html).
4
+ ui/** text=auto eol=lf
5
+ *.woff2 -text
package/CHANGELOG.md CHANGED
@@ -5,6 +5,224 @@ 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
+ ## [Unreleased]
9
+
10
+ ## [4.0.1] - 2026-10-26
11
+
12
+ **The application tells you about updates, and nothing changes in the engine.**
13
+ Everything below is in the interface, the packaging and the metadata: the MCP
14
+ engine behaves exactly as in 4.0.0 (the release pipeline upgrades 3.8.5, 3.8.6,
15
+ 3.8.7 and 4.0.0 from the registry to this version and back). The desktop app
16
+ updates itself from 4.0.0 and from the 4.0.0 betas.
17
+
18
+ The Windows installer is **not Authenticode-signed** in this release either,
19
+ for the same reason as 4.0.0 (the public certificate waits on the company's
20
+ registration): Windows shows *"Windows protected your PC"*, *More info → Run
21
+ anyway*, and `ssh-manager app` checks the installer against the SHA-256 in
22
+ `release-manifest-win32.json`. macOS builds are signed and notarized.
23
+
24
+ ### The application shows its updates
25
+
26
+ - **Options → Updates** (desktop application only): the version running and its
27
+ channel (a preview build is offered newer previews and the stable release), the
28
+ version on offer, *Check now*, *Download*, download progress, *Restart to
29
+ update*, the time of the last check, a link to the release notes, and the reason
30
+ when a check fails. If commands are waiting for your decision when you restart,
31
+ it says they will be refused.
32
+ - **The sidebar says so too**: an *Update available* (or *Restart to update*)
33
+ mark above Options, and a dot on the Options icon when the rail is collapsed.
34
+ A native notification is posted once per version, not at every launch.
35
+ - *Help → Check for Updates…*, and the menu-bar entry, are kept; the window and
36
+ the menu show the same state.
37
+ - A browser tab (`ssh-manager control`) and the npm engine see none of it: the
38
+ endpoints do not exist there, and nothing about updates is drawn.
39
+
40
+ ### Fixes
41
+
42
+ - **Servers**: the grid/list switch sits beside the search field instead of
43
+ wrapping onto a line of its own below the group filters, which left a band of
44
+ empty space when there were many groups.
45
+ - The primary button's hover state no longer drops white-on-orange text below
46
+ the 4.5:1 AA contrast (it now moves toward the page's text colour).
47
+
48
+ ### Easier to find
49
+
50
+ - The npm description and keywords, the MCP registry description and the GitHub
51
+ About box say what V4 is now (SSH for AI agents, with approval, a vault and an
52
+ audit trail) instead of the v3 pitch; the repository topics lose the ones that
53
+ had nothing to do with this project.
54
+ - The README opens by saying it is an MCP server for SSH and ends with the
55
+ questions people ask (is it safe, which clients, do I need Node, how is it
56
+ different).
57
+ - A code of conduct, issue forms and a pull request template (the project
58
+ already pointed to a code of conduct that did not exist).
59
+
60
+ ### The interface is built when the package is made, not committed
61
+
62
+ `dist/ui` (the bundled control plane interface) is no longer in git. `prepack`
63
+ builds it into the npm package and the desktop app builds it when it is
64
+ assembled, so what users install is the same: the package and the app carry the
65
+ built interface and nothing compiles on their machine. In a source checkout, run
66
+ `npm run build:ui` once before `ssh-manager control`. CI builds it on three
67
+ systems and fails if anything generated is tracked; `release.yml` refuses a
68
+ tarball that does not carry it.
69
+
70
+ ## [4.0.0] - 2026-10-25
71
+
72
+ **V4 is stable, on npm and as a desktop application** — [release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.0.0).
73
+ `npm update -g mcp-ssh-manager` crosses the major version from 3.8.x; to stay on
74
+ the 3.8 line, pin `mcp-ssh-manager@3` (3.8.7 is its latest). Installed beta
75
+ desktop builds update to 4.0.0 by themselves.
76
+
77
+ The control plane: a local application — a browser tab or a desktop window —
78
+ that shows what your agents are doing on your servers and lets you stop them
79
+ before they do it, with an encrypted vault for credentials, human approval per
80
+ server, a file browser and a shell on your own machine. Everything in it is
81
+ opt-in: **with no vault, no approval set and nothing running, the engine behaves
82
+ as 3.8.x**, which the release pipeline proves by installing 3.8.5, 3.8.6 and
83
+ 3.8.7 from the registry and upgrading each to this version. The one deliberate
84
+ behaviour change is that **SSH host keys are verified** (see
85
+ [4.0.0-beta.1](#400-beta1---2026-09-24) and the [migration guide](docs/MIGRATION.md)).
86
+ The previews below list everything in detail.
87
+
88
+ ### The application without npm, and nothing new for those who keep npm
89
+
90
+ - **Options → AI tools.** Lists Claude Code, Claude Desktop and Codex, shows
91
+ which ssh-manager each one starts (the npm engine, the desktop application's,
92
+ another command, or none) with its version, and switches it on a click. The
93
+ application's engine runs under the application's own runtime
94
+ (`ELECTRON_RUN_AS_NODE`), so a machine with no Node and no npm gets a working
95
+ MCP server from the application alone. A switch rewrites that one entry —
96
+ through `claude mcp` when Claude Code's command is installed, in place in
97
+ Codex's `config.toml` (comments and other tables kept), and in Claude
98
+ Desktop's settings only while Claude Desktop is closed, since it rewrites
99
+ them when it quits. Environment variables of the entry are kept. A file that
100
+ does not parse is refused, never replaced. No engine is offered from an
101
+ AppImage or from a disk image, whose path changes on the next start.
102
+ - **No invitation in the CLI.** The one-time "new in v4" note shown by a CLI
103
+ command is gone, and the menu names the desktop application only when it is
104
+ installed. Someone who uses the npm engine headless sees exactly what they
105
+ saw before.
106
+ - The packaged-application smoke test, run on macOS, Windows and Linux before a
107
+ release, now starts the application's engine as an AI tool would and lists
108
+ its tools over MCP.
109
+ - Options' tabs wrap inside their bar in a narrow window instead of spilling
110
+ over the panel below.
111
+
112
+ ### Windows: not code-signed in this release
113
+
114
+ The Windows installer and application are **not Authenticode-signed** in 4.0.0:
115
+ Windows shows *"Windows protected your PC"* — *More info → Run anyway*. The
116
+ code-signing account exists; its public certificate waits on the company's
117
+ registration, and later releases will be signed. Until then the installer's
118
+ SHA-256 is published in `release-manifest-win32.json` on the release, and
119
+ `ssh-manager app` installs only a file that matches it. macOS builds are signed
120
+ and notarized by Apple; Linux packages are unsigned, as usual.
121
+
122
+ ### Security
123
+
124
+ - **Remote command execution through `ssh_backup_restore`'s `backupId`**
125
+ (GHSA-2wjh-xm9c-7qf9, high, reported by @NYBaywatch), present in every
126
+ preview up to 4.0.0-beta.3 as in 3.8.6: the metadata path went to the server
127
+ inside `cat "…"`, and `ssh_backup_create`'s `mkdir -p "…"` had the same flaw
128
+ with `backupDir`. Fixed as in [3.8.7](#387---2026-10-25). The other 3.8.7
129
+ advisory (GHSA-mq9f-5385-rjf4, a partial name or an alias escaping
130
+ `readonly`) never affected the previews, which resolve the name before
131
+ evaluating the policy; its regression test runs here too.
132
+
133
+ ## [4.0.0-beta.3] - 2026-10-25
134
+
135
+ **A third preview, published on GitHub only** — [release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.0.0-beta.3).
136
+ npm serves [3.8.6](#386---2026-10-08) until the stable 4.0.0. Installed beta
137
+ desktop builds update to this one by themselves.
138
+
139
+ ### Added — from npm to the desktop application in one step
140
+
141
+ - **`ssh-manager app`** installs the desktop application of the engine's own
142
+ version and opens it — or only opens it when it is already installed. The
143
+ file is chosen from the release for this platform and architecture, its size
144
+ and SHA-256 are checked against the release manifest while it downloads into
145
+ a private temporary directory, and on macOS the unpacked application must
146
+ pass `codesign --verify --deep --strict`, be signed by our Developer ID team
147
+ and be accepted by Gatekeeper. Any failure installs nothing. Windows installs
148
+ per user, silently; Linux uses the `.deb` (in the terminal, for `sudo`) or the
149
+ AppImage. `ssh-manager app --status` answers in one line. Exit codes: 0
150
+ opened, 1 failed, 2 not available here.
151
+ - **The browser interface offers it**: under `ssh-manager control`, a banner
152
+ says the application exists, installs and opens it in one click with its
153
+ progress drawn from the event stream, then hands the approval socket over
154
+ and stops ("Continued in the desktop app — you can close this tab"). Never
155
+ inside the application; "Not now" is remembered.
156
+ - **The CLI opens on a status screen**: version, server count, configuration
157
+ file and desktop application state, in the application's orange, two
158
+ columns when the terminal is wide enough. Every menu number keeps its
159
+ meaning; letters are added (`a` desktop app, `t` tools, `v` vault, `i` import,
160
+ `?` help, `q` quit). `--help` is rewritten in sections. `NO_COLOR` is
161
+ honoured by every command.
162
+
163
+ ### Fixed
164
+
165
+ - **Stopping a control plane deleted the socket of the one that replaced it.**
166
+ When a Unix-socket server closes, libuv unlinks whatever file is at its path
167
+ by then — after a takeover, the desktop application's socket. `stop()` now
168
+ removes only the files it created itself.
169
+ - **The desktop application could run twice** (a second launch on Windows or
170
+ Linux started a second copy fighting the first for the approval socket). It
171
+ now brings the running window forward instead.
172
+
173
+ ### Changed — the interface
174
+
175
+ - **The application's own colours.** The accent is the orange of the icon's
176
+ chevron (`#C04500`, brighter in dark mode) instead of the amber carried over
177
+ from TransHub, on warm neutrals, with Karla as a variable font so bold labels
178
+ are drawn, not synthesised. Every text colour was checked for WCAG AA on its
179
+ ground, in both themes.
180
+ - **The rail** shows the product's name and groups its screens — your
181
+ machines, what agents are doing, the fleet, what you have open. "Waiting"
182
+ carries a solid orange count. The connection status moved from a strip
183
+ across every page to the foot of the rail; the strip comes back, as a
184
+ warning, only when the connection is lost.
185
+ - **Servers** fill the width: cards in a grid instead of one narrow column per
186
+ group, labelled Files and Shell buttons instead of glyphs that appeared on
187
+ hover, a coloured chip for each departure from the defaults (read only,
188
+ restricted, approval), filters by group, and a banner naming the server and
189
+ command an agent is waiting on.
190
+ - **Waiting**: a destructive request says so across the card, and its button
191
+ is red and reads "Approve and run". The command can be copied.
192
+ - **Health**: gauges are graphite below their threshold, amber at it, red ten
193
+ points past it, under a summary of reachable, over-threshold and unreachable
194
+ servers. The track behind each gauge was invisible (an undefined colour).
195
+ - **Window buttons.** The desktop application no longer has a system title bar
196
+ on Windows and Linux: minimise, maximise and close are drawn over the right
197
+ end of the page header in the page's colours (Window Controls Overlay), and
198
+ the header reserves exactly their width. On macOS the three buttons sit in
199
+ the rail's top row instead of a strip across the whole window. The header is
200
+ what you drag the window by.
201
+ - Outlined buttons and inputs had near-black borders (Tailwind 4 draws a bare
202
+ `border` in the text colour); they use the theme's border colour.
203
+
204
+ ### Added
205
+
206
+ - **Per-server OpenSSH user certificates: `CERTPATH` / `cert_path`**
207
+ ([#93](https://github.com/bvisible/mcp-ssh-manager/issues/93)). The
208
+ certificate is passed to `ssh2` as `publicKey` next to `privateKey`, read on
209
+ every connection (renewed short-lived certificates need no restart), and a
210
+ missing file fails the connection. Needs an `ssh2` release with certificate
211
+ support (mscdex/ssh2#1495); with `ssh2` 1.17.0 the option has no effect.
212
+ - **Windows code signing in the release pipeline**, through Azure Artifact
213
+ Signing: when the `ARTIFACT_SIGNING_*` secrets are set, electron-builder
214
+ signs every executable and the installer. Without them the Windows build is
215
+ unsigned, as before, which a prerelease accepts and a stable release refuses.
216
+
217
+ ### Security
218
+
219
+ - Dependencies: the advisories published since beta.2 — `zod` 4.6.7 (memory
220
+ exhaustion on oversized constrained collections), `body-parser` 2.4.0,
221
+ `hono`, `fast-uri` and `ip-address` in the engine; `electron` 44.9.3 and
222
+ `undici` in the desktop application; `vite` 6.4.5 for the interface build,
223
+ whose output is unchanged. `npm audit` is clean in all three packages,
224
+ development dependencies included.
225
+
8
226
  ## [3.8.7] - 2026-10-25
9
227
 
10
228
  ### Security
@@ -33,13 +251,43 @@ Two advisories, both reported to us. **Upgrade.**
33
251
  `ip-address` 10.7.5, for the advisories published since 3.8.6.
34
252
  `npm audit` is clean.
35
253
 
36
- ### Added
254
+ ## [4.0.0-beta.2] - 2026-10-08
37
255
 
38
- - **Per-server OpenSSH user certificates: `CERTPATH` / `cert_path`.** The
39
- certificate is passed to `ssh2` as `publicKey` next to `privateKey`, read on
40
- every connection (renewed short-lived certificates need no restart), and a
41
- missing file fails the connection. Needs an `ssh2` release with certificate
42
- support (mscdex/ssh2#1495); with `ssh2` 1.17.0 the option has no effect.
256
+ **A second preview, published on GitHub only** — [release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.0.0-beta.2).
257
+ npm serves [3.8.6](#386---2026-10-08), released the same day with the same
258
+ security fixes, until the stable 4.0.0. Installed beta.1 desktop builds update
259
+ to this one by themselves.
260
+
261
+ ### Security
262
+
263
+ Everything in [3.8.6](#386---2026-10-08) below. Host key verification and the
264
+ quoting of `cwd` were already in beta.1.
265
+
266
+ ### Fixed — found by using V4 in place of our previous tool
267
+
268
+ - **A refused password was reported as "Too many authentication failures"**
269
+ ([#88](https://github.com/bvisible/mcp-ssh-manager/issues/88)). With an agent
270
+ loaded, ssh2 follows a refused password with every agent key, and OpenSSH's
271
+ `MaxAuthTries` ends it all with its own message. The order is unchanged — an
272
+ agent key that works still connects — but each attempt is recorded, and the
273
+ error now says what was refused: *the password was refused; the server then
274
+ closed the connection while ssh-agent keys were being tried (Too many
275
+ authentication failures)*. A method the server does not offer is no longer
276
+ sent. Checked against OpenSSH 9 with six agent keys.
277
+ - **`KEYPATH` expanded the first `~` anywhere in the path**
278
+ ([#89](https://github.com/bvisible/mcp-ssh-manager/issues/89)). Only a leading
279
+ `~` or `~/` is expanded now, as a shell does.
280
+ - **A stale `SSH_MANAGER_ENV` loaded zero servers, silently**
281
+ ([#90](https://github.com/bvisible/mcp-ssh-manager/issues/90)). 3.8.x's engine
282
+ never read that variable (only the CLI did); beta.1 did, so a profile still
283
+ pointing it at a deleted file took a working setup from 59 servers to none. A
284
+ missing file named by `SSH_MANAGER_ENV` is now skipped, as 3.8.x skipped the
285
+ variable, with a warning. A missing file named by `SSH_ENV_PATH` stays the
286
+ choice and is reported at startup, in `ssh_list_servers` and in "server not
287
+ found".
288
+ - Dependencies: `@modelcontextprotocol/sdk` 1.32.1 and the advisories published
289
+ since beta.1 (`fast-uri`, `ip-address`, `proxy-addr`, `smol-toml`,
290
+ `brace-expansion`); `npm audit` is clean, development dependencies included.
43
291
 
44
292
  ## [3.8.6] - 2026-10-08
45
293
 
@@ -121,6 +369,123 @@ Each fix carries a test that fails without it.
121
369
  server. The hooks now come from your profile, as documented; the `frappe`
122
370
  profile still has them.
123
371
 
372
+ ## [4.0.0-beta.1] - 2026-09-24
373
+
374
+ **A preview, published on GitHub only** — [release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.0.0-beta.1). npm keeps serving
375
+ 3.8.5 until the stable 4.0.0, so no existing installation receives this.
376
+
377
+ The control plane: a local application that shows what your agents are doing on
378
+ your servers, and lets you stop them before they do it.
379
+
380
+ **Upgrading changes nothing on its own** — with one deliberate exception, host
381
+ keys, described first below. With no vault, no approval set and
382
+ nothing running, the engine behaves exactly as 3.8.5 did — verified end to end
383
+ by `scripts/test-upgrade-from-published.mjs`, which installs 3.8.5 from the
384
+ registry, asks it what it sees over MCP, installs this version over the top and
385
+ asks again, then rolls back. Same 37 tool schemas, server fields and unchanged
386
+ `.env` / TOML fixtures; no automatic vault or control plane.
387
+
388
+ ### Behaviour change: host keys are verified
389
+
390
+ 3.8.5 never compared the key a server presented with the one in `known_hosts`;
391
+ it accepted any connection to a known host, and any unknown one. V4 compares it
392
+ on every connection. An unknown host is trusted on first use and its key is
393
+ recorded in `known_hosts`; a **changed** or revoked key is refused before any
394
+ credential is sent. A server rebuilt since its key was recorded is therefore
395
+ refused until the old entry is removed — see
396
+ [the migration guide](docs/MIGRATION.md#the-one-thing-that-behaves-differently-host-keys).
397
+ `SSH_MANAGER_KNOWN_HOSTS` points V4 at a separate file.
398
+
399
+ ### Added
400
+
401
+ - **Announcing the agent to your servers**, off by default. With
402
+ `SSH_MANAGER_ANNOUNCE_AGENT=true` (or `ANNOUNCE_AGENT=true` per server),
403
+ commands, `ssh_tail --follow`, interactive sessions and `ssh_sync` carry
404
+ `AI_AGENT=mcp-ssh-manager`, following the
405
+ [AI_AGENT over SSH convention](https://github.com/mthamil107/whotyped/blob/main/docs/spec/ai-agent-over-ssh.md),
406
+ so a server that keeps it (`AcceptEnv AI_AGENT`) can tell an agent's sessions
407
+ from a person's. Actions taken from the control plane are a person's and are
408
+ never announced. Contributed by @mthamil107 (#84).
409
+ - **The control plane** (`ssh-manager control`, or the desktop app): what an
410
+ agent is running right now with its output through a terminal emulator, a
411
+ queue of commands waiting on your decision, a dual-pane file browser, health
412
+ on demand with thresholds, an interactive shell on any server, saved commands,
413
+ groups, and the audit trail.
414
+ - **Desktop builds** for macOS, Windows and Linux. The app *is* the control
415
+ plane rather than a window pointed at one, so it needs neither Node nor the
416
+ npm package.
417
+ - A **menu-bar item** carrying a count when something is waiting, listing what
418
+ is blocked on you, which shells and commands are open, and your servers.
419
+ - **Native notifications** posted by the application itself, so macOS and
420
+ Windows show and route them correctly. Destructive requests stay on screen.
421
+ - **An encrypted vault** (AES-256-GCM, key in the OS keychain) for credentials,
422
+ sitting above your config files and below the process environment. Your `.env`
423
+ is never modified.
424
+ - **Human approval**, per server: the engine pauses, shows you the machine and
425
+ the command in full, and waits. Every failure denies.
426
+ - `ssh-manager vault` and `ssh-manager control` in the CLI, and the control
427
+ plane in the interactive menu.
428
+
429
+ ### Changed
430
+
431
+ - **Approval can no longer be set from a file or the environment.** It is the
432
+ switch whose accidental override would disable a requested protection.
433
+ It lives in the vault and is preserved by connection-setting overrides. This
434
+ is not isolation from a process with control of the local user account. An existing
435
+ `SSH_SERVER_*_APPROVAL` is reported loudly on start rather than silently
436
+ ignored. Never released before this version, so no published behaviour changes.
437
+ - Keychain lookups now time out after five seconds instead of blocking forever
438
+ on a host with no user session — a server over SSH, a container, a CI runner.
439
+
440
+ ### Fixed
441
+
442
+ - Vault changes reload without restarting; editing a server keeps omitted
443
+ credentials, accounts, proxies, restrictions and approval. Process environment
444
+ overrides cannot erase an existing approval policy.
445
+ - Recovery decrypts every credential before writing, previews replacements, and
446
+ refuses stale previews. Backup and restore are also available in Options → Vault.
447
+ - SSH host keys are verified during the handshake. Remote MCP tools share one
448
+ approval/policy boundary; aliases resolve consistently, approvals are requested
449
+ once, and config changes invalidate old pooled connections. Working directories
450
+ with spaces or shell metacharacters are quoted.
451
+ - Desktop groups persist in user state rather than inside the signed application.
452
+ Release metadata is regenerated after notarization/stapling; publishing waits
453
+ for platform checks. Release candidates use npm `next` without changing stable
454
+ Homebrew or MCP Registry entries.
455
+ - First-run welcome now has local SVG illustrations, reduced-motion support and
456
+ keyboard-accessible dialogs. Add/import actions open their forms directly.
457
+ Server protection and lost control-plane connections are visible. Sidebar,
458
+ theme, server layout and collapsed groups survive a new local port.
459
+ - `mkdirSync` under an unwritable path could hang indefinitely on Linux, which
460
+ cost this project's CI a six-hour job before anyone looked.
461
+ - **Quitting the desktop application could hang indefinitely** while an MCP
462
+ engine was connected to it — which is the normal situation while an agent is
463
+ using it. Shutdown waited on connections that never end by themselves; it now
464
+ ends them, and an engine waiting on a decision is still answered `deny` first.
465
+ Found by the release smoke test, which hung on quit in two launches out of
466
+ four and now reports the time each stage takes.
467
+ - **Editing a server from the CLI menu always failed** with `Server '' not
468
+ found`: the menu stored its choice in `selected_server` and the edit wizard
469
+ read `SELECTED_SERVER`. Also in 3.8.5. Fixed by @TheRealKamisama (#83).
470
+
471
+ ### Security
472
+
473
+ - hono 4.13.9 (through the MCP SDK), clearing GHSA-gqvv-2mrq-wpjv,
474
+ GHSA-g6gw-c38x-mqfc and GHSA-crvj-82cr-hjcx. The stdio server never loads it;
475
+ the desktop build ships it. `npm audit --omit=dev` is clean for the engine,
476
+ the desktop application and the interface.
477
+
478
+ ### Distribution
479
+
480
+ - **macOS** (Apple silicon, Intel): signed with a Developer ID and notarized.
481
+ - **Windows** (x64, arm64): **not code-signed in this preview**; Windows warns
482
+ before running it. Signing is required before the stable release.
483
+ - **Linux** (x64): `.deb` and `.AppImage`, unsigned as Linux packages usually are.
484
+ - An installed preview updates itself: to the next preview, and to 4.0.0 when it
485
+ ships. Previews are named `beta` for that reason — electron-updater only moves
486
+ `alpha` and `beta` builds on to a stable release, and an `rc` would have left
487
+ its testers on it indefinitely.
488
+
124
489
  ## [3.8.5] - 2026-08-28
125
490
 
126
491
  ### Security
package/CLAUDE.md CHANGED
@@ -73,6 +73,8 @@ npm ci # Install the exact tree from pack
73
73
  npm start # Start MCP server (requires stdin)
74
74
  npm test # Run the full test suite
75
75
  npm run typecheck # Type-check JSDoc with tsc (no build, nothing emitted)
76
+ npm run build:ui # Build the interface (ui/) into dist/ui: generated, git-ignored, run by `prepack`;
77
+ # needed before `ssh-manager control` from a checkout and before the browser tests
76
78
  npm run test:all # Tests + typecheck + validation
77
79
  ./scripts/validate.sh # Run all validation checks
78
80
  node --check src/index.js # Check JavaScript syntax
@@ -81,6 +83,8 @@ python -m py_compile tools/*.py # Check Python syntax
81
83
 
82
84
  **Typecheck**: `tsconfig.json` runs TypeScript in `checkJs`/`noEmit` mode over the plain JS —
83
85
  this project ships JavaScript straight from `src/` with no build step, and that must stay true.
86
+ The interface is the one generated thing: `dist/ui` is built from `ui/` when the package is packed and when the desktop
87
+ app is assembled, never committed (`scripts/build-interface.mjs`; CI fails if `dist/` is tracked).
84
88
  The baseline is 0 errors and CI enforces it, so add JSDoc annotations (or a narrow
85
89
  `/** @type {...} */` cast) rather than leaving new errors. `typescript` is pinned to `^6`
86
90
  because knip 5 declares `peer typescript ">=5.0.4 <7"` — bumping one requires bumping the other.
@@ -190,6 +194,7 @@ SSH_SERVER_[NAME]_PLATFORM=windows # Optional: "linux" (default) or "win
190
194
  SSH_SERVER_[NAME]_PROXYJUMP=bastion # Optional: name of another server to use as jump host
191
195
  SSH_SERVER_[NAME]_PROXYCOMMAND=command # Optional: custom proxy command (ncat, ssh -W, etc.)
192
196
  SSH_SERVER_[NAME]_FORWARD_AGENT=true # Optional: forward local ssh-agent to remote (needs SSH_AUTH_SOCK; security risk)
197
+ SSH_SERVER_[NAME]_ANNOUNCE_AGENT=true # Optional: send AI_AGENT=mcp-ssh-manager to this host (off by default; SSH_MANAGER_ANNOUNCE_AGENT=true for all)
193
198
  ```
194
199
 
195
200
  ### TOML Format
@@ -208,6 +213,7 @@ platform = "windows" # Optional: "linux" (default) or "win
208
213
  proxy_jump = "bastion" # Optional: name of another server to use as jump host
209
214
  proxy_command = "command" # Optional: custom proxy command (ncat, ssh -W, etc.)
210
215
  forward_agent = true # Optional: forward local ssh-agent to remote (needs SSH_AUTH_SOCK; security risk)
216
+ announce_agent = true # Optional: send AI_AGENT=mcp-ssh-manager to this host (off by default; false keeps it silent under the global switch)
211
217
  ```
212
218
 
213
219
  ## Key Implementation Details
@@ -0,0 +1,18 @@
1
+ # Code of Conduct
2
+
3
+ This project is for people who run commands on real servers and want to do it
4
+ safely. Taking part in it, in issues, discussions and pull requests, means:
5
+
6
+ - **Be kind and assume good faith.** Disagree with the code, the design or the
7
+ decision, never with the person.
8
+ - **Stay on topic and be concrete.** A reproducible report and a clear request
9
+ help everyone; so does saying what you tried.
10
+ - **No harassment, discrimination, personal attacks or unwelcome advances**, and
11
+ no publishing other people's private information.
12
+ - **Keep secrets out of public places.** Never paste passwords, keys or tokens,
13
+ and do not post the details of a vulnerability in a public issue: use the
14
+ private channel described in [SECURITY.md](SECURITY.md).
15
+
16
+ The maintainer may edit or remove comments, lock threads and block people who do
17
+ not follow this. To report a problem with someone's behaviour, write to the
18
+ contacts listed in [SECURITY.md](SECURITY.md); reports are treated privately.
package/CONTRIBUTING.md CHANGED
@@ -70,6 +70,10 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
70
70
 
71
71
  4. Make your changes and test them
72
72
 
73
+ The interface (`ui/`) is built, not committed: `npm run build:ui` builds it
74
+ into the git-ignored `dist/ui`, which `ssh-manager control` serves from a
75
+ checkout. Changing `ui/` needs no build artifact in your pull request.
76
+
73
77
  5. Commit your changes:
74
78
  ```bash
75
79
  git add .
@@ -116,6 +120,32 @@ Before submitting a pull request:
116
120
  CI installs with `npm ci` on Node 18, 20 and 22, and the `lint` job runs
117
121
  ESLint and the JSDoc typecheck as blocking gates.
118
122
 
123
+ ### Tests come with the change
124
+
125
+ New functionality and every bug fix arrive with automated tests, in the same
126
+ pull request: a test that fails without the change and passes with it. This is
127
+ the project's policy for any major new functionality, and reviewers ask for the
128
+ test before the code. Where the test is:
129
+
130
+ - `tests/test-*.js` for the engine (run by `npm test`; each file is also a
131
+ script of its own, `npm run test:<name>`),
132
+ - `ui/tests/*.spec.ts` for the interface (Playwright, `npm --prefix ui run
133
+ test:e2e`),
134
+ - `tests/test-shell-quote-properties.js` shows the property-based style
135
+ (`fast-check`) used where a bug class matters more than one example: anything
136
+ that builds a command for a remote shell must go through `shellQuote()` and be
137
+ covered by it.
138
+
139
+ Security fixes also add the exact input that broke the code as a regression
140
+ test (see `tests/test-backup-monitor-injection.js` for the pattern).
141
+
142
+ ### Static analysis and warnings
143
+
144
+ ESLint, the JSDoc typecheck (`npm run typecheck`, zero errors) and CodeQL run on
145
+ every push and pull request, and OpenSSF Scorecard runs on `main`. Findings are
146
+ fixed rather than ignored; an alert that is a false positive is dismissed on
147
+ GitHub with a written reason.
148
+
119
149
  ## Documentation
120
150
 
121
151
  - Update README.md if you change functionality
@@ -0,0 +1,60 @@
1
+ # Homebrew formula for MCP SSH Manager.
2
+ #
3
+ # Installs the same npm package, so `brew install` and `npm install -g` give
4
+ # identical binaries — the vault, the approval broker and the control plane are
5
+ # all in the engine, not in a separate desktop build.
6
+ #
7
+ # Kept in this repository rather than a separate tap so it is updated in the same
8
+ # commit as the release that changes it. Install with:
9
+ #
10
+ # brew install bvisible/mcp-ssh-manager/ssh-manager
11
+ #
12
+ # after `brew tap bvisible/mcp-ssh-manager https://github.com/bvisible/mcp-ssh-manager`.
13
+ class SshManager < Formula
14
+ desc "SSH server management for AI agents, with approval and audit"
15
+ homepage "https://github.com/bvisible/mcp-ssh-manager"
16
+ url "https://registry.npmjs.org/mcp-ssh-manager/-/mcp-ssh-manager-4.0.0.tgz"
17
+ sha256 "b898a742f36b713f829f62d519418ae77b3e7251142426122141d92f5fb273a0"
18
+ license "MIT"
19
+
20
+ depends_on "node"
21
+
22
+ def install
23
+ system "npm", "install", *std_npm_args
24
+ bin.install_symlink Dir["#{libexec}/bin/*"]
25
+ end
26
+
27
+ def caveats
28
+ <<~EOS
29
+ Two commands are installed:
30
+
31
+ ssh-manager manage servers, the encrypted vault, and the control plane
32
+ mcp-ssh-manager the MCP server itself, started by your agent
33
+
34
+ Register it with Claude Code:
35
+
36
+ claude mcp add ssh-manager mcp-ssh-manager
37
+
38
+ Then, to keep credentials out of a clear-text .env:
39
+
40
+ ssh-manager vault import
41
+
42
+ To review and approve what your agents do before it runs:
43
+
44
+ ssh-manager control
45
+ EOS
46
+ end
47
+
48
+ test do
49
+ # The CLI must run without a config, and the MCP server must complete a real
50
+ # stdio handshake — a formula that only checks `--version` proves nothing
51
+ # about whether the package actually works.
52
+ assert_match "ssh-manager", shell_output("#{bin}/ssh-manager --help 2>&1")
53
+
54
+ handshake = <<~JSON
55
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"brew-test","version":"1"}}}
56
+ JSON
57
+ output = pipe_output("#{bin}/mcp-ssh-manager 2>/dev/null", handshake, 0)
58
+ assert_match "mcp-ssh-manager", output
59
+ end
60
+ end