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

32
internal/domain/event.go Normal file
View File

@ -0,0 +1,32 @@
package domain
import "time"
type EventType string
const (
EventTerminalOutput EventType = "terminal.output"
EventSessionStatus EventType = "session.status"
EventError EventType = "error"
)
type Event struct {
Type EventType `json:"type"`
SessionID string `json:"session"`
Payload any `json:"payload"`
At time.Time `json:"at"`
}
// TerminalOutputEvent carries raw terminal bytes as UTF-8 text.
type TerminalOutputEvent struct {
Data string `json:"data"`
}
type SessionStatusEvent struct {
Status SessionStatus `json:"status"`
ExitCode *int `json:"exitCode,omitempty"`
}
type ErrorEvent struct {
Message string `json:"message"`
}