feat: add supervisor prototype with embedded frontend

This commit is contained in:
root
2026-03-09 19:15:53 +01:00
parent 96c4ce1697
commit 84de557052
56 changed files with 4044 additions and 10 deletions

31
internal/ws/messages.go Normal file
View File

@ -0,0 +1,31 @@
package ws
import "encoding/json"
type Envelope struct {
Type string `json:"type"`
Session string `json:"session"`
Payload json.RawMessage `json:"payload"`
}
type TerminalInputPayload struct {
Data string `json:"data"`
}
type TerminalOutputPayload struct {
Data string `json:"data"`
}
type TerminalResizePayload struct {
Cols int `json:"cols"`
Rows int `json:"rows"`
}
type SessionStatusPayload struct {
Status string `json:"status"`
ExitCode *int `json:"exitCode,omitempty"`
}
type ErrorPayload struct {
Message string `json:"message"`
}