Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Has been cancelled
- OAuth PKCE flow for Max subscription auth (no API key needed) - Claude API client with SSE streaming (Messages API v1) - 16 tool definitions: terminal, SFTP, RDP, session management - Tool dispatch router mapping to existing Wraith services - Conversation manager with SQLite persistence - Terminal output ring buffer for AI context - RDP screenshot encoder (RGBA → JPEG with downscaling) - Wired into Wails app as AIService Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
56 lines
1.2 KiB
Go
56 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
"log"
|
|
"log/slog"
|
|
|
|
wraithapp "github.com/vstockwell/wraith/internal/app"
|
|
"github.com/wailsapp/wails/v3/pkg/application"
|
|
)
|
|
|
|
// version is set at build time via -ldflags "-X main.version=..."
|
|
var version = "dev"
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
slog.Info("starting Wraith")
|
|
|
|
wraith, err := wraithapp.New()
|
|
if err != nil {
|
|
log.Fatalf("failed to initialize: %v", err)
|
|
}
|
|
|
|
app := application.New(application.Options{
|
|
Name: "Wraith",
|
|
Description: "SSH + RDP + SFTP Desktop Client",
|
|
Services: []application.Service{
|
|
application.NewService(wraith),
|
|
application.NewService(wraith.Connections),
|
|
application.NewService(wraith.Themes),
|
|
application.NewService(wraith.Settings),
|
|
application.NewService(wraith.SSH),
|
|
application.NewService(wraith.SFTP),
|
|
application.NewService(wraith.RDP),
|
|
application.NewService(wraith.AI),
|
|
},
|
|
Assets: application.AssetOptions{
|
|
Handler: application.BundledAssetFileServer(assets),
|
|
},
|
|
})
|
|
|
|
app.Window.NewWithOptions(application.WebviewWindowOptions{
|
|
Title: "Wraith",
|
|
Width: 1400,
|
|
Height: 900,
|
|
URL: "/",
|
|
BackgroundColour: application.NewRGBA(13, 17, 23, 255),
|
|
})
|
|
|
|
if err := app.Run(); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|