Documentation
¶
Overview ¶
Package tui implements a Grok-Build-CLI (GrokNight) inspired dark interactive, mouse-driven terminal UI with floating overlay modals for MCPlex CRUD diffs and live logs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Endpoint string
PublicEndpoint string // optional public tunnel MCP URL (e.g. https://mcp.example.com/mcp)
Version string
ModeLabel string // "local" | "remote"
AuthEnabled bool
OAuthEnabled bool
StrictRoot bool
InitialToken string
AutoGenerated bool
RotateToken func() (string, error)
}
Config configures the interactive MCPlex TUI header and connection info.
type EventSource ¶
EventSource streams live runtime events into the Bubble Tea loop.
func NewLocalHubSource ¶
func NewLocalHubSource(hub *events.Hub, sessionFilter string) EventSource
NewLocalHubSource attaches directly to an in-process events.Hub (zero network overhead for `--http ... --ui`).
func NewSSESource ¶
func NewSSESource(parentCtx context.Context, baseURL, token, sessionFilter string) EventSource
NewSSESource connects to a running `mcplex serve --http` instance's `GET /events` SSE stream with automatic Last-Event-ID reconnection.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea state machine for the Grok-Build-CLI dark interactive MCPlex console.
func NewModel ¶
func NewModel(cfg Config, src EventSource) *Model
NewModel creates a new TUI model backed by source (local EventHub or remote SSE).