TerminalAPI

Top

CommandStream()

Bidirectional streaming RPC for real-time terminal control and data exchange.

Request: streaming CommandStreamRequest
Response: streaming CommandStreamResponse

CommandStreamRequest

The request message must contain either a control message or an input message.

FieldTypeDescription
controlControl

Control messages can be used to configure and control the terminal.

inputInput

Input messages are used to send data to the terminal.

CommandStreamResponse

The response message contains either a status message or stream of bytes.

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

databytes

Bytes received from the terminal.

Control

FieldTypeDescription
commandstring

Optional command to execute on the terminal. If omitted, the default command is `bash` on linux and `zsh` on macos.

argstring repeated

Optional arguments to pass to the command.

stopstring

Not currently used.

pausestring

Not currently used.

resumestring

Not currently used.

resetstring

Not currently used.

terminal_sizeTerminalSize

Optional terminal size to set.

interruptint32

If non-zero, a `kill` signal will be sent with this value to the running process.

Input

FieldTypeDescription
databytes

The data to send to the terminal.

TerminalSize

FieldTypeDescription
rowsint32

The number of rows in the terminal.

colsint32

The number of columns in the terminal.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)