admin

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package admin is the privileged admin console (PRD §6), reached over SSH as `ssh admin@host` by an account in the operator allowlist ($AGENTBBS_ADMINS).

It is a self-contained Bubble Tea model (not a hub plugin) so it never shows up in the public menu: the route gates access, the model drives the console. Four sections cover the M2 scope — users, live sessions, moderation/audit, and config/plugins — over the shared store plus a live-session registry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Host           string
	Sandbox        string
	PodsEngine     string // "" when pods are disabled on this host
	MailConfigured bool
	Admins         []string
	Plugins        []PluginInfo
}

Env is the read-only runtime snapshot shown on the config screen.

type Live

type Live struct {
	ID     int64
	User   string
	Remote string
	Route  string
	Start  time.Time
}

Live is one connected SSH session, as seen by the registry.

type LiveSessions

type LiveSessions interface {
	List() []Live
	Kill(id int64) bool
}

LiveSessions is the registry of currently-connected sessions the console can list and disconnect. main wires the concrete implementation.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the admin console.

func New

func New(admin auth.User, st store.Store, live LiveSessions, selfLive int64, env Env) Model

New builds the admin console for one session.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type PluginInfo

type PluginInfo struct{ ID, Title string }

PluginInfo identifies a registered hub plugin for the config screen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL