You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d765019
Browse filesBrowse the repository at this point in the historyBrowse files
feat(remote): open a local WSL distribution as a remote workspace (Refs 1lck/Lithe-IDEA#2231)
remote.connect accepts wsl: { distribution, user? } instead of connection.
Core then runs %SystemRoot%\System32\wsl.exe --distribution <d> [--user <u>]
--cd ~ --exec … in place of OpenSSH; the probe, the checked upload, the
stages and the session are the same as over SSH.
- Transport: the WSL hop validates the user as a Linux login name (at most
32 bytes), is allowed as the first hop only, keeps the Windows environment
wsl.exe needs and sets WSL_UTF8=1. Identity is wsl:[user@]distribution.
- Trust: decisions name the distribution and the account as the first and
only hop; WSL after SSH, WSL after WSL and unknown fields are refused.
- Connection: WSL starts no AskPass session. A wsl.exe that exits before the
server starts is classified from its stable error codes
(WSL_E_DISTRO_NOT_FOUND is unreachable), with its UTF-16 or UTF-8 message
decoded for diagnostics; a silent exit names wsl.exe and the status.
A request naming both connection and wsl, or neither, is invalid_request
with the field, before anything starts.
- remote.listWslDistributions (no payload) runs wsl.exe --list --quiet with
a 15 s bound and returns { available, distributions, diagnostics }: at most
64 names in wsl.exe order, without Docker Desktop's engine distributions
and case-insensitive repeats. Other systems answer unavailable without
running anything.
- Logging: the connection kind wsl, and the cleanup and diagnostics stage
descriptions cover wsl.exe; catalog regenerated.
- Contract: remote.connect's wsl field, its refusals, and the new command.
Tests use a stand-in wsl.exe to run the whole connection, check the
arguments and environment it receives, the UTF-16 failure path and the
listing.
Copy file name to clipboardExpand all lines: rust/contracts/rust-core-api.md
+39-6Lines changed: 39 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -802,9 +802,9 @@ or removing a command fails until the table changes in the same commit.
802
802
| `git.authRespond` | Answer or cancel a live authentication challenge once |
803
803
| `remote.probe` | Check that an SSH connection reaches a supported host |
804
804
| `remote.authRespond` | Answer or cancel a prompt relayed by `remote.probe` or `remote.connect` once |
805
-
| `remote.connect` | Open a connection, installing the shipped server when needed |
805
+
| `remote.connect` | Open a connection over SSH or to a local WSL distribution, installing the shipped server when needed |
806
806
| `remote.readDir` | List a directory over an open remote connection |
807
-
| `remote.disconnect` | Close an open connection and its OpenSSH process tree |
807
+
| `remote.disconnect` | Close an open connection and its OpenSSH or `wsl.exe` process tree |
808
808
| `remote.closeAll` | Close every open connection; the host calls it at application exit |
809
809
| `remote.readFile` | Read a file over an open remote connection |
810
810
| `remote.writeFile` | Save a file over an open remote connection |
@@ -827,6 +827,7 @@ or removing a command fails until the table changes in the same commit.
827
827
| `remote.effectiveSettings` | Tell what OpenSSH makes of a connection and where each value comes from |
828
828
| `remote.sshConfigHosts` | List the Host aliases of the user's SSH configuration for an import |
829
829
| `remote.mottyHosts` | List the SSH hosts saved in Motty for an import |
830
+
| `remote.listWslDistributions` | List the WSL distributions installed on this Windows machine |
830
831
| `git.historyRewritePreview` | Review undo, message edit, squash, or drop with complete messages, eligibility, and an immutable checkout expectation |
FieldMetadata{name:"resumed",field_type:FieldType::Bool,required:false,description:"Whether this connection reattached to an existing persistent session, i.e. a reconnect",reason:None},
1310
1310
FieldMetadata{name:"server_version",field_type:FieldType::Version,required:false,description:"Version the remote server reported in server.hello once the handshake succeeded",reason:None},
1311
1311
FieldMetadata{name:"stage",field_type:FieldType::Token,required:false,description:"Connection step that failed: probe, artifact, deploy, handshake, authentication, network or connect",reason:None},
1312
-
FieldMetadata{name:"transport",field_type:FieldType::Token,required:true,description:"How the client reached the server: ssh, command (any spawned transport chain) or streams (caller-supplied pipes)",reason:None},
1312
+
FieldMetadata{name:"transport",field_type:FieldType::Token,required:true,description:"How the client reached the server: ssh, wsl (a local WSL distribution through wsl.exe), command (any spawned transport chain) or streams (caller-supplied pipes)",reason:None},
FieldMetadata{name:"resumed",field_type:FieldType::Bool,required:false,description:"Whether this connection reattached to an existing persistent session, i.e. a reconnect",reason:None},
1329
1329
FieldMetadata{name:"server_version",field_type:FieldType::Version,required:false,description:"Version the remote server reported in server.hello once the handshake succeeded",reason:None},
1330
1330
FieldMetadata{name:"stage",field_type:FieldType::Token,required:false,description:"Connection step that failed: probe, artifact, deploy, handshake, authentication, network or connect",reason:None},
1331
-
FieldMetadata{name:"transport",field_type:FieldType::Token,required:true,description:"How the client reached the server: ssh, command (any spawned transport chain) or streams (caller-supplied pipes)",reason:None},
1331
+
FieldMetadata{name:"transport",field_type:FieldType::Token,required:true,description:"How the client reached the server: ssh, wsl (a local WSL distribution through wsl.exe), command (any spawned transport chain) or streams (caller-supplied pipes)",reason:None},
FieldMetadata{name:"resumed",field_type:FieldType::Bool,required:false,description:"Whether this connection reattached to an existing persistent session, i.e. a reconnect",reason:None},
1347
1347
FieldMetadata{name:"server_version",field_type:FieldType::Version,required:false,description:"Version the remote server reported in server.hello once the handshake succeeded",reason:None},
1348
1348
FieldMetadata{name:"stage",field_type:FieldType::Token,required:false,description:"Connection step that failed: probe, artifact, deploy, handshake, authentication, network or connect",reason:None},
1349
-
FieldMetadata{name:"transport",field_type:FieldType::Token,required:true,description:"How the client reached the server: ssh, command (any spawned transport chain) or streams (caller-supplied pipes)",reason:None},
1349
+
FieldMetadata{name:"transport",field_type:FieldType::Token,required:true,description:"How the client reached the server: ssh, wsl (a local WSL distribution through wsl.exe), command (any spawned transport chain) or streams (caller-supplied pipes)",reason:None},
FieldMetadata{name:"error",field_type:FieldType::Error,required:true,description:"Stable native, thread, or remote category from ending an owned SSH connection",reason:None},
1492
-
FieldMetadata{name:"stage",field_type:FieldType::Token,required:true,description:"SSH connection cleanup stage, e.g. shutdown, tree-kill, wait, or closer",reason:None},
1491
+
FieldMetadata{name:"error",field_type:FieldType::Error,required:true,description:"Stable native, thread, or remote category from ending an owned ssh or wsl.exe connection",reason:None},
1492
+
FieldMetadata{name:"stage",field_type:FieldType::Token,required:true,description:"Connection cleanup stage of the owned ssh or wsl.exe process, e.g. shutdown, tree-kill, wait, or closer",reason:None},
FieldMetadata{name:"stage",field_type:FieldType::Token,required:true,description:"SSH diagnostic collection stage: reader join or stderr read",reason:None},
1504
+
FieldMetadata{name:"error",field_type:FieldType::Error,required:true,description:"Stable I/O or thread category explaining incomplete ssh or wsl.exe diagnostic evidence",reason:None},
1505
+
FieldMetadata{name:"stage",field_type:FieldType::Token,required:true,description:"Diagnostic collection stage of the ssh or wsl.exe process: reader join or stderr read",reason:None},
0 commit comments