* fix error logs in scws
* new RpcFollowUpPacketType
* make the rpc/followup handlers generic on the server side -- using new RpcHandlers map and RpcFollowUpPacketType
* rpcinputpacket for passing user input back through to reinit command
* add WAVETERM_DEV env var in dev mode
* remove unused code, ensure mshell and rcfile directory on startup (prevent root clobber with sudo)
* combine all feinput into one function msh.HandleFeInput, and add a new concept of input sinks for special cases (like reinit)
* allow reset to accept user input (to get around interactive initialization problems)
* tone down the selection background highlight color on dark mode. easier to read selected text
* fix command focus and done focus issues with dynamic (non-run) commands
* add 'module' as a 'rtnstate' command (#478)
* reinitialize shells in parallel, fix timeouts, better error messages
* reset command now initiates and completes async so there is feedback that something is happening when it takes a long time
* switch from standard rpc to rpciter
* checkpoint on reinit -- stream output, stats packet, logging to cmd pty, new endBytes for EOF
* make generic versions of endbytes scanner and channel output funcs
* update bash to use more modern state parsing (tricks learned from zsh)
* verbose mode, fix stats output message
* add a diff when verbose mode is on
* checkpoint. track zmodloads, get the expanded PS1 value, change how we store and deal with 'prompt vars', add commands to track k8s context
* fix some warnings, change IsPVar to IsExtVar, checkpoint
* parse zmodloads into state
* restore zmodloads, be more careful around readonly variable setting to avoid errors
* datepicker. add electron-rebuild sa dev dependency
* comments
* use <If> component for conditional renders
* invoke callback on month change
* individual inputs for date parts
* keyboard support for input
* more on keyboard support
* dynamic setting of input width based on their text value
* remove error if fromts is out of range
* format is optional
* undo electron-rebuild
* init
* model
* pass model
* increase snap threshold
* move saving of state to model. backend implementation
* fix wrong clientdata prop
* right header space for right sidebar toggles
* button component refactor
* set default classname to primary
* remove debugging code
* hide trigger for now
* disable right sidebar in production (only show on dev for now)
* remove two unused packet types, remove unused detatched command code
* CmdStart is invalid in this command loop
* slight refactor, remove closure funcs
* pass rct through to 'handle' funcs
* deal with rct (running command), update handler funcs accordingly
* update for runningcmdtype to be a pointer in the map (for updates)
* lots of changes related to ephemeral commands (for sync), checkpoint
* fix ephemeral setting
* sync shell state when you switch to a new tab
We use AppleLocale to get the desired language when running on macos.
Unfortunately, if a region is set, the locale is not equivalent to the
LANG environment variable. It appends an extra region field that we did
not previously filter out. This change ensures that it will be filtered
out when present.
* first pass of slash commands
* added mainview slashcommand
* added focus cmd input, added sleep
* addressed review comments
* addressed feedback
* demo idea of changing hide do cmd+m, can remove if we decide we don't like it
* added new keybinding for minimize
* addressed feedback
* added hide label
* fix hide (use app.hid(), not window.hide()
* fix history keybinding, make mainview command consistent
* fix: set golbal ssh config to correct path
This adds the missing "etc" directory to the path for the global config
file.
* chore: update auth mode tooltip
This just changes the text to be slightly more accurate to the current
behavior.
* feat: add box to disable waveshell install modal
This hooks in to the existing don't show this again code that pops up
when creating a modal.
* refactor: remove install modal in remote creation
There used to be a modal that popped up while installing a remote that
informed the user that waveshell gets installed on their remote. Since
we have a new modal that pops up at the time of install, the older modal
can be removed.
* fix: allow user to cancel ssh dial
The new ssh code broke dial for invalid urls since the context did not
cancel the dial or any associated user input. This change reconnects
the context along with the context for installing waveshell.
* style: widen the rconndetail modal
The rconndetail modal is currently narrower than the xtermjs element
which results in awkward scrolling if a line is long. This change makes
the width auto so it can size itself as needed.
* add a max-width for safety
* Unify color definitions and clean up light mode
* consolidate form colors
* increase border thickness on dropdown and text
* remove dev conditional for theme
* fix secondary form element color
* increase dropdown border thickness
* fix history textinput
* make warning a bit darker
* attempt to fix rotate icons
* fix line actions bg
* fix terminal colors
* fix broken history colors
* fix textinput label padding
* fix bottom negative margin
* updates for prompt colors. darken magenta, grey out the whites slightly, and sneak in a change for git co.
* clean up prompt.tsx
* fixing wobbly icons
* center svg icon, simplify meta-line1
* checkpoint some ideas on a new branch
* checkpoint on new errors / errorcode passing
* get CodedError piped all the way through to infomsg
* implement a /reset:cwd command to deal with cases when the cwd is invalid. other assorted debugging, utility, and fixups
* on invalid cwd, show message to run /reset:cwd
* fix: allow ssh user to use numbers/capital letters
Prior to this change, usernames could not start with numbers and could
not contain capital letters at all. Note that the username can also
start with capital letters.
* fix: update ssh_config with IdentityFiles fix
This adds the update that provides the ssh2 defaults for IdentityFiles.
This will allow the usual defaults to be searched when none are
explicitly provided.
* fix: overwrite identity files instead of appending
This change makes it so a waveterm configured identity file will
overwrite the one in the config instead of attempting to append it. This
matches the behavior of openssh.
* style: use regular font for markdown user input
This makes the Markdown User Input indistinct from user input without
markdown. It changes the font and makes a couple small adjustments to
the font size and line height.
* fix: use font property instead of font-family
The markdown css for User Input can be simplified with the font being
set by the "font" property rather than the "font-family" property.
* feat: allow user input verification for install
Depending on the method of installing waveshell, it may be desired to
pop up a modal for user verification. This is a first pass at handling
these special cases. The focus is on installing while previously
connected and auto installing while connecting.
* chore: update mshell to waveshell in error msg
* fix: run waveshell remotely with chosen shell
This ensures that the appropriate shell is used to run the waveshell
command remotely. It hasn't made a difference in my experience but is
desired in order to match the local launch.
* chore: simplify command to run waveshell remotely
This change removes the extra check for a directory and just tries to
run the command instead. It pipes the usual error to null and prints an
init packet instead.
* fix: prevent wavesrv crash during bad connection
The waveshell launch can fail in two different ways. If it has a
recoverable failure, it will attempt to reinstall waveshell. If not, it
is supposed to print an error. The unrecoverable case was causing a
segfault due to a misnamed variable. This change corrects it.
* fix: correct auto install user input modal
The previous combination of flags to catch auto install did not work
properly. This corrects them.
* chore: add "s" to countdown for user input timer
Makes it clear that the countdown is seconds.
* fix: remove auto password entry for sudo remote
The auto password entry for sudo remotes printed an error that was not
in response to the user input. To avoid this confusion, it has been
removed entirely.
* feat: add auto focus to user input modal
This automatically moves the cursor to the text box when the modal pops
up.
* feat: handle enter/escape keys for password entry
The password modal previously had to have buttons clicked to close it.
This change allows the user to close it with whatever is bound to escape
and to submit with whatever is bound to enter.
* chore: update an any type to correct type
* fix: correct keyboard event type from last commit
* fix: check identity files are readable early
Previously, an invalid identity file would send a dummy signer if the
file didn't exist. This resulted in extra sign in attempts that have no
chance of success. This could cause someone to get locked out of a
connection because of too many failed attempts. By performing the check
early, we no longer have to make these extra attempts.
* fix: only check global known hosts as root
The root user should not be able to write to a local known_hosts file.
If it does, it risks overwriting the default global behavior for only
the root user. This problem would only occur if waveterm was launched as
root, but we should protect against it just in case.
* feat: add remote name for remote password prompt
This change clarifies the remote name for password and keyboard
interactive prompts. It displays a message that authentication has been
requested from <hostname>. It is not added to publickey passphrase since
those phrases are specific to the key and not the remote.
* revert "simplify cmd to run waveshell remotely"
This reverts commit 4e5eea51b6.
* init
* init
* theme override mechanism by changing href value in header link tag
* remove debugging code
* remove debugging code. no need to force rerender
* remove overrides.less
* get some light colors showing in light theme
* refactor launch code to integrate install easier
The previous set up of launch was difficult to navigate. This makes it
much clearer which will make the auto install flow easier to manage.
* feat: integrate auto install into new ssh setup
This change makes it possible to auto install using the ssh library
instead of making a call to the ssh cli command. This will auto install
if the installed waveshell version is incorrect or cannot be found.
* chore: clean up some lints for sshclient
There was a context that didn't have it's cancel function deferred and
an error that wasn't being handle. They're fixed now.
* fix: disconnect client if requested or launch fail
A recent commit made it so a client remained part of the MShellProc
after being disconnected. This is undesireable since a manual
disconnection indicates that the user will need to enter their
credentials again if required. Similarly, if the launch fails with an
error, the expectation is that credentials will have to be entered
again.
* fix: use legacy timer for the time being
The legacy timer frustrates me because it adds a lot of state to the
MShellProc struct that is complicated to manage. But it currently works,
so I will be keeping it for the time being.
* fix: change separator between remoteref and name
With the inclusion of the port number in the canonical id, the :
separator between the remoteref and remote name causes problems if the
port is parsed instead. This changes it to a # in order to avoid this
conflict.
* fix: check for null when closing extra files
It is possible for the list of extra files to contain null files. This
change ensures the null files will not be erroneously closed.
* fix: change connecting method to show port once
With port added to the canonicalname, it no longer makes sense to append
the port afterward.
* feat: use user input modal for sudo connection
The sudo connection used to have a unique way of entering a password.
This change provides an alternative method using the user input modal
that the other connection methods use. It does not work perfectly with
this revision, but the basic building blocks are in place. It needs a
few timer updates to be complete.
* fix: remove old timer to prevent conflicts with it
With this change the old timer is no longer needed. It is not fully
removed yet, but it is disabled so as to not get in the way.
Additionally, error handling has been slightly improved.
There is still a bug where an incorrect password prints a new password
prompt after the error message. That needs to be fixed in the future.
* store version for build in txt file
* get version from version.txt
* remove quotes
* Use version.js for Go version too
* test
* test
* simplify things more
* rename zips to consistent waveterm name
* remove newline
* always use v
* always use Wave rather than waveterm
* testing hack font
* updates to allow font to be variable
* allow setting of font-family. get initial font family from electron (needed for loading)
* add termfontfamily
* update wave logos for README
* hook up fontfamily setting, remove old dropdown active var
* get app to reload on font change. reload fonts
* on termfontsize change, bump render version as well
* Break update code out of sstore
* add license disclaimers
* missed one
* add another
* fix regression in openai updates, remove unnecessary functions
* another copyright
* update casts
* fix issue with variadic updates
* remove logs
* remove log
* remove unnecessary log
* save work
* moved a bunch of stuff to scbus
* make modelupdate an object
* fix new screen not updating active screen
* add comment
* make updates into packet types
* different cast
* update comments, remove unused methods
* add one more comment
* add an IsEmpty() on model updates to prevent sending empty updates to client
* feat: parse multiple identity files in ssh
While this does not make it possible to discover multiple identity files
in every case, it does make it possible to parse them individually and
check for user input if it's required for each one.
* chore: remove unnecessary print in updatebus.go
* chore: remove unnecessary print in sshclient.go
* chore: remove old publicKey auth check
With the new callback in place, we no longer need this, so it has been
removed.
* refactor: move logic for wave and config options
The logic for making decisions between details made available from wave
and details made available from ssh_config was spread out. This change
condenses it into one function for gathering those details and one for
picking between them.
It also adds a few new keywords but the logic for those hasn't been
implemented yet.
* feat: allow attempting auth methods in any order
While waveterm does not provide the control over which order to attempt
yet, it is possible to provide that information in the ssh_config. This
change allows that order to take precedence in a case where it is set.
* feat: add batch mode support
BatchMode turns off user input to enter passwords for ssh. Because we
save passwords, we can still attempt these methods but we disable the
user interactive prompts in this case.
* fix: fix auth ordering and identity files
The last few commits introduced a few bugs that are fixed here. The
first is that the auth ordering is parsed as a single string and not a
list. This is fixed by manually splitting the string into a list. The
second is that the copy of identity files was not long enough to copy
the contents of the original. This is now updated to use the length of
the original in its construction.
* deactivate timer while connecting to new ssh
The new ssh setup handles timers differently from the old one due to the
possibility of asking for user input multiple times. This limited the
user input to entirely be done within 15 seconds. This removes that
restriction which will allow those timers to increase. It does not
impact the legacy ssh systems or the local connections on the new
system.
* merge branch 'main' into 'ssh--auth-control'
This was mostly straightforward, but it appears that a previous commit
to main broke the user input modals by deleting a function. This adds
that back in addition to the merge.
* fix: allow 60 second timeouts for ssh inputs
With the previous change, it is now possible to extend the timeout for
manual inputs. 60 seconds should be a reasonable starting point.
* fix: change size of dummy key to 2048
This fixes the CodeQL scan issue for using a weak key.
* working on easy global shortcut for wave
* globalshortcut setting working
* cmd for macos, alt for others
* re-remove types.ts (was added back during merge)
* rename DDItem to DropdownItem, put into custom.d.ts
* make some consts
This PR changes ModelUpdate mechanism from a statically-typed struct to an interface, allowing us to define the update mechanism and the update types separately. This sets us up to move app logic and update mechanisms into separate packages. Ultimately, sstore will only define low-level persistence logic.
* feat: create backend for user input requests
This is the first part of a change that allows the backend to request
user input from the frontend. Essentially, the backend will send a
request for the user to answer some query, and the frontend will send
that answer back. It is blocking, so it needs to be used within a
goroutine.
There is some placeholder code in the frontend that will be updated in
future commits. Similarly, there is some debug code in the backend
remote.go file.
* feat: create frontend for user input requests
This is part of a change to allow the backend to request user input from
the frontend. This adds a component specifically for handling this
logic. It is only a starting point, and does not work perfectly yet.
* refactor: update user input backend/interface
This updates the user input backend to fix a few potential bugs. It also
refactors the user input request and response types to better handle
markdown and errors while making it more convenient to work with.
A couple frontend changes were made to keep everything compatible.
* fix: add props to user input request modal
There was a second place that the modals were created that I previously
missed. This fixes that second casel
* feat: complete user input modal
This rounds out the most immediate concerns for the new user input
modal. The frontend now includes a timer to show how much time is left
and will close itself once it reaches zero. Css
formatting has been cleaned up to be more reasonable.
There is still some test code present on the back end. This will be
removed once actuall examples of the new modal are in place.
* feat: create first pass known_hosts detection
Manually integrating with golang's ssh library means that the code must
authenticate known_hosts on its own. This is a first pass at creating a
system that parses the known hosts files and denys a connection if there
is a mismatch. This needs to be updated with a means to add keys to the
known-hosts file if the user requests it.
* feat: allow writing to known_hosts first pass
As a follow-up to the previous change, we now allow the user to respond
to interactive queries in order to determine if an unknown known hosts
key can be added to a known_hosts file if it is missing. This needs to
be refined further, but it gets the basic functionality there.
* feat: add user input for kbd-interactive auth
This adds a modal so the user can respond to prompts provided using the
keyboard interactive authentication method.
* feat: add interactive password authentication
This makes the ssh password authentication interactive with its own user
input modal. Unfortunately, this method does not allow trying a default
first. This will need to be expanded in the future to accomodate that.
* fix: allow automatic and interactive auth together
Previously, it was impossible to use to separate methods of the same
type to try ssh authentication. This made it impossible to make an auto
attempt before a manual one. This change restricts that by combining
them into one method where the auto attempt is tried once first and
cannot be tried again. Following that, interactive authentication can be
tried separately.
It also lowers the time limit on kbd interactive authentication to 15
seconds due to limitations on the library we are using.
* fix: set number of retries to one in ssh
Number of retries means number of attempts after the fact, not number of
total attempts. It has been adjusted from 2 to 1 to reflect this.
* refactor: change argument order in GetUserInput
This is a simple change to move the context to the first argument of
GetUserInput to match the convention used elsewhere in the code.
* fix: set number of retries to two again
I was wrong in my previous analysis. The number given is the total
number of tries. This is confusing when keyboard authentication and
password authentication are both available which usually doesn't happen.
* feat: create naive ui for ssh key passphrases
This isn't quite as reactive as the other methods, but it does attempt
to use publickey without a passphrase, then attempt to use the password
as the passphrase, and finally prompting the user for a passphrase. The
problem with this approach is that if multiple keys are used and they
all have passphrases, they need to all be checked up front. In practice,
this will not happen often, but it is something to be aware of.
* fix: add the userinput.tsx changes
These were missed in the previous commit. Adding them now.
* first pass of copy file
* first pass fixing up function
* fleshed out copy function, still working on display and parameters
* implemented scp like syntax
* finished implemententation of copy file - there are still issues
* more bug fixes, still running into error
* pushing waveshell concurrency and channel fixes - still need to do some qol fixes before merge
* aesthetic fixes and removed logs
* fixed bug in GetRemoteRuntimeState
* formatting small fix
* fixed pretty print bytes
* added local to local command
* small fix removing workaround
* added workaround back
* added some logs for debug
* added some more logs
* quick bug fix for update cmd race condition
* added fix for race condition
* added some more logs for debugging
* fixed up logs
* added proper fe state for dest parameter
* implemented setting status indicator output
* first pass at updating status indicators
* removed logs and small fix ups
* removed whitespace
* addressed review comments
* wip
* integrate original sidebar content
* ResizableSidebar component
* trigger toggleCollapse
* remove debugging code
* minor refactor. disable text select on mousemove
* replace icons with fontawesome icons. fix alignment issues
* fix session view width when tabs overflow
* prevent index and icon from shifting when resizing
* snap effect
* minor refactor
* apply collapsed mode to sidebar contents
* change default width to 240px
* backend implementation
* fix wrong subcmd
* save collapsed state
* retore sidebar state on reload/launch
* use collapse data form db on first load. use previously saved width on expand.
* persist width as well collapse state
* various fixes and improvements
* bind methods
* refactor
* more refactor
* fix minor bug
* fix merge issues
* various fixes
* refactor
* fixes
* fix issues
* fix all issues
* resolve undefind tempWidth
* fix toggleCollapsed
* use Promise in stopResizing method
* use tempCollapsed to for real time toggling between logos
* minor method name change
* refactor
* remove debugging code
* fix conflict
* fix setting collapsed state via CLI
* minor refactor
* remove debugging code
* create setTempWidthAndTempCollapsed method
* handle invalid width set via cli
* refactor: setbycli not actually needed
* remove unused code