bridge

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package bridge provides adapters for connecting to agent runtimes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	// Send sends a message to the agent.
	Send(message string) error

	// Interrupt sends an interrupt signal (Ctrl-C) to the agent.
	Interrupt() error

	// Close releases any resources held by the adapter.
	io.Closer
}

Adapter is the interface for agent runtime adapters. Adapters handle sending messages and interrupts to agents.

type Config

type Config struct {
	// Type is the adapter type (e.g., "tmux", "process").
	Type string `json:"type"`
}

Config holds common adapter configuration.

type TmuxAdapter

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

TmuxAdapter sends messages to a tmux pane.

func NewTmuxAdapter

func NewTmuxAdapter(cfg TmuxConfig) (*TmuxAdapter, error)

NewTmuxAdapter creates a new tmux adapter.

func (*TmuxAdapter) Close

func (t *TmuxAdapter) Close() error

Close releases resources (no-op for tmux).

func (*TmuxAdapter) Interrupt

func (t *TmuxAdapter) Interrupt() error

Interrupt sends Ctrl-C to the tmux pane.

func (*TmuxAdapter) Send

func (t *TmuxAdapter) Send(message string) error

Send sends a message to the tmux pane.

func (*TmuxAdapter) Target

func (t *TmuxAdapter) Target() string

Target returns the tmux target string.

type TmuxConfig

type TmuxConfig struct {
	// Session is the tmux session name.
	Session string `json:"session"`

	// Pane is the tmux pane identifier (e.g., "0", "1", or "0.1" for window.pane).
	Pane string `json:"pane"`
}

TmuxConfig holds configuration for the tmux adapter.

Jump to

Keyboard shortcuts

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