TerminalSession
Assembles a session around a caller-supplied parser and response reader. The caller owns the parser's host-event wiring, including accepted shell events if its selected producer interprets protocols. Use create for standard parser assembly and automatic dispatch to that producer. Host-owned models supplied through TerminalShellIntegrationFactory.host need no parser callbacks.
terminal, renderReader, responseReader, and parser must operate on the same core state; adapters around that state are permitted. The session owns their exclusive runtime access, finalizes parser EOF, and closes the connector. renderPublisher must have no other writer. inputEncoderFactory creates separate admission and streaming encoders bound to session-owned output. A supplied hostCommandAdapter must be the adapter used by parser; it receives session host-policy, theme-palette, and Backarrow-default changes. Custom parsers supplied without this adapter own their host-policy updates and Backarrow-default mode-report wiring. External image decoding requires both the adapter and a parser implementing TerminalGraphicsOutputParser. Otherwise the supplied sink owns decoding.
Parameters
exclusively owned mutable terminal state.
exclusively owned cache publisher for this terminal.
render projection of the same terminal state.
response channel of the same terminal state.
exclusively owned transport, closed with the session.
exclusively owned parser wired to this terminal's sink.
independent admission/bulk encoder factory, or the built-in encoder when null.
resolver for the parser's hyperlink registry.
parser's adapter, or null for caller-owned policy wiring.
initial input-encoding policy.
non-owned render, metadata and timeout dispatcher.
non-owned dispatcher for potentially blocking connector writes and providers.
optional sole shell metadata producer.
Assembles a session around a caller-supplied parser and response reader. The caller owns the parser's host-event wiring, including accepted shell events if its selected producer interprets protocols. Use create for standard parser assembly and automatic dispatch to that producer. Host-owned models supplied through TerminalShellIntegrationFactory.host need no parser callbacks.
terminal, renderReader, responseReader, and parser must operate on the same core state; adapters around that state are permitted. The session owns their exclusive runtime access, finalizes parser EOF, and closes the connector. renderPublisher must have no other writer. inputEncoderFactory creates separate admission and streaming encoders bound to session-owned output. A supplied hostCommandAdapter must be the adapter used by parser; it receives session host-policy, theme-palette, and Backarrow-default changes. Custom parsers supplied without this adapter own their host-policy updates and Backarrow-default mode-report wiring. External image decoding requires both the adapter and a parser implementing TerminalGraphicsOutputParser. Otherwise the supplied sink owns decoding.
Parameters
exclusively owned mutable terminal state.
exclusively owned cache publisher for this terminal.
render projection of the same terminal state.
response channel of the same terminal state.
exclusively owned transport, closed with the session.
exclusively owned parser wired to this terminal's sink.
independent admission/bulk encoder factory, or the built-in encoder when null.
resolver for the parser's hyperlink registry.
parser's adapter, or null for caller-owned policy wiring.
initial input-encoding policy.
non-owned render, metadata and timeout dispatcher.
non-owned dispatcher for potentially blocking connector writes and providers.
optional sole shell metadata producer.
non-owned blocking cleanup dispatcher, independent of connector writes and off UI threads.