RemoteTerminals: the mechanism TerminalRelay implements. The terminal manager asks it for an id it does not hold, and the platform offers it every socket before serving a local pty.
API
@Interface("@prismshadow/penguin-server#RemoteTerminals")
export abstract class RemoteTerminals {
abstract get(id: string): RelayTerminal | undefined;
abstract attach(
ws: WsSocket,
session: RelayTerminal,
url: URL,
log: (line: string) => void,
): boolean;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (2)
get
get(id: string): RelayTerminal | undefinedThe reference a remote id names, in the shape the runtime's owner check reads; undefined for a local id.
@paramid
string@returns
RelayTerminal | undefinedattach
attach(ws: WsSocket, session: RelayTerminal, url: URL, log: (line: string) => void): booleanJoins a viewer's socket to the machine's stream when session is a remote reference.
False for a local pty, which the caller then serves itself.
@paramws
WsSocket@paramsession
RelayTerminal@paramurl
URL@paramlog
(line: string) => void@returns
boolean