feat: add supervisor prototype with embedded frontend
This commit is contained in:
31
internal/ws/messages.go
Normal file
31
internal/ws/messages.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user