@akms/mcp-ssh 0.1.6 → 0.1.8

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 ADDED
@@ -0,0 +1,242 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@akms/mcp-ssh`. Dates are `YYYY-MM-DD`.
4
+
5
+ ## 0.1.8 — 2026-10-19
6
+
7
+ ### Added
8
+
9
+ - Add **Copy to another client** to each saved entry's config menu. Choose Claude Code,
10
+ Codex, Claude Desktop or Cursor to copy its name, command, arguments and complete
11
+ environment without changing the source or switching the current client.
12
+ - Ask before overwriting any same-name destination entry, including another package or
13
+ HTTP transport. The default is No; Esc returns to the destination picker.
14
+
15
+ ### Fixed
16
+
17
+ - Validate complete TOML before and after edits. Recognize inline/dotted server names,
18
+ quoted keys and multiline values; refuse layouts that cannot be edited without
19
+ changing unrelated settings. Preserve all string environment values when copying.
20
+ - Write JSON and TOML configs through a flushed temporary file and a single rename.
21
+ Partial writes and failed commits keep the original; concurrent changes observed
22
+ before committing abort the save. New config files use owner-only permissions.
23
+ - Detect destination names even when the entry cannot be listed as a stdio server.
24
+ Reject malformed JSON server maps instead of replacing their contents.
25
+ - Replace the complete destination Codex server table when copying, removing stale
26
+ transport options while keeping unrelated settings. Ordinary edits still preserve
27
+ hand-written options.
28
+ - Restore the complete previous Claude Code entry if its replacement fails, and report
29
+ recovery failures accurately. Missing-CLI messages no longer print credentials.
30
+
31
+ ### Documentation
32
+
33
+ - Document the copy menu, overwrite confirmation and copied fields in the README.
34
+
35
+ ### Verification
36
+
37
+ - Cover cross-client copying, name conflicts, cancellation, EOF, unreadable destinations,
38
+ source preservation, TOML replacement and Claude Code CLI rollback.
39
+ - Reproduce multiline-string corruption, missed inline-name collisions, lost env keys,
40
+ partial disk writes, failed renames and concurrent file changes.
41
+
42
+ ## 0.1.7 — 2026-10-19
43
+
44
+ ### Fixed
45
+
46
+ - Keep connection check results visible in interactive `config` until Enter is pressed,
47
+ instead of immediately redrawing the menu and scrolling the report out of view.
48
+ Esc goes back and Ctrl+C exits; scripted input needs no additional answer.
49
+
50
+ ### Added
51
+
52
+ - Animate checks in `config` and `--check` with a spinner and elapsed time for each phase:
53
+ SSH preparation, the jump host or proxy (when configured), and the target handshake and authentication.
54
+ Completed phases remain visible with success or failure markers and colors.
55
+ - Fit progress lines to the terminal width, use ASCII on legacy Windows consoles, and
56
+ respect `NO_COLOR`. Redirected output and `TERM=dumb` keep plain reports.
57
+
58
+ ### Documentation
59
+
60
+ - Include `CHANGELOG.md` in the npm package and document the check display in the README.
61
+
62
+ ### Library API
63
+
64
+ - `SshConnection.connect(onProgress?)` can report the `transport` and `host` phases of a new connection attempt.
65
+
66
+ ### Verification
67
+
68
+ - Cover report pauses, cancellation, progress timing and cleanup, narrow terminals, and
69
+ phase transitions on successful and failed checks.
70
+
71
+ ## 0.1.6 — 2026-10-13
72
+
73
+ ### Fixed
74
+
75
+ - Never stay behind when the MCP client dies. The first log line written after stdin ends goes to
76
+ a stderr nobody reads; that EPIPE is now absorbed once and logging stops for good, instead of
77
+ being logged again (the loop that kept `@akms/mcp-db` 0.1.1 alive at 100% CPU). Shutdown also
78
+ has a 5 s deadline (`SHUTDOWN_DEADLINE_MS`) after which the process exits regardless.
79
+ - Keep the server running through an uncaught exception or unhandled rejection raised by one
80
+ session instead of taking every tool of the client down; both are logged.
81
+
82
+ ### Changed
83
+
84
+ - The `mcp server ready on stdio` log line carries the process `pid`.
85
+
86
+ ### Verification
87
+
88
+ - Add `tests/cli-shutdown.test.ts`: starts the server through `cmd /c` the way Claude Code does
89
+ on Windows, completes the handshake, lets the client die, and expects the server gone within 5 s.
90
+
91
+ ## 0.1.5 — 2026-10-13
92
+
93
+ ### Changed
94
+
95
+ - **Breaking:** Use `akms-mcp-ssh config` as the only configuration command. The former
96
+ `setup` command now exits with code 1 and a reminder to use `config`.
97
+ - Align CLI help, usage examples and developer documentation with `config`.
98
+
99
+ ### Verification
100
+
101
+ - Add CLI regression tests for help, `config --target codex`, rejecting `setup`, and
102
+ the `--check` guidance when no host is configured. Tests use temporary client settings.
103
+
104
+ ## 0.1.4 — 2026-10-13
105
+
106
+ ### Documentation
107
+
108
+ - Expand the `setup` guide with keyboard controls, Esc behavior, the legacy `config`
109
+ alias, and reconnecting the MCP client after saving.
110
+ - Document release version synchronization across the package files and `SERVER_VERSION`,
111
+ plus tests, build, CLI smoke checks and package inspection before publishing.
112
+ - Clarify the test suite's local network requirements and its coverage of form navigation
113
+ and text editing. Runtime behavior is unchanged.
114
+
115
+ ## 0.1.3 — 2026-10-11
116
+
117
+ ### Changed
118
+
119
+ - **The host manager is `akms-mcp-ssh setup`.** `config` still opens it, so the name used
120
+ in 0.1.0 – 0.1.2 keeps working, but it is no longer listed in `--help`.
121
+
122
+ ### Fixed
123
+
124
+ - **Esc goes back one level everywhere in `setup`.** Inside the settings form, Esc in a
125
+ choice list (authentication, route, private key), a text field or a secret returns to the
126
+ form with the setting unchanged — including the follow-up a choice opened, so Esc at the
127
+ jump-host question also restores the route. Esc at the "Write it?" preview reopens the form
128
+ on the same values. Before, a list opened from the form ignored Esc, and a text field never
129
+ saw it: on macOS / Linux the terminal handed the `ESC` byte over as part of the value.
130
+ - Text fields on a terminal are now a small line editor in raw mode (←/→, Home/End,
131
+ Backspace/Delete, Ctrl+U), which is what makes Esc visible there.
132
+
133
+ ## 0.1.2 — 2026-10-11
134
+
135
+ ### Changed
136
+
137
+ - **Adding or editing a host opens a settings form** instead of a sequence of questions.
138
+ Every setting is listed with its value; pick one to change it, in any order, as often as
139
+ needed. The cursor then moves to the next setting, so Enter down the list still fills the
140
+ form top to bottom. Settings a choice brings with it (the private key, the jump host) appear
141
+ under it once chosen, empty required settings are marked, and Save moves to the first
142
+ missing one. Test the connection and Save sit below the settings; Save offers a test when
143
+ the values changed since the last one. On a terminal the form redraws in place.
144
+
145
+ ## 0.1.1 — 2026-10-11
146
+
147
+ ### Changed
148
+
149
+ - **`config` menus are arrow-key lists.** Options are picked with ↑/↓ and Enter instead of
150
+ typing a keyword (`claude-code`, `password`, a menu letter). The hosts are the main menu:
151
+ pick one to edit, check, print or remove it. The private key is chosen from the keys found
152
+ in `~/.ssh`, and the route is one choice (directly / jump host / proxy command / both)
153
+ instead of two yes/no questions. Answered prompts collapse to one `✔ question · answer`
154
+ line. Without a terminal (a pipe, Git Bash's mintty) the lists are numbered instead.
155
+
156
+ ## 0.1.0 — 2026-10-11
157
+
158
+ ### Added
159
+
160
+ - **`akms-mcp-ssh config`** — an interactive manager for the hosts registered in an MCP
161
+ client's config: list, add, edit, remove, check, print, switch client. It asks plain
162
+ questions instead of `SSH_*` names, tests the connection, offers to pin the host key, and
163
+ writes the entry. Targets Claude Code (user scope, through `claude mcp`), Codex
164
+ (`~/.codex/config.toml`), Claude Desktop and Cursor. `--target <client>` picks one.
165
+ - **Jump host** — `SSH_JUMP_HOST` (with `SSH_JUMP_PORT` / `SSH_JUMP_USER` / `SSH_JUMP_KEY`
166
+ / `SSH_JUMP_PASSPHRASE` / `SSH_JUMP_PASSWORD` / `SSH_JUMP_HOST_KEY`) connects to a
167
+ bastion first and reaches the target over a forwarded TCP channel, as `ssh -J` does.
168
+ User and key default to the target's.
169
+ - **Proxy command** — `SSH_PROXY_COMMAND` runs a command and speaks SSH over its
170
+ stdin/stdout, as OpenSSH's `ProxyCommand` does; `%h` / `%p` / `%r` expand to the first
171
+ hop. It carries the jump host when both are set, so "cloudflared to the bastion, then
172
+ forward to the target" is one entry.
173
+ - A `SSH_JUMP_*` variable set without `SSH_JUMP_HOST` aborts startup, like every other
174
+ half-formed value.
175
+ - `ssh_list_hosts` shows the route; `--check` prints it along with the jump host's key
176
+ fingerprint.
177
+
178
+ ### Changed
179
+
180
+ - `--check` now lets warnings and errors through instead of silencing the log entirely,
181
+ so a missing key file or the proxy command's stderr (a `cloudflared` login prompt) is
182
+ visible where the operator is looking. An explicit `SSH_MCP_LOG_LEVEL` still wins.
183
+
184
+ ### Library API
185
+
186
+ - `SshHostProfile` gains `proxyCommand` and `jump` (`SshJumpProfile`); `SshHostSummary`
187
+ gains `viaProxyCommand` and `jump`.
188
+ - `SshConnection.jumpHostKeyFingerprint`.
189
+ - `loadHostProfile(env?)` reads from the given record instead of `process.env` when one
190
+ is passed.
191
+
192
+ ## 0.0.3 — 2026-09-28
193
+
194
+ - `package.json` declares `repository`, `homepage` and `bugs` pointing at
195
+ `github.com/alkemic-studio/npm.akms.mcp-ssh`.
196
+
197
+ ## 0.0.2 — 2026-08-09
198
+
199
+ First release to reach the registry. `0.0.1` was built but never published, so the
200
+ configuration surface listed under **Removed** never actually shipped — it is recorded
201
+ here because the code carried it right up to this version.
202
+
203
+ ### Changed
204
+
205
+ - **Configuration is environment variables only.** A host is declared with plain `SSH_*`
206
+ variables in the MCP client's own server entry — one entry per host. "What is this
207
+ server allowed to do" is now answerable by reading that entry, with no second file to
208
+ find and no precedence order to reason about.
209
+ - Fronting several hosts means several server entries, each carrying its own connection
210
+ and its own guard policy, declared where you read it.
211
+ - `--check` reports the one configured host instead of iterating profiles.
212
+
213
+ ### Removed
214
+
215
+ - Every config-file source: the `--config <path>` flag, `SSH_MCP_CONFIG`,
216
+ `~/.akms-ssh.json` and `~/.config/akms-ssh/config.json` — along with the `defaults`
217
+ block, the `hosts` map and the zod schema that validated them.
218
+ - The `target` argument on every tool. With one host there is nothing to select, so the
219
+ model cannot name a machine even in principle.
220
+ - `ssh_reload_config`. Environment variables are fixed for the life of the process, so
221
+ applying a change means restarting the server.
222
+ - `privateKey` (inline key contents), `passphraseEnv` and `passwordEnv`. `SSH_KEY` takes a
223
+ path and `SSH_PASSPHRASE` / `SSH_PASSWORD` are themselves environment variables, so the
224
+ indirection had nothing left to point at.
225
+ - The protected-local-path rule for `.akms-ssh.json`. The files that define the guards are
226
+ now the MCP client configurations (`.mcp.json`, `.claude*`,
227
+ `claude_desktop_config.json`), which stay protected.
228
+
229
+ ### Library API
230
+
231
+ - `loadConfig(path?)` → `loadHostProfile()`, returning `SshHostProfile | null`.
232
+ - `createSshMcpServer(options?)` → `createSshMcpServer()`. The instance exposes `profile`
233
+ instead of `config`, and `reloadConfig()` is gone.
234
+ - Dropped the `SshMcpConfig` and `SshMcpServerOptions` types and the `POLICY_INPUT_SCHEMA`
235
+ / `HOST_INPUT_SCHEMA` / `CONFIG_INPUT_SCHEMA` exports.
236
+
237
+ ### Unchanged
238
+
239
+ The guards. Catastrophe rules, `SSH_READONLY`, `SSH_ALLOW_SUDO`, `SSH_ALLOW_COMMANDS`,
240
+ `SSH_DENY_PATTERNS` and `SSH_ALLOWED_PATHS` screen exactly what they did before, at the
241
+ same chokepoint inside `SshConnection.exec` and the SFTP operations. A malformed value
242
+ still aborts startup rather than being ignored.