Documentation
¶
Index ¶
- type Multiplexer
- type PaneID
- type TmuxMultiplexer
- func (t *TmuxMultiplexer) Close() error
- func (t *TmuxMultiplexer) CreateSession(id string) error
- func (t *TmuxMultiplexer) NewPane(role bus.AgentRole) (PaneID, error)
- func (t *TmuxMultiplexer) SendCommand(id PaneID, cmd string) error
- func (t *TmuxMultiplexer) SpawnAgent(pane PaneID, role bus.AgentRole, sessionID, socketPath string) error
- func (t *TmuxMultiplexer) WriteToPane(id PaneID, text string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Multiplexer ¶
type Multiplexer interface {
// CreateSession creates a new detached session with the given ID.
CreateSession(id string) error
// NewPane creates a new pane (window or split) for the given agent role.
NewPane(role bus.AgentRole) (PaneID, error)
// WriteToPane sends text to the pane (does not press Enter).
WriteToPane(id PaneID, text string) error
// Close kills the entire session.
Close() error
}
Multiplexer manages a terminal multiplexer session with per-agent panes.
type TmuxMultiplexer ¶
type TmuxMultiplexer struct {
// contains filtered or unexported fields
}
TmuxMultiplexer implements Multiplexer via the tmux CLI.
func New ¶
func New(sessionID string) *TmuxMultiplexer
New creates a TmuxMultiplexer for the given session ID. Call CreateSession before using other methods.
func (*TmuxMultiplexer) Close ¶
func (t *TmuxMultiplexer) Close() error
Close kills the tmux session.
func (*TmuxMultiplexer) CreateSession ¶
func (t *TmuxMultiplexer) CreateSession(id string) error
CreateSession runs: tmux new-session -d -s <id> -x 220 -y 50
func (*TmuxMultiplexer) NewPane ¶
func (t *TmuxMultiplexer) NewPane(role bus.AgentRole) (PaneID, error)
NewPane creates tmux panes for the first 4 roles using splits in the initial "agents" window. Additional roles use dedicated windows so panes stay legible.
func (*TmuxMultiplexer) SendCommand ¶
func (t *TmuxMultiplexer) SendCommand(id PaneID, cmd string) error
SendCommand sends a shell command to the pane and presses Enter.
func (*TmuxMultiplexer) SpawnAgent ¶
func (t *TmuxMultiplexer) SpawnAgent(pane PaneID, role bus.AgentRole, sessionID, socketPath string) error
SpawnAgent sends DECSR agent sub-command to a pane.
func (*TmuxMultiplexer) WriteToPane ¶
func (t *TmuxMultiplexer) WriteToPane(id PaneID, text string) error
WriteToPane sends text to the pane without pressing Enter.