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 edd0933
Browse filesBrowse the repository at this point in the historyBrowse files
feat(remote): keep or end host programs when a connection closes (Refs 1lck/Lithe-IDEA#2231) (#160)
* feat(remote): keep or end host programs when a connection closes (Refs 1lck/Lithe-IDEA#2231)
- remote.connect starts the persistent server session (--connect <key>,
--state-dir <installRoot>) and returns sessionKey, sessionToken, resumed
and keptPrograms; resume { key, token } attaches to a kept session, and a
refused token connects once more with a new session.
- server.keep: only programs the user chose to keep outlast the idle
timeout; attaching clears an earlier keep, so a crashed client's programs
end after ten minutes.
- remote.disconnect takes programs: end|keep and returns { closed, kept }.
- remote.runningPrograms and remote.endPrograms list and end what a host
session still runs.
- closePrograms preference (ask|end|keep, automatic asks) with closing in
remote.preferences.
- remote.session.state_failed log event; protocol and Core API docs.
* feat(remote): end only the listed programs; a closed connection's cleanup is expected (Refs 1lck/Lithe-IDEA#2231)
remote.endPrograms takes an optional programs list ([{kind, id}] as
remote.runningPrograms listed them), so a client that reconnected to a
kept session ends what it listed without hanging up a terminal it
started meanwhile. Resource cleanup that finds the connection already
closed (after server.keep or a loss) no longer logs WARN, as the
session's own cleanup already treats it.
* feat(remote): report the host session's idle timeout with the closing choice (Refs 1lck/Lithe-IDEA#2231)
remote.preferences now reports closing.idleTimeoutSeconds, the server's default idle timeout, so the Remote Workspace settings page shows the value the host applies instead of a copy. The constant moves to protocol::methods so the client and the server share it.
Copy file name to clipboardExpand all lines: rust/contracts/rust-core-api.md
+51-9Lines changed: 51 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -804,7 +804,7 @@ or removing a command fails until the table changes in the same commit.
804
804
| `remote.authRespond` | Answer or cancel a prompt relayed by `remote.probe` or `remote.connect` once |
805
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 or `wsl.exe` process tree |
807
+
| `remote.disconnect` | Close an open connection and its OpenSSH or `wsl.exe` process tree, ending or keeping the programs it runs on the host |
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 |
@@ -831,7 +831,9 @@ or removing a command fails until the table changes in the same commit.
831
831
| `remote.mottyHosts` | List the SSH hosts saved in Motty for an import |
832
832
| `remote.listWslDistributions` | List the WSL distributions installed on this Windows machine |
833
833
| `remote.preferences` | Read the remote workspace settings and what each automatic value resolves to |
834
-
| `remote.editPreferences` | Set the SSH program, the reconnect limit or whether reverse forwards are allowed, or make one automatic again |
834
+
| `remote.editPreferences` | Set the SSH program, the reconnect limit, whether reverse forwards are allowed or what closing a connection does to its programs, or make one automatic again |
835
+
| `remote.runningPrograms` | List the processes and terminals a connection's host session still runs |
836
+
| `remote.endPrograms` | End every process and terminal a connection's host session runs, or the listed ones |
835
837
| `git.historyRewritePreview` | Review undo, message edit, squash, or drop with complete messages, eligibility, and an immutable checkout expectation |
| `remote.runningPrograms` | `{ sessionId }` | `{ programs: [{ kind, id, argv, label, runningMs }] }`, processes first; `kind` is `process` or `terminal`, `label` the one the program started with or `null` |
6108
+
| `remote.endPrograms` | `{ sessionId, programs? }` | `{ ended }`: every running process gets `SIGTERM` for its process session and every terminal hangs up, or only those `programs` (`[{ kind, id }]` as `remote.runningPrograms` listed them) names; one that ended in the meantime or is not running is not counted, one that ignores the signal is still listed |
6067
6109
6068
6110
`remote.writeFile` replaces the file atomically on the host. With
6069
6111
`expected` (`{ size, modifiedMs }` from the read) a changed file is a
0 commit comments