mcp-ssh-manager 4.3.6 → 4.4.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 +37 -0
- package/Formula/ssh-manager.rb +2 -2
- package/README.md +9 -5
- package/desktop/electron/electron-builder.yml +1 -0
- package/desktop/electron/main.js +21 -14
- package/desktop/electron/package-lock.json +2 -2
- package/desktop/electron/package.json +1 -1
- package/desktop/electron/window-close.mjs +35 -0
- package/dist/ui/app.css +1 -1
- package/dist/ui/app.js +123 -123
- package/docs/MIGRATION.md +1 -1
- package/package.json +5 -2
- package/server.json +2 -2
- package/src/index.js +15 -1
- package/src/session-manager.js +260 -53
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.4.1] - 2026-11-27
|
|
11
|
+
|
|
12
|
+
**Sessions: four fixes, reported and traced to the line by @nethinwei (#163).**
|
|
13
|
+
They concern the session tools (start a session, send a command) and the Live page; `ssh_execute` is unchanged.
|
|
14
|
+
The first was seen on a bastion that ignores the request to turn echo off; the other three
|
|
15
|
+
show on any server.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **Every command in a session came back as failed on a server that echoes its input.** The engine finds the end of a command by a marker it makes the shell print, and looked for it anywhere in the text: the echoed copy of the line that prints it was found first, so the exit status was unknown (`null`), the command was reported as failed and its output stopped at that line. The marker is now written as separate arguments, so no echo can contain it, and is read only as a whole line. A session also waits for the shell's own answer before it starts, not for the echo of the question, and asks the shell to stop echoing and to drop its prompt.
|
|
20
|
+
- **`cd` and `export` did not update the session's context.** The engine read the working directory while the session was still busy, was refused ("not ready") and kept the old one. It now reads it before the session is ready again, and also after `pushd`, `popd`, `unset` and `source`.
|
|
21
|
+
- **Prompts and terminal escape sequences were in the output, the working directory and the environment**, and `Working Directory` could stay `null`. The environment was also wrong on every server: `PATH`, `USER` and `HOME` were read by splitting on colons, which `PATH` contains. The output of a session command no longer carries colour codes, window titles, carriage returns or a fixed prompt the shell keeps printing. A prompt that changes with the directory, on a shell that ignores `PS1`, cannot be told from output and stays.
|
|
22
|
+
- **A command sent into a session did not show on the Live page or in the history.** Only `ssh_execute` opened the stream the control plane mirrors, so a session command ran, was checked by the policy and audited, and could not be seen. The tool that sends a command into a session now opens it too: the command appears while it runs, its output as it is printed, and its exit status when it ends. With no control plane running, nothing changes.
|
|
23
|
+
|
|
24
|
+
## [4.4.0] - 2026-11-26
|
|
25
|
+
|
|
26
|
+
**A feature release with two interface fixes.** Nothing changes unless you turn the new
|
|
27
|
+
switch on; the interface fixes only affect the desktop app and the browser interface.
|
|
28
|
+
Contributed by @AnA-0823 (the tray switch, the dropdown colours) and @congzhou09 (the
|
|
29
|
+
terminal fix). The Windows installer is still **not Authenticode-signed**, for the same
|
|
30
|
+
reason as 4.0.0: Windows shows *"Windows protected your PC"*, *More info → Run anyway*,
|
|
31
|
+
and `ssh-manager app` checks the installer against the SHA-256 in
|
|
32
|
+
`release-manifest-win32.json`. macOS builds are signed and notarized.
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- **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.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **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.
|
|
41
|
+
- **`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.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- **Interface dependency:** `i18next` 25 to 27 (#168). The interface's languages and the language tool are unchanged.
|
|
46
|
+
|
|
10
47
|
## [4.3.6] - 2026-11-25
|
|
11
48
|
|
|
12
49
|
**A security release: upgrade if an agent runs in a project folder you did not write.**
|
package/Formula/ssh-manager.rb
CHANGED
|
@@ -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.
|
|
17
|
-
sha256 "
|
|
16
|
+
url "https://registry.npmjs.org/mcp-ssh-manager/-/mcp-ssh-manager-4.4.0.tgz"
|
|
17
|
+
sha256 "c9d84858818f0a829ef216ce94d04127a704d1ca6c30de6894c96fe87ce7838c"
|
|
18
18
|
license "MIT"
|
|
19
19
|
|
|
20
20
|
depends_on "node"
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
[](https://github.com/bvisible/mcp-ssh-manager/releases/latest)
|
|
26
26
|
[](https://github.com/bvisible/mcp-ssh-manager/stargazers)
|
|
27
27
|
[](https://mcptoplist.com/server/io.github.bvisible%2Fmcp-ssh-manager)
|
|
28
|
-
[](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.1)
|
|
29
29
|
[](https://claude.ai/code)
|
|
30
30
|
[](https://openai.com/codex)
|
|
31
31
|
[](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.
|
|
61
|
+
**Desktop application (`4.4.1`):** 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.
|
|
63
|
+
installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.1):
|
|
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.
|
|
71
|
+
**Already using npm / the CLI?** `npm update -g mcp-ssh-manager` brings 4.4.1,
|
|
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.
|
|
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,10 @@ 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.1](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.1) — sessions read what the shell answers, and a session command shows on the Live page.** Sending a command into a session reported it as failed on a server that echoes its input (a bastion that ignores the request to turn echo off), kept the old working directory after `cd` and `export`, and returned prompts and escape codes in the output. It now reads the shell's own answer, and the commands you send into a session appear on the Live page and in the history as `ssh_execute` ones do. Reported and traced to the line by @nethinwei (#163).
|
|
726
|
+
|
|
727
|
+
**[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).
|
|
728
|
+
|
|
725
729
|
**[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
730
|
|
|
727
731
|
**[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
|
package/desktop/electron/main.js
CHANGED
|
@@ -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)
|
|
650
|
-
|
|
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
|
|
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
|
-
//
|
|
778
|
-
//
|
|
779
|
-
//
|
|
780
|
-
//
|
|
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
|
-
|
|
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
|
+
"version": "4.4.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "ssh-manager-desktop",
|
|
9
|
-
"version": "4.
|
|
9
|
+
"version": "4.4.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"electron-updater": "^6.8.9",
|
|
@@ -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
|
+
}
|