Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5d0939f
new mainserver type to hold jwt keys
sawka Dec 23, 2025
a6efcb7
add publickey to auth response
sawka Dec 23, 2025
022263a
new wshrouter working for basic connections
sawka Dec 24, 2025
ad18778
remove extra "\n" for terminal rpc client
sawka Dec 24, 2025
2822e68
add auth to new router, got wsh working locally
sawka Dec 24, 2025
75852ad
get the FE working with new router, more logging + fixes
sawka Dec 24, 2025
ff2c149
add new setpeerinfo control message
sawka Dec 24, 2025
83a5972
fix circular reference
sawka Dec 24, 2025
ea8698e
remove wshcontext from two commands
sawka Dec 27, 2025
773b618
remove setview command
sawka Dec 27, 2025
ca67ce7
remove more wshcontext tags
sawka Dec 27, 2025
0eea70b
finally remove HackRpcContextIntoData
sawka Dec 27, 2025
f91809c
remove tabid from rpccontext
sawka Dec 27, 2025
12a931f
switch to new JWT format
sawka Dec 27, 2025
22395ed
remove old psk secret
sawka Dec 27, 2025
7471628
return and store public key
sawka Dec 30, 2025
4998f19
complete the full refactor, remove wshmultiproxy, authtoken, old weir…
sawka Dec 31, 2025
2f3e92d
add some logging
sawka Dec 31, 2025
5dddc58
move jwt get to wshserver
sawka Dec 31, 2025
00e6c8f
implement $control:root to get direct routing to the root router
sawka Dec 31, 2025
44da049
add control route logging
sawka Dec 31, 2025
6435cf0
fix really old copy/paste error in the wsl stuff
sawka Dec 31, 2025
1ea7499
giant change to allow us to separate out the controlplane impl from t…
sawka Jan 1, 2026
15854a9
send authenticatetokenverify to root router
sawka Jan 1, 2026
b65e5cc
more logging for connserver in dev mode
sawka Jan 1, 2026
b0ab3d1
expand ~ for domain socket name
sawka Jan 1, 2026
ec6e5f9
sigusr1 to logwriter
sawka Jan 1, 2026
0993af7
fix tokenverify flow
sawka Jan 1, 2026
c851c92
fix rm syntax for windows
sawka Jan 1, 2026
4a1da66
ignore manifests (winget)
sawka Jan 1, 2026
58c9995
fix usr1 logging, also remove jwt from wsl
sawka Jan 1, 2026
8081138
fix rm again...
sawka Jan 1, 2026
102db76
minor updates
sawka Jan 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ out/
make/
artifacts/
mikework/
manifests/
.env
out

