Class: AgentsControl::Terminals::Null

Inherits:
Base
  • Object
show all
Defined in:
lib/agents_control/terminals/null.rb

Overview

Backend for sessions that have no terminal at all.

This isn't a stub for an exotic edge case: an agent launched from the VS Code extension sits on tty ?? — it has neither a tab nor a pty, and such sessions are often the majority of active ones, not a rare exception.

A session like this shows up in the list and can be worked with through hooks — answering questions, reading the transcript. What's off-limits is anything that needs a terminal: sending text, reading the screen, creating a tab.

Instance Method Summary collapse

Methods inherited from Base

#capture, #close, #create_tab, #focus, #initialize, #send_text

Constructor Details

This class inherits a constructor from AgentsControl::Terminals::Base

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


19
# File 'lib/agents_control/terminals/null.rb', line 19

def available? = true

#nameObject



17
# File 'lib/agents_control/terminals/null.rb', line 17

def name = :none

#sessionsObject

This backend doesn't enumerate its own sessions: they're supplied by ProcessProbe (terminalless agent processes) and the hook registry.



24
# File 'lib/agents_control/terminals/null.rb', line 24

def sessions = []