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/ROADMAP-V4.md ADDED
@@ -0,0 +1,451 @@
1
+ # v4 — the control plane
2
+
3
+ **Branch: `v4`.** Everything here is additive. A user who installs v4 and changes
4
+ nothing gets v3 behaviour, byte for byte. That constraint is not negotiable: this
5
+ package has external users, and the whole point is that the new surface is opt-in.
6
+
7
+ ## The idea
8
+
9
+ v3 is an SSH engine an agent talks to. It already holds the pieces of a control
10
+ plane — per-server security modes, an append-only audit log, tunnels, sessions,
11
+ keys, groups — but they are invisible: configured through environment variables,
12
+ observed by reading a file.
13
+
14
+ v4 makes them usable, and adds the one thing missing: **the ability to stop an
15
+ action and ask a human.**
16
+
17
+ The engine stays MIT, headless, installable with `npm` alone. The interface is
18
+ optional and never required for the engine to run.
19
+
20
+ ## Status
21
+
22
+ | Piece | State |
23
+ |---|---|
24
+ | **Encrypted vault** (`src/secret-store.js`) | **done** — AES-256-GCM, key in the OS keychain with a file fallback |
25
+ | **`ssh-manager vault`** (`cli/vault.js`) | **done** — list, add, remove, import, status |
26
+ | Loader integration | **done** — vault sits above files, below the process environment |
27
+ | **Approval broker** (`src/approval.js`) | **done** — pause an action, ask a human, deny on any failure |
28
+ | **Control plane** (`src/control-plane.js`, `cli/control.js`) | **done** — approval queue + timeline, no dependency |
29
+ | **Homebrew formula** (`Formula/ssh-manager.rb`) | **done** — kept current by the release workflow |
30
+ | **Desktop app** (`desktop/`) | **done** — native macOS window, 104 KB |
31
+ | **Live command streaming** (`src/live-stream.js`) | **done** — watch the agent work, as it happens |
32
+ | **Server health** | **done** — on-demand probes, never in the background |
33
+ | **Options** (groups, host keys, tunnels) | **done** |
34
+ | **Skills** (`skills/`) | **done** — three, shipped with the package |
35
+ | **Interactive terminal** | **done** — a real shell in the browser, no native module in the engine; the desktop build adds one on *this* machine |
36
+
37
+ ## Done: the vault
38
+
39
+ The only way to give a server a password used to be clear text in a `.env`. Now:
40
+
41
+ ```bash
42
+ ssh-manager vault import # copy what you already have, encrypted
43
+ ssh-manager vault list # see it, without ever printing a secret
44
+ ssh-manager vault add prod # add one interactively
45
+ ssh-manager vault status # where the vault and its key live
46
+ ```
47
+
48
+ Decisions worth keeping:
49
+
50
+ - **Only secret values are encrypted.** Hosts, users, ports and modes stay
51
+ readable, because hiding them buys nothing and makes the file impossible to
52
+ reason about or diff.
53
+ - **GCM, not CBC.** Authenticated: a tampered vault throws instead of returning a
54
+ wrong password that would then be sent to a production server.
55
+ - **Listing never unlocks.** Asking "which servers exist" must not trigger a
56
+ keychain prompt.
57
+ - **`SSH_MANAGER_KEY_SOURCE=file`** skips the keychain, for CI, containers and
58
+ plain SSH logins with no desktop session.
59
+ - **A corrupt vault never blocks the other sources.** `.env` and TOML still load.
60
+
61
+ ## Done: the approval broker
62
+
63
+ It went in where predicted — inside `applyServerPolicy()`, the single choke point
64
+ all sixteen handlers already call, and which was already `async`. No handler
65
+ signature changed.
66
+
67
+ ```env
68
+ SSH_SERVER_PROD_APPROVAL=destructive # never (default) | destructive | always
69
+ ```
70
+
71
+ Protocol: one JSON object per line over a local stream socket. The engine writes
72
+ a request and waits for a reply carrying the same `id`, so a control plane is
73
+ implementable in any language and debuggable with `nc`.
74
+
75
+ ```json
76
+ {"id":"…","server":"prod","host":"…","tool":"ssh_execute",
77
+ "command":"rm -rf /var/www","destructive":true,"args":{…}}
78
+ {"id":"…","decision":"deny","reason":"not tonight"}
79
+ ```
80
+
81
+ Rules that matter more than the happy path:
82
+
83
+ - **Every failure denies.** Timeout, unreachable socket, connection dropped
84
+ mid-review, unreadable reply, or a reply carrying the wrong `id` — all refuse.
85
+ The one exception is *approval configured but nothing listening*: that allows
86
+ and says so loudly in the audit log, because failing shut would break every
87
+ agent the moment the UI is closed.
88
+ - **The deadline is not optional.** `SSH_MANAGER_APPROVAL_TIMEOUT_MS`, 120s by
89
+ default. A crashed control plane fails one action, never the session.
90
+ - **No secret leaves the engine.** The request carries the same sanitized view
91
+ the audit log records — one redaction implementation, not two that drift.
92
+ - **The destructive list is deliberately short.** A prompt that cries wolf gets
93
+ clicked through without reading, which is worse than no prompt at all.
94
+
95
+ Found while testing end to end, both now guarded:
96
+
97
+ - The `approval` field existed in the module but was never parsed by the config
98
+ loader. Every unit test passed because they built the config object directly.
99
+ Only driving the real MCP server caught it.
100
+ - A Unix socket path over 104 bytes fails `bind()` with **EADDRINUSE on a path
101
+ where nothing is listening** — an hour of confusion. `isControlPlaneListening`
102
+ now checks the length and says what is wrong.
103
+
104
+ ## Done: the control plane
105
+
106
+ ```bash
107
+ ssh-manager control # prints a tokenised localhost URL, runs in the foreground
108
+ ```
109
+
110
+ Seven screens: **your servers** (add, edit, delete — the vault behind a form),
111
+ **what is waiting for you**, **server health**, **what your agents are doing right
112
+ now**, **what they did**, **a real shell**, and **options**.
113
+
114
+ No SFTP browser, and the terminal is deliberately the sixth tab rather than the
115
+ first: a control plane that *opens* on a terminal is just a late SSH client, and
116
+ that market has an incumbent with nine months' head start. The order says what
117
+ the product is for — you come here to see what the agent is doing, and the
118
+ keyboard is there for when watching is not enough.
119
+
120
+ Not an Electron app, and **no new dependency**: Node's `http` and `net` plus one
121
+ HTML file. It therefore runs anywhere the engine runs, including on a server
122
+ reached through the tunnels this project already manages, and it can be wrapped
123
+ in a desktop shell later without rewriting anything.
124
+
125
+ ### The token is not decoration
126
+
127
+ This process approves root shell commands, and an unauthenticated HTTP server on
128
+ localhost is reachable by every process on the machine **and by any web page the
129
+ user has open** — a page can POST to 127.0.0.1. Without a secret, a visited
130
+ website could approve an agent's `rm -rf`. Hence, all tested:
131
+
132
+ - a random token on every request, compared in constant time;
133
+ - the `Host` header must be a loopback literal, which is what stops DNS
134
+ rebinding (a hostile domain resolving to 127.0.0.1);
135
+ - the listener binds `127.0.0.1`, never `0.0.0.0`;
136
+ - the page is served `no-store` under a CSP of `default-src 'none'`, and loads
137
+ nothing from the network.
138
+
139
+ ### Managing servers from the page
140
+
141
+ The vault is editable from the browser, not only the CLI — both drive the same
142
+ `SecretStore`, so they cannot disagree about what is stored.
143
+
144
+ - **A secret never travels to the page.** Listing returns `hasPassword: true`,
145
+ never the value. The form cannot display one, so it does not ask for one back:
146
+ editing a port keeps the stored password rather than wiping it.
147
+ - **Deleting takes two clicks** on the same button, not a `confirm()` dialog — a
148
+ browser modal freezes the automation this page is tested with, and the second
149
+ click is enough friction. The armed state lasts 10 seconds, long enough to
150
+ actually read which row it belongs to.
151
+ - Names are validated server-side (`[a-z0-9_]+`), because a name is the vault
152
+ key and a bad one is a second entry rather than an error.
153
+
154
+ ### Behaviours that matter
155
+
156
+ - **Closing the control plane refuses what is pending** rather than leaving
157
+ agents to hit their own timeouts.
158
+ - **Deciding twice returns 409** instead of writing to a closed socket — two
159
+ browser tabs, two clicks.
160
+ - **The timeline follows the audit log**, so it shows actions that never needed
161
+ approval, and survives a malformed line.
162
+ - The engine giving up first removes the entry, so the UI never offers a
163
+ decision nobody is waiting for.
164
+
165
+ Found by the test: an audit file that is empty when the control plane starts had
166
+ its offset left unset, so every later line was skipped as history.
167
+
168
+ ## Done: Homebrew
169
+
170
+ ```bash
171
+ brew tap bvisible/mcp-ssh-manager https://github.com/bvisible/mcp-ssh-manager
172
+ brew install ssh-manager
173
+ ```
174
+
175
+ The formula installs the **same npm package**, so `brew` and `npm install -g`
176
+ give identical binaries. There is no separate desktop build to keep in step: the
177
+ vault, the approval broker and the control plane all live in the engine.
178
+
179
+ It sits in this repository rather than a separate tap, so it is updated in the
180
+ same commit as the release that changes it — and the release workflow rewrites
181
+ its `url` and `sha256` automatically. A formula pinning a stale version is worse
182
+ than no formula at all: `brew install` would quietly hand people the previous
183
+ release.
184
+
185
+ Its `test do` block does a real MCP stdio handshake rather than checking
186
+ `--version`, because a formula that only proves the binary exists proves nothing
187
+ about whether the package works.
188
+
189
+ > A short `brew install bvisible/tap/ssh-manager` would need a separate
190
+ > `bvisible/homebrew-tap` repository. Worth doing if the formula gets traction;
191
+ > not worth a second repository to maintain before then.
192
+
193
+ ## Done: the desktop app
194
+
195
+ ```bash
196
+ ./desktop/build.sh # produces desktop/build/SSH Manager.app
197
+ ```
198
+
199
+ A real window: dock icon, double-click, no terminal. It starts
200
+ `ssh-manager control` as a child process, reads the tokenised URL from its
201
+ output, and shows that page in a `WKWebView`.
202
+
203
+ **Not Electron.** What has to be displayed is one HTML page the engine already
204
+ serves over localhost; Electron's runtime alone is 19 MB before any application
205
+ code, and a packaged app is well past a hundred. This bundle is **100 KB** and
206
+ ships no browser of its own — one Swift file, `swiftc`, and a hand-assembled
207
+ bundle, so there is no Xcode project and no package manager in the way.
208
+
209
+ The trade-off is honest: **macOS only**. Elsewhere `ssh-manager control` opens
210
+ the same interface in the browser. A Windows and Linux shell would need a
211
+ different toolkit, and is not worth building before the app proves useful.
212
+
213
+ Details that matter more than they look:
214
+
215
+ - **A GUI app launched from Finder does not inherit your shell's PATH**, so
216
+ `node` and `ssh-manager` are invisible to it. The app searches the usual
217
+ install locations and, failing that, asks your login shell — which is how it
218
+ finds anything nvm, asdf or volta set up.
219
+ - **`SSH_MANAGER_CLI` overrides which CLI is launched.** Found the hard way: this
220
+ machine had an older global install that predated the `control` command, so
221
+ the app dutifully started the wrong binary.
222
+ - **Quitting kills the child.** It holds the approval socket; leaving it running
223
+ would keep agents blocked on a UI nobody can see.
224
+
225
+ ## Done: watching the agent work
226
+
227
+ A fourth screen — **Live** — showing what agents are running while they run it,
228
+ output included. This is the thing no command line can offer, and the reason to
229
+ have a window at all.
230
+
231
+ ```
232
+ prod tail -f /var/log/app/deploy.log running
233
+ [08:14:04] step 14/14 — deploying release 2026.08.29
234
+ warning: 2 stale releases left on disk
235
+ ```
236
+
237
+ **The scrollback idea comes from TransHub's PtyService** — a bounded circular
238
+ buffer per stream, so a window opened mid-command shows what came before rather
239
+ than starting blank. Same author, relicensed here under MIT with the rest of the
240
+ engine.
241
+
242
+ Two rules the module may never break, both tested:
243
+
244
+ - **Nobody watching costs nothing.** No socket → `openStream()` returns null,
245
+ every call site optional-chains it away, and the command runs exactly as it
246
+ did before. One `stat()` per command is the entire overhead.
247
+ - **A watcher can never break or slow a command.** Fire-and-forget writes, a
248
+ subscriber that throws is contained, and the control plane vanishing
249
+ mid-command does not throw into the execution path.
250
+
251
+ A **second socket**, next to the approval one: approval is a request/response
252
+ that blocks a command, streaming is a one-way firehose. Sharing one socket would
253
+ let a slow reader of the firehose delay a decision.
254
+
255
+ ### What was deliberately not here, and then was
256
+
257
+ This section used to say: no PTY, no xterm.js — a PTY is a different code path
258
+ and xterm.js is a dependency and a bundle. Half of that was wrong, and worth
259
+ recording rather than quietly deleting.
260
+
261
+ **The PTY was never a dependency.** `ssh2` allocates the remote pseudo-terminal
262
+ itself: `client.shell({ term: 'xterm-256color', cols, rows })` asks the far side
263
+ for a terminal, which is what makes colours, `top`, `vim`, Ctrl-C and resizing
264
+ work. Nothing is compiled, nothing is installed. The native module people
265
+ associate with the word — `node-pty` — is for spawning a *local* shell.
266
+
267
+ **Which the desktop application now does**, and that is where node-pty lives:
268
+ in `desktop/electron`, never in the engine. It ships N-API prebuilds, so even
269
+ there nothing is compiled — Electron loads them as they are. The engine's
270
+ dependency list is still what it was, and an npm install still needs no
271
+ compiler; it simply has no local shell, and the interface asks before offering
272
+ one. The boundary is a function, `setLocalShellProvider`, which is also how it
273
+ is tested without the module.
274
+
275
+ **xterm.js was a real cost**, and it is the one we paid: 477 KB, vendored under
276
+ `vendor/xterm/` with its MIT licence, loaded only by the control plane. The
277
+ engine's dependency list is unchanged.
278
+
279
+ ## Done: server health
280
+
281
+ A fifth screen. Press the button, get CPU, memory, disk and uptime per machine,
282
+ with a gauge that turns amber past 80% and red past 90%.
283
+
284
+ **Nothing is probed in the background.** Each probe is an SSH handshake, and a
285
+ control plane that connects to every production box on a timer is worse than no
286
+ dashboard: it is a machine quietly opening sessions nobody asked for. The button
287
+ is the whole scheduling policy.
288
+
289
+ Almost none of this was new code — `buildComprehensiveHealthCheckCommand()` and
290
+ `parseComprehensiveHealthCheck()` already existed for the `ssh_health_check`
291
+ tool. The control plane opens its own connection (it holds the vault, so it has
292
+ the credentials) and closes it immediately after.
293
+
294
+ Two things the tests pinned down:
295
+
296
+ - **Unreachable is a result, not an error.** It returns HTTP 200 with the reason
297
+ and how long it took, because "prod did not answer" is exactly what an
298
+ operator opened the screen to find out.
299
+ - **Probes run in parallel**, asserted by comparing two servers against one. A
300
+ dashboard over ten machines would otherwise take ten timeouts.
301
+
302
+ And one real fix the test forced: `readyTimeout` was hard-coded at 60 seconds,
303
+ so checking two unreachable servers took a full minute. Callers can now shorten
304
+ it, and the probe uses 8 seconds — a machine that has not answered by then is
305
+ unreachable as far as a screen is concerned.
306
+
307
+ ## Done: the options screen
308
+
309
+ Groups and known host keys, both of which live in files this process can read.
310
+
311
+ **Forgetting a host key** is the one action here, and it earns its place: when a
312
+ machine is rebuilt its host key changes, every connection then fails, and the
313
+ fix is deleting a line from `~/.ssh/known_hosts` identified by a number in an
314
+ error message. Two clicks, like deleting a server — silencing a
315
+ machine-in-the-middle warning should not be one slip.
316
+
317
+ ### Tunnels, and how they got here
318
+
319
+ `tunnel-manager.js` keeps open tunnels in a `Map` inside the MCP server's
320
+ process, which the control plane cannot see. The fix is a published state file:
321
+ the engine writes `~/.ssh-manager/tunnels.json` whenever a tunnel opens or
322
+ closes, and the control plane reads it.
323
+
324
+ **The file carries the writing process's pid**, and a reader checks that pid is
325
+ alive before believing the contents. Without it, an engine that crashed would
326
+ leave a file claiming ports are forwarded when nothing is listening — telling an
327
+ operator a tunnel is open when it is not is worse than showing no tunnels at all.
328
+ A stale file is reported as stale, never rendered as open.
329
+
330
+ Publishing is best-effort and swallows its own errors: it is a convenience for a
331
+ window, and must never take down a tunnel that is working. No file is written at
332
+ all when there are no tunnels — an empty file and a missing one mean the same
333
+ thing, and removing it stops a dead pid lingering on disk.
334
+
335
+ ### A security bug found while wiring it
336
+
337
+ `removeHostKey()` ran `ssh-keygen -R "${hostEntry}"` **through a shell**, with
338
+ `host` coming from a server config — which an operator, or the control plane's
339
+ own form, can set to anything. Same class as the three advisories fixed on
340
+ 2026-08-28, in a file that fix never touched. Now `execFileSync` with arguments
341
+ passed directly, and guarded in the injection test.
342
+
343
+ It also always returned `true`: `ssh-keygen -R` succeeds whether or not the host
344
+ was there, so the control plane would have told an operator it forgot a key that
345
+ is still in the file. It now checks first and answers honestly.
346
+
347
+ ## Done: skills
348
+
349
+ Three, shipped with the npm package, covering what an agent cannot infer from a
350
+ tool description because it is judgement rather than syntax:
351
+
352
+ | Skill | Fires on |
353
+ |---|---|
354
+ | `ssh-operations` | deploying, backing up, restarting, running commands |
355
+ | `ssh-incident` | "the server is down", "the site is slow" |
356
+ | `ssh-restricted` | a tool was refused — security modes and approval |
357
+
358
+ They are short on purpose. A skill that reads like a manual gets skimmed, which
359
+ defeats writing it; each says the few things that change what an agent does —
360
+ look before you change, back up before you overwrite, read the log before
361
+ restarting, and treat a refusal as the system working rather than an obstacle to
362
+ route around.
363
+
364
+ `ssh-restricted` is the one that matters most for this project: it tells an agent
365
+ not to retry a blocked action through `ssh_execute`, not to hop to a less
366
+ constrained server, and not to ask the operator to turn the mode off. Working
367
+ around a control someone deliberately configured is worse than failing the task,
368
+ because they will believe it held.
369
+
370
+ Guarded by `npm run test:skills`. Prose type-checks against nothing, so the test
371
+ does it: front matter loadable and matching the directory, descriptions that say
372
+ *when* rather than *what*, **every `ssh_*` tool named actually registered** (the
373
+ failure being a skill sending an agent at a renamed tool), and a length ceiling
374
+ so they do not grow into manuals.
375
+
376
+ ## Done: the interactive terminal
377
+
378
+ The Live screen answers *what is it doing*. It does not answer *let me fix this
379
+ myself*. The Terminal screen does: pick a server, open a shell, type.
380
+
381
+ ```
382
+ POST /api/terminal open a shell → { id }
383
+ GET /api/terminal/stream output, SSE, base64
384
+ POST /api/terminal/input keystrokes, base64
385
+ POST /api/terminal/resize cols/rows → SSH window-change
386
+ DELETE /api/terminal close and release the connection
387
+ ```
388
+
389
+ Output is base64 on the way out and keystrokes base64 on the way in, because
390
+ terminal traffic is **bytes, not text**: escape sequences and half-delivered
391
+ UTF-8 do not survive a round trip through a JSON string.
392
+
393
+ **Not subject to readonly/restricted mode.** Those modes exist to constrain an
394
+ *agent*. Whoever holds the control-plane token is the operator who configured
395
+ them and already holds the credentials; stopping them here would be theatre, and
396
+ theatre in a security feature is worse than nothing because it gets believed.
397
+
398
+ ### What driving it found that reading it would not
399
+
400
+ - **Output printed before anyone subscribed was lost** — which is exactly the
401
+ login banner and the first prompt, so the screen opened blank. Now a bounded
402
+ 64 KB backlog, replayed on subscribe.
403
+ - **The `<link>` and `<script>` tags carried no token**, so both assets were
404
+ refused 401 and the terminal rendered as a blank box. A tag cannot add a header
405
+ before the browser fetches it, so the token is stamped into the URLs when the
406
+ page is served.
407
+ - **The server picker was never filled** — the screen could not be used at all.
408
+ - **An over-long socket path reports `EADDRINUSE`**, on a socket file that is not
409
+ there, for a process that does not exist. `sun_path` is 104 bytes on macOS and
410
+ a repo under a long path passes it easily. Checked before binding now, with the
411
+ byte count in the message.
412
+ - **`/favicon.ico` logged a 401 on every load.** Inlined as a data URI: the
413
+ request stops happening.
414
+
415
+ Tested against a real SSH server rather than a mock — `ssh2` can be a server, so
416
+ `npm run test:terminal` starts one, generates a host key, and asserts a PTY is
417
+ genuinely requested with the right size, that keystrokes arrive, that a resize is
418
+ forwarded, and that closing releases the connection instead of leaking it.
419
+
420
+ ## Non-negotiables
421
+
422
+ 1. `npm install mcp-ssh-manager` keeps working with no vault, no UI, no socket.
423
+ 2. No new runtime dependency in the engine for any of this.
424
+ 3. Every credential path stays covered by the injection and redaction tests.
425
+ 4. The engine never requires the interface. The arrow only points one way.
426
+
427
+ ## The name
428
+
429
+ `mcp-ssh-manager` is the **package** name and does not change. 461 stars, 4165
430
+ downloads a month, an entry in the official MCP registry as
431
+ `io.github.bvisible/mcp-ssh-manager`, and — the part that actually matters —
432
+ every installed MCP configuration on someone's machine holds a path that
433
+ contains it. Renaming an npm package does not rename anything: it creates a
434
+ second package and turns the first into a wreck that search engines keep
435
+ serving for years.
436
+
437
+ **SSH Manager** is the **product** name, which is free to differ and already
438
+ does: it is what the desktop application is called in its bundle.
439
+
440
+ Two names for two audiences is not a compromise, it is the normal arrangement —
441
+ the package name is an address, the product name is what you say out loud.
442
+
443
+ What was considered and rejected: *SSH Manager & MCP*. An `&` cannot be typed
444
+ or spoken, and the name would describe a list of components rather than what the
445
+ thing does. MCP is the protocol an agent speaks to reach it — an implementation
446
+ detail from the operator's side, not a feature.
447
+
448
+ The line under the name is where the differentiation belongs, because that is
449
+ what decides whether somebody clicks: **you give your agents a shell, and you
450
+ see what they do with it.** Netcatty has the terminal; nobody else has the
451
+ watching.
@@ -0,0 +1,43 @@
1
+ # Brand
2
+
3
+ | File | What it is |
4
+ |---|---|
5
+ | `wordmark.svg` | The logo: **ssh** solid, **manager** outlined. Supplied, not derived. |
6
+ | `icon.svg` | The app icon — the mark on its tile. Everything else is generated from this. |
7
+ | `mark.svg` | The mark alone, no tile, `currentColor` for the white parts. |
8
+
9
+ ## The icon
10
+
11
+ `>_` and the mark of what types into it. The four-pointed sparks come from
12
+ [icons8](https://icons8.com), which is where the shape of "AI" is currently
13
+ agreed.
14
+
15
+ **The chevron carries the accent, not the sparks.** The product is an SSH
16
+ manager first — that is what the wordmark says — and an icon that argues with
17
+ its own logo is an icon nobody trusts. The sparks are white: present, not
18
+ shouting.
19
+
20
+ **Stroke 34.** Thinner reads better at 512px and starts to vanish at 16, and a
21
+ favicon that resolves to a dot is one shape short of a mark. This is the
22
+ thinnest weight that survives a browser tab.
23
+
24
+ **The sparks sit above the baseline.** The rising diagonal from chevron to spark
25
+ is what gives the mark its movement; level with the prompt, a spark reads as
26
+ another character in it rather than as something it produced.
27
+
28
+ **Centred as a whole, measured rather than estimated.** The drawing is 392×192
29
+ inside 512, with 60px left and right and 160px top and bottom. A round stroke
30
+ cap and a curved star both extend past the coordinates they are drawn from — the
31
+ mark sat 95px from one edge and 3px from the other until somebody measured it in
32
+ a canvas.
33
+
34
+ ## Regenerating
35
+
36
+ ```bash
37
+ qlmanage -t -s 1024 -o /tmp brand/icon.svg # → PNG for electron-builder
38
+ cp /tmp/icon.svg.png desktop/electron/resources/icon.png
39
+ ```
40
+
41
+ The favicon in `ui/index.html` is the same SVG inlined as a data URI: the
42
+ browser asks for `/favicon.ico` without the control plane's token and would be
43
+ refused, so there is no request to make.
package/brand/icon.svg ADDED
@@ -0,0 +1,32 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="SSH Manager">
2
+ <title>SSH Manager</title>
3
+ <!--
4
+ The prompt and the spark: `>_` and the mark of what types into it.
5
+
6
+ The chevron carries the accent because the product is an SSH manager first —
7
+ that is what the wordmark says, and an icon arguing with its own logo is an
8
+ icon nobody trusts. The sparks are white: present, not shouting.
9
+
10
+ Stroke 34, not thinner. Below about 28 the bar starts to vanish at 16px, and
11
+ a favicon that resolves to a dot is one shape short of a mark.
12
+
13
+ The sparks sit above the baseline: the rising diagonal from chevron to spark
14
+ is what gives the mark its movement, and a spark level with the prompt reads
15
+ as another character in it rather than as something it produced.
16
+ -->
17
+ <rect width="512" height="512" rx="114" fill="#090909"/>
18
+ <!-- Centred as a whole: the drawing measures 392×192 and sits with 60px of
19
+ margin left and right, 160px top and bottom. Measured in a canvas rather
20
+ than estimated — a round stroke cap and a curved star both extend past
21
+ the coordinates they are drawn from, and the mark was 95px from one edge
22
+ and 3px from the other before anybody checked. -->
23
+ <g transform="translate(-35 19)">
24
+ <path d="M112 164 L200 240 L112 316" fill="none" stroke="#c04500" stroke-width="34"
25
+ stroke-linecap="round" stroke-linejoin="round"/>
26
+ <path d="M228 316 L318 316" stroke="#fcfcfc" stroke-width="30" stroke-linecap="round"/>
27
+ <g transform="translate(318 136) scale(5.8)" fill="#fcfcfc">
28
+ <path d="M14.217,19.707l-1.112,2.547c-0.427,0.979-1.782,0.979-2.21,0l-1.112-2.547c-0.99-2.267-2.771-4.071-4.993-5.057 L1.73,13.292c-0.973-0.432-0.973-1.848,0-2.28l2.965-1.316C6.974,8.684,8.787,6.813,9.76,4.47l1.126-2.714 c0.418-1.007,1.81-1.007,2.228,0L14.24,4.47c0.973,2.344,2.786,4.215,5.065,5.226l2.965,1.316c0.973,0.432,0.973,1.848,0,2.28 l-3.061,1.359C16.988,15.637,15.206,17.441,14.217,19.707z"/>
29
+ <path d="M24.481,27.796l-0.339,0.777c-0.248,0.569-1.036,0.569-1.284,0l-0.339-0.777c-0.604-1.385-1.693-2.488-3.051-3.092 l-1.044-0.464c-0.565-0.251-0.565-1.072,0-1.323l0.986-0.438c1.393-0.619,2.501-1.763,3.095-3.195l0.348-0.84 c0.243-0.585,1.052-0.585,1.294,0l0.348,0.84c0.594,1.432,1.702,2.576,3.095,3.195l0.986,0.438c0.565,0.251,0.565,1.072,0,1.323 l-1.044,0.464C26.174,25.308,25.085,26.411,24.481,27.796z"/>
30
+ </g>
31
+ </g>
32
+ </svg>
package/brand/mark.svg ADDED
@@ -0,0 +1,18 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="SSH Manager">
2
+ <title>SSH Manager</title>
3
+ <!-- The mark alone, for a surface that is not the app tile. -->
4
+ <!-- Centred as a whole: the drawing measures 392×192 and sits with 60px of
5
+ margin left and right, 160px top and bottom. Measured in a canvas rather
6
+ than estimated — a round stroke cap and a curved star both extend past
7
+ the coordinates they are drawn from, and the mark was 95px from one edge
8
+ and 3px from the other before anybody checked. -->
9
+ <g transform="translate(-35 19)">
10
+ <path d="M112 164 L200 240 L112 316" fill="none" stroke="#c04500" stroke-width="34"
11
+ stroke-linecap="round" stroke-linejoin="round"/>
12
+ <path d="M228 316 L318 316" stroke="currentColor" stroke-width="30" stroke-linecap="round"/>
13
+ <g transform="translate(318 136) scale(5.8)" fill="currentColor">
14
+ <path d="M14.217,19.707l-1.112,2.547c-0.427,0.979-1.782,0.979-2.21,0l-1.112-2.547c-0.99-2.267-2.771-4.071-4.993-5.057 L1.73,13.292c-0.973-0.432-0.973-1.848,0-2.28l2.965-1.316C6.974,8.684,8.787,6.813,9.76,4.47l1.126-2.714 c0.418-1.007,1.81-1.007,2.228,0L14.24,4.47c0.973,2.344,2.786,4.215,5.065,5.226l2.965,1.316c0.973,0.432,0.973,1.848,0,2.28 l-3.061,1.359C16.988,15.637,15.206,17.441,14.217,19.707z"/>
15
+ <path d="M24.481,27.796l-0.339,0.777c-0.248,0.569-1.036,0.569-1.284,0l-0.339-0.777c-0.604-1.385-1.693-2.488-3.051-3.092 l-1.044-0.464c-0.565-0.251-0.565-1.072,0-1.323l0.986-0.438c1.393-0.619,2.501-1.763,3.095-3.195l0.348-0.84 c0.243-0.585,1.052-0.585,1.294,0l0.348,0.84c0.594,1.432,1.702,2.576,3.095,3.195l0.986,0.438c0.565,0.251,0.565,1.072,0,1.323 l-1.044,0.464C26.174,25.308,25.085,26.411,24.481,27.796z"/>
16
+ </g>
17
+ </g>
18
+ </svg>