Expand Down
25 changes: 18 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ vars:
BIN_DIR: "bin"
VERSION:
sh: node version.cjs
RM: '{{if eq OS "windows"}}powershell Remove-Item -Force -ErrorAction SilentlyContinue{{else}}rm -f{{end}}'
RMRF: '{{if eq OS "windows"}}powershell Remove-Item -Force -Recurse -ErrorAction SilentlyContinue{{else}}rm -rf{{end}}'
DATE: '{{if eq OS "windows"}}powershell Get-Date -UFormat{{else}}date{{end}}'
ARTIFACTS_BUCKET: waveterm-github-artifacts/staging-w2
Expand Down Expand Up @@ -177,7 +176,7 @@ tasks:
desc: Build the wavesrv component for macOS (Darwin) platforms (generates artifacts for both arm64 and amd64).
platforms: [darwin]
cmds:
- cmd: "{{.RM}} dist/bin/wavesrv*"
- cmd: rm -f dist/bin/wavesrv*
ignore_error: true
- task: build:server:internal
vars:
Expand Down Expand Up @@ -224,7 +223,7 @@ tasks:
desc: Build the wavesrv component for Windows platforms (only generates artifacts for the current architecture).
platforms: [windows]
cmds:
- cmd: "{{.RM}} dist/bin/wavesrv*"
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path dist/bin/wavesrv*"
ignore_error: true
- task: build:server:internal
vars:
Expand All @@ -237,7 +236,7 @@ tasks:
desc: Build the wavesrv component for Linux platforms (only generates artifacts for the current architecture).
platforms: [linux]
cmds:
- cmd: "{{.RM}} dist/bin/wavesrv*"
- cmd: rm -f dist/bin/wavesrv*
ignore_error: true
- task: build:server:internal
vars:
Expand All @@ -261,7 +260,11 @@ tasks:
build:wsh:
desc: Build the wsh component for all possible targets.
cmds:
- cmd: "{{.RM}} dist/bin/wsh*"
- cmd: rm -f dist/bin/wsh*
platforms: [darwin, linux]
ignore_error: true
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path dist/bin/wsh*"
platforms: [windows]
ignore_error: true
- task: build:wsh:internal
vars:
Expand Down Expand Up @@ -527,7 +530,11 @@ tasks:
desc: Create package.json for tsunami scaffold using npm commands
dir: tsunami/frontend/scaffold
cmds:
- cmd: "{{.RM}} package.json"
- cmd: rm -f package.json
platforms: [darwin, linux]
ignore_error: true
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path package.json"
platforms: [windows]
ignore_error: true
- npm --no-workspaces init -y --init-license Apache-2.0
- npm pkg set name=tsunami-scaffold
Expand Down Expand Up @@ -588,7 +595,11 @@ tasks:
tsunami:build:
desc: Build the tsunami binary.
cmds:
- cmd: "{{.RM}} bin/tsunami*"
- cmd: rm -f bin/tsunami*
platforms: [darwin, linux]
ignore_error: true
- cmd: powershell -Command "Remove-Item -Force -ErrorAction SilentlyContinue -Path bin/tsunami*"
platforms: [windows]
ignore_error: true
- mkdir -p bin
- cd tsunami && go build -ldflags "-X main.BuildTime=$({{.DATE}} +'%Y%m%d%H%M') -X main.TsunamiVersion={{.VERSION}}" -o ../bin/tsunami{{exeExt}} cmd/main-tsunami.go
Expand Down
15 changes: 11 additions & 4 deletions cmd/server/main-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ func shutdownActivityUpdate() {
func createMainWshClient() {
rpc := wshserver.GetMainRpcClient()
wshfs.RpcClient = rpc
wshutil.DefaultRouter.RegisterRoute(wshutil.DefaultRoute, rpc, true)
wshutil.DefaultRouter.RegisterTrustedLeaf(rpc, wshutil.DefaultRoute)
wps.Broker.SetClient(wshutil.DefaultRouter)
localConnWsh := wshutil.MakeWshRpc(nil, nil, wshrpc.RpcContext{Conn: wshrpc.LocalConnName}, &wshremote.ServerImpl{}, "conn:local")
localConnWsh := wshutil.MakeWshRpc(wshrpc.RpcContext{Conn: wshrpc.LocalConnName}, &wshremote.ServerImpl{}, "conn:local")
go wshremote.RunSysInfoLoop(localConnWsh, wshrpc.LocalConnName)
wshutil.DefaultRouter.RegisterRoute(wshutil.MakeConnectionRouteId(wshrpc.LocalConnName), localConnWsh, true)
wshutil.DefaultRouter.RegisterTrustedLeaf(localConnWsh, wshutil.MakeConnectionRouteId(wshrpc.LocalConnName))
}

func grabAndRemoveEnvVars() error {
Expand Down Expand Up @@ -457,10 +457,12 @@ func maybeStartPprofServer() {
}

func main() {
log.SetFlags(log.LstdFlags | log.Lmicroseconds)
log.SetFlags(0) // disable timestamp since electron's winston logger already wraps with timestamp
log.SetPrefix("[wavesrv] ")
wavebase.WaveVersion = WaveVersion
wavebase.BuildTime = BuildTime
wshutil.DefaultRouter = wshutil.NewWshRouter()
wshutil.DefaultRouter.SetAsRootRouter()

err := grabAndRemoveEnvVars()
if err != nil {
Expand Down Expand Up @@ -546,6 +548,11 @@ func main() {
log.Printf("error clearing temp files: %v\n", err)
return
}
err = wcore.InitMainServer()
if err != nil {
log.Printf("error initializing mainserver: %v\n", err)
return
}

err = shellutil.FixupWaveZshHistory()
if err != nil {
Expand Down
Loading
Loading