@@ -816,6 +816,8 @@ or removing a command fails until the table changes in the same commit.
816816| `remote.hostInfo` | Return cached handshake capabilities of one connection |
817817| `remote.workspaceTrust` | Read remote workspace trust decisions and one open workspace's trust |
818818| `remote.editWorkspaceTrust` | Record or remove one remote workspace trust decision |
819+ | `remote.connections` | Read the SSH connections the user saved |
820+ | `remote.editConnections` | Save, remove or record a folder on one saved SSH connection |
819821| `git.historyRewritePreview` | Review undo, message edit, squash, or drop with complete messages, eligibility, and an immutable checkout expectation |
820822| `git.remotes` | Return configured fetch remote names and URLs |
821823| `git.tags` | Return tag names, tag object IDs, target IDs, dates, and annotations |
@@ -5661,10 +5663,28 @@ place.
56615663
56625664`remote.probe` checks a saved SSH connection before a remote workspace is
56635665opened. The request is `{ connection: { host, port?, user?, authentication?,
5664- identityFile?, connectTimeoutSeconds?, keepAliveSeconds? } }`; unknown fields,
5665- including any password, are rejected. `authentication` is `auto` (default),
5666- `agent`, `privateKey` (requires `identityFile`), or `password`. `host` is a
5667- name, address, or SSH configuration alias without a user.
5666+ identityFile?, proxyJump?, connectTimeoutSeconds?, keepAliveSeconds? } }`;
5667+ unknown fields, including any password, are rejected. `authentication` is
5668+ `auto` (default), `agent`, `privateKey` (requires `identityFile`), or
5669+ `password`. `host` is a name, address, or SSH configuration alias without a
5670+ user. Text fields are trimmed and empty optional fields dropped first;
5671+ `identityFile` is dropped unless `authentication` is `privateKey`. Then:
5672+
5673+ | Field | Accepted |
5674+ | --- | --- |
5675+ | `host` | 1 to 1024 bytes of ASCII letters, digits and `._-:%`, not starting with `-` |
5676+ | `port` | 1 to 65535; absent keeps the SSH configuration's port |
5677+ | `user` | at most 1024 bytes of ASCII letters, digits and `._-`, starting with a letter, digit or `_` |
5678+ | `identityFile` | at most 1024 bytes, no control characters; quoted for OpenSSH when it has spaces |
5679+ | `proxyJump` | `none`, or comma-separated `[user@]host[:port]`; absent keeps the SSH configuration's jump hosts |
5680+ | `connectTimeoutSeconds` | 1 to 600; absent is 15 |
5681+ | `keepAliveSeconds` | 1 to 3600; absent keeps the transport's default |
5682+
5683+ A refused connection is `invalid_request` whose `details` is the JSON
5684+ `{ field, reason }`, where `reason` is `required`, `invalid` or `tooLong`.
5685+ Every field becomes an allowlisted SSH option; options that run a local
5686+ command, such as `ProxyCommand`, are only read from the user's own SSH
5687+ configuration.
56685688
56695689Core runs the system `ssh` with the probe of
56705690[`remote-workspace-protocol-v1`](remote-workspace-protocol-v1.md)'s bootstrap
@@ -5689,7 +5709,7 @@ The result is `{ status, host, diagnostics }`:
56895709`host` is `{ system, machine, homeDirectory, serverTarget }` from `uname -s`,
56905710`uname -m` and `$HOME`; `serverTarget` is the server's Rust target or `null`.
56915711`diagnostics` is the redacted end of OpenSSH's standard error (at most
5692- 4 KiB). A malformed connection is `invalid_request`, a missing `ssh` is
5712+ 4 KiB). A malformed connection is `invalid_request` as above , a missing `ssh` is
56935713`runtime_missing`, and cancellation or the five-minute bound are `cancelled`
56945714and `timed_out`.
56955715
@@ -5698,6 +5718,48 @@ and `timed_out`.
56985718`diskTotalBytes` and `diskAvailableBytes` (the file system holding `$HOME`),
56995719and `uptimeSeconds`.
57005720
5721+ #### Saved connections
5722+
5723+ The connection window lists the SSH connections the user saved. Native
5724+ clients keep them in one machine-local document, read it, and publish the
5725+ `document` an edit returns atomically, as for the trust decisions; Core
5726+ validates the document and applies every edit.
5727+
5728+ `remote.connections` accepts `{ document: string|null }` and returns
5729+ `{ connections, storage: { relativePath: "remote/connections.json",
5730+ maximumBytes: 262144 } }`. `connections` is the list in the user's order;
5731+ each entry is `{ id, name, connection, recentFolders? }`, where `connection`
5732+ is the object `remote.probe` takes and `recentFolders` holds at most 10
5733+ normalized absolute host paths, most recent first.
5734+
5735+ `remote.editConnections` accepts `{ document }` with exactly one of:
5736+
5737+ - `save: { id?, name, connection }` normalizes and checks the connection,
5738+ then adds an entry with a new id or replaces the entry `id` in place.
5739+ `name` is trimmed, 1 to 128 characters without control characters, and
5740+ unique among the entries regardless of case. Replacing an entry with
5741+ another `host`, `port`, `user` or `proxyJump` clears its recent folders,
5742+ which belong to the target and not to the name.
5743+ - `remove: { id }` removes the entry; an absent id changes nothing.
5744+ - `rememberFolder: { id, path }` moves `path` to the front of the entry's
5745+ recent folders and keeps 10.
5746+
5747+ The result is `{ changed, document: string|null, connections, id? }`; `id`
5748+ names the entry a save wrote. An unchanged edit returns a `null` document and
5749+ must not create a source. Requests never carry a secret: a password field is
5750+ an unknown field and is rejected.
5751+
5752+ Bounds: 256 KiB per document and 128 entries. A document that cannot be
5753+ decoded, has duplicate keys, unknown fields, another version, a malformed
5754+ entry, or an id or name used twice is `parse_failed`; a malformed request or a
5755+ refused edit is `invalid_request`. Both carry `details` as the JSON
5756+ `{ field, reason }`, where `reason` is `required`, `invalid`, `tooLong`,
5757+ `duplicate`, `full` (128 entries) or `unknown` (no entry has the id).
5758+
5759+ Native clients keep the document below their platform user-preference
5760+ directory, never on a host, in a workspace or in an installed package. This
5761+ user-settings resource does not affect code signatures or update deltas.
5762+
57015763#### Remote connections that stay open
57025764
57035765`remote.connect` takes `{ connection, servers: [{ target, path }],
0 commit comments