Versions in this module Expand all Collapse all v1 v1.0.0 Nov 4, 2025 Changes in this version + type Agent struct + Conn *jsonrpc2.Conn + DeviceName string + ID string + SecurityKey string + ServerURL string + Sessions map[string]*Session + func New(id, deviceName, serverURL string) *Agent + func NewWithSecurityKey(id, deviceName, serverURL, securityKey string) *Agent + func (a *Agent) AddSession(session *Session) + func (a *Agent) Connect() error + func (a *Agent) GetSession(sessionID string) (*Session, bool) + func (a *Agent) RemoveSession(sessionID string) + func (a *Agent) Run() + type Handler struct + func NewHandler(agent *Agent) *Handler + func (h *Handler) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) + type Session struct + Cmd *exec.Cmd + Done chan struct{} + ID string + Pty *os.File + func NewSession(id string, pty *os.File, cmd *exec.Cmd) *Session + func (s *Session) Close() + func (s *Session) Write(data []byte) error