Commit Graph

462 Commits

Author SHA1 Message Date
Evan Simkowitz
209647f343
Handle integer overflow cases in shellquote (#1822)
Resolves CodeQL warnings
2025-01-23 18:18:44 -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
965ed288f8
Remove fileshare logs (#1814) 2025-01-23 12:38:55 -08:00
Evan Simkowitz
9406967edd
Fix offset regression in wshremote (#1807)
Co-authored-by: sawka <mike@commandline.dev>
2025-01-22 22:24:35 -08:00
Evan Simkowitz
50b80a10fd
Add license identifiers to missing files (#1806) 2025-01-22 20:06:36 -08:00
Evan Simkowitz
68c8c4e156
Fix tilde paths (#1801) 2025-01-22 17:59:11 -08:00
Evan Simkowitz
689b2d63c2
Revert my cheeky change (#1799) 2025-01-22 17:50:50 -08:00
Evan Simkowitz
a98242138d
Fix windows path for wsh url (#1798) 2025-01-22 17:28:59 -08:00
Mike Sawka
ec07b172e5
pull cmd:env and initscripts into wave terminals (#1793) 2025-01-22 16:04:08 -08:00
Evan Simkowitz
11fec5695c
wsh file overhaul without cross-remote copy and S3 (#1790) 2025-01-22 14:50:09 -08:00
Sylvie Crowe
385d01148c
Add Option to Ignore SSH Config File (#1788)
This provides a new configuration option that will turn off the ssh
config parsing. It also removes the flag required to override the ssh
config values with internal json values
2025-01-21 19:04:21 -08:00
Sylvie Crowe
4ad7b99251
Known Hosts User Input Fix (#1778)
This handles ambiguous cases where the context that determines the block
id of a command is not provided.
2025-01-20 14:38:40 -08:00
Mike Sawka
d81b6b85c0
longer timeout to read wsh version (2FA prompts) (#1776) 2025-01-20 14:06:37 -08:00
Yacoub
bcd0ec8a0b
fileMode-fix for issue #1694 Windows bug (#1710) 2025-01-18 11:21:15 -08:00
Sylvie Crowe
ad3113e46e
Wshless Connections in Wsl (#1769)
This makes it possible to disable wsh for WSL connections. While this is
not recommended, it brings the code closer to the SSH connection
implementation and will make it easier to consolidate the two in the
future.
2025-01-17 18:28:46 -08:00
Evan Simkowitz
f35375ee1a
Fix openai regression (#1758)
this impacts custom openai providers, not wave proxy
2025-01-16 18:02:18 -08:00
Mike Sawka
1cd1744317
remove two calls to conn.Connect() (#1757) 2025-01-16 17:32:41 -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
Evan Simkowitz
56b8e98b5b
Honor SSH IdentitiesOnly config (#1742)
Skip SSH Agent client initialization if the IdentitiesOnly config is set
for a given host

For now, we only need to support this for the SSH Agent, but if we ever
add support for PKCS11Provider or SecurityKeyProvider, we'll need to
update this check to also ignore those.

See https://man.openbsd.org/ssh_config#IdentitiesOnly
2025-01-15 20:47:15 -08:00
Evan Simkowitz
68a88857cb
Check for wildcard/conditional host patterns in ~/.ssh/config before normalizing for connections dropdown (#1743) 2025-01-15 20:34:42 -08:00
Sylvie Crowe
e555eaa765
Limit User Input Modal to One Window (#1730)
When a connection request is made from a block, only ask for user input
in the window that made the request.
2025-01-15 18:55:12 -08:00
Mike Sawka
07d07472db
move genconn quote, and getshelltype to shellutil (#1731) 2025-01-14 15:29:36 -08:00
Mike Sawka
a24fe750c5
conn updates 4 (#1726) 2025-01-14 14:09:26 -08:00
Sylvie Crowe
a44a1a4b4b
Remove Old Prototype Plot (#1721)
Removes obsolete plot widget from a prototype version of the app.
2025-01-13 11:55:04 -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
37929d90c1
Simplify regex and fix tests for pamparse (#1712)
Simplifies the regex so it doesn't have as many negations.

Adds an option to pass the `/etc/passwd` values needed for pamparse so
that we can mock them for the tests. Also allows us to only grab those
values once at launch, since they shouldn't change.
2025-01-10 13:53:24 -08:00
Evan Simkowitz
a39b3ca480
Simplify logging for XDG override (#1709) 2025-01-10 11:20:45 -08:00
Evan Simkowitz
9ff430bbd7
Better XDG directory variable fix for Snap (#1701)
This fix will overwrite the XDG variables when creating a shell session
and only if the installation is Snap (as determined by the presence of
the `$SNAP` environment variable). It also will parse the user's PAM
files, if present, to ensure that if the XDG variables were set there,
they're restored. Otherwise, if the variables are set in an RC or
profile file, we'll already pick it up when the shell starts.

closes #1696

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-01-10 11:06:15 -08:00
Sylvie Crowe
a3cbcc5a77
Widget Config Magnify (#1689)
Introduces a configuration option to widgets to allow them to magnify on
startup.
2025-01-08 15:02:55 -08:00
Sylvie Crowe
cee698bbeb
fix: default en_US.UTF-8 if lang has problems (#1687)
Mac's `defaults read -g AppleLocale` command can return locales that
don't have a language in /usr/share/locale. This prevents those locales
from using a language with UTF-8 support. This will use en_US.UTF-8 as a
default to cover those cases if there are problems. As per usual, if
LANG is already set, that value will be used instead.
2025-01-07 11:47:40 -08:00
Mike Sawka
55f03730bc
add term:allowbracketedpaste, default false (#1688) 2025-01-07 10:55:26 -08:00
Evan Simkowitz
b51ff834b2
Happy new year! (#1684)
Update all 2024 references to 2025
2025-01-04 20:56:57 -08:00
Sylvie Crowe
e388128010
fix: nil dereference in nowsh error messages (#1673)
This showed up when the domain socket request failed but the connection
request did not. With this fixed, this case correctly enters nowsh mode.
2025-01-02 16:02:27 -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
Sylvie Crowe
6c53eb884a
fix: remove context from wsl connection struct (#1663)
This fixes a WSL bug where disconnecting the controller does not allow
the controller to restart until the app reboots.
2025-01-02 13:05:28 -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
91a54442b7
implement web:hidenav (#1639), and file:/// urls (#1638) (#1645) 2024-12-30 16:51:00 -08:00
Sylvie Crowe
2590ad037d
fix: more robust processor checks (#1656)
This ensures invalid architectures cannot have wsh installed. This
includes validating the output of `uname -m` and PROCESSOR_ARCHITECTURE
2024-12-30 16:12:14 -08:00
Mohammed Zaid R Nadaf
a1f26ba455
window-dimensions and zoom crash fixed (#1652)
fixed issue #1613 partially, 

added window:dimensions as a setting which gives the user to define
dimensions.

fixed the zoom in and out logic to prevent the app from crashing.

Had issues with getting setting zoomfactor in emain-tabview.ts. will fix
it
2024-12-30 07:57:59 -08:00
Yacoub
0890475a60
Deleting current workspace switches to another instead of closing [ backend implementation ] (#1623)
I did not mean to close the previous pr, anyway i tried to implement
what you suggested, the backend now does most of it
and DeleteWorkspace will return an unclaimed id and avoid closing the
window.

```go 
        const moveToNewWorkspace = await WorkspaceService.DeleteWorkspace(workspaceId) 
        console.log("delete-workspace done", workspaceId, ww?.waveWindowId);
        if (ww?.workspaceId == workspaceId){
            if ( workspaceList?.length > 1 ) {
                   await ww.switchWorkspace(moveToNewWorkspace)
            } else {
                    console.log("delete-workspace closing window", workspaceId, ww?.waveWindowId);
                    ww.destroy();
            }
        }
    });
```


![unknown_2024 12 26-17
05](https://github.com/user-attachments/assets/9c8455e5-b71c-479d-a15c-ee5c99c7a909)
![unknown_2024 12 26-17
06](https://github.com/user-attachments/assets/5dbf63bc-1ffd-4088-abc0-7c02fac9af94)

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-12-29 09:58:29 -08:00
Evan Simkowitz
6de98ac3fb
Remove fatals, don't know why I added these (#1642) 2024-12-27 17:39:42 -05:00
Evan Simkowitz
93b9432f99
Add support for Google AI models (#1612) 2024-12-27 14:52:38 -05:00
Sylvie Crowe
0c9f35791d
fix: do not error out if ssh config is empty (#1632)
As connections can now be stored in the internal connection, a missing
or invalid ssh config should not cause the entire list of connections to
be empty. This change ignores the error from the ssh config and proceeds
to construct the list without it.
2024-12-26 22:52:47 -08:00
Mike Sawka
904d942c4c
fix remote file stream function (#1620) 2024-12-26 10:23:28 -08:00