mcp-ssh-manager 4.3.6 → 4.4.0

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
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.0] - 2026-11-26
11
+
12
+ **A feature release with two interface fixes.** Nothing changes unless you turn the new
13
+ switch on; the interface fixes only affect the desktop app and the browser interface.
14
+ Contributed by @AnA-0823 (the tray switch, the dropdown colours) and @congzhou09 (the
15
+ terminal fix). The Windows installer is still **not Authenticode-signed**, for the same
16
+ reason as 4.0.0: Windows shows *"Windows protected your PC"*, *More info → Run anyway*,
17
+ and `ssh-manager app` checks the installer against the SHA-256 in
18
+ `release-manifest-win32.json`. macOS builds are signed and notarized.
19
+
20
+ ### Added
21
+
22
+ - **Keep the desktop application running when its window is closed** (*Options → Appearance*, inside the desktop application). On Windows and Linux, turning this on leaves SSH Manager in the system tray so approval notifications still arrive after closing the window; each platform's default behaviour (staying in the menu bar on macOS, quitting on Windows and Linux) is unchanged.
23
+
24
+ ### Fixed
25
+
26
+ - **Native `<select>` menus were light text on a white background in dark mode on Windows and Linux.** Transparent backgrounds on `<select>` and `<option>` exposed Chromium's white popup surface while inheriting dark-mode text colour; all five dropdowns now carry opaque theme colours.
27
+ - **`vim` froze the terminal of the interface on its first screen** (#175, @congzhou09). vim asks the terminal for one of its modes as soon as it has drawn; xterm answered with code that the interface's build target made esbuild lower into an assignment to an undeclared variable, so the answer threw and nothing after it was drawn. The interface is now built for ES2021, which keeps the code as written; a test sends that query and expects the answer.
28
+
29
+ ### Changed
30
+
31
+ - **Interface dependency:** `i18next` 25 to 27 (#168). The interface's languages and the language tool are unchanged.
32
+
10
33
  ## [4.3.6] - 2026-11-25
11
34
 
12
35
  **A security release: upgrade if an agent runs in a project folder you did not write.**
@@ -13,8 +13,8 @@
13
13
  class SshManager < Formula
14
14
  desc "SSH server management for AI agents, with approval and audit"
15
15
  homepage "https://github.com/bvisible/mcp-ssh-manager"
16
- url "https://registry.npmjs.org/mcp-ssh-manager/-/mcp-ssh-manager-4.3.5.tgz"
17
- sha256 "43c0c08251bf15ebb3407e5371f26a065641c820eb9347f972408c03f8508aa7"
16
+ url "https://registry.npmjs.org/mcp-ssh-manager/-/mcp-ssh-manager-4.3.6.tgz"
17
+ sha256 "2ab2076b2c06fbdccfdeba4f4fc9737ecd7a7838d6fd281687ee979fda2122d2"
18
18
  license "MIT"
19
19
 
20
20
  depends_on "node"
package/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
  [![Desktop app downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbvisible%2Fmcp-ssh-manager%2Fstats%2Fdesktop.json&style=flat-square)](https://github.com/bvisible/mcp-ssh-manager/releases/latest)
26
26
  [![GitHub stars](https://img.shields.io/github/stars/bvisible/mcp-ssh-manager?style=flat-square&color=c04500)](https://github.com/bvisible/mcp-ssh-manager/stargazers)
27
27
  [![MCP Toplist](https://mcptoplist.com/badge/io.github.bvisible%2Fmcp-ssh-manager.svg)](https://mcptoplist.com/server/io.github.bvisible%2Fmcp-ssh-manager)
28
- [![Version](https://img.shields.io/badge/release-4.3.6-c04500?style=flat-square)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.3.6)
28
+ [![Version](https://img.shields.io/badge/release-4.4.0-c04500?style=flat-square)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.0)
29
29
  [![Claude Code](https://img.shields.io/badge/Claude_Code-Compatible-5A67D8?style=flat-square&logo=anthropic)](https://claude.ai/code)
30
30
  [![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-Compatible-00A67E?style=flat-square&logo=openai)](https://openai.com/codex)
31
31
  [![MCP](https://img.shields.io/badge/MCP-Server-orange?style=flat-square)](https://modelcontextprotocol.io)
@@ -58,9 +58,9 @@ An MCP SSH server is the most dangerous tool you can hand an agent: a shell on m
58
58
 
59
59
  ## Choose your workspace
60
60
 
61
- **Desktop application (`4.3.6`):** one installation with its own runtime,
61
+ **Desktop application (`4.4.0`):** one installation with its own runtime,
62
62
  terminal, file browser and server settings. No separate Node.js or npm
63
- installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.3.6):
63
+ installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.0):
64
64
 
65
65
  | Platform | File | Signature |
66
66
  |---|---|---|
@@ -68,7 +68,7 @@ installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases
68
68
  | Windows x64 / arm64 | `…-setup.exe` | **Not code-signed yet.** Windows shows *"Windows protected your PC"*: *More info → Run anyway*. Check the file against the SHA-256 in `release-manifest-win32.json` on the release (`ssh-manager app` does it for you). Signing comes in a later release. |
69
69
  | Linux x64 | `.deb`, `.AppImage` | Unsigned, as Linux packages usually are |
70
70
 
71
- **Already using npm / the CLI?** `npm update -g mcp-ssh-manager` brings 4.3.6,
71
+ **Already using npm / the CLI?** `npm update -g mcp-ssh-manager` brings 4.4.0,
72
72
  and the V4 engine runs without an interface, from your existing `.env`, TOML or
73
73
  process variables — no automatic import, no forced wizard, no approval prompt
74
74
  unless you enable one per server. The one behaviour that tightens is **SSH
@@ -203,7 +203,7 @@ files and one command (`npm run lang -- add <code>`): see [Adding a language](ui
203
203
 
204
204
  The desktop build adds the two things a browser tab cannot do:
205
205
 
206
- - **It lives in the menu bar.** The icon carries a count when something is waiting, and its menu lists what is blocked on you, which shells and commands are open right now, and your servers — so "is anything waiting on me?" costs a glance instead of a window switch. Closing the window leaves it there rather than quitting.
206
+ - **It lives in the menu bar.** The icon carries a count when something is waiting, and its menu lists what is blocked on you, which shells and commands are open right now, and your servers — so "is anything waiting on me?" costs a glance instead of a window switch. On macOS, closing the window leaves it there by default; on Windows and Linux you can turn that on under *Options → Appearance*.
207
207
  - **It posts real system notifications**, with the application's own identity, so macOS and Windows show and route them properly. Destructive requests stay on screen instead of fading after four seconds. macOS asks your permission the first time it needs to.
208
208
 
209
209
  <p align="center">
@@ -722,6 +722,8 @@ The hero animation ships twice, light and dark, swapped by `<picture>` on `prefe
722
722
 
723
723
  ## What's new
724
724
 
725
+ **[4.4.0](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.0) — keep the desktop app running when you close its window, readable dropdowns in dark mode, and `vim` works in the terminal.** *Options → Appearance* has a new, opt-in switch: with it on, closing the window leaves SSH Manager in the system tray (Windows, Linux) or the menu bar (macOS), so approval requests still reach you; nothing changes until you turn it on. Native `<select>` menus are no longer light text on a white menu in dark mode on Windows and Linux, and vim no longer freezes the interface's terminal on its first screen. From @AnA-0823 (#173, #174) and @congzhou09 (#175). See the [CHANGELOG](CHANGELOG.md#440---2026-11-26).
726
+
725
727
  **[4.3.6](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.3.6) — a security fix: a project folder's `.env` could run a command on your machine.** The `.env` of the folder an MCP client was started in could define a server whose `PROXYCOMMAND` ran when a tool connected to it, before any SSH login and whatever the server's mode. That `.env` is no longer read unless you placed it (`~/.ssh-manager/.env`, your home's, the install folder's) or set `SSH_MANAGER_TRUST_PROJECT_ENV=1` in the environment of the engine; the engine says which file it left unread. If your servers were in a `.env` next to the project, move it to `~/.ssh-manager/.env` or name it with `SSH_ENV_PATH`. Reported by @Pythame (GHSA-wxcj-q5hp-wjrw). See the [CHANGELOG](CHANGELOG.md#436---2026-11-25).
726
728
 
727
729
  **[4.3.5](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.3.5) — a security fix: `restricted` and `readonly` modes could be made to run a command their patterns deny.** A shell rewrites a word before it runs it (`r""m`, `r\m` and `r${x}m` are all `rm`), and the patterns were tested on the text as typed, so a denied command could ride behind an allowed launcher such as `find -exec` or `xargs`. Every command is now also tested as the shell reads it. If you use `restricted` or `readonly` mode, upgrade. Reported by @Pythame (GHSA-4fp4-fggm-cf5c). See the [CHANGELOG](CHANGELOG.md#435---2026-11-25).
@@ -16,6 +16,7 @@ files:
16
16
  # One file per language, found by locale.mjs at start: a new language needs no change here.
17
17
  - native.*.json
18
18
  - local-shell.mjs
19
+ - window-close.mjs
19
20
  - smoke-test.mjs
20
21
  - package.json
21
22
  # The menu-bar glyph is loaded at runtime from __dirname/resources, so it has
@@ -32,6 +32,7 @@ import { fileURLToPath, pathToFileURL } from 'url';
32
32
  import { localShellLaunch, localShellName } from './local-shell.mjs';
33
33
  import { nativeLanguage, nativeText } from './locale.mjs';
34
34
  import { applicationMenuTemplate } from './native-menu.mjs';
35
+ import { shouldQuitOnWindowAllClosed } from './window-close.mjs';
35
36
 
36
37
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
37
38
 
@@ -646,8 +647,13 @@ function createTray() {
646
647
  // to raise the window, and the menu is on right-click.
647
648
  if (process.platform !== 'darwin') {
648
649
  tray.on('click', () => {
649
- if (mainWindow) mainWindow.show();
650
- else if (plane) createWindow(plane.url);
650
+ if (mainWindow) {
651
+ if (mainWindow.isMinimized()) mainWindow.restore();
652
+ mainWindow.show();
653
+ mainWindow.focus();
654
+ } else if (plane) {
655
+ createWindow(plane.url);
656
+ }
651
657
  });
652
658
  }
653
659
  refreshTray();
@@ -766,20 +772,21 @@ app.whenReady().then(async () => {
766
772
  });
767
773
  });
768
774
 
769
- // On macOS, closing the window leaves the app in the menu bar. Everywhere else
770
- // it quits.
771
- //
772
- // This used to quit on every platform, and the reason was sound at the time:
773
- // leaving the control plane running with no window means a process holding SSH
774
- // connections that nobody can see — and worse, holding the approval socket, so
775
- // agents block on an interface that is not on screen.
775
+ // On macOS, closing the window leaves the app in the menu bar by default;
776
+ // everywhere else it quits unless the user asked to keep it in the tray under
777
+ // Options → Appearance.
776
778
  //
777
- // The tray is exactly the thing that was missing. It shows the connections, it
778
- // shows what is waiting, and it carries a Quit. The invisible-process objection
779
- // no longer applies, and quitting a menu-bar app because its window closed is
780
- // not what a macOS user expects.
779
+ // This used to quit unconditionally, and the reason was sound before the tray
780
+ // and native notifications existed: leaving the control plane running with no
781
+ // window meant holding SSH connections and the approval socket with nothing on
782
+ // screen to tell you an agent was waiting. With the tray and notifications in
783
+ // place on every platform, keeping it running is safe wherever a tray icon
784
+ // actually came up.
781
785
  app.on('window-all-closed', () => {
782
- if (process.platform !== 'darwin') app.quit();
786
+ const home = plane ? path.dirname(plane.store.vaultPath) : undefined;
787
+ if (shouldQuitOnWindowAllClosed({ platform: process.platform, home, hasTray: Boolean(tray) })) {
788
+ app.quit();
789
+ }
783
790
  });
784
791
 
785
792
  app.on('before-quit', async event => {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "ssh-manager-desktop",
3
- "version": "4.3.6",
3
+ "version": "4.4.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "ssh-manager-desktop",
9
- "version": "4.3.6",
9
+ "version": "4.4.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "electron-updater": "^6.8.9",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ssh-manager-desktop",
3
3
  "productName": "SSH Manager",
4
- "version": "4.3.6",
4
+ "version": "4.4.0",
5
5
  "private": true,
6
6
  "description": "The SSH Manager control plane as a desktop application",
7
7
  "main": "main.js",
@@ -0,0 +1,35 @@
1
+ import fs from 'node:fs';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+
5
+ export const CLOSE_TO_TRAY_KEY = 'ssh-manager.close-to-tray';
6
+
7
+ /**
8
+ * Whether closing the last window should quit the application.
9
+ *
10
+ * Without a saved preference, each platform keeps its own convention: macOS
11
+ * stays in the menu bar and Dock; Windows and Linux quit. When the user sets
12
+ * the preference in Options, that choice wins — except on Windows and Linux
13
+ * when no tray icon could be created, where staying alive with neither window
14
+ * nor tray would leave an unreachable process holding the approval socket.
15
+ *
16
+ * @param {{ platform?: string, home?: string, hasTray?: boolean }} [options]
17
+ * @returns {boolean}
18
+ */
19
+ export function shouldQuitOnWindowAllClosed({
20
+ platform = process.platform,
21
+ home = process.env.SSH_MANAGER_HOME || path.join(os.homedir(), '.ssh-manager'),
22
+ hasTray = true,
23
+ } = {}) {
24
+ let keepInTray = platform === 'darwin';
25
+ try {
26
+ const preferences = JSON.parse(fs.readFileSync(path.join(home, 'preferences.json'), 'utf8'));
27
+ const saved = preferences?.[CLOSE_TO_TRAY_KEY];
28
+ if (saved === 'true' || saved === true) keepInTray = true;
29
+ else if (saved === 'false' || saved === false) keepInTray = false;
30
+ } catch {
31
+ // Absent or unreadable preferences fall back to the platform default.
32
+ }
33
+ if (platform !== 'darwin' && !hasTray) return true;
34
+ return !keepInTray;
35
+ }