Commit Graph

156 Commits

Author SHA1 Message Date
Evan Simkowitz
902ff9baf1
enable wsh file cross-remote copy/move (#1725)
This adds the ability to stream `tar` archives over channels between
`wsh` instances. The main use cases for this are remote copy and move
operations.

It also completes the `wavefs` implementation of the FileShare interface
to allow copy/move interoperability between wavefiles and other storage
types.

The tar streaming functionality has been broken out into the new
`tarcopy` package for easy reuse.

New `fileshare` functions are added for `CopyInternal`, which allows
copying files internal to a filesystem to bypass the expensive interop
layer, and `MoveInternal`, which does the same for moving a file within
a filesystem. Copying between remotes is now handled by `CopyRemote`,
which accepts the source `FileShareClient` as a parameter. `wsh`
connections use the same implementation for `CopyInternal` and
`CopyRemote` as they need to request the channel on the remote
destination, since we don't offer a way to pass channels as a parameter
to a remote call.

This also adds a recursive `-r` flag to `wsh file rm` to allow for
deleting a directory and all its contents.

S3 support will be addressed in a future PR.

---------

Co-authored-by: sawka <mike@commandline.dev>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-01-31 10:42:39 -08:00
Evan Simkowitz
8bf6755375
Don't attempt to build SIGUSR1 handler for Windows, add it to WSH (#1871) 2025-01-29 12:42:55 -08:00
Evan Simkowitz
50c3710d4b
Update WSH command reference docs (#1865)
Fix formatting errors, update `wsh file` docs
2025-01-28 19:27:02 -08:00
Mike Sawka
5418e5ad24
fail any rpc call which blocks the runServer loop for more than 1s (#1861) 2025-01-27 22:38:19 -08:00
Mike Sawka
02e4bdc1e6
send SIGUSR1 to dump all goroutines (for debugging) (#1860) 2025-01-27 18:01:02 -08:00
Mike Sawka
bba94a62d0
add jwt token back to wsl connections (#1841)
Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2025-01-24 14:24:15 -08:00
Mike Sawka
1913cc5c99
initscript -- support for local files, and overrides in connections.json (#1818) 2025-01-23 15:41:13 -08:00
Evan Simkowitz
50b80a10fd
Add license identifiers to missing files (#1806) 2025-01-22 20:06:36 -08:00
Mike Sawka
ec07b172e5
pull cmd:env and initscripts into wave terminals (#1793) 2025-01-22 16:04:08 -08:00
Evan Simkowitz
286783fb8e
Adjust wsh file help text so it's 80 cols max width (#1795) 2025-01-22 15:39:57 -08:00
Evan Simkowitz
11fec5695c
wsh file overhaul without cross-remote copy and S3 (#1790) 2025-01-22 14:50:09 -08:00
Evan Simkowitz
4fba9e6caa
Default to current connection for wsh conn reinstall (#1782) 2025-01-20 19:49:43 -08:00
Sylvie Crowe
ff5f26709c
WSL Updates for New Architecture (#1756)
This adapts most of the WSL code to follow the new architecture that ssh
uses.

---------

Co-authored-by: sawka <mike@commandline.dev>
2025-01-16 15:54:58 -08:00
Mike Sawka
9dc9066a81
conn updates 5 (#1755)
* token swap
* setting environment variables for different local/remote shells
* bug fixes for init scripts
* more logging
* update connserver startup flow
2025-01-16 11:17:29 -08:00
Sylvie Crowe
c1eacb6d61
fix: set wsh ssh rpc timeout to 60 seconds (#1732)
This is required so connections that require user input give the full 60
seconds for the user to type in a password or passphrase.
2025-01-14 16:17:53 -08:00
Mike Sawka
a24fe750c5
conn updates 4 (#1726) 2025-01-14 14:09:26 -08:00
Sylvie Crowe
99e122d724
RcFileInstall RPC Command (#1720)
Creates an RPC command for installing shell rcfiles instead of relying
on a separate installation session.
2025-01-12 16:31:00 -08:00
Sylvie Crowe
0174e7cd07
RemoteInfo Rpc (#1719)
Adds an Rpc Command for getting RemoteInfo. This is used to replace the
session that was used to determine the shell on remote machines.
2025-01-12 15:22:07 -08:00
Sylvie Crowe
5a7771bf40
Update Wsh Command (#1715)
This adds an RPC command for updating wsh on a remote machine without
starting a new session. It is not being used yet, but will be used for
connections using a single server in the future.
2025-01-10 21:29:06 -08:00
Mike Sawka
ba5f929b3f
conn updates 3 (#1711)
lots of misc connection refactoring / fixes:

* adds blocklogger as a way to writing logging information from the backend directly to the a terminal block
* use blocklogger in conncontroller
* use blocklogger in sshclient
* fix remote name in password prompt
* use sh -c to get around shell weirdness
* remove cmd.exe special cases
* use GetWatcher().GetFullConfig() rather than re-reading the config file
* change order of things we do when establishing a connection.  ask for wsh up front.  then do domain socket, then connserver
* reduce number of sessions required in the common case when wsh is already installed.  running the connserver is now a "multi-command" which checks if it is installed, then asks for the version
* send jwt token over stdin instead of in initial command string
* fix focus bug for frontend conn modal
* track more information in connstatus
* simplify wshinstall function
* add nowshreason
* other misc cleanup
2025-01-10 14:09:32 -08:00
Evan Simkowitz
b51ff834b2
Happy new year! (#1684)
Update all 2024 references to 2025
2025-01-04 20:56:57 -08:00
Mike Sawka
4fd6d36d8e
conn updates 2 (#1660)
* use pwsh over powershell if installed (on windows) for default shell
* refactor blockcontroller.DoRunShellCommand into a "setup" and "manage" phase
* fix wshcmd-conn to also disconnect wsl connections
* new genconn interfaces to make a standardized environment to run SSH/WSL commands via `sh -c`.  also create better quoting functions that are composable
* replace html/template with text/template for shell command templating (avoids special chars getting turned into HTML entities, breaking the commands)
* do not reinstall wsh if the installed version has a higher version (prevents flip-flopping on shared systems)
* simplify clientOs/clientArch detection.  use `uname -sm`.  also validate the os/arch combo as compatible with our builds.
* replace CpHostToRemote with CpWshToRemote. hard codes wsh paths inside of the function instead of having them passed in (quoting restrictions)
* new SyncBuffer class to use with commands that properly synchronizes Writes/String output
* fix setTermSize to actually update DB with terminal size
2025-01-02 14:15:32 -08:00
Mike Sawka
fe91d167b6
fix all panichandlers for the new format (inline recover()) (#1659) 2024-12-31 09:31:55 -08:00
Sylvie Crowe
7d0fb0391f
Improved Shell Detection (#1658)
Use the SHELL environment variable instead of the /etc/passwd file for
determining the shell on Linux.
2024-12-30 22:18:56 -08:00
Mike Sawka
b59e9e95bd
conn updates (more consistency) (#1657) 2024-12-30 17:11:50 -08:00
Mike Sawka
9521e1d51b
correctly escape backslashes in wsh setbg. fixes windows paths #1604 (#1636) 2024-12-27 09:37:44 -08:00
Sylvie Crowe
b17e613d74
fix: add leading slash to default remote shell (#1596)
Adds a leading slash to `/bin/bash` as the default shell if no other
shell has been found
2024-12-20 13:51:32 -08:00
Evan Simkowitz
0a3dadb628
Add wsh wavepath command for getting Wave paths (#1545) 2024-12-17 14:11:40 -08:00
Mike Sawka
4fccd71227
minor docs fixups (consistency) (#1480) 2024-12-10 18:03:48 -08:00
Mike Sawka
ff459743cd
v10 docs / release notes (#1467) 2024-12-10 12:43:38 -08:00
Mike Sawka
7386fc19f7
activity update + dont allow empty workspace names (#1393) 2024-12-05 10:35:54 -08:00
Mike Sawka
942eeaa8e9
wsh setbg + updated tab background docs (#1394) 2024-12-05 10:27:08 -08:00
Mike Sawka
72f36a9639
wsh run (#1376)
implements `wsh run` command.  lots of fixes (and new options) for command blocks.  cleans up the UX/UI for command blocks.  lots of bug fixes for blockcontrollers.  other minor bug fixes.

also makes editor:* vars into settings override atoms.
2024-12-04 14:16:50 -08:00
Evan Simkowitz
7e49e14977
Fix initialdata bug (#1365)
There was a bug in main-server where we were returning Window from
EnsureInitialData and then overwriting the layout on the active tab. The
return values from this function are unclear. Some of the initial data
was being set in the wcore.EnsureInitialData and some was being set in
main, so I've moved all the logic into EnsureInitialData and now it just
returns error.
2024-12-02 11:44:08 -08:00
Evan Simkowitz
82f53dc1fb
Workspaces are back! (#1282) 2024-12-02 10:56:56 -08:00
Sylvie Crowe
24103213aa
SSH without using WSH (#1355) 2024-11-27 16:52:00 -08:00
Mike Sawka
c37d292224
fix newlines with wsh getvar. (#1349)
output a newline when running in a tty and don't output a newline when
running out of a tty.
add options -n and -N to override that behavior
2024-11-25 18:12:24 -08:00
Mike Sawka
b6ce2cd022
misc v0.9.3 fixes -- numToString, block counts, fix docsite images/video (#1354) 2024-11-25 18:07:29 -08:00
Mike Sawka
3136291140
temp oid in client (can use with wavefile) (#1329) 2024-11-20 18:48:46 -08:00
Mike Sawka
360964d4ba
panic handlers everywhere (#1327) 2024-11-20 18:05:13 -08:00
Mike Sawka
271d8e2e9c
wsh getva, setvar, and file commands (#1317) 2024-11-19 17:20:47 -08:00
Mike Sawka
784bc89588
allow resolving 'ws' and 'client' as blockids (#1316) 2024-11-18 10:27:23 -08:00
Mike Sawka
1210313d2b
activity updates (#1302) 2024-11-15 16:09:26 -08:00
Mike Sawka
c4d7779003
wsh ai file attachments -- renderer in waveai (#1281) 2024-11-14 16:20:33 -08:00
Mike Sawka
dcb38dd64e
release notes and more docs for v0.9.2 (#1270) 2024-11-11 18:26:21 -08:00
Mike Sawka
045405aa5e
new wsh ai command (#1257) 2024-11-08 16:34:50 -08:00
Mike Sawka
2c055b56d0
new resolver formats (tab:N), and also make the structure of the resolvers much more robust (#1254) 2024-11-08 15:48:54 -08:00
Mike Sawka
c34a5912e7
return clientid in WaveInfoData, print for wsh version -v (#1252) 2024-11-08 14:19:56 -08:00
Mike Sawka
d5297cc5d4
wsh editconfig (#1243) 2024-11-08 11:08:52 -08:00
Mike Sawka
8c17269c88
wsh getmeta updates (easier to get/transfer metadata using cli) (#1241) 2024-11-08 10:48:40 -08:00