multiplexer

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 PaneID

type PaneID string

PaneID identifies a terminal pane within a multiplexer session.

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.

Jump to

Keyboard shortcuts

